master
yujialong 4 years ago
parent 966ef94076
commit bf2a27398b
  1. 6
      src/libs/util.js
  2. 36
      src/pages/client/list/index.vue
  3. 75
      src/pages/quesBank/list/globalQuesBank.vue
  4. 97
      src/pages/quesBank/list/myQuesBank.vue
  5. 20
      src/pages/quesBank/list/quesBankType.vue
  6. 11
      src/pages/quesBank/list/quesDialog.vue
  7. 5
      src/pages/system/list/organization.vue
  8. 13
      src/pages/system/list/role.vue
  9. 38
      src/pages/system/list/staff.vue
  10. 74
      src/pages/user/list/index.vue
  11. 2
      src/plugins/auth/index.js
  12. 4
      src/setting.js
  13. 1
      src/store/modules/user.js
  14. 22
      src/styles/common.scss

@ -106,15 +106,15 @@ const util = {
},
// 成功提示
successMsg(message) {
Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500})
Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000})
},
// 警告提示
warningMsg(message) {
Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500})
Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000})
},
// 错误提示
errorMsg(message) {
Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500})
Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000})
},
// 给超过给定长度的字符串加省略号
ellipsisStr(str) {

@ -20,7 +20,7 @@
</li>
<li>
<label>城市</label>
<el-select v-model="form.city" clearable placeholder="请选择城市" size="small" :disabled="form.provinces ? false : true" @change="initData()">
<el-select v-model="form.city" clearable placeholder="请选择城市" size="small" :disabled="form.provinces ? false : true" @change="initData">
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</li>
@ -35,11 +35,11 @@
</div>
</div>
<el-table :data="customerData" ref="table" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table :data="listData" ref="table" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
{{scope.$index + (pageNo - 1) * pageSize + 1}}
{{scope.$index + (page - 1) * pageSize + 1}}
</template>
</el-table-column>
<el-table-column prop="clientName" label="客户院校名称" align="center">
@ -57,13 +57,12 @@
<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="handleDelete(scope.row)" v-auth>删除</el-button>
<el-switch v-model="scope.row.isDisable" :active-value="0" :inactive-value="1" style="margin: 0 10px 0 5px" @change="switchOff($event,scope.row,scope.$index)" v-auth="'/index/list:禁用'"></el-switch>
<el-switch v-model="scope.row.isDisable" :active-value="0" :inactive-value="1" style="margin: 0 10px 0 5px" :active-text="scope.row.isDisable ? '关' : '开'" @change="switchOff($event,scope.row,scope.$index)" v-auth="'/index/list:禁用'"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo">
</el-pagination>
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div>
</div>
</div>
@ -81,7 +80,7 @@ export default {
countryList: [{
name:'中国'
}],
customerData: [],
listData: [],
keyword: '',
form: {
countries:'中国',
@ -91,9 +90,9 @@ export default {
multipleSelection: [],
provinceList: [],
cityList: [],
pageNo: 1,
page: 1,
pageSize: 10,
totals: 1,
total: 1,
ruleIds: [],
searchTimer: null
};
@ -122,13 +121,17 @@ export default {
cityId: this.form.city,
searchContent: this.keyword
}
this.$get(`${this.api.queryClient}/${this.pageNo}/${this.pageSize}`,data).then(res => {
this.customerData = res.data.list.list
this.totals = res.data.list.totalCount
this.$get(`${this.api.queryClient}/${this.page}/${this.pageSize}`,data).then(res => {
this.listData = res.data.list.list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(res => {});
},
initData(){
this.pageNo = 1
this.page = 1
this.getData()
},
getProvince(){
@ -144,7 +147,7 @@ export default {
getCity(){
this.clearprovince()
this.getCityData()
this.pageNo = 1
this.page = 1
this.getData()
},
getCityData(){
@ -216,8 +219,9 @@ export default {
}
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
}
};

@ -4,14 +4,14 @@
<ul class="filter">
<li>
<label>创建人</label>
<el-select v-model="createUser" clearable placeholder="请选择创建人" size="small" @change="getData">
<el-select v-model="createUser" clearable placeholder="请选择创建人" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select>
</li>
<li>
<label>题目类型</label>
<el-select v-model="name" clearable placeholder="请选择题目类型" size="small" @change="getData">
<el-select v-model="name" clearable placeholder="请选择题目类型" size="small" @change="initData">
<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-select>
@ -26,13 +26,17 @@
</div>
</div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange">
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="80" 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="questionStem" :show-overflow-tooltip="true" label="题干" align="center"></el-table-column>
<el-table-column prop="questionStem" :show-overflow-tooltip="true" width="300" label="题干" align="center">
<template slot-scope="scope">
<div class="ellipsis" v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" width="100" 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="所属题库" min-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="createTime" label="共享时间" width="140" align="center"></el-table-column>
@ -73,6 +77,16 @@
<div v-html="topicForm.questionStem"></div>
</div>
</li>
<li v-if="topicForm.typeId == 1 || topicForm.typeId == 2">
<span class="name">选项</span>
<div class="val">
<p class="m-b-5" v-for="(option,i) in topicForm.options" :key="i">{{i}}.{{topicForm.options[i]}}</p>
</div>
</li>
<li v-if="topicForm.typeId != 4" :class="{'a-center': topicForm.typeId == 1 || topicForm.typeId == 2}">
<span class="name">正确答案</span>
<span class="val">{{topicForm.answer}}</span>
</li>
<li>
<span class="name">答案解析</span>
<span class="val">{{topicForm.answerAnalysis}}</span>
@ -123,7 +137,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -137,11 +151,23 @@ export default {
name: this.name
})
.then(res => {
this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
let list = util.removeHtmlTag(res.data.list.list,'questionStem')
list.map(n => {
n.questionStem = n.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
})
this.listData = list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
})
.catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getType() {
this.$get(this.api.typesList)
.then(res => {
@ -151,6 +177,7 @@ export default {
},
handleCurrentChange(val) {
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
handleSelectionChange(val) {
@ -180,7 +207,6 @@ export default {
})
.then(() => {
this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=1&ids=${delList.join()}`).then(res => {
this.multipleSelection = [];
util.successMsg('取消共享成功')
this.getData()
this.$refs.table.clearSelection()
@ -205,7 +231,8 @@ export default {
pageNum: 1,
pageSize: 10000,
schoolId: this.clientId,
source: 1
source: 1,
keyword: ''
}
this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list
@ -220,6 +247,29 @@ export default {
getDetail(id) {
this.$post(`${this.api.findById}?id=${id}`).then(res => {
let list = res.data.list
let typeName = res.data.typeName
let options = {}
if(typeName == '填空题'){
let answer = []
for(let i in list){
if(i.includes('option') && list[i]) answer.push(list[i])
}
list.answer = answer.join(',')
list.questionStem = list.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
}else if(typeName == '判断题'){
if(list.answer == 'A'){
list.answer = '正确'
}else{
list.answer = '错误'
}
}else if(typeName != '简答题'){
for(let i in list){
if(i.includes('option') && list[i]){
options[i.replace('option','')] = list[i]
}
}
}
this.topicForm = {
id: list.id,
userId: list.userId,
@ -229,7 +279,7 @@ export default {
courses: list.courses,
knowledgePoints: list.knowledgePoints,
answer: list.answer,
questionType: '',
questionType: typeName,
questionStem: list.questionStem,
optionA: list.optionA,
optionB: list.optionB,
@ -237,6 +287,7 @@ export default {
optionD: list.optionD,
optionE: list.optionE,
optionF: list.optionF,
options,
aisTrue: false,
bisTrue: false,
cisTrue: false,
@ -248,7 +299,6 @@ export default {
answerAnalysis: list.answerAnalysis,
videoAudio: list.videoAudio
}
console.log(this.topicForm,this.quesBankList)
}).catch(err => {})
},
edit(row) {
@ -285,6 +335,9 @@ export default {
max-width: calc(100% - 80px);
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
/deep/img{
max-width: 100%;
}
}
}
}

@ -4,7 +4,7 @@
<ul class="filter">
<li>
<label>题目类型</label>
<el-select v-model="typeId" clearable placeholder="请选择题目类型" size="small" @change="getData">
<el-select v-model="typeId" clearable placeholder="请选择题目类型" size="small" @change="initData">
<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-select>
@ -23,22 +23,20 @@
</div>
<el-table :data="listData" ref="table" row-key="id" class="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="80"
align="center"
:reserve-selection="true"
:selectable="disabledSelection"
></el-table-column>
<el-table-column type="selection" width="80" align="center" :reserve-selection="true" :selectable="disabledSelection"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template
slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
</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" width="300" label="题干" align="center">
<template slot-scope="scope">
<div class="ellipsis" v-html="scope.row.questionStem"></div>
</template>
</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="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" min-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="createTime" label="上传时间" width="140" align="center"></el-table-column>
@ -47,7 +45,7 @@
{{scope.row.myShare ? '已共享' : '未共享'}}
</template>
</el-table-column>
<el-table-column label="操作" width="230">
<el-table-column label="操作" width="230" align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth="'/quesBank/list:我上传的题库:查看'">查看</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth="'/quesBank/list:我上传的题库:修改'">修改</el-button>
@ -86,6 +84,16 @@
<div v-html="topicForm.questionStem"></div>
</div>
</li>
<li v-if="topicForm.typeId == 1 || topicForm.typeId == 2">
<span class="name">选项</span>
<div class="val">
<p class="m-b-5" v-for="(option,i) in topicForm.options" :key="i">{{i}}.{{topicForm.options[i]}}</p>
</div>
</li>
<li v-if="topicForm.typeId != 4" :class="{'a-center': topicForm.typeId == 1 || topicForm.typeId == 2}">
<span class="name">正确答案</span>
<span class="val">{{topicForm.answer}}</span>
</li>
<li>
<span class="name">答案解析</span>
<span class="val">{{topicForm.answerAnalysis}}</span>
@ -104,8 +112,8 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="importVisible = false"> </el-button>
<el-button type="primary" @click="uploadSure"> </el-button>
<el-button size="small" @click="importVisible = false"> </el-button>
<el-button size="small" type="primary" @click="uploadSure"> </el-button>
</span>
</el-dialog>
</div>
@ -155,7 +163,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -169,11 +177,23 @@ export default {
userId: this.userId
})
.then(res => {
this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
let list = util.removeHtmlTag(res.data.list.list,'questionStem')
list.map(n => {
n.questionStem = n.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
})
this.listData = list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
})
.catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getType() {
this.$get(this.api.typesList)
.then(res => {
@ -183,6 +203,7 @@ export default {
},
handleCurrentChange(val) {
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
dialogGetData(){
@ -208,7 +229,8 @@ export default {
pageNum: 1,
pageSize: 10000,
schoolId: this.clientId,
source: 1
source: 1,
keyword: ''
}
this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list
@ -223,6 +245,29 @@ export default {
getDetail(id) {
this.$post(`${this.api.findById}?id=${id}`).then(res => {
let list = res.data.list
let typeName = res.data.typeName
let options = {}
if(typeName == '填空题'){
let answer = []
for(let i in list){
if(i.includes('option') && list[i]) answer.push(list[i])
}
list.answer = answer.join(',')
list.questionStem = list.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
}else if(typeName == '判断题'){
if(list.answer == 'A'){
list.answer = '正确'
}else{
list.answer = '错误'
}
}else if(typeName != '简答题'){
for(let i in list){
if(i.includes('option') && list[i]){
options[i.replace('option','')] = list[i]
}
}
}
this.topicForm = {
id: list.id,
userId: list.userId,
@ -232,7 +277,7 @@ export default {
courses: list.courses,
knowledgePoints: list.knowledgePoints,
answer: list.answer,
questionType: '',
questionType: typeName,
questionStem: list.questionStem,
optionA: list.optionA,
optionB: list.optionB,
@ -240,6 +285,7 @@ export default {
optionD: list.optionD,
optionE: list.optionE,
optionF: list.optionF,
options,
aisTrue: false,
bisTrue: false,
cisTrue: false,
@ -251,7 +297,6 @@ export default {
answerAnalysis: list.answerAnalysis,
videoAudio: list.videoAudio
}
console.log(this.topicForm,this.quesBankList)
}).catch(err => {})
},
show(row) {
@ -277,7 +322,8 @@ export default {
},
share(row) {
this.$confirm('该题将共享至公共题库,是否确认共享?', '提示', {
type: 'info'
type: 'info',
customClass: 'normal'
})
.then(() => {
let data = {
@ -319,16 +365,15 @@ export default {
})
this.$confirm(`是否确认共享${util.ellipsisStr(newArr[0].questionStem)}${newArr.length}个选中的题目?`, '提示', {
type: 'info'
})
.then(() => {
type: 'info',
customClass: 'normal'
}).then(() => {
let data = {
userId: this.userId,
ids: shareList,
source: 1
}
this.$post(this.api.batchSave,data).then(res => {
this.multipleSelection = [];
util.successMsg('此题已成功共享至校企公共题库')
this.getData()
this.$refs.table.clearSelection()
@ -336,7 +381,7 @@ export default {
this.getData()
})
})
.catch(() => {});
.catch(() => {})
}else{
util.errorMsg('请先选择数据')
}
@ -353,7 +398,6 @@ export default {
})
.then(() => {
this.$post(`${this.api.deleteByMeSubject}?ids=${delList.join()}`).then(res => {
this.multipleSelection = [];
util.successMsg('删除成功');
this.getData()
this.$refs.table.clearSelection()
@ -439,6 +483,9 @@ export default {
max-width: calc(100% - 80px);
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
/deep/img{
max-width: 100%;
}
}
}
}

@ -18,7 +18,7 @@
<span style="display: inline-block;width: 23px;" v-if="!scope.row.secondColumn.length"></span>{{scope.row.typeName}}
</template>
</el-table-column>
<el-table-column label="操作" width="200">
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.parentId == 0" @click="addSecond(scope.row)" v-auth="'/quesBank/list:题库分类:添加'">添加</el-button>
<el-button type="text" @click="editType(scope.row)" v-auth="'/quesBank/list:题库分类:编辑'">编辑</el-button>
@ -38,8 +38,8 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="firstVisible = false">取消</el-button>
<el-button type="primary" @click="firstSubmit">确定</el-button>
<el-button size="small" @click="firstVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="firstSubmit">确定</el-button>
</span>
</el-dialog>
@ -50,8 +50,8 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="secondVisible = false">取消</el-button>
<el-button type="primary" @click="secondSubmit">确定</el-button>
<el-button size="small" @click="secondVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="secondSubmit">确定</el-button>
</span>
</el-dialog>
</div>
@ -93,7 +93,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -110,8 +110,16 @@ export default {
.then(res => {
this.listData = res.data.list.list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handleCurrentChange(val) {
this.page = val
this.getData()

@ -102,18 +102,18 @@
v-model="fillList[index]"
></el-input>
<template v-if="!isDetail">
<template v-if="index == 0">
<i class="el-icon-circle-plus-outline" @click="addFill"></i>
</template>
<template v-if="fillList.length > 1">
<i class="el-icon-close" @click="delFill(index)"></i>
</template>
<template v-if="index == fillList.length - 1">
<i class="el-icon-circle-plus-outline" @click="addFill"></i>
</template>
</template>
</div>
</div>
</el-form-item>
<el-form-item label="答案解析" prop="answerAnalysis">
<el-input type="textarea" v-model="topicForm.answerAnalysis"></el-input>
<el-input type="textarea" v-model="topicForm.answerAnalysis" resize="none"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" v-show="!isDetail">
@ -247,7 +247,8 @@ export default {
pageNum: 1,
pageSize: 10000,
schoolId: this.clientId,
source: 1
source: 1,
keyword: ''
}
this.$post(this.api.listByPage,data)
.then(res => {

@ -7,7 +7,7 @@
</div>
</div>
<el-table :data="listData" stripe header-align="center" row-key="id" :tree-props="treeProps" :indent="9">
<el-table :data="listData" stripe header-align="center" row-key="index" :tree-props="treeProps" :indent="9">
<el-table-column prop="label" label="架构名称">
<template slot-scope="scope">
<span class="text">{{scope.row.label}}</span>
@ -87,10 +87,12 @@ export default {
this.$get(this.api.queryStaffPro,data).then(res => {
let firList = res.data.StaffProfessionalArchitectureList
if(firList){
let index = 0
firList.map(e => {
e.isParent = true
e.id = e.staffProfessionalArchitectureId
e.label = e.staffProfessionalArchitectureName
e.index = ++index
let data = {
staffProfessionalArchitectureId: e.staffProfessionalArchitectureId
}
@ -98,6 +100,7 @@ export default {
res1.data.staffGradeList.map(e => {
e.id = e.staffGradeId
e.label = e.staffGradeName
e.index = ++index
})
e.children = res1.data.staffGradeList
}).catch(res => {})

@ -13,18 +13,18 @@
</div>
</div>
<el-table :data="roleData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table :data="roleData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" width="100"></el-table-column>
<el-table-column prop="remark" label="角色描述" align="center"></el-table-column>
<el-table-column label="操作" width="180">
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/system/list:角色权限:查看'">查看</el-button>
<!-- <template v-if="scope.row.id != 1"> -->
<template v-if="scope.row.id != 1">
<el-button type="text" @click="editRole(scope.row)" v-auth="'/system/list:角色权限:编辑'">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth="'/system/list:角色权限:删除'">删除</el-button>
<!-- </template> -->
</template>
</template>
</el-table-column>
</el-table>
@ -133,8 +133,9 @@ export default {
this.permissions = []
},
currentChange(val) {
this.pageNo = val;
this.getData();
this.pageNo = val
this.$refs.table.clearSelection()
this.getData()
},
getPer(){
if(!this.permissions.length){

@ -18,7 +18,7 @@
</div>
</div>
<el-table :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="80" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center">
</el-table-column>
@ -38,7 +38,7 @@
</el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" width="160" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column label="操作" width="150" align="center">
<template slot-scope="scope">
<el-button type="text" @click="showTeacher(scope.row)" v-auth="'/system/list:员工管理:查看'">查看</el-button>
<el-button type="text" @click="editTeacher(scope.row)" v-auth="'/system/list:员工管理:编辑'">编辑</el-button>
@ -47,7 +47,7 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total,prev, pager, next" :current-page="pageNo" @current-change="handleCurrentChange" :total="total">
<el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total">
</el-pagination>
</div>
@ -144,7 +144,7 @@
</ul>
</el-dialog>
<el-dialog title="批量导入" :visible.sync="importVisible" width="400px" :close-on-click-modal="false">
<el-dialog title="批量导入" :visible.sync="importVisible" width="400px" @close="closeImport" :close-on-click-modal="false">
<div class="upload-wrap" :class="{lg: uploadFaild}">
<el-button class="download" size="small" @click="downLoad"><img src="../../../assets/img/download.png" alt=""> 模板下载</el-button>
<el-upload accept=".xls,.xlsx" :on-remove="handleRemove" :on-error="uploadError" :on-success="uploadSuccess" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" :action="this.api.uploadFileStaff" :file-list="uploadList" :data="{schoolId: this.clientId}" name="file">
@ -246,7 +246,7 @@ export default {
listData: [],
importVisible: false,
keyword: '',
pageNo: 1,
page: 1,
pageSize: 10,
total: 0,
managerDepartmentList: [],
@ -335,25 +335,25 @@ export default {
staffGradeIds: this.twoDepartmentIds,
searchContent: this.keyword,
schoolId: this.clientId,
pageNum: this.pageNo,
pageNum: this.page,
pageSize: this.pageSize
}
this.$get(`${this.api.queryStaff}/${this.pageNo}/${this.pageSize}`,data).then(res => {
this.$get(`${this.api.queryStaff}/${this.page}/${this.pageSize}`,data).then(res => {
this.listData = res.data.staffList.list
this.total = res.data.staffList.totalCount
if(!this.listData.length && this.total){
this.pageNo--
this.page--
this.getData()
}
}).catch(res => {});
},
initData(){
this.pageNo = 1
this.page = 1
this.getData()
},
orgChange(node){
this.twoDepartmentIds = node.map(n => n[1]).toString()
this.getData()
this.initData()
},
getRoles() {
let data = {
@ -559,11 +559,11 @@ export default {
staffIds: delList.join(',')
}
this.$del(this.api.deleteStaffs,data).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getData()
}).catch(res => {});
}).catch(() => {});
}).catch(res => {})
}).catch(() => {})
}else{
util.errorMsg('请先选择数据 !')
}
@ -574,12 +574,13 @@ export default {
this.uploadFaild = false
},
searchTeacher(){
this.pageNo = 1;
this.page = 1
this.getData()
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
downLoad(){
location.href = this.api.downloadStaffTemp
@ -620,9 +621,12 @@ export default {
this.uploadList = fileList
this.uploadFaild = false
},
closeImport(){
this.uploadList = []
},
uploadSure(){
this.importVisible = false
this.pageNo = 1
this.page = 1
this.keyword = ''
this.getData()
}

@ -18,7 +18,7 @@
</div>
</div>
<el-table :data="userData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
@ -50,7 +50,7 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="pageNo" layout="total, prev, pager, next" :total="totals">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total">
</el-pagination>
</div>
</div>
@ -154,11 +154,11 @@ export default {
{ required: true, message: '请选择院校名称', trigger: 'change' },
]
},
userData:[],
listData:[],
keyword: '',
pageNo: 1,
page: 1,
pageSize: 10,
totals: 0,
total: 0,
multipleSelection: [],
clientList: [],
isAdd: true,
@ -200,16 +200,20 @@ export default {
getData() {
let data = {
searchContent: this.keyword,
current: this.pageNo,
current: this.page,
pageSize: this.pageSize
}
this.$get(`${this.api.queryUser}/${this.pageNo}/${this.pageSize}`,data).then(res => {
this.userData = res.data.list.list
this.totals = res.data.list.totalCount
}).catch(res => {});
this.$get(`${this.api.queryUser}/${this.page}/${this.pageSize}`,data).then(res => {
this.listData = res.data.list.list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(res => {})
},
initData(){
this.pageNo = 1
this.page = 1
this.getData()
},
accountChange(){
@ -249,8 +253,9 @@ export default {
this.curRow = {}
},
currentChange(val) {
this.pageNo = val;
this.getData();
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
adduser(){
this.isDetail = false
@ -338,34 +343,35 @@ export default {
})
.then(() => {
this.$post(`${this.api.deleteUser}?userIds=${row.id}`).then(res => {
util.successMsg('删除成功');
util.successMsg('删除成功')
this.getData()
}).catch(res => {});
}).catch(res => {})
})
.catch(() => {});
},
resetPassword(row){
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
}).then(() => {
let data = {
userId: row.userId,
password: Setting.initialPassword
type: 'info',
customClass: 'normal'
}).then(() => {
let data = {
userId: row.userId,
password: Setting.initialPassword
}
this.$post(this.api.userinfoUpdate,data).then(res => {
if(res.success){
util.successMsg('重置成功')
}else{
util.errorMsg('重置失败')
}
this.$post(this.api.userinfoUpdate,data).then(res => {
if(res.success){
util.successMsg('重置成功')
}else{
util.errorMsg('重置失败')
}
}).catch(res => {});
}).catch(() => {
});
}).catch(res => {})
}).catch(() => {})
},
getRowKeys(row) {
return row.userId;
return row.userId
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
delAllSelection() {
if(this.multipleSelection.length != ''){
@ -380,11 +386,11 @@ export default {
.then(() => {
this.$post(`${this.api.deleteUser}?userIds=${delList.join(',')}`).then(res => {
this.$refs.table.clearSelection()
this.multipleSelection = [];
this.multipleSelection = []
util.successMsg('删除成功')
this.getData()
}).catch(res => {});
}).catch(() => {});
}).catch(res => {})
}).catch(() => {})
}else{
util.errorMsg('请先选择数据 !')
}
@ -435,7 +441,7 @@ export default {
},
uploadSure(){
this.importVisible = false
this.pageNo = 1
this.page = 1
this.keyword = ''
this.getData()
},

@ -1,7 +1,7 @@
/**
* @description 鉴权指令
* 当传入的权限当前用户没有时会移除该组件
* 用例<Tag v-auth">text</Tag> 或者:<Tag v-auth="'user:编辑'">text</Tag>
* 用例<Tag v-auth>text</Tag> <Tag v-auth="'user:'">text</Tag>
* */
import store from '@/store'
import Setting from '@/setting'

@ -15,8 +15,8 @@ const Setting = {
// 页面切换时,是否显示模拟的进度条
showProgressBar: true,
// 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000',
apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:9000',
// apiBaseURL: env === 'development' ? 'http://192.168.31.151:8001' : 'http://39.108.250.202:8000',
apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

@ -72,7 +72,6 @@ export default {
})
Setting.dynamicRoute && addRoutes(routes)
util.session.set(Setting.usernameKey, user.userName)
util.session.set(Setting.storeKey, JSON.stringify(state))
util.successMsg('登录成功');
resolve()
}else{

@ -284,14 +284,16 @@
color: #ffa900;
}
}
.el-button--primary{
color: #606266;
background: #fff;
border-color: #DCDFE6;
&:hover{
color: $--color-primary;
border-color: #efbdbb;
background-color: #fae9e8;
&:not(.normal){
.el-button--primary{
color: #606266;
background: #fff;
border-color: #DCDFE6;
&:hover{
color: $--color-primary;
border-color: #efbdbb;
background-color: #fae9e8;
}
}
}
}
@ -356,6 +358,10 @@
}
}
.el-tooltip__popper{
width: 300px;
}
@media(max-width: 1600px){
.el-table{
.el-switch__label--right.is-active{

Loading…
Cancel
Save