¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :scroll="{x:true}" |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, deleteAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | export default { |
| | | name: "MaintenanceStandardPlanningMaterial", |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | maintenanceStandardId: { |
| | | type: String, |
| | | default: '-1', |
| | | required: false |
| | | } |
| | | }, |
| | | watch: { |
| | | maintenanceStandardId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (!this.maintenanceStandardId) { |
| | | this.clearList() |
| | | } else { |
| | | this.queryParam['maintenanceStandardId'] = val; |
| | | this.queryParam['delFlag'] = 0; |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 100, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶ç¼å·', |
| | | dataIndex: 'num', |
| | | align: "center", |
| | | // width: 300, |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åç§°', |
| | | dataIndex: 'name', |
| | | align: "center", |
| | | // width: 300, |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶è§æ ¼', |
| | | dataIndex: 'specification', |
| | | align: "center", |
| | | // width: 300, |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åå·', |
| | | dataIndex: 'model', |
| | | align: "center", |
| | | // width: 300, |
| | | }, |
| | | { |
| | | title: 'å¶é å', |
| | | dataIndex: 'constructorName', |
| | | align: "center", |
| | | // width: 300, |
| | | }, |
| | | { |
| | | title: 'æ°é', |
| | | dataIndex: 'quantity', |
| | | align: "center", |
| | | // width: 300, |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | dataIndex: 'unitName', |
| | | align: "center", |
| | | // width: 300, |
| | | }, |
| | | |
| | | ], |
| | | url: { |
| | | list: "/eam/maintenanceStandardPlanningMaterial/getMaintenanceStandardPlanningMaterialList", |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | |
| | | 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; |
| | | // this.originTargetKeys = []; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | 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'; |
| | | </style> |