Commit 84346e27 by Lyan

bug更改

parent b8fc2da9
......@@ -368,6 +368,7 @@ img {
width: 100%;
}
.avatar-uploader>.el-upload {
border: 2px dashed #666666;
cursor: pointer;
position: relative;
......@@ -398,6 +399,9 @@ img {
}
.avatar2{
width: 70%;
img{
width: 100%;
}
}
p{
margin: 0;
......
......@@ -159,10 +159,10 @@
],
directpath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
picIndexPath: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
// picIndexPath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ]
// colorBackground: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
......
......@@ -82,15 +82,15 @@
<el-upload
v-show="!showInfo"
class="avatar-uploader"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar">
<img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar"></p>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
</el-form-item>
<el-form-item label="简介:" prop="brief">
......@@ -202,7 +202,7 @@
},
created () {
this.getClassList([])
this.getClassList([5, 9])
},
mounted () {
console.log(this.classidList)
......@@ -230,7 +230,7 @@
this.loading = false
if (data && data.code === 0) {
this.dataForm = data.news
this.getClassList([])
this.getClassList([5, 9])
this.dataForm.ishead = parseInt(data.news.ishead)
this.dataForm.classid = this.dataForm.classid
this.getClassList([this.dataForm.classid])
......@@ -295,7 +295,7 @@
data: id
}).then(({data}) => {
if (data && data.code === 0) {
if (id.length === 0) {
if (id.length === 2) {
this.classidList = data.data
} else {
this.cclassidList = data.data[0].child
......
......@@ -64,27 +64,27 @@
</el-form-item>
<el-form-item label="描述图片:" prop="pic">
<el-upload
class="avatar-uploader"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar">
<img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar"></p>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
</el-form-item>
<el-form-item label="MP4文件:" prop="video">
<el-upload
class="avatar-uploader"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="UploadVideo"
:before-upload="beforeUploadVideo">
<video v-if="dialogVisible2" :src="videoUrlStr" class="avatar"></video>
<video v-if="dialogVisible2" :src="videoUrlStr" class=""></video>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><video :src="videoUrlStr" class="avatar"></video></p>
<p v-show="showInfo"><video :src="videoUrlStr" class="avatar2"></video></p>
</el-form-item>
<el-form-item label="" prop="content" >
......
......@@ -46,29 +46,37 @@
<p v-show="showInfo">{{dataForm.levels}}</p>
</el-form-item>
<el-form-item label="显示时间:" prop="showtime" class=" setdes setdes1">
<el-date-picker
<el-row v-show="!showInfo">
<el-col :span="22">
<el-date-picker
v-show="!showInfo"
v-model="dataForm.showtime"
value-format='yyyy-MM-dd'
type="date"
placeholder="选择日期">
</el-date-picker>
<span v-show="!showInfo">时间格式为:xxxx/xx/xx</span>
</el-col>
<el-col :span="2" class="iconStyle">
<el-tooltip placement="top" effect="light">
<div slot="content">时间格式为:xxxx/xx/xx</div>
<i class="el-icon-warning"></i>
</el-tooltip>
</el-col>
</el-row>
<p v-show="showInfo">{{dataForm.showtime}}</p>
</el-form-item>
<el-form-item label="专题图片:" prop="pic">
<el-upload
v-show="!showInfo"
class="avatar-uploader"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar">
<img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar"></p>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
</el-form-item>
<el-form-item label="专题简介:" prop="shortcontent">
<el-input type="textarea" v-model="dataForm.shortcontent" placeholder="请输入专题简介" v-show="!showInfo"></el-input>
......@@ -135,12 +143,12 @@
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
directpath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
ppic: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// directpath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// ppic: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// content: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
......@@ -178,7 +186,7 @@
},
created () {
this.getClassList([])
this.getClassList([9, 12, 13])
},
mounted () {
......@@ -256,12 +264,7 @@
data: id
}).then(({data}) => {
if (data && data.code === 0) {
if (id.length === 0) {
this.classidList = data.data
} else {
this.dataForm.cclassid = ''
this.cclassidList = data.data[0].child
}
this.classidList = data.data
} else {
this.$message.error(data.msg)
}
......@@ -321,19 +324,11 @@
}
</script>
<style scoped>
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
width: 50%;
}
.el-select,.el-input{
width: 241px!important;
}
.edui-editor{
width: 100%;
}
.setdes1 .el-form-item__content > span{
left: 280px!important;
}
.iconStyle{
font-size: 18px;
text-align: center;
color: #e6a23c;
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -145,7 +145,7 @@
<script>
import { piclevelList } from '@/utils'
import AddOrUpdate from './news-add-or-update'
import AddOrUpdate from './newtopic-add-or-update'
export default {
components: {
AddOrUpdate
......
......@@ -128,13 +128,13 @@ export default {
trigger: 'blur'
}
],
picFile: [
{
required: true,
message: '不能为空',
trigger: 'blur'
}
],
// picFile: [
// {
// required: true,
// message: '不能为空',
// trigger: 'blur'
// }
// ],
editor: [
{
required: true,
......@@ -163,13 +163,13 @@ export default {
trigger: 'blur'
}
],
jumppath: [
{
required: true,
message: '不能为空',
trigger: 'blur'
}
],
// jumppath: [
// {
// required: true,
// message: '不能为空',
// trigger: 'blur'
// }
// ],
showtime: [
{
required: true,
......
......@@ -134,9 +134,9 @@
keyword: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
jumppath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// jumppath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
author: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
......
......@@ -126,9 +126,9 @@
keyword: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
jumpath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// jumpath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
author: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
......
......@@ -55,15 +55,15 @@
<el-form-item label="图片:" prop="pic">
<el-upload
v-show="!showInfo"
class="avatar-uploader"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar">
<img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar"></p>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
</el-form-item>
<el-form-item label="简介:" prop="brief">
<el-input type="textarea" rows="5" v-model="dataForm.brief" placeholder="请输入简介" v-show="!showInfo"></el-input>
......@@ -134,12 +134,12 @@
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
directpath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
pic: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// directpath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// pic: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// content: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
......
......@@ -55,15 +55,15 @@
<el-form-item label="图片:" prop="pic">
<el-upload
v-show="!showInfo"
class="avatar-uploader"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar">
<img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar"></p>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
</el-form-item>
<el-form-item label="简介:" prop="brief">
<el-input type="textarea" rows="5" v-model="dataForm.brief" placeholder="请输入简介" v-show="!showInfo"></el-input>
......@@ -133,12 +133,12 @@
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
directpath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
pic: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// directpath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// pic: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// content: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
......
......@@ -55,15 +55,15 @@
<el-form-item label="图片:" prop="pic">
<el-upload
v-show="!showInfo"
class="avatar-uploader"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar">
<img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar"></p>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
</el-form-item>
<el-form-item label="简介:" prop="brief">
<el-input type="textarea" v-model="dataForm.brief" placeholder="请输入简介" v-show="!showInfo"></el-input>
......@@ -134,12 +134,12 @@
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
directpath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
pic: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// directpath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// pic: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// content: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
......
......@@ -55,15 +55,15 @@
<el-form-item label="图片:" prop="pic">
<el-upload
v-show="!showInfo"
class="avatar-uploader"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar">
<img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar"></p>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
</el-form-item>
<el-form-item label="简介:" prop="brief">
<el-input type="textarea" v-model="dataForm.brief" placeholder="请输入简介" v-show="!showInfo"></el-input>
......@@ -134,12 +134,12 @@
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
directpath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
pic: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// directpath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// pic: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// content: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
......
......@@ -135,9 +135,9 @@
keyword: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
directpath: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// directpath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
author: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment