Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-training-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-training-admin
Commits
833f9d61
提交
833f9d61
authored
6月 23, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
6c277e63
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
57 行增加
和
68 行删除
+57
-68
index.vue
src/pages/v2/cases/index.vue
+5
-51
update.vue
src/pages/v2/cases/update.vue
+49
-14
index.vue
src/pages/v2/characteristics/index.vue
+1
-1
index.vue
src/pages/v2/reachschemes/index.vue
+1
-1
index.vue
src/pages/v2/useruseconfigs/index.vue
+1
-1
没有找到文件。
src/pages/v2/cases/index.vue
浏览文件 @
833f9d61
...
@@ -125,11 +125,10 @@
...
@@ -125,11 +125,10 @@
<el-table-column
<el-table-column
fixed=
"right"
fixed=
"right"
label=
"操作"
label=
"操作"
width=
"1
0
0"
>
width=
"1
1
0"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-dropdown
@
command=
"type => handleCommand(type, scope.row)"
>
<el-dropdown
@
command=
"type => handleCommand(type, scope.row)"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<!-- 请选择
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
-->
<el-button
size=
"mini"
>
请选择
<i
class=
"el-icon-arrow-down el-icon--right"
></i></el-button>
<el-button
size=
"mini"
>
请选择
<i
class=
"el-icon-arrow-down el-icon--right"
></i></el-button>
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
...
@@ -594,7 +593,7 @@ export default {
...
@@ -594,7 +593,7 @@ export default {
}
}
},
},
handlePublish
(
val
)
{
handlePublish
(
val
)
{
console
.
log
(
val
)
//
console.log(val)
casesApi
.
publishCase2
(
val
.
id
,
{
is_show
:
val
.
is_show
}).
then
(
res
=>
{
casesApi
.
publishCase2
(
val
.
id
,
{
is_show
:
val
.
is_show
}).
then
(
res
=>
{
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
status
)
{
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
status
)
{
this
.
$message
.
success
(
'更新发布状态成功'
)
this
.
$message
.
success
(
'更新发布状态成功'
)
...
@@ -741,52 +740,7 @@ export default {
...
@@ -741,52 +740,7 @@ export default {
return
res
return
res
},
},
initAddForm
()
{
initAddForm
()
{
this
.
addForm
=
{
this
.
addForm
=
Object
.
assign
({},
defaultForm
)
name
:
''
,
level
:
''
,
category_id
:
0
,
accessory
:
''
,
url
:
''
,
production_detail
:
[
{
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
keywords
:
[
{
name
:
''
,
score
:
'0'
}
]
}
],
fund_detail
:
[
{
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
keywords
:
[
{
name
:
''
,
score
:
0
}
]
}
],
invest_detail
:
[
{
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
keywords
:
[
{
name
:
''
,
score
:
0
}
]
}
]
}
},
},
searchCategory
(
keyword
)
{
searchCategory
(
keyword
)
{
categoryApi
.
categories
({
name
:
keyword
,
page
:
1
,
limit
:
10
}).
then
(
res
=>
{
categoryApi
.
categories
({
name
:
keyword
,
page
:
1
,
limit
:
10
}).
then
(
res
=>
{
...
@@ -948,8 +902,8 @@ export default {
...
@@ -948,8 +902,8 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
>
.el-drawer
{
.el-drawer
.el-drawer__body
{
overflow
:
auto
;
overflow
:
auto
;
}
}
</
style
>
</
style
>
src/pages/v2/cases/update.vue
浏览文件 @
833f9d61
...
@@ -59,8 +59,8 @@
...
@@ -59,8 +59,8 @@
<el-upload
<el-upload
action=
"/api/opera/v1/file/upload"
action=
"/api/opera/v1/file/upload"
list-type=
"picture-card"
list-type=
"picture-card"
:limit=
"1"
:limit=
"1
00
"
:file-list=
"u
rlFile
s"
:file-list=
"u
pdateForm.uri
s"
:on-success=
"uploadUrlSuccess"
:on-success=
"uploadUrlSuccess"
:multiple=
"false"
:multiple=
"false"
:data=
"
{ type: 'image' }"
:data=
"
{ type: 'image' }"
...
@@ -68,8 +68,8 @@
...
@@ -68,8 +68,8 @@
<i
class=
"el-icon-plus"
></i>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-upload>
<el-dialog
:visible
.
sync=
"visible"
append-to-body
>
<el-dialog
:visible
.
sync=
"visible"
append-to-body
>
<img
width=
"100%"
:src=
"
updateForm.url
"
alt=
""
>
<img
width=
"100%"
:src=
"
imgPreview
"
alt=
""
>
<el-input
:v-model=
"
updateForm.url"
:value=
"updateForm.url
"
></el-input>
<el-input
:v-model=
"
imgPreview"
:value=
"imgPreview
"
></el-input>
</el-dialog>
</el-dialog>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -244,6 +244,7 @@ export default {
...
@@ -244,6 +244,7 @@ export default {
category_id
:
0
,
category_id
:
0
,
accessory
:
''
,
accessory
:
''
,
url
:
''
,
url
:
''
,
uris
:
[],
production_detail
:
[
production_detail
:
[
{
{
name
:
''
,
name
:
''
,
...
@@ -283,7 +284,8 @@ export default {
...
@@ -283,7 +284,8 @@ export default {
]
]
}
}
]
]
}
},
imgPreview
:
''
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -293,7 +295,14 @@ export default {
...
@@ -293,7 +295,14 @@ export default {
},
},
methods
:
{
methods
:
{
save
()
{
save
()
{
casesApi
.
updateCase2
(
this
.
id
,
this
.
updateForm
).
then
(
res
=>
{
const
form
=
{
...
this
.
updateForm
}
const
checkedPro
=
this
.
checkFormDetailsNull
(
form
.
production_detail
)
const
checkedFoud
=
this
.
checkFormDetailsNull
(
form
.
fund_detail
)
const
checkedInvest
=
this
.
checkFormDetailsNull
(
form
.
invest_detail
)
if
(
!
checkedPro
)
delete
form
.
production_detail
if
(
!
checkedFoud
)
delete
form
.
fund_detail
if
(
!
checkedInvest
)
delete
form
.
invest_detail
casesApi
.
updateCase2
(
this
.
id
,
form
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
res
.
message
)
this
.
$message
.
success
(
res
.
message
)
return
true
return
true
...
@@ -303,6 +312,27 @@ export default {
...
@@ -303,6 +312,27 @@ export default {
}
}
})
})
},
},
checkFormDetailsNull
(
list
)
{
let
res
=
true
list
.
forEach
(
item
=>
{
if
(
item
.
name
)
res
=
false
})
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
name
||
list
[
i
].
show_info
)
{
res
=
false
break
}
else
{
const
keywords
=
list
[
i
].
keywords
for
(
let
j
=
0
;
j
<
keywords
.
length
;
j
++
)
{
if
(
keywords
[
i
].
name
||
list
[
i
].
score
!==
'0'
)
{
res
=
false
break
}
}
}
}
return
res
},
getInfo
(
id
)
{
getInfo
(
id
)
{
casesApi
.
Case2
(
id
).
then
(
res
=>
{
casesApi
.
Case2
(
id
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
@@ -314,20 +344,20 @@ export default {
...
@@ -314,20 +344,20 @@ export default {
}
}
this
.
updateForm
.
accessory
=
data
.
accessory
this
.
updateForm
.
accessory
=
data
.
accessory
this
.
updateForm
.
url
=
data
.
url
this
.
updateForm
.
url
=
data
.
url
if
(
data
.
production_detail
)
{
if
(
data
.
production_detail
&&
data
.
production_detail
.
length
>
0
)
{
this
.
updateForm
.
production_detail
=
data
.
production_detail
this
.
updateForm
.
production_detail
=
data
.
production_detail
}
}
if
(
data
.
invest_detail
)
{
if
(
data
.
invest_detail
&&
data
.
invest_detail
.
length
>
0
)
{
this
.
updateForm
.
invest_detail
=
data
.
invest_detail
this
.
updateForm
.
invest_detail
=
data
.
invest_detail
}
}
if
(
data
.
fund_detail
)
{
if
(
data
.
fund_detail
&&
data
.
fund_detail
.
length
>
0
)
{
this
.
updateForm
.
fund_detail
=
data
.
fund_detail
this
.
updateForm
.
fund_detail
=
data
.
fund_detail
}
}
if
(
data
.
accessory
)
{
if
(
data
.
accessory
)
{
this
.
accessoryFiles
=
[{
url
:
data
.
accessory
,
name
:
data
.
accessory
}]
this
.
accessoryFiles
=
[{
url
:
data
.
accessory
,
name
:
data
.
accessory
}]
}
}
if
(
data
.
ur
l
)
{
if
(
data
.
ur
is
)
{
this
.
u
rlFiles
=
[{
url
:
data
.
url
}]
this
.
u
pdateForm
.
uris
=
data
.
uris
}
}
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
message
)
this
.
$message
.
error
(
res
.
message
)
...
@@ -406,6 +436,13 @@ export default {
...
@@ -406,6 +436,13 @@ export default {
var
data
=
response
.
data
var
data
=
response
.
data
var
imageInfo
=
data
[
0
]
var
imageInfo
=
data
[
0
]
this
.
updateForm
.
url
=
imageInfo
.
url
this
.
updateForm
.
url
=
imageInfo
.
url
this
.
updateForm
.
uris
.
push
({
uri
:
imageInfo
.
url
,
url
:
imageInfo
.
url
,
title
:
imageInfo
.
title
,
size
:
imageInfo
.
size
,
md5
:
imageInfo
.
md5
})
this
.
visible
=
false
this
.
visible
=
false
}
else
{
}
else
{
console
.
log
(
'文件上传失败'
)
console
.
log
(
'文件上传失败'
)
...
@@ -416,9 +453,7 @@ export default {
...
@@ -416,9 +453,7 @@ export default {
this
.
$message
.
warning
(
`当前限制选择 1 个文件,本次选择了
${
files
.
length
}
个文件,共选择了
${
files
.
length
+
fileList
.
length
}
个文件`
)
this
.
$message
.
warning
(
`当前限制选择 1 个文件,本次选择了
${
files
.
length
}
个文件,共选择了
${
files
.
length
+
fileList
.
length
}
个文件`
)
},
},
createPictureCardPreview
(
file
)
{
createPictureCardPreview
(
file
)
{
if
(
!
this
.
updateForm
.
url
)
{
this
.
imgPreview
=
file
.
url
this
.
updateForm
.
url
=
file
.
url
}
this
.
visible
=
true
this
.
visible
=
true
},
},
addNames
(
detailName
,
index
)
{
addNames
(
detailName
,
index
)
{
...
...
src/pages/v2/characteristics/index.vue
浏览文件 @
833f9d61
...
@@ -664,7 +664,7 @@ export default {
...
@@ -664,7 +664,7 @@ export default {
</
script
>
</
script
>
<
style
>
<
style
>
.el-drawer
{
.el-drawer
.el-drawer__body
{
overflow
:
auto
;
overflow
:
auto
;
}
}
</
style
>
</
style
>
src/pages/v2/reachschemes/index.vue
浏览文件 @
833f9d61
...
@@ -373,7 +373,7 @@ export default {
...
@@ -373,7 +373,7 @@ export default {
</
script
>
</
script
>
<
style
>
<
style
>
.el-drawer
{
.el-drawer
.el-drawer__body
{
overflow
:
auto
;
overflow
:
auto
;
}
}
</
style
>
</
style
>
src/pages/v2/useruseconfigs/index.vue
浏览文件 @
833f9d61
...
@@ -297,7 +297,7 @@ export default {
...
@@ -297,7 +297,7 @@ export default {
</
script
>
</
script
>
<
style
>
<
style
>
.el-drawer
{
.el-drawer
.el-drawer__body
{
overflow
:
auto
;
overflow
:
auto
;
}
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论