{
+ // // console.log('info1',key)
+ // // console.log('info2',value)
+ // // id = id+1;
+ // // treeData[0].children.push({ 'label': key, 'id': id, 'children': value.children })
+ // // });
+ // console.log("info",myMap.get(menu[1].ylzd1))
+ // // const treeData= [{ 'label': '全部功能', 'id': '@', children: [], disabled: true }]
+ // treeData[0].children.push({ 'label': '计划排产', 'id': 1, 'children': []})
+ // treeData[0].children.push({ 'label': '计划排产', 'id': 2, 'children': []})
+ // treeData[0].children.push({ 'label': '计划排产', 'id': 3, 'children': []})
+ // // console.log('info',myMap)
+ // // console.log('infotree',treeData)
+ // // const info = menu.reduce((map, node) => {
+ // // node.label = node.ylzd1
+ // // node.children = []
+ // // return map[node.ylzd1] = node, node.children = [], map
+ // // const myMap = new Map([
+ // // [node.ylzd1, node]
+ // // ]);
+ // // return map[node.ylzd1,node], map
+ // // }, {})
+ // // console.log('info',info)
+ // // for (let i = 0; i< menu.length - 1; i++) {
+ // // if (info[menu[i].ylzd1]) {
+ // // info[menu[i].ylzd1].children.push(menu[i])
+ // // }
+ // // }
+ // // for(let item of info){
+ // // console.log('info',item)
+ // // }
+ //
+ // // console.log('info',info)
+ //
+ // // const result = menu.filter(node => {
+ // // if (info[node.ylzd1]) {
+ // // info[node.ylzd1].children.push(node)
+ // // }
+ // // return !node.ylzd1
+ // // })
+ // // const system_menu = {}
+ // // for (let i = 0; i < result.length; i++) {
+ // //
+ // // if (!system_menu[result[i].system_code]) {
+ // // system_menu[result[i].system_code] = []
+ // // }
+ // // system_menu[result[i].system_code].push(result[i])
+ // // }
+ // // for (let i = 0; i < this.zxtbmList.length; i++) {
+ // //
+ // // const key = this.zxtbmList[i].zxtbm
+ // // treeData[0].children.push({ 'label': this.getSystemName(key), 'id': key, 'children': system_menu[key] })
+ // // }
+ // return treeData
+ // },
parseTreeData(menu) {
const treeData = [{ 'label': '全部功能', 'id': '@', children: [], disabled: true }]
@@ -398,10 +457,13 @@ export default {
}
system_menu[result[i].system_code].push(result[i])
}
+ console.log('info',info)
+ console.log('result',result)
for (let i = 0; i < this.zxtbmList.length; i++) {
- const key = this.zxtbmList[i].system_code
+ const key = this.zxtbmList[i].zxtdm
treeData[0].children.push({ 'label': this.getSystemName(key), 'id': key, 'children': system_menu[key] })
}
+ console.log('treeData',treeData)
return treeData
},
handleWorkGroupChange(val) {
@@ -430,7 +492,7 @@ export default {
getUserListByRole(val).then(response => {
for (const i in response.data) {
for (const j in this.yhxxTableData) {
- if (response.data[i].user_code === this.yhxxTableData[j].user_code) {
+ if (response.data[i].yhdm === this.yhxxTableData[j].yhdm) {
this.$set(this.yhxxTableData[j], 'checked', true)
}
}
@@ -452,7 +514,7 @@ export default {
getSystemListByRole(val).then(response => {
for (const i in response.data) {
for (const j in this.zxtqxTableData) {
- if (response.data[i].system_code === this.zxtqxTableData[j].system_code) {
+ if (response.data[i].zxtdm === this.zxtqxTableData[j].zxtdm) {
this.$set(this.zxtqxTableData[j], 'checked', true)
}
}
diff --git a/src/views/xtgl/yhgl.vue b/src/views/xtgl/yhgl.vue
index d70cf5b..4fc0d4a 100644
--- a/src/views/xtgl/yhgl.vue
+++ b/src/views/xtgl/yhgl.vue
@@ -12,7 +12,7 @@
/>
姓名:
-
+
查询
增加
@@ -38,24 +38,23 @@
@current-change="handleYhxxCurrentChange"
@header-click="showFilter"
>
-
-
+
+
+
- {{ getDepartName(scope.row.depart_code) }}
+ {{ getDepartName(scope.row.bmbm) }}
-
-
- {{ scope.row.login_type == 1?'指纹':'密码' }}
-
-
-
-
- {{ scope.row.user_status == 1?'启用':'禁用' }}
-
+
+
+
+ {{ getSpqx(scope.row.ylzd1) }}
+
-
+
+
+
账号:
-
+
姓名:
-
+
部门:
-
+
+
+
+
+
- 登录方式:
-
+ 审批权限:
+
- 密码:
-
-
-
-
- 指纹:
-
-
- 修改指纹1
- 修改指纹2
- 修改指纹3
-
-
-
-
-
- 备注:
-
+ 职号:
+
{
- return data.depart_code === search.depart_code
+ return data.bmbm === search.depart_code
})
}
- if (search && search.user_name) {
+ if (search && search.yhms) {
resultList = resultList.filter(data => {
return Object.keys(data).some(key => {
- return String(data[key]).indexOf(search.user_name) > -1
+ return String(data[key]).indexOf(search.yhms) > -1
})
})
}
@@ -251,11 +240,12 @@ export default {
this.isYhxxTableLoading = false
this.$refs.yhxxTable.setCurrentRow(this.yhxxTableData[0])
})
-
getRoleList().then(response => {
this.gzzTableData = response.data
this.isGzzTableLoading = false
})
+ const dict= window.localStorage.getItem("SPQX");
+ this.spqx=JSON.parse(dict);
})
}, methods: {
showFilter(column) {
@@ -275,7 +265,8 @@ export default {
this.currentPage = val
},
handleYhxxCurrentChange(currentRow) {
- if (!currentRow || !currentRow.user_code) return
+
+ if (!currentRow || !currentRow.yhdm) return
this.selectYhxx = currentRow
this.isGzzTableLoading = true
getRoleListByUser(this.selectYhxx).then(response => {
@@ -310,8 +301,10 @@ export default {
},
handleAddYhxx() {
this.dialogVisible = true
+ this.inputDisabled=false;
this.dialogTitle = '添加用户信息'
this.updateData = {}
+
},
handleAddYhxxComplated() {
if(this.updateData.login_type===1) {
@@ -360,13 +353,15 @@ export default {
},
handleUpdateYhxx() {
- if (!this.selectYhxx.user_code) {
+ if (!this.selectYhxx.yhdm) {
this.$message({ message: '请选择要修改的用户!', type: 'error' })
return
}
this.dialogVisible = true
this.dialogTitle = '修改用户信息'
+ console.log(this.selectYhxx)
this.updateData = JSON.parse(JSON.stringify(this.selectYhxx))
+ this.inputDisabled=true;
},
handleUpdateYhxxComplated() {
updateUser(this.updateData).then(response => {
@@ -397,6 +392,14 @@ export default {
}
return ''
},
+ getSpqx(depart_code) {
+ for (const i in this.spqx) {
+ if (this.spqx[i].bm === depart_code) {
+ return this.spqx[i].bmsm
+ }
+ }
+ return ''
+ },
exportExcel() {
/* generate workbook object from table */
// 表名