Browse Source

Merge remote-tracking branch 'origin/master'

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

151
src/views/system/menuManage/menuManage.vue

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

Loading…
Cancel
Save