From 9c094a1fe3e1ae3dadef6433f8401818fe2b8304 Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期五, 21 六月 2024 10:53:43 +0800
Subject: [PATCH] 1

---
 src/views/console/workstation/Dialog.vue |   90 +++++++++++++++++++++++---------------------
 1 files changed, 47 insertions(+), 43 deletions(-)

diff --git a/src/views/console/workstation/Dialog.vue b/src/views/console/workstation/Dialog.vue
index 470b881..e5693f0 100644
--- a/src/views/console/workstation/Dialog.vue
+++ b/src/views/console/workstation/Dialog.vue
@@ -8,7 +8,8 @@
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="宸ヤ綅缂栧彿" prop="code">
-                        <el-input style="width: 240px" :disabled="form.id" v-model="form.code" placeholder="宸ヤ綅缂栧彿" clearable></el-input>
+                        <el-input style="width: 240px" :disabled="form.id" v-model="form.code" placeholder="宸ヤ綅缂栧彿"
+                            clearable></el-input>
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
@@ -26,13 +27,13 @@
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="鎵�灞炲伐浣嶇粍" prop="groupName">
-                        <el-tree-select @node-click="nodeClick" v-model="form.groupName" :data="options.group"  :check-on-click-node="true"
-                            style="width: 240px" />
+                        <el-tree-select @node-click="nodeClick" v-model="form.groupName" :data="options.group"
+                            :check-on-click-node="true" style="width: 240px" />
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="鐘舵��" prop="status">
-                        <el-switch v-model="form.status" :active-value="1" :inactive-value="0"/>
+                        <el-switch v-model="form.status" :active-value="1" :inactive-value="0" />
                     </el-form-item>
                 </el-col>
                 <el-col :span="24">
@@ -52,9 +53,10 @@
                     鏈哄櫒淇℃伅
                 </el-col>
                 <el-col :span="12" v-if="form.type == 0 && !form.id">
-                    <el-form-item label="閫夋嫨鏈哄櫒" prop="linkWay" >
+                    <el-form-item label="閫夋嫨鏈哄櫒" prop="linkWay">
                         <el-radio-group v-model="form.linkWay">
-                            <el-radio v-for="item in options.linkWays" :key="item.value" :label="item.value">{{item.label}}</el-radio>
+                            <el-radio v-for="item in options.linkWays" :key="item.value"
+                                :label="item.value">{{ item.label }}</el-radio>
                         </el-radio-group>
                     </el-form-item>
                 </el-col>
@@ -62,10 +64,11 @@
                     <!-- machineCode -->
                     <el-form-item label="鏈哄櫒缂栧彿" prop="machineId">
                         <!-- <el-input style="width: 240px" v-model="form.machineId" placeholder="鏈哄櫒缂栧彿" clearable></el-input> -->
-                        <el-select v-if="!form.id" v-model="form.machineId" style="width: 240px" @change="change" clear filterable>
-                            <el-option v-for="item in options.listnoband" :key="item.id" :label="item.machineName" :value="item.id"
-                               >
-                            {{ `${item?.machineCode}-${item?.machineName}-${item?.brand}`  }}</el-option>
+                        <el-select v-if="!form.id" v-model="form.machineId" style="width: 240px" @change="change" clear
+                            filterable>
+                            <el-option v-for="item in options.listnoband" :key="item.id" :label="item.machineName"
+                                :value="item.id">
+                                {{ `${item?.machineCode}-${item?.machineName}-${item?.brand}` }}</el-option>
                         </el-select>
                         <el-input v-if="form.id" :disabled="form.id" v-model="form.machineName"></el-input>
                     </el-form-item>
@@ -84,16 +87,16 @@
                 <el-col :span="12">
                     <el-form-item label="鍔犲伐灞炴��" prop="properties">
                         <el-select v-model="form.properties" style="width: 240px">
-                            <el-option v-for="item in options.machining_type" :key="item.dictKey" :label="item.dictValue"
-                                :value="item.dictKey" />
+                            <el-option v-for="item in options.machining_type" :key="item.dictKey"
+                                :label="item.dictValue" :value="item.dictKey" />
                         </el-select>
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="绋嬪簭浼犺緭鏂瑰紡" prop="transmissionMethod">
                         <el-select v-model="form.transmissionMethod" style="width: 240px">
-                            <el-option   label="FTP"  :value="1" />
-                            <el-option   label="涓插彛"  :value="2" />
+                            <el-option label="FTP" :value="1" />
+                            <el-option label="涓插彛" :value="2" />
                         </el-select>
                     </el-form-item>
                 </el-col>
@@ -115,15 +118,15 @@
                 </el-col>
                 <el-col :span="4">
                     <!-- <el-form-item label="宸ヤ綔鍙�" prop="workbenchVOList"> -->
-                        
+
                     <!-- </el-form-item> -->
                     <span>宸ヤ綔鍙�</span>
-                    
+
                 </el-col>
                 <el-col style="margin-bottom: 14px;">
                     <ul class="workbranch">
                         <li v-for="item in form.workbenchVOList">
-                            <span>{{ item.sort}}</span>
+                            <span>{{ item.sort }}</span>
                             <el-input v-model="item.name" style="width: 200px"></el-input>
                         </li>
                     </ul>
@@ -131,11 +134,10 @@
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="鏁版嵁鏉冮檺" prop="createDept">
-                        <el-tree-select clearable @node-click="nodeClickTree" v-model="form.createDept" :data="tree"  :check-on-click-node="true" 
-                            style="width: 240px">
+                        <el-tree-select clearable @node-click="nodeClickTree" v-model="form.createDept" :data="tree"
+                            :check-on-click-node="true" style="width: 240px">
                             <template #default="{ data: { title } }">
-      {{ title }}</template
-    >
+                                {{ title }}</template>
                         </el-tree-select>
                     </el-form-item>
                 </el-col>
@@ -224,13 +226,13 @@
                 status: [
                     { required: true, message: '蹇呭~' }
                 ],
-                linkWay:[
+                linkWay: [
                     { required: true, message: '蹇呭~' }
                 ],
-                machineId:[
+                machineId: [
                     { required: true, message: '蹇呭~' }
                 ],
-                directoryId:[
+                directoryId: [
                     { required: true, message: '蹇呭~' }
                 ],
             },
@@ -293,18 +295,18 @@
         open(mode = 'add', params) {
             this.mode = mode;
             this.visible = true;
-            
+
             if (params) {
                 Object.keys(this.form).forEach(key => {
                     this.form[key] = params[key]
                 })
                 this.$HTTP.get(`/api/blade-cps/workstation/get?workstationId=${params.id}`).then(res => {
-                    this.form =res?.data
+                    this.form = res?.data
                     this.$HTTP.get(`/api/blade-cps/workstation-workbench/listWorkbench?workstationId=${params.id}`).then(res => {
-                        this.form.workbenchVOList =res?.data?.workstationList || []
+                        this.form.workbenchVOList = res?.data?.workstationList || []
                     })
                 })
-            }else {
+            } else {
                 this.form.id = ''
                 Object.keys(this.form).forEach(key => {
                     this.form[key] = ''
@@ -342,14 +344,14 @@
             //鍙互鍜屼笂闈竴鏍峰崟涓敞鍏ワ紝涔熷彲浠ュ儚涓嬮潰涓�鏍风洿鎺ュ悎骞惰繘鍘�
             //Object.assign(this.form, data)
         },
-        change (id) {
-            let row = this.options.listnoband.find(v=>v.id ==id)
-            if (!row)  {
+        change(id) {
+            let row = this.options.listnoband.find(v => v.id == id)
+            if (!row) {
                 this.form.machineCode = ''
                 this.form.machineId = ''
                 this.form.machineName = ''
 
-            }else {
+            } else {
                 this.form.machineCode = row.machineCode
                 this.form.machineId = row.id
                 this.form.machineName = row.machineName
@@ -359,7 +361,7 @@
             })
             console.log(row)
         },
-        nodeClick (node) {
+        nodeClick(node) {
             console.log(node)
             if (node.parentId == 0) return
             this.$nextTick(() => {
@@ -367,12 +369,12 @@
                 this.form.groupName = node.name
             })
         },
-        nodeClickTree (node) {
+        nodeClickTree(node) {
             this.$nextTick(() => {
                 this.form.createDept = node.id
             })
         },
-        addWork () {
+        addWork() {
             this.form.workbenchVOList.push({
                 sort: this.form.workbenchVOList.length + 1,
                 name: ''
@@ -386,20 +388,22 @@
 .workbranch {
     list-style: none;
     padding-left: 50px;
+
     li {
         margin-top: 8px;
+
         span {
             display: inline-block;
             width: 25px;
-        height: 25px;
-        line-height: 25px;
-        text-align: center;
-        border-radius: 50%;
-        background: #ccc;
-        margin-right: 8px;
+            height: 25px;
+            line-height: 25px;
+            text-align: center;
+            border-radius: 50%;
+            background: #ccc;
+            margin-right: 8px;
         }
-       
-        
+
+
     }
 }
 </style>

--
Gitblit v1.9.3