Просмотр исходного кода

页面调整添加表格 action

Zimo 13 часов назад
Родитель
Сommit
1d812c31bd

+ 1 - 1
src/locales/zh-CN.ts

@@ -545,7 +545,7 @@ export default {
     name: '查询条件',
     nameHolder: '请输入查询条件',
     status: '工单状态',
-    createTime: '创建时间:',
+    createTime: '创建时间',
     start: '开始日期',
     end: '结束日期',
     search: '搜索',

+ 7 - 2
src/views/pms/iotlockstock/index.vue

@@ -375,7 +375,12 @@ onMounted(() => {
                 </template>
               </ZmTableColumn>
               <ZmTableColumn prop="unit" :label="t('workOrderMaterial.unit')" min-width="90" />
-              <ZmTableColumn prop="storageTime" :label="t('stock.storageTime')" min-width="180">
+              <ZmTableColumn
+                prop="storageTime"
+                :label="t('stock.storageTime')"
+                min-width="180"
+                action
+              >
                 <template #default="{ row }">
                   {{ dateFormatter(row, null, row.storageTime) }}
                 </template>
@@ -447,8 +452,8 @@ onMounted(() => {
   margin-bottom: 2px;
   font-size: 11px;
   font-weight: 500;
-  color: var(--el-text-color-regular);
   letter-spacing: 0;
+  color: var(--el-text-color-regular);
 }
 
 .stat-value {

+ 1 - 0
src/views/pms/iotrddailyreport/components/DailyStatistics.vue

@@ -526,6 +526,7 @@ const { ZmTable, ZmTableColumn } = useTableComponents()
                         label="设备利用率"
                         prop="utilizationRate"
                         cover-formatter
+                        action
                         :real-value="
                           (row: List) => (Number(row.utilizationRate ?? 0) * 100).toFixed(2) + '%'
                         "

+ 1 - 0
src/views/pms/iotrddailyreport/components/NonProductionEfficiency.vue

@@ -284,6 +284,7 @@ const { ZmTable, ZmTableColumn } = useTableComponents<ListItem>()
               label="自然时间"
               min-width="92"
               cover-formatter
+              action
               :real-value="(row: ListItem) => formatNumber(row.calendarTime)"
             />
           </zm-table>

+ 1 - 1
src/views/pms/iotrddailyreport/fillDailyReport.vue

@@ -274,7 +274,7 @@ function realValue(type: any, value: string) {
               :height="height"
               show-border
             >
-              <zm-table-column label="操作" width="140" fixed="left">
+              <zm-table-column label="操作" width="140" fixed="left" action>
                 <template #default="scope">
                   <el-button
                     link

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

@@ -504,7 +504,7 @@ onMounted(() => {
                   </el-tag>
                 </template>
               </zm-table-column>
-              <zm-table-column label="操作" width="120" fixed="right">
+              <zm-table-column label="操作" width="120" fixed="right" action>
                 <template #default="scope">
                   <el-button
                     link

+ 1 - 1
src/views/pms/iotrddailyreport/statistics.vue

@@ -291,7 +291,7 @@ function handleWellNameClick(taskId: number) {
                 cover-formatter
                 :real-value="(row) => (Number(row.nonProductionRate ?? 0) * 100).toFixed(2) + '%'"
               />
-              <zm-table-column prop="manufactureName" label="甲方" />
+              <zm-table-column prop="manufactureName" label="甲方" action />
             </zm-table>
           </template>
         </el-auto-resizer>

+ 2 - 1
src/views/pms/iotrhdailyreport/rh-table.vue

@@ -264,10 +264,11 @@ function handleCurrentChange(val: number) {
               prop="capacity"
               label="产能(万方)"
               cover-formatter
+              :action="!showAction"
               :real-value="unitformatter"
             />
 
-            <zm-table-column label="操作" :width="120" fixed="right" v-if="showAction">
+            <zm-table-column label="操作" :width="120" fixed="right" action v-if="showAction">
               <template #default="scope">
                 <slot name="action" :row="scope.row"></slot>
               </template>

+ 3 - 1
src/views/pms/iotrhdailyreport/summary.vue

@@ -222,7 +222,8 @@ const columns = (type: string) => {
       : []),
     {
       label: '设备利用率(%)',
-      prop: 'utilizationRate'
+      prop: 'utilizationRate',
+      action: true
     }
   ]
 }
@@ -912,6 +913,7 @@ const { ZmTable, ZmTableColumn } = useTableComponents()
                           :label="item.label"
                           :prop="item.prop"
                           :formatter="formatter"
+                          :action="item.action"
                         />
                         <zm-table-column
                           v-else-if="item.prop === 'name'"

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

@@ -404,9 +404,13 @@ function handleCurrentChange(val: number) {
               <zm-table-column prop="partyaResource" label="甲方资源" />
               <zm-table-column prop="otherNptTime" label="其它非生产时间" />
             </zm-table-column>
-            <zm-table-column prop="otherNptReason" label="其他非生产时间原因" />
+            <zm-table-column
+              prop="otherNptReason"
+              label="其他非生产时间原因"
+              :action="!showAction"
+            />
 
-            <zm-table-column label="操作" :width="120" fixed="right" v-if="showAction">
+            <zm-table-column label="操作" :width="120" fixed="right" action v-if="showAction">
               <template #default="scope">
                 <slot name="action" :row="scope.row"></slot>
               </template>

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

@@ -453,9 +453,9 @@ function handleCurrentChange(val: number) {
                   (Number(row.totalStaffNum) || 0) - (Number(row.offDutyStaffNum) || 0)
               "
             />
-            <zm-table-column prop="leaveStaffNum" label="休假人员数量" />
+            <zm-table-column prop="leaveStaffNum" label="休假人员数量" :action="!showAction" />
 
-            <zm-table-column label="操作" :width="120" fixed="right" v-if="showAction">
+            <zm-table-column label="操作" :width="120" fixed="right" action v-if="showAction">
               <template #default="scope">
                 <slot name="action" :row="scope.row"></slot>
               </template>

+ 3 - 1
src/views/pms/iotrydailyreport/summary.vue

@@ -176,7 +176,8 @@ const columns = (type: string) => {
     },
     {
       label: '设备利用率(%)',
-      prop: 'utilizationRate'
+      prop: 'utilizationRate',
+      action: true
     }
   ]
 }
@@ -707,6 +708,7 @@ const tolist = (id: number, non: boolean = false) => {
                           :label="item.label"
                           :prop="item.prop"
                           :formatter="formatter"
+                          :action="item.action"
                         />
                         <zm-table-column
                           v-else-if="item.prop === 'name'"

+ 3 - 1
src/views/pms/iotrydailyreport/xsummary.vue

@@ -182,7 +182,8 @@ const columns = (type: string) => {
     },
     {
       label: '设备利用率(%)',
-      prop: 'utilizationRate'
+      prop: 'utilizationRate',
+      action: true
     }
   ]
 }
@@ -706,6 +707,7 @@ const tolist = (id: number, non: boolean = false) => {
                           :label="item.label"
                           :prop="item.prop"
                           :formatter="formatter"
+                          :action="item.action"
                         />
                         <zm-table-column
                           v-else-if="item.prop === 'name'"

+ 2 - 1
src/views/pms/iotsapstock/IotSapStockConfig.vue

@@ -159,7 +159,7 @@ const handleExport = async () => {
   }
 }
 
-const formatNumber = (value: unknown) => erpPriceTableColumnFormatter(null, null, value)
+const formatNumber = (value: unknown) => erpPriceTableColumnFormatter(null, null, value, null)
 
 onMounted(() => {
   loadSapOrgOptions()
@@ -329,6 +329,7 @@ onMounted(() => {
                 prop="createTime"
                 :label="t('chooseMaintain.createTime')"
                 min-width="180"
+                action
               >
                 <template #default="{ row }">
                   {{ dateFormatter(row, null, row.createTime) }}

+ 2 - 1
src/views/pms/iotsapstock/index.vue

@@ -373,6 +373,7 @@ onMounted(() => {
                 prop="createTime"
                 :label="t('chooseMaintain.createTime')"
                 min-width="180"
+                action
               >
                 <template #default="{ row }">
                   {{ dateFormatter(row, null, row.createTime) }}
@@ -432,8 +433,8 @@ onMounted(() => {
   margin-bottom: 2px;
   font-size: 11px;
   font-weight: 500;
-  color: var(--el-text-color-regular);
   letter-spacing: 0;
+  color: var(--el-text-color-regular);
 }
 
 .stat-value {

+ 1 - 1
src/views/report-statistics/costs.vue

@@ -377,7 +377,7 @@ const handleChange = () => {
               <ZmTableColumn label="类别" prop="type" min-width="120" />
               <ZmTableColumn label="设备编号" prop="deviceCode" min-width="150" />
               <ZmTableColumn label="设备名称" prop="deviceName" min-width="180" />
-              <ZmTableColumn label="成本" prop="cost" min-width="120">
+              <ZmTableColumn label="成本" prop="cost" min-width="120" action>
                 <template #default="{ row }"> {{ row.cost ?? 0 }}元 </template>
               </ZmTableColumn>
             </ZmTable>

+ 1 - 1
src/views/report-statistics/work-order-completion.vue

@@ -445,7 +445,7 @@ async function handleExport() {
               <ZmTableColumn label="项目部" prop="project" min-width="160" />
               <ZmTableColumn label="队伍" prop="deptName" min-width="140" />
               <ZmTableColumn label="状态" prop="status" min-width="100" />
-              <ZmTableColumn label="设备" prop="device" min-width="180" />
+              <ZmTableColumn label="设备" prop="device" min-width="180" action />
             </ZmTable>
           </template>
         </el-auto-resizer>