河海版本与职站测试正式自动识别

dev_2022-05-11
yujialong 3 years ago
parent 7e9353412f
commit bb07bb30a7
  1. 2
      src/components/common/Header.vue
  2. 20
      src/components/page/AddClass.vue
  3. 43
      src/components/page/AddProject.vue
  4. 2
      src/components/page/Login.vue
  5. 3
      src/components/page/PersonalCenter.vue
  6. 21
      src/components/page/Role.vue
  7. 13
      src/components/page/ShowExperiment.vue
  8. 13
      src/components/page/Staff.vue
  9. 6
      src/components/page/StaffSide.vue
  10. 1
      src/components/page/achievement.vue
  11. 1
      src/components/page/dashboard.vue
  12. 12
      src/components/page/evaluation.vue
  13. 15
      src/components/page/student.vue
  14. 124
      src/config/index.js
  15. 13
      src/utils/api.js

@ -1,7 +1,7 @@
<template>
<div class="header flex-between">
<div class="logo">
<img src="../../assets/img/logo.png">
<img v-if="!$config.isHh" src="../../assets/img/logo.png">
</div>
<div class="header-right">
<div class="header-user-con">

@ -187,6 +187,7 @@ export default {
stopTime: '0000-00-00 00:00:00', //
invitationCode: '',
currPage: 1,
projectDataAll: [],
projectData: [],
invRepeat: false,
pickerOptions: {
@ -245,17 +246,28 @@ export default {
getProjectData(){
let data = {
pageNo: this.pageNo,
pageSize: this.pageSize,
pageSize: 10000,
userId: this.userId,
systemId: this.systemId,
projectName: this.keyword,
projectPermissions: 1,
}
this.$get(this.api.queryAllManagements,data).then(res => {
this.projectData = res.pageInfo.list
this.totals = res.pageInfo.total
let list = res.pageInfo.list
let result = []
list.map(n => {
n.enable || result.push(n)
})
this.projectDataAll = result
this.totals = result.length
this.handlePage()
}).catch(res => {});
},
handlePage(){
let list = this.projectDataAll
let result = list.slice((this.pageNo - 1) * this.pageSize,this.pageNo * this.pageSize)
this.projectData = result
},
initData(){
this.pageNo = 1
this.getProjectData()
@ -442,7 +454,7 @@ export default {
},
handleCurrentChange(val){
this.pageNo = val
this.getProjectData()
this.handlePage()
},
judgeExpName(){
this.$get(this.api.expCheck, { experimentalName: this.encodeString(this.experimentalName) })

@ -50,7 +50,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="系统">
<el-select v-model="systemId" placeholder="请选择">
<el-select v-model="systemId" placeholder="请选择" @change="systemChange">
<el-option
v-for="item in systemList"
:key="item.value"
@ -147,7 +147,7 @@
</el-table>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover" class="mgb20" v-if="!isHh">
<div class="mgb20 flex-between">
<div class="flex-center">
<p class="addhr_tag"></p>
@ -203,7 +203,7 @@
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover" class="mgb20" v-if="!isHh">
<div class="mgb20 flex-between">
<div class="flex-center">
<p class="addhr_tag"></p>
@ -223,7 +223,7 @@
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover" class="mgb20" v-if="!isHh">
<div class="mgb20 flex-between">
<div class="flex-center">
<p class="addhr_tag"></p>
@ -309,11 +309,13 @@
export default {
data (){
return {
host: location.host.includes('liuwanr.cn') ? 'http://www.liuwanr.cn/' : 'http://www.occupationlab.com/',
host: this.$config.host,
isHh: this.$config.isHh,
id: this.$route.query.id,
systemList: this.$config.systemList,
token: this.$store.state.token,
token: btoa(this.$store.state.token),
systemId: this.$store.state.systemId,
lastSystemId: this.$store.state.systemId,
isDetail: Boolean(this.$route.query.show),
roleId: this.$store.state.userRoleId.split('_').join(),
newroleArray: [],
@ -586,6 +588,18 @@
this.projectNameRepeat = false
}
},
systemChange(){
if(this.experimentData.length && this.isHh){
this.$confirm('更换系统会清空实验任务,确认更换?', '提示', {
type: 'warning'
}).then(() => {
this.experimentData = []
this.lastSystemId = this.systemId
}).catch(() => {
this.systemId = this.lastSystemId
})
}
},
flag01_switch(){},
updateRole() {
this.dialogVisible = true;
@ -636,7 +650,7 @@
this.$message.warning("判分点分数已超过100");
return false;
}
if (this.experimentalData.length == 0 && this.flag01) {
if (this.experimentalData.length == 0 && this.flag01 && !isHh) {
this.$message.warning("请添加实验数据");
return false;
}
@ -646,12 +660,12 @@
return false;
}
if (this.knowledgePoints == "" && this.knowledgePointsIsEnable) {
if (this.knowledgePoints == "" && this.knowledgePointsIsEnable && !isHh) {
this.$message.warning("请输入知识点");
return false;
}
if (this.experimentIntroduction == "" && this.experimentIntroductionIsEnable) {
if (this.experimentIntroduction == "" && this.experimentIntroductionIsEnable && !isHh) {
this.$message.warning("请输入实验介绍");
return false;
}
@ -1037,12 +1051,7 @@
toJudgePoint(row){
let host = this.host
let systemId = this.systemId
// if(systemId == 4 || systemId == 5) systemId = 1
this.handleCacheData()
this.setCookie("systemId",systemId)
this.setCookie("userId",this.userLoginId)
this.setCookie("projectId",this.id)
this.setCookie("token",this.token)
let href = ''
if(row){
if(systemId == 2){
@ -1050,15 +1059,15 @@
}if(systemId == 3){
href = `${host}jdTrials/#/programOptions?id=${row.judgmentPointsId}`
}else{
href = `${host}jdTrials/#/program?judgmentPointsId=${row.judgmentPointsId}`
href = `${host}jdTrials/#/program?judgmentPointsId=${row.judgmentPointsId}&systemId=${systemId}&userId=${this.userLoginId}&token=${this.token}&referrer=${btoa(location.href)}`
}
}else{
if(systemId == 2 || systemId == 3){
href = `${host}jdTrials/#/list`
}else{
href = `${host}jdTrials`
href = `${host}jdTrials/#/?systemId=${systemId}&userId=${this.userLoginId}&token=${this.token}&referrer=${btoa(location.href)}`
}
// if(process.env.NODE_ENV === 'development') href = 'http://192.168.31.154:8080/#/'
if(process.env.NODE_ENV === 'development') href = `http://192.168.31.154:8087/#/?systemId=${systemId}&userId=${this.userLoginId}&token=${this.token}&referrer=${btoa(location.href)}`
}
location.href = href
},

@ -1,6 +1,6 @@
<template>
<div class="login-wrap">
<div class="header">
<div class="header" v-if="!$config.isHh">
<div class="logo">
<img src="../../assets/img/logo.png">
</div>

@ -899,9 +899,8 @@ export default {
userInfoEntity,
personalFileEntities
}
// return console.log(11,data)
this.$put(this.api.userinfoUpdate,data).then(res => {
bus.$emit('updateAccount',personalInformation.account)
bus.$emit('updateAccount',personalInformation.userName)
this.$message.success('提交成功!')
}).catch(res => {});
},

@ -38,7 +38,7 @@
</el-card>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible"
width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false">
width="30%" @close="closeRole" class="dialog" center :close-on-click-modal="false">
<el-form ref="form" label-width="100px" :disabled="isDetail">
<el-form-item label="角色名称">
<el-input v-model="form.name " ref="account" placeholder="请输入角色名称"></el-input>
@ -61,8 +61,8 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button size="small" @click="roleVisible = false"> </el-button>
<el-button size="small" type="primary" @click="saveData"> </el-button>
<el-button @click="roleVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
</div>
@ -217,7 +217,19 @@ export default {
getPer(row){
if(!this.permissions.length){
this.$get(this.api.roleTree).then(res => {
this.permissions = res.data
let data = res.data
let yw = data.findIndex(n => n.name == '业务后台')
yw != -1 && data.splice(yw,1)
try {
let system = data.findIndex(n => n.name == '系统设置')
if(system != -1){
data[system].children[1].children.splice(4,1)
data[system].children[1].children.splice(1,1)
data[system].children[1].children.splice(0,1)
}
} catch (error) {}
this.permissions = data
if(row){
this.getDetail(row)
}
@ -233,7 +245,6 @@ export default {
},
handleRolePer(data,permissions){
let result = data
console.log(1,result,permissions)
if(permissions.length){
permissions.map(e => {
if(result.includes(e.id) && e.children){

@ -49,7 +49,8 @@
<div class="meta-title-wrap">
<p class="meta-title">实验目的</p>
</div>
<el-input v-model="form.purpose" type="textarea" :disabled="true" rows="5"></el-input>
<!-- <el-input v-model="form.purpose" type="textarea" :disabled="true" rows="5"></el-input> -->
<div class="pre-wrap" v-html="form.purpose"></div>
</div>
<div class="mgb20">
@ -66,12 +67,12 @@
</el-table-column>
<el-table-column prop="userAnswer" label="学生答案" align="center">
<template slot-scope="scope">
<pre v-html="scope.row.userAnswer"></pre>
<pre v-html="scope.row.userAnswer" style="white-space: pre-wrap"></pre>
</template>
</el-table-column>
<el-table-column prop="answer" label="参考答案" align="center">
<template slot-scope="scope">
<div v-html="scope.row.answer"></div>
<pre v-html="scope.row.answer" style="white-space: pre-wrap"></pre>
</template>
</el-table-column>
<el-table-column prop="codeScore" label="得分" align="center">
@ -312,6 +313,12 @@
color: #777;
background-color: #e5dfff;
}
.pre-wrap{
min-height: 117px;
padding: 5px 15px;
color: #777;
background-color: #e5dfff;
}
#pdfDom{
padding: 50px;
/deep/.info-table{

@ -174,7 +174,7 @@ export default {
isDetail: false,
isAddteacher: false,
teacherVisible: false,
schoolId: 2105,
schoolId: this.$config.schoolId,
teacherForm: {
teacherId: '',
userName: '',
@ -315,7 +315,7 @@ export default {
},
mounted(){
this.getData()
this.teacherForm.schoolId = 2105
this.teacherForm.schoolId = this.$config.schoolId
this.getSchoolData()
},
methods: {
@ -544,7 +544,12 @@ export default {
if(res.message.user.length != 0){
let user = res.message.user[0];
let or = res.message.OR;
this.accountMsg = user.roleId.includes(',') ? '该账号已绑定老师和管理员' : `该账号已绑定${this.roleStatus(user.roleId)}`
if(user.roleId){
this.accountMsg = user.roleId.includes(',') ? '该账号已绑定老师和管理员' : `该账号已绑定${this.roleStatus(user.roleId)}`
}else{
this.accountMsg = '该账号已存在'
}
this.$message.warning(this.accountMsg)
this.teacherForm.email = user.email
this.teacherForm.phone = user.phone
@ -764,7 +769,7 @@ export default {
this.getData();
},
downLoad(){
location.href = 'http://www.liuwanr.cn/template/staff.xlsx'
location.href = this.api.staffTemplate
},
showFaild(){
location.href = `${this.api.export_failureStaff}?token=${this.token}`

@ -46,7 +46,7 @@ export default {
twoactive: 0,
isaddMajor: false,
isAddDepartment: false,
schoolId: 2105,
schoolId: this.$config.schoolId,
Form: {
MajorId: '',
majorName: '',
@ -120,7 +120,7 @@ export default {
this.isaddMajor = true
},
async majorChange(){
let res = await this.$get(this.api.queryStaffPAN, { name: this.Form.majorName });
let res = await this.$get(this.api.queryStaffPAN, { name: this.Form.majorName,schoolId: this.schoolId });
if(res.message.length != 0){
this.$message.warning('该一级部门已存在');
this.majorNoAdd = false
@ -244,6 +244,7 @@ export default {
this.$post(this.api.deleteStaffPro,data).then(res => {
this.$message.success('删除成功');
this.majorList.splice(index, 1)
this.$emit('getData')
this.$get(`${this.api.dalStaffByProfessionalId}?staffProfessionalArchitectureId=${item.staffProfessionalArchitectureId}`).then(res => {}).catch(res => {})
}).catch(res => {});
})
@ -270,6 +271,7 @@ export default {
})
})
this.$emit("delDep",item,this.majorList)
this.$emit('getData')
this.$get(`${this.api.dalStaffByStaffGradeId}?staffGradeId=${item.staffGradeId}`).then(res => {}).catch(res => {})
}).catch(res => {});
})

@ -217,6 +217,7 @@ export default {
this.totals = result.length
},
initData(){
this.$refs.table.clearSelection()
this.pageNo = 1
this.getData()
},

@ -317,6 +317,7 @@ export default {
}).catch(res => {});
},
initData(){
this.$refs.table.clearSelection()
this.pageNo = 1
this.getData()
},

@ -88,13 +88,13 @@
</el-col>
<div>
<el-dialog :title="topicsTitle" :visible.sync="NewTopics" width="30%" @close="closeTopics" :close-on-click-modal="false">
<el-dialog :title="topicsTitle" :visible.sync="NewTopics" width="30%" @close="closeTopics" center :close-on-click-modal="false">
<el-form
:model="topicForm"
:rules="rules"
:disabled="isShowTopics"
ref="topicForm"
label-width="100px"
label-width="70px"
class="demo-topicForm"
>
<el-form-item label="题型" prop="questionType">
@ -147,12 +147,12 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" v-show="!isShowTopics">
<el-button type="primary" @click="saveTopics"> </el-button>
<el-button v-preventReClick @click="NewTopics = false"> </el-button>
<el-button type="primary" @click="saveTopics"> </el-button>
</div>
</el-dialog>
<el-dialog title="批量上传" :visible.sync="BatchUpload" width="30%" @close="closeUpload" :close-on-click-modal="false">
<el-dialog title="批量上传" :visible.sync="BatchUpload" width="30%" @close="closeUpload" :close-on-click-modal="false" center>
<el-card shadow="hover" class="card_m" v-show="this.label=1">
<div class="Upload">
<div class="bt" @click="downloadTem">
@ -410,6 +410,7 @@ export default {
.catch(err => {})
},
initData(){
this.$refs.table.clearSelection()
this.pageNo = 1
this.getData()
},
@ -516,8 +517,7 @@ export default {
}
},
downloadTem() {
// location.href = this.api.download
location.href = 'http://www.liuwanr.cn/template/试题导入模板.xlsx?id=1'
location.href = this.api.questionsTemplate
},
getInfo() {
this.$get(this.api.info).then(res => {

@ -9,7 +9,7 @@
<div>
<div style="display: flex;justify-content: flex-end;">
<div>
<el-input placeholder="请输入学生姓名/学校名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<el-input placeholder="请输入学生账号/姓名/学校名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div>
</div>
@ -36,6 +36,8 @@
</el-table-column>
<el-table-column prop="schoolName" label="院校" align="center">
</el-table-column>
<el-table-column prop="workNumber" label="学号" align="center">
</el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center">
</el-table-column>
<el-table-column prop="countries" label="账号角色" align="center">
@ -165,7 +167,7 @@ export default {
return {
isDetail: false,
keyword: '',
schoolId: 2105,
schoolId: this.$config.schoolId,
form: {
userName: '',
account: '',
@ -275,6 +277,7 @@ export default {
}).catch(res => {});
},
initData(){
this.$refs.table.clearSelection()
this.pageNo = 1
this.getData()
},
@ -319,7 +322,11 @@ export default {
});
if(res.message.user.length){
let roleId = res.message.user[0].roleId
this.accountMsg = roleId == 4 ? '该账号已存在' : (roleId.includes(',') ? '该账号已绑定老师和管理员' : `该账号已绑定${this.roleStatus(roleId)}`)
if(roleId){
this.accountMsg = roleId == 4 ? '该账号已存在' : (roleId.includes(',') ? '该账号已绑定老师和管理员' : `该账号已绑定${this.roleStatus(roleId)}`)
}else{
this.accountMsg = '该账号已存在'
}
this.$message.warning(this.accountMsg)
this.accountReapeat = true
}else{
@ -404,7 +411,7 @@ export default {
})
},
downLoad(){
location.href = 'http://www.liuwanr.cn/template/student.xlsx'
location.href = this.api.studentTemplate
},
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {

@ -1,38 +1,92 @@
const isHh = location.host.includes('10.196.131.73') //是否是河海版本
const isBeta = location.host.includes('liuwanr.cn') //是否是职站测试
export default {
/**
* @description 配置显示在浏览器标签的title
*/
title: '职站服务端管理系统',
/**
* @description 是否使用国际化默认为false
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
* 用来在菜单中显示文字
* @description 域名切换liuwan职站测试环境occupationlab.com职站正式环境10.196.131.73河海版本
*/
locale: 'zh',
/**
* @description 跳转子系统链接
*/
subSystem: 'https://org.modao.cc/app/dfa8ba16a4a8f2b6dc1af8d31ff36ec62a184ace?simulator_type=device&sticky#screen=skdikymc2cmsgkk',
host: (process.env.NODE_ENV === 'development' || location.host.includes('liuwanr.cn')) ? 'http://www.liuwanr.cn' : (location.host.includes('10.196.131.73') ? 'http://10.196.131.73' : 'http://www.occupationlab.com'),
/**
* @description 长时间未操作自动退出登录时间
* @description 是否是河海版本
*/
autoLogoutTime: 3600000,
isHh,
/**
* @description 新增项目跳转判分点数据存储cookie的key
* @description 配置显示在浏览器标签的title
*/
projectData: 'sta_data',
title: isHh ? '教师管理端' : '职站服务端管理系统',
/**
* @description 默认密码
* @description 学校id
*/
initialPassword: '111aaa',
/**
* @description 系统id
*/
systemId: 1,
schoolId: isHh ? 729 : 2105,
/**
* @description 系统列表
*/
systemList: [
systemList: isHh ? [
{
id: 1,
label: '智信云Python程序设计教学系统'
}
,{
id: 4,
label: '智信云经济金融建模实验教学系统'
},
// {
// id: 5,
// label: 'Python可视化实验教学系统'
// },
{
id: 6,
label: '智信云金融随机过程实验教学系统'
},{
id: 7,
label: '智信云量化投资策略建模实验教学系统'
},
// {
// id: 8,
// label: '大数据分析实验教学系统'
// },
// {
// id: 9,
// label: 'Python数据清洗教学实验系统'
// },{
// id: 10,
// label: 'Python数据采集(爬虫)教学实验系统'
// }
] : (isBeta ? [
{
id: 1,
label: 'Python程序设计教学系统'
}
// ,{
// id: 2,
// label: '跨国仿真系统'
// },{
// id: 3,
// label: '期权期货系统'
// }
,{
id: 4,
label: '经济金融建模实验教学系统'
},{
id: 5,
label: 'Python可视化实验教学系统'
},{
id: 6,
label: '金融随机过程实验教学系统'
},{
id: 7,
label: '量化投资策略建模实验教学系统'
},{
id: 8,
label: '大数据分析实验教学系统'
},
{
id: 9,
label: 'Python数据清洗教学实验系统'
},{
id: 10,
label: 'Python数据采集(爬虫)教学实验系统'
}
] : [
{
id: 1,
label: 'Python程序设计教学系统'
@ -67,7 +121,29 @@ export default {
// id: 10,
// label: 'Python数据采集(爬虫)教学实验系统'
// }
],
]),
/**
* @description 是否使用国际化默认为false
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
* 用来在菜单中显示文字
*/
locale: 'zh',
/**
* @description 长时间未操作自动退出登录时间
*/
autoLogoutTime: 3600000,
/**
* @description 新增项目跳转判分点数据存储cookie的key
*/
projectData: 'sta_data',
/**
* @description 默认密码
*/
initialPassword: '111aaa',
/**
* @description 系统id
*/
systemId: 1,
/**
* @description 是否使用动态路由
*/

@ -1,16 +1,13 @@
import config from '@/config'
// let host = 'http://192.168.31.125:9090'//林
// let host = 'http://192.168.31.125:1010'//林
// let host = 'http://192.168.31.152:9090'//榕
// let host = 'http://192.168.31.140:8090'//7
let host = ''
let host = config.host
let host1 = 'http://39.108.250.202:8080'
// let loginhost = 'http://www.liuwanr.cn'
let uploadURL = 'http://8.134.8.197:8001'
if(location.host.includes('liuwanr.cn') || process.env.NODE_ENV === 'development'){
host = 'http://www.liuwanr.cn'
}else{
host = 'http://www.occupationlab.com'
}
export default {
fileupload: `${uploadURL}/oss/manage/fileupload`,
logins: `${host}/liuwanr/userInfo/adminLogins`, //登录
@ -57,7 +54,7 @@ export default {
info: `${host}/evaluation/tms/evaluationrules/info`, //测评规则信息的展示
update: `${host}/evaluation/tms/evaluationrules/update`, //修改测评规则信息
delete: `${host}/evaluation/tms/questions/delete`, //批量删除试题信息
download: `${host}/evaluation/tms/questions/download`, //excel模板文件下载
questionsTemplate: `${host}/template/试题导入模板.xlsx`, //excel模板文件下载
import: `${host}/evaluation/tms/questions/import`, //通过excel批量导入
infoId: `${host}/evaluation/tms/questions/info/`, //根据试题id查询试题详情信息
isenable: `${host}/evaluation/tms/questions/isenable`, //是否禁用试题
@ -109,6 +106,7 @@ export default {
uploadFile: `${host}/evaluation/tms/student/uploadFile`,
export_failureStudent: `${host}/evaluation/tms/student/export_failure`,
queryAccountStudent:`${host}/evaluation/tms/student/queryAccount`,
studentTemplate:`${host}/template/student.xlsx`,
// 员工管理
addStaff: `${host}/evaluation/tms/system/addStaff`,
@ -123,6 +121,7 @@ export default {
resetPwd:`${host}/evaluation/tms/system/resetPwd`,
dalStaffByStaffGradeId:`${host}/evaluation/tms/system/dalStaffByStaffGradeId`,
dalStaffByProfessionalId:`${host}/evaluation/tms/system/dalStaffByProfessionalId`,
staffTemplate:`${host}/template/staff.xlsx`,
// 角色权限
rolePermissionList:`${host}/evaluation/sys-permission/rolePermissionList`,

Loading…
Cancel
Save