Compare commits

...

10 Commits

Author SHA1 Message Date
fhysy 2f4cd3b940 refactor(system): 调整基础配置并优化地图组件
- 修改高德地图 API 密钥和密钥安全码获取方式
- 调整基础配置中的标题和头部主题颜色
- 修改暗黑主题背景颜色
- 更新开发环境代理配置
2025-04-03 17:00:51 +08:00
XieYongHong 67da9dedf8 fix: 【设备管理-标签】修复输入0,无法在详情显示 2025-03-21 14:24:00 +08:00
XieYongHong 10f77f296b fix: 【设备管理-运行状态】修复界面卡死无法点击 2025-03-11 11:37:10 +08:00
leiqiaochu 5b76b078d2 fix: bug#32748【仪表盘】【2.2/master】当集群部署时,仪表盘获取的集群节点展示需修改为id 2025-01-10 17:24:30 +08:00
leiqiaochu 099db8c2dc fix: bug#31510 2024-12-19 16:13:18 +08:00
leiqiaochu 128652dcd5 fix: bug#32248 2024-12-19 15:34:55 +08:00
qiaochuLei e5966f19e2
fix: bug#32507【通知配置】【2.2】通知管理>>>通知配置访问时,Console报错,界面展示空白 2024-12-06 15:32:46 +08:00
qiaochuLei 92d8c5090e
fix: bug#31587
* fix: 设备映射传值网关id->插件id

* fix: 31587
2024-11-22 09:53:41 +08:00
qiaochuLei 57096169c6
fix: 设备映射传值网关id->插件id
* fix: bug#28724 【菜单管理】【/2.1/2.2】菜单管理新增菜单时,排序需优化(默认为10000开始)

* fix: 设备映射传值网关id->插件id
2024-11-14 15:43:48 +08:00
leiqiaochu 2e2ec80979 fix: bug#17573【设备】插件设备进行映射时,传参ID错误,传入了设备接入网关ID,应该为插件ID 2024-10-31 11:52:22 +08:00
12 changed files with 121 additions and 75 deletions

View File

@ -15,6 +15,7 @@
@cancel="modalVis = false"
@ok="handleModalSubmit"
destroyOnClose
:zIndex="1031"
>
<div style="width: 100%; height: 400px">
<el-amap
@ -36,11 +37,17 @@
import { initAMapApiLoader } from '@vuemap/vue-amap';
import '@vuemap/vue-amap/dist/style.css';
import { EnvironmentOutlined } from '@ant-design/icons-vue';
import { useSystem } from '@/store/system';
import { storeToRefs } from 'pinia'
const system = useSystem();
const {configInfo} = storeToRefs(system);
console.log("configInfo",configInfo)
initAMapApiLoader({
// key: '95fa72137f4263f8e64ae01f766ad09c',
key: 'a0415acfc35af15f10221bfa5a6850b4',
securityJsCode: 'cae6108ec3dd222f946d1a7237c78be0',
key: configInfo.value.amap.apiKey || '3bef1ec2347fff12a6b7da11af70d194',
securityJsCode: configInfo.value.amap.secretKey || '259f338768822197a09e3e4959e82cce',
});
interface EmitProps {

View File

@ -38,7 +38,7 @@ body {
}
.dark {
background-color: #3F4960 !important;
background-color: #001529 !important;
h1,& .right-content, & .anticon-bell {
color: #fff !important;
@ -49,7 +49,7 @@ body {
}
.ant-menu {
background-color: #3F4960 !important;
background-color: #001529 !important;
.ant-menu-item-selected,& .ant-menu-item-active {
transition: background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
@ -85,10 +85,10 @@ body {
}
.ant-layout-sider-dark {
background: #fff !important;
background: #001529 !important;
.ant-menu-dark {
background: #fff !important;
background:#001529 !important;
span {
color: @DarkMenuItemColor;

View File

@ -87,24 +87,32 @@ const handleOk = async () => {
if (dataSource.value.length) {
loading.value = true
const list = (dataSource.value || [])
.filter((item: any) => item?.key && item?.value)
.filter((item: any) => item?.key && (item?.value !== undefined && item?.value !== null))
.map((i: any) => {
const { dataType, ...extra } = i;
if (extra.value === 0) {
extra.value = String(extra.value)
}
return { ...extra };
});
if (list.length) {
//
const resp = await saveTags(instanceStore.current?.id || '', list);
if (resp.status === 200) {
const resp = await saveTags(instanceStore.current?.id || '', list).finally(()=>{
loading.value = false
});
if (resp.success === 200) {
onlyMessage('操作成功!');
}
}
const _list = (dataSource.value || []).filter((item: any) => item?.key && !item?.value);
const _list = (dataSource.value || []).filter((item: any) => item?.key && (item?.value === undefined || item?.value === null));
if (_list.length) {
//
_list.map(async (item: any) => {
if (item.id) {
await delTags(instanceStore.current?.id || '', item.id);
await delTags(instanceStore.current?.id || '', item.id).catch(()=>{
loading.value = false
});
}
});
}

View File

@ -90,7 +90,7 @@ watchEffect(() => {
if (events.data?.valueType?.type === 'object') {
const eventProperties = cloneDeep(events.data.valueType?.properties || [])
eventProperties.reverse().map((i: any) => {
if (i.valueType?.type === 'object') {
if (['object', 'array'].includes(i.valueType?.type)) {
objectKey.value.push({
key: i.id,
dataIndex: `${i.id}_format`
@ -100,19 +100,35 @@ watchEffect(() => {
title: i.name,
dataIndex: `${i.id}_format`,
search: {
type: i?.valueType?.type || 'string',
type: 'string',
rename: i.id,
},
scopedSlots: true,
});
} else {
const arr = i?.valueType?.type === 'boolean' ? [
{
label: i?.valueType.falseText,
value: i?.valueType.falseValue
},
{
label: i?.valueType.trueText,
value: i?.valueType.trueValue
},
] : (i?.valueType?.elements || []).map(item => {
return {
label: item.text,
value: item.value
}
})
columns.value.splice(0, 0, {
key: i.id,
title: i.name,
dataIndex: `${i.id}_format`,
search: {
type: i?.valueType?.type || 'string',
type: componentsType?.[i?.valueType?.type] || 'string',
rename: i.id,
options: arr
},
ellipsis: true,
scopedSlots: true,

View File

@ -183,7 +183,8 @@ const queryInkingDevices = (data: string[]) => {
const res = await getInkingDevices(data, props.accessId);
if (res) {
disabledKeys.value = res.result?.map((item) => item.externalId) || [];
disabledKeys.value =
res.result?.map((item) => item.externalId) || [];
}
resolve(true);
@ -250,9 +251,11 @@ const init = async () => {
const resp = await getCommandsByAccess(props.accessId);
if (resp.success && resp.result?.length) {
//
const item = resp.result.find(item => item.id === 'QueryDevicePage');
const item = resp.result.find(
(item) => item.id === 'QueryDevicePage',
);
if (item) {
showPage.value = true
showPage.value = true;
columns.value = item.expands?.terms?.map((t) => ({
title: t.name,
dataIndex: t.id,

View File

@ -209,6 +209,7 @@ import { useMetadataStore } from '@/store/metadata';
import { omit } from 'lodash-es';
import { Modal } from 'jetlinks-ui-components';
import { testObject, testType, testAliType, testAliObject } from './valideta';
import {TOKEN_KEY} from "@/utils/variable";
const route = useRoute();
const instanceStore = useInstanceStore();

View File

@ -124,7 +124,7 @@ onMounted(() => {
serverNode().then((resp: any) => {
if (resp.success) {
serverNodeOptions.value = resp.result.map((item: any) => ({
label: item.name,
label: item.id,
value: item.id,
}));
if (serverNodeOptions.value.length) {

View File

@ -202,7 +202,7 @@
<script setup lang="ts">
import ConfigApi from '@/api/notice/config';
import type { ActionsType } from '@/views/device/Instance/typings';
import { usePermissionStore } from '@/store/permission';
import { NOTICE_METHOD, MSG_TYPE } from '@/views/notice/const';
import SyncUser from './SyncUser/index.vue';
import Debug from './Debug/index.vue';

View File

@ -220,8 +220,10 @@ const filterType = async (newVal: any) => {
terms: [
{ termType: 'eq', column: 'objectTypeName', value: '设备' },
],
});
if (res.success && res.result.length !== 0) {
}).catch(()=>{
_typeList[2].disabled = true
})
if (res.success && res.result.length === 0) {
// _typeList.push(TypeMap.relation)
// TypeMap.relation.disabled = true;
_typeList[2].disabled = true

View File

@ -392,7 +392,7 @@ const system = useSystem();
const form = reactive<formType>({
formValue: {
title: '',
headerTheme: 'light',
headerTheme: 'dark',
showRecordNumber: true,
recordNumber: '',
apiKey: '',

View File

@ -229,10 +229,17 @@ const table = reactive({
paging: false,
};
const resp: any = await getMenuTree_api(params);
const menuArr = resp.result.filter((i:any)=>i.code!=='account-center')
const menuArr = resp.result.filter(
(i: any) => i.code !== 'account-center',
);
const lastItem = menuArr[menuArr.length - 1];
console.log(lastItem, 'lastItem');
//9999
table.total = lastItem ? lastItem.sortIndex + 1 === 9999 ? 10000 : lastItem.sortIndex + 1 : 1;
table.total = lastItem
? lastItem.sortIndex + 1 === 9999
? 10000
: lastItem.sortIndex + 1
: 1;
return {
code: resp.message,
@ -251,7 +258,9 @@ const table = reactive({
};
},
addChildren: (row: any) => {
const sortIndex = row?.children?.length || 0;
const sortIndex = row?.children.sort((a: any, b: any) => {
return b.sortIndex - a.sortIndex;
})[0].sortIndex;
router.push(
`/system/Menu/detail/:id?pid=${row.id}&basePath=${
row.url || ''

View File

@ -91,21 +91,21 @@ export default defineConfig(({ mode}) => {
],
server: {
host:'0.0.0.0',
port: 8990,
proxy: {
[env.VITE_APP_BASE_API]: {
// target: 'http://192.168.32.226:8844',
// target: 'http://192.168.32.244:8881',
// target: 'http://192.168.32.217:8844', //张本地
// target: 'http://120.77.179.54:8844', // 120测试
target: 'http://192.168.33.46:8844', // 本地开发环境
// target: 'http://192.168.33.46:8844', // 本地开发环境
// target: 'http://192.168.33.99:8844', // 本地开发环境1
// target: 'http://192.168.33.6:38848', // 社区版开发环境
// target: 'http://192.168.32.207:8844', // 刘本地
// target: 'http://192.168.32.187:8844', // 谭本地
// target: 'http://192.168.33.6:31320', // 社区版开发环境
// target: 'https://demo.jetlinks.cn', // 刘本地
target: 'http://192.168.1.17:8848', // 谭本地
// target: 'http://192.168.33.66:8844', // 苟本地
// target: 'http://192.168.35.155:8844', // 王本地
ws: 'ws://192.168.33.46:8844',
// target: 'http://192.168.32.189:8844', // 王本地
ws: 'ws://192.168.1.17:8844',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}