|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<!-- page title -->
|
|
<!-- page title -->
|
|
- <div v-if="stage == 0">
|
|
|
|
|
|
+ <div v-if="showHello">
|
|
<mt-header type="default" title="问卷调查-问候语" fixed></mt-header>
|
|
<mt-header type="default" title="问卷调查-问候语" fixed></mt-header>
|
|
</div>
|
|
</div>
|
|
<div v-else-if="stage == 1">
|
|
<div v-else-if="stage == 1">
|
|
@@ -17,7 +17,7 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 问候语 -->
|
|
<!-- 问候语 -->
|
|
- <div v-if="stage == 0">
|
|
|
|
|
|
+ <div v-if="showHello">
|
|
<p style="margin: 80px 0;">{{questionaire.info.hello}}</p>
|
|
<p style="margin: 80px 0;">{{questionaire.info.hello}}</p>
|
|
<mt-button type="primary" @click="start" class="button-bottom">继续</mt-button>
|
|
<mt-button type="primary" @click="start" class="button-bottom">继续</mt-button>
|
|
</div>
|
|
</div>
|
|
@@ -32,6 +32,7 @@
|
|
<span class="h3">{{questionHEAD + 1}}、</span>
|
|
<span class="h3">{{questionHEAD + 1}}、</span>
|
|
<span class="h3" style="margin-left: 5;">[</span>
|
|
<span class="h3" style="margin-left: 5;">[</span>
|
|
<span class="h3">{{questionType}}</span>
|
|
<span class="h3">{{questionType}}</span>
|
|
|
|
+ <span class="h3">{{multipleTip}}</span>
|
|
<span class="h3" style="margin-right: 5;">]</span>
|
|
<span class="h3" style="margin-right: 5;">]</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -41,12 +42,14 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<mt-radio
|
|
<mt-radio
|
|
|
|
+ style="display: inline-block;"
|
|
v-if="questionType == '单选题'"
|
|
v-if="questionType == '单选题'"
|
|
v-model="selectedSingle"
|
|
v-model="selectedSingle"
|
|
:options="questionOptions"
|
|
:options="questionOptions"
|
|
@change="onOptionSelected"
|
|
@change="onOptionSelected"
|
|
></mt-radio>
|
|
></mt-radio>
|
|
<mt-checklist
|
|
<mt-checklist
|
|
|
|
+ style="display: inline-block;"
|
|
v-else-if="questionType == '多选题'"
|
|
v-else-if="questionType == '多选题'"
|
|
v-model="selectedMultiple"
|
|
v-model="selectedMultiple"
|
|
:options="questionOptions"
|
|
:options="questionOptions"
|
|
@@ -70,7 +73,7 @@
|
|
<Label class="body" :text="questionaire.info.bye" textWrap="true" verticalAlignment="top" />
|
|
<Label class="body" :text="questionaire.info.bye" textWrap="true" verticalAlignment="top" />
|
|
<Button text="继续" @tap="onFinishTap" row="1" />
|
|
<Button text="继续" @tap="onFinishTap" row="1" />
|
|
</div>-->
|
|
</div>-->
|
|
- <div v-if="stage == 2">
|
|
|
|
|
|
+ <div v-else-if="stage == 2">
|
|
<p style="margin: 80px 0;">{{questionaire.info.bye}}</p>
|
|
<p style="margin: 80px 0;">{{questionaire.info.bye}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -91,6 +94,7 @@ export default {
|
|
name: "WebQn",
|
|
name: "WebQn",
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
|
|
+ showHello: true,
|
|
webQuestionaire: {},
|
|
webQuestionaire: {},
|
|
questionaire: { info: {} },
|
|
questionaire: { info: {} },
|
|
questionHEAD: 0,
|
|
questionHEAD: 0,
|
|
@@ -238,6 +242,21 @@ export default {
|
|
return "开放题";
|
|
return "开放题";
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ multipleTip() {
|
|
|
|
+ let type = this.currentQuestion.type;
|
|
|
|
+ if (type == 1) {
|
|
|
|
+ if (this.currentQuestion.maxOptions > 1) {
|
|
|
|
+ return (
|
|
|
|
+ "(" +
|
|
|
|
+ this.currentQuestion.minOptions +
|
|
|
|
+ "-" +
|
|
|
|
+ this.currentQuestion.maxOptions +
|
|
|
|
+ "个)"
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return "";
|
|
|
|
+ },
|
|
questionBody() {
|
|
questionBody() {
|
|
// 处理${ID}的情况
|
|
// 处理${ID}的情况
|
|
return this.replaceDollarId(this.currentQuestion.body);
|
|
return this.replaceDollarId(this.currentQuestion.body);
|
|
@@ -359,16 +378,19 @@ export default {
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
start() {
|
|
start() {
|
|
- if (this.openWay == "Project") {
|
|
|
|
- // 匿名方式打开
|
|
|
|
- this.webQuestionaire.status = 2;
|
|
|
|
- } else {
|
|
|
|
- // 登录状态打开方式
|
|
|
|
- this.webQuestionaire.status = 2;
|
|
|
|
- axios
|
|
|
|
- .put(this.webQnUrl, { status: 2 })
|
|
|
|
- .then(() => console.log("update status success"));
|
|
|
|
|
|
+ if (this.stage < 2) {
|
|
|
|
+ if (this.openWay == "Project") {
|
|
|
|
+ // 匿名方式打开
|
|
|
|
+ this.webQuestionaire.status = 2;
|
|
|
|
+ } else {
|
|
|
|
+ // 登录状态打开方式
|
|
|
|
+ this.webQuestionaire.status = 2;
|
|
|
|
+ axios
|
|
|
|
+ .put(this.webQnUrl, { status: 2 })
|
|
|
|
+ .then(() => console.log("update status success"));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ this.showHello = false;
|
|
},
|
|
},
|
|
getUserName() {
|
|
getUserName() {
|
|
if (this.openWay == "Project") {
|
|
if (this.openWay == "Project") {
|
|
@@ -444,11 +466,9 @@ export default {
|
|
let isUnselect = this.lastCheckList.length > index.length;
|
|
let isUnselect = this.lastCheckList.length > index.length;
|
|
|
|
|
|
if (isUnselect) {
|
|
if (isUnselect) {
|
|
- let selSet = new Set(index)
|
|
|
|
- let lastSet = new Set(this.lastCheckList)
|
|
|
|
- let unselectSet = new Set(
|
|
|
|
- [...lastSet].filter(x => !selSet.has(x))
|
|
|
|
- );
|
|
|
|
|
|
+ let selSet = new Set(index);
|
|
|
|
+ let lastSet = new Set(this.lastCheckList);
|
|
|
|
+ let unselectSet = new Set([...lastSet].filter(x => !selSet.has(x)));
|
|
let unselectItem = Array.from(unselectSet)[0];
|
|
let unselectItem = Array.from(unselectSet)[0];
|
|
|
|
|
|
for (
|
|
for (
|
|
@@ -875,4 +895,19 @@ export default {
|
|
.select-open-dialog textarea {
|
|
.select-open-dialog textarea {
|
|
height: 100px;
|
|
height: 100px;
|
|
}
|
|
}
|
|
|
|
+.mint-cell {
|
|
|
|
+ display: inherit;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* 取消选择框上下线 */
|
|
|
|
+.mint-cell-wrapper {
|
|
|
|
+ background-image: none;
|
|
|
|
+}
|
|
|
|
+.mint-cell:last-child {
|
|
|
|
+ background-image: none;
|
|
|
|
+}
|
|
|
|
+/* .mint-radio-input:checked + .mint-radio-core {
|
|
|
|
+ background-color: #e80413;
|
|
|
|
+ border-color: #e80413;
|
|
|
|
+} */
|
|
</style>
|
|
</style>
|