yujialong 4 years ago
parent 7581d38bd1
commit 44077cee02
  1. 10
      src/api/index.js
  2. 2
      src/pages/account/login/index.vue
  3. 109
      src/pages/client/add/index.vue
  4. 168
      src/pages/client/list/index.vue
  5. 33
      src/pages/exception/error/403/index.vue
  6. 33
      src/pages/exception/error/404/index.vue
  7. 2
      src/pages/quesBank/list/globalQuesBank.vue
  8. 217
      src/pages/quesBank/list/myQuesBank.vue
  9. 13
      src/pages/quesBank/list/quesDialog.vue
  10. 4
      src/pages/user/list/index.vue
  11. 2
      src/plugins/requests/index.js
  12. 12
      src/router/permission.js

@ -42,8 +42,8 @@ export default {
getStaff: `management/staff/getStaff`, getStaff: `management/staff/getStaff`,
queryStaff: `management/staff/enterpriseList`, queryStaff: `management/staff/enterpriseList`,
updateStaff: `management/staff/updateStaff`, updateStaff: `management/staff/updateStaff`,
exportFailureStaff: `management/staff/exportFailure`, exportFailureStaff: `${Setting.apiBaseURL}/management/staff/exportFailure`,
uploadFileStaff: `management/staff/uploadFile`, uploadFileStaff: `${Setting.apiBaseURL}/management/staff/uploadFile`,
downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`, downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`,
// 角色管理 // 角色管理
@ -70,8 +70,8 @@ export default {
deleteUser: `cjEnterprise/user/deleteUser`, deleteUser: `cjEnterprise/user/deleteUser`,
queryUser: `cjEnterprise/user/list`, queryUser: `cjEnterprise/user/list`,
updateUser: `cjEnterprise/user/updateUser`, updateUser: `cjEnterprise/user/updateUser`,
uploadFileUser: `cjEnterprise/user/uploadFile`, uploadFileUser: `${Setting.apiBaseURL}/cjEnterprise/user/uploadFile`,
exportFailureUser: `cjEnterprise/user/exportFailure`, exportFailureUser: `${Setting.apiBaseURL}/cjEnterprise/user/exportFailure`,
downloadUserTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658619702.xlsx', downloadUserTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658619702.xlsx',
// 题库分类 // 题库分类
@ -92,7 +92,7 @@ export default {
pageByCondition:`cjEnterprise/questions/pageByCondition`, pageByCondition:`cjEnterprise/questions/pageByCondition`,
updateQuestions:`cjEnterprise/questions/update`, updateQuestions:`cjEnterprise/questions/update`,
getExcel:`cjEnterprise/questions/getExcel`, getExcel:`cjEnterprise/questions/getExcel`,
impExcel:`cjEnterprise/questions/impExcel`, impExcel:`${Setting.apiBaseURL}/cjEnterprise/questions/impExcel`,
// 共享相关 // 共享相关
batchSave:`cjEnterprise/questionSharing/batchSave`, batchSave:`cjEnterprise/questionSharing/batchSave`,

@ -92,7 +92,7 @@ export default {
password: this.loginForm.password password: this.loginForm.password
} }
this.login(data).then(() => { this.login(data).then(() => {
let redirect = decodeURIComponent(this.$route.query.redirect || '/') let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : '/index'
this.$router.replace(redirect) this.$router.replace(redirect)
}).catch(() => {}) }).catch(() => {})
} }

@ -1,70 +1,65 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div class="flex j-between a-center">
<el-card shadow="hover" class="m-b-20"> <div class="per_title" v-throttle @click="goback()">
<div class="flex j-between a-center"> <i class="el-icon-arrow-left"></i>
<div class="per_title" v-throttle @click="goback()"> <span class="per_back">返回</span>
<i class="el-icon-arrow-left"></i> <span class="per_school" v-text="isDetail ? '查看用户' : (id != '' ? '编辑客户' : '新增客户')"></span>
<span class="per_back">返回</span> </div>
<span class="per_school" v-text="isDetail ? '查看用户' : (id != '' ? '编辑客户' : '新增客户')"></span> <el-button type="primary" size="small" round class="mag" v-if="!isDetail" v-throttle @click="saveAdd">确定</el-button>
</div> </div>
<el-button type="primary" size="small" round class="mag" v-if="!isDetail" v-throttle @click="saveAdd">确定</el-button> </el-card>
</div>
</el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<div> <div>
<div class="p-title m-b-20">基本信息</div> <div class="p-title m-b-20">基本信息</div>
<div> <div>
<el-form :model="form" :rules="rules" ref="form" label-width="100px" class="flex j-center" :disabled="isDetail"> <el-form :model="form" :rules="rules" ref="form" label-width="100px" class="flex j-center" :disabled="isDetail">
<el-col :span="6" style="margin-right: 60px;"> <el-col :span="6" style="margin-right: 60px;">
<el-form-item prop="countries" label="国家"> <el-form-item prop="countries" label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家"> <el-select v-model="form.countries" clearable placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="provinceId" label="省份"> <el-form-item prop="provinceId" label="省份">
<el-select v-model="form.provinceId" placeholder="" @change="getCity()" @clear="clearprovince()"> <el-select v-model="form.provinceId" placeholder="" @change="getCity()" @clear="clearprovince()">
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> <el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="clientName" label="客户名称"> <el-form-item prop="clientName" label="客户名称">
<el-input placeholder="请输入客户名称" v-model="form.clientName" @change="nameChange"></el-input> <el-input placeholder="请输入客户名称" v-model="form.clientName" @change="nameChange"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="phone" label="手机号"> <el-form-item prop="phone" label="手机号">
<el-input placeholder="请输入手机号" v-model="form.phone" maxlength="11"></el-input> <el-input placeholder="请输入手机号" v-model="form.phone" maxlength="11"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" style="margin-left: 60px;"> <el-col :span="6" style="margin-left: 60px;">
<el-form-item prop="type" label="客户类型"> <el-form-item prop="type" label="客户类型">
<el-select v-model="form.type" placeholder=""> <el-select v-model="form.type" placeholder="">
<el-option v-for="(item,index) in clientTypeList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item,index) in clientTypeList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="cityId" label="城市"> <el-form-item prop="cityId" label="城市">
<el-select v-model="form.cityId" :disabled="form.provinceId ? false : true" placeholder=""> <el-select v-model="form.cityId" :disabled="form.provinceId ? false : true" placeholder="">
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> <el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="contactPersonName" label="管理员姓名"> <el-form-item prop="contactPersonName" label="管理员姓名">
<el-input placeholder="请输入管理员姓名" v-model="form.contactPersonName"></el-input> <el-input placeholder="请输入管理员姓名" v-model="form.contactPersonName"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
</div> </div>
</template> </template>

@ -1,95 +1,89 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div>
<el-card shadow="hover" class="m-b-20"> <div class="p-title m-b-20">筛选</div>
<div>
<div class="p-title m-b-20">筛选</div>
<div> <div>
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="国家"> <el-form-item label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家"> <el-select v-model="form.countries" clearable placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="省份"> <el-form-item label="省份">
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity()" @clear="clearprovince()"> <el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity()" @clear="clearprovince()">
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> <el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="城市"> <el-form-item label="城市">
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" @change="getData()"> <el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" @change="getData()">
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> <el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<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>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover">
<el-card shadow="hover"> <div class="flex j-between m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title">客户列表</div>
<div class="p-title">客户列表</div>
<div> <div>
<el-button type="primary" size="small" round @click="addcustomer" v-auth>新增客户</el-button> <el-button type="primary" size="small" round @click="addcustomer" v-auth>新增客户</el-button>
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> <el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="customerData" ref="table" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="customerData" ref="table" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<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="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.$index + (pageNo - 1) * pageSize + 1}} {{scope.$index + (pageNo - 1) * pageSize + 1}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="clientName" label="客户名称" align="center"> <el-table-column prop="clientName" label="客户名称" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="provinceName" label="省份" align="center"> <el-table-column prop="provinceName" label="省份" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="cityName" label="城市" align="center"> <el-table-column prop="cityName" label="城市" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="contactPersonName" label="管理员姓名" align="center"> <el-table-column prop="contactPersonName" label="管理员姓名" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="phone" label="手机号" align="center"> <el-table-column prop="phone" label="手机号" align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> <el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button> <el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> <el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button>
<el-switch <el-switch
v-model="scope.row.isDisable" v-model="scope.row.isDisable"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 10px 0 5px" style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)" @change="switchOff($event,scope.row,scope.$index)"
v-auth="'dashboard:禁用'" v-auth="'dashboard:禁用'"
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo"> <el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
</div> </div>
</template> </template>

@ -1,23 +1,26 @@
<template> <template>
<div class="error-page"> <div class="error-page">
<div class="error-code">4<span>0</span>3</div> <div class="error-code">4<span>0</span>3</div>
<div class="error-desc">啊哦~ 你没有权限访问该页面哦</div> <div class="error-desc">啊哦~ 你没有权限访问该页面哦</div>
<div class="error-handle"> <div class="error-handle">
<router-link to="/"> <router-link to="/">
<el-button type="primary" size="large">返回首页</el-button> <el-button type="primary" size="large" @click="toIndex">返回首页</el-button>
</router-link> </router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button> <el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
methods: { methods: {
goBack(){ toIndex(){
this.$router.go(-1); this.$router.push('/')
} },
} goBack(){
this.$router.go(-1);
}
}
} }
</script> </script>

@ -1,23 +1,26 @@
<template> <template>
<div class="error-page"> <div class="error-page">
<div class="error-code">4<span>0</span>4</div> <div class="error-code">4<span>0</span>4</div>
<div class="error-desc">啊哦~ 你所访问的页面不存在</div> <div class="error-desc">啊哦~ 你所访问的页面不存在</div>
<div class="error-handle"> <div class="error-handle">
<router-link to="/"> <router-link to="/">
<el-button type="primary" size="large">返回首页</el-button> <el-button type="primary" size="large" @click="toIndex">返回首页</el-button>
</router-link> </router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button> <el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
methods: { methods: {
goBack(){ toIndex(){
this.$router.go(-1); this.$router.push('/')
} },
} goBack(){
this.$router.go(-1);
}
}
} }
</script> </script>

@ -23,7 +23,7 @@
</el-form> </el-form>
</div> </div>
<div> <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> </div>
</div> </div>

@ -1,120 +1,114 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div class="p-title m-b-20">测评题库</div>
<el-card shadow="hover" class="m-b-20">
<div class="p-title m-b-20">测评题库</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item class="no-mb" label="试题类型"> <el-form-item class="no-mb" label="试题类型">
<el-select v-model="typeId" clearable placeholder="请选择试题类型" @change="getData"> <el-select v-model="typeId" clearable placeholder="请选择试题类型" @change="getData">
<el-option label="不限" value=""></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div> <div>
<el-input <el-input
placeholder="请输入题干" placeholder="请输入题干/知识点"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="keyword"
clearable clearable
></el-input> ></el-input>
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover" class="m-b-20">
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title">题目列表</div>
<div class="p-title">题目列表</div>
<div> <div>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="addTopics" @click="addTopics"
>单题上传</el-button> >单题上传</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="showimportVisible" @click="showimportVisible"
>批量上传</el-button> >批量上传</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="shareDataBatch" @click="shareDataBatch"
>批量共享</el-button> >批量共享</el-button>
<!-- <el-button <!-- <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="cancelShareBatch" @click="cancelShareBatch"
>取消共享</el-button> --> >取消共享</el-button> -->
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="delAllData" @click="delAllData"
>批量删除</el-button> >批量删除</el-button>
</div> </div>
</div> </div>
<el-table <el-table
:data="listData" :data="listData"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
></el-table-column> ></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="questionStem" :show-overflow-tooltip="true" label="题干" align="center"></el-table-column> <el-table-column prop="questionStem" :show-overflow-tooltip="true" label="题干" align="center"></el-table-column>
<el-table-column prop="name" label="试题类型" width="120" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="120" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column> <el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button> <el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="edit(scope.row)">修改</el-button> <el-button type="text" @click="edit(scope.row)">修改</el-button>
<el-button type="text" @click="delData(scope.row)">删除</el-button> <el-button type="text" @click="delData(scope.row)">删除</el-button>
<el-button v-if="!scope.row.myShare" type="text" @click="share(scope.row)">共享</el-button> <el-button v-if="!scope.row.myShare" type="text" @click="share(scope.row)">共享</el-button>
<el-button v-else type="text" @click="cancelShare(scope.row)">取消共享</el-button> <el-button v-else type="text" @click="cancelShare(scope.row)">取消共享</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page" :current-page="page"
:page-size="pageSize" :page-size="pageSize"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
<ques-dialog ref="quesDialog" :title="topicsTitle" :visible.sync="visible" :isDetail.sync="isDetail" @getData="dialogGetData" @closeTopics="closeTopics"></ques-dialog> <ques-dialog ref="quesDialog" :title="topicsTitle" :visible.sync="visible" :isDetail.sync="isDetail" @getData="dialogGetData" @closeTopics="closeTopics"></ques-dialog>
@ -343,7 +337,6 @@ export default {
} }
}, },
downLoad() { downLoad() {
// location.href = 'http://192.168.31.152:8001/cjEnterprise/questions/getExcel'
location.href = 'http://39.108.250.202/cjEnterprise/题库导入模板.xlsx' location.href = 'http://39.108.250.202/cjEnterprise/题库导入模板.xlsx'
}, },
showimportVisible() { showimportVisible() {

@ -241,9 +241,18 @@ export default {
.catch(err => {}) .catch(err => {})
}, },
getQuesBank() { getQuesBank() {
this.$get(this.api.getTypeByOneLever) let data = {
pageNum: 1,
pageSize: 10000
}
this.$post(this.api.listByPage,data)
.then(res => { .then(res => {
this.quesBankList = res.data.list let list = res.data.list.list
let result = list
list.map((n,i) => {
result = result.concat(n.secondColumn)
})
this.quesBankList = result
}) })
.catch(err => {}) .catch(err => {})
}, },

@ -270,7 +270,7 @@ export default {
let data = { let data = {
userInfo: { userInfo: {
id: form.id, id: form.id,
isPort: 1, isPort: 2,
userId: form.userId, userId: form.userId,
account: form.account, account: form.account,
clientId: form.clientId, clientId: form.clientId,
@ -282,7 +282,7 @@ export default {
}, },
userManagement: { userManagement: {
id: form.id, id: form.id,
isPort: 1, isPort: 2,
userId: form.userId, userId: form.userId,
account: form.account, account: form.account,
clientId: form.clientId, clientId: form.clientId,

@ -6,7 +6,7 @@ import Setting from '@/setting'
const service = axios.create({ const service = axios.create({
baseURL: Setting.apiBaseURL, baseURL: Setting.apiBaseURL,
timeout: 5000 timeout: 50000
}) })
// post请求头 // post请求头

@ -8,10 +8,14 @@ router.beforeEach((to, from, next) => {
document.title = to.meta.title ? `${to.meta.title} | ${Setting.titleSuffix}` : Setting.titleSuffix; document.title = to.meta.title ? `${to.meta.title} | ${Setting.titleSuffix}` : Setting.titleSuffix;
const role = util.session.get(Setting.usernameKey); const role = util.session.get(Setting.usernameKey);
if (!role && to.path !== '/login') { if (!role && to.path !== '/login') {
next({ if(to.fullPath == '/'){
path: '/login', next('/login')
query: {redirect: to.fullPath} }else{
}) next({
path: '/login',
query: {redirect: to.fullPath}
})
}
} else if(role && to.path == '/login') { } else if(role && to.path == '/login') {
next('/index') next('/index')
} else { } else {

Loading…
Cancel
Save