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"
|
||||
@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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -90,9 +90,9 @@ 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,
|
||||
key: i.id,
|
||||
dataIndex: `${i.id}_format`
|
||||
});
|
||||
columns.value.splice(0, 0, {
|
||||
|
@ -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,
|
||||
|
|
|
@ -181,9 +181,10 @@ const queryInkingDevices = (data: string[]) => {
|
|||
return;
|
||||
}
|
||||
|
||||
const res = await getInkingDevices(data,props.accessId);
|
||||
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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -392,7 +392,7 @@ const system = useSystem();
|
|||
const form = reactive<formType>({
|
||||
formValue: {
|
||||
title: '',
|
||||
headerTheme: 'light',
|
||||
headerTheme: 'dark',
|
||||
showRecordNumber: true,
|
||||
recordNumber: '',
|
||||
apiKey: '',
|
||||
|
|
|
@ -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 || ''
|
||||
|
|
|
@ -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/, '')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue