|
|
@@ -37,13 +37,13 @@
|
|
|
</div>
|
|
|
<div class="list-page">
|
|
|
<el-table
|
|
|
- v-loading="loading"
|
|
|
class="center-align-table"
|
|
|
:data="tableData"
|
|
|
border
|
|
|
:cell-style="rowStyle"
|
|
|
>
|
|
|
<el-table-column
|
|
|
+<<<<<<< HEAD
|
|
|
align="center"
|
|
|
label="分析主题"
|
|
|
prop="analysisName"
|
|
|
@@ -55,42 +55,33 @@
|
|
|
<span>{{ scope.row.analysisName }}</span>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
+=======
|
|
|
+ fixed
|
|
|
align="center"
|
|
|
- prop="fieldName"
|
|
|
- label="风场名称"
|
|
|
+ label="分析主题"
|
|
|
+ prop="analysisName"
|
|
|
min-width="200"
|
|
|
>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ :content="scope.row.sketch ? scope.row.sketch : '暂无简述内容'"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <span style="color: #4caf50">{{ scope.row.analysisName }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+>>>>>>> cd49b9e9d50e9e446a8759c0a81253ddbc1366ad
|
|
|
</el-table-column>
|
|
|
-
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- label="数据类型名称"
|
|
|
- prop="dataTypeName"
|
|
|
+ prop="fieldName"
|
|
|
+ label="风场名称"
|
|
|
min-width="200"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="loginName"
|
|
|
- align="center"
|
|
|
- label="进度"
|
|
|
- min-width="150"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-progress
|
|
|
- v-if="scope.row.analysisState == 20"
|
|
|
- :text-inside="true"
|
|
|
- :stroke-width="20"
|
|
|
- :percentage="scope.row.analysisProgress"
|
|
|
- :class="{
|
|
|
- 'indeterminate-progress': scope.row.analysisProgress < 100,
|
|
|
- 'animated-progress': true,
|
|
|
- }"
|
|
|
- ></el-progress>
|
|
|
- <span v-else>/</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
prop="loginName"
|
|
|
align="center"
|
|
|
@@ -109,6 +100,7 @@
|
|
|
<span v-else-if="scope.row.errState == 1" style="color: #f00"
|
|
|
>分析异常</span
|
|
|
>
|
|
|
+
|
|
|
<span
|
|
|
v-else-if="scope.row.analysisState == 30"
|
|
|
style="color: #4caf50"
|
|
|
@@ -122,6 +114,43 @@
|
|
|
<span v-else>/</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="loginName"
|
|
|
+ align="center"
|
|
|
+ label="进度"
|
|
|
+ min-width="150"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-progress
|
|
|
+ v-if="scope.row.analysisState == 20"
|
|
|
+ :text-inside="true"
|
|
|
+ :stroke-width="20"
|
|
|
+ :percentage="scope.row.analysisProgress"
|
|
|
+ :class="{
|
|
|
+ 'indeterminate-progress': scope.row.analysisProgress < 100,
|
|
|
+ 'animated-progress': true,
|
|
|
+ }"
|
|
|
+ ></el-progress>
|
|
|
+ <span v-else>/</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="待分析排位"
|
|
|
+ prop="dataTypeName"
|
|
|
+ min-width="200"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span> {{ scope.row.dataTypeName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="数据类型名称"
|
|
|
+ prop="dataTypeName"
|
|
|
+ min-width="200"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column
|
|
|
prop="errState"
|
|
|
align="center"
|
|
|
@@ -265,6 +294,10 @@
|
|
|
<el-button
|
|
|
@click="handleAssetss(scope.row)"
|
|
|
type="text"
|
|
|
+ :disabled="
|
|
|
+ (scope.row.analysisState == 20 && scope.row.errState == 0) ||
|
|
|
+ scope.row.analysisState == 10
|
|
|
+ "
|
|
|
size="small"
|
|
|
>分析</el-button
|
|
|
>
|
|
|
@@ -274,6 +307,12 @@
|
|
|
size="small"
|
|
|
>异常描述</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ @click="insertQueue(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >{{ scope.row.onOffCall === 0 ? "插队" : "取消插队" }}</el-button
|
|
|
+ >
|
|
|
<!-- <el-button
|
|
|
@click="HandleOnOffAuto(scope.row)"
|
|
|
type="text"
|
|
|
@@ -303,7 +342,7 @@
|
|
|
:title="title"
|
|
|
:rowInfo="rowInfo"
|
|
|
@confirm="handleConfirm"
|
|
|
- @getTableList="fetchData"
|
|
|
+ @getTableList="getTableList"
|
|
|
>
|
|
|
<div slot="tableEl">
|
|
|
<el-empty description="暂无数据"></el-empty>
|
|
|
@@ -374,11 +413,10 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="" prop="analysisName">
|
|
|
<b style="color: #f00; font-size: 12px"
|
|
|
- >不填写分析名称自动采用系统生成的名称!</b
|
|
|
+ >不填写分析主题,自动采用系统生成的主题!</b
|
|
|
>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="分析名称" prop="analysisName">
|
|
|
+ <el-form-item label="分析主题" prop="analysisName">
|
|
|
<el-input v-model="addRuleForm.analysisName"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="分析简述" prop="sketch">
|
|
|
@@ -404,6 +442,7 @@ import {
|
|
|
queryCodeNum,
|
|
|
} from "@/api/performance";
|
|
|
import { from } from "plotly.js-dist";
|
|
|
+import { disable } from "ol/rotationconstraint";
|
|
|
export default {
|
|
|
components: {
|
|
|
MyDialog,
|
|
|
@@ -452,7 +491,6 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
window.addEventListener("message", this.handleMessage); //江
|
|
|
- this.getTableList();
|
|
|
},
|
|
|
|
|
|
beforeDestroy() {
|
|
|
@@ -473,7 +511,17 @@ export default {
|
|
|
message: "创建成功",
|
|
|
});
|
|
|
this.addDialogVisible = false;
|
|
|
- this.getTableList();
|
|
|
+ this.loading = false;
|
|
|
+ this.isPolling = false;
|
|
|
+ await this.getTableList();
|
|
|
+ this.$router.push({
|
|
|
+ path: "/home/performance/editAssets",
|
|
|
+ query: {
|
|
|
+ batchCode: this.tableData[0].batchCode,
|
|
|
+ analysisTypeCode: this.tableData[0].analysisTypeCode,
|
|
|
+ fieldEngineCode: this.tableData[0].fieldCode,
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
} catch (err) {
|
|
|
console.error(err);
|
|
|
@@ -537,6 +585,22 @@ export default {
|
|
|
console.error(err);
|
|
|
}
|
|
|
},
|
|
|
+ //插队接口
|
|
|
+ async insertQueue(row) {
|
|
|
+ this.$confirm(
|
|
|
+ `确认${row.onOffCall === 0 ? "开启" : "关闭"}插队?`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ navigateToDetails();
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
//分析
|
|
|
handleAssetss(row) {
|
|
|
this.$router.push({
|
|
|
@@ -600,6 +664,7 @@ export default {
|
|
|
// 修改 getTableList 方法,避免重复请求
|
|
|
async getTableList() {
|
|
|
// 如果正在请求中,跳过此次调用
|
|
|
+ console.log(this.loading, this.isPolling);
|
|
|
if (this.loading || this.isPolling) return;
|
|
|
|
|
|
this.loading = true;
|
|
|
@@ -616,6 +681,7 @@ export default {
|
|
|
|
|
|
const result = await analysisResultList(params);
|
|
|
this.tableData = result.data.list;
|
|
|
+ console.log(this.tableData, "result this.tableData");
|
|
|
this.formInline.totalSize = result.data.totalSize;
|
|
|
} catch (error) {
|
|
|
this.$message({
|
|
|
@@ -629,13 +695,12 @@ export default {
|
|
|
|
|
|
// 改进 handleMessage,避免频繁请求
|
|
|
handleMessage(event) {
|
|
|
+ // console.log(event, "请求分析页面");
|
|
|
// 确保消息来自当前域
|
|
|
if (event.origin !== window.location.origin) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
const { fieldName, analysisState, errState } = event.data;
|
|
|
-
|
|
|
// 更新表单字段
|
|
|
if (fieldName !== undefined) {
|
|
|
this.formInline.fieldName = fieldName;
|
|
|
@@ -651,8 +716,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 如果当前没有请求中,才调用 getTableList
|
|
|
- if (!this.loading) {
|
|
|
+ if (!this.loading && fieldName && analysisState) {
|
|
|
this.getTableList();
|
|
|
+ // this.startPolling();
|
|
|
}
|
|
|
},
|
|
|
rowStyle() {
|
|
|
@@ -708,7 +774,7 @@ export default {
|
|
|
this.fetchData();
|
|
|
}
|
|
|
}
|
|
|
- }, 3000); // 每10秒检查一次
|
|
|
+ }, 10000); // 每10秒检查一次
|
|
|
},
|
|
|
|
|
|
//创建分析
|
|
|
@@ -723,9 +789,10 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.getTableList();
|
|
|
setTimeout(() => {
|
|
|
this.startPolling();
|
|
|
- }, 5000);
|
|
|
+ }, 10000);
|
|
|
},
|
|
|
};
|
|
|
</script>
|