|
@@ -57,7 +57,7 @@
|
|
|
v-if="scope.row.analysisState == 0"
|
|
|
:text-inside="true"
|
|
|
:stroke-width="20"
|
|
|
- :percentage="30"
|
|
|
+ :percentage="scope.row.analysisProgress"
|
|
|
:class="{
|
|
|
'indeterminate-progress': scope.row.analysisProgress < 100,
|
|
|
'animated-progress': true,
|
|
@@ -74,9 +74,16 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.analysisState == -1">未分析</span>
|
|
|
- <span v-else-if="scope.row.analysisState == 0" style="color: #f90"
|
|
|
+ <span
|
|
|
+ v-else-if="
|
|
|
+ scope.row.analysisState == 0 && scope.row.errState == 0
|
|
|
+ "
|
|
|
+ style="color: #f90"
|
|
|
>分析中</span
|
|
|
>
|
|
|
+ <span v-else-if="scope.row.errState == 1" style="color: #f00"
|
|
|
+ >分析异常</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-else-if="scope.row.analysisState == 1"
|
|
|
style="color: #4caf50"
|
|
@@ -94,9 +101,9 @@
|
|
|
<template slot-scope="scope">
|
|
|
<span>
|
|
|
{{
|
|
|
- scope.row.errState == 0
|
|
|
+ scope.row.errState == 0 && scope.row.analysisState !== -1
|
|
|
? "未异常"
|
|
|
- : scope.row.errState == 1
|
|
|
+ : scope.row.errState === 1
|
|
|
? "异常"
|
|
|
: "/"
|
|
|
}}</span
|
|
@@ -127,13 +134,25 @@
|
|
|
min-width="120"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
+ <!-- 分析完成 -->
|
|
|
<el-button
|
|
|
v-if="scope.row.analysisState == 1 && scope.row.errState !== 1"
|
|
|
- @click="handleAssetssDetail(scope.row)"
|
|
|
+ @click="handleAssetssDetail(scope.row, '1')"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
>分析详情</el-button
|
|
|
>
|
|
|
+ <!-- 分析中 -->
|
|
|
+ <el-button
|
|
|
+ v-else-if="
|
|
|
+ scope.row.analysisState == 0 && scope.row.errState == 0
|
|
|
+ "
|
|
|
+ @click="handleAssetssDetail(scope.row, '0')"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >分析详情</el-button
|
|
|
+ >
|
|
|
+
|
|
|
<span v-else>/</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -149,7 +168,7 @@
|
|
|
align="center"
|
|
|
fixed="right"
|
|
|
label="操作"
|
|
|
- min-width="200"
|
|
|
+ min-width="220"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -164,6 +183,9 @@
|
|
|
size="small"
|
|
|
>异常描述</el-button
|
|
|
>
|
|
|
+ <el-button @click="" type="text" size="small">{{
|
|
|
+ scope.row.onOffCall === 0 ? "开启自动分析" : "关闭自动分析"
|
|
|
+ }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -242,15 +264,29 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//分析详情
|
|
|
- handleAssetssDetail(row) {
|
|
|
- this.$router.push({
|
|
|
- path: "/home/performance/assetssDetail",
|
|
|
- query: {
|
|
|
- batchCode: row.batchCode,
|
|
|
- analysisTypeCode: row.analysisTypeCode,
|
|
|
- fieldEngineCode: row.fieldEngineCode,
|
|
|
- },
|
|
|
- });
|
|
|
+ handleAssetssDetail(row, state) {
|
|
|
+ const navigateToDetails = () => {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/home/performance/assetssDetail",
|
|
|
+ query: {
|
|
|
+ batchCode: row.batchCode,
|
|
|
+ analysisTypeCode: row.analysisTypeCode,
|
|
|
+ fieldEngineCode: row.fieldEngineCode,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ };
|
|
|
+ if (state === "0") {
|
|
|
+ // 分析状态为分析中
|
|
|
+ this.$confirm(
|
|
|
+ "当前查看的分析记录为历史分析结果,最新分析记录还未分析完成不展示!"
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ navigateToDetails();
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ } else {
|
|
|
+ navigateToDetails();
|
|
|
+ }
|
|
|
},
|
|
|
abnormalDialog(row, title) {
|
|
|
this.dialogVisible = true;
|