Commit 2c59f546 by web

feat: 照片墙

1 parent f71c4f22
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0",
"@vue/composition-api": "^1.0.0-rc.11", "@vue/composition-api": "^1.0.0-rc.11",
"@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-prettier": "^6.0.0",
"babel-core": "^6.26.0", "babel-core": "^6.26.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-loader": "^7.1.2", "babel-loader": "^7.1.2",
"babel-plugin-component": "^1.1.1", "babel-plugin-component": "^1.1.1",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0", "babel-preset-env": "^1.6.0",
"babel-preset-stage-3": "^6.24.1", "babel-preset-stage-3": "^6.24.1",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
......
...@@ -345,7 +345,7 @@ export default { ...@@ -345,7 +345,7 @@ export default {
// 获取是否含有照片题 // 获取是否含有照片题
getImageQuestionCount() { getImageQuestionCount() {
return { return {
data: { data: 2, message: '操作成功', status: '1' } data: { data: 1, message: '操作成功', status: '1' }
}; };
}, },
// 当期BI-保持选择的图片 // 当期BI-保持选择的图片
......
/* /*
* @Description: * @Description:
* @LastEditors: jml
* @Date: 2021-01-28 23:29:19 * @Date: 2021-01-28 23:29:19
*/ */
import 'babel-polyfill';
import Vue from 'vue'; import Vue from 'vue';
import App from './App'; import App from './App';
import Xrk from './lib/index.js'; import Xrk from './lib/index.js';
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
selectImgSave(e) { selectImgSave(e) {
this.$emit('input', { this.$emit('input', {
...this.value, ...this.value,
imageUrls: [...e] imageUrls: e
}); });
}, },
// 选择样式的保存 // 选择样式的保存
......
...@@ -10,15 +10,15 @@ ...@@ -10,15 +10,15 @@
<el-dialog <el-dialog
title="选择图片" title="选择图片"
:visible.sync="selectImgShow" :visible.sync="selectImgShow"
width="36%" width="700px"
center center
:before-close="handleClose" :before-close="handleClose"
> >
<div class="select-img-main"> <div class="select-img-main">
<div <div
class="select-img-item" class="select-img-item"
v-for="item in imgWallPageList" v-for="(item, index) in imgWallPageList"
:key="item.imageUrl" :key="item.imageUrl + index"
> >
<el-checkbox <el-checkbox
:disabled="selectSum >= 50 && item.isSelect === 0" :disabled="selectSum >= 50 && item.isSelect === 0"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-dialog <el-dialog
title="选择样式" title="选择样式"
:visible.sync="selectStyleShow" :visible.sync="selectStyleShow"
width="25%" width="400px"
center center
:before-close="handleClose" :before-close="handleClose"
> >
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: jml * @Author: jml
* @Date: 2021-02-26 15:38:10 * @Date: 2021-02-26 15:38:10
* @LastEditTime: 2022-05-18 18:35:06 * @LastEditTime: 2022-05-19 15:07:27
--> -->
<template> <template>
<div class="xrk-components-bi bi" :class="{ 'bi-print': print }"> <div class="xrk-components-bi bi" :class="{ 'bi-print': print }">
...@@ -82,21 +82,31 @@ export default { ...@@ -82,21 +82,31 @@ export default {
type: Function, type: Function,
default: () => {} default: () => {}
}, },
// 当期BI-保持选择的图片
saveBiPicList: { saveBiPicList: {
type: Function, type: Function,
default: () => {} default: () => {}
}, },
// 当期BI-任务记录图片列表
getTaskPicList: { getTaskPicList: {
type: Function, type: Function,
default: () => {} default: () => {}
}, },
// 照片墙获取50张图片
getImageList: { getImageList: {
type: Function, type: Function,
default: () => {} default: () => {}
}, },
// 获取是否含有照片题
getImageQuestionCount: { getImageQuestionCount: {
type: Function, type: Function,
default: () => {} default: () => {
return {
data: {
data: 0
}
};
}
} }
}, },
components: { components: {
......
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
title: { title: {
name: '照片墙' name: '照片墙'
}, },
has: true, has: false, // true有图片题,false无
isDelete: 0, isDelete: 0,
imageStyle: 2, //展示样式 1 流式 2平铺 imageStyle: 2, //展示样式 1 流式 2平铺
imageSize: 2, //图片大小 1 大 2中 3小 imageSize: 2, //图片大小 1 大 2中 3小
...@@ -526,15 +526,23 @@ export default { ...@@ -526,15 +526,23 @@ export default {
), ),
makeSceneGroupDetails: chartConfigToSetInfo(this.singleChoiceMixin) makeSceneGroupDetails: chartConfigToSetInfo(this.singleChoiceMixin)
}), }),
this.Bi.saveBiPicList({ ...(this.taskImageInfo.has && [
biInfoImageJson: JSON.stringify({ this.Bi.saveBiPicList({
biInfoId: 1, biInfoId,
taskId: 1, isDelete: this.taskImageInfo.isDelete,
imageUrl: 'http://image', ...(!this.taskImageInfo.isDelete && {
imageStyle: 1, biInfoImageJson: JSON.stringify(
imageSize: 1 this.taskImageInfo.imageUrls.map(item => {
return {
...item,
imageStyle: this.taskImageInfo.imageStyle,
imageSize: this.taskImageInfo.imageSize
};
})
)
})
}) })
}) ])
]).then(() => { ]).then(() => {
resolve(); resolve();
}); });
...@@ -551,7 +559,8 @@ export default { ...@@ -551,7 +559,8 @@ export default {
this.Bi.getTopicInfo(), this.Bi.getTopicInfo(),
this.Bi.getGroupInfo(), this.Bi.getGroupInfo(),
this.Bi.getTemplateList(), this.Bi.getTemplateList(),
this.Bi.getImageList() this.Bi.getImageList(),
this.Bi.getImageQuestionCount()
]) ])
.then( .then(
([ ([
...@@ -560,14 +569,20 @@ export default { ...@@ -560,14 +569,20 @@ export default {
topicInfo, topicInfo,
topicMixinInfo, topicMixinInfo,
tempaletList = { data: { data: [] } }, tempaletList = { data: { data: [] } },
taskImageInfo taskImageInfo,
imageQuestionCount
]) => { ]) => {
const hasImageQuestion = imageQuestionCount.data.data > 0;
this.dealBaseInfo(baseInfo.data.data[0] || {}); this.dealBaseInfo(baseInfo.data.data[0] || {});
this.dealFixedInfo(fixedInfo.data.data || []); this.dealFixedInfo(fixedInfo.data.data || []);
this.dealChoice(topicInfo.data.data || []); this.dealChoice(topicInfo.data.data || []);
this.dealChoiceMixin(topicMixinInfo.data.data || []); this.dealChoiceMixin(topicMixinInfo.data.data || []);
this.coverList = tempaletList.data.data || []; this.coverList = tempaletList.data.data || [];
Object.assign(this.taskImageInfo, taskImageInfo.data.data); if (hasImageQuestion) {
Object.assign(this.taskImageInfo, taskImageInfo.data.data, {
has: hasImageQuestion
});
}
this.$nextTick(async () => { this.$nextTick(async () => {
await this.preloadImg(this.coverUrl); await this.preloadImg(this.coverUrl);
window.status = '1'; window.status = '1';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!