From dc45fe7bff9cfea31ce11c7dcd57da973b43b003 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期二, 06 五月 2025 17:52:48 +0800
Subject: [PATCH] art: 设备管理-周保相关代码隐藏
---
src/views/eam/repair/EamRepairOrderList.vue | 382 ++++++++++++++++++++++++++++++-----------------------
1 files changed, 215 insertions(+), 167 deletions(-)
diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue
index 18482bc..5d01fd4 100644
--- a/src/views/eam/repair/EamRepairOrderList.vue
+++ b/src/views/eam/repair/EamRepairOrderList.vue
@@ -2,7 +2,7 @@
<a-card :bordered="false">
<!-- 鏌ヨ鍖哄煙 -->
- <div class="table-page-search-wrapper">
+ <div class="table-page-search-wrapper" v-if="isDisplayOperation">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -10,26 +10,31 @@
<a-input placeholder="璇疯緭鍏ュ伐鍗曠紪鍙�" v-model="queryParam.repairCode"></a-input>
</a-form-item>
</a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="璁惧缂栧彿">
+ <!--<a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"/>-->
+ <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="queryParam.equipmentId"/>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鍗曟嵁鐘舵��">
+ <a-select placeholder="璇烽�夋嫨鍗曟嵁鐘舵��" v-model="queryParam.repairStatus" allow-clear>
+ <a-select-option v-for="item in report_repair_status_list" :key="item.value">{{ item.label }}
+ </a-select-option>
+ </a-select>
+ </a-form-item>
+ </a-col>
<template v-if="toggleSearchStatus">
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="璁惧缂栧彿">
- <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="queryParam.equipmentId"/>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="缁翠慨鐘舵��">
- <a-input placeholder="璇疯緭鍏ョ淮淇姸鎬�" v-model="queryParam.repairStatus"></a-input>
- </a-form-item>
- </a-col>
+
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
- <a @click="handleToggleSearch" style="margin-left: 8px">
- {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}
- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
- </a>
+ <!--<a @click="handleToggleSearch" style="margin-left: 8px">-->
+ <!--{{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}-->
+ <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
+ <!--</a>-->
</span>
</a-col>
@@ -38,9 +43,9 @@
</div>
<!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator">
- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
- <a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button>
+ <div class="table-operator" v-if="isDisplayOperation">
+ <a-button @click="handleOpenReceiveFaultModal" type="primary" icon="plus">棰嗗彇</a-button>
+ <!--<a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
@@ -56,7 +61,7 @@
<!-- table鍖哄煙-begin -->
<div>
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+ <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
<a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
@@ -76,168 +81,211 @@
@change="handleTableChange"
:scroll="{x:'max-content'}"
>
-
<span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">缂栬緫</a>
-
- <a-divider type="vertical"/>
- <a-dropdown>
- <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a>
- <a-menu slot="overlay">
- <a-menu-item>
- <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
- <a>鍒犻櫎</a>
- </a-popconfirm>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
+ <a @click="handleDetail(record)">璇︽儏</a>
</span>
-
</a-table>
</div>
<!-- table鍖哄煙-end -->
- <!-- 琛ㄥ崟鍖哄煙 -->
- <eamRepairOrder-modal ref="modalForm" @ok="modalFormOk"></eamRepairOrder-modal>
+ <receive-fault-modal ref="receiveFaultModalRef" @ok="loadData"/>
+
+ <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/>
</a-card>
</template>
<script>
-import '@/assets/less/TableExpand.less'
-import EamRepairOrderModal from './modules/EamRepairOrderModal'
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
+ import '@/assets/less/TableExpand.less'
+ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+ import ReceiveFaultModal from './modules/EamRepairOrderList/ReceiveFaultModal'
+ import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
+ import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect'
+ import RepairOrderApprovalModal from '../../flowable/workflow/repairOrder/RepairOrderApprovalModal'
-export default {
- name: 'EamRepairOrderList',
- mixins: [JeecgListMixin],
- components: {
- LxSearchEquipmentSelect,
- EamRepairOrderModal
- },
- data() {
- return {
- description: '缁翠慨宸ュ崟绠$悊椤甸潰',
- // 琛ㄥご
- columns: [
- {
- title: '宸ュ崟缂栧彿',
- align: 'center',
- dataIndex: 'repairCode',
- width: 200,
- fixed: 'left'
- },
- // {
- // title: '鎶ヤ慨缂栧彿',
- // align: 'center',
- // dataIndex: 'reportId',
- // width: 200,
- // fixed: 'left'
- // },
- {
- title: '璁惧缂栧彿',
- align: 'center',
- dataIndex: 'equipmentId_dictText',
- width: 200,
- fixed: 'left'
- },
- {
- title: '鐘舵��',
- align: 'center',
- dataIndex: 'repairStatus_dictText',
- fixed: 'left',
- width: 100
- },
- {
- title: '缁翠慨寮�濮嬫椂闂�',
- align: 'center',
- dataIndex: 'actualStartTime',
- width: 200
- },
- {
- title: '缁翠慨缁撴潫鏃堕棿',
- align: 'center',
- dataIndex: 'actualEndTime',
- width: 200
- },
- {
- title: '鏁呴殰鍘熷洜',
- align: 'center',
- dataIndex: 'faultReason'
- },
- {
- title: '缁翠慨缁撴灉鎻忚堪',
- align: 'center',
- dataIndex: 'repairDescription',
- width: 300
- },
- {
- title: '缁翠慨璐熻矗浜�',
- align: 'center',
- dataIndex: 'repairer',
- width: 100
- },
- // {
- // title: '鏄惁濮斿',
- // align: 'center',
- // dataIndex: 'outsourcedFlag',
- // width: 100
- // },
- // {
- // title: '濮斿缁翠慨鎻忚堪',
- // align: 'center',
- // dataIndex: 'outsourcedRepairDecription',
- // width: 300
- // },
- // {
- // title: '濮斿缁翠慨寮�濮嬫椂闂�',
- // align: 'center',
- // dataIndex: 'outsourcedStartTime',
- // width: 200
- // },
- // {
- // title: '濮斿缁翠慨缁撴潫鏃堕棿',
- // align: 'center',
- // dataIndex: 'outsourcedEndTime',
- // width: 200
- // },
- // {
- // title: '濮斿璐熻矗浜�',
- // align: 'center',
- // dataIndex: 'outsourcedPerson',
- // width: 100
- // },
- {
- title: '缁翠慨鍥剧墖',
- align: 'center',
- dataIndex: 'imageFiles',
- width: 100
- },
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align: 'center',
- scopedSlots: { customRender: 'action' },
- fixed: 'right',
- width: 150
+ export default {
+ name: 'EamRepairOrderList',
+ mixins: [JeecgListMixin],
+ components: {
+ RepairOrderApprovalModal,
+ LxSearchEquipmentSelect,
+ ReceiveFaultModal
+ },
+ props: {
+ isDisplayOperation: {
+ type: Boolean,
+ default: true
+ }
+ },
+ data() {
+ return {
+ description: '缁翠慨宸ュ崟绠$悊椤甸潰',
+ disableMixinCreated: true,
+ // 琛ㄥご
+ columns: [
+ {
+ title: '宸ュ崟缂栧彿',
+ align: 'center',
+ dataIndex: 'repairCode',
+ width: 200,
+ fixed: 'left'
+ },
+ // {
+ // title: '鎶ヤ慨缂栧彿',
+ // align: 'center',
+ // dataIndex: 'reportId',
+ // width: 200,
+ // fixed: 'left'
+ // },
+ {
+ title: '璁惧缂栧彿',
+ align: 'center',
+ dataIndex: 'equipmentId_dictText',
+ width: 200,
+ fixed: 'left'
+ },
+ {
+ title: '鐘舵��',
+ align: 'center',
+ dataIndex: 'repairStatus_dictText',
+ fixed: 'left',
+ width: 100
+ },
+ {
+ title: '缁翠慨璐熻矗浜�',
+ align: 'center',
+ dataIndex: 'repairer',
+ width: 100
+ },
+ {
+ title: '缁翠慨寮�濮嬫椂闂�',
+ align: 'center',
+ dataIndex: 'actualStartTime',
+ width: 200
+ },
+ {
+ title: '缁翠慨缁撴潫鏃堕棿',
+ align: 'center',
+ dataIndex: 'actualEndTime',
+ width: 200
+ },
+ {
+ title: '鏁呴殰鍘熷洜',
+ align: 'center',
+ dataIndex: 'faultReason'
+ },
+ {
+ title: '缁翠慨缁撴灉鎻忚堪',
+ align: 'center',
+ dataIndex: 'repairDescription'
+ // width: 300
+ }
+ // {
+ // title: '缁翠慨鍥剧墖',
+ // align: 'center',
+ // dataIndex: 'imageFiles',
+ // width: 100
+ // },
+ // {
+ // title: '鏄惁濮斿',
+ // align: 'center',
+ // dataIndex: 'outsourcedFlag',
+ // width: 100
+ // },
+ // {
+ // title: '濮斿缁翠慨鎻忚堪',
+ // align: 'center',
+ // dataIndex: 'outsourcedRepairDecription',
+ // width: 300
+ // },
+ // {
+ // title: '濮斿缁翠慨寮�濮嬫椂闂�',
+ // align: 'center',
+ // dataIndex: 'outsourcedStartTime',
+ // width: 200
+ // },
+ // {
+ // title: '濮斿缁翠慨缁撴潫鏃堕棿',
+ // align: 'center',
+ // dataIndex: 'outsourcedEndTime',
+ // width: 200
+ // },
+ // {
+ // title: '濮斿璐熻矗浜�',
+ // align: 'center',
+ // dataIndex: 'outsourcedPerson',
+ // width: 100
+ // },
+ ],
+ report_repair_status_list: [],
+ selectRepairOrderData: {},
+ url: {
+ list: '/eam/eamRepairOrder/list',
+ delete: '/eam/eamRepairOrder/delete',
+ deleteBatch: '/eam/eamRepairOrder/deleteBatch',
+ exportXlsUrl: 'eam/eamRepairOrder/exportXls'
}
- ],
- url: {
- list: '/eam/eamRepairOrder/list',
- delete: '/eam/eamRepairOrder/delete',
- deleteBatch: '/eam/eamRepairOrder/deleteBatch',
- exportXlsUrl: 'eam/eamRepairOrder/exportXls',
+ }
+ },
+ computed: {
+ importExcelUrl: function() {
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+ }
+ },
+ created() {
+ if (!this.isDisplayOperation) {
+ return
+ }
+ this.initDictData('report_repair_status')
+ const operationColumn = {
+ title: '鎿嶄綔',
+ dataIndex: 'action',
+ align: 'center',
+ width: 100,
+ scopedSlots: { customRender: 'action' }
+ }
+ this.columns = [...this.columns, operationColumn]
+ this.loadData(1)
+ },
+ methods: {
+ /**
+ * 鑾峰彇鏁版嵁瀛楀吀鍊�
+ * @param dictCode 鏁版嵁瀛楀吀瀵瑰簲璁板綍缂栫爜
+ */
+ initDictData(dictCode) {
+ // //浼樺厛浠庣紦瀛樹腑璇诲彇瀛楀吀閰嶇疆
+ if (getDictItemsFromCache(dictCode)) {
+ this[dictCode + '_list'] = getDictItemsFromCache(dictCode)
+ return
+ }
+ //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁�
+ ajaxGetDictItems(dictCode, null).then((res) => {
+ if (res.success) {
+ this[dictCode + '_list'] = res.result
+ return
+ }
+ })
+ },
+
+ // 寮�鍚鍙栨晠闅滀繚淇崟寮圭獥
+ handleOpenReceiveFaultModal() {
+ this.$refs.receiveFaultModalRef.visible = true
+ },
+
+ /**
+ * 鐐瑰嚮璇︽儏瑙﹀彂
+ * @param record 琛ㄦ牸琛屼俊鎭�
+ */
+ handleDetail(record) {
+ this.selectRepairOrderData = Object.assign({}, record)
+ this.$refs.repairOrderApprovalModal.visible = true
+ this.$refs.repairOrderApprovalModal.title = '璇︽儏'
+ this.$refs.repairOrderApprovalModal.disableSubmit = true
+ this.$refs.repairOrderApprovalModal.getAllApproveData(record)
+ this.$refs.repairOrderApprovalModal.getBasicInformation({ ...record, dataId: record.id })
}
}
- },
- computed: {
- importExcelUrl: function() {
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
- }
- },
- methods: {}
-}
+ }
</script>
<style scoped>
-@import '~@assets/less/common.less';
+ @import '~@assets/less/common.less';
</style>
\ No newline at end of file
--
Gitblit v1.9.3