From 01384db0bba627fc83766e3dfd2acefa6caa0b21 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期一, 21 七月 2025 14:47:36 +0800 Subject: [PATCH] 设备维修代码 --- src/views/eam/repair/EamReportAccidentsRegisterList.vue | 385 +++++++++ src/views/eam/repair/EamReportProductHazardsList.vue | 225 +++++ src/views/eam/repair/EamReportThreeNoSpareList.vue | 210 +++++ src/views/eam/repair/modules/EamReportThreeNoSpareModal.Style#Drawer.vue | 155 +++ src/views/eam/repair/modules/EamRepairPersonModal.vue | 118 ++ src/views/eam/repair/modules/EamReportProductHazardsModal.vue | 144 +++ src/views/eam/repair/modules/EamReportAccidentsRegisterModal.vue | 240 ++++++ src/views/eam/repair/modules/EamReportProductHazardsModal.Style#Drawer.vue | 164 ++++ src/views/eam/repair/EamRepairPersonList.vue | 160 ++-- src/views/eam/repair/modules/EamReportThreeNoSpareModal.vue | 135 +++ src/views/eam/repair/modules/EamRepairPersonModal.Style#Drawer.vue | 132 ++ src/views/eam/repair/modules/EamReportAccidentsRegisterModal.Style#Drawer.vue | 260 ++++++ 12 files changed, 2,187 insertions(+), 141 deletions(-) diff --git a/src/views/eam/repair/EamRepairPersonList.vue b/src/views/eam/repair/EamRepairPersonList.vue index 6ebb478..ad4b55a 100644 --- a/src/views/eam/repair/EamRepairPersonList.vue +++ b/src/views/eam/repair/EamRepairPersonList.vue @@ -1,13 +1,52 @@ <template> <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> + + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍒犻櫎鏍囪"> + <a-input placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" v-model="queryParam.delFlag"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="缁翠慨宸ュ崟Id"> + <a-input placeholder="璇疯緭鍏ョ淮淇伐鍗旾d" v-model="queryParam.repairId"></a-input> + </a-form-item> + </a-col> + <template v-if="toggleSearchStatus"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="缁翠慨浜�"> + <a-input placeholder="璇疯緭鍏ョ淮淇汉" v-model="queryParam.repairUser"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鏄惁鏄富缁翠慨浜�;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽槸涓荤淮淇汉;鏄� 鍚�" v-model="queryParam.repairPrimary"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="缁翠慨鏃堕暱"> + <a-input placeholder="璇疯緭鍏ョ淮淇椂闀�" v-model="queryParam.repairDuration"></a-input> + </a-form-item> + </a-col> + </template> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a @click="handleToggleSearch" style="margin-left: 8px"> + {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> + </span> + </a-col> + </a-row> </a-form> </div> - <!-- 鏌ヨ鍖哄煙-END --> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> @@ -16,8 +55,6 @@ <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> @@ -36,36 +73,15 @@ <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" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @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> @@ -74,9 +90,6 @@ <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> @@ -88,21 +101,21 @@ </a-table> </div> + <!-- table鍖哄煙-end --> - <eam-repair-person-modal ref="modalForm" @ok="modalFormOk"></eam-repair-person-modal> + <!-- 琛ㄥ崟鍖哄煙 --> + <eamRepairPerson-modal ref="modalForm" @ok="modalFormOk"></eamRepairPerson-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' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' export default { - name: 'EamRepairPersonList', - mixins:[JeecgListMixin, mixinDevice], + name: "EamRepairPersonList", + mixins:[JeecgListMixin], components: { EamRepairPersonModal }, @@ -120,73 +133,60 @@ customRender:function (t,r,index) { return parseInt(index)+1; } - }, - { - title:'缁翠慨宸ュ崟Id', + }, + { + title: '鍒犻櫎鏍囪', + align:"center", + dataIndex: 'delFlag' + }, + { + title: '缁翠慨宸ュ崟Id', align:"center", dataIndex: 'repairId' - }, - { - title:'缁翠慨浜�', + }, + { + title: '缁翠慨浜�', align:"center", dataIndex: 'repairUser' - }, - { - title:'鏄惁鏄富缁翠慨浜�', + }, + { + title: '鏄惁鏄富缁翠慨浜�;鏄� 鍚�', align:"center", dataIndex: 'repairPrimary' - }, - { - title:'缁翠慨鏃堕暱', + }, + { + title: '缁翠慨鏃堕暱', align:"center", dataIndex: 'repairDuration' - }, - { - title:'澶囨敞', + }, + { + title: '澶囨敞', align:"center", dataIndex: 'remark' - }, + }, { title: '鎿嶄綔', dataIndex: 'action', align:"center", - fixed:"right", - width:147, - scopedSlots: { customRender: 'action' } + scopedSlots: { customRender: 'action' }, } ], - url: { + url: { list: "/eam/eamRepairPerson/list", delete: "/eam/eamRepairPerson/delete", deleteBatch: "/eam/eamRepairPerson/deleteBatch", - exportXlsUrl: "/eam/eamRepairPerson/exportXls", + exportXlsUrl: "eam/eamRepairPerson/exportXls", importExcelUrl: "eam/eamRepairPerson/importExcel", - - }, - dictOptions:{}, - superFieldList:[], - } - }, - created() { - this.getSuperFieldList(); - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, - }, + }, + } + }, + 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> diff --git a/src/views/eam/repair/EamReportAccidentsRegisterList.vue b/src/views/eam/repair/EamReportAccidentsRegisterList.vue new file mode 100644 index 0000000..2d8df63 --- /dev/null +++ b/src/views/eam/repair/EamReportAccidentsRegisterList.vue @@ -0,0 +1,385 @@ +<template> + <a-card :bordered="false"> + + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍒犻櫎鏍囪"> + <a-input placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" v-model="queryParam.delFlag"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鎶ヤ慨ID"> + <a-input placeholder="璇疯緭鍏ユ姤淇甀D" v-model="queryParam.reportId"></a-input> + </a-form-item> + </a-col> + <template v-if="toggleSearchStatus"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="璁惧ID"> + <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="queryParam.equipmentId"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鏄惁鏈夎澶囨搷浣滆瘉;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽湁璁惧鎿嶄綔璇�;鏄� 鍚�" v-model="queryParam.operationCertificate"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鏄惁鏂數閲嶅惎"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽柇鐢甸噸鍚�" v-model="queryParam.powerOffRestart"></a-input> + </a-form-item> + </a-col> + </template> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a @click="handleToggleSearch" style="margin-left: 8px"> + {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> + </span> + </a-col> + + </a-row> + </a-form> + </div> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + <a-button type="primary" icon="download" @click="handleExportXls('璁惧浜嬫晠鐧昏琛�')">瀵煎嚭</a-button> + <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-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" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + class="j-table-force-nowrap" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + @change="handleTableChange"> + + <span slot="action" slot-scope="text, record"> + <a @click="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + <!-- table鍖哄煙-end --> + + <!-- 琛ㄥ崟鍖哄煙 --> + <eamReportAccidentsRegister-modal ref="modalForm" @ok="modalFormOk"></eamReportAccidentsRegister-modal> + </a-card> +</template> + +<script> + import '@/assets/less/TableExpand.less' + import EamReportAccidentsRegisterModal from './modules/EamReportAccidentsRegisterModal' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + + export default { + name: "EamReportAccidentsRegisterList", + mixins:[JeecgListMixin], + components: { + EamReportAccidentsRegisterModal + }, + 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: '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' + }, + { + title: '鍖洪暱', + align:"center", + dataIndex: 'district' + }, + { + title: '鍖洪暱纭鏃堕棿', + align:"center", + dataIndex: 'districtTime' + }, + { + title: '涓績涓讳换', + align:"center", + dataIndex: 'centerDirector' + }, + { + title: '涓績涓讳换纭鏃堕棿', + align:"center", + dataIndex: 'centerDirectorTime' + }, + { + title: '缁翠慨寮�濮嬫椂闂�', + align:"center", + dataIndex: 'reportStartTime' + }, + { + 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' + }, + { + title: '缁翠慨纭', + align:"center", + dataIndex: 'repairConfirm' + }, + { + title: '缁翠慨纭鎰忚', + align:"center", + dataIndex: 'repairConfirmComment' + }, + { + title: '缁翠慨纭鏃堕棿', + align:"center", + dataIndex: 'repairConfirmTime' + }, + { + title: '缁翠慨缁勯暱纭', + align:"center", + dataIndex: 'repairGroupLeader' + }, + { + title: '缁翠慨缁勯暱鎰忚', + align:"center", + dataIndex: 'repairGroupLeaderComment' + }, + { + title: '缁翠慨缁勯暱纭鏃堕棿', + align:"center", + dataIndex: 'repairGroupLeaderTime' + }, + { + title: '缁翠慨缁勯暱纭', + align:"center", + dataIndex: 'repairDistrict' + }, + { + title: '缁翠慨缁勯暱鎰忚', + align:"center", + dataIndex: 'repairDistrictComment' + }, + { + title: '缁翠慨缁勯暱纭鏃堕棿', + align:"center", + dataIndex: 'repairDistrictTime' + }, + { + 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' + }, + { + title: '鎶�鏈富绠″绾ч瀵�', + align:"center", + dataIndex: 'technicalDirectorLeader' + }, + { + title: '鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�', + align:"center", + dataIndex: 'technicalDirectorLeaderTime' + }, + { + title: '涓荤閮ㄧ骇棰嗗', + align:"center", + dataIndex: 'technicalDirectorPart' + }, + { + title: '涓荤閮ㄧ骇棰嗗纭鏃堕棿', + align:"center", + dataIndex: 'technicalDirectorPartTime' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + scopedSlots: { customRender: 'action' }, + } + ], + url: { + list: "/eam/eamReportAccidentsRegister/list", + delete: "/eam/eamReportAccidentsRegister/delete", + deleteBatch: "/eam/eamReportAccidentsRegister/deleteBatch", + exportXlsUrl: "eam/eamReportAccidentsRegister/exportXls", + importExcelUrl: "eam/eamReportAccidentsRegister/importExcel", + }, + } + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + + } + } +</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..542d88e --- /dev/null +++ b/src/views/eam/repair/EamReportProductHazardsList.vue @@ -0,0 +1,225 @@ +<template> + <a-card :bordered="false"> + + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鎶ヤ慨ID"> + <a-input placeholder="璇疯緭鍏ユ姤淇甀D" v-model="queryParam.reportId"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="璁惧ID"> + <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="queryParam.equipmentId"></a-input> + </a-form-item> + </a-col> + <template v-if="toggleSearchStatus"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鎿嶄綔宸�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐" v-model="queryParam.confirmer"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鎿嶄綔宸ョ‘璁ゆ椂闂�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐纭鏃堕棿" v-model="queryParam.confirmTime"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="浜у搧鎹熷け鎯呭喌;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ヤ骇鍝佹崯澶辨儏鍐�;鏄� 鍚�" v-model="queryParam.productLoss"></a-input> + </a-form-item> + </a-col> + </template> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a @click="handleToggleSearch" style="margin-left: 8px"> + {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> + </span> + </a-col> + + </a-row> + </a-form> + </div> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + <a-button type="primary" icon="download" @click="handleExportXls('浜у搧瀹夊叏闅愭偅纭')">瀵煎嚭</a-button> + <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-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" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + class="j-table-force-nowrap" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + @change="handleTableChange"> + + <span slot="action" slot-scope="text, record"> + <a @click="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + <!-- table鍖哄煙-end --> + + <!-- 琛ㄥ崟鍖哄煙 --> + <eamReportProductHazards-modal ref="modalForm" @ok="modalFormOk"></eamReportProductHazards-modal> + </a-card> +</template> + +<script> + import '@/assets/less/TableExpand.less' + import EamReportProductHazardsModal from './modules/EamReportProductHazardsModal' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + + export default { + name: "EamReportProductHazardsList", + mixins:[JeecgListMixin], + components: { + EamReportProductHazardsModal + }, + 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: 'confirmer' + }, + { + title: '鎿嶄綔宸ョ‘璁ゆ椂闂�', + align:"center", + dataIndex: 'confirmTime' + }, + { + title: '浜у搧鎹熷け鎯呭喌;鏄� 鍚�', + align:"center", + dataIndex: 'productLoss' + }, + { + title: '浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽', + align:"center", + dataIndex: 'qualityAnalysis' + }, + { + title: '涓荤宸ヨ壓', + align:"center", + dataIndex: 'technologist' + }, + { + title: '涓荤宸ヨ壓纭鏃堕棿', + align:"center", + dataIndex: 'technologistTime' + }, + { + title: '涓荤宸ヨ壓纭鎰忚', + align:"center", + dataIndex: 'technologistComment' + }, + { + title: '閮ㄧ骇棰嗗', + align:"center", + dataIndex: 'deputyDepartment' + }, + { + title: '閮ㄧ骇棰嗗纭鏃堕棿', + align:"center", + dataIndex: 'deputyDepartmentTime' + }, + { + title: '閮ㄧ骇棰嗗纭鎰忚', + align:"center", + dataIndex: 'deputyDepartmentComment' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + scopedSlots: { customRender: 'action' }, + } + ], + url: { + list: "/eam/eamReportProductHazards/list", + delete: "/eam/eamReportProductHazards/delete", + deleteBatch: "/eam/eamReportProductHazards/deleteBatch", + exportXlsUrl: "eam/eamReportProductHazards/exportXls", + importExcelUrl: "eam/eamReportProductHazards/importExcel", + }, + } + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/eam/repair/EamReportThreeNoSpareList.vue b/src/views/eam/repair/EamReportThreeNoSpareList.vue new file mode 100644 index 0000000..f6427f1 --- /dev/null +++ b/src/views/eam/repair/EamReportThreeNoSpareList.vue @@ -0,0 +1,210 @@ +<template> + <a-card :bordered="false"> + + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍒犻櫎鏍囪"> + <a-input placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" v-model="queryParam.delFlag"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍘熷洜鍒嗘瀽"> + <a-input placeholder="璇疯緭鍏ュ師鍥犲垎鏋�" v-model="queryParam.causeAnalysis"></a-input> + </a-form-item> + </a-col> + <template v-if="toggleSearchStatus"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍩硅鏁欒偛;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ュ煿璁暀鑲�;鏄� 鍚�" v-model="queryParam.isTrainingEducation"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍩硅褰㈠紡"> + <a-input placeholder="璇疯緭鍏ュ煿璁舰寮�" v-model="queryParam.trainingFormat"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍩硅鍐呭"> + <a-input placeholder="璇疯緭鍏ュ煿璁唴瀹�" v-model="queryParam.trainingContent"></a-input> + </a-form-item> + </a-col> + </template> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a @click="handleToggleSearch" style="margin-left: 8px"> + {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> + </span> + </a-col> + + </a-row> + </a-form> + </div> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + <a-button type="primary" icon="download" @click="handleExportXls('鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃')">瀵煎嚭</a-button> + <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-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" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + class="j-table-force-nowrap" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + @change="handleTableChange"> + + <span slot="action" slot-scope="text, record"> + <a @click="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + <!-- table鍖哄煙-end --> + + <!-- 琛ㄥ崟鍖哄煙 --> + <eamReportThreeNoSpare-modal ref="modalForm" @ok="modalFormOk"></eamReportThreeNoSpare-modal> + </a-card> +</template> + +<script> + import '@/assets/less/TableExpand.less' + import EamReportThreeNoSpareModal from './modules/EamReportThreeNoSpareModal' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + + export default { + name: "EamReportThreeNoSpareList", + mixins:[JeecgListMixin], + 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: '鍘熷洜鍒嗘瀽', + 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' + }, + { + title: '鎶ヤ慨ID', + align:"center", + dataIndex: 'reportId' + }, + { + title: '璁惧ID', + align:"center", + dataIndex: 'equipmentId' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + scopedSlots: { customRender: 'action' }, + } + ], + url: { + list: "/eam/eamReportThreeNoSpare/list", + delete: "/eam/eamReportThreeNoSpare/delete", + deleteBatch: "/eam/eamReportThreeNoSpare/deleteBatch", + exportXlsUrl: "eam/eamReportThreeNoSpare/exportXls", + importExcelUrl: "eam/eamReportThreeNoSpare/importExcel", + }, + } + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ 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" index 3426906..445a428 100644 --- "a/src/views/eam/repair/modules/EamRepairPersonModal.Style\043Drawer.vue" +++ "b/src/views/eam/repair/modules/EamRepairPersonModal.Style\043Drawer.vue" @@ -1,76 +1,138 @@ <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> + :title="title" + :width="800" + placement="right" + :closable="false" + @close="close" + :visible="visible"> + + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪"> + <a-input-number v-model="model.delFlag" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairId" label="缁翠慨宸ュ崟Id"> + <a-input placeholder="璇疯緭鍏ョ淮淇伐鍗旾d" v-model="model.repairId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairUser" label="缁翠慨浜�"> + <a-input placeholder="璇疯緭鍏ョ淮淇汉" v-model="model.repairUser" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairPrimary" label="鏄惁鏄富缁翠慨浜�;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽槸涓荤淮淇汉;鏄� 鍚�" v-model="model.repairPrimary" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDuration" label="缁翠慨鏃堕暱"> + <a-input placeholder="璇疯緭鍏ョ淮淇椂闀�" v-model="model.repairDuration" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark" label="澶囨敞"> + <a-input placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" /> + </a-form-model-item> + + </a-form-model> + </a-spin> + + <div class="drawer-bootom-button"> + <a-button type="primary" @click="handleOk">纭畾</a-button> + <a-button type="primary" @click="handleCancel">鍙栨秷</a-button> </div> </a-drawer> </template> <script> - - import EamRepairPersonForm from './EamRepairPersonForm' + import { httpAction } from '@/api/manage' + import moment from "moment" export default { - name: 'EamRepairPersonModal', - components: { - EamRepairPersonForm - }, + name: "EamRepairPersonModal", data () { return { title:"鎿嶄綔", - width:800, visible: false, - disableSubmit: false + 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", + }, } + }, + created () { }, methods: { add () { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.add(); - }) + //鍒濆鍖栭粯璁ゅ�� + this.edit({}); }, edit (record) { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.edit(record); - }); + this.model = Object.assign({}, record); + this.visible = true; }, close () { this.$emit('close'); this.visible = false; - }, - submitCallback(){ - this.$emit('ok'); - this.visible = false; + this.$refs.form.clearValidate(); }, handleOk () { - this.$refs.realForm.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; + that.close(); + }) + }else{ + return false; + } + }) }, handleCancel () { this.close() - } + }, + + } } </script> <style lang="less" scoped> -/** Button鎸夐挳闂磋窛 */ + /**Button鎸夐挳闂磋窛*/ .ant-btn { margin-left: 30px; margin-bottom: 30px; float: right; } - .drawer-footer{ + /**鎶藉眽鎸夐挳鏍峰紡*/ + .drawer-bootom-button { position: absolute; bottom: -8px; width: 100%; diff --git a/src/views/eam/repair/modules/EamRepairPersonModal.vue b/src/views/eam/repair/modules/EamRepairPersonModal.vue index 1320a38..6b91787 100644 --- a/src/views/eam/repair/modules/EamRepairPersonModal.vue +++ b/src/views/eam/repair/modules/EamRepairPersonModal.vue @@ -1,60 +1,126 @@ <template> <j-modal :title="title" - :width="width" + :width="800" :visible="visible" + :confirmLoading="confirmLoading" 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> + + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪"> + <a-input-number v-model="model.delFlag"/> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairId" label="缁翠慨宸ュ崟Id"> + <a-input placeholder="璇疯緭鍏ョ淮淇伐鍗旾d" v-model="model.repairId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairUser" label="缁翠慨浜�"> + <a-input placeholder="璇疯緭鍏ョ淮淇汉" v-model="model.repairUser" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairPrimary" label="鏄惁鏄富缁翠慨浜�;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽槸涓荤淮淇汉;鏄� 鍚�" v-model="model.repairPrimary" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDuration" label="缁翠慨鏃堕暱"> + <a-input placeholder="璇疯緭鍏ョ淮淇椂闀�" v-model="model.repairDuration" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark" label="澶囨敞"> + <a-input placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" /> + </a-form-model-item> + + </a-form-model> + </a-spin> </j-modal> </template> <script> + import { httpAction } from '@/api/manage' + import moment from "moment" - import EamRepairPersonForm from './EamRepairPersonForm' export default { - name: 'EamRepairPersonModal', - components: { - EamRepairPersonForm - }, + name: "EamRepairPersonModal", data () { return { - title:'', - width:800, + title:"鎿嶄綔", visible: false, - disableSubmit: false + 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", + }, } + }, + created () { }, methods: { add () { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.add(); - }) + //鍒濆鍖栭粯璁ゅ�� + this.edit({}); }, edit (record) { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.edit(record); - }) + this.model = Object.assign({}, record); + this.visible = true; }, close () { this.$emit('close'); this.visible = false; + this.$refs.form.clearValidate(); }, handleOk () { - this.$refs.realForm.submitForm(); - }, - submitCallback(){ - this.$emit('ok'); - this.visible = false; + 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; + that.close(); + }) + }else{ + return false; + } + }) }, handleCancel () { this.close() - } + }, + + } } -</script> \ No newline at end of file +</script> + +<style lang="less" scoped> + +</style> \ 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..3b614f8 --- /dev/null +++ "b/src/views/eam/repair/modules/EamReportAccidentsRegisterModal.Style\043Drawer.vue" @@ -0,0 +1,260 @@ +<template> + <a-drawer + :title="title" + :width="800" + placement="right" + :closable="false" + @close="close" + :visible="visible"> + + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪"> + <a-input-number v-model="model.delFlag" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId" label="鎶ヤ慨ID"> + <a-input placeholder="璇疯緭鍏ユ姤淇甀D" v-model="model.reportId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧ID"> + <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="model.equipmentId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationCertificate" label="鏄惁鏈夎澶囨搷浣滆瘉;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽湁璁惧鎿嶄綔璇�;鏄� 鍚�" v-model="model.operationCertificate" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="powerOffRestart" label="鏄惁鏂數閲嶅惎"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽柇鐢甸噸鍚�" v-model="model.powerOffRestart" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchFirstPiece" label="鏄惁涓烘壒娆¢浠�"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︿负鎵规棣栦欢" v-model="model.batchFirstPiece" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="variableFactors" label="鍙樺姩鍥犵礌;濉啓鏄垨鍚�"> + <a-input placeholder="璇疯緭鍏ュ彉鍔ㄥ洜绱�;濉啓鏄垨鍚�" v-model="model.variableFactors" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="variableFactorsValue" label="鍙樺姩鍥犵礌鍐呭;鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��"> + <a-input placeholder="璇疯緭鍏ュ彉鍔ㄥ洜绱犲唴瀹�;鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��" v-model="model.variableFactorsValue" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="executeNc" label="鎵ц绋嬪簭"> + <a-input placeholder="璇疯緭鍏ユ墽琛岀▼搴�" v-model="model.executeNc" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accidentPhenomenon" label="浜嬫晠鐜拌薄"> + <a-input placeholder="璇疯緭鍏ヤ簨鏁呯幇璞�" v-model="model.accidentPhenomenon" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measure" label="閲囧彇鎺柦"> + <a-input placeholder="璇疯緭鍏ラ噰鍙栨帾鏂�" v-model="model.measure" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causingResults" label="閫犳垚缁撴灉"> + <a-input placeholder="璇疯緭鍏ラ�犳垚缁撴灉" v-model="model.causingResults" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmer" label="鎿嶄綔宸�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐" v-model="model.confirmer" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmTime" label="鎿嶄綔宸ョ‘璁ゆ椂闂�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐纭鏃堕棿" v-model="model.confirmTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="district" label="鍖洪暱"> + <a-input placeholder="璇疯緭鍏ュ尯闀�" v-model="model.district" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="districtTime" label="鍖洪暱纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ュ尯闀跨‘璁ゆ椂闂�" v-model="model.districtTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="centerDirector" label="涓績涓讳换"> + <a-input placeholder="璇疯緭鍏ヤ腑蹇冧富浠�" v-model="model.centerDirector" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="centerDirectorTime" label="涓績涓讳换纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ヤ腑蹇冧富浠荤‘璁ゆ椂闂�" v-model="model.centerDirectorTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportStartTime" label="缁翠慨寮�濮嬫椂闂�"> + <a-input placeholder="璇疯緭鍏ョ淮淇紑濮嬫椂闂�" v-model="model.reportStartTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentStatus" label="璁惧鐘舵��"> + <a-input placeholder="璇疯緭鍏ヨ澶囩姸鎬�" v-model="model.equipmentStatus" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causeAnalysis" label="鍘熷洜鍒嗘瀽"> + <a-input placeholder="璇疯緭鍏ュ師鍥犲垎鏋�" v-model="model.causeAnalysis" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionResults" label="妫�鏌ョ粨鏋�"> + <a-input placeholder="璇疯緭鍏ユ鏌ョ粨鏋�" v-model="model.inspectionResults" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="takeSteps" label="閲囧彇鎺柦"> + <a-input placeholder="璇疯緭鍏ラ噰鍙栨帾鏂�" v-model="model.takeSteps" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="suggestionTakeSteps" label="寤鸿閲囧彇鎺柦"> + <a-input placeholder="璇疯緭鍏ュ缓璁噰鍙栨帾鏂�" v-model="model.suggestionTakeSteps" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="suggestionTakeStepsTime" label="寤鸿閲囧彇鎺柦鏃堕棿"> + <a-input placeholder="璇疯緭鍏ュ缓璁噰鍙栨帾鏂芥椂闂�" v-model="model.suggestionTakeStepsTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirm" label="缁翠慨纭"> + <a-input placeholder="璇疯緭鍏ョ淮淇‘璁�" v-model="model.repairConfirm" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirmComment" label="缁翠慨纭鎰忚"> + <a-input placeholder="璇疯緭鍏ョ淮淇‘璁ゆ剰瑙�" v-model="model.repairConfirmComment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirmTime" label="缁翠慨纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ョ淮淇‘璁ゆ椂闂�" v-model="model.repairConfirmTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeader" label="缁翠慨缁勯暱纭"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁�" v-model="model.repairGroupLeader" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeaderComment" label="缁翠慨缁勯暱鎰忚"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀挎剰瑙�" v-model="model.repairGroupLeaderComment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeaderTime" label="缁翠慨缁勯暱纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁ゆ椂闂�" v-model="model.repairGroupLeaderTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrict" label="缁翠慨缁勯暱纭"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁�" v-model="model.repairDistrict" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrictComment" label="缁翠慨缁勯暱鎰忚"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀挎剰瑙�" v-model="model.repairDistrictComment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrictTime" label="缁翠慨缁勯暱纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁ゆ椂闂�" v-model="model.repairDistrictTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="checkAgree" label="鍘熷洜鍒嗘瀽鏍稿;鍚屾剰銆佷笉鍚屾剰"> + <a-input placeholder="璇疯緭鍏ュ師鍥犲垎鏋愭牳瀵�;鍚屾剰銆佷笉鍚屾剰" v-model="model.checkAgree" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="disagreeReason" label="涓嶅悓鎰忓師鍥犲垎鏋�"> + <a-input placeholder="璇疯緭鍏ヤ笉鍚屾剰鍘熷洜鍒嗘瀽" v-model="model.disagreeReason" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rectificationMeasures" label="鏁存敼鎺柦"> + <a-input placeholder="璇疯緭鍏ユ暣鏀规帾鏂�" v-model="model.rectificationMeasures" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accidentConclusion" label="浜嬫晠缁撹"> + <a-input placeholder="璇疯緭鍏ヤ簨鏁呯粨璁�" v-model="model.accidentConclusion" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirector" label="鎶�鏈礋璐d汉"> + <a-input placeholder="璇疯緭鍏ユ妧鏈礋璐d汉" v-model="model.technicalDirector" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorTime" label="鎶�鏈礋璐d汉纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ユ妧鏈礋璐d汉纭鏃堕棿" v-model="model.technicalDirectorTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorLeader" label="鎶�鏈富绠″绾ч瀵�"> + <a-input placeholder="璇疯緭鍏ユ妧鏈富绠″绾ч瀵�" v-model="model.technicalDirectorLeader" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorLeaderTime" label="鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�"> + <a-input placeholder="璇疯緭鍏ユ妧鏈富绠″绾ч瀵肩‘璁ゆ椂闂�" v-model="model.technicalDirectorLeaderTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorPart" label="涓荤閮ㄧ骇棰嗗"> + <a-input placeholder="璇疯緭鍏ヤ富绠¢儴绾ч瀵�" v-model="model.technicalDirectorPart" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorPartTime" label="涓荤閮ㄧ骇棰嗗纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ヤ富绠¢儴绾ч瀵肩‘璁ゆ椂闂�" v-model="model.technicalDirectorPartTime" /> + </a-form-model-item> + + </a-form-model> + </a-spin> + + <div class="drawer-bootom-button"> + <a-button type="primary" @click="handleOk">纭畾</a-button> + <a-button type="primary" @click="handleCancel">鍙栨秷</a-button> + </div> + </a-drawer> +</template> + +<script> + import { httpAction } from '@/api/manage' + import moment from "moment" + + export default { + name: "EamReportAccidentsRegisterModal", + data () { + return { + title:"鎿嶄綔", + visible: false, + 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", + }, + } + }, + created () { + }, + methods: { + add () { + //鍒濆鍖栭粯璁ゅ�� + this.edit({}); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + close () { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk () { + 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; + that.close(); + }) + }else{ + return false; + } + }) + }, + handleCancel () { + this.close() + }, + + + } + } +</script> + +<style lang="less" scoped> + /**Button鎸夐挳闂磋窛*/ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + /**鎶藉眽鎸夐挳鏍峰紡*/ + .drawer-bootom-button { + 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..f568c43 --- /dev/null +++ b/src/views/eam/repair/modules/EamReportAccidentsRegisterModal.vue @@ -0,0 +1,240 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪"> + <a-input-number v-model="model.delFlag"/> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId" label="鎶ヤ慨ID"> + <a-input placeholder="璇疯緭鍏ユ姤淇甀D" v-model="model.reportId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧ID"> + <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="model.equipmentId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationCertificate" label="鏄惁鏈夎澶囨搷浣滆瘉;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽湁璁惧鎿嶄綔璇�;鏄� 鍚�" v-model="model.operationCertificate" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="powerOffRestart" label="鏄惁鏂數閲嶅惎"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︽柇鐢甸噸鍚�" v-model="model.powerOffRestart" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchFirstPiece" label="鏄惁涓烘壒娆¢浠�"> + <a-input placeholder="璇疯緭鍏ユ槸鍚︿负鎵规棣栦欢" v-model="model.batchFirstPiece" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="variableFactors" label="鍙樺姩鍥犵礌;濉啓鏄垨鍚�"> + <a-input placeholder="璇疯緭鍏ュ彉鍔ㄥ洜绱�;濉啓鏄垨鍚�" v-model="model.variableFactors" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="variableFactorsValue" label="鍙樺姩鍥犵礌鍐呭;鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��"> + <a-input placeholder="璇疯緭鍏ュ彉鍔ㄥ洜绱犲唴瀹�;鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��" v-model="model.variableFactorsValue" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="executeNc" label="鎵ц绋嬪簭"> + <a-input placeholder="璇疯緭鍏ユ墽琛岀▼搴�" v-model="model.executeNc" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accidentPhenomenon" label="浜嬫晠鐜拌薄"> + <a-input placeholder="璇疯緭鍏ヤ簨鏁呯幇璞�" v-model="model.accidentPhenomenon" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measure" label="閲囧彇鎺柦"> + <a-input placeholder="璇疯緭鍏ラ噰鍙栨帾鏂�" v-model="model.measure" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causingResults" label="閫犳垚缁撴灉"> + <a-input placeholder="璇疯緭鍏ラ�犳垚缁撴灉" v-model="model.causingResults" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmer" label="鎿嶄綔宸�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐" v-model="model.confirmer" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmTime" label="鎿嶄綔宸ョ‘璁ゆ椂闂�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐纭鏃堕棿" v-model="model.confirmTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="district" label="鍖洪暱"> + <a-input placeholder="璇疯緭鍏ュ尯闀�" v-model="model.district" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="districtTime" label="鍖洪暱纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ュ尯闀跨‘璁ゆ椂闂�" v-model="model.districtTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="centerDirector" label="涓績涓讳换"> + <a-input placeholder="璇疯緭鍏ヤ腑蹇冧富浠�" v-model="model.centerDirector" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="centerDirectorTime" label="涓績涓讳换纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ヤ腑蹇冧富浠荤‘璁ゆ椂闂�" v-model="model.centerDirectorTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportStartTime" label="缁翠慨寮�濮嬫椂闂�"> + <a-input placeholder="璇疯緭鍏ョ淮淇紑濮嬫椂闂�" v-model="model.reportStartTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentStatus" label="璁惧鐘舵��"> + <a-input placeholder="璇疯緭鍏ヨ澶囩姸鎬�" v-model="model.equipmentStatus" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causeAnalysis" label="鍘熷洜鍒嗘瀽"> + <a-input placeholder="璇疯緭鍏ュ師鍥犲垎鏋�" v-model="model.causeAnalysis" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionResults" label="妫�鏌ョ粨鏋�"> + <a-input placeholder="璇疯緭鍏ユ鏌ョ粨鏋�" v-model="model.inspectionResults" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="takeSteps" label="閲囧彇鎺柦"> + <a-input placeholder="璇疯緭鍏ラ噰鍙栨帾鏂�" v-model="model.takeSteps" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="suggestionTakeSteps" label="寤鸿閲囧彇鎺柦"> + <a-input placeholder="璇疯緭鍏ュ缓璁噰鍙栨帾鏂�" v-model="model.suggestionTakeSteps" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="suggestionTakeStepsTime" label="寤鸿閲囧彇鎺柦鏃堕棿"> + <a-input placeholder="璇疯緭鍏ュ缓璁噰鍙栨帾鏂芥椂闂�" v-model="model.suggestionTakeStepsTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirm" label="缁翠慨纭"> + <a-input placeholder="璇疯緭鍏ョ淮淇‘璁�" v-model="model.repairConfirm" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirmComment" label="缁翠慨纭鎰忚"> + <a-input placeholder="璇疯緭鍏ョ淮淇‘璁ゆ剰瑙�" v-model="model.repairConfirmComment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirmTime" label="缁翠慨纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ョ淮淇‘璁ゆ椂闂�" v-model="model.repairConfirmTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeader" label="缁翠慨缁勯暱纭"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁�" v-model="model.repairGroupLeader" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeaderComment" label="缁翠慨缁勯暱鎰忚"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀挎剰瑙�" v-model="model.repairGroupLeaderComment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairGroupLeaderTime" label="缁翠慨缁勯暱纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁ゆ椂闂�" v-model="model.repairGroupLeaderTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrict" label="缁翠慨缁勯暱纭"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁�" v-model="model.repairDistrict" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrictComment" label="缁翠慨缁勯暱鎰忚"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀挎剰瑙�" v-model="model.repairDistrictComment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairDistrictTime" label="缁翠慨缁勯暱纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ョ淮淇粍闀跨‘璁ゆ椂闂�" v-model="model.repairDistrictTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="checkAgree" label="鍘熷洜鍒嗘瀽鏍稿;鍚屾剰銆佷笉鍚屾剰"> + <a-input placeholder="璇疯緭鍏ュ師鍥犲垎鏋愭牳瀵�;鍚屾剰銆佷笉鍚屾剰" v-model="model.checkAgree" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="disagreeReason" label="涓嶅悓鎰忓師鍥犲垎鏋�"> + <a-input placeholder="璇疯緭鍏ヤ笉鍚屾剰鍘熷洜鍒嗘瀽" v-model="model.disagreeReason" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rectificationMeasures" label="鏁存敼鎺柦"> + <a-input placeholder="璇疯緭鍏ユ暣鏀规帾鏂�" v-model="model.rectificationMeasures" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accidentConclusion" label="浜嬫晠缁撹"> + <a-input placeholder="璇疯緭鍏ヤ簨鏁呯粨璁�" v-model="model.accidentConclusion" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirector" label="鎶�鏈礋璐d汉"> + <a-input placeholder="璇疯緭鍏ユ妧鏈礋璐d汉" v-model="model.technicalDirector" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorTime" label="鎶�鏈礋璐d汉纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ユ妧鏈礋璐d汉纭鏃堕棿" v-model="model.technicalDirectorTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorLeader" label="鎶�鏈富绠″绾ч瀵�"> + <a-input placeholder="璇疯緭鍏ユ妧鏈富绠″绾ч瀵�" v-model="model.technicalDirectorLeader" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorLeaderTime" label="鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�"> + <a-input placeholder="璇疯緭鍏ユ妧鏈富绠″绾ч瀵肩‘璁ゆ椂闂�" v-model="model.technicalDirectorLeaderTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorPart" label="涓荤閮ㄧ骇棰嗗"> + <a-input placeholder="璇疯緭鍏ヤ富绠¢儴绾ч瀵�" v-model="model.technicalDirectorPart" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalDirectorPartTime" label="涓荤閮ㄧ骇棰嗗纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ヤ富绠¢儴绾ч瀵肩‘璁ゆ椂闂�" v-model="model.technicalDirectorPartTime" /> + </a-form-model-item> + + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { httpAction } from '@/api/manage' + import moment from "moment" + + export default { + name: "EamReportAccidentsRegisterModal", + data () { + return { + title:"鎿嶄綔", + visible: false, + 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", + }, + } + }, + created () { + }, + methods: { + add () { + //鍒濆鍖栭粯璁ゅ�� + this.edit({}); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + close () { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk () { + 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; + that.close(); + }) + }else{ + return false; + } + }) + }, + handleCancel () { + this.close() + }, + + + } + } +</script> + +<style lang="less" scoped> + +</style> \ 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..71d1414 --- /dev/null +++ "b/src/views/eam/repair/modules/EamReportProductHazardsModal.Style\043Drawer.vue" @@ -0,0 +1,164 @@ +<template> + <a-drawer + :title="title" + :width="800" + placement="right" + :closable="false" + @close="close" + :visible="visible"> + + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId" label="鎶ヤ慨ID"> + <a-input placeholder="璇疯緭鍏ユ姤淇甀D" v-model="model.reportId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧ID"> + <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="model.equipmentId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmer" label="鎿嶄綔宸�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐" v-model="model.confirmer" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmTime" label="鎿嶄綔宸ョ‘璁ゆ椂闂�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐纭鏃堕棿" v-model="model.confirmTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productLoss" label="浜у搧鎹熷け鎯呭喌;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ヤ骇鍝佹崯澶辨儏鍐�;鏄� 鍚�" v-model="model.productLoss" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qualityAnalysis" label="浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽"> + <a-input placeholder="璇疯緭鍏ヤ骇鍝佹崯澶辫川閲忓奖鍝嶅垎鏋�" v-model="model.qualityAnalysis" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologist" label="涓荤宸ヨ壓"> + <a-input placeholder="璇疯緭鍏ヤ富绠″伐鑹�" v-model="model.technologist" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologistTime" label="涓荤宸ヨ壓纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ヤ富绠″伐鑹虹‘璁ゆ椂闂�" v-model="model.technologistTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologistComment" label="涓荤宸ヨ壓纭鎰忚"> + <a-input placeholder="璇疯緭鍏ヤ富绠″伐鑹虹‘璁ゆ剰瑙�" v-model="model.technologistComment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartment" label="閮ㄧ骇棰嗗"> + <a-input placeholder="璇疯緭鍏ラ儴绾ч瀵�" v-model="model.deputyDepartment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartmentTime" label="閮ㄧ骇棰嗗纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ラ儴绾ч瀵肩‘璁ゆ椂闂�" v-model="model.deputyDepartmentTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartmentComment" label="閮ㄧ骇棰嗗纭鎰忚"> + <a-input placeholder="璇疯緭鍏ラ儴绾ч瀵肩‘璁ゆ剰瑙�" v-model="model.deputyDepartmentComment" /> + </a-form-model-item> + + </a-form-model> + </a-spin> + + <div class="drawer-bootom-button"> + <a-button type="primary" @click="handleOk">纭畾</a-button> + <a-button type="primary" @click="handleCancel">鍙栨秷</a-button> + </div> + </a-drawer> +</template> + +<script> + import { httpAction } from '@/api/manage' + import moment from "moment" + + export default { + name: "EamReportProductHazardsModal", + data () { + return { + title:"鎿嶄綔", + visible: false, + 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", + }, + } + }, + created () { + }, + methods: { + add () { + //鍒濆鍖栭粯璁ゅ�� + this.edit({}); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + close () { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk () { + 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; + that.close(); + }) + }else{ + return false; + } + }) + }, + handleCancel () { + this.close() + }, + + + } + } +</script> + +<style lang="less" scoped> + /**Button鎸夐挳闂磋窛*/ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + /**鎶藉眽鎸夐挳鏍峰紡*/ + .drawer-bootom-button { + 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..f7c2948 --- /dev/null +++ b/src/views/eam/repair/modules/EamReportProductHazardsModal.vue @@ -0,0 +1,144 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId" label="鎶ヤ慨ID"> + <a-input placeholder="璇疯緭鍏ユ姤淇甀D" v-model="model.reportId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧ID"> + <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="model.equipmentId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmer" label="鎿嶄綔宸�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐" v-model="model.confirmer" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmTime" label="鎿嶄綔宸ョ‘璁ゆ椂闂�"> + <a-input placeholder="璇疯緭鍏ユ搷浣滃伐纭鏃堕棿" v-model="model.confirmTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productLoss" label="浜у搧鎹熷け鎯呭喌;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ヤ骇鍝佹崯澶辨儏鍐�;鏄� 鍚�" v-model="model.productLoss" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qualityAnalysis" label="浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽"> + <a-input placeholder="璇疯緭鍏ヤ骇鍝佹崯澶辫川閲忓奖鍝嶅垎鏋�" v-model="model.qualityAnalysis" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologist" label="涓荤宸ヨ壓"> + <a-input placeholder="璇疯緭鍏ヤ富绠″伐鑹�" v-model="model.technologist" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologistTime" label="涓荤宸ヨ壓纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ヤ富绠″伐鑹虹‘璁ゆ椂闂�" v-model="model.technologistTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technologistComment" label="涓荤宸ヨ壓纭鎰忚"> + <a-input placeholder="璇疯緭鍏ヤ富绠″伐鑹虹‘璁ゆ剰瑙�" v-model="model.technologistComment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartment" label="閮ㄧ骇棰嗗"> + <a-input placeholder="璇疯緭鍏ラ儴绾ч瀵�" v-model="model.deputyDepartment" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartmentTime" label="閮ㄧ骇棰嗗纭鏃堕棿"> + <a-input placeholder="璇疯緭鍏ラ儴绾ч瀵肩‘璁ゆ椂闂�" v-model="model.deputyDepartmentTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deputyDepartmentComment" label="閮ㄧ骇棰嗗纭鎰忚"> + <a-input placeholder="璇疯緭鍏ラ儴绾ч瀵肩‘璁ゆ剰瑙�" v-model="model.deputyDepartmentComment" /> + </a-form-model-item> + + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { httpAction } from '@/api/manage' + import moment from "moment" + + export default { + name: "EamReportProductHazardsModal", + data () { + return { + title:"鎿嶄綔", + visible: false, + 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", + }, + } + }, + created () { + }, + methods: { + add () { + //鍒濆鍖栭粯璁ゅ�� + this.edit({}); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + close () { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk () { + 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; + that.close(); + }) + }else{ + return false; + } + }) + }, + handleCancel () { + this.close() + }, + + + } + } +</script> + +<style lang="less" scoped> + +</style> \ 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..00c1a60 --- /dev/null +++ "b/src/views/eam/repair/modules/EamReportThreeNoSpareModal.Style\043Drawer.vue" @@ -0,0 +1,155 @@ +<template> + <a-drawer + :title="title" + :width="800" + placement="right" + :closable="false" + @close="close" + :visible="visible"> + + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪"> + <a-input-number v-model="model.delFlag" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causeAnalysis" label="鍘熷洜鍒嗘瀽"> + <a-input placeholder="璇疯緭鍏ュ師鍥犲垎鏋�" v-model="model.causeAnalysis" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isTrainingEducation" label="鍩硅鏁欒偛;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ュ煿璁暀鑲�;鏄� 鍚�" v-model="model.isTrainingEducation" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingFormat" label="鍩硅褰㈠紡"> + <a-input placeholder="璇疯緭鍏ュ煿璁舰寮�" v-model="model.trainingFormat" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingContent" label="鍩硅鍐呭"> + <a-input placeholder="璇疯緭鍏ュ煿璁唴瀹�" v-model="model.trainingContent" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingUser" label="鍩硅浜�"> + <a-input placeholder="璇疯緭鍏ュ煿璁汉" v-model="model.trainingUser" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingUserTime" label="鍩硅鏃堕棿"> + <a-input placeholder="璇疯緭鍏ュ煿璁椂闂�" v-model="model.trainingUserTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId" label="鎶ヤ慨ID"> + <a-input placeholder="璇疯緭鍏ユ姤淇甀D" v-model="model.reportId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧ID"> + <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="model.equipmentId" /> + </a-form-model-item> + + </a-form-model> + </a-spin> + + <div class="drawer-bootom-button"> + <a-button type="primary" @click="handleOk">纭畾</a-button> + <a-button type="primary" @click="handleCancel">鍙栨秷</a-button> + </div> + </a-drawer> +</template> + +<script> + import { httpAction } from '@/api/manage' + import moment from "moment" + + export default { + name: "EamReportThreeNoSpareModal", + data () { + return { + title:"鎿嶄綔", + visible: false, + 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", + }, + } + }, + created () { + }, + methods: { + add () { + //鍒濆鍖栭粯璁ゅ�� + this.edit({}); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + close () { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk () { + 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; + that.close(); + }) + }else{ + return false; + } + }) + }, + handleCancel () { + this.close() + }, + + + } + } +</script> + +<style lang="less" scoped> + /**Button鎸夐挳闂磋窛*/ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + /**鎶藉眽鎸夐挳鏍峰紡*/ + .drawer-bootom-button { + 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..6058391 --- /dev/null +++ b/src/views/eam/repair/modules/EamReportThreeNoSpareModal.vue @@ -0,0 +1,135 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪"> + <a-input-number v-model="model.delFlag"/> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="causeAnalysis" label="鍘熷洜鍒嗘瀽"> + <a-input placeholder="璇疯緭鍏ュ師鍥犲垎鏋�" v-model="model.causeAnalysis" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isTrainingEducation" label="鍩硅鏁欒偛;鏄� 鍚�"> + <a-input placeholder="璇疯緭鍏ュ煿璁暀鑲�;鏄� 鍚�" v-model="model.isTrainingEducation" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingFormat" label="鍩硅褰㈠紡"> + <a-input placeholder="璇疯緭鍏ュ煿璁舰寮�" v-model="model.trainingFormat" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingContent" label="鍩硅鍐呭"> + <a-input placeholder="璇疯緭鍏ュ煿璁唴瀹�" v-model="model.trainingContent" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingUser" label="鍩硅浜�"> + <a-input placeholder="璇疯緭鍏ュ煿璁汉" v-model="model.trainingUser" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="trainingUserTime" label="鍩硅鏃堕棿"> + <a-input placeholder="璇疯緭鍏ュ煿璁椂闂�" v-model="model.trainingUserTime" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportId" label="鎶ヤ慨ID"> + <a-input placeholder="璇疯緭鍏ユ姤淇甀D" v-model="model.reportId" /> + </a-form-model-item> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧ID"> + <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="model.equipmentId" /> + </a-form-model-item> + + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { httpAction } from '@/api/manage' + import moment from "moment" + + export default { + name: "EamReportThreeNoSpareModal", + data () { + return { + title:"鎿嶄綔", + visible: false, + 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", + }, + } + }, + created () { + }, + methods: { + add () { + //鍒濆鍖栭粯璁ゅ�� + this.edit({}); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + close () { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk () { + 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; + that.close(); + }) + }else{ + return false; + } + }) + }, + handleCancel () { + this.close() + }, + + + } + } +</script> + +<style lang="less" scoped> + +</style> \ No newline at end of file -- Gitblit v1.9.3