From 6c7ca8b4290cd6afecb680c39be00fc2480a2dca Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 21 九月 2023 14:30:58 +0800
Subject: [PATCH] 现场问题修改

---
 src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue |  194 +++++++++++++++++++++++++++---------------------
 1 files changed, 109 insertions(+), 85 deletions(-)

diff --git a/src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue b/src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue
index c559867..65c6c0d 100644
--- a/src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue
+++ b/src/views/eam/modules/equipmentCategory/EquipmentCategoryModel.vue
@@ -14,7 +14,7 @@
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
 
-<!--        <a-row :gutter="24">
+        <!--        <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item
               label="涓婄骇璁惧鍒嗙被缂栧彿"
@@ -60,7 +60,10 @@
               />
             </a-form-item>
           </a-col>
-          <a-col :span="12" v-if="parentId!='-1'">
+          <a-col
+            :span="12"
+            v-if="parentId!='-1'"
+          >
             <a-form-item
               label="璁惧鍒嗙被鍚嶇О"
               :labelCol="labelCol"
@@ -74,13 +77,16 @@
               />
             </a-form-item>
           </a-col>
-          <a-col :span="12" v-if="parentId=='-1'">
+          <a-col
+            :span="12"
+            v-if="parentId=='-1'"
+          >
             <a-form-item
               label="璁惧鍒嗙被鍚嶇О"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
             >
-            <j-dict-select-tag
+              <j-dict-select-tag
                 allow-clear
                 :disabled="disableSubmit"
                 :placeholder="disableSubmit?'':'璇烽�夋嫨鍒嗙被鍚嶇О'"
@@ -91,7 +97,10 @@
             </a-form-item>
           </a-col>
         </a-row>
-          <a-row :gutter="24">
+        <!-- <a-row
+          hidden
+          :gutter="24"
+        >
           <a-col :span="12">
             <a-form-item
               :labelCol="labelCol"
@@ -114,7 +123,7 @@
               :wrapperCol="wrapperCol"
               label="鎶�鏈姸鎬侀壌瀹氬懆鏈�"
             >
-            <j-dict-select-tag
+              <j-dict-select-tag
                 allow-clear
                 :disabled="disableSubmit"
                 :placeholder="disableSubmit?'':'璇烽�夋嫨鎶�鏈姸鎬侀壌瀹氬懆鏈�'"
@@ -124,8 +133,8 @@
               />
             </a-form-item>
           </a-col>
-        </a-row>
-          <a-row :gutter="24">
+        </a-row> -->
+        <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item
               :labelCol="labelCol"
@@ -142,48 +151,63 @@
           </a-col>
         </a-row>
       </a-form>
-      <a-divider  v-if="title!='鏂板'" orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 閫夋嫨瀛愯澶囧垎绫讳娇鍏惰窡闅忕埗璁惧鍒嗙被灞炴�� </a-divider>
+      <a-divider
+        v-if="title!='鏂板'"
+        orientation="center"
+        style="font-size: large;font-style: italic;color: #66aeed;"
+      > 閫夋嫨瀛愯澶囧垎绫讳娇鍏惰窡闅忕埗璁惧鍒嗙被灞炴�� </a-divider>
       <a-tabs
         type="card"
         defaultActiveKey="1"
         v-if="title!='鏂板'"
       >
-      <a-tab-pane
+        <a-tab-pane
           tab='瀛愯澶囧垎绫�'
           key='1'
-
         >
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
-        <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
-      </div>
-      <a-table
-      ref="table"
-      bordered
-      size="middle"
-      rowKey="id"
-      :columns="columns"
-      :dataSource="dataSource"
-      :pagination="ipagination"
-      :loading="loading"
-      :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-      @change="handleTableChange"
-      :scroll="{ x: true}"
-     >
-        <template slot="num" slot-scope="text" >
-          <a-tooltip placement="top" :title="text" trigger="hover">
-            <div>
-              <template slot="title"> </template>
-              <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p>
-            </div>
-          </a-tooltip>
-        </template>
+          <div
+            class="ant-alert ant-alert-info"
+            style="margin-bottom: 16px;"
+          >
+            <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
+            <a
+              style="margin-left: 24px"
+              @click="onClearSelected"
+            >娓呯┖</a>
+          </div>
+          <a-table
+            ref="table"
+            bordered
+            size="middle"
+            rowKey="id"
+            :columns="columns"
+            :dataSource="dataSource"
+            :pagination="ipagination"
+            :loading="loading"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange"
+            :scroll="{ x: true}"
+          >
+            <template
+              slot="num"
+              slot-scope="text"
+            >
+              <a-tooltip
+                placement="top"
+                :title="text"
+                trigger="hover"
+              >
+                <div>
+                  <template slot="title"> </template>
+                  <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p>
+                </div>
+              </a-tooltip>
+            </template>
 
-      </a-table>
+          </a-table>
 
-
-    </a-tab-pane>
-    </a-tabs>
+        </a-tab-pane>
+      </a-tabs>
 
     </a-spin>
 
@@ -194,7 +218,7 @@
       >
         鍏抽棴
       </a-button>
-<!--      <a-button
+      <!--      <a-button
         v-if="!this.model.id"
         :disabled="disableSubmit || confirmLoading"
         :loading="confirmLoading"
@@ -222,12 +246,12 @@
 
 export default {
   name: 'EquipmentCategoryModel',
-  mixins:[JeecgListMixin],
-  props:{
-    mainId:{
-        type:String,
-        default:'',
-        required:false
+  mixins: [JeecgListMixin],
+  props: {
+    mainId: {
+      type: String,
+      default: '',
+      required: false
     },
   },
   data() {
@@ -239,10 +263,10 @@
       parentId: '',
       model: {},
       labelCol: {
-        span:7
+        span: 7
       },
       wrapperCol: {
-        span:17
+        span: 17
       },
       confirmLoading: false,
       form: this.$form.createForm(this),
@@ -261,7 +285,7 @@
             { validator: this.validateName },
           ]
         },
-        equipmentCategoryUda1:{
+        equipmentCategoryUda1: {
           rules: [
             { required: true, message: '璇烽�夋嫨绫诲埆鏍囪瘑!' },
           ]
@@ -271,7 +295,7 @@
             { min: 0, max: 100, message: '闀垮害涓嶈秴杩� 100 涓瓧绗�', trigger: 'blur' },
           ]
         },
-        equipmentCategoryUda2:{
+        equipmentCategoryUda2: {
           rules: [
             { required: true, message: '璇烽�夋嫨鎶�鏈姸鎬侀壌瀹氬懆鏈�!' },
           ]
@@ -280,7 +304,7 @@
       url: {
         add: "/eam/equipmentCategory/add",
         edit: "/eam/equipmentCategory/edit",
-        list:"/eam/equipmentCategory/getAllChildren"
+        list: "/eam/equipmentCategory/getAllChildren"
       },
       columns: [
         {
@@ -293,20 +317,20 @@
           },
           width: 50,
         },
-      /*   {
-          title: '涓婄骇璁惧鍒嗙被缂栫爜',
-          align: "center",
-          dataIndex: 'parentNum',
-          customRender:function(text, record){
-              return record.parentName+text;
-            }
-          },
-
-        {
-          title: '涓婄骇璁惧鍒嗙被鍚嶇О',
-          align: "center",
-          dataIndex: 'parentName',
-        }, */
+        /*   {
+            title: '涓婄骇璁惧鍒嗙被缂栫爜',
+            align: "center",
+            dataIndex: 'parentNum',
+            customRender:function(text, record){
+                return record.parentName+text;
+              }
+            },
+  
+          {
+            title: '涓婄骇璁惧鍒嗙被鍚嶇О',
+            align: "center",
+            dataIndex: 'parentName',
+          }, */
         {
           title: '鍒嗙被缂栫爜',
           align: "center",
@@ -385,7 +409,7 @@
       this.visible = true;
       this.disableSubmit = false;
       this.$nextTick(() => {
-        this.form.setFieldsValue(pick(this.model, 'parentNum','equipmentCategoryUda1','equipmentCategoryUda2', 'parentName', 'num', 'name', 'remark'))
+        this.form.setFieldsValue(pick(this.model, 'parentNum', 'equipmentCategoryUda1', 'equipmentCategoryUda2', 'parentName', 'num', 'name', 'remark'))
       });
       if (record.id) {
         this.codeDisable = true;
@@ -400,12 +424,12 @@
       this.onClearSelected();
     },
     onSelectChange(selectedRowKeys, selectionRows) {
-        this.selectedRowKeys = selectedRowKeys;
-        this.selectionRows = selectionRows;
+      this.selectedRowKeys = selectedRowKeys;
+      this.selectionRows = selectionRows;
     },
     onClearSelected() {
-        this.selectedRowKeys = [];
-        this.selectionRows = [];
+      this.selectedRowKeys = [];
+      this.selectionRows = [];
     },
 
     //淇濆瓨骞舵柊澧炴寜閽Е鍙�
@@ -510,10 +534,10 @@
         }
       })
     },
-    clearList(){
-        this.dataSource=[]
-        this.selectedRowKeys=[]
-        this.ipagination.current = 1
+    clearList() {
+      this.dataSource = []
+      this.selectedRowKeys = []
+      this.ipagination.current = 1
     }
 
   },
@@ -521,17 +545,17 @@
     alterFlag() {
       this.$bus.$emit('queryTreeData');
     },
-    mainId:{
-       immediate:true,
-       handler(val) {
-          if(!this.mainId){
-            this.clearList()
-          }else{
-            this.queryParam['parentId'] = val
-            this.loadData(1);
-          }
+    mainId: {
+      immediate: true,
+      handler(val) {
+        if (!this.mainId) {
+          this.clearList()
+        } else {
+          this.queryParam['parentId'] = val
+          this.loadData(1);
         }
-     },
+      }
+    },
   }
 }
 </script>

--
Gitblit v1.9.3