浏览代码

作业票人员选择

pm 1 年之前
父节点
当前提交
319e1b188e

+ 110 - 86
src/components/separationPoint/index.vue

@@ -5,6 +5,7 @@
 <script>
 import Konva from "konva";
 import { selectIsIsolationPointById } from "@/api/mes/spm/segregationPoint";
+import {  mapGetters } from 'vuex'
 
 export default {
   name: "KonvaExample",
@@ -30,8 +31,16 @@ export default {
   mounted() {
     this.initKonva();
     console.log(this.points, "points");
+    console.log(this.getSelectSopPoints, 'selectSopPoints in another page');
+
+  },
+  computed: {
+    ...mapGetters('sopSelectPoints', [
+      'getSelectSopPoints'
+    ])
   },
   methods: {
+
     initKonva() {
       // 创建舞台
       this.stage = new Konva.Stage({
@@ -111,29 +120,20 @@ export default {
 
       const positions = JSON.parse(this.points.map);
       console.log(positions, "this.points");
-      // const positions = [
-      //   { row: 2, col: 9 },
-      //   { row: 2, col: 11 },
-      //   { row: 2, col: 13 },
-      //   { row: 4, col: 9 },
-      //   { row: 4, col: 11 },
-      //   { row: 4, col: 13 },
-      //   { row: 6, col: 9 },
-      //   { row: 6, col: 11 },
-      //   { row: 6, col: 13 },
-      //   { row: 8, col: 9 },
-      //   { row: 8, col: 11 },
-      //   { row: 8, col: 13 },
-      //   { row: 10, col: 9 },
-      //   { row: 10, col: 11 },
-      //   { row: 10, col: 13 },
-      //   { row: 12, col: 9 },
-      //   { row: 12, col: 11 },
-      //   { row: 12, col: 13 },
-      // ];
-      // const positionsJson = JSON.stringify(positions);
-
-      // console.log(positionsJson,'json');
+
+      // 检查 this.getSelectSopPoints 是否有内容
+      const isLocked = this.getSelectSopPoints.length > 0;
+
+      // 添加或移除全局点击事件监听器
+      if (isLocked) {
+        this.layer.on('click', (e) => {
+          e.cancelBubble = true; // 阻止事件冒泡
+          e.stopPropagation(); // 阻止事件传播
+        });
+      } else {
+        this.layer.off('click'); // 移除全局点击事件监听器
+      }
+
       positions.forEach((pos, index) => {
         const x = pos.col * 50; // 每个单元格宽度为50
         const y = pos.row * 50; // 每个单元格高度为50
@@ -151,71 +151,69 @@ export default {
             draggable: false,
           });
 
-          knovaImage.on("click", () => {
-            // 切换选中状态,基于文本内容
-            this.selectedStates[labelText] = !this.selectedStates[labelText];
-
-            // 判断当前是否选中
-            if (this.selectedStates[labelText]) {
-              // 选中状态
-              // 显示红色矩形和文字,隐藏普通矩形和文字
-              this.rects[labelText].visible(false);
-              this.texts[labelText].visible(false);
-              this.redrects[labelText].visible(true);
-              this.redtexts[labelText].visible(true);
-
-              // 切换图片为选中状态的图片
-              const selectedImage = new Image();
-              selectedImage.src = require("@/assets/images/localSetSelect.jpg"); // 选中的图片路径
-              selectedImage.onload = () => {
-                knovaImage.image(selectedImage); // 更新图像
-                this.layer.draw(); // 更新图层
-              };
-
-              this.$nextTick(() => {
-                selectIsIsolationPointById(pos.pointId).then((res) => {
-                  console.log(res, "拿到的隔离点信息");
-                  //将选中的 labelText 推入数组
-                  this.selectedText.push({
-                    pointName: res.data.pointName,
-                    pointId: res.data.pointId,
-                    pointType: res.data.pointType,
-                    powerType: res.data.powerType,
-                  });
-                  // this.selectedText.push({
-                  //   label: labelText,
-                  //   value: pos.pointId,
-                  // });
+          if (!isLocked) {
+            knovaImage.on("click", () => {
+              // 切换选中状态,基于文本内容
+              this.selectedStates[labelText] = !this.selectedStates[labelText];
+
+              // 判断当前是否选中
+              if (this.selectedStates[labelText]) {
+                // 选中状态
+                // 显示红色矩形和文字,隐藏普通矩形和文字
+                this.rects[labelText].visible(false);
+                this.texts[labelText].visible(false);
+                this.redrects[labelText].visible(true);
+                this.redtexts[labelText].visible(true);
 
-                  this.$emit("selection-changed", this.selectedText);
+                // 切换图片为选中状态的图片
+                const selectedImage = new Image();
+                selectedImage.src = require("@/assets/images/localSetSelect.jpg"); // 选中的图片路径
+                selectedImage.onload = () => {
+                  knovaImage.image(selectedImage); // 更新图像
+                  this.layer.draw(); // 更新图层
+                };
+
+                this.$nextTick(() => {
+                  selectIsIsolationPointById(pos.pointId).then((res) => {
+                    console.log(res, "拿到的隔离点信息");
+                    // 将选中的 labelText 推入数组
+                    this.selectedText.push({
+                      pointName: res.data.pointName,
+                      pointId: res.data.pointId,
+                      pointType: res.data.pointType,
+                      powerType: res.data.powerType,
+                    });
+
+                    this.$emit("selection-changed", this.selectedText);
+                  });
                 });
-              });
-            } else {
-              // 取消选中状态
-              // 显示普通矩形和文字,隐藏红色矩形和文字
-              this.rects[labelText].visible(true);
-              this.texts[labelText].visible(true);
-              this.redrects[labelText].visible(false);
-              this.redtexts[labelText].visible(false);
-
-              // 切换图片为未选中状态的图片
-              const normalImage = new Image();
-              normalImage.src = imageSrc; // 未选中的默认图片路径
-              normalImage.onload = () => {
-                knovaImage.image(normalImage); // 更新图像
-                this.layer.draw(); // 更新图层
-              };
-              // 从选中数组中移除该项ha
-              this.selectedText = this.selectedText.filter(
-                (item) => item.pointName !== labelText
-              );
-            }
-            // 最后确保图层重新渲染
-            this.layer.draw();
-
-            // 传递选中的元素文本到父组件
-            this.$emit("selection-changed", this.selectedText);
-          });
+              } else {
+                // 取消选中状态
+                // 显示普通矩形和文字,隐藏红色矩形和文字
+                this.rects[labelText].visible(true);
+                this.texts[labelText].visible(true);
+                this.redrects[labelText].visible(false);
+                this.redtexts[labelText].visible(false);
+
+                // 切换图片为未选中状态的图片
+                const normalImage = new Image();
+                normalImage.src = imageSrc; // 未选中的默认图片路径
+                normalImage.onload = () => {
+                  knovaImage.image(normalImage); // 更新图像
+                  this.layer.draw(); // 更新图层
+                };
+                // 从选中数组中移除该项
+                this.selectedText = this.selectedText.filter(
+                  (item) => item.pointName !== labelText
+                );
+              }
+              // 最后确保图层重新渲染
+              this.layer.draw();
+
+              // 传递选中的元素文本到父组件
+              this.$emit("selection-changed", this.selectedText);
+            });
+          }
 
           this.layer.add(knovaImage);
 
@@ -273,6 +271,32 @@ export default {
           this.layer.add(redtext);
           this.redtexts[labelText] = redtext; // 用文字作为键存储
 
+          // 检查 this.getSelectSopPoints 是否包含当前点的 pointId
+          if (this.getSelectSopPoints.includes(pos.pointId.toString())) {
+            // 设置为选中状态
+            this.selectedStates[labelText] = true;
+            this.rects[labelText].visible(false);
+            this.texts[labelText].visible(false);
+            this.redrects[labelText].visible(true);
+            this.redtexts[labelText].visible(true);
+
+            // 切换图片为选中状态的图片
+            const selectedImage = new Image();
+            selectedImage.src = require("@/assets/images/localSetSelect.jpg"); // 选中的图片路径
+            selectedImage.onload = () => {
+              knovaImage.image(selectedImage); // 更新图像
+              this.layer.draw(); // 更新图层
+            };
+
+            // 将选中的 labelText 推入数组
+            this.selectedText.push({
+              pointName: labelText,
+              pointId: pos.pointId,
+              pointType: pos.pointType,
+              powerType: pos.powerType,
+            });
+          }
+
           this.layer.draw();
         };
       });

+ 5 - 1
src/components/separationPoint/workshop.vue

@@ -137,8 +137,10 @@ export default {
           const selectSopPoints = res.data.pointDetailVOList.map((item) => {
             return item.pointId;
           });
+
           // 调用 Vuex action 来存储 selectSopPoints
           this.setSelectSopPoints(selectSopPoints);
+          this.setPointTableData(res.data)
           console.log(selectSopPoints, "sop_selectePoints");
         });
       },
@@ -150,7 +152,9 @@ export default {
   },
 
   methods: {
-    ...mapActions(["setSelectSopPoints"]), //这里是为了调用 存储数据的方法
+    ...mapActions('sopSelectPoints', [
+      'setSelectSopPoints','setPointTableData'
+    ]),
     // 获取车间列表
     getworkshopList() {
       listAllWorkshop().then((response) => {

+ 18 - 8
src/store/modules/sopSelectPoints.js

@@ -1,26 +1,36 @@
+// store/modules/sopSelectPoints.js
 const state = {
-  selectSopPoints: []
+  selectSopPoints: [],
+  PointTableData:[]
 };
 
 const mutations = {
-  ADD_SELECTPOINT: (state, payload) => {
-    state.selectSopPoints = payload;
+  setSelectSopPoints(state, points) {
+    state.selectSopPoints = points;
+  },
+  setPointTableData(state, points){
+    state.PointTableData = points;
   }
 };
 
 const actions = {
-  setSelectSopPoints: ({ commit }, selectSopPoints) => {
-    commit('ADD_SELECTPOINT', selectSopPoints);
+  setSelectSopPoints({ commit }, points) {
+    commit('setSelectSopPoints', points);
+  },
+  setPointTableData({ commit }, points){
+    commit('setPointTableData', points);
   }
 };
 
 const getters = {
-  getSelectSopPoints: state => state.selectSopPoints
+  getSelectSopPoints: state => state.selectSopPoints,
+  getPointTableData:state => state.PointTableData
 };
 
 export default {
   namespaced: true,
   state,
   mutations,
-  actions
-}
+  actions,
+  getters
+};

+ 275 - 116
src/views/mes/job/jobm/NewOperations.vue

@@ -24,7 +24,7 @@
             <span
               style="float: right; padding: 1px 0; font-size: 22px"
               type="text"
-              >×</span
+            >×</span
             >
           </div>
           <div class="text item">
@@ -90,7 +90,8 @@
                       type="primary"
                       class="workTicket_btn"
                       @click="nextStep('second')"
-                      >下一步</el-button
+                    >下一步
+                    </el-button
                     >
                   </el-form-item>
                 </el-form>
@@ -125,8 +126,8 @@
                       <el-table-column prop="pointName" label="已选隔离点">
                         <template slot-scope="scope">
                           <span style="color: #2a87ff">{{
-                            scope.row.pointName
-                          }}</span>
+                              scope.row.pointName
+                            }}</span>
                         </template>
                       </el-table-column>
                       <el-table-column prop="pointType" label="隔离点类型">
@@ -156,7 +157,8 @@
                       style="float: right; height: 30px; line-height: 10px"
                       type="primary"
                       @click="nextStep('third')"
-                      >下一步</el-button
+                    >下一步
+                    </el-button
                     >
                     <el-button
                       plain
@@ -168,7 +170,8 @@
                       "
                       type="primary"
                       @click="previousStep('first')"
-                      >上一步</el-button
+                    >上一步
+                    </el-button
                     >
                   </el-form-item>
                 </el-form>
@@ -184,7 +187,7 @@
                       style="width: 100%"
                     >
                       <el-option
-                        v-for="dict in this.hardwareTypeOption"
+                        v-for="dict in this.listUserOption"
                         :key="dict.value"
                         :label="dict.label"
                         :value="dict.value"
@@ -192,14 +195,17 @@
                     </el-select>
                   </el-form-item>
                   <el-form-item label="共锁人" prop="coLocker">
+
                     <el-select
                       v-model="form.coLocker"
                       placeholder="共锁人"
                       clearable
+                      multiple
+                      disabled
                       style="width: 100%"
                     >
                       <el-option
-                        v-for="dict in this.hardwareTypeOption"
+                        v-for="dict in this.listUserOption"
                         :key="dict.value"
                         :label="dict.label"
                         :value="dict.value"
@@ -208,10 +214,12 @@
                   </el-form-item>
                   <el-form-item label="共锁人" prop="coLocker">
                     <el-button type="primary" @click="addInside"
-                      >添加内部人员</el-button
+                    >添加内部人员
+                    </el-button
                     >
                     <el-button type="primary" @click="addOutside"
-                      >添加外部人员</el-button
+                    >添加外部人员
+                    </el-button
                     >
                   </el-form-item>
                   <el-form-item label="开始时间" prop="startTime">
@@ -241,7 +249,8 @@
                       style="float: right; height: 30px; line-height: 10px"
                       type="primary"
                       @click="confirm"
-                      >完 成</el-button
+                    >完 成
+                    </el-button
                     >
                   </el-form-item>
                 </el-form>
@@ -251,6 +260,68 @@
         </el-card>
       </div>
     </div>
+    <!-- 添加或修改设备维修单对话框 -->
+    <el-dialog
+      :visible.sync="open"
+      width="450px"
+      append-to-body
+      style="margin-top: 13%"
+    >
+      <div slot="title" class="dialog-title">
+        <i></i>
+        <span class="title">{{ title }}</span>
+      </div>
+      <el-form
+        ref="dialogForm"
+        :model="dialogForm"
+        :rules="rules"
+        label-width="70px"
+      >
+        <el-form-item label="部门" prop="deptId" v-if="insideMumber">
+          <el-select
+            v-model="dialogForm.deptId"
+            placeholder="请选择部门"
+            clearable
+            style="width: 100%"
+            @change="DeptChage"
+          >
+            <el-option
+              v-for="dict in this.listDeptOption"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="选择人员" prop="nickName" v-if="insideMumber">
+          <el-select
+            v-model="dialogForm.nickName"
+            placeholder="请选择人员"
+            clearable
+            style="width: 100%"
+            multiple
+          >
+            <el-option
+              v-for="dict in this.listUserOption"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="人员名称" prop="mumberId" v-if="outsideMumber">
+          <el-input
+            v-model="dialogForm.username"
+            placeholder="请输入人员名称"
+            style="width: 100%"
+          />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="open=false">确认</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
     <!--    newOperations盒子结束-->
 
   </div>
@@ -258,148 +329,221 @@
 
 
 <script>
-import SeparationPoint from "@/components/separationPoint/index.vue";
-import WorkShop from "@/components/separationPoint/workshop.vue";
+import SeparationPoint from '@/components/separationPoint/index.vue'
+import WorkShop from '@/components/separationPoint/workshop.vue'
 import {
   listJobTicket,
   getJobTicketInfo,
   addJobTicket,
   updateJobTicket,
   deleteIsJobTicket,
-  getworkareaList,
-} from "@/api/mes/job/job";
-import { listAllWorkshop } from "@/api/mes/md/workshop";
-import {getIsSopPage} from "@/api/mes/sop/sopindex"
-import IsolationLeftVue from "@/components/separationPoint/index.vue";
+  getworkareaList
+} from '@/api/mes/job/job'
+import { listAllWorkshop } from '@/api/mes/md/workshop'
+import { getIsSopPage } from '@/api/mes/sop/sopindex'
+import { listUser } from '@/api/system/user'
+import { listDept } from '@/api/system/dept'
+import IsolationLeftVue from '@/components/separationPoint/index.vue'
+
+import { mapGetters } from 'vuex'
+
 export default {
-  name: "addView",
-  dicts:['ticket_type',"power_type", "point_type"],
+  name: 'addView',
+  dicts: ['ticket_type', 'power_type', 'point_type'],
   components: {
     IsolationLeftVue,
     SeparationPoint,
-    WorkShop,
+    WorkShop
   },
   data() {
     return {
-      activeName: "first",
+      activeName: 'first',
       form: {
-        sopId: "",
-        ticketType: "",
-        ticketName: "",
-        ticketCode: "",
-        ticketContent: "",
-        workshopName: "", //车间名称
-        workline: "", //产线
+        sopId: '',
+        ticketType: '',
+        ticketName: '',
+        ticketCode: '',
+        ticketContent: '',
+        workshopName: '', //车间名称
+        workline: '', //产线
         spoint: [], //已选隔离点
-        locker: "", //上锁人
-        coLocker: "", //共锁人
-        startTime: "", //开始时间
-        endTime: "", //结束时间
+        locker: '', //上锁人
+        coLocker: '', //共锁人
+        startTime: '', //开始时间
+        endTime: '' //结束时间
       },
       dialogForm: {
-        dept: "",
-        mumber: "",
-        mumberId: "",
+        deptId: '',
+        nickname: '',
+        username: ''
       },
-      hardwareTypeOption:[],
+      listUserOption: null,
+      listDeptOption: null,
       // 已选隔离点
       tableData: [],
       pickerOptions: {
         shortcuts: [
           {
-            text: "今天",
+            text: '今天',
             onClick(picker) {
-              picker.$emit("pick", new Date());
-            },
+              picker.$emit('pick', new Date())
+            }
           },
           {
-            text: "昨天",
+            text: '昨天',
             onClick(picker) {
-              const date = new Date();
-              date.setTime(date.getTime() - 3600 * 1000 * 24);
-              picker.$emit("pick", date);
-            },
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24)
+              picker.$emit('pick', date)
+            }
           },
           {
-            text: "一周前",
+            text: '一周前',
             onClick(picker) {
-              const date = new Date();
-              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit("pick", date);
-            },
-          },
-        ],
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', date)
+            }
+          }
+        ]
       },
       // 是否显示弹出层
       open: false,
       // 弹出层标题
-      title: "",
+      title: '',
       // 弹框中显示的form表单内容
       insideMumber: false,
       outsideMumber: false,
       points: null, //逆向传递拿到隔离点的数据
-      sopOptions:[],//sop下拉
-      jobProps:[],//正向传递给车间components
+      sopOptions: [],//sop下拉
+      jobProps: [],//正向传递给车间components
       // 表单校验
       rules: {
         teamCode: [
-          { required: true, message: "班组编号不能为空", trigger: "blur" },
+          { required: true, message: '班组编号不能为空', trigger: 'blur' }
         ],
         teamName: [
-          { required: true, message: "班组名称不能为空", trigger: "blur" },
+          { required: true, message: '班组名称不能为空', trigger: 'blur' }
         ],
         calendarType: [
-          { required: true, message: "清选择班组类型", trigger: "blur" },
-        ],
-      },
-    };
+          { required: true, message: '清选择班组类型', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  computed: {
+    ...mapGetters('sopSelectPoints', [
+      'getPointTableData'
+    ])
   },
   mounted() {
     this.getSopList()
+    this.getUser()
+    console.log(this.getPointTableData, 'this.getPointTableData')
+    if (this.getPointTableData) {
+      this.tableData = this.getPointTableData.pointDetailVOList.map((item) => {
+        return {
+          pointId: item.pointId,
+          pointName: item.pointName,
+          pointType: item.pointType,
+          powerType: item.powerType
+        }
+      })
+    }
   },
   methods: {
-    getSopList(){
-      const query={
-        current:1,
-        size:100000,
+    getSopList() {
+      const query = {
+        current: 1,
+        size: 100000
       }
       getIsSopPage(query).then((res) => {
-        console.log(res,'sop列表接口')
-        this.sopOptions=res.data.records
+        console.log(res, 'sop列表接口')
+        this.sopOptions = res.data.records
       })
     },
-    // sop下拉change事件
-    handleSelectSOP(value){
-      this.jobProps=this.sopOptions.filter((item)=>item.sopId==value)
-      console.log(this.jobProps,'父组件jobProps')
+    getUser() {
+      const query = {
+        pageNum: 1,
+        pageSize: 100000
+      }
+      listUser(query).then(res => {
+        console.log(res, '用户列表')
+        this.listUserOption = res.rows.map((item) => {
+          return {
+            label: item.nickName,
+            value: item.deptId,
+            key: item.userId
+          }
+        })
+      }),
+        listDept(query).then(res => {
+          console.log(res, '部门列表')
+          this.listDeptOption = res.data.map((item) => {
+            return {
+              label: item.deptName,
+              value: item.deptId,
+              key: item.parentId
+            }
+          })
+        })
     },
+    // 添加内部人员 部门下拉的chage事件
+    DeptChage(val){
+      console.log(val,' 部门下拉')
+      const query = {
+        pageNum: 1,
+        pageSize: 100000,
+        deptId:this.dialogForm.deptId
+      }
+      listUser(query).then(res => {
+        console.log(res, '用户列表')
+        this.listUserOption = res.rows.map((item) => {
+          return {
+            label: item.nickName,
+            value: item.deptId,
+            key: item.userId
+          }
+        })
+      })
+    },
+    // sop下拉change事件
+    handleSelectSOP(value) {
+      this.jobProps = this.sopOptions.filter((item) => item.sopId == value)
+      console.log(this.jobProps, '父组件jobProps')
+    }
+    ,
     handleClick(tab, event) {
       // console.log(tab, event);
-    },
+    }
+    ,
     previousStep(val) {
-      this.activeName = val;
-    },
+      this.activeName = val
+    }
+    ,
     nextStep(val) {
-      console.log(val, "nextStep");
-      this.activeName = val;
-      console.log("我点击了下一步");
-    },
+      console.log(val, 'nextStep')
+      this.activeName = val
+      console.log('我点击了下一步')
+    }
+    ,
     confirm() {
-      console.log("确认");
-    },
+      console.log('确认')
+    }
+    ,
     // 子组件逆向传递选中的隔离点
     // 子组件逆向传递选中的隔离点
     handleSelectPoint(points) {
-      console.log(points, "父组件接收逆向传递选中的隔离点");
+      console.log(points, '父组件接收逆向传递选中的隔离点')
 
       // 使用 Set 来存储传递过来的点值
-      const newValues = new Set(points.map((point) => point.pointId));
+      const newValues = new Set(points.map((point) => point.pointId))
 
       // 1. 删除取消选中的点
-      this.tableData = this.tableData.filter((item) => newValues.has(item.pointId));
+      this.tableData = this.tableData.filter((item) => newValues.has(item.pointId))
 
       // 2. 确保新增点不会重复
-      const existingValues = new Set(this.tableData.map((item) => item.pointId));
+      const existingValues = new Set(this.tableData.map((item) => item.pointId))
 
       points.forEach((point) => {
         // 如果当前传递的点不在已有的点集中,则添加
@@ -407,72 +551,80 @@ export default {
           this.tableData.push({
             pointName: point.pointName, // 显示的名称
             pointId: point.pointId, // 对应的值
-            pointType:point.pointType,
-            powerType:point.powerType,
-          });
+            pointType: point.pointType,
+            powerType: point.powerType
+          })
           // 将新点值添加到 Set 中
-          existingValues.add(point.value);
+          existingValues.add(point.value)
         }
-      });
+      })
 
       // 更新 form.spoint 为最新选中的隔离点数组
-      this.form.spoint = points.map((point) => point.pointId);
+      this.form.spoint = points.map((point) => point.pointId)
 
-    },
+    }
+    ,
     // 车间你逆向传递拿到的隔离点数据产线
     handleProductLineSelected(selectedOption) {
       // console.log(selectedOption, '父组件接收到的 selectedOption');
-      this.points = selectedOption;
-      this.form.workline=selectedOption.label
-    },
+      this.points = selectedOption
+      this.form.workline = selectedOption.label
+    }
+    ,
     // 车间子组件逆传递车间相关数据车间
-    handleWorkshopSelected(selectedOption){
-      console.log(selectedOption,'handleWorkshopSelected')
-      this.emitWorkShop=selectedOption
-      this.form.workshopName=selectedOption.label
-    },
+    handleWorkshopSelected(selectedOption) {
+      console.log(selectedOption, 'handleWorkshopSelected')
+      this.emitWorkShop = selectedOption
+      this.form.workshopName = selectedOption.label
+    }
+    ,
     // 添加内部人员
     addInside() {
-      this.open = true;
-      this.title = "添加内部人员";
-      this.insideMumber = true;
-      this.outsideMumber = false;
-    },
+      this.open = true
+      this.title = '添加内部人员'
+      this.insideMumber = true
+      this.outsideMumber = false
+    }
+    ,
     addOutside() {
-      this.open = true;
-      this.title = "添加外部人员";
-      this.insideMumber = false;
-      this.outsideMumber = true;
-    },
+      this.open = true
+      this.title = '添加外部人员'
+      this.insideMumber = false
+      this.outsideMumber = true
+    }
+    ,
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
-    },
-  },
-};
+      this.open = false
+      this.reset()
+    }
+  }
+}
 </script>
 
 
-
-<style scoped lang="scss" >
+<style scoped lang="scss">
 .newOperations {
   width: 99%;
   height: 100%;
   //background: pink;
   margin: 10px;
   display: flex;
+
   .left {
     width: 75%;
     height: 830px;
     background: #eee;
     margin-right: 10px;
   }
+
   .right {
     flex: 1;
+
     .right_top {
       height: 550px;
     }
+
     .workTicket_btn {
       position: relative;
       left: 63%;
@@ -481,6 +633,7 @@ export default {
     }
   }
 }
+
 //右侧卡片样式开始
 .text {
   font-size: 14px;
@@ -488,6 +641,7 @@ export default {
 
 .item {
   margin-bottom: 18px;
+
   p {
     font-size: 18px;
     font-weight: bolder;
@@ -501,6 +655,7 @@ export default {
   content: "";
   width: 320px;
 }
+
 .clearfix:after {
   clear: both;
 }
@@ -518,23 +673,27 @@ export default {
     // 调整箭头符号块的宽度
     width: 175px !important;
   }
+
   .el-input.el-input--medium.el-input--suffix {
     .el-input__inner {
       // 调整输入框的宽高
       height: 36px !important;
       width: 220px !important;
     }
+
     .el-input__suffix-inner {
       // 调整箭头符号的位置
       position: absolute;
       right: -45px;
     }
   }
+
   .el-select__tags {
     // 调整输入框里面的多选不换行
     flex-wrap: nowrap !important;
   }
 }
+
 //隔离点多选框样式结束
 </style>
 

+ 2 - 0
src/views/mes/job/jobm/index.vue

@@ -337,7 +337,9 @@ export default {
   created() {
     this.getList();
     this.getworkShop();
+
   },
+
   methods: {
     // 格式化日期查询数据
     formatDate(date) {