Browse Source

调整生产动态表格高度

Zimo 1 tuần trước cách đây
mục cha
commit
ee441a248e

+ 1 - 1
.env.local

@@ -4,7 +4,7 @@ NODE_ENV=development
 VITE_DEV=true
 
 # 请求路径  http://192.168.188.79:48080  https://iot.deepoil.cc  http://172.26.0.56:48080
-VITE_BASE_URL='http://192.168.188.198:48080'
+VITE_BASE_URL='https://iot.deepoil.cc'
 
 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
 VITE_UPLOAD_TYPE=server

+ 4 - 4
src/components/ZmTable/ZmTableColumn.vue

@@ -115,14 +115,14 @@ const calculativeWidth = () => {
     .map((item) => props.realValue?.(item) || item[props.prop])
     .filter(Boolean)
 
-  let labelWidth = getTextWidth(bindProps.value.label || '') + 30
+  let labelWidth = getTextWidth(bindProps.value.label || '') + 32
 
   if (props.zmFilterable || props.zmSortable) labelWidth += 8
-  if (props.zmFilterable) labelWidth += 20
-  if (props.zmSortable) labelWidth += 20
+  if (props.zmFilterable) labelWidth += 22
+  if (props.zmSortable) labelWidth += 22
 
   const maxWidth = Math.min(
-    Math.max(...values.map((value) => getTextWidth(value) + 30), labelWidth),
+    Math.max(...values.map((value) => getTextWidth(value) + 38), labelWidth),
     360
   )
 

+ 3 - 3
src/views/pms/iotrddailyreport/index.vue

@@ -332,7 +332,7 @@ onMounted(() => {
               </zm-table-column>
               <zm-table-column
                 prop="reportDetails"
-                label="当日生产动态"
+                label="生产动态"
                 width="320"
                 :show-overflow-tooltip="false"
               >
@@ -343,10 +343,10 @@ onMounted(() => {
                         <el-badge
                           :value="row.reportDetails.length"
                           type="primary"
-                          class="max-w-full"
+                          class="max-w-full translate-y-0.5"
                         >
                           <div
-                            class="w-72 flex flex-col bg-gray-200/80 hover:bg-blue-100 transition-colors relative group cursor-pointer p-2 rounded gap-y-2"
+                            class="w-72 flex flex-col bg-gray-200/80 hover:bg-blue-100 transition-colors relative group cursor-pointer px-2 py-0.5 rounded gap-y-2"
                           >
                             <div class="flex items-center gap-x-2">
                               <div class="flex items-center">

+ 6 - 2
src/views/pms/iotrydailyreport/ry-table.vue

@@ -230,9 +230,13 @@ function handleCurrentChange(val: number) {
                 <div v-if="row.reportDetails && row.reportDetails.length > 0" class="py-2">
                   <el-popover placement="right" trigger="hover" width="320" popper-class="!p-0">
                     <template #reference>
-                      <el-badge :value="row.reportDetails.length" type="primary" class="max-w-full">
+                      <el-badge
+                        :value="row.reportDetails.length"
+                        type="primary"
+                        class="max-w-full translate-y-0.5"
+                      >
                         <div
-                          class="w-72 flex flex-col bg-gray-200/80 hover:bg-blue-100 transition-colors relative group cursor-pointer p-2 rounded gap-y-2"
+                          class="w-72 flex flex-col bg-gray-200/80 hover:bg-blue-100 transition-colors relative group cursor-pointer px-2 py-0.5 rounded gap-y-2"
                         >
                           <div class="flex items-center gap-x-2">
                             <div class="flex items-center">

+ 6 - 2
src/views/pms/iotrydailyreport/ry-xj-table.vue

@@ -261,9 +261,13 @@ function handleCurrentChange(val: number) {
                 <div v-if="row.reportDetails && row.reportDetails.length > 0" class="py-2">
                   <el-popover placement="right" trigger="hover" width="320" popper-class="p-0!">
                     <template #reference>
-                      <el-badge :value="row.reportDetails.length" type="primary" class="max-w-full">
+                      <el-badge
+                        :value="row.reportDetails.length"
+                        type="primary"
+                        class="max-w-full translate-y-0.5"
+                      >
                         <div
-                          class="w-72 flex flex-col bg-gray-200/80 hover:bg-blue-100 transition-colors relative group cursor-pointer p-2 rounded gap-y-2"
+                          class="w-72 flex flex-col bg-gray-200/80 hover:bg-blue-100 transition-colors relative group cursor-pointer px-2 py-0.5 rounded gap-y-2"
                         >
                           <div class="flex items-center gap-x-2">
                             <div class="flex items-center">