Browse Source

参数页面bug修复

pull/1/head
ljlong_2630 1 year ago
parent
commit
8dbf99f8ba
  1. 9
      src/api/model/paramclass.js
  2. 25
      src/views/model/alert/deviceparamalert.vue
  3. 9
      src/views/model/params/index.vue

9
src/api/model/paramclass.js

@ -50,4 +50,13 @@ export function exportParamclass(query) {
method: 'get',
params: query
})
}
// 查询参数模型信息列表
export function listParamclassNoPage(query) {
return request({
url: '/model/dcModelParamclass/listNoPage',
method: 'get',
params: query
})
}

25
src/views/model/alert/deviceparamalert.vue

@ -89,7 +89,7 @@
<el-table-column label="中台设备ID" align="center" prop="deviceUuid" :fixed="fixedColumns?'left':false">
<template #header>
<div class="fixed-column-header" style="text-align: center;display: block;" @dblclick="toggleFixedColumns">
<span style="text-align: center;display: block;">操作<img style="width:10px;margin-left:5px" v-show="fixedColumns" :src="lock" alt="Image"/></span>
<span style="text-align: center;display: block;">中台设备ID<img style="width:10px;margin-left:5px" v-show="fixedColumns" :src="lock" alt="Image"/></span>
</div>
</template>
</el-table-column>
@ -121,7 +121,7 @@
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
@click="handleDeleteByRow(scope.row)"
>删除</el-button>
</template>
</el-table-column>
@ -649,6 +649,27 @@ function handleDelete() {
}).catch(() => {});
}
function handleDeleteByRow(row) {
let rows = [];
let names = "";
let _ids = [];
rows.push(row);
rows.forEach(item=>{
_ids.push(item.id);
if(names == ""){
names = item.deviceName + item.paramName;
}else{
names = names + "," + item.deviceName + item.paramName;
}
})
proxy.$modal.confirm('是否确认删除设备参数名称为"' + names + '"的数据项?').then(function() {
return delAlert(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 删除按钮操作 */
function handleDeleteRow(row) {
const _ids = row.id || ids.value;

9
src/views/model/params/index.vue

@ -375,7 +375,7 @@
</style>
<script setup name="Params">
import { listParams, getParams, delParams, addParams, updateParams,listWithFilterColumn } from "@/api/model/params";
import { listParamclass } from "@/api/model/paramclass";
import { listParamclassNoPage } from "@/api/model/paramclass";
import lock from "@/assets/icons/svg/lock.svg";
const { proxy } = getCurrentInstance();
const router = useRouter();
@ -658,12 +658,15 @@ function handleExport() {
}
function getParamModel() {
listParamclass({}).then(response => {
paramClassList.value = response.rows;
listParamclassNoPage({}).then(response => {
paramClassList.value = response.data;
});
}
function getParamModelName(id){
if(paramClassList.value.length == 0){
return;
}
paramClassList.value.forEach(item=>{
if(item.id == id){
return item.getParamModelName;

Loading…
Cancel
Save