From 2b3e3280ac1c99d46048b144020eb40e1bcc9b7a Mon Sep 17 00:00:00 2001 From: XieYongHong <18010623010@163.com> Date: Mon, 12 Aug 2024 16:11:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug#28560=E3=80=90=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E3=80=91=E5=BE=AE=E4=BF=A1-=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E6=B6=88=E6=81=AF=E7=9A=84=E5=90=8C=E6=AD=A5=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=88=97=E8=A1=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=B1=95=E7=A4=BA=E9=94=99=E8=AF=AF=EF=BC=8C=E3=80=90?= =?UTF-8?q?=E9=92=89=E9=92=89=E7=94=A8=E6=88=B7=E5=90=8D=E3=80=91=E9=9C=80?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E3=80=90=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 社区版功能过滤 * fix: bug#28523 【设备】设备运行状态界面,设备在线状态下,点击断开链接,事件展示错误 * fix: bug#28521 产品(设备)需按照当前产品选择协议来确定是否展示远程升级 * feat: 2.2新增功能社区版功能屏蔽 * feat: 场景联动定时场景按日历社区版屏蔽 * fix: bug#28524 【产品】产品选择设备接入网关,有多个配置时,只展示了一个 * fix: 修改iot平台主题色 * fix: 优化设备接入配置 * fix: 兼容2.1版本创建的菜单数据 * fix: 菜单配置兼容2.1菜单 * fix: bug#28524 【产品】产品选择设备接入网关,有多个配置时,只展示了一个 * fix: bug#28520【设备】当配置未开启时,前端应不展示配置按钮 * fix: bug#28533仪表盘本年流量消耗界面展示需优化 * fix: bug#28520、28534【设备】设备详情-物模型-其他配置 在点击配置时界面提示错误、【设备】当配置未开启时,前端应不展示配置按钮 * fix: bug#28531【设备】详情中查看预处理数据时提示错误 * fix: bug#28545【菜单管理】新增菜单,权限控制处无法正常加载出权限 * fix: 菜单配置->菜单权限同步功能 * fix: bug#28520【设备】当配置未开启时,前端应不展示配置按钮 * fix(media): bug#28595屏蔽固定地址通道列表的厂商字段 * fix(NoticeRule): 文字组织替换部门 * fix(Alarm): bug#28571手动触发展示说明 * fix(media): bug#28553界面展示异常 * fix(iotCard): bug#28567 * fix(media): bug#28595屏蔽固定地址通道列表的厂商字段 * fix: bug#28560【通知配置】微信-企业消息的同步用户页面,列表字段展示错误,【钉钉用户名】需改为【企业微信用户名】 * fix: bug#28544【通知配置】用户自己创建的数据,没有权限调试,报错:暂无权限,请联系管理员! * fix: bug#28549【采集器】在点位进行批量操作时,开启推送控制,进行保存异常 * fix: bug#28540【组织管理】设备资产分配页,设备列表形式展示,资产权限显示不完整 * fix: bug#28537【产品】新增的网关设备,接入方式选择"边缘网关接入"时,物模型中功能定义界面展示异常 * fix: bug#28550【远程升级】升级任务中的任务详情列表中文案修改 * fix: bug#28551【通知模版】和【通知配置】两者保存的查询条件共用了 * fix: bug#28560【通知配置】微信-企业消息的同步用户页面,列表字段展示错误,【钉钉用户名】需改为【企业微信用户名】 --- config/config.ts | 3 - src/App.vue | 2 +- src/api/device/instance.ts | 2 +- src/store/menu.ts | 4 +- src/store/system.ts | 13 +- src/style/variable.less | 4 - src/utils/request.ts | 5 +- .../DataCollect/Collector/Point/index.vue | 8 + src/views/account/Center/components/data.ts | 4 +- .../device/Firmware/Task/Detail/index.vue | 2 +- .../device/Instance/Detail/Running/index.vue | 5 + src/views/device/Instance/Detail/index.vue | 15 +- .../Product/Detail/DeviceAccess/index.vue | 738 +++-- src/views/device/Product/Detail/index.vue | 67 +- .../device/components/Metadata/Base/Base.vue | 5 + .../components/Properties/OtherSetting.vue | 4 +- .../Base/components/Properties/hooks.ts | 2 +- src/views/init-home/data/baseMenu.ts | 2764 ++++++++--------- src/views/iot-card/CardManagement/Save.vue | 6 +- src/views/iot-card/Dashboard/index.vue | 2 +- src/views/media/Device/Channel/index.vue | 12 +- src/views/media/SplitScreen/index.less | 1 + src/views/notice/Config/Debug/index.vue | 8 +- src/views/notice/Config/SyncUser/index.vue | 2 +- src/views/notice/Template/index.vue | 2 +- .../Configuration/Save/Scene/Save/CardBox.vue | 2 +- .../Scene/Save/components/Timer/index.vue | 484 +-- .../system/Apply/componenets/ThirdMenu.vue | 4 +- src/views/system/Basis/index.vue | 2 +- src/views/system/Department/device/index.vue | 4 +- src/views/system/Menu/Detail/BasicInfo.vue | 8 +- src/views/system/Menu/Setting/index.vue | 161 +- src/views/system/Menu/Setting/utils.ts | 2 +- src/views/system/Menu/index.vue | 4 +- src/views/system/NoticeRule/index.vue | 2 +- tsconfig.node.json | 2 +- vite.config.ts | 5 +- 37 files changed, 2254 insertions(+), 2106 deletions(-) diff --git a/config/config.ts b/config/config.ts index 830f005d..5ae38c0c 100644 --- a/config/config.ts +++ b/config/config.ts @@ -1,7 +1,4 @@ export default { - theme: { - 'primary-color': '#1677FF', - }, logo: '/favicon.ico', // 浏览器标签页logo title: 'Jetlinks', // 浏览器标签页title layout: { diff --git a/src/App.vue b/src/App.vue index f9c589c6..642a8e56 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,7 +33,7 @@ watch(() => JSON.stringify(route.query || {}), () => { ConfigProvider.config({ theme: { - primaryColor: "#315efb" + primaryColor: "#1677FF" } }) diff --git a/src/api/device/instance.ts b/src/api/device/instance.ts index 3ca23491..3ae743d0 100644 --- a/src/api/device/instance.ts +++ b/src/api/device/instance.ts @@ -662,7 +662,7 @@ export const queryDeviceThreshold = (productId: string, deviceId: string, prope * @param productId * @param propertyId */ -export const queryProductThreshold = (productId: string, propertyId: string) => server.get(`/message/preprocessor/product/${productId}/property/${propertyId}`) +export const queryProductThreshold = (productId: string, propertyId: string,hiddenError:boolean) => server.get(`/message/preprocessor/product/${productId}/property/${propertyId}`,{},{},hiddenError) /** * 阈值限制-删除产品物模型的阈值 diff --git a/src/store/menu.ts b/src/store/menu.ts index bbd6e2c3..20eae841 100644 --- a/src/store/menu.ts +++ b/src/store/menu.ts @@ -35,8 +35,8 @@ const defaultOwnParams = [ { terms: [ { - value: "%show\":true%", - termType: "like", + value: "%show\":false%", + termType: "nlike", column: "options" } ], diff --git a/src/store/system.ts b/src/store/system.ts index 9e413c9e..660fc7d5 100644 --- a/src/store/system.ts +++ b/src/store/system.ts @@ -2,6 +2,7 @@ import { defineStore } from 'pinia'; import { systemVersion } from '@/api/comm' import { useMenuStore } from './menu' import {getDetails_api, settingDetail} from '@/api/system/basis'; +import { queryProductThreshold } from '@/api/device/instance' import type { ConfigInfoType } from '@/views/system/Basis/typing'; import { LocalStore } from '@/utils/comm' import { SystemConst } from '@/utils/consts' @@ -24,6 +25,7 @@ type SystemStateType = { pure: boolean } calendarTagColor:Map + showThreshold:boolean } export const useSystem = defineStore('system', { @@ -42,11 +44,13 @@ export const useSystem = defineStore('system', { collapsed: false, pure: false }, - calendarTagColor:new Map() + calendarTagColor:new Map(), + showThreshold: true }), actions: { getSystemVersion(): Promise { this.getSystemConfig(); + this.getThreshold() return new Promise(async (res, rej) => { const resp = await systemVersion() if (resp.success && resp.result) { @@ -100,6 +104,13 @@ export const useSystem = defineStore('system', { this.calendarTagColor.set(i, answer.result[i]); }); } + }, + async getThreshold(){ + await queryProductThreshold('test','test',true).catch((res:any)=>{ + if(res.response.status === 404){ + this.showThreshold = false + } + }) } } }) diff --git a/src/style/variable.less b/src/style/variable.less index 0c56fbe9..f08b2d82 100644 --- a/src/style/variable.less +++ b/src/style/variable.less @@ -2,10 +2,6 @@ @import 'jetlinks-ui-components/es/style/variable.less'; @import './scrollbar.less'; -html { - --ant-primary-color: #1677FF !important; -} - .ellipsisFn(@num: 1, @width: 100%) { display: -webkit-box; max-width: @width; diff --git a/src/utils/request.ts b/src/utils/request.ts index 403459b5..0667f5a9 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -90,11 +90,12 @@ export const patch = function (url: string, data = {}, ext: any = {}) { * @param {Object} [ext] 扩展参数 * @returns {AxiosInstance} */ -export const get = function (url: string, params = {}, ext?: any) { +export const get = function (url: string, params = {}, ext?: any, _hideError = false) { return request>({ method: 'GET', url, params, + _hideError, ...ext }) } @@ -200,7 +201,7 @@ const errorHandler = (error: any) => { path: LoginPath }) }, 0) - } else if (status === 404) { + } else if (status === 404 && !error.config._hideError) { const data = error?.response?.data const message = error?.response?.data?.message || `${data?.error} ${data?.path}` showNotification(error?.code, message, '404') diff --git a/src/views/DataCollect/Collector/Point/index.vue b/src/views/DataCollect/Collector/Point/index.vue index 2cf943ab..3cea99ba 100644 --- a/src/views/DataCollect/Collector/Point/index.vue +++ b/src/views/DataCollect/Collector/Point/index.vue @@ -570,10 +570,18 @@ const onCheckChange = () => { }; const handleBatchDelete = () => { + if (!_selectedRowKeys.value.length) { + onlyMessage('至少选择一条数据', 'error'); + return + } handleDelete(); }; const handleBatchUpdate = () => { + if (!_selectedRowKeys.value.length) { + onlyMessage('至少选择一条数据', 'error'); + return + } const dataSet = new Set(_selectedRowKeys.value); const dataMap = new Map(); tableRef?.value?._dataSource.forEach((i: any) => { diff --git a/src/views/account/Center/components/data.ts b/src/views/account/Center/components/data.ts index e9afbe44..d5884554 100644 --- a/src/views/account/Center/components/data.ts +++ b/src/views/account/Center/components/data.ts @@ -19,9 +19,9 @@ const systemNotice = [ }, { provider: 'alarm-org', - name: '部门告警', + name: '组织告警', description: - '当部门类型的告警被触发时,你将在已订阅的方式中收到通知', + '当组织类型的告警被触发时,你将在已订阅的方式中收到通知', }, { provider: 'alarm-other', diff --git a/src/views/device/Firmware/Task/Detail/index.vue b/src/views/device/Firmware/Task/Detail/index.vue index c7421916..5cbf586f 100644 --- a/src/views/device/Firmware/Task/Detail/index.vue +++ b/src/views/device/Firmware/Task/Detail/index.vue @@ -170,7 +170,7 @@ const columns = [ dataIndex: 'completeTime', }, { - title: '设备版本', + title: '固件版本', key: 'version', dataIndex: 'version', width: 100, diff --git a/src/views/device/Instance/Detail/Running/index.vue b/src/views/device/Instance/Detail/Running/index.vue index 06306d50..dd900ada 100644 --- a/src/views/device/Instance/Detail/Running/index.vue +++ b/src/views/device/Instance/Detail/Running/index.vue @@ -68,6 +68,11 @@ const events: any = ref(undefined); watch( () => current.value, (value) => { + tabList.value = [{ + key: 'property', + tab: '属性', + type: 'property', + }] const metadata = JSON.parse(value?.metadata || '{}'); properties.value = metadata.properties; events.value = metadata.events; diff --git a/src/views/device/Instance/Detail/index.vue b/src/views/device/Instance/Detail/index.vue index e88a24bd..8570851c 100644 --- a/src/views/device/Instance/Detail/index.vue +++ b/src/views/device/Instance/Detail/index.vue @@ -134,9 +134,11 @@ import { useMenuStore } from '@/store/menu'; import { useRouterParams } from '@/utils/hooks/useParams'; import { EventEmitter } from '@/utils/utils'; import { usePermissionStore } from '@/store/permission'; +import { isNoCommunity } from '@/utils/utils'; +import { useSystem } from '@/store/system'; const menuStory = useMenuStore(); - +const { showThreshold } = useSystem(); const route = useRoute(); const routerParams = useRouterParams(); const instanceStore = useInstanceStore(); @@ -212,19 +214,24 @@ const getStatus = (id: string) => { const getDetail = () => { const keys = list.value.map((i) => i.key); - if (permissionStore.hasPermission('rule-engine/Alarm/Log:view')) { + if (permissionStore.hasPermission('rule-engine/Alarm/Log:view') && isNoCommunity && showThreshold) { list.value.push({ key: 'AlarmRecord', tab: '预处理数据', }); } - if (permissionStore.hasPermission('iot-card/CardManagement:view')) { + if (permissionStore.hasPermission('iot-card/CardManagement:view') && isNoCommunity) { list.value.push({ key: 'CardManagement', tab: '物联网卡', }); } - if (permissionStore.hasPermission('device/Firmware:view')) { + if ( + permissionStore.hasPermission('device/Firmware:view') && + instanceStore.current?.features?.find( + (item: any) => item?.id === 'supportFirmware', + ) && isNoCommunity + ) { list.value.push({ key: 'Firmware', tab: '远程升级', diff --git a/src/views/device/Product/Detail/DeviceAccess/index.vue b/src/views/device/Product/Detail/DeviceAccess/index.vue index 4b75e8dc..e4897f71 100644 --- a/src/views/device/Product/Detail/DeviceAccess/index.vue +++ b/src/views/device/Product/Detail/DeviceAccess/index.vue @@ -1,6 +1,9 @@