From 2b707bd91353c91a2726543fa4776c50ff11e205 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期五, 18 七月 2025 20:14:19 +0800 Subject: [PATCH] .设备报修 设备事故登记表 产品质量隐患确认表 维修人员 三不放过原则表 维修工单表 基础代码 --- src/views/eam/repair/EamReportProductHazardsList.vue | 236 +++++ src/views/eam/repair/EamReportRepairList.vue | 14 src/views/eam/repair/modules/EamReportAccidentsRegisterModal.vue | 60 + src/views/eam/repair/modules/EamReportProductHazardsModal.Style#Drawer.vue | 84 + src/views/eam/repair/EamRepairPersonList.vue | 195 ++++ src/views/eam/repair/modules/EamReportProductHazardsForm.vue | 159 +++ src/views/eam/repair/modules/EamReportAccidentsRegisterModal.Style#Drawer.vue | 84 + src/views/eam/repair/modules/EamReportAccidentsRegisterForm.vue | 314 ++++++ src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue | 235 +++- src/views/eam/repair/EamReportAccidentsRegisterList.vue | 456 ++++++++++ src/views/eam/repair/modules/EamRepairPersonForm.vue | 124 ++ src/views/eam/repair/EamReportThreeNoSpareList.vue | 222 ++++ src/views/eam/repair/modules/EamReportThreeNoSpareModal.Style#Drawer.vue | 84 + src/views/eam/repair/modules/EamRepairPersonModal.vue | 60 + src/views/eam/repair/modules/EamReportProductHazardsModal.vue | 60 + src/views/eam/repair/modules/EamReportThreeNoSpareForm.vue | 144 +++ src/views/eam/repair/modules/EamReportThreeNoSpareModal.vue | 60 + src/views/eam/repair/modules/EamRepairPersonModal.Style#Drawer.vue | 84 + 18 files changed, 2,595 insertions(+), 80 deletions(-) diff --git a/src/views/eam/repair/EamRepairPersonList.vue b/src/views/eam/repair/EamRepairPersonList.vue new file mode 100644 index 0000000..6ebb478 --- /dev/null +++ b/src/views/eam/repair/EamRepairPersonList.vue @@ -0,0 +1,195 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <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> + <!-- 楂樼骇鏌ヨ鍖哄煙 --> + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> + </a-dropdown> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <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> + </div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <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> + <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)"> + 涓嬭浇 + </a-button> + </template> + + <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 @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <eam-repair-person-modal ref="modalForm" @ok="modalFormOk"></eam-repair-person-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EamRepairPersonModal from './modules/EamRepairPersonModal' + + export default { + name: 'EamRepairPersonList', + mixins:[JeecgListMixin, mixinDevice], + components: { + EamRepairPersonModal + }, + data () { + return { + description: '鏁呴殰缁翠慨浜哄憳绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'缁翠慨宸ュ崟Id', + align:"center", + dataIndex: 'repairId' + }, + { + title:'缁翠慨浜�', + align:"center", + dataIndex: 'repairUser' + }, + { + title:'鏄惁鏄富缁翠慨浜�', + align:"center", + dataIndex: 'repairPrimary' + }, + { + title:'缁翠慨鏃堕暱', + align:"center", + dataIndex: 'repairDuration' + }, + { + title:'澶囨敞', + align:"center", + dataIndex: 'remark' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/eam/eamRepairPerson/list", + delete: "/eam/eamRepairPerson/delete", + deleteBatch: "/eam/eamRepairPerson/deleteBatch", + exportXlsUrl: "/eam/eamRepairPerson/exportXls", + importExcelUrl: "eam/eamRepairPerson/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'repairId',text:'缁翠慨宸ュ崟Id',dictCode:''}) + fieldList.push({type:'string',value:'repairUser',text:'缁翠慨浜�',dictCode:''}) + fieldList.push({type:'string',value:'repairPrimary',text:'鏄惁鏄富缁翠慨浜�',dictCode:''}) + fieldList.push({type:'string',value:'repairDuration',text:'缁翠慨鏃堕暱',dictCode:''}) + fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/eam/repair/EamReportAccidentsRegisterList.vue b/src/views/eam/repair/EamReportAccidentsRegisterList.vue new file mode 100644 index 0000000..a6e4f42 --- /dev/null +++ b/src/views/eam/repair/EamReportAccidentsRegisterList.vue @@ -0,0 +1,456 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <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> + <!-- 楂樼骇鏌ヨ鍖哄煙 --> + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> + </a-dropdown> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <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> + </div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <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> + <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)"> + 涓嬭浇 + </a-button> + </template> + + <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 @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <eam-report-accidents-register-modal ref="modalForm" @ok="modalFormOk"></eam-report-accidents-register-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EamReportAccidentsRegisterModal from './modules/EamReportAccidentsRegisterModal' + + export default { + name: 'EamReportAccidentsRegisterList', + mixins:[JeecgListMixin, mixinDevice], + components: { + EamReportAccidentsRegisterModal + }, + data () { + return { + description: '璁惧浜嬫晠鐧昏琛ㄧ鐞嗛〉闈�', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'鎶ヤ慨ID', + align:"center", + dataIndex: 'reportId' + }, + { + title:'璁惧ID', + align:"center", + dataIndex: 'equipmentId' + }, + { + title:'鏄惁鏈夎澶囨搷浣滆瘉 鏄惁', + align:"center", + dataIndex: 'operationCertificate' + }, + { + title:'鏄惁鏂數閲嶅惎', + align:"center", + dataIndex: 'powerOffRestart' + }, + { + title:'鏄惁涓烘壒娆¢浠�', + align:"center", + dataIndex: 'batchFirstPiece' + }, + { + title:'鍙樺姩鍥犵礌 鏄惁', + align:"center", + dataIndex: 'variableFactors' + }, + { + title:'鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��', + align:"center", + dataIndex: 'variableFactorsValue' + }, + { + title:'鎵ц绋嬪簭', + align:"center", + dataIndex: 'executeNc' + }, + { + title:'浜嬫晠鐜拌薄', + align:"center", + dataIndex: 'accidentPhenomenon' + }, + { + title:'閲囧彇鎺柦', + align:"center", + dataIndex: 'measure' + }, + { + title:'閫犳垚缁撴灉', + align:"center", + dataIndex: 'causingResults' + }, + { + title:'鎿嶄綔宸�', + align:"center", + dataIndex: 'confirmer' + }, + { + title:'鎿嶄綔宸ョ‘璁ゆ椂闂�', + align:"center", + dataIndex: 'confirmTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'鍖洪暱', + align:"center", + dataIndex: 'district' + }, + { + title:'鍖洪暱纭鏃堕棿', + align:"center", + dataIndex: 'districtTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'涓績涓讳换', + align:"center", + dataIndex: 'centerDirector' + }, + { + title:'涓績涓讳换纭鏃堕棿', + align:"center", + dataIndex: 'centerDirectorTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'缁翠慨寮�濮嬫椂闂�', + align:"center", + dataIndex: 'reportStartTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'璁惧鐘舵��', + align:"center", + dataIndex: 'equipmentStatus' + }, + { + title:'鍘熷洜鍒嗘瀽', + align:"center", + dataIndex: 'causeAnalysis' + }, + { + title:'妫�鏌ョ粨鏋�', + align:"center", + dataIndex: 'inspectionResults' + }, + { + title:'閲囧彇鎺柦', + align:"center", + dataIndex: 'takeSteps' + }, + { + title:'寤鸿閲囧彇鎺柦', + align:"center", + dataIndex: 'suggestionTakeSteps' + }, + { + title:'寤鸿閲囧彇鎺柦鏃堕棿', + align:"center", + dataIndex: 'suggestionTakeStepsTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'缁翠慨纭', + align:"center", + dataIndex: 'repairConfirm' + }, + { + title:'缁翠慨纭鎰忚', + align:"center", + dataIndex: 'repairConfirmComment' + }, + { + title:'缁翠慨纭鏃堕棿', + align:"center", + dataIndex: 'repairConfirmTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'缁翠慨缁勯暱纭', + align:"center", + dataIndex: 'repairGroupLeader' + }, + { + title:'缁翠慨缁勯暱鎰忚', + align:"center", + dataIndex: 'repairGroupLeaderComment' + }, + { + title:'缁翠慨缁勯暱纭鏃堕棿', + align:"center", + dataIndex: 'repairGroupLeaderTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'缁翠慨缁勯暱纭', + align:"center", + dataIndex: 'repairDistrict' + }, + { + title:'缁翠慨缁勯暱鎰忚', + align:"center", + dataIndex: 'repairDistrictComment' + }, + { + title:'缁翠慨缁勯暱纭鏃堕棿', + align:"center", + dataIndex: 'repairDistrictTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰', + align:"center", + dataIndex: 'checkAgree' + }, + { + title:'涓嶅悓鎰忓師鍥犲垎鏋�', + align:"center", + dataIndex: 'disagreeReason' + }, + { + title:'鏁存敼鎺柦', + align:"center", + dataIndex: 'rectificationMeasures' + }, + { + title:'浜嬫晠缁撹', + align:"center", + dataIndex: 'accidentConclusion' + }, + { + title:'鎶�鏈礋璐d汉', + align:"center", + dataIndex: 'technicalDirector' + }, + { + title:'鎶�鏈礋璐d汉纭鏃堕棿', + align:"center", + dataIndex: 'technicalDirectorTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'鎶�鏈富绠″绾ч瀵�', + align:"center", + dataIndex: 'technicalDirectorLeader' + }, + { + title:'鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�', + align:"center", + dataIndex: 'technicalDirectorLeaderTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'涓荤閮ㄧ骇棰嗗', + align:"center", + dataIndex: 'technicalDirectorPart' + }, + { + title:'涓荤閮ㄧ骇棰嗗纭鏃堕棿', + align:"center", + dataIndex: 'technicalDirectorPartTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/eam/eamReportAccidentsRegister/list", + delete: "/eam/eamReportAccidentsRegister/delete", + deleteBatch: "/eam/eamReportAccidentsRegister/deleteBatch", + exportXlsUrl: "/eam/eamReportAccidentsRegister/exportXls", + importExcelUrl: "eam/eamReportAccidentsRegister/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'reportId',text:'鎶ヤ慨ID',dictCode:''}) + fieldList.push({type:'string',value:'equipmentId',text:'璁惧ID',dictCode:''}) + fieldList.push({type:'string',value:'operationCertificate',text:'鏄惁鏈夎澶囨搷浣滆瘉 鏄惁',dictCode:''}) + fieldList.push({type:'string',value:'powerOffRestart',text:'鏄惁鏂數閲嶅惎',dictCode:''}) + fieldList.push({type:'string',value:'batchFirstPiece',text:'鏄惁涓烘壒娆¢浠�',dictCode:''}) + fieldList.push({type:'string',value:'variableFactors',text:'鍙樺姩鍥犵礌 鏄惁',dictCode:''}) + fieldList.push({type:'string',value:'variableFactorsValue',text:'鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��',dictCode:''}) + fieldList.push({type:'string',value:'executeNc',text:'鎵ц绋嬪簭',dictCode:''}) + fieldList.push({type:'string',value:'accidentPhenomenon',text:'浜嬫晠鐜拌薄',dictCode:''}) + fieldList.push({type:'string',value:'measure',text:'閲囧彇鎺柦',dictCode:''}) + fieldList.push({type:'string',value:'causingResults',text:'閫犳垚缁撴灉',dictCode:''}) + fieldList.push({type:'string',value:'confirmer',text:'鎿嶄綔宸�',dictCode:''}) + fieldList.push({type:'date',value:'confirmTime',text:'鎿嶄綔宸ョ‘璁ゆ椂闂�'}) + fieldList.push({type:'string',value:'district',text:'鍖洪暱',dictCode:''}) + fieldList.push({type:'date',value:'districtTime',text:'鍖洪暱纭鏃堕棿'}) + fieldList.push({type:'string',value:'centerDirector',text:'涓績涓讳换',dictCode:''}) + fieldList.push({type:'date',value:'centerDirectorTime',text:'涓績涓讳换纭鏃堕棿'}) + fieldList.push({type:'date',value:'reportStartTime',text:'缁翠慨寮�濮嬫椂闂�'}) + fieldList.push({type:'string',value:'equipmentStatus',text:'璁惧鐘舵��',dictCode:''}) + fieldList.push({type:'string',value:'causeAnalysis',text:'鍘熷洜鍒嗘瀽',dictCode:''}) + fieldList.push({type:'string',value:'inspectionResults',text:'妫�鏌ョ粨鏋�',dictCode:''}) + fieldList.push({type:'string',value:'takeSteps',text:'閲囧彇鎺柦',dictCode:''}) + fieldList.push({type:'string',value:'suggestionTakeSteps',text:'寤鸿閲囧彇鎺柦',dictCode:''}) + fieldList.push({type:'date',value:'suggestionTakeStepsTime',text:'寤鸿閲囧彇鎺柦鏃堕棿'}) + fieldList.push({type:'string',value:'repairConfirm',text:'缁翠慨纭',dictCode:''}) + fieldList.push({type:'string',value:'repairConfirmComment',text:'缁翠慨纭鎰忚',dictCode:''}) + fieldList.push({type:'date',value:'repairConfirmTime',text:'缁翠慨纭鏃堕棿'}) + fieldList.push({type:'string',value:'repairGroupLeader',text:'缁翠慨缁勯暱纭',dictCode:''}) + fieldList.push({type:'string',value:'repairGroupLeaderComment',text:'缁翠慨缁勯暱鎰忚',dictCode:''}) + fieldList.push({type:'date',value:'repairGroupLeaderTime',text:'缁翠慨缁勯暱纭鏃堕棿'}) + fieldList.push({type:'string',value:'repairDistrict',text:'缁翠慨缁勯暱纭',dictCode:''}) + fieldList.push({type:'string',value:'repairDistrictComment',text:'缁翠慨缁勯暱鎰忚',dictCode:''}) + fieldList.push({type:'date',value:'repairDistrictTime',text:'缁翠慨缁勯暱纭鏃堕棿'}) + fieldList.push({type:'string',value:'checkAgree',text:'鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰',dictCode:''}) + fieldList.push({type:'string',value:'disagreeReason',text:'涓嶅悓鎰忓師鍥犲垎鏋�',dictCode:''}) + fieldList.push({type:'string',value:'rectificationMeasures',text:'鏁存敼鎺柦',dictCode:''}) + fieldList.push({type:'string',value:'accidentConclusion',text:'浜嬫晠缁撹',dictCode:''}) + fieldList.push({type:'string',value:'technicalDirector',text:'鎶�鏈礋璐d汉',dictCode:''}) + fieldList.push({type:'date',value:'technicalDirectorTime',text:'鎶�鏈礋璐d汉纭鏃堕棿'}) + fieldList.push({type:'string',value:'technicalDirectorLeader',text:'鎶�鏈富绠″绾ч瀵�',dictCode:''}) + fieldList.push({type:'date',value:'technicalDirectorLeaderTime',text:'鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�'}) + fieldList.push({type:'string',value:'technicalDirectorPart',text:'涓荤閮ㄧ骇棰嗗',dictCode:''}) + fieldList.push({type:'date',value:'technicalDirectorPartTime',text:'涓荤閮ㄧ骇棰嗗纭鏃堕棿'}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/eam/repair/EamReportProductHazardsList.vue b/src/views/eam/repair/EamReportProductHazardsList.vue new file mode 100644 index 0000000..14c19ed --- /dev/null +++ b/src/views/eam/repair/EamReportProductHazardsList.vue @@ -0,0 +1,236 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <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> + <!-- 楂樼骇鏌ヨ鍖哄煙 --> + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> + </a-dropdown> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <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> + </div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <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> + <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)"> + 涓嬭浇 + </a-button> + </template> + + <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 @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <eam-report-product-hazards-modal ref="modalForm" @ok="modalFormOk"></eam-report-product-hazards-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EamReportProductHazardsModal from './modules/EamReportProductHazardsModal' + + export default { + name: 'EamReportProductHazardsList', + mixins:[JeecgListMixin, mixinDevice], + components: { + EamReportProductHazardsModal + }, + data () { + return { + description: '浜у搧瀹夊叏闅愭偅纭绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'鎿嶄綔宸�', + align:"center", + dataIndex: 'confirmer' + }, + { + title:'鎿嶄綔宸ョ‘璁ゆ椂闂�', + align:"center", + dataIndex: 'confirmTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'浜у搧鎹熷け鎯呭喌', + align:"center", + dataIndex: 'productLoss' + }, + { + title:'浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽', + align:"center", + dataIndex: 'qualityAnalysis' + }, + { + title:'涓荤宸ヨ壓', + align:"center", + dataIndex: 'technologist' + }, + { + title:'涓荤宸ヨ壓纭鏃堕棿', + align:"center", + dataIndex: 'technologistTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'涓荤宸ヨ壓纭鎰忚', + align:"center", + dataIndex: 'technologistComment' + }, + { + title:'閮ㄧ骇棰嗗', + align:"center", + dataIndex: 'deputyDepartment' + }, + { + title:'閮ㄧ骇棰嗗纭鏃堕棿', + align:"center", + dataIndex: 'deputyDepartmentTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title:'閮ㄧ骇棰嗗纭鎰忚', + align:"center", + dataIndex: 'deputyDepartmentComment' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/eam/eamReportProductHazards/list", + delete: "/eam/eamReportProductHazards/delete", + deleteBatch: "/eam/eamReportProductHazards/deleteBatch", + exportXlsUrl: "/eam/eamReportProductHazards/exportXls", + importExcelUrl: "eam/eamReportProductHazards/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'reportId',text:'鎶ヤ慨ID',dictCode:''}) + fieldList.push({type:'string',value:'equipmentId',text:'璁惧ID',dictCode:''}) + fieldList.push({type:'string',value:'confirmer',text:'鎿嶄綔宸�',dictCode:''}) + fieldList.push({type:'date',value:'confirmTime',text:'鎿嶄綔宸ョ‘璁ゆ椂闂�'}) + fieldList.push({type:'string',value:'productLoss',text:'浜у搧鎹熷け鎯呭喌',dictCode:''}) + fieldList.push({type:'string',value:'qualityAnalysis',text:'浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽',dictCode:''}) + fieldList.push({type:'string',value:'technologist',text:'涓荤宸ヨ壓',dictCode:''}) + fieldList.push({type:'date',value:'technologistTime',text:'涓荤宸ヨ壓纭鏃堕棿'}) + fieldList.push({type:'string',value:'technologistComment',text:'涓荤宸ヨ壓纭鎰忚',dictCode:''}) + fieldList.push({type:'string',value:'deputyDepartment',text:'閮ㄧ骇棰嗗',dictCode:''}) + fieldList.push({type:'date',value:'deputyDepartmentTime',text:'閮ㄧ骇棰嗗纭鏃堕棿'}) + fieldList.push({type:'string',value:'deputyDepartmentComment',text:'閮ㄧ骇棰嗗纭鎰忚',dictCode:''}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/eam/repair/EamReportRepairList.vue b/src/views/eam/repair/EamReportRepairList.vue index 0984200..96999bc 100644 --- a/src/views/eam/repair/EamReportRepairList.vue +++ b/src/views/eam/repair/EamReportRepairList.vue @@ -58,7 +58,7 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> - <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:reportRepair:add')">鏂板</a-button> + <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">--> @@ -66,7 +66,7 @@ <!--</a-upload>--> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel" v-if="isShowAuth('eam:reportRepair:abolish')"> + <a-menu-item key="1" @click="batchDel"> <a-icon type="delete"/> 浣滃簾 </a-menu-item> @@ -103,15 +103,15 @@ </template> <span slot="action" slot-scope="text, record" v-if="record.reportStatus=='WAIT_REPAIR'"> - <a @click="handleEdit(record)" v-if="isShowAuth('eam:reportRepair:edit')">缂栬緫</a> + <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical" v-if="isShowAuth('eam:reportRepair:edit')"/> + <a-divider type="vertical"/> - <a @click="handleAssign(record)" v-if="isShowAuth('eam:reportRepair:assign')">鎸囨淳</a> + <a @click="handleAssign(record)" >鎸囨淳</a> - <a-divider type="vertical" v-if="isShowAuth('eam:reportRepair:assign')"/> + <a-divider type="vertical" /> - <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleDelete(record.id)" v-if="isShowAuth('eam:reportRepair:abolish')"> + <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleDelete(record.id)" > <a>浣滃簾</a> </a-popconfirm> </span> diff --git a/src/views/eam/repair/EamReportThreeNoSpareList.vue b/src/views/eam/repair/EamReportThreeNoSpareList.vue new file mode 100644 index 0000000..0c7a48a --- /dev/null +++ b/src/views/eam/repair/EamReportThreeNoSpareList.vue @@ -0,0 +1,222 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <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> + <!-- 楂樼骇鏌ヨ鍖哄煙 --> + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> + </a-dropdown> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <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> + </div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <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> + <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)"> + 涓嬭浇 + </a-button> + </template> + + <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 @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <eam-report-three-no-spare-modal ref="modalForm" @ok="modalFormOk"></eam-report-three-no-spare-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EamReportThreeNoSpareModal from './modules/EamReportThreeNoSpareModal' + + export default { + name: 'EamReportThreeNoSpareList', + mixins:[JeecgListMixin, mixinDevice], + components: { + EamReportThreeNoSpareModal + }, + data () { + return { + description: '鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'鍒犻櫎鏍囪', + align:"center", + dataIndex: 'delFlag' + }, + { + title:'鎶ヤ慨ID', + align:"center", + dataIndex: 'reportId' + }, + { + title:'璁惧ID', + align:"center", + dataIndex: 'equipmentId' + }, + { + title:'鍘熷洜鍒嗘瀽', + align:"center", + dataIndex: 'causeAnalysis' + }, + { + title:'鍩硅鏁欒偛鏄� 鍚�', + align:"center", + dataIndex: 'isTrainingEducation' + }, + { + title:'鍩硅褰㈠紡', + align:"center", + dataIndex: 'trainingFormat' + }, + { + title:'鍩硅鍐呭', + align:"center", + dataIndex: 'trainingContent' + }, + { + title:'鍩硅浜�', + align:"center", + dataIndex: 'trainingUser' + }, + { + title:'鍩硅鏃堕棿', + align:"center", + dataIndex: 'trainingUserTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/eam/eamReportThreeNoSpare/list", + delete: "/eam/eamReportThreeNoSpare/delete", + deleteBatch: "/eam/eamReportThreeNoSpare/deleteBatch", + exportXlsUrl: "/eam/eamReportThreeNoSpare/exportXls", + importExcelUrl: "eam/eamReportThreeNoSpare/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'delFlag',text:'鍒犻櫎鏍囪',dictCode:''}) + fieldList.push({type:'string',value:'reportId',text:'鎶ヤ慨ID',dictCode:''}) + fieldList.push({type:'string',value:'equipmentId',text:'璁惧ID',dictCode:''}) + fieldList.push({type:'string',value:'causeAnalysis',text:'鍘熷洜鍒嗘瀽',dictCode:''}) + fieldList.push({type:'string',value:'isTrainingEducation',text:'鍩硅鏁欒偛鏄� 鍚�',dictCode:''}) + fieldList.push({type:'string',value:'trainingFormat',text:'鍩硅褰㈠紡',dictCode:''}) + fieldList.push({type:'string',value:'trainingContent',text:'鍩硅鍐呭',dictCode:''}) + fieldList.push({type:'string',value:'trainingUser',text:'鍩硅浜�',dictCode:''}) + fieldList.push({type:'date',value:'trainingUserTime',text:'鍩硅鏃堕棿'}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/eam/repair/modules/EamRepairPersonForm.vue b/src/views/eam/repair/modules/EamRepairPersonForm.vue new file mode 100644 index 0000000..8d21893 --- /dev/null +++ b/src/views/eam/repair/modules/EamRepairPersonForm.vue @@ -0,0 +1,124 @@ +<template> + <a-spin :spinning="confirmLoading"> + <j-form-container :disabled="formDisabled"> + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="缁翠慨宸ュ崟Id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairId"> + <a-input v-model="model.repairId" placeholder="璇疯緭鍏ョ淮淇伐鍗旾d" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairUser"> + <a-input v-model="model.repairUser" placeholder="璇疯緭鍏ョ淮淇汉" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鏄惁鏄富缁翠慨浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairPrimary"> + <a-input v-model="model.repairPrimary" placeholder="璇疯緭鍏ユ槸鍚︽槸涓荤淮淇汉" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨鏃堕暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDuration"> + <a-input v-model="model.repairDuration" placeholder="璇疯緭鍏ョ淮淇椂闀�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> + <a-input v-model="model.remark" placeholder="璇疯緭鍏ュ娉�" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </j-form-container> + </a-spin> +</template> + +<script> + + import { httpAction, getAction } from '@/api/manage' + import { validateDuplicateValue } from '@/utils/util' + + export default { + name: 'EamRepairPersonForm', + components: { + }, + props: { + //琛ㄥ崟绂佺敤 + disabled: { + type: Boolean, + default: false, + required: false + } + }, + data () { + return { + model:{ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + confirmLoading: false, + validatorRules: { + }, + url: { + add: "/eam/eamRepairPerson/add", + edit: "/eam/eamRepairPerson/edit", + queryById: "/eam/eamRepairPerson/queryById" + } + } + }, + computed: { + formDisabled(){ + return this.disabled + }, + }, + created () { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add () { + this.edit(this.modelDefault); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + submitForm () { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + } + } +</script> \ No newline at end of file diff --git "a/src/views/eam/repair/modules/EamRepairPersonModal.Style\043Drawer.vue" "b/src/views/eam/repair/modules/EamRepairPersonModal.Style\043Drawer.vue" new file mode 100644 index 0000000..3426906 --- /dev/null +++ "b/src/views/eam/repair/modules/EamRepairPersonModal.Style\043Drawer.vue" @@ -0,0 +1,84 @@ +<template> + <a-drawer + :title="title" + :width="width" + placement="right" + :closable="false" + @close="close" + destroyOnClose + :visible="visible"> + <eam-repair-person-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></eam-repair-person-form> + <div class="drawer-footer"> + <a-button @click="handleCancel" style="margin-bottom: 0;">鍏抽棴</a-button> + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">鎻愪氦</a-button> + </div> + </a-drawer> +</template> + +<script> + + import EamRepairPersonForm from './EamRepairPersonForm' + + export default { + name: 'EamRepairPersonModal', + components: { + EamRepairPersonForm + }, + data () { + return { + title:"鎿嶄綔", + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }); + }, + close () { + this.$emit('close'); + this.visible = false; + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + handleCancel () { + this.close() + } + } + } +</script> + +<style lang="less" scoped> +/** Button鎸夐挳闂磋窛 */ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + .drawer-footer{ + position: absolute; + bottom: -8px; + width: 100%; + border-top: 1px solid #e8e8e8; + padding: 10px 16px; + text-align: right; + left: 0; + background: #fff; + border-radius: 0 0 2px 2px; + } +</style> \ No newline at end of file diff --git a/src/views/eam/repair/modules/EamRepairPersonModal.vue b/src/views/eam/repair/modules/EamRepairPersonModal.vue new file mode 100644 index 0000000..1320a38 --- /dev/null +++ b/src/views/eam/repair/modules/EamRepairPersonModal.vue @@ -0,0 +1,60 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + @ok="handleOk" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <eam-repair-person-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></eam-repair-person-form> + </j-modal> +</template> + +<script> + + import EamRepairPersonForm from './EamRepairPersonForm' + export default { + name: 'EamRepairPersonModal', + components: { + EamRepairPersonForm + }, + data () { + return { + title:'', + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }) + }, + close () { + this.$emit('close'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleCancel () { + this.close() + } + } + } +</script> \ No newline at end of file diff --git a/src/views/eam/repair/modules/EamReportAccidentsRegisterForm.vue b/src/views/eam/repair/modules/EamReportAccidentsRegisterForm.vue new file mode 100644 index 0000000..62c7a4a --- /dev/null +++ b/src/views/eam/repair/modules/EamReportAccidentsRegisterForm.vue @@ -0,0 +1,314 @@ +<template> + <a-spin :spinning="confirmLoading"> + <j-form-container :disabled="formDisabled"> + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="鎶ヤ慨ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId"> + <a-input v-model="model.reportId" placeholder="璇疯緭鍏ユ姤淇甀D" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="璁惧ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> + <a-input v-model="model.equipmentId" placeholder="璇疯緭鍏ヨ澶嘔D" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鏄惁鏈夎澶囨搷浣滆瘉 鏄惁" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationCertificate"> + <a-input v-model="model.operationCertificate" placeholder="璇疯緭鍏ユ槸鍚︽湁璁惧鎿嶄綔璇� 鏄惁" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鏄惁鏂數閲嶅惎" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="powerOffRestart"> + <a-input v-model="model.powerOffRestart" placeholder="璇疯緭鍏ユ槸鍚︽柇鐢甸噸鍚�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鏄惁涓烘壒娆¢浠�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchFirstPiece"> + <a-input v-model="model.batchFirstPiece" placeholder="璇疯緭鍏ユ槸鍚︿负鎵规棣栦欢" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍙樺姩鍥犵礌 鏄惁" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="variableFactors"> + <a-input v-model="model.variableFactors" placeholder="璇疯緭鍏ュ彉鍔ㄥ洜绱� 鏄惁" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="variableFactorsValue"> + <a-input v-model="model.variableFactorsValue" placeholder="璇疯緭鍏ュ彉鍔ㄥ洜绱犲唴瀹� 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎵ц绋嬪簭" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="executeNc"> + <a-input v-model="model.executeNc" placeholder="璇疯緭鍏ユ墽琛岀▼搴�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="浜嬫晠鐜拌薄" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accidentPhenomenon"> + <a-input v-model="model.accidentPhenomenon" placeholder="璇疯緭鍏ヤ簨鏁呯幇璞�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="閲囧彇鎺柦" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measure"> + <a-input v-model="model.measure" placeholder="璇疯緭鍏ラ噰鍙栨帾鏂�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="閫犳垚缁撴灉" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causingResults"> + <a-input v-model="model.causingResults" placeholder="璇疯緭鍏ラ�犳垚缁撴灉" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎿嶄綔宸�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmer"> + <a-input v-model="model.confirmer" placeholder="璇疯緭鍏ユ搷浣滃伐" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎿嶄綔宸ョ‘璁ゆ椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmTime"> + <j-date placeholder="璇烽�夋嫨鎿嶄綔宸ョ‘璁ゆ椂闂�" v-model="model.confirmTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍖洪暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="district"> + <a-input v-model="model.district" placeholder="璇疯緭鍏ュ尯闀�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍖洪暱纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="districtTime"> + <j-date placeholder="璇烽�夋嫨鍖洪暱纭鏃堕棿" v-model="model.districtTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="涓績涓讳换" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="centerDirector"> + <a-input v-model="model.centerDirector" placeholder="璇疯緭鍏ヤ腑蹇冧富浠�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="涓績涓讳换纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="centerDirectorTime"> + <j-date placeholder="璇烽�夋嫨涓績涓讳换纭鏃堕棿" v-model="model.centerDirectorTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨寮�濮嬫椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportStartTime"> + <j-date placeholder="璇烽�夋嫨缁翠慨寮�濮嬫椂闂�" v-model="model.reportStartTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="璁惧鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentStatus"> + <a-input v-model="model.equipmentStatus" placeholder="璇疯緭鍏ヨ澶囩姸鎬�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍘熷洜鍒嗘瀽" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causeAnalysis"> + <a-input v-model="model.causeAnalysis" placeholder="璇疯緭鍏ュ師鍥犲垎鏋�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="妫�鏌ョ粨鏋�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionResults"> + <a-input v-model="model.inspectionResults" placeholder="璇疯緭鍏ユ鏌ョ粨鏋�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="閲囧彇鎺柦" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="takeSteps"> + <a-input v-model="model.takeSteps" placeholder="璇疯緭鍏ラ噰鍙栨帾鏂�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="寤鸿閲囧彇鎺柦" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="suggestionTakeSteps"> + <a-input v-model="model.suggestionTakeSteps" placeholder="璇疯緭鍏ュ缓璁噰鍙栨帾鏂�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="寤鸿閲囧彇鎺柦鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="suggestionTakeStepsTime"> + <j-date placeholder="璇烽�夋嫨寤鸿閲囧彇鎺柦鏃堕棿" v-model="model.suggestionTakeStepsTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨纭" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirm"> + <a-input v-model="model.repairConfirm" placeholder="璇疯緭鍏ョ淮淇‘璁�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨纭鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirmComment"> + <a-input v-model="model.repairConfirmComment" placeholder="璇疯緭鍏ョ淮淇‘璁ゆ剰瑙�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirmTime"> + <j-date placeholder="璇烽�夋嫨缁翠慨纭鏃堕棿" v-model="model.repairConfirmTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨缁勯暱纭" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeader"> + <a-input v-model="model.repairGroupLeader" placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨缁勯暱鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeaderComment"> + <a-input v-model="model.repairGroupLeaderComment" placeholder="璇疯緭鍏ョ淮淇粍闀挎剰瑙�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨缁勯暱纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeaderTime"> + <j-date placeholder="璇烽�夋嫨缁翠慨缁勯暱纭鏃堕棿" v-model="model.repairGroupLeaderTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨缁勯暱纭" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrict"> + <a-input v-model="model.repairDistrict" placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨缁勯暱鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrictComment"> + <a-input v-model="model.repairDistrictComment" placeholder="璇疯緭鍏ョ淮淇粍闀挎剰瑙�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="缁翠慨缁勯暱纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrictTime"> + <j-date placeholder="璇烽�夋嫨缁翠慨缁勯暱纭鏃堕棿" v-model="model.repairDistrictTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="checkAgree"> + <a-input v-model="model.checkAgree" placeholder="璇疯緭鍏ュ師鍥犲垎鏋愭牳瀵瑰悓鎰忋�佷笉鍚屾剰" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="涓嶅悓鎰忓師鍥犲垎鏋�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="disagreeReason"> + <a-input v-model="model.disagreeReason" placeholder="璇疯緭鍏ヤ笉鍚屾剰鍘熷洜鍒嗘瀽" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鏁存敼鎺柦" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rectificationMeasures"> + <a-input v-model="model.rectificationMeasures" placeholder="璇疯緭鍏ユ暣鏀规帾鏂�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="浜嬫晠缁撹" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accidentConclusion"> + <a-input v-model="model.accidentConclusion" placeholder="璇疯緭鍏ヤ簨鏁呯粨璁�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎶�鏈礋璐d汉" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirector"> + <a-input v-model="model.technicalDirector" placeholder="璇疯緭鍏ユ妧鏈礋璐d汉" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎶�鏈礋璐d汉纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorTime"> + <j-date placeholder="璇烽�夋嫨鎶�鏈礋璐d汉纭鏃堕棿" v-model="model.technicalDirectorTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎶�鏈富绠″绾ч瀵�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorLeader"> + <a-input v-model="model.technicalDirectorLeader" placeholder="璇疯緭鍏ユ妧鏈富绠″绾ч瀵�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorLeaderTime"> + <j-date placeholder="璇烽�夋嫨鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�" v-model="model.technicalDirectorLeaderTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="涓荤閮ㄧ骇棰嗗" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorPart"> + <a-input v-model="model.technicalDirectorPart" placeholder="璇疯緭鍏ヤ富绠¢儴绾ч瀵�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="涓荤閮ㄧ骇棰嗗纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorPartTime"> + <j-date placeholder="璇烽�夋嫨涓荤閮ㄧ骇棰嗗纭鏃堕棿" v-model="model.technicalDirectorPartTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </j-form-container> + </a-spin> +</template> + +<script> + + import { httpAction, getAction } from '@/api/manage' + import { validateDuplicateValue } from '@/utils/util' + + export default { + name: 'EamReportAccidentsRegisterForm', + components: { + }, + props: { + //琛ㄥ崟绂佺敤 + disabled: { + type: Boolean, + default: false, + required: false + } + }, + data () { + return { + model:{ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + confirmLoading: false, + validatorRules: { + }, + url: { + add: "/eam/eamReportAccidentsRegister/add", + edit: "/eam/eamReportAccidentsRegister/edit", + queryById: "/eam/eamReportAccidentsRegister/queryById" + } + } + }, + computed: { + formDisabled(){ + return this.disabled + }, + }, + created () { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add () { + this.edit(this.modelDefault); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + submitForm () { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + } + } +</script> \ No newline at end of file diff --git "a/src/views/eam/repair/modules/EamReportAccidentsRegisterModal.Style\043Drawer.vue" "b/src/views/eam/repair/modules/EamReportAccidentsRegisterModal.Style\043Drawer.vue" new file mode 100644 index 0000000..1eb037d --- /dev/null +++ "b/src/views/eam/repair/modules/EamReportAccidentsRegisterModal.Style\043Drawer.vue" @@ -0,0 +1,84 @@ +<template> + <a-drawer + :title="title" + :width="width" + placement="right" + :closable="false" + @close="close" + destroyOnClose + :visible="visible"> + <eam-report-accidents-register-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></eam-report-accidents-register-form> + <div class="drawer-footer"> + <a-button @click="handleCancel" style="margin-bottom: 0;">鍏抽棴</a-button> + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">鎻愪氦</a-button> + </div> + </a-drawer> +</template> + +<script> + + import EamReportAccidentsRegisterForm from './EamReportAccidentsRegisterForm' + + export default { + name: 'EamReportAccidentsRegisterModal', + components: { + EamReportAccidentsRegisterForm + }, + data () { + return { + title:"鎿嶄綔", + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }); + }, + close () { + this.$emit('close'); + this.visible = false; + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + handleCancel () { + this.close() + } + } + } +</script> + +<style lang="less" scoped> +/** Button鎸夐挳闂磋窛 */ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + .drawer-footer{ + position: absolute; + bottom: -8px; + width: 100%; + border-top: 1px solid #e8e8e8; + padding: 10px 16px; + text-align: right; + left: 0; + background: #fff; + border-radius: 0 0 2px 2px; + } +</style> \ No newline at end of file diff --git a/src/views/eam/repair/modules/EamReportAccidentsRegisterModal.vue b/src/views/eam/repair/modules/EamReportAccidentsRegisterModal.vue new file mode 100644 index 0000000..0695f71 --- /dev/null +++ b/src/views/eam/repair/modules/EamReportAccidentsRegisterModal.vue @@ -0,0 +1,60 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + @ok="handleOk" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <eam-report-accidents-register-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></eam-report-accidents-register-form> + </j-modal> +</template> + +<script> + + import EamReportAccidentsRegisterForm from './EamReportAccidentsRegisterForm' + export default { + name: 'EamReportAccidentsRegisterModal', + components: { + EamReportAccidentsRegisterForm + }, + data () { + return { + title:'', + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }) + }, + close () { + this.$emit('close'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleCancel () { + this.close() + } + } + } +</script> \ No newline at end of file diff --git a/src/views/eam/repair/modules/EamReportProductHazardsForm.vue b/src/views/eam/repair/modules/EamReportProductHazardsForm.vue new file mode 100644 index 0000000..fe1220e --- /dev/null +++ b/src/views/eam/repair/modules/EamReportProductHazardsForm.vue @@ -0,0 +1,159 @@ +<template> + <a-spin :spinning="confirmLoading"> + <j-form-container :disabled="formDisabled"> + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="鎶ヤ慨ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId"> + <a-input v-model="model.reportId" placeholder="璇疯緭鍏ユ姤淇甀D" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="璁惧ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> + <a-input v-model="model.equipmentId" placeholder="璇疯緭鍏ヨ澶嘔D" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎿嶄綔宸�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmer"> + <a-input v-model="model.confirmer" placeholder="璇疯緭鍏ユ搷浣滃伐" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎿嶄綔宸ョ‘璁ゆ椂闂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmTime"> + <j-date placeholder="璇烽�夋嫨鎿嶄綔宸ョ‘璁ゆ椂闂�" v-model="model.confirmTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="浜у搧鎹熷け鎯呭喌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productLoss"> + <a-input v-model="model.productLoss" placeholder="璇疯緭鍏ヤ骇鍝佹崯澶辨儏鍐�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qualityAnalysis"> + <a-input v-model="model.qualityAnalysis" placeholder="璇疯緭鍏ヤ骇鍝佹崯澶辫川閲忓奖鍝嶅垎鏋�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="涓荤宸ヨ壓" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologist"> + <a-input v-model="model.technologist" placeholder="璇疯緭鍏ヤ富绠″伐鑹�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="涓荤宸ヨ壓纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologistTime"> + <j-date placeholder="璇烽�夋嫨涓荤宸ヨ壓纭鏃堕棿" v-model="model.technologistTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="涓荤宸ヨ壓纭鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologistComment"> + <a-input v-model="model.technologistComment" placeholder="璇疯緭鍏ヤ富绠″伐鑹虹‘璁ゆ剰瑙�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="閮ㄧ骇棰嗗" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartment"> + <a-input v-model="model.deputyDepartment" placeholder="璇疯緭鍏ラ儴绾ч瀵�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="閮ㄧ骇棰嗗纭鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartmentTime"> + <j-date placeholder="璇烽�夋嫨閮ㄧ骇棰嗗纭鏃堕棿" v-model="model.deputyDepartmentTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="閮ㄧ骇棰嗗纭鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartmentComment"> + <a-input v-model="model.deputyDepartmentComment" placeholder="璇疯緭鍏ラ儴绾ч瀵肩‘璁ゆ剰瑙�" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </j-form-container> + </a-spin> +</template> + +<script> + + import { httpAction, getAction } from '@/api/manage' + import { validateDuplicateValue } from '@/utils/util' + + export default { + name: 'EamReportProductHazardsForm', + components: { + }, + props: { + //琛ㄥ崟绂佺敤 + disabled: { + type: Boolean, + default: false, + required: false + } + }, + data () { + return { + model:{ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + confirmLoading: false, + validatorRules: { + }, + url: { + add: "/eam/eamReportProductHazards/add", + edit: "/eam/eamReportProductHazards/edit", + queryById: "/eam/eamReportProductHazards/queryById" + } + } + }, + computed: { + formDisabled(){ + return this.disabled + }, + }, + created () { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add () { + this.edit(this.modelDefault); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + submitForm () { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + } + } +</script> \ No newline at end of file diff --git "a/src/views/eam/repair/modules/EamReportProductHazardsModal.Style\043Drawer.vue" "b/src/views/eam/repair/modules/EamReportProductHazardsModal.Style\043Drawer.vue" new file mode 100644 index 0000000..17b9046 --- /dev/null +++ "b/src/views/eam/repair/modules/EamReportProductHazardsModal.Style\043Drawer.vue" @@ -0,0 +1,84 @@ +<template> + <a-drawer + :title="title" + :width="width" + placement="right" + :closable="false" + @close="close" + destroyOnClose + :visible="visible"> + <eam-report-product-hazards-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></eam-report-product-hazards-form> + <div class="drawer-footer"> + <a-button @click="handleCancel" style="margin-bottom: 0;">鍏抽棴</a-button> + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">鎻愪氦</a-button> + </div> + </a-drawer> +</template> + +<script> + + import EamReportProductHazardsForm from './EamReportProductHazardsForm' + + export default { + name: 'EamReportProductHazardsModal', + components: { + EamReportProductHazardsForm + }, + data () { + return { + title:"鎿嶄綔", + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }); + }, + close () { + this.$emit('close'); + this.visible = false; + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + handleCancel () { + this.close() + } + } + } +</script> + +<style lang="less" scoped> +/** Button鎸夐挳闂磋窛 */ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + .drawer-footer{ + position: absolute; + bottom: -8px; + width: 100%; + border-top: 1px solid #e8e8e8; + padding: 10px 16px; + text-align: right; + left: 0; + background: #fff; + border-radius: 0 0 2px 2px; + } +</style> \ No newline at end of file diff --git a/src/views/eam/repair/modules/EamReportProductHazardsModal.vue b/src/views/eam/repair/modules/EamReportProductHazardsModal.vue new file mode 100644 index 0000000..780c21d --- /dev/null +++ b/src/views/eam/repair/modules/EamReportProductHazardsModal.vue @@ -0,0 +1,60 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + @ok="handleOk" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <eam-report-product-hazards-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></eam-report-product-hazards-form> + </j-modal> +</template> + +<script> + + import EamReportProductHazardsForm from './EamReportProductHazardsForm' + export default { + name: 'EamReportProductHazardsModal', + components: { + EamReportProductHazardsForm + }, + data () { + return { + title:'', + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }) + }, + close () { + this.$emit('close'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleCancel () { + this.close() + } + } + } +</script> \ No newline at end of file diff --git a/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue b/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue index 038abde..cd3bea5 100644 --- a/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue +++ b/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue @@ -1,86 +1,151 @@ <template> <j-modal :title="title" - :width="800" + fullscreen :visible="visible" + centered :confirmLoading="confirmLoading" - switchFullscreen + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" - @cancel="close" - :mask-closable="false" + @cancel="handleCancel" cancelText="鍏抽棴"> <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-row> - <a-col :span="12"> - <a-form-model-item prop="equipmentId" label="璁惧缂栧彿"> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="model.equipmentId"/> - </a-form-model-item> - </a-col> + <j-form-container :disabled="disableSubmit"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" + :wrapperCol="wrapperCol" slot="detail"> + <a-row> + <a-col :span="customSpan"> + <a-form-model-item prop="equipmentId" label="璁惧缂栧彿"> + <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="model.equipmentId"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鏄惁鍔犲伐"> + <j-dict-select-tag dict-code="is_processed" type="radio" v-model="model.isProcessed" + @change="handleRadioChange($event,'faultStartTime,breakdownFlag,' + + 'faultDescription,batchNumber,processingPart,quantity')"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鏁呴殰寮�濮嬫椂闂�"> + <a-date-picker :disabled="!Boolean(+model.isProcessed)" v-model="model.faultStartTime" value-format="YYYY-MM-DD" style="width:100%"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鏄惁鍋滄満"> + <j-dict-select-tag :disabled="!Boolean(+model.isProcessed)" dict-code="yn" placeholder="璇烽�夋嫨鏄惁鍋滄満" v-model="model.breakdownFlag"/> + </a-form-model-item> + </a-col> + </a-row> - <a-col :span="12"> - <a-form-model-item prop="faultName" label="鏁呴殰绠�绉�"> - <a-select placeholder="璇烽�夋嫨鏁呴殰绠�绉�" v-model="model.faultName" @change="handleFaultNameChange"> - <a-select-option v-for="item in faultReasonList" :key="item.faultName"> - {{ item.faultName }} - </a-select-option> - </a-select> - </a-form-model-item> - </a-col> - </a-row> + <a-row> + <a-col :span="customSpan"> + <a-form-model-item label="鏁呴殰鐜拌薄"> + <a-input :disabled="!Boolean(+model.isProcessed)" placeholder="璇疯緭鍏ユ晠闅滅幇璞�" v-model="model.faultDescription"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鎵规鍙�"> + <a-input :disabled="!Boolean(+model.isProcessed)" placeholder="璇疯緭鍏ユ壒娆″彿" v-model="model.batchNumber"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鍔犲伐闆朵欢鍙�"> + <a-input :disabled="!Boolean(+model.isProcessed)" placeholder="璇疯緭鍏ュ姞宸ラ浂浠跺彿" v-model="model.processingPart"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="浠舵暟"> + <a-input-number :disabled="!Boolean(+model.isProcessed)" placeholder="璇疯緭鍏ヤ欢鏁�" v-model="model.quantity" :min="0" style="width: 100%"/> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="12"> - <a-form-model-item label="鏁呴殰鍒嗙被"> - <a-input placeholder="璇疯緭鍏ユ晠闅滃垎绫�" v-model="model.faultType_dictText" readOnly/> - </a-form-model-item> - </a-col> - </a-row> + <a-row> + <a-col :span="customSpan"> + <a-form-model-item label="璁惧浜嬫晠"> + <j-dict-select-tag dict-code="yn" placeholder="璇烽�夋嫨璁惧浜嬫晠" v-model="model.isAccidentsRegister"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="搴熷搧浠跺彿"> + <a-input placeholder="璇疯緭鍏ュ簾鍝佷欢鍙�" v-model="model.scrapPartNumber"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="搴熷搧浠舵暟"> + <a-input-number placeholder="璇疯緭鍏ュ簾鍝佷欢鏁�" v-model="model.scrapPartQuantity" :min="0" style="width: 100%"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="搴熷搧浠峰��"> + <a-input placeholder="璇疯緭鍏ュ簾鍝佷环鍊�" v-model="model.scrapPartValue"/> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item label="鏁呴殰鎻忚堪" prop="faultDescription" :labelCol="labelColLong" - :wrapperCol="wrapperColLong"> - <a-textarea placeholder="璇疯緭鍏ユ晠闅滄弿杩�" v-model="model.faultDescription"/> - </a-form-model-item> - </a-col> - </a-row> + <a-row> + <a-col :span="customSpan"> + <a-form-model-item label="鏄惁鏈夎澶囨搷浣滆瘉"> + <j-dict-select-tag dict-code="yn" placeholder="璇烽�夋嫨鏄惁鏈夎澶囨搷浣滆瘉" v-model="model.operationCertificate"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鏄惁鏂數閲嶅惎"> + <j-dict-select-tag dict-code="yn" placeholder="璇烽�夋嫨鏄惁鏂數閲嶅惎" v-model="model.powerOffRestart"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鏄惁涓烘壒娆¢浠�"> + <j-dict-select-tag dict-code="yn" placeholder="璇烽�夋嫨鏄惁涓烘壒娆¢浠�" v-model="model.batchFirstPiece"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鍙樺姩鍥犵礌"> + <j-dict-select-tag dict-code="yn" placeholder="璇烽�夋嫨鍙樺姩鍥犵礌" v-model="model.variableFactors"/> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="12"> - <a-form-model-item prop="faultStartTime" label="鏁呴殰寮�濮嬫椂闂�"> - <a-date-picker showTime placeholder="璇烽�夋嫨鏁呴殰寮�濮嬫椂闂�" v-model="model.faultStartTime" - :allow-clear="false" value-format="YYYY-MM-DD HH:mm:ss" :disabledDate="disabledDate" - :disabledTime="disabledTime"/> - </a-form-model-item> - </a-col> + <a-row> + <a-col :span="customSpan"> + <a-form-model-item label="鍙樺姩鍥犵礌鍐呭"> + <j-dict-select-tag dict-code="variable_factors_value" placeholder="璇烽�夋嫨鍙樺姩鍥犵礌鍐呭" v-model="model.variableFactorsValue"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="鎵ц绋嬪簭"> + <a-input placeholder="璇疯緭鍏ユ墽琛岀▼搴�" v-model="model.executeNc"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="浜嬫晠鐜拌薄"> + <a-input placeholder="璇疯緭鍏ヤ簨鏁呯幇璞�" v-model="model.accidentPhenomenon"/> + </a-form-model-item> + </a-col> + <a-col :span="customSpan"> + <a-form-model-item label="閲囧彇鎺柦"> + <a-input placeholder="璇疯緭鍏ラ噰鍙栨帾鏂�" v-model="model.measure"/> + </a-form-model-item> + </a-col> + </a-row> - <a-col :span="12"> - <a-form-model-item prop="breakdownFlag" label="鏄惁鍋滄満"> - <a-radio-group v-model="model.breakdownFlag"> - <a-radio v-for="item in breakdownFlagList" :value="item.value">{{ item.label }}</a-radio> - </a-radio-group> - </a-form-model-item> - </a-col> - </a-row> + <a-row> + <a-col :span="customSpan"> + <a-form-model-item label="閫犳垚缁撴灉"> + <a-input placeholder="璇疯緭鍏ラ�犳垚缁撴灉" v-model="model.causingResults"/> + </a-form-model-item> + </a-col> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="imageFiles" label="鎶ヤ慨鍥剧墖" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" - v-model="model.imageFilesResult"/> - </a-form-model-item> - </a-col> - </a-row> + <a-col :span="customSpan"> + <a-form-model-item label="澶囨敞"> + <a-input placeholder="璇疯緭鍏ュ娉�" v-model="model.measure"/> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="remark" label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> + </a-form-model> + </j-form-container> </a-spin> </j-modal> </template> @@ -105,7 +170,10 @@ return { title: '鎿嶄綔', visible: false, + //璇︽儏鎺у埗 + disableSubmit: false, model: {}, + customSpan: 6, labelCol: { xs: { span: 24 }, sm: { span: 8 } @@ -148,11 +216,12 @@ }, methods: { add() { + this.editable = true //鍒濆鍖栭粯璁ゅ�� - this.edit({ - faultDescription: '', - breakdownFlag: this.breakdownFlagList.find(item => item.label === '鍚�').value - }) + this.model = { + isProcessed: 0, + } + this.visible = true }, edit(record) { @@ -210,6 +279,23 @@ } }, + /**\ + * 鍗曢�夋鍊煎彂鐢熸敼鍙樻椂瑙﹀彂 + * @param value 鍗曢�夋鍊� + * @param key 鍗曢�夋鍏宠仈瀛楁 + */ + handleRadioChange(value, key) { + //key鍖呭惈,璇存槑鏄閫夋 + if (key.includes(',')) { + const keys = key.split(',') + keys.forEach(key => { + if (value === '0') delete this.model[key] + }) + }else { + if (value === '0') delete this.model[key] + } + }, + /** * 绂佺敤鏃ユ湡 * @params current 琚鐢ㄧ殑鏃堕棿 @@ -243,7 +329,10 @@ this.$emit('close') this.visible = false if (this.$refs.form) this.$refs.form.clearValidate() - } + }, + handleCancel() { + this.close() + }, } } </script> diff --git a/src/views/eam/repair/modules/EamReportThreeNoSpareForm.vue b/src/views/eam/repair/modules/EamReportThreeNoSpareForm.vue new file mode 100644 index 0000000..68eb30c --- /dev/null +++ b/src/views/eam/repair/modules/EamReportThreeNoSpareForm.vue @@ -0,0 +1,144 @@ +<template> + <a-spin :spinning="confirmLoading"> + <j-form-container :disabled="formDisabled"> + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="鍒犻櫎鏍囪" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag"> + <a-input v-model="model.delFlag" placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鎶ヤ慨ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId"> + <a-input v-model="model.reportId" placeholder="璇疯緭鍏ユ姤淇甀D" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="璁惧ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> + <a-input v-model="model.equipmentId" placeholder="璇疯緭鍏ヨ澶嘔D" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍘熷洜鍒嗘瀽" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causeAnalysis"> + <a-input v-model="model.causeAnalysis" placeholder="璇疯緭鍏ュ師鍥犲垎鏋�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍩硅鏁欒偛鏄� 鍚�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isTrainingEducation"> + <a-input v-model="model.isTrainingEducation" placeholder="璇疯緭鍏ュ煿璁暀鑲叉槸 鍚�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍩硅褰㈠紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingFormat"> + <a-input v-model="model.trainingFormat" placeholder="璇疯緭鍏ュ煿璁舰寮�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍩硅鍐呭" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingContent"> + <a-input v-model="model.trainingContent" placeholder="璇疯緭鍏ュ煿璁唴瀹�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍩硅浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingUser"> + <a-input v-model="model.trainingUser" placeholder="璇疯緭鍏ュ煿璁汉" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍩硅鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingUserTime"> + <j-date placeholder="璇烽�夋嫨鍩硅鏃堕棿" v-model="model.trainingUserTime" style="width: 100%" /> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </j-form-container> + </a-spin> +</template> + +<script> + + import { httpAction, getAction } from '@/api/manage' + import { validateDuplicateValue } from '@/utils/util' + + export default { + name: 'EamReportThreeNoSpareForm', + components: { + }, + props: { + //琛ㄥ崟绂佺敤 + disabled: { + type: Boolean, + default: false, + required: false + } + }, + data () { + return { + model:{ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + confirmLoading: false, + validatorRules: { + }, + url: { + add: "/eam/eamReportThreeNoSpare/add", + edit: "/eam/eamReportThreeNoSpare/edit", + queryById: "/eam/eamReportThreeNoSpare/queryById" + } + } + }, + computed: { + formDisabled(){ + return this.disabled + }, + }, + created () { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add () { + this.edit(this.modelDefault); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + submitForm () { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + } + } +</script> \ No newline at end of file diff --git "a/src/views/eam/repair/modules/EamReportThreeNoSpareModal.Style\043Drawer.vue" "b/src/views/eam/repair/modules/EamReportThreeNoSpareModal.Style\043Drawer.vue" new file mode 100644 index 0000000..178cd65 --- /dev/null +++ "b/src/views/eam/repair/modules/EamReportThreeNoSpareModal.Style\043Drawer.vue" @@ -0,0 +1,84 @@ +<template> + <a-drawer + :title="title" + :width="width" + placement="right" + :closable="false" + @close="close" + destroyOnClose + :visible="visible"> + <eam-report-three-no-spare-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></eam-report-three-no-spare-form> + <div class="drawer-footer"> + <a-button @click="handleCancel" style="margin-bottom: 0;">鍏抽棴</a-button> + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">鎻愪氦</a-button> + </div> + </a-drawer> +</template> + +<script> + + import EamReportThreeNoSpareForm from './EamReportThreeNoSpareForm' + + export default { + name: 'EamReportThreeNoSpareModal', + components: { + EamReportThreeNoSpareForm + }, + data () { + return { + title:"鎿嶄綔", + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }); + }, + close () { + this.$emit('close'); + this.visible = false; + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + handleCancel () { + this.close() + } + } + } +</script> + +<style lang="less" scoped> +/** Button鎸夐挳闂磋窛 */ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + .drawer-footer{ + position: absolute; + bottom: -8px; + width: 100%; + border-top: 1px solid #e8e8e8; + padding: 10px 16px; + text-align: right; + left: 0; + background: #fff; + border-radius: 0 0 2px 2px; + } +</style> \ No newline at end of file diff --git a/src/views/eam/repair/modules/EamReportThreeNoSpareModal.vue b/src/views/eam/repair/modules/EamReportThreeNoSpareModal.vue new file mode 100644 index 0000000..5fcb92f --- /dev/null +++ b/src/views/eam/repair/modules/EamReportThreeNoSpareModal.vue @@ -0,0 +1,60 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + @ok="handleOk" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <eam-report-three-no-spare-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></eam-report-three-no-spare-form> + </j-modal> +</template> + +<script> + + import EamReportThreeNoSpareForm from './EamReportThreeNoSpareForm' + export default { + name: 'EamReportThreeNoSpareModal', + components: { + EamReportThreeNoSpareForm + }, + data () { + return { + title:'', + width:800, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }) + }, + close () { + this.$emit('close'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleCancel () { + this.close() + } + } + } +</script> \ No newline at end of file -- Gitblit v1.9.3