Compare commits
10 Commits
0ced59c084
...
2f4cd3b940
Author | SHA1 | Date |
---|---|---|
|
2f4cd3b940 | |
|
67da9dedf8 | |
|
10f77f296b | |
|
5b76b078d2 | |
|
099db8c2dc | |
|
128652dcd5 | |
|
e5966f19e2 | |
|
92d8c5090e | |
|
57096169c6 | |
|
2e2ec80979 |
|
@ -15,6 +15,7 @@
|
||||||
@cancel="modalVis = false"
|
@cancel="modalVis = false"
|
||||||
@ok="handleModalSubmit"
|
@ok="handleModalSubmit"
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
|
:zIndex="1031"
|
||||||
>
|
>
|
||||||
<div style="width: 100%; height: 400px">
|
<div style="width: 100%; height: 400px">
|
||||||
<el-amap
|
<el-amap
|
||||||
|
@ -36,11 +37,17 @@
|
||||||
import { initAMapApiLoader } from '@vuemap/vue-amap';
|
import { initAMapApiLoader } from '@vuemap/vue-amap';
|
||||||
import '@vuemap/vue-amap/dist/style.css';
|
import '@vuemap/vue-amap/dist/style.css';
|
||||||
import { EnvironmentOutlined } from '@ant-design/icons-vue';
|
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({
|
initAMapApiLoader({
|
||||||
// key: '95fa72137f4263f8e64ae01f766ad09c',
|
// key: '95fa72137f4263f8e64ae01f766ad09c',
|
||||||
key: 'a0415acfc35af15f10221bfa5a6850b4',
|
key: configInfo.value.amap.apiKey || '3bef1ec2347fff12a6b7da11af70d194',
|
||||||
securityJsCode: 'cae6108ec3dd222f946d1a7237c78be0',
|
securityJsCode: configInfo.value.amap.secretKey || '259f338768822197a09e3e4959e82cce',
|
||||||
});
|
});
|
||||||
|
|
||||||
interface EmitProps {
|
interface EmitProps {
|
||||||
|
|
|
@ -38,7 +38,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
background-color: #3F4960 !important;
|
background-color: #001529 !important;
|
||||||
|
|
||||||
h1,& .right-content, & .anticon-bell {
|
h1,& .right-content, & .anticon-bell {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
@ -49,7 +49,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-menu {
|
.ant-menu {
|
||||||
background-color: #3F4960 !important;
|
background-color: #001529 !important;
|
||||||
|
|
||||||
.ant-menu-item-selected,& .ant-menu-item-active {
|
.ant-menu-item-selected,& .ant-menu-item-active {
|
||||||
transition: background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
|
transition: background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
|
||||||
|
@ -85,10 +85,10 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-layout-sider-dark {
|
.ant-layout-sider-dark {
|
||||||
background: #fff !important;
|
background: #001529 !important;
|
||||||
|
|
||||||
.ant-menu-dark {
|
.ant-menu-dark {
|
||||||
background: #fff !important;
|
background:#001529 !important;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: @DarkMenuItemColor;
|
color: @DarkMenuItemColor;
|
||||||
|
|
|
@ -87,24 +87,32 @@ const handleOk = async () => {
|
||||||
if (dataSource.value.length) {
|
if (dataSource.value.length) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const list = (dataSource.value || [])
|
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) => {
|
.map((i: any) => {
|
||||||
const { dataType, ...extra } = i;
|
const { dataType, ...extra } = i;
|
||||||
|
if (extra.value === 0) {
|
||||||
|
extra.value = String(extra.value)
|
||||||
|
}
|
||||||
|
|
||||||
return { ...extra };
|
return { ...extra };
|
||||||
});
|
});
|
||||||
if (list.length) {
|
if (list.length) {
|
||||||
// 填值
|
// 填值
|
||||||
const resp = await saveTags(instanceStore.current?.id || '', list);
|
const resp = await saveTags(instanceStore.current?.id || '', list).finally(()=>{
|
||||||
if (resp.status === 200) {
|
loading.value = false
|
||||||
|
});
|
||||||
|
if (resp.success === 200) {
|
||||||
onlyMessage('操作成功!');
|
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) {
|
if (_list.length) {
|
||||||
// 删除值
|
// 删除值
|
||||||
_list.map(async (item: any) => {
|
_list.map(async (item: any) => {
|
||||||
if (item.id) {
|
if (item.id) {
|
||||||
await delTags(instanceStore.current?.id || '', item.id);
|
await delTags(instanceStore.current?.id || '', item.id).catch(()=>{
|
||||||
|
loading.value = false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,45 +86,61 @@ const _getEventList = (_params: any) =>
|
||||||
getEventList(instanceStore.current.id || '', events.data.id || '', _params);
|
getEventList(instanceStore.current.id || '', events.data.id || '', _params);
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
columns.value = [...defaultColumns];
|
columns.value = [...defaultColumns];
|
||||||
if (events.data?.valueType?.type === 'object') {
|
if (events.data?.valueType?.type === 'object') {
|
||||||
const eventProperties = cloneDeep(events.data.valueType?.properties || [])
|
const eventProperties = cloneDeep(events.data.valueType?.properties || [])
|
||||||
eventProperties.reverse().map((i: any) => {
|
eventProperties.reverse().map((i: any) => {
|
||||||
if (i.valueType?.type === 'object') {
|
if (['object', 'array'].includes(i.valueType?.type)) {
|
||||||
objectKey.value.push({
|
objectKey.value.push({
|
||||||
key:i.id,
|
key: i.id,
|
||||||
dataIndex: `${i.id}_format`
|
dataIndex: `${i.id}_format`
|
||||||
});
|
|
||||||
columns.value.splice(0, 0, {
|
|
||||||
key: i.id,
|
|
||||||
title: i.name,
|
|
||||||
dataIndex: `${i.id}_format`,
|
|
||||||
search: {
|
|
||||||
type: i?.valueType?.type || 'string',
|
|
||||||
rename: i.id,
|
|
||||||
},
|
|
||||||
scopedSlots: true,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
columns.value.splice(0, 0, {
|
|
||||||
key: i.id,
|
|
||||||
title: i.name,
|
|
||||||
dataIndex: `${i.id}_format`,
|
|
||||||
search: {
|
|
||||||
type: i?.valueType?.type || 'string',
|
|
||||||
rename: i.id,
|
|
||||||
},
|
|
||||||
ellipsis: true,
|
|
||||||
scopedSlots: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
columns.value.splice(0, 0, {
|
columns.value.splice(0, 0, {
|
||||||
title: '数据',
|
key: i.id,
|
||||||
dataIndex: 'value',
|
title: i.name,
|
||||||
|
dataIndex: `${i.id}_format`,
|
||||||
|
search: {
|
||||||
|
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: componentsType?.[i?.valueType?.type] || 'string',
|
||||||
|
rename: i.id,
|
||||||
|
options: arr
|
||||||
|
},
|
||||||
|
ellipsis: true,
|
||||||
|
scopedSlots: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
columns.value.splice(0, 0, {
|
||||||
|
title: '数据',
|
||||||
|
dataIndex: 'value',
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleSearch = (_params: any) => {
|
const handleSearch = (_params: any) => {
|
||||||
|
|
|
@ -145,12 +145,12 @@ const props = defineProps({
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'device',
|
default: 'device',
|
||||||
},
|
},
|
||||||
internalId: {
|
internalId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -181,9 +181,10 @@ const queryInkingDevices = (data: string[]) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await getInkingDevices(data,props.accessId);
|
const res = await getInkingDevices(data, props.accessId);
|
||||||
if (res) {
|
if (res) {
|
||||||
disabledKeys.value = res.result?.map((item) => item.externalId) || [];
|
disabledKeys.value =
|
||||||
|
res.result?.map((item) => item.externalId) || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve(true);
|
resolve(true);
|
||||||
|
@ -250,15 +251,17 @@ const init = async () => {
|
||||||
const resp = await getCommandsByAccess(props.accessId);
|
const resp = await getCommandsByAccess(props.accessId);
|
||||||
if (resp.success && resp.result?.length) {
|
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) {
|
if (item) {
|
||||||
showPage.value = true
|
showPage.value = true;
|
||||||
columns.value = item.expands?.terms?.map((t) => ({
|
columns.value = item.expands?.terms?.map((t) => ({
|
||||||
title: t.name,
|
title: t.name,
|
||||||
dataIndex: t.id,
|
dataIndex: t.id,
|
||||||
search: {
|
search: {
|
||||||
type: t.valueType.type,
|
type: t.valueType.type,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,6 +209,7 @@ import { useMetadataStore } from '@/store/metadata';
|
||||||
import { omit } from 'lodash-es';
|
import { omit } from 'lodash-es';
|
||||||
import { Modal } from 'jetlinks-ui-components';
|
import { Modal } from 'jetlinks-ui-components';
|
||||||
import { testObject, testType, testAliType, testAliObject } from './valideta';
|
import { testObject, testType, testAliType, testAliObject } from './valideta';
|
||||||
|
import {TOKEN_KEY} from "@/utils/variable";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const instanceStore = useInstanceStore();
|
const instanceStore = useInstanceStore();
|
||||||
|
|
|
@ -124,7 +124,7 @@ onMounted(() => {
|
||||||
serverNode().then((resp: any) => {
|
serverNode().then((resp: any) => {
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
serverNodeOptions.value = resp.result.map((item: any) => ({
|
serverNodeOptions.value = resp.result.map((item: any) => ({
|
||||||
label: item.name,
|
label: item.id,
|
||||||
value: item.id,
|
value: item.id,
|
||||||
}));
|
}));
|
||||||
if (serverNodeOptions.value.length) {
|
if (serverNodeOptions.value.length) {
|
||||||
|
|
|
@ -202,7 +202,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ConfigApi from '@/api/notice/config';
|
import ConfigApi from '@/api/notice/config';
|
||||||
import type { ActionsType } from '@/views/device/Instance/typings';
|
import type { ActionsType } from '@/views/device/Instance/typings';
|
||||||
|
import { usePermissionStore } from '@/store/permission';
|
||||||
import { NOTICE_METHOD, MSG_TYPE } from '@/views/notice/const';
|
import { NOTICE_METHOD, MSG_TYPE } from '@/views/notice/const';
|
||||||
import SyncUser from './SyncUser/index.vue';
|
import SyncUser from './SyncUser/index.vue';
|
||||||
import Debug from './Debug/index.vue';
|
import Debug from './Debug/index.vue';
|
||||||
|
|
|
@ -220,8 +220,10 @@ const filterType = async (newVal: any) => {
|
||||||
terms: [
|
terms: [
|
||||||
{ termType: 'eq', column: 'objectTypeName', value: '设备' },
|
{ termType: 'eq', column: 'objectTypeName', value: '设备' },
|
||||||
],
|
],
|
||||||
});
|
}).catch(()=>{
|
||||||
if (res.success && res.result.length !== 0) {
|
_typeList[2].disabled = true
|
||||||
|
})
|
||||||
|
if (res.success && res.result.length === 0) {
|
||||||
// _typeList.push(TypeMap.relation)
|
// _typeList.push(TypeMap.relation)
|
||||||
// TypeMap.relation.disabled = true;
|
// TypeMap.relation.disabled = true;
|
||||||
_typeList[2].disabled = true
|
_typeList[2].disabled = true
|
||||||
|
|
|
@ -392,7 +392,7 @@ const system = useSystem();
|
||||||
const form = reactive<formType>({
|
const form = reactive<formType>({
|
||||||
formValue: {
|
formValue: {
|
||||||
title: '',
|
title: '',
|
||||||
headerTheme: 'light',
|
headerTheme: 'dark',
|
||||||
showRecordNumber: true,
|
showRecordNumber: true,
|
||||||
recordNumber: '',
|
recordNumber: '',
|
||||||
apiKey: '',
|
apiKey: '',
|
||||||
|
|
|
@ -229,10 +229,17 @@ const table = reactive({
|
||||||
paging: false,
|
paging: false,
|
||||||
};
|
};
|
||||||
const resp: any = await getMenuTree_api(params);
|
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];
|
const lastItem = menuArr[menuArr.length - 1];
|
||||||
|
console.log(lastItem, 'lastItem');
|
||||||
//个人中心排序为9999需要做过滤特殊处理
|
//个人中心排序为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 {
|
return {
|
||||||
code: resp.message,
|
code: resp.message,
|
||||||
|
@ -251,7 +258,9 @@ const table = reactive({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
addChildren: (row: any) => {
|
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(
|
router.push(
|
||||||
`/system/Menu/detail/:id?pid=${row.id}&basePath=${
|
`/system/Menu/detail/:id?pid=${row.id}&basePath=${
|
||||||
row.url || ''
|
row.url || ''
|
||||||
|
|
|
@ -91,21 +91,21 @@ export default defineConfig(({ mode}) => {
|
||||||
],
|
],
|
||||||
server: {
|
server: {
|
||||||
host:'0.0.0.0',
|
host:'0.0.0.0',
|
||||||
|
port: 8990,
|
||||||
proxy: {
|
proxy: {
|
||||||
[env.VITE_APP_BASE_API]: {
|
[env.VITE_APP_BASE_API]: {
|
||||||
// target: 'http://192.168.32.226:8844',
|
// target: 'http://192.168.32.226:8844',
|
||||||
// target: 'http://192.168.32.244:8881',
|
// target: 'http://192.168.32.244:8881',
|
||||||
// target: 'http://192.168.32.217:8844', //张本地
|
// target: 'http://192.168.32.217:8844', //张本地
|
||||||
// target: 'http://120.77.179.54:8844', // 120测试
|
// 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.99:8844', // 本地开发环境1
|
||||||
// target: 'http://192.168.33.6:38848', // 社区版开发环境
|
// target: 'http://192.168.33.6:31320', // 社区版开发环境
|
||||||
// target: 'http://192.168.32.207:8844', // 刘本地
|
// target: 'https://demo.jetlinks.cn', // 刘本地
|
||||||
// target: 'http://192.168.32.187:8844', // 谭本地
|
target: 'http://192.168.1.17:8848', // 谭本地
|
||||||
// target: 'http://192.168.33.66:8844', // 苟本地
|
// target: 'http://192.168.33.66:8844', // 苟本地
|
||||||
// target: 'http://192.168.35.155:8844', // 王本地
|
// target: 'http://192.168.32.189:8844', // 王本地
|
||||||
ws: 'ws://192.168.33.46:8844',
|
ws: 'ws://192.168.1.17:8844',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '')
|
rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue