fix: bug#16782;修改数采值为COLLECTOR_GATEWAY;

This commit is contained in:
XieYongHong 2023-07-27 14:49:15 +08:00
parent 5205755817
commit 94a2a2c5ec
7 changed files with 24 additions and 24 deletions

View File

@ -55,5 +55,5 @@ export const USER_CENTER_MENU_BUTTON_CODE = 'user-center-passwd-update'
export const protocolList = [
{ label: 'OPC-UA', value: 'OPC_UA', alias: 'opc-ua' },
{ label: 'Modbus/TCP', value: 'MODBUS_TCP', alias: 'modbus-tcp' },
{ label: 'GATEWAY', value: 'GATEWAY', alias: 'collector-gateway' },
{ label: 'GATEWAY', value: 'COLLECTOR_GATEWAY', alias: 'collector-gateway' },
]

View File

@ -93,7 +93,7 @@
/>
</j-form-item>
<j-form-item
v-if="formData.provider === 'GATEWAY'"
v-if="formData.provider === 'COLLECTOR_GATEWAY'"
:name="['configuration','deviceId']"
:rules="[{ required: true, message: '请选择网关设备'}]"
label="选择网关设备"
@ -235,7 +235,7 @@ const formData = ref<FormDataType>(cloneDeep(FormState));
const handleOk = async () => {
const params: any = await formRef.value?.validate();
if (params?.provider === 'GATEWAY') {
if (params?.provider === 'COLLECTOR_GATEWAY') {
params.configuration.deviceName = formData.value.configuration.deviceName
}

View File

@ -347,7 +347,7 @@ const handleOk = async () => {
address: data?.pointKey,
};
if (props.data.provider === 'GATEWAY') {
if (props.data.provider === 'COLLECTOR_GATEWAY') {
const configuration = cloneDeep(params.configuration)
params.configuration = {
configuration: configuration,
@ -447,12 +447,12 @@ watch(
watch(
() => props.data,
(value) => {
if (value.id && ['MODBUS_TCP', 'GATEWAY'].includes(value.provider)) {
if (value.id && ['MODBUS_TCP', 'COLLECTOR_GATEWAY'].includes(value.provider)) {
const _value: any = cloneDeep(value);
const { writeByteCount, byteCount } =
props.data.provider === 'GATEWAY' ? _value.configuration.configuration.parameter: _value.configuration.parameter;
props.data.provider === 'COLLECTOR_GATEWAY' ? _value.configuration.configuration.parameter: _value.configuration.parameter;
if (props.data.provider === 'GATEWAY') {
if (props.data.provider === 'COLLECTOR_GATEWAY') {
formData.value = {
...omit(_value, ['configuration']),
..._value.configuration,

View File

@ -20,7 +20,7 @@
<template #headerTitle>
<j-space>
<PermissionButton
v-if="['MODBUS_TCP', 'GATEWAY'].includes(data?.provider)"
v-if="['MODBUS_TCP', 'COLLECTOR_GATEWAY'].includes(data?.provider)"
type="primary"
@click="handlAdd"
hasPermission="DataCollect/Collector:add"

View File

@ -41,7 +41,7 @@
/>
</j-form-item>
<j-form-item
v-if="provider === 'GATEWAY'"
v-if="provider === 'COLLECTOR_GATEWAY'"
label="通讯协议"
:name="['collectorProvider']"
:rules="[{ required: true, message: '请选择通讯协议' }]"
@ -72,7 +72,7 @@
/>
</j-form-item>
<j-form-item
v-if="provider !== 'GATEWAY'"
v-if="provider !== 'COLLECTOR_GATEWAY'"
:name="['configuration', 'inheritBreakerSpec', 'type']"
:rules="LeftTreeRules.type"
label="点位熔断处理"
@ -88,7 +88,7 @@
@change="changeCardSelectType"
/>
</j-form-item>
<p style="color: #616161" v-if="provider !== 'GATEWAY'">
<p style="color: #616161" v-if="provider !== 'COLLECTOR_GATEWAY'">
{{ getTypeTooltip(formData.configuration.inheritBreakerSpec.type) }}
</p>
<j-form-item
@ -273,7 +273,7 @@ const handleOk = async () => {
let _copyData = _data
if (['GATEWAY'].includes(provider.value)) {
if (['COLLECTOR_GATEWAY'].includes(provider.value)) {
const copyData = cloneDeep(_data)
_copyData = omit(copyData, ['configuration', 'collectorProvider'])
@ -345,7 +345,7 @@ watch(
(value) => {
const dt = _channelListAll.value.find((item) => item.id === value);
visibleUnitId.value = visibleEndian.value =
dt?.provider && ['MODBUS_TCP', 'GATEWAY'].includes(dt?.provider);
dt?.provider && ['MODBUS_TCP', 'COLLECTOR_GATEWAY'].includes(dt?.provider);
},
{ deep: true },
);
@ -355,7 +355,7 @@ watch(
(value) => {
if (value.id) {
let copyValue = cloneDeep(value)
if (!copyValue?.configuration?.inheritBreakerSpec && copyValue.provider !== 'GATEWAY') {
if (!copyValue?.configuration?.inheritBreakerSpec && copyValue.provider !== 'COLLECTOR_GATEWAY') {
copyValue.configuration = {
...copyValue.configuration,
inheritBreakerSpec: {
@ -365,7 +365,7 @@ watch(
copyValue.circuitBreaker.type = 'Ignore'
}
if (copyValue.provider === 'GATEWAY') {
if (copyValue.provider === 'COLLECTOR_GATEWAY') {
formData.value = {
...omit(copyValue, ['configuration']),
...copyValue.configuration,
@ -381,7 +381,7 @@ watch(
);
watchEffect(() => {
if (provider.value === 'GATEWAY') {
if (provider.value === 'COLLECTOR_GATEWAY') {
geyProviderList()
}
})

View File

@ -104,12 +104,12 @@ const handleData = (data: any[], type: string) => {
const handleSearch = async () => {
loading.value = true;
const resp = await treeMapping({
terms: [
{
column: 'provider',
value: _props.type,
},
],
// terms: [
// {
// column: 'provider',
// value: _props.type,
// },
// ],
});
loading.value = false;
if (resp.status === 200) {

View File

@ -94,9 +94,9 @@ export default defineConfig(({ mode}) => {
[env.VITE_APP_BASE_API]: {
// target: 'http://192.168.32.226:8844',
// target: 'http://192.168.32.244:8881',
// target: 'http://192.168.32.163:8844', //张季本地
target: 'http://192.168.32.163:8844', //张季本地
// target: 'http://120.77.179.54:8844', // 120测试
target: 'http://192.168.33.46:8844', // 本地开发环境
// target: 'http://192.168.33.46:8844', // 本地开发环境
ws: 'ws://192.168.33.46:8844',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')