9000系统测试用例调整
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TableHeader datePicker showExport :showReset="false">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
@@ -31,10 +31,12 @@ const dialogVisible = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/frontLog/queryLogCHild',
|
||||
method: 'POST',
|
||||
filename: '前置交互日志详情',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<TableHeader datePicker showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
></Table>
|
||||
</div>
|
||||
<div class="pd10" style="width: 400px" v-loading="loading">
|
||||
<el-input v-model="filterText" placeholder="请输入内容" clearable show-word-limit @input="change">
|
||||
<el-input v-model="filterText" placeholder="请输入内容" clearable maxlength="32" show-word-limit @input="change">
|
||||
<template #prefix>
|
||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||
</template>
|
||||
@@ -240,6 +240,7 @@ const tableRef = ref()
|
||||
const processNo = ref('')
|
||||
const ruleFormRef = ref()
|
||||
const dataSource: any = ref([])
|
||||
const deviceInfoList: any = ref([])
|
||||
const defaultProps = {
|
||||
children: 'deviceInfoList',
|
||||
label: 'name'
|
||||
@@ -373,6 +374,11 @@ const tableStore = new TableStore({
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
if (hasDevices.value) {
|
||||
ElMessage.warning('此前置机绑定了设备,无法删除!');
|
||||
return;
|
||||
}
|
||||
|
||||
delNode(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
@@ -395,12 +401,14 @@ const tableStore = new TableStore({
|
||||
}
|
||||
})
|
||||
const nodeId = ref('')
|
||||
// 点击行
|
||||
const hasDevices = ref(false)
|
||||
/// 点击行
|
||||
const currentChangeEvent = () => {
|
||||
// 确保 tableRef 和当前记录存在
|
||||
if (!tableRef.value || !tableRef.value.getRef().getCurrentRecord()) {
|
||||
loading.value = false
|
||||
dataSource.value = []
|
||||
hasDevices.value = false
|
||||
return
|
||||
}
|
||||
|
||||
@@ -413,15 +421,27 @@ const currentChangeEvent = () => {
|
||||
nodeId.value = tableRef.value.getRef().getCurrentRecord().id
|
||||
// 检查返回的数据是否存在且不为空
|
||||
if (res.data && res.data.processDeviceList) {
|
||||
dataSource.value = res.data.processDeviceList.filter(item => (item.name = item.processNo + ''))
|
||||
// 检查是否有设备绑定
|
||||
const hasAnyDevices = res.data.processDeviceList.some(item =>
|
||||
item.deviceInfoList && item.deviceInfoList.length > 0
|
||||
);
|
||||
hasDevices.value = hasAnyDevices;
|
||||
|
||||
dataSource.value = res.data.processDeviceList.filter(item => {
|
||||
item.name = item.processNo + '';
|
||||
return true; // 保持原有的过滤逻辑
|
||||
});
|
||||
} else {
|
||||
dataSource.value = []
|
||||
hasDevices.value = false;
|
||||
}
|
||||
loading.value = false
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
// 添加错误处理,确保 loading 状态也能关闭
|
||||
dataSource.value = []
|
||||
hasDevices.value = false;
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="程序版本">
|
||||
<!-- <el-form-item label="程序版本">
|
||||
<el-select v-model="tableStore.table.params.program" clearable placeholder="请选择程序版本">
|
||||
<el-option
|
||||
v-for="item in programoption"
|
||||
@@ -41,19 +41,21 @@
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.filterName"
|
||||
@keyup="searchEvent"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
placeholder="输入关键字筛选"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<!-- <template #operation>
|
||||
<el-button icon="el-icon-Download" @click="add">导出</el-button>
|
||||
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
|
||||
</template>
|
||||
</template> -->
|
||||
</TableHeader>
|
||||
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
||||
<vxe-table
|
||||
@@ -104,7 +106,7 @@
|
||||
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
|
||||
<vxe-column title="操作" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">升级</el-button>
|
||||
<!-- <el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">升级</el-button> -->
|
||||
<el-button
|
||||
v-if="row.level == 4"
|
||||
:disabled="row.state == 1 ? true : false"
|
||||
@@ -251,6 +253,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
})
|
||||
tableStore.table.params.teriminal = ''
|
||||
tableStore.table.params.teriminalstatus = ''
|
||||
tableStore.table.params.state = ''
|
||||
tableStore.table.params.program = ''
|
||||
tableStore.table.params.searchEvent = ''
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
v-model="tableStore.table.params.filterName"
|
||||
@keyup="searchEvent"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
placeholder="输入关键字筛选"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -75,6 +77,7 @@
|
||||
:checkbox-config="{ labelField: 'name' }"
|
||||
>
|
||||
<vxe-column
|
||||
v-if="treeData && treeData.length > 0"
|
||||
field="name"
|
||||
align="left"
|
||||
type="checkbox"
|
||||
@@ -82,6 +85,15 @@
|
||||
min-width="200"
|
||||
tree-node
|
||||
></vxe-column>
|
||||
<!-- 没有数据时显示普通列 -->
|
||||
<vxe-column
|
||||
v-else
|
||||
field="name"
|
||||
align="left"
|
||||
title="电网拓扑"
|
||||
min-width="200"
|
||||
tree-node
|
||||
></vxe-column>
|
||||
<vxe-column field="devType" title="终端型号">
|
||||
<template #default="{ row }">
|
||||
{{ teriminaloption.find((item: any) => item.id === row.devType)?.name }}
|
||||
|
||||
@@ -2397,35 +2397,45 @@ const onsubmit = () => {
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
const submitData = () => {
|
||||
const submitData = async () => {
|
||||
const project = JSON.parse(JSON.stringify(AddProjectBO.value))
|
||||
|
||||
// project: JSON.stringify(project)
|
||||
addTerminal(project).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
reaseStatus()
|
||||
initAddProjectBo()
|
||||
initAddProjectBoId()
|
||||
treedata()
|
||||
await mainForm.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
addTerminal(project).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
reaseStatus()
|
||||
initAddProjectBo()
|
||||
initAddProjectBoId()
|
||||
treedata()
|
||||
})
|
||||
}
|
||||
})
|
||||
// project: JSON.stringify(project)
|
||||
|
||||
}
|
||||
/**
|
||||
* 修改数据
|
||||
*/
|
||||
const updateDate = () => {
|
||||
const updateDate = async () => {
|
||||
// console.log("updateProject:", this.updateProject);
|
||||
let data = updateProject.value
|
||||
updateTerminal(data).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
pageStatus.value = 1
|
||||
treedata()
|
||||
await mainForm.value.validate((valid: any) => {
|
||||
if (valid){
|
||||
let data = updateProject.value
|
||||
updateTerminal(data).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
pageStatus.value = 1
|
||||
treedata()
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
const updateProjectF = () => {
|
||||
updateProject.value = {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleFormRef" label-width="100px">
|
||||
<el-form-item label="变压器名:" prop="tfName">
|
||||
<el-input v-model="ruleForm.tfName" placeholder="请输入" clearable></el-input>
|
||||
<el-input v-model="ruleForm.tfName" placeholder="请输入" clearable maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接线方式:" prop="wiring" class="top">
|
||||
<el-select style="width: 100%" v-model="ruleForm.wiring" clearable placeholder="请选择接线方式">
|
||||
@@ -113,7 +113,7 @@
|
||||
<el-col :span="8">
|
||||
<div style="border-right: 1px solid; height: 100%" class="xiaoshou">
|
||||
<div style="overflow-y: auto; height: 100%; overflow-x: auto;max-height: 350px;" class="tree mr10 xiaoshou">
|
||||
<el-input placeholder="输入关键字检索" v-model="filterText1" clearable></el-input>
|
||||
<el-input placeholder="输入关键字检索" v-model="filterText1" clearable maxlength="32" show-word-limit></el-input>
|
||||
<el-tree
|
||||
style="cursor: pointer;display: inline-block;"
|
||||
:data="treeMenuLeftData"
|
||||
@@ -163,7 +163,7 @@
|
||||
<el-col :span="8">
|
||||
<div style="border-left: 1px solid; height: 100%" class="xiaoshou">
|
||||
<div style="overflow-y: auto; height: 100%;overflow-x: auto;max-height: 350px;" class="ml10 tree xiaoshou">
|
||||
<el-input placeholder="输入关键字检索" v-model="filterText2" clearable></el-input>
|
||||
<el-input placeholder="输入关键字检索" v-model="filterText2" clearable maxlength="32" show-word-limit></el-input>
|
||||
<el-tree
|
||||
style="cursor: pointer"
|
||||
:data="treeMenuRightData"
|
||||
@@ -372,6 +372,7 @@ const tableStore = new TableStore({
|
||||
click: row => {
|
||||
delTransformer([row.tfIndex]).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
menuTree.value.loadData()
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
@@ -413,6 +414,7 @@ const transformerAdd = () => {
|
||||
message: '请选择变电站'
|
||||
})
|
||||
} else {
|
||||
ruleForm.subIndex = parentId.value
|
||||
transformerTitle.value = '新增变压器信息'
|
||||
transformerInformation.value = true
|
||||
nextTick(() => {
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
<div class="box">
|
||||
<el-form :model="form" label-width="100px" ref="ruleFormRef">
|
||||
<el-form-item label="名称:">
|
||||
<el-input v-model="form.tpName" placeholder="请输入"></el-input>
|
||||
<el-input v-model="form.tpName" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述:" class="mt20">
|
||||
<el-input v-model="form.tfDescribe" placeholder="请输入"></el-input>
|
||||
<el-input v-model="form.tfDescribe" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="mt20 ml20">
|
||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
v-model.trim="form.projectName"
|
||||
autocomplete="off"
|
||||
placeholder="请输入项目名称"
|
||||
maxlength="64"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -112,7 +112,7 @@
|
||||
v-model.trim="form.substation"
|
||||
autocomplete="off"
|
||||
placeholder="请输入厂站名称"
|
||||
maxlength="64"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -364,6 +364,8 @@
|
||||
v-model.trim="form.evaluationChekDept"
|
||||
autocomplete="off"
|
||||
placeholder="请输入预测评估评审单位"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="预测评估结论:" style="width: 100%">
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
{{ proviteData.agreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="装机容量(MW)">
|
||||
{{ proviteData?.ratePower }}
|
||||
{{ detailData?.ratePower }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="PCC供电设备容量(MVA)"
|
||||
@@ -332,6 +332,7 @@ const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
|
||||
try {
|
||||
if (props.update) {
|
||||
await getUserReportUpdateById(props.id || queryId).then(res => {
|
||||
@@ -341,6 +342,7 @@ const getInfo = async () => {
|
||||
} else {
|
||||
await getUserReportById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
|
||||
getProviteData()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user