Browse Source

告警测试第二版

pull/1/head
ljlong_2630 1 year ago
parent
commit
e10f7c9d1e
  1. 4
      .env.production
  2. 1
      .gitignore
  3. 53
      src/api/model/modelparamrela.js
  4. 14
      src/views/model/alert/deviceparamalert.vue
  5. 6
      src/views/model/alert/method.vue
  6. 16
      src/views/model/alert/policy.vue
  7. 6
      src/views/model/device/index.vue
  8. 3
      src/views/transerver/kingcodetransform/index.vue

4
.env.production

@ -5,8 +5,8 @@ VITE_APP_TITLE = 联美管理驾驶舱
VITE_APP_ENV = 'production'
# 若依管理系统/生产环境
VITE_APP_BASE_API = 'https://tmsdata.hongxianggroup.com.cn'
VITE_APP_BASE_API_IMAGE = 'https://tms.hongxianggroup.com.cn'
VITE_APP_BASE_API = 'http://localhost:9000'
VITE_APP_BASE_API_IMAGE = 'http://localhost:9000'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

1
.gitignore

@ -20,3 +20,4 @@ bin-release/
*.DS_Store
node_modules/
package-lock.json
dist/

53
src/api/model/modelparamrela.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询设备模型参数明细列表
export function listModelparamrela(query) {
return request({
url: '/model/dcModelDeviceParam/list',
method: 'get',
params: query
})
}
// 查询设备模型参数明细详细
export function getModelparamrela(id) {
return request({
url: '/model/dcModelDeviceParam/' + id,
method: 'get'
})
}
// 新增设备模型参数明细
export function addModelparamrela(data) {
return request({
url: '/model/dcModelDeviceParam',
method: 'post',
data: data
})
}
// 修改设备模型参数明细
export function updateModelparamrela(data) {
return request({
url: '/model/dcModelDeviceParam',
method: 'put',
data: data
})
}
// 删除设备模型参数明细
export function delModelparamrela(id) {
return request({
url: '/model/dcModelDeviceParam/' + id,
method: 'delete'
})
}
// 导出设备模型参数明细
export function exportModelparamrela(query) {
return request({
url: '/${baseUrl}/export',
method: 'get',
params: query
})
}

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

@ -161,7 +161,15 @@
<el-row>
<el-col :span="12" v-show="beginValueVisiable">
<el-form-item label="告警值" prop="beginValue">
<el-input v-model="formPolicy.beginValue" placeholder="请输入开始值" />
<!-- <el-input v-model="formPolicy.beginValue" placeholder="请输入开始值" /> -->
<el-select v-model="formPolicy.beginValue" placeholder="请选择是否告警">
<el-option
v-for="item in alert_value"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@ -262,7 +270,7 @@ import { ElMessageBox } from 'element-plus';
import { listPolicy,listPolicyInfo,updatePolicy,updatePolicyBatch,addPolicy,addPolicyBatch,newDelPolicy } from "@/api/model/policy";
const { proxy } = getCurrentInstance();
const router = useRouter();
const { operator_sign,dc_param_value_type } = proxy.useDict('operator_sign','dc_param_value_type');
const { operator_sign,dc_param_value_type,alert_value } = proxy.useDict('operator_sign','dc_param_value_type','alert_value');
const alertList = ref([]);
const open = ref(false);
const openPolicy = ref(false);
@ -620,7 +628,7 @@ function getModelListSwitch(row){
formPolicy.value.statusType = response.data[0].statusType;
formPolicy.value.methodId = response.data[0].methodId;
formPolicy.value.alertFlag = response.data[0].alertFlag;
formPolicy.value.value = response.data[0].beginValue;
formPolicy.value.beginValue = response.data[0].beginValue;
formPolicy.value.alertId = row.id;
formPolicy.value.deviceId = row.deviceUuid;
formPolicy.value.id = 1;

6
src/views/model/alert/method.vue

@ -61,7 +61,11 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="策略名称" align="center" prop="methodName" />
<el-table-column label="是否有效" align="center" prop="flagEnabled" />
<el-table-column label="是否有效" align="center" prop="flagEnabled" >
<template #default="scope">
<dict-tag :options="flagEnabledTable" :value="scope.row.flagEnabled"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button

16
src/views/model/alert/policy.vue

@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="数据类型" prop="paramType">
<el-select v-model="queryParams.paramType" 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="beginValue">
<el-input
v-model="queryParams.beginValue"
@ -93,6 +103,11 @@
<el-table-column label="中台设备ID" align="center" prop="deviceId" />
<el-table-column label="参数名称" align="center" prop="paramName" :width="120"/>
<el-table-column label="参数编码" align="center" prop="paramCode" />
<el-table-column label="数据类型" align="center" prop="paramType" :width="120">
<template #default="scope">
<dict-tag :options="dc_param_value_type" :value="scope.row.paramType"/>
</template>
</el-table-column>
<el-table-column label="控制值" align="center" prop="beginValue" />
<!-- <el-table-column label="结束值" align="center" prop="endValue" /> -->
<el-table-column label="是否告警" align="center" prop="alertFlag" >
@ -209,6 +224,7 @@ import { selectDeviceParamPolicy, listPolicy, getPolicy, delPolicy, addPolicy, u
import { listMethod } from "@/api/model/method";
const { proxy } = getCurrentInstance();
const router = useRouter();
const { dc_param_value_type } = proxy.useDict('dc_param_value_type');
const policyList = ref([]);
const open = ref(false);
const loading = ref(true);

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

@ -18,7 +18,7 @@
/>
</el-form-item>
<el-form-item label="通讯来源类型" prop="deviceSource">
<el-select v-model="queryParams.deviceSource" placeholder="请选择是否可用" clearable>
<el-select v-model="queryParams.deviceSourceId" placeholder="请选择通讯来源类型" clearable>
<el-option
v-for="dict in dc_device_source"
:key="dict.value"
@ -53,7 +53,7 @@
<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"/>
check-strictly :default-expand-all="true" clearable/>
</el-form-item>
<el-form-item label="位置编码" prop="locationCode">
<el-input
@ -301,7 +301,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="form.deviceType" placeholder="请选择设备类型">
<el-select v-model="form.deviceTypeId" placeholder="请选择设备类型">
<el-option
v-for="dict in dc_device_type"
:key="dict.value"

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

@ -17,8 +17,6 @@
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item label="中台设备号" prop="centerDeviceuuid">
<el-input
v-model="queryParams.centerDeviceuuid"
@ -35,7 +33,6 @@
@keyup.enter="handleQuery"
/>
</el-form-item>
</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>

Loading…
Cancel
Save