yujialong 1 month ago
parent 355f39174d
commit fa8c6a1fb3
  1. 33
      package-lock.json
  2. 1
      package.json
  3. 7
      src/api/index.js
  4. 42
      src/layouts/header/index.vue
  5. 5
      src/layouts/home/index.vue
  6. 32
      src/libs/clipboard.js
  7. 5
      src/pages/account/login/index.vue
  8. 10
      src/pages/allocationReview/records/index.vue
  9. 274
      src/pages/expert/list/index.vue
  10. 15
      src/pages/myReview/theoryReview/index.vue

33
package-lock.json generated

@ -3215,6 +3215,16 @@
"integrity": "sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==", "integrity": "sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==",
"dev": true "dev": true
}, },
"clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"requires": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"clipboardy": { "clipboardy": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.1.0.tgz", "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.1.0.tgz",
@ -4472,6 +4482,11 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
}, },
"delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"delegates": { "delegates": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
@ -6871,6 +6886,14 @@
"sparkles": "^1.0.0" "sparkles": "^1.0.0"
} }
}, },
"good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"requires": {
"delegate": "^3.1.2"
}
},
"got": { "got": {
"version": "7.1.0", "version": "7.1.0",
"resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz",
@ -13027,6 +13050,11 @@
"commander": "^2.8.1" "commander": "^2.8.1"
} }
}, },
"select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"select-hose": { "select-hose": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@ -14150,6 +14178,11 @@
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
"dev": true "dev": true
}, },
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
"to-arraybuffer": { "to-arraybuffer": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",

@ -11,6 +11,7 @@
"ali-oss": "^6.20.0", "ali-oss": "^6.20.0",
"axios": "^0.18.0", "axios": "^0.18.0",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"clipboard": "^2.0.11",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dayjs": "^1.11.12", "dayjs": "^1.11.12",
"decimal.js": "^10.4.3", "decimal.js": "^10.4.3",

@ -37,4 +37,11 @@ export default {
getTheLabReportIdUpAndDown: `/nakadai/evaluation/getTheLabReportIdUpAndDown`, getTheLabReportIdUpAndDown: `/nakadai/evaluation/getTheLabReportIdUpAndDown`,
deleteComments: `/nakadai/evaluation/deleteComments`, deleteComments: `/nakadai/evaluation/deleteComments`,
assignedPersonnelList: `/nakadai/evaluationAssignments/assignedPersonnelList`, assignedPersonnelList: `/nakadai/evaluationAssignments/assignedPersonnelList`,
addNewExperts: `/nakadai/nakadai/backstageStaff/addNewExperts`,
expertDetail: `/nakadai/nakadai/backstageStaff/expertDetail`,
modifyExpert: `/nakadai/nakadai/backstageStaff/modifyExpert`,
expertList: `/nakadai/nakadai/backstageStaff/expertList`,
delStaff: `/nakadai/nakadai/backstageStaff/delStaff`,
expertResetPassword: `/nakadai/nakadai/backstageStaff/expertResetPassword`,
updateAccountEnable: `/nakadai/nakadai/backstageStaff/updateAccountEnable`,
} }

@ -1,8 +1,6 @@
<template> <template>
<div class="header"> <div class="header">
<div class="group"> <div class="platform">专家评审系统</div>
<breadcrumb v-if="crumbRefresh" ref="breadcrumb" :data="crumbs"></breadcrumb>
</div>
<div class="user-tool"> <div class="user-tool">
<el-dropdown class="user-wrap" @command="userCommand"> <el-dropdown class="user-wrap" @command="userCommand">
<div class="user"> <div class="user">
@ -10,7 +8,7 @@
<span class="username">{{ userName }}</span> <span class="username">{{ userName }}</span>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="person">个人资料</el-dropdown-item> <el-dropdown-item command="person">个人中心</el-dropdown-item>
<el-dropdown-item command="logout">退出登录</el-dropdown-item> <el-dropdown-item command="logout">退出登录</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -25,9 +23,7 @@ import Util from '@/libs/util'
export default { export default {
data () { data () {
return { return {
sites: [],
crumbRefresh: true,
inContent: false, //
}; };
}, },
components: { components: {
@ -35,22 +31,14 @@ export default {
}, },
computed: { computed: {
...mapState('user', [ ...mapState('user', [
'avatar', 'userName', 'crumbs' 'avatar', 'userName'
]), ]),
...mapState('auth', [ ...mapState('auth', [
'btns' 'btns'
]) ])
}, },
watch: {
crumbs () {
this.crumbRefresh = false
this.$nextTick(() => {
this.crumbRefresh = true
})
},
},
mounted () { mounted () {
this.setContent()
}, },
methods: { methods: {
...mapActions("user", [ ...mapActions("user", [
@ -75,23 +63,15 @@ export default {
align-items: center; align-items: center;
height: 64px; height: 64px;
padding: 0 25px; padding: 0 25px;
margin-bottom: 20px;
color: #333; color: #333;
background-color: #fff; background-color: #062c87;
box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12); box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
.group { .platform {
display: inline-flex; font-size: 22px;
align-items: center; font-weight: 600;
color: #fff;
span {
margin-left: 13px;
font-size: 14px;
color: #333;
}
}
.cp {
cursor: pointer;
} }
.user-tool { .user-tool {

@ -1,4 +1,6 @@
<template> <template>
<div style="height: 100%">
<v-head v-if="showHeader" />
<div class="main"> <div class="main">
<v-navbar class="nav" /> <v-navbar class="nav" />
<div class="layout"> <div class="layout">
@ -10,6 +12,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -21,7 +24,7 @@ import vFooter from '../footer'
export default { export default {
data () { data () {
return { return {
showHeader: false
}; };
}, },
components: { components: {

@ -0,0 +1,32 @@
import Vue from 'vue'
import Clipboard from 'clipboard'
function clipboardSuccess(message = 'Copy successfully') {
Vue.prototype.$message({
message,
type: 'success',
duration: 1500
})
}
function clipboardError() {
Vue.prototype.$message({
message: 'Copy failed',
type: 'error'
})
}
export default function handleClipboard(text, event, message) {
const clipboard = new Clipboard(event.target, {
text: () => text
})
clipboard.on('success', () => {
clipboardSuccess(message)
clipboard.destroy()
})
clipboard.on('error', () => {
clipboardError()
clipboard.destroy()
})
clipboard.onClick(event)
}

@ -219,7 +219,10 @@ export default {
this.getVerImg() this.getVerImg()
form.code = '' form.code = ''
} else if (status == 200) { } else if (status == 200) {
Util.local.set(Setting.tokenKey, this.token, Setting.tokenExpires) // Util.local.set(Setting.tokenKey, this.token, Setting.tokenExpires)
// localStorage.setItem('review_token', token)
// localStorage.setItem('isExpert', true)
Util.successMsg('登录成功') Util.successMsg('登录成功')
this.$router.replace(`/myReview`) this.$router.replace(`/myReview`)
} }

@ -56,10 +56,9 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="50" label="序号" align="center"></el-table-column> <el-table-column type="index" width="50" label="序号" align="center"></el-table-column>
<el-table-column prop="provinceName" label="省份" align="center" width="70" show-overflow-tooltip></el-table-column> <el-table-column prop="provinceName" label="省份" align="center" width="100"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center" width="70" show-overflow-tooltip></el-table-column> <el-table-column prop="cityName" label="城市" align="center" width="120"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" align="center" width="100" <el-table-column prop="realSchool" label="学生所在院校" align="center" width="120"></el-table-column>
show-overflow-tooltip></el-table-column>
<el-table-column prop="teamName" label="团队名称" align="center" width="90"></el-table-column> <el-table-column prop="teamName" label="团队名称" align="center" width="90"></el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center" width="80"></el-table-column> <el-table-column prop="userName" label="学生姓名" align="center" width="80"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center" width="70"></el-table-column> <el-table-column prop="workNumber" label="学号" align="center" width="70"></el-table-column>
@ -68,8 +67,7 @@
<template slot-scope="scope">{{ scope.row.timeSum }}min</template> <template slot-scope="scope">{{ scope.row.timeSum }}min</template>
</el-table-column> </el-table-column>
<el-table-column prop="submitTime" label="提交时间" align="center" width="150"></el-table-column> <el-table-column prop="submitTime" label="提交时间" align="center" width="150"></el-table-column>
<el-table-column prop="submitName" label="提交名称" align="center" min-width="120" <el-table-column prop="submitName" label="提交名称" align="center" min-width="200"></el-table-column>
show-overflow-tooltip></el-table-column>
<el-table-column prop="lastEditor" label="是否完成分配" align="center" width="100"> <el-table-column prop="lastEditor" label="是否完成分配" align="center" width="100">
<template slot-scope="scope">{{ scope.row.isDistribution ? '是' : '否' }}</template> <template slot-scope="scope">{{ scope.row.isDistribution ? '是' : '否' }}</template>
</el-table-column> </el-table-column>

@ -9,9 +9,9 @@
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="text" @click="add">复制专家登录链接</el-button> <el-button type="text" @click="copy">复制专家登录链接</el-button>
<el-button type="primary" @click="add" v-auth="'/system:后台账号:新增员工'">新增专家</el-button> <el-button type="primary" @click="add">新增专家</el-button>
<el-button type="primary" @click="batchDel" v-auth="'/system:后台账号:批量导入'">批量删除</el-button> <el-button type="primary" @click="batchDel">批量删除</el-button>
</div> </div>
</div> </div>
@ -21,18 +21,18 @@
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column> <el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center" width="120"></el-table-column> <el-table-column prop="phone" label="手机号" align="center" width="120"></el-table-column>
<el-table-column prop="staffArchitectureName" label="现所在单位" align="center" min-width="200"></el-table-column> <el-table-column prop="currentUnit" label="现所在单位" align="center" min-width="200"></el-table-column>
<el-table-column prop="roleName" label="职务" align="center" min-width="200"></el-table-column> <el-table-column prop="post" label="职务" align="center" min-width="200"></el-table-column>
<el-table-column prop="lastLoginTime" label="登录次数" align="center" width="130"></el-table-column> <el-table-column prop="logInNumber" label="登录次数" align="center" width="130"></el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="130"></el-table-column> <el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="170"></el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-auth="'/system:后台账号:查看'" @click="queryStaff(scope.row, true)">查看</el-button> <el-button type="text" @click="queryExpert(scope.row, true)">查看</el-button>
<el-button type="text" v-auth="'/system:后台账号:编辑'" @click="queryStaff(scope.row, false)">编辑</el-button> <el-button type="text" @click="queryExpert(scope.row, false)">编辑</el-button>
<el-button type="text" v-auth="'/system:后台账号:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button> <el-button type="text" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button type="text" v-auth="'/system:后台账号:删除'" @click="delStaff(scope.row)">删除</el-button> <el-button type="text" @click="del(scope.row)">删除</el-button>
<el-switch v-auth="'/match:启用'" v-model="scope.row.ztOpen" :active-value="0" :inactive-value="1" <el-switch v-model="scope.row.isEnable" :active-value="1" :inactive-value="0" style="margin: 0 10px 0 5px"
style="margin: 0 10px 0 5px" :active-text="scope.row.ztOpen ? '关' : '开'" :active-text="scope.row.isEnable ? '开' : '关'"
@change="switchOff($event, scope.row, scope.$index)"></el-switch> @change="switchOff($event, scope.row, scope.$index)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
@ -43,7 +43,7 @@
</div> </div>
<el-drawer :title="isDetail ? '查看' : (form.accountId ? '编辑' : '新增') + '专家'" :visible.sync="expertVisible" <el-drawer :title="isDetail ? '查看' : (form.accountId ? '编辑' : '新增') + '专家'" :visible.sync="expertVisible"
size="580px" class="dialog" :close-on-click-modal="false" custom-class="expert-dia" @close="closeStaff"> size="580px" class="dialog" :wrapperClosable="false" custom-class="expert-dia" @close="closeExpert">
<el-form class="overflow" ref="form" :model="form" :rules="rules" label-width="120px" :disabled="isDetail"> <el-form class="overflow" ref="form" :model="form" :rules="rules" label-width="120px" :disabled="isDetail">
<el-form-item prop="userName" label="姓名"> <el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名"></el-input> <el-input v-model.trim="form.userName" placeholder="请输入姓名"></el-input>
@ -51,43 +51,43 @@
<el-form-item prop="phone" label="手机号"> <el-form-item prop="phone" label="手机号">
<el-input v-model.trim="form.phone" placeholder="请输入手机号" maxlength="11"></el-input> <el-input v-model.trim="form.phone" placeholder="请输入手机号" maxlength="11"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userName" label="登录密码"> <el-form-item prop="password" label="登录密码">
<el-input type="password" v-model.trim="form.userName" placeholder="请输入密码" show-password></el-input> <el-input type="password" v-model.trim="form.password" placeholder="为空则默认密码:手机号码后六位" show-password></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="电子邮箱"> <el-form-item prop="email" label="电子邮箱">
<el-input v-model.trim="form.email" placeholder="请输入电子邮箱"></el-input> <el-input v-model.trim="form.email" placeholder="请输入电子邮箱"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="性别"> <el-form-item prop="sex" label="性别">
<el-radio v-model="form.radio" label="1"></el-radio> <el-radio v-model="form.sex" :label="1"></el-radio>
<el-radio v-model="form.radio" label="2"></el-radio> <el-radio v-model="form.sex" :label="2"></el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="学历"> <el-form-item prop="education" label="学历">
<el-select v-model="form.status" clearable placeholder="请选择学历"> <el-select v-model="form.education" clearable placeholder="请选择学历">
<el-option v-for="(item, i) in edus" :key="i" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item, i) in educations" :key="i" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="学位"> <el-form-item prop="academicDegree" label="学位">
<el-input v-model.trim="form.email" placeholder="请输入学位"></el-input> <el-input v-model.trim="form.academicDegree" placeholder="请输入学位"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="职称"> <el-form-item prop="title" label="职称">
<el-input v-model.trim="form.email" placeholder="请输入职称"></el-input> <el-input v-model.trim="form.title" placeholder="请输入职称"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="职务"> <el-form-item prop="post" label="职务">
<el-input v-model.trim="form.email" placeholder="请输入职务"></el-input> <el-input v-model.trim="form.post" placeholder="请输入职务"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="毕业院校"> <el-form-item prop="universityFrom" label="毕业院校">
<el-input v-model.trim="form.email" placeholder="请输入毕业院校"></el-input> <el-input v-model.trim="form.universityFrom" placeholder="请输入毕业院校"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="学术专长"> <el-form-item prop="academicSpecialties" label="学术专长">
<el-input v-model.trim="form.email" placeholder="请输入学术专长"></el-input> <el-input v-model.trim="form.academicSpecialties" placeholder="请输入学术专长"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="现所在单位"> <el-form-item prop="currentUnit" label="现所在单位">
<el-input v-model.trim="form.email" placeholder="请输入现所在单位"></el-input> <el-input v-model.trim="form.currentUnit" placeholder="请输入现所在单位"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btns"> <div class="btns">
<el-button @click="expertVisible = false">取消</el-button> <el-button @click="expertVisible = false">取消</el-button>
<el-button v-if="!isDetail" type="primary" @click="submitStaff">保存</el-button> <el-button v-if="!isDetail" type="primary" @click="submitExpert">保存</el-button>
</div> </div>
</el-drawer> </el-drawer>
@ -97,6 +97,7 @@
<script> <script>
import Util from '@/libs/util' import Util from '@/libs/util'
import Setting from '@/setting' import Setting from '@/setting'
// import clipboard from '@/libs/clipboard'
export default { export default {
data () { data () {
const phonePass = (rule, value, callback) => { const phonePass = (rule, value, callback) => {
@ -109,7 +110,7 @@ export default {
callback(new Error('请输入正确手机号格式')) callback(new Error('请输入正确手机号格式'))
} }
} else { } else {
callback() callback(new Error('请输入手机号'))
} }
} }
const emailPass = (rule, value, callback) => { const emailPass = (rule, value, callback) => {
@ -128,19 +129,26 @@ export default {
return { return {
isDetail: false, isDetail: false,
keyWord: '', keyWord: '',
edus: [],
form: { form: {
accountId: '', accountId: '',
userName: '', userName: '',
phone: '', phone: '',
roleList: [],
uniqueIdentification: '', uniqueIdentification: '',
workNumber: '', academicDegree: '',
email: '', email: '',
account: '', academicSpecialties: '',
staffArchitectureId: [] currentUnit: '',
education: '',
nickname: '',
title: '',
post: '',
universityFrom: '',
sex: 1,
}, },
rules: { rules: {
userName: [
{ required: true, message: '请输入姓名', trigger: "blur" }
],
phone: [ phone: [
{ required: true, validator: phonePass, trigger: 'blur' } { required: true, validator: phonePass, trigger: 'blur' }
], ],
@ -148,6 +156,36 @@ export default {
{ validator: emailPass, trigger: 'blur' } { validator: emailPass, trigger: 'blur' }
] ]
}, },
educations: [
{
id: 1,
name: '初中及以下'
},
{
id: 2,
name: '高中'
},
{
id: 3,
name: '中专/中技'
},
{
id: 4,
name: '大专'
},
{
id: 5,
name: '本科'
},
{
id: 6,
name: '硕士'
},
{
id: 7,
name: '博士'
},
],
list: [], list: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
@ -157,7 +195,7 @@ export default {
expertVisible: false, expertVisible: false,
phoneRepeat: false, phoneRepeat: false,
emailRepeat: false, emailRepeat: false,
submiting: false // submiting: false,
}; };
}, },
watch: { watch: {
@ -167,19 +205,22 @@ export default {
} }
}, },
mounted () { mounted () {
// this.getRole() this.getList()
}, },
methods: { methods: {
getList () { getList () {
this.$post(this.api.staffList, { this.$post(this.api.expertList, {
type: this.studentType || 1, type: 1,
staffArchitectureId: this.$refs.orgTree.getCurrentKey() || '',
keyWord: this.keyWord, keyWord: this.keyWord,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize pageSize: this.pageSize
}).then(res => { }).then(({ page }) => {
this.list = res.page.records const list = page.records
this.total = res.page.total // list.map(e => {
// e.cryptoPhone =
// })
this.list = list
this.total = page.total
}).catch(err => { }) }).catch(err => { })
}, },
// //
@ -196,7 +237,7 @@ export default {
this.getList() this.getList()
}, },
// //
delStaff (row) { del (row) {
this.$confirm("确定要删除吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
@ -208,21 +249,18 @@ export default {
}, },
// //
async resetPassword (row) { async resetPassword (row) {
const newPwd = Setting.initialPassword
await this.$confirm(`重置后的密码为:手机号码后六位,确定要重置吗?`, "提示", { type: "warning" }) await this.$confirm(`重置后的密码为:手机号码后六位,确定要重置吗?`, "提示", { type: "warning" })
await this.$get(`${this.api.resetPwd}?userId=${row.userId}&newPwd=${newPwd}`) await this.$get(this.api.expertResetPassword, {
accountId: row.accountId
})
Util.successMsg('重置成功') Util.successMsg('重置成功')
}, },
async switchOff (val, row) { async switchOff (val, row) {
this.$post(this.api.disabledEventsCompetition, { await this.$get(this.api.updateAccountEnable, {
competitionId: row.id, id: row.accountId,
isOpen: val, isEnable: val,
type: 0 // (01) })
}).then(res => { Util.successMsg(val ? '启用成功' : '禁用成功')
util.successMsg(val == 1 ? '禁用成功' : '启用成功')
}).catch(err => { })
await this.$post(`${this.api.refreshPageNotification}?content=1`)
}, },
// //
add () { add () {
@ -242,10 +280,11 @@ export default {
type: 'warning', type: 'warning',
closeOnClickModal: false, closeOnClickModal: false,
}) })
await this.$post(this.api.paperDel, { const param = []
delete: false, list.forEach(e => {
ids: list.map(e => e.paperId) param.push(`accountIds=${e.accountId}`)
}) })
await this.$post(`${this.api.delStaff}?${param.join('&')}`)
Util.successMsg('删除成功') Util.successMsg('删除成功')
this.multipleSelection = [] this.multipleSelection = []
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
@ -255,94 +294,26 @@ export default {
Util.warningMsg('请选择数据') Util.warningMsg('请选择数据')
} }
}, },
//
copy (e) {
// clipboard(this.link, e, '')
},
// / // /
queryStaff (row, isDetail) { async queryExpert (row, isDetail) {
const archId = []
// id
const handleArchId = (list, ids, parentId = []) => {
list.map(e => {
// id[[1, 2], [3, 4]]idid
if (ids.includes(e.id)) {
archId.push([...parentId, e.id])
} else {
e.children && handleArchId(e.children, ids, [...parentId, e.id])
}
})
}
this.isDetail = isDetail this.isDetail = isDetail
this.expertVisible = true this.expertVisible = true
this.$get(`${this.api.staffDetail}?accountId=${row.accountId}`).then(res => { const { data } = await this.$get(`${this.api.expertDetail}?accountId=${row.accountId}`)
const { data } = res
const { staffArchitectureId, roleId } = data
if (roleId) {
const roleList = roleId.split(',').map(e => Number(e))
const list = this.roleList
if (roleList.length) {
let has = false //
for (const i in roleList) {
if (list.find(n => n.id === roleList[i])) {
has = true
break
}
}
if (!has) {
Util.warningMsg('角色被删请重新选择')
data.roleList = []
} else {
data.roleList = roleList
}
}
}
if (staffArchitectureId) {
handleArchId(this.orgList, staffArchitectureId.split(',').map(e => Number(e)))
data.staffArchitectureId = archId
}
this.form = data this.form = data
this.originAccount = data.account
this.originWorkNumber = data.workNumber
}).catch(res => { })
},
//
phoneChange () {
const form = this.form
const { phone } = form
if (phone) {
const { accountId } = form
this.$post(`${this.api.checkEmailOrPhone}?phone=${phone}${accountId ? `&accountId=${accountId}` : ''}`).then(res => {
this.phoneRepeat = false
}).catch(err => {
this.phoneRepeat = true
})
}
},
//
emailChange () {
const form = this.form
const { email } = form
if (email) {
const { accountId } = form
this.$post(`${this.api.checkEmailOrPhone}?email=${email}${accountId ? `&accountId=${accountId}` : ''}`).then(res => {
this.emailRepeat = false
}).catch(err => {
this.emailRepeat = true
})
}
}, },
// / //
submitStaff () { submitExpert () {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.submiting) return false if (this.submiting) return false
if (this.accountReapeat) return Util.warningMsg("该账号已存在")
if (this.workNumberReapeat) return Util.warningMsg("该工号已存在")
if (this.phoneRepeat) return Util.warningMsg("该手机号已存在")
if (this.emailRepeat) return Util.warningMsg("该邮箱已存在")
this.submiting = true this.submiting = true
const form = JSON.parse(JSON.stringify(this.form)) const form = JSON.parse(JSON.stringify(this.form))
const ids = form.staffArchitectureId
if (ids) form.staffArchitectureId = ids.map(e => e[e.length - 1])
if (form.accountId) { if (form.accountId) {
this.$post(this.api.modifyStaff, form).then(res => { this.$post(this.api.modifyExpert, form).then(res => {
Util.successMsg("编辑成功!") Util.successMsg("编辑成功!")
this.expertVisible = false this.expertVisible = false
setTimeout(() => { setTimeout(() => {
@ -355,7 +326,7 @@ export default {
}) })
} else { } else {
form.uniqueIdentification = new Date().getTime() form.uniqueIdentification = new Date().getTime()
this.$post(this.api.saveStaff, form).then(res => { this.$post(this.api.addNewExperts, form).then(res => {
Util.successMsg("新增成功!") Util.successMsg("新增成功!")
this.expertVisible = false this.expertVisible = false
setTimeout(() => { setTimeout(() => {
@ -370,18 +341,23 @@ export default {
} }
}) })
}, },
// //
closeStaff () { closeExpert () {
this.form = { this.form = {
accountId: '', accountId: '',
userName: '', userName: '',
account: '',
phone: '', phone: '',
uniqueIdentification: '', uniqueIdentification: '',
workNumber: '', academicDegree: '',
email: '', email: '',
staffArchitectureId: [], academicSpecialties: '',
roleList: [] currentUnit: '',
education: '',
nickname: '',
title: '',
post: '',
universityFrom: '',
sex: 1,
} }
this.isDetail = false this.isDetail = false
this.getList() this.getList()
@ -393,7 +369,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.expert-dia { /deep/.expert-dia {
.overflow { .overflow {
max-height: calc(100vh - 100px); max-height: calc(100vh - 137px);
padding-right: 40px; padding-right: 40px;
overflow: auto; overflow: auto;
} }

@ -63,16 +63,18 @@
<el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag> <el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag>
<div class="stem html-parse" :id="'stem' + ques.id" v-html="ques.stem"></div> <div class="stem html-parse" :id="'stem' + ques.id" v-html="ques.stem"></div>
<p>{{ ques.questionScore }}</p> <p v-if="!ques.notScored">{{ ques.questionScore }}</p>
</div> </div>
<div <div
v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList" v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList"
class="m-b-10"> class="m-b-10">
<div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt"> <div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt">
<template v-if="!ques.notScored">
<img v-if="opt.optCorrect === 1" src="@/assets/images/right.svg" alt="" class="icon"> <img v-if="opt.optCorrect === 1" src="@/assets/images/right.svg" alt="" class="icon">
<img v-else-if="!opt.optCorrect" src="@/assets/images/wrong.svg" alt="" class="icon"> <img v-else-if="!opt.optCorrect" src="@/assets/images/wrong.svg" alt="" class="icon">
<span v-else class="icon not-ans"></span> <span v-else class="icon not-ans"></span>
</template>
<span>{{ numToLetter(j) }}.&nbsp;</span> <span>{{ numToLetter(j) }}.&nbsp;</span>
<div class="text html-parse" v-html="opt.optionText"></div> <div class="text html-parse" v-html="opt.optionText"></div>
@ -115,8 +117,9 @@
</div> </div>
<div class="line"> <div class="line">
<span class="line-label">考生答案</span> <span class="line-label">考生答案</span>
<div v-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div> <p v-if="!ques.richTextStatus">无需作答</p>
<div v-else>未作答</div> <div v-else-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div>
<p v-else>未作答</p>
</div> </div>
<div v-if="ques.allowAttachment" class="line"> <div v-if="ques.allowAttachment" class="line">
<span class="line-label">考生上传附件</span> <span class="line-label">考生上传附件</span>
@ -137,7 +140,8 @@
<div v-else-if="ques.userAnswerFill" class="fill-answers"> <div v-else-if="ques.userAnswerFill" class="fill-answers">
<p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer"> <p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer">
填空{{ j + 1 }}{{ ans.studentAnswer || '未作答' }} 填空{{ j + 1 }}{{ ans.studentAnswer || '未作答' }}
<img :src="require('@/assets/images/' + (ans.correct ? 'right' : 'wrong') + '.svg')" alt="" <img v-if="!ques.notScored"
:src="require('@/assets/images/' + (ans.correct ? 'right' : 'wrong') + '.svg')" alt=""
class="icon" @click="fillAnswerSwitch(ans, j, ques)"> class="icon" @click="fillAnswerSwitch(ans, j, ques)">
</p> </p>
</div> </div>
@ -483,6 +487,7 @@ export default {
this.$set(ques, 'commentSetTime', res.commentSetTime) this.$set(ques, 'commentSetTime', res.commentSetTime)
this.$set(ques, 'comments', ques.newComments) this.$set(ques, 'comments', ques.newComments)
Util.successMsg('保存成功') Util.successMsg('保存成功')
document.querySelector('#middle').click()
}, },
// //
async delComment (ques) { async delComment (ques) {
@ -504,7 +509,7 @@ export default {
const { paper } = this const { paper } = this
let invalid = 0 let invalid = 0
for (const e of paper) { for (const e of paper) {
if (e.userAnswerList.some(n => n.originUserScore !== n.reviewScore)) { if (e.userAnswerList.some(n => !n.notScored && n.originUserScore !== n.reviewScore)) {
invalid = 1 invalid = 1
break break
} }

Loading…
Cancel
Save