张雄 3 years ago
parent cef9b23e12
commit 4d3446f40c

@ -85,7 +85,8 @@ export default {
} }
} }
}); });
} };
}, },
findId(list,id){ findId(list,id){
list.forEach(item => { list.forEach(item => {
@ -120,7 +121,7 @@ export default {
if(val){ if(val){
this.form.id = val this.form.id = val
this.findId(this.rolelist,val) this.findId(this.rolelist,val)
console.log(this.editInfo); // console.log(this.editInfo);
this.form.name = this.editInfo.name this.form.name = this.editInfo.name
this.form.parentId = this.editInfo.parentId this.form.parentId = this.editInfo.parentId
this.form.authorityLevel = this.editInfo.authorityLevel this.form.authorityLevel = this.editInfo.authorityLevel

@ -30,6 +30,7 @@
<a-tree <a-tree
class="tree" class="tree"
v-model="checkedKeys" v-model="checkedKeys"
v-if="treeShow != undefined"
checkable checkable
:defaultExpandAll="true" :defaultExpandAll="true"
:replace-fields="replaceFields" :replace-fields="replaceFields"
@ -91,6 +92,7 @@ export default {
actions: { actions: {
show: false, show: false,
}, },
treeShow: undefined,
}; };
}, },
mounted() { mounted() {
@ -108,7 +110,7 @@ export default {
this.roleId = data; this.roleId = data;
FindAllMenus({ roleId: this.roleId }).then((res) => { FindAllMenus({ roleId: this.roleId }).then((res) => {
this.menus = res.data; this.menus = res.data;
console.log(res.data) // console.log(res.data)
this.defaultCheck(this.menus); this.defaultCheck(this.menus);
}); });
} else if (data === undefined) { } else if (data === undefined) {
@ -116,7 +118,8 @@ export default {
} }
}, },
rolechange(data) { rolechange(data) {
if (data) { this.treeShow = data;
if (data != undefined) {
this.checkedKeys = []; this.checkedKeys = [];
this.roleId = this.roleList[data].id; this.roleId = this.roleList[data].id;
FindAllMenus({ roleId: this.roleId }).then((res) => { FindAllMenus({ roleId: this.roleId }).then((res) => {
@ -125,7 +128,7 @@ export default {
}); });
} else { } else {
this.roleId = null; this.roleId = null;
this.menus = []; // this.menus = [];
} }
}, },
defaultCheck(arr) { defaultCheck(arr) {
@ -139,7 +142,7 @@ export default {
this.checkedKeys.push(item.id); this.checkedKeys.push(item.id);
} }
} }
console.log(this.checkedKeys) // console.log(this.checkedKeys)
}, },
onExpand(expandedKeys) { onExpand(expandedKeys) {
this.expandedKeys = expandedKeys; this.expandedKeys = expandedKeys;

@ -346,10 +346,10 @@ export default {
this.send.show = false; this.send.show = false;
}, },
Actions(data) { Actions(data) {
console.log(data); // console.log(data);
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); // console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
}, },

@ -1,10 +1,50 @@
<template> <template>
<div>缴费计划</div> <div>
<div class="cardTitle">缴费计划</div>
<searchForm :formItem="formItem" @getSearch="search($event)"></searchForm>
<a-table :columns="columns" :data-source="tableData">
</a-table>
</div>
</template> </template>
<script> <script>
export default { export default {
name: 'payPlay',
data() {
return {
searchForm: {
},
formItem: [
{
type: 'input',
label:'计划名称',
prop:'name',
placeholder:'请输入'
},
],
columns: [],
tableData: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}
}
},
methods: {
getData() {
let obj = {}
},
search(data) {
this.searchForm = data;
this.getData()
},
}
} }
</script> </script>

Loading…
Cancel
Save