Quellcode durchsuchen

去掉冲突报错

qinhb vor 1 Jahr
Ursprung
Commit
a8ba1670f1

+ 13 - 42
src/common/configs/dictDataUtil.ts

@@ -1,61 +1,32 @@
-// 所有的字典类型typeCode都要在这里面写。
+// 所有的字典类型typeCode都要在这里面写。
 
 const DictDataUtil = {
   request_url:
-    import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dictData/queryByType/",
+      import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dictData/queryByType/",
   TYPE_CODE: {
-    //订单类型
+    //璁㈠崟绫诲瀷
     plan_order_type: "plan_order_type",
-    //订单优先级
+    //订单优先级
     plan_order_priority: "plan_order_priority",
-    //订单状态
+    //订单状态
     plan_order_state: "plan_order_state",
-    //设备类型
+    //璁惧�绫诲瀷
     device_type: "device_type",
-    //设备状态
-    device_status: "device_status"
-  },
-  EXPAND_FIELD_TABLE: {
-    //映射表列表
-    expand_table_list: "expand_field_table",
-    //订单计划表
-    plan_order_info: "plan_order_info",
-    //映射字段列表
-    expand_field_list: "expand_field_list",
-  },
-};
-
-export default DictDataUtil;
-// 所有的字典类型typeCode都要在这里面写。
-
-const DictDataUtil = {
-  request_url:
-    import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dictData/queryByType/",
-  TYPE_CODE: {
-    //订单类型
-    plan_order_type: "plan_order_type",
-    //订单优先级
-    plan_order_priority: "plan_order_priority",
-    //订单状态
-    plan_order_state: "plan_order_state",
-    //设备类型
-    device_type: "device_type",
-    //设备状态
+    //设备状态
     device_status: "device_status",
-    //设备运行状态
+    //设备运行状态
     device_run_status: "device_run_status",
-    //设备维护频率
+    //璁惧�缁存姢棰戠巼
     device_maintenance_cycle: "device_maintenance_cycle",
-    //设备
   },
   EXPAND_FIELD_TABLE: {
-    //映射表列表
+    //映射表列表
     expand_table_list: "expand_field_table",
-    //订单计划表
+    //订单计划表
     plan_order_info: "plan_order_info",
-    //映射字段列表
+    //鏄犲皠瀛楁�鍒楄〃
     expand_field_list: "expand_field_list",
   },
 };
 
-export default DictDataUtil;
+export default DictDataUtil;

+ 0 - 162
src/views/device/instance/components/index.vue

@@ -1,162 +0,0 @@
-<template>
-  <div class="mainContentBox">
-    <avue-crud
-        ref="crudRef"
-        v-model:search="search"
-        v-model="form"
-        :data="data"
-        :option="option"
-        v-model:page="page"
-        @row-save="createRow"
-        @row-update="updateRow"
-        @row-del="deleteRow"
-        @search-change="searchChange"
-        @search-reset="resetChange"
-        @size-change="dataList"
-        @current-change="dataList"
-        @selection-change="selectionChange"
-    >
-    </avue-crud>
-  </div>
-</template>
-<script setup>
-import { ref } from "vue";
-import { useCrud } from "@/hooks/userCrud";
-
-import { useCommonStoreHook } from "@/store";
-import dictDataUtil from "@/common/configs/dictDataUtil";
-const { isShowTable, tableType } = toRefs(useCommonStoreHook());
-const test = () => {
-  isShowTable.value = true;
-  tableType.value = tableType.value == 1 ? 2 : 1;
-};
-
-// 传入一个url,后面不带/
-const { form, data, option, search, page, Methords, Utils } =
-  useCrud({
-    src: "/api/v1/device",
-  });
-const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
-const { selectionChange } = Methords; //选中和批量删除事件
-const { downloadTemplate } = Utils; //按钮权限等工具
-
-const crudRef = ref(null); //crudRef.value 获取avue-crud对象
-
-// 设置表格列或者其他自定义的option
-option.value = Object.assign(option.value, {
-  delBtn: false,
-  selection: true,
-  column: [
-    {
-      label: "设备编号",
-      prop: "deviceNo",
-      search: true,
-      rules: [
-        {
-          required: true,
-          message: "设备编号不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "设备名称",
-      prop: "deviceName",
-      search: true,
-      rules: [
-        {
-          required: true,
-          message: "设备名称不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "设备类型",
-      prop: "deviceType",
-      type: "select",
-      search: true,
-      dicUrl:
-        dictDataUtil.request_url +
-        dictDataUtil.TYPE_CODE.device_type,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-      rules: [
-        {
-          required: true,
-          message: "设备类型不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "设备状态",
-      prop: "state",
-      type: "select",
-      search: true,
-      dicUrl:
-          dictDataUtil.request_url +
-          dictDataUtil.TYPE_CODE.device_status,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-      rules: [
-        {
-          required: true,
-          message: "设备状态不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "负责人",
-      prop: "head",
-      rules: [
-        {
-          required: true,
-          message: "负责人不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "供应厂商",
-      prop: "manufacturer",
-    },
-    {
-      label: "所在车间",
-      prop: "workshop",
-    },
-    {
-      label: "所在工位",
-      prop: "station",
-    },
-    {
-      label: "设备位置",
-      prop: "devicePosition",
-    },
-    {
-      label: "规格",
-      prop: "specifications",
-    },
-    {
-      label: "品牌",
-      prop: "brand",
-    },
-  ],
-});
-watch?.(
-    () => props.typeCode,
-    (newVal: string) => {
-      queryParams.dictCode = newVal;
-      formData.dictCode = newVal;
-      resetQuery();
-    }
-);
-onMounted(() => {
-  dataList();
-});
-</script>

+ 0 - 7
src/views/device/instance/index.vue

@@ -74,13 +74,6 @@ const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
 const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
-// checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
-// const permission = reactive({
-//   delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
-//   addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
-//   editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
-//   menu: true,
-// });
 
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 

+ 14 - 0
src/views/device/maintenance/index.vue

@@ -27,6 +27,14 @@
         >
       </template>
     </avue-crud>
+    <el-dialog
+        v-model="dialog.visible"
+        title="设备选择"
+        width="500px"
+        @close="dialog.visible = false"
+    >
+      <devicePage  v-model:deviceInfo="deviceInfo"/>
+    </el-dialog>
   </div>
 </template>
 <script setup>
@@ -42,6 +50,9 @@ const test = () => {
   tableType.value = tableType.value == 1 ? 2 : 1;
 };
 
+const deviceInfo = ref({})
+const dialog = ref({visible: false})
+
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
@@ -77,6 +88,9 @@ option.value = Object.assign(option.value, {
           trigger: "trigger",
         },
       ],
+      focus: ({ value, column }) => {
+        dialog.visible = true
+      },
     },
     {
       label: "设备名称",