Kaynağa Gözat

工序管理-配置事项功能添加参数

lucw 9 ay önce
ebeveyn
işleme
0d657c2333

+ 4 - 4
src/api/producetaskrecordrules/index.js

@@ -1,19 +1,19 @@
 import request from '@/utils/request';
 
-// 分页查询 /main/producetaskrecordrules/page
+// 分页查询 /main/producetaskconfig/page
 // 消息分页
 export async function produceTaskRecordRules(data) {
-  const res = await request.post(`/main/producetaskrecordrules/page`, data);
+  const res = await request.post(`/main/producetaskconfig/page`, data);
   if (res.data.code == 0) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
 
-// 批量保存 /main/producetaskrecordrules/batchSave
+// 批量保存 /main/producetaskconfig/batchSave
 export async function produceTaskRecordRulesBatchSave(data) {
   const res = await request.post(
-    `/main/producetaskrecordrules/batchSave`,
+    `/main/producetaskconfig/batchSave`,
     data
   );
   if (res.data.code == 0) {

+ 12 - 6
src/components/common/seekPage.vue

@@ -5,7 +5,7 @@
         <el-form-item
           :label="item.label"
           :label-width="item.labelWidth + 'px'"
-          v-if="i <= 2"
+          v-if="i <= maxLength - 1"
         >
           <!-- input 输入 -->
           <div>
@@ -72,8 +72,9 @@
           trigger="click"
           :hide-on-click="false"
           v-model="dropdownVisible"
+          v-if="seekList.length > maxLength"
         >
-          <div v-if="seekList.length > 3">
+          <div>
             <span class="el-dropdown-link">
               更多选项<i class="el-icon-arrow-down el-icon--right"></i>
             </span>
@@ -187,6 +188,11 @@
 
   export default {
     props: {
+      // 默认显示多少个搜索项
+      maxLength: {
+        type: Number,
+        default: 3
+      },
       seekList: {
         type: Array,
         default: () => []
@@ -199,11 +205,11 @@
       seekList: {
         handler(val) {
           this.$nextTick(() => {
-            if (Array.isArray(val) && val.length <= 3) {
+            if (Array.isArray(val) && val.length <= this.maxLength) {
               this.seekListRow = val;
-            } else if (Array.isArray(val) && val.length >= 3) {
-              this.seekListRow = val.slice(0, 3);
-              this.deboListRow = val.slice(3);
+            } else if (Array.isArray(val) && val.length >= this.maxLength) {
+              this.seekListRow = val.slice(0, this.maxLength);
+              this.deboListRow = val.slice(this.maxLength);
             }
           });
         },

+ 1 - 1
src/components/selectReleaseRules/search.vue

@@ -1,6 +1,6 @@
 <!-- 搜索表单 -->
 <template>
-  <seekPage :seekList="seekList" :formLength="4" @search="search"></seekPage>
+  <seekPage :seekList="seekList" @search="search" :maxLength="4"></seekPage>
 </template>
 
 <script>

+ 12 - 2
src/views/technology/production/components/user-setting-matter.vue

@@ -254,11 +254,21 @@
         console.log('this.matterList', this.matterList);
         try {
           this.butLoading = true;
+
+          const addPos = this.addPOs.map((item) => {
+            item.sortNum = this.matterList.findIndex((i) => i.id === item.id);
+            return item;
+          });
+          const updatePos = this.updatePOs.map((item) => {
+            item.sortNum = this.matterList.findIndex((i) => i.id === item.id);
+            return item;
+          });
+
           await produceTaskRecordRulesBatchSave({
-            addPOs: this.addPOs,
+            addPOs: addPos,
             deletedIds: this.deletedIds,
             produceTaskId: this.currentRow.id,
-            updatePOs: this.updatePOs
+            updatePOs: updatePos
           });
           this.$message.success('保存成功');
           this.handleClose();

+ 2 - 2
vue.config.js

@@ -38,12 +38,12 @@ module.exports = {
 
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.125:18086',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18186',
 
         // target: 'http://192.168.1.251:18087',
 
-        // target: 'http://192.168.1.116:18086',
+        target: 'http://192.168.1.116:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {