|
@@ -23,112 +23,23 @@
|
|
import Jiluxiang from "@/views/repair/operation/components/Jiluxiang.vue";
|
|
import Jiluxiang from "@/views/repair/operation/components/Jiluxiang.vue";
|
|
import Replacement from "@/views/repair/operation/components/replacement.vue";
|
|
import Replacement from "@/views/repair/operation/components/replacement.vue";
|
|
import { useRepairStore } from "@/store";
|
|
import { useRepairStore } from "@/store";
|
|
|
|
+import { getItemInfo } from "@/api/repair/operation.ts";
|
|
import Info from "@/views/repair/components/info.vue";
|
|
import Info from "@/views/repair/components/info.vue";
|
|
-import { getOpCompent } from "@/api/prosteps";
|
|
|
|
-
|
|
|
|
-defineOptions({ name: "ProSteps" });
|
|
|
|
|
|
+//此页面这2个变量无使用逻辑 仅为解决警告
|
|
|
|
+const ordersDataArray = ref({});
|
|
|
|
+const selectOrderIndex = ref({});
|
|
|
|
+const listData = ref([]);
|
|
const store = useRepairStore();
|
|
const store = useRepairStore();
|
|
-const route = useRoute();
|
|
|
|
-const router = useRouter();
|
|
|
|
-const loading = ref(false);
|
|
|
|
-
|
|
|
|
-//配置标签信息Data
|
|
|
|
-const stepComponents = ref([]);
|
|
|
|
-const defaultComponents = [
|
|
|
|
- {
|
|
|
|
- compentName: "物料采集",
|
|
|
|
- iconName: "wuliaocaiji",
|
|
|
|
- path: "wuliaocaiji",
|
|
|
|
- name: "Wuliaocaiji",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "记录项",
|
|
|
|
- iconName: "jiluxiang",
|
|
|
|
- path: "jiluxiang",
|
|
|
|
- name: "Jiluxiang",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "多媒体采集",
|
|
|
|
- iconName: "duomeiticaiji",
|
|
|
|
- path: "duomeiticaiji",
|
|
|
|
- name: "Duomeiticaiji",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "ESOP",
|
|
|
|
- iconName: "ESOP",
|
|
|
|
- path: "esop",
|
|
|
|
- name: "Esop",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "点检",
|
|
|
|
- iconName: "dianjian",
|
|
|
|
- path: "dianjian",
|
|
|
|
- name: "Dianjian",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "设备记录",
|
|
|
|
- iconName: "shebeijilu",
|
|
|
|
- path: "shebeijilu",
|
|
|
|
- name: "Shebeijilu",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "紧固",
|
|
|
|
- iconName: "jingu",
|
|
|
|
- path: "jingu",
|
|
|
|
- name: "Jingu",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "调试配对",
|
|
|
|
- iconName: "tiaoshipipei",
|
|
|
|
- path: "tiaoshipipei",
|
|
|
|
- name: "Tiaoshipipei",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- compentName: "铭牌绑定",
|
|
|
|
- iconName: "mingpai",
|
|
|
|
- path: "mingpaibangding",
|
|
|
|
- name: "Mingpaibangding",
|
|
|
|
- },
|
|
|
|
-];
|
|
|
|
-//当前路由在setpComponents中的index
|
|
|
|
-const selectIndex = ref(0);
|
|
|
|
-
|
|
|
|
-//配置data固定路由参数等
|
|
|
|
-const setStepComponents = (data) => {
|
|
|
|
- let resData = [];
|
|
|
|
- data.forEach((item) => {
|
|
|
|
- defaultComponents.forEach((obj) => {
|
|
|
|
- if (item.compentName === obj.compentName) {
|
|
|
|
- resData.push({ ...item, ...obj });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- return resData;
|
|
|
|
-};
|
|
|
|
-const getNameClass = (index) => {
|
|
|
|
- return index === selectIndex.value ? "typeBoxSelected" : "typeBoxNormal";
|
|
|
|
-};
|
|
|
|
-//获取当前tags列表
|
|
|
|
-const getOpCompentArray = async () => {
|
|
|
|
- const { data } = await getOpCompent("/129/12");
|
|
|
|
- stepComponents.value = setStepComponents(data);
|
|
|
|
- router.replace({ name: stepComponents.value[0].name });
|
|
|
|
-};
|
|
|
|
-//设置标签是否被选中
|
|
|
|
-const setSelectIndex = (index) => {
|
|
|
|
- selectIndex.value = index;
|
|
|
|
-};
|
|
|
|
-const setSelectTag = () => {
|
|
|
|
- const nowRouteName = route.name;
|
|
|
|
- stepComponents.value.forEach((item, index) => {
|
|
|
|
- if (item.name == nowRouteName) {
|
|
|
|
- setSelectIndex(index);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+provide("ordersDataArray", ordersDataArray);
|
|
|
|
+provide("selectOrderIndex", selectOrderIndex);
|
|
|
|
+const getListInfo = async (id) => {
|
|
|
|
+ const { data } = await getItemInfo(id);
|
|
|
|
+ listData.value = data;
|
|
};
|
|
};
|
|
-onMounted(async () => {
|
|
|
|
- await getOpCompentArray();
|
|
|
|
- setSelectTag();
|
|
|
|
|
|
+provide("listData", listData);
|
|
|
|
+defineOptions({ name: "RepairOperation" });
|
|
|
|
+onMounted(() => {
|
|
|
|
+ getListInfo(store.scanInfo.id);
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|