1、调整设备利用率等报表页面样式
2、新增MDC设备实施台账页面及功能
| | |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); |
| | | param.field = this.getQueryField(); |
| | | if(this.columns) param.field = this.getQueryField(); |
| | | param.pageNo = this.ipagination.current; |
| | | param.pageSize = this.ipagination.pageSize; |
| | | //è·åç¨æ·å®å¶ç忰屿§ |
| | |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤åå· |
| | | <th class="thgu dong7 name" rowspan="2" style="min-width: 120px; max-width: 120px;width: 120px;">设å¤åå· |
| | | </th> |
| | | <!--<th rowspan="2">ç»å«</th>--> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | |
| | | {{item.equipmentName}} |
| | | </td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentModel}}</td> |
| | | <td class="tdgu6 kaitou">{{item.equipmentModel}}</td> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <td colspan="6" class="tdgu kaitou">{{item.level1}}</td> |
| | | <td colspan="7" class="tdgu kaitou">{{item.level1}}</td> |
| | | </template> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | | <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('lyl') > -1"> |
| | |
| | | z-index: 2; |
| | | } |
| | | |
| | | .table tbody tr .tdgu6 { |
| | | position: sticky; |
| | | left: 512px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .table2 thead tr .timeth, |
| | | .table2 thead tr .thgu { |
| | | position: sticky; |
| | |
| | | left: 412px; |
| | | } |
| | | |
| | | .table2 thead .equipname .dong7 { |
| | | z-index: 5; |
| | | left: 512px; |
| | | } |
| | | |
| | | #EfficiencyPO { |
| | | overflow: hidden; |
| | | } |
| | |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤åå· |
| | | <th class="thgu dong7 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">设å¤åå· |
| | | </th> |
| | | <!--<th rowspan="2">ç»å«</th>--> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | |
| | | {{item.equipmentName}} |
| | | </td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentModel}}</td> |
| | | <td class="tdgu6 kaitou">{{item.equipmentModel}}</td> |
| | | </template> |
| | | |
| | | <!--å计ä¸å¹³åå¼åºå--> |
| | |
| | | z-index: 2; |
| | | } |
| | | |
| | | .table tbody tr .tdgu6 { |
| | | position: sticky; |
| | | left: 512px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .table2 thead tr .timeth, |
| | | .table2 thead tr .thgu { |
| | | position: sticky; |
| | |
| | | left: 412px; |
| | | } |
| | | |
| | | .table2 thead .equipname .dong7 { |
| | | z-index: 5; |
| | | left: 512px; |
| | | } |
| | | |
| | | #Efficiency { |
| | | overflow: hidden; |
| | | } |
| | |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤ç±»å |
| | | </th> |
| | | <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设å¤åå· |
| | | <th class="thgu dong7 name" rowspan="2" style="min-width: 120px; max-width: 120px;width: 120px;">设å¤åå· |
| | | </th> |
| | | <th class="thgu dong7 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">çæ¬¡</th> |
| | | <th class="thgu dong8 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">çæ¬¡</th> |
| | | <template v-for="(tableHead, index) in tableHeads"> |
| | | <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th> |
| | | </template> |
| | |
| | | {{item.equipmentName}} |
| | | </td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentType}}</td> |
| | | <td class="tdgu5 kaitou">{{item.equipmentModel}}</td> |
| | | <td class="tdgu6 kaitou">{{item.shiftSubName}}</td> |
| | | <td class="tdgu6 kaitou">{{item.equipmentModel}}</td> |
| | | <td class="tdgu7 kaitou">{{item.shiftSubName}}</td> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <td colspan="7" class="tdgu kaitou">{{item.level1}}</td> |
| | | <td colspan="8" class="tdgu kaitou">{{item.level1}}</td> |
| | | </template> |
| | | <!--<td>{{item.tierType}}</td>--> |
| | | <template v-for="(tableHead, index) in item.dataList"> |
| | |
| | | z-index: 2; |
| | | } |
| | | |
| | | .table tbody tr .tdgu7 { |
| | | position: sticky; |
| | | left: 632px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .table2 thead tr .timeth, |
| | | .table2 thead tr .thgu { |
| | | position: sticky; |
| | |
| | | left: 512px; |
| | | } |
| | | |
| | | .table2 thead .equipname .dong8 { |
| | | z-index: 6; |
| | | left: 632px; |
| | | } |
| | | |
| | | |
| | | #EfficiencyShift { |
| | | overflow: hidden; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <div :bordered="false" style="height: 100%"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input v-model="queryParam.equipmentId" allowClear></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input v-model="queryParam.equipmentName" allowClear></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg="5" :md="5" :sm="5" :xs="5"> |
| | | <a-space> |
| | | <a-button type="primary" @click="loadData" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå· --> |
| | | <div class="table-operator" style="border-top: 5px"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ·»å å°è´¦</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay" @click="handleMenuClick"> |
| | | <a-menu-item key="1"> |
| | | <a-icon type="delete" @click="batchDel"/> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> |
| | | æ¹éæä½ |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <a-table :columns="columns" :data-source="dataList" bordered :pagination="false" :scroll="{x:'max-content'}" |
| | | :expandRowByClick="true" |
| | | rowKey="id" @expand="handleExpandChange" :loading="outerDataLoading" |
| | | > |
| | | <span slot="isMdcInstall" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="isMdcHardwareInstall" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="isDncInstall" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="isDncHardwareInstall" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click.stop="handleAdd(record.id,'sub_')">æ°å¢è®°å½</a> |
| | | <a-divider type="vertical"/> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link"> |
| | | æ´å¤ <a-icon type="down"/> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾å°è´¦</a> |
| | | </a-menu-item> |
| | | |
| | | <a-menu-item> |
| | | <a href="javascript:;" @click="handleDetail(record)">å°è´¦è¯¦æ
</a> |
| | | </a-menu-item> |
| | | |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å 餿¤å°è´¦å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤å°è´¦</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | <a-table |
| | | slot="expandedRowRender" |
| | | slot-scope="row" |
| | | :columns="innerColumns" |
| | | :data-source="row.innerDataList" |
| | | :pagination="false" |
| | | rowKey="id" |
| | | :loading="innerDataLoading" |
| | | > |
| | | <span slot="mdcFunctionStatus" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="mdcModuleStatus" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="dncFunctionStatus" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="dncModuleStatus" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="maintenanceResult" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> |
| | | <span slot="innerAction" slot-scope="text, record"> |
| | | <a @click="handleEdit(record,'sub_')">ç¼è¾è®°å½</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 href="javascript:;" @click="handleDetail(record,'sub_')">è®°å½è¯¦æ
</a> |
| | | </a-menu-item> |
| | | |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å 餿¤åæ´è®°å½å?" @confirm="() => handleDelete(record.id,'sub')"> |
| | | <a>å é¤è®°å½</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </a-table> |
| | | </a-table> |
| | | </div> |
| | | |
| | | <MdcImplementLedgersModal ref="modalForm" @ok="loadData"/> |
| | | <MdcImplementLedgersSubModal ref="sub_modalForm" @ok="loadData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import MdcImplementLedgersModal from './modules/MdcEquipmentImplementLedger/MdcImplementLedgersModal' |
| | | import MdcImplementLedgersSubModal from './modules/MdcEquipmentImplementLedger/MdcImplementLedgersSubModal' |
| | | import { deleteAction } from '@/api/manage' |
| | | |
| | | const columns = [ |
| | | { title: 'å
¬å¸', dataIndex: 'companyName', key: 'companyName', align: 'center', width: 100 }, |
| | | { title: '车é´', dataIndex: 'productionName', key: 'productionName', align: 'center', width: 100 }, |
| | | { title: '工段', dataIndex: 'sectionName', key: 'sectionName', align: 'center', width: 100 }, |
| | | { title: '设å¤ç¼å·', dataIndex: 'equipmentId', key: 'equipmentId', align: 'center', width: 100 }, |
| | | { title: '设å¤åç§°', dataIndex: 'equipmentName', key: 'equipmentName', align: 'center', width: 100 }, |
| | | { title: '设å¤åå·', dataIndex: 'equipmentModel', key: 'equipmentModel', align: 'center', width: 100 }, |
| | | { title: '设å¤ç³»ç»ç±»å', dataIndex: 'controlSystem', key: 'controlSystem', align: 'center', width: 150 }, |
| | | { title: '设å¤è´£ä»»äºº', dataIndex: 'responsible', key: 'responsible', align: 'center', width: 150 }, |
| | | { title: '设å¤å®æ¾ä½ç½®', dataIndex: 'equipmentPosition', key: 'equipmentPosition', align: 'center', width: 150 }, |
| | | { title: '设å¤å®æ¾æ¶é´', dataIndex: 'placementTime', key: 'placementTime', align: 'center', width: 150 }, |
| | | { |
| | | title: 'MDCå®è£
æ
åµ', |
| | | dataIndex: 'isMdcInstall', |
| | | key: 'isMdcInstall', |
| | | align: 'center', |
| | | width: 150, |
| | | scopedSlots: { customRender: 'isMdcInstall' } |
| | | }, |
| | | { |
| | | title: 'MDC硬件å®è£
', |
| | | dataIndex: 'isMdcHardwareInstall', |
| | | key: 'isMdcHardwareInstall', |
| | | align: 'center', |
| | | width: 150, |
| | | scopedSlots: { customRender: 'isMdcHardwareInstall' } |
| | | }, |
| | | { title: 'å®è£
æ¶é´', dataIndex: 'mdcInstallTime', key: 'mdcInstallTime', align: 'center', width: 150 }, |
| | | { |
| | | title: 'DNCå®è£
æ
åµ', |
| | | dataIndex: 'isDncInstall', |
| | | key: 'isDncInstall', |
| | | align: 'center', |
| | | width: 150, |
| | | scopedSlots: { customRender: 'isDncInstall' } |
| | | }, |
| | | { |
| | | title: 'DNC硬件å®è£
', |
| | | dataIndex: 'isDncHardwareInstall', |
| | | key: 'isDncHardwareInstall', |
| | | align: 'center', |
| | | width: 150, |
| | | scopedSlots: { customRender: 'isDncHardwareInstall' } |
| | | }, |
| | | { title: 'å®è£
æ¶é´', dataIndex: 'dncInstallTime', key: 'dncInstallTime', align: 'center', width: 150 }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200 |
| | | } |
| | | ] |
| | | |
| | | const innerColumns = [ |
| | | { |
| | | title: 'åæ´è®°å½', |
| | | dataIndex: 'rowIndex', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'åæ´æ¶é´', dataIndex: 'alterTime', key: 'alterTime', align: 'center' }, |
| | | { title: 'åæ´åå ', dataIndex: 'alterReason', key: 'alterReason', align: 'center ' }, |
| | | { title: '设å¤ä½ç½®ç¡®è®¤', dataIndex: 'locationStatus', key: 'locationStatus', align: 'center' }, |
| | | { title: '设å¤ç½ç»ç¡®è®¤', dataIndex: 'networkStatus', key: 'networkStatus', align: 'center' }, |
| | | { |
| | | title: 'MDCåè½ç¡®è®¤', |
| | | dataIndex: 'mdcFunctionStatus', |
| | | key: 'mdcFunctionStatus', |
| | | scopedSlots: { customRender: 'mdcFunctionStatus' }, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'MDC模å确认', |
| | | dataIndex: 'mdcModuleStatus', |
| | | key: 'mdcModuleStatus', |
| | | scopedSlots: { customRender: 'mdcModuleStatus' }, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'DNCåè½ç¡®è®¤', |
| | | dataIndex: 'dncFunctionStatus', |
| | | key: 'dncFunctionStatus', |
| | | scopedSlots: { customRender: 'dncFunctionStatus' }, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'DNC模å确认', |
| | | dataIndex: 'dncModuleStatus', |
| | | key: 'dncModuleStatus', |
| | | scopedSlots: { customRender: 'dncModuleStatus' }, |
| | | align: 'center' |
| | | }, |
| | | { title: 'åé¦äºº', dataIndex: 'feedbackBy', key: 'feedbackBy', align: 'center' }, |
| | | { title: 'å馿¶é´', dataIndex: 'feedbackTime', key: 'feedbackTime', align: 'center' }, |
| | | { title: 'ç»´æ¤äººå', dataIndex: 'maintenanceBy', key: 'maintenanceBy', align: 'center' }, |
| | | { title: 'å¤çæ¶é´', dataIndex: 'maintenanceTime', key: 'maintenanceTime', align: 'center' }, |
| | | { title: 'å¤çè¿ç¨æè¿°', dataIndex: 'maintenanceRemark', key: 'maintenanceRemark', align: 'center' }, |
| | | { |
| | | title: 'å¤çç»æ', |
| | | dataIndex: 'maintenanceResult', |
| | | key: 'maintenanceResult', |
| | | scopedSlots: { customRender: 'maintenanceResult' }, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'innerAction', |
| | | scopedSlots: { customRender: 'innerAction' }, |
| | | align: 'center', |
| | | width: 200 |
| | | } |
| | | ] |
| | | |
| | | export default { |
| | | name: 'MdcEquipmentImplementLedger', |
| | | components: { MdcImplementLedgersModal, MdcImplementLedgersSubModal }, |
| | | mixins: [JeecgListMixin], |
| | | data() { |
| | | return { |
| | | // ç¦ç¨mixinsä¸çcreateé©å |
| | | disableMixinCreated: true, |
| | | /* tableå è½½ç¶æ */ |
| | | outerDataLoading: false, |
| | | innerDataLoading: false, |
| | | queryParam: {}, |
| | | dataList: [], |
| | | url: { |
| | | mdcImplementLedgersList: '/mdc/mdcImplementLedgers/list', |
| | | mdcImplementLedgersSubList: '/mdc/mdcImplementLedgersSub/list' |
| | | }, |
| | | columns, |
| | | innerColumns, |
| | | hasRequestAlarmCodeList: [] |
| | | } |
| | | }, |
| | | /** |
| | | * çå½å¨æ æè½½å |
| | | * */ |
| | | created() { |
| | | this.loadData() |
| | | }, |
| | | filters: { |
| | | numFilter(value) { |
| | | if (value) { |
| | | return parseFloat((value * 100).toFixed(2)) |
| | | } else { |
| | | return '0' |
| | | } |
| | | }, |
| | | |
| | | formatIsInstallAndStatus(value) { |
| | | return value === 'Y' ? 'æ¯' : 'å¦' |
| | | }, |
| | | |
| | | /** |
| | | * æ ¼å¼åæ¶é´ |
| | | * @param seconds ç§æ° |
| | | * @returns '' æ ¼å¼ååæ¶é´å符串 |
| | | */ |
| | | getFormattedTime(seconds) { |
| | | var hours = Math.floor(seconds / 3600) |
| | | var minutes = Math.floor((seconds % 3600) / 60) |
| | | var secs = seconds % 60 |
| | | |
| | | if (hours === 0) { |
| | | if (minutes === 0) { |
| | | return secs === 0 ? 0 : `${secs}ç§` |
| | | } else { |
| | | if (secs === 0) { |
| | | return `${minutes}å` |
| | | } |
| | | return `${minutes}å ${secs}ç§` |
| | | } |
| | | } else { |
| | | if (minutes === 0 && secs === 0) { |
| | | return `${hours}å°æ¶` |
| | | } else if (minutes !== 0 && secs === 0) { |
| | | return `${hours}å°æ¶ ${minutes}å` |
| | | } |
| | | } |
| | | return `${hours}å°æ¶ ${minutes}å ${secs}ç§` |
| | | } |
| | | }, |
| | | methods: { |
| | | loadData() { |
| | | this.outerDataLoading = true |
| | | this.dataList = [] |
| | | getAction(this.url.mdcImplementLedgersList, this.queryParam).then(res => { |
| | | if (res.success) { |
| | | this.dataList = res.result.records |
| | | this.hasRequestAlarmCodeList = [] |
| | | } |
| | | }).finally(() => { |
| | | this.outerDataLoading = false |
| | | }) |
| | | }, |
| | | |
| | | handleAdd: function(implementId = '', param = '') { |
| | | this.$refs[param + 'modalForm'].add(implementId) |
| | | this.$refs[param + 'modalForm'].title = 'æ°å¢' |
| | | this.$refs[param + 'modalForm'].disableSubmit = false |
| | | }, |
| | | |
| | | handleEdit: function(record, param = '') { |
| | | this.$refs[param + 'modalForm'].edit(record) |
| | | this.$refs[param + 'modalForm'].title = 'ç¼è¾' |
| | | this.$refs[param + 'modalForm'].disableSubmit = false |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»è¡¨æ ¼ä¸è¯¦æ
æé®äºä»¶ |
| | | * @param record éä¸çå½åè¡æ°æ® |
| | | */ |
| | | handleDetail: function(record, param = '') { |
| | | console.log(this.$refs[param + 'modalForm']) |
| | | this.$refs[param + 'modalForm'].edit(record) |
| | | this.$refs[param + 'modalForm'].title = '详æ
' |
| | | this.$refs[param + 'modalForm'].disableSubmit = true |
| | | // è°ç¨æ½å±è¡¨åç»ä»¶ä¸çæ¸
é¤è¡¨åéªè¯æ¹æ³ |
| | | // this.$refs[param + 'modalForm'].removeValidate() |
| | | }, |
| | | |
| | | handleDelete: function(id, param) { |
| | | var that = this |
| | | let url |
| | | if (param != 'sub') { |
| | | url = '/mdc/mdcImplementLedgers/delete' |
| | | } else { |
| | | url = '/mdc/mdcImplementLedgersSub/delete' |
| | | } |
| | | deleteAction(url, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èªå®ä¹è¡¨æ ¼è¡è§¦å |
| | | * @param expanded å½åè¡æ¯å¦ä¸ºå±å¼ç¶æ |
| | | * @param record å½åè¡ä¿¡æ¯ |
| | | */ |
| | | handleExpandChange(expanded, record) { |
| | | let _this = this |
| | | // å½å±å¼æ¶è¥è¯¥è¡æªè¢«å±å¼è¿æä¼è¯·æ±åå°æ°æ®ï¼å±å¼è¿çæ°æ®ä¼è¢«ç¼åæ ééå¤è¯·æ± |
| | | if (expanded && !this.hasRequestAlarmCodeList.includes(record.id)) { |
| | | this.innerDataLoading = true |
| | | getAction(this.url.mdcImplementLedgersSubList, { implementId: record.id }).then(res => { |
| | | if (res.success) { |
| | | _this.dataList.forEach(item => { |
| | | if (item.id === record.id) { |
| | | item.innerDataList = res.result.records |
| | | } |
| | | }) |
| | | _this.hasRequestAlarmCodeList.push(record.id) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | _this.innerDataLoading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | /deep/ .ant-table-body tr:not(.ant-table-expanded-row) td { |
| | | /*padding-top: 10px;*/ |
| | | /*padding-bottom: 10px;*/ |
| | | /*cursor: pointer;*/ |
| | | } |
| | | |
| | | /deep/ .ant-table-fixed-right .ant-table-expanded-row { |
| | | display: none; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :maskClosable="disableSubmit" |
| | | :width="drawerWidth" |
| | | @cancel="visible=false" |
| | | :visible="visible" |
| | | :footer="null" |
| | | style="height: 100%;overflow: auto;padding-bottom: 53px;"> |
| | | |
| | | <template slot="title"> |
| | | <div style="width: 100%;"> |
| | | <span>{{ title }}</span> |
| | | <span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right"> |
| | | <a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button> |
| | | </span> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å
¬å¸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyName"> |
| | | <a-input :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥å
¬å¸åç§°" |
| | | v-model="model.companyName"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionName"> |
| | | <a-input :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è½¦é´åç§°" v-model="model.productionName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="工段" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sectionName"> |
| | | <a-input :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥å·¥æ®µåç§°" |
| | | v-model="model.sectionName"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤ç¼å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> |
| | | <a-input :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤ç¼å·" |
| | | v-model="model.equipmentId"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentName"> |
| | | <a-input :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤åç§°" v-model="model.equipmentName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤åå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentModel"> |
| | | <a-input :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤åå·" |
| | | v-model="model.equipmentModel"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤ç³»ç»ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤ç³»ç»ç±»å" |
| | | v-model="model.controlSystem"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤è´£ä»»äºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input allow-clear :readOnly="disableSubmit" placeholder="请è¾å
¥è®¾å¤è´£ä»»äºº" |
| | | v-model="model.responsible"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤å®æ¾ä½ç½®" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input allow-clear :readOnly="disableSubmit" placeholder="请è¾å
¥è®¾å¤å®æ¾ä½ç½®" v-model="model.equipmentPosition"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤å®æ¾æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker allow-clear :disabled="disableSubmit" v-model="model.placementTime" format='YYYY-MM-DD' |
| | | value-format="YYYY-MM-DD"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="MDCå®è£
æ
åµ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.isMdcInstall"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="MDC硬件å®è£
" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.isMdcHardwareInstall"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="MDCå®è£
æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker allow-clear :disabled="disableSubmit" v-model="model.mdcInstallTime" format='YYYY-MM-DD' |
| | | value-format="YYYY-MM-DD"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="DNCå®è£
æ
åµ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.isDncInstall"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="DNC硬件å®è£
" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.isDncHardwareInstall"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="DNCå®è£
æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker allow-clear :disabled="disableSubmit" v-model="model.dncInstallTime" format='YYYY-MM-DD' |
| | | value-format="YYYY-MM-DD"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | |
| | | <div class="drawer-bottom-button" v-if="!disableSubmit"> |
| | | <a-popconfirm title="ç¡®å®æ¾å¼æä½ï¼" @confirm="close" okText="ç¡®å®" cancelText="åæ¶"> |
| | | <a-button style="margin-right: .8rem">åæ¶</a-button> |
| | | </a-popconfirm> |
| | | <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">æäº¤</a-button> |
| | | </div> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { getAction, postAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'MdcImplementLedgersModal', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | | modalToggleFlag: true, |
| | | disableSubmit: true, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | // equipmentId: |
| | | // [ |
| | | // { |
| | | // required: true, message: 'è¯·éæ©è®¾å¤ç¼å·!' |
| | | // } |
| | | // ], |
| | | // equipmentName: |
| | | // [ |
| | | // { |
| | | // required: true, message: '请è¾å
¥è®¾å¤åç§°!' |
| | | // } |
| | | // ], |
| | | // equipmentModel: |
| | | // [ |
| | | // { |
| | | // required: true, message: '请è¾å
¥è®¾å¤åå·!' |
| | | // } |
| | | // ] |
| | | }, |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | uploadLoading: false, |
| | | confirmLoading: false, |
| | | headers: {}, |
| | | url: { |
| | | add: '/mdc/mdcImplementLedgers/add', |
| | | edit: '/mdc/mdcImplementLedgers/edit' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit({}) |
| | | }, |
| | | edit(record) { |
| | | let that = this |
| | | that.visible = true |
| | | //æ ¹æ®å±å¹å®½åº¦èªéåºæ½å±å®½åº¦ |
| | | this.resetScreenSize() |
| | | that.model = Object.assign({}, record) |
| | | }, |
| | | //çªå£æå¤§å忢 |
| | | toggleScreen() { |
| | | if (this.modalToggleFlag) { |
| | | this.modalWidth = window.innerWidth |
| | | } else { |
| | | this.modalWidth = 800 |
| | | } |
| | | this.modalToggleFlag = !this.modalToggleFlag |
| | | }, |
| | | // æ ¹æ®å±å¹åå,设置æ½å±å°ºå¯¸ |
| | | resetScreenSize() { |
| | | let screenWidth = document.body.clientWidth |
| | | if (screenWidth < 500) { |
| | | this.drawerWidth = screenWidth |
| | | } else { |
| | | this.drawerWidth = 700 |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | }, |
| | | handleSubmit() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let url |
| | | if (!this.model.id) { |
| | | url = that.url.add |
| | | } else { |
| | | url = that.url.edit |
| | | } |
| | | console.log('model', that.model) |
| | | postAction(url, that.model).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * ç¼è¾ææ¥ç详æ
æ°æ®æ¶æ¸
餿½å±è¡¨åéªè¯ |
| | | */ |
| | | removeValidate() { |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .avatar-uploader > .ant-upload { |
| | | width: 104px; |
| | | height: 104px; |
| | | } |
| | | |
| | | .ant-upload-select-picture-card i { |
| | | font-size: 49px; |
| | | color: #999; |
| | | } |
| | | |
| | | .ant-upload-select-picture-card .ant-upload-text { |
| | | margin-top: 8px; |
| | | color: #666; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | .drawer-bottom-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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :maskClosable="disableSubmit" |
| | | :width="drawerWidth" |
| | | @cancel="visible=false" |
| | | :visible="visible" |
| | | :footer="null" |
| | | style="height: 100%;overflow: auto;padding-bottom: 53px;"> |
| | | |
| | | <template slot="title"> |
| | | <div style="width: 100%;"> |
| | | <span>{{ title }}</span> |
| | | <span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right"> |
| | | <a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button> |
| | | </span> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åæ´æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="alterTime"> |
| | | <a-date-picker allow-clear :disabled="disableSubmit" v-model="model.alterTime" format='YYYY-MM-DD' |
| | | value-format="YYYY-MM-DD"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åæ´åå " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="alterReason"> |
| | | <a-select :disabled="disableSubmit" placeholder="è¯·éæ©åæ´åå " :triggerChange="true" |
| | | v-model="model.alterReason"> |
| | | <a-select-option v-for='item in selectList' :key='item.value' :value='item.value'> |
| | | {{item.label}} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤ä½ç½®ç¡®è®¤" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationStatus"> |
| | | <a-input :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤ä½ç½®ç¡®è®¤" |
| | | v-model="model.locationStatus"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤ç½ç»ç¡®è®¤" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="networkStatus"> |
| | | <a-select :disabled="disableSubmit" placeholder="è¯·éæ©åæ´åå " :triggerChange="true" |
| | | v-model="model.networkStatus"> |
| | | <a-select-option value='æªæ¢å¤'>æªæ¢å¤</a-select-option> |
| | | <a-select-option value='å·²æ¢å¤'>å·²æ¢å¤</a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="MDCåè½ç¡®è®¤" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mdcFunctionStatus"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.mdcFunctionStatus"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="MDC模å确认" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mdcModuleStatus"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.mdcModuleStatus"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="DNCåè½ç¡®è®¤" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dncFunctionStatus"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.dncFunctionStatus"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="DNC模å确认" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dncModuleStatus"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.dncModuleStatus"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åé¦äºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input allow-clear :readOnly="disableSubmit" placeholder="请è¾å
¥åé¦äºº" v-model="model.feedbackBy"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å馿¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker allow-clear :disabled="disableSubmit" v-model="model.feedbackTime" format='YYYY-MM-DD' |
| | | value-format="YYYY-MM-DD"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç»´æ¤äººå" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input allow-clear :readOnly="disableSubmit" placeholder="请è¾å
¥ç»´æ¤äººå" v-model="model.maintenanceBy"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å¤çæ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker allow-clear :disabled="disableSubmit" v-model="model.maintenanceTime" format='YYYY-MM-DD' |
| | | value-format="YYYY-MM-DD"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å¤çè¿ç¨æè¿°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input allow-clear :readOnly="disableSubmit" placeholder="请è¾å
¥å¤çè¿ç¨æè¿°" v-model="model.maintenanceRemark"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å¤çç»æ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-switch :disabled="disableSubmit" v-model="model.maintenanceResult"></j-switch> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | |
| | | <div class="drawer-bottom-button" v-if="!disableSubmit"> |
| | | <a-popconfirm title="ç¡®å®æ¾å¼æä½ï¼" @confirm="close" okText="ç¡®å®" cancelText="åæ¶"> |
| | | <a-button style="margin-right: .8rem">åæ¶</a-button> |
| | | </a-popconfirm> |
| | | <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">æäº¤</a-button> |
| | | </div> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, postAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'MdcImplementLedgersModal', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | | modalToggleFlag: true, |
| | | disableSubmit: true, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: {}, |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | selectList: [ |
| | | { |
| | | label: 'æ¬è¿', |
| | | value: 'æ¬è¿' |
| | | }, |
| | | { |
| | | label: 'ç»´ä¿®', |
| | | value: 'ç»´ä¿®' |
| | | }, |
| | | { |
| | | label: '大修', |
| | | value: '大修' |
| | | }, |
| | | { |
| | | label: 'æ¥åº', |
| | | value: 'æ¥åº' |
| | | }, |
| | | { |
| | | label: 'å
¶ä»', |
| | | value: 'å
¶ä»' |
| | | } |
| | | ], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | uploadLoading: false, |
| | | confirmLoading: false, |
| | | headers: {}, |
| | | url: { |
| | | add: '/mdc/mdcImplementLedgersSub/add', |
| | | edit: '/mdc/mdcImplementLedgersSub/edit' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | add(implementId) { |
| | | this.edit({ implementId }) |
| | | }, |
| | | edit(record) { |
| | | let that = this |
| | | that.visible = true |
| | | //æ ¹æ®å±å¹å®½åº¦èªéåºæ½å±å®½åº¦ |
| | | this.resetScreenSize() |
| | | that.model = Object.assign({}, record) |
| | | }, |
| | | //çªå£æå¤§å忢 |
| | | toggleScreen() { |
| | | if (this.modalToggleFlag) { |
| | | this.modalWidth = window.innerWidth |
| | | } else { |
| | | this.modalWidth = 800 |
| | | } |
| | | this.modalToggleFlag = !this.modalToggleFlag |
| | | }, |
| | | // æ ¹æ®å±å¹åå,设置æ½å±å°ºå¯¸ |
| | | resetScreenSize() { |
| | | let screenWidth = document.body.clientWidth |
| | | if (screenWidth < 500) { |
| | | this.drawerWidth = screenWidth |
| | | } else { |
| | | this.drawerWidth = 700 |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | }, |
| | | handleSubmit() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let url |
| | | if (!this.model.id) { |
| | | url = that.url.add |
| | | } else { |
| | | url = that.url.edit |
| | | } |
| | | console.log('model', that.model) |
| | | postAction(url, that.model).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * ç¼è¾ææ¥ç详æ
æ°æ®æ¶æ¸
餿½å±è¡¨åéªè¯ |
| | | */ |
| | | removeValidate() { |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .avatar-uploader > .ant-upload { |
| | | width: 104px; |
| | | height: 104px; |
| | | } |
| | | |
| | | .ant-upload-select-picture-card i { |
| | | font-size: 49px; |
| | | color: #999; |
| | | } |
| | | |
| | | .ant-upload-select-picture-card .ant-upload-text { |
| | | margin-top: 8px; |
| | | color: #666; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | .drawer-bottom-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> |