From 6c86748e1a987865cbf5bafa9b122c76bd24a695 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期二, 22 七月 2025 11:51:49 +0800
Subject: [PATCH] 技术状态变更及流程
---
src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue | 90 ++++++++++++++++++++++++++++++++++++---------
1 files changed, 72 insertions(+), 18 deletions(-)
diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue
index f8ee888..9f9fd47 100644
--- a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue
+++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue
@@ -3,10 +3,10 @@
<!-- 鏌ヨ鍖哄煙 -->
<div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
+ <a-row :gutter="24" style="width: 100%;">
<a-col :md="7" :sm="7">
<a-form-item label="鏃堕棿">
- <a-range-picker @change="dateParamChange" v-model="dates" format="YYYY-MM-DD HH:mm:ss"/>
+ <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/>
</a-form-item>
</a-col>
<a-col :md="5" :sm="5">
@@ -46,6 +46,8 @@
<!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!--<!–<a-button type="primary" icon="import">瀵煎叆</a-button>–>-->
<!--</a-upload>-->
+ <a-button type="primary" icon="printer" v-print="'#DeviceList'" v-has="'overtimeManagement:print'">鎵撳嵃</a-button>
+
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
@@ -79,6 +81,9 @@
</span>
<span slot="model" slot-scope="text" style="font-weight: bold">
<j-ellipsis :value="text" :length="8"/>
+ </span>
+ <span slot="duration" slot-scope="text">
+ {{text|getFormattedTime}}
</span>
</a-table>
</div>
@@ -145,12 +150,24 @@
queryParamPeople:{},
dataStartsoucre:[],
scrollY:465,
+ /* 鍒嗛〉鍙傛暟 */
+ ipagination:{
+ current: 1,
+ pageSize: 30,
+ pageSizeOptions: ['30', '50', '100'],
+ showTotal: (total, range) => {
+ return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
+ },
+ showQuickJumper: true,
+ showSizeChanger: true,
+ total: 0
+ },
columns: [
{
title: '璁惧缂栧彿',
align: 'center',
dataIndex: 'equipmentId',
- width:150
+ width:180
},
{
title: '璁惧鍚嶇О',
@@ -163,25 +180,25 @@
{
title: '鏃ユ湡',
align: 'center',
- dataIndex: 'effectiveDate',
- width:150
+ dataIndex: 'theDate',
+ width:180
// scopedSlots:{customRender:'startTime'},
// customRender:(text,row,index) => {
// return moment(text).format("YYYY-MM-DD HH:mm:ss")
// }
},
- {
- title: '鐝寮�濮嬫椂闂�',
- align: 'center',
- dataIndex: 'startDate',
- width:150
- },
- {
- title: '鐝缁撴潫鏃堕棿',
- align: 'center',
- dataIndex: 'endDate',
- width:150
- },
+ // {
+ // title: '鐝寮�濮嬫椂闂�',
+ // align: 'center',
+ // dataIndex: 'startDate',
+ // width:150
+ // },
+ // {
+ // title: '鐝缁撴潫鏃堕棿',
+ // align: 'center',
+ // dataIndex: 'endDate',
+ // width:150
+ // },
{
title: '鍔犵彮寮�濮嬫椂闂�',
align: 'center',
@@ -195,10 +212,17 @@
width:150
},
{
+ title: '鍔犵彮鏃堕暱',
+ align: 'center',
+ dataIndex: 'duration',
+ scopedSlots: {customRender: 'duration'},
+ width:200
+ },
+ {
title: '澶囨敞',
align: 'center',
dataIndex: 'remark',
- width:150
+ width:210
},
{
title: '鎿嶄綔',
@@ -257,6 +281,36 @@
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
+ filters:{
+ /**
+ * 鏍煎紡鍖栨椂闂�
+ * @param seconds 绉掓暟
+ * @returns '' 鏍煎紡鍖栧悗鏃堕棿瀛楃涓�
+ */
+ getFormattedTime(seconds) {
+ var hours = Math.floor(seconds / 3600)
+ var minutes = Math.floor((seconds % 3600) / 60)
+ var secs = seconds % 60
+
+ if (hours === 0) {
+ if (minutes === 0) {
+ return secs === 0 ? 0 : `${secs}绉抈
+ } else {
+ if (secs === 0) {
+ return `${minutes}鍒哷
+ }
+ return `${minutes}鍒� ${secs}绉抈
+ }
+ } else {
+ if (minutes === 0 && secs === 0) {
+ return `${hours}灏忔椂`
+ } else if (minutes !== 0 && secs === 0) {
+ return `${hours}灏忔椂 ${minutes}鍒哷
+ }
+ }
+ return `${hours}灏忔椂 ${minutes}鍒� ${secs}绉抈
+ }
+ },
methods: {
importTemplate(fileName){
var a = document.createElement("a");
--
Gitblit v1.9.3