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 153662f2
authored
Apr 28, 2022
by
web
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/数字问卷' into 'develop'
Feature/数字问卷 See merge request
!13
2 parents
0df2440a
c14a8ff4
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
345 additions
and
196 deletions
package.json
src/packages/bi/src/chart-type/map/createMap.js
src/packages/bi/src/commonComponents/article.vue
src/packages/bi/src/components/singleChoice.vue
src/packages/bi/src/components/singleChoiceInfo.vue
src/packages/bi/src/mock/index.js
src/packages/bi/src/project/21-digitalQuestionnaire.vue
src/packages/task-recored/src/components/configurable.vue → src/packages/task-recored/src/components/base/configurable.vue
src/packages/task-recored/src/components/footer.vue → src/packages/task-recored/src/components/base/footer.vue
src/packages/task-recored/src/components/header.vue → src/packages/task-recored/src/components/base/header.vue
src/packages/task-recored/src/digital-promotion.vue
src/packages/task-recored/src/main.vue
src/packages/task-recored/src/project-scene/digital-questionnaire.vue
src/packages/task-recored/src/project-scene/edit-scene.vue
src/packages/task-recored/src/style/index.css
src/utils/http.js
package.json
View file @
153662f
{
{
"name"
:
"xrk-bi"
,
"name"
:
"xrk-bi"
,
"version"
:
"0.3.0-beta.
9
"
,
"version"
:
"0.3.0-beta.
10
"
,
"description"
:
"xrk-bi"
,
"description"
:
"xrk-bi"
,
"author"
:
"xrk"
,
"author"
:
"xrk"
,
"main"
:
"dist/bundler.js"
,
"main"
:
"dist/bundler.js"
,
...
...
src/packages/bi/src/chart-type/map/createMap.js
View file @
153662f
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
* @Date: 2021-06-20 01:16:17
* @Date: 2021-06-20 01:16:17
*/
*/
export
const
createMap
=
(
Vue
,
chartData
)
=>
{
export
const
createMap
=
(
Vue
,
chartData
)
=>
{
console
.
log
(
chartData
);
return
{
return
{
visualMap
:
{
visualMap
:
{
borderColor
:
'#fff'
,
borderColor
:
'#fff'
,
...
@@ -65,7 +64,6 @@ export const createMap = (Vue, chartData) => {
...
@@ -65,7 +64,6 @@ export const createMap = (Vue, chartData) => {
};
};
export
const
createMapScatter
=
(
Vue
,
chartData
)
=>
{
export
const
createMapScatter
=
(
Vue
,
chartData
)
=>
{
console
.
log
(
chartData
);
return
{
return
{
geo
:
[
geo
:
[
{
{
...
...
src/packages/bi/src/commonComponents/article.vue
View file @
153662f
<!--
<!--
* @Description:
* @Date: 2022-04-20 15:31:47
-->
<!--
* @Description: file content
* @Description: file content
* @Author: jml
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-2
0 15:50:05
* @LastEditTime: 2022-04-2
7 20:29:19
-->
-->
<
template
>
<
template
>
<div>
<div>
<BiBlank
height=
"40"
:usePrint=
"true"
></BiBlank>
<BiBlank
height=
"40"
:usePrint=
"true"
></BiBlank>
<div
v-html=
"content"
></div>
<div
class=
"bi-article"
v-html=
"content"
></div>
<BiBlank
height=
"40"
:usePrint=
"true"
></BiBlank>
<BiBlank
height=
"40"
:usePrint=
"true"
></BiBlank>
</div>
</div>
</
template
>
</
template
>
...
@@ -40,17 +36,16 @@ export default {
...
@@ -40,17 +36,16 @@ export default {
created
()
{}
created
()
{}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
.bi-sex-icon
{
.bi-article
{
text-align
:
center
;
line-height
:
1.5
;
padding-top
:
110px
;
width
:
1000px
;
height
:
350px
;
margin
:
0
auto
;
&_item
{
img,
display
:
inline-block
;
video
{
margin
:
0
45px
;
width
:
100%
;
p
{
object-fit
:
contain
;
margin-top
:
15px
;
height
:
100%
;
}
}
}
}
}
</
style
>
</
style
>
src/packages/bi/src/components/singleChoice.vue
View file @
153662f
...
@@ -115,6 +115,8 @@ import eventBus from '../eventBus/index';
...
@@ -115,6 +115,8 @@ import eventBus from '../eventBus/index';
import
mixin
from
'../mixin/index'
;
import
mixin
from
'../mixin/index'
;
import
{
getQueryVariable
}
from
'../chart-type/common'
;
import
{
getQueryVariable
}
from
'../chart-type/common'
;
const
baseHeight
=
1697
;
const
baseScale
=
1.1
;
export
default
{
export
default
{
name
:
'bi-single-choice'
,
name
:
'bi-single-choice'
,
mixins
:
[
mixin
],
mixins
:
[
mixin
],
...
@@ -179,86 +181,62 @@ export default {
...
@@ -179,86 +181,62 @@ export default {
this
.
drag
=
false
;
this
.
drag
=
false
;
this
.
$emit
(
'sort'
,
this
.
copySingleChoice
);
this
.
$emit
(
'sort'
,
this
.
copySingleChoice
);
},
},
getPageSize
()
{
getArticleHeight
(
startHeight
,
parentElement
)
{
const
topDom
=
(
this
.
$slots
.
default
||
[{}])[
0
].
elm
||
{
const
blankDoms
=
parentElement
.
querySelectorAll
(
'div.bi-blank'
);
offsetHeight
:
0
const
titleDom
=
parentElement
.
querySelector
(
'div.bi-chart-title'
);
};
const
contentDoms
=
parentElement
.
querySelectorAll
(
'div.bi-article>div'
);
const
domArr
=
[
const
{
totalHeight
}
=
[
{
blankDoms
[
0
],
$el
:
topDom
titleDom
,
},
blankDoms
[
1
],
...(
this
.
$refs
[
'bi-single-choice_item'
]
||
[]).
map
(
item
=>
{
...
contentDoms
,
let
height
=
0
;
blankDoms
[
2
],
item
.
pervPage
=
item
.
$children
.
reduce
((
pre
,
{
$el
})
=>
{
blankDoms
[
3
]
const
{
offsetHeight
}
=
$el
;
].
reduce
(
if
(
$el
.
className
!=
'bi-blank'
&&
!
this
.
Bi
.
isPrint
)
{
(
pre
,
cur
)
=>
{
height
+=
offsetHeight
;
if
(
pre
.
height
+
cur
.
offsetHeight
<
baseHeight
*
baseScale
)
{
}
pre
.
height
+=
cur
.
offsetHeight
;
if
(
height
>=
1697
)
{
pre
+=
1
;
height
=
offsetHeight
;
}
return
pre
;
},
0
);
return
item
;
})
];
const
pageSizeInfo
=
{
pervHeight
:
0
,
pervPage
:
0
,
height
:
0
,
page
:
this
.
pageWrap
?
0
:
1
};
const
catalogueInfoArr
=
[];
domArr
.
forEach
(({
$el
,
title
,
pervPage
=
0
},
index
)
=>
{
const
offsetHeight
=
$el
.
offsetHeight
-
(
this
.
Bi
.
isPrint
?
0
:
56
);
pageSizeInfo
.
height
+=
offsetHeight
;
if
(
this
.
pageWrap
)
{
if
(
index
==
1
)
{
// 遍历到第二个时,如果存在顶部标题,则将两个高度相加(汇总标题和表格不做强制分页)
pageSizeInfo
.
pervHeight
=
offsetHeight
+
topDom
.
offsetHeight
;
if
(
offsetHeight
+
topDom
.
offsetHeight
>
1697
)
{
pageSizeInfo
.
page
+=
1
;
}
}
else
{
}
else
{
pageSizeInfo
.
page
+=
pageSizeInfo
.
pervPage
+
1
;
pre
.
height
=
cur
.
offsetHeight
;
pageSizeInfo
.
pervPage
=
pervPage
;
pre
.
totalHeight
+=
baseHeight
*
baseScale
-
(
pre
.
totalHeight
%
(
baseHeight
*
baseScale
));
}
}
}
else
if
(
pageSizeInfo
.
height
>=
1697
)
{
pre
.
totalHeight
+=
cur
.
offsetHeight
;
pageSizeInfo
.
page
+=
1
;
return
pre
;
pageSizeInfo
.
height
=
offsetHeight
;
},
{
totalHeight
:
startHeight
,
height
:
startHeight
}
}
catalogueInfoArr
.
push
({
);
name
:
(
title
||
{}).
name
,
return
totalHeight
;
page
:
pageSizeInfo
.
page
});
});
console
.
log
(
111
,
pageSizeInfo
.
page
,
catalogueInfoArr
);
this
.
$emit
(
'page'
,
{
pageSize
:
pageSizeInfo
.
page
,
info
:
catalogueInfoArr
});
},
},
dealDomForScale
()
{
dealDomForScale
()
{
const
topDom
=
(
this
.
$slots
.
default
||
[{}])[
0
].
elm
||
{
const
topDom
=
(
this
.
$slots
.
default
||
[{}])[
0
].
elm
||
{
offsetHeight
:
0
offsetHeight
:
0
};
};
const
baseHeight
=
1697
;
const
baseScale
=
1.1
;
const
cScale
=
height
=>
{
const
cScale
=
height
=>
{
return
Math
.
min
(
baseHeight
/
height
,
1
);
return
Math
.
min
(
baseHeight
/
height
,
1
);
};
};
const
newDom
=
(
this
.
$refs
[
'bi-single-choice_item'
]
||
[]).
reduce
(
const
newDom
=
(
this
.
$refs
[
'bi-single-choice_item'
]
||
[]).
reduce
(
(
pre
,
cur
,
index
)
=>
{
(
pre
,
cur
,
index
)
=>
{
const
{
$el
}
=
cur
;
const
{
$el
}
=
cur
;
const
{
offsetHeight
}
=
$el
;
let
{
offsetHeight
}
=
$el
;
let
className
=
'print-item'
;
if
(
cur
.
chart
.
type
==
15
)
{
if
(
index
==
0
)
{
offsetHeight
=
this
.
getArticleHeight
(
topDom
.
offsetHeight
,
$el
);
className
=
'print-item nowarp child-nowarp'
;
}
else
{
offsetHeight
=
this
.
getArticleHeight
(
0
,
$el
);
pre
.
totalPage
+=
offsetHeight
>
baseHeight
*
baseScale
?
1
:
0
;
// 玄学
className
=
'print-item child-nowarp'
;
}
}
const
domUsePage
=
parseInt
(
offsetHeight
/
(
baseHeight
*
baseScale
));
const
domUsePage
=
parseInt
(
offsetHeight
/
(
baseHeight
*
baseScale
));
if
(
this
.
printInfo
)
{
if
(
this
.
printInfo
)
{
console
.
log
(
topDom
,
cur
);
// console.log(topDom, cur);
}
let
className
=
'print-item'
;
if
(
index
==
0
&&
cur
.
chart
.
type
==
15
)
{
className
=
'print-item nowarp'
;
}
}
if
(
pre
.
height
+
offsetHeight
<
baseHeight
*
baseScale
)
{
if
(
pre
.
height
+
offsetHeight
<
baseHeight
*
baseScale
)
{
// 当前dom高度加上历史高度 小于 A4纸高度的1.15倍
// 当前dom高度加上历史高度 小于 A4纸高度的1.15倍
...
@@ -286,7 +264,15 @@ export default {
...
@@ -286,7 +264,15 @@ export default {
chartConfigs
:
[
cur
.
chartConfig
]
chartConfigs
:
[
cur
.
chartConfig
]
});
});
}
}
// console.log(
// cur.chartConfig.title.name,
// pre.height,
// offsetHeight,
// pre.totalPage,
// domUsePage
// );
pre
.
catalogueInfoArr
.
push
({
pre
.
catalogueInfoArr
.
push
({
showInCatalogue
:
cur
.
chartConfig
.
showInCatalogue
,
name
:
(
cur
.
chartConfig
.
title
||
{}).
name
,
name
:
(
cur
.
chartConfig
.
title
||
{}).
name
,
page
:
pre
.
totalPage
-
domUsePage
page
:
pre
.
totalPage
-
domUsePage
});
});
...
@@ -317,8 +303,6 @@ export default {
...
@@ -317,8 +303,6 @@ export default {
pageSize
:
newDom
.
totalPage
,
pageSize
:
newDom
.
totalPage
,
info
:
newDom
.
catalogueInfoArr
info
:
newDom
.
catalogueInfoArr
});
});
console
.
log
(
newDom
);
// this.$refs['print-area'].innerHTML = 'xxxx';
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -344,7 +328,7 @@ export default {
...
@@ -344,7 +328,7 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.print-item
{
.print-item
{
&.nowarp
{
&.
child-
nowarp
{
.bi-chart-block
{
.bi-chart-block
{
background
:
#fff
;
background
:
#fff
;
&
>
div
{
&
>
div
{
...
...
src/packages/bi/src/components/singleChoiceInfo.vue
View file @
153662f
...
@@ -69,12 +69,11 @@ export default {
...
@@ -69,12 +69,11 @@ export default {
z-index
:
2
;
z-index
:
2
;
color
:
#ddeeff
;
color
:
#ddeeff
;
font-size
:
14px
;
font-size
:
14px
;
text-align
:
center
;
text-align
:
left
;
padding-left
:
130px
;
&.one
{
&.one
{
padding-left
:
60px
;
padding-top
:
23px
;
padding-top
:
23px
;
text-align
:
center
;
text-align
:
left
;
padding-left
:
130px
;
&
>
div
{
&
>
div
{
width
:
inherit
;
width
:
inherit
;
&
+
div
{
&
+
div
{
...
...
src/packages/bi/src/mock/index.js
View file @
153662f
...
@@ -68,6 +68,7 @@ export const chartConfig = () => {
...
@@ -68,6 +68,7 @@ export const chartConfig = () => {
return
{
return
{
createConfig
:
(
arr
,
options
=
{})
=>
{
createConfig
:
(
arr
,
options
=
{})
=>
{
const
{
const
{
showInCatalogue
,
blockTitle
,
blockTitle
,
hideTitle
,
hideTitle
,
hideColor
,
hideColor
,
...
@@ -122,6 +123,7 @@ export const chartConfig = () => {
...
@@ -122,6 +123,7 @@ export const chartConfig = () => {
);
);
});
});
return
{
return
{
showInCatalogue
,
isDelete
:
isDelete
||
0
,
isDelete
:
isDelete
||
0
,
sort
:
showSort
||
0
,
sort
:
showSort
||
0
,
chart
:
{
chart
:
{
...
...
src/packages/bi/src/project/21-digitalQuestionnaire.vue
View file @
153662f
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
@
page=
"setPage(arguments, 'page1')"
@
page=
"setPage(arguments, 'page1')"
></BiMission>
></BiMission>
<BiSingleChoice
<BiSingleChoice
v-if=
"showSingleChoiceHistory.length > 0"
v-if=
"showSingleChoiceHistory.length > 0
&& answerMode != 1
"
class=
"bi-block no-border"
class=
"bi-block no-border"
:textData=
"textDataHistory"
:textData=
"textDataHistory"
:singleChoice=
"showSingleChoiceHistory"
:singleChoice=
"showSingleChoiceHistory"
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
@
page=
"setPage(arguments, 'page4', 'page4Info')"
@
page=
"setPage(arguments, 'page4', 'page4Info')"
>
>
<BiSingleChoiceInfo
<BiSingleChoiceInfo
index=
"4
"
:index=
"answerMode == 1 ? '3' : '4'
"
name=
"本次专区反馈效果评价"
name=
"本次专区反馈效果评价"
:info=
"textData"
:info=
"textData"
></BiSingleChoiceInfo>
></BiSingleChoiceInfo>
...
@@ -68,15 +68,16 @@
...
@@ -68,15 +68,16 @@
v-if=
"showSingleChoiceMixin.length > 0"
v-if=
"showSingleChoiceMixin.length > 0"
style=
"margin-top:25px;"
style=
"margin-top:25px;"
class=
"bi-block no-border"
class=
"bi-block no-border"
name=
"
专区内容效果评价
"
name=
"
推广相关问卷数据分析
"
:singleChoice=
"showSingleChoiceMixin"
:singleChoice=
"showSingleChoiceMixin"
:pageWrap=
"true"
:pageWrap=
"true"
printInfo
@
sort=
"sort(arguments, 'singleChoiceMixin', hideSingleChoiceMixin)"
@
sort=
"sort(arguments, 'singleChoiceMixin', hideSingleChoiceMixin)"
@
page=
"setPage(arguments, 'page3', 'page3Info')"
@
page=
"setPage(arguments, 'page3', 'page3Info')"
>
>
<BiSingleChoiceInfo
<BiSingleChoiceInfo
index=
"5
"
:index=
"answerMode == 1 ? '4' : '5'
"
name=
"
专区内容效果评价
"
name=
"
推广相关问卷数据分析
"
></BiSingleChoiceInfo>
></BiSingleChoiceInfo>
</BiSingleChoice>
</BiSingleChoice>
<BiCoverEnd
title=
"奇正藏药医学沙龙推广项目数据报告"
></BiCoverEnd>
<BiCoverEnd
title=
"奇正藏药医学沙龙推广项目数据报告"
></BiCoverEnd>
...
@@ -146,7 +147,8 @@ export default {
...
@@ -146,7 +147,8 @@ export default {
baseInfo
:
[],
baseInfo
:
[],
textData
:
[],
textData
:
[],
textDataHistory
:
[],
textDataHistory
:
[],
biInfo
:
{}
biInfo
:
{},
answerMode
:
1
};
};
},
},
computed
:
{
computed
:
{
...
@@ -188,6 +190,7 @@ export default {
...
@@ -188,6 +190,7 @@ export default {
},
},
{
{
name
:
'专区浏览效果评价 - 历史数据分析'
,
name
:
'专区浏览效果评价 - 历史数据分析'
,
hide
:
this
.
answerMode
==
1
,
child
:
[
child
:
[
...
page2Info
...
page2Info
.
filter
(
item
=>
item
.
name
)
.
filter
(
item
=>
item
.
name
)
...
@@ -213,7 +216,7 @@ export default {
...
@@ -213,7 +216,7 @@ export default {
]
]
},
},
{
{
name
:
'
专区内容效果评价
'
,
name
:
'
推广相关问卷数据分析
'
,
child
:
[
child
:
[
...
page3Info
...
page3Info
.
filter
(
item
=>
item
.
name
)
.
filter
(
item
=>
item
.
name
)
...
@@ -223,9 +226,10 @@ export default {
...
@@ -223,9 +226,10 @@ export default {
page
:
item
.
page
+
page1
+
page2
+
page4
page
:
item
.
page
+
page1
+
page2
+
page4
};
};
})
})
.
filter
(
item
=>
item
.
showInCatalogue
)
]
]
}
}
];
]
.
filter
(
i
=>
!
i
.
hide
)
;
},
},
showSingleChoiceHistory
()
{
showSingleChoiceHistory
()
{
return
this
.
dealSingleChoice
(
this
.
singleChoiceHistory
);
return
this
.
dealSingleChoice
(
this
.
singleChoiceHistory
);
...
@@ -265,19 +269,21 @@ export default {
...
@@ -265,19 +269,21 @@ export default {
projectName
=
'-'
,
projectName
=
'-'
,
sendEnterpriseName
=
'-'
,
sendEnterpriseName
=
'-'
,
aspEnterpriseName
=
'-'
,
aspEnterpriseName
=
'-'
,
taskTime
=
0
,
//
taskTime = 0,
taskStartTime
,
//
taskStartTime,
taskEndTime
,
//
taskEndTime,
taskSum
,
taskSum
,
executePeopleNumber
,
executePeopleNumber
,
createDt
,
createDt
,
answerMode
,
// 1自答,2别人答
nameShowType
//1:正常显示甲乙方 2:隐藏发起方,原"服务商"改为"项目方" 3:隐藏发起方
nameShowType
//1:正常显示甲乙方 2:隐藏发起方,原"服务商"改为"项目方" 3:隐藏发起方
}
=
info
;
}
=
info
;
this
.
biInfo
=
{
this
.
biInfo
=
{
biInfoId
:
biInfoId
,
biInfoId
:
biInfoId
,
styleConfigureId
styleConfigureId
};
};
this
.
answerMode
=
answerMode
;
this
.
coverId
=
coverTemplateId
;
this
.
coverId
=
coverTemplateId
;
this
.
coverUrl
=
coverTemplateUrl
;
this
.
coverUrl
=
coverTemplateUrl
;
const
biCreateDt
=
date
.
dateFormat
(
createDt
,
'Y-M-D'
);
const
biCreateDt
=
date
.
dateFormat
(
createDt
,
'Y-M-D'
);
...
@@ -306,18 +312,18 @@ export default {
...
@@ -306,18 +312,18 @@ export default {
name
:
nameShowType
==
2
?
'项目方'
:
'服务商'
,
name
:
nameShowType
==
2
?
'项目方'
:
'服务商'
,
value
:
aspEnterpriseName
value
:
aspEnterpriseName
},
},
{
//
{
name
:
'任务时间'
,
//
name: '任务时间',
value
:
`
${
taskTime
}
天`
//
value: `${taskTime}天`
},
//
},
{
//
{
name
:
'任务开始时间'
,
//
name: '任务开始时间',
value
:
taskStartTime
//
value: taskStartTime
},
//
},
{
//
{
name
:
'任务结算时间'
,
//
name: '任务结算时间',
value
:
taskEndTime
//
value: taskEndTime
},
//
},
{
{
name
:
'报表生成时间'
,
name
:
'报表生成时间'
,
value
:
biCreateDt
value
:
biCreateDt
...
@@ -420,17 +426,24 @@ export default {
...
@@ -420,17 +426,24 @@ export default {
];
];
},
},
dealChoice
(
obj
,
singleChoiceName
)
{
dealChoice
(
obj
,
singleChoiceName
)
{
// 1有效点击量排名 2区域热力图 3 单日有效点击量6 单日最大点击量 7 单篇每日点击23 专区推广文章浏览量与有效反馈数量对比图
const
config
=
{
const
config
=
{
1
:
{
1
:
{
chartType
:
2
,
chartType
:
2
,
blockTitle
:
'数字专区各篇内容有效点击量排名'
,
blockTitle
:
singleChoiceName
===
'singleChoiceHistory'
?
'数字问卷各篇内容浏览排行'
:
'数字问卷各篇内容反馈排行'
,
hideTypes
:
true
,
hideTypes
:
true
,
hideLegend
:
true
,
hideLegend
:
true
,
hideDesc
:
true
hideDesc
:
true
},
},
2
:
{
2
:
{
chartType
:
13
,
chartType
:
13
,
blockTitle
:
'数字专区有效点击量分布区域热力图'
,
blockTitle
:
singleChoiceName
===
'singleChoiceHistory'
?
'数字问卷浏览分布区域热力图'
:
'数字问卷反馈分布区域热力图'
,
hideTypes
:
true
,
hideTypes
:
true
,
hideColor
:
true
,
hideColor
:
true
,
hideLegend
:
true
,
hideLegend
:
true
,
...
@@ -438,32 +451,26 @@ export default {
...
@@ -438,32 +451,26 @@ export default {
},
},
3
:
item
=>
({
3
:
item
=>
({
chartType
:
item
.
chartType
||
randomType
([
1
,
2
,
5
,
6
]),
chartType
:
item
.
chartType
||
randomType
([
1
,
2
,
5
,
6
]),
blockTitle
:
'数字专区单日有效点击量走势图'
,
blockTitle
:
singleChoiceName
===
'singleChoiceHistory'
?
'数字问卷单日浏览走势图'
:
'数字问卷单日反馈走势图'
,
hideLegend
:
true
,
hideLegend
:
true
,
hideDesc
:
true
,
hideDesc
:
true
,
disableTypes
:
[
3
,
4
,
9
,
10
,
11
]
disableTypes
:
[
3
,
4
,
9
,
10
,
11
]
}),
}),
6
:
{
6
:
{
chartType
:
2
,
chartType
:
2
,
blockTitle
:
'数字专区单日最大点击量各篇内容点击量排名'
,
blockTitle
:
singleChoiceName
===
'singleChoiceHistory'
?
'数字问卷各篇内容单日最大浏览量排名'
:
'数字问卷各篇内容单日最大反馈排名'
,
hideTypes
:
true
,
hideTypes
:
true
,
hideLegend
:
true
,
hideLegend
:
true
,
hideDesc
:
true
hideDesc
:
true
},
},
7
:
()
=>
({
7
:
{
hideThisChart
:
true
},
chartType
:
2
,
23
:
{
hideThisChart
:
true
}
blockTitle
:
'单篇每日点击'
,
hideTypes
:
true
,
hideLegend
:
true
,
hideDesc
:
true
}),
23
:
item
=>
({
chartType
:
item
.
chartType
||
randomType
([
1
,
2
,
9
]),
blockTitle
:
'专区推广文章浏览量与有效反馈数量对比图'
,
hideLegend
:
true
,
hideDesc
:
true
,
disableTypes
:
[
3
,
4
,
5
,
6
,
10
,
11
]
})
};
};
this
[
singleChoiceName
]
=
Object
.
entries
(
obj
)
this
[
singleChoiceName
]
=
Object
.
entries
(
obj
)
.
filter
(
item
=>
item
[
1
])
.
filter
(
item
=>
item
[
1
])
...
@@ -499,7 +506,8 @@ export default {
...
@@ -499,7 +506,8 @@ export default {
hideTypes
:
true
,
hideTypes
:
true
,
hideColor
:
true
,
hideColor
:
true
,
hideLegend
:
true
,
hideLegend
:
true
,
hideDesc
:
true
hideDesc
:
true
,
showInCatalogue
:
true
}),
}),
...(
Array
.
isArray
(
item
.
topic
)
?
item
.
topic
:
[]).
map
(
cItem
=>
{
...(
Array
.
isArray
(
item
.
topic
)
?
item
.
topic
:
[]).
map
(
cItem
=>
{
return
ChartConfigFn
.
createConfig
(
return
ChartConfigFn
.
createConfig
(
...
@@ -555,7 +563,7 @@ export default {
...
@@ -555,7 +563,7 @@ export default {
});
});
},
},
exportBi
()
{
exportBi
()
{
window
.
open
(
this
.
Bi
.
exportBi
(),
'_blank'
);
this
.
Bi
.
exportBi
(
);
}
}
},
},
created
()
{
created
()
{
...
@@ -578,11 +586,22 @@ export default {
...
@@ -578,11 +586,22 @@ export default {
])
=>
{
])
=>
{
this
.
dealBaseInfo
(
baseInfo
.
data
.
data
[
0
]
||
{});
this
.
dealBaseInfo
(
baseInfo
.
data
.
data
[
0
]
||
{});
this
.
dealFixedInfo
(
fixedInfo
.
data
.
data
||
[]);
this
.
dealFixedInfo
(
fixedInfo
.
data
.
data
||
[]);
this
.
dealChoice
(
const
singleChoiceHistory
=
topicInfoHistory
.
data
.
data
||
{};
topicInfoHistory
.
data
.
data
||
{},
const
singleChoice
=
topicInfo
.
data
.
data
||
{};
'singleChoiceHistory'
(
(
singleChoiceHistory
[
1
]
||
{})[
'topicCountInfos'
]
||
[]
).
sort
((
a
,
b
)
=>
(
a
.
countNum
>
b
.
countNum
?
0
:
-
1
));
(
(
singleChoiceHistory
[
6
]
||
{})[
'topicCountInfos'
]
||
[]
).
sort
((
a
,
b
)
=>
(
a
.
countNum
>
b
.
countNum
?
0
:
-
1
));
((
singleChoice
[
1
]
||
{})[
'topicCountInfos'
]
||
[]).
sort
((
a
,
b
)
=>
a
.
countNum
>
b
.
countNum
?
0
:
-
1
);
((
singleChoice
[
6
]
||
{})[
'topicCountInfos'
]
||
[]).
sort
((
a
,
b
)
=>
a
.
countNum
>
b
.
countNum
?
0
:
-
1
);
);
this
.
dealChoice
(
topicInfo
.
data
.
data
||
{},
'singleChoice'
);
this
.
dealChoice
(
singleChoiceHistory
,
'singleChoiceHistory'
);
this
.
dealChoice
(
singleChoice
,
'singleChoice'
);
this
.
dealChoiceMixin
(
topicMixinInfo
.
data
.
data
||
[]);
this
.
dealChoiceMixin
(
topicMixinInfo
.
data
.
data
||
[]);
this
.
coverList
=
tempaletList
.
data
.
data
||
[];
this
.
coverList
=
tempaletList
.
data
.
data
||
[];
this
.
$nextTick
(
async
()
=>
{
this
.
$nextTick
(
async
()
=>
{
...
...
src/packages/task-recored/src/components/configurable.vue
→
src/packages/task-recored/src/components/
base/
configurable.vue
View file @
153662f
...
@@ -69,19 +69,8 @@
...
@@ -69,19 +69,8 @@
/>
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
>
<
slot
name
=
"information"
><
/slot
>
<
div
class
=
"block_box information"
v
-
if
=
"+projectType === 21"
>
<
div
v
-
for
=
"(item, index) in resData.contentTitleList"
:
key
=
"index"
>
<
img
:
src
=
"resData.channelInformation.picUrl"
/>
<
div
style
=
"margin:10px"
>
<
span
>
资讯标题:
<
/span
>
<
strong
>
{{
resData
.
channelInformation
.
title
}}
<
/strong
>
<
/div
>
<
/div
>
<
div
v
-
html
=
"resData.channelInformation.content"
><
/div
>
<
/div
>
<
div
v
-
for
=
"(item, index) in resData.contentTitleList"
:
key
=
"item.id"
>
<!--
单选题
/
多选
/
投票题
-->
<!--
单选题
/
多选
/
投票题
-->
<
div
v
-
if
=
"[1, 2, 3].includes(item.type)"
class
=
"question-item"
>
<
div
v
-
if
=
"[1, 2, 3].includes(item.type)"
class
=
"question-item"
>
<
div
class
=
"question-item-title"
>
<
div
class
=
"question-item-title"
>
...
@@ -231,7 +220,11 @@ export default {
...
@@ -231,7 +220,11 @@ export default {
if
(
Array
.
isArray
(
answer
))
{
if
(
Array
.
isArray
(
answer
))
{
return
answer
.
join
(
','
);
return
answer
.
join
(
','
);
}
else
{
}
else
{
try
{
return
JSON
.
parse
(
answer
).
join
(
','
);
return
JSON
.
parse
(
answer
).
join
(
','
);
}
catch
(
error
)
{
return
answer
;
}
}
}
}
else
{
}
else
{
return
answer
;
return
answer
;
...
@@ -244,14 +237,4 @@ export default {
...
@@ -244,14 +237,4 @@ export default {
}
;
}
;
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
><
/style
>
.
information
{
display
:
flex
;
align
-
items
:
center
;
margin
:
15
px
;
img
{
width
:
300
px
;
height
:
150
px
;
}
}
<
/style
>
src/packages/task-recored/src/components/footer.vue
→
src/packages/task-recored/src/components/
base/
footer.vue
View file @
153662f
File moved
src/packages/task-recored/src/components/header.vue
→
src/packages/task-recored/src/components/
base/
header.vue
View file @
153662f
File moved
src/packages/task-recored/src/digital-promotion.vue
View file @
153662f
<!--
<!--
* @Description:
* @Description:
老的-需改为新组件
* @Date: 2021-12-17 13:04:30
* @Date: 2021-12-17 13:04:30
-->
-->
<
template
>
<
template
>
...
...
src/packages/task-recored/src/main.vue
View file @
153662f
...
@@ -3,27 +3,23 @@
...
@@ -3,27 +3,23 @@
* @Date: 2022-03-23 16:47:37
* @Date: 2022-03-23 16:47:37
-->
-->
<
template
>
<
template
>
<div
class=
"template-container"
>
<Header
:from=
"from"
:projectType=
"projectType"
:resData=
"resData"
></Header>
<component
<component
:is=
"componentName"
:is=
"componentName"
:resData=
"resData"
:resData=
"resData"
:projectType=
"projectType"
:projectType=
"projectType"
:from=
"from"
:taskId=
"taskId"
></component>
></component>
<Footer></Footer>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Footer
from
'./components/footer.vue'
;
import
EditScene
from
'./project-scene/edit-scene.vue'
;
import
Header
from
'./components/header.vue'
;
import
DigitalQuestionnaire
from
'./project-scene/digital-questionnaire.vue'
;
import
Configurable
from
'./components/configurable.vue'
;
import
{
makeSceneTaskInfo
,
numQuestTaskInfo
}
from
'./api'
;
export
default
{
export
default
{
name
:
'XrkTaskRecordPdf'
,
name
:
'XrkTaskRecordPdf'
,
props
:
{
props
:
{
from
:
{
from
:
{
type
:
String
,
type
:
[
Number
,
String
]
,
default
:
'2'
default
:
'2'
},
},
projectType
:
{
projectType
:
{
...
@@ -32,29 +28,15 @@ export default {
...
@@ -32,29 +28,15 @@ export default {
taskId
:
{
taskId
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
''
default
:
''
},
componentName
:
{
type
:
String
,
default
:
'DigitalQuestionnaire'
}
}
},
},
components
:
{
components
:
{
Footer
,
EditScene
,
Header
,
DigitalQuestionnaire
Configurable
},
data
()
{
return
{
resData
:
{},
componentName
:
'Configurable'
};
},
created
()
{
if
([
20
,
5
].
includes
(
this
.
projectType
))
{
makeSceneTaskInfo
({
taskId
:
this
.
taskId
}).
then
(
res
=>
{
this
.
resData
=
res
.
data
;
});
}
else
if
([
21
].
includes
(
this
.
projectType
))
{
numQuestTaskInfo
({
taskId
:
this
.
taskId
}).
then
(
res
=>
{
this
.
resData
=
res
.
data
;
});
}
}
}
};
};
</
script
>
</
script
>
...
...
src/packages/task-recored/src/project-scene/digital-questionnaire.vue
0 → 100644
View file @
153662f
<!--
* @Description:
* @Date: 2022-03-23 16:47:37
-->
<
template
>
<div
class=
"template-container"
>
<Header
:from=
"from"
:projectType=
"projectType"
:resData=
"resData"
></Header>
<Configurable
:resData=
"resData"
:projectType=
"projectType"
>
<template
v-slot:information
>
<div>
<!--
<div
class=
"information"
>
<img
:src=
"resData.channelInformation.picUrl"
/>
<div
style=
"margin:10px"
>
<span>
资讯标题:
</span>
<strong>
{{
resData
.
channelInformation
.
title
}}
</strong>
</div>
</div>
-->
<div
class=
"information-content"
v-html=
"resData.channelInformation.content"
></div>
</div>
</
template
>
</Configurable>
<Footer></Footer>
</div>
</template>
<
script
>
import
Footer
from
'../components/base/footer.vue'
;
import
Header
from
'../components/base/header.vue'
;
import
Configurable
from
'../components/base/configurable.vue'
;
import
{
numQuestTaskInfo
}
from
'../api'
;
export
default
{
name
:
'digital-questionnaire'
,
props
:
{
from
:
{
type
:
String
,
default
:
'2'
},
projectType
:
{
type
:
[
Number
,
String
]
},
taskId
:
{
type
:
[
String
,
Number
],
default
:
''
}
},
components
:
{
Footer
,
Header
,
Configurable
},
data
()
{
return
{
resData
:
{}
};
},
created
()
{
numQuestTaskInfo
({
taskId
:
this
.
taskId
}).
then
(
res
=>
{
this
.
resData
=
res
.
data
;
});
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
url('../style/index.css')
;
.template-container
{
text-align
:
left
;
}
.information
{
display
:
flex
;
align-items
:
center
;
margin
:
15px
;
img
{
width
:
300px
;
height
:
150px
;
}
&
-content
{
margin
:
0
auto
;
width
:
1000px
;
video
{
width
:
100%
;
object-fit
:
contain
;
height
:
100%
;
}
}
}
</
style
>
<
style
lang=
"scss"
>
.information-content
{
img
{
width
:
1000px
;
object-fit
:
contain
;
height
:
100%
;
}
p
{
line-height
:
1.5
!important
;
}
}
</
style
>
src/packages/task-recored/src/project-scene/edit-scene.vue
0 → 100644
View file @
153662f
<!--
* @Description:
* @Date: 2022-03-23 16:47:37
-->
<
template
>
<div
class=
"template-container"
>
<Header
:from=
"from"
:projectType=
"projectType"
:resData=
"resData"
></Header>
<Configurable
:resData=
"resData"
:projectType=
"projectType"
:from=
"from"
:taskId=
"taskId"
></Configurable>
<Footer></Footer>
</div>
</
template
>
<
script
>
import
Footer
from
'../components/base/footer.vue'
;
import
Header
from
'../components/base/header.vue'
;
import
Configurable
from
'../components/base/configurable.vue'
;
import
{
makeSceneTaskInfo
}
from
'../api'
;
export
default
{
name
:
'editScene'
,
props
:
{
from
:
{
type
:
[
Number
,
String
],
default
:
'2'
},
projectType
:
{
type
:
[
Number
,
String
]
},
taskId
:
{
type
:
[
String
,
Number
],
default
:
''
}
},
components
:
{
Footer
,
Header
,
Configurable
},
data
()
{
return
{
resData
:
{}
};
},
created
()
{
makeSceneTaskInfo
({
taskId
:
this
.
taskId
}).
then
(
res
=>
{
this
.
resData
=
res
.
data
;
});
}
};
</
script
>
<
style
scoped
>
@import
url('../style/index.css')
;
.template-container
{
text-align
:
left
;
}
</
style
>
src/packages/task-recored/src/style/index.css
View file @
153662f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*/
*/
@page
{
@page
{
size
:
A4
;
size
:
A4
;
margin
:
20px
2
0px
;
margin
:
20px
15px
20px
1
0px
;
}
}
*
{
*
{
font-family
:
SimSun
;
font-family
:
SimSun
;
...
...
src/utils/http.js
View file @
153662f
/*
* @Description:
* @Date: 2022-03-23 16:47:37
*/
import
axios
from
'axios'
;
import
axios
from
'axios'
;
import
qs
from
'qs'
;
import
qs
from
'qs'
;
const
envMappings
=
{
development
:
'https://saas-crm-wx.jimijiayuan.cn'
,
development106
:
'https://saas-crm-wx-1.jimijiayuan.cn'
,
preProduction
:
'https://saas-crm-wx-1.myxrk.cn'
,
production
:
'https://crm-wx.yxvzb.com'
,
'dev-105'
:
'//saas-crm-wx.jimijiayuan.cn'
,
'dev-106'
:
'//saas-crm-wx-1.jimijiayuan.cn'
,
'dev-hw105'
:
'//hw105-crm-wx.jimijiayuan.cn'
,
'dev-hw106'
:
'//hw106-crm-wx.jimijiayuan.cn'
,
pre
:
'//saas-crm-wx-1.myxrk.cn'
,
pro
:
'//crm-wx.yxvzb.com'
};
const
env
=
qs
.
parse
(
location
.
href
.
split
(
'?'
)[
1
]).
env
;
const
service
=
axios
.
create
({
baseURL
:
envMappings
[
env
||
'pro'
],
timeout
:
1000
*
60
*
5
});
console
.
log
(
envMappings
[
env
||
'pro'
],
env
,
'bi component'
);
export
function
get
(
url
,
params
)
{
export
function
get
(
url
,
params
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
service
.
get
(
url
,
{
.
get
(
url
,
{
params
:
params
params
:
params
})
})
...
@@ -17,7 +38,7 @@ export function get(url, params) {
...
@@ -17,7 +38,7 @@ export function get(url, params) {
}
}
export
function
post
(
url
,
params
)
{
export
function
post
(
url
,
params
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
service
.
post
(
url
,
qs
.
stringify
(
params
))
.
post
(
url
,
qs
.
stringify
(
params
))
.
then
(
res
=>
{
.
then
(
res
=>
{
resolve
(
res
.
data
);
resolve
(
res
.
data
);
...
...
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