fix: 优化查询条件;合并dev部分代码

This commit is contained in:
XieYongHong 2023-10-10 10:25:30 +08:00
parent ac074990cb
commit 5f41a9a125
11 changed files with 62 additions and 62 deletions

View File

@ -29,7 +29,7 @@ const handleTermsToString = (queryTerms: any, terms: Array<TermsType>, parentKey
Object.keys(a).forEach((b) => {
const key = `${parentKey}[${aIndex}].${b}`
if (b === 'terms') {
handleTermsToString(queryTerms, a[b], `${key}.`)
handleTermsToString(queryTerms, a[b], `${key}`)
} else {
queryTerms[key] = a[b]
}
@ -48,7 +48,7 @@ export const paramsEncodeQuery = (params?: ParamsType) => {
const { sorts, terms } = params
if (terms) {
handleTermsToString(queryParams, terms, 'terms.')
handleTermsToString(queryParams, terms, 'terms')
}
if (sorts) {

View File

@ -15,8 +15,6 @@
checkable
@check="onCheck"
:height="600"
:showLine="{ showLeafIcon: false }"
:show-icon="true"
>
<template #title="{ name, key }">
<span

View File

@ -63,7 +63,7 @@ const Status = defineComponent({
}
const jumpAccessConfig = () => {
menuStory.jumpPage('device/Product/Detail', { id: unref(device).productId, tab: 'access' });
menuStory.jumpPage('device/Product/Detail', { id: unref(device).productId, tab: 'Device' });
};
const jumpDeviceConfig = () => {

View File

@ -259,4 +259,6 @@ urlMap.set('mqtt-client-gateway', 'topic');
urlMap.set('http-server-gateway', 'url');
urlMap.set('websocket-server', 'url');
urlMap.set('coap-server-gateway', 'url');
urlMap.set('udp-device-gateway', 'url');
urlMap.set('tcp-server-gateway', 'url');

View File

@ -19,8 +19,6 @@
:tree-data="dataSource"
:checkedKeys="checkedKeys"
@check="onCheck"
:showLine="{ showLeafIcon: false }"
:show-icon="true"
/>
</j-card>
<div style="width: 100px">

View File

@ -510,17 +510,10 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
reader.onload = (json) => {
if(json.target?.result){
const data = JSON.parse(json.target?.result);
Object.keys(data).forEach((i:any)=>{
const map = new Map()
data[i].forEach((item:any)=>(
map.set(item.id,item)
))
data[i] = [...map.values()]
})
let check = formModel.metadata === 'jetlinks' ? requiredCheck(data) : aliCheck(data)
if(!check){
onlyMessage('操作成功!')
formModel.import = JSON.stringify(data);
formModel.import = json.target?.result;
}
} else {
onlyMessage('文件内容不能为空', 'error')
@ -587,7 +580,13 @@ const handleImport = async () => {
if (data.metadata === 'alink') {
try {
const _import = JSON.parse(data.import);
Object.keys(_import).forEach((i:any)=>{
const map = new Map()
_import[i].forEach((item:any)=>(
map.set(item.id,item)
))
_import[i] = [...map.values()]
})
loading.value = true;
const res = await convertMetadata(
'from',
@ -638,7 +637,15 @@ const handleImport = async () => {
data[data?.type === 'copy' ? 'copy' : 'import'] ||
'{}',
);
if(data?.type === 'import'){
Object.keys(_object).forEach((i:any)=>{
const map = new Map()
_object[i].forEach((item:any)=>(
map.set(item.id,item)
))
_object[i] = [...map.values()]
})
}
if (
!(
!!_object?.properties ||

View File

@ -30,17 +30,15 @@
</div>
</div>
<div class="media-live">
<div class="media-live-video">
<div class="media-live-video" @mouseenter="visibleChange" @mouseleave="mouseleave">
<div
:class="mediaToolClass"
@mouseleave="mouseleave"
@mouseenter="showTool = true"
>
<div class="tool-item" v-if="type !== 'share'">
<template v-if="isRecord === 0">
<j-dropdown
trigger="click"
@visibleChange="visibleChange"
@click="showToolLock = true"
>
<div>开始录像</div>
@ -212,8 +210,8 @@ const mouseleave = () => {
}
};
const visibleChange = (v: boolean) => {
showTool.value = v;
const visibleChange = () => {
showTool.value = true;
};
const getPopupContainer = (trigger: HTMLElement) => {

View File

@ -7,6 +7,8 @@ import { LocalStore } from '@/utils/comm';
import { TOKEN_KEY } from '@/utils/variable';
import ShareLive from '../Live/shareLive.vue';
import { useSystem } from '@/store/system';
const system = useSystem();
const playData = ref({
deviceId: '',
channelId: '',
@ -18,6 +20,7 @@ const playData = ref({
const route = useRoute();
watchEffect(() => {
system.getSystemConfig()
const obj: any = unref(route.query) || {};
playData.value = {
deviceId: obj?.deviceId || '',

View File

@ -38,8 +38,6 @@
:height='450'
:virtual='true'
@select='treeSelect'
:showLine="{ showLeafIcon: false }"
:show-icon="true"
>
<template #title="{ name, description }">
<j-space>

View File

@ -55,8 +55,6 @@
:height='450'
:virtual='true'
@select='treeSelect'
:showLine="{ showLeafIcon: false }"
:show-icon="true"
>
<template #title="{ name, description }">
<j-space>

View File

@ -21,8 +21,6 @@
:selectedKeys="selectedKeys"
@drop="onDrop"
@dragend="onDragend"
:showLine="{ showLeafIcon: false }"
:show-icon="true"
>
<template #title="row">
<div class="tree-content">