|
@@ -382,7 +382,8 @@ export default {
|
|
|
watch: {
|
|
|
'form.tenantId'() {
|
|
|
if (this.form.tenantId !== '' && this.initFlag) {
|
|
|
- this.initData(this.form.tenantId);
|
|
|
+ console.log(this.form)
|
|
|
+ this.initData(0);
|
|
|
}
|
|
|
},
|
|
|
'excelForm.isCovered'() {
|
|
@@ -431,18 +432,18 @@ export default {
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
initData(tenantId) {
|
|
|
- getRoleTree(tenantId).then(res => {
|
|
|
- const column = this.findObject(this.option.group, "roleId");
|
|
|
- column.dicData = res.data.data;
|
|
|
- });
|
|
|
- getDeptTree(tenantId).then(res => {
|
|
|
- const column = this.findObject(this.option.group, "deptId");
|
|
|
- column.dicData = res.data.data;
|
|
|
- });
|
|
|
- getPostList(tenantId).then(res => {
|
|
|
- const column = this.findObject(this.option.group, "postId");
|
|
|
+ // getRoleTree(tenantId).then(res => {
|
|
|
+ // const column = this.findObject(this.option.group, "roleId");
|
|
|
+ // column.dicData = res.data.data;
|
|
|
+ // });
|
|
|
+ getDeptLazyTree(0).then(res => {
|
|
|
+ const column = this.findObject(this.option.column, "goodsTypeId");
|
|
|
column.dicData = res.data.data;
|
|
|
});
|
|
|
+ // getPostList(tenantId).then(res => {
|
|
|
+ // const column = this.findObject(this.option.group, "postId");
|
|
|
+ // column.dicData = res.data.data;
|
|
|
+ // });
|
|
|
},
|
|
|
submitRole() {
|
|
|
const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
|
|
@@ -456,9 +457,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
rowSave(row, done, loading) {
|
|
|
- row.deptId = row.deptId.join(",");
|
|
|
- row.roleId = row.roleId.join(",");
|
|
|
- row.postId = row.postId.join(",");
|
|
|
+ // row.deptId = row.deptId.join(",");
|
|
|
+ // row.roleId = row.roleId.join(",");
|
|
|
+ // row.postId = row.postId.join(",");
|
|
|
add(row).then(() => {
|
|
|
this.initFlag = false;
|
|
|
this.onLoad(this.page);
|
|
@@ -473,9 +474,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
rowUpdate(row, index, done, loading) {
|
|
|
- row.deptId = row.deptId.join(",");
|
|
|
- row.roleId = row.roleId.join(",");
|
|
|
- row.postId = row.postId.join(",");
|
|
|
+ // row.deptId = row.deptId.join(",");
|
|
|
+ // row.roleId = row.roleId.join(",");
|
|
|
+ // row.postId = row.postId.join(",");
|
|
|
update(row).then(() => {
|
|
|
this.initFlag = false;
|
|
|
this.onLoad(this.page);
|
|
@@ -609,14 +610,11 @@ export default {
|
|
|
if (["edit", "view"].includes(type)) {
|
|
|
getUser(this.form.id).then(res => {
|
|
|
this.form = res.data.data;
|
|
|
- if(this.form.hasOwnProperty("deptId")){
|
|
|
- this.form.deptId = this.form.deptId.split(",");
|
|
|
- }
|
|
|
- if(this.form.hasOwnProperty("roleId")){
|
|
|
- this.form.roleId = this.form.roleId.split(",");
|
|
|
- }
|
|
|
- if(this.form.hasOwnProperty("postId")){
|
|
|
- this.form.postId = this.form.postId.split(",");
|
|
|
+ // this.form.goodsTypeId = [this.form.goodsTypeId.replace(/\"/g,"")]
|
|
|
+ console.log(this.form.goodsTypeId)
|
|
|
+ if(this.form.hasOwnProperty("goodsTypeId")){
|
|
|
+ this.form.goodsTypeId = this.form.goodsTypeId.split(",");
|
|
|
+ console.log(this.form.goodsTypeId)
|
|
|
}
|
|
|
});
|
|
|
}
|