@@ -202,6 +226,10 @@ export default {
mapData: {
type: String,
default: null
+ },
+ mapSpacing: {
+ type: String,
+ default: null
}
},
data() {
@@ -210,11 +238,13 @@ export default {
btnLoading: false,
deleteLoading: false,
areaForm: {
- map_data: null
+ map_data: null,
+ map_spacing: null
},
editStatus: {
areaForm: {
- map_data: false
+ map_data: false,
+ map_spacing: false
}
},
originalValues: {
@@ -271,10 +301,17 @@ export default {
this.areaForm.map_data = newVal
this.originalValues.areaForm.map_data = newVal
}
+ },
+ mapSpacing(newVal) {
+ if (newVal !== this.areaForm.map_spacing) {
+ this.areaForm.map_spacing = newVal
+ this.originalValues.areaForm.map_spacing = newVal
+ }
}
},
created() {
this.areaForm.map_data = this.mapData
+ this.areaForm.map_spacing = this.mapSpacing
},
mounted() {
this.$emit('ready')
@@ -316,7 +353,7 @@ export default {
submitMapData(formName, field) {
const value = this[formName][field]
if (!value) {
- this.$message.warning(`GeoJSON不能为空`)
+ this.$message.warning(`${this.getFieldLabel(formName, field)}不能为空`)
this[formName][field] = this.originalValues[formName][field]
return
}
@@ -329,17 +366,26 @@ export default {
FetchEditScreenSetting(param)
.then((res) => {
if (res.code !== 500) {
- this.$message.success('GeoJSON更新成功')
+ this.$message.success(`${this.getFieldLabel(formName, field)}更新成功`)
this.$emit('update:mapData', value)
this.$emit('triggerInit')
} else {
- this.$message.error('GeoJSON更新失败')
+ this.$message.error(`${this.getFieldLabel(formName, field)}更新失败`)
}
})
.catch(() => {
- this.$message.error('GeoJSON更新失败')
+ this.$message.error(`${this.getFieldLabel(formName, field)}更新失败`)
})
},
+ getFieldLabel(formName, field) {
+ const labels = {
+ areaForm: {
+ map_data: 'GeoJSON',
+ map_spacing: '地图边距微调'
+ }
+ }
+ return labels[formName][field] || field
+ },
handleCover(value) {
if (value) {
const imgUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + value
@@ -509,23 +555,29 @@ export default {
diff --git a/src/views/digitalScreen/module/bookRecommend.vue b/src/views/digitalScreen/module/bookRecommend.vue
index f5471a1..e171652 100644
--- a/src/views/digitalScreen/module/bookRecommend.vue
+++ b/src/views/digitalScreen/module/bookRecommend.vue
@@ -1,29 +1,30 @@
-
-
图书推荐
-
-
推荐列表
-
-
-
+
+
图书推荐
+
+
推荐列表
+
+
+
-
-
![图书封面]()
-
-
-
+
+
![图书封面]()
+
-
-
-
-
+
+
+
+
+
+ 图书上传
+
+
+ 批量删除
+
+
+
-
- 图书上传
-
-
- 批量删除
-
-
-
+
diff --git a/src/views/digitalScreen/module/mediaSetting.vue b/src/views/digitalScreen/module/mediaSetting.vue
index f4fafbc..210a3ea 100644
--- a/src/views/digitalScreen/module/mediaSetting.vue
+++ b/src/views/digitalScreen/module/mediaSetting.vue
@@ -341,6 +341,7 @@ export default {
} else {
this.noticeTitle = '编辑通知'
this.form = data
+ this.form.context = data.context.replace(/
/g, '\n')
}
this.noticeDialogVisible = true
} else {
@@ -375,6 +376,7 @@ export default {
this.btnLoading = true
if (form === 'form') {
this.form.libcode = this.user.fonds.fondsNo
+ this.form.context = this.form.context.replace(/\n/g, '
')
console.log(this.form)
FetchEditScreenNotice(this.form).then((res) => {
if (res.code !== 500) {