Commit 5fb1f1843489a776216212e2b21b1798940e9270
1 parent
967e02c9
答题器管理:不显示 题器配对码,修改基站班级单选
Showing
1 changed file
with
6 additions
and
23 deletions
src/views/standard/device/index.vue
| @@ -255,11 +255,11 @@ | @@ -255,11 +255,11 @@ | ||
| 255 | </p> | 255 | </p> |
| 256 | </template></el-table-column | 256 | </template></el-table-column |
| 257 | > | 257 | > |
| 258 | - <el-table-column | 258 | + <!-- <el-table-column |
| 259 | prop="pairingCode" | 259 | prop="pairingCode" |
| 260 | label="配对码" | 260 | label="配对码" |
| 261 | align="center" | 261 | align="center" |
| 262 | - ></el-table-column> | 262 | + ></el-table-column> --> |
| 263 | <!-- <el-table-column | 263 | <!-- <el-table-column |
| 264 | prop="answerTimes" | 264 | prop="answerTimes" |
| 265 | label="答题次数" | 265 | label="答题次数" |
| @@ -452,11 +452,6 @@ | @@ -452,11 +452,6 @@ | ||
| 452 | clearable | 452 | clearable |
| 453 | v-model="form.classIds" | 453 | v-model="form.classIds" |
| 454 | :options="gradeList" | 454 | :options="gradeList" |
| 455 | - :props="{ | ||
| 456 | - multiple: true, | ||
| 457 | - checkStrictly: false, | ||
| 458 | - }" | ||
| 459 | - collapse-tags | ||
| 460 | :show-all-levels="false" | 455 | :show-all-levels="false" |
| 461 | ></el-cascader> | 456 | ></el-cascader> |
| 462 | </el-col> | 457 | </el-col> |
| @@ -650,19 +645,9 @@ export default { | @@ -650,19 +645,9 @@ export default { | ||
| 650 | this.isAdd = false; | 645 | this.isAdd = false; |
| 651 | for (let key in this.form) { | 646 | for (let key in this.form) { |
| 652 | if (key == "classIds") { | 647 | if (key == "classIds") { |
| 653 | - this.form[key]; | ||
| 654 | - let classIds = obj.classList.map((item) => { | ||
| 655 | - return item.classId; | ||
| 656 | - }); | ||
| 657 | - let checkClassData = []; | ||
| 658 | - this.gradeList.map((item) => { | ||
| 659 | - item.children.map((items) => { | ||
| 660 | - if (classIds.includes(items.value)) { | ||
| 661 | - checkClassData.push([item.value, items.value]); | ||
| 662 | - } | ||
| 663 | - }); | ||
| 664 | - }); | ||
| 665 | - this.form[key] = [...checkClassData]; | 648 | + this.form[key] = obj.classList.length |
| 649 | + ? [obj.classList[0].gradeName, obj.classList[0].classId] | ||
| 650 | + : []; | ||
| 666 | } else { | 651 | } else { |
| 667 | this.form[key] = obj[key]; | 652 | this.form[key] = obj[key]; |
| 668 | } | 653 | } |
| @@ -818,9 +803,7 @@ export default { | @@ -818,9 +803,7 @@ export default { | ||
| 818 | this.loadingAnswerEqu = true; | 803 | this.loadingAnswerEqu = true; |
| 819 | let query = { ...this.form }; | 804 | let query = { ...this.form }; |
| 820 | 805 | ||
| 821 | - query.classIds = query.classIds.map((item) => { | ||
| 822 | - return item[1]; | ||
| 823 | - }); | 806 | + query.classIds = query.classIds.length ? [query.classIds[1]] : []; |
| 824 | let deviceApi = this.isAdd | 807 | let deviceApi = this.isAdd |
| 825 | ? this.$request.addStation | 808 | ? this.$request.addStation |
| 826 | : this.$request.updateDevice; | 809 | : this.$request.updateDevice; |