|
@@ -31,8 +31,8 @@
|
|
|
>
|
|
|
<div
|
|
|
v-if="
|
|
|
- route.query.prodtCode != '' ||
|
|
|
- (route.query.prodtCode == '' && com.compentName != '物料采集')
|
|
|
+ prodtCode != '' ||
|
|
|
+ (prodtCode == '' && com.compentName != '物料采集')
|
|
|
"
|
|
|
>
|
|
|
{{ com.compentName }}
|
|
@@ -102,7 +102,8 @@ import {
|
|
|
processesByRouteId,
|
|
|
saveProcessInRoute,
|
|
|
} from "@/api/craft/route/index";
|
|
|
-
|
|
|
+const prodtCode = ref("");
|
|
|
+const routerId = ref("");
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
|
|
@@ -110,14 +111,18 @@ const route = useRoute();
|
|
|
const isChanged = ref(true);
|
|
|
const isNoneedEdit = ref(false); //有些组件是不需要编辑的,所以下面也不展示table
|
|
|
const loadTopList = () => {
|
|
|
- getCompoentsList(route.params.id).then((res) => {
|
|
|
+ getCompoentsList(routerId.value).then((res) => {
|
|
|
selectProComs.value = res.data || [];
|
|
|
selectIndex.value = -1;
|
|
|
isChanged.value = false;
|
|
|
});
|
|
|
};
|
|
|
onMounted(async () => {
|
|
|
+ prodtCode.value = route.fullPath.split("/")[5];
|
|
|
+ routerId.value = route.fullPath.split("/")[4];
|
|
|
await loadTopList();
|
|
|
+
|
|
|
+ console.log(prodtCode.value, "2", routerId.value, "3");
|
|
|
});
|
|
|
|
|
|
// 顶部====================
|
|
@@ -127,11 +132,11 @@ const back = () => {
|
|
|
|
|
|
const save = async () => {
|
|
|
for (let i = 0; i < selectProComs.value.length; i++) {
|
|
|
- selectProComs.value[i].operationId = route.params.id;
|
|
|
+ selectProComs.value[i].operationId = routerId.value;
|
|
|
selectProComs.value[i].sortNum = i;
|
|
|
}
|
|
|
let p = {
|
|
|
- operationId: route.params.id,
|
|
|
+ operationId: routerId.value,
|
|
|
dtos: selectProComs.value,
|
|
|
};
|
|
|
let { res, code } = await saveCompoents(p);
|
|
@@ -177,7 +182,6 @@ const clickToolCom = (com, index) => {
|
|
|
};
|
|
|
|
|
|
const onUpdate = () => {
|
|
|
- console.log("update");
|
|
|
isChanged.value = true;
|
|
|
selectIndex.value = -1;
|
|
|
};
|