Commit 84346e27 by Lyan

bug更改

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