|
@@ -1,11 +1,3 @@
|
|
|
-<!--
|
|
|
- * @Author: your name
|
|
|
- * @Date: 2025-03-27 10:01:43
|
|
|
- * @LastEditTime: 2025-03-27 10:30:09
|
|
|
- * @LastEditors: bogon
|
|
|
- * @Description: In User Settings Edit
|
|
|
- * @FilePath: /performance-test/src/views/performance/autoAssetss.vue
|
|
|
--->
|
|
|
<template>
|
|
|
<div class="global-variable">
|
|
|
<div class="condition">
|
|
@@ -14,15 +6,7 @@
|
|
|
ref="ruleForm"
|
|
|
:model="formInline"
|
|
|
class="demo-form-inline"
|
|
|
- :rules="rules"
|
|
|
>
|
|
|
- <el-form-item label="分析主题:" prop="analysisName">
|
|
|
- <el-input
|
|
|
- size="small"
|
|
|
- v-model="formInline.analysisName"
|
|
|
- placeholder="请输入分析主题"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="风场名称:" prop="fieldName">
|
|
|
<el-input
|
|
|
size="small"
|
|
@@ -30,10 +14,10 @@
|
|
|
placeholder="请输入风场名称"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="分析状态:" prop="analysisState">
|
|
|
+ <el-form-item label="分析状态:" prop="startupState">
|
|
|
<el-select
|
|
|
size="small"
|
|
|
- v-model="formInline.analysisState"
|
|
|
+ v-model="formInline.startupState"
|
|
|
placeholder="请选择分析状态"
|
|
|
>
|
|
|
<el-option
|
|
@@ -50,10 +34,14 @@
|
|
|
>查询</el-button
|
|
|
>
|
|
|
<el-button @click="reset('ruleForm')" size="small">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item class="right-align">
|
|
|
- <el-button @click="examine" size="small">查看导入数据</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="
|
|
|
+ addDialogVisible = true;
|
|
|
+ title = '创建';
|
|
|
+ "
|
|
|
+ size="small"
|
|
|
+ >创建自动分析配置</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -66,202 +54,46 @@
|
|
|
>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- label="分析主题"
|
|
|
- prop="analysisName"
|
|
|
- min-width="200"
|
|
|
- fixed
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tooltip
|
|
|
- class="item"
|
|
|
- effect="dark"
|
|
|
- :content="scope.row.sketch || '暂无分析简述'"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <span>{{ scope.row.analysisName }}</span>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
prop="fieldName"
|
|
|
label="风场名称"
|
|
|
min-width="200"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
<el-table-column
|
|
|
- prop="loginName"
|
|
|
align="center"
|
|
|
- label="分析状态"
|
|
|
- min-width="150"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.analysisState == -1">未关联</span>
|
|
|
- <span
|
|
|
- v-else-if="
|
|
|
- scope.row.analysisState == 20 && scope.row.errState == 0
|
|
|
- "
|
|
|
- style="color: #f90"
|
|
|
- >分析中</span
|
|
|
- >
|
|
|
- <span
|
|
|
- v-else-if="
|
|
|
- scope.row.errState == 1 && scope.row.analysisState == 30
|
|
|
- "
|
|
|
- style="color: #f00"
|
|
|
- >分析异常</span
|
|
|
- >
|
|
|
-
|
|
|
- <span
|
|
|
- v-else-if="scope.row.analysisState == 30"
|
|
|
- style="color: #4caf50"
|
|
|
- >分析完成</span
|
|
|
- >
|
|
|
- <span
|
|
|
- v-else-if="scope.row.analysisState == 10"
|
|
|
- style="color: #4caf50"
|
|
|
- >排队中</span
|
|
|
- >
|
|
|
- <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="orderNum"
|
|
|
+ label="启停状态"
|
|
|
+ prop="startupState"
|
|
|
min-width="200"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span> {{ scope.row.orderNum }}</span>
|
|
|
+ <span> {{ scope.row.startupState == "1" ? "启动" : "关停" }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- label="数据类型名称"
|
|
|
- prop="dataTypeName"
|
|
|
+ label="间隔天数"
|
|
|
+ prop="intervalDays"
|
|
|
min-width="200"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="roleName"
|
|
|
+ prop="startTime"
|
|
|
align="center"
|
|
|
- label="异常信息"
|
|
|
- min-width="120"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- v-if="scope.row.errState == 1"
|
|
|
- @click="abnormalDialog(scope.row, '异常详情')"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- >异常详情</el-button
|
|
|
- >
|
|
|
- <span v-else>/</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="roleName"
|
|
|
- align="center"
|
|
|
- label="分析记录"
|
|
|
- min-width="120"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <!-- 分析完成 -->
|
|
|
- <el-button
|
|
|
- v-if="scope.row.analysisState == 30 && scope.row.errState !== 1"
|
|
|
- @click="handleAssetssDetail(scope.row, '1')"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- >分析详情</el-button
|
|
|
- >
|
|
|
- <!-- 分析中 -->
|
|
|
- <el-button
|
|
|
- v-else-if="
|
|
|
- scope.row.analysisState == 20 && scope.row.errState == 0
|
|
|
- "
|
|
|
- @click="handleAssetssDetail(scope.row, '0')"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- >分析详情</el-button
|
|
|
- >
|
|
|
-
|
|
|
- <span v-else>/</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="reportVos"
|
|
|
- align="center"
|
|
|
- label="报告"
|
|
|
- min-width="120"
|
|
|
+ label="起始日期"
|
|
|
+ min-width="230"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-dropdown v-if="scope.row.reportVos.length > 0" trigger="click">
|
|
|
- <el-button type="text" size="small" class="el-dropdown-link">
|
|
|
- 查看报告
|
|
|
- </el-button>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item
|
|
|
- v-for="val in scope.row.reportVos"
|
|
|
- class="reportItemVal"
|
|
|
- >
|
|
|
- <div class="reportLeft">
|
|
|
- <span>{{ val.reportName }}</span>
|
|
|
- </div>
|
|
|
- <div class="reportRight">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="detailReportAssetss(val)"
|
|
|
- >
|
|
|
- 查看
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="downLoadeAssetss(val)"
|
|
|
- >
|
|
|
- 下载
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
- <span v-else>/</span>
|
|
|
- </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="dataStartTime"
|
|
|
+ prop="createTime"
|
|
|
align="center"
|
|
|
- label="开始时间"
|
|
|
+ label="创建时间"
|
|
|
min-width="230"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="dataEndTime"
|
|
|
+ prop="updateTime"
|
|
|
align="center"
|
|
|
- label="结束时间"
|
|
|
+ label="更新时间"
|
|
|
min-width="230"
|
|
|
>
|
|
|
</el-table-column>
|
|
@@ -274,40 +106,21 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- @click="abnormalDialog(scope.row, '上传报告')"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- >上传报告</el-button
|
|
|
- >
|
|
|
- <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
|
|
|
- >
|
|
|
- <el-button
|
|
|
- @click="abnormalDialog(scope.row, '机组异常记录')"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- >机组异常记录</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- v-if="scope.row.analysisState == 10"
|
|
|
+ v-if="scope.row.startupState == 0"
|
|
|
@click="insertQueue(scope.row, 1)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- >插队</el-button
|
|
|
+ >启动</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- v-if="scope.row.analysisState == 10"
|
|
|
+ v-if="scope.row.startupState == 1"
|
|
|
@click="insertQueue(scope.row, 0)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- >取消插队</el-button
|
|
|
+ >关停</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="editDialog(scope.row)" type="text" size="small"
|
|
|
+ >修改</el-button
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -323,18 +136,71 @@
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ :title="title + '自动分析'"
|
|
|
+ :visible.sync="addDialogVisible"
|
|
|
+ width="30%"
|
|
|
+ class="dialogForm"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :label-position="labelPosition"
|
|
|
+ label-width="80px"
|
|
|
+ ref="formLabelAlign"
|
|
|
+ :rules="rules"
|
|
|
+ :model="formLabelAlign"
|
|
|
+ >
|
|
|
+ <el-form-item label="分析风场" prop="fieldCode">
|
|
|
+ <el-select
|
|
|
+ size="small"
|
|
|
+ v-model="formLabelAlign.fieldCode"
|
|
|
+ @change="handleTimeChange"
|
|
|
+ placeholder="请选择分析风场"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ :label="item.fieldName"
|
|
|
+ v-for="item in fieldCodeList"
|
|
|
+ :value="item.codeNumber"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="间隔天数" prop="intervalDays">
|
|
|
+ <el-input-number
|
|
|
+ size="small"
|
|
|
+ v-model="formLabelAlign.intervalDays"
|
|
|
+ min="1"
|
|
|
+ controls-position="right"
|
|
|
+ ></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="起始日期" prop="startTime">
|
|
|
+ <el-date-picker
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ size="small"
|
|
|
+ v-model="formLabelAlign.startTime"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择日期"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="addDialogSubmit">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import axios from "axios";
|
|
|
import MyDialog from "./components/dialogCom.vue";
|
|
|
-import { downloadPDF } from "@/utils/common";
|
|
|
import {
|
|
|
- onOffAutoAnalysis,
|
|
|
- analysisResultList,
|
|
|
- addAnalysisResult,
|
|
|
+ autoAnalysisConfigList,
|
|
|
+ onOff,
|
|
|
queryCodeNum,
|
|
|
- editPriority,
|
|
|
+ configSave,
|
|
|
+ configEdit,
|
|
|
} from "@/api/performance";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -342,124 +208,168 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ title: "",
|
|
|
+ editId: "",
|
|
|
+ fieldCodeList: [],
|
|
|
addDialogVisible: false,
|
|
|
loading: false, //数据加载中
|
|
|
errorInfo: "",
|
|
|
options: [
|
|
|
{
|
|
|
- value: "-1",
|
|
|
- label: "未关联",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "10",
|
|
|
- label: "排队中",
|
|
|
+ value: "0",
|
|
|
+ label: "关停",
|
|
|
},
|
|
|
{
|
|
|
- value: "20",
|
|
|
- label: "分析中",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "30",
|
|
|
- label: "已分析",
|
|
|
+ value: "1",
|
|
|
+ label: "启动",
|
|
|
},
|
|
|
],
|
|
|
-
|
|
|
- rules: {
|
|
|
- fieldName: { trigger: "blur" },
|
|
|
- },
|
|
|
formInline: {
|
|
|
fieldName: undefined,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
totalSize: 0,
|
|
|
- analysisName: undefined,
|
|
|
- analysisState: undefined,
|
|
|
+ startupState: undefined,
|
|
|
+ },
|
|
|
+ labelPosition: "right",
|
|
|
+ formLabelAlign: {
|
|
|
+ fieldCode: "",
|
|
|
+ intervalDays: null,
|
|
|
+ startTime: null,
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ intervalDays: [
|
|
|
+ { required: true, message: "请输入间隔天数", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ fieldCode: [
|
|
|
+ { required: true, message: "请选择分析风场", trigger: "change" },
|
|
|
+ ],
|
|
|
+ startTime: [
|
|
|
+ {
|
|
|
+ type: "string", // Vue 可能传递字符串,所以用 string
|
|
|
+ required: true,
|
|
|
+ message: "请选择自动分析起始日期",
|
|
|
+ trigger: "change",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
tableData: [],
|
|
|
rowInfo: {},
|
|
|
title: "",
|
|
|
+ restrictTime: null,
|
|
|
+ disableAllDates: false, // 是否禁用所有日期
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ pickerOptions() {
|
|
|
+ return {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ if (this.disableAllDates) {
|
|
|
+ return true; // 禁用所有日期
|
|
|
+ }
|
|
|
+ if (!this.restrictTime) {
|
|
|
+ return false; // 还没获取数据时,不限制
|
|
|
+ }
|
|
|
+ const restrictTimestamp = new Date(this.restrictTime).setHours(
|
|
|
+ 0,
|
|
|
+ 0,
|
|
|
+ 0,
|
|
|
+ 0
|
|
|
+ );
|
|
|
+ const currentTimestamp = time.setHours(0, 0, 0, 0);
|
|
|
+ return currentTimestamp < restrictTimestamp; // 允许选择 restrictTime 当天
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
|
|
|
methods: {
|
|
|
+ editDialog(row) {
|
|
|
+ this.title = "编辑";
|
|
|
+ this.formLabelAlign = { ...row };
|
|
|
+ this.addDialogVisible = true;
|
|
|
+ },
|
|
|
+ async addDialogSubmit() {
|
|
|
+ this.$refs.formLabelAlign.validate(async (valid) => {
|
|
|
+ if (!valid) return;
|
|
|
+ try {
|
|
|
+ const apiMethod = this.title === "编辑" ? configEdit : configSave;
|
|
|
+ const res = await apiMethod(this.formLabelAlign);
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ await this.getTableList();
|
|
|
+ this.resetFormLabelAlign();
|
|
|
+ this.addDialogVisible = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {}
|
|
|
+ });
|
|
|
+ },
|
|
|
//获取风场列表
|
|
|
-
|
|
|
+ async getQueryCodeNumList() {
|
|
|
+ this.loading = true;
|
|
|
+ try {
|
|
|
+ const result = await queryCodeNum();
|
|
|
+ this.fieldCodeList = result.data.fieldCodeList;
|
|
|
+ this.loading = false;
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error);
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
//插队接口
|
|
|
async insertQueue(row, index) {
|
|
|
- this.$confirm(`确认插队?`, "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
+ this.$confirm(
|
|
|
+ `确认${row.startupState == "0" ? "启动" : "关停"}?`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
.then(async () => {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append("batchCode", row.batchCode);
|
|
|
- formData.append("priority", index);
|
|
|
- const result = await editPriority(formData);
|
|
|
- console.log(result, "插队结果");
|
|
|
+ const formData = {
|
|
|
+ configUniqueId: row.configUniqueId,
|
|
|
+ fieldCode: row.fieldCode,
|
|
|
+ startupState: index,
|
|
|
+ };
|
|
|
+ const result = await onOff(formData);
|
|
|
if (result.code === 200) {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "插队成功",
|
|
|
+ message: "成功",
|
|
|
});
|
|
|
- await this.fetchData();
|
|
|
+ await this.getTableList();
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
- //分析
|
|
|
- handleAssetss(row) {
|
|
|
- this.$router.push({
|
|
|
- path: "/home/performance/editAssets",
|
|
|
- query: {
|
|
|
- batchCode: row.batchCode,
|
|
|
- analysisTypeCode: row.analysisTypeCode,
|
|
|
- fieldEngineCode: row.fieldCode,
|
|
|
- fieldName: row.fieldName,
|
|
|
- analysisName: row.analysisName,
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- //分析详情
|
|
|
- handleAssetssDetail(row, state) {
|
|
|
- const navigateToDetails = () => {
|
|
|
- this.$router.push({
|
|
|
- path: "/home/performance/overview",
|
|
|
- query: {
|
|
|
- batchCode: row.batchCode,
|
|
|
- // analysisTypeCode: row.analysisTypeCode,
|
|
|
- fieldCode: row.fieldCode,
|
|
|
- },
|
|
|
- });
|
|
|
- };
|
|
|
- if (state === "0") {
|
|
|
- // 分析状态为分析中
|
|
|
- this.$confirm(
|
|
|
- "当前查看的分析记录为历史分析结果,最新分析记录还未分析完成不展示!"
|
|
|
- )
|
|
|
- .then(() => {
|
|
|
- navigateToDetails();
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- } else {
|
|
|
- navigateToDetails();
|
|
|
- }
|
|
|
- },
|
|
|
- abnormalDialog(row, title) {
|
|
|
- if (title === "异常详情") {
|
|
|
- this.errorInfo = row.errInfo;
|
|
|
- this.rowInfo = {};
|
|
|
- } else if (title === "机组异常记录") {
|
|
|
- this.errorInfo = "";
|
|
|
- this.rowInfo = { ...row };
|
|
|
- } else if (title === "上传报告") {
|
|
|
- this.errorInfo = "";
|
|
|
- this.rowInfo = {};
|
|
|
- this.rowInfo.batchCode = row.batchCode;
|
|
|
- }
|
|
|
- this.title = title;
|
|
|
- },
|
|
|
+ //时间范围
|
|
|
+ async handleTimeChange() {
|
|
|
+ try {
|
|
|
+ const params = {
|
|
|
+ windFarmCode: this.formLabelAlign.fieldCode,
|
|
|
+ };
|
|
|
+ const res = await axios.get(
|
|
|
+ "/ETLapi/windFarmDayCount/pltAutoAnalysisTime",
|
|
|
+ { params }
|
|
|
+ );
|
|
|
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.restrictTime = res.data?.datas?.startTime
|
|
|
+ ? new Date(res.data.datas.startTime)
|
|
|
+ : null;
|
|
|
+ this.disableAllDates = false;
|
|
|
+ } else if (res.data.code === 500) {
|
|
|
+ this.disableAllDates = true;
|
|
|
+ this.$message.warning("数据错误,无法选择日期");
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.data.message);
|
|
|
+ }
|
|
|
+ } catch (error) {}
|
|
|
+ },
|
|
|
// 页码变化时才触发查询
|
|
|
handleCurrentChange(val) {
|
|
|
this.formInline.pageNum = val;
|
|
@@ -473,19 +383,12 @@ export default {
|
|
|
this.loading = true;
|
|
|
try {
|
|
|
const params = { ...this.formInline, totalSize: undefined };
|
|
|
+ const result = await autoAnalysisConfigList(params);
|
|
|
|
|
|
- // 传递条件参数
|
|
|
- if (this.formInline.analysisState !== undefined) {
|
|
|
- params.analysisState = this.formInline.analysisState;
|
|
|
- }
|
|
|
- if (this.formInline.errState !== undefined) {
|
|
|
- params.errState = this.formInline.errState;
|
|
|
- }
|
|
|
+ // 确保 list 不是 undefined
|
|
|
+ this.tableData = result.data?.list || [];
|
|
|
|
|
|
- const result = await analysisResultList(params);
|
|
|
- this.tableData = result.data.list;
|
|
|
- console.log(this.tableData, "result this.tableData");
|
|
|
- this.formInline.totalSize = result.data.totalSize;
|
|
|
+ this.formInline.totalSize = result.data?.totalSize || 0; // 确保 totalSize 不是 undefined
|
|
|
} catch (error) {
|
|
|
this.$message({
|
|
|
type: "error",
|
|
@@ -498,42 +401,39 @@ export default {
|
|
|
rowStyle() {
|
|
|
return "text-align:center";
|
|
|
},
|
|
|
+ cancel() {
|
|
|
+ this.resetFormLabelAlign();
|
|
|
+ this.addDialogVisible = false;
|
|
|
+ },
|
|
|
// 查询
|
|
|
onSubmit() {
|
|
|
- this.fetchData();
|
|
|
+ this.getTableList();
|
|
|
},
|
|
|
// 重置
|
|
|
reset(formName) {
|
|
|
this.$refs[formName].resetFields();
|
|
|
this.formInline.fieldName = "";
|
|
|
- this.formInline.analysisName = "";
|
|
|
- this.formInline.analysisState = "";
|
|
|
- this.formInline.errState = "";
|
|
|
- this.fetchData();
|
|
|
+ this.formInline.startupState = null;
|
|
|
+ this.getTableList();
|
|
|
},
|
|
|
- // fetchData 方法在轮询中调用
|
|
|
- async fetchData() {
|
|
|
- try {
|
|
|
- const result = await analysisResultList({
|
|
|
- ...this.formInline,
|
|
|
- totalSize: undefined,
|
|
|
- });
|
|
|
- this.tableData = result.data.list;
|
|
|
- this.formInline.totalSize = result.data.totalSize;
|
|
|
- } catch (error) {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: "请检查是否连接网络",
|
|
|
- });
|
|
|
- }
|
|
|
+ resetFormLabelAlign() {
|
|
|
+ this.formLabelAlign = {
|
|
|
+ fieldCode: "",
|
|
|
+ intervalDays: "",
|
|
|
+ startTime: "",
|
|
|
+ };
|
|
|
},
|
|
|
- examine() {
|
|
|
- const targetUrl = this.$router.resolve({ name: "transition" }).href;
|
|
|
- window.open(targetUrl, "_blank");
|
|
|
+ handleClose(done) {
|
|
|
+ this.$confirm("确认关闭?")
|
|
|
+ .then((_) => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ .catch((_) => {});
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getTableList();
|
|
|
+ this.getQueryCodeNumList();
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -547,108 +447,13 @@ export default {
|
|
|
background-position: 1.25em 1.25em;
|
|
|
}
|
|
|
}
|
|
|
-.general {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
-
|
|
|
- .condition {
|
|
|
- width: 50%;
|
|
|
- display: flex;
|
|
|
-
|
|
|
- p {
|
|
|
- width: 100px;
|
|
|
- text-align: right;
|
|
|
- line-height: 40px;
|
|
|
- }
|
|
|
-
|
|
|
- span {
|
|
|
- line-height: 40px;
|
|
|
-
|
|
|
- padding-left: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .el-select {
|
|
|
- width: 100%;
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .el-input {
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.attachment {
|
|
|
- display: flex;
|
|
|
- padding-top: 10px;
|
|
|
-
|
|
|
- p {
|
|
|
- margin-right: 20px;
|
|
|
- color: #409eff;
|
|
|
- }
|
|
|
-}
|
|
|
-.add-ruleForm {
|
|
|
- .el-select {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
-}
|
|
|
-.addition {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- margin-bottom: 10px;
|
|
|
-}
|
|
|
-.demo-ruleForm {
|
|
|
- .el-form-item {
|
|
|
- margin-bottom: 25px;
|
|
|
- }
|
|
|
-}
|
|
|
-::v-deep .animated-progress .el-progress-bar__outer {
|
|
|
- height: 15px; /* Adjust height as needed */
|
|
|
- background-color: rgb(235, 238, 245);
|
|
|
- background-image: linear-gradient(
|
|
|
- 45deg,
|
|
|
- rgba(0, 0, 0, 0.1) 25%,
|
|
|
- transparent 25%,
|
|
|
- transparent 50%,
|
|
|
- rgba(0, 0, 0, 0.1) 50%,
|
|
|
- rgba(0, 0, 0, 0.1) 75%,
|
|
|
- transparent 75%,
|
|
|
- transparent
|
|
|
- );
|
|
|
- background-size: 1.25em 1.25em;
|
|
|
- animation: striped-flow 3s linear infinite;
|
|
|
+.dialogForm .el-input-number--small {
|
|
|
+ width: 220px;
|
|
|
}
|
|
|
-.reportItemVal {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- .reportLeft {
|
|
|
- margin-right: 50px;
|
|
|
- }
|
|
|
+.dialogForm .el-select--small {
|
|
|
+ width: 220px;
|
|
|
}
|
|
|
-::v-deep .pdfDialog .el-dialog {
|
|
|
- height: 100vh;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- margin: 0 auto !important;
|
|
|
- .el-dialog__body {
|
|
|
- // height: 100% !important;
|
|
|
- flex: 1;
|
|
|
- background: #fff;
|
|
|
- .pdf-container {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- height: 100% !important;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-canvas {
|
|
|
- border: 1px solid #dcdfe6;
|
|
|
-}
|
|
|
-
|
|
|
-.right-align {
|
|
|
- white-space: nowrap;
|
|
|
+.dialogForm .el-form-item {
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
</style>
|