Prechádzať zdrojové kódy

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dev

lucw 8 mesiacov pred
rodič
commit
390e147619

+ 9 - 1
src/api/system/organization/index.js

@@ -103,6 +103,15 @@ export async function saveOrUpdateUser(params) {
   return Promise.reject(new Error(res.data.message));
 }
 
+//绑定关键工序
+export async function userBandingOperation(params) {
+  const res = await request.post('/main/user/batchSaveCriticalTaskIds', params);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 /**
  * 删除人员
  * @param params 人员信息
@@ -127,7 +136,6 @@ export async function checkExistence(jobNumber) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 /**
  * 解除绑定用户账号
  * @param id 人员id

+ 67 - 2
src/views/factoryModel/station/components/ProduceDialogAll.vue

@@ -58,6 +58,9 @@
       row-key="id"
       :selection.sync="selection"
     >
+      <template v-slot:type="{ row }">
+        {{ typeLabel(row.type) }}
+      </template>
     </ele-pro-table>
 
     <div slot="footer">
@@ -124,18 +127,59 @@
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
+          },
+          {
+            prop: 'type',
+            slot: 'type',
+            label: '工序类型',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
           }
         ],
-        workCenterList: []
+        workCenterList: [],
+        typeList: [
+          {
+            value: 99,
+            label: '关键工序'
+          },
+          {
+            value: 1,
+            label: '普通工序'
+          },
+          // {
+          //   value: 2,
+          //   label: '抽样质检'
+          // },
+
+          {
+            value: 3,
+            label: '抽样质检'
+          },
+          {
+            value: 4,
+            label: '包装工序'
+          },
+          {
+            value: 6,
+            label: '质检工序'
+          },
+          {
+            value: 7,
+            label: '生产准备'
+          }
+        ],
+        forData: {}
       };
     },
     methods: {
-      open() {
+      open(data) {
         this.visible = true;
         this.getListWorkCenter();
         this.$nextTick(() => {
           this.$refs.table.reload();
         });
+        this.forData = data;
       },
       /* 表格数据源 */
       async datasource({ page, limit, where, order }) {
@@ -155,6 +199,21 @@
         if (!this.selection.length) {
           return this.$message.warning('请选择工序');
         }
+
+        const { keyEquipment, criticalEquipment } = this.forData.extInfo;
+
+        const hasInvalidSelection = this.selection.some((item) => {
+          return item.type == 99 && keyEquipment != 1 && criticalEquipment != 1;
+        });
+
+        console.log(hasInvalidSelection, 'hasInvalidSelection');
+
+        if (hasInvalidSelection) {
+          return this.$message.warning(
+            '该设备不是关键或关重设备,不能绑定关键工序!'
+          );
+        }
+
         this.$emit('changeProduct', this.selection);
         this.cancel();
       },
@@ -171,6 +230,12 @@
         await work.list({ pageNum: 1, size: -1 }).then((res) => {
           this.workCenterList = res.list;
         });
+      },
+      typeLabel(type) {
+        return (
+          this.typeList.find((m) => m.value == type) &&
+          this.typeList.find((m) => m.value == type).label
+        );
       }
     }
   };

+ 28 - 16
src/views/factoryModel/station/components/edit.vue

@@ -53,6 +53,8 @@
                   @click.native="
                     form.extInfo.assetName = null;
                     form.extInfo.assetCode = null;
+                    form.extInfo.criticalEquipment = '';
+                    form.extInfo.keyEquipment = '';
                   "
                 />
               </el-select>
@@ -84,11 +86,7 @@
           </el-col>
 
           <el-col :span="8">
-            <el-form-item
-              label="班组:"
-              prop="extInfo.teamId"
-              v-if="form.extInfo.type == 3"
-            >
+            <el-form-item label="班组:" prop="extInfo.teamId">
               <el-select
                 style="width: 100%"
                 v-model="form.extInfo.teamId"
@@ -106,11 +104,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item
-              label="人员:"
-              prop="extInfo.teamId"
-              v-if="form.extInfo.type == 3"
-            >
+            <el-form-item label="人员:" prop="extInfo.teamId">
               <el-select
                 style="width: 100%"
                 v-model="form.extInfo.userIds"
@@ -292,6 +286,20 @@
               </el-select>
             </el-form-item>
           </el-col>
+
+          <el-col :span="8" v-if="form.extInfo.type == 1">
+            <el-form-item label="关键设备:" prop="criticalEquipment">
+              <el-tag v-if="form.extInfo.criticalEquipment == '1'">是</el-tag>
+              <el-tag v-if="form.extInfo.criticalEquipment == '2'">否</el-tag>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8" v-if="form.extInfo.type == 1">
+            <el-form-item label="关重设备:" prop="keyEquipment">
+              <el-tag v-if="form.extInfo.keyEquipment == '1'">是</el-tag>
+              <el-tag v-if="form.extInfo.keyEquipment == '2'">否</el-tag>
+            </el-form-item>
+          </el-col>
           <!-- <el-col :span="14">
             <el-form-item label="节拍时间:" prop="extInfo.meterTime">
               <div class="workMeter-warp">
@@ -350,6 +358,7 @@
             <stationMeter
               ref="stationMeter"
               :factoryWorkstationId="form.id"
+              :formData="form"
             ></stationMeter>
           </el-col>
         </el-row>
@@ -436,7 +445,10 @@
             workCenterId: null, //所属工作中心
             // produceId: null, //可执行工序
             type: null,
-            teamId: null
+            teamId: null,
+            userIds: [],
+            criticalEquipment: '',
+            keyEquipment: ''
           },
           id: '',
           leaderId: '', // 负责人
@@ -582,13 +594,9 @@
         console.log(e);
         let that = this;
         listUserByIds([e]).then((res) => {
-          console.log(res, '5263', that.userList);
           that.userList = res;
-          // this.$set(this, 'userList', res);
         });
-        // listUserByIds
-        // userList
-        // console.log(this.userList);
+        that.form.extInfo.userIds = [];
       },
 
       // 选择可执行工序
@@ -609,6 +617,10 @@
       },
 
       determineChoose(title, row) {
+        const equipmentLabel = row.equipmentLabelJson[0];
+        this.form.extInfo.criticalEquipment = equipmentLabel.GJSB;
+        this.form.extInfo.keyEquipment = equipmentLabel.GZSB;
+
         if (title == '选择设备') {
           this.form.extInfo.assetCode = row.code;
           this.form.extInfo.assetName = row.name;

+ 5 - 1
src/views/factoryModel/station/components/stationMeter.vue

@@ -101,6 +101,10 @@
       factoryWorkstationId: {
         type: String,
         default: ''
+      },
+      formData: {
+        type: Object,
+        default: () => {}
       }
     },
     data() {
@@ -188,7 +192,7 @@
     methods: {
       // 选择可执行工序
       handleProduce() {
-        this.$refs.produceRef.open();
+        this.$refs.produceRef.open(this.formData);
       },
       handParent(data, index) {
         this.currentIndex = index;

+ 17 - 1
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -236,6 +236,7 @@
           <term
             :qualityParam="qualityParam"
             :isView="isView"
+            :isQualityInspection="false"
             ref="qualityParamRef"
           ></term>
         </el-tab-pane>
@@ -797,6 +798,13 @@
             ref="userSettingMatterProcessRef"
           ></userSettingMatterProcess>
         </el-tab-pane>
+        <el-tab-pane label="首件两检" name="首件两检">
+          <term
+            :qualityParam="firstArticleDualInspectionParam"
+            :isView="isView"
+            ref="firstArticleDualInspectionParamRef"
+          ></term>
+        </el-tab-pane>
       </el-tabs>
     </el-card>
     <!-- 选择工艺参数 -->
@@ -1239,6 +1247,7 @@
         },
 
         qualityParam: [],
+        firstArticleDualInspectionParam:[],
         qualityPointParam: [],
 
         fileShow: false,
@@ -1602,7 +1611,10 @@
         } else if (this.activeName === '质检项参数') {
           this.qualityParam =
             this.tableData.taskParam[this.currentIndex].qualityParam || [];
-        } else if (this.activeName === '生产节拍') {
+        }else if (this.activeName === '首件两检') {
+          this.firstArticleDualInspectionParam =
+            this.tableData.taskParam[this.currentIndex].firstArticleDualInspectionParam || [];
+        }  else if (this.activeName === '生产节拍') {
           this.beatParam =
             this.tableData.taskParam[this.currentIndex].beatParam ||
             this.beatParam;
@@ -1876,6 +1888,10 @@
                 this.tableData.taskParam[this.currentIndex].qualityParam =
                   this.$refs.qualityParamRef.getDate() || [];
               }
+              if (this.$refs.firstArticleDualInspectionParamRef) {
+                this.tableData.taskParam[this.currentIndex].firstArticleDualInspectionParam =
+                  this.$refs.firstArticleDualInspectionParamRef.getDate() || [];
+              }
               //工艺文件只传id
               let fileParamArr = JSON.parse(
                 JSON.stringify(this.tableData.taskParam)

+ 5 - 1
src/views/material/BOMmanage/qualityTesting/term.vue

@@ -13,7 +13,7 @@
       @fullscreen-change="fullscreenChange"
     >
       <template v-slot:toolbar>
-        <el-button @click="handAdd" size="mini" type="primary" v-if="!isView"
+        <el-button @click="handAdd" size="mini" type="primary" v-if="!isView&&isQualityInspection" 
           >新增质检项</el-button
         >
         <el-button @click="handSelect" size="mini" type="primary" v-if="!isView"
@@ -152,6 +152,10 @@
       isView: {
         type: Boolean,
         default: false
+      },
+      isQualityInspection: {
+        type: Boolean,
+        default: true
       }
     },
 

+ 285 - 0
src/views/system/organization/components/criticalProcess.vue

@@ -0,0 +1,285 @@
+<template>
+  <ele-modal
+    width="70vw"
+    :visible.sync="visible"
+    v-if="visible"
+    :close-on-click-modal="false"
+    append-to-body
+    custom-class="ele-dialog-form"
+    title="选择工序"
+    :maxable="true"
+  >
+    <el-form label-width="120px">
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="工序编码" prop="code">
+            <el-input v-model="searchData.code"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="工序名称" prop="name">
+            <el-input v-model="searchData.name"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+          <el-form-item label="工作中心" prop="name">
+            <el-select
+              v-model="searchData.workCenterId"
+              placeholder="请选择"
+              filterable
+              clearable
+            >
+              <el-option
+                v-for="item in workCenterList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="6">
+          <div class="ele-form-actions">
+            <el-button type="primary" @click="search">搜索</el-button>
+            <el-button @click="reset">重置</el-button>
+          </div>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <ele-pro-table
+      :columns="columns"
+      :datasource="datasource"
+      ref="table"
+      height="45vh"
+      :initLoad="false"
+      row-key="id"
+      :selection.sync="selection"
+      highlight-current-row
+      :row-click-checked="true"
+      :row-click-checked-intelligent="false"
+      @update:selection="handleSelectionChange"
+    >
+      <template v-slot:type="{ row }">
+        {{ typeLabel(row.type) }}
+      </template>
+    </ele-pro-table>
+
+    <div slot="footer">
+      <el-button type="primary" @click="confirm">确定</el-button>
+      <el-button @click="cancel">返回</el-button>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import producetask from '@/api/technology/production';
+  import work from '@/api/technology/work';
+  import { userBandingOperation } from '@/api/system/organization';
+  export default {
+    props: {
+      disabledListId: {
+        type: Array,
+        default: () => []
+      }
+    },
+    data() {
+      return {
+        visible: false,
+        selection: [],
+        searchData: {
+          code: '',
+          name: '',
+          workCenterId: '',
+          type: 99
+        },
+        columns: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            fixed: 'left',
+            reserveSelection: true
+          },
+          {
+            prop: 'code',
+            label: '工序编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'name',
+            label: '工序名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            align: 'center',
+            prop: 'controlName',
+            label: '工序控制码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'workCenterName',
+            label: '所属工作中心',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'type',
+            slot: 'type',
+            label: '工序类型',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          }
+        ],
+        workCenterList: [],
+        typeList: [
+          {
+            value: 99,
+            label: '关键工序'
+          },
+          {
+            value: 1,
+            label: '普通工序'
+          },
+          // {
+          //   value: 2,
+          //   label: '抽样质检'
+          // },
+
+          {
+            value: 3,
+            label: '抽样质检'
+          },
+          {
+            value: 4,
+            label: '包装工序'
+          },
+          {
+            value: 6,
+            label: '质检工序'
+          },
+          {
+            value: 7,
+            label: '生产准备'
+          }
+        ],
+        userIds: [],
+        type: '',
+        allSelection: []
+      };
+    },
+    methods: {
+      open(list, type) {
+        this.visible = true;
+        this.getListWorkCenter();
+        this.$nextTick(() => {
+          this.$refs.table.reload();
+        });
+        this.type = type;
+        if (this.type == 'batch') {
+          this.userIds = list.map((item) => {
+            return item.id;
+          });
+        } else {
+          this.allSelection = list || [];
+          console.log(this.allSelection);
+          this.$nextTick(() => {
+            this.allSelection.forEach((item) => {
+              this.$refs.table.toggleRowSelection(item, true);
+            });
+          });
+        }
+      },
+      /* 表格数据源 */
+      async datasource({ page, limit, where, order }) {
+        const res = await producetask.list({
+          ...where,
+          ...this.searchData,
+          pageNum: page,
+          size: limit
+        });
+        return res;
+      },
+      cancel() {
+        this.searchData = { type: 99 };
+        this.visible = false;
+      },
+
+      handleSelectionChange(data) {
+        this.allSelection = data;
+      },
+
+      confirm() {
+        if (this.allSelection.length == 0) {
+          return this.$message.warning('请选择工序');
+        }
+
+        if (this.type == 'batch') {
+          const taskIds = this.allSelection.map((item) => {
+            return item.id;
+          });
+
+          const loading = this.$loading({
+            lock: true,
+            text: 'Loading',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
+
+          userBandingOperation({
+            userIds: this.userIds,
+            taskIds
+          })
+            .then(() => {
+              loading.close();
+              this.$message({
+                message: '绑定成功',
+                type: 'success'
+              });
+              this.$emit('chooseProcess');
+              this.cancel();
+            })
+            .catch(() => {
+              loading.close();
+            });
+        } else {
+          this.$emit('chooseProcess', this.allSelection);
+          this.cancel();
+        }
+      },
+
+      search() {
+        this.$refs.table.reload();
+      },
+      reset() {
+        this.searchData = {
+          type: 99
+        };
+        this.$refs.table.reload();
+      },
+
+      async getListWorkCenter() {
+        await work.list({ pageNum: 1, size: -1 }).then((res) => {
+          this.workCenterList = res.list;
+        });
+      },
+      typeLabel(type) {
+        return (
+          this.typeList.find((m) => m.value == type) &&
+          this.typeList.find((m) => m.value == type).label
+        );
+      }
+    }
+  };
+</script>

+ 2 - 2
src/views/system/organization/components/org-edit.vue

@@ -248,8 +248,8 @@
     mainProduct: '',
     remark: '',
     fax: '',
-    businessRegistrationNo:'',
-    contact:''
+    businessRegistrationNo: '',
+    contact: ''
   };
   import {
     addOrganization,

+ 97 - 3
src/views/system/organization/components/org-user-edit.vue

@@ -156,7 +156,11 @@
             </el-switch>
           </el-form-item>
           <el-form-item label="审批签名:" prop="signature">
-            <WithView :assetName="''" v-model="form.signature" style="max-height:370px"></WithView>
+            <WithView
+              :assetName="''"
+              v-model="form.signature"
+              style="max-height: 370px"
+            ></WithView>
           </el-form-item>
         </el-col>
         <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
@@ -247,6 +251,36 @@
               placeholder="户籍地址"
             />
           </el-form-item>
+
+          <!-- <el-form-item label="关键工序:" prop="censusAddress">
+            <el-input
+              clearable
+              :maxlength="100"
+              v-model="form.censusAddress"
+              placeholder="请选择关键工序"
+              @click.native="chooseOperation"
+              readonly
+            />
+          </el-form-item> -->
+          <el-form-item label="关键工序:" prop="operations">
+            <div class="multi-select-input" @click="chooseOperation">
+              <div class="tag-box">
+                <el-tag
+                  v-for="(item, index) in form.criticalTaskList"
+                  :key="item.taskId"
+                  closable
+                  @close="removeOperation(index)"
+                >
+                  {{ item.taskName }}
+                </el-tag>
+
+                <!-- 占位符 -->
+                <span v-if="!form.criticalTaskList.length" class="placeholder">
+                  请选择关键工序
+                </span>
+              </div>
+            </div>
+          </el-form-item>
         </el-col>
       </el-row>
       <el-tabs v-model="activeName">
@@ -1113,6 +1147,11 @@
       @success="chooseAptitude"
       :disabledIds="form.professions?.map((item) => item.id)"
     ></aptitudeDialog>
+
+    <critical-process
+      ref="criticalProcessRef"
+      @chooseProcess="chooseProcess"
+    ></critical-process>
   </ele-modal>
 </template>
 
@@ -1133,6 +1172,8 @@
   import dictMixins from '@/mixins/dictMixins';
   import aptitudeDialog from '@/views/factoryModel/jobManagement/components/aptitudeDialog.vue';
   import { del } from 'vue';
+  import criticalProcess from './criticalProcess.vue';
+
   // D:\中赢\kd-aiot-frontend\src\views\system\user
 
   export default {
@@ -1144,7 +1185,8 @@
       RegionsSelect,
       WithView,
       FileUpload,
-      aptitudeDialog
+      aptitudeDialog,
+      criticalProcess
     },
     props: {
       // 弹窗是否打开
@@ -1185,7 +1227,8 @@
         signature: {},
         postName: '',
         professions: [],
-        censusAddress:''
+        censusAddress: '',
+        criticalTaskList: []
       };
       return {
         defaultForm,
@@ -1973,6 +2016,31 @@
         this.factoryList = list || [];
       },
 
+      // chooseOperation() {
+      //   this.$refs.criticalProcessRef.open();
+      // },
+
+      chooseProcess(listData) {
+        this.form.criticalTaskList = listData.map((item) => ({
+          taskId: item.id,
+          taskName: item.name
+        }));
+      },
+
+      removeOperation(index) {
+        this.form.criticalTaskList.splice(index, 1);
+      },
+
+      chooseOperation() {
+        const list = this.form.criticalTaskList.map((item) => ({
+          id: item.taskId,
+          taskId: item.taskId,
+          taskName: item.taskName,
+          name: item.taskName
+        }));
+        this.$refs.criticalProcessRef.open(list, 'single');
+      },
+
       /* 保存编辑 */
       save() {
         this.$refs.form.validate((valid) => {
@@ -2111,4 +2179,30 @@
   ::v-deep .el-tabs__header {
     margin-bottom: 10px;
   }
+
+  .multi-select-input {
+    border: 1px solid #dcdfe6;
+    border-radius: 4px;
+    padding: 3px 5px;
+    min-height: 36px;
+    display: flex;
+    align-items: center;
+    flex-wrap: wrap;
+    cursor: pointer;
+  }
+
+  .multi-select-input:hover {
+    border-color: #409eff;
+  }
+
+  .tag-box {
+    display: flex;
+    align-items: center;
+    flex-wrap: wrap;
+  }
+
+  .placeholder {
+    color: #c0c4cc;
+    padding-left: 5px;
+  }
 </style>

+ 76 - 35
src/views/system/organization/components/org-user-list.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
     <!-- 数据表格 -->
+    <org-user-search @search="reload" ref="searchRef"></org-user-search>
     <ele-pro-table
       ref="table"
       :columns="columns"
@@ -9,40 +10,49 @@
       full-height="calc(100vh - 116px)"
       tool-class="ele-toolbar-form"
       :page-size="pageSize"
+      row-key="id"
+      :selection.sync="selection"
       @columns-change="handleColumnChange"
       :cache-key="cacheKeyUrl"
+      @update:selection="handleSelectionChange"
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
-        <org-user-search @search="reload" ref="searchRef">
-          <el-button
-            size="small"
-            type="primary"
-            icon="el-icon-plus"
-            class="ele-btn-icon"
-            @click="openEdit()"
-            v-if="$hasPermission('main:user:save')"
-          >
-            添加
-          </el-button>
-          <el-button
-            type="primary"
-            size="mini"
-            icon="el-icon-upload2"
-            plain
-            @click="uploadFile"
-            v-if="$hasPermission('main:user:save')"
-            >导入</el-button
-          >
-          <el-button
-            type="primary"
-            size="mini"
-            icon="el-icon-download"
-            plain
-            @click="exportUsers"
-            >导出</el-button
-          >
-        </org-user-search>
+        <el-button
+          size="small"
+          type="primary"
+          icon="el-icon-plus"
+          class="ele-btn-icon"
+          @click="openEdit()"
+          v-if="$hasPermission('main:user:save')"
+        >
+          添加
+        </el-button>
+        <el-button
+          type="primary"
+          size="mini"
+          icon="el-icon-upload2"
+          plain
+          @click="uploadFile"
+          v-if="$hasPermission('main:user:save')"
+          >导入</el-button
+        >
+        <el-button
+          type="primary"
+          size="mini"
+          icon="el-icon-download"
+          plain
+          @click="exportUsers"
+          >导出</el-button
+        >
+        <el-button
+          type="success"
+          size="mini"
+          icon="el-icon-guide"
+          plain
+          @click="bindingProcess"
+          >绑定关键工序</el-button
+        >
       </template>
       <!-- 角色列 -->
       <template v-slot:roles="{ row }">
@@ -157,7 +167,7 @@
       :close-on-click-modal="false"
       custom-class="ele-dialog-form"
       :maxable="true"
-        @close="userShow = false"
+      @close="userShow = false"
     >
       <UserSearch @search="reload1"></UserSearch>
       <!-- 数据表格 -->
@@ -175,6 +185,11 @@
         <el-button type="primary" @click="getUser"> 确认 </el-button>
       </template>
     </ele-modal>
+
+    <critical-process
+      ref="criticalProcessRef"
+      @chooseProcess="chooseProcess"
+    ></critical-process>
   </div>
 </template>
 
@@ -194,6 +209,7 @@
   import { pageUsers, exportUsers } from '@/api/system/user';
   import dictMixins from '@/mixins/dictMixins';
   import { getFactoryarea } from '@/api/factoryModel';
+  import criticalProcess from './criticalProcess.vue';
 
   export default {
     mixins: [tabMixins, dictMixins],
@@ -202,7 +218,8 @@
       OrgUserSearch,
       OrgUserEdit,
       addUsers,
-      UserSearch
+      UserSearch,
+      criticalProcess
     },
     props: {
       // 机构id
@@ -226,10 +243,17 @@
       columns() {
         let columnsVersion = this.columnsVersion;
         return [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
           {
             columnKey: 'index',
+            label: '序号',
             type: 'index',
-            width: 45,
+            width: 55,
             align: 'center',
             showOverflowTooltip: true,
             fixed: 'left'
@@ -339,7 +363,7 @@
             width: 200,
             align: 'left',
             resizable: false,
-            fixed:'right',
+            fixed: 'right',
             slot: 'action',
             showOverflowTooltip: true
           }
@@ -432,7 +456,8 @@
           { value: 6, label: '离职' }
         ],
         pageSize: this.$store.state.tablePageSize,
-        cacheKeyUrl: 'ef00833a-system-organization'
+        cacheKeyUrl: 'ef00833a-system-organization',
+        selection: []
       };
     },
     methods: {
@@ -470,7 +495,7 @@
           size: limit,
           groupId: this.organizationId,
           isQueryLZ: 1,
-          affiDeptId:1
+          affiDeptId: 1
         });
       },
       /* 表格数据源 */
@@ -507,6 +532,22 @@
         this.$refs.userEditRef.setDisabled(disabled);
       },
 
+      bindingProcess() {
+        if (this.selection.length == 0) {
+          return this.$message.warning('请至少选择一名需要绑定的人员');
+        }
+
+        this.$refs.criticalProcessRef.open(this.selection, 'batch');
+      },
+
+      chooseProcess() {
+        this.reload();
+      },
+
+      handleSelectionChange(data) {
+        this.selection = data;
+      },
+
       // 解除绑定
       toUnBind(row) {
         const loading = this.$loading({ lock: true });

+ 103 - 107
src/views/system/organization/index.vue

@@ -28,7 +28,6 @@
                 :disabled="!current"
                 @click="openEdit(current)"
                 v-if="$hasPermission('main:group:update')"
-
               >
                 修改
               </el-button>
@@ -40,7 +39,6 @@
                 :disabled="!current"
                 @click="remove"
                 v-if="$hasPermission('main:group:delete')"
-
               >
                 删除
               </el-button>
@@ -77,125 +75,123 @@
       :organization-list="data"
       @done="query"
     />
-   
   </div>
 </template>
 
 <script>
-import OrgUserList from './components/org-user-list.vue';
-import OrgEdit from './components/org-edit.vue';
-import {
-  listOrganizations,
-  removeOrganization
-} from '@/api/system/organization';
+  import OrgUserList from './components/org-user-list.vue';
+  import OrgEdit from './components/org-edit.vue';
+  import {
+    listOrganizations,
+    removeOrganization
+  } from '@/api/system/organization';
 
-export default {
-  name: 'SystemOrganization',
-  components: {OrgUserList,OrgEdit},
-  data() {
-    return {
-      // 加载状态
-      loading: true,
-      // 列表数据
-      data: [],
-      institutionList: [],
-      // 选中数据
-      current: null,
-      // 是否显示表单弹窗
-      showEdit: false,
-      // 编辑回显数据
-      editData: null,
-      // 上级id
-      parentId: null
-    };
-  },
-  created() {
-    this.query();
-  },
-  methods: {
-    /* 查询 */
-    query() {
-      this.loading = true;
-      listOrganizations()
-        .then((list) => {
-          let _list = list.filter((i) => i.name != '超级管理员')
-          // let _institutionList = _list.filter((i) => [10, 20].includes(i.type));
-          console.log(this.institutionList);
-          this.loading = false;
-          this.data = this.$util.toTreeData({
-            data: _list,
-            idField: 'id',
-            parentIdField: 'parentId'
-          });
-          this.institutionList = this.$util.toTreeData({
-            data: _list,
-            idField: 'id',
-            parentIdField: 'parentId'
-          });
-          this.$nextTick(() => {
-            this.onNodeClick(this.data[0]);
-          });
-        })
-        .catch((e) => {
-          this.loading = false;
-          // this.$message.error(e.message);
-        });
-    },
-    /* 选择数据 */
-    onNodeClick(row) {
-      if (row) {
-        this.current = row;
-        this.parentId = row.id;
-        this.$refs.tree.setCurrentKey(row.id);
-      } else {
-        this.current = null;
-        this.parentId = null;
-      }
+  export default {
+    name: 'SystemOrganization',
+    components: { OrgUserList, OrgEdit },
+    data() {
+      return {
+        // 加载状态
+        loading: true,
+        // 列表数据
+        data: [],
+        institutionList: [],
+        // 选中数据
+        current: null,
+        // 是否显示表单弹窗
+        showEdit: false,
+        // 编辑回显数据
+        editData: null,
+        // 上级id
+        parentId: null
+      };
     },
-    /* 显示编辑 */
-    openEdit(item) {
-      this.editData = item;
-      this.showEdit = true;
+    created() {
+      this.query();
     },
-    /* 删除 */
-    remove() {
-      this.$confirm('确定要删除选中的机构吗?', '提示', {
-        type: 'warning'
-      })
-        .then(() => {
-          const loading = this.$loading({lock: true});
-          removeOrganization([this.current.id])
-            .then((msg) => {
-              loading.close();
-              this.$message.success(msg);
-              this.query();
-            })
-            .catch((e) => {
-              loading.close();
-              // this.$message.error(e.message);
+    methods: {
+      /* 查询 */
+      query() {
+        this.loading = true;
+        listOrganizations()
+          .then((list) => {
+            let _list = list.filter((i) => i.name != '超级管理员');
+            // let _institutionList = _list.filter((i) => [10, 20].includes(i.type));
+            console.log(this.institutionList);
+            this.loading = false;
+            this.data = this.$util.toTreeData({
+              data: _list,
+              idField: 'id',
+              parentIdField: 'parentId'
             });
+            this.institutionList = this.$util.toTreeData({
+              data: _list,
+              idField: 'id',
+              parentIdField: 'parentId'
+            });
+            this.$nextTick(() => {
+              this.onNodeClick(this.data[0]);
+            });
+          })
+          .catch((e) => {
+            this.loading = false;
+            // this.$message.error(e.message);
+          });
+      },
+      /* 选择数据 */
+      onNodeClick(row) {
+        if (row) {
+          this.current = row;
+          this.parentId = row.id;
+          this.$refs.tree.setCurrentKey(row.id);
+        } else {
+          this.current = null;
+          this.parentId = null;
+        }
+      },
+      /* 显示编辑 */
+      openEdit(item) {
+        this.editData = item;
+        this.showEdit = true;
+      },
+      /* 删除 */
+      remove() {
+        this.$confirm('确定要删除选中的机构吗?', '提示', {
+          type: 'warning'
         })
-        .catch(() => {
-        });
+          .then(() => {
+            const loading = this.$loading({ lock: true });
+            removeOrganization([this.current.id])
+              .then((msg) => {
+                loading.close();
+                this.$message.success(msg);
+                this.query();
+              })
+              .catch((e) => {
+                loading.close();
+                // this.$message.error(e.message);
+              });
+          })
+          .catch(() => {});
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.sys-organization-list {
-  height: calc(100vh - 264px);
-  box-sizing: border-box;
-  border-width: 1px;
-  border-style: solid;
-  overflow: auto;
-}
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
 
-.sys-organization-list :deep(.el-tree-node__content) {
-  height: 30px;
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 30px;
 
-  & > .el-tree-node__expand-icon {
-    margin-left: 10px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
   }
-}
 </style>

+ 28 - 0
src/views/technology/production/index.vue

@@ -67,6 +67,22 @@
           >
             生产前生产后配置
           </el-button>
+          <!-- <el-button
+            size="small"
+            type="primary"
+            class="ele-btn-icon"
+            @click="bingdingUser"
+          >
+            绑定人员
+          </el-button>
+          <el-button
+            size="small"
+            type="primary"
+            class="ele-btn-icon"
+            @click="bingdingWork"
+          >
+            绑定任务
+          </el-button> -->
         </template>
 
         <template v-slot:name="{ row }">
@@ -239,6 +255,7 @@
           },
 
           {
+            prop: 'type',
             slot: 'type',
             label: '工序类型',
             showOverflowTooltip: true,
@@ -495,6 +512,17 @@
         });
       },
 
+      bingdingUser() {
+        if (this.selection.length == 0) {
+          return this.$message.warning('请至少选中一条数据!');
+        }
+      },
+
+      bingdingWork() {
+        if (this.selection.length == 0) {
+          return this.$message.warning('请至少选中一条数据!');
+        }
+      },
       /* 删除 */
       remove(row) {
         // 规则正在执行中,无法删除

+ 3 - 2
vue.config.js

@@ -35,6 +35,8 @@ module.exports = {
         // target: 'http://192.168.1.105:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.176:18086',
+        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.125:18086',
@@ -42,9 +44,8 @@ module.exports = {
         // target: 'http://192.168.1.251:18087',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.251:18086',
-
         // target: 'http://192.168.1.11:18086', // 开发
-        target: 'http://192.168.1.116:18086', // 赵沙金
+        // target: 'http://192.168.1.116:18086', // 赵沙金
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {