diff --git a/src/api/ma/partType.js b/src/api/ma/partType.js index b8ab9a49..6c87e3dc 100644 --- a/src/api/ma/partType.js +++ b/src/api/ma/partType.js @@ -1,9 +1,9 @@ import request from '@/utils/request' //机具类型管理列表信息 -export function getListAccessory(query) { +export function getListByPartType(query) { return request({ - url: '/material/ma_part_type/list', + url: '/material/ma_part_type/getListByPartType', method: 'get', params: query, }) diff --git a/src/api/ma/typeConfigKeeper.js b/src/api/ma/typeConfigKeeper.js index 77470f0e..96e58079 100644 --- a/src/api/ma/typeConfigKeeper.js +++ b/src/api/ma/typeConfigKeeper.js @@ -34,4 +34,13 @@ export function noBindKeeper(data) { method: 'delete', data: data, }) +} + +//获取库管员树的角色数组 +export function getKeeperIds(itemName) { + return request({ + url: '/material/bm_config/list/', + method: 'get', + params:{"itemName":itemName}, + }) } \ No newline at end of file diff --git a/src/api/ma/typeConfigRepair.js b/src/api/ma/typeConfigRepair.js index 0cca1ec4..09bd2795 100644 --- a/src/api/ma/typeConfigRepair.js +++ b/src/api/ma/typeConfigRepair.js @@ -34,4 +34,13 @@ export function noBindKeeper(data) { method: 'delete', data: data, }) +} + +//获取维修员树的角色数组 +export function getRepairIds(itemName) { + return request({ + url: '/material/bm_config/list/', + method: 'get', + params:{"itemName":itemName}, + }) } \ No newline at end of file diff --git a/src/views/material/basic/siteConfig/index.vue b/src/views/material/basic/siteConfig/index.vue new file mode 100644 index 00000000..d046ba5b --- /dev/null +++ b/src/views/material/basic/siteConfig/index.vue @@ -0,0 +1,162 @@ + + + + + + 库管员配置 + + + + {{ item.name }} + + + 保存库管员配置 + + + + 维修员配置 + + + + {{ item.name }} + + + 保存维修员配置 + + + + + + + + 库管员配置 + + + + {{ item.name }} + + + 保存库管员2配置 + + + + 维修员配置 + + + + {{ item.name }} + + + 保存维修员配置2 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/material/ma/partType/index.vue b/src/views/material/ma/partType/index.vue index add2415a..a7d5308a 100644 --- a/src/views/material/ma/partType/index.vue +++ b/src/views/material/ma/partType/index.vue @@ -114,6 +114,16 @@ + + 新增 + @@ -149,9 +155,21 @@ + + 修改 @@ -198,7 +215,6 @@ icon="el-icon-delete-solid" @click="handleDelete(scope.row)" v-hasPermi="['machinery:type:edit']" - v-if="(!scope.row.children)" > 删除 @@ -216,49 +232,7 @@ - + + + + + + + + + + + + + + + + + + 确 定 + 取 消 + + + + + - \ No newline at end of file + + \ No newline at end of file diff --git a/src/views/material/ma/typeConfigKeeper/index.vue b/src/views/material/ma/typeConfigKeeper/index.vue index 4eb4b301..2110d2ed 100644 --- a/src/views/material/ma/typeConfigKeeper/index.vue +++ b/src/views/material/ma/typeConfigKeeper/index.vue @@ -246,10 +246,9 @@ import { getListByMaType, } from "@/api/ma/base"; import { - getMatConfigList, - getListByMatConfig, bindKeeper, - noBindKeeper + noBindKeeper, + getKeeperIds } from "@/api/ma/typeConfigKeeper"; import { getUserList } from "@/api/basic/basic"; import { getInfo } from "@/api/login"; @@ -319,6 +318,7 @@ export default { children: "children", label: "label", }, + roleIdsTemp:[], userList:[], userNoList:[], userIdTemp: -1, @@ -369,8 +369,6 @@ export default { // this.getList(); // },200) - // this.getUserList() - // this.getPropData() }, methods: { // getInfo() { @@ -446,12 +444,13 @@ export default { this.form.keeperDataPro = this.keeperProRange.value; }, /** 查询新增页面-上级类型下拉树结构 */ - async getTreeData() { - // getMatConfigList().then((response) => { - // this.treeOptions = response.data; - // }); - const roleIds = [7,14]; - getUserList({ roleIds: roleIds}).then(response => { + async getTreeData() {; + const itemName = 'ku_guan_role_ids' + await getKeeperIds(itemName).then((response) =>{ + const roleIds = response.rows[0].itemValue.split(',').map(item => Number(item)) + this.roleIdsTemp = roleIds + }) + await getUserList({ roleIds: this.roleIdsTemp}).then(response => { this.treeOptions = response.data }); }, diff --git a/src/views/material/ma/typeConfigRepair/index.vue b/src/views/material/ma/typeConfigRepair/index.vue index 898ecb54..5726791d 100644 --- a/src/views/material/ma/typeConfigRepair/index.vue +++ b/src/views/material/ma/typeConfigRepair/index.vue @@ -246,10 +246,9 @@ import { getListByMaType, } from "@/api/ma/base"; import { - getMatConfigList, - getListByMatConfig, bindKeeper, - noBindKeeper + noBindKeeper, + getRepairIds } from "@/api/ma/typeConfigRepair"; import { getUserList } from "@/api/basic/basic"; import { getInfo } from "@/api/login"; @@ -280,6 +279,7 @@ export default { keeperProRange: [], keeperMatRange: [], keeperNameRange: [], + roleIdsTemp:[], //维修员用户数据 repairUserList: null, //资产类型数据 @@ -399,11 +399,12 @@ export default { /** 查询新增页面-上级类型下拉树结构 */ async getTreeData() { - // getMatConfigList().then((response) => { - // this.treeOptions = response.data; - // }); - const roleIds = [8,9,15,16]; - getUserList({ roleIds: roleIds}).then(response => { + const itemName = 'wei_xiu_role_ids' + await getRepairIds(itemName).then((response) =>{ + const roleIds = response.rows[0].itemValue.split(',').map(item => Number(item)) + this.roleIdsTemp = roleIds + }) + await getUserList({ roleIds: this.roleIdsTemp}).then(response => { this.treeOptions = response.data }); }, @@ -425,7 +426,6 @@ export default { async getList() { this.loading = true this.queryParams.displayBindRelationship="true"; - console.log('queryParams1',this.queryParams) await getListByMaType(this.queryParams).then((response) => { this.typeList = response.data.rows this.total = response.data.total