|
@@ -29,6 +29,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<simulate-score
|
|
<simulate-score
|
|
|
|
+ v-if="!currentUser.isHiddenVoluntary"
|
|
ref="score"
|
|
ref="score"
|
|
:form="scoreModel"
|
|
:form="scoreModel"
|
|
:disabled="!user.provinceName"
|
|
:disabled="!user.provinceName"
|
|
@@ -48,21 +49,21 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { updateUserProfile } from '@/api/system/user'
|
|
|
|
-import { mapActions, mapGetters } from 'vuex'
|
|
|
|
|
|
+import {updateUserProfile} from '@/api/system/user'
|
|
|
|
+import {mapActions, mapGetters} from 'vuex'
|
|
import ResetMobileForm from '@/views/system/user/profile/components/ResetMobileForm'
|
|
import ResetMobileForm from '@/views/system/user/profile/components/ResetMobileForm'
|
|
import MxConst from "@/common/MxConst";
|
|
import MxConst from "@/common/MxConst";
|
|
import SimulateScore from "@/views/career/zhiyuan/components/SimulateScore.vue";
|
|
import SimulateScore from "@/views/career/zhiyuan/components/SimulateScore.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- components: {SimulateScore, ResetMobileForm },
|
|
|
|
|
|
+ components: {SimulateScore, ResetMobileForm},
|
|
props: {
|
|
props: {
|
|
user: {
|
|
user: {
|
|
type: Object
|
|
type: Object
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['isFrontStudent']),
|
|
|
|
|
|
+ ...mapGetters(['isFrontStudent', 'currentUser']),
|
|
disableScoreRequired() {
|
|
disableScoreRequired() {
|
|
return this.user.scoreLock == MxConst.enum.scoreLock.unlock
|
|
return this.user.scoreLock == MxConst.enum.scoreLock.unlock
|
|
}
|
|
}
|
|
@@ -78,7 +79,7 @@ export default {
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
nickName: [
|
|
nickName: [
|
|
- { required: true, message: '用户昵称不能为空', trigger: 'blur' }
|
|
|
|
|
|
+ {required: true, message: '用户昵称不能为空', trigger: 'blur'}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -92,10 +93,11 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
...mapActions(['GetInfo']),
|
|
...mapActions(['GetInfo']),
|
|
async submit() {
|
|
async submit() {
|
|
- const validates = [this.$refs.form.validate(), this.$refs.score.validate()]
|
|
|
|
|
|
+ const validates = [this.$refs.form.validate()]
|
|
|
|
+ if (this.$refs.score) validates.push(this.$refs.score.validate())
|
|
await Promise.all(validates)
|
|
await Promise.all(validates)
|
|
|
|
|
|
- const mode = [this.scoreModel.firstSubject].concat(this.scoreModel.lastSubject)
|
|
|
|
|
|
+ const mode = [this.scoreModel.firstSubject].concat(this.scoreModel.lastSubject).filter(i => !!i)
|
|
const commit = {
|
|
const commit = {
|
|
...this.user,
|
|
...this.user,
|
|
mode: mode.toString(),
|
|
mode: mode.toString(),
|
|
@@ -107,7 +109,7 @@ export default {
|
|
},
|
|
},
|
|
close() {
|
|
close() {
|
|
this.$store.dispatch('tagsView/delView', this.$route)
|
|
this.$store.dispatch('tagsView/delView', this.$route)
|
|
- this.$router.push({ path: '/' })
|
|
|
|
|
|
+ this.$router.push({path: '/'})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|