|
@@ -19,7 +19,7 @@
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="您的位次">
|
|
<el-form-item label="您的位次">
|
|
- <el-input disabled placeholder="当前为估分模拟,不需填写位次"></el-input>
|
|
|
|
|
|
+ <el-input disabled placeholder="输入分数后查看位次" :value="rank.lowestRank"></el-input>
|
|
<span class="f12 f-666 ml10">当前为估分模拟,不需填写排名</span>
|
|
<span class="f12 f-666 ml10">当前为估分模拟,不需填写排名</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -27,6 +27,8 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
|
|
|
|
|
|
+import { getRankByScore } from '@/api/webApi/career-course'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
var coustomValid = (rule, value, callback) => {
|
|
var coustomValid = (rule, value, callback) => {
|
|
@@ -40,7 +42,11 @@ export default {
|
|
callback();
|
|
callback();
|
|
};
|
|
};
|
|
return {
|
|
return {
|
|
- form: {},
|
|
|
|
|
|
+ form: {
|
|
|
|
+ score:'',
|
|
|
|
+ firstSubject:'',
|
|
|
|
+ lastSubject:'',
|
|
|
|
+ },
|
|
initReady: false,
|
|
initReady: false,
|
|
rules: {
|
|
rules: {
|
|
score: [
|
|
score: [
|
|
@@ -54,14 +60,40 @@ export default {
|
|
{ required: true, message: '请选择次选科目', trigger: 'change' },
|
|
{ required: true, message: '请选择次选科目', trigger: 'change' },
|
|
{ validator: coustomValid, trigger: 'change' }
|
|
{ validator: coustomValid, trigger: 'change' }
|
|
]
|
|
]
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ rank:{}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch:{
|
|
|
|
+ 'form.score':{
|
|
|
|
+ handler(val) {
|
|
|
|
+ if(this.form.firstSubject && this.form.score != ''){
|
|
|
|
+ this.getRankByScore()
|
|
|
|
+ }
|
|
|
|
+ if(val == ''){
|
|
|
|
+ this.rank = {}
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ 'form.firstSubject':{
|
|
|
|
+ handler(val) {
|
|
|
|
+ if(this.form.firstSubject && this.form.score){
|
|
|
|
+ this.getRankByScore()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
init(form) {
|
|
init(form) {
|
|
this.form = form
|
|
this.form = form
|
|
this.initReady = true
|
|
this.initReady = true
|
|
},
|
|
},
|
|
|
|
+ getRankByScore() {
|
|
|
|
+ getRankByScore({mode:this.form.firstSubject,scoreRank:this.form.score}).then(res => {
|
|
|
|
+ this.rank = res.data
|
|
|
|
+ console.log(res)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
validate(cb) {
|
|
validate(cb) {
|
|
this.$refs.form.validate((valid) => {
|
|
this.$refs.form.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|