Ver Fonte

fix:修改字典值,隐藏主线编码

lupeng há 4 meses atrás
pai
commit
45317d5293

+ 18 - 21
src/views/base/apply/index.vue

@@ -189,27 +189,24 @@ option.value = Object.assign(option.value, {
         },
       ],
     },
-    {
-      label: "是否H级",
-      prop: "hOrder",
-      rules: [
-        {
-          required: true,
-          message: "请选择文件",
-          trigger: "blur",
-        },
-      ],
-      dicData: [
-        {
-          label: "是",
-          value: "1",
-        },
-        {
-          label: "否",
-          value: "0",
-        },
-      ],
-    },
+      {
+          label: "质量等级",
+          prop: "hOrder",
+          search: true,
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          type: "select",
+          dicData: dicts.quality_grade,
+          props: { label: "dictLabel", value: "dictValue" },
+          rules: [
+              {
+                  required: true,
+                  message: "请选择质量等级",
+                  trigger: "blur",
+              },
+          ],
+      },
   ],
 });
 watch(

+ 9 - 12
src/views/base/check/index.vue

@@ -186,25 +186,22 @@ option.value = Object.assign(option.value, {
       ],
     },
     {
-      label: "是否H级",
+      label: "质量等级",
       prop: "hOrder",
+      search: true,
+      width: 100,
+      overHidden: true,
+      filterable: true,
+      type: "select",
+      dicData: dicts.quality_grade,
+      props: { label: "dictLabel", value: "dictValue" },
       rules: [
         {
           required: true,
-          message: "请选择文件",
+          message: "请选择质量等级",
           trigger: "blur",
         },
       ],
-      dicData: [
-        {
-          label: "是",
-          value: "1",
-        },
-        {
-          label: "否",
-          value: "0",
-        },
-      ],
     },
   ],
 });

+ 0 - 1
src/views/base/craftManagement/route/index.vue

@@ -774,7 +774,6 @@ option.value = Object.assign(option.value, {
     {
       label: "主分支编码",
       prop: "mainCode",
-      search: true,
       width: 150,
       hide: true,
       display: false,

+ 12 - 1
src/views/plan/filtersheet/index.vue

@@ -18,7 +18,7 @@
       </el-table-column> -->
       <el-table-column prop="hOrder" label="H级">
         <template #default="{ row }">
-          {{ row.hOrder == "1" ? "是" : "否" }}
+          {{ queryDict(row.hOrder) }}
         </template>
       </el-table-column>
       <el-table-column label="操作">
@@ -189,6 +189,7 @@ import {
   delFilter,
   getProExcel,
 } from "@/api/plan";
+import {useDictionaryStore} from "@/store";
 const updateTitle = ref("筛选单详情");
 const tableData = ref([]);
 const formRef = ref(null);
@@ -197,6 +198,7 @@ const ExDataObj = ref({});
 const workOderShow = ref(false);
 const showProList = ref([]);
 const showSeqList = ref([]);
+const { dicts } = useDictionaryStore();
 const showSeq = (seqs) => {
   showSeqList.value = seqs;
   dialog2.visible = true;
@@ -244,6 +246,15 @@ const submit = async () => {
     }
   });
 };
+const queryDict = (dictValue) =>{
+  for(var i = 0;i<dicts.quality_grade.length;i++){
+    console.log(dicts.quality_grade[i]);
+    console.log(dictValue);
+    if(dicts.quality_grade[i].dictValue===dictValue){
+         return  dicts.quality_grade[i].dictLabel;
+    }
+  }
+}
 const closeShow = () => {
   workOderShow.value = false;
 };