721 lines
26 KiB
Vue
721 lines
26 KiB
Vue
<script>
|
||
import StaticConstant from "@/common/StaticConstant";
|
||
import ApiConstant from "@/common/ApiConstant";
|
||
import Request from '@/common/request'
|
||
import {arrayIsNotEmpty, stringIsNotEmpty} from "@/common/util";
|
||
import CommonTool from "@/common/js/commonTool";
|
||
|
||
let request = new Request()
|
||
export default {
|
||
name: "socre-edit",
|
||
computed: {
|
||
StaticConstant() {
|
||
return StaticConstant
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
saveScoreInfo: {},
|
||
useCount:0,
|
||
residueCount: 0,
|
||
vipInfo: {},
|
||
oldScoreInfo: {},
|
||
scoreInfo: {
|
||
id: '',
|
||
province: '河南',//省份
|
||
cognitioPolyclinic: '文科',//科类
|
||
professionalCategory: '',//报考方向
|
||
culturalScore: '',//文化分
|
||
professionalScore: '',//统考分
|
||
chineseScore: '',
|
||
englishScore: '',
|
||
subjectList: [],
|
||
},
|
||
formRuleFlag: false,//表单是否校验成功
|
||
provinceArray: [{
|
||
name: '河南',
|
||
text: "河南",
|
||
value: "河南",
|
||
},],//
|
||
cognitioPolyclinicArray: StaticConstant.categoryList,//文理分科
|
||
subjectArray: [{
|
||
name:'地理'
|
||
},{
|
||
name:'政治'
|
||
},{
|
||
name:'化学'
|
||
},{
|
||
name:'生物'
|
||
}],
|
||
//===========================================================
|
||
professionalCategoryArray: [],//专业类别大类array
|
||
professionalCategoryVisible: false,//专业类别 是否显示
|
||
professionalCategoryIndex: null,
|
||
pCategoryChildrenList: [],//子级选择
|
||
professionalCategoryScoreMax: '',//选择的专业最高分
|
||
contentHeight: 600,
|
||
reloadMajorModalMessageConfig:{},
|
||
}
|
||
},
|
||
async onLoad() {
|
||
// 志愿单打印配置
|
||
this.reloadMajorModalMessageConfig = await CommonTool.loadStaticConfig('reload_major_modal_message')
|
||
},
|
||
async onShow() {
|
||
if(uni.getStorageSync('professionalCategoryArray')){
|
||
this.professionalCategoryArray = uni.getStorageSync('professionalCategoryArray')
|
||
}else{
|
||
this.professionalCategoryArray = await CommonTool.loadStaticConfig('professionalCategoryList')
|
||
if(this.professionalCategoryArray){
|
||
uni.setStorageSync('professionalCategoryArray',this.professionalCategoryArray)
|
||
}
|
||
}
|
||
|
||
this.getEditScoreCount()
|
||
this.getUserScore()
|
||
this.vipInfo = uni.getStorageSync('vipInfo')
|
||
},
|
||
methods: {
|
||
stringIsNotEmpty() {
|
||
return stringIsNotEmpty
|
||
},
|
||
//获取用户的分数信息
|
||
getUserScore() {
|
||
let scoreInfo = uni.getStorageSync('scoreInfo')
|
||
this.oldScoreInfo = uni.getStorageSync('scoreInfo')
|
||
if (scoreInfo) {
|
||
this.scoreInfo = scoreInfo
|
||
//设置 报考方向 选择
|
||
let professionalCategory = this.scoreInfo.professionalCategory
|
||
for (let i = 0; i < this.professionalCategoryArray.length; i++) {
|
||
if (this.professionalCategoryArray[i].value === professionalCategory) {
|
||
this.professionalCategoryScoreMax = this.professionalCategoryArray[i].scoreMax
|
||
this.professionalCategoryIndex = i
|
||
}
|
||
}
|
||
let professionalCategoryChildren = this.scoreInfo.professionalCategoryChildren
|
||
if (professionalCategoryChildren !== undefined && professionalCategoryChildren !== '') {
|
||
this.pCategoryChildrenList = professionalCategoryChildren.split(',')
|
||
}
|
||
}
|
||
},
|
||
//获取用户可更改分数次数
|
||
getEditScoreCount() {
|
||
request.get(ApiConstant.Score.todayOfEditScoreCount, {}, {showLoad: false}).then(res => {
|
||
if (res.success) {
|
||
console.log(res)
|
||
this.useCount = res.result.useCount
|
||
this.residueCount = res.result.residueCount
|
||
}
|
||
}).catch(err => {
|
||
}).finally(() => {
|
||
});
|
||
|
||
},
|
||
//保存用户的分数信息
|
||
saveScore() {
|
||
//调整参数
|
||
this.saveScoreInfo = {...this.scoreInfo}
|
||
if (arrayIsNotEmpty(this.pCategoryChildrenList)) {
|
||
this.saveScoreInfo.professionalCategoryChildren = this.pCategoryChildrenList.join(",")
|
||
} else {
|
||
this.saveScoreInfo.professionalCategoryChildren = ''
|
||
}
|
||
this.saveScoreInfo.professionalCategory = this.professionalCategoryArray[this.professionalCategoryIndex].value
|
||
//==
|
||
request.post(ApiConstant.Score.scoreSave, {
|
||
...this.saveScoreInfo
|
||
}).then(res => {
|
||
if (res.success) {
|
||
let scoreInfo = res.result
|
||
request.getUserScore()
|
||
/*uni.removeStorageSync('scoreInfo')//清除之前的成绩缓存
|
||
uni.setStorageSync('scoreInfo', scoreInfo)
|
||
uni.removeStorageSync('fillVolunteer')//清除可报志愿数量
|
||
//全部推荐数量
|
||
let all = parseInt(scoreInfo.kcjNum) + parseInt(scoreInfo.jwtNum) + parseInt(scoreInfo.kbdNum);
|
||
//+parseInt(scoreInfo.nlqNum)
|
||
let fillVolunteer = {jwt: scoreInfo.jwtNum, kbd: scoreInfo.kbdNum, kcj: scoreInfo.kcjNum, allNumber: all}
|
||
uni.setStorageSync('fillVolunteer', fillVolunteer)*/
|
||
setTimeout(() => {
|
||
uni.reLaunch({
|
||
url: '/pages/zyb/home'
|
||
})
|
||
}, 800)
|
||
}else{
|
||
uni.showToast({title: res.message, icon: "none"});
|
||
}
|
||
}).catch(err => {
|
||
}).finally(() => {
|
||
});
|
||
},
|
||
checkForm() {
|
||
//省份
|
||
if (!this.scoreInfo.province) {
|
||
this.formRuleFlag = false
|
||
return;
|
||
}
|
||
//专业类别
|
||
if (!this.professionalCategoryArray[this.professionalCategoryIndex]) {
|
||
this.formRuleFlag = false
|
||
return
|
||
}
|
||
//子级专业分数
|
||
if (arrayIsNotEmpty(this.pCategoryChildrenList)) {
|
||
for (let i = 0; i < this.pCategoryChildrenList.length; i++) {
|
||
let name = this.pCategoryChildrenList[i]
|
||
//获取字节专业的属性,判断参数是否合格
|
||
let key = this.checkChildrenNameToKey(name)
|
||
let value = this.scoreInfo[key]
|
||
|
||
if (value === undefined || value === '') {
|
||
this.formRuleFlag = false
|
||
return
|
||
}
|
||
let score = parseInt(value)
|
||
if (typeof (score) !== 'number') {
|
||
this.formRuleFlag = false
|
||
return
|
||
}
|
||
}
|
||
}
|
||
//选考科目
|
||
if (!this.scoreInfo.cognitioPolyclinic) {
|
||
this.formRuleFlag = false
|
||
return
|
||
}
|
||
//统考成绩
|
||
if (this.professionalCategoryArray[this.professionalCategoryIndex].value !== '表演类' && !this.scoreInfo.professionalScore) {
|
||
this.formRuleFlag = false
|
||
return
|
||
}
|
||
//文化成绩
|
||
if (!this.scoreInfo.culturalScore) {
|
||
this.formRuleFlag = false
|
||
return
|
||
}
|
||
this.formRuleFlag = true
|
||
},
|
||
//选择考区
|
||
bindPicker_provinceChange: function (e) {
|
||
console.log('考区picker发送选择改变,携带值为:' + e)
|
||
this.scoreInfo.province = this.provinceArray[e.detail.value].name
|
||
this.checkForm()
|
||
},
|
||
//选择科目
|
||
switchKelei(e) {
|
||
this.scoreInfo.cognitioPolyclinic = e.name
|
||
this.checkForm()
|
||
},
|
||
switchSubject(e){
|
||
let index = this.scoreInfo.subjectList.indexOf(e);
|
||
if(index > -1){
|
||
// 删除
|
||
this.scoreInfo.subjectList.splice(index, 1);
|
||
}else{
|
||
// 只可以选两个
|
||
if(this.scoreInfo.subjectList.length <= 1){
|
||
this.scoreInfo.subjectList.push(e);
|
||
}
|
||
}
|
||
},
|
||
formSubmit: function (e) {
|
||
let that = this
|
||
console.log('form发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value))
|
||
//高考省份
|
||
if (!stringIsNotEmpty(this.scoreInfo.province)) {
|
||
uni.showToast({title: '请选择高考省份', icon: "none"});
|
||
return;
|
||
}
|
||
//选择科目(文理分科)
|
||
if (!stringIsNotEmpty(this.scoreInfo.cognitioPolyclinic)) {
|
||
uni.showToast({title: '请选择选考科目', icon: "none"});
|
||
return;
|
||
}
|
||
|
||
//判断 输入分数
|
||
// 子级专业类别
|
||
if (arrayIsNotEmpty(this.pCategoryChildrenList)) {
|
||
for (let i = 0; i < this.pCategoryChildrenList.length; i++) {
|
||
let name = this.pCategoryChildrenList[i]
|
||
//获取字节专业的属性,判断参数是否合格
|
||
let key = this.checkChildrenNameToKey(name)
|
||
let value = this.scoreInfo[key]
|
||
|
||
if (value === undefined || value === '') {
|
||
uni.showToast({title: '请输入' + name, icon: "none"});
|
||
return
|
||
}
|
||
let score = parseInt(value)
|
||
if (typeof (score) !== 'number') {
|
||
uni.showToast({title: name + '输入参数有误', icon: "none"});
|
||
return
|
||
}
|
||
if (parseInt(score) > this.professionalCategoryScoreMax) {
|
||
uni.showToast({title: name + '请输入0~' + this.professionalCategoryScoreMax + "之间", icon: "none"});
|
||
return
|
||
}
|
||
this.scoreInfo[key] = score
|
||
}
|
||
this.scoreInfo.yybysy = this.scoreInfo.yybysy ? this.scoreInfo.yybysy : 0
|
||
this.scoreInfo.yybyqy = this.scoreInfo.yybyqy ? this.scoreInfo.yybyqy : 0
|
||
this.scoreInfo.yyjy = this.scoreInfo.yyjy ? this.scoreInfo.yyjy : 0
|
||
this.scoreInfo.fzby = this.scoreInfo.fzby ? this.scoreInfo.fzby : 0
|
||
this.scoreInfo.xjysdy = this.scoreInfo.xjysdy ? this.scoreInfo.xjysdy : 0
|
||
this.scoreInfo.xjysby = this.scoreInfo.xjysby ? this.scoreInfo.xjysby : 0
|
||
} else {
|
||
this.scoreInfo.yybysy = 0
|
||
this.scoreInfo.yybyqy = 0
|
||
this.scoreInfo.yyjy = 0
|
||
this.scoreInfo.fzby = 0
|
||
this.scoreInfo.xjysdy = 0
|
||
this.scoreInfo.xjysby = 0
|
||
}
|
||
//判断统考成绩
|
||
let professionalScore = parseInt(this.scoreInfo.professionalScore)
|
||
if(this.professionalCategoryArray[this.professionalCategoryIndex].value !=='表演类'){
|
||
console.log('professionalScore:' + professionalScore)
|
||
if (isNaN(professionalScore) || professionalScore < 0 || professionalScore > this.professionalCategoryScoreMax) {
|
||
if (this.professionalCategoryIndex && this.professionalCategoryArray[this.professionalCategoryIndex].label === '音乐类') {
|
||
uni.showToast({title: '请输入主项成绩', icon: "none"});
|
||
} else {
|
||
if (this.professionalCategoryScoreMax) {
|
||
uni.showToast({title: '统考成绩请输入0~' + this.professionalCategoryScoreMax + '之间', icon: "none"});
|
||
} else {
|
||
uni.showToast({title: '请输入统考成绩', icon: "none"});
|
||
}
|
||
|
||
}
|
||
return;
|
||
}
|
||
}
|
||
//文化成绩
|
||
let culturalScore = parseInt(this.scoreInfo.culturalScore)
|
||
if (isNaN(culturalScore) || culturalScore < 0 || culturalScore > 750) {
|
||
uni.showToast({title: '文化分请输入0~750之间', icon: "none"});
|
||
return;
|
||
}
|
||
this.scoreInfo.professionalScore = parseInt(this.scoreInfo.professionalScore)
|
||
this.scoreInfo.culturalScore = culturalScore
|
||
|
||
let title = '文化成绩:' + this.scoreInfo.culturalScore
|
||
if (this.scoreInfo.professionalCategory !== '表演类') {
|
||
title += " " + (this.scoreInfo.professionalScore ? (this.pCategoryChildrenList && this.pCategoryChildrenList.length > 0 ? '主项成绩:' : '统考成绩:') + this.scoreInfo.professionalScore : "")
|
||
}
|
||
uni.showModal({
|
||
title: '确认高考成绩',
|
||
content: title,
|
||
confirmText: '确定',
|
||
cancelText: '取消',
|
||
success: function (res) {
|
||
if (res.confirm) {
|
||
that.saveScore()
|
||
}
|
||
}
|
||
});
|
||
},
|
||
formReset: function (e) {
|
||
console.log('清空数据')
|
||
},
|
||
reloadMajor:function (e){
|
||
let that = this
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: that.reloadMajorModalMessageConfig.message1,
|
||
confirmText: '确定',
|
||
cancelText: '取消',
|
||
success: function (res) {
|
||
if (res.confirm) {
|
||
that.reloadMajorSave()
|
||
}
|
||
}
|
||
});
|
||
},
|
||
reloadMajorSave(){
|
||
request.post(ApiConstant.Score.reloadCalMajor, {}).then(res => {
|
||
if (res.success) {
|
||
let scoreInfo = res.result
|
||
request.getUserScore()
|
||
setTimeout(() => {
|
||
uni.reLaunch({
|
||
url: '/pages/zyb/home'
|
||
})
|
||
}, 800)
|
||
}
|
||
}).catch(err => {
|
||
}).finally(() => {
|
||
});
|
||
},
|
||
onProfessionalCategory() {
|
||
//其他用户只能改一次专业类别
|
||
if (this.vipInfo.vipLevel === 9 || this.oldScoreInfo === null || !stringIsNotEmpty(this.oldScoreInfo.professionalCategory)) {
|
||
this.professionalCategoryVisible = true;
|
||
}
|
||
},
|
||
onProfessionalCategoryClose() {
|
||
//如果 当前选择的包括方向 有子级
|
||
if (this.professionalCategoryIndex && this.professionalCategoryArray[this.professionalCategoryIndex].children) {
|
||
if (this.pCategoryChildrenList.length === 0) {
|
||
//没有选择子级,提示选择
|
||
uni.showToast({title: '请选择类别', icon: "none"});
|
||
return
|
||
}
|
||
}
|
||
console.log('关闭')
|
||
this.professionalCategoryVisible = false
|
||
this.checkForm()
|
||
},
|
||
onProfessionalCategoryOpen() {
|
||
console.log('打开')
|
||
},
|
||
onProfessionalCategoryBottom() {
|
||
console.log('触底');
|
||
},
|
||
/*选择 大类*/
|
||
clickprofessionalCategoryItem(e, index) {
|
||
console.log(e)
|
||
this.professionalCategoryIndex = index
|
||
this.professionalCategoryScoreMax = this.professionalCategoryArray[this.professionalCategoryIndex].scoreMax
|
||
if (!e.children) {
|
||
this.professionalCategoryVisible = false
|
||
}
|
||
this.pCategoryChildrenList = []
|
||
this.checkForm()
|
||
},
|
||
/*选择 子类*/
|
||
professionalCategoryChildrenChange(e) {
|
||
console.log(e)
|
||
this.pCategoryChildrenList = e.detail.value
|
||
this.checkForm()
|
||
},
|
||
checkChildrenNameToKey(e) {
|
||
if (e === '音乐表演声乐') {
|
||
return 'yybysy';
|
||
} else if (e === '音乐表演器乐') {
|
||
return 'yybyqy';
|
||
} else if (e === '音乐教育') {
|
||
return 'yyjy';
|
||
} else if (e === '服装表演') {
|
||
return 'fzby';
|
||
} else if (e === '戏剧影视导演') {
|
||
return 'xjysdy';
|
||
} else if (e === '戏剧影视表演') {
|
||
return 'xjysby';
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<template>
|
||
<view class="container" style="background-color: #ffffff">
|
||
<view class="uni-padding-wrap" style="text-align: center">
|
||
<view class="font-size-medium font-weight-b">
|
||
请输入成绩
|
||
</view>
|
||
</view>
|
||
<!--表单-->
|
||
<view class="uni-padding-wrap uni-common-mt border-top">
|
||
<view class="forms">
|
||
<view class="form-item">
|
||
<view class="form-item-label">高考省份</view>
|
||
<view class="form-item-view form-input">
|
||
<picker @change="bindPicker_provinceChange" :value="scoreInfo.province" :range="provinceArray"
|
||
range-key="name">
|
||
<view class="uni-input">{{ scoreInfo.province }}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-item-label">专业类别</view>
|
||
<view class="form-item-view form-input">
|
||
<view style="min-height: 80rpx;margin: auto 25rpx" @click="onProfessionalCategory">
|
||
<view v-if="professionalCategoryIndex || professionalCategoryArray[professionalCategoryIndex]"
|
||
style="height: auto !important;">
|
||
<!--选择了无子专业-->
|
||
<text style="line-height: 80rpx;" v-if="!pCategoryChildrenList || pCategoryChildrenList.length===0">
|
||
{{
|
||
professionalCategoryArray[professionalCategoryIndex] ? professionalCategoryArray[professionalCategoryIndex].label : ''
|
||
}}
|
||
</text>
|
||
<!--选择了有子专业-->
|
||
<view style="line-height: 40rpx;"
|
||
v-if="pCategoryChildrenList &&pCategoryChildrenList.length>0">
|
||
<text class="flex" v-for="(item,index) in pCategoryChildrenList" :key="index">
|
||
{{ item }}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
<view v-else>
|
||
<text style="line-height: 80rpx;color: #808080">
|
||
请选择专业类别
|
||
</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!--选考科目-->
|
||
<view class="form-item">
|
||
<view class="form-item-label">选考科目</view>
|
||
<view class="form-item-view">
|
||
<view class="flexWrap">
|
||
<view class="kelei-item" @click="switchKelei(item)"
|
||
:class="scoreInfo.cognitioPolyclinic===item.name?'kelei-item-active':''"
|
||
v-for="(item,index) in cognitioPolyclinicArray" :key="index">
|
||
<text>{{ item.name==='文科'?'历史组':'物理组' }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="form-item">
|
||
<view class="form-item-label"></view>
|
||
<view class="form-item-view">
|
||
<view class="flexWrap">
|
||
<view class="kelei-item" style="padding: 15rpx 20rpx;" @click="switchSubject(item.name)"
|
||
:class="scoreInfo.subjectList.includes(item.name)?'kelei-item-active':''"
|
||
v-for="(item,index) in subjectArray" :key="index">
|
||
<text>{{ item.name }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!--子项专业成绩-->
|
||
<view class="form-item" v-if="professionalCategoryArray[professionalCategoryIndex]"
|
||
v-for="(item,index) in pCategoryChildrenList" :key="index">
|
||
<view class="form-item-label">{{ item }}成绩</view>
|
||
<view class="form-item-view form-input flexWrap">
|
||
<view class="flex-item-9">
|
||
<input class="uni-input" type="number" @input="checkForm"
|
||
v-model="scoreInfo[checkChildrenNameToKey(item)]"
|
||
name="culturalScore"
|
||
:placeholder="'请输入专业成绩(满分'+professionalCategoryScoreMax+')'"/>
|
||
</view>
|
||
<view class="flex-item-1">
|
||
<text style="line-height: 80rpx">分</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!--统考成绩-->
|
||
<view class="form-item"
|
||
v-if="professionalCategoryArray[professionalCategoryIndex] && professionalCategoryArray[professionalCategoryIndex].label!=='表演类'">
|
||
<view class="form-item-label"
|
||
v-if="professionalCategoryArray[professionalCategoryIndex] && professionalCategoryArray[professionalCategoryIndex].label==='音乐类'">
|
||
主项成绩
|
||
</view>
|
||
<view class="form-item-label" v-else>统考成绩</view>
|
||
<view class="form-item-view form-input">
|
||
<view class="flexWrap">
|
||
<view class="flex-item-9">
|
||
<input class="uni-input" type="number" @blur="checkForm()" @input="checkForm()"
|
||
v-model="scoreInfo.professionalScore" name="professionalScore"
|
||
v-if="professionalCategoryArray[professionalCategoryIndex] && professionalCategoryArray[professionalCategoryIndex].label==='音乐类'"
|
||
:placeholder="'请输入主项成绩'"/>
|
||
<input class="uni-input" type="number" @blur="checkForm()" @input="checkForm()"
|
||
v-model="scoreInfo.professionalScore" name="professionalScore"
|
||
v-else
|
||
:placeholder="professionalCategoryScoreMax?'请输入统考分('+professionalCategoryScoreMax+')':'请输入统考成绩'"/>
|
||
</view>
|
||
<view class="flex-item-1">
|
||
<text style="line-height: 80rpx">分</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!--文化成绩-->
|
||
<view class="form-item">
|
||
<view class="form-item-label">文化成绩</view>
|
||
<view class="form-item-view form-input flexWrap">
|
||
<view class="flex-item-9">
|
||
<input class="uni-input" type="number" @blur="checkForm()" @input="checkForm()"
|
||
v-model="scoreInfo.culturalScore" name="culturalScore"
|
||
placeholder="请输入文化成绩(满分750)"/>
|
||
</view>
|
||
<view class="flex-item-1">
|
||
<text style="line-height: 80rpx">分</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!--语文成绩-->
|
||
<view class="form-item">
|
||
<view class="form-item-label">语文成绩</view>
|
||
<view class="form-item-view form-input flexWrap">
|
||
<view class="flex-item-9">
|
||
<input class="uni-input" type="number" v-model="scoreInfo.chineseScore" name="englishScore"
|
||
placeholder="请输入语文成绩(选填)"/>
|
||
</view>
|
||
<view class="flex-item-1">
|
||
<text style="line-height: 80rpx">分</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!--外语成绩-->
|
||
<view class="form-item">
|
||
<view class="form-item-label">外语成绩</view>
|
||
<view class="form-item-view form-input flexWrap">
|
||
<view class="flex-item-9">
|
||
<input class="uni-input" type="number" v-model="scoreInfo.englishScore" name="englishScore"
|
||
placeholder="请输入外语成绩(选填)"/>
|
||
</view>
|
||
<view class="flex-item-1">
|
||
<text style="line-height: 80rpx">分</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view v-if="vipInfo.vipLevel===9" class="submitButtonView"
|
||
:class="formRuleFlag?'button-active':'button-disabled'" @click="formSubmit">
|
||
<text class="font-weight-b">保存</text>
|
||
</view>
|
||
|
||
<!--普通vip 一天只能改10次成绩-->
|
||
<view v-else-if="vipInfo && vipInfo.vipLevel && vipInfo.vipLevel <=2 && (10-useCount)>0" class="submitButtonView"
|
||
:class="formRuleFlag?'button-active':'button-disabled'" @click="formSubmit">
|
||
<text class="font-weight-b">还可更改{{ 10-useCount}}次</text>
|
||
</view>
|
||
<!--非vip,一天只能改5次-->
|
||
<view v-else-if="5-useCount>0" class="submitButtonView"
|
||
:class="formRuleFlag?'button-active':'button-disabled'" @click="formSubmit">
|
||
<text class="font-weight-b">还可更改{{ 5-useCount }}次</text>
|
||
</view>
|
||
<view v-else class="submitButtonView button-disabled">
|
||
<text class="font-weight-b">修改次数已用完</text>
|
||
</view>
|
||
<view class="submitButtonView button-active" v-if="scoreInfo && scoreInfo.id && scoreInfo.professionalCategory" @click="reloadMajor">
|
||
<text class="font-weight-b">刷新专业</text>
|
||
</view>
|
||
<view class="darkGray padding10-30" >
|
||
注:{{(vipInfo.vipLevel ===null || vipInfo.vipLevel!==9)?'仅可修改一次专业类别':''}};
|
||
{{reloadMajorModalMessageConfig.message2}}
|
||
</view>
|
||
|
||
</view>
|
||
<!-- 每次弹出重新计算内容高度适用动态数据加载 -->
|
||
<px-popup-bottom :visible.sync="professionalCategoryVisible" title="请选择专业类别"
|
||
@reachBottom="onProfessionalCategoryBottom"
|
||
maxHeight="800" radius="40" @close="onProfessionalCategoryClose" @open="onProfessionalCategoryOpen">
|
||
<view class="flex">
|
||
|
||
<scroll-view scroll-y="true" class="professionalCategoryPopup" style="height: 500rpx;"
|
||
:class="professionalCategoryIndex&&professionalCategoryArray[professionalCategoryIndex].children?'flex-item-5':'flex-item-10'">
|
||
<view>
|
||
<view class="flex professionalCategoryItem" :class="professionalCategoryIndex===index?'active':''"
|
||
@click="clickprofessionalCategoryItem(item,index)" v-for="(item,index) in professionalCategoryArray"
|
||
:key="index">
|
||
<text class="text">{{ item.label }}</text>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
<view class="professionalCategoryChildren flex-item-5"
|
||
v-if="professionalCategoryIndex&&professionalCategoryArray[professionalCategoryIndex].children">
|
||
<checkbox-group @change="professionalCategoryChildrenChange">
|
||
<view class="childrenItem"
|
||
v-for="(item,index) in professionalCategoryArray[professionalCategoryIndex].children" :key="index">
|
||
<label>
|
||
<checkbox :checked="pCategoryChildrenList.length>0 && pCategoryChildrenList.includes(item.value)"
|
||
:disabled="pCategoryChildrenList.length>0 && pCategoryChildrenList.includes(professionalCategoryArray[professionalCategoryIndex].children[index].exclude)"
|
||
:value="item.value">{{ item.label }}
|
||
</checkbox>
|
||
</label>
|
||
</view>
|
||
</checkbox-group>
|
||
</view>
|
||
</view>
|
||
</px-popup-bottom>
|
||
|
||
</template>
|
||
|
||
<style scoped lang="scss">
|
||
.container {
|
||
height: 100%;
|
||
}
|
||
|
||
.uni-form-item .title {
|
||
padding: 20rpx 0;
|
||
}
|
||
|
||
/*表单 start*/
|
||
.form-item {
|
||
display: flex;
|
||
align-items: center;
|
||
margin: 30rpx 0;
|
||
}
|
||
|
||
.form-item-label {
|
||
width: 20%;
|
||
}
|
||
|
||
.form-item-view {
|
||
width: 80%;
|
||
min-height: 80rpx;
|
||
}
|
||
|
||
.form-input {
|
||
border: 1rpx solid #e6e6e6;
|
||
}
|
||
|
||
//选考科目
|
||
.kelei-item {
|
||
background-color: #f7f7f7;
|
||
color: black;
|
||
padding: 20rpx 30rpx;
|
||
margin-right: 30rpx;
|
||
}
|
||
|
||
.kelei-item-active {
|
||
background-color: #feede1;
|
||
color: #f96712;
|
||
}
|
||
|
||
.submitButtonView {
|
||
margin: 30rpx;
|
||
text-align: center;
|
||
border-radius: 15rpx;
|
||
line-height: 80rpx;
|
||
}
|
||
|
||
.button-disabled {
|
||
color: white;
|
||
background-color: #d8d8d8;
|
||
}
|
||
|
||
.button-active {
|
||
color: white;
|
||
background: linear-gradient(#f79459, #f96622);
|
||
}
|
||
|
||
/*表单 end*/
|
||
|
||
.uni-picker-tips {
|
||
font-size: 12px;
|
||
color: #666;
|
||
margin-bottom: 15px;
|
||
padding: 0 15px;
|
||
}
|
||
|
||
/*底部抽屉 报考方向内容 start*/
|
||
.professionalCategoryPopup .professionalCategoryItem {
|
||
margin: 20rpx;
|
||
padding: 20rpx;
|
||
text-align: center;
|
||
border: 1rpx solid #f1f2f3;
|
||
|
||
.text {
|
||
margin: 0 auto;
|
||
}
|
||
}
|
||
|
||
.active {
|
||
background-color: #3e89fe;
|
||
color: white;
|
||
border-radius: 15rpx;
|
||
}
|
||
|
||
.professionalCategoryChildren .childrenItem {
|
||
margin: 20rpx;
|
||
}
|
||
|
||
/*底部抽屉 报考方向内容 end*/
|
||
</style>
|