Commit d553149b by 周海峰

分组

parent 25df482f
...@@ -70,6 +70,12 @@ ...@@ -70,6 +70,12 @@
<q-field :count="255"> <q-field :count="255">
<q-input v-model="temp.title" float-label="名称" /> <q-input v-model="temp.title" float-label="名称" />
</q-field> </q-field>
<q-field>
<div class="row no-wrap">
<q-select class="col" v-model="temp.groupCode" float-label="应用分组" radio :options="applicationsGroupOptions"/>
<q-btn color="negative" flat round dense icon="add" @click="openAddApplicationsGroup" />
</div>
</q-field>
<q-field :count="255"> <q-field :count="255">
<q-input v-model="temp.href" float-label="连接" /> <q-input v-model="temp.href" float-label="连接" />
</q-field> </q-field>
...@@ -95,9 +101,9 @@ ...@@ -95,9 +101,9 @@
<q-input v-model="temp.mailtype" float-label="待办标识(待办唯一标识,需要给到对方系统)" /> <q-input v-model="temp.mailtype" float-label="待办标识(待办唯一标识,需要给到对方系统)" />
</q-field> </q-field>
<q-field> <q-field>
<q-input v-model="temp.img" float-label="上传图标" disable v-if="subtype=='edit'"/> <q-input v-model="temp.img" float-label="图标路径" disable v-if="subtype=='edit'"/>
<q-uploader <q-uploader
float-label="图标路径" float-label="上传图标"
ref="attachmentUploader" ref="attachmentUploader"
name="file" name="file"
@uploaded="attachmentUploaded" @uploaded="attachmentUploaded"
...@@ -105,7 +111,6 @@ ...@@ -105,7 +111,6 @@
:url="uploadurl" :url="uploadurl"
auto-expand auto-expand
clearable clearable
hide-upload-button hide-upload-button
@add="$refs['attachmentUploader'].upload()" @add="$refs['attachmentUploader'].upload()"
></q-uploader> ></q-uploader>
...@@ -122,11 +127,12 @@ ...@@ -122,11 +127,12 @@
<script> <script>
import { getPlatformApplicationsPagedList,saveapp,delapp } from "@/service/permission/platformapplications"; import { getPlatformApplicationsPagedList,saveapp,delapp } from "@/service/permission/platformapplications";
import { getApplicationsGroupList,addApplicationsGroup,updateApplicationsGroup,delApplicationsGroup } from "@/service/permission/platformapplicationsGroup";
const uploadpath="http://nw.sy-metro.com:6104/uploadfileadmin/manager"; const uploadpath="http://nw.sy-metro.com:6104/uploadfileadmin/manager";
export default { export default {
data() { data() {
return { return {
uploadurl: uploadpath+"/znzl/file/upload/videoandimgurl?uploadPar=adv&", uploadurl: "manager/znzl/file/upload/videoandimgurl?uploadPar=adv&",
selectOptions:[ selectOptions:[
{ {
label: '启用', label: '启用',
...@@ -218,6 +224,7 @@ ...@@ -218,6 +224,7 @@
appidflag:true, appidflag:true,
subtype: "add", subtype: "add",
fileCount: 0, fileCount: 0,
applicationsGroupOptions: [] // 应用分组下拉选项
} }
}, },
mounted() { mounted() {
...@@ -225,6 +232,9 @@ ...@@ -225,6 +232,9 @@
pagination: this.serverPagination, pagination: this.serverPagination,
filter: this.filter filter: this.filter
}); });
// 获取应用分组选项
this.getApplicationsGroupOptions();
}, },
methods: { methods: {
async request(props) { async request(props) {
...@@ -342,8 +352,46 @@ ...@@ -342,8 +352,46 @@
position: "top-right" position: "top-right"
}); });
} }
},
// 获取应用分组选项
async getApplicationsGroupOptions() {
try {
const response = await getApplicationsGroupList({});
this.applicationsGroupOptions = response.data.data.map(group => ({
label: group.groupName,
value: group.groupCode
}));
} catch (error) {
console.error("Failed to fetch applications group options:", error);
}
},
// 点击添加应用分组按钮
async openAddApplicationsGroup() {
try {
const name = await this.$q.dialog({
title: '添加应用分组',
prompt: {
model: '',
type: 'text',
isValid: val => val && val.trim().length > 0
},
ok: { label: '添加', push: true },
cancel: { label: '取消', push: true }
});
console.log(name);
// `name` contains the input string in this Quasar version
if (name) {
const groupName = name; // be defensive across versions
await addApplicationsGroup({ groupName: groupName });
this.$q.notify({ type: 'positive', message: '添加成功', position: 'bottom-right' });
// refresh options
await this.getApplicationsGroupOptions();
}
} catch (e) {
// user cancelled or error
} }
}, },
},
} }
</script> </script>
......
...@@ -155,6 +155,11 @@ const appRouter = [{ ...@@ -155,6 +155,11 @@ const appRouter = [{
name: 'platformapplications', name: 'platformapplications',
component: () => import('pages/platformapplications/platformapplications.vue') component: () => import('pages/platformapplications/platformapplications.vue')
}, },
{
path: 'platformapplicationsGroup',
name: 'platformapplicationsGroup',
component: () => import('pages/platformapplicationsGroup/platformapplicationsGroup.vue')
},
] ]
}, },
{ {
......
import request from '@/libs/request'
export function getApplicationsGroupList(query) {
return request({
url: '/applicationsGroup/list',
method: 'get',
params: query
})
}
export function addApplicationsGroup(data) {
return request({
url: '/applicationsGroup/add',
method: 'post',
data: data,
loading:"hourglass"
})
}
export function updateApplicationsGroup(data) {
return request({
url: '/applicationsGroup/update',
method: 'post',
data: data,
loading:"hourglass"
})
}
export function delApplicationsGroup(data) {
return request({
url: '/applicationsGroup/delete',
method: 'post',
data: data,
loading:"hourglass"
})
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论