From 6bc6b53ed1141673effd0ed265e13d34706cc3d2 Mon Sep 17 00:00:00 2001
From: houjie <714924425@qq.com>
Date: 星期二, 05 九月 2023 16:48:50 +0800
Subject: [PATCH] 小修改

---
 src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue |   79 ++++++++++++++++++--------
 src/views/eam/EquipmentUnsealList.vue                       |   11 ++-
 src/views/eam/EquipmentScrapList.vue                        |   69 +++++++++++-----------
 src/views/eam/EquipmentSealList.vue                         |    9 ++
 4 files changed, 103 insertions(+), 65 deletions(-)

diff --git a/src/views/eam/EquipmentScrapList.vue b/src/views/eam/EquipmentScrapList.vue
index dad5582..0ebb7af 100644
--- a/src/views/eam/EquipmentScrapList.vue
+++ b/src/views/eam/EquipmentScrapList.vue
@@ -5,12 +5,12 @@
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
           <!--          v-show="false"  hidden="true"-->
-<!--          <a-col :xl="6" :lg="7" :md="8" :sm="24" v-show="true">-->
-<!--            &lt;!&ndash;            defaultValue="disposal"&ndash;&gt;-->
-<!--            <a-form-item label="鍙樺姩鏂瑰紡">-->
-<!--              <a-input placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" v-model="queryParam.changeMethod" defaultValue="scrap"></a-input>-->
-<!--            </a-form-item>-->
-<!--          </a-col>-->
+          <!--          <a-col :xl="6" :lg="7" :md="8" :sm="24" v-show="true">-->
+          <!--            &lt;!&ndash;            defaultValue="disposal"&ndash;&gt;-->
+          <!--            <a-form-item label="鍙樺姩鏂瑰紡">-->
+          <!--              <a-input placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" v-model="queryParam.changeMethod" defaultValue="scrap"></a-input>-->
+          <!--            </a-form-item>-->
+          <!--          </a-col>-->
 
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="鍗曟嵁鍙�">
@@ -90,12 +90,16 @@
       :customRow="clickThenSelect"
       @change="handleTableChange">
 
+      <span slot="num" slot-scope="text">
+          <j-ellipsis :value="text" :length="15" />
+        </span>
       <template slot="htmlSlot" slot-scope="text">
         <div v-html="text"></div>
       </template>
       <template slot="imgSlot" slot-scope="text,record">
         <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
-        <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;" />
+        <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
+             style="max-width:80px;font-size: 12px;font-style: italic;" />
       </template>
       <template slot="fileSlot" slot-scope="text">
         <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
@@ -109,28 +113,20 @@
           涓嬭浇
         </a-button>
       </template>
-      <!--        <template>-->
-      <!--          <a-tooltip placement="topLeft">-->
-      <!--            <template slot="title">-->
-      <!--              <span>{{value}}</span>-->
-      <!--            </template>-->
-      <!--            {{ value | ellipsis(length) }}-->
-      <!--          </a-tooltip>-->
-      <!--        </template>-->
       <!-- 瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
       <span slot="remark" slot-scope="text">
           <j-ellipsis :value="text" :length="15" />
         </span>
 
-        <span
-          slot="action"
-          slot-scope="text, record"
-        >
+      <span
+        slot="action"
+        slot-scope="text, record"
+      >
         <a-popconfirm
-                  v-if="record.auditStatus == 'notSubmitted'||record.auditStatus =='Rejected'"
-                  title="纭鎻愪氦鍚�?"
-                  @confirm="() =>handleCommit(record,'commit')"
-                >
+          v-if="record.auditStatus == 'notSubmitted'||record.auditStatus =='Rejected'"
+          title="纭鎻愪氦鍚�?"
+          @confirm="() =>handleCommit(record,'commit')"
+        >
                   <a>鎻愪氦</a>
                 </a-popconfirm>
                 <a-popconfirm
@@ -201,19 +197,18 @@
       </a-tab-pane>
     </a-tabs>
     <equipment-scrap-modal ref="modalForm" @ok="modalFormOk"></equipment-scrap-modal>
-    <approvel-modal ref="approvalModalForm" @ok='approvalModalFormOk' @cancel='approvalModalFormOk'></approvel-modal>
+    <approvel-modal ref="approvalModalForm" @ok="approvalModalFormOk" @cancel="approvalModalFormOk"></approvel-modal>
   </a-card>
 </template>
 
 <script>
 
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
 import EquipmentScrapModal from './modules/equipmentScrap/EquipmentScrapModal.vue'
 import EquipmentScrapDetailList from './modules/equipmentScrap/EquipmentScrapDetailList'
-import { getAction,postAction } from '@/api/manage'
-import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil'
+import { getAction, postAction } from '@/api/manage'
 import JEllipsis from '@/components/jeecg/JEllipsis'
-
 import '@/assets/less/TableExpand.less'
 import ApprovelModal from './modules/equipmentSeal/ApprovelModal'
 
@@ -245,7 +240,11 @@
           title: '鍗曟嵁鍙�',
           align: 'center',
           sorter: true,
-          dataIndex: 'num'
+          dataIndex: 'num',
+          scopedSlots: { customRender: 'num' },
+          width: 100,
+          ellipsis: true
+
         },
         {
           title: '瀹℃壒鐘舵��',
@@ -386,30 +385,30 @@
         }
         this.loading = false
       })
-      this.equipmentScrapDetailMainId = ""
+      this.equipmentScrapDetailMainId = ''
     },
     handleCommit(record, type) {
-        let url
+      let url
       type == 'commit' ? record.auditStatus = 'pendingApproval' : record.auditStatus = 'notSubmitted'
       type == 'commit' ? url = this.url.submit : url = this.url.revocation
       postAction(url, record).then(res => {
         if (res.success) {
           if (type === 'commit') {
-            this.$message.success("鎻愪氦鎴愬姛锛�");
+            this.$message.success('鎻愪氦鎴愬姛锛�')
           } else {
-            this.$message.success("鎾ゅ洖鎴愬姛锛�");
+            this.$message.success('鎾ゅ洖鎴愬姛锛�')
           }
 
-          this.loadData(1);
+          this.loadData(1)
         } else {
-          this.$message.warning(res.message);
+          this.$message.warning(res.message)
         }
       })
     },
     handleApprove: function(record) {
       let approve
       approve = this.url.approve
-      this.$refs.approvalModalForm.showModals(record, approve,'Approved','Rejected')
+      this.$refs.approvalModalForm.showModals(record, approve, 'Approved', 'Rejected')
       this.$refs.approvalModalForm.title = '瀹℃壒'
       this.$refs.approvalModalForm.disableSubmit = false
 
diff --git a/src/views/eam/EquipmentSealList.vue b/src/views/eam/EquipmentSealList.vue
index a2ee311..25b01dd 100644
--- a/src/views/eam/EquipmentSealList.vue
+++ b/src/views/eam/EquipmentSealList.vue
@@ -103,7 +103,9 @@
         :customRow="clickThenSelect"
         @change="handleTableChange"
       >
-
+<span slot="num" slot-scope="text">
+          <j-ellipsis :value="text" :length="15" />
+        </span>
         <template
           slot="htmlSlot"
           slot-scope="text"
@@ -286,7 +288,10 @@
           title: '鍗曟嵁鍙�',
           align: "center",
           sorter: true,
-          dataIndex: 'num'
+          dataIndex: 'num',
+          scopedSlots: { customRender: 'num' },
+          width: 100,
+          ellipsis: true
         },
         {
           title: '鍒涘缓浜�',
diff --git a/src/views/eam/EquipmentUnsealList.vue b/src/views/eam/EquipmentUnsealList.vue
index cb7b72c..1259867 100644
--- a/src/views/eam/EquipmentUnsealList.vue
+++ b/src/views/eam/EquipmentUnsealList.vue
@@ -110,7 +110,9 @@
         :customRow="clickThenSelect"
         @change="handleTableChange"
       >
-
+<span slot="num" slot-scope="text">
+          <j-ellipsis :value="text" :length="15" />
+        </span>
         <template
           slot="htmlSlot"
           slot-scope="text"
@@ -293,7 +295,10 @@
           title: '鍗曟嵁鍙�',
           align: 'center',
           sorter: true,
-          dataIndex: 'num'
+          dataIndex: 'num',
+          scopedSlots: { customRender: 'num' },
+          width: 100,
+          ellipsis: true
         },
         {
           title: '鍒涘缓浜�',
@@ -483,7 +488,7 @@
       }
       deleteAction(this.url.delete, { id: id }).then(res => {
         if (res.success) {
-          //閲嶆柊璁$畻鍒嗛〉闂    
+          //閲嶆柊璁$畻鍒嗛〉闂
           this.reCalculatePage(1)
           this.$message.success(res.message)
           this.loadData()
diff --git a/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue b/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue
index 99b6c58..330cf05 100644
--- a/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue
+++ b/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue
@@ -5,31 +5,60 @@
     <!--涓昏〃鍖哄煙 -->
     <!--    <a-tab-pane tab="璁惧鍙樺姩" :key="refKeys[0]" :forceRender="true" :class="'jeecg-tabs-top'" :animated="false">-->
     <j-form-container :disabled="formDisabled">
-    <a-form-model ref="form" :model="model" :rules="validatorRules">
-      <a-row>
-        <a-col :xs="24" :sm="24">
-          <a-form-model-item label="鍗曟嵁鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
-            <a-input v-model="model.num" placeholder="璇疯緭鍏ュ崟鎹彿"></a-input>
-          </a-form-model-item>
-        </a-col>
-        <!--                  <a-col :xs="24" :sm="12">-->
-        <!--                    <a-form-model-item label="瀹℃壒鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditStatus">-->
-        <!--                      <j-dict-select-tag type="list" v-model="model.auditStatus"  dictCode="audit_status" placeholder="璇烽�夋嫨瀹℃壒鐘舵��" disabled/>-->
-        <!--                    </a-form-model-item>-->
-        <!--                  </a-col>-->
-        <a-col :xs="24" :sm="12" v-show="false">
-          <a-form-model-item label="鍙樺姩鏂瑰紡" show="false" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="changeMethod">
-            <a-input v-model="model.changeMethod" placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" defaultValue="scrap"></a-input>
-          </a-form-model-item>
-        </a-col>
-        <a-col :xs="24" :sm="24">
-          <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
-            <a-textarea v-model="model.remark" rows="4" placeholder="璇疯緭鍏ュ娉�" />
-          </a-form-model-item>
-        </a-col>
-
-      </a-row>
-    </a-form-model>
+      <!-- 涓昏〃鍗曞尯鍩� -->
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="鍗曟嵁鍙�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="num"
+            >
+              <a-input
+                v-model="model.num"
+                placeholder="璇疯緭鍏ュ崟鎹彿"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col
+            :span="12"
+            :hidden=true
+          >
+            <a-form-model-item
+              label="鍙樺姩鏂瑰紡"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="changeMethod"
+            >
+              <a-input
+                v-model="model.changeMethod"
+                placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�"
+                defaultValue="seal"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="澶囨敞"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remark"
+            >
+              <a-textarea
+                v-model="model.remark"
+                rows="4"
+                placeholder="璇疯緭鍏ュ娉�"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
     </j-form-container>
     <!--     </a-tab-pane>-->
 

--
Gitblit v1.9.3