|
@@ -64,22 +64,22 @@ a {
|
|
|
top: 15px;
|
|
top: 15px;
|
|
|
left: 20px;
|
|
left: 20px;
|
|
|
}
|
|
}
|
|
|
-.result_dialog .el-dialog{
|
|
|
|
|
- width: 40%;
|
|
|
|
|
- margin-top:20vh!important;
|
|
|
|
|
|
|
+.result_dialog .el-dialog {
|
|
|
|
|
+ width: 40%;
|
|
|
|
|
+ margin-top: 20vh !important;
|
|
|
}
|
|
}
|
|
|
-.result-item{
|
|
|
|
|
- height: 35px;
|
|
|
|
|
- .label{
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+.result-item {
|
|
|
|
|
+ height: 35px;
|
|
|
|
|
+ .label {
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-.w-e-text{
|
|
|
|
|
|
|
+.w-e-text {
|
|
|
min-height: 500px;
|
|
min-height: 500px;
|
|
|
}
|
|
}
|
|
|
-.fu-dialog{
|
|
|
|
|
- .el-dialog{
|
|
|
|
|
- width:60%;
|
|
|
|
|
|
|
+.fu-dialog {
|
|
|
|
|
+ .el-dialog {
|
|
|
|
|
+ width: 60%;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
@@ -124,9 +124,9 @@ a {
|
|
|
<el-table-column prop="name" label="标题"> </el-table-column>
|
|
<el-table-column prop="name" label="标题"> </el-table-column>
|
|
|
<el-table-column prop="name" label="附件">
|
|
<el-table-column prop="name" label="附件">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <a :href="scope.row.fileurl" target="_blank"
|
|
|
|
|
- ><span>{{ scope.row.filename }}</span></a
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <a :href="item.url" target="_blank"
|
|
|
|
|
+ v-for="(item,index) in scope.row.fileurl" :key="index"
|
|
|
|
|
+ ><span>{{ item.name }}</span><br></a>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="cname" label="消息查阅统计">
|
|
<el-table-column prop="cname" label="消息查阅统计">
|
|
@@ -209,7 +209,18 @@ a {
|
|
|
<fuEditor v-model="form1.content" :isClear="false" @change="changeEditor"></fuEditor>
|
|
<fuEditor v-model="form1.content" :isClear="false" @change="changeEditor"></fuEditor>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="附件">
|
|
<el-form-item label="附件">
|
|
|
- <input @change="upload('fileurl')" id="fileurl" type="file" />
|
|
|
|
|
|
|
+ <!-- <input @change="upload('fileurl')" id="fileurl" type="file" /> -->
|
|
|
|
|
+ <el-upload
|
|
|
|
|
+ class="upload-demo"
|
|
|
|
|
+ action="/api/admin/uploadfile"
|
|
|
|
|
+ multiple
|
|
|
|
|
+ :limit="5"
|
|
|
|
|
+ :on-remove="handleRemove"
|
|
|
|
|
+ :on-success="handleUploadSuccess"
|
|
|
|
|
+ :file-list="fileList">
|
|
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
+ <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
|
|
|
|
|
+ </el-upload>
|
|
|
<span>
|
|
<span>
|
|
|
<a :href="form1.fileurl" target="_blank"
|
|
<a :href="form1.fileurl" target="_blank"
|
|
|
><span>{{ form1.filename }}</span></a
|
|
><span>{{ form1.filename }}</span></a
|
|
@@ -308,25 +319,25 @@ a {
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import Page from "../../components/Page";
|
|
import Page from "../../components/Page";
|
|
|
-import fuEditor from '../../components/fuEditor'
|
|
|
|
|
|
|
+import fuEditor from "../../components/fuEditor";
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
Page,
|
|
Page,
|
|
|
- fuEditor
|
|
|
|
|
|
|
+ fuEditor,
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- // checked: [],
|
|
|
|
|
- cur_message_id:null,
|
|
|
|
|
- cur_post_type:null,
|
|
|
|
|
- postResult:{},
|
|
|
|
|
- analyseDataList:[],
|
|
|
|
|
|
|
+ // checked: [],
|
|
|
|
|
+ fileList:[],
|
|
|
|
|
+ cur_message_id: null,
|
|
|
|
|
+ cur_post_type: null,
|
|
|
|
|
+ postResult: {},
|
|
|
|
|
+ analyseDataList: [],
|
|
|
title: "",
|
|
title: "",
|
|
|
widgetList: [],
|
|
widgetList: [],
|
|
|
form: { name: "", page: 1, page_size: 20 },
|
|
form: { name: "", page: 1, page_size: 20 },
|
|
|
form1: {},
|
|
form1: {},
|
|
|
- form2: {
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ form2: {},
|
|
|
total: 1,
|
|
total: 1,
|
|
|
list: [{ name: "2333" }],
|
|
list: [{ name: "2333" }],
|
|
|
loading: false,
|
|
loading: false,
|
|
@@ -334,10 +345,10 @@ export default {
|
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
dialogVisible1: false,
|
|
dialogVisible1: false,
|
|
|
dialogVisible2: false,
|
|
dialogVisible2: false,
|
|
|
- dialogVisible3:false,
|
|
|
|
|
|
|
+ dialogVisible3: false,
|
|
|
dialogTitle: "",
|
|
dialogTitle: "",
|
|
|
- dialogTitle2:"",
|
|
|
|
|
- dialogTitle3:"",
|
|
|
|
|
|
|
+ dialogTitle2: "",
|
|
|
|
|
+ dialogTitle3: "",
|
|
|
defaultProps: {},
|
|
defaultProps: {},
|
|
|
data: [],
|
|
data: [],
|
|
|
templateList: [],
|
|
templateList: [],
|
|
@@ -345,57 +356,77 @@ export default {
|
|
|
checkList: [],
|
|
checkList: [],
|
|
|
rules: {
|
|
rules: {
|
|
|
name: [{ required: true, message: "请输入标题", trigger: "blur" }],
|
|
name: [{ required: true, message: "请输入标题", trigger: "blur" }],
|
|
|
- receiver_id:[{ required: true, message: "请选择接收人", trigger: "change" }],
|
|
|
|
|
- content:[{ required: true, message: "请输入消息内容", trigger: "change" }]
|
|
|
|
|
|
|
+ receiver_id: [
|
|
|
|
|
+ { required: true, message: "请选择接收人", trigger: "change" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ content: [
|
|
|
|
|
+ { required: true, message: "请输入消息内容", trigger: "change" },
|
|
|
|
|
+ ],
|
|
|
},
|
|
},
|
|
|
props: { multiple: true },
|
|
props: { multiple: true },
|
|
|
options: [],
|
|
options: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- clearFilename(){
|
|
|
|
|
- this.form1.filename = '';
|
|
|
|
|
- document.getElementById("fileurl").value = '';
|
|
|
|
|
|
|
+ handleRemove(file,filelist){
|
|
|
|
|
+ let i = this.fileList.indexOf(file)
|
|
|
|
|
+ this.fileList.splice(i,1)
|
|
|
|
|
+ },
|
|
|
|
|
+ handleUploadSuccess(res,file,filelist){
|
|
|
|
|
+ this.fileList.push(res.data)
|
|
|
|
|
+ },
|
|
|
|
|
+ clearFilename() {
|
|
|
|
|
+ this.form1.filename = "";
|
|
|
|
|
+ document.getElementById("fileurl").value = "";
|
|
|
},
|
|
},
|
|
|
changeEditor(val) {
|
|
changeEditor(val) {
|
|
|
this.form1.content = val;
|
|
this.form1.content = val;
|
|
|
},
|
|
},
|
|
|
- showMessageAnalyse(){
|
|
|
|
|
- this.$router.push({path:'/message/message/analyse'})
|
|
|
|
|
|
|
+ showMessageAnalyse() {
|
|
|
|
|
+ this.$router.push({ path: "/message/message/analyse" });
|
|
|
},
|
|
},
|
|
|
- downloadExcel(){
|
|
|
|
|
- this.$api.downloadNoticeAnalyse({id:this.cur_message_id,type:this.cur_post_type}).then((res)=>{
|
|
|
|
|
- var elink = document.createElement('a');
|
|
|
|
|
- let blob=new Blob([res.data], {type: 'application/vnd.ms-excel,charset=UTF-8'});
|
|
|
|
|
- let objUrl=URL.createObjectURL(blob);
|
|
|
|
|
- let file_name=decodeURIComponent(res.headers['content-disposition'].split('=')[1]);
|
|
|
|
|
- console.log(file_name)
|
|
|
|
|
|
|
+ downloadExcel() {
|
|
|
|
|
+ this.$api
|
|
|
|
|
+ .downloadNoticeAnalyse({
|
|
|
|
|
+ id: this.cur_message_id,
|
|
|
|
|
+ type: this.cur_post_type,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ var elink = document.createElement("a");
|
|
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
|
|
+ type: "application/vnd.ms-excel,charset=UTF-8",
|
|
|
|
|
+ });
|
|
|
|
|
+ let objUrl = URL.createObjectURL(blob);
|
|
|
|
|
+ let file_name = decodeURIComponent(
|
|
|
|
|
+ res.headers["content-disposition"].split("=")[1]
|
|
|
|
|
+ );
|
|
|
|
|
+ console.log(file_name);
|
|
|
elink.download = file_name;
|
|
elink.download = file_name;
|
|
|
- elink.style.display = 'none';
|
|
|
|
|
|
|
+ elink.style.display = "none";
|
|
|
elink.href = objUrl;
|
|
elink.href = objUrl;
|
|
|
document.body.appendChild(elink);
|
|
document.body.appendChild(elink);
|
|
|
elink.click();
|
|
elink.click();
|
|
|
- document.body.removeChild(elink);
|
|
|
|
|
|
|
+ document.body.removeChild(elink);
|
|
|
this.download_loading = false;
|
|
this.download_loading = false;
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- showPostResult(row){
|
|
|
|
|
- this.postResult = row.post_result
|
|
|
|
|
- this.dialogTitle3 = "填报结果"
|
|
|
|
|
- this.dialogVisible3 = true
|
|
|
|
|
|
|
+ showPostResult(row) {
|
|
|
|
|
+ this.postResult = row.post_result;
|
|
|
|
|
+ this.dialogTitle3 = "填报结果";
|
|
|
|
|
+ this.dialogVisible3 = true;
|
|
|
},
|
|
},
|
|
|
- analyseData(type,message_id) {
|
|
|
|
|
- this.form1 = {}
|
|
|
|
|
- let parm = this.form1
|
|
|
|
|
- parm.type = type
|
|
|
|
|
- parm.id = message_id
|
|
|
|
|
- this.dialogTitle2 = "统计结果"
|
|
|
|
|
|
|
+ analyseData(type, message_id) {
|
|
|
|
|
+ this.form1 = {};
|
|
|
|
|
+ let parm = this.form1;
|
|
|
|
|
+ parm.type = type;
|
|
|
|
|
+ parm.id = message_id;
|
|
|
|
|
+ this.dialogTitle2 = "统计结果";
|
|
|
this.dialogVisible2 = true;
|
|
this.dialogVisible2 = true;
|
|
|
- this.$api.getNoticeAnalyse(parm).then((res)=>{
|
|
|
|
|
- this.analyseDataList = res.data.data.list
|
|
|
|
|
- this.cur_message_id = message_id
|
|
|
|
|
- this.cur_post_type = type
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$api.getNoticeAnalyse(parm).then((res) => {
|
|
|
|
|
+ this.analyseDataList = res.data.data.list;
|
|
|
|
|
+ this.cur_message_id = message_id;
|
|
|
|
|
+ this.cur_post_type = type;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
handleSuccess(res, file) {
|
|
handleSuccess(res, file) {
|
|
|
this.form2[res.data.type] = res.data.url;
|
|
this.form2[res.data.type] = res.data.url;
|
|
@@ -407,7 +438,7 @@ export default {
|
|
|
this.form2[label] = i;
|
|
this.form2[label] = i;
|
|
|
},
|
|
},
|
|
|
showSurvey(row) {
|
|
showSurvey(row) {
|
|
|
- let _this = this;
|
|
|
|
|
|
|
+ let _this = this;
|
|
|
this.title = row.name;
|
|
this.title = row.name;
|
|
|
this.message_id = row.id;
|
|
this.message_id = row.id;
|
|
|
this.$api.getMessageInfo({ id: row.id }).then((res) => {
|
|
this.$api.getMessageInfo({ id: row.id }).then((res) => {
|
|
@@ -415,12 +446,12 @@ export default {
|
|
|
this.widgetList = res.data.data.widget;
|
|
this.widgetList = res.data.data.widget;
|
|
|
this.widgetList.forEach((i) => {
|
|
this.widgetList.forEach((i) => {
|
|
|
if (i.type == "checkbox") {
|
|
if (i.type == "checkbox") {
|
|
|
- // _this.form2[i.label] = [] ;
|
|
|
|
|
- _this.$set(_this.form2,i.label,[])
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // _this.form2[i.label] = [] ;
|
|
|
|
|
+ _this.$set(_this.form2, i.label, []);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
- console.log(this.form2)
|
|
|
|
|
- // debugger
|
|
|
|
|
|
|
+ console.log(this.form2);
|
|
|
|
|
+ // debugger
|
|
|
this.dialogVisible1 = true;
|
|
this.dialogVisible1 = true;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -447,10 +478,11 @@ export default {
|
|
|
this.getData();
|
|
this.getData();
|
|
|
},
|
|
},
|
|
|
search1() {
|
|
search1() {
|
|
|
- this.analyseData(this.cur_post_type,this.cur_message_id);
|
|
|
|
|
|
|
+ this.analyseData(this.cur_post_type, this.cur_message_id);
|
|
|
},
|
|
},
|
|
|
openDiag() {
|
|
openDiag() {
|
|
|
this.form1 = {};
|
|
this.form1 = {};
|
|
|
|
|
+ this.fileList = []
|
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
|
this.dialogTitle = "发送消息";
|
|
this.dialogTitle = "发送消息";
|
|
|
},
|
|
},
|
|
@@ -490,9 +522,10 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
edit(row) {
|
|
edit(row) {
|
|
|
- this.$api.getNoticeInfo({id:row.id}).then((res)=>{
|
|
|
|
|
|
|
+ this.$api.getNoticeInfo({ id: row.id }).then((res) => {
|
|
|
this.form1 = res.data.data;
|
|
this.form1 = res.data.data;
|
|
|
- this.dialogTitle = "编辑消息"
|
|
|
|
|
|
|
+ this.fileList = res.data.data.fileurl
|
|
|
|
|
+ this.dialogTitle = "编辑消息";
|
|
|
let receiver_ids = this.form1.receiver_id;
|
|
let receiver_ids = this.form1.receiver_id;
|
|
|
if (typeof receiver_ids == "string") {
|
|
if (typeof receiver_ids == "string") {
|
|
|
receiver_ids = JSON.parse(receiver_ids);
|
|
receiver_ids = JSON.parse(receiver_ids);
|
|
@@ -502,7 +535,7 @@ export default {
|
|
|
// });
|
|
// });
|
|
|
this.form1.receiver_id = receiver_ids;
|
|
this.form1.receiver_id = receiver_ids;
|
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
saveResult() {
|
|
saveResult() {
|
|
|
let result = JSON.stringify(this.form2);
|
|
let result = JSON.stringify(this.form2);
|
|
@@ -528,6 +561,7 @@ export default {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
let parm = this.form1;
|
|
let parm = this.form1;
|
|
|
let id = this.form1.id;
|
|
let id = this.form1.id;
|
|
|
|
|
+ parm.fileurl = JSON.stringify(this.fileList)
|
|
|
parm.receiver_id = JSON.stringify(parm.receiver_id);
|
|
parm.receiver_id = JSON.stringify(parm.receiver_id);
|
|
|
if (id) {
|
|
if (id) {
|
|
|
this.$api.editNotice(parm).then((res) => {
|
|
this.$api.editNotice(parm).then((res) => {
|