对比新文件 |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud |
| | | :addBtn="false" |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model:search="search" |
| | | v-model:page="mypage" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleEdit">瀵煎嚭</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | keyword: "", |
| | | machineGroupCode: "" |
| | | }, |
| | | loading: true, |
| | | mypage: { |
| | | size: 10, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | option: { |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | labelWidth: 120, |
| | | emptyBtn: false, |
| | | searchSpan: 8, |
| | | menu: false, |
| | | column: [ |
| | | { |
| | | label: '浠诲姟鏃堕棿', |
| | | type: 'input', |
| | | prop: '', |
| | | search: true, |
| | | hide: true |
| | | }, |
| | | { |
| | | label: '鎵ц浜哄憳', |
| | | type: 'input', |
| | | prop: '', |
| | | search: true |
| | | }, |
| | | { |
| | | label: '浠诲姟鍚嶇О', |
| | | prop: '', |
| | | }, |
| | | { |
| | | label: '浠诲姟鑺傜偣', |
| | | prop: '', |
| | | }, |
| | | { |
| | | label: '浠诲姟鍒拌揪鏃堕棿', |
| | | prop: '', |
| | | }, |
| | | { |
| | | label: '瑕佹眰瀹屾垚鏃堕棿', |
| | | prop: '', |
| | | }, |
| | | { |
| | | label: '璇︽儏', |
| | | prop: '', |
| | | search: true, |
| | | hide: true |
| | | } |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleEdit(row,index) { |
| | | |
| | | }, |
| | | searchReset() { |
| | | //this.onLoad(this.mypage); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.mypage.current = 1; |
| | | this.onLoad(); |
| | | done(); |
| | | }, |
| | | currentChange(current) { |
| | | this.mypage.current = current; |
| | | }, |
| | | sizeChange(size) { |
| | | this.mypage.size = size; |
| | | }, |
| | | refreshChange() { |
| | | |
| | | }, |
| | | onLoad() { |
| | | this.loading = true; |
| | | var obj = { |
| | | keyword: this.search.keyword, |
| | | machineGroupCode: this.search.machineGroupCode, |
| | | current: this.mypage.current, |
| | | size: this.mypage.size, |
| | | } |
| | | axios({ |
| | | url: '/blade-mdm/machine/page', |
| | | method: 'get', |
| | | date: obj, |
| | | }).then( |
| | | res => { |
| | | const data = res.data.data; |
| | | this.mypage.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | }, |
| | | error => { |
| | | |
| | | } |
| | | ); |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | </style> |