|
@@ -68,7 +68,14 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :xs="12" :sm="12" :md="12" :lg="9" :xl="9" v-if="form.loginFlag">
|
|
|
|
|
|
+ <el-col
|
|
|
|
+ :xs="12"
|
|
|
|
+ :sm="12"
|
|
|
|
+ :md="12"
|
|
|
|
+ :lg="9"
|
|
|
|
+ :xl="9"
|
|
|
|
+ v-if="form.loginFlag"
|
|
|
|
+ >
|
|
<el-form-item
|
|
<el-form-item
|
|
label="是否逐题提交"
|
|
label="是否逐题提交"
|
|
prop="commitType"
|
|
prop="commitType"
|
|
@@ -93,7 +100,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
- <el-form-item
|
|
|
|
|
|
+ <el-form-item
|
|
label="问卷模板"
|
|
label="问卷模板"
|
|
prop="templateType"
|
|
prop="templateType"
|
|
:rules="[{ required: true, message: '请选择问卷模板' }]"
|
|
:rules="[{ required: true, message: '请选择问卷模板' }]"
|
|
@@ -109,7 +116,7 @@
|
|
class="chioseBox"
|
|
class="chioseBox"
|
|
:label="1"
|
|
:label="1"
|
|
:checked="form.templateType == 1"
|
|
:checked="form.templateType == 1"
|
|
- :disabled='disabled'
|
|
|
|
|
|
+ :disabled="disabled"
|
|
><br
|
|
><br
|
|
/></el-checkbox>
|
|
/></el-checkbox>
|
|
<!-- <div
|
|
<!-- <div
|
|
@@ -128,7 +135,7 @@
|
|
class="chioseBox"
|
|
class="chioseBox"
|
|
:label="2"
|
|
:label="2"
|
|
:checked="form.templateType == 2"
|
|
:checked="form.templateType == 2"
|
|
- :disabled='disabled'
|
|
|
|
|
|
+ :disabled="disabled"
|
|
><br
|
|
><br
|
|
/></el-checkbox>
|
|
/></el-checkbox>
|
|
<!-- <div
|
|
<!-- <div
|
|
@@ -145,7 +152,7 @@
|
|
class="chioseBox"
|
|
class="chioseBox"
|
|
:label="3"
|
|
:label="3"
|
|
:checked="form.templateType == 3"
|
|
:checked="form.templateType == 3"
|
|
- :disabled='disabled'
|
|
|
|
|
|
+ :disabled="disabled"
|
|
><br
|
|
><br
|
|
/></el-checkbox>
|
|
/></el-checkbox>
|
|
<!-- <div
|
|
<!-- <div
|
|
@@ -154,7 +161,7 @@
|
|
></div> -->
|
|
></div> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="chioseItem" @click="settemplateType(4)">
|
|
|
|
|
|
+ <div class="chioseItem" @click="settemplateType(4)">
|
|
<img src="./images/img4.png" alt="" />
|
|
<img src="./images/img4.png" alt="" />
|
|
<div class="remberBox">
|
|
<div class="remberBox">
|
|
<div class="wrap"></div>
|
|
<div class="wrap"></div>
|
|
@@ -162,7 +169,7 @@
|
|
class="chioseBox"
|
|
class="chioseBox"
|
|
:label="4"
|
|
:label="4"
|
|
:checked="form.templateType == 4"
|
|
:checked="form.templateType == 4"
|
|
- :disabled='disabled'
|
|
|
|
|
|
+ :disabled="disabled"
|
|
><br
|
|
><br
|
|
/></el-checkbox>
|
|
/></el-checkbox>
|
|
<!-- <div
|
|
<!-- <div
|
|
@@ -313,7 +320,7 @@
|
|
<el-button type="primary" :disabled="disabled" @click="onSubmit">{{
|
|
<el-button type="primary" :disabled="disabled" @click="onSubmit">{{
|
|
type == "create" ? "生成问卷" : "修改问卷"
|
|
type == "create" ? "生成问卷" : "修改问卷"
|
|
}}</el-button>
|
|
}}</el-button>
|
|
- <el-button type="primary" @click="onPreview">预览</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="onPreview">预览</el-button>
|
|
<el-button @click="onReset" :disabled="disabled">重置</el-button>
|
|
<el-button @click="onReset" :disabled="disabled">重置</el-button>
|
|
|
|
|
|
<!-- -->
|
|
<!-- -->
|
|
@@ -324,7 +331,7 @@
|
|
width="415px"
|
|
width="415px"
|
|
v-if="questionStatus"
|
|
v-if="questionStatus"
|
|
>
|
|
>
|
|
- <questionManger :form='form' @close="questionStatus = false"/>
|
|
|
|
|
|
+ <questionManger :form="form" @close="questionStatus = false" />
|
|
<!-- <iframe
|
|
<!-- <iframe
|
|
src="http://192.168.3.8:9001/#/question"
|
|
src="http://192.168.3.8:9001/#/question"
|
|
width="375px"
|
|
width="375px"
|
|
@@ -344,11 +351,11 @@ import {
|
|
questionnaireTopicGetDetail,
|
|
questionnaireTopicGetDetail,
|
|
questionnaireTopicUpdate,
|
|
questionnaireTopicUpdate,
|
|
} from "./api";
|
|
} from "./api";
|
|
-import questionManger from './questionManger'
|
|
|
|
|
|
+import questionManger from "./questionManger";
|
|
import AnswerList from "./components/answerList";
|
|
import AnswerList from "./components/answerList";
|
|
export default {
|
|
export default {
|
|
name: "operationQuestion",
|
|
name: "operationQuestion",
|
|
- components: { questionList, AnswerList,questionManger },
|
|
|
|
|
|
+ components: { questionList, AnswerList, questionManger },
|
|
data() {
|
|
data() {
|
|
let query = this.$route.query;
|
|
let query = this.$route.query;
|
|
let titleName = "问卷";
|
|
let titleName = "问卷";
|
|
@@ -372,7 +379,7 @@ export default {
|
|
},
|
|
},
|
|
disabled: query.type == "look" ? true : false,
|
|
disabled: query.type == "look" ? true : false,
|
|
questionStatus: false,
|
|
questionStatus: false,
|
|
- checkList:[],
|
|
|
|
|
|
+ checkList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
@@ -381,7 +388,7 @@ export default {
|
|
let res = await questionnaireTopicGetDetail({ id: this.id });
|
|
let res = await questionnaireTopicGetDetail({ id: this.id });
|
|
this.form = res.data;
|
|
this.form = res.data;
|
|
this.questionList = res.data;
|
|
this.questionList = res.data;
|
|
- this.settemplateType(res.data.templateType)
|
|
|
|
|
|
+ this.settemplateType(res.data.templateType);
|
|
// let list = res.data.questionnaireQuestionList || []
|
|
// let list = res.data.questionnaireQuestionList || []
|
|
// list.forEach((item, index) => {
|
|
// list.forEach((item, index) => {
|
|
// this.activeName.push(index)
|
|
// this.activeName.push(index)
|
|
@@ -507,17 +514,13 @@ export default {
|
|
questWindow.postMessage(
|
|
questWindow.postMessage(
|
|
{
|
|
{
|
|
cmd: "getFormJson",
|
|
cmd: "getFormJson",
|
|
- data:{...this.form}
|
|
|
|
|
|
+ data: { ...this.form },
|
|
},
|
|
},
|
|
"*"
|
|
"*"
|
|
);
|
|
);
|
|
},
|
|
},
|
|
-<<<<<<< Updated upstream
|
|
|
|
- settemplateType(index) {
|
|
|
|
- if(this.disabled)return
|
|
|
|
-=======
|
|
|
|
- setPreTemplate(index) {
|
|
|
|
->>>>>>> Stashed changes
|
|
|
|
|
|
+ settemplateType(index) {
|
|
|
|
+ if (this.disabled) return;
|
|
this.$set(this.form, "templateType", index);
|
|
this.$set(this.form, "templateType", index);
|
|
if (this.checkList.indexOf(index) == -1) {
|
|
if (this.checkList.indexOf(index) == -1) {
|
|
this.checkList.push(index);
|
|
this.checkList.push(index);
|
|
@@ -527,18 +530,17 @@ export default {
|
|
this.bindCheckBox();
|
|
this.bindCheckBox();
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
bindCheckBox() {
|
|
bindCheckBox() {
|
|
if (this.checkList.length > 1) {
|
|
if (this.checkList.length > 1) {
|
|
this.checkList.splice(0, 1);
|
|
this.checkList.splice(0, 1);
|
|
}
|
|
}
|
|
this.$set(this.form, "templateType", this.checkList[0] || null);
|
|
this.$set(this.form, "templateType", this.checkList[0] || null);
|
|
},
|
|
},
|
|
- changeLoginFlag(val){
|
|
|
|
- if(!val){
|
|
|
|
- this.form.commitType = 0
|
|
|
|
|
|
+ changeLoginFlag(val) {
|
|
|
|
+ if (!val) {
|
|
|
|
+ this.form.commitType = 0;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -634,6 +636,4 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
</style>
|
|
</style>
|