yujialong 11 months ago
parent 90a9360790
commit f3e79b5695
  1. 28
      src/pages/article/add/index.vue
  2. 2
      src/styles/page/page.scss

@ -229,20 +229,20 @@
class="inline-input"></el-input> class="inline-input"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="form.articleTemplate === 25" <el-form-item v-if="form.articleTemplate === 25"
prop="time" prop="activityStartTime"
label="起止时间"> label="起止时间">
<!-- <el-input placeholder="请输入起止时间" <el-input placeholder="请输入起止时间,参考格式:2023-10-31 13:00"
v-model.trim="form.source" v-model.trim="form.activityStartTime"
clearable clearable
maxlength="50" maxlength="50"
class="inline-input"></el-input> --> class="inline-input"></el-input>
<el-date-picker style="width: 300px" <!-- <el-date-picker style="width: 300px"
v-model="form.time" v-model="form.time"
type="datetimerange" type="datetimerange"
range-separator="~" range-separator="~"
:clearable="false" :clearable="false"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期"> -->
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-else-if="!isJournal && !isThesis" <el-form-item v-else-if="!isJournal && !isThesis"
@ -849,8 +849,11 @@ export default {
columnId: [ columnId: [
{ required: true, message: '请选择所属栏目', trigger: 'change' } { required: true, message: '请选择所属栏目', trigger: 'change' }
], ],
time: [ // time: [
{ required: true, message: '请选择起始时间', trigger: 'change' } // { required: true, message: '', trigger: 'change' }
// ],
activityStartTime: [
{ required: true, message: '请输入起始时间', trigger: 'blur' }
], ],
classificationId: [ classificationId: [
{ required: false, message: '请选择所属分类', trigger: 'change' } { required: false, message: '请选择所属分类', trigger: 'change' }
@ -1061,7 +1064,7 @@ export default {
getData () { getData () {
this.$post(`${this.api.findArticle}?id=${this.form.id}`).then(({ data }) => { this.$post(`${this.api.findArticle}?id=${this.form.id}`).then(({ data }) => {
data.lableId = data.lableId ? data.lableId.split(',').map(e => +e) : [] data.lableId = data.lableId ? data.lableId.split(',').map(e => +e) : []
if (data.activityStartTime && data.activityEndTime) data.time = [data.activityStartTime, data.activityEndTime] // if (data.activityStartTime && data.activityEndTime) data.time = [data.activityStartTime, data.activityEndTime]
// //
if (data.fileList) { if (data.fileList) {
data.fileList.map(e => { data.fileList.map(e => {
@ -1570,9 +1573,10 @@ export default {
// if (!form.titleImg) return Util.errorMsg('') // if (!form.titleImg) return Util.errorMsg('')
// } // }
if (tId === 25) { if (tId === 25) {
if ((!form.time || !form.time.length) && isRelease) return Util.errorMsg('请选择起止时间') if ((!form.activityStartTime) && isRelease) return Util.errorMsg('请输入起止时间')
form.activityStartTime = form.time[0] // if ((!form.time || !form.time.length) && isRelease) return Util.errorMsg('')
form.activityEndTime = form.time[1] // form.activityStartTime = form.time[0]
// form.activityEndTime = form.time[1]
} }
if (tId === 24 && form.connectionType !== 2) { if (tId === 24 && form.connectionType !== 2) {
if (form.connectionType === 1) { if (form.connectionType === 1) {

@ -41,6 +41,7 @@
padding: 123px 0 0 243px; padding: 123px 0 0 243px;
font-size: 48px; font-size: 48px;
color: #fff; color: #fff;
object-fit: cover;
} }
.single-banner { .single-banner {
position: relative; position: relative;
@ -48,6 +49,7 @@
.banner-img { .banner-img {
width: 100%; width: 100%;
height: 480px; height: 480px;
object-fit: cover;
} }
.texts { .texts {
position: absolute; position: absolute;

Loading…
Cancel
Save