评阅中心

dev_review
yujialong 2 months ago
parent dabd2f9871
commit bf8f4093f6
  1. 11
      src/components/Sidebar.vue
  2. 4
      src/router/index.js
  3. 2
      src/setting.js
  4. 38
      src/views/review/index.vue
  5. 264
      src/views/system/staff.vue
  6. 7
      src/views/theoryExam/index.vue

@ -89,7 +89,7 @@ export default {
title: '系统配置' title: '系统配置'
}, },
{ {
icon: 'el-icon-s-check', icon: 'el-icon-box',
index: '/parner', index: '/parner',
title: '合伙管理' title: '合伙管理'
}, },
@ -99,15 +99,20 @@ export default {
title: '合伙运营' title: '合伙运营'
}, },
{ {
icon: 'el-icon-s-shop', icon: 'el-icon-shopping-cart-2',
index: '/shop', index: '/shop',
title: '商城管理' title: '商城管理'
}, },
{ {
icon: 'el-icon-s-shop', icon: 'el-icon-data-board',
index: '/theoryExam', index: '/theoryExam',
title: '考试平台' title: '考试平台'
}, },
{
icon: 'el-icon-document-copy',
index: '/review',
title: '评阅平台'
},
], ],
menus: [], menus: [],
onRoutes: this.$route.path onRoutes: this.$route.path

@ -219,6 +219,10 @@ let router = new Router({
path: '/theoryExam', path: '/theoryExam',
component: () => import('../views/theoryExam'), component: () => import('../views/theoryExam'),
}, },
{
path: '/review',
component: () => import('../views/review'),
},
{ {
path: '/404', path: '/404',
component: () => import('../views/404.vue'), component: () => import('../views/404.vue'),

@ -51,7 +51,7 @@ const Setting = {
isDev, isDev,
isPro, isPro,
// 是否使用动态路由 // 是否使用动态路由
dynamicRoute: true, dynamicRoute: false,
/** /**
* @description 默认密码 * @description 默认密码
*/ */

@ -0,0 +1,38 @@
<template>
<div>
<iframe :src="url" frameborder="0" width="100%"></iframe>
</div>
</template>
<script>
import Setting from '@/setting'
export default {
data () {
return {
url: ''
};
},
mounted () {
const cache = localStorage.getItem('reviewPath') // localStorage
let url = `${location.origin}/examination/`
if (Setting.isDev) url = `http://192.168.31.125:8099/`
if (cache) {
url += `#${cache}${cache.includes('?') ? `&` : '?'}token=${sessionStorage.getItem('token')}`
} else {
url += `#/myReview/list?token=${sessionStorage.getItem('token')}`
}
url += `&v=${Date.now()}`
localStorage.setItem('review_token', sessionStorage.getItem('token'))
this.url = url
},
methods: {
}
};
</script>
<style lang="scss" scoped>
iframe {
height: calc(100vh - 167px);
}
</style>

@ -4,8 +4,7 @@
<div class="side"> <div class="side">
<div class="m-b-20"> <div class="m-b-20">
<h6 class="p-title">后台员工账号</h6> <h6 class="p-title">后台员工账号</h6>
<el-radio-group v-model="studentType" <el-radio-group v-model="studentType" @change="changeType">
@change="changeType">
<div class="m-b-20"> <div class="m-b-20">
<el-radio :label="1">所有员工</el-radio> <el-radio :label="1">所有员工</el-radio>
</div> </div>
@ -17,39 +16,24 @@
<el-divider></el-divider> <el-divider></el-divider>
<div> <div>
<div class="flex-between"> <div class="flex-between">
<h6 class="p-title" <h6 class="p-title" style="margin-bottom: 0">组织架构</h6>
style="margin-bottom: 0">组织架构</h6> <el-button type="text" @click="addOrg" v-auth="'/system:后台账号:新增部门'">添加</el-button>
<el-button type="text"
@click="addOrg"
v-auth="'/system:后台账号:新增部门'">添加</el-button>
</div> </div>
<div style="overflow: auto"> <div style="overflow: auto">
<el-tree :data="orgList" <el-tree :data="orgList" default-expand-all ref="orgTree" node-key="id" highlight-current
default-expand-all :expand-on-click-node="false" @node-click="handleNodeClick"
ref="orgTree" :props="{ children: 'children', label: 'organizationName', isLeaf: 'leaf' }">
node-key="id" <span class="custom-tree-node" slot-scope="{ node, data }">
highlight-current
:expand-on-click-node="false"
@node-click="handleNodeClick"
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span> <span class="org-name">{{ node.label }}</span>
<span> <span>
<el-button v-auth="'/system:后台账号:新增部门'" <el-button v-auth="'/system:后台账号:新增部门'" type="text" icon="el-icon-circle-plus-outline"
type="text"
icon="el-icon-circle-plus-outline"
@click="() => addOrg(node, data)"> @click="() => addOrg(node, data)">
</el-button> </el-button>
<el-button v-auth="'/system:后台账号:编辑部门'" <el-button v-auth="'/system:后台账号:编辑部门'" type="text" icon="el-icon-edit-outline"
type="text"
icon="el-icon-edit-outline"
@click="() => editOrg(node, data)"> @click="() => editOrg(node, data)">
</el-button> </el-button>
<el-button v-auth="'/system:后台账号:删除部门'" <el-button v-auth="'/system:后台账号:删除部门'" type="text" icon="el-icon-delete"
type="text"
icon="el-icon-delete"
@click="() => delOrg(node, data)"> @click="() => delOrg(node, data)">
</el-button> </el-button>
</span> </span>
@ -58,36 +42,22 @@
</div> </div>
</div> </div>
<el-dialog :title="orgForm.id ? '编辑' : '新增' + '部门'" <el-dialog :title="orgForm.id ? '编辑' : '新增' + '部门'" :visible.sync="orgVisible" :close-on-click-modal="false"
:visible.sync="orgVisible"
:close-on-click-modal="false"
width="50%"> width="50%">
<el-form v-if="orgVisible" <el-form v-if="orgVisible" ref="orgForm" :model="orgForm" :rules="orgRules" label-width="100px">
ref="orgForm" <el-form-item label="部门名称" prop="organizationName">
:model="orgForm" <el-input v-model.trim="orgForm.organizationName" placeholder="请输入"></el-input>
:rules="orgRules"
label-width="100px">
<el-form-item label="部门名称"
prop="organizationName">
<el-input v-model.trim="orgForm.organizationName"
placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上级部门"> <el-form-item label="上级部门">
<span v-if="orgForm.parentName">{{ orgForm.parentName }}</span> <span v-if="orgForm.parentName">{{ orgForm.parentName }}</span>
<el-cascader v-else <el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable
:options="orgListDia"
v-model="cascaderValue"
:props="cascaderProps"
clearable
style="width: 100%"> style="width: 100%">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="closeOrg"> </el-button> <el-button @click="closeOrg"> </el-button>
<el-button type="primary" <el-button type="primary" @click="orgSubmit"> </el-button>
@click="orgSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -97,195 +67,96 @@
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input style="width: 250px;" <el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord"
placeholder="请输入员工姓名/手机号"
prefix-icon="el-icon-search"
v-model="keyWord"
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" <el-button type="primary" @click="addStaff" v-auth="'/system:后台账号:新增员工'">新增员工</el-button>
@click="addStaff" <el-button type="primary" @click="batchImport" v-auth="'/system:后台账号:批量导入'">批量导入</el-button>
v-auth="'/system:后台账号:新增员工'">新增员工</el-button>
<el-button type="primary"
@click="batchImport"
v-auth="'/system:后台账号:批量导入'">批量导入</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" <el-table :data="listData" class="table" ref="table" stripe header-align="center"
class="table" @selection-change="handleSelectionChange" row-key="accountId">
ref="table" <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
stripe <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
header-align="center" <el-table-column prop="userName" label="员工姓名" align="center" min-width="100"></el-table-column>
@selection-change="handleSelectionChange" <el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column>
row-key="accountId"> <el-table-column prop="phone" label="手机号" align="center" width="120"></el-table-column>
<el-table-column type="selection" <el-table-column prop="staffArchitectureName" label="所在部门" align="center" min-width="200"
width="55"
align="center"
:reserve-selection="true"></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="account"
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="staffArchitectureName"
label="所在部门"
align="center"
min-width="200"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="roleName" <el-table-column prop="roleName" label="授权角色" align="center" min-width="200"
label="授权角色"
align="center"
min-width="200"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="lastLoginTime" <el-table-column prop="lastLoginTime" label="最后登录时间" align="center" width="130"></el-table-column>
label="最后登录时间" <el-table-column label="操作" align="center" width="300">
align="center"
width="130"></el-table-column>
<el-table-column label="操作"
align="center"
width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" v-auth="'/system:后台账号:查看'" @click="queryStaff(scope.row, true)">查看</el-button>
v-auth="'/system:后台账号:查看'" <el-button type="text" v-auth="'/system:后台账号:编辑'" @click="queryStaff(scope.row, false)">编辑</el-button>
@click="queryStaff(scope.row,true)">查看</el-button> <el-button type="text" v-auth="'/system:后台账号:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button type="text" <el-button type="text" v-auth="'/system:后台账号:删除'" @click="delStaff(scope.row)">删除</el-button>
v-auth="'/system:后台账号:编辑'"
@click="queryStaff(scope.row,false)">编辑</el-button>
<el-button type="text"
v-auth="'/system:后台账号:重置密码'"
@click="resetPassword(scope.row)">重置密码</el-button>
<el-button type="text"
v-auth="'/system:后台账号:删除'"
@click="delStaff(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination> :total="total"></el-pagination>
</div> </div>
<el-dialog :title="isDetail ? '查看' : (form.accountId ? '编辑' : '新增') + '员工'" <el-dialog :title="isDetail ? '查看' : (form.accountId ? '编辑' : '新增') + '员工'" :visible.sync="staffVisible"
:visible.sync="staffVisible" width="580px" class="dialog" :close-on-click-modal="false" @close="closeStaff">
width="580px" <el-form ref="form" :model="form" :rules="rules" label-width="150px" :disabled="isDetail"
class="dialog"
:close-on-click-modal="false"
@close="closeStaff">
<el-form ref="form"
:model="form"
:rules="rules"
label-width="150px"
:disabled="isDetail"
style='margin-right: 80px;'> style='margin-right: 80px;'>
<el-form-item prop="workNumber" <el-form-item prop="workNumber" label="工号">
label="工号"> <el-input v-model.trim="form.workNumber" placeholder="请输入工号"></el-input>
<el-input v-model.trim="form.workNumber"
placeholder="请输入工号"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userName" <el-form-item prop="userName" label="姓名">
label="姓名"> <el-input v-model.trim="form.userName" placeholder="请输入姓名"></el-input>
<el-input v-model.trim="form.userName"
placeholder="请输入姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="account" <el-form-item prop="account" label="账号">
label="账号"> <el-input v-model.trim="form.account" placeholder="请输入账号"></el-input>
<el-input v-model.trim="form.account"
placeholder="请输入账号"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="roleList" <el-form-item prop="roleList" label="授权角色">
label="授权角色"> <el-select class="w-100" v-model="form.roleList" multiple>
<el-select class="w-100"
v-model="form.roleList"
multiple>
<template v-for="item in roleList"> <template v-for="item in roleList">
<!-- 不显示超管 --> <!-- 不显示超管 -->
<el-option v-if="item.roleName !== '超级管理员'" <el-option v-if="item.roleName !== '超级管理员'" :key="item.id" :label="item.roleName" :value="item.id">
:key="item.id"
:label="item.roleName"
:value="item.id">
</el-option> </el-option>
</template> </template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所在部门"> <el-form-item label="所在部门">
<el-cascader class="w-100" <el-cascader class="w-100" v-model="form.staffArchitectureId" :options="orgList"
v-model="form.staffArchitectureId"
:options="orgList"
:props="casProps"></el-cascader> :props="casProps"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item prop="phone" <el-form-item prop="phone" label="手机号">
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="email" <el-form-item prop="email" label="邮箱">
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> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer" v-if="!isDetail">
class="dialog-footer"
v-if="!isDetail">
<el-button @click="staffVisible = false">取消</el-button> <el-button @click="staffVisible = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="submitStaff">确定</el-button>
@click="submitStaff">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="批量导入" <el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false">
:visible.sync="importVisible"
width="24%"
:close-on-click-modal="false">
<div style="text-align: center"> <div style="text-align: center">
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<el-button type="primary" <el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
@click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div> </div>
<el-upload ref="importStaff" <el-upload ref="importStaff" name="file" accept=".xls,.xlsx" :on-remove="handleRemove" :on-error="uploadError"
name="file" :on-success="uploadSuccess" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed"
accept=".xls,.xlsx" :action="this.api.importStaff" :file-list="uploadList" :headers="headers">
:on-remove="handleRemove" <el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
:on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.importStaff"
:file-list="uploadList"
:headers="headers">
<el-button type="primary"
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload> </el-upload>
<el-link v-if="uploadFaild" <el-link v-if="uploadFaild" type="primary" @click="showFaild">部分数据导入失败查看失败原因</el-link>
type="primary"
@click="showFaild">部分数据导入失败查看失败原因</el-link>
</div> </div>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer"> <el-button size="small" @click="importVisible = false"> </el-button>
<el-button size="small" <el-button size="small" type="primary" @click="uploadSure"> </el-button>
@click="importVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="uploadSure"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -870,22 +741,27 @@ export default {
.m-b-20 { .m-b-20 {
margin-bottom: 20px; margin-bottom: 20px;
} }
.org-name { .org-name {
margin-right: 20px; margin-right: 20px;
} }
.w-100 { .w-100 {
width: 100%; width: 100%;
} }
.wrap { .wrap {
display: flex; display: flex;
min-height: 100%; min-height: 100%;
padding: 0 24px; padding: 0 24px;
.side { .side {
width: 300px; width: 300px;
padding: 24px 10px 24px 0; padding: 24px 10px 24px 0;
margin-right: 24px; margin-right: 24px;
border-right: 1px solid rgba(0, 0, 0, 0.06); border-right: 1px solid rgba(0, 0, 0, 0.06);
} }
.right { .right {
width: calc(100% - 374px); width: calc(100% - 374px);
padding: 24px 0; padding: 24px 0;

@ -16,12 +16,7 @@ export default {
mounted () { mounted () {
const cache = localStorage.getItem('examPath') // localStorage const cache = localStorage.getItem('examPath') // localStorage
let url = `${location.origin}/examination/` let url = `${location.origin}/examination/`
if (Setting.isDev) { if (Setting.isDev) url = `http://192.168.31.125:8098/`
url = `http://192.168.31.125:8098/`
} else if (Setting.isPro) {
const { host } = location
url = `https://${host === 'dev.huorantech.cn' ? host : 'www.huorantech.cn'}/examination/`
}
if (cache) { if (cache) {
url += `#${cache}${cache.includes('?') ? `&` : '?'}token=${sessionStorage.getItem('token')}` url += `#${cache}${cache.includes('?') ? `&` : '?'}token=${sessionStorage.getItem('token')}`
} else { } else {

Loading…
Cancel
Save