From 32ec691abab0c837f34ce2c4908a40a10b9dbec7 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 29 七月 2022 17:20:15 +0800
Subject: [PATCH] 1.优化项目2.综合看板静态页面初步实现

---
 src/views/zzmx/gylx.vue |   48 +++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 37 insertions(+), 11 deletions(-)

diff --git a/src/views/zzmx/gylx.vue b/src/views/zzmx/gylx.vue
index aa4eff6..30c979c 100644
--- a/src/views/zzmx/gylx.vue
+++ b/src/views/zzmx/gylx.vue
@@ -5,12 +5,12 @@
         <el-form
           ref="form"
           :model="form"
-          label-width="80px"
+          label-width="100px"
           inline
           style="display: flex;justify-content: space-between"
         >
           <div class="elForm">
-            <el-form-item label="宸ヨ壓缂栫爜" style=" display: flex;">
+            <el-form-item label="宸ヨ壓璺嚎缂栫爜" style=" display: flex;">
               <el-input v-model="form.routecode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
             <el-form-item label="宸ヨ壓鍚嶇О" style=" display: flex;">
@@ -90,6 +90,7 @@
             prop="lm_date"
             label="鍒涘缓鏃堕棿"
             sortable="custom"
+            width="160"
           />
           <el-table-column
             label="鎿嶄綔"
@@ -127,9 +128,9 @@
       @closed="handleClose"
       @close="handleClose"
     >
-      <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="80px">
+      <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="110px">
         <div style="display: flex">
-          <el-form-item label="宸ヨ壓缂栫爜" prop="code" style="margin-right: 20px">
+          <el-form-item label="宸ヨ壓璺嚎缂栫爜" prop="code" style="margin-right: 20px">
             <el-input v-model="dialogForm.code" :disabled="operation!=='add'" style="width: 220px" />
           </el-form-item>
           <el-form-item label="宸ヨ壓鍚嶇О" prop="name">
@@ -258,7 +259,7 @@
 
 <script>
 import Pagination from '@/components/Pagination'
-import { AddUpdateRoute, DeleteRoute, RouteSearch, RouteSelect, StepSelect, ViewRoute } from '@/api/zzmx'
+import { AddUpdateRoute, DeleteRoute, RouteSearch, StepSelect, ViewRoute } from '@/api/zzmx'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -303,7 +304,7 @@
         id: '',
         code: '',
         name: '',
-        enable: '',
+        enable: 'Y',
         description: '',
         Data: []
       },
@@ -316,7 +317,7 @@
       selectedName: '', // 閫変腑鐨勫悕绉�
       autocompleteValue: '', // 鍙悳绱㈣緭鍏ユ涓殑鍊�
       routeArr: [], // 宸ヨ壓璁剧疆涓嬫媺鎵�鏈夊��
-      addDisabled: false, // 娣诲姞鎸夐挳鏄惁鍙偣鍑�
+      addDisabled: true, // 娣诲姞鎸夐挳鏄惁鍙偣鍑�
       editDisabled: true, // 淇敼鎸夐挳鏄惁鍙偣鍑�
       mouseFocusPosition: 0, // 榧犳爣鑱氱劍鐨勪綅缃�
       operation: '',
@@ -390,6 +391,20 @@
       })
       if (!flag) {
         return this.$message.info('杈撳叆妗嗗唴瀹逛笌涓嬫媺閫夐」鍐呭涓嶅尮閰嶏紒')
+      }
+
+      // 3.杈撳叆妗嗗唴瀹逛笌宸查�夊唴瀹圭浉鍚屾椂涓嶈兘淇濆瓨
+      let flag2 = false
+      this.dynamicTags.forEach(item => {
+        if (item.stepname === this.autocompleteValue.trim()) {
+          flag2 = true
+        }
+      })
+      if (tag.stepname === this.autocompleteValue.trim()) {
+        flag2 = false
+      }
+      if (flag2) {
+        return this.$message.info('姝ゅ伐搴忓凡閫夛紝璇烽�夋嫨鍏跺畠宸ュ簭锛�')
       }
 
       // 灏嗗�兼浛鎹㈠埌鍘焧ag浣嶇疆涓�
@@ -586,12 +601,13 @@
     handleClose() {
       this.dialogForm.code = ''
       this.dialogForm.name = ''
-      this.dialogForm.enable = ''
+      this.dialogForm.enable = 'Y'
       this.dialogForm.description = ''
       this.dialogForm.Data = []
       this.dynamicTags = [
         { editDisabled: true, stepcode: 'Step01', seq: 1, stepname: ' ', effect: 'light' }
       ]
+      this.addDisabled = true
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -608,6 +624,13 @@
       this.dynamicTags.forEach(item => {
         Data.push({ seq: item.seq, stepcode: item.stepcode, stepname: item.stepname })
       })
+
+      Data.forEach(item => {
+        if (item.stepname === this.routeArr.find(it => it.stepname === item.stepname).stepname) {
+          item.stepcode = this.routeArr.find(it => it.stepname === item.stepname).stepcode
+        }
+      })
+      console.log(Data, 32)
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
@@ -686,8 +709,11 @@
   color: #606266;
 }
 
+//::v-deep .el-dialog__body {
+//  padding: 20px 100px !important;
+//}
 ::v-deep .el-dialog__body {
-  padding: 20px 100px !important;
+  padding: 20px 60px !important;
 }
 
 ::v-deep .el-radio__input.is-checked .el-radio__inner {
@@ -810,8 +836,8 @@
   position: absolute;
   margin-left: -7px;
   z-index: 2;
-  width: 15px;
-  height: 15px !important;
+  width: 16px;
+  height: 16px !important;
   font-size: 12px;
   text-align: center;
   line-height: 15px;

--
Gitblit v1.9.3