fix: bug#18975、18961、16956
* fix: bug#16958 * fix: bug#18961、18962、18872 * fix: bug#18961、16956 * fix: bug#18975
This commit is contained in:
parent
1e80c57181
commit
3b3f379c03
|
@ -510,17 +510,10 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
|
||||||
reader.onload = (json) => {
|
reader.onload = (json) => {
|
||||||
if(json.target?.result){
|
if(json.target?.result){
|
||||||
const data = JSON.parse(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)
|
let check = formModel.metadata === 'jetlinks' ? requiredCheck(data) : aliCheck(data)
|
||||||
if(!check){
|
if(!check){
|
||||||
onlyMessage('操作成功!')
|
onlyMessage('操作成功!')
|
||||||
formModel.import = JSON.stringify(data);
|
formModel.import = json.target?.result;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
onlyMessage('文件内容不能为空', 'error')
|
onlyMessage('文件内容不能为空', 'error')
|
||||||
|
@ -587,7 +580,13 @@ const handleImport = async () => {
|
||||||
if (data.metadata === 'alink') {
|
if (data.metadata === 'alink') {
|
||||||
try {
|
try {
|
||||||
const _import = JSON.parse(data.import);
|
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;
|
loading.value = true;
|
||||||
const res = await convertMetadata(
|
const res = await convertMetadata(
|
||||||
'from',
|
'from',
|
||||||
|
@ -638,7 +637,15 @@ const handleImport = async () => {
|
||||||
data[data?.type === 'copy' ? 'copy' : 'import'] ||
|
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 (
|
if (
|
||||||
!(
|
!(
|
||||||
!!_object?.properties ||
|
!!_object?.properties ||
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="media-live" @mouseenter="visibleChange" @mouseleave="mouseleave">
|
<div class="media-live">
|
||||||
<div class="media-live-video">
|
<div class="media-live-video" @mouseenter="visibleChange" @mouseleave="mouseleave">
|
||||||
<div
|
<div
|
||||||
:class="mediaToolClass"
|
:class="mediaToolClass"
|
||||||
@mouseenter="showTool = true"
|
@mouseenter="showTool = true"
|
||||||
|
|
|
@ -7,6 +7,8 @@ import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
import ShareLive from '../Live/shareLive.vue';
|
import ShareLive from '../Live/shareLive.vue';
|
||||||
|
|
||||||
|
import { useSystem } from '@/store/system';
|
||||||
|
const system = useSystem();
|
||||||
const playData = ref({
|
const playData = ref({
|
||||||
deviceId: '',
|
deviceId: '',
|
||||||
channelId: '',
|
channelId: '',
|
||||||
|
@ -18,6 +20,7 @@ const playData = ref({
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
|
system.getSystemConfig()
|
||||||
const obj: any = unref(route.query) || {};
|
const obj: any = unref(route.query) || {};
|
||||||
playData.value = {
|
playData.value = {
|
||||||
deviceId: obj?.deviceId || '',
|
deviceId: obj?.deviceId || '',
|
||||||
|
|
Loading…
Reference in New Issue