Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
jml0128
/
xrk-bi
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2c59f546
authored
May 19, 2022
by
web
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 照片墙
1 parent
f71c4f22
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
22 deletions
package.json
src/App.vue
src/main.js
src/packages/bi/src/components/photo-wall/index.vue
src/packages/bi/src/components/photo-wall/select.vue
src/packages/bi/src/components/photo-wall/style.vue
src/packages/bi/src/main.vue
src/packages/bi/src/project/20-configurable.vue
package.json
View file @
2c59f54
...
...
@@ -32,13 +32,13 @@
},
"devDependencies"
:
{
"@vue/cli-plugin-eslint"
:
"~4.5.0"
,
"@vue/composition-api"
:
"^1.0.0-rc.11"
,
"@vue/eslint-config-prettier"
:
"^6.0.0"
,
"babel-core"
:
"^6.26.0"
,
"babel-eslint"
:
"^10.1.0"
,
"babel-loader"
:
"^7.1.2"
,
"babel-plugin-component"
:
"^1.1.1"
,
"babel-polyfill"
:
"^6.26.0"
,
"babel-preset-env"
:
"^1.6.0"
,
"babel-preset-stage-3"
:
"^6.24.1"
,
"cross-env"
:
"^5.2.1"
,
...
...
src/App.vue
View file @
2c59f54
...
...
@@ -345,7 +345,7 @@ export default {
// 获取是否含有照片题
getImageQuestionCount
()
{
return
{
data
:
{
data
:
2
,
message
:
'操作成功'
,
status
:
'1'
}
data
:
{
data
:
1
,
message
:
'操作成功'
,
status
:
'1'
}
};
},
// 当期BI-保持选择的图片
...
...
src/main.js
View file @
2c59f54
/*
* @Description:
* @LastEditors: jml
* @Date: 2021-01-28 23:29:19
*/
import
'babel-polyfill'
;
import
Vue
from
'vue'
;
import
App
from
'./App'
;
import
Xrk
from
'./lib/index.js'
;
...
...
src/packages/bi/src/components/photo-wall/index.vue
View file @
2c59f54
...
...
@@ -76,7 +76,7 @@ export default {
selectImgSave
(
e
)
{
this
.
$emit
(
'input'
,
{
...
this
.
value
,
imageUrls
:
[...
e
]
imageUrls
:
e
});
},
// 选择样式的保存
...
...
src/packages/bi/src/components/photo-wall/select.vue
View file @
2c59f54
...
...
@@ -10,15 +10,15 @@
<el-dialog
title=
"选择图片"
:visible
.
sync=
"selectImgShow"
width=
"
36%
"
width=
"
700px
"
center
:before-close=
"handleClose"
>
<div
class=
"select-img-main"
>
<div
class=
"select-img-item"
v-for=
"
item
in imgWallPageList"
:key=
"item.imageUrl"
v-for=
"
(item, index)
in imgWallPageList"
:key=
"item.imageUrl
+ index
"
>
<el-checkbox
:disabled=
"selectSum >= 50 && item.isSelect === 0"
...
...
src/packages/bi/src/components/photo-wall/style.vue
View file @
2c59f54
...
...
@@ -10,7 +10,7 @@
<el-dialog
title=
"选择样式"
:visible
.
sync=
"selectStyleShow"
width=
"
25%
"
width=
"
400px
"
center
:before-close=
"handleClose"
>
...
...
src/packages/bi/src/main.vue
View file @
2c59f54
...
...
@@ -2,7 +2,7 @@
* @Description:
* @Author: jml
* @Date: 2021-02-26 15:38:10
* @LastEditTime: 2022-05-1
8 18:35:06
* @LastEditTime: 2022-05-1
9 15:07:27
-->
<
template
>
<div
class=
"xrk-components-bi bi"
:class=
"
{ 'bi-print': print }">
...
...
@@ -82,21 +82,31 @@ export default {
type
:
Function
,
default
:
()
=>
{}
},
// 当期BI-保持选择的图片
saveBiPicList
:
{
type
:
Function
,
default
:
()
=>
{}
},
// 当期BI-任务记录图片列表
getTaskPicList
:
{
type
:
Function
,
default
:
()
=>
{}
},
// 照片墙获取50张图片
getImageList
:
{
type
:
Function
,
default
:
()
=>
{}
},
// 获取是否含有照片题
getImageQuestionCount
:
{
type
:
Function
,
default
:
()
=>
{}
default
:
()
=>
{
return
{
data
:
{
data
:
0
}
};
}
}
},
components
:
{
...
...
src/packages/bi/src/project/20-configurable.vue
View file @
2c59f54
...
...
@@ -142,7 +142,7 @@ export default {
title
:
{
name
:
'照片墙'
},
has
:
true
,
has
:
false
,
// true有图片题,false无
isDelete
:
0
,
imageStyle
:
2
,
//展示样式 1 流式 2平铺
imageSize
:
2
,
//图片大小 1 大 2中 3小
...
...
@@ -526,15 +526,23 @@ export default {
),
makeSceneGroupDetails
:
chartConfigToSetInfo
(
this
.
singleChoiceMixin
)
}),
this
.
Bi
.
saveBiPicList
({
biInfoImageJson
:
JSON
.
stringify
({
biInfoId
:
1
,
taskId
:
1
,
imageUrl
:
'http://image'
,
imageStyle
:
1
,
imageSize
:
1
...(
this
.
taskImageInfo
.
has
&&
[
this
.
Bi
.
saveBiPicList
({
biInfoId
,
isDelete
:
this
.
taskImageInfo
.
isDelete
,
...(
!
this
.
taskImageInfo
.
isDelete
&&
{
biInfoImageJson
:
JSON
.
stringify
(
this
.
taskImageInfo
.
imageUrls
.
map
(
item
=>
{
return
{
...
item
,
imageStyle
:
this
.
taskImageInfo
.
imageStyle
,
imageSize
:
this
.
taskImageInfo
.
imageSize
};
})
)
})
})
}
)
]
)
]).
then
(()
=>
{
resolve
();
});
...
...
@@ -551,7 +559,8 @@ export default {
this
.
Bi
.
getTopicInfo
(),
this
.
Bi
.
getGroupInfo
(),
this
.
Bi
.
getTemplateList
(),
this
.
Bi
.
getImageList
()
this
.
Bi
.
getImageList
(),
this
.
Bi
.
getImageQuestionCount
()
])
.
then
(
([
...
...
@@ -560,14 +569,20 @@ export default {
topicInfo
,
topicMixinInfo
,
tempaletList
=
{
data
:
{
data
:
[]
}
},
taskImageInfo
taskImageInfo
,
imageQuestionCount
])
=>
{
const
hasImageQuestion
=
imageQuestionCount
.
data
.
data
>
0
;
this
.
dealBaseInfo
(
baseInfo
.
data
.
data
[
0
]
||
{});
this
.
dealFixedInfo
(
fixedInfo
.
data
.
data
||
[]);
this
.
dealChoice
(
topicInfo
.
data
.
data
||
[]);
this
.
dealChoiceMixin
(
topicMixinInfo
.
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
()
=>
{
await
this
.
preloadImg
(
this
.
coverUrl
);
window
.
status
=
'1'
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment