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 fff0e692
authored
Apr 25, 2022
by
llj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:任务记录详情数字问卷
1 parent
5c26acf7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
14 deletions
src/packages/task-recored/src/api/index.js
src/packages/task-recored/src/components/configurable.vue
src/packages/task-recored/src/components/header.vue
src/packages/task-recored/src/main.vue
src/packages/task-recored/src/api/index.js
View file @
fff0e69
...
@@ -5,5 +5,9 @@
...
@@ -5,5 +5,9 @@
import
{
post
}
from
'@/utils/http'
;
import
{
post
}
from
'@/utils/http'
;
const
basePath
=
'/rest/saas/crm/xcx'
;
const
basePath
=
'/rest/saas/crm/xcx'
;
// 获取任务详情
// 获取任务详情
// 可配置和调研
export
const
makeSceneTaskInfo
=
data
=>
export
const
makeSceneTaskInfo
=
data
=>
post
(
`
${
basePath
}
/pdf/ms/makeSceneTaskInfo`
,
data
);
post
(
`
${
basePath
}
/pdf/ms/makeSceneTaskInfo`
,
data
);
// 数字问卷
export
const
numQuestTaskInfo
=
data
=>
post
(
`
${
basePath
}
/pdf/nq/numQuestTaskInfo`
,
data
);
src/packages/task-recored/src/components/configurable.vue
View file @
fff0e69
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<
div
class
=
"bi_title_text_content"
>
<
div
class
=
"bi_title_text_content"
>
<!--
任务内容信息标题顺序
可配置是
03
调研是
02
-->
<!--
任务内容信息标题顺序
可配置是
03
调研是
02
-->
<
div
class
=
"bi_title_text_index"
>
<
div
class
=
"bi_title_text_index"
>
{{
{
5
:
'02'
,
7
:
'02'
,
20
:
'03'
}
[
+
projectType
]
}}
{{
+
projectType
===
20
?
'03'
:
'02'
}}
<
/div
>
<
/div
>
任务内容信息
任务内容信息
<
/div
>
<
/div
>
...
@@ -69,6 +69,18 @@
...
@@ -69,6 +69,18 @@
/>
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
>
<
div
class
=
"block_box information"
v
-
if
=
"+projectType === 21"
>
<
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
-
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"
>
...
@@ -76,9 +88,7 @@
...
@@ -76,9 +88,7 @@
<
span
>
{{
`${index + 1
}
.${item.title
}
`
}}
<
/span
>
<
span
>
{{
`${index + 1
}
.${item.title
}
`
}}
<
/span
>
<
span
>
{{
titleMap
(
item
.
type
)
}}
<
/span
>
<
span
>
{{
titleMap
(
item
.
type
)
}}
<
/span
>
<
div
>
<
div
>
此条任务收集的选择项为:
{{
此条任务收集的选择项为:
{{
isMultiple
(
item
.
type
,
item
.
answer
)
}}
item
.
type
==
2
?
item
.
answer
.
join
(
','
)
:
item
.
answer
}}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
<
div
...
@@ -216,6 +226,17 @@ export default {
...
@@ -216,6 +226,17 @@ export default {
dateFormat
(
e
)
{
dateFormat
(
e
)
{
return
dateFormat
(
e
);
return
dateFormat
(
e
);
}
,
}
,
isMultiple
(
type
,
answer
)
{
if
(
type
==
2
)
{
if
(
Array
.
isArray
(
answer
))
{
return
answer
.
join
(
','
);
}
else
{
return
JSON
.
parse
(
answer
).
join
(
','
);
}
}
else
{
return
answer
;
}
}
,
titleMap
(
type
)
{
titleMap
(
type
)
{
return
qustionMap
[
type
];
return
qustionMap
[
type
];
}
}
...
@@ -223,4 +244,14 @@ export default {
...
@@ -223,4 +244,14 @@ export default {
}
;
}
;
<
/script
>
<
/script
>
<
style
><
/style
>
<
style
lang
=
"scss"
scoped
>
.
information
{
display
:
flex
;
align
-
items
:
center
;
margin
:
15
px
;
img
{
width
:
300
px
;
height
:
150
px
;
}
}
<
/style
>
src/packages/task-recored/src/components/header.vue
View file @
fff0e69
...
@@ -53,7 +53,11 @@
...
@@ -53,7 +53,11 @@
<span>
任务编码:
</span>
<span>
任务编码:
</span>
<span>
{{
resData
.
taskCode
}}
</span>
<span>
{{
resData
.
taskCode
}}
</span>
</div>
</div>
<div
v-if=
"resData.isAuditGongye > 0"
class=
"info-item"
>
<!-- 数字问卷没有审核人,自动通过的 -->
<div
v-if=
"resData.isAuditGongye > 0 && projectType !== 21"
class=
"info-item"
>
<span>
服务商审核人:
</span>
<span>
服务商审核人:
</span>
<span>
{{
resData
.
csoAuditUser
}}
</span>
<span>
{{
resData
.
csoAuditUser
}}
</span>
</div>
</div>
...
@@ -67,7 +71,10 @@ import dateFormat from '@/utils/dateFormat';
...
@@ -67,7 +71,10 @@ import dateFormat from '@/utils/dateFormat';
export
default
{
export
default
{
props
:
{
props
:
{
from
:
String
||
Number
,
from
:
String
||
Number
,
resData
:
Object
resData
:
Object
,
projectType
:
{
type
:
[
Number
,
String
]
}
},
},
methods
:
{
methods
:
{
dateFormat
(
e
)
{
dateFormat
(
e
)
{
...
...
src/packages/task-recored/src/main.vue
View file @
fff0e69
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
-->
-->
<
template
>
<
template
>
<div
class=
"template-container"
>
<div
class=
"template-container"
>
<Header
:from=
"from"
:resData=
"resData"
></Header>
<Header
:from=
"from"
:
projectType=
"projectType"
:
resData=
"resData"
></Header>
<component
<component
:is=
"componentName"
:is=
"componentName"
:resData=
"resData"
:resData=
"resData"
...
@@ -18,13 +18,13 @@
...
@@ -18,13 +18,13 @@
import
Footer
from
'./components/footer.vue'
;
import
Footer
from
'./components/footer.vue'
;
import
Header
from
'./components/header.vue'
;
import
Header
from
'./components/header.vue'
;
import
Configurable
from
'./components/configurable.vue'
;
import
Configurable
from
'./components/configurable.vue'
;
import
{
makeSceneTaskInfo
}
from
'./api'
;
import
{
makeSceneTaskInfo
,
numQuestTaskInfo
}
from
'./api'
;
export
default
{
export
default
{
name
:
'XrkTaskRecordPdf'
,
name
:
'XrkTaskRecordPdf'
,
props
:
{
props
:
{
from
:
{
from
:
{
type
:
String
,
type
:
String
,
default
:
'
1
'
default
:
'
2
'
},
},
projectType
:
{
projectType
:
{
type
:
[
Number
,
String
]
type
:
[
Number
,
String
]
...
@@ -46,10 +46,15 @@ export default {
...
@@ -46,10 +46,15 @@ export default {
};
};
},
},
created
()
{
created
()
{
makeSceneTaskInfo
({
taskId
:
this
.
taskId
}).
then
(
res
=>
{
if
([
20
,
5
].
includes
(
this
.
projectType
))
{
this
.
resData
=
res
.
data
;
makeSceneTaskInfo
({
taskId
:
this
.
taskId
}).
then
(
res
=>
{
});
this
.
resData
=
res
.
data
;
console
.
log
(
this
.
from
,
'v-if="+from===1"'
);
});
}
else
if
([
21
].
includes
(
this
.
projectType
))
{
numQuestTaskInfo
({
taskId
:
this
.
taskId
}).
then
(
res
=>
{
this
.
resData
=
res
.
data
;
});
}
}
}
};
};
</
script
>
</
script
>
...
...
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