|
@@ -7,8 +7,11 @@
|
|
|
<span class="shape"></span>
|
|
|
<p style="margin-right: 5px">满意度调查</p>
|
|
|
</div>
|
|
|
-
|
|
|
- <el-button type="text" @click="addSurvey">+新增满意度调查</el-button>
|
|
|
+ <auth auths="musicGroupQuestionnaire/add">
|
|
|
+ <el-button type="text" @click="addSurvey"
|
|
|
+ >+新增满意度调查</el-button
|
|
|
+ >
|
|
|
+ </auth>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-alert>
|
|
@@ -31,15 +34,27 @@
|
|
|
<el-table-column align="center" prop="id" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- <el-button type="text" @click="lookSurvey(scope.row)"
|
|
|
- >详情</el-button
|
|
|
- >
|
|
|
- <el-button type="text" @click="resetSurvey(scope.row)"
|
|
|
- >修改</el-button
|
|
|
- >
|
|
|
- <el-button type="text" @click="deleteSurvey(scope.row)"
|
|
|
- >删除</el-button
|
|
|
+ <auth auths="getMusicGroupQuestionnaireDetail">
|
|
|
+ <el-button type="text" @click="lookSurvey(scope.row)"
|
|
|
+ >详情</el-button
|
|
|
+ >
|
|
|
+ </auth>
|
|
|
+ <auth
|
|
|
+ :auths="[
|
|
|
+ 'getMusicGroupQuestionnaireDetail',
|
|
|
+ 'musicGroupQuestionnaire/update',
|
|
|
+ ]"
|
|
|
+ mulit
|
|
|
>
|
|
|
+ <el-button type="text" @click="resetSurvey(scope.row)"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ </auth>
|
|
|
+ <auth auths="musicGroupQuestionnaire/del">
|
|
|
+ <el-button type="text" @click="deleteSurvey(scope.row)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </auth>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -79,6 +94,7 @@ import {
|
|
|
getMusicGroupQuestionnaire,
|
|
|
getQuestionDetail,
|
|
|
getMusicGroupQuestionnaireDetail,
|
|
|
+ delQuestion,
|
|
|
} from "./api";
|
|
|
import surveyMask from "./modals/surveyMask";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
@@ -122,7 +138,7 @@ export default {
|
|
|
this.form.musicGroupId = this.$route.query.id;
|
|
|
this.form.target = null;
|
|
|
this.form.id = null;
|
|
|
- this.form.questionTime =null;
|
|
|
+ this.form.questionTime = null;
|
|
|
let questionnaireUserResult =
|
|
|
this.questionList.questionnaireQuestionList.map((item) => {
|
|
|
if (item.type == "radio") {
|
|
@@ -143,7 +159,7 @@ export default {
|
|
|
"questionnaireUserResultList",
|
|
|
questionnaireUserResult
|
|
|
);
|
|
|
- this.$refs.surveyMask.$refs.form.resetFields()
|
|
|
+ this.$refs.surveyMask.$refs.form.resetFields();
|
|
|
},
|
|
|
async getList() {
|
|
|
try {
|
|
@@ -159,7 +175,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async lookSurvey(row) {
|
|
|
- this.surveyTitle = "查看满意度调查"
|
|
|
+ this.surveyTitle = "查看满意度调查";
|
|
|
await this.setDetail(row);
|
|
|
this.isdisabled = true;
|
|
|
this.surveyVisible = true;
|
|
@@ -194,15 +210,31 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async resetSurvey(row) {
|
|
|
- this.surveyTitle = "修改满意度调查"
|
|
|
+ this.surveyTitle = "修改满意度调查";
|
|
|
await this.setDetail(row);
|
|
|
this.isdisabled = false;
|
|
|
this.surveyVisible = true;
|
|
|
},
|
|
|
- deleteSurvey(row) {},
|
|
|
- async addSurvey() {
|
|
|
+ async deleteSurvey(row) {
|
|
|
+ this.$confirm("是否删除此次问卷?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ try {
|
|
|
+ const res = await delQuestion({ id: row.id });
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.getList();
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ async addSurvey() {
|
|
|
(this.activeRow = null), (this.surveyTitle = "新增满意度调查");
|
|
|
- await this.setQuestion();
|
|
|
+ await this.setQuestion();
|
|
|
this.isdisabled = false;
|
|
|
this.surveyVisible = true;
|
|
|
},
|