jiaxiaoqiang преди 7 месеца
родител
ревизия
21a93b6987
променени са 2 файла, в които са добавени 45 реда и са изтрити 48 реда
  1. 26 28
      src/views/plan/workOrder/components/work-order-page.vue
  2. 19 20
      src/views/plan/workOrder/index.vue

+ 26 - 28
src/views/plan/workOrder/components/work-order-page.vue

@@ -1,23 +1,22 @@
 <template>
   <div class="mainContentBox">
     <avue-crud
-        ref="crudRef"
-        v-model:search="search"
-        v-model="form"
-        :data="data"
-        :option="option"
-        v-model:page="page"
-        @row-click="rowClick"
-        @search-change="searchChange"
-        @search-reset="resetChange"
-        @size-change="dataList"
-        @current-change="dataList"
-    >
-    </avue-crud>
+      ref="crudRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-click="rowClick"
+      @search-change="searchChange"
+      @search-reset="resetChange"
+      @size-change="dataList"
+      @current-change="dataList"
+    />
   </div>
 </template>
 <script setup>
-import {defineProps, ref} from "vue";
+import { defineProps, ref } from "vue";
 import { useCrud } from "@/hooks/userCrud";
 
 import { useCommonStoreHook } from "@/store";
@@ -32,23 +31,24 @@ const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
     src: "/api/v1/plan/workOrder",
   });
-const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+  Methords; //增删改查
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate } = Utils; //按钮权限等工具
 
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
-const emit = defineEmits(["orderInfo"])
-const rowClick = (row)=>{
-  emit("orderInfo", row)
-}
+const emit = defineEmits(["orderInfo"]);
+const rowClick = (row) => {
+  emit("orderInfo", row);
+};
 const props = defineProps({
   queryType: {
     type: String,
     default: () => {
       return "0";
-    }
-  }
-})
+    },
+  },
+});
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   delBtn: false,
@@ -113,7 +113,7 @@ option.value = Object.assign(option.value, {
       width: "80",
       type: "select", //类型为下拉选择框
       dicUrl:
-          dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_priority,
+        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_priority,
       props: {
         label: "dictLabel",
         value: "dictValue",
@@ -126,7 +126,7 @@ option.value = Object.assign(option.value, {
       display: false,
       type: "select", //类型为下拉选择框
       dicUrl:
-          dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_work_order_state,
+        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_work_order_state,
       props: {
         label: "dictLabel",
         value: "dictValue",
@@ -143,8 +143,7 @@ option.value = Object.assign(option.value, {
       prop: "opType",
       width: "100",
       type: "select", //类型为下拉选择框
-      dicUrl:
-          dictDataUtil.request_url + dictDataUtil.TYPE_CODE.op_group,
+      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.op_group,
       props: {
         label: "dictLabel",
         value: "dictValue",
@@ -199,7 +198,6 @@ option.value = Object.assign(option.value, {
       width: 85,
       display: false,
       prop: "completeNum",
-
     },
     {
       label: "下线数量",
@@ -229,7 +227,7 @@ option.value = Object.assign(option.value, {
 });
 
 onMounted(() => {
-  search.value.queryType = props.queryType
+  search.value.queryType = String(props.queryType);
   dataList();
 });
 </script>

+ 19 - 20
src/views/plan/workOrder/index.vue

@@ -289,12 +289,12 @@
     </el-dialog>
 
     <el-dialog
-        v-model="dialog7.visible"
-        :title="dialog7.title"
-        width="950px"
-        @close="dialog7.visible = false"
+      v-model="dialog7.visible"
+      :title="dialog7.title"
+      width="950px"
+      @close="dialog7.visible = false"
     >
-      <work-order-page :queryType="2" @order-info="workOrderInfoClick"/>
+      <work-order-page queryType="2" @order-info="workOrderInfoClick" />
     </el-dialog>
   </div>
 </template>
@@ -347,7 +347,7 @@ const test = () => {
   tableType.value = tableType.value == 1 ? 2 : 1;
 };
 const processRouteType = ref("");
-const permission = reactive({
+const permission = ref({
   delBtn: checkPerm(buttonPermission.PLAN.BTNS.work_order_del),
   addBtn: checkPerm(buttonPermission.PLAN.BTNS.work_order_add),
   editBtn: checkPerm(buttonPermission.PLAN.BTNS.work_order_edit),
@@ -587,7 +587,7 @@ const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
   Methords; //增删改查
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
-const opGroupShow = ref(true)
+const opGroupShow = ref(true);
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
 // 设置表格列或者其他自定义的option
@@ -707,29 +707,28 @@ option.value = Object.assign(option.value, {
       prop: "opType",
       width: "100",
       type: "select", //类型为下拉选择框
-      dicUrl:
-          dictDataUtil.request_url + dictDataUtil.TYPE_CODE.op_group,
+      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.op_group,
       props: {
         label: "dictLabel",
         value: "dictValue",
       },
       change: ({ value, column }) => {
-        if (value === '2') {
+        if (value === "2") {
           //form.value.opGroup = "-"
           option.value.column[11].display = false;
-          option.value.column[12].display = false
-        }else{
+          option.value.column[12].display = false;
+        } else {
           //form.value.opGroup =
-          option.value.column[11].disabled = false
-          option.value.column[11].display = true
-          if(value === '1'){
-            option.value.column[12].display = true
-          }else{
-            option.value.column[12].display = false
+          option.value.column[11].disabled = false;
+          option.value.column[11].display = true;
+          if (value === "1") {
+            option.value.column[12].display = true;
+          } else {
+            option.value.column[12].display = false;
           }
         }
-        if(column.boxType === 'edit'){
-          option.value.column[11].dicData = form.value.opGroups
+        if (column.boxType === "edit") {
+          option.value.column[11].dicData = form.value.opGroups;
         }
       },
       rules: [