|
|
@@ -79,7 +79,11 @@
|
|
|
<div class="title">请选择对比的SCD文件</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div class="uploda-file" v-loading="loadingAdd">
|
|
|
+ <div
|
|
|
+ class="uploda-file"
|
|
|
+ v-loading="loadingAdd"
|
|
|
+ element-loading-text="上传文件中..."
|
|
|
+ >
|
|
|
<span class="file-title">选择文件</span>
|
|
|
<el-input
|
|
|
v-model="chooseFile"
|
|
|
@@ -135,12 +139,15 @@
|
|
|
>
|
|
|
确认上传
|
|
|
</div> -->
|
|
|
+
|
|
|
<div
|
|
|
- class="sures"
|
|
|
- :class="{ 'sures-success': !isAnalysis && AnalysisProcess }"
|
|
|
+ class="sures sures-success"
|
|
|
+ v-if="!isAnalysis && AnalysisProcess"
|
|
|
+ @click="yesAnalysisClick"
|
|
|
>
|
|
|
开始对比
|
|
|
</div>
|
|
|
+ <div class="sures" v-else @click="noAnalysisClick">开始对比</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -157,10 +164,15 @@ import {
|
|
|
onUnmounted,
|
|
|
} from "vue";
|
|
|
import scdCheck from "@/api/scdCheck/scdCheck";
|
|
|
-import { uploadfile, tmpParse } from "@/api/scdCheck/scdCheck2";
|
|
|
+import { uploadfile, tmpParse, compStart } from "@/api/scdCheck/scdCheck2";
|
|
|
import scd from "@/api/scd";
|
|
|
import systemRow from "@/api/systemRow";
|
|
|
-import { ElMessage, ElLoading } from "element-plus";
|
|
|
+import {
|
|
|
+ ElMessage,
|
|
|
+ ElLoading,
|
|
|
+ ElMessageBox,
|
|
|
+ ElNotification,
|
|
|
+} from "element-plus";
|
|
|
import LookScd from "../modalCom/LookScd.vue";
|
|
|
import dervicePng from "@/assets/image/scdcheck/derive.png";
|
|
|
import againPng from "@/assets/image/scdcheck/again.png";
|
|
|
@@ -357,7 +369,55 @@ watch(
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
+//解析完成开始对比的点击
|
|
|
+const yesAnalysisClick = () => {
|
|
|
+ console.log("parentData.value", parentData.value);
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ "该操作耗时较长,校验开始后将清除原有校验结果且无法中止,确定开始吗?",
|
|
|
+ "Warning",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(async () => {
|
|
|
+ ElNotification({
|
|
|
+ title: "信息",
|
|
|
+ message: "正在进行SCD的一致性比对...请稍候",
|
|
|
+ duration: 0,
|
|
|
+ });
|
|
|
+ const anRes = await compStart({
|
|
|
+ type: "SCD",
|
|
|
+ station_id: route.query.stationId,
|
|
|
+ source_scd_id: route.query.id,
|
|
|
+ target_scd_id: mesg.value.rootid,
|
|
|
+ comp_id: 0,
|
|
|
+ });
|
|
|
+ if (anRes.code == 0) {
|
|
|
+ ElNotification.closeAll();
|
|
|
+ loadingAdd.value = false;
|
|
|
+ aktType()
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: "对比完成!",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log("err", err);
|
|
|
+ });
|
|
|
+};
|
|
|
+//解析失败活未完成开始对比的点击
|
|
|
+const noAnalysisClick = () => {
|
|
|
+ ElMessage({
|
|
|
+ type: "warning",
|
|
|
+ message: "请上传文件并等待文件解析完成!",
|
|
|
+ });
|
|
|
+};
|
|
|
+const parentData = ref(null);
|
|
|
onMounted(() => {
|
|
|
+ parentData.value = JSON.parse(route.query.parentData);
|
|
|
aktType();
|
|
|
});
|
|
|
</script>
|
|
|
@@ -420,7 +480,6 @@ onMounted(() => {
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
-
|
|
|
}
|
|
|
.sures {
|
|
|
background: #dfe8ff;
|
|
|
@@ -452,7 +511,6 @@ onMounted(() => {
|
|
|
margin-left: 67px;
|
|
|
margin-top: 10px;
|
|
|
color: #255ce7;
|
|
|
-
|
|
|
}
|
|
|
.analysis.success {
|
|
|
color: #3be078;
|
|
|
@@ -460,4 +518,7 @@ onMounted(() => {
|
|
|
.analysis.fail {
|
|
|
color: #e50505;
|
|
|
}
|
|
|
+:deep(.el-message-box) {
|
|
|
+ vertical-align: inherit !important;
|
|
|
+}
|
|
|
</style>
|