Browse Source

设备里机构数左移做筛选,视图配置界面和监控界面优化

develop
ljlong_2630 1 year ago
parent
commit
7b3ba63fc9
  1. 606
      src/views/model/device/index.vue
  2. 9
      src/views/transerver/kingcodetransform/index.vue
  3. 54
      src/views/transerver/viewConfig/index.vue

606
src/views/model/device/index.vue

@ -1,283 +1,327 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px" class="my-custom-form">
<el-row>
<el-col :span="4">
<el-form-item label="中台设备编码" prop="centerDeviceCode">
<el-row>
<el-col :span="4" class="card-box">
<div class="head-container">
<el-input
v-model="queryParams.centerDeviceCode"
placeholder="请输入中台设备编码"
v-model="deptName"
placeholder="请输入部门名称"
clearable
@keyup.enter="handleQuery"
prefix-icon="Search"
style="margin-bottom: 20px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="设备名称" prop="deviceName">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="通讯来源类型" prop="deviceSourceId">
<el-select v-model="queryParams.deviceSourceId" placeholder="请选择通讯来源类型" clearable>
<el-option
v-for="dict in dc_device_source"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@change="deviceSourceChange"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="所属组织名称" prop="orgName">
<el-tree-select v-model="queryParams.orgName" :data="deptOptions"
:props="{ value: 'label', label: 'label', children: 'children' }" value-key="id" placeholder="请选择组织名称"
check-strictly :default-expand-all="true" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="是否可用" prop="enabledFlag">
<el-select v-model="queryParams.enabledFlag" placeholder="请选择是否可用" clearable>
<el-option
v-for="dict in enabledFlag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" clearable>
<el-option
v-for="dict in dc_device_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="位置编码" prop="locationCode">
<el-input
v-model="queryParams.locationCode"
placeholder="请输入位置编码"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="位置名称" prop="locationName">
<el-input
v-model="queryParams.locationName"
placeholder="请输入位置名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="设备应用范围" prop="deviceClass">
<el-input
v-model="queryParams.deviceClass"
placeholder="请输入设备应用范围"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="服务器地址" prop="serverIp">
<el-input
v-model="queryParams.serverIp"
placeholder="请输入服务器地址"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="从属网关ID" prop="gatewayId">
<el-input
v-model="queryParams.gatewayId"
placeholder="请输入从属网关ID"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="纬度" prop="latValue">
<el-input
v-model="queryParams.latValue"
placeholder="请输入纬度"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="经度" prop="lagValue">
<el-input
v-model="queryParams.lagValue"
placeholder="请输入经度"
clearable
@keyup.enter="handleQuery"
</div>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="{ label: 'label', children: 'children' }"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="deptTreeRef"
node-key="id"
highlight-current
default-expand-all
@node-click="handleNodeClick"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="是否告警" prop="alertEnabled">
<el-select v-model="queryParams.alertEnabled" placeholder="请选择设备类型" clearable>
<el-option
v-for="dict in alertEnabled"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="设备模型" prop="deviceModelId">
<el-select v-model="queryParams.deviceModelId" placeholder="请选择设备模型id" clearable>
<el-option label="请选择设备模型" value="deviceModelId" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="设备分组" prop="deviceGroupName">
<el-select v-model="queryParams.deviceGroupName" placeholder="请选择设备分组ID" clearable>
<el-option label="请添加设备分组" value="" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="2">
</el-col>
<el-col :span="6">
<el-form-item class="childTextAlignRight">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button>
<el-button @click="toggleCollapse">{{editName}}</el-button>
</el-form-item>
</el-col>
</el-row>
</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>
</div>
<!-- <el-form-item label="所属组织名称" prop="orgName">
<el-tree-select v-model="queryParams.orgName" :data="deptOptions"
:props="{ value: 'label', label: 'label', children: 'children' }" value-key="id" placeholder="请选择组织名称"
check-strictly :default-expand-all="true" clearable/>
</el-form-item> -->
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="Download"
@click="handleExport"
>导出</el-button>
<el-col :span="20" class="card-box">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px" class="my-custom-form">
<el-row>
<el-col :span="4">
<el-form-item label="中台设备编码" prop="centerDeviceCode">
<el-input
v-model="queryParams.centerDeviceCode"
placeholder="请输入中台设备编码"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="设备名称" prop="deviceName">
<el-input
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="通讯来源类型" prop="deviceSourceId">
<el-select v-model="queryParams.deviceSourceId" placeholder="请选择通讯来源类型" clearable>
<el-option
v-for="dict in dc_device_source"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@change="deviceSourceChange"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="是否可用" prop="enabledFlag">
<el-select v-model="queryParams.enabledFlag" placeholder="请选择是否可用" clearable>
<el-option
v-for="dict in enabledFlag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" clearable>
<el-option
v-for="dict in dc_device_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="位置编码" prop="locationCode">
<el-input
v-model="queryParams.locationCode"
placeholder="请输入位置编码"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="位置名称" prop="locationName">
<el-input
v-model="queryParams.locationName"
placeholder="请输入位置名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="设备应用范围" prop="deviceClass">
<el-input
v-model="queryParams.deviceClass"
placeholder="请输入设备应用范围"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="服务器地址" prop="serverIp">
<el-input
v-model="queryParams.serverIp"
placeholder="请输入服务器地址"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="从属网关ID" prop="gatewayId">
<el-input
v-model="queryParams.gatewayId"
placeholder="请输入从属网关ID"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="纬度" prop="latValue">
<el-input
v-model="queryParams.latValue"
placeholder="请输入纬度"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="经度" prop="lagValue">
<el-input
v-model="queryParams.lagValue"
placeholder="请输入经度"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="是否告警" prop="alertEnabled">
<el-select v-model="queryParams.alertEnabled" placeholder="请选择设备类型" clearable>
<el-option
v-for="dict in alertEnabled"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="设备模型" prop="deviceModelId">
<el-select v-model="queryParams.deviceModelId" placeholder="请选择设备模型id" clearable>
<el-option label="请选择设备模型" value="deviceModelId" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="设备分组" prop="deviceGroupName">
<el-select v-model="queryParams.deviceGroupName" placeholder="请选择设备分组" clearable>
<el-option label="请添加设备分组" value="" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="组态图片名称" prop="imgConfiguration">
<el-select v-model="queryParams.imgConfiguration" placeholder="请选择组态图片名称" clearable>
<el-option
v-for="dict in dc_img_configuration"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="2">
</el-col>
<el-col :span="6">
<el-form-item class="childTextAlignRight">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button>
<el-button @click="toggleCollapse">{{editName}}</el-button>
</el-form-item>
</el-col>
</el-row>
</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 ref="deviceTable" v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange" @sort-change="sortChange" @filter-change="filterChange" :max-height="tableHeight" :border="true" :column-width-draggable="true">
<el-table-column type="selection" width="55" align="center" fixed="left"/>
<el-table-column label="中台设备编码" align="center" prop="centerDeviceCode" :width="150" sortable/>
<el-table-column label="设备名称" align="center" prop="deviceName" :width="150" sortable/>
<el-table-column label="通讯来源类型" align="center" prop="deviceSource" :width="150" column-key="deviceSource" filter-placement="bottom-end"
:filters="getfilterNameItem('deviceSource')" :filter-method="filterMethod" sortable/>
<el-table-column label="是否可用" align="center" prop="enabledFlag" :width="120" column-key="enabledFlag" filter-placement="bottom-end"
:filters="getfilterNameItem('enabledFlag')" :filter-method="filterMethod" sortable>
<template #default="scope">
<dict-tag :options="enabledFlagTable" :value="scope.row.enabledFlag"/>
</template>
</el-table-column>
<el-table-column label="设备类型" align="center" prop="deviceType" :width="120" column-key="deviceType" filter-placement="bottom-end"
:filters="getfilterNameItem('deviceType')" :filter-method="filterMethod" sortable>
<template #default="scope">
<dict-tag :options="dc_device_type" :value="scope.row.deviceType"/>
</template>
</el-table-column>
<el-table-column label="所属组织名称" align="center" prop="orgName" :width="150" sortable/>
<el-table-column label="位置编码" align="center" prop="locationCode" :width="120" sortable/>
<el-table-column label="位置名称" align="center" prop="locationName" :width="120" sortable/>
<el-table-column label="设备应用范围" align="center" prop="deviceClass" :width="150" sortable/>
<el-table-column label="接口名称" align="center" prop="apiName" :width="120" sortable/>
<el-table-column label="服务器地址" align="center" prop="serverIp" :width="120" sortable/>
<el-table-column label="从属网关ID" align="center" prop="gatewayId" :width="120" sortable/>
<el-table-column label="纬度" align="center" prop="latValue" :width="120" sortable/>
<el-table-column label="经度" align="center" prop="lagValue" :width="120" sortable/>
<el-table-column label="是否告警" align="center" prop="alertEnabled" :width="120" column-key="alertEnabled" filter-placement="bottom-end"
:filters="getfilterNameItem('alertEnabled')" :filter-method="filterMethod" sortable>
<template #default="scope">
<dict-tag :options="alertEnabledTable" :value="scope.row.alertEnabled"/>
</template>
</el-table-column>
<el-table-column label="设备模型" align="center" prop="deviceModelId" :width="120" column-key="deviceModelId" filter-placement="bottom-end"
:filters="getfilterNameItem('deviceModelId')" :filter-method="filterMethod" sortable>
</el-table-column>
<!-- <el-table-column label="租户号" align="center" prop="tentantId" :width="120" sortable/> -->
<el-table-column label="设备分组" align="center" prop="deviceGroupName" :width="150" column-key="deviceGroupName" filter-placement="bottom-end"
:filters="getfilterNameItem('deviceGroupName')" :filter-method="filterMethod" sortable/>
<el-table-column label="设备排序" align="center" prop="sort" :width="120" sortable/>
<el-table-column label="组态图片名称" align="center" prop="imgConfiguration" :width="150" column-key="imgConfiguration" filter-placement="bottom-end"
:filters="getfilterNameItem('imgConfiguration')" :filter-method="filterMethod" sortable>
<template #default="scope">
<dict-tag :options="dc_img_configuration" :value="scope.row.imgConfiguration"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" :width="300" :fixed="fixedColumns?'right':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>
</div>
</template>
<template #default="scope">
<el-button
type="text"
icon="Edit"
@click="handleParams(scope.row)"
>维护设备参数</el-button>
<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="params.pageNum"
v-model:limit="params.pageSize"
@pagination="getList"
class="paddingBothLeftRight"
/>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList">
</right-toolbar>
</el-row>
<el-table ref="deviceTable" v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange" @sort-change="sortChange" @filter-change="filterChange" :max-height="tableHeight" :border="true" :column-width-draggable="true">
<el-table-column type="selection" width="55" align="center" fixed="left"/>
<el-table-column label="中台设备编码" align="center" prop="centerDeviceCode" :width="150" sortable/>
<el-table-column label="设备名称" align="center" prop="deviceName" :width="150" sortable/>
<el-table-column label="通讯来源类型" align="center" prop="deviceSource" :width="150" column-key="deviceSource" filter-placement="bottom-end"
:filters="getfilterNameItem('deviceSource')" :filter-method="filterMethod" sortable/>
<el-table-column label="是否可用" align="center" prop="enabledFlag" :width="120" column-key="enabledFlag" filter-placement="bottom-end"
:filters="getfilterNameItem('enabledFlag')" :filter-method="filterMethod" sortable>
<template #default="scope">
<dict-tag :options="enabledFlagTable" :value="scope.row.enabledFlag"/>
</template>
</el-table-column>
<el-table-column label="设备类型" align="center" prop="deviceType" :width="120" column-key="deviceType" filter-placement="bottom-end"
:filters="getfilterNameItem('deviceType')" :filter-method="filterMethod" sortable>
<template #default="scope">
<dict-tag :options="dc_device_type" :value="scope.row.deviceType"/>
</template>
</el-table-column>
<el-table-column label="所属组织名称" align="center" prop="orgName" :width="150" sortable/>
<el-table-column label="位置编码" align="center" prop="locationCode" :width="120" sortable/>
<el-table-column label="位置名称" align="center" prop="locationName" :width="120" sortable/>
<el-table-column label="设备应用范围" align="center" prop="deviceClass" :width="150" sortable/>
<el-table-column label="接口名称" align="center" prop="apiName" :width="120" sortable/>
<el-table-column label="服务器地址" align="center" prop="serverIp" :width="120" sortable/>
<el-table-column label="从属网关ID" align="center" prop="gatewayId" :width="120" sortable/>
<el-table-column label="纬度" align="center" prop="latValue" :width="120" sortable/>
<el-table-column label="经度" align="center" prop="lagValue" :width="120" sortable/>
<el-table-column label="是否告警" align="center" prop="alertEnabled" :width="120" column-key="alertEnabled" filter-placement="bottom-end"
:filters="getfilterNameItem('alertEnabled')" :filter-method="filterMethod" sortable>
<template #default="scope">
<dict-tag :options="alertEnabledTable" :value="scope.row.alertEnabled"/>
</template>
</el-table-column>
<el-table-column label="设备模型" align="center" prop="deviceModelId" :width="120" column-key="deviceModelId" filter-placement="bottom-end"
:filters="getfilterNameItem('deviceModelId')" :filter-method="filterMethod" sortable>
</el-table-column>
<!-- <el-table-column label="租户号" align="center" prop="tentantId" :width="120" sortable/> -->
<el-table-column label="设备分组" align="center" prop="deviceGroupName" :width="150" column-key="deviceGroupName" filter-placement="bottom-end"
:filters="getfilterNameItem('deviceGroupName')" :filter-method="filterMethod" sortable/>
<el-table-column label="设备排序" align="center" prop="sort" :width="120" sortable/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" :width="300" :fixed="fixedColumns?'right':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>
</div>
</template>
<template #default="scope">
<el-button
type="text"
icon="Edit"
@click="handleParams(scope.row)"
>维护设备参数</el-button>
<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="params.pageNum"
v-model:limit="params.pageSize"
@pagination="getList"
class="paddingBothLeftRight"
/>
<!-- 添加或修改设备信息对话框 -->
<el-dialog :title="title" v-model="open" width="800px" append-to-body>
<el-form ref="deviceRef" :model="form" :rules="rules" label-width="125px">
@ -421,6 +465,18 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="组态图片名称" prop="imgConfiguration">
<el-select v-model="form.imgConfiguration" placeholder="请选择组态图片名称" clearable>
<el-option
v-for="dict in dc_img_configuration"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备排序" prop="sort">
<el-input v-model="form.sort" placeholder="请输入设备排序" />
@ -467,7 +523,7 @@ import lock from "@/assets/icons/svg/lock.svg";
import { ref,onMounted,onUnmounted } from "vue";
import { ElMessageBox } from 'element-plus';
const { proxy } = getCurrentInstance();
const { dc_device_type, dc_device_source } = proxy.useDict('dc_device_type','dc_device_source');
const {dc_img_configuration, dc_device_type, dc_device_source } = proxy.useDict('dc_img_configuration','dc_device_type','dc_device_source');
const router = useRouter();
const deviceList = ref([]);
const open = ref(false);
@ -963,6 +1019,12 @@ function sortChange({column, prop, order }){
getList();
}
/** 节点单击事件 */
function handleNodeClick(data) {
queryParams.value.orgCode = data.id;
handleQuery();
};
getDeptTree();
getList();
</script>

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

@ -96,7 +96,11 @@
<el-table-column label="端口号" align="center" prop="issRestport" />
<el-table-column label="组名称" align="center" prop="issGroupName" />
<el-table-column label="变量名称" align="center" prop="issVarName" />
<el-table-column label="变量类型" align="center" prop="issVarType" />
<el-table-column label="变量类型" align="center" prop="issVarType" >
<template #default="scope">
<dict-tag :options="dc_param_value_type" :value="scope.row.issVarType"/>
</template>
</el-table-column>
<el-table-column label="中台设备" align="center" prop="centerDeviceuuid" />
<el-table-column label="中台参数" align="center" prop="centerParamcode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" :width="300" :fixed="fixedColumns?'right':false">
@ -159,7 +163,8 @@
<el-select v-model="form.issVarType" placeholder="请选择变量类型">
<el-option v-for="dict in dc_param_value_type"
:key="dict.value"
:label="dict.label" />
:label="dict.label"
:value="dict.value"/>
</el-select>
</el-form-item>

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

@ -4,9 +4,12 @@
<el-row>
<el-col :span="4">
<el-form-item label="模型编码" prop="colCode">
<el-select v-model="queryParams.colCode" placeholder="请选择模型编码" clearable>
<el-option label="请选择字典生成" value="" />
</el-select>
<el-input
v-model="queryParams.colCode"
placeholder="请输入模型编码"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="4">
@ -55,7 +58,7 @@
<el-form-item label="显示状态" prop="flagVisible">
<el-select v-model="queryParams.flagVisible" placeholder="请选择是否显示" clearable>
<el-option
v-for="dict in sys_yes_no"
v-for="dict in dc_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -67,7 +70,7 @@
<el-form-item label="固定位置" prop="flagLocked">
<el-select v-model="queryParams.flagLocked" placeholder="请选择是否固定位置" clearable>
<el-option
v-for="dict in sys_yes_no"
v-for="dict in dc_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -79,19 +82,7 @@
<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-col>
<el-col :span="4" v-show="collapseVisible">
<el-form-item label="控制类型" prop="controlType">
<el-select v-model="queryParams.controlType" placeholder="请选择控制类型" clearable>
<el-option
v-for="dict in dc_param_control_type"
v-for="dict in dc_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -209,17 +200,17 @@
<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"/>
<dict-tag :options="dc_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"/>
<dict-tag :options="dc_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"/>
<dict-tag :options="dc_yes_no" :value="scope.row.flagControl"/>
</template>
</el-table-column>
<el-table-column label="控制类型" align="center" prop="controlType" />
@ -303,9 +294,9 @@
<el-form-item label="是否显示">
<el-radio-group v-model="form.flagVisible">
<el-radio
v-for="dict in sys_yes_no"
v-for="dict in dc_yes_no"
:key="dict.value"
:label="dict.label"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
@ -314,9 +305,9 @@
<el-form-item label="固定位置">
<el-radio-group v-model="form.flagLocked">
<el-radio
v-for="dict in sys_yes_no"
v-for="dict in dc_yes_no"
:key="dict.value"
:label="dict.label"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
@ -325,7 +316,7 @@
<el-form-item label="是否可控">
<el-radio-group v-model="form.flagControl">
<el-radio
v-for="dict in sys_yes_no"
v-for="dict in dc_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
@ -393,7 +384,7 @@
import { listViewConfig, getViewConfig, delViewConfig, addViewConfig, updateViewConfig } from "@/api/transerver/viewConfig";
import lock from "@/assets/icons/svg/lock.svg";
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 { dc_yes_no, dc_param_value_type,dc_monitor_view_type,dc_param_control_type} = proxy.useDict('dc_yes_no', 'dc_param_value_type', 'dc_monitor_view_type', 'dc_param_control_type');
const viewConfigList = ref([]);
const open = ref(false);
@ -411,7 +402,14 @@ const queryParamFilter = ref({});
const sortProps = ref([]);
const collapseVisible = ref(false);
const editName = ref("更多筛选项");
// const dc_yes_no = ref([
// {label: '', value: true, elTagType: 'default', elTagClass: null},
// {label: '', value: false, elTagType: 'default', elTagClass: null}
// ]);
// const dc_yes_no_table = ref([
// {label: '', value: 'true', elTagType: 'default', elTagClass: null},
// {label: '', value: 'false', elTagType: 'default', elTagClass: null}
// ]);
const data = reactive({
form: {},
queryParams: {

Loading…
Cancel
Save