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 | 255 | </p> |
| 256 | 256 | </template></el-table-column |
| 257 | 257 | > |
| 258 | - <el-table-column | |
| 258 | + <!-- <el-table-column | |
| 259 | 259 | prop="pairingCode" |
| 260 | 260 | label="配对码" |
| 261 | 261 | align="center" |
| 262 | - ></el-table-column> | |
| 262 | + ></el-table-column> --> | |
| 263 | 263 | <!-- <el-table-column |
| 264 | 264 | prop="answerTimes" |
| 265 | 265 | label="答题次数" |
| ... | ... | @@ -452,11 +452,6 @@ |
| 452 | 452 | clearable |
| 453 | 453 | v-model="form.classIds" |
| 454 | 454 | :options="gradeList" |
| 455 | - :props="{ | |
| 456 | - multiple: true, | |
| 457 | - checkStrictly: false, | |
| 458 | - }" | |
| 459 | - collapse-tags | |
| 460 | 455 | :show-all-levels="false" |
| 461 | 456 | ></el-cascader> |
| 462 | 457 | </el-col> |
| ... | ... | @@ -650,19 +645,9 @@ export default { |
| 650 | 645 | this.isAdd = false; |
| 651 | 646 | for (let key in this.form) { |
| 652 | 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 | 651 | } else { |
| 667 | 652 | this.form[key] = obj[key]; |
| 668 | 653 | } |
| ... | ... | @@ -818,9 +803,7 @@ export default { |
| 818 | 803 | this.loadingAnswerEqu = true; |
| 819 | 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 | 807 | let deviceApi = this.isAdd |
| 825 | 808 | ? this.$request.addStation |
| 826 | 809 | : this.$request.updateDevice; | ... | ... |