|
|
@ -145,7 +145,15 @@ |
|
|
|
type="text" |
|
|
|
class="div-table-button--edit" |
|
|
|
size="small" |
|
|
|
@click="handleCompare(scope.row)">对比</el-button> |
|
|
|
@click="handleCompare(scope.row)">比对</el-button> |
|
|
|
<!-- <el-button type="text" |
|
|
|
class="div-table-button--detail" |
|
|
|
size="small" |
|
|
|
@click="handleUpdate(scope.row)">更新</el-button> |
|
|
|
<el-button type="text" |
|
|
|
class="div-table-button--edit" |
|
|
|
size="small" |
|
|
|
@click="handleCompare(scope.row)">比对</el-button> --> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -301,16 +309,12 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
if (data.type) { |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: data.msg || "更新成功" |
|
|
|
}); |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "更新成功" |
|
|
|
}); |
|
|
|
|
|
|
|
this.loadTable() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
this.loadTable() |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
@ -319,14 +323,14 @@ export default { |
|
|
|
|
|
|
|
async handleCompare (row) { |
|
|
|
|
|
|
|
this.$confirm("确认对比?", "提示", { |
|
|
|
this.$confirm("确认比对?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
let array = [row.resiId] |
|
|
|
this.compareRow(array) |
|
|
|
this.compareRow(array, false) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
if (err == "cancel") { |
|
|
@ -336,7 +340,11 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
async compareRow (array) { |
|
|
|
async compareRow (array, isBatch) { |
|
|
|
if (!isBatch) { |
|
|
|
this.startLoading() |
|
|
|
} |
|
|
|
|
|
|
|
const url = "/epmetuser/icResiComparisonRecord/comparison" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icResiComparisonRecord/comparison" |
|
|
|
|
|
|
@ -349,17 +357,24 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
if (!isBatch) { |
|
|
|
this.endLoading() |
|
|
|
} |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
if (data.type) { |
|
|
|
if (data.result) { |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "对比成功" |
|
|
|
showClose: true, |
|
|
|
message: data.resultExplain |
|
|
|
}); |
|
|
|
this.loadTable() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "比对成功" |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
this.loadTable() |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
@ -367,7 +382,7 @@ export default { |
|
|
|
|
|
|
|
async handleBatchCompare () { |
|
|
|
|
|
|
|
this.$confirm("确认批量对比?", "提示", { |
|
|
|
this.$confirm("确认批量比对?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
@ -375,7 +390,7 @@ export default { |
|
|
|
.then(() => { |
|
|
|
|
|
|
|
let array = this.selection.map((item) => item.resiId); |
|
|
|
this.compareRow(array) |
|
|
|
this.compareRow(array, true) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
if (err == "cancel") { |
|
|
|