| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class='table-operator'> |
| | | <a-button @click='handleAdd' type='primary' icon='plus'>æ°å¢</a-button> |
| | | <!-- <a-button @click='handleChangeCertificate' type='primary' icon='plus'>åæ´æä½è¯</a-button>--> |
| | | <!-- <a-button @click='handleAdd' type='primary' icon='plus'>æ°å¢</a-button>--> |
| | | <a-button @click='handleChangeCertificate' 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'> |
| | |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :loading='loading' |
| | | :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,type:'radio'}" |
| | | :customRow='clickThenSelect' |
| | | @change='handleTableChange'> |
| | | |
| | | |
| | | |
| | | <template slot='htmlSlot' slot-scope='text'> |
| | | <div v-html='text'></div> |
| | |
| | | |
| | | <span slot='action' slot-scope='text, record'> |
| | | <!-- <a @click='handleEdit(record)'>ç¼è¾</a>--> |
| | | <!-- <a-divider type='vertical' />--> |
| | | <a @click='handleDetail(record)'>详æ
</a> |
| | | <!-- <a-divider type='vertical' />--> |
| | | <!-- <a @click='handleDetail(record)'>详æ
</a>--> |
| | | <!-- <a-divider type="vertical" />--> |
| | | <!-- <a-dropdown>--> |
| | | <!-- <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a>--> |
| | |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="æä½è¯ç®¡çæç»" key="1" > |
| | | <OperationCertificateDetailList :mainId="operationCertificateDetailMainId" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <operation-certificate-modal ref='modalForm' @ok='modalFormOk' /> |
| | | </a-card> |
| | | </template> |
| | |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import OperationCertificateModal from './modules/operationCertificate/OperationCertificateModal' |
| | | import OperationCertificateDetailList from './modules/operationCertificate/OperationCertificateDetailList' |
| | | import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
| | | import '@/assets/less/TableExpand.less' |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | export default { |
| | | name: 'OperationCertificateList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | OperationCertificateModal |
| | | OperationCertificateModal, |
| | | OperationCertificateDetailList |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | align: 'center', |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align: 'center', |
| | | // fixed: 'right', |
| | | // width: 147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: '/eam/operationCertificate/list', |
| | |
| | | |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [] |
| | | superFieldList: [], |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | selectedMainId:'', |
| | | |
| | | operationCertificateDetailMainId: '', |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | initDictConfig() { |
| | | }, |
| | | |
| | | // handleChangeCertificate: function (record) { |
| | | // this.$refs.modalForm.edit(record) |
| | | // this.$refs.modalForm.title = 'åæ´æä½è¯' |
| | | // this.$refs.modalForm.disableSubmit = false |
| | | // // this.$refs.modalForm.isRevise = false; |
| | | // }, |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | handleChangeCertificate: function() { |
| | | if (this.selectionRows.length <= 0) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®°å½') |
| | | return |
| | | } |
| | | const record = this.selectionRows[0] |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'åæ´æä½è¯' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.loadSubTableDataFlag = false |
| | | // this.$refs.modalForm.isRevise = false; |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.selectedMainId='' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedMainId=selectedRowKeys[0] |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.operationCertificateDetailMainId = selectionRows[0]['id'] |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | this.onClearSelected() |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if(res.code===510){ |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | getSuperFieldList() { |
| | | let fieldList = [] |
| | | fieldList.push({ type: 'string', value: 'num', text: 'æä½è¯ç¼å·', dictCode: '' }) |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered='false' |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class='table-page-search-wrapper'> |
| | | <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" v-if="mainId"> |
| | | <!-- <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' |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey='id' |
| | | :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :loading='loading' |
| | | @change='handleTableChange' |
| | | > |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <template |
| | | slot='htmlSlot' |
| | | slot-scope='text' |
| | | > |
| | | <div v-html='text'></div> |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template |
| | | slot='imgSlot' |
| | | slot-scope='text,record' |
| | | > |
| | | <span |
| | | v-if='!text' |
| | | style='font-size: 12px;font-style: italic;' |
| | | >æ å¾ç</span> |
| | | <img |
| | | v-else |
| | | :src='getImgView(text)' |
| | | :preview='record.id' |
| | | height='25px' |
| | | alt='' |
| | | style='max-width:80px;font-size: 12px;font-style: italic;' |
| | | /> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template |
| | | slot='takingInfo' |
| | | slot-scope='text' |
| | | > |
| | | <span |
| | | v-if='!text' |
| | | style='font-size: 12px;font-style: italic;color: #126ee7;' |
| | | >/</span> |
| | | <span |
| | | v-if='text' |
| | | style='font-size: 12px;font-style: italic;' |
| | | >{{ text }}</span> |
| | | </template> |
| | | <template |
| | | slot='fileSlot' |
| | | slot-scope='text' |
| | | > |
| | | <span |
| | | v-if='!text' |
| | | style='font-size: 12px;font-style: italic;' |
| | | >æ æä»¶</span> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost='true' |
| | | type='primary' |
| | | icon='download' |
| | | size='small' |
| | | @click='downloadFile(text)' |
| | | > |
| | | :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-popconfirm |
| | | title='ç¡®å®å é¤å?' |
| | | @confirm='() => handleDelete(record.id)' |
| | | > |
| | | <a v-if="record.uda1 == 'ä¸éè¿'">å é¤</a> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | |
| | | </span> |
| | | |
| | | <span |
| | | slot="examinationConclusion" |
| | | slot-scope="text, record" |
| | | > |
| | | |
| | | |
| | | <a |
| | | v-if="record.examinationConclusion === 'N' " |
| | | >ä¸åæ ¼</a> |
| | | <span v-else>åæ ¼</span> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <operationCertificateDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></operationCertificateDetail-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@api/manage' |
| | | import OperationCertificateDetailModal from './OperationCertificateDetailModal' |
| | | |
| | | export default { |
| | | name: 'OperationCertificateDetailList', |
| | | mixins: [JeecgListMixin], |
| | | |
| | | props: { |
| | | mainId: { |
| | | type: String, |
| | | default: '', |
| | | required: false |
| | | name: "OperationCertificateDetailList", |
| | | mixins:[JeecgListMixin], |
| | | components: { OperationCertificateDetailModal }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch: { |
| | | mainId: { |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if (!this.mainId) { |
| | | if(!this.mainId){ |
| | | this.clearList() |
| | | } else { |
| | | this.queryParam['id'] = val |
| | | this.loadData(1) |
| | | }else{ |
| | | this.queryParam['operationCertificateId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | description: 'æä½è¯ç®¡çæç»é¡µé¢', |
| | | disableMixinCreated: true, |
| | | description: 'æä½è¯ä¹¦ç®¡ç管ç页é¢', |
| | | disableMixinCreated:true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | // { |
| | | // title:'è¯ä¹¦ID', |
| | | // align:"center", |
| | | // dataIndex: 'operationCertificateId' |
| | | // }, |
| | | { |
| | | title:'åçæ¶é´', |
| | | align:"center", |
| | | dataIndex: 'happenDate', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'æ£å设å¤', |
| | | align: 'center', |
| | | dataIndex: 'equipmentNames', |
| | | |
| | | title:'ç±»å', |
| | | align:"center", |
| | | dataIndex: 'type_dictText' |
| | | }, |
| | | { |
| | | title: 'æ£å项', |
| | | align: 'center', |
| | | dataIndex: 'appointmentCardNum', |
| | | |
| | | title:'设å¤ç»ä¸ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'equipmentId_dictText' |
| | | }, |
| | | { |
| | | title: 'æ£é¤åæ°', |
| | | align: 'center', |
| | | dataIndex: 'replaceReason', |
| | | |
| | | title:'æ£å项', |
| | | align:"center", |
| | | dataIndex: 'deductionItem_dictText' |
| | | }, |
| | | { |
| | | title: 'æ£å卿', |
| | | align: 'center', |
| | | dataIndex: 'theoreticalResults', |
| | | |
| | | } |
| | | // { |
| | | // title:'æ£å卿', |
| | | // align:"center", |
| | | // dataIndex: 'period' |
| | | // }, |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' }, |
| | | // } |
| | | ], |
| | | url: { |
| | | list: '/eam/operationCertificate/queryOperationCertificateDetailByMainId' |
| | | list: "/eam/operationCertificate/listOperationCertificateDetailByMainId", |
| | | delete: "/eam/operationCertificate/deleteOperationCertificateDetail", |
| | | deleteBatch: "/eam/operationCertificate/deleteBatchOperationCertificateDetail", |
| | | exportXlsUrl: "/eam/operationCertificate/exportOperationCertificateDetail", |
| | | importUrl: "/eam/operationCertificate/importOperationCertificateDetail", |
| | | }, |
| | | dictOptions: { |
| | | type: [], |
| | | inventoryStatus: [] |
| | | dictOptions:{ |
| | | equipmentIds:[], |
| | | status:[], |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}` |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less' |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="è¯ä¹¦ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationCertificateId"> |
| | | <a-input v-model="model.operationCertificateId"placeholder="请è¾å
¥è¯ä¹¦ID" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="åçæ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="happenDate"> |
| | | <j-date placeholder="è¯·éæ©åçæ¶é´" v-model="model.happenDate" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> |
| | | <a-input v-model="model.type"placeholder="请è¾å
¥ç±»å" ></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="请è¾å
¥è®¾å¤id" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ£å项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deductionItem"> |
| | | <a-input v-model="model.deductionItem"placeholder="请è¾å
¥æ£å项" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ£å卿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="period"> |
| | | <a-input v-model="model.period"placeholder="请è¾å
¥æ£å卿" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | export default { |
| | | name: "OperationCertificateDetailModal", |
| | | components: { |
| | | }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | required:false, |
| | | default:'' |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | title:"æä½", |
| | | width:800, |
| | | visible: false, |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: "/eam/operationCertificate/addOperationCertificateDetail", |
| | | edit: "/eam/operationCertificate/editOperationCertificateDetail", |
| | | } |
| | | |
| | | } |
| | | }, |
| | | 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; |
| | | }, |
| | | 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'; |
| | | } |
| | | this.model['operationCertificateId'] = this.mainId |
| | | 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> |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <a-spin :spinning='confirmLoading'> |
| | | <j-form-container :disabled='formDisabled'> |
| | | <!-- 主表ååºå --> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'> |
| | | <a-row> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="æä½è¯ç¼å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> |
| | | <a-input v-model="model.num" placeholder="请è¾å
¥æä½è¯ç¼å·" ></a-input> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='æä½è¯ç¼å·' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> |
| | | <a-input v-model='model.num' placeholder='请è¾å
¥æä½è¯ç¼å·'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="å§å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId"> |
| | | <j-select-user-by-dep v-model="model.userId" :multi="false" /> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='å§å' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='userId'> |
| | | <j-select-user-by-dep v-model='model.userId' :multi='false' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="åè¯æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="issueDate"> |
| | | <j-date placeholder="è¯·éæ©åè¯æ¥æ" v-model="model.issueDate" style="width: 100%" /> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='åè¯æ¥æ' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='issueDate'> |
| | | <j-date placeholder='è¯·éæ©åè¯æ¥æ' v-model='model.issueDate' style='width: 100%' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="å¼å§æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> |
| | | <j-date placeholder="è¯·éæ©å¼å§æ¶é´" v-model="model.startTime" style="width: 100%" /> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='å¼å§æ¶é´' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='startTime'> |
| | | <j-date placeholder='è¯·éæ©å¼å§æ¶é´' v-model='model.startTime' style='width: 100%' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="ç»ææ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime"> |
| | | <j-date placeholder="è¯·éæ©ç»ææ¶é´" v-model="model.endTime" style="width: 100%" /> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='ç»ææ¶é´' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='endTime'> |
| | | <j-date placeholder='è¯·éæ©ç»ææ¶é´' v-model='model.endTime' style='width: 100%' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="å½å卿忰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentCycleScore"> |
| | | <a-input-number v-model="model.currentCycleScore" placeholder="请è¾å
¥å½å卿忰" style="width: 100%" /> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='å½å卿忰' :labelCol='labelCol' :wrapperCol='wrapperCol' |
| | | prop='currentCycleScore'> |
| | | <a-input-number v-model='model.currentCycleScore' placeholder='请è¾å
¥å½å卿忰' style='width: 100%' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="设å¤ç»ä¸ç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentIds"> |
| | | <j-multi-select-tag type="list_multi" v-model="model.equipmentIds" dictCode="mom_eam_equipment,num,id" placeholder="è¯·éæ©è®¾å¤ç»ä¸ç¼ç " /> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='设å¤ç»ä¸ç¼ç ' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='equipmentIds'> |
| | | <j-multi-select-tag type='list_multi' v-model='model.equipmentIds' dictCode='mom_eam_equipment,num,id' |
| | | placeholder='è¯·éæ©è®¾å¤ç»ä¸ç¼ç ' /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
| | | <j-dict-select-tag type="list" v-model="model.status" dictCode="certificate_status" placeholder="è¯·éæ©ç¶æ" disabled/> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='ç¶æ' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='status'> |
| | | <j-dict-select-tag type='list' v-model='model.status' dictCode='certificate_status' |
| | | placeholder='è¯·éæ©ç¶æ' disabled /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24" > |
| | | <a-form-model-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <a-textarea v-model="model.remark" placeholder="请è¾å
¥å¤æ³¨" ></a-textarea> |
| | | <a-col :span='24'> |
| | | <a-form-model-item label='夿³¨' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> |
| | | <a-textarea v-model='model.remark' placeholder='请è¾å
¥å¤æ³¨'></a-textarea> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | <!-- å表ååºå --> |
| | | <a-tabs v-model="activeKey" @change="handleChangeTabs"> |
| | | <a-tab-pane tab="æä½è¯ç®¡çæç»" :key="refKeys[0]" :forceRender="true"> |
| | | <!-- å表ååºå --> |
| | | <a-tabs v-model='activeKey' @change='handleChangeTabs'> |
| | | <a-tab-pane tab='æä½è¯ç®¡çæç»' :key='refKeys[0]' :forceRender='true'> |
| | | <j-vxe-table |
| | | keep-source |
| | | :ref="refKeys[0]" |
| | | :loading="operationCertificateDetailTable.loading" |
| | | :columns="operationCertificateDetailTable.columns" |
| | | :dataSource="operationCertificateDetailTable.dataSource" |
| | | :maxHeight="300" |
| | | :disabled="formDisabled" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :toolbar="true" |
| | | /> |
| | | :ref='refKeys[0]' |
| | | :loading='operationCertificateDetailTable.loading' |
| | | :columns='operationCertificateDetailTable.columns' |
| | | :dataSource='operationCertificateDetailTable.dataSource' |
| | | :maxHeight='300' |
| | | :disabled='formDisabled' |
| | | :rowNumber='true' |
| | | :rowSelection='true' |
| | | :toolbar='true' |
| | | /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | |
| | | |
| | | <script> |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | |
| | | export default { |
| | | name: 'OperationCertificateForm', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | JFormContainer, |
| | | }, |
| | | data() { |
| | | return { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | model:{ |
| | | }, |
| | | // æ°å¢æ¶å表é»è®¤æ·»å å è¡ç©ºæ°æ® |
| | | addDefaultRowNum: 1, |
| | | validatorRules: { |
| | | num: [ |
| | | { required: true, message: '请è¾å
¥æä½è¯ç¼å·!'}, |
| | | ], |
| | | currentCycleScore: [ |
| | | { required: true, message: '请è¾å
¥å½å卿忰!'}, |
| | | { pattern: /^-?\d+\.?\d*$/, message: '请è¾å
¥æ°å!'}, |
| | | ], |
| | | }, |
| | | refKeys: ['operationCertificateDetail', ], |
| | | tableKeys:['operationCertificateDetail', ], |
| | | activeKey: 'operationCertificateDetail', |
| | | // æä½è¯ç®¡çæç» |
| | | operationCertificateDetailTable: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'è¯ä¹¦ID', |
| | | key: 'operationCertificateId', |
| | | type: JVXETypes.hidden, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'æ¥æ', |
| | | key: 'happenDate', |
| | | type: JVXETypes.date, |
| | | width:"120px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'ç±»å', |
| | | key: 'type', |
| | | type: JVXETypes.select, |
| | | dictCode: 'certificate_change_type', |
| | | width:"100px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: '设å¤ç»ä¸ç¼ç ', |
| | | key: 'equipmentId', |
| | | type: JVXETypes.selectSearch, |
| | | dictCode: 'mom_eam_equipment,num,id ', |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '', |
| | | validateRules: [{ required: true, message: '${title}ä¸è½ä¸ºç©º' }] |
| | | }, |
| | | { |
| | | title: 'æ£å项', |
| | | key: 'deductionItem', |
| | | type: JVXETypes.selectSearch, |
| | | dictCode: 'mom_eam_base_deduction_item,content,id ', |
| | | width:"500px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'æ£å卿', |
| | | key: 'period', |
| | | type: JVXETypes.normal, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | ] |
| | | }, |
| | | url: { |
| | | add: "/eam/operationCertificate/add", |
| | | edit: "/eam/operationCertificate/edit", |
| | | queryById: "/eam/operationCertificate/queryById", |
| | | operationCertificateDetail: { |
| | | list: '/eam/operationCertificate/queryOperationCertificateDetailByMainId' |
| | | export default { |
| | | name: 'OperationCertificateForm', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | JFormContainer |
| | | }, |
| | | data() { |
| | | return { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | model: {}, |
| | | // æ°å¢æ¶å表é»è®¤æ·»å å è¡ç©ºæ°æ® |
| | | addDefaultRowNum: 1, |
| | | |
| | | validatorRules: { |
| | | num: [ |
| | | { required: true, message: '请è¾å
¥æä½è¯ç¼å·!' } |
| | | ], |
| | | currentCycleScore: [ |
| | | { required: true, message: '请è¾å
¥å½å卿忰!' }, |
| | | { pattern: /^-?\d+\.?\d*$/, message: '请è¾å
¥æ°å!' } |
| | | ] |
| | | }, |
| | | refKeys: ['operationCertificateDetail'], |
| | | tableKeys: ['operationCertificateDetail'], |
| | | activeKey: 'operationCertificateDetail', |
| | | // æä½è¯ç®¡çæç» |
| | | operationCertificateDetailTable: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'è¯ä¹¦ID', |
| | | key: 'operationCertificateId', |
| | | type: JVXETypes.hidden, |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: 'æ¥æ', |
| | | key: 'happenDate', |
| | | type: JVXETypes.date, |
| | | width: '120px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: 'ç±»å', |
| | | key: 'type', |
| | | type: JVXETypes.select, |
| | | dictCode: 'certificate_change_type', |
| | | width: '100px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '设å¤ç»ä¸ç¼ç ', |
| | | key: 'equipmentId', |
| | | type: JVXETypes.selectSearch, |
| | | dictCode: 'mom_eam_equipment,num,id ', |
| | | width: '200px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '', |
| | | validateRules: [{ required: true, message: '${title}ä¸è½ä¸ºç©º' }] |
| | | }, |
| | | { |
| | | title: 'æ£å项', |
| | | key: 'deductionItem', |
| | | type: JVXETypes.selectSearch, |
| | | dictCode: 'mom_eam_base_deduction_item,content,id ', |
| | | width: '500px', |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue: '' |
| | | }, |
| | | // { |
| | | // title: 'æ£å卿', |
| | | // key: 'period', |
| | | // type: JVXETypes.normal, |
| | | // width: '200px', |
| | | // placeholder: '请è¾å
¥${title}', |
| | | // defaultValue: '' |
| | | // } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/operationCertificate/add', |
| | | edit: '/eam/operationCertificate/edit', |
| | | queryById: '/eam/operationCertificate/queryById', |
| | | operationCertificateDetail: { |
| | | list: '/eam/operationCertificate/queryOperationCertificateDetailByMainId' |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | addBefore(){ |
| | | this.operationCertificateDetailTable.dataSource=[] |
| | | }, |
| | | getAllTable() { |
| | | let values = this.tableKeys.map(key => getRefPromise(this, key)) |
| | | return Promise.all(values) |
| | | }, |
| | | /** è°ç¨å®edit()æ¹æ³ä¹åä¼èªå¨è°ç¨æ¤æ¹æ³ */ |
| | | editAfter() { |
| | | this.$nextTick(() => { |
| | | }) |
| | | // å è½½åè¡¨æ°æ® |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.operationCertificateDetail.list, params, this.operationCertificateDetailTable) |
| | | } |
| | | }, |
| | | //æ ¡éªææä¸å¯¹ä¸å表表å |
| | | validateSubForm(allValues){ |
| | | return new Promise((resolve,reject)=>{ |
| | | Promise.all([ |
| | | ]).then(() => { |
| | | resolve(allValues) |
| | | }).catch(e => { |
| | | if (e.error === VALIDATE_FAILED) { |
| | | // å¦æææªéè¿è¡¨åéªè¯çå表ï¼å°±èªå¨è·³è½¬å°å®æå¨çtab |
| | | this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] |
| | | } else { |
| | | console.error(e) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | /** æ´çæformData */ |
| | | classifyIntoFormData(allValues) { |
| | | let main = Object.assign(this.model, allValues.formValue) |
| | | return { |
| | | ...main, // å±å¼ |
| | | operationCertificateDetailList: allValues.tablesValue[0].tableData, |
| | | } |
| | | }, |
| | | validateError(msg){ |
| | | this.$message.error(msg) |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | //å表å è½½ |
| | | loadSubTableData: { |
| | | type: Boolean, |
| | | default: true, |
| | | required: false |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | }, |
| | | loadSubTableDataMode() { |
| | | return this.loadSubTableData |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | addBefore() { |
| | | this.operationCertificateDetailTable.dataSource = [] |
| | | }, |
| | | getAllTable() { |
| | | let values = this.tableKeys.map(key => getRefPromise(this, key)) |
| | | return Promise.all(values) |
| | | }, |
| | | /** è°ç¨å®edit()æ¹æ³ä¹åä¼èªå¨è°ç¨æ¤æ¹æ³ */ |
| | | editAfter() { |
| | | this.$nextTick(() => { |
| | | }) |
| | | console.log( "this.loadSubTableDataMode:"+this.loadSubTableDataMode) |
| | | // å è½½åè¡¨æ°æ® |
| | | if (this.model.id && this.loadSubTableDataMode) { |
| | | let params = { id: this.model.id } |
| | | // å è½½åè¡¨æ°æ® |
| | | this.requestSubTableData(this.url.operationCertificateDetail.list, params, this.operationCertificateDetailTable) |
| | | } |
| | | |
| | | }, |
| | | //æ ¡éªææä¸å¯¹ä¸å表表å |
| | | validateSubForm(allValues) { |
| | | return new Promise((resolve, reject) => { |
| | | Promise.all([]).then(() => { |
| | | resolve(allValues) |
| | | }).catch(e => { |
| | | if (e.error === VALIDATE_FAILED) { |
| | | // å¦æææªéè¿è¡¨åéªè¯çå表ï¼å°±èªå¨è·³è½¬å°å®æå¨çtab |
| | | this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] |
| | | } else { |
| | | console.error(e) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | /** æ´çæformData */ |
| | | classifyIntoFormData(allValues) { |
| | | let main = Object.assign(this.model, allValues.formValue) |
| | | return { |
| | | ...main, // å±å¼ |
| | | operationCertificateDetailList: allValues.tablesValue[0].tableData |
| | | } |
| | | }, |
| | | validateError(msg) { |
| | | this.$message.error(msg) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | :title='title' |
| | | :width='1200' |
| | | :visible='visible' |
| | | :maskClosable='false' |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @ok='handleOk' |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel"> |
| | | <operation-certificate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/> |
| | | @cancel='handleCancel'> |
| | | <operation-certificate-form ref='realForm' @ok='submitCallback' :disabled='disableSubmit' :loadSubTableData='loadSubTableDataFlag' /> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import OperationCertificateForm from './OperationCertificateForm' |
| | | import OperationCertificateForm from './OperationCertificateForm' |
| | | |
| | | export default { |
| | | name: 'OperationCertificateModal', |
| | | components: { |
| | | OperationCertificateForm |
| | | export default { |
| | | name: 'OperationCertificateModal', |
| | | components: { |
| | | OperationCertificateForm |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '', |
| | | width: 800, |
| | | visible: false, |
| | | disableSubmit: false, |
| | | loadSubTableDataFlag: true |
| | | } |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.add() |
| | | }) |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | width:800, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | edit(record) { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.realForm.edit(record) |
| | | }) |
| | | }, |
| | | 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.handleOk(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | this.$refs.realForm.handleOk() |
| | | }, |
| | | submitCallback() { |
| | | this.$emit('ok') |
| | | this.visible = false |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |