Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 10 months ago
parent
commit
def9ec228f
  1. 159
      src/views/system/menuManage/menuManage.vue
  2. 6
      src/views/system/userManage/userManageList.vue

159
src/views/system/menuManage/menuManage.vue

@ -92,12 +92,10 @@
<td>
<!-- <el-input v-model="form.pname" :disabled="true" style="width:300px" /> -->
<el-select v-model="form.pname" placeholder="请选择" style="width:300px"
:disabled="form.pname!=''&&form.psid!=''">
<el-select v-model="form.pname" placeholder="请选择" style="width:300px" :disabled="true">
<el-option hidden :key="form.psid" :label="form.pname" :value="form.pname"></el-option>
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
:default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true'
:props="defaultProps" @check-change="checkchange">
<el-tree :data="treedata" ref="Tree" accordion node-key="sid" :default-checked-keys="checkedId"
:default-expand-all='true' :check-strictly='true' :props="defaultProps">
</el-tree>
</el-select>
@ -210,14 +208,13 @@
:props="defaultProps" @check-change="checkchange">
</el-tree> -->
<el-select v-model="form.pname" placeholder="请选择" style="width:300px"
:disabled="form.pname!=''&&form.psid!=''">
<el-select v-model="form.pname" placeholder="请选择" style="width:300px" ref="treeSelect" :disabled="disabled">
<el-option hidden :key="form.psid" :label="form.pname" :value="form.pname"></el-option>
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
:default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true'
:props="defaultProps" @check-change="checkchange">
<el-tree :data="treedata" ref="Tree" accordion node-key="sid" :default-checked-keys="checkedId"
:default-expand-all='true' :check-strictly='true' :props="defaultProps" @node-click="nodeClick">
</el-tree>
</el-select>
</td>
</tr>
<tr>
@ -320,6 +317,7 @@
data() {
return {
loading: false,
disabled: false,
activeName: 'roleList',
editDialog: false,
dialogTitle: '',
@ -330,6 +328,7 @@
isShow: '1',
menuName: '',
menuUrl: '',
menuType: "0",
pageAliasName: '',
pageName: '',
pageUrl: '',
@ -338,9 +337,9 @@
remarks: '',
sortNo: 0,
cid: '',
sourceName: 'wms',
sourceName: '',
phoneFunction: "0",
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa44'
sourceSid: ''
},
tableData: [],
page: {
@ -350,8 +349,8 @@
params: {
name: '',
psid: '',
sourceName: 'wms',
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa44'
// sourceName: 'oms',
// sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa44'
}
},
rank: '1',
@ -382,35 +381,21 @@
// })
},
methods: {
departmentClick(data) {
console.log("departmentClick", data);
this.form.psid = data.sid
this.form.pname = data.name
this.$refs.Tree.visible = false
},
checkchange(data, checked) {
console.log("checkchange", data);
console.log("checkchange", checked);
if (checked) {
if (data.sid == 'd936f1ba-03c3-11ec-bf08-48452053aa44') {
this.form.psid = '0'
this.form.pname = '顶级菜单'
} else {
this.form.psid = data.psid
this.form.pname = data.pname
}
let arr = []
arr = [data.sid];
this.$refs.Tree.setCheckedKeys(arr);
console.log("checkchange", this.form.pname);
console.log("checkchange", this.form.psid);
return;
nodeClick(val) {
console.log("nodeClick", val);
if (val.isSource == '1') {
//
this.form.psid = '0'
this.form.pname = '顶级菜单'
} else {
this.form.psid = val.sid
this.form.pname = val.name
}
this.form.sourceName = val.sourceName
this.form.sourceSid = val.sourceSid
this.$refs.treeSelect.visible = false
},
@ -471,46 +456,74 @@
handleClick(tab, event) {
console.log("handleClick", event);
if (tab.name == 'addrole') {
this.$refs.Tree.setCheckedKeys([]);
this.form = {}
this.dialogTitle = '新增'
this.form.isShow = '1'
this.form.menuType = '0'
// this.form.psid = row.sid || 0
this.form.sourceName = 'oms'
this.form.sourceSid = 'd936f1ba-03c3-11ec-bf08-48452053aa44'
this.form.pname = '顶级菜单'
this.form.psid = '0'
// this.sourceMenus()
// this.$refs.Tree.setCheckedKeys([]);
this.form = {
pname: '',
iconUrl: '',
isShow: '1',
menuName: '',
menuUrl: '',
menuType: "0",
pageAliasName: '',
pageName: '',
pageUrl: '',
pageUrlRedirect: '',
psid: '',
remarks: '',
sortNo: 0,
cid: '',
sourceName: '',
phoneFunction: "0",
sourceSid: ''
}
this.disabled = false
this.addMenuType = '0'
this.editMenuType = '0'
this.addPhoneFunction = "0"
this.editPhoneFunction = "0"
} else {
this.getPageList()
}
},
add(row) {
console.log("editRow", row);
console.log("editRow22222222222", row);
this.form = {
pname: row.name,
iconUrl: '',
isShow: '1',
menuName: '',
menuUrl: '',
menuType: "0",
pageAliasName: '',
pageName: '',
pageUrl: '',
pageUrlRedirect: '',
psid: row.sid,
remarks: '',
sortNo: 0,
cid: '',
sourceName: row.sourceName,
phoneFunction: "0",
sourceSid: row.sourceSid
}
this.disabled = true
this.dialogTitle = '新增'
this.activeName = 'addrole'
// if(row == 0){
// this.isadd = false
// }else{
// this.isadd = true
// }
// this.dialogTitle = ''
// this.editDialog = true
this.form.isShow = '1'
this.form.menuType = '0'
// this.form.psid = row.sid || 0
this.form.pname = row.name
this.form.psid = row.sid
this.form.sourceName = row.sourceName
this.form.sourceSid = row.sourceSid
if (row.isSource == '1') {
this.form.psid = 0
this.form.pname = "顶级菜单"
} else {
this.form.psid = row.sid
this.form.pname = row.name
}
let arr = []
arr = [row.sid];
this.$refs.Tree.setCheckedKeys(arr);
this.addMenuType = '0'
this.editMenuType = '0'
this.addPhoneFunction = "0"
this.editPhoneFunction = "0"
// let arr = []
// arr = [row.sid];
// this.$refs.Tree.setCheckedKeys(arr);
},
editRow(row) {
@ -521,9 +534,9 @@
this.editShow = this.form.isShow
this.editMenuType = this.form.menuType
let arr = []
arr = [row.sid];
this.$refs.Tree.setCheckedKeys(arr);
// let arr = []
// arr = [row.sid];
// this.$refs.Tree.setCheckedKeys(arr);
// this.form.isShow = 1
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname

6
src/views/system/userManage/userManageList.vue

@ -33,16 +33,16 @@
</el-table-column>
<el-table-column label="操作" width="350px" align="center">
<template slot-scope="scope">
<el-button @click="setRole(scope.row)" type="primary" size="mini">
<el-button @click="setRole(scope.row)" type="primary" size="mini" v-show="scope.row.accountType!='1'">
设置角色
</el-button>
<el-button @click="initPwd(scope.row)" type="danger" size="mini">
初始化密码
</el-button>
<el-button @click="userinfoChange(scope.row)" type="primary" size="mini">
<el-button @click="userinfoChange(scope.row)" type="primary" size="mini" v-show="scope.row.accountType!='1'">
编辑
</el-button>
<el-button @click="del(scope.row)" type="danger" size="mini">
<el-button @click="del(scope.row)" type="danger" size="mini" v-show="scope.row.accountType!='1'">
删除
</el-button>
</template>

Loading…
Cancel
Save