Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-training-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-training-new
Commits
c0a781eb
提交
c0a781eb
authored
9月 24, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: #2223; 优化页面展示;
上级
d224af3e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
76 行增加
和
59 行删除
+76
-59
Compares.vue
src/modules/product-analysis/components/Compares.vue
+25
-28
Cost.vue
src/modules/product-analysis/components/Cost.vue
+1
-1
Report.vue
src/modules/product-analysis/views/Report.vue
+50
-30
没有找到文件。
src/modules/product-analysis/components/Compares.vue
浏览文件 @
c0a781eb
...
@@ -3,15 +3,15 @@
...
@@ -3,15 +3,15 @@
<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"
>
<input
type=
"text"
class=
"input1"
placeholder=
"请输入"
v-model=
"item.input1"
>
<input
type=
"text"
class=
"input1"
placeholder=
"请输入"
v-model=
"item.input1"
/
>
<div
class=
"icon-x"
></div>
<div
class=
"icon-x"
></div>
<div
class=
"character-input"
>
<div
class=
"character-input"
>
<div
class=
"character"
>
%
</div>
<div
class=
"character"
>
%
</div>
<input
type=
"text"
class=
"input2"
placeholder=
"请输入"
v-model=
"item.input2"
>
<input
type=
"text"
class=
"input2"
placeholder=
"请输入"
v-model=
"item.input2"
/
>
</div>
</div>
<div
class=
"el-icon-remove"
@
click=
"inputRemove(index)"
></div>
<div
class=
"el-icon-remove"
@
click=
"inputRemove(index)"
></div>
</div>
</div>
<div
class=
"jia-icon"
v-if=
"inputList.length -1 != index"
></div>
<div
class=
"jia-icon"
v-if=
"inputList.length -
1 != index"
></div>
</li>
</li>
</ul>
</ul>
<div
class=
"add el-icon-circle-plus"
@
click=
"inputAdd"
></div>
<div
class=
"add el-icon-circle-plus"
@
click=
"inputAdd"
></div>
...
@@ -27,10 +27,7 @@ export default {
...
@@ -27,10 +27,7 @@ export default {
components
:
{
Box
},
components
:
{
Box
},
data
()
{
data
()
{
return
{
return
{
inputList
:
[
inputList
:
[{
input1
:
''
,
input2
:
''
}]
{
input1
:
''
,
input2
:
''
},
{
input1
:
''
,
input2
:
''
}
]
}
}
},
},
methods
:
{
methods
:
{
...
@@ -38,8 +35,8 @@ export default {
...
@@ -38,8 +35,8 @@ export default {
this
.
inputList
.
push
({
input1
:
''
,
input2
:
''
})
this
.
inputList
.
push
({
input1
:
''
,
input2
:
''
})
},
},
inputRemove
(
index
)
{
inputRemove
(
index
)
{
if
(
this
.
inputList
.
length
<=
2
)
{
if
(
this
.
inputList
.
length
<=
1
)
{
this
.
$message
(
'最少
俩
条'
)
this
.
$message
(
'最少
一
条'
)
return
return
}
}
this
.
inputList
.
splice
(
index
,
1
)
this
.
inputList
.
splice
(
index
,
1
)
...
@@ -58,59 +55,59 @@ export default {
...
@@ -58,59 +55,59 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
ul
{
ul
{
padding-left
:
20px
;
padding-left
:
20px
;
padding-top
:
23px
;
padding-top
:
23px
;
li
{
li
{
.input-box
{
.input-box
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.jia-icon
{
.jia-icon
{
width
:
28px
;
width
:
28px
;
height
:
28px
;
height
:
28px
;
background
:
url(https://webapp-pub.ezijing.com/x-training-new/jia.png)
;
background
:
url(https://webapp-pub.ezijing.com/x-training-new/jia.png)
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
margin
:
16px
0
16px
282px
;
margin
:
16px
0
16px
282px
;
}
}
input
{
input
{
background
:
#68
B8A
4
;
background
:
#68
b8a
4
;
box-shadow
:
0px
3px
7px
0px
rgba
(
4
,
0
,
0
,
0
.29
)
inset
;
box-shadow
:
0px
3px
7px
0px
rgba
(
4
,
0
,
0
,
0
.29
)
inset
;
border-radius
:
6px
;
border-radius
:
6px
;
font-size
:
16px
;
font-size
:
16px
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
padding-left
:
15px
;
padding-left
:
15px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
height
:
41px
;
height
:
41px
;
&
:
:-
webkit-input-placeholder
{
&
:
:-
webkit-input-placeholder
{
color
:
#fff
;
color
:
#fff
;
}
}
}
}
.input1
{
.input1
{
width
:
263px
;
width
:
263px
;
}
}
.input2
{
.input2
{
width
:
210px
;
width
:
210px
;
padding-right
:
38px
;
padding-right
:
38px
;
}
}
.character-input
{
.character-input
{
position
:
relative
;
position
:
relative
;
.character
{
.character
{
position
:
absolute
;
position
:
absolute
;
top
:
50%
;
top
:
50%
;
right
:
18px
;
right
:
18px
;
transform
:
translateY
(
-50%
);
transform
:
translateY
(
-50%
);
font-size
:
16px
;
font-size
:
16px
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
}
}
}
}
.el-icon-remove
{
.el-icon-remove
{
font-size
:
30px
;
font-size
:
30px
;
cursor
:
pointer
;
cursor
:
pointer
;
color
:
rgb
(
204
,
204
,
204
);
color
:
rgb
(
204
,
204
,
204
);
margin-left
:
5px
;
margin-left
:
5px
;
}
}
.icon-x
{
.icon-x
{
width
:
26px
;
width
:
26px
;
height
:
26px
;
height
:
26px
;
background
:
url(https://webapp-pub.ezijing.com/x-training-new/cheng.png)
;
background
:
url(https://webapp-pub.ezijing.com/x-training-new/cheng.png)
;
...
@@ -119,15 +116,15 @@ ul{
...
@@ -119,15 +116,15 @@ ul{
}
}
}
}
}
}
.compares-box
{
.compares-box
{
position
:
relative
;
position
:
relative
;
.add
{
.add
{
position
:
absolute
;
position
:
absolute
;
right
:
20px
;
right
:
20px
;
bottom
:
35px
;
bottom
:
35px
;
font-size
:
30px
;
font-size
:
30px
;
cursor
:
pointer
;
cursor
:
pointer
;
color
:
rgb
(
204
,
204
,
204
);
color
:
rgb
(
204
,
204
,
204
);
}
}
}
}
</
style
>
</
style
>
src/modules/product-analysis/components/Cost.vue
浏览文件 @
c0a781eb
...
@@ -73,7 +73,7 @@ export default {
...
@@ -73,7 +73,7 @@ export default {
outline
:
none
;
outline
:
none
;
background
:
none
;
background
:
none
;
width
:
80px
;
width
:
80px
;
font-size
:
30
px
;
font-size
:
26
px
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#4eb198
;
color
:
#4eb198
;
line-height
:
100%
;
line-height
:
100%
;
...
...
src/modules/product-analysis/views/Report.vue
浏览文件 @
c0a781eb
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<embed
class=
"embed"
width=
"100%"
height=
"100%"
:src=
"cases.pdf_uris[0]"
/>
<embed
class=
"embed"
width=
"100%"
height=
"100%"
:src=
"cases.pdf_uris[0]"
/>
</div>
</div>
<div
class=
"right-content"
>
<div
class=
"right-content"
>
<input
type=
"text"
class=
"code"
placeholder=
"请输入基金简称+基金代码"
v-model=
"titleValue"
/>
<div
class=
"title"
>
产品分析报告
</div>
<div
class=
"title"
>
产品分析报告
</div>
<input
type=
"text"
class=
"code"
placeholder=
"请输入基金简称+基金代码"
v-model=
"titleValue"
/>
<div
v-for=
"(item, index) in completions"
:key=
"index"
>
<div
v-for=
"(item, index) in completions"
:key=
"index"
>
<!-- 产品概括 -->
<!-- 产品概括 -->
<product
ref=
"product"
v-if=
"item.tag === 'product_overview'"
:data=
"item"
></product>
<product
ref=
"product"
v-if=
"item.tag === 'product_overview'"
:data=
"item"
></product>
...
@@ -65,8 +65,10 @@ export default {
...
@@ -65,8 +65,10 @@ export default {
res
.
data
.
items
.
map
(
item
=>
{
res
.
data
.
items
.
map
(
item
=>
{
return
item
.
completions
.
map
(
cItem
=>
{
return
item
.
completions
.
map
(
cItem
=>
{
if
(
!
Array
.
isArray
(
this
.
resultCompletions
))
{
if
(
!
Array
.
isArray
(
this
.
resultCompletions
))
{
const
findData
=
this
.
resultCompletions
.
answer
.
find
(
fItem
=>
{
return
fItem
.
id
===
cItem
.
id
})
const
findData
=
this
.
resultCompletions
.
answer
.
find
(
fItem
=>
{
findData
?
cItem
.
commit_answer
=
findData
.
commit_answer
:
cItem
.
commit_answer
=
''
return
fItem
.
id
===
cItem
.
id
})
findData
?
(
cItem
.
commit_answer
=
findData
.
commit_answer
)
:
(
cItem
.
commit_answer
=
''
)
}
else
{
}
else
{
cItem
.
commit_answer
=
''
cItem
.
commit_answer
=
''
}
}
...
@@ -75,7 +77,9 @@ export default {
...
@@ -75,7 +77,9 @@ export default {
})
})
this
.
completions
=
res
.
data
.
items
this
.
completions
=
res
.
data
.
items
// 标题回显
// 标题回显
this
.
titleValue
=
this
.
completions
.
find
(
item
=>
{
return
item
.
tag
===
'product_title'
}).
completions
[
0
].
commit_answer
this
.
titleValue
=
this
.
completions
.
find
(
item
=>
{
return
item
.
tag
===
'product_title'
}).
completions
[
0
].
commit_answer
})
})
},
},
// 结果
// 结果
...
@@ -116,33 +120,49 @@ export default {
...
@@ -116,33 +120,49 @@ export default {
costCount
.
push
({
id
:
item
.
id
,
commit_answer
:
item
.
commit_answer
})
costCount
.
push
({
id
:
item
.
id
,
commit_answer
:
item
.
commit_answer
})
})
})
// 标题数据
// 标题数据
const
findTitleData
=
this
.
completions
.
find
(
item
=>
{
return
item
.
tag
===
'product_title'
}).
completions
[
0
]
const
findTitleData
=
this
.
completions
.
find
(
item
=>
{
return
item
.
tag
===
'product_title'
}).
completions
[
0
]
const
titCount
=
[{
id
:
findTitleData
.
id
,
commit_answer
:
this
.
titleValue
}]
const
titCount
=
[{
id
:
findTitleData
.
id
,
commit_answer
:
this
.
titleValue
}]
const
allData
=
[...
productCount
,
...
investTargetCount
,
...[
comparesData
],
...
featuresCount
,
...
costCount
,
...
titCount
]
const
allData
=
[
if
(
allData
.
findIndex
(
item
=>
{
return
item
.
commit_answer
===
''
})
===
-
1
)
{
...
productCount
,
commitCase
({
answers
:
JSON
.
stringify
(
allData
)
}).
then
(
res
=>
{
...
investTargetCount
,
const
data
=
{
...[
comparesData
],
score
:
res
.
data
.
score
,
...
featuresCount
,
data
:
[
...
costCount
,
this
.
$refs
.
product
[
0
].
data
,
...
titCount
this
.
$refs
.
investTarget
[
0
].
data
,
]
this
.
$refs
.
compares
[
0
].
data
,
console
.
log
(
allData
)
this
.
$refs
.
features
[
0
].
data
,
if
(
this
.
$refs
.
cost
[
0
].
data
,
allData
.
findIndex
(
item
=>
{
{
tag
:
'title'
,
value
:
this
.
titleValue
}
return
item
.
commit_answer
===
''
]
})
===
-
1
}
)
{
window
.
localStorage
.
reportData
=
JSON
.
stringify
(
data
)
commitCase
({
answers
:
JSON
.
stringify
(
allData
)
})
this
.
$message
({
.
then
(
res
=>
{
message
:
'保存成功!你可以在作品展示中查看/编辑报告,查看成绩'
,
const
data
=
{
type
:
'success'
score
:
res
.
data
.
score
,
data
:
[
this
.
$refs
.
product
[
0
].
data
,
this
.
$refs
.
investTarget
[
0
].
data
,
this
.
$refs
.
compares
[
0
].
data
,
this
.
$refs
.
features
[
0
].
data
,
this
.
$refs
.
cost
[
0
].
data
,
{
tag
:
'title'
,
value
:
this
.
titleValue
}
]
}
window
.
localStorage
.
reportData
=
JSON
.
stringify
(
data
)
this
.
$message
({
message
:
'保存成功!你可以在作品展示中查看/编辑报告,查看成绩'
,
type
:
'success'
})
setTimeout
(()
=>
{
this
.
$router
.
push
({
path
:
'/product-analysis/result'
})
},
2000
)
})
.
catch
(
err
=>
{
this
.
$message
.
error
(
err
.
message
||
'稍后再试'
)
})
})
setTimeout
(()
=>
{
this
.
$router
.
push
({
path
:
'/product-analysis/result'
})
},
2000
)
}).
catch
(
err
=>
{
this
.
$message
.
error
(
err
.
message
||
'稍后再试'
)
})
}
else
{
}
else
{
this
.
$message
(
'请填写完整'
)
this
.
$message
(
'请填写完整'
)
}
}
...
@@ -171,7 +191,7 @@ input {
...
@@ -171,7 +191,7 @@ input {
border-radius
:
10px
;
border-radius
:
10px
;
.code
{
.code
{
width
:
370px
;
width
:
370px
;
margin
:
35px
auto
0
;
margin
:
35px
auto
;
height
:
47px
;
height
:
47px
;
display
:
block
;
display
:
block
;
text-align
:
center
;
text-align
:
center
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论