|
@@ -65,21 +65,21 @@ 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;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-.qrcode_dialog{
|
|
|
|
|
- .el-dialog{
|
|
|
|
|
|
|
+.qrcode_dialog {
|
|
|
|
|
+ .el-dialog {
|
|
|
width: 30%;
|
|
width: 30%;
|
|
|
}
|
|
}
|
|
|
- img{
|
|
|
|
|
|
|
+ img {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -101,6 +101,7 @@ a {
|
|
|
placeholder="请输入标题"
|
|
placeholder="请输入标题"
|
|
|
v-model="form.name"
|
|
v-model="form.name"
|
|
|
@clear="getData"
|
|
@clear="getData"
|
|
|
|
|
+ @keyup.enter.native="search"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
@@ -134,9 +135,7 @@ a {
|
|
|
<a @click="showSurvey(scope.row)" target="_blank"
|
|
<a @click="showSurvey(scope.row)" target="_blank"
|
|
|
><span>查看问卷</span></a
|
|
><span>查看问卷</span></a
|
|
|
>
|
|
>
|
|
|
- <a
|
|
|
|
|
- v-if="scope.row.template_qrcode"
|
|
|
|
|
- @click="showQrcode(scope.row)"
|
|
|
|
|
|
|
+ <a v-if="scope.row.template_qrcode" @click="showQrcode(scope.row)"
|
|
|
><span> | 生成二维码</span></a
|
|
><span> | 生成二维码</span></a
|
|
|
>
|
|
>
|
|
|
</template>
|
|
</template>
|
|
@@ -145,21 +144,21 @@ a {
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.receiver_ids"
|
|
<span v-if="scope.row.receiver_ids"
|
|
|
>共统计:
|
|
>共统计:
|
|
|
- <a target="_blank" @click="analyseData('total',scope.row.id)"
|
|
|
|
|
- ><span>{{ scope.row.receiver_ids.length }}</span></a
|
|
|
|
|
|
|
+ <a target="_blank" @click="analyseData('total', scope.row.id)"
|
|
|
|
|
+ ><span>{{ scope.row.receiver_ids?scope.row.receiver_ids.length:0 }}</span></a
|
|
|
>人<br />
|
|
>人<br />
|
|
|
</span>
|
|
</span>
|
|
|
已填报:<a
|
|
已填报:<a
|
|
|
:href="scope.row.fileurl"
|
|
:href="scope.row.fileurl"
|
|
|
target="_blank"
|
|
target="_blank"
|
|
|
- @click="analyseData('finish',scope.row.id)"
|
|
|
|
|
- ><span>{{ scope.row.finish_ids.length }}</span></a
|
|
|
|
|
|
|
+ @click="analyseData('finish', scope.row.id)"
|
|
|
|
|
+ ><span>{{ scope.row.finish_ids?scope.row.finish_ids.length:0 }}</span></a
|
|
|
>人<br />
|
|
>人<br />
|
|
|
<span v-if="scope.row.receiver_ids">
|
|
<span v-if="scope.row.receiver_ids">
|
|
|
未填报:<a
|
|
未填报:<a
|
|
|
:href="scope.row.fileurl"
|
|
:href="scope.row.fileurl"
|
|
|
target="_blank"
|
|
target="_blank"
|
|
|
- @click="analyseData('unfinish',scope.row.id)"
|
|
|
|
|
|
|
+ @click="analyseData('unfinish', scope.row.id)"
|
|
|
><span>{{ scope.row.unfinish_ids.length }}</span></a
|
|
><span>{{ scope.row.unfinish_ids.length }}</span></a
|
|
|
>人<br
|
|
>人<br
|
|
|
/></span>
|
|
/></span>
|
|
@@ -170,10 +169,12 @@ a {
|
|
|
<a @click="showMessageAnalyse(scope.row)">查看</a>
|
|
<a @click="showMessageAnalyse(scope.row)">查看</a>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="cname" label="发送者" width="80px"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="cname" label="发送者" width="80px">
|
|
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column prop="receiver_names" label="接收者"> -->
|
|
<!-- <el-table-column prop="receiver_names" label="接收者"> -->
|
|
|
<!-- </el-table-column> -->
|
|
<!-- </el-table-column> -->
|
|
|
- <el-table-column prop="ctime" label="发送时间" width="180px"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="ctime" label="发送时间" width="180px">
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="zip" width="150" label="操作">
|
|
<el-table-column prop="zip" width="150" label="操作">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button class="edit" type="text" @click="edit(scope.row)"
|
|
<el-button class="edit" type="text" @click="edit(scope.row)"
|
|
@@ -198,7 +199,6 @@ a {
|
|
|
:title="dialogTitle"
|
|
:title="dialogTitle"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
:visible.sync="dialogVisible"
|
|
:visible.sync="dialogVisible"
|
|
|
- @close="getData"
|
|
|
|
|
>
|
|
>
|
|
|
<el-form
|
|
<el-form
|
|
|
size="small"
|
|
size="small"
|
|
@@ -210,7 +210,12 @@ a {
|
|
|
:rules="rules"
|
|
:rules="rules"
|
|
|
>
|
|
>
|
|
|
<el-form-item label="标题" prop="name">
|
|
<el-form-item label="标题" prop="name">
|
|
|
- <el-input v-model="form1.name" placeholder="请输入标题" maxlength="50" show-word-limit></el-input>
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form1.name"
|
|
|
|
|
+ placeholder="请输入标题"
|
|
|
|
|
+ maxlength="50"
|
|
|
|
|
+ show-word-limit
|
|
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="接收人" prop="receiver_id">
|
|
<el-form-item label="接收人" prop="receiver_id">
|
|
|
<el-cascader
|
|
<el-cascader
|
|
@@ -274,6 +279,7 @@ a {
|
|
|
<el-input
|
|
<el-input
|
|
|
v-if="item.type == 'textarea'"
|
|
v-if="item.type == 'textarea'"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
|
|
+ :rows="4"
|
|
|
v-model="form2[item.label]"
|
|
v-model="form2[item.label]"
|
|
|
:placeholder="item.placeholder"
|
|
:placeholder="item.placeholder"
|
|
|
></el-input>
|
|
></el-input>
|
|
@@ -359,13 +365,16 @@ a {
|
|
|
placeholder="请输入标题"
|
|
placeholder="请输入标题"
|
|
|
v-model="form1.name"
|
|
v-model="form1.name"
|
|
|
@clear="search1"
|
|
@clear="search1"
|
|
|
|
|
+ @keyup.enter.native="search1"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="search1">搜索</el-button>
|
|
<el-button type="primary" @click="search1">搜索</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item style="float: right">
|
|
<el-form-item style="float: right">
|
|
|
- <el-button type="primary" @click="downloadExcel">导出Excel</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="downloadExcel"
|
|
|
|
|
+ >导出Excel</el-button
|
|
|
|
|
+ >
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
@@ -380,7 +389,10 @@ a {
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
>
|
|
>
|
|
|
<el-table-column prop="realname" label="姓名"> </el-table-column>
|
|
<el-table-column prop="realname" label="姓名"> </el-table-column>
|
|
|
- <el-table-column prop="journal_name" label="所属期刊"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="journal_name"
|
|
|
|
|
+ label="所属期刊"
|
|
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column prop="cname" label="状态">
|
|
<el-table-column prop="cname" label="状态">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.post_status">已填报</span>
|
|
<span v-if="scope.row.post_status">已填报</span>
|
|
@@ -389,12 +401,15 @@ a {
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="post_time" label="填报时间"> </el-table-column>
|
|
<el-table-column prop="post_time" label="填报时间"> </el-table-column>
|
|
|
<el-table-column prop="zip" width="80" label="操作">
|
|
<el-table-column prop="zip" width="80" label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-button class="edit" type="text" @click="showPostResult(scope.row)"
|
|
|
|
|
- >查看</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ class="edit"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ @click="showPostResult(scope.row)"
|
|
|
|
|
+ >查看</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<Page
|
|
<Page
|
|
|
ref="pageButton"
|
|
ref="pageButton"
|
|
@@ -407,28 +422,33 @@ a {
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<!-- 展示填报结果 -->
|
|
<!-- 展示填报结果 -->
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- :title="dialogTitle3"
|
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
|
- :visible.sync="dialogVisible3"
|
|
|
|
|
- class="result_dialog"
|
|
|
|
|
|
|
+ :title="dialogTitle3"
|
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
|
+ :visible.sync="dialogVisible3"
|
|
|
|
|
+ class="result_dialog"
|
|
|
>
|
|
>
|
|
|
- <div class="content">
|
|
|
|
|
- <div class="result-item" v-for="(item,key) in this.postResult" :key="key">
|
|
|
|
|
- <span class="label">{{key}}:</span><span class="value">{{item}}</span>
|
|
|
|
|
|
|
+ <div class="content">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="result-item"
|
|
|
|
|
+ v-for="(item, key) in this.postResult"
|
|
|
|
|
+ :key="key"
|
|
|
|
|
+ >
|
|
|
|
|
+ <span class="label">{{ key }}:</span
|
|
|
|
|
+ ><span class="value">{{ item }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="Object.keys(postResult).length==0">暂无数据</div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div v-if="Object.keys(postResult).length == 0">暂无数据</div>
|
|
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<!-- 展示二维码 -->
|
|
<!-- 展示二维码 -->
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- :title="dialogTitle4"
|
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
|
- :visible.sync="dialogVisible4"
|
|
|
|
|
- class="qrcode_dialog"
|
|
|
|
|
|
|
+ :title="dialogTitle4"
|
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
|
+ :visible.sync="dialogVisible4"
|
|
|
|
|
+ class="qrcode_dialog"
|
|
|
>
|
|
>
|
|
|
- <div class="content">
|
|
|
|
|
- <img :src="qrcodeUrl" alt="">
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="content">
|
|
|
|
|
+ <img :src="qrcodeUrl" alt="" />
|
|
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</section>
|
|
</section>
|
|
|
</template>
|
|
</template>
|
|
@@ -440,18 +460,17 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- // checked: [],
|
|
|
|
|
- qrcodeUrl:"",
|
|
|
|
|
- cur_message_id:null,
|
|
|
|
|
- cur_post_type:null,
|
|
|
|
|
- postResult:{},
|
|
|
|
|
- analyseDataList:[],
|
|
|
|
|
|
|
+ // checked: [],
|
|
|
|
|
+ qrcodeUrl: "",
|
|
|
|
|
+ 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,
|
|
@@ -459,12 +478,12 @@ export default {
|
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
dialogVisible1: false,
|
|
dialogVisible1: false,
|
|
|
dialogVisible2: false,
|
|
dialogVisible2: false,
|
|
|
- dialogVisible3:false,
|
|
|
|
|
- dialogVisible4:false,
|
|
|
|
|
|
|
+ dialogVisible3: false,
|
|
|
|
|
+ dialogVisible4: false,
|
|
|
dialogTitle: "",
|
|
dialogTitle: "",
|
|
|
- dialogTitle2:"",
|
|
|
|
|
- dialogTitle3:"",
|
|
|
|
|
- dialogTitle4:"",
|
|
|
|
|
|
|
+ dialogTitle2: "",
|
|
|
|
|
+ dialogTitle3: "",
|
|
|
|
|
+ dialogTitle4: "",
|
|
|
defaultProps: {},
|
|
defaultProps: {},
|
|
|
data: [],
|
|
data: [],
|
|
|
templateList: [],
|
|
templateList: [],
|
|
@@ -472,8 +491,12 @@ 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" }],
|
|
|
|
|
- template_id:[{ required: true, message: "请选择模板", trigger: "change" }]
|
|
|
|
|
|
|
+ receiver_id: [
|
|
|
|
|
+ { required: true, message: "请选择接收人", trigger: "change" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ template_id: [
|
|
|
|
|
+ { required: true, message: "请选择模板", trigger: "change" },
|
|
|
|
|
+ ],
|
|
|
},
|
|
},
|
|
|
props: { multiple: true },
|
|
props: { multiple: true },
|
|
|
options: [
|
|
options: [
|
|
@@ -536,46 +559,58 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- showQrcode(row){
|
|
|
|
|
- this.dialogTitle4="生成二维码"
|
|
|
|
|
- this.dialogVisible4=true
|
|
|
|
|
- this.qrcodeUrl=row.template_qrcode
|
|
|
|
|
|
|
+ showQrcode(row) {
|
|
|
|
|
+ this.dialogTitle4 = "生成二维码";
|
|
|
|
|
+ this.dialogVisible4 = true;
|
|
|
|
|
+ this.qrcodeUrl = row.template_qrcode;
|
|
|
},
|
|
},
|
|
|
- showMessageAnalyse(row){
|
|
|
|
|
- this.$router.push({path:'/message/innerSurvey/analyse',query:{id:row.id,type:row.type}})
|
|
|
|
|
|
|
+ showMessageAnalyse(row) {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: "/message/innerSurvey/analyse",
|
|
|
|
|
+ query: { id: row.id, type: row.type },
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- downloadExcel(){
|
|
|
|
|
- this.$api.downloadAnalyseAll({message_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
|
|
|
|
|
+ .downloadAnalyseAll({
|
|
|
|
|
+ message_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) {
|
|
|
|
|
- let parm = this.form1
|
|
|
|
|
- parm.type = type
|
|
|
|
|
- parm.message_id = message_id
|
|
|
|
|
- this.dialogTitle2 = "统计结果"
|
|
|
|
|
|
|
+ analyseData(type, message_id) {
|
|
|
|
|
+ let parm = this.form1;
|
|
|
|
|
+ parm.type = type;
|
|
|
|
|
+ parm.message_id = message_id;
|
|
|
|
|
+ this.dialogTitle2 = "统计结果";
|
|
|
this.dialogVisible2 = true;
|
|
this.dialogVisible2 = true;
|
|
|
- this.$api.getMessageSurveyAnalyse(parm).then((res)=>{
|
|
|
|
|
- this.analyseDataList = res.data.data.list
|
|
|
|
|
- this.cur_message_id = message_id
|
|
|
|
|
- this.cur_post_type = type
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$api.getMessageSurveyAnalyse(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;
|
|
@@ -587,20 +622,22 @@ 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.widgetList = []
|
|
|
|
|
+ this.form2 = {}
|
|
|
this.$api.getMessageInfo({ id: row.id }).then((res) => {
|
|
this.$api.getMessageInfo({ id: row.id }).then((res) => {
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
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;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -627,7 +664,7 @@ export default {
|
|
|
this.getData();
|
|
this.getData();
|
|
|
},
|
|
},
|
|
|
search1() {
|
|
search1() {
|
|
|
- this.analyseData("total",this.cur_message_id)
|
|
|
|
|
|
|
+ this.analyseData("total", this.cur_message_id);
|
|
|
},
|
|
},
|
|
|
openDiag() {
|
|
openDiag() {
|
|
|
this.form1 = {};
|
|
this.form1 = {};
|
|
@@ -643,7 +680,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
getData() {
|
|
getData() {
|
|
|
var parm = this.form;
|
|
var parm = this.form;
|
|
|
- parm.type = 0
|
|
|
|
|
|
|
+ parm.type = 0;
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
this.$api.getAllTemplateList().then((res) => {
|
|
this.$api.getAllTemplateList().then((res) => {
|
|
|
this.templateList = res.data.data;
|
|
this.templateList = res.data.data;
|
|
@@ -674,17 +711,15 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
edit(row) {
|
|
edit(row) {
|
|
|
- this.form1 = row;
|
|
|
|
|
- let receiver_ids = this.form1.receiver_id;
|
|
|
|
|
- console.log(receiver_ids, 33333333333333);
|
|
|
|
|
- if (typeof receiver_ids == "string") {
|
|
|
|
|
- receiver_ids = JSON.parse(receiver_ids);
|
|
|
|
|
- }
|
|
|
|
|
- // receiver_ids.forEach((element,index) => {
|
|
|
|
|
- // receiver_ids[index] = parseInt(element)
|
|
|
|
|
- // });
|
|
|
|
|
- this.form1.receiver_id = receiver_ids;
|
|
|
|
|
- this.dialogVisible = true;
|
|
|
|
|
|
|
+ this.$api.getMessageInfo({id:row.id}).then((res)=>{
|
|
|
|
|
+ this.form1 = res.data.data;
|
|
|
|
|
+ let receiver_ids = this.form1.receiver_id;
|
|
|
|
|
+ if (typeof receiver_ids == "string") {
|
|
|
|
|
+ receiver_ids = JSON.parse(receiver_ids);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.form1.receiver_id = receiver_ids;
|
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
saveResult() {
|
|
saveResult() {
|
|
|
let result = JSON.stringify(this.form2);
|
|
let result = JSON.stringify(this.form2);
|
|
@@ -700,13 +735,13 @@ export default {
|
|
|
message: "保存成功!",
|
|
message: "保存成功!",
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- this.$message.error("保存失败!");
|
|
|
|
|
|
|
+ this.$message.error(res.data.message);
|
|
|
}
|
|
}
|
|
|
this.dialogVisible1 = false;
|
|
this.dialogVisible1 = false;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
save() {
|
|
save() {
|
|
|
- this.loading = true
|
|
|
|
|
|
|
+ this.loading = true;
|
|
|
this.$refs["form1"].validate((valid) => {
|
|
this.$refs["form1"].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
let parm = this.form1;
|
|
let parm = this.form1;
|
|
@@ -724,7 +759,7 @@ export default {
|
|
|
this.$message.error("保存失败!");
|
|
this.$message.error("保存失败!");
|
|
|
}
|
|
}
|
|
|
this.getData();
|
|
this.getData();
|
|
|
- this.loading = false
|
|
|
|
|
|
|
+ this.loading = false;
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|