diff --git a/src/views/modules/code/list.vue b/src/views/modules/code/list.vue index b781b79..aa7e558 100644 --- a/src/views/modules/code/list.vue +++ b/src/views/modules/code/list.vue @@ -26,6 +26,138 @@ export default { detailLoading:false, detailDialogVisible:false, saveDialogVisible:false, + columns: [ + { + userId: this.$store.state.user.name, + functionId: 9009003, + serialNumber: '9009003Table1DrawingNo', + tableId: '9009003Table1', + tableName: '编码信息', + columnProp: 'drawingNo', + headerAlign: 'center', + align: 'left', + columnLabel: '编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + }, + { + userId: this.$store.state.user.name, + functionId: 9009003, + serialNumber: '9009003Table1DrawingDesc', + tableId: '9009003Table1', + tableName: '编码描述', + columnProp: 'drawingDesc', + headerAlign: 'center', + align: 'left', + columnLabel: '编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 600 + }, + { + userId: this.$store.state.user.name, + functionId: 9009003, + serialNumber: '9009003Table1ErpPartNo', + tableId: '9009003Table1', + tableName: '编码描述', + columnProp: 'erpPartNo', + headerAlign: 'center', + align: 'left', + columnLabel: 'IFS Part No', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150 + }, + { + userId: this.$store.state.user.name, + functionId: 9009003, + serialNumber: '9009003Table1ErpPartDesc', + tableId: '9009003Table1', + tableName: '编码描述', + columnProp: 'erpPartDesc', + headerAlign: 'center', + align: 'left', + columnLabel: 'IFS Part Description', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 180 + }, + { + userId: this.$store.state.user.name, + functionId: 9009003, + serialNumber: '9009003Table1Creator', + tableId: '9009003Table1', + tableName: '编码描述', + columnProp: 'creator', + headerAlign: 'center', + align: 'left', + columnLabel: '创建人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 9009003, + serialNumber: '9009003Table1CreateDate', + tableId: '9009003Table1', + tableName: '编码描述', + columnProp: 'createDate', + headerAlign: 'center', + align: 'center', + columnLabel: '创建时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 9009003, + serialNumber: '9009003Table1Remark', + tableId: '9009003Table1', + tableName: '编码描述', + columnProp: 'remark', + headerAlign: 'center', + align: 'left', + columnLabel: '备注', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + ], + exportData:[], + exportName: '编码列表'+this.dayjs().format('YYYYMMDDHHmmss'), + exportHeader: ["编码列表"], + exportFooter: [], } }, created() { @@ -33,6 +165,21 @@ export default { this.searchDrawingList(); }, methods:{ + fields() { + let json = "{" + this.columns.forEach((item, index) => { + if (index === this.columns.length - 1) { + json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + } else { + json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," + } + }) + json += "}" + return eval("(" + json + ")") + }, + createExportData() { + return this.drawingList; + }, searchDrawingList(){ searchDrawingList(this.searchModel).then(({data})=>{ if (data && data.code === 0){ @@ -170,21 +317,43 @@ export default { - + 搜索 + + {{ '导出' }} + - - - - - - - + + +