From 90794c60e1e38c5d7d5590faabdeed0944b2d53a Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 20 三月 2025 15:39:13 +0800
Subject: [PATCH] 调整设备台账页面功能模态窗样式

---
 src/views/eam/equipment/modules/EamEquipmentModal.vue |  280 +++++++++++++++++++++++++++++--------------------------
 1 files changed, 146 insertions(+), 134 deletions(-)

diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue
index dcdab11..a91f44e 100644
--- a/src/views/eam/equipment/modules/EamEquipmentModal.vue
+++ b/src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -3,60 +3,61 @@
     :title="title"
     :width="1200"
     :visible="visible"
+    centered
     :confirmLoading="confirmLoading"
     switchFullscreen
     @ok="handleOk"
     @cancel="handleCancel"
     cancelText="鍏抽棴">
     <a-spin :spinning="confirmLoading">
-      <a-form-model ref="form" :model="model" :rules="validatorRules">
-        <a-divider
-          orientation="center"
-          style="font-size: large;font-style: italic;color: #66aeed;"
-        > 璁惧鍩虹淇℃伅
+      <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
+        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 璁惧鍩虹淇℃伅
         </a-divider>
+
         <a-row :gutter="24">
           <a-col :span="18">
             <a-row>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentCode" label="璁惧缂栧彿">
-                  <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="model.equipmentCode" />
+                <a-form-model-item prop="equipmentCode" label="璁惧缂栧彿">
+                  <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="model.equipmentCode"/>
                 </a-form-model-item>
               </a-col>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentName" label="璁惧鍚嶇О">
-                  <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="model.equipmentName" />
+                <a-form-model-item prop="equipmentName" label="璁惧鍚嶇О">
+                  <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="model.equipmentName"/>
                 </a-form-model-item>
               </a-col>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentModel" label="璁惧鍨嬪彿">
-                  <a-input placeholder="璇疯緭鍏ヨ澶囧瀷鍙�" v-model="model.equipmentModel" />
+                <a-form-model-item prop="equipmentModel" label="璁惧鍨嬪彿">
+                  <a-input placeholder="璇疯緭鍏ヨ澶囧瀷鍙�" v-model="model.equipmentModel"/>
                 </a-form-model-item>
               </a-col>
             </a-row>
+
             <a-row>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentSpecification"
+                <a-form-model-item prop="equipmentSpecification"
                                    label="璁惧瑙勬牸">
-                  <a-input placeholder="璇疯緭鍏ヨ澶囪鏍�" v-model="model.equipmentSpecification" />
+                  <a-input placeholder="璇疯緭鍏ヨ澶囪鏍�" v-model="model.equipmentSpecification"/>
                 </a-form-model-item>
               </a-col>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentCategory"
+                <a-form-model-item prop="equipmentCategory"
                                    label="璁惧鍒嗙被">
-                  <j-dict-select-tag dict-code="equipment_category" placeholder="璇烽�夋嫨璁惧鍒嗙被" v-model="model.equipmentCategory" />
+                  <j-dict-select-tag dict-code="equipment_category" placeholder="璇烽�夋嫨璁惧鍒嗙被"
+                                     v-model="model.equipmentCategory"/>
                 </a-form-model-item>
               </a-col>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationSystem"
+                <a-form-model-item prop="operationSystem"
                                    label="鎿嶄綔绯荤粺">
-                  <a-input placeholder="璇疯緭鍏ユ搷浣滅郴缁�" v-model="model.operationSystem" />
+                  <a-input placeholder="璇疯緭鍏ユ搷浣滅郴缁�" v-model="model.operationSystem"/>
                 </a-form-model-item>
               </a-col>
             </a-row>
             <a-row>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentImportance"
+                <a-form-model-item prop="equipmentImportance"
                                    label="鍏抽敭璁惧鏍囪瘑">
                   <lx-switch
                     checked-children='鏄�'
@@ -66,13 +67,13 @@
                 </a-form-model-item>
               </a-col>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentPower" label="鎬诲姛鐜�">
-                  <a-input placeholder="璇疯緭鍏ユ�诲姛鐜�" v-model="model.equipmentPower" />
+                <a-form-model-item prop="equipmentPower" label="鎬诲姛鐜�">
+                  <a-input placeholder="璇疯緭鍏ユ�诲姛鐜�" v-model="model.equipmentPower"/>
                 </a-form-model-item>
               </a-col>
               <a-col :span="8">
-                <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cardNumber" label="绔嬮」鍗″彿">
-                  <a-input placeholder="璇疯緭鍏ョ珛椤瑰崱鍙�" v-model="model.cardNumber" />
+                <a-form-model-item prop="cardNumber" label="绔嬮」鍗″彿">
+                  <a-input placeholder="璇疯緭鍏ョ珛椤瑰崱鍙�" v-model="model.cardNumber"/>
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -81,156 +82,134 @@
             <j-image-upload></j-image-upload>
           </a-col>
         </a-row>
-        <a-row :gutter="24">
-          <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentWeight" label="閲嶉噺">
-              <a-input placeholder="璇疯緭鍏ラ噸閲�" v-model="model.equipmentWeight" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentPort" label="璁惧绔彛">
-              <a-input placeholder="璇疯緭鍏ヨ澶囩鍙�" v-model="model.equipmentPort" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coordinateNum" label="鍧愭爣鏁伴噺">
-              <a-input-number v-model="model.coordinateNum" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="assetStatus" label="璧勪骇鐘舵��">
-              <j-dict-select-tag dict-code="asset_status" placeholder="璇烽�夋嫨璧勪骇鐘舵��" v-model="model.assetStatus" disabled/>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-divider
-          orientation="center"
-          style="font-size: large;font-style: italic;color: #66aeed;"
-        > 鍑哄巶淇℃伅
-        </a-divider>
-        <a-row :gutter="24">
-          <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryNumber" label="鍑哄巶缂栧彿">
-              <a-input placeholder="璇疯緭鍏ュ嚭鍘傜紪鍙�" v-model="model.factoryNumber" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leaveFactoryDate" label="鍑哄巶鏃ユ湡">
-              <a-date-picker placeholder="璇烽�夋嫨鍑哄巶鏃ユ湡" v-model="model.leaveFactoryDate" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="acceptanceCheckDate"
-                               label="楠屾敹鏃ユ湡">
-              <a-date-picker placeholder="璇烽�夋嫨楠屾敹鏃ユ湡" v-model="model.acceptanceCheckDate" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="installationPosition"
-                               label="瀹夎浣嶇疆">
-              <a-input placeholder="璇疯緭鍏ュ畨瑁呬綅缃�" v-model="model.installationPosition" />
-            </a-form-model-item>
-          </a-col>
 
-        </a-row>
         <a-row :gutter="24">
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spindleConnectDimension"
-                               label="涓昏酱杩炴帴灏哄">
-              <a-input placeholder="璇疯緭鍏ヤ富杞磋繛鎺ュ昂瀵�" v-model="model.spindleConnectDimension" />
+            <a-form-model-item prop="equipmentWeight" label="閲嶉噺">
+              <a-input placeholder="璇疯緭鍏ラ噸閲�" v-model="model.equipmentWeight"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specialEquipment"
-                               label="鏄惁鐗圭璁惧">
-              <lx-switch
-                checked-children='鏄�'
-                un-checked-children='鍚�'
-                v-model="model.specialEquipment"
-              />
+            <a-form-model-item prop="equipmentPort" label="璁惧绔彛">
+              <a-input placeholder="璇疯緭鍏ヨ澶囩鍙�" v-model="model.equipmentPort"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufacturingEnterprise"
-                               label="鍒堕�犲巶瀹�">
-              <a-input placeholder="璇疯緭鍏ュ埗閫犲巶瀹�" v-model="model.manufacturingEnterprise" />
+            <a-form-model-item prop="coordinateNum" label="鍧愭爣鏁伴噺">
+              <a-input-number v-model="model.coordinateNum" style="width: 100%"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="originCountry" label="鏉ユ簮鍥藉">
-              <a-input placeholder="璇疯緭鍏ユ潵婧愬浗瀹�" v-model="model.originCountry" />
+            <a-form-model-item prop="assetStatus" label="璧勪骇鐘舵��">
+              <j-dict-select-tag dict-code="asset_status" placeholder="璇烽�夋嫨璧勪骇鐘舵��" v-model="model.assetStatus"
+                                 disabled/>
             </a-form-model-item>
           </a-col>
         </a-row>
-        <a-divider
-          orientation="center"
-          style="font-size: large;font-style: italic;color: #66aeed;"
-        > 浣跨敤淇℃伅
+
+        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍑哄巶淇℃伅
         </a-divider>
+
         <a-row :gutter="24">
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgId" label="浣跨敤閮ㄩ棬">
-              <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄩ儴闂�" v-model="model.orgId" />
+            <a-form-model-item prop="factoryNumber" label="鍑哄巶缂栧彿">
+              <a-input placeholder="璇疯緭鍏ュ嚭鍘傜紪鍙�" v-model="model.factoryNumber"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentManager" label="璁惧绠$悊鍛�">
-              <a-input placeholder="璇疯緭鍏ヨ澶囩鐞嗗憳" v-model="model.equipmentManager" />
+            <a-form-model-item prop="leaveFactoryDate" label="鍑哄巶鏃ユ湡">
+              <a-date-picker placeholder="璇烽�夋嫨鍑哄巶鏃ユ湡" v-model="model.leaveFactoryDate"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologyStatus" label="鎶�鏈姸鎬�">
-              <j-dict-select-tag dict-code="technology_status" placeholder="璇烽�夋嫨鎶�鏈姸鎬�" v-model="model.technologyStatus" />
+            <a-form-model-item prop="acceptanceCheckDate" label="楠屾敹鏃ユ湡">
+              <a-date-picker placeholder="璇烽�夋嫨楠屾敹鏃ユ湡" v-model="model.acceptanceCheckDate"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mdcFlag" label="鏄惁瀹炴柦MDC">
-              <lx-switch
-                checked-children='鏄�'
-                un-checked-children='鍚�'
-                v-model="model.mdcFlag"
-              />
+            <a-form-model-item prop="installationPosition" label="瀹夎浣嶇疆">
+              <a-input placeholder="璇疯緭鍏ュ畨瑁呬綅缃�" v-model="model.installationPosition"/>
             </a-form-model-item>
           </a-col>
         </a-row>
+
         <a-row :gutter="24">
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warrantyStartDate"
-                               label="璐ㄤ繚寮�濮嬫棩鏈�">
-              <a-date-picker placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" v-model="model.warrantyStartDate" />
+            <a-form-model-item prop="spindleConnectDimension" label="涓昏酱杩炴帴灏哄">
+              <a-input placeholder="璇疯緭鍏ヤ富杞磋繛鎺ュ昂瀵�" v-model="model.spindleConnectDimension"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warrantyEndDate"
-                               label="璐ㄤ繚缁撴潫鏃ユ湡">
-              <a-date-picker placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" v-model="model.warrantyEndDate" />
+            <a-form-model-item prop="specialEquipment" label="鏄惁鐗圭璁惧">
+              <lx-switch checked-children='鏄�' un-checked-children='鍚�' v-model="model.specialEquipment"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processParametersFlag"
-                               label="鏈夋棤宸ヨ壓鍙傛暟">
-              <lx-switch
-                checked-children='鏈�'
-                un-checked-children='鏃�'
-                v-model="model.processParametersFlag"
-              />
+            <a-form-model-item prop="manufacturingEnterprise" label="鍒堕�犲巶瀹�">
+              <a-input placeholder="璇疯緭鍏ュ埗閫犲巶瀹�" v-model="model.manufacturingEnterprise"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="6">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="precisionParametersFlag"
-                               label="鏈夋棤绮惧害鍙傛暟">
-              <lx-switch
-                checked-children='鏈�'
-                un-checked-children='鏃�'
-                v-model="model.precisionParametersFlag"
-              />
+            <a-form-model-item prop="originCountry" label="鏉ユ簮鍥藉">
+              <a-input placeholder="璇疯緭鍏ユ潵婧愬浗瀹�" v-model="model.originCountry"/>
             </a-form-model-item>
           </a-col>
         </a-row>
+
+        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 浣跨敤淇℃伅
+        </a-divider>
+
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-model-item prop="orgId" label="浣跨敤閮ㄩ棬">
+              <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄩ儴闂�" v-model="model.orgId"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item prop="equipmentManager" label="璁惧绠$悊鍛�">
+              <a-input placeholder="璇疯緭鍏ヨ澶囩鐞嗗憳" v-model="model.equipmentManager"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item prop="technologyStatus" label="鎶�鏈姸鎬�">
+              <j-dict-select-tag dict-code="technology_status" placeholder="璇烽�夋嫨鎶�鏈姸鎬�"
+                                 v-model="model.technologyStatus"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item prop="mdcFlag" label="鏄惁瀹炴柦MDC">
+              <lx-switch checked-children='鏄�' un-checked-children='鍚�' v-model="model.mdcFlag"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-model-item prop="warrantyStartDate" label="璐ㄤ繚寮�濮嬫棩鏈�">
+              <a-date-picker placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" v-model="model.warrantyStartDate"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item prop="warrantyEndDate" label="璐ㄤ繚缁撴潫鏃ユ湡">
+              <a-date-picker placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" v-model="model.warrantyEndDate"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item prop="processParametersFlag" label="鏈夋棤宸ヨ壓鍙傛暟">
+              <lx-switch checked-children='鏈�' un-checked-children='鏃�' v-model="model.processParametersFlag"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item prop="precisionParametersFlag" label="鏈夋棤绮惧害鍙傛暟">
+              <lx-switch checked-children='鏈�' un-checked-children='鏃�' v-model="model.precisionParametersFlag"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+
         <a-row :gutter="24">
           <a-col :span="24">
-            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark" label="澶囨敞">
-              <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" />
+            <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞">
+              <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -252,13 +231,20 @@
       model: {},
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 10 }
+        sm: { span: 9 }
       },
       wrapperCol: {
         xs: { span: 24 },
         sm: { span: 14 }
       },
-
+      labelColLong: {
+        xs: { span: 24 },
+        sm: { span: 2 }
+      },
+      wrapperColLong: {
+        xs: { span: 24 },
+        sm: { span: 22 }
+      },
       confirmLoading: false,
       validatorRules: {
         equipmentCode: [
@@ -266,20 +252,20 @@
           { validator: (rule, value, callback) => validateDuplicateValueInDelFlag('eam_equipment', 'equipment_code', value, this.model.id, true, callback) }
         ],
         equipmentName: [
-          { required: true, message: '璇疯緭鍏ヨ澶囧悕绉�' },
+          { required: true, message: '璇疯緭鍏ヨ澶囧悕绉�' }
         ],
         equipmentCategory: [
-          { required: true, message: '璇烽�夋嫨璁惧鍒嗙被' },
+          { required: true, message: '璇烽�夋嫨璁惧鍒嗙被' }
         ],
         leaveFactoryDate: [
-          { required: true, message: '璇烽�夋嫨鍑哄巶鏃ユ湡' },
+          { required: true, message: '璇烽�夋嫨鍑哄巶鏃ユ湡' }
         ],
         acceptanceCheckDate: [
-          { required: true, message: '璇烽�夋嫨楠屾敹鏃ユ湡' },
+          { required: true, message: '璇烽�夋嫨楠屾敹鏃ユ湡' }
         ],
         technologyStatus: [
-          { required: true, message: '璇烽�夋嫨鎶�鏈姸鎬�' },
-        ],
+          { required: true, message: '璇烽�夋嫨鎶�鏈姸鎬�' }
+        ]
       },
       url: {
         add: '/eam/equipment/add',
@@ -343,5 +329,31 @@
 </script>
 
 <style lang="less" scoped>
+/deep/ .ant-modal-body {
+  padding: 0 24px;
+}
 
+/deep/ .ant-upload {
+  width: 185px;
+  height: 185px;
+}
+
+/deep/ .img {
+  display: flex;
+  justify-content: center;
+
+  .ant-upload-picture-card-wrapper {
+    width: auto;
+  }
+}
+
+/deep/ .ant-upload-list-picture-card-container {
+  width: 185px;
+  height: 185px;
+}
+
+/deep/ .ant-upload-list-item {
+  width: 185px;
+  height: 185px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3