This commit is contained in:
parent
c0f33de4b3
commit
edbe3b9454
|
|
@ -243,7 +243,7 @@
|
|||
<!-- 多选 -->
|
||||
<el-form-item v-if="item.inputType == 3" :label="item.propertyName">
|
||||
<el-select v-model="item.propertyValue" multiple placeholder="请选择"
|
||||
:clearable="item.propertyValue !='' && item.propertyValue != null"
|
||||
clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="(item, index) in handleData(item.value)"
|
||||
|
|
@ -460,6 +460,9 @@ export default {
|
|||
console.log('🚀 ~ getInfo ~ this.propertyVoList:', this.propertyVoList)
|
||||
if (this.propertyVoList.length > 0) {
|
||||
this.propertyVoList.forEach((item) => {
|
||||
if (item.propertyValue === '' || item.propertyValue === null || item.propertyValue === undefined) {
|
||||
item.propertyValue = null;
|
||||
}
|
||||
if (item.inputType == 3) {
|
||||
item.propertyValue = item.propertyValue.split(',')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -736,6 +736,7 @@ export default {
|
|||
this.isAddVisible = this.$route.query.isAddVisible && JSON.parse(this.$route.query.isAddVisible)
|
||||
this.isApprovalVisible = this.$route.query.isApprovalVisible && JSON.parse(this.$route.query.isApprovalVisible)
|
||||
if (!this.orderId) {
|
||||
this.orderId=''
|
||||
this.pageTitle = '新增设备录入'
|
||||
this.submitButtonText = '提交申请'
|
||||
} else if (this.isAddVisible) {
|
||||
|
|
@ -785,7 +786,7 @@ export default {
|
|||
productionDate: '',
|
||||
minOriginalValue: '',
|
||||
maxOriginalValue: '',
|
||||
|
||||
orderId: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
|
@ -973,30 +974,37 @@ export default {
|
|||
this.upload.isUploading = true
|
||||
},
|
||||
// 文件上传成功处理
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false
|
||||
this.upload.isUploading = false
|
||||
this.$refs.upload.clearFiles()
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
'</div>',
|
||||
response.msg +
|
||||
'</div>',
|
||||
'导入结果',
|
||||
{ dangerouslyUseHTMLString: true },
|
||||
)
|
||||
this.orderId = response.data || ''
|
||||
this.$router
|
||||
.replace({
|
||||
query: {
|
||||
orderId: response.data,
|
||||
isAddVisible: this.isAddVisible,
|
||||
isApprovalVisible: this.isApprovalVisible,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
console.log('🚀 ~ 导入成功跳转完成')
|
||||
this.getList()
|
||||
})
|
||||
// 【修复1】仅在接口返回有效orderId时才更新,否则保留原来的orderId
|
||||
if (response.data) {
|
||||
this.orderId = response.data
|
||||
this.$router
|
||||
.replace({
|
||||
query: {
|
||||
orderId: response.data,
|
||||
isAddVisible: this.isAddVisible,
|
||||
isApprovalVisible: this.isApprovalVisible,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
console.log('🚀 ~ 导入成功跳转完成')
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
// 【修复2】如果没有返回orderId,直接刷新当前列表,使用已有的orderId
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
handleFileSuccess2(response, file, fileList) {
|
||||
this.upload.open2 = false
|
||||
|
|
@ -1004,11 +1012,12 @@ export default {
|
|||
this.$refs.upload2.clearFiles()
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
'</div>',
|
||||
response.msg +
|
||||
'</div>',
|
||||
'导入结果',
|
||||
{ dangerouslyUseHTMLString: true },
|
||||
)
|
||||
// 【修复3】不管是否成功,都直接刷新列表,使用当前已有的orderId
|
||||
setTimeout(() => {
|
||||
this.getList()
|
||||
}, 200)
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
</el-row> -->
|
||||
<el-card class="content-box">
|
||||
<div >
|
||||
<el-table v-loading="loading" :data="tableData" border stripe height="650">
|
||||
<el-table v-loading="loading" :data="tableData" border stripe height="546">
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
<el-table
|
||||
:data="projectList"
|
||||
show-overflow-tooltip
|
||||
border stripe height="650"
|
||||
border stripe height="546"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<!--复选列-->
|
||||
|
|
|
|||
Loading…
Reference in New Issue