|
|
|
@ -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 { |
|
|
|
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="searchModel.endDate" style="width: 100%" type="date" placeholder="选择日期"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="searchDrawingList">搜索</el-button> |
|
|
|
<download-excel |
|
|
|
:fields="fields()" |
|
|
|
:data="exportData" |
|
|
|
type="xls" |
|
|
|
:name="exportName" |
|
|
|
:header="exportHeader" |
|
|
|
:footer="exportFooter" |
|
|
|
:fetch="createExportData" |
|
|
|
worksheet="导出信息" |
|
|
|
class="el-button el-button--primary el-button--medium"> |
|
|
|
{{ '导出' }} |
|
|
|
</download-excel> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-table :data="drawingList" height="750" border style="width: 100%"> |
|
|
|
<el-table-column prop="drawingNo" header-align="center" width="140" align="left" label="编码"></el-table-column> |
|
|
|
<el-table-column prop="drawingDesc" show-overflow-tooltip width="600" header-align="center" align="left" label="编码描述"></el-table-column> |
|
|
|
<el-table-column prop="erpPartNo" show-overflow-tooltip width="150" header-align="center" align="left" label="IFS Part No"></el-table-column> |
|
|
|
<el-table-column prop="erpPartDesc" show-overflow-tooltip width="180" header-align="center" align="left" label="IFS Part Description"></el-table-column> |
|
|
|
<el-table-column prop="creator" header-align="center" width="100" align="left" label="创建人"></el-table-column> |
|
|
|
<el-table-column prop="createDate" header-align="center" width="130" align="center" label="创建时间"></el-table-column> |
|
|
|
<el-table-column prop="remark" show-overflow-tooltip width="600" header-align="center" align="left" label="备注"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columns" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed===''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column header-align="center" width="140" align="center" fixed="right" label="操作"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-link style="cursor:pointer;" type="text" @click="handleEdit(row)">编辑</el-link> |
|
|
|
@ -262,8 +431,4 @@ export default { |
|
|
|
</template> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
.el-table /deep/ .cell{ |
|
|
|
height: auto; |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
</style> |