回显问题修改
This commit is contained in:
@@ -94,7 +94,7 @@
|
|||||||
width="190px"
|
width="190px"
|
||||||
label="新车型实施日期">
|
label="新车型实施日期">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '-' }}</span>
|
<span style="margin-left: 10px">{{scope.row.xcxssrq ? $moment(scope.row.xcxssrq).format('YYYY-MM-DD') : '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
width="190px"
|
width="190px"
|
||||||
label="在产车实施日期">
|
label="在产车实施日期">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '-' }}</span>
|
<span style="margin-left: 10px">{{ scope.row.zccssrq ? $moment(scope.row.zccssrq).format('YYYY-MM-DD') : '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -111,6 +111,11 @@
|
|||||||
label="责任部门"
|
label="责任部门"
|
||||||
width="180px"
|
width="180px"
|
||||||
>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">
|
||||||
|
{{zrbmMap[scope.row.zrbm]}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
@@ -231,16 +236,31 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
prop="xcxssrq"
|
prop="xcxssrq"
|
||||||
label="新车型实施日期">
|
label="新车型实施日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">
|
||||||
|
{{scope.row.attrInfoCaseMap.xcxssrq ? $moment(scope.row.attrInfoCaseMap.xcxssrq).format('YYYY-MM-DD') : '-'}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
prop="zccssrq"
|
prop="zccssrq"
|
||||||
label="在产车实施日期">
|
label="在产车实施日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">
|
||||||
|
{{scope.row.attrInfoCaseMap.zccssrq ? $moment(scope.row.attrInfoCaseMap.zccssrq).format('YYYY-MM-DD') : '-'}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
prop="textStatus"
|
prop="textStatus"
|
||||||
label="文本状态">
|
label="文本状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">
|
||||||
|
{{textStatusMap[scope.row.textStatus]}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -312,6 +332,8 @@ export default {
|
|||||||
standList1:[],//调取添加的数据
|
standList1:[],//调取添加的数据
|
||||||
id:'',//批量删除.
|
id:'',//批量删除.
|
||||||
saveExportType: '',// 导出文件模态框控制,和文件名称
|
saveExportType: '',// 导出文件模态框控制,和文件名称
|
||||||
|
zrbmMap: {},
|
||||||
|
textStatusMap: {} // 文本状态id与name对应
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -596,17 +618,21 @@ export default {
|
|||||||
} else if (this.saveExportType === 'all') {
|
} else if (this.saveExportType === 'all') {
|
||||||
console.log(this.selectList);
|
console.log(this.selectList);
|
||||||
let ids = ''
|
let ids = ''
|
||||||
if (this.selectList.length === 0) {
|
if (this.dataList.length === 0) {
|
||||||
ids='\''+this.dataList[0].standId+'\''
|
this.$message.error('暂无导出数据')
|
||||||
for(let i=1;i<this.dataList.length;i++){
|
}else{
|
||||||
ids+=',\''+this.dataList[i].standId+'\''
|
if (this.selectList.length === 0) {
|
||||||
|
ids='\''+this.dataList[0].standId+'\''
|
||||||
|
for(let i=1;i<this.dataList.length;i++){
|
||||||
|
ids+=',\''+this.dataList[i].standId+'\''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
const exportURL = interfaceUrl + 'sarStandProjectLibrary/exportStandAttrInfoExcel?' +
|
||||||
const exportURL = interfaceUrl + 'sarStandProjectLibrary/exportStandAttrInfoExcel?' +
|
|
||||||
'exportType' + this.saveExportType + '&ids=' + ids + '&exportName=' + this.exportName + '&id=' + this.localProEO.id
|
'exportType' + this.saveExportType + '&ids=' + ids + '&exportName=' + this.exportName + '&id=' + this.localProEO.id
|
||||||
console.log(exportURL)
|
console.log(exportURL)
|
||||||
window.open(exportURL)
|
window.open(exportURL)
|
||||||
this.$message.success('导出信息成功')
|
this.$message.success('导出信息成功')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.exportModelFlag = false
|
this.exportModelFlag = false
|
||||||
},
|
},
|
||||||
@@ -625,6 +651,12 @@ export default {
|
|||||||
standSelectChange(val) {
|
standSelectChange(val) {
|
||||||
this.selectList = val;
|
this.selectList = val;
|
||||||
},//选项值发生改变
|
},//选项值发生改变
|
||||||
|
// 将文本状态的id与name对应
|
||||||
|
setMap(key,data){
|
||||||
|
data.forEach(item => {
|
||||||
|
this.$set(key, item.value, item.label)
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['getLocalPro'])
|
...mapGetters(['getLocalPro'])
|
||||||
@@ -645,6 +677,8 @@ export default {
|
|||||||
loading: 'loading'
|
loading: 'loading'
|
||||||
}, res => {
|
}, res => {
|
||||||
this.standSortOptions = res.data.STANDCLASSIFY // 标准类别
|
this.standSortOptions = res.data.STANDCLASSIFY // 标准类别
|
||||||
|
this.setMap(this.zrbmMap,res.data.ZRBMCLASS)
|
||||||
|
this.setMap(this.textStatusMap,res.data.WBZTCLASS)
|
||||||
this.showLocalProductData(this.getLocalPro)
|
this.showLocalProductData(this.getLocalPro)
|
||||||
}, e => {
|
}, e => {
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user