From 3f2c4938f8a4fc50d899caf87ecb50703261b767 Mon Sep 17 00:00:00 2001
From: jiask <1069621233@qq.com>
Date: Fri, 31 Oct 2025 09:09:24 +0800
Subject: [PATCH] jsk
---
src/api/protection/index.js | 39 ++-
.../protection/protectionCheck/index.vue | 302 ++++++++++++------
.../protection/protectionManage/index.vue | 4 +-
3 files changed, 251 insertions(+), 94 deletions(-)
diff --git a/src/api/protection/index.js b/src/api/protection/index.js
index 2ec9a3b..79d4cf2 100644
--- a/src/api/protection/index.js
+++ b/src/api/protection/index.js
@@ -34,7 +34,7 @@ export function updateSubstationApi(data) {
},
data: data
})
- }editProdectionApi
+ }
// 变电站管理-删除信息
export function deleteSubstationApi(data) {
@@ -60,8 +60,8 @@ export function getProtectionOrderListPageApi(data) {
})
}
-// 保护定值单管理-新增/修改信息
-export function editProdectionApi(data) {
+ // 保护定值单管理-新增/修改信息
+ export function editProdectionApi(data) {
return request({
url: '/protection/protection_manage/protectionOrder/edit',
method: 'post',
@@ -95,6 +95,39 @@ export function editProdectionApi(data) {
})
}
+ export function getProtectionCheckOrderListPageApi(data) {
+ return request({
+ url: '/protection/protection_manage/protectionCheckOrder/list',
+ method: 'get',
+ headers: {
+ //"merchant-id":"378915229716713472",
+ },
+ params:data
+ })
+ }
+
+ export function getProdectionCheckByIdApi(data) {
+ return request({
+ url: '/protection/protection_manage/protectionCheckOrder/detail',
+ method: 'get',
+ headers: {
+ //"merchant-id":"378915229716713472",
+ },
+ params:data
+ })
+ }
+
+ // 保护定值单管理-屏幕识别
+ export function prodectionCheckApi(data) {
+ return request({
+ url: '/protection/protection_manage/protectionAnalysis/check',
+ method: 'post',
+ headers: {
+ //"merchant-id":"378915229716713472",
+ },
+ data: data
+ })
+ }
export function getProtectionAnalysisListPageApi(data) {
return request({
diff --git a/src/views/protection/protectionCheck/index.vue b/src/views/protection/protectionCheck/index.vue
index 60ed7c8..8828b7a 100644
--- a/src/views/protection/protectionCheck/index.vue
+++ b/src/views/protection/protectionCheck/index.vue
@@ -1,10 +1,10 @@
-
+
新增
- 删除
+ >删除 -->
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ 识别结果查看
解析结果查看
+ >重新识别
+
@@ -69,39 +81,111 @@
/>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
仅允许导入png、jpg、jpeg图片格式文件。
+
单个文件大小不超过10M
+
+
+
-
+
+
+
+
+ | {{ headList[0].attributeValue }} |
+
+
+ | {{headList[1].attributeKey}}: {{ headList[1].attributeValue }} |
+ {{headList[2].attributeKey}}: {{ headList[2].attributeValue }} |
+ {{headList[3].attributeKey}}: {{ headList[3].attributeValue }} |
+
+
+ | {{headList[4].attributeKey}} |
+ {{headList[5].attributeKey}} |
+ {{headList[6].attributeKey}} |
+ {{headList[7].attributeKey}} |
+ {{headList[8].attributeKey}} |
+
+
+ | {{headList[4].attributeValue}} |
+ {{headList[5].attributeValue}} |
+ {{headList[6].attributeValue}} |
+ {{headList[7].attributeValue}} |
+ {{headList[8].attributeValue}} |
+
+
+
+
+ | 识别未匹配保护定值 |
+
+
+ | {{subText}} |
+
+
+
+
+ | 保护定值 |
+
+
+ | {{(subIndex==item.split('@').length-1&&item.split('@').length>4&&index!=0) ? (subText==0?'不一致':'一致') : subText}}
+ |
+
+
+
+
+ | 识别未匹配控制字 |
+
+
+ | {{subText}} |
+
+
+
+
+ | 控制字 |
+
+
+ | {{(subIndex==item.split('@').length-1&&item.split('@').length>4&&index!=0) ? (subText==0?'不一致':'一致') : subText}}
+ |
+
+
+
+
@@ -114,7 +198,7 @@
updateDept,
listDeptExcludeChild,
} from '@/api/system/dept'
- import { getProtectionAnalysisListPageApi,editProdectionApi } from "@/api/protection/index";
+ import { getProtectionCheckOrderListPageApi,deleteProtectionApi,getProdectionByIdApi,prodectionCheckApi,getProdectionCheckByIdApi } from "@/api/protection/index";
import base64 from 'base-64';
import { getToken } from '@/utils/auth'
import { imgUpLoadTwo } from '@/api/system/upload'
@@ -141,32 +225,34 @@
title: "",
// 是否显示弹出层
open: false,
+ openView:false,
+ titleView: "",
checked: false,
userNameFlage:false,
- substationIds:[],
+ protectionIds:[],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord:null,
},
- activeName:"baseSetting",
- deviceData:{},
// 表单参数
baseForm: {
protectionId:""
},
- // 表单校验
- baseFormRules: {
- substationName: [
- { required: true, message: "变电站名称不能为空", trigger: "blur" }
- ]
- },
fileList: [],//图片
checkUrlList: [],//图片
checkUrlNameList: [],//图片
dialogVisible:false,//图片弹窗
dialogImageUrl:"",//图片弹窗
+ //解析结果弹窗
+ headList:[],
+ bhdzList:[],
+ kzzList:[],
+ sbcsList:[],
+ kzzNoCheckList:[],
+ bhdzNoCheckList:[],
+
};
},
mounted(){
@@ -200,7 +286,7 @@
console.log("param",param)
// let str = base64.encode(JSON.stringify(param))
// console.log({"content":str})
- getProtectionAnalysisListPageApi(param).then(response => {
+ getProtectionCheckOrderListPageApi(param).then(response => {
this.tableListData = response.rows;
this.total = Number(response.total);
this.loading = false;
@@ -214,61 +300,88 @@
// 表单重置
reset() {
this.baseForm = {
- substationName:"",
- runTime:""
+ protectionId:"",
};
- this.resetForm("baseForm");
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
- this.title = "新增";
- console.log("this.baseForm",this.baseForm);
+ this.fileList=[]
+ this.checkUrlList=[]
+ this.checkUrlNameList=[]
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.open = true;
this.baseForm = Object.assign({}, row)
- this.fileList=[{url:this.baseForm.imgUrl}]
- // this.$set(this,"metadata",row.deviceMetadata)
- this.title = "修改";
+ this.fileList=[]
+ this.checkUrlList=[]
+ this.checkUrlNameList=[]
+ // this.fileList=[{url:this.baseForm.imgUrl}]
+ // this.checkUrlList=[this.baseForm.imgUrl]
+ // this.checkUrlNameList=[this.baseForm.imgName]
},
- handleTabClick(tab, event) {
- console.log(tab, event);
+ //识别结果
+ handleView(row) {
+ this.reset();
+ this.openView = true;
+ const obj = Object.assign({}, row)
+ this.titleView = "查看";
+ getProdectionCheckByIdApi({protectionId:obj.protectionId,analysisId:obj.analysisId}).then(response => {
+ console.log("getProdectionByIdApi",response);
+ this.headList = response.head||[];
+ this.bhdzList = response.bhdz||[];
+ this.kzzList = response.kzz||[];
+ this.sbcsList = response.sbcs||[];
+ this.bhdzNoCheckList = response.nobhdz||[];
+ this.kzzNoCheckList = response.nokzz||[];
+ });
},
- /** 提交按钮 */
+ /** 提交识别按钮 */
submitForm: function() {
console.log("this.fileList",this.fileList);
console.log("this.checkUrlList",this.checkUrlList);
console.log("this.checkUrlNameList",this.checkUrlNameList);
console.log("this.baseForm",this.baseForm);
- editProdectionApi({checkUrlList:this.checkUrlList,checkUrlNameList:this.checkUrlNameList,protectionId:this.baseForm.protectionId,type:'0'}).then(response => {
+ let params = {
+ checkUrlList:this.checkUrlList,
+ checkUrlNameList:this.checkUrlNameList,
+ protectionId:this.baseForm.protectionId,
+ analysisId:this.baseForm.analysisId,
+ }
+ prodectionCheckApi(params).then(response => {
console.log("editProdectionApi",response);
- this.getList();
- this.open = false;
- this.$modal.msgSuccess("操作成功");
- return;
+ if(response.code==200){
+ this.getList();
+ this.open = false;
+ this.$modal.msgSuccess("操作成功");
+ return;
+ }else{
+ this.$modal.msgError(response.msg);
+ }
+
});
},
/** 删除按钮操作 */
handleDelete(row) {
- var substationIdRow="";
- if(row!=undefined &&row.substationId!=null&&row.substationId!=undefined){
- substationIdRow=row.substationId.split(" ");
+ var protectionIdRow="";
+ if(row!=undefined &&row.protectionId!=null&&row.protectionId!=undefined){
+ protectionIdRow=row.protectionId.split(" ");
}
- const substationIds = substationIdRow || this.substationIds;
- console.log("substationIds",substationIds);
+ const protectionIds = protectionIdRow || this.protectionIds;
+ console.log("protectionIds",protectionIds);
this.$modal.confirm('是否确认删除数据项?').then(() => {
- deleteSubstationApi({substationIds:substationIds}).then(response => {
- console.log("deleteSubstationApi",response);
+ deleteProtectionApi({protectionIds:protectionIds}).then(response => {
+ console.log("deleteProtectionApi",response);
this.getList();
this.$modal.msgSuccess("删除成功");
return;
});
}).catch(() => {});
},
+ //日期
formatDate(date) {
// 格式化为 YYYY-MM-DD
const year = date.getFullYear();
@@ -276,10 +389,9 @@
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
-
// 多选框选中数据
handleSelectionChange(selection) {
- this.substationIds = selection.map(item => item.substationId)
+ this.protectionIds = selection.map(item => item.protectionId)
},
// 图片上传
imgUpLoad(param, name, index) {
@@ -289,19 +401,19 @@
if (res.code == 200) {
this.checkUrlList.push(res.data.url)
this.checkUrlNameList.push(res.data.name)
- this.$set(this.baseForm,"imageUrl",res.data.url)
+ // this.$set(this.baseForm,"imageUrl",res.data.url)
} else {
this.fileList=[]
this.checkUrlList=[]
this.checkUrlNameList=[]
- this.$set(this.baseForm,"imgUrl",'')
+ // this.$set(this.baseForm,"imgUrl",'')
this.$modal.msgError(res.msg)
}
this.btnLoading=false;
}).catch((error) => {
- this.fileList=[]
- this.checkUrlList=[]
- this.checkUrlNameList=[]
+ // this.fileList=[]
+ // this.checkUrlList=[]
+ // this.checkUrlNameList=[]
this.btnLoading=false;
this.$modal.msgError(error)
})
@@ -311,9 +423,9 @@
},
// 上传之前
handleBeforeUpload(file) {
- const isLt = file.size / 1024 / 1024 < 5
+ const isLt = file.size / 1024 / 1024 < 20
if (!isLt) {
- this.$modal.msgError(`图片大小不能超过 5 MB`)
+ this.$modal.msgError(`图片大小不能超过 20 MB`)
return false
}
},
@@ -332,8 +444,7 @@
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
- },
-
+ }
}
};
@@ -352,4 +463,17 @@
width: 100%;
font-size: 14px !important;
}
+ table {
+ border-collapse: collapse; /* 合并表格边框 */
+ border: 1px solid black; /* 设置边框颜色和宽度 */
+ }
+ table tr td{
+ text-align: center; vertical-align: middle;
+ border-collapse: collapse; /* 合并表格边框 */
+ border: 1px solid black; /* 设置边框颜色和宽度 */
+ padding: 4px;
+ }
+
+
+
diff --git a/src/views/protection/protectionManage/index.vue b/src/views/protection/protectionManage/index.vue
index 255b37c..62a3895 100644
--- a/src/views/protection/protectionManage/index.vue
+++ b/src/views/protection/protectionManage/index.vue
@@ -158,9 +158,9 @@
| 设备参数 |
-
+