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 3c08803f
authored
May 23, 2022
by
web
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加布局组件,修改图片宽高
1 parent
1ae83f26
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
24 deletions
package.json
src/App.vue
src/main.js
src/packages/bi/src/components/photo-wall/del.vue
src/packages/bi/src/components/photo-wall/images.vue
src/packages/bi/src/components/photo-wall/index.vue
src/packages/bi/src/main.vue
package.json
View file @
3c08803
{
{
"name"
:
"xrk-bi"
,
"name"
:
"xrk-bi"
,
"version"
:
"0.3.0-beta.2
2
"
,
"version"
:
"0.3.0-beta.2
3
"
,
"description"
:
"xrk-bi"
,
"description"
:
"xrk-bi"
,
"author"
:
"xrk"
,
"author"
:
"xrk"
,
"main"
:
"dist/bundler.js"
,
"main"
:
"dist/bundler.js"
,
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
"vue"
:
"^2.5.11"
,
"vue"
:
"^2.5.11"
,
"vue-awesome-swiper"
:
"^4.1.1"
,
"vue-awesome-swiper"
:
"^4.1.1"
,
"vue-echarts"
:
"^6.0.0-rc.5"
,
"vue-echarts"
:
"^6.0.0-rc.5"
,
"vue-waterfall2"
:
"^1.10.1"
,
"vuedraggable"
:
"^2.24.3"
"vuedraggable"
:
"^2.24.3"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
...
...
src/App.vue
View file @
3c08803
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
:mobile=
"isMobile"
:mobile=
"isMobile"
:print=
"isPrint"
:print=
"isPrint"
:projectType=
"projectType"
:projectType=
"projectType"
:selectType=
"selectType"
></component>
></component>
<!--
<XrkTaskRecordPdf
:projectType=
"20"
:taskId=
"1209388"
:from=
"1"
/>
-->
</div>
</div>
<!--
<ul
class=
"pervie"
>
<!--
<ul
class=
"pervie"
>
<li
name=
"任务记录"
>
<li
name=
"任务记录"
>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<
script
>
<
script
>
import
{
getQueryVariable
}
from
'./packages/bi/src/chart-type/common'
;
import
{
getQueryVariable
}
from
'./packages/bi/src/chart-type/common'
;
// import { XrkTaskRecordPdf } from './packages/task-recored/index';
export
default
{
export
default
{
name
:
'App'
,
name
:
'App'
,
data
()
{
data
()
{
...
@@ -44,7 +44,8 @@ export default {
...
@@ -44,7 +44,8 @@ export default {
isMobile
:
+
getQueryVariable
(
'mobile'
)
===
1
,
isMobile
:
+
getQueryVariable
(
'mobile'
)
===
1
,
isPrint
:
+
getQueryVariable
(
'print'
)
===
1
,
isPrint
:
+
getQueryVariable
(
'print'
)
===
1
,
projectType
:
+
getQueryVariable
(
'projectType'
)
||
6
,
projectType
:
+
getQueryVariable
(
'projectType'
)
||
6
,
componentName
:
getQueryVariable
(
'componentName'
)
||
'XrkBi'
componentName
:
getQueryVariable
(
'componentName'
)
||
'XrkBi'
,
selectType
:
+
getQueryVariable
(
'selectType'
)
||
45
// 44自定义-BI报告 45当期-BI报告 46累计-BI报告
};
};
}
}
};
};
...
...
src/main.js
View file @
3c08803
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
* @Description:
* @Description:
* @Date: 2021-01-28 23:29:19
* @Date: 2021-01-28 23:29:19
*/
*/
import
'babel-polyfill'
;
//
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'
;
import
waterfall
from
'vue-waterfall2'
;
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
Vue
.
use
(
Xrk
);
Vue
.
use
(
Xrk
);
Vue
.
use
(
waterfall
);
/* eslint-disable no-new */
/* eslint-disable no-new */
new
Vue
({
new
Vue
({
...
...
src/packages/bi/src/components/photo-wall/del.vue
View file @
3c08803
...
@@ -3,10 +3,15 @@
...
@@ -3,10 +3,15 @@
* @Date: 2022-05-13 09:41:06
* @Date: 2022-05-13 09:41:06
-->
-->
<
template
>
<
template
>
<el-button
@
click=
"handleRemove"
class=
"bi-photo_btn"
>
<div>
<img
src=
"http://cdn.yxvzb.com/WEB/SaaS/images/bi/svg/delete.svg"
alt=
""
/>
<el-button
@
click=
"handleRemove"
class=
"bi-photo_btn"
>
删除
<img
</el-button>
src=
"http://cdn.yxvzb.com/WEB/SaaS/images/bi/svg/delete.svg"
alt=
""
/>
删除
</el-button>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/packages/bi/src/components/photo-wall/images.vue
View file @
3c08803
<
template
>
<
template
>
<ul
:style=
"
{ columnCount }">
<
!--
<
ul
:style=
"
{ columnCount }">
<li
v-for=
"(item, index) in taskImageInfo.imageUrls"
:key=
"index"
>
<li
v-for=
"(item, index) in taskImageInfo.imageUrls"
:key=
"index"
>
<img
:src=
"setUrl(item.imageUrl)"
/>
<img
:src=
"setUrl(item.imageUrl)"
/>
</li>
</li>
</ul>
</ul>
-->
<waterfall
:col=
"columnCount"
:data=
"taskImageInfo.imageUrls"
>
<template>
<div
v-for=
"(item, index) in taskImageInfo.imageUrls"
:key=
"index"
>
<img
:style=
"
{ width: widthPx, height: heightPx }"
:src="setUrl(item.imageUrl)"
/>
</div>
</
template
>
</waterfall>
</template>
</template>
<
script
>
<
script
>
...
@@ -49,9 +59,12 @@ export default {
...
@@ -49,9 +59,12 @@ export default {
width
()
{
width
()
{
return
IMG_MAPPING
[
this
.
taskImageInfo
.
imageSize
].
width
;
return
IMG_MAPPING
[
this
.
taskImageInfo
.
imageSize
].
width
;
},
},
height
()
{
widthPx
()
{
return
this
.
width
+
'px'
;
},
heightPx
()
{
if
(
this
.
taskImageInfo
.
imageStyle
===
2
)
{
if
(
this
.
taskImageInfo
.
imageStyle
===
2
)
{
return
this
.
width
;
return
this
.
width
Px
;
}
}
return
'auto'
;
return
'auto'
;
}
}
...
@@ -98,12 +111,17 @@ ul {
...
@@ -98,12 +111,17 @@ ul {
//
flex-wrap
:
wrap
;
//
flex-wrap
:
wrap
;
column-count
:
3
;
column-count
:
3
;
column-gap
:
0
;
column-gap
:
0
;
img
{
margin
:
10px
;
li
{
//
大548px
中355px
小262px
break-inside
:
avoid
;
//
width
:
358px
;
img
{
//
height
:
358px
;
max-height
:
588px
;
//
object-fit
:
fill
;
margin
:
10px
;
//
大548px
中355px
小262px
//
width
:
358px
;
//
height
:
358px
;
//
object-fit
:
fill
;
}
}
}
}
}
</
style
>
</
style
>
src/packages/bi/src/components/photo-wall/index.vue
View file @
3c08803
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
<template
#
handler
>
<template
#
handler
>
<div
class=
"bi-title-photo-btn"
v-if=
"!isPrint"
>
<div
class=
"bi-title-photo-btn"
v-if=
"!isPrint"
>
<SelectStyle
<SelectStyle
style=
"margin: 0 5px"
v-if=
"showEdit"
:layout=
"
{
:layout=
"
{
imageStyle: value.imageStyle,
imageStyle: value.imageStyle,
imageSize: value.imageSize
imageSize: value.imageSize
...
@@ -15,10 +17,12 @@
...
@@ -15,10 +17,12 @@
@handleSave="selectStyleSave"
@handleSave="selectStyleSave"
/>
/>
<SelectImages
<SelectImages
style=
"margin: 0 5px"
v-if=
"showEdit"
:imageUrls=
"value.imageUrls"
:imageUrls=
"value.imageUrls"
@
handleSave=
"selectImgSave"
@
handleSave=
"selectImgSave"
/>
/>
<Del
@
del=
"onDel"
/>
<Del
style=
"margin: 0 5px"
@
del=
"onDel"
/>
</div>
</div>
</
template
>
</
template
>
</BiTitle>
</BiTitle>
...
@@ -70,7 +74,11 @@ export default {
...
@@ -70,7 +74,11 @@ export default {
default
:
4
default
:
4
}
}
},
},
computed
:
{
showEdit
()
{
return
+
this
.
Bi
.
selectType
===
45
;
// 44自定义-BI报告 45当期-BI报告(显示样式、选择) 46累计-BI报告
}
},
methods
:
{
methods
:
{
// 选择图片的保存
// 选择图片的保存
selectImgSave
(
e
)
{
selectImgSave
(
e
)
{
...
@@ -144,6 +152,6 @@ export default {
...
@@ -144,6 +152,6 @@ export default {
.bi-title-photo-btn
{
.bi-title-photo-btn
{
display
:
flex
;
display
:
flex
;
width
:
320px
;
width
:
320px
;
justify-content
:
space-between
;
justify-content
:
flex-end
;
}
}
</
style
>
</
style
>
src/packages/bi/src/main.vue
View file @
3c08803
...
@@ -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-
19 15:25:49
* @LastEditTime: 2022-05-
23 10:46:24
-->
-->
<
template
>
<
template
>
<div
class=
"xrk-components-bi bi"
:class=
"
{ 'bi-print': print }">
<div
class=
"xrk-components-bi bi"
:class=
"
{ 'bi-print': print }">
...
@@ -58,6 +58,7 @@ export default {
...
@@ -58,6 +58,7 @@ export default {
cantEdit
:
[
Number
,
String
],
cantEdit
:
[
Number
,
String
],
projectType
:
[
Number
,
String
],
projectType
:
[
Number
,
String
],
from
:
[
Number
,
String
],
from
:
[
Number
,
String
],
selectType
:
Number
,
// 44自定义-BI报告 45当期-BI报告 46累计-BI报告
getBaseInfo
:
{
getBaseInfo
:
{
type
:
Function
,
type
:
Function
,
default
:
()
=>
{}
default
:
()
=>
{}
...
...
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