From f7c7b15972be097cdae91cecdea136fd1a60b2b3 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期日, 07 四月 2024 15:02:13 +0800
Subject: [PATCH] 设备台账 必填项修改
---
src/views/eam/EquipmentMaintenancePlanDetailList.vue | 310 +++++++++++++++++++++++++++++++--------------------
1 files changed, 188 insertions(+), 122 deletions(-)
diff --git a/src/views/eam/EquipmentMaintenancePlanDetailList.vue b/src/views/eam/EquipmentMaintenancePlanDetailList.vue
index c500bf0..01051f5 100644
--- a/src/views/eam/EquipmentMaintenancePlanDetailList.vue
+++ b/src/views/eam/EquipmentMaintenancePlanDetailList.vue
@@ -1,8 +1,14 @@
<template>
- <a-card :bordered="false" :class="'cust-erp-sub-tab'">
+ <a-card
+ :bordered="false"
+ :class="'cust-erp-sub-tab'"
+ >
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
+ <a-form
+ layout="inline"
+ @keyup.enter.native="searchQuery"
+ >
<a-row :gutter="24">
</a-row>
</a-form>
@@ -10,7 +16,10 @@
<!-- 鏌ヨ鍖哄煙-END -->
<!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
- <div class="table-operator" v-if="mainId">
+ <div
+ class="table-operator"
+ v-if="mainId"
+ >
<!-- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
@@ -22,9 +31,15 @@
<!-- 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;"
+ >
<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>
+ <a
+ style="margin-left: 24px"
+ @click="onClearSelected"
+ >娓呯┖</a>
</div>
<a-table
@@ -38,34 +53,64 @@
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange">
+ @change="handleTableChange"
+ >
- <template slot="htmlSlot" slot-scope="text">
+ <template
+ slot="htmlSlot"
+ slot-scope="text"
+ >
<div v-html="text"></div>
</template>
- <template slot="imgSlot" slot-scope="text,record">
- <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
- <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+ <template
+ slot="imgSlot"
+ slot-scope="text,record"
+ >
+ <span
+ v-if="!text"
+ style="font-size: 12px;font-style: italic;"
+ >鏃犲浘鐗�</span>
+ <img
+ v-else
+ :src="getImgView(text)"
+ :preview="record.id"
+ height="25px"
+ alt=""
+ style="max-width:80px;font-size: 12px;font-style: italic;"
+ />
</template>
- <template slot="fileSlot" slot-scope="text">
- <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+ <template
+ slot="fileSlot"
+ slot-scope="text"
+ >
+ <span
+ v-if="!text"
+ style="font-size: 12px;font-style: italic;"
+ >鏃犳枃浠�</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
- @click="downloadFile(text)">
+ @click="downloadFile(text)"
+ >
涓嬭浇
</a-button>
</template>
- <span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">缂栬緫</a>
- <a-divider type="vertical" />
+ <span
+ slot="action"
+ slot-scope="text, record"
+ >
+ <!-- <a-divider type="vertical" />
<a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
<a>鍒犻櫎</a>
- </a-popconfirm>
+ </a-popconfirm> -->
+ <a
+ @click="handleEdit(record)"
+ :disabled="mainStatus!=='distributed'"
+ >璁″垝鍙樻洿</a>
</span>
<span
slot="num"
@@ -78,124 +123,145 @@
</span>
</a-table>
</div>
- <standard-detail-model :mainId="standardId" ref="standardDetail"></standard-detail-model>
+ <standard-detail-model
+ :mainId="standardId"
+ ref="standardDetail"
+ ></standard-detail-model>
+ <maintenance-plan-change-model
+ ref="modalForm"
+ @ok="modalFormOk"
+ ></maintenance-plan-change-model>
</a-card>
</template>
<script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import StandardDetailModel from './modules/maintenancePlan/StandardDetailModel.vue'
- export default {
- name: "EquipmentMaintenancePlanDetailList",
- mixins:[JeecgListMixin],
- components: {StandardDetailModel},
- props:{
- mainId:{
- type:String,
- default:'',
- required:false
- }
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import StandardDetailModel from './modules/maintenancePlan/StandardDetailModel'
+import MaintenancePlanChangeModel from './modules/maintenancePlan/MaintenancePlanChangeModel.vue'
+export default {
+ name: "EquipmentMaintenancePlanDetailList",
+ mixins: [JeecgListMixin],
+ components: { StandardDetailModel, MaintenancePlanChangeModel },
+ props: {
+ mainId: {
+ type: String,
+ default: '',
+ required: false
},
- watch:{
- mainId:{
- immediate: true,
- handler(val) {
- if(!this.mainId){
- this.clearList()
- }else{
- this.queryParam['planId'] = val
- this.loadData(1);
- }
+ mainStatus: {
+ type: String,
+ default: '',
+ required: false
+ }
+ },
+ watch: {
+ mainId: {
+ immediate: true,
+ handler(val) {
+ if (!this.mainId) {
+ this.clearList()
+ } else {
+ this.queryParam['planId'] = val
+ this.loadData(1);
}
}
- },
- data () {
- return {
- description: '淇濆吇璁″垝绠$悊椤甸潰',
- disableMixinCreated:true,
- // 琛ㄥご
- columns: [
- {
- title: '#',
- dataIndex: '',
- key:'rowIndex',
- width:45,
- align:"center",
- customRender:function (t,r,index) {
- return parseInt(index)+1;
- }
- },
- {
- title:'淇濆吇鏍囧噯',
- align:"center",
- dataIndex: 'standardNum',
- width:300,
- scopedSlots: { customRender: 'num' }
- },
- {
- title:'璁惧缁熶竴缂栫爜',
- align:"center",
- dataIndex: 'equipmentNum',
- width:300,
- },
- {
- title:'璁惧鍚嶇О',
- align:"center",
- dataIndex: 'equipmentName',
- width:300,
- },
- {
- title:'璁惧鍨嬪彿',
- align:"center",
- dataIndex: 'model',
- width:300,
- },
- {
- title:'璁″垝寮�濮嬫椂闂�',
- align:"center",
- dataIndex: 'planStartTime',
- width:300,
- },
- {
- title:'璁″垝缁撴潫鏃堕棿',
- align:"center",
- dataIndex: 'planEndTime',
- width:300,
- },
- ],
- url: {
- list: "/eam/equipmentMaintenancePlan/listEquipmentMaintenancePlanDetailByMainId",
- delete: "/eam/equipmentMaintenancePlan/deleteEquipmentMaintenancePlanDetail",
- deleteBatch: "/eam/equipmentMaintenancePlan/deleteBatchEquipmentMaintenancePlanDetail",
- exportXlsUrl: "/eam/equipmentMaintenancePlan/exportEquipmentMaintenancePlanDetail",
- importUrl: "/eam/equipmentMaintenancePlan/importEquipmentMaintenancePlanDetail",
+ }
+ },
+ data() {
+ return {
+ description: '淇濆吇璁″垝绠$悊椤甸潰',
+ disableMixinCreated: true,
+ // 琛ㄥご
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key: 'rowIndex',
+ width: 45,
+ align: "center",
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1;
+ }
},
- dictOptions:{
+ {
+ title: '淇濆吇鏍囧噯',
+ align: "center",
+ dataIndex: 'standardNum',
+ width: 250,
},
- standardId:''
- }
- },
- created() {
- },
- computed: {
- importExcelUrl(){
- return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
- }
- },
- methods: {
- clearList(){
- this.dataSource=[]
- this.selectedRowKeys=[]
- this.ipagination.current = 1
+ // scopedSlots: { customRender: 'num' }
+ {
+ title: '璁惧缁熶竴缂栫爜',
+ align: "center",
+ dataIndex: 'equipmentNum',
+ width: 250,
+ },
+ {
+ title: '璁惧鍚嶇О',
+ align: "center",
+ dataIndex: 'equipmentName',
+ width: 250,
+ },
+ {
+ title: '璁惧鍨嬪彿',
+ align: "center",
+ dataIndex: 'model',
+ width: 250,
+ },
+ {
+ title: '璁″垝寮�濮嬫椂闂�',
+ align: "center",
+ dataIndex: 'planStartTime',
+ width: 280,
+ },
+ {
+ title: '璁″垝缁撴潫鏃堕棿',
+ align: "center",
+ dataIndex: 'planEndTime',
+ width: 280,
+ },
+ {
+ title: '鎿嶄綔',
+ dataIndex: 'action',
+ align: "center",
+ fixed: "right",
+ width: 200,
+ scopedSlots: { customRender: 'action' },
+ }
+ ],
+ url: {
+ list: "/eam/equipmentMaintenancePlan/listEquipmentMaintenancePlanDetailByMainId",
+ delete: "/eam/equipmentMaintenancePlan/deleteEquipmentMaintenancePlanDetail",
+ deleteBatch: "/eam/equipmentMaintenancePlan/deleteBatchEquipmentMaintenancePlanDetail",
+ exportXlsUrl: "/eam/equipmentMaintenancePlan/exportEquipmentMaintenancePlanDetail",
+ importUrl: "/eam/equipmentMaintenancePlan/importEquipmentMaintenancePlanDetail",
},
- handleShowDetail(record){
- this.standardId = record.standardId
- this.$refs.standardDetail.visible = true;
- }
+ dictOptions: {
+ },
+ standardId: ''
+ }
+ },
+ created() {
+ },
+ computed: {
+ importExcelUrl() {
+ return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
+ }
+ },
+ methods: {
+ clearList() {
+ this.dataSource = []
+ this.selectedRowKeys = []
+ this.ipagination.current = 1
+ },
+ handleShowDetail(record) {
+ this.standardId = record.standardId
+ this.$refs.standardDetail.visible = true;
}
}
+}
</script>
<style scoped>
- @import '~@assets/less/common.less'
+@import '~@assets/less/common.less';
</style>
--
Gitblit v1.9.3