测试用例修改

This commit is contained in:
sjl
2025-07-24 09:31:47 +08:00
parent 2200494765
commit 40564ee283
16 changed files with 47 additions and 18 deletions

View File

@@ -145,8 +145,8 @@ export default class TableStore {
// console.log(this.table.params)
// console.log(this.initData)
Object.assign(this.table.params, this.initData)
this.index()
this.table.resetCallback && this.table.resetCallback()
this.index()
}
],
[

View File

@@ -4,7 +4,7 @@
<el-scrollbar>
<el-form :inline="false" :model="form" class="form-two" label-width="auto" :rules="rules" ref="formRef">
<el-form-item label="事件名称" prop="name">
<el-input v-model="form.name" placeholder="请输入事件名称" />
<el-input v-model="form.name" placeholder="请输入事件名称" maxlength="32" type="textarea" show-word-limit :autosize="{ minRows: 2, maxRows: 4 }"/>
</el-form-item>
<!-- <el-form-item label="发生事件" prop="type">
<el-input
@@ -16,20 +16,20 @@
</el-form-item> -->
<el-form-item label="发生地点" prop="location">
<el-input v-model="form.location" placeholder="请输入发生地点" :autosize="{ minRows: 2, maxRows: 4 }"
type="textarea" />
type="textarea" maxlength="32" show-word-limit/>
</el-form-item>
<el-form-item label="事件经过" prop="process">
<el-input v-model="form.process" placeholder="请输入事件经过" :autosize="{ minRows: 2, maxRows: 4 }"
type="textarea" />
type="textarea" maxlength="32" show-word-limit/>
</el-form-item>
<el-form-item label="处理措施" prop="measures">
<el-input v-model="form.measures" placeholder="请输入处理措施" :autosize="{ minRows: 2, maxRows: 4 }"
type="textarea" />
type="textarea" maxlength="32" show-word-limit/>
</el-form-item>
<el-form-item label="治理效果" prop="effect">
<el-input v-model="form.effect" placeholder="请输入治理效果" :autosize="{ minRows: 2, maxRows: 4 }"
type="textarea" />
type="textarea" maxlength="32" show-word-limit/>
</el-form-item>
<el-form-item label="附件">
<el-upload v-model:file-list="fileList" action="" :auto-upload="false" multiple>

View File

@@ -4,7 +4,7 @@
<TableHeader ref="TableHeaderRef">
<template #select>
<el-form-item label="名称">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" />
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
</el-form-item>
@@ -144,7 +144,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
annexRef.value.open(row.url)
annexRef.value.open(row)
}
},
{

View File

@@ -13,7 +13,7 @@
checkStrictly :props="cascaderProps" @change="change" />
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="名称" />
<el-input v-model="form.name" placeholder="名称" maxlength="32" show-word-limit/>
</el-form-item>
<el-form-item label="标准" v-if="title == '新增' && form.pid?.length > 0">

View File

@@ -3,7 +3,7 @@
<el-scrollbar>
<el-form :inline="false" :model="form" label-width="auto" :rules="rules" ref="formRef">
<el-form-item label="模版名称" prop="name">
<el-input v-model="form.name" placeholder="请输入模版名称" />
<el-input v-model="form.name" placeholder="请输入模版名称" maxlength="32" show-word-limit/>
</el-form-item>
<el-form-item label="模版">

View File

@@ -5,7 +5,7 @@
<template #select>
<el-form-item label="名称">
<el-input v-model="tableStore.table.params.searchValue" clearable
placeholder="请输入搜索名称" />
placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
</el-form-item>

View File

@@ -225,7 +225,7 @@ const tableStore = new TableStore({
width: 350,
formatter: function (row) {
console.log('🚀 ~ row:', row)
return 123 //row.cellValue ? row.cellValue : '/'
return row.cellValue ? row.cellValue : '/'
}
},
{
@@ -328,6 +328,14 @@ const tableStore = new TableStore({
setTimeout(() => {
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
}, 0)
},
resetCallback:() =>{
// 重置表单数据到默认值
formData.value.statisticalType = classificationData[0]
formData.value.deptIndex = treeData.value[0]?.id
formData.value.scale = voltageleveloption
formData.value.manufacturer = terminaloption
formData.value.loadType = interfereoption
}
})

View File

@@ -147,6 +147,7 @@ const treeData = ref([])
const idArr = ref([])
const activeName = ref(0)
const getTreeData = async () => {
console.log('getTreeData')
await getAreaDept().then(res => {
var data = res.data
data.forEach(element => {
@@ -293,10 +294,19 @@ const tableStore = new TableStore({
// treeData = tree2List(tableStore.table.data)
// tableStore.table.data = JSON.parse(JSON.stringify(treeData))
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
console.log('tableStore.table.params---2', tableStore.table.params)
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
setTimeout(() => {
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
}, 0)
},
resetCallback: () => {
// 重置表单数据到默认值
formData.value.statisticalType = classificationData[0]
formData.value.deptIndex = treeData.value[0]?.id
formData.value.scale = voltageleveloption
formData.value.manufacturer = terminaloption
formData.value.loadType = interfereoption
}
})

View File

@@ -137,7 +137,7 @@
</div>
<el-form :inline="true" class="form">
<el-form-item label="异常持续天数"></el-form-item>
<el-form-item label="异常阀值(天)">
<el-form-item label="告警阀值(天)">
<el-input-number
v-model="tableStore.table.params.alarmDayLimit"
:min="0"

View File

@@ -5269,6 +5269,7 @@ export default {
,
,
,
,
,
}

View File

@@ -529,6 +529,7 @@ const DeviceQ = () => {
// 定位
const flyTo = (e: any, zoom?: number) => {
console.log('🚀 ~ flyTo ~ e:', e)
let regex = new RegExp(e.psrName, 'i')
center.value.lng = e.coordinate[0]
center.value.lat = e.coordinate[1]

View File

@@ -13,7 +13,7 @@
<div class="boxDiv hexagon hexagon2">
<div style="color: #fff">{{ props.params.checkNum }}</div>
<!-- <div class="hexagon"></div> -->
<div class="mt10 divBot">调试</div>
<div class="mt10 divBot">检修</div>
</div>
<div class="boxDiv hexagon hexagon3">
<div style="color: #fff">{{ props.params.stopRunNum }}</div>

View File

@@ -317,6 +317,11 @@ const toggle = () => {
leftVisible.value = !leftVisible.value
rightVisible.value = !rightVisible.value
centerVisible.value = !centerVisible.value
if(leftVisible.value)//显示时刷新数据
{
tableStore.index()
}
}
// 区域变化

View File

@@ -13,7 +13,7 @@
</el-select>
</el-form-item>
<el-form-item label='信息查询'>
<el-input style="width:200px;" placeholder="电站名称,终端编号,型号" v-model='tableStore.table.params.searchValue' clearable></el-input>
<el-input style="width:200px;" placeholder="电站名称,终端名称,型号" v-model='tableStore.table.params.searchValue' clearable></el-input>
</el-form-item>
</template>
@@ -60,7 +60,7 @@ const tableStore = new TableStore({
minWidth: 150
},
{ field: 'bdName', title: '所属变电站', minWidth: 120 },
{ field: 'devName', title: '终端编号', minWidth: 110 },
{ field: 'devName', title: '终端名称', minWidth: 110 },
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
{
field: 'manufacturer',

View File

@@ -67,7 +67,11 @@ const tableStore = new TableStore({
{ field: 'scale', title: '监测点电压等级', minWidth: 120 },
{ field: 'loadType', title: '干扰源类型', minWidth: 120 },
{ field: 'objName', title: '监测对象名称', minWidth: 180 },
{ field: 'objName', title: '监测对象名称', minWidth: 180 ,
formatter: (row: any) => {
return row.objName ? row.objName : '/'
}
},
{
field: 'shortCapacity',
title: '最小短路容量(MVA)',