|
|
|
|
@ -50,13 +50,13 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="发布者" prop="autor">
|
|
|
|
|
<el-input v-model="form.autor" placeholder="请填写发布者" autocomplete="off"></el-input>
|
|
|
|
|
<el-form-item label="发布者" prop="author">
|
|
|
|
|
<el-input v-model="form.author" placeholder="请填写发布者" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="发布时间" prop="date">
|
|
|
|
|
<el-date-picker class="width100" placeholder="请选择发布时间" type="date" v-model="form.date"
|
|
|
|
|
<el-form-item label="发布时间" prop="author_date">
|
|
|
|
|
<el-date-picker class="width100" placeholder="请选择发布时间" type="date" v-model="form.author_date"
|
|
|
|
|
value-format="yyyy-MM-dd">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -96,7 +96,7 @@
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="内容详情" prop="content">
|
|
|
|
|
<div style="width: 99.9%;">
|
|
|
|
|
<tinymce ref="tinymce" v-model="form.content" :height="300" />
|
|
|
|
|
<tinymce ref="tiny" v-model="form.content" :height="300" />
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
@ -158,7 +158,9 @@
|
|
|
|
|
focus_id: "",
|
|
|
|
|
title: "",
|
|
|
|
|
content: "",
|
|
|
|
|
link: "",
|
|
|
|
|
link: "",
|
|
|
|
|
author:"",
|
|
|
|
|
author_date:'',
|
|
|
|
|
files_list: []
|
|
|
|
|
},
|
|
|
|
|
fileList: [],
|
|
|
|
|
@ -174,14 +176,14 @@
|
|
|
|
|
type: "string",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "autor",
|
|
|
|
|
field: "author",
|
|
|
|
|
title: "发布者",
|
|
|
|
|
type: "string",
|
|
|
|
|
width: 200,
|
|
|
|
|
align: "center"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "date",
|
|
|
|
|
field: "author_date",
|
|
|
|
|
title: "发布时间",
|
|
|
|
|
type: "string",
|
|
|
|
|
width: 200,
|
|
|
|
|
@ -235,13 +237,22 @@
|
|
|
|
|
},
|
|
|
|
|
info(obj) {
|
|
|
|
|
var that = this;
|
|
|
|
|
// getdaily(obj.id).then(res => {
|
|
|
|
|
// let result = Object.assign(that.form, res);
|
|
|
|
|
// that.form = result;
|
|
|
|
|
|
|
|
|
|
// }).catch(error => {
|
|
|
|
|
// //reject(error)
|
|
|
|
|
// })
|
|
|
|
|
get(obj.id).then(res => {
|
|
|
|
|
let result = Object.assign(that.form, res);
|
|
|
|
|
that.form = result;
|
|
|
|
|
let _files = [];
|
|
|
|
|
for (var mod of result.files) {
|
|
|
|
|
let m = Object.assign({}, mod);
|
|
|
|
|
m.url = mod.upload.url;
|
|
|
|
|
m.name = mod.upload.original_name;
|
|
|
|
|
m.id = mod.upload.id;
|
|
|
|
|
_files.push(m);
|
|
|
|
|
}
|
|
|
|
|
that.fileList = _files;
|
|
|
|
|
this.$refs.tiny.setContent(result.content);
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
//reject(error)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
edit(obj) {
|
|
|
|
|
this.form = this.$options.data().form;
|
|
|
|
|
@ -285,7 +296,9 @@
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
resetForm(formName) {
|
|
|
|
|
var that = this;
|
|
|
|
|
var that = this;
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
this.$refs.tiny.setContent("");
|
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
|
that.dialogFormVisible = false;
|
|
|
|
|
},
|
|
|
|
|
@ -333,7 +346,6 @@
|
|
|
|
|
return this.$confirm(`确定移除 ${ file.name }?`);
|
|
|
|
|
},
|
|
|
|
|
handlesuccess(response, file, fileList) {
|
|
|
|
|
console.log(fileList);
|
|
|
|
|
let listUrl = [];
|
|
|
|
|
for (var m of fileList) {
|
|
|
|
|
if (m.response)
|
|
|
|
|
@ -346,7 +358,7 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.form.file_list = listUrl;
|
|
|
|
|
this.form.files_list = listUrl;
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|