Browse Source

Merge branch 'xf_dev' of http://192.168.101.4:3000/jiaxiaoqiang/JG-ADMIN-TEMP into xf_dev

lupeng 1 year ago
parent
commit
607fc25d9f

+ 1 - 1
.env.production

@@ -2,7 +2,7 @@
 NODE_ENV='production'
 
 # 上传文件接口地址
-VITE_APP_UPLOAD_URL = 'http://192.168.101.189:9000'
+VITE_APP_UPLOAD_URL = 'http://10.88.19.201:9000'
 # 代理前缀
 VITE_APP_BASE_API = '/mes-server'
 

+ 1 - 1
package.json

@@ -67,7 +67,7 @@
     "vue": "^3.4.21",
     "vue-draggable-plus": "^0.4.0",
     "vue-i18n": "9.9.1",
-    "vue-pdf-embed": "^2.0.2",
+    "vue-pdf-embed": "2.0.2",
     "vue-qrcode": "^2.2.2",
     "vue-router": "^4.3.0",
     "vue3-pdfjs": "^0.1.6",

+ 8 - 0
src/api/station/index.ts

@@ -15,6 +15,14 @@ export function updateStation(data: Station) {
     data: data,
   });
 }
+export function bindStation(data: Station) {
+  return request({
+    url: "/api/v1/base/station/bind",
+    method: "post",
+    data: data,
+  });
+}
+
 
 /**
  * 工位绑定设备

+ 1 - 1
src/common/configs/dictDataUtil.ts

@@ -5,7 +5,7 @@ const DictDataUtil = {
     import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dictData/queryByType/",
   dept_tree_url: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dept/orgTree",
   dept_list_url:
-    import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dept/parent/list",
+    import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dept/list",
   post_list_url: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/post/list",
 
   img_url: import.meta.env.VITE_APP_UPLOAD_URL,

+ 3 - 3
src/components/CommonTable/configs/tableConfig.ts

@@ -551,12 +551,12 @@ export const tableConfig = {
       },
 
       {
-        label: "部门",
+        label: "所属机构",
         prop: "deptName",
         overHidden: true,
         disabled: true,
       },
-      {
+     /* {
         label: "所属机构",
         prop: "institution",
         filterable: true,
@@ -567,7 +567,7 @@ export const tableConfig = {
         dicMethod: "post",
         props: { label: "deptName", value: "id" },
         disabled: true,
-      },
+      },*/
     ],
   },
 

+ 6 - 4
src/layout/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="wh-full" :class="classObj">
+  <div :class="classObj" class="wh-full">
     <!-- 遮罩层 -->
     <div
       v-if="classObj.mobile && classObj.openSidebar"
@@ -15,8 +15,8 @@
       <div class="mix-container__left">
         <el-scrollbar style="height: 100%; background-color: #304156">
           <SidebarMenu
-            :menu-list="mixLeftMenus"
             :base-path="activeTopMenuPath"
+            :menu-list="mixLeftMenus"
           />
           <div
             style="width: 100%; height: 50px; background-color: #304156"
@@ -51,7 +51,7 @@
   </div>
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { useAppStore, useSettingsStore, usePermissionStore } from "@/store";
 import defaultSettings from "@/settings";
 import { DeviceEnum } from "@/enums/DeviceEnum";
@@ -345,11 +345,13 @@ function toggleSidebar() {
     }
 
     // 顶部模式全局变量修改
-    --el-menu-item-height: $navbar-height;
+    //--el-menu-item-height: $navbar-height;
   }
 }
+
 :deep(.el-input-number) {
 }
+
 // :deep(.el-collapse-item__content) {
 //   padding: 18px 0 15px 10px;
 //   margin-bottom: 10px;

+ 2 - 2
src/views/base/craftManagement/process/index.vue

@@ -460,13 +460,13 @@ option.value = Object.assign(option.value, {
       span: 24,
       type: "textarea",
     },
-    {
+    /*{
       label: "备注",
       prop: "remark",
       hide: true,
       span: 24,
       type: "textarea",
-    },
+    },*/
   ],
 });
 </script>

+ 13 - 4
src/views/base/craftManagement/route/bindProcess.vue

@@ -38,6 +38,7 @@
                   :group="{ name: 'people', pull: 'clone', put: false }"
                   :sort="false"
                   :clone="clone"
+                  :disabled="!editStauts"
                 >
                   <div
                     class="childItem"
@@ -61,6 +62,7 @@
             @update="onUpdate"
             style="min-width: 400px"
             @add="onClone"
+            :disabled="!editStauts"
           >
             <div
               v-for="(item, index) in list2"
@@ -73,7 +75,11 @@
                 {{ item?.operationVO?.operationName }}
               </div>
               <div>
-                <Delete class="flowDelete" @click.stop="clickDelete(index)" />
+                <Delete
+                  v-if="editStauts"
+                  class="flowDelete"
+                  @click.stop="clickDelete(index)"
+                />
               </div>
               <Bottom class="arrow" v-show="index < list2.length - 1" />
             </div>
@@ -126,10 +132,9 @@ import {
 import { v4 as uuidv4 } from "uuid";
 import { formOption } from "./bindConfig";
 import { ElMessage } from "element-plus";
-
+const editStauts = ref(false);
 const router = useRouter();
 const route = useRoute();
-
 // 数据字典相关
 const { dicts } = useDictionaryStore();
 
@@ -255,10 +260,14 @@ const editProComponent = async () => {
 };
 
 // 全局=======
-
 onMounted(() => {
   loadTreeData();
   loadProcessesFlow();
+  if (route.query.usable == 1) {
+    editStauts.value = false;
+  } else {
+    editStauts.value = true;
+  }
 });
 
 const getNameByDictType = (dictValue) => {

+ 14 - 4
src/views/base/craftManagement/route/components/processComponent.vue

@@ -133,10 +133,20 @@ const save = async () => {
 const selectProComs = ref([]);
 const selectIndex = ref(-1);
 const currentCom = ref({});
-const handleCommand = (itme) => {
-  selectProComs.value.push(itme);
-  isChanged.value = true;
-  selectIndex.value = -1;
+const handleCommand = (item) => {
+  let status = true;
+  for (let i = 0; i < selectProComs.value.length; i++) {
+    if (selectProComs.value[i].compentName == item.compentName) {
+      status = false;
+    }
+  }
+  if (status == true) {
+    selectProComs.value.push(item);
+    isChanged.value = true;
+    selectIndex.value = -1;
+  } else {
+    ElMessage.error("请勿重复添加");
+  }
 };
 
 // 点击某一个改变下面的table

+ 9 - 4
src/views/base/craftManagement/route/index.vue

@@ -193,7 +193,7 @@ const router = useRouter();
 const bindProcess = (row) => {
   router.push({
     path: `/base/craftManagement/bindProcess/${row.id}`,
-    query: { prodtCode: row.prodtCode, routeId: row.id },
+    query: { prodtCode: row.prodtCode, routeId: row.id, usable: row.usable },
   });
 };
 
@@ -267,9 +267,6 @@ option.value = Object.assign(option.value, {
         },
       ],
       readOnly: true,
-      click: () => {
-        startChooseProduct();
-      },
     },
     {
       label: "产品编号",
@@ -356,6 +353,14 @@ option.value = Object.assign(option.value, {
       prop: "processRouteVersion",
       addDisplay: true,
       editDisplay: true,
+      value: "1.0",
+      rules: [
+        {
+          required: true,
+          message: "请输入版本",
+          trigger: "blur",
+        },
+      ],
     },
     {
       label: "创建人",

+ 1 - 0
src/views/base/information/index.vue

@@ -311,6 +311,7 @@ option.value = Object.assign(option.value, {
       prop: "drawingVersion",
       type: "number",
       precision: 1,
+      min: 0,
       rules: [
         {
           required: true,

+ 3 - 3
src/views/base/modeling/factory/index.vue

@@ -77,7 +77,7 @@ const { isShowTable, tableType } = toRefs(useCommonStoreHook());
 import { updateWorkShop } from "@/api/workShop";
 
 import { updateProductionLine } from "@/api/productionLine";
-import { updateStation } from "@/api/station";
+import {bindStation, updateStation} from "@/api/station";
 // 公共弹窗相关
 const ctableRef = ref(null);
 const workShopRef = ref(null);
@@ -272,8 +272,8 @@ const onSelectedLineFinish = (selectedValue) => {
 const onSelectedStationFinish = (selectedValue) => {
   formData.value.code = selectedValue.code;
   formData.value.parentCode = factory.value.code;
-  formData.value.id = selectedValue.id;
-  updateStation(formData.value).then((data: any) => {
+  formData.value.ids = selectedValue.id;
+  bindStation(formData.value).then((data: any) => {
     ElMessage({
       message: data.msg,
       type: "success",

+ 132 - 134
src/views/base/modeling/production-line/components/capacity-page.vue

@@ -1,22 +1,19 @@
 <template>
-
-
   <div class="mainContentBox">
     <avue-form
       ref="formRef"
       v-model="form"
       :option="option"
       @submit="rowSave"
-    >
-
-    </avue-form>
+    />
     <avue-crud
       ref="crudRef"
-      v-model:search="search"
       v-model="form"
+      v-model:page="page"
+      v-model:search="search"
       :data="data"
       :option="option"
-      v-model:page="page"
+      search-option="false"
       @row-save="createRow"
       @row-update="updateRow"
       @row-del="deleteRow"
@@ -25,17 +22,16 @@
       @size-change="dataList"
       @current-change="dataList"
       @selection-change="selectionChange"
-      search-option="false"
     >
       <template #menu-left="{ size }">
         <el-button
           :disabled="toDeleteIds.length < 1"
-          type="danger"
-          icon="el-icon-delete"
           :size="size"
+          icon="el-icon-delete"
+          type="danger"
           @click="multipleDelete"
-        >删除</el-button
-        >
+          >删除
+        </el-button>
       </template>
     </avue-crud>
     <CommonTable
@@ -45,146 +41,148 @@
       @selected-sure="onSelectedFinish"
     />
   </div>
-
 </template>
-<script setup lang="ts">
-  import { ref, getCurrentInstance } from "vue";
-  import { useCrud } from "@/hooks/userCrud";
-  import ButtonPermKeys from "@/common/configs/buttonPermission";
-  import { useCommonStoreHook } from "@/store";
+<script lang="ts" setup>
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import ButtonPermKeys from "@/common/configs/buttonPermission";
+import { useCommonStoreHook } from "@/store";
 
-  const { isShowTable, tableType } = toRefs(useCommonStoreHook());
-  import { useDictionaryStore } from "@/store";
-  import {
-    addStationDevice,
-  } from "@/api/station";
-  const test = () => {
-    isShowTable.value = true;
-    tableType.value = tableType.value == 1 ? 2 : 1;
-  };
+const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+import { useDictionaryStore } from "@/store";
+import { addStationDevice } from "@/api/station";
 
-  // 传入一个url,后面不带/
-  const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
-    useCrud({
-      src: "/api/v1/base/capacity",
-    });
-  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,
-  // });
-  function rowSave(form,done,loading) {
-    console.info(form);
-    createRow(form,done,loading);
-
-  }
-  const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const test = () => {
+  isShowTable.value = true;
+  tableType.value = tableType.value == 1 ? 2 : 1;
+};
 
-  onMounted(() => {
-    // console.log("crudRef", crudRef)
-    search.value.productionLineId=props.productionLineId;
-    dataList();
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/base/capacity",
   });
+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,
+// });
+function rowSave(form, done) {
+  createRow(form, done, done);
+}
 
-  /**
-   * 上传excel相关
-   */
-  const uploadRef = ref(null);
-  const uploadFinished = () => {
-    // 上传完成后的刷新操作
-    page.currentPage = 1;
-    dataList();
-  };
-  const importExcelData = () => {
-    if (uploadRef.value) {
-      uploadRef.value.show("/api/v1/base/stationDevice");
-    }
-  };
-  const ctableRef=ref(null);
-  const deviceList=()=>{
-    ctableRef.value.startSelect();
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+
+onMounted(() => {
+  // console.log("crudRef", crudRef)
+  search.value.productionLineId = props.productionLineId;
+  dataList();
+});
+
+/**
+ * 上传excel相关
+ */
+const uploadRef = ref(null);
+const uploadFinished = () => {
+  // 上传完成后的刷新操作
+  page.currentPage = 1;
+  dataList();
+};
+const importExcelData = () => {
+  if (uploadRef.value) {
+    uploadRef.value.show("/api/v1/base/stationDevice");
   }
-  // 设置表格列或者其他自定义的option
-  option.value = Object.assign(option.value, {
-    selection: true,
-    labelWidth: 200,
-    span: 20,
-    column: [{
+};
+const ctableRef = ref(null);
+const deviceList = () => {
+  ctableRef.value.startSelect();
+};
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  selection: true,
+  labelWidth: 200,
+  span: 20,
+  column: [
+    {
       label: "物料编号",
       prop: "materialCode",
-      display:false,
+      display: false,
     },
-      {
-        label: "物料名称",
-        prop: "materialName",
-        rules: [{
+    {
+      label: "物料名称",
+      prop: "materialName",
+      rules: [
+        {
           required: true,
           message: "请选择物料名称",
-          trigger: "blur"
-        }],
-        click: ({ value, column }) => {
-          ctableRef.value.startSelect();
-
+          trigger: "change",
         },
+      ],
+      click: ({ value, column }) => {
+        ctableRef.value.startSelect();
       },
-      {
-        label: "产线",
-        prop: "productionLineName",
-        display:false,
-      },
-      {
-        label: "产线id",
-        prop: "productionLineId",
-        display:false,
-        hide:true
-      },
-      {
-        label: "产能",
-        prop: "capacity",
-        type:"number",
-        rules: [{
+    },
+    {
+      label: "产线",
+      prop: "productionLineName",
+      display: false,
+    },
+    {
+      label: "产线id",
+      prop: "productionLineId",
+      display: false,
+      hide: true,
+    },
+    {
+      label: "产能",
+      prop: "capacity",
+      type: "number",
+      rules: [
+        {
           required: true,
           message: "请填写产能",
-          trigger: "blur"
-        }],
-      },
-      {
-        label: "最小齐套数",
-        prop: "minCapacity",
-        type:"number",
-        rules: [{
+          trigger: "blur",
+        },
+      ],
+    },
+    {
+      label: "最小齐套数",
+      prop: "minCapacity",
+      type: "number",
+      rules: [
+        {
           required: true,
           message: "请填写产能",
-          trigger: "blur"
-        }],
-      },],
-    delBtn: false,
-    editBtn: false,
-    viewBtn: false,
-    addBtn:false,
-    menu: false,
-  });
-  const props = defineProps({
-    productionLineId: {
-      type: Number,
-      default: () => {
-        return 0;
-      }
-    }
-  })
-
-  const onSelectedFinish=(selectedValue)=>{
+          trigger: "blur",
+        },
+      ],
+    },
+  ],
+  delBtn: false,
+  editBtn: false,
+  viewBtn: false,
+  addBtn: false,
+  menu: false,
+});
+const props = defineProps({
+  productionLineId: {
+    type: Number,
+    default: () => {
+      return 0;
+    },
+  },
+});
 
-    form.value.materialCode=selectedValue.materialCode;
-    form.value.materialName=selectedValue.materialName;
+const onSelectedFinish = (selectedValue) => {
+  form.value.materialCode = selectedValue.materialCode;
+  form.value.materialName = selectedValue.materialName;
 
-    form.value.productionLineId=props.productionLineId;
-  }
+  form.value.productionLineId = props.productionLineId;
+};
 </script>
-

+ 110 - 119
src/views/base/modeling/station/components/station-page.vue

@@ -2,11 +2,11 @@
   <div class="mainContentBox">
     <avue-crud
       ref="crudRef"
-      v-model:search="search"
       v-model="form"
+      v-model:page="page"
+      v-model:search="search"
       :data="data"
       :option="option"
-      v-model:page="page"
       @row-save="deviceList"
       @row-update="updateRow"
       @row-del="deleteRow"
@@ -17,149 +17,140 @@
       @selection-change="selectionChange"
     >
       <template #menu-left="{ size }">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          @click="deviceList"
-        >新增</el-button
-        >
+        <el-button icon="el-icon-plus" type="primary" @click="deviceList"
+          >新增
+        </el-button>
         <el-button
           :disabled="toDeleteIds.length < 1"
-          type="danger"
-          icon="el-icon-delete"
           :size="size"
+          icon="el-icon-delete"
+          type="danger"
           @click="multipleDelete"
-        >删除</el-button
-        >
+          >删除
+        </el-button>
       </template>
     </avue-crud>
     <CommonTable
       ref="ctableRef"
+      :multiple="true"
       tableTitle="设备列表"
       tableType="DEVICE"
-      @selected-sure="onSelectedFinish"
+      @select-multiple-sure="onSelectedFinish"
     />
   </div>
 </template>
-<script setup lang="ts">
-  import { ref, getCurrentInstance } from "vue";
-  import { useCrud } from "@/hooks/userCrud";
-  import ButtonPermKeys from "@/common/configs/buttonPermission";
-  import { useCommonStoreHook } from "@/store";
+<script lang="ts" setup>
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import ButtonPermKeys from "@/common/configs/buttonPermission";
+import { useCommonStoreHook } from "@/store";
 
-  const { isShowTable, tableType } = toRefs(useCommonStoreHook());
-  import { useDictionaryStore } from "@/store";
-  import { columns } from "./columns";
-  import {
-    addStationDevice,
-  } from "@/api/station";
-  const test = () => {
-    isShowTable.value = true;
-    tableType.value = tableType.value == 1 ? 2 : 1;
-  };
+const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+import { useDictionaryStore } from "@/store";
+import { columns } from "./columns";
+import { addStationDevice } from "@/api/station";
 
-  // 传入一个url,后面不带/
-  const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
-    useCrud({
-      src: "/api/v1/base/stationDevice",
-    });
-  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,
-  // });
-  function rowSave(form,done,loading) {
-    createRow(form,done,loading);
-
-  }
-  const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const test = () => {
+  isShowTable.value = true;
+  tableType.value = tableType.value == 1 ? 2 : 1;
+};
 
-  onMounted(() => {
-    // console.log("crudRef", crudRef)
-    search.value.stationId = props.stationId;
-    dataList();
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/base/stationDevice",
   });
+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,
+// });
+function rowSave(form, done, loading) {
+  createRow(form, done, loading);
+}
 
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
-  const ctableRef=ref(null);
-  const deviceList=()=>{
-    ctableRef.value.startSelect();
-  }
+onMounted(() => {
+  // console.log("crudRef", crudRef)
+  search.value.stationId = props.stationId;
+  dataList();
+});
 
-  // 设置表格列或者其他自定义的option
-  option.value = Object.assign(option.value, {
-    selection: true,
-    column: columns,
-    saveBtn:false,
-    delBtn: false,
-    editBtn: false,
-    addBtn: false,
-    viewBtn: false,
-    menu: false,
-  });
-  const props = defineProps({
-    stationId: {
-      type: Number,
-      default: () => {
-        return 0;
-      }
-    }
-  })
+const ctableRef = ref(null);
+const deviceList = () => {
+  ctableRef.value.startSelect();
+};
 
-  watch?.(
-    () => props.stationId,
-    (newVal: string) => {
-      search.value.stationId = newVal
-      dataList()
-    }
-  );
-  const onSelectedFinish=(selectedValue)=>{
-    for(let i=0;i<data.value.length;i++){
-      if(data.value[i].deviceNo===selectedValue.deviceNo){
-        ElMessage({
-          message: "设备已绑定过,无需再次绑定",
-          type: "error",
-        });
-        return false;
-      }
-    }
-    if(selectedValue.deviceNo==undefined||selectedValue.deviceNo==null){
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  selection: true,
+  column: columns,
+  saveBtn: false,
+  delBtn: false,
+  editBtn: false,
+  addBtn: false,
+  viewBtn: false,
+  menu: false,
+});
+const props = defineProps({
+  stationId: {
+    type: Number,
+    default: () => {
+      return 0;
+    },
+  },
+});
+
+watch?.(
+  () => props.stationId,
+  (newVal: string) => {
+    search.value.stationId = newVal;
+    dataList();
+  }
+);
+const onSelectedFinish = (selectedValue: string[]) => {
+  for (let i = 0; i < data.value.length; i++) {
+    if (selectedValue.includes(data.value[i].deviceNo)) {
       ElMessage({
-        message: "没有选择设备",
+        message: "设备已绑定过,无需再次绑定",
         type: "error",
       });
       return false;
     }
-    const selectDevice=ref({
-      deviceNo: selectedValue.deviceNo,
-      stationId:props.stationId,
+  }
+  if (selectedValue.length < 1) {
+    ElMessage({
+      message: "没有选择设备",
+      type: "error",
+    });
+    return false;
+  }
+  const selectDevice = ref({
+    deviceNos: selectedValue,
+    stationId: props.stationId,
   });
 
-    addStationDevice(selectDevice.value).then(
-      (data:any)=>{
-        if(data.code==="200") {
-          ElMessage({
-            message: data.msg,
-            type: "success",
-          });
-          search.value.stationId = props.stationId;
-          dataList()
-        }
-        else {
-          ElMessage({
-            message: data.msg,
-            type: "error",
-          });
-        }
-      }
-    );
-
-  }
+  addStationDevice(selectDevice.value).then((data: any) => {
+    if (data.code === "200") {
+      ElMessage({
+        message: data.msg,
+        type: "success",
+      });
+      search.value.stationId = props.stationId;
+      dataList();
+    } else {
+      ElMessage({
+        message: data.msg,
+        type: "error",
+      });
+    }
+  });
+};
 </script>
-

+ 147 - 139
src/views/base/skill/components/edit-skill.vue

@@ -2,8 +2,8 @@
   <div class="mainContentBox">
     <avue-form
       ref="formRef"
-      v-model:search="search"
       v-model="form"
+      v-model:search="search"
       :data="data2"
       :option="option2"
     >
@@ -13,19 +13,19 @@
       v-model="form"
       :data="data"
       :option="option"
-      v-model:page="page"
       @row-save="createRow"
       @row-update="updateRow"
       @row-del="deleteRow"
     >
       <template #menu-left="{ size }">
         <el-button
-          type="primary"
-          icon="el-icon-plus"
           circle
+          icon="el-icon-plus"
+          type="primary"
           @click="addSkill"
         ></el-button
-        ></template>
+        >
+      </template>
 
     </avue-crud>
     <CommonTable
@@ -35,39 +35,39 @@
       @selected-sure="onSelectedFinish"
     />
     <div class="detail-footer">
-      <el-button type="primary" @click="onHandle"> 确定 </el-button>
+      <el-button type="primary" @click="onHandle"> 确定</el-button>
       <el-button @click="cancelWindow">取消</el-button>
 
     </div>
   </div>
 </template>
 <script setup>
-import { ref, getCurrentInstance } from "vue";
-import { useCrud } from "@/hooks/userCrud";
-import ButtonPermKeys from "@/common/configs/buttonPermission";
-import { useCommonStoreHook, useDictionaryStore } from "@/store";
+import {ref, getCurrentInstance} from "vue";
+import {useCrud} from "@/hooks/userCrud";
+import {useCommonStoreHook, useDictionaryStore} from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
-import SingleUpload from "@/components/Upload/SingleUpload.vue";
-const { isShowTable, tableType } = toRefs(useCommonStoreHook());
-import {getPostSkill,addEmployeeSkill,getSkillDetail} from "@/api/system/skill";
+
+const {isShowTable, tableType} = toRefs(useCommonStoreHook());
+import {getPostSkill, addEmployeeSkill, getSkillDetail} from "@/api/system/skill";
 // 数据字典相关
-const { dicts } = useDictionaryStore();
+const {dicts} = useDictionaryStore();
 
 const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
 };
-const data3=ref([]);
-const data2=ref(null);
+const data3 = ref([]);
+const data2 = ref(null);
 // 传入一个url,后面不带/
-const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+const {form, data, option, search, page, toDeleteIds, Methords, Utils} =
   useCrud({
     src: "/api/v1/sys/skillScore",
+    dataListUrl: "/api/v1/sys/skillScore/list",
   });
-const { dataList, createRow, updateRow, deleteRow, searchChange, dataNoPageList } =
+const {dataList, createRow, updateRow, deleteRow, searchChange, dataNoPageList} =
   Methords; //增删改查
-const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
-const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+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),
@@ -75,93 +75,91 @@ const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等
 //   editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
 //   menu: true,
 // });
-const option2=ref(null);
+const option2 = ref(null);
 const ctableRef = ref(null); //crudRef.value 获取avue-crud对象
 const router = useRouter();
 onMounted(() => {
   // console.log("crudRef", crudRef)
   getSkillDetail(props.skillId).then(
-    (data)=>{
-      form.value=data.data;
+    (data) => {
+      form.value = data.data;
     }
   )
-  search.value.employeeSkillId=props.skillId;
-  dataNoPageList();
-
+  search.value.employeeSkillId = props.skillId;
+  dataList();
 
 
 });
 
-const skillChange=(row)=>{
-  if(skillValue.value!==undefined&&skillValue.value!==null&&skillValue.value!==""){
-    data.value[row.$index].skillDictValue=skillValue.value;
+const skillChange = (row) => {
+  if (skillValue.value !== undefined && skillValue.value !== null && skillValue.value !== "") {
+    data.value[row.$index].skillDictValue = skillValue.value;
   }
 }
-const cancelWindow=()=>{
-  props.editDialog.visible=false;
+const cancelWindow = () => {
+  props.editDialog.visible = false;
 }
 const addSkill = () => {
-  const bom=ref({
-    $cellEdit:true,
+  const bom = ref({
+    $cellEdit: true,
   });
   data.value.push(bom.value);
 };
-const employeeSkill=ref({});
-const onHandle=()=>{
+const employeeSkill = ref({});
+const onHandle = () => {
   console.info(form.value);
-  if(form.value.userId===null||form.value.userId===undefined||form.value.userId===""){
+  if (form.value.userId === null || form.value.userId === undefined || form.value.userId === "") {
     ElMessage({
       message: "未选择打分用户",
       type: "error",
     });
     return false;
   }
-  if(form.value.postId===null||form.value.postId===undefined||form.value.postId===""){
+  if (form.value.postId === null || form.value.postId === undefined || form.value.postId === "") {
     ElMessage({
       message: "未选择岗位",
       type: "error",
     });
     return false;
   }
-  if(data.value.length===0){
+  if (data.value.length === 0) {
     ElMessage({
       message: "没有要保存的打分项",
       type: "error",
     });
     return false;
   }
-  if(data.value.length>0){
-    for(let i=0;i<data.value.length;i++){
-      if(data.value[i].skillDictValue===undefined||data.value[i].skillDictValue===null||data.value[i].skillDictValue===""){
+  if (data.value.length > 0) {
+    for (let i = 0; i < data.value.length; i++) {
+      if (data.value[i].skillDictValue === undefined || data.value[i].skillDictValue === null || data.value[i].skillDictValue === "") {
         ElMessage({
-          message: "第"+(i+1)+"项没有选择技能",
+          message: "第" + (i + 1) + "项没有选择技能",
           type: "error",
         });
         return false;
       }
-      if(data.value[i].score===undefined||data.value[i].score===null||data.value[i].score===""){
+      if (data.value[i].score === undefined || data.value[i].score === null || data.value[i].score === "") {
         ElMessage({
-          message: "第"+(i+1)+"项没有打分",
+          message: "第" + (i + 1) + "项没有打分",
           type: "error",
         });
         return false;
       }
     }
   }
-  employeeSkill.value.userId=form.value.userId;
-  employeeSkill.value.postId=form.value.postId;
-  employeeSkill.value.skillList=Array.from(data.value);
-  employeeSkill.value.id=form.value.id;
+  employeeSkill.value.userId = form.value.userId;
+  employeeSkill.value.postId = form.value.postId;
+  employeeSkill.value.skillList = Array.from(data.value);
+  employeeSkill.value.id = form.value.id;
   addEmployeeSkill(employeeSkill.value).then(
-    (data)=>{
-      if(data.code==="200") {
+    (data) => {
+      if (data.code === "200") {
         ElMessage({
           message: data.msg,
           type: "success",
         });
-        props.editDialog.visible=false;
-      }
-      else {
+        props.editDialog.visible = false;
+      } else {
         ElMessage({
           message: data.msg,
           type: "error",
@@ -174,100 +172,106 @@ const onHandle=()=>{
 // 设置表格列或者其他自定义的option
 option2.value = {
   selection: true,
-  submitBtn:false,
-  clearAbleBtn:false,
-  emptyBtn:false,
+  submitBtn: false,
+  clearAbleBtn: false,
+  emptyBtn: false,
   column: [
-    { label: "id", prop: "id", width: 130,overHidden: true,search: true ,
+    {
+      label: "id", prop: "id", width: 130, overHidden: true, search: true,
       filterable: true,
-      width: 100,overHidden: true,
-      disabled:false,
-      display:false,
+      disabled: false,
+      display: false,
 
     },
 
-    { label: "用户id", prop: "userId", width: 130,overHidden: true,search: true ,
+    {
+      label: "用户id", prop: "userId", width: 130, overHidden: true, search: true,
       filterable: true,
-      width: 100,overHidden: true,
-      disabled:true,
-      display:false,
+      disabled: true,
+      display: false,
 
     },
-    { label: "用户名", prop: "userName", width: 140,overHidden: true,search: true ,rules: [{
+    {
+      label: "用户名", prop: "userName", width: 140, overHidden: true, search: true, rules: [{
         required: true,
         search: true,
         message: "请选择员工姓名",
         trigger: "blur"
       }],
-      click: ({ value, column }) => {
+      click: ({value, column}) => {
         ctableRef.value.startSelect();
-      },},
-    { label: "所属机构", prop: "institution", width: 130,overHidden: true,search: true ,
+      },
+    },
+   /* {
+      label: "所属机构", prop: "institution", width: 130, overHidden: true, search: true,
       filterable: true,
-      width: 100,overHidden: true,
-      disabled:true,
+      width: 100, overHidden: true,
+      disabled: true,
 
-    },
+    },*/
     {
       label: "员工编号",
       prop: "employeeCode",
       search: true,
-      disabled:true,
+      disabled: true,
     },
-    { label: "岗位", prop: "postName",
+    {
+      label: "岗位", prop: "postName",
       search: true,
       filterable: true,
       overHidden: true,
-      disabled:true,
-      dicUrl:dictDataUtil.post_list_url,
-      dicMethod:"post",
-      change:({ value, column })=>{
-       if(value!==undefined) {
-         props.postId = value;
-         skillValue.value=null;
-         optionSkill.value=null;
-         dataNoPageList();
-       }
+      disabled: true,
+      dicUrl: dictDataUtil.post_list_url,
+      dicMethod: "post",
+      change: ({value, column}) => {
+        if (value !== undefined) {
+          props.postId = value;
+          skillValue.value = null;
+          optionSkill.value = null;
+          dataNoPageList();
+        }
       },
-      props: { label: "postName", value: "id" },
+      props: {label: "postName", value: "id"},
 
     },
-    { label: "部门", prop: "deptName", overHidden: true,
-      disabled:true, },
+    {
+      label: "所属机构", prop: "deptName", overHidden: true,
+      disabled: true,
+    },
 
   ],
 };
-const postIdValue=ref({});
+const postIdValue = ref({});
 
 const props = defineProps({
-  editDialog:{
-    type:Object,
-    default:()=>{
+  editDialog: {
+    type: Object,
+    default: () => {
       return {};
     }
   },
-  skillId:{
-    type:String,
-    default:()=>{
+  skillId: {
+    type: String,
+    default: () => {
       return "0";
     }
   },
-  postId:{
-    type:Number,
-    default:()=>{
+  postId: {
+    type: Number,
+    default: () => {
       return "0";
     }
   }
 
 })
-const postIdSkill=ref({});
+const postIdSkill = ref({});
 // 设置表格列或者其他自定义的option
-option.value = Object.assign(option.value,{
+option.value = Object.assign(option.value, {
   selection: false,
   addBtn: false,
   viewBtn: false,
-  editBtn:false,
-  saveBtn:false,
+  editBtn: false,
+  saveBtn: false,
 
   cellBtn: true,
   column: [{
@@ -275,10 +279,10 @@ option.value = Object.assign(option.value,{
     prop: "skillDictValue",
     align: 'center',
     headerAlign: 'center',
-    span:24,
+    span: 24,
     cell: true,
     type: 'select',
-    dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/postSkill/list/"+props.postId,
+    dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/postSkill/list/" + props.postId,
     props: {
       label: "skillDictLabel", // 下拉菜单显示的字段
       value: "skillDictValue", // 下拉菜单值的字段
@@ -290,26 +294,26 @@ option.value = Object.assign(option.value,{
       align: 'center',
       headerAlign: 'center',
       cell: true,
-      type:"number",
+      type: "number",
       precision: 2,
-      max:100,
-      min:0,
-      span:24,
+      max: 100,
+      min: 0,
+      span: 24,
     },],
 });
-const onSelectedFinish=(selectedValue)=>{
-  form.value.userId=selectedValue.id;
+const onSelectedFinish = (selectedValue) => {
+  form.value.userId = selectedValue.id;
 
-  form.value.userName=selectedValue.userName;
-  form.value.deptName=selectedValue.deptName;
-  form.value.employeeCode=selectedValue.employeeCode;
-  form.value.institution=selectedValue.institution;
+  form.value.userName = selectedValue.userName;
+  form.value.deptName = selectedValue.deptName;
+  form.value.employeeCode = selectedValue.employeeCode;
+  //form.value.institution = selectedValue.institution;
 
 }
-const skillValue=ref(null);
-const optionSkill=ref([]);
-const getPostSkills=()=>{
-  if(postIdValue.value===undefined||postIdValue.value===null||postIdValue.value===""){
+const skillValue = ref(null);
+const optionSkill = ref([]);
+const getPostSkills = () => {
+  if (postIdValue.value === undefined || postIdValue.value === null || postIdValue.value === "") {
     ElMessage({
       message: "未选择岗位",
       type: "error",
@@ -317,34 +321,38 @@ const getPostSkills=()=>{
     return false;
   }
   getPostSkill(postIdValue.value).then(
-    (data)=>{
-      optionSkill.value=Array.from(data.data);
+    (data) => {
+      optionSkill.value = Array.from(data.data);
     }
   )
 }
 
 </script>
 <style type="text/css">
-  .title-detail{
-    width: 30%;
-    height: 50px;
-    line-height: 50px;
-    margin: 25px 20px 25px 0;
-    float: left;
-  }
-  .detail{
-    margin: 0 auto;
-    width: 100%;
-  }
-  .avue-crud{
-    float: left;
-  }
-  .detail-footer{
-    float: right;
-    margin-top:15px;
-  }
-  .el-select__selection{
-    width: 150px;
-  }
+.title-detail {
+  width: 30%;
+  height: 50px;
+  line-height: 50px;
+  margin: 25px 20px 25px 0;
+  float: left;
+}
+
+.detail {
+  margin: 0 auto;
+  width: 100%;
+}
+
+.avue-crud {
+  float: left;
+}
+
+.detail-footer {
+  float: right;
+  margin-top: 15px;
+}
+
+.el-select__selection {
+  width: 150px;
+}
 
 </style>

+ 3 - 13
src/views/base/skill/components/user-skill.vue

@@ -63,10 +63,8 @@
 <script setup>
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "@/hooks/userCrud";
-import ButtonPermKeys from "@/common/configs/buttonPermission";
 import { useCommonStoreHook, useDictionaryStore } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
-import SingleUpload from "@/components/Upload/SingleUpload.vue";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
 import {getPostSkill,addEmployeeSkill} from "@/api/system/skill";
 // 数据字典相关
@@ -194,10 +192,8 @@ option2.value = {
 
     { label: "用户id", prop: "userId", width: 130,overHidden: true,search: true ,
       filterable: true,
-      width: 100,overHidden: true,
       disabled:true,
       display:false,
-
     },
     { label: "用户名", prop: "userName", width: 140,overHidden: true,search: true ,rules: [{
         required: true,
@@ -208,11 +204,9 @@ option2.value = {
       click: ({ value, column }) => {
         ctableRef.value.startSelect();
       },},
-    { label: "所属机构", prop: "institution", width: 130,overHidden: true,search: true ,
+    { label: "所属机构", prop: "deptName", width: 130,overHidden: true,search: true ,
       filterable: true,
-      width: 100,overHidden: true,
       disabled:true,
-
     },
     {
       label: "员工编号",
@@ -237,9 +231,8 @@ option2.value = {
       props: { label: "postName", value: "id" },
 
     },
-    { label: "部门", prop: "deptName", overHidden: true,
-      disabled:true, },
-
+  /*  { label: "部门", prop: "deptName", overHidden: true,
+      disabled:true, },*/
   ],
 };
 
@@ -258,7 +251,6 @@ option.value = Object.assign(option.value,{
   viewBtn: false,
   editBtn:false,
   saveBtn:false,
-
   cellBtn: true,
   column: [{
     label: "技能",
@@ -285,12 +277,10 @@ option.value = Object.assign(option.value,{
 });
 const onSelectedFinish=(selectedValue)=>{
   form.value.userId=selectedValue.id;
-
   form.value.userName=selectedValue.userName;
   form.value.deptName=selectedValue.deptName;
   form.value.employeeCode=selectedValue.employeeCode;
   form.value.institution=selectedValue.institution;
-
 }
 const skillValue=ref(null);
 const optionSkill=ref([]);

+ 3 - 8
src/views/base/skill/components/view-skill.vue

@@ -169,7 +169,6 @@ option2.value = {
   column: [
     { label: "id", prop: "id", width: 130,overHidden: true,search: true ,
       filterable: true,
-      width: 100,overHidden: true,
       disabled:false,
       display:false,
 
@@ -177,18 +176,17 @@ option2.value = {
 
     { label: "用户id", prop: "userId", width: 130,overHidden: true,search: true ,
       filterable: true,
-      width: 100,overHidden: true,
       disabled:true,
       display:false,
 
     },
     { label: "用户名", prop: "userName",disabled:true, width: 140,overHidden: true,search: true },
-    { label: "所属机构", prop: "institution", width: 130,overHidden: true,search: true ,
+   /* { label: "所属机构", prop: "institution", width: 130,overHidden: true,search: true ,
       filterable: true,
       width: 100,overHidden: true,
       disabled:true,
 
-    },
+    },*/
     {
       label: "员工编号",
       prop: "employeeCode",
@@ -213,7 +211,7 @@ option2.value = {
       props: { label: "postName", value: "id" },
 
     },
-    { label: "部门", prop: "deptName", overHidden: true,
+    { label: "所属机构", prop: "deptName", overHidden: true,
       disabled:true, },
 
   ],
@@ -251,7 +249,6 @@ option.value = Object.assign(option.value,{
   saveBtn:false,
   delBtn:false,
   menu:false,
-
   cellBtn: true,
   column: [{
     label: "技能",
@@ -282,12 +279,10 @@ option.value = Object.assign(option.value,{
 });
 const onSelectedFinish=(selectedValue)=>{
   form.value.userId=selectedValue.id;
-
   form.value.userName=selectedValue.userName;
   form.value.deptName=selectedValue.deptName;
   form.value.employeeCode=selectedValue.employeeCode;
   form.value.institution=selectedValue.institution;
-
 }
 const skillValue=ref(null);
 const optionSkill=ref([]);

+ 85 - 72
src/views/base/skill/index.vue

@@ -2,11 +2,11 @@
   <div class="mainContentBox">
     <avue-crud
       ref="crudRef"
-      v-model:search="search"
       v-model="form"
+      v-model:page="page"
+      v-model:search="search"
       :data="data"
       :option="option"
-      v-model:page="page"
       @row-update="updateRow"
       @row-del="deleteRow"
       @search-change="searchChange"
@@ -17,76 +17,79 @@
     >
       <template #menu-left="{ size }">
         <el-button
-          type="primary"
-          icon="el-icon-plus"
           :size="size"
+          icon="el-icon-plus"
+          type="primary"
           @click="addRow"
-        >新增</el-button
+        >新增
+        </el-button
         >
         <el-button
           :disabled="toDeleteIds.length < 1"
-          type="danger"
-          icon="el-icon-delete"
           :size="size"
+          icon="el-icon-delete"
+          type="danger"
           @click="multipleDelete"
-          >删除</el-button
-        ></template>
-        <template #menu="{row,index,type}">
-          <el-button @click="editSkills(row)"
-                     icon="el-icon-edit"
-                     text
-                     type="primary"
-          >编辑</el-button>
-          <el-button @click="viewSkills(row)"
-                     icon="el-icon-view"
-                     text
-                     type="primary"
-          >查看</el-button>
-        </template>
+        >删除
+        </el-button
+        >
+      </template>
+      <template #menu="{row,index,type}">
+        <el-button icon="el-icon-edit"
+                   text
+                   type="primary"
+                   @click="editSkills(row)"
+        >编辑
+        </el-button>
+        <el-button icon="el-icon-view"
+                   text
+                   type="primary"
+                   @click="viewSkills(row)"
+        >查看
+        </el-button>
+      </template>
 
 
     </avue-crud>
     <el-dialog
       v-model="dialog.visible"
+      :destroy-on-close="true"
       :title="dialog.title"
       width="800px"
-      :destroy-on-close="true"
-      @close="dialog.visible = false"
+      @close="addClose"
     >
-      <user-skill   :dialog="dialog"/>
+      <user-skill :dialog="dialog"/>
     </el-dialog>
 
     <el-dialog
       v-model="editDialog.visible"
+      :destroy-on-close="true"
       :title="editDialog.title"
       width="800px"
-      :destroy-on-close="true"
       @close="editClose"
     >
-      <editSkill   :editDialog="editDialog" :skillId="editUser.id" :postId="editUser.postId"/>
+      <editSkill :editDialog="editDialog" :postId="editUser.postId" :skillId="editUser.id"/>
     </el-dialog>
     <el-dialog
       v-model="viewDialog.visible"
+      :destroy-on-close="true"
       :title="viewDialog.title"
       width="800px"
-      :destroy-on-close="true"
       @close="viewDialog.visible=false"
     >
-      <viewSkill   :viewDialog="viewDialog" :skillId="viewUser.id" :postId="viewUser.postId"/>
+      <viewSkill :postId="viewUser.postId" :skillId="viewUser.id" :viewDialog="viewDialog"/>
     </el-dialog>
   </div>
 </template>
 <script setup>
-import { ref, getCurrentInstance } from "vue";
-import { useCrud } from "@/hooks/userCrud";
-import ButtonPermKeys from "@/common/configs/buttonPermission";
-import { useCommonStoreHook, useDictionaryStore } from "@/store";
+import {ref, getCurrentInstance} from "vue";
+import {useCrud} from "@/hooks/userCrud";
+import {useCommonStoreHook, useDictionaryStore} from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
-import editSkill from "@/views/base/skill/components/edit-skill.vue"
-import viewSkill from "@/views/base/skill/components/view-skill.vue"
-const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+
+const {isShowTable, tableType} = toRefs(useCommonStoreHook());
 // 数据字典相关
-const { dicts } = useDictionaryStore();
+const {dicts} = useDictionaryStore();
 
 const test = () => {
   isShowTable.value = true;
@@ -106,22 +109,26 @@ const viewDialog = reactive({
   title: "查看",
   visible: false,
 });
-const editClose=()=>{
+const addClose = () => {
+  dialog.visible = false;
+  dataList();
+}
+const editClose = () => {
   editDialog.visible = false;
   dataList();
 }
-const addRow=()=>{
-  dialog.visible=true;
+const addRow = () => {
+  dialog.visible = true;
 }
 // 传入一个url,后面不带/
-const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+const {form, data, option, search, page, toDeleteIds, Methords, Utils} =
   useCrud({
     src: "/api/v1/sys/employeeSkill",
   });
-const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+const {dataList, createRow, updateRow, deleteRow, searchChange, resetChange} =
   Methords; //增删改查
-const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
-const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+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),
@@ -139,7 +146,6 @@ onMounted(() => {
 });
 
 
-
 /**
  * 上传excel相关
  */
@@ -154,39 +160,43 @@ const importExcelData = () => {
     uploadRef.value.show("/api/v1/plan/order/import");
   }
 };
-const editUser=ref(null);
-const viewUser=ref(null);
-const editSkills=(row)=>{
-  editDialog.visible=true;
-  editUser.value=row;
+const editUser = ref(null);
+const viewUser = ref(null);
+const editSkills = (row) => {
+  editDialog.visible = true;
+  editUser.value = row;
 
 }
-const viewSkills=(row)=>{
-  viewDialog.visible=true;
-  viewUser.value=row;
+const viewSkills = (row) => {
+  viewDialog.visible = true;
+  viewUser.value = row;
 
 }
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   selection: true,
-  addBtn:false,
-  viewBtn:false,
-  editBtn:false,
+  addBtn: false,
+  viewBtn: false,
+  editBtn: false,
   column: [
-
-
-    { label: "所属机构", prop: "institution", width: 130,
+    {
+      label: "所属机构", prop: "deptId", width: 200,
       search: true,
+      hide: true,
       filterable: true,
       type: "select",
       overHidden: true,
-      dicUrl:dictDataUtil.dept_list_url,
-      dicMethod:"post",
-      props: { label: "deptName", value: "id" },
-      disabled:true,
-
+      dicUrl: dictDataUtil.dept_list_url,
+      dicMethod: "post",
+      props: {label: "deptName", value: "id"},
+      display: true,
     },
-    { label: "员工姓名", prop: "userName", width: 140,overHidden: true,search: true ,rules: [{
+    {
+      label: "所属机构", prop: "deptName", width: 200,
+      disabled: true,
+    },
+    {
+      label: "员工姓名", prop: "userName", width: 140, overHidden: true, search: true, rules: [{
         required: true,
         search: true,
         message: "请选择员工姓名",
@@ -197,20 +207,23 @@ option.value = Object.assign(option.value, {
       label: "员工编号",
       prop: "employeeCode",
       search: true,
-      disabled:true,
+      disabled: true,
     },
-    { label: "岗位", prop: "postId",
+    {
+      label: "岗位", prop: "postId",
       search: true,
       filterable: true,
       type: "select",
       overHidden: true,
-      dicUrl:dictDataUtil.post_list_url,
-      dicMethod:"post",
-      props: { label: "postName", value: "id" },
+      dicUrl: dictDataUtil.post_list_url,
+      dicMethod: "post",
+      props: {label: "postName", value: "id"},
 
     },
-    { label: "部门", prop: "deptName", overHidden: true,
-      disabled:true, },
+    /*{
+      label: "部门", prop: "deptName", overHidden: true,
+      disabled: true,
+    },*/
     {
       label: "分数",
       prop: "scopes",
@@ -218,7 +231,7 @@ option.value = Object.assign(option.value, {
     },
   ],
 });
-const onSelectedFinish=()=>{
+const onSelectedFinish = () => {
 
 }
 

+ 101 - 0
src/views/device/instance/components/choice-station-page.vue

@@ -0,0 +1,101 @@
+<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>
+  </div>
+</template>
+<script setup>
+import { ref } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+import { useCommonStoreHook } from "@/store";
+const { isShowTable, tableType} = toRefs(useCommonStoreHook());
+const test = () => {
+  isShowTable.value = true;
+  tableType.value = tableType.value == 1 ? 2 : 1;
+};
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/base/station",
+  });
+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(["stationInfo"])
+const rowClick = (row)=>{
+  emit("stationInfo", row)
+}
+
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  delBtn: false,
+  selection: false,
+  search: false,
+  editBtn: false,
+  addBtn: false,
+  viewBtn: false,
+  menu: false,
+  column: [
+    {
+      label: "工位编号",
+      prop: "stationCode",
+      overHidden: true,
+      search: true,
+    },
+    {
+      label: "工位名称",
+      prop: "name",
+      search: true,
+      overHidden: true,
+    },
+    {
+      label: "工位类型",
+      prop: "stationDictValue",
+      search: true,
+      overHidden: true,
+      type: "select",
+      dicUrl: dictDataUtil.request_url + "station_type",
+      props: {
+        label: "dictLabel", // 下拉菜单显示的字段
+        value: "dictValue", // 下拉菜单值的字段
+      },
+    },
+    {
+      label: "负责人",
+      prop: "manager",
+      overHidden: true,
+    },
+    {
+      label: "所属产线",
+      prop: "productionLineName",
+      overHidden: true,
+      display: false,
+    },
+    {
+      label: "工位地址",
+      prop: "position",
+      overHidden: true,
+    }
+  ],
+});
+
+onMounted(() => {
+  search.value.enable = "1"
+  dataList();
+});
+</script>

+ 57 - 13
src/views/device/instance/index.vue

@@ -38,7 +38,7 @@
           @click="showParamsPage(row)"
           >模型
           <template #icon>
-            <svg-icon icon-class="moxing"></svg-icon>
+            <svg-icon icon-class="moxing" />
           </template>
         </el-button>
       </template>
@@ -93,22 +93,22 @@
         style="height: 280px"
       >
         <el-table-column label="参数" prop="fieldCode">
-          <template v-slot="{ row }">
+          <template #default="{ row }">
             <el-input v-model="row.fieldCode" />
           </template>
         </el-table-column>
         <el-table-column label="参数名称" prop="fieldLabel">
-          <template v-slot="{ row }">
+          <template #default="{ row }">
             <el-input v-model="row.fieldLabel" />
           </template>
         </el-table-column>
         <el-table-column label="参数值" prop="fieldValue">
-          <template v-slot="{ row }">
+          <template #default="{ row }">
             <el-input v-model="row.fieldValue" />
           </template>
         </el-table-column>
         <el-table-column label="操作" align="center">
-          <template v-slot="{ row }">
+          <template #default="{ row }">
             <el-button
               type="danger"
               @click="minusItem(row)"
@@ -120,15 +120,26 @@
         </el-table-column>
       </el-table>
       <div class="dialog-footer" style="margin-top: 20px" align="center">
-        <el-button
-          type="primary"
-          v-if="pageData.length > 0"
-          @click="handleSubmit"
-          >保 存</el-button
-        >
+        <el-button type="primary" @click="handleSubmit">保 存</el-button>
         <el-button @click="dialog.visible = false">取消</el-button>
       </div>
     </el-dialog>
+    <el-dialog
+      v-model="dialog2.visible"
+      :title="dialog2.title"
+      width="70%"
+      @close="dialog2.visible = false"
+    >
+      <choice-workshop-page @work-shop-info="workShopInfo" />
+    </el-dialog>
+    <el-dialog
+      v-model="dialog3.visible"
+      :title="dialog3.title"
+      width="70%"
+      @close="dialog3.visible = false"
+    >
+      <choice-station-page @station-info="stationInfo" />
+    </el-dialog>
     <ExcelUpload ref="uploadRef" @finished="uploadFinished" />
   </div>
 </template>
@@ -138,6 +149,8 @@ import { useCrud } from "@/hooks/userCrud";
 import buttonPermission from "@/common/configs/buttonPermission";
 import { configSave, configList, deviceUpdateCollect } from "@/api/device";
 import { useCommonStoreHook } from "@/store";
+import ChoiceWorkshopPage from "../../plan/workOrder/components/choice-workshop-page.vue";
+import ChoiceStationPage from "./components/choice-station-page.vue";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
 const test = () => {
@@ -218,7 +231,22 @@ const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
-
+const workShopInfo = (value) => {
+  form.value.workshop = value.name;
+  dialog2.visible = false;
+};
+const stationInfo = (value) => {
+  form.value.station = value.name;
+  dialog3.visible = false;
+};
+const dialog2 = reactive({
+  title: "车间选择",
+  visible: false,
+});
+const dialog3 = reactive({
+  title: "工位选择",
+  visible: false,
+});
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   delBtn: false,
@@ -395,12 +423,29 @@ option.value = Object.assign(option.value, {
       prop: "workshop",
       width: 160,
       overHidden: true,
+      click: ({ value, column }) => {
+        if (column.boxType) {
+          dialog2.visible = true;
+        }
+      },
     },
     {
       label: "所在工位",
       prop: "station",
       width: 160,
       overHidden: true,
+      click: ({ value, column }) => {
+        if (column.boxType) {
+          /*if(!form.value.workshop){
+            ElMessage({
+              message: "请先选择车间",
+              type: "warning",
+            });
+            return;
+          }*/
+          dialog3.visible = true;
+        }
+      },
     },
     {
       label: "设备位置",
@@ -424,7 +469,6 @@ option.value = Object.assign(option.value, {
 });
 
 onMounted(() => {
-  // console.log("crudRef", crudRef)
   dataList();
 });
 /**

+ 56 - 47
src/views/device/repair/index.vue

@@ -2,11 +2,11 @@
   <div class="mainContentBox">
     <avue-crud
       ref="crudRef"
-      v-model:search="search"
       v-model="form"
+      v-model:page="page"
+      v-model:search="search"
       :data="data"
       :option="option"
-      v-model:page="page"
       @row-save="createRow"
       @row-update="updateRow"
       @row-del="deleteRow"
@@ -18,18 +18,19 @@
     >
       <template #menu-left="{ size }">
         <el-button
+          v-hasPerm="[ButtonPermKeys.DEVICE.BTNS.repair_del]"
           :disabled="toDeleteIds.length < 1"
-          type="danger"
-          icon="el-icon-delete"
           :size="size"
-          v-hasPerm="[ButtonPermKeys.DEVICE.BTNS.repair_del]"
+          icon="el-icon-delete"
+          type="danger"
           @click="multipleDelete"
-          >删除</el-button
+        >删除
+        </el-button
         >
       </template>
       <template #menu="{ size, row, index }">
-        <el-button @click="maintenance(row, 0)" text type="primary" :size="size"
-          >流程
+        <el-button :size="size" text type="primary" @click="maintenance(row, 0)"
+        >流程
           <template #icon>
             <svg-icon icon-class="liucheng"></svg-icon>
           </template>
@@ -47,18 +48,18 @@
       width="850px"
       @close="dialog.visible = false"
     >
-      <device-page @deviceInfo="deviceInfo" />
+      <device-page @deviceInfo="deviceInfo"/>
     </el-dialog>
 
     <el-dialog
       v-model="dialog1.visible"
       :title="dialog1.title"
-      width="750px"
       height="80%"
+      width="750px"
       @close="dialog1.visible = false"
     >
       <el-timeline style="max-width: 500px; margin-left: 100px">
-        <el-timeline-item center type="success" placement="top">
+        <el-timeline-item center placement="top" type="success">
           <el-card>
             <h4>设备报故</h4>
             <p>设备编号: {{ maintenanceInfo.deviceNo }}</p>
@@ -69,9 +70,9 @@
           </el-card>
         </el-timeline-item>
         <el-timeline-item
+          :type="maintenanceInfo.state === 0 ? 'primary' : 'success'"
           center
           placement="top"
-          :type="maintenanceInfo.state === 0 ? 'primary' : 'success'"
         >
           <el-card v-if="viewPage">
             <h4>设备维修</h4>
@@ -93,18 +94,18 @@
             <el-form
               ref="maintenanceInfoForm1"
               :model="maintenanceInfo"
+              :rules="rules1"
               label-width="auto"
               style="max-width: 400px"
-              :rules="rules1"
             >
               <el-form-item label="维修人员" prop="handleUser">
                 <!--                <el-input :disabled="maintenanceInfo.state !== 0" v-model="maintenanceInfo.handleUser" />-->
                 <el-select
                   v-model="maintenanceInfo.handleUser"
-                  placeholder="维修人员"
                   :disabled="maintenanceInfo.state !== 0"
-                  size="large"
                   filterable
+                  placeholder="维修人员"
+                  size="large"
                 >
                   <el-option
                     v-for="item in userList"
@@ -116,16 +117,16 @@
               </el-form-item>
               <el-form-item label="维修内容" prop="handleContent">
                 <el-input
+                  v-model="maintenanceInfo.handleContent"
                   :disabled="maintenanceInfo.state !== 0"
-                  type="textarea"
                   :rows="2"
-                  v-model="maintenanceInfo.handleContent"
+                  type="textarea"
                 />
               </el-form-item>
               <el-form-item label="处理结果">
                 <el-radio-group
-                  :disabled="maintenanceInfo.state !== 0"
                   v-model="maintenanceInfo.handleResult"
+                  :disabled="maintenanceInfo.state !== 0"
                   class="ml-4"
                 >
                   <el-radio :value="0">可正常运行</el-radio>
@@ -134,20 +135,19 @@
               </el-form-item>
               <el-form-item style="margin-left: 45%">
                 <el-button
-                  type="primary"
                   v-if="maintenanceInfo.state === 0"
                   v-hasPerm="[ButtonPermKeys.DEVICE.BTNS.repair_repair]"
                   :disabled="maintenanceInfo.state !== 0"
+                  type="primary"
                   @click="maintenanceSubmit1"
-                  >维修</el-button
+                >维修
+                </el-button
                 >
               </el-form-item>
             </el-form>
           </el-card>
         </el-timeline-item>
         <el-timeline-item
-          center
-          placement="top"
           :type="
             maintenanceInfo.state === 1
               ? 'primary'
@@ -155,6 +155,8 @@
                 ? 'info'
                 : 'success'
           "
+          center
+          placement="top"
         >
           <el-card v-if="viewPage">
             <h4>设备审批</h4>
@@ -173,21 +175,21 @@
           <el-card v-if="!viewPage">
             <h4>设备审批</h4>
             <el-form
-              ref="maintenanceInfoForm2"
               v-if="maintenanceInfo.state >= 1"
+              ref="maintenanceInfoForm2"
               :model="maintenanceInfo"
+              :rules="rules2"
               label-width="auto"
               style="max-width: 400px"
-              :rules="rules2"
             >
               <el-form-item label="审批人员" prop="auditUser">
                 <!--                <el-input :disabled="maintenanceInfo.state !== 1 && readonly"  v-model="maintenanceInfo.auditUser" />-->
                 <el-select
                   v-model="maintenanceInfo.auditUser"
-                  placeholder="审批人员"
                   :disabled="maintenanceInfo.state !== 1 && readonly"
-                  size="large"
                   filterable
+                  placeholder="审批人员"
+                  size="large"
                 >
                   <el-option
                     v-for="item in userList"
@@ -199,8 +201,8 @@
               </el-form-item>
               <el-form-item label="审批结果">
                 <el-radio-group
-                  :disabled="maintenanceInfo.state !== 1 && readonly"
                   v-model="maintenanceInfo.auditResult"
+                  :disabled="maintenanceInfo.state !== 1 && readonly"
                   class="ml-4"
                 >
                   <el-radio :value="0">通过</el-radio>
@@ -209,12 +211,13 @@
               </el-form-item>
               <el-form-item style="margin-left: 45%">
                 <el-button
-                  type="primary"
                   v-if="maintenanceInfo.state === 1"
                   v-hasPerm="[ButtonPermKeys.DEVICE.BTNS.repair_audit]"
                   :disabled="maintenanceInfo.state !== 1"
+                  type="primary"
                   @click="maintenanceSubmit2"
-                  >审批</el-button
+                >审批
+                </el-button
                 >
               </el-form-item>
             </el-form>
@@ -225,15 +228,16 @@
   </div>
 </template>
 <script setup>
-import { ref, getCurrentInstance } from "vue";
-import { useCrud } from "@/hooks/userCrud";
+import {ref, getCurrentInstance} from "vue";
+import {useCrud} from "@/hooks/userCrud";
 import ButtonPermKeys from "@/common/configs/buttonPermission";
-import { checkPerm } from "@/directive/permission";
-import { getUserList } from "@/api/system/user";
-import { repair, audit } from "@/api/device/index";
-import { useCommonStoreHook } from "@/store";
+import {checkPerm} from "@/directive/permission";
+import {getUserList} from "@/api/system/user";
+import {repair, audit} from "@/api/device/index";
+import {useCommonStoreHook} from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
-const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+
+const {isShowTable, tableType} = toRefs(useCommonStoreHook());
 const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
@@ -256,14 +260,14 @@ const dialog1 = reactive({
 });
 const userList = ref([]);
 // 传入一个url,后面不带/
-const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+const {form, data, option, search, page, toDeleteIds, Methords, Utils} =
   useCrud({
     src: "/api/v1/device/repair",
   });
-const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+const {dataList, createRow, updateRow, deleteRow, searchChange, resetChange} =
   Methords; //增删改查
-const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
-const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+const {selectionChange, multipleDelete} = Methords; //选中和批量删除事件
+const {checkBtnPerm, downloadTemplate, exportData} = Utils; //按钮权限等工具
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 const deviceInfo = (value) => {
   form.value.deviceNo = value.deviceNo;
@@ -318,14 +322,14 @@ const maintenanceSubmit2 = () => {
 };
 const rules1 = reactive({
   handleUser: [
-    { required: true, message: "维修人员不能为空", trigger: "blur" },
+    {required: true, message: "维修人员不能为空", trigger: "blur"},
   ],
   handleContent: [
-    { required: true, message: "维修内容不能为空", trigger: "blur" },
+    {required: true, message: "维修内容不能为空", trigger: "blur"},
   ],
 });
 const rules2 = reactive({
-  auditUser: [{ required: true, message: "审批人员不能为空", trigger: "blur" }],
+  auditUser: [{required: true, message: "审批人员不能为空", trigger: "blur"}],
 });
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
@@ -334,6 +338,9 @@ option.value = Object.assign(option.value, {
   labelWidth: 150,
   viewBtn: false,
   editBtn: false,
+  selectable: (row, index) => {
+    return row.state === 0;
+  },
   column: [
     {
       label: "设备编号",
@@ -346,7 +353,7 @@ option.value = Object.assign(option.value, {
           trigger: "trigger",
         },
       ],
-      click: ({ value, column }) => {
+      click: ({value, column}) => {
         if (column.boxType) {
           dialog.visible = true;
         }
@@ -363,6 +370,7 @@ option.value = Object.assign(option.value, {
       prop: "deviceType",
       type: "select",
       addDisabled: true,
+      overHidden: true,
       search: true,
       dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.device_type,
       props: {
@@ -388,6 +396,7 @@ option.value = Object.assign(option.value, {
       minRows: 2, //最小行/最小值
       type: "textarea", //类型为多行文本域框
       maxlength: 512, //最大输入长度,
+      overHidden: true,
       rules: [
         {
           required: true,
@@ -402,9 +411,9 @@ option.value = Object.assign(option.value, {
       type: "select",
       display: false,
       dicData: [
-        { label: "待维修", value: 0 },
-        { label: "待审批 ", value: 1 },
-        { label: "已完成", value: 2 },
+        {label: "待维修", value: 0},
+        {label: "待审批 ", value: 1},
+        {label: "已完成", value: 2},
       ],
     },
     {

+ 4 - 1
src/views/plan/order/index.vue

@@ -9,7 +9,7 @@
       :table-loading="loading"
       :permission="permission"
       @search-change="handleQuery"
-      @search-reset="resetQuery"
+      @search-reset="resetChange"
       @size-change="handleQuery"
       @current-change="handleQuery"
       @row-save="rowSave"
@@ -259,6 +259,9 @@ const form = ref({});
 const page = ref({ total: 0, currentPage: 1, pageSize: 10 });
 const loading = ref(false);
 const uploadRef = ref<UploadInstance>(); // 上传组件
+const resetChange = () => {
+  handleQuery(null, null);
+};
 // 导入数据
 const importData = reactive({
   file: undefined,

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

@@ -34,7 +34,7 @@
           @click="aps1"
           >批量排程
           <template #icon>
-            <svg-icon icon-class="paicheng"></svg-icon>
+            <svg-icon icon-class="paicheng" />
           </template>
         </el-button>
       </template>
@@ -65,7 +65,7 @@
           :size="size"
           >排程
           <template #icon>
-            <svg-icon icon-class="paicheng"></svg-icon>
+            <svg-icon icon-class="paicheng" />
           </template>
         </el-button>
         <el-button
@@ -77,7 +77,7 @@
           :size="size"
           >冻结
           <template #icon>
-            <svg-icon icon-class="dongjie"></svg-icon>
+            <svg-icon icon-class="dongjie" />
           </template>
         </el-button>
         <el-button
@@ -89,7 +89,7 @@
           :size="size"
           >解冻
           <template #icon>
-            <svg-icon icon-class="jiedong"></svg-icon>
+            <svg-icon icon-class="jiedong" />
           </template>
         </el-button>
         <el-button
@@ -105,7 +105,7 @@
         <el-button text @click="showSeqPage(row)" type="primary" :size="size"
           >流转卡号
           <template #icon>
-            <svg-icon icon-class="luozhuankahao"></svg-icon>
+            <svg-icon icon-class="luozhuankahao" />
           </template>
         </el-button>
         <el-button
@@ -124,7 +124,7 @@
           :size="size"
           >领用申请
           <template #icon>
-            <svg-icon icon-class="lingyongshenqing"></svg-icon>
+            <svg-icon icon-class="lingyongshenqing" />
           </template>
         </el-button>
         <el-button
@@ -134,7 +134,7 @@
           :size="size"
           >生产准备
           <template #icon>
-            <svg-icon icon-class="shengchanzhunbei"></svg-icon>
+            <svg-icon icon-class="shengchanzhunbei" />
           </template>
         </el-button>
         <el-button
@@ -165,7 +165,7 @@
       width="80%"
       @close="dialog.visible = false"
     >
-      <order-page queryType="1" @orderInfo="orderInfo" />
+      <order-page queryType="1" @order-info="orderInfo" />
     </el-dialog>
 
     <el-dialog
@@ -177,7 +177,7 @@
       <choice-route-page
         :processRouteType="processRouteType"
         :material-code="form.materialCode"
-        @routeInfo="routeInfo"
+        @route-info="routeInfo"
       />
     </el-dialog>
 
@@ -187,7 +187,7 @@
       width="80%"
       @close="dialog2.visible = false"
     >
-      <choice-workshop-page @workShopInfo="workShopInfo" />
+      <choice-workshop-page @work-shop-info="workShopInfo" />
     </el-dialog>
 
     <el-dialog
@@ -199,7 +199,7 @@
       <choice-line-page
         :parentCode="form.workshopCode"
         :materialCode="form.materialCode"
-        @lineInfo="lineInfo"
+        @line-info="lineInfo"
       />
     </el-dialog>
 
@@ -248,7 +248,7 @@
               :label="item.dictLabel"
               :value="item.dictValue"
               :key="item.dictValue"
-            ></el-option>
+            />
           </el-select>
         </el-form-item>
         <el-form-item label="排程类型" prop="apsModel">
@@ -262,7 +262,7 @@
               :label="item.dictLabel"
               :value="item.dictValue"
               :key="item.dictValue"
-            ></el-option>
+            />
           </el-select>
         </el-form-item>
       </el-form>
@@ -482,6 +482,8 @@ const workShopInfo = (value) => {
   form.value.workshopName = value.id;
   form.value.workshopCode = value.code;
   form.value.workshopName = value.name;
+  form.value.productLineId = "";
+  form.value.productLineName = "";
   dialog2.visible = false;
 };
 const routeInfo = (value) => {
@@ -665,6 +667,9 @@ option.value = Object.assign(option.value, {
         if (column.boxType) {
           dialog2.visible = true;
         }
+        if (column.boxType == "edit") {
+          form.value.productLineName = "";
+        }
       },
     },
     {
@@ -681,7 +686,7 @@ option.value = Object.assign(option.value, {
       ],
       click: ({ value, column }) => {
         if (column.boxType) {
-          if (!form.value.workshopCode) {
+          if (!form.value.workshopName) {
             ElMessage({
               message: "请先选择生产车间",
               type: "warning",

+ 15 - 11
src/views/pro/traceability/index.vue

@@ -11,6 +11,9 @@
           v-model:page="page"
           @cell-click="handleCellClick"
           @search-change="searchChange"
+          @size-change="dataList"
+          @current-change="dataList"
+      
         >
           <template #seqNo="{ row }">
             <el-tag :type="chooseTagType(row.seqNo, 'css')">{{
@@ -56,11 +59,11 @@
             <el-tab-pane name="traceabilityComRef" label="生产履历">
               <template #label>
                 <span
-                >生产履历
+                  >生产履历
                   <el-badge
-                      :value="tabCount.traceability"
-                      class="item"
-                      type="primary"
+                    :value="tabCount.traceability"
+                    class="item"
+                    type="primary"
                   />
                 </span>
               </template>
@@ -131,19 +134,20 @@
               </template>
               <FaultCom ref="faultComRef" />
             </el-tab-pane>
-<!--            <el-tab-pane name="bugComRef" label="缺陷项">缺陷项</el-tab-pane>-->
+            <!--            <el-tab-pane name="bugComRef" label="缺陷项">缺陷项</el-tab-pane>-->
             <el-tab-pane name="mediaComRef" label="图片采集"
               ><template #label>
                 <span
-                >图片采集
+                  >图片采集
                   <el-badge
-                      :value="tabCount.medias"
-                      class="item"
-                      type="primary"
+                    :value="tabCount.medias"
+                    class="item"
+                    type="primary"
                   />
                 </span>
-            </template>
-            <media-com ref="mediaComRef"/></el-tab-pane>
+              </template>
+              <media-com ref="mediaComRef"
+            /></el-tab-pane>
           </el-tabs>
         </el-main>
       </el-container>

+ 1 - 1
src/views/storage/vehicleMaterial/index.vue

@@ -129,7 +129,7 @@
       },
       {
         label: "物料编号",
-        prop: "code",
+        prop: "materialCode",
         hide:true,
         click:({ value, column }) => {
           ctableRef.value.startSelect();

+ 1 - 1
vite.config.ts

@@ -199,7 +199,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
     // 构建配置
     build: {
       sourcemap: true,
-      chunkSizeWarningLimit: 2000, // 消除打包大小超过500kb警告
+      chunkSizeWarningLimit: 4000, // 消除打包大小超过500kb警告
       minify: "terser", // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
       terserOptions: {
         compress: {