|
|
|
|
@ -20,11 +20,19 @@
|
|
|
|
|
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
|
|
|
|
|
:label="column.title" :width="column.width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="column.type=='opt'">
|
|
|
|
|
<div v-if="column.type=='opt'">
|
|
|
|
|
<!-- <Button v-if="scope.row['status']==0" ghost size="small" @click="check(scope.row)" type="primary"
|
|
|
|
|
style="margin-left: 10px;">审核</Button> -->
|
|
|
|
|
<Button ghost size="small" @click="edit(scope.row)" type="primary"
|
|
|
|
|
style="margin-left: 10px;">编辑</Button>
|
|
|
|
|
<Button ghost size="small" @click="del(scope.row)" type="error" style="margin-left: 10px;">删除</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<Button ghost size="small" @click="del(scope.row)" type="error" style="margin-left: 10px;">删除</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="column.type=='status'">
|
|
|
|
|
<div v-if="scope.row[column.field]==0">待审核</div>
|
|
|
|
|
<div v-if="scope.row[column.field]==1">通过</div>
|
|
|
|
|
<div v-if="scope.row[column.field]==2">不通过</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div v-else>{{scope.row[column.field]}}</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -49,17 +57,18 @@
|
|
|
|
|
<el-input v-model="form.title" placeholder="请填写公示公告名称" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <el-col :span="10">
|
|
|
|
|
<el-form-item label="发布者" prop="date">
|
|
|
|
|
<el-input v-model="form.title" 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 placeholder="请选择发布时间" class="width100" type="date" v-model="form.date" value-format="yyyy-MM-dd">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<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="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>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="发布主体" prop="from_id">
|
|
|
|
|
<el-select class="width100" v-model="form.from_id" placeholder="请选择发布主体">
|
|
|
|
|
@ -78,24 +87,33 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <el-col :span="10">
|
|
|
|
|
<el-form-item label="来源超链接" prop="link">
|
|
|
|
|
<el-input v-model="form.link" placeholder="请填写来源超链接" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
<!-- <el-col :span="24">
|
|
|
|
|
<el-form-item label="附件" prop="file_list">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
|
|
|
|
|
action="/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
|
|
:on-exceed="handleExceed" :file-list="fileList">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="来源超链接" prop="link">
|
|
|
|
|
<el-input v-model="form.link" placeholder="请填写来源超链接" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="信息所属街道" prop="type_id">
|
|
|
|
|
<el-select class="width100" v-model="form.area_id" placeholder="全部">
|
|
|
|
|
<el-option v-for="item in selects.streetType" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="附件" prop="files_list">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
|
|
|
|
|
action="/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
|
|
:on-exceed="handleExceed" :file-list="fileList">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<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>
|
|
|
|
|
@ -139,7 +157,8 @@
|
|
|
|
|
return {
|
|
|
|
|
selects:{
|
|
|
|
|
noticeType:[],
|
|
|
|
|
noticeMain:[]
|
|
|
|
|
noticeMain:[],
|
|
|
|
|
streetType:[]
|
|
|
|
|
},
|
|
|
|
|
uploadOther: {
|
|
|
|
|
token: ""
|
|
|
|
|
@ -156,10 +175,17 @@
|
|
|
|
|
form: {
|
|
|
|
|
from_id:"",
|
|
|
|
|
type_id:"",
|
|
|
|
|
area_id:"",
|
|
|
|
|
title:"",
|
|
|
|
|
content:"",
|
|
|
|
|
content:"",
|
|
|
|
|
link: "",
|
|
|
|
|
author:"",
|
|
|
|
|
status:1,
|
|
|
|
|
author_date:'',
|
|
|
|
|
files_list: []
|
|
|
|
|
},
|
|
|
|
|
tableData: [],
|
|
|
|
|
tableData: [],
|
|
|
|
|
fileList: [],
|
|
|
|
|
rules: {
|
|
|
|
|
},
|
|
|
|
|
tableHeight: 900,
|
|
|
|
|
@ -170,16 +196,23 @@
|
|
|
|
|
field: "title",
|
|
|
|
|
title: "公告名称",
|
|
|
|
|
type: "string",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "status",
|
|
|
|
|
title: "状态",
|
|
|
|
|
type: "status",
|
|
|
|
|
width: 200,
|
|
|
|
|
align: "status"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "autor",
|
|
|
|
|
field: "author",
|
|
|
|
|
title: "发布者",
|
|
|
|
|
type: "string",
|
|
|
|
|
width: 200,
|
|
|
|
|
align: "center"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "date",
|
|
|
|
|
field: "author_date",
|
|
|
|
|
title: "发布时间",
|
|
|
|
|
type: "string",
|
|
|
|
|
width: 200,
|
|
|
|
|
@ -216,6 +249,11 @@
|
|
|
|
|
|
|
|
|
|
getparameteritem("notice-main").then(res => {
|
|
|
|
|
this.selects.noticeMain = res.detail;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
getparameteritem("streetList").then(res => {
|
|
|
|
|
this.selects.streetType = res.detail;
|
|
|
|
|
this.form.area_id = res.detail[0].id;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
load() {
|
|
|
|
|
@ -230,17 +268,25 @@
|
|
|
|
|
console.log(error)
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
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;
|
|
|
|
|
@ -284,7 +330,9 @@
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
resetForm(formName) {
|
|
|
|
|
var that = this;
|
|
|
|
|
var that = this;
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
this.$refs.tiny.setContent("");
|
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
|
that.dialogFormVisible = false;
|
|
|
|
|
},
|
|
|
|
|
@ -343,9 +391,8 @@
|
|
|
|
|
listUrl.push({
|
|
|
|
|
'upload_id': m.id
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.form.file_list = listUrl;
|
|
|
|
|
this.form.files_list = listUrl;
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -354,5 +401,9 @@
|
|
|
|
|
<style>
|
|
|
|
|
.dialogConcent {
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.width100 {
|
|
|
|
|
width: 100% !important
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|