|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author: your name
|
|
|
* @Date: 2024-05-29 09:14:23
|
|
|
- * @LastEditTime: 2024-07-09 15:38:39
|
|
|
+ * @LastEditTime: 2024-07-16 14:53:55
|
|
|
* @LastEditors: bogon
|
|
|
* @Description: In User Settings Edit
|
|
|
* @FilePath: /performance-test/src/views/performance/components/EditAnalysis.vue
|
|
@@ -19,12 +19,13 @@
|
|
|
placeholder="请选择分析类型"
|
|
|
size="small"
|
|
|
clearable
|
|
|
+ @change="handleAnalysisType"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in analysisTypeList"
|
|
|
- :key="item.typeCode"
|
|
|
- :label="item.typeName"
|
|
|
- :value="item.typeCode"
|
|
|
+ :key="item.analysisTypeCode"
|
|
|
+ :label="item.analysisTypeName"
|
|
|
+ :value="item.analysisTypeCode"
|
|
|
></el-option>
|
|
|
</el-select> </el-form-item
|
|
|
></el-col>
|
|
@@ -55,7 +56,11 @@
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</el-form>
|
|
|
- <el-card shadow="always" class="box-card">
|
|
|
+ <el-empty
|
|
|
+ v-if="noData"
|
|
|
+ description="暂无分析任何数据,无法进行手动分析描述"
|
|
|
+ ></el-empty>
|
|
|
+ <el-card v-if="!noData" shadow="always" class="box-card">
|
|
|
<el-row>
|
|
|
<el-col :span="12"
|
|
|
><div class="left">
|
|
@@ -141,7 +146,7 @@
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
<el-empty :image-size="200" v-if="flage"></el-empty>
|
|
|
- <div class="abalysisType" v-else>
|
|
|
+ <div class="abalysisType" v-else-if="!flage && !noData">
|
|
|
<el-tabs
|
|
|
v-model="editableTabsValue"
|
|
|
type="card"
|
|
@@ -207,6 +212,8 @@ import {
|
|
|
delAnalysisCommentType,
|
|
|
addAnalysisCommentType,
|
|
|
analysisCommentEdit,
|
|
|
+ queryAnalysisedType, //查询分析类型
|
|
|
+ queryAnalysisedEngine, //查询机组
|
|
|
} from "@/api/performance";
|
|
|
import { getWindEngineGroup } from "@/api/ledger";
|
|
|
import TinymceEditor from "@/components/Tinymce.vue";
|
|
@@ -216,6 +223,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ noData: false,
|
|
|
htmlLoading: true,
|
|
|
loading: false,
|
|
|
engineCode: null, //台账机组编号
|
|
@@ -259,6 +267,25 @@ export default {
|
|
|
iframeLoad() {
|
|
|
this.htmlLoading = false;
|
|
|
},
|
|
|
+ async handleAnalysisType(e) {
|
|
|
+ const resEngineList = await queryAnalysisedEngine({
|
|
|
+ batchCode: this.$route.query.batchCode,
|
|
|
+ analysisTypeCode: e,
|
|
|
+ });
|
|
|
+ this.windEngineGroupList = resEngineList.data;
|
|
|
+ this.form.turbines =
|
|
|
+ resEngineList.data !== null && resEngineList.data.length > 0
|
|
|
+ ? resEngineList.data[0].engineCode
|
|
|
+ : null;
|
|
|
+ this.engineCode =
|
|
|
+ resEngineList.data !== null && resEngineList.data.length > 0
|
|
|
+ ? resEngineList.data[0].engineCode
|
|
|
+ : null;
|
|
|
+ if (resEngineList.data.length > 0) {
|
|
|
+ //获取台账机组编号
|
|
|
+ this.getWindEngList();
|
|
|
+ }
|
|
|
+ },
|
|
|
async handleComment() {
|
|
|
this.loading = true;
|
|
|
try {
|
|
@@ -291,6 +318,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleEngineCode(e) {
|
|
|
+ console.log(e, "e");
|
|
|
this.engineCode = e;
|
|
|
this.getWindEngList();
|
|
|
},
|
|
@@ -327,6 +355,7 @@ export default {
|
|
|
response.data[0].commentDescriptionVos,
|
|
|
response.data[0].commentTypeRelations
|
|
|
);
|
|
|
+ console.log(this.editableTabs, "this.editableTabs");
|
|
|
this.editableTabsValue =
|
|
|
this.editableTabs.length > 0
|
|
|
? this.editableTabs[0].commentTypeCode
|
|
@@ -368,30 +397,39 @@ export default {
|
|
|
})
|
|
|
.catch((_) => {});
|
|
|
},
|
|
|
+ //修改赋值
|
|
|
async getWindCodeList() {
|
|
|
this.loading = true;
|
|
|
try {
|
|
|
- const response = await analysisEditQuery({
|
|
|
+ const resAnalysisedType = await queryAnalysisedType({
|
|
|
batchCode: this.$route.query.batchCode,
|
|
|
});
|
|
|
- this.analysisTypeList = response.data.analysisTypeList;
|
|
|
- this.windEngineGroupList = response.data.windEngineGroupList;
|
|
|
- this.form.configAnalysis = response.data.analysisTypeList[0].typeCode;
|
|
|
- this.form.turbines =
|
|
|
- response.data.windEngineGroupList !== null &&
|
|
|
- response.data.windEngineGroupList.length > 0
|
|
|
- ? response.data.windEngineGroupList[0].engineCode
|
|
|
- : null;
|
|
|
- this.engineCode =
|
|
|
- response.data.windEngineGroupList !== null &&
|
|
|
- response.data.windEngineGroupList.length > 0
|
|
|
- ? response.data.windEngineGroupList[0].engineCode
|
|
|
- : null;
|
|
|
- this.getDetailInfo();
|
|
|
- if (response.data.windEngineGroupList.length > 0) {
|
|
|
- //获取台账机组编号
|
|
|
- this.getWindEngList();
|
|
|
+ if (resAnalysisedType.data && resAnalysisedType.data.length > 0) {
|
|
|
+ this.noData = false;
|
|
|
+ const resEngineList = await queryAnalysisedEngine({
|
|
|
+ batchCode: this.$route.query.batchCode,
|
|
|
+ analysisTypeCode: resAnalysisedType.data[0].analysisTypeCode,
|
|
|
+ });
|
|
|
+ this.analysisTypeList = resAnalysisedType.data;
|
|
|
+ this.windEngineGroupList = resEngineList.data;
|
|
|
+ this.form.configAnalysis = resAnalysisedType.data[0].analysisTypeCode;
|
|
|
+ this.form.turbines =
|
|
|
+ resEngineList.data !== null && resEngineList.data.length > 0
|
|
|
+ ? resEngineList.data[0].engineCode
|
|
|
+ : null;
|
|
|
+ this.engineCode =
|
|
|
+ resEngineList.data !== null && resEngineList.data.length > 0
|
|
|
+ ? resEngineList.data[0].engineCode
|
|
|
+ : null;
|
|
|
+ this.getDetailInfo();
|
|
|
+ if (resEngineList.data.length > 0) {
|
|
|
+ //获取台账机组编号
|
|
|
+ this.getWindEngList();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.noData = true;
|
|
|
}
|
|
|
+
|
|
|
this.loading = false;
|
|
|
} catch (error) {
|
|
|
console.error(error);
|