Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-training-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-training-new
Commits
8929ed84
提交
8929ed84
authored
9月 24, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 产品分析报告,提交错误的时候定位到错误的位置
上级
c0a781eb
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
68 行增加
和
29 行删除
+68
-29
Compares.vue
src/modules/product-analysis/components/Compares.vue
+9
-3
Cost.vue
src/modules/product-analysis/components/Cost.vue
+1
-1
Features.vue
src/modules/product-analysis/components/Features.vue
+15
-7
InvestTarget.vue
src/modules/product-analysis/components/InvestTarget.vue
+1
-1
Products.vue
src/modules/product-analysis/components/Products.vue
+1
-1
ProductsResult.vue
src/modules/product-analysis/components/ProductsResult.vue
+19
-8
Report.vue
src/modules/product-analysis/views/Report.vue
+22
-8
没有找到文件。
src/modules/product-analysis/components/Compares.vue
浏览文件 @
8929ed84
<
template
>
<
template
>
<box
title=
"业绩比较基准"
class=
"compares-box"
>
<box
title=
"业绩比较基准"
class=
"compares-box"
:id=
"firstItem.id"
>
<ul>
<ul>
<li
v-for=
"(item, index) in inputList"
:key=
"index"
>
<li
v-for=
"(item, index) in inputList"
:key=
"index"
>
<div
class=
"input-box"
>
<div
class=
"input-box"
>
...
@@ -30,6 +30,12 @@ export default {
...
@@ -30,6 +30,12 @@ export default {
inputList
:
[{
input1
:
''
,
input2
:
''
}]
inputList
:
[{
input1
:
''
,
input2
:
''
}]
}
}
},
},
computed
:
{
firstItem
()
{
const
[
first
=
{}]
=
this
.
data
.
completions
return
first
}
},
methods
:
{
methods
:
{
inputAdd
()
{
inputAdd
()
{
this
.
inputList
.
push
({
input1
:
''
,
input2
:
''
})
this
.
inputList
.
push
({
input1
:
''
,
input2
:
''
})
...
@@ -43,9 +49,9 @@ export default {
...
@@ -43,9 +49,9 @@ export default {
}
}
},
},
created
()
{
created
()
{
if
(
this
.
data
.
completions
[
0
]
.
commit_answer
!==
''
)
{
if
(
this
.
firstItem
.
commit_answer
!==
''
)
{
this
.
inputList
=
[]
this
.
inputList
=
[]
this
.
data
.
completions
[
0
]
.
commit_answer
.
split
(
';'
).
forEach
(
item
=>
{
this
.
firstItem
.
commit_answer
.
split
(
';'
).
forEach
(
item
=>
{
const
val
=
item
.
split
(
','
)
const
val
=
item
.
split
(
','
)
this
.
inputList
.
push
({
input1
:
val
[
0
],
input2
:
val
[
1
]
})
this
.
inputList
.
push
({
input1
:
val
[
0
],
input2
:
val
[
1
]
})
})
})
...
...
src/modules/product-analysis/components/Cost.vue
浏览文件 @
8929ed84
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<img
src=
"https://webapp-pub.ezijing.com/x-training-new/cost-i1.png"
class=
"icon"
v-else
/>
<img
src=
"https://webapp-pub.ezijing.com/x-training-new/cost-i1.png"
class=
"icon"
v-else
/>
<div
class=
"right-con"
>
<div
class=
"right-con"
>
<div
class=
"num"
>
<div
class=
"num"
>
<input
v-model=
"item.commit_answer"
type=
"text"
placeholder=
"请输入"
/>
<input
v-model=
"item.commit_answer"
type=
"text"
placeholder=
"请输入"
:id=
"item.id"
/>
<span>
%
</span>
<span>
%
</span>
</div>
</div>
<div
class=
"name"
>
{{
item
.
subject
}}
</div>
<div
class=
"name"
>
{{
item
.
subject
}}
</div>
...
...
src/modules/product-analysis/components/Features.vue
浏览文件 @
8929ed84
<
template
>
<
template
>
<box
title=
"风险收益特征"
>
<box
title=
"风险收益特征"
>
<div
class=
"content-box"
>
<div
class=
"content-box"
>
<input
v-for=
"(item, index) in data.completions"
:key=
"index"
v-model=
"item.commit_answer"
type=
"text"
:class=
"`input-id$
{index + 1}`" placeholder="请输入基金类型">
<input
v-for=
"(item, index) in data.completions"
:key=
"index"
v-model=
"item.commit_answer"
type=
"text"
:class=
"`input-id$
{index + 1}`"
placeholder="请输入基金类型"
:id="item.id"
/>
</div>
</div>
</box>
</box>
</
template
>
</
template
>
...
@@ -20,36 +28,36 @@ export default {
...
@@ -20,36 +28,36 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.content-box
{
.content-box
{
position
:
relative
;
position
:
relative
;
margin
:
29px
0
0
19px
;
margin
:
29px
0
0
19px
;
width
:
491px
;
width
:
491px
;
height
:
325px
;
height
:
325px
;
background
:
url(https://webapp-pub.ezijing.com/x-training-new/features-bg.png)
;
background
:
url(https://webapp-pub.ezijing.com/x-training-new/features-bg.png)
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
input
{
input
{
width
:
110px
;
width
:
110px
;
font-size
:
16px
;
font-size
:
16px
;
color
:
#666666
;
color
:
#666666
;
background
:
none
;
background
:
none
;
outline
:
none
;
outline
:
none
;
}
}
.input-id1
{
.input-id1
{
position
:
absolute
;
position
:
absolute
;
top
:
45px
;
top
:
45px
;
right
:
-10px
;
right
:
-10px
;
}
}
.input-id2
{
.input-id2
{
position
:
absolute
;
position
:
absolute
;
top
:
106px
;
top
:
106px
;
right
:
-45px
;
right
:
-45px
;
}
}
.input-id3
{
.input-id3
{
position
:
absolute
;
position
:
absolute
;
top
:
170px
;
top
:
170px
;
right
:
-80px
;
right
:
-80px
;
}
}
.input-id4
{
.input-id4
{
position
:
absolute
;
position
:
absolute
;
top
:
238px
;
top
:
238px
;
right
:
-118px
;
right
:
-118px
;
...
...
src/modules/product-analysis/components/InvestTarget.vue
浏览文件 @
8929ed84
<
template
>
<
template
>
<box
title=
"投资目标"
>
<box
title=
"投资目标"
>
<textarea
v-for=
"(item, index) in data.completions"
v-model=
"item.commit_answer"
:key=
"index"
></textarea>
<textarea
v-for=
"(item, index) in data.completions"
v-model=
"item.commit_answer"
:key=
"index"
:id=
"item.id"
></textarea>
</box>
</box>
</
template
>
</
template
>
...
...
src/modules/product-analysis/components/Products.vue
浏览文件 @
8929ed84
<
template
>
<
template
>
<box
title=
"产品概括"
>
<box
title=
"产品概括"
>
<ul>
<ul>
<li
v-for=
"(item, index) in data.completions"
:key=
"index"
>
<li
v-for=
"(item, index) in data.completions"
:key=
"index"
:id=
"item.id"
>
<img
:src=
"iconUrl(item)"
class=
"icon"
/>
<img
:src=
"iconUrl(item)"
class=
"icon"
/>
<div
class=
"tag"
>
{{
item
.
subject
}}
</div>
<div
class=
"tag"
>
{{
item
.
subject
}}
</div>
<textarea
placeholder=
"请输入"
v-model=
"item.commit_answer"
></textarea>
<textarea
placeholder=
"请输入"
v-model=
"item.commit_answer"
></textarea>
...
...
src/modules/product-analysis/components/ProductsResult.vue
浏览文件 @
8929ed84
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<box
title=
"产品概括"
>
<box
title=
"产品概括"
>
<ul>
<ul>
<li
v-for=
"(item, index) in data.completions"
:key=
"index"
>
<li
v-for=
"(item, index) in data.completions"
:key=
"index"
>
<img
:src=
"
`https://webapp-pub.ezijing.com/x-training-new/products$
{index + 1}.png`
" class="icon" />
<img
:src=
"
iconUrl(item)
"
class=
"icon"
/>
<div
class=
"tag"
>
{{
item
.
subject
}}
</div>
<div
class=
"tag"
>
{{
item
.
subject
}}
</div>
<div
class=
"text"
>
{{
item
.
commit_answer
}}
</div>
<div
class=
"text"
>
{{
item
.
commit_answer
}}
</div>
<!--
<textarea
placeholder=
"请输入"
v-model=
"item.commit_answer"
></textarea>
-->
<!--
<textarea
placeholder=
"请输入"
v-model=
"item.commit_answer"
></textarea>
-->
...
@@ -21,7 +21,18 @@ export default {
...
@@ -21,7 +21,18 @@ export default {
data
()
{
data
()
{
return
{}
return
{}
},
},
created
()
{
methods
:
{
iconUrl
(
item
)
{
const
map
=
{
product_overview_completion
:
'https://webapp-pub.ezijing.com/x-training-new/products1.png'
,
operation_mode_completion
:
'https://webapp-pub.ezijing.com/x-training-new/products2.png'
,
open_frequency_completion
:
'https://webapp-pub.ezijing.com/x-training-new/products3.png'
,
transaction_currency_completion
:
'https://webapp-pub.ezijing.com/x-training-new/products4.png'
,
fund_manager_completion
:
'https://webapp-pub.ezijing.com/x-training-new/products5.png'
,
fund_principal_completion
:
'https://webapp-pub.ezijing.com/x-training-new/products6.png'
}
return
map
[
item
.
tag
]
}
}
}
}
}
</
script
>
</
script
>
...
@@ -41,7 +52,7 @@ ul {
...
@@ -41,7 +52,7 @@ ul {
background
:
#f1fcf9
;
background
:
#f1fcf9
;
border
:
1px
solid
#b8ebde
;
border
:
1px
solid
#b8ebde
;
border-radius
:
12px
;
border-radius
:
12px
;
.text
{
.text
{
width
:
151px
;
width
:
151px
;
font-size
:
22px
;
font-size
:
22px
;
text-align
:
center
;
text-align
:
center
;
...
@@ -57,7 +68,7 @@ ul {
...
@@ -57,7 +68,7 @@ ul {
border-bottom
:
1px
solid
#a5e1e9
;
border-bottom
:
1px
solid
#a5e1e9
;
color
:
#62c2d0
;
color
:
#62c2d0
;
}
}
.text
{
.text
{
border-bottom
:
1px
solid
#a5e1e9
;
border-bottom
:
1px
solid
#a5e1e9
;
color
:
#62c2d0
;
color
:
#62c2d0
;
}
}
...
@@ -70,7 +81,7 @@ ul {
...
@@ -70,7 +81,7 @@ ul {
border-bottom
:
1px
solid
#dad396
;
border-bottom
:
1px
solid
#dad396
;
color
:
#d9d292
;
color
:
#d9d292
;
}
}
.text
{
.text
{
border-bottom
:
1px
solid
#dad396
;
border-bottom
:
1px
solid
#dad396
;
color
:
#d9d292
;
color
:
#d9d292
;
}
}
...
@@ -82,7 +93,7 @@ ul {
...
@@ -82,7 +93,7 @@ ul {
border-bottom
:
1px
solid
#e2c485
;
border-bottom
:
1px
solid
#e2c485
;
color
:
#e2c485
;
color
:
#e2c485
;
}
}
.text
{
.text
{
border-bottom
:
1px
solid
#e2c485
;
border-bottom
:
1px
solid
#e2c485
;
color
:
#e2c485
;
color
:
#e2c485
;
}
}
...
@@ -94,7 +105,7 @@ ul {
...
@@ -94,7 +105,7 @@ ul {
border-bottom
:
1px
solid
#de9888
;
border-bottom
:
1px
solid
#de9888
;
color
:
#de9888
;
color
:
#de9888
;
}
}
.text
{
.text
{
border-bottom
:
1px
solid
#de9888
;
border-bottom
:
1px
solid
#de9888
;
color
:
#de9888
;
color
:
#de9888
;
}
}
...
@@ -107,7 +118,7 @@ ul {
...
@@ -107,7 +118,7 @@ ul {
border-bottom
:
1px
solid
#7bc1af
;
border-bottom
:
1px
solid
#7bc1af
;
color
:
#7bc1af
;
color
:
#7bc1af
;
}
}
.text
{
.text
{
border-bottom
:
1px
solid
#7bc1af
;
border-bottom
:
1px
solid
#7bc1af
;
color
:
#7bc1af
;
color
:
#7bc1af
;
}
}
...
...
src/modules/product-analysis/views/Report.vue
浏览文件 @
8929ed84
...
@@ -125,19 +125,25 @@ export default {
...
@@ -125,19 +125,25 @@ export default {
}).
completions
[
0
]
}).
completions
[
0
]
const
titCount
=
[{
id
:
findTitleData
.
id
,
commit_answer
:
this
.
titleValue
}]
const
titCount
=
[{
id
:
findTitleData
.
id
,
commit_answer
:
this
.
titleValue
}]
const
allData
=
[
const
allData
=
[
...
titCount
,
...
productCount
,
...
productCount
,
...
investTargetCount
,
...
investTargetCount
,
...[
comparesData
],
...[
comparesData
],
...
featuresCount
,
...
featuresCount
,
...
costCount
,
...
costCount
...
titCount
]
]
console
.
log
(
allData
)
// 空数据的索引
if
(
let
emptyDataIndex
=
allData
.
findIndex
(
item
=>
item
.
commit_answer
===
''
)
allData
.
findIndex
(
item
=>
{
// 判断业绩比较基准是否为空
return
item
.
commit_answer
===
''
const
hasEmptyInput
=
!!
this
.
$refs
.
compares
[
0
].
inputList
.
find
(
item
=>
{
})
===
-
1
return
item
.
input1
===
''
||
item
.
input2
===
''
)
{
})
if
(
hasEmptyInput
)
{
const
dataId
=
this
.
$refs
.
compares
[
0
].
data
.
completions
[
0
].
id
const
dataIndex
=
allData
.
findIndex
(
item
=>
item
.
id
===
dataId
)
emptyDataIndex
=
emptyDataIndex
>
dataIndex
&&
emptyDataIndex
!==
-
1
?
dataIndex
:
emptyDataIndex
}
if
(
emptyDataIndex
===
-
1
)
{
commitCase
({
answers
:
JSON
.
stringify
(
allData
)
})
commitCase
({
answers
:
JSON
.
stringify
(
allData
)
})
.
then
(
res
=>
{
.
then
(
res
=>
{
const
data
=
{
const
data
=
{
...
@@ -164,6 +170,14 @@ export default {
...
@@ -164,6 +170,14 @@ export default {
this
.
$message
.
error
(
err
.
message
||
'稍后再试'
)
this
.
$message
.
error
(
err
.
message
||
'稍后再试'
)
})
})
}
else
{
}
else
{
// 空数据的元素
const
emptyElement
=
document
.
querySelector
(
`[id="
${
allData
[
emptyDataIndex
].
id
}
"]`
)
let
top
=
140
if
(
emptyElement
)
{
// 空数据元素的位置
top
=
emptyElement
.
getBoundingClientRect
().
top
+
document
.
documentElement
.
scrollTop
}
window
.
scrollTo
(
0
,
top
)
this
.
$message
(
'请填写完整'
)
this
.
$message
(
'请填写完整'
)
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论