From 0c6473bcff72275f79cbc14843937ed8b26c6801 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 04 一月 2023 16:41:03 +0800
Subject: [PATCH] 1.优化列展示功能

---
 src/views/zzmx/chda.vue |  100 ++++++++++++++++++++++++++++++++++---------------
 1 files changed, 69 insertions(+), 31 deletions(-)

diff --git a/src/views/zzmx/chda.vue b/src/views/zzmx/chda.vue
index a77a8cd..8621d3f 100644
--- a/src/views/zzmx/chda.vue
+++ b/src/views/zzmx/chda.vue
@@ -32,10 +32,10 @@
           :model="form"
           label-width="100px"
           inline
-          style="display: flex;justify-content: space-between"
+          style="display: flex;"
         >
           <div class="elForm">
-            <el-form-item label-width="70px" label="鐗╂枡缂栫爜" style=" display: flex;">
+            <el-form-item label="鐗╂枡缂栫爜" style=" display: flex;">
               <el-input v-model="form.partcode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
             <el-form-item label="鐗╂枡鍚嶇О" style=" display: flex;">
@@ -78,7 +78,7 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item v-show="isExpandForm" label-width="70px" label="鎵�灞炰粨搴�" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="鎵�灞炰粨搴�" style=" display: flex;">
               <el-select
                 v-model="form.storehousecode"
                 filterable
@@ -96,7 +96,7 @@
               </el-select>
             </el-form-item>
           </div>
-          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
+          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
             <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
             <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
@@ -147,6 +147,7 @@
           />
           <el-table-column
             prop="partcode"
+            show-tooltip-when-overflow
             label="鐗╂枡缂栫爜"
             min-width="160"
             sortable="custom"
@@ -154,6 +155,7 @@
           <el-table-column
             prop="partname"
             min-width="160"
+            show-tooltip-when-overflow
             label="鐗╂枡鍚嶇О"
             sortable="custom"
           />
@@ -173,12 +175,14 @@
             prop="uom_name"
             label="鍗曚綅"
             width="75"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="stocktypename"
             label="瀛樿揣绫诲瀷"
             sortable="custom"
+            show-tooltip-when-overflow
             min-width="110"
           />
           <!--          <el-table-column-->
@@ -189,6 +193,7 @@
           <el-table-column
             prop="stck_name"
             label="浠撳簱鍚嶇О"
+            show-tooltip-when-overflow
             sortable="custom"
             min-width="110"
           >
@@ -201,6 +206,7 @@
             prop="maxqty"
             label="搴撳瓨涓婇檺"
             width="110"
+            show-tooltip-when-overflow
             sortable="custom"
           >
             <template slot-scope="{row}">
@@ -212,6 +218,7 @@
             prop="minqty"
             label="搴撳瓨涓嬮檺"
             width="110"
+            show-tooltip-when-overflow
             sortable="custom"
           >
             <template slot-scope="{row}">
@@ -221,6 +228,7 @@
           </el-table-column>
           <el-table-column
             prop="lm_user"
+            show-tooltip-when-overflow
             label="鍒涘缓浜哄憳"
             sortable="custom"
             width="110"
@@ -228,17 +236,19 @@
           <el-table-column
             prop="lm_date"
             label="鍒涘缓鏃堕棿"
+            show-tooltip-when-overflow
             sortable="custom"
             width="160"
           />
           <el-table-column
             label="宸ヨ壓璺嚎"
             width="80"
+            show-tooltip-when-overflow
             prop="proute_id"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <i v-if="row.proute_id==='Y'" class="el-icon-share" @click="routeClick(row)" />
+                <i v-if="row.proute_id==='Y'" :style="{color:$store.state.settings.theme}" class="el-icon-share" @click="routeClick(row)" />
                 <i v-if="row.proute_id==='N'" style="color:rgb(180 ,181, 185)" class="el-icon-share" @click="routeClick(row)" />
               </div>
             </template>
@@ -251,10 +261,10 @@
             <template slot-scope="{row}">
               <div class="operationClass">
                 <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">
-                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
+                  <i :style="{color:$store.state.settings.theme}" class="el-icon-edit-outline" @click="edit('edit',row)" />
                 </el-tooltip>
                 <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
-                  <i class="el-icon-delete" @click="del(row)" />
+                  <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" />
                 </el-tooltip>
               </div>
             </template>
@@ -417,6 +427,7 @@
         />
         <el-table-column
           prop="code"
+          show-tooltip-when-overflow
           label="绫诲瀷缂栫爜"
           sortable="custom"
         >
@@ -428,6 +439,7 @@
         <el-table-column
           prop="name"
           label="绫诲瀷鍚嶇О"
+          show-tooltip-when-overflow
           sortable="custom"
         >
           <template slot-scope="{row}">
@@ -438,6 +450,7 @@
         <el-table-column
           prop="digdect"
           label="灏忔暟浣嶆暟"
+          show-tooltip-when-overflow
           sortable="custom"
         >
           <template slot-scope="{row}">
@@ -454,6 +467,7 @@
         <el-table-column
           prop="r_ule"
           label="鍙栨暣瑙勫垯"
+          show-tooltip-when-overflow
           sortable="custom"
         >
 
@@ -513,44 +527,56 @@
       title="鍏宠仈宸ヨ壓璺嚎"
       :visible.sync="dialogVisibleRoute"
       width="800px"
-      top="10vh"
+      top="5vh"
       :fullscreen="isIpad"
       class="dialogVisibleRoute"
       @closed="handleCloseRoute"
       @close="handleCloseRoute"
     >
       <div>
-        <i class="el-icon-s-comment" style="color:#42b983;" /> 浜у搧鍚嶇О锛歿{ dialogFormRoute.projectName }}
+        <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 浜у搧鍚嶇О锛歿{ dialogFormRoute.projectName }}
       </div>
       <el-divider />
       <div style="margin-bottom: 10px">
-        <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヨ壓璺嚎闆嗗悎
+        <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ヨ壓璺嚎闆嗗悎
       </div>
 
       <div class="myCheckboxGroup">
         <div
           v-for="item in dialogFormRoute.routeOperationArr"
           :key="item.code"
-          :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
+          :style="{border:item.isSelected1?'1px solid '+$store.state.settings.theme:'1px solid #eee'}"
           class="myCheckbox"
           @click="myCheckboxClick(item)"
         >
-          <input
-            class="myCheckboxInput"
-            type="checkbox"
-            :value="item.code"
-            :name="item.name"
-            :style="{color:item.isSelected2?'#42b983':'#fff'}"
-            @click="myCheckboxInputClick(item)"
-          >{{ item.name }}
+          <!--          <input-->
+          <!--            class="myCheckboxInput"-->
+          <!--            type="checkbox"-->
+          <!--            :value="item.code"-->
+          <!--            :name="item.name"-->
+          <!--            :style="{color:item.isSelected2?'#42b983':'#fff'}"-->
+          <!--            @click="myCheckboxInputClick(item)"-->
+          <!--          >{{ item.name }}-->
           <!--            鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
           <!--            onClick="event.cancelBubble = true"-->
+          <el-checkbox
+            :key="item.code"
+            v-model="item.isSelected2"
+            class="myCheckboxInput"
+            :value="item.code"
+            :name="item.name"
+            :label="item.name"
+            :checked="item.isSelected2"
+            @change="myCheckboxInputClick(item)"
+          />
+          <div class="myCheckboxInputLabel">{{ item.name }}</div>
+
         </div>
       </div>
 
       <el-divider />
       <div>
-        <i class="el-icon-s-operation" style="color:#42b983;" /> 榛樿宸ヨ壓璺嚎
+        <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 榛樿宸ヨ壓璺嚎
       </div>
       <div style="margin-top: 20px">
         <el-select
@@ -570,7 +596,7 @@
       </div>
       <el-divider />
       <div style="margin-bottom: 10px">
-        <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ュ簭鍒楄〃
+        <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ュ簭鍒楄〃
       </div>
       <div style="overflow-y: scroll">
         <el-table
@@ -591,20 +617,27 @@
           />
           <el-table-column
             prop="stepcode"
+            show-tooltip-when-overflow
             label="宸ュ簭缂栫爜"
           />
           <el-table-column
             prop="stepname"
             label="宸ュ簭鍚嶇О"
+            show-tooltip-when-overflow
           />
           <el-table-column
             prop="enable"
             label="鍚敤鐘舵��"
+            show-tooltip-when-overflow
             fixed="right"
           >
             <template slot-scope="{row}">
-              <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />鏄�</div>
-              <div v-if="row.enable==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />鍚�</div>
+              <div v-if="row.enable==='Y'">
+                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
+                鏄�</div>
+              <div v-if="row.enable==='N'">
+                <i class="el-icon-info" style="margin-right: 2px" />
+                鍚�</div>
             </template>
           </el-table-column>
         </el-table>
@@ -958,10 +991,6 @@
     },
     // 瀵硅瘽妗嗙‘璁�
     dialogVisibleConfirm() {
-      if (this.defaultroute_codeArr.length > 0 && this.defaultroute_code === '') {
-        return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
-      }
-
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           this.$store.state.app.buttonIsDisabled = true
@@ -1071,8 +1100,8 @@
     },
     // 纭畾
     async routeDialogVisibleConfirm() {
-      const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
-      if (this.defaultroute_code === '' && temp.length > 0) {
+      console.log(this.defaultroute_code)
+      if (this.defaultroute_code === null || this.defaultroute_code === 'null') {
         return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
       }
 
@@ -1103,8 +1132,8 @@
     },
     // 灏忕洅瀛愮偣鍑讳簨浠�
     myCheckboxInputClick(val) {
-      console.log(val, 2)
-      val.isSelected2 = !val.isSelected2
+      // console.log(val, 2)
+      val.isSelected2 = !!val.isSelected2
 
       this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
         if (val.code === item.code) {
@@ -1250,12 +1279,21 @@
       margin: 10px 30px 0 0;
       border-radius: 5px;
       cursor: default;
+      position: relative;
 
       .myCheckboxInput {
         margin: 1px 5px 0 0;
         cursor: pointer;
       }
 
+      .myCheckboxInputLabel {
+        position: absolute;
+        left: 29px;
+        padding: 5px;
+        top: 6px;
+        color: transparent;
+      }
+
     }
 
     //.myCheckbox{

--
Gitblit v1.9.3