Browse Source

[Mod 0000]矿山基础信息页面按钮增加提示、修改字段为textarea

wangkeyi 3 tháng trước cách đây
mục cha
commit
fe2b62667e

+ 1 - 0
package.json

@@ -137,6 +137,7 @@
     "postcss": "^8.5.6",
     "postcss-html": "^1.8.0",
     "postcss-less": "^6.0.0",
+    "postcss-pxtorem": "^6.1.0",
     "prettier": "^3.7.4",
     "pretty-quick": "^4.2.2",
     "rimraf": "^5.0.10",

+ 1 - 1
src/views/dashboard/basicInfo/closedStatistics/index.vue

@@ -2,7 +2,7 @@
   <div class="p-4">
     <BasicTable @register="registerTable" :scroll="{ x: 'fit-content' }">
       <template #action="{ record }">
-          <button @click="handleGoToPage(record, `/sealed/${record.code}`)" class="action-btn">
+          <button @click="handleGoToPage(record, `/sealed/${record.code}`)" class="action-btn" title="密闭监测数据">
             <SvgIcon name="view" />
           </button>
         </template>

+ 1 - 0
src/views/dashboard/basicInfo/dataQuality/components/DataQualityModal.vue

@@ -140,6 +140,7 @@ const componentMap = {
   Input,
   DatePicker,
   Select,
+  InputTextArea: Input.TextArea,
   MineCascader
 };
 

+ 20 - 15
src/views/dashboard/basicInfo/dataQuality/dataQuality.data.ts

@@ -159,16 +159,6 @@ export const formSchema :FormSchema[] = [
       { max: 100, message: '工作面名称长度不能超过100个字符', trigger: 'blur' },
     ],
   },
-  {
-    field: 'queCon',
-    label: '问题描述',
-    component: 'Input',
-    required: true,
-    rules: [
-      { required: true, message: '请输入问题描述', trigger: 'blur' },
-      { max: 500, message: '问题描述长度不能超过500个字符', trigger: 'blur' },
-    ],
-  },
   {
     field: 'startTime',
     label: '开始时间',
@@ -196,13 +186,28 @@ export const formSchema :FormSchema[] = [
     ],
   },
   {
-    field: 'param',
-    label: '参数',
-    component: 'Input',
+    field: 'queCon',
+    label: '问题描述',
+    component: 'InputTextArea',
+    componentProps: {
+      rows: 4,
+      maxlength: 500,
+      showCount: true,
+    },
     required: true,
     rules: [
-      { required: true, message: '请输入参数', trigger: 'blur' },
-      { max: 200, message: '参数长度不能超过200个字符', trigger: 'blur' },
+      { required: true, message: '请输入问题描述', trigger: 'blur' },
+      { max: 500, message: '问题描述长度不能超过500个字符', trigger: 'blur' },
     ],
   },
+  // {
+  //   field: 'param',
+  //   label: '参数',
+  //   component: 'Input',
+  //   required: true,
+  //   rules: [
+  //     { required: true, message: '请输入参数', trigger: 'blur' },
+  //     { max: 200, message: '参数长度不能超过200个字符', trigger: 'blur' },
+  //   ],
+  // },
 ];

+ 7 - 8
src/views/dashboard/basicInfo/dataQuality/index.vue

@@ -16,14 +16,13 @@
             <span style=" white-space: pre-line; word-wrap: break-word; line-height: 1.6; display: block; text-align: left; padding: 2px 4px;">
               {{ record?.queJson ? formatQueJson(record.queJson) : '' }}
             </span>
-            <!-- 按钮:无需额外样式,自然靠最右侧 -->
-            <button @click="record && handleOpenModal(record, 'view')" class="action-btn">
+            <button @click="record && handleOpenModal(record, 'view')" class="action-btn" title="查看问题详情">
               <SvgIcon name="view" />
             </button>
           </div>
         </template>
         <template #action="{ record }">
-          <button @click="handleOpenModal(record, 'edit')" class="action-btn">
+          <button @click="handleOpenModal(record, 'edit')" class="action-btn" title="编辑该问题">
             <SvgIcon name="edit" />
           </button>
           <!-- 删除按钮 -->
@@ -36,7 +35,7 @@
             @cancel="handleCancel"
             placement="top"
           >
-            <button class="action-btn">
+            <button class="action-btn" title="删除该问题">
               <SvgIcon name="delete" />
             </button>
           </Popconfirm>
@@ -49,11 +48,11 @@
             @cancel="handleCancel"
             placement="top"
           >
-            <button class="action-btn">
+            <button class="action-btn" title="标记该问题为已解决">
               <SvgIcon name="resolved" />
             </button>
           </Popconfirm>
-          <button @click="handleGoToPage(record)" class="action-btn">
+          <button @click="handleGoToPage(record)" class="action-btn" title="监测详情">
             <SvgIcon name="details" />
           </button>
         </template>
@@ -70,13 +69,13 @@
               {{ record?.queJson ? formatQueJson(record.queJson) : '' }}
             </span>
             <!-- 按钮:无需额外样式,自然靠最右侧 -->
-            <button @click="record && handleOpenModal(record, 'view')" class="action-btn">
+            <button @click="record && handleOpenModal(record, 'view')" class="action-btn" title="查看问题详情">
               <SvgIcon name="view" />
             </button>
           </div>
         </template>
         <template #action="{ record }">
-          <button @click="handleOpenModal(record, 'view')" class="action-btn">
+          <button @click="handleOpenModal(record, 'view')" class="action-btn" title="问题详情">
             <SvgIcon name="details" />
           </button>
         </template>

+ 3 - 3
src/views/dashboard/basicInfo/minesInfo/index.vue

@@ -2,13 +2,13 @@
 <template>
   <BasicTable @register="registerTable">
     <template #action="{ record }">
-      <button @click="handleGoToPageQuery(record, `/sealed/${record.areaId}`)" class="action-btn">
+      <button @click="handleGoToPageQuery(record, `/sealed/${record.areaId}`)" class="action-btn" title="密闭监测数据">
         <SvgIcon name="data" />
       </button>
-      <button @click="handleGoToPage(record, '/basicinfo/access-statistics')" class="action-btn">
+      <button @click="handleGoToPage(record, '/basicinfo/access-statistics')" class="action-btn" title="接入统计数据">
         <SvgIcon name="info" />
       </button>
-      <button @click="handleGoToPageQuery(record, '/warningAnalysis/connectAnalysis')" class="action-btn">
+      <button @click="handleGoToPageQuery(record, '/warningAnalysis/connectAnalysis')" class="action-btn" title="智能分析数据">
         <SvgIcon name="chart" />
       </button>
     </template>