Browse Source

2023-08-11 增加监控视图配置基础模板,增加IOserver对照管理

pull/1/head
zhousq 1 year ago
parent
commit
c44cd00824
  1. 53
      src/api/transerver/kingcodetransform.js
  2. 53
      src/api/transerver/viewConfig.js
  3. 339
      src/views/transerver/kingcodetransform/index.vue
  4. 503
      src/views/transerver/viewConfig/index.vue

53
src/api/transerver/kingcodetransform.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询IOServer变量转换列表
export function listKingcodetransform(query) {
return request({
url: '/dc/dcBusiKingcodetransform/list',
method: 'get',
params: query
})
}
// 查询IOServer变量转换详细
export function getKingcodetransform(id) {
return request({
url: '/dc/dcBusiKingcodetransform/' + id,
method: 'get'
})
}
// 新增IOServer变量转换
export function addKingcodetransform(data) {
return request({
url: '/dc/dcBusiKingcodetransform',
method: 'post',
data: data
})
}
// 修改IOServer变量转换
export function updateKingcodetransform(data) {
return request({
url: '/dc/dcBusiKingcodetransform',
method: 'put',
data: data
})
}
// 删除IOServer变量转换
export function delKingcodetransform(id) {
return request({
url: '/dc/dcBusiKingcodetransform/' + id,
method: 'delete'
})
}
// 导出IOServer变量转换
export function exportKingcodetransform(query) {
return request({
url: '/${baseUrl}/export',
method: 'get',
params: query
})
}

53
src/api/transerver/viewConfig.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询运维监视视图配置列表
export function listViewConfig(query) {
return request({
url: '/dc/dcSysMonitorConfig/list',
method: 'get',
params: query
})
}
// 查询运维监视视图配置详细
export function getViewConfig(id) {
return request({
url: '/dc/dcSysMonitorConfig/' + id,
method: 'get'
})
}
// 新增运维监视视图配置
export function addViewConfig(data) {
return request({
url: '/dc/dcSysMonitorConfig',
method: 'post',
data: data
})
}
// 修改运维监视视图配置
export function updateViewConfig(data) {
return request({
url: '/dc/dcSysMonitorConfig',
method: 'put',
data: data
})
}
// 删除运维监视视图配置
export function delViewConfig(id) {
return request({
url: '/dc/dcSysMonitorConfig/' + id,
method: 'delete'
})
}
// 导出运维监视视图配置
export function exportViewConfig(query) {
return request({
url: '/${baseUrl}/export',
method: 'get',
params: query
})
}

339
src/views/transerver/kingcodetransform/index.vue

@ -0,0 +1,339 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="auto">
<el-form-item label="ISS变量名称" prop="issVarName">
<el-input
v-model="queryParams.issVarName"
placeholder="请输入ISS变量名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="ISS工程名称" prop="issPrjName">
<el-input
v-model="queryParams.issPrjName"
placeholder="请输入ISS工程名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="ISS组名称" prop="issGroupName">
<el-input
v-model="queryParams.issGroupName"
placeholder="请输入ISS组名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="中台设备UUID" prop="centerDeviceuuid">
<el-input
v-model="queryParams.centerDeviceuuid"
placeholder="请输入中台设备UUID"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="中台参数编码" prop="centerParamcode">
<el-input
v-model="queryParams.centerParamcode"
placeholder="请输入中台参数编码"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="ISSRest地址" prop="issResturl">
<el-input
v-model="queryParams.issResturl"
placeholder="请输入ISSRest地址"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="ISSRest端口号" prop="issRestport">
<el-input
v-model="queryParams.issRestport"
placeholder="请输入ISSRest端口号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
icon="Plus"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="Edit"
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="Delete"
@click="handleDelete"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="kingcodetransformList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="ISS工程名称" align="center" prop="issPrjName" />
<el-table-column label="ISSRest地址" align="center" prop="issResturl" />
<el-table-column label="ISSRest端口号" align="center" prop="issRestport" />
<el-table-column label="ISS组名称" align="center" prop="issGroupName" />
<el-table-column label="ISS变量名称" align="center" prop="issVarName" />
<el-table-column label="ISS变量类型" align="center" prop="issVarType" />
<el-table-column label="中台设备UUID" align="center" prop="centerDeviceuuid" />
<el-table-column label="中台参数编码" align="center" prop="centerParamcode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改IOServer变量转换对话框 -->
<el-dialog :title="title" v-model="open" width="800px" append-to-body>
<el-form ref="kingcodetransformRef" :model="form" :rules="rules" label-width="140px">
<el-row>
<el-col :span="24">
<el-form-item label="ISS变量名称" prop="issVarName">
<el-input v-model="form.issVarName" placeholder="请输入ISS变量名称" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="ISS工程名称" width="150" prop="issPrjName">
<el-input v-model="form.issPrjName" placeholder="请输入ISS工程名称" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="ISS组名称" prop="issGroupName">
<el-input v-model="form.issGroupName" placeholder="请输入ISS组名称" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="ISS变量类型" prop="issVarType">
<el-select v-model="form.issVarType" placeholder="请选择ISS变量类型">
<el-option v-for="dict in dc_param_value_type"
:key="dict.value"
:label="dict.label" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="中台设备UUID" prop="centerDeviceuuid">
<el-input v-model="form.centerDeviceuuid" placeholder="请输入中台设备UUID" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="中台参数编码" prop="centerParamcode">
<el-input v-model="form.centerParamcode" placeholder="请输入中台参数编码" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="ISSRest地址" prop="issResturl">
<el-input v-model="form.issResturl" placeholder="请输入ISSRest地址" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="ISSRest端口号" prop="issRestport">
<el-input v-model="form.issRestport" placeholder="请输入ISSRest端口号" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Kingcodetransform">
import { listKingcodetransform, getKingcodetransform, delKingcodetransform, addKingcodetransform, updateKingcodetransform } from "@/api/transerver/kingcodetransform";
const { proxy } = getCurrentInstance();
const { dc_param_value_type } = proxy.useDict("dc_param_value_type");
const kingcodetransformList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
issVarName: null,
issPrjName: null,
issGroupName: null,
centerDeviceuuid: null,
centerParamcode: null,
issResturl: null,
issRestport: null
},
rules: {
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询IOServer变量转换列表 */
function getList() {
loading.value = true;
listKingcodetransform(queryParams.value).then(response => {
kingcodetransformList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
issVarName: null,
issPrjName: null,
issGroupName: null,
issVarType: null,
centerDeviceuuid: null,
centerParamcode: null,
issResturl: null,
id: null,
issRestport: null
};
proxy.resetForm("kingcodetransformRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加IOServer变量转换";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value
getKingcodetransform(_id).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改IOServer变量转换";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["kingcodetransformRef"].validate(valid => {
if (valid) {
if (form.value.id != null) {
updateKingcodetransform(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addKingcodetransform(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除IOServer变量转换编号为"' + _ids + '"的数据项?').then(function() {
return delKingcodetransform(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('transerver/kingcodetransform/export', {
...queryParams.value
}, `kingcodetransform_${new Date().getTime()}.xlsx`)
}
getList();
</script>

503
src/views/transerver/viewConfig/index.vue

@ -0,0 +1,503 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="120px">
<el-form-item label="模型编码" prop="colCode">
<el-select v-model="queryParams.colCode" placeholder="请选择模型编码" clearable>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="显示名称" prop="colName">
<el-input
v-model="queryParams.colName"
placeholder="请输入显示名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="字段类型" prop="colType">
<el-select v-model="queryParams.colType" placeholder="请选择字段类型" clearable>
<el-option
v-for="dict in dc_param_value_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="字段宽度" prop="colWidth">
<el-input
v-model="queryParams.colWidth"
placeholder="请输入字段宽度"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="字段顺序" prop="colSort">
<el-input
v-model="queryParams.colSort"
placeholder="请输入字段顺序"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="显示状态" prop="flagVisible">
<el-select v-model="queryParams.flagVisible" placeholder="请选择是否显示" clearable>
<el-option
v-for="dict in sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="固定位置" prop="flagLocked">
<el-select v-model="queryParams.flagLocked" placeholder="请选择是否固定位置" clearable>
<el-option
v-for="dict in sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否可控" prop="flagControl">
<el-select v-model="queryParams.flagControl" placeholder="请选择是否可控" clearable>
<el-option
v-for="dict in sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="控制类型" prop="controlType">
<el-select v-model="queryParams.controlType" placeholder="请选择控制类型" clearable>
<el-option
v-for="dict in dc_param_control_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="控制标签地址" prop="controlAddress">
<el-input
v-model="queryParams.controlAddress"
placeholder="请输入控制标签地址"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="默认写入值" prop="controlValue">
<el-input
v-model="queryParams.controlValue"
placeholder="请输入默认写入值"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="一级标题" prop="groupTittle">
<el-input
v-model="queryParams.groupTittle"
placeholder="请输入一级标题"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="视图表类别" prop="viewType">
<el-select v-model="queryParams.viewType" placeholder="请选择视图表类别" clearable>
<el-option
v-for="dict in dc_param_value_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
icon="Plus"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="Edit"
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="Delete"
@click="handleDelete"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="viewConfigList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="模型编码" align="center" prop="colCode" />
<el-table-column label="显示名称" align="center" prop="colName" />
<el-table-column label="字段类型" align="center" prop="colType">
<template #default="scope">
<dict-tag :options="dc_param_value_type" :value="scope.row.colType"/>
</template>
</el-table-column>
<el-table-column label="字段宽度" align="center" prop="colWidth" />
<el-table-column label="字段顺序" align="center" prop="colSort" />
<el-table-column label="是否显示" align="center" prop="flagVisible">
<template #default="scope">
<dict-tag :options="sys_yes_no" :value="scope.row.flagVisible"/>
</template>
</el-table-column>
<el-table-column label="固定位置" align="center" prop="flagLocked">
<template #default="scope">
<dict-tag :options="sys_yes_no" :value="scope.row.flagLocked"/>
</template>
</el-table-column>
<el-table-column label="是否可控" align="center" prop="flagControl">
<template #default="scope">
<dict-tag :options="sys_yes_no" :value="scope.row.flagControl"/>
</template>
</el-table-column>
<el-table-column label="控制类型" align="center" prop="controlType" />
<el-table-column label="控制标签地址" align="center" prop="controlAddress" />
<el-table-column label="默认写入值" align="center" prop="controlValue" />
<el-table-column label="一级标题" align="center" prop="groupTittle" />
<el-table-column label="视图表类别" align="center" prop="viewType">
<template #default="scope">
<dict-tag :options="dc_param_value_type" :value="scope.row.viewType"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改运维监视视图配置对话框 -->
<el-dialog :title="title" v-model="open" width="1200px" append-to-body>
<el-form ref="viewConfigRef" :model="form" :rules="rules" label-width="140px">
<el-row>
<el-col :span="12">
<el-form-item label="模型编码" prop="colCode">
<el-select v-model="form.colCode" placeholder="请选择模型编码">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="显示名称" prop="colName">
<el-input v-model="form.colName" placeholder="请输入显示名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="字段类型" prop="colType">
<el-select v-model="form.colType" placeholder="请选择字段类型">
<el-option
v-for="dict in dc_param_value_type"
:key="dict.value"
:label="dict.label"
:value="dict.value" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="字段宽度" prop="colWidth">
<el-input v-model="form.colWidth" placeholder="请输入字段宽度" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="字段顺序" prop="colSort">
<el-input v-model="form.colSort" placeholder="请输入字段顺序" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否显示">
<el-radio-group v-model="form.flagVisible">
<el-radio
v-for="dict in sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="固定位置">
<el-radio-group v-model="form.flagLocked">
<el-radio
v-for="dict in sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否可控">
<el-radio-group v-model="form.flagControl">
<el-radio
v-for="dict in sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="控制类型" prop="controlType">
<el-select v-model="form.controlType" placeholder="请选择控制类型">
<el-option
v-for="dict in dc_param_control_type"
:key="dict.value"
:label="dict.label"
:value="dict.value" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="控制标签地址" prop="controlAddress">
<el-input v-model="form.controlAddress" placeholder="请输入控制标签地址" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="默认写入值" prop="controlValue">
<el-input v-model="form.controlValue" placeholder="请输入默认写入值" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="一级标题" prop="groupTittle">
<el-input v-model="form.groupTittle" placeholder="请输入一级标题" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="一级标题编码" prop="groupCode">
<el-input v-model="form.groupCode" placeholder="请输入一级标题编码" value="0" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="视图表类别" prop="viewType">
<el-select v-model="form.viewType" placeholder="请选择视图表类别">
<el-option
v-for="dict in dc_monitor_view_type"
:key="dict.value"
:label="dict.label"
:value="dict.value" ></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="ViewConfig">
import { listViewConfig, getViewConfig, delViewConfig, addViewConfig, updateViewConfig } from "@/api/transerver/viewConfig";
const { proxy } = getCurrentInstance();
const { sys_yes_no, dc_param_value_type,dc_monitor_view_type,dc_param_control_type} = proxy.useDict('sys_yes_no', 'dc_param_value_type', 'dc_monitor_view_type', 'dc_param_control_type');
const viewConfigList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
colCode: null,
colName: null,
colType: null,
colWidth: null,
colSort: null,
flagVisible: null,
flagLocked: null,
flagControl: null,
controlType: null,
controlAddress: null,
controlValue: null,
groupTittle: null,
groupCode: null,
viewType: null
},
rules: {
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询运维监视视图配置列表 */
function getList() {
loading.value = true;
listViewConfig(queryParams.value).then(response => {
viewConfigList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
id: null,
tentantId: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
colCode: null,
colName: null,
colType: null,
colWidth: null,
colSort: null,
flagVisible: "0",
flagLocked: "0",
flagControl: "0",
controlType: null,
controlAddress: null,
controlValue: null,
groupTittle: null,
groupCode: null,
viewType: null
};
proxy.resetForm("viewConfigRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加运维监视视图配置";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _id = row.id || ids.value
getViewConfig(_id).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改运维监视视图配置";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["viewConfigRef"].validate(valid => {
if (valid) {
if (form.value.id != null) {
updateViewConfig(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addViewConfig(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除运维监视视图配置编号为"' + _ids + '"的数据项?').then(function() {
return delViewConfig(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('transerver/viewConfig/export', {
...queryParams.value
}, `viewConfig_${new Date().getTime()}.xlsx`)
}
getList();
</script>
Loading…
Cancel
Save