From c82ac973f3ebf35a9c595259706090cf73610283 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期一, 02 六月 2025 08:45:33 +0800
Subject: [PATCH] art: 设备管理-安装位置信息
---
src/views/eam/repair/EamReportRepairList.vue | 93 ++++++++++++++++++++++++++++++----------------
1 files changed, 61 insertions(+), 32 deletions(-)
diff --git a/src/views/eam/repair/EamReportRepairList.vue b/src/views/eam/repair/EamReportRepairList.vue
index fb7d04e..1c73ccd 100644
--- a/src/views/eam/repair/EamReportRepairList.vue
+++ b/src/views/eam/repair/EamReportRepairList.vue
@@ -12,28 +12,18 @@
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="isDisplayOperation">
- <a-form-item label="鍗曟嵁鐘舵��">
- <a-select placeholder="璇烽�夋嫨鍗曟嵁鐘舵��" v-model="queryParam.reportStatus" allow-clear>
+ <a-form-item label="鎶ヤ慨鐘舵��">
+ <a-select placeholder="璇烽�夋嫨鎶ヤ慨鐘舵��" v-model="queryParam.reportStatus" 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>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="鏁呴殰绠�绉�">
- <!-- <a-select placeholder="璇烽�夋嫨鏁呴殰绠�绉�" v-model="queryParam.faultName" allow-clear>-->
- <!-- <a-select-option v-for="item in faultReasonList" :key="item.faultName">-->
- <!-- {{ item.faultName }}-->
- <!-- </a-select-option>-->
- <!-- </a-select>-->
- <a-input placeholder="璇疯緭鍏ユ晠闅滅畝绉�" v-model="queryParam.faultName" allow-clear/>
+ <a-form-item label="鏁呴殰鎻忚堪">
+ <a-input placeholder="璇疯緭鍏ユ晠闅滄弿杩�" v-model="queryParam.faultDescription" allow-clear/>
</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.faultType"></a-input>-->
- <!-- </a-form-item>-->
- <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="鏁呴殰鏃堕棿">
<a-range-picker showTime v-model="faultTimeRange" value-format="YYYY-MM-DD HH:mm:ss"
@@ -68,15 +58,15 @@
<!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
<div class="table-operator" v-if="isDisplayOperation">
- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
- <a-button type="primary" icon="download" @click="handleExportXls('鏁呴殰鎶ヤ慨')">瀵煎嚭</a-button>
- <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 @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:reportRepair:add')">鏂板</a-button>
+ <!--<a-button type="primary" icon="download" @click="handleExportXls('鏁呴殰鎶ヤ慨')">瀵煎嚭</a-button>-->
+ <!--<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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
- <a-menu-item key="1" @click="batchDel">
+ <a-menu-item key="1" @click="batchDel" v-if="isShowAuth('eam:reportRepair:abolish')">
<a-icon type="delete"/>
浣滃簾
</a-menu-item>
@@ -105,7 +95,8 @@
:pagination="ipagination"
:loading="loading"
class="j-table-force-nowrap"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio'}"
+ :scroll="{ x: 'max-content' }"
+ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio',getCheckboxProps:getCheckboxProps}"
@change="handleTableChange">
<template slot="imageFiles" slot-scope="text, record" v-if="text">
@@ -113,11 +104,15 @@
</template>
<span slot="action" slot-scope="text, record" v-if="record.reportStatus=='WAIT_REPAIR'">
- <a @click="handleEdit(record)">缂栬緫</a>
+ <a @click="handleEdit(record)" v-if="isShowAuth('eam:reportRepair:edit')">缂栬緫</a>
- <a-divider type="vertical"/>
+ <a-divider type="vertical" v-if="isShowAuth('eam:reportRepair:edit')"/>
- <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleDelete(record.id)">
+ <a @click="handleAssign(record)" v-if="isShowAuth('eam:reportRepair:assign')">鎸囨淳</a>
+
+ <a-divider type="vertical" v-if="isShowAuth('eam:reportRepair:assign')"/>
+
+ <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleDelete(record.id)" v-if="isShowAuth('eam:reportRepair:abolish')">
<a>浣滃簾</a>
</a-popconfirm>
</span>
@@ -131,6 +126,8 @@
@ok="modalFormOk"/>
<!-- 鍥剧墖棰勮寮圭獥 -->
<images-preview-modal ref="imagesPreviewModalRef" :imageListUrl="currentImageListUrl"/>
+ <!--鎸囨淳鎶ヤ慨寮圭獥-->
+ <assign-repair-report-modal ref="assignRepairReportModalRef" @ok="modalFormOk"/>
</a-card>
</template>
@@ -142,12 +139,14 @@
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
import ImagesPreviewModal from '@views/eam/repair/modules/ImagesPreviewModal.vue'
import { getAction } from '@/api/manage'
+ import AssignRepairReportModal from './modules/EamReportRepairList/AssignRepairReportModal'
export default {
name: 'EamReportRepairList',
mixins: [JeecgListMixin],
components: {
+ AssignRepairReportModal,
ImagesPreviewModal,
LxSearchEquipmentSelect,
EamReportRepairModal
@@ -175,16 +174,28 @@
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
- }
+ },
+ fixed: 'left',
},
{
title: '璁惧缂栧彿',
align: 'center',
- dataIndex: 'equipmentId_dictText',
- width: 200
+ dataIndex: 'equipmentCode',
+ fixed: 'left',
},
{
- title: '鐘舵��',
+ title: '璁惧鍚嶇О',
+ align: 'center',
+ dataIndex: 'equipmentName',
+ fixed: 'left',
+ },
+ {
+ title: '瀹夎浣嶇疆',
+ align: 'center',
+ dataIndex: 'installationPosition',
+ },
+ {
+ title: '鎶ヤ慨鐘舵��',
align: 'center',
dataIndex: 'reportStatus_dictText',
width: 100
@@ -255,17 +266,18 @@
created() {
this.initDictData('breakdown_flag')
this.initDictData('report_repair_status')
- this.getFaultReasonListByApi()
- if (!this.isDisplayOperation) this.queryParam = Object.assign({} ,this.propsQueryParam)
+ if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam)
else {
const operationColumn = {
title: '鎿嶄綔',
dataIndex: 'action',
align: 'center',
scopedSlots: { customRender: 'action' },
- width: 150
+ width: 200,
+ fixed: 'right',
}
this.columns = [...this.columns, operationColumn]
+ this.getFaultReasonListByApi()
}
this.loadData(1)
},
@@ -317,6 +329,23 @@
this.$refs.imagesPreviewModalRef.visible = true
},
+ /**
+ * 鎸囨淳鎶ヤ慨鍗�
+ * @param record 琛ㄦ牸琛屼俊鎭�
+ */
+ handleAssign(record) {
+ this.$refs.assignRepairReportModalRef.visible = true
+ this.$refs.assignRepairReportModalRef.model = Object.assign({}, { id: record.id })
+ },
+
+ getCheckboxProps(record) {
+ return {
+ props: {
+ disabled: record.reportStatus !== 'WAIT_REPAIR'
+ }
+ }
+ },
+
searchReset() {
if (this.isDisplayOperation) this.queryParam = {}
else this.queryParam = Object.assign({}, this.propsQueryParam)
--
Gitblit v1.9.3