|
@@ -164,8 +164,9 @@
|
|
|
style="width: 290px"
|
|
|
v-model="form.releaseTime"
|
|
|
type="date"
|
|
|
- placeholder="请选择发布时间">
|
|
|
- </el-date-picker>
|
|
|
+ placeholder="请选择发布时间"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
@@ -240,6 +241,17 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getNowTime() {
|
|
|
+ var now = new Date()
|
|
|
+ var year = now.getFullYear() // 得到年份
|
|
|
+ var month = now.getMonth() // 得到月份
|
|
|
+ var date = now.getDate() // 得到日期
|
|
|
+ month = month + 1
|
|
|
+ month = month.toString().padStart(2, '0')
|
|
|
+ date = date.toString().padStart(2, '0')
|
|
|
+ var defaultDate = `${year}-${month}-${date}`
|
|
|
+ this.$set(this.form, 'releaseTime', defaultDate)
|
|
|
+ },
|
|
|
/** 查询公告列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
@@ -261,9 +273,11 @@ export default {
|
|
|
noticeTitle: undefined,
|
|
|
noticeType: undefined,
|
|
|
noticeContent: undefined,
|
|
|
- status: "0"
|
|
|
+ releaseTime: undefined,
|
|
|
+ status: "0",
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
+ this.getNowTime()
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
@@ -296,6 +310,7 @@ export default {
|
|
|
this.open = true;
|
|
|
this.title = "修改公告";
|
|
|
});
|
|
|
+ this.getNowTime()
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function () {
|