Commit 52e3f6e1b315fc5cdf569aee37a977655a64a53c
1 parent
109e9818
微调题目维护
Showing
2 changed files
with
11 additions
and
45 deletions
src/views/QuestionBank/index.vue
| @@ -19,8 +19,9 @@ | @@ -19,8 +19,9 @@ | ||
| 19 | <span class="custom-tree-node" slot-scope="{ node, data }"> | 19 | <span class="custom-tree-node" slot-scope="{ node, data }"> |
| 20 | <span>{{ node.label }}</span> | 20 | <span>{{ node.label }}</span> |
| 21 | <span style=""> | 21 | <span style=""> |
| 22 | + <!-- v-if="activeTab == 'first'?true:node.level<2?true:false" --> | ||
| 22 | <el-button type="text" size="mini" @click="showClassDialog(node)" | 23 | <el-button type="text" size="mini" @click="showClassDialog(node)" |
| 23 | - v-if="activeTab == 'first'?true:node.level<2?true:false"> | 24 | + > |
| 24 | 添加下级 | 25 | 添加下级 |
| 25 | </el-button> | 26 | </el-button> |
| 26 | <el-button type="text" v-if="activeTab == 'second'" @click="handleEditDimension(node, data)">编辑 | 27 | <el-button type="text" v-if="activeTab == 'second'" @click="handleEditDimension(node, data)">编辑 |
| @@ -156,7 +157,7 @@ | @@ -156,7 +157,7 @@ | ||
| 156 | </el-form-item> | 157 | </el-form-item> |
| 157 | <el-form-item label="分类" style="padding-top: 5px"> | 158 | <el-form-item label="分类" style="padding-top: 5px"> |
| 158 | <el-cascader @change="changequestionclass" v-model="Dataform.QuestionClassId" style="width: 400px" | 159 | <el-cascader @change="changequestionclass" v-model="Dataform.QuestionClassId" style="width: 400px" |
| 159 | - :props="{ emitPath: false ,checkStrictly:true}" :clearable="true" :options="randomQuestionTypeList"> | 160 | + :props="{ emitPath: false ,checkStrictly:true}" :clearable="true" :options="QuestionClass"> |
| 160 | </el-cascader> | 161 | </el-cascader> |
| 161 | </el-form-item> | 162 | </el-form-item> |
| 162 | <el-form-item label="题型" style="padding-top: 5px"> | 163 | <el-form-item label="题型" style="padding-top: 5px"> |
| @@ -177,11 +178,11 @@ | @@ -177,11 +178,11 @@ | ||
| 177 | <template slot="prepend">{{ scope.row.option }}</template> | 178 | <template slot="prepend">{{ scope.row.option }}</template> |
| 178 | </el-input> | 179 | </el-input> |
| 179 | 180 | ||
| 180 | - <el-input placeholder="维度分值" v-model="scope.row.score" class="optionInput" v-if="FormClassType==2" | 181 | + <el-input placeholder="维度分值" v-model="scope.row.score" class="optionInput" |
| 181 | style="width:21% !important;margin-left:1%"> | 182 | style="width:21% !important;margin-left:1%"> |
| 182 | </el-input> | 183 | </el-input> |
| 183 | - | ||
| 184 | - <el-select v-model="scope.row.scorerule" class="optionInput" placeholder="分值规则" v-if="FormClassType==2" style="width:20% !important;margin-left:1%"> | 184 | + <!-- v-if="FormClassType==2" --> |
| 185 | + <el-select v-model="scope.row.scorerule" class="optionInput" placeholder="分值规则" style="width:20% !important;margin-left:1%"> | ||
| 185 | <el-option label="" >不设置</el-option> | 186 | <el-option label="" >不设置</el-option> |
| 186 | <el-option v-for="sritem in scoreRules" :label="sritem" :value="sritem">{{sritem}}</el-option> | 187 | <el-option v-for="sritem in scoreRules" :label="sritem" :value="sritem">{{sritem}}</el-option> |
| 187 | </el-select> | 188 | </el-select> |
| @@ -241,7 +242,6 @@ | @@ -241,7 +242,6 @@ | ||
| 241 | }, | 242 | }, |
| 242 | data() { | 243 | data() { |
| 243 | return { | 244 | return { |
| 244 | - randomQuestionTypeList:[], | ||
| 245 | FormClassType: 0, | 245 | FormClassType: 0, |
| 246 | loading: false, | 246 | loading: false, |
| 247 | currentEditDimension: {}, | 247 | currentEditDimension: {}, |
| @@ -295,9 +295,7 @@ | @@ -295,9 +295,7 @@ | ||
| 295 | scoreRules:['高','中','低'], | 295 | scoreRules:['高','中','低'], |
| 296 | }; | 296 | }; |
| 297 | }, | 297 | }, |
| 298 | - created() { | ||
| 299 | - this.getQuestionClassListHeadler2(); | ||
| 300 | - }, | 298 | + created() { }, |
| 301 | mounted() { | 299 | mounted() { |
| 302 | let ContentAreaHight = | 300 | let ContentAreaHight = |
| 303 | window.innerHeight - document.getElementById("elRow").offsetTop - 70; | 301 | window.innerHeight - document.getElementById("elRow").offsetTop - 70; |
| @@ -311,39 +309,6 @@ | @@ -311,39 +309,6 @@ | ||
| 311 | this.getQuestionClassListHeadler(); | 309 | this.getQuestionClassListHeadler(); |
| 312 | }, | 310 | }, |
| 313 | methods: { | 311 | methods: { |
| 314 | - getSubTree1(id, list) { | ||
| 315 | - let result = []; | ||
| 316 | - result = list.filter((t) => t.ParentId == id); | ||
| 317 | - if (result.length) { | ||
| 318 | - result = result.map((item) => { | ||
| 319 | - item.value = item.id; | ||
| 320 | - item.label = item.ClassificationName; | ||
| 321 | - item.children = this.getSubTree1(item.id, list); | ||
| 322 | - if(!item.children || !item.children.length){ | ||
| 323 | - delete item.children; | ||
| 324 | - } | ||
| 325 | - return item; | ||
| 326 | - }); | ||
| 327 | - } | ||
| 328 | - return result; | ||
| 329 | - }, | ||
| 330 | - getQuestionClassListHeadler2() { | ||
| 331 | - let _this = this; | ||
| 332 | - getQuestionClassList().then((res) => { | ||
| 333 | - let alllist = res.data.data; | ||
| 334 | - let list = alllist.filter(t=>!t.ParentId); | ||
| 335 | - list = list.map((t) => { | ||
| 336 | - t.value = t.id; | ||
| 337 | - t.label = t.ClassificationName; | ||
| 338 | - t.children = this.getSubTree1(t.id,alllist); | ||
| 339 | - if(!t.children || !t.children.length){ | ||
| 340 | - delete t.children; | ||
| 341 | - } | ||
| 342 | - return t; | ||
| 343 | - }); | ||
| 344 | - this.randomQuestionTypeList = list; | ||
| 345 | - }); | ||
| 346 | - }, | ||
| 347 | AddSubject() { | 312 | AddSubject() { |
| 348 | this.FormClassType = 0; | 313 | this.FormClassType = 0; |
| 349 | // if(!this.Dataform.scoperule) | 314 | // if(!this.Dataform.scoperule) |
vue.config.js
| @@ -38,15 +38,16 @@ module.exports = { | @@ -38,15 +38,16 @@ module.exports = { | ||
| 38 | }, | 38 | }, |
| 39 | proxy: { | 39 | proxy: { |
| 40 | '/development': { | 40 | '/development': { |
| 41 | - target: `http://inteview.t1j2.com/`, //后台服务地址 | ||
| 42 | - // target:'https://localhost:44399', | 41 | + // target: `http://inteview.t1j2.com/`, //后台服务地址 |
| 42 | + target:'http://localhost:8877', | ||
| 43 | changeOrigin: true, | 43 | changeOrigin: true, |
| 44 | pathRewrite: { | 44 | pathRewrite: { |
| 45 | '^/development': '' | 45 | '^/development': '' |
| 46 | } | 46 | } |
| 47 | }, | 47 | }, |
| 48 | '/api': { | 48 | '/api': { |
| 49 | - target: `http://inteview.t1j2.com/`, //后台服务地址 | 49 | + // target: `http://inteview.t1j2.com/`, //后台服务地址 |
| 50 | + target:'http://localhost:8877', | ||
| 50 | changeOrigin: true, | 51 | changeOrigin: true, |
| 51 | pathRewrite: {} | 52 | pathRewrite: {} |
| 52 | } | 53 | } |