登录后弹出填写真实姓名弹框

dev_202412
yujialong 3 months ago
parent 0196f27459
commit f6bcb729c2
  1. 2
      src/api/index.js
  2. 59
      src/layouts/home/index.vue
  3. 52
      src/pages/ass/list/index.vue
  4. 1
      src/pages/match/details/index.vue
  5. 1
      src/pages/match/list/index.vue
  6. 2
      src/pages/station/preview/index.vue
  7. 1
      src/pages/touristMatch/list/index.vue
  8. 2
      src/setting.js

@ -31,6 +31,8 @@ export default {
customerSettingsList: `nakadai/nakadai/customer/customerSettingsList`,
getSchoolIdByToken: `competition/competition/registration/getSchoolIdByToken`,
updateRealSchoolId: `competition/competition/registration/updateRealSchoolId`,
checkUserNameOrWorkNumber: `users/users/batchProcessing/checkUserNameOrWorkNumber`,
updateUserNameOrWorkNumber: `users/users/batchProcessing/updateUserNameOrWorkNumber`,
// 阿里云文件/视频管理
getPlayAuth: `nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证

@ -37,6 +37,21 @@
</div>
</div>
</div>
<el-dialog title="" :visible.sync="realNameVisible" :close-on-click-modal="false" :close-on-press-escape="false"
:show-close="false" width="300px" custom-class="name-dia">
<el-form ref="realNameForm" :model="realNameForm" :rules="realNameRules" label-width="80px">
<el-form-item label="真实姓名" prop="userName">
<el-input v-model.trim="realNameForm.userName" placeholder="请输入真实姓名"></el-input>
</el-form-item>
<el-form-item label="学号" prop="workNumber">
<el-input v-model.trim="realNameForm.workNumber" placeholder="请输入学号"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="realNameSubmit"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -70,7 +85,18 @@ export default {
icon: 'optimize'
}
],
showHeader: true
showHeader: true,
realNameVisible: false,
realNameForm: {
userName: '',
workNumber: '',
},
realNameRules: {
userName: [
{ required: true, message: '请输入真实姓名', trigger: 'blur' }
],
},
};
},
components: {
@ -97,6 +123,7 @@ export default {
this.autoLogout()
this.noticed || this.getMatchStatus() // 0
this.logView || this.getLogStatus() // logViewfalse
this.handleRealName()
},
methods: {
...mapMutations("user", [
@ -108,6 +135,14 @@ export default {
...mapActions("user", [
"logout"
]),
//
async handleRealName () {
const res = await this.$post(this.api.checkUserNameOrWorkNumber)
//
if (!res.hasName) {
this.realNameVisible = true
}
},
// ()
getMatchStatus () {
util.local.get(Setting.tokenKey) && this.$post(this.api.promptRemoval).then(({ prompt }) => {
@ -144,6 +179,18 @@ export default {
this.logVisible = false
this.SET_LOG() // true
},
//
realNameSubmit () {
this.$refs.realNameForm.validate(async (valid) => {
if (valid) {
const form = this.realNameForm
await this.$post(`${this.api.updateUserNameOrWorkNumber}?userName=${form.userName}&workNumber=${form.workNumber}`)
this.realNameVisible = false
} else {
return false
}
})
},
// ,退
autoLogout () {
let lastTime = new Date().getTime();
@ -282,4 +329,14 @@ export default {
}
}
}
/deep/.name-dia {
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding-bottom: 10px;
}
}
</style>

@ -112,7 +112,7 @@
<script>
import { mapState } from "vuex";
import Setting from "@/setting";
import util from "@/libs/util";
import Util from "@/libs/util";
import Bus from '@/libs/bus'
import qs from 'qs'
export default {
@ -196,7 +196,7 @@ export default {
"form.month": function (val) {
if (val) {
let unit = 24 * 60 * 60 * 1000;
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))];
this.date = [Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))];
} else {
this.date = [];
}
@ -332,9 +332,9 @@ export default {
this.assessmentId = this.item.assessmentId
this.classId = this.item.classId
if (row.status == 0) {
return util.warningMsg("该实验尚未开始");
return Util.warningMsg("该实验尚未开始");
} else if (row.status == 2) {
return util.warningMsg("该实验已经结束");
return Util.warningMsg("该实验已经结束");
} else {
this.curRow = row;
if (row.isEnableCode == 0) { // (0 1)
@ -348,6 +348,7 @@ export default {
let date = data.stopTime;
date = date.substring(0, 19);
date = date.replace(/-/g, '/');
// return
this.stopTime = new Date(date).getTime();
this.goSubSystem();
}).catch(res => {
@ -362,10 +363,10 @@ export default {
this.$router.push(`/record/trialReport?reportId=${row.reportId}`);
},
saveIc () {
if (!this.invitationCode) return util.warningMsg("请输入邀请码");
if (!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码");
if (!this.invitationCode) return Util.warningMsg("请输入邀请码");
if (!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return Util.warningMsg("请输入6位纯数字邀请码");
this.$post(`${this.api.enterExam}?assessmentId=${this.item.assessmentId}&classId=${this.item.classId}&invitationCode=${this.invitationCode}`).then(res => {
util.successMsg("验证成功!");
Util.successMsg("验证成功!");
this.icVisible = false;
const data = res.assessmentInfo
this.curRow.paperId = data.paperId || ''
@ -381,7 +382,7 @@ export default {
this.invitationCode = "";
},
goSubSystem () {
const token = util.local.get(Setting.tokenKey)
const token = Util.local.get(Setting.tokenKey)
const classId = this.classId
const classItem = this.classList.find(e => e.id == classId)
const row = this.curRow
@ -392,21 +393,24 @@ export default {
window.open(this.$router.resolve(`/theoryExam?paperId=${paperId}&assessmentId=${this.assessmentId}&classId=${classId}&cid=${this.cid}&mallId=${mallId}&curriculumName=${row.sysName}`).href)
} else {
//
util.cookies.set("token", token)
util.cookies.set("assessmentId", this.assessmentId)
util.cookies.set("classId", classId)
util.cookies.set("className", classItem ? classItem.className : '')
util.cookies.set("projectId", this.projectId)
util.cookies.set("courseId", this.cid)
util.cookies.set("curriculumName", encodeURIComponent(row.sysName));
util.cookies.set("startTime", row.startTime)
util.cookies.set("stopTime", row.stopTime)
util.cookies.set("systemId", this.systemId);
util.cookies.set('mallId', mallId)
util.cookies.set('fromManager', '', -1)
util.cookies.set('competitionId', '', -1)
util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1)
Util.cookies.set("token", token)
Util.cookies.set("assessmentId", this.assessmentId)
Util.cookies.set("classId", classId)
Util.cookies.set("className", classItem ? classItem.className : '')
Util.cookies.set("projectId", this.projectId)
Util.cookies.set("courseId", this.cid)
Util.cookies.set("curriculumName", encodeURIComponent(row.sysName));
Util.cookies.set("startTime", row.startTime)
Util.cookies.set("stopTime", row.stopTime)
Util.cookies.set("systemId", this.systemId);
Util.cookies.set('mallId', mallId)
Util.cookies.set('fromManager', '', -1)
Util.cookies.set('competitionId', '', -1)
Util.cookies.set('stageId', '', -1)
Util.cookies.set('teamId', '', -1)
Util.cookies.set('isSubmit', '', -1)
Util.cookies.set('language', '', -1)
Util.cookies.set('loaded', '', -1)
let href = ''
if (curriculumId == 11) {
href = `${Setting.systemPath}/#/index/list?token=${token}&cid=${this.cid}&systemId=${this.systemId}&projectId=${this.projectId}&mallId=${mallId}&assessmentId=${this.assessmentId}&classId=${classId}&stopTime=${this.stopTime}`;
@ -423,7 +427,7 @@ export default {
href = `${location.origin}/pyTrials` // 8pythoncookiesystemId
}
}
if (!href) return util.errorMsg("该考核非Python考核,请选择其他考核");
if (!href) return Util.errorMsg("该考核非Python考核,请选择其他考核");
location.href = href;
}
}

@ -1781,6 +1781,7 @@ export default {
Util.cookies.set('mallId', form.mallId)
Util.cookies.set('fromManager', '', -1)
Util.cookies.set('language', '', -1)
Util.cookies.set('loaded', '', -1)
// 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8085/#/` :

@ -1098,6 +1098,7 @@ export default {
Util.cookies.set('isSubmit', '', -1)
Util.cookies.set('language', '', -1)
Util.cookies.set('className', '', -1)
Util.cookies.set('loaded', '', -1)
// 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8085/#/` :

@ -908,6 +908,8 @@ export default {
Util.cookies.set('isSubmit', '', -1)
Util.cookies.set('fromManager', '', -1)
Util.cookies.set('competitionId', '', -1)
Util.cookies.set('stageId', '', -1)
Util.cookies.set('teamId', '', -1)
Util.cookies.set('language', '', -1)
Util.cookies.set('className', '', -1)
Util.cookies.set('loaded', '', -1)

@ -818,6 +818,7 @@ export default {
Util.cookies.set('isSubmit', '', -1)
Util.cookies.set('language', '', -1)
Util.cookies.set('className', '', -1)
Util.cookies.set('loaded', '', -1)
// 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ?

@ -30,7 +30,7 @@ if (isDev) {
host = "http://121.37.12.51/"; // 测试服
// host = 'https://www.occupationlab.com/' // 正式服
const ip = localStorage.getItem('localIp')
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'http://118.31.167.228/']
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'https://izhixinyun.com/']
host = ips[+ip]
// host = 'http://192.168.31.51:9000/'
} else if (isSq) {

Loading…
Cancel
Save