ooo пре 1 година
родитељ
комит
fd8ba0c4fb

+ 8 - 38
src/views/pro/traceability/components/equitCom.vue

@@ -73,61 +73,31 @@ option.value = Object.assign(option.value, {
       prop: "opName",
     },
     {
-      label: "点检项名称",
-      prop: "checkName",
+      label: "设备类型",
+      prop: "equitType",
       search: false,
     },
     {
-      label: "点检项编码",
-      prop: "checkCode",
+      label: "精度要求",
+      prop: "accuracy",
       search: false,
     },
     {
-      label: "内容",
-      prop: "content",
+      label: "设备有效期",
+      prop: "validDate",
       search: false,
     },
     {
-      label: "结果",
+      label: "设备名称",
       prop: "result",
       search: false,
     },
-    // {
-    //   label: "操作人",
-    //   prop: "operator",
-    //   search: false,
-    // },
     {
-      label: "标准值",
+      label: "设备编码",
       prop: "standard",
       search: false,
     },
     {
-      label: "上限值",
-      prop: "upper",
-      search: false,
-    },
-    {
-      label: "下限值",
-      prop: "lower",
-      search: false,
-    },
-    {
-      label: "实测值",
-      prop: "realValue",
-      search: false,
-    },
-    {
-      label: "单位",
-      prop: "unit",
-      search: false,
-      dicData: dicts.danwei_type,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-    },
-    {
       label: "录入时间",
       prop: "created",
       search: false,

+ 112 - 0
src/views/pro/traceability/components/faultCom.vue

@@ -0,0 +1,112 @@
+<template>
+  <div class="mainContentBox">
+    <avue-crud
+      ref="crudRef2"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+    />
+    <!-- <el-collapse accordion>
+      <el-collapse-item
+        :title="item.opName"
+        :name="item.id"
+        v-for="item in data"
+        :key="item.id"
+      />
+    </el-collapse> -->
+  </div>
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+import ButtonPermKeys from "@/common/configs/buttonPermission";
+import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
+
+// 数据字典相关
+const { dicts } = useDictionaryStoreHook();
+
+// 传入一个url,后面不带/
+const {
+  form,
+  data,
+  option,
+  search,
+  page,
+  toDeleteIds,
+  Methords,
+  Utils,
+  commonConfig,
+} = useCrud({
+  src: "/api/v1/process/web/traceability/escalationRecordInfo",
+});
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+  Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+
+const refreshTra = (row) => {
+  commonConfig.value.params = { seqNo: row.seqNo };
+  dataList();
+};
+defineExpose({ refreshTra });
+onMounted(() => {});
+
+option.value = Object.assign(option.value, {
+  selection: false,
+  border: true,
+  index: false,
+  expandLevel: 3,
+  headerAlign: "center",
+  align: "center",
+  labelWidth: 100,
+  addBtn: false,
+  menu: false,
+  header: false,
+  column: [
+    {
+      label: "冻结状态",
+      prop: "state",
+      dicData: dicts.escalation_fault_state,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+    },
+    {
+      label: "报故人",
+      prop: "personResponsible",
+      search: false,
+    },
+    {
+      label: "报故工位",
+      prop: "stationName",
+      search: false,
+    },
+    {
+      label: "报故时间",
+      prop: "created",
+      search: false,
+    },
+    {
+      label: "处理结果",
+      prop: "disposalMeasures",
+      dicData: dicts.disposal_measures_type,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+      search: false,
+    },
+    {
+      label: "备注",
+      prop: "standard",
+      search: false,
+    },
+  ],
+});
+</script>

+ 6 - 3
src/views/pro/traceability/index.vue

@@ -67,13 +67,13 @@
             <el-tab-pane name="equitComRef" label="设备使用"
               ><EquitCom ref="equitComRef"
             /></el-tab-pane>
+            <el-tab-pane name="faultComRef" label="报故记录">
+              <FaultCom ref="faultComRef" />
+            </el-tab-pane>
             <el-tab-pane name="bugComRef" label="缺陷项">缺陷项</el-tab-pane>
             <el-tab-pane name="imgComRef" label="图片采集"
               >图片采集</el-tab-pane
             >
-            <el-tab-pane name="faultComRef" label="报故记录"
-              >报故记录</el-tab-pane
-            >
           </el-tabs>
         </el-main>
       </el-container>
@@ -92,6 +92,7 @@ import MaterialsCom from "@/views/pro/traceability/components/materialsCom.vue";
 import RecordCom from "@/views/pro/traceability/components/recordCom.vue";
 import CheckCom from "@/views/pro/traceability/components/checkCom.vue";
 import EquitCom from "@/views/pro/traceability/components/equitCom.vue";
+import FaultCom from "@/views/pro/traceability/components/faultCom.vue";
 
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
@@ -110,6 +111,7 @@ const materialsComRef = ref(null);
 const recordComRef = ref(null);
 const checkComRef = ref(null);
 const equitComRef = ref(null);
+const faultComRef = ref(null);
 let defaultTabName = ref("traceabilityComRef");
 //tab页组件
 const tabNameComRef = new Map([
@@ -118,6 +120,7 @@ const tabNameComRef = new Map([
   ["recordComRef", recordComRef],
   ["checkComRef", checkComRef],
   ["equitComRef", equitComRef],
+  ["faultComRef", faultComRef],
 ]);
 let temRow = ref({});
 const tabsEvent = (pane, ev) => {