大屏应用位置整合
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<template slot="title">
|
||||
<ai-title :title="id ? '编辑项目' : '添加项目'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
<ai-title :title="id ? '编辑项目' : '添加项目'" isShowBack isShowBottomBorder @onBackClick="cancel"/>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<el-form ref="form" :model="form" label-width="110px" label-position="right">
|
||||
@@ -64,14 +63,6 @@
|
||||
:theme="config.theme"
|
||||
@close="isShowLayout = false">
|
||||
</Layout>
|
||||
<ai-dv-wrapper :views="[{label: '返回'}]" :theme="config.theme" @change="screenId = false" v-if="screenId" :title="form.name">
|
||||
<ai-dv-background
|
||||
:theme="config.theme"
|
||||
v-if="config.length || config.theme === '1'"
|
||||
:src="config.theme === '1' ? 'https://cdn.cunwuyun.cn/dvcp/dv/img/dj-bg.png' : config.backgroundImage[0].url">
|
||||
</ai-dv-background>
|
||||
<app-gigscreen-viewer :urlPrefix="urlPrefix" :instance="instance" :dict="dict" :id="screenId"/>
|
||||
</ai-dv-wrapper>
|
||||
<ai-dialog :visible.sync="dialog" title="定制大屏" @closed="custom={}" @onConfirm="handleCustomizedDV">
|
||||
<el-form ref="CustomDVFrom" size="small" :model="custom" :rules="rules" label-width="80px">
|
||||
<el-form-item label="大屏标题" prop="title">
|
||||
@@ -103,7 +94,6 @@ export default {
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object,
|
||||
urlPrefix: String
|
||||
},
|
||||
inject: {
|
||||
@@ -145,24 +135,18 @@ export default {
|
||||
|
||||
created() {
|
||||
this.dict.load('customizedDVs')
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
this.getInfo()
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo(id) {
|
||||
getInfo() {
|
||||
let {id} = this.$route.query
|
||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenProjectDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res?.data) {
|
||||
this.form = {
|
||||
...res.data
|
||||
}
|
||||
|
||||
if (res.data.relationLsIds) {
|
||||
this.tableData = res.data.lsList.map(v => {
|
||||
let conf = JSON.parse(v.config || '') || {}
|
||||
@@ -195,14 +179,8 @@ export default {
|
||||
},
|
||||
|
||||
toViewer(id) {
|
||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenDetailById?id=${id}`).then(res => {
|
||||
if (res.data) {
|
||||
this.config = JSON.parse(res.data.config).dashboard
|
||||
}
|
||||
})
|
||||
this.screenId = id
|
||||
this.$router.push({query: {id}, hash: "#preview"})
|
||||
},
|
||||
|
||||
onChange(e) {
|
||||
const ids = this.tableData.map(v => v.id)
|
||||
if (ids.indexOf(e.id) < 0) {
|
||||
@@ -260,7 +238,7 @@ export default {
|
||||
|
||||
this.home && this.home.refreshDvOptions && this.home.refreshDvOptions()
|
||||
setTimeout(() => {
|
||||
this.cancel(true)
|
||||
this.cancel()
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
@@ -268,11 +246,8 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
cancel(isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
cancel() {
|
||||
this.$router.push({})
|
||||
},
|
||||
|
||||
handleCustomizedDV() {
|
||||
|
||||
Reference in New Issue
Block a user