|  | @@ -4,15 +4,16 @@
 | 
											
												
													
														|  |        <el-card shadow="hover">
 |  |        <el-card shadow="hover">
 | 
											
												
													
														|  |          <template #header v-if="majorTree.length">
 |  |          <template #header v-if="majorTree.length">
 | 
											
												
													
														|  |            <div class="fx-row fx-bet-cen">
 |  |            <div class="fx-row fx-bet-cen">
 | 
											
												
													
														|  | -          <span class="f-999 f12">
 |  | 
 | 
											
												
													
														|  | -            请从推荐专业门类中选择{{ reportConfig.selectMajorLimit }}个你喜欢的专业类</span>
 |  | 
 | 
											
												
													
														|  | -            <el-button type="primary" size="small" plain @click="majorPickerDisabled=false">
 |  | 
 | 
											
												
													
														|  | 
 |  | +            <span class="f-999 f12">
 | 
											
												
													
														|  | 
 |  | +              请从推荐专业门类中选择{{ reportConfig.selectMajorLimit }}个你喜欢的专业类
 | 
											
												
													
														|  | 
 |  | +            </span>
 | 
											
												
													
														|  | 
 |  | +            <el-button v-if="!readonly" type="primary" size="small" plain @click="majorPickerDisabled=false">
 | 
											
												
													
														|  |                {{ selectMajorText }}
 |  |                {{ selectMajorText }}
 | 
											
												
													
														|  |              </el-button>
 |  |              </el-button>
 | 
											
												
													
														|  |            </div>
 |  |            </div>
 | 
											
												
													
														|  |          </template>
 |  |          </template>
 | 
											
												
													
														|  |          <test-major-picker :major-tree="majorTree" :selected-codes="selectedCodes"
 |  |          <test-major-picker :major-tree="majorTree" :selected-codes="selectedCodes"
 | 
											
												
													
														|  | -                           :select-limit="reportConfig.selectMajorLimit" :disabled="majorPickerDisabled"
 |  | 
 | 
											
												
													
														|  | 
 |  | +                           :select-limit="reportConfig.selectMajorLimit" :disabled="disabled"
 | 
											
												
													
														|  |                             @submit="handleMajorSubmit" @cancel="majorPickerDisabled=true"></test-major-picker>
 |  |                             @submit="handleMajorSubmit" @cancel="majorPickerDisabled=true"></test-major-picker>
 | 
											
												
													
														|  |        </el-card>
 |  |        </el-card>
 | 
											
												
													
														|  |      </slot>
 |  |      </slot>
 | 
											
										
											
												
													
														|  | @@ -76,6 +77,12 @@ export default {
 | 
											
												
													
														|  |    mixins: [ReportMixin],
 |  |    mixins: [ReportMixin],
 | 
											
												
													
														|  |    name: 'test-report',
 |  |    name: 'test-report',
 | 
											
												
													
														|  |    components: { TestMajorPicker, MxTableDynamic, MxChart },
 |  |    components: { TestMajorPicker, MxTableDynamic, MxChart },
 | 
											
												
													
														|  | 
 |  | +  props: {
 | 
											
												
													
														|  | 
 |  | +    readonly: {
 | 
											
												
													
														|  | 
 |  | +      type: Boolean,
 | 
											
												
													
														|  | 
 |  | +      default: false
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +  },
 | 
											
												
													
														|  |    data() {
 |  |    data() {
 | 
											
												
													
														|  |      return {
 |  |      return {
 | 
											
												
													
														|  |        majorTree: [],
 |  |        majorTree: [],
 | 
											
										
											
												
													
														|  | @@ -91,6 +98,9 @@ export default {
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      selectedCodes() {
 |  |      selectedCodes() {
 | 
											
												
													
														|  |        return this.source?.selectedList?.map(s => s.majorCategoryCode) || []
 |  |        return this.source?.selectedList?.map(s => s.majorCategoryCode) || []
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    disabled() {
 | 
											
												
													
														|  | 
 |  | +      return this.majorPickerDisabled || this.readonly
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    watch: {
 |  |    watch: {
 | 
											
										
											
												
													
														|  | @@ -106,6 +116,10 @@ export default {
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    methods: {
 |  |    methods: {
 | 
											
												
													
														|  |      loadMajorCategoryTree() {
 |  |      loadMajorCategoryTree() {
 | 
											
												
													
														|  | 
 |  | +      if (!this.source.matchedCode) {
 | 
											
												
													
														|  | 
 |  | +        console.log('Prevent `getMatchCategoryTree` request caused by no-matchedCode', this.source)
 | 
											
												
													
														|  | 
 |  | +        return
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  |        getMatchCategoryTree({
 |  |        getMatchCategoryTree({
 | 
											
												
													
														|  |          matchCode: this.source.matchedCode,
 |  |          matchCode: this.source.matchedCode,
 | 
											
												
													
														|  |          testType: this.testType
 |  |          testType: this.testType
 |