diff --git a/packages/bigscreen/designer/components/Add.vue b/packages/bigscreen/designer/components/Add.vue index a4cda22d..2432e32c 100644 --- a/packages/bigscreen/designer/components/Add.vue +++ b/packages/bigscreen/designer/components/Add.vue @@ -150,27 +150,28 @@ export default { }, - methods: { - getInfo() { - let {id} = this.$route.query - id && this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenProjectDetailById?id=${id}`).then(res => { - if (res?.data) { - this.form = { - ...res.data - } - if (res.data.relationLsIds) { - this.tableData = res.data.lsList.map(v => { - let conf = JSON.parse(v.config || '') || {} - return { - id: v.id, - title: v.title, - dv: conf.custom || '', - meta: JSON.stringify(conf.meta), - isCustom: !!conf.custom, - status: v.status - } - }) - this.total = res.data.lsList.length + methods: { + getInfo() { + let {id} = this.$route.query + if (!id) return + this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenProjectDetailById?id=${id}`).then(res => { + if (res?.data) { + this.form = { + ...res.data + } + if (res.data.relationLsIds) { + this.tableData = res.data.lsList.map(v => { + let conf = JSON.parse(v.config || '') || {} + return { + id: v.id, + title: v.title, + dv: conf.custom || '', + meta: JSON.stringify(conf.meta), + isCustom: !!conf.custom, + status: v.status + } + }) + this.total = res.data.lsList.length this.$nextTick(() => { this.rowDrop() @@ -180,14 +181,13 @@ export default { }) }, - onStatusChange(id) { - id && this.instance.post(`${this.urlPrefix}/appdiylargescreen/enableLargeScreen?id=${id}`).then(res => { - if (res.code === 0) { - this.getInfo() - this.$message.success('操作成功') - } - }) - }, + onStatusChange (id) { + this.instance.post(`${this.urlPrefix}/appdiylargescreen/enableLargeScreen?id=${id}`).then(res => { + if (res.code === 0) { + this.$message.success('操作成功') + } + }) + }, rowDrop() { const tbody = document.querySelector('.el-table__body-wrapper tbody') @@ -200,21 +200,37 @@ export default { }) }, - toViewer(id) { - this.$router.push({query: {id}, hash: "#preview"}) - }, - onChange(e) { - const ids = this.tableData.map(v => v.id) - if (ids.indexOf(e.id) < 0) { - this.tableData.push({ - title: e.title, - id: e.id + toViewer(id) { + this.$router.push({query: {id}, hash: "#preview"}) + }, + onChange(e) { + const ids = this.tableData.map(v => v.id) + if (ids.indexOf(e.id) < 0) { + this.tableData.push({ + title: e.title, + id: e.id, + status: '1' + }) + } else { + const index = this.tableData.findIndex(v => v.id === e.id) + this.$set(this.tableData[index], 'title', e.title) + } + + this.$nextTick(() => { + if (this.$route.query.id) { + const ids = this.tableData.map(v => v.id).join(',') + const names = this.tableData.map(v => v.name).join(',') + this.instance.post(`${this.urlPrefix}/appdiylargescreen/addOrUpdateLargeScreenProject`, { + ...this.form, + relationLsIds: ids, + relationLsNames: names + }).then(res => { + if (res.code == 0) { + } + }) + } }) - } else { - const index = this.tableData.findIndex(v => v.id === e.id) - this.$set(this.tableData[index], 'title', e.title) - } - }, + }, add() { this.query = { diff --git a/packages/bigscreen/designer/components/Layout.vue b/packages/bigscreen/designer/components/Layout.vue index 131c06b6..f9cc3d31 100644 --- a/packages/bigscreen/designer/components/Layout.vue +++ b/packages/bigscreen/designer/components/Layout.vue @@ -919,6 +919,7 @@ export default { flex: 1; padding: 0 10px; background: #0A0B0D; + overflow-y: auto; .layout-left__right--item { margin-top: 10px; diff --git a/project/sass/apps/AnnounceResident/AppAnnounceResident/components/Add.vue b/project/sass/apps/AnnounceResident/AppAnnounceResident/components/Add.vue index 6f7e403c..d5d52c2e 100644 --- a/project/sass/apps/AnnounceResident/AppAnnounceResident/components/Add.vue +++ b/project/sass/apps/AnnounceResident/AppAnnounceResident/components/Add.vue @@ -91,6 +91,12 @@
{{ form.examines.length ? '重新选择' : '选择' }}
+ + + + + +
diff --git a/project/sass/apps/AnnounceResident/AppAnnounceResident/components/Detail.vue b/project/sass/apps/AnnounceResident/AppAnnounceResident/components/Detail.vue index 7396255c..61176b59 100644 --- a/project/sass/apps/AnnounceResident/AppAnnounceResident/components/Detail.vue +++ b/project/sass/apps/AnnounceResident/AppAnnounceResident/components/Detail.vue @@ -67,15 +67,9 @@ - - + - - +