|
@@ -268,6 +268,7 @@ const nodeTypelist = ref(props.nodeType);
|
|
const majorDataType = ref(props.majorType);
|
|
const majorDataType = ref(props.majorType);
|
|
const testProps = ref(props.treeProps);
|
|
const testProps = ref(props.treeProps);
|
|
const modalTitle = ref(props.title);
|
|
const modalTitle = ref(props.title);
|
|
|
|
+const orString = ref("");
|
|
|
|
|
|
//监听数据
|
|
//监听数据
|
|
watch(
|
|
watch(
|
|
@@ -283,6 +284,7 @@ watch(
|
|
],
|
|
],
|
|
([node, type, wid, nodeType, majorType, treeProps, title]) => {
|
|
([node, type, wid, nodeType, majorType, treeProps, title]) => {
|
|
formModel.value = node;
|
|
formModel.value = node;
|
|
|
|
+ orString.value = node.className;
|
|
nodeDetail.value = node;
|
|
nodeDetail.value = node;
|
|
wbsType.value = type;
|
|
wbsType.value = type;
|
|
wbsId.value = wid;
|
|
wbsId.value = wid;
|
|
@@ -296,10 +298,11 @@ watch(
|
|
);
|
|
);
|
|
|
|
|
|
//监听显示
|
|
//监听显示
|
|
-watch(isShow, (val) => {
|
|
|
|
|
|
+watch(isShow, async (val) => {
|
|
if (val) {
|
|
if (val) {
|
|
getDataInfo();
|
|
getDataInfo();
|
|
- geStandardTypeOptions();
|
|
|
|
|
|
+ await geStandardTypeOptions();
|
|
|
|
+ changeStandType(formModel.value.className);
|
|
} else {
|
|
} else {
|
|
emit("close");
|
|
emit("close");
|
|
}
|
|
}
|
|
@@ -487,8 +490,12 @@ const geStandardTypeOptions = async () => {
|
|
};
|
|
};
|
|
//单元名称
|
|
//单元名称
|
|
const unitOptions = ref([]);
|
|
const unitOptions = ref([]);
|
|
|
|
+
|
|
const changeStandType = async (val) => {
|
|
const changeStandType = async (val) => {
|
|
- formModel.value.unitName = "";
|
|
|
|
|
|
+ if (val !== orString.value) {
|
|
|
|
+ formModel.value.unitName = "";
|
|
|
|
+ }
|
|
|
|
+
|
|
let parentId = "";
|
|
let parentId = "";
|
|
standardTypeOptions.value.forEach((item) => {
|
|
standardTypeOptions.value.forEach((item) => {
|
|
if (item.value == val) {
|
|
if (item.value == val) {
|
|
@@ -497,6 +504,10 @@ const changeStandType = async (val) => {
|
|
});
|
|
});
|
|
const { data } = await getChildList({ current: 1, size: 10000, parentId });
|
|
const { data } = await getChildList({ current: 1, size: 10000, parentId });
|
|
unitOptions.value = data;
|
|
unitOptions.value = data;
|
|
|
|
+ unitOptions.value = unitOptions.value.filter((item) => item.dictKey != -1);
|
|
|
|
+ unitOptions.value.forEach((ele) => {
|
|
|
|
+ ele.dictKey = Number(ele.dictKey);
|
|
|
|
+ });
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|