提交 9dbcb696 authored 作者: 龙菲's avatar 龙菲

修改cascader只能选择叶子结点的问题

上级 fa8f85da
......@@ -408,12 +408,14 @@ export default {
value: "value",
label: "label",
children: "children",
checkStrictly: true,
},
culturalRelicTextureProps: {
value: "value",
label: "label",
children: "children",
checkStrictly: true,
},
dialogVisible: false,
......@@ -422,6 +424,7 @@ export default {
value: "id",
label: "name",
children: "children",
checkStrictly: true,
},
rules: {
......
......@@ -562,13 +562,14 @@ export default {
value: "id",
label: "name",
children: "children",
checkStrictly: true,
},
culturalRegionProps: {
value: "code",
label: "name",
children: "children",
checkStrictly: true,
},
regionTree: [],
rules: {
......
......@@ -201,13 +201,14 @@ export default {
value: "id",
label: "name",
children: "children",
checkStrictly: true,
},
regionOptionProps: {
value: "code",
label: "name",
children: "children",
checkStrictly: true,
},
regionTree: [],
status: true,
......
......@@ -179,13 +179,13 @@ export default {
value: "id",
label: "name",
children: "children",
checkStrictly: true,
},
regionOptionProps: {
value: "code",
label: "name",
children: "children",
checkStrictly: true,
},
regionTree: [],
status: true,
......
......@@ -103,7 +103,7 @@ export default {
value: "id",
label: "name",
children: "children",
checkStrictly: true,
},
depts: [], //自定义部门
dataScopeData: null,
......
......@@ -82,7 +82,7 @@
<el-form-item
label="所属地区"
:label-width="formLabelWidth"
prop="deptId"
prop="regionCode"
>
<el-cascader
style="width: 100%"
......@@ -113,7 +113,6 @@
import { addUser, upadateUser } from "@/api/user";
import ManualUploader from "@/components/Uploader/ManualUploader.vue";
import { mapGetters } from "vuex";
import { uploadFile } from "@/utils/file";
export default {
name: "InfoEditDialog",
components: {
......@@ -151,10 +150,15 @@ export default {
// 编辑状态
if (that.dialogForm.id) {
console.log('that.dialogForm',that.dialogForm);
// return
// 回填状态
that.status = Boolean(Number(that.dialogForm.status));
// 回填部门
that.dialogForm.deptId = [that.dialogForm.deptId];
// that.dialogForm.deptId = [that.dialogForm.deptId];
// debugger
} else {
that.dialogForm.deptId = [];
}
},
immediate: true,
......@@ -222,13 +226,13 @@ export default {
value: "id",
label: "label",
children: "children",
checkStrictly: true,
},
culturalRegionProps: {
value: "code",
label: "name",
children: "children",
checkStrictly: true,
},
regionTree: [],
rules: {
......@@ -250,6 +254,7 @@ export default {
],
deptId: [{ required: true, message: "请输入部门", trigger: "change" }],
},
value: [],
};
},
methods: {
......@@ -270,8 +275,10 @@ export default {
params.deptId = params.deptId[params.deptId.length - 1];
}
if (params.regionCode instanceof Array) {
params.regionCode = params.deptId[params.regionCode.length - 1];
params.regionCode = params.regionCode[params.regionCode.length - 1];
}
// console.log('params',params);
// return;
if (params.id) {
let res = await upadateUser(params);
......
......@@ -194,13 +194,13 @@ export default {
value: "id",
label: "name",
children: "children",
checkStrictly: true,
},
regionOptionProps: {
value: "code",
label: "name",
children: "children",
checkStrictly: true,
},
regionTree: [],
status: true,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论