|
@@ -145,14 +145,18 @@ a {
|
|
|
<span v-if="scope.row.receiver_ids"
|
|
<span v-if="scope.row.receiver_ids"
|
|
|
>共统计:
|
|
>共统计:
|
|
|
<a target="_blank" @click="analyseData('total', scope.row.id)"
|
|
<a target="_blank" @click="analyseData('total', scope.row.id)"
|
|
|
- ><span>{{ scope.row.receiver_ids?scope.row.receiver_ids.length:0 }}</span></a
|
|
|
|
|
|
|
+ ><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)"
|
|
@click="analyseData('finish', scope.row.id)"
|
|
|
- ><span>{{ scope.row.finish_ids?scope.row.finish_ids.length:0 }}</span></a
|
|
|
|
|
|
|
+ ><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
|
|
@@ -191,7 +195,8 @@ a {
|
|
|
class="del"
|
|
class="del"
|
|
|
@click="del(scope.row.id)"
|
|
@click="del(scope.row.id)"
|
|
|
type="text"
|
|
type="text"
|
|
|
- >删除</el-button>
|
|
|
|
|
|
|
+ >删除</el-button
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -349,7 +354,8 @@ a {
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="saveResult"
|
|
@click="saveResult"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
- >提交</el-button
|
|
|
|
|
|
|
+ :disabled="form2.status==0"
|
|
|
|
|
+ >{{this.form2.status==1?"提交":"该问卷已禁用"}}</el-button
|
|
|
>
|
|
>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -570,9 +576,19 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
switchStatus(row) {
|
|
switchStatus(row) {
|
|
|
- this.$api.editMessageStatus({id:row.id}).then((res)=>{
|
|
|
|
|
- row.status = res.data.data
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (row.status == 1) {
|
|
|
|
|
+ this.$confirm("确定禁用吗?", "提示", {
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.$api.editMessageStatus({ id: row.id }).then((res) => {
|
|
|
|
|
+ row.status = res.data.data;
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$api.editMessageStatus({ id: row.id }).then((res) => {
|
|
|
|
|
+ row.status = res.data.data;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
showQrcode(row) {
|
|
showQrcode(row) {
|
|
|
this.dialogTitle4 = "生成二维码";
|
|
this.dialogTitle4 = "生成二维码";
|
|
@@ -616,7 +632,7 @@ export default {
|
|
|
this.dialogVisible3 = true;
|
|
this.dialogVisible3 = true;
|
|
|
},
|
|
},
|
|
|
analyseData(type, message_id) {
|
|
analyseData(type, message_id) {
|
|
|
- this.form1 = {}
|
|
|
|
|
|
|
+ this.form1 = {};
|
|
|
let parm = this.form1;
|
|
let parm = this.form1;
|
|
|
parm.type = type;
|
|
parm.type = type;
|
|
|
parm.message_id = message_id;
|
|
parm.message_id = message_id;
|
|
@@ -641,24 +657,25 @@ export default {
|
|
|
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.widgetList = [];
|
|
|
|
|
+ this.form2 = {};
|
|
|
|
|
+ this.form2.status = row.status
|
|
|
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.form2[i.label] = [] ;
|
|
|
- if(i.result){
|
|
|
|
|
|
|
+ if (i.result) {
|
|
|
_this.$set(_this.form2, i.label, i.result);
|
|
_this.$set(_this.form2, i.label, i.result);
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
_this.$set(_this.form2, i.label, []);
|
|
_this.$set(_this.form2, i.label, []);
|
|
|
}
|
|
}
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
_this.$set(_this.form2, i.label, i.result);
|
|
_this.$set(_this.form2, i.label, i.result);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- console.log(this.form2);
|
|
|
|
|
|
|
+ console.log(this.form2);
|
|
|
// debugger
|
|
// debugger
|
|
|
this.dialogVisible1 = true;
|
|
this.dialogVisible1 = true;
|
|
|
}
|
|
}
|
|
@@ -686,9 +703,9 @@ export default {
|
|
|
this.getData();
|
|
this.getData();
|
|
|
},
|
|
},
|
|
|
search1() {
|
|
search1() {
|
|
|
- let parm = this.form1
|
|
|
|
|
- let type = this.cur_post_type
|
|
|
|
|
- let message_id = this.cur_message_id
|
|
|
|
|
|
|
+ let parm = this.form1;
|
|
|
|
|
+ let type = this.cur_post_type;
|
|
|
|
|
+ let message_id = this.cur_message_id;
|
|
|
parm.type = type;
|
|
parm.type = type;
|
|
|
parm.message_id = message_id;
|
|
parm.message_id = message_id;
|
|
|
this.dialogTitle2 = "统计结果";
|
|
this.dialogTitle2 = "统计结果";
|
|
@@ -744,15 +761,15 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
edit(row) {
|
|
edit(row) {
|
|
|
- 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;
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ 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);
|