From a751e547d67c4f8e2c6fddf958c1559f792515bd Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期五, 27 六月 2025 16:11:50 +0800 Subject: [PATCH] 添加工作流 --- src/views/eam/modules/maintenancePlan/StandardSelect.vue | 88 +++++++++++++++++++++++++++---------------- 1 files changed, 55 insertions(+), 33 deletions(-) diff --git a/src/views/eam/modules/maintenancePlan/StandardSelect.vue b/src/views/eam/modules/maintenancePlan/StandardSelect.vue index 59a841e..2838d36 100644 --- a/src/views/eam/modules/maintenancePlan/StandardSelect.vue +++ b/src/views/eam/modules/maintenancePlan/StandardSelect.vue @@ -8,7 +8,7 @@ @cancel="close" style="top:50px" cancelText="鍏抽棴" - :width="2000" + :width="1600" > <a-card :bordered="false"> <div class="table-page-search-wrapper"> @@ -39,38 +39,39 @@ /> </a-form-item> </a-col> - <!-- 鎸変腑蹇冩煡璇� --> + <!-- 鎸変腑蹇冩煡璇� --> <a-col :md="6" - :sm="6" > + :sm="6" + > <a-form-item label="涓績"> <j-dict-select-tag - allow-clear - placeholder="璇烽�夋嫨涓績" - :triggerChange="true" - dictCode="mom_base_area,name,id,del_flag!='1' and type='1'" - v-model="queryParam.workCenterId" - /> + allow-clear + placeholder="璇烽�夋嫨涓績" + :triggerChange="true" + dictCode="mom_base_area,name,id,del_flag!='1' and type='1'" + v-model="queryParam.workCenterId" + /> </a-form-item> - </a-col> + </a-col> <a-col :md="6" - :sm="6"> - <a-form-model-item - label="涓嬫涓変繚鏃堕棿" - prop="ranges" + :sm="6" > + <a-form-model-item + label="涓嬫涓変繚鏃堕棿" + prop="ranges" + > <a-range-picker - v-model="ranges" - style="width:100%" - format="YYYY-MM-DD HH:mm:ss" - showTime - :placeholder="[ '寮�濮嬫椂闂�', '缁撴潫鏃堕棿']" - @change="changeDate" + v-model="ranges" + style="width:100%" + format="YYYY-MM-DD HH:mm:ss" + showTime + :placeholder="[ '寮�濮嬫椂闂�', '缁撴潫鏃堕棿']" + @change="changeDate" /> </a-form-model-item> </a-col> - <a-col :md="3"> <span @@ -147,31 +148,31 @@ title: '缁熶竴缂栫爜', align: 'center', dataIndex: 'num', - width: 200 + // width: 200 }, { title: '璁惧鍚嶇О', align: 'center', dataIndex: 'name', - width: 200 + // width: 200 }, { title: '璁惧鍨嬪彿', align: 'center', dataIndex: 'model', - width: 200 + // width: 200 }, { title: '璁惧瑙勬牸', align: 'center', dataIndex: 'specification', - width: 200 + // width: 200 }, { title: 'ABC鏍囪瘑', align: "center", dataIndex: 'equipmentImportanceId', - width: 100 + // width: 100 }, { title: '鍏抽敭璁惧鏍囪瘑', @@ -182,28 +183,28 @@ { title: '璁惧鐘舵��', align: 'center', - dataIndex: 'equipmentStatus_dictText', - width: 100 + // dataIndex: 'equipmentStatus_dictText', + // width: 100 }, { title: '鎶�鏈姸鎬�', align: 'center', dataIndex: 'technologyStatus_dictText', - width: 100 + // width: 100 }, //涓嬫涓変繚鏃堕棿 { title: '涓嬫涓変繚鏃堕棿', align: 'center', dataIndex: 'nextThirdMaintenanceTime', - width: 200 + // width: 200 }, //涓績 { title: '涓績', align: 'center', dataIndex: 'workCenterId_dictText', - width: 200 + // width: 200 }, ], selectedRowKeys: [], @@ -360,8 +361,29 @@ }, changeDate(date, dateString) { - this.queryParam.startTime = dateString[0].format('YYYY-MM-DD HH:mm:ss'); - this.queryParam.endTime = dateString[1].format('YYYY-MM-DD HH:mm:ss'); + // this.queryParam.startTime = dateString[0].format('YYYY-MM-DD HH:mm:ss'); + // this.queryParam.endTime = dateString[1].format('YYYY-MM-DD HH:mm:ss'); + this.queryParam.startTime = this.formattedTime(dateString[0]); + this.queryParam.endTime = this.formattedTime(dateString[1]); + debugger + }, + formattedTime(originalTime) { + + // 鍒涘缓 Date 瀵硅薄 + const date = new Date(originalTime) + + // 妫�鏌� Date 瀵硅薄鏄惁鏈夋晥 + if (isNaN(date.getTime())) return '鏃犳晥鏃堕棿' + + // 鑾峰彇骞淬�佹湀銆佹棩銆佹椂銆佸垎 + const year = date.getFullYear() + const month = String(date.getMonth() + 1).padStart(2, '0') + const day = String(date.getDate()).padStart(2, '0') + const hours = String(date.getHours()).padStart(2, '0') + const minutes = String(date.getMinutes()).padStart(2, '0') + const seconds = String(date.getSeconds()).padStart(2, '0') + // 鎷兼帴鎴愭寚瀹氭牸寮� + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` }, onSelectChange(selectionRows) { this.selectionRows = selectionRows; -- Gitblit v1.9.3