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

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

Loading…
Cancel
Save