Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
cms-admin
Commits
5bf8c29b
提交
5bf8c29b
authored
5月 20, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
内容管理模块表单修改样式问题和增加字段
上级
cec980cd
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
49 行增加
和
51 行删除
+49
-51
index.vue
src/pages/content-manage/ads/index.vue
+0
-3
index.vue
src/pages/content-manage/article/index.vue
+0
-3
DrawerForm.vue
src/pages/content-manage/components/DrawerForm.vue
+49
-42
index.vue
src/pages/content-manage/image-text/index.vue
+0
-3
没有找到文件。
src/pages/content-manage/ads/index.vue
浏览文件 @
5bf8c29b
...
@@ -281,9 +281,6 @@ export default {
...
@@ -281,9 +281,6 @@ export default {
this
.
drawerVisible
=
true
this
.
drawerVisible
=
true
},
},
HandleDrawFormSubmit
(
val
)
{
HandleDrawFormSubmit
(
val
)
{
Object
.
keys
(
val
).
forEach
(
key
=>
{
if
(
val
[
key
]
===
''
)
delete
val
[
key
]
})
if
(
this
.
drawFormOptions
.
type
===
'create'
)
{
if
(
this
.
drawFormOptions
.
type
===
'create'
)
{
this
.
fetchCreateAd
(
val
)
this
.
fetchCreateAd
(
val
)
}
else
{
}
else
{
...
...
src/pages/content-manage/article/index.vue
浏览文件 @
5bf8c29b
...
@@ -291,9 +291,6 @@ export default {
...
@@ -291,9 +291,6 @@ export default {
this
.
drawerVisible
=
true
this
.
drawerVisible
=
true
},
},
HandleDrawFormSubmit
(
val
)
{
HandleDrawFormSubmit
(
val
)
{
Object
.
keys
(
val
).
forEach
(
key
=>
{
if
(
val
[
key
]
===
''
)
delete
val
[
key
]
})
if
(
this
.
drawFormOptions
.
type
===
'create'
)
{
if
(
this
.
drawFormOptions
.
type
===
'create'
)
{
this
.
fetchCreateArticle
(
val
)
this
.
fetchCreateArticle
(
val
)
}
else
{
}
else
{
...
...
src/pages/content-manage/components/DrawerForm.vue
浏览文件 @
5bf8c29b
<
template
>
<
template
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"120px"
:class=
"`form-container $
{options.
page}-form
`" >
<el-form
:model=
"form"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"120px"
:class=
"`form-container $
{options.
type}
`" >
<div
class=
"left"
>
<div
class=
"left"
>
<el-form-item
label=
"项目:"
prop=
"project_id"
>
<el-form-item
label=
"项目:"
prop=
"project_id"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
class=
"avatar-uploader"
class=
"avatar-uploader"
action=
"#"
action=
"#"
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"val => beforeUpload(val, 'web_img
_uri
')"
>
:before-upload=
"val => beforeUpload(val, 'web_img')"
>
<img
v-if=
"form.web_img_uri"
:src=
"form.web_img_uri"
class=
"avatar"
>
<img
v-if=
"form.web_img_uri"
:src=
"form.web_img_uri"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-upload>
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
action=
"#"
action=
"#"
class=
"avatar-uploader"
class=
"avatar-uploader"
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"val => beforeUpload(val, 'mobile_terminal_img
_uri
')"
>
:before-upload=
"val => beforeUpload(val, 'mobile_terminal_img')"
>
<img
v-if=
"form.mobile_terminal_img_uri"
:src=
"form.mobile_terminal_img_uri"
class=
"avatar"
>
<img
v-if=
"form.mobile_terminal_img_uri"
:src=
"form.mobile_terminal_img_uri"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-upload>
...
@@ -88,36 +88,36 @@
...
@@ -88,36 +88,36 @@
class=
"file-uploader"
class=
"file-uploader"
ref=
"upload"
ref=
"upload"
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"val => beforeUpload(val, 'enclosure
_uri
')"
>
:before-upload=
"val => beforeUpload(val, 'enclosure')"
>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
:disabled=
"isDetails"
>
上传文件
</el-button>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
:disabled=
"isDetails"
>
上传文件
</el-button>
</el-upload>
</el-upload>
<p
class=
"des"
>
<p
class=
"des"
>
<i
class=
"el-icon-loading"
v-if=
"
form.enclosure_uri
_loading"
></i>
<i
class=
"el-icon-loading"
v-if=
"
enclosure
_loading"
></i>
<i
class=
"el-icon-circle-check"
v-if=
"!
form.enclosure_uri
_loading && form.enclosure_uri"
></i>
<i
class=
"el-icon-circle-check"
v-if=
"!
enclosure
_loading && form.enclosure_uri"
></i>
请上传文件,最多上传一份
<br>
支持:word、excel、pdf
请上传文件,最多上传一份
<br>
支持:word、excel、pdf
</p>
</p>
</div>
</div>
<div
class=
"upload-file-display"
v-if=
"form.enclosure_
uri_nam
e"
>
<div
class=
"upload-file-display"
v-if=
"form.enclosure_
titl
e"
>
{{
form
.
enclosure_
uri_nam
e
}}
{{
form
.
enclosure_
titl
e
}}
<span
class=
"upload-file-bar"
>
<span
class=
"upload-file-bar"
>
<i
:class=
"isFilePreview(form.enclosure_
uri_nam
e) ? 'el-icon-view':'el-icon-download'"
@
click=
"handleDownloadFile('enclosure_uri')"
></i>
<i
:class=
"isFilePreview(form.enclosure_
titl
e) ? 'el-icon-view':'el-icon-download'"
@
click=
"handleDownloadFile('enclosure_uri')"
></i>
<i
v-if=
"!isDetails"
class=
"el-icon-circle-close"
@
click=
"handleClearFile('enclosure_uri')"
></i>
<i
v-if=
"!isDetails"
class=
"el-icon-circle-close"
@
click=
"handleClearFile('enclosure_uri')"
></i>
</span>
</span>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"上传视频:"
class=
"file-upload"
>
<el-form-item
label=
"上传视频:"
class=
"file-upload"
>
<div
style=
"padding-top:6px;height:36px;"
>
<div
style=
"padding-top:6px;height:36px;"
>
<el-upload
:disabled=
"isDetails"
action=
"#"
class=
"file-uploader"
ref=
"upload"
:show-file-list=
"false"
:before-upload=
"val => beforeUpload(val, 'video
_uri
')"
>
<el-upload
:disabled=
"isDetails"
action=
"#"
class=
"file-uploader"
ref=
"upload"
:show-file-list=
"false"
:before-upload=
"val => beforeUpload(val, 'video')"
>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
:disabled=
"isDetails"
>
上传视频
</el-button>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
:disabled=
"isDetails"
>
上传视频
</el-button>
</el-upload>
</el-upload>
<p
class=
"des"
>
<p
class=
"des"
>
<i
class=
"el-icon-loading"
v-if=
"
form.video_uri
_loading"
></i>
<i
class=
"el-icon-loading"
v-if=
"
video
_loading"
></i>
<i
class=
"el-icon-circle-check"
v-if=
"!
form.video_uri
_loading && form.video_uri"
></i>
<i
class=
"el-icon-circle-check"
v-if=
"!
video
_loading && form.video_uri"
></i>
请上传文件,最多上传一份
<br>
支持:MP4
请上传文件,最多上传一份
<br>
支持:MP4
</p>
</p>
</div>
</div>
<div
class=
"upload-file-display"
v-if=
"form.video_
uri_nam
e"
>
<div
class=
"upload-file-display"
v-if=
"form.video_
titl
e"
>
{{
form
.
video_
uri_nam
e
}}
{{
form
.
video_
titl
e
}}
<span
class=
"upload-file-bar"
>
<span
class=
"upload-file-bar"
>
<i
class=
"el-icon-view"
@
click=
"handleDownloadFile('video_uri')"
></i>
<i
class=
"el-icon-view"
@
click=
"handleDownloadFile('video_uri')"
></i>
<i
v-if=
"!isDetails"
class=
"el-icon-circle-close"
@
click=
"handleClearFile('video_uri')"
></i>
<i
v-if=
"!isDetails"
class=
"el-icon-circle-close"
@
click=
"handleClearFile('video_uri')"
></i>
...
@@ -199,15 +199,17 @@ const defaultForm = {
...
@@ -199,15 +199,17 @@ const defaultForm = {
remarks
:
''
,
remarks
:
''
,
content
:
''
,
content
:
''
,
web_img_uri
:
''
,
web_img_uri
:
''
,
web_img_uri_loading
:
''
,
web_img_title
:
''
,
web_img_size
:
''
,
mobile_terminal_img_uri
:
''
,
mobile_terminal_img_uri
:
''
,
mobile_terminal_img_uri_loading
:
''
,
mobile_terminal_img_title
:
''
,
mobile_terminal_img_size
:
''
,
enclosure_uri
:
''
,
enclosure_uri
:
''
,
enclosure_
uri_nam
e
:
''
,
enclosure_
titl
e
:
''
,
enclosure_
uri_loading
:
''
,
enclosure_
size
:
''
,
video_uri
:
''
,
video_uri
:
''
,
video_
uri_nam
e
:
''
,
video_
titl
e
:
''
,
video_
uri_loading
:
''
,
video_
size
:
''
,
start_time
:
''
,
start_time
:
''
,
hasEndDate
:
0
,
hasEndDate
:
0
,
end_time
:
''
end_time
:
''
...
@@ -237,6 +239,10 @@ export default {
...
@@ -237,6 +239,10 @@ export default {
return
{
return
{
typeList
:
[],
typeList
:
[],
form
:
Object
.
assign
({},
defaultForm
),
form
:
Object
.
assign
({},
defaultForm
),
web_img_loading
:
''
,
mobile_terminal_img_loading
:
''
,
enclosure_loading
:
''
,
video_loading
:
''
,
rules
:
{
rules
:
{
project_id
:
[
project_id
:
[
{
required
:
true
,
message
:
'请选择项目'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请选择项目'
,
trigger
:
'change'
}
...
@@ -320,12 +326,12 @@ export default {
...
@@ -320,12 +326,12 @@ export default {
}
else
{
}
else
{
this
.
form
.
start_time
=
formatToDate
(
this
.
form
.
start_time
)
this
.
form
.
start_time
=
formatToDate
(
this
.
form
.
start_time
)
}
}
if
(
this
.
form
.
enclosure_uri
)
{
//
if (this.form.enclosure_uri) {
this
.
form
.
enclosure_uri_nam
e
=
splitStrLast
(
this
.
form
.
enclosure_uri
,
'/'
)
// this.form.enclosure_titl
e = splitStrLast(this.form.enclosure_uri, '/')
}
//
}
if
(
this
.
form
.
video_uri
)
{
//
if (this.form.video_uri) {
this
.
form
.
video_uri_nam
e
=
splitStrLast
(
this
.
form
.
video_uri
,
'/'
)
// this.form.video_titl
e = splitStrLast(this.form.video_uri, '/')
}
//
}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -343,22 +349,15 @@ export default {
...
@@ -343,22 +349,15 @@ export default {
beforeUpload
(
file
,
target
)
{
beforeUpload
(
file
,
target
)
{
let
errorMsg
=
''
let
errorMsg
=
''
const
suffix
=
splitStrLast
(
file
.
name
,
'.'
)
const
suffix
=
splitStrLast
(
file
.
name
,
'.'
)
if
(
target
===
'web_img
_uri'
||
target
===
'mobile_terminal_img_uri
'
)
{
if
(
target
===
'web_img
'
||
target
===
'mobile_terminal_img
'
)
{
if
([
'image/png'
,
'image/jpeg'
].
includes
(
file
.
type
))
{
if
([
'image/png'
,
'image/jpeg'
].
includes
(
file
.
type
))
{
this
.
fetchUpload
(
file
,
'image'
,
target
)
this
.
fetchUpload
(
file
,
'image'
,
target
)
}
else
{
}
else
{
errorMsg
=
'上传图片格式错误,只允许png/jpg格式'
errorMsg
=
'上传图片格式错误,只允许png/jpg格式'
}
}
}
else
if
(
target
===
'enclosure
_uri
'
)
{
}
else
if
(
target
===
'enclosure'
)
{
const
typeList
=
[
'doc'
,
'docx'
,
'pdf'
,
'xls'
,
'xlsx'
]
const
typeList
=
[
'doc'
,
'docx'
,
'pdf'
,
'xls'
,
'xlsx'
]
let
isType
=
false
if
(
typeList
.
includes
(
suffix
))
{
for
(
const
i
in
typeList
)
{
if
(
typeList
[
i
]
===
suffix
)
{
isType
=
true
break
}
}
if
(
isType
)
{
this
.
fetchUpload
(
file
,
'file'
,
target
)
this
.
fetchUpload
(
file
,
'file'
,
target
)
}
else
{
}
else
{
errorMsg
=
'上传附件格式错误,只允许word/excel/pdf格式'
errorMsg
=
'上传附件格式错误,只允许word/excel/pdf格式'
...
@@ -449,14 +448,13 @@ export default {
...
@@ -449,14 +448,13 @@ export default {
const
formData
=
new
window
.
FormData
()
const
formData
=
new
window
.
FormData
()
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'type'
,
type
)
formData
.
append
(
'type'
,
type
)
this
.
form
[
target
+
'_loading'
]
=
'1'
this
[
target
+
'_loading'
]
=
'1'
fileUpload
(
formData
).
then
(
res
=>
{
fileUpload
(
formData
).
then
(
res
=>
{
this
.
form
[
target
+
'_loading'
]
=
''
this
[
target
+
'_loading'
]
=
''
if
(
res
.
code
===
0
&&
res
.
message
===
'SUCCESS'
)
{
if
(
res
.
code
===
0
&&
res
.
message
===
'SUCCESS'
)
{
this
.
form
[
target
]
=
res
.
data
[
0
].
full_path
this
.
form
[
target
+
'_uri'
]
=
res
.
data
[
0
].
full_path
if
(
type
===
'file'
)
{
this
.
form
[
target
+
'_title'
]
=
res
.
data
[
0
].
title
this
.
form
[
target
+
'_name'
]
=
res
.
data
[
0
].
filename
this
.
form
[
target
+
'_size'
]
=
res
.
data
[
0
].
size
+
''
}
}
}
})
})
}
}
...
@@ -469,6 +467,15 @@ export default {
...
@@ -469,6 +467,15 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
stretch
;
align-items
:
stretch
;
}
}
.form-container.details
::-webkit-input-placeholder
{
color
:
transparent
;
}
.form-container.details
:-ms-input-placeholder
{
color
:
transparent
;
}
.form-container.details
::placeholder
{
color
:
transparent
;
}
.form-container
.left
{
.form-container
.left
{
width
:
60%
;
width
:
60%
;
}
}
...
...
src/pages/content-manage/image-text/index.vue
浏览文件 @
5bf8c29b
...
@@ -254,9 +254,6 @@ export default {
...
@@ -254,9 +254,6 @@ export default {
this
.
drawerVisible
=
true
this
.
drawerVisible
=
true
},
},
HandleDrawFormSubmit
(
val
)
{
HandleDrawFormSubmit
(
val
)
{
Object
.
keys
(
val
).
forEach
(
key
=>
{
if
(
val
[
key
]
===
''
)
delete
val
[
key
]
})
if
(
this
.
drawFormOptions
.
type
===
'create'
)
{
if
(
this
.
drawFormOptions
.
type
===
'create'
)
{
this
.
fetchCreateImgText
(
val
)
this
.
fetchCreateImgText
(
val
)
}
else
{
}
else
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论