|
@@ -0,0 +1,284 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <LinkTitlesCustom
|
|
|
|
+ :current-paths="['系统管理', '顶级机构管理', '机构设置']"
|
|
|
|
+ />
|
|
|
|
+ <section class="content">
|
|
|
|
+ <div class="box box-info">
|
|
|
|
+ <!-- 正文信息 -->
|
|
|
|
+ <div class="box-body">
|
|
|
|
+ <el-form
|
|
|
|
+ ref="form"
|
|
|
|
+ :inline="true"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ :model="form"
|
|
|
|
+ inline-message
|
|
|
|
+ label-position="right"
|
|
|
|
+ >
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="20"
|
|
|
|
+ ><span>{{ rootOrgName }}</span></el-col
|
|
|
|
+ >
|
|
|
|
+ <el-col :span="4"
|
|
|
|
+ ><div>
|
|
|
|
+ <el-button type="primary" size="small" @click="save"
|
|
|
|
+ >保 存</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
|
+ @click="back"
|
|
|
|
+ >返 回</el-button
|
|
|
|
+ >
|
|
|
|
+ </div></el-col
|
|
|
|
+ ></el-row
|
|
|
|
+ >
|
|
|
|
+ <div class="block-seperator"></div>
|
|
|
|
+ <el-tabs v-model="activeName" type="border-card">
|
|
|
|
+ <!-- 题型设置 -->
|
|
|
|
+ <el-tab-pane label="题型设置" name="tab1">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="可用题型"
|
|
|
|
+ prop="properties.ROOT_ORG_QUESTION_TYPES"
|
|
|
|
+ >
|
|
|
|
+ </el-form-item
|
|
|
|
+ ></el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="基础题型"
|
|
|
|
+ label-width="120px"
|
|
|
|
+ prop="properties.ROOT_ORG_QUESTION_TYPES1"
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox-group
|
|
|
|
+ v-model="form.properties.ROOT_ORG_QUESTION_TYPES1"
|
|
|
|
+ class="pull_length"
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="SINGLE_ANSWER_QUESTION"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >单选</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="MULTIPLE_ANSWER_QUESTION"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >多选</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="BOOL_ANSWER_QUESTION"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >判断</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="FILL_BLANK_QUESTION"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >填空</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="TEXT_ANSWER_QUESTION"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >问答</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ </el-checkbox-group></el-form-item
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="组合题型"
|
|
|
|
+ label-width="120px"
|
|
|
|
+ prop="properties.ROOT_ORG_QUESTION_TYPES2"
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox-group
|
|
|
|
+ v-model="form.properties.ROOT_ORG_QUESTION_TYPES2"
|
|
|
|
+ class="pull_length"
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="READING_COMPREHENSION"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >普通阅读</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox label="CLOZE" class="checkbox_length"
|
|
|
|
+ >完形填空</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="PARAGRAPH_MATCHING"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >段落匹配</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox label="BANKED_CLOZE" class="checkbox_length"
|
|
|
|
+ >选词填空</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ </el-checkbox-group></el-form-item
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="特殊题型"
|
|
|
|
+ label-width="120px"
|
|
|
|
+ prop="properties.ROOT_ORG_QUESTION_TYPES3"
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox-group
|
|
|
|
+ v-model="form.properties.ROOT_ORG_QUESTION_TYPES3"
|
|
|
|
+ class="pull_length"
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="LISTENING_QUESTION"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >听力</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ </el-checkbox-group></el-form-item
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item label="成卷配置"> </el-form-item
|
|
|
|
+ ></el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item label="特殊设置" label-width="120px">
|
|
|
|
+ <el-checkbox-group
|
|
|
|
+ v-model="form.properties.QUESTION_TYPE_SPECIAL_SET"
|
|
|
|
+ class="pull_length"
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox
|
|
|
|
+ label="AUTONOMY_QUESTION"
|
|
|
|
+ class="checkbox_length"
|
|
|
|
+ >选做题设置</el-checkbox
|
|
|
|
+ >
|
|
|
|
+ </el-checkbox-group></el-form-item
|
|
|
|
+ >
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <!-- 审核配置 -->
|
|
|
|
+ <el-tab-pane label="审核配置" name="tab2"> </el-tab-pane>
|
|
|
|
+ <!-- 查重配置 -->
|
|
|
|
+ <el-tab-pane label="查重配置" name="tab3"> </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { mapState } from "vuex";
|
|
|
|
+import { QUESTION_API } from "@/constants/constants.js";
|
|
|
|
+import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ components: {
|
|
|
|
+ LinkTitlesCustom,
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ style: {
|
|
|
|
+ label_width_tab1: "160px",
|
|
|
|
+ label_width_tab2: "110px",
|
|
|
|
+ label_width_tab3: "120px",
|
|
|
|
+ },
|
|
|
|
+ activeName: "tab1",
|
|
|
|
+ rootOrgName: "",
|
|
|
|
+ form: {
|
|
|
|
+ orgId: null,
|
|
|
|
+ properties: {
|
|
|
|
+ ROOT_ORG_QUESTION_TYPES: [],
|
|
|
|
+ ROOT_ORG_QUESTION_TYPES1: [],
|
|
|
|
+ ROOT_ORG_QUESTION_TYPES2: [],
|
|
|
|
+ ROOT_ORG_QUESTION_TYPES3: [],
|
|
|
|
+ QUESTION_TYPE_SPECIAL_SET: [],
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ rules: {
|
|
|
|
+ // code: [{ required: true, validator: validateCode, trigger: "blur" }],
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState({ user: (state) => state.user }),
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.form.orgId = this.$route.params.rootOrgId;
|
|
|
|
+ this.rootOrgName =
|
|
|
|
+ this.$route.params.rootOrgName +
|
|
|
|
+ "(" +
|
|
|
|
+ this.$route.params.rootOrgCode +
|
|
|
|
+ ")";
|
|
|
|
+ this.init();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ init() {
|
|
|
|
+ var url = QUESTION_API + "/org/allProperties/" + this.form.orgId;
|
|
|
|
+ this.$httpWithMsg.get(url).then((response) => {
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES1 = JSON.parse(
|
|
|
|
+ response.data.ROOT_ORG_QUESTION_TYPES1
|
|
|
|
+ );
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES2 = JSON.parse(
|
|
|
|
+ response.data.ROOT_ORG_QUESTION_TYPES2
|
|
|
|
+ );
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES3 = JSON.parse(
|
|
|
|
+ response.data.ROOT_ORG_QUESTION_TYPES3
|
|
|
|
+ );
|
|
|
|
+ this.form.properties.QUESTION_TYPE_SPECIAL_SET = JSON.parse(
|
|
|
|
+ response.data.QUESTION_TYPE_SPECIAL_SET
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ setParams() {
|
|
|
|
+ for (let i of this.form.properties.ROOT_ORG_QUESTION_TYPES1) {
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES.push(i);
|
|
|
|
+ }
|
|
|
|
+ for (let i of this.form.properties.ROOT_ORG_QUESTION_TYPES2) {
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES.push(i);
|
|
|
|
+ }
|
|
|
|
+ for (let i of this.form.properties.ROOT_ORG_QUESTION_TYPES3) {
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES.push(i);
|
|
|
|
+ }
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES = JSON.stringify(
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES
|
|
|
|
+ );
|
|
|
|
+ if (this.form.properties.ROOT_ORG_QUESTION_TYPES1) {
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES1 = JSON.stringify(
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES1
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ if (this.form.properties.ROOT_ORG_QUESTION_TYPES2) {
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES2 = JSON.stringify(
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES2
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ if (this.form.properties.ROOT_ORG_QUESTION_TYPES3) {
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES3 = JSON.stringify(
|
|
|
|
+ this.form.properties.ROOT_ORG_QUESTION_TYPES3
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ if (this.form.properties.QUESTION_TYPE_SPECIAL_SET) {
|
|
|
|
+ this.form.properties.QUESTION_TYPE_SPECIAL_SET = JSON.stringify(
|
|
|
|
+ this.form.properties.QUESTION_TYPE_SPECIAL_SET
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ save() {
|
|
|
|
+ this.setParams();
|
|
|
|
+ let url = QUESTION_API + "/org/saveOrgProperties";
|
|
|
|
+ this.$httpWithMsg.put(url, this.form).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "保存成功!",
|
|
|
|
+ });
|
|
|
|
+ this.back();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ back() {
|
|
|
|
+ this.$router.push({ path: "/questions/school" });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+<style scoped>
|
|
|
|
+.pull_length {
|
|
|
|
+ /* width: 240px; */
|
|
|
|
+}
|
|
|
|
+.input >>> .el-input__inner {
|
|
|
|
+ -webkit-appearance: button;
|
|
|
|
+}
|
|
|
|
+</style>
|