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. 54
      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. 6
      src/styles/common.scss

@ -106,15 +106,15 @@ const util = {
}, },
// 成功提示 // 成功提示
successMsg(message) { 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) { 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) { 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) { ellipsisStr(str) {

@ -20,7 +20,7 @@
</li> </li>
<li> <li>
<label>城市</label> <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-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
</el-select> </el-select>
</li> </li>
@ -35,11 +35,11 @@
</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="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="selection" width="80" 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 + (page - 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">
@ -57,13 +57,12 @@
<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 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> </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="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</el-pagination>
</div> </div>
</div> </div>
</div> </div>
@ -81,7 +80,7 @@ export default {
countryList: [{ countryList: [{
name:'中国' name:'中国'
}], }],
customerData: [], listData: [],
keyword: '', keyword: '',
form: { form: {
countries:'中国', countries:'中国',
@ -91,9 +90,9 @@ export default {
multipleSelection: [], multipleSelection: [],
provinceList: [], provinceList: [],
cityList: [], cityList: [],
pageNo: 1, page: 1,
pageSize: 10, pageSize: 10,
totals: 1, total: 1,
ruleIds: [], ruleIds: [],
searchTimer: null searchTimer: null
}; };
@ -122,13 +121,17 @@ export default {
cityId: this.form.city, cityId: this.form.city,
searchContent: this.keyword searchContent: this.keyword
} }
this.$get(`${this.api.queryClient}/${this.pageNo}/${this.pageSize}`,data).then(res => { this.$get(`${this.api.queryClient}/${this.page}/${this.pageSize}`,data).then(res => {
this.customerData = res.data.list.list this.listData = res.data.list.list
this.totals = res.data.list.totalCount this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(res => {}); }).catch(res => {});
}, },
initData(){ initData(){
this.pageNo = 1 this.page = 1
this.getData() this.getData()
}, },
getProvince(){ getProvince(){
@ -144,7 +147,7 @@ export default {
getCity(){ getCity(){
this.clearprovince() this.clearprovince()
this.getCityData() this.getCityData()
this.pageNo = 1 this.page = 1
this.getData() this.getData()
}, },
getCityData(){ getCityData(){
@ -216,8 +219,9 @@ export default {
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNo = val; this.page = val
this.getData(); this.$refs.table.clearSelection()
this.getData()
}, },
} }
}; };

@ -4,14 +4,14 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>创建人</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>题目类型</label> <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 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>
@ -26,13 +26,17 @@
</div> </div>
</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="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 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="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="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="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>
@ -73,6 +77,16 @@
<div v-html="topicForm.questionStem"></div> <div v-html="topicForm.questionStem"></div>
</div> </div>
</li> </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> <li>
<span class="name">答案解析</span> <span class="name">答案解析</span>
<span class="val">{{topicForm.answerAnalysis}}</span> <span class="val">{{topicForm.answerAnalysis}}</span>
@ -123,7 +137,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -137,11 +151,23 @@ export default {
name: this.name name: this.name
}) })
.then(res => { .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 this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}) })
.catch(err => {}) .catch(err => {})
}, },
initData(){
this.page = 1
this.getData()
},
getType() { getType() {
this.$get(this.api.typesList) this.$get(this.api.typesList)
.then(res => { .then(res => {
@ -151,6 +177,7 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.$refs.table.clearSelection()
this.getData() this.getData()
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
@ -180,7 +207,6 @@ export default {
}) })
.then(() => { .then(() => {
this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=1&ids=${delList.join()}`).then(res => { this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=1&ids=${delList.join()}`).then(res => {
this.multipleSelection = [];
util.successMsg('取消共享成功') util.successMsg('取消共享成功')
this.getData() this.getData()
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
@ -205,7 +231,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,
schoolId: this.clientId, schoolId: this.clientId,
source: 1 source: 1,
keyword: ''
} }
this.$post(this.api.listByPage,data).then(res => { this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list let list = res.data.list.list
@ -220,6 +247,29 @@ export default {
getDetail(id) { getDetail(id) {
this.$post(`${this.api.findById}?id=${id}`).then(res => { this.$post(`${this.api.findById}?id=${id}`).then(res => {
let list = res.data.list 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 = { this.topicForm = {
id: list.id, id: list.id,
userId: list.userId, userId: list.userId,
@ -229,7 +279,7 @@ export default {
courses: list.courses, courses: list.courses,
knowledgePoints: list.knowledgePoints, knowledgePoints: list.knowledgePoints,
answer: list.answer, answer: list.answer,
questionType: '', questionType: typeName,
questionStem: list.questionStem, questionStem: list.questionStem,
optionA: list.optionA, optionA: list.optionA,
optionB: list.optionB, optionB: list.optionB,
@ -237,6 +287,7 @@ export default {
optionD: list.optionD, optionD: list.optionD,
optionE: list.optionE, optionE: list.optionE,
optionF: list.optionF, optionF: list.optionF,
options,
aisTrue: false, aisTrue: false,
bisTrue: false, bisTrue: false,
cisTrue: false, cisTrue: false,
@ -248,7 +299,6 @@ export default {
answerAnalysis: list.answerAnalysis, answerAnalysis: list.answerAnalysis,
videoAudio: list.videoAudio videoAudio: list.videoAudio
} }
console.log(this.topicForm,this.quesBankList)
}).catch(err => {}) }).catch(err => {})
}, },
edit(row) { edit(row) {
@ -285,6 +335,9 @@ export default {
max-width: calc(100% - 80px); max-width: calc(100% - 80px);
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
/deep/img{
max-width: 100%;
}
} }
} }
} }

@ -4,7 +4,7 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>题目类型</label> <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 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>
@ -23,22 +23,20 @@
</div> </div>
<el-table :data="listData" ref="table" row-key="id" class="table" stripe header-align="center" @selection-change="handleSelectionChange"> <el-table :data="listData" ref="table" row-key="id" class="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column <el-table-column type="selection" width="80" align="center" :reserve-selection="true" :selectable="disabledSelection"></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"> <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" 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="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="所属题库" 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="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>
@ -47,7 +45,7 @@
{{scope.row.myShare ? '已共享' : '未共享'}} {{scope.row.myShare ? '已共享' : '未共享'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="230"> <el-table-column label="操作" width="230" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth="'/quesBank/list:我上传的题库:查看'">查看</el-button> <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> <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 v-html="topicForm.questionStem"></div>
</div> </div>
</li> </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> <li>
<span class="name">答案解析</span> <span class="name">答案解析</span>
<span class="val">{{topicForm.answerAnalysis}}</span> <span class="val">{{topicForm.answerAnalysis}}</span>
@ -104,8 +112,8 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="importVisible = false"> </el-button> <el-button size="small" @click="importVisible = false"> </el-button>
<el-button type="primary" @click="uploadSure"> </el-button> <el-button size="small" type="primary" @click="uploadSure"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -155,7 +163,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -169,11 +177,23 @@ export default {
userId: this.userId userId: this.userId
}) })
.then(res => { .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 this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}) })
.catch(err => {}) .catch(err => {})
}, },
initData(){
this.page = 1
this.getData()
},
getType() { getType() {
this.$get(this.api.typesList) this.$get(this.api.typesList)
.then(res => { .then(res => {
@ -183,6 +203,7 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.$refs.table.clearSelection()
this.getData() this.getData()
}, },
dialogGetData(){ dialogGetData(){
@ -208,7 +229,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,
schoolId: this.clientId, schoolId: this.clientId,
source: 1 source: 1,
keyword: ''
} }
this.$post(this.api.listByPage,data).then(res => { this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list let list = res.data.list.list
@ -223,6 +245,29 @@ export default {
getDetail(id) { getDetail(id) {
this.$post(`${this.api.findById}?id=${id}`).then(res => { this.$post(`${this.api.findById}?id=${id}`).then(res => {
let list = res.data.list 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 = { this.topicForm = {
id: list.id, id: list.id,
userId: list.userId, userId: list.userId,
@ -232,7 +277,7 @@ export default {
courses: list.courses, courses: list.courses,
knowledgePoints: list.knowledgePoints, knowledgePoints: list.knowledgePoints,
answer: list.answer, answer: list.answer,
questionType: '', questionType: typeName,
questionStem: list.questionStem, questionStem: list.questionStem,
optionA: list.optionA, optionA: list.optionA,
optionB: list.optionB, optionB: list.optionB,
@ -240,6 +285,7 @@ export default {
optionD: list.optionD, optionD: list.optionD,
optionE: list.optionE, optionE: list.optionE,
optionF: list.optionF, optionF: list.optionF,
options,
aisTrue: false, aisTrue: false,
bisTrue: false, bisTrue: false,
cisTrue: false, cisTrue: false,
@ -251,7 +297,6 @@ export default {
answerAnalysis: list.answerAnalysis, answerAnalysis: list.answerAnalysis,
videoAudio: list.videoAudio videoAudio: list.videoAudio
} }
console.log(this.topicForm,this.quesBankList)
}).catch(err => {}) }).catch(err => {})
}, },
show(row) { show(row) {
@ -277,7 +322,8 @@ export default {
}, },
share(row) { share(row) {
this.$confirm('该题将共享至公共题库,是否确认共享?', '提示', { this.$confirm('该题将共享至公共题库,是否确认共享?', '提示', {
type: 'info' type: 'info',
customClass: 'normal'
}) })
.then(() => { .then(() => {
let data = { let data = {
@ -319,16 +365,15 @@ export default {
}) })
this.$confirm(`是否确认共享${util.ellipsisStr(newArr[0].questionStem)}${newArr.length}个选中的题目?`, '提示', { this.$confirm(`是否确认共享${util.ellipsisStr(newArr[0].questionStem)}${newArr.length}个选中的题目?`, '提示', {
type: 'info' type: 'info',
}) customClass: 'normal'
.then(() => { }).then(() => {
let data = { let data = {
userId: this.userId, userId: this.userId,
ids: shareList, ids: shareList,
source: 1 source: 1
} }
this.$post(this.api.batchSave,data).then(res => { this.$post(this.api.batchSave,data).then(res => {
this.multipleSelection = [];
util.successMsg('此题已成功共享至校企公共题库') util.successMsg('此题已成功共享至校企公共题库')
this.getData() this.getData()
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
@ -336,7 +381,7 @@ export default {
this.getData() this.getData()
}) })
}) })
.catch(() => {}); .catch(() => {})
}else{ }else{
util.errorMsg('请先选择数据') util.errorMsg('请先选择数据')
} }
@ -353,7 +398,6 @@ export default {
}) })
.then(() => { .then(() => {
this.$post(`${this.api.deleteByMeSubject}?ids=${delList.join()}`).then(res => { this.$post(`${this.api.deleteByMeSubject}?ids=${delList.join()}`).then(res => {
this.multipleSelection = [];
util.successMsg('删除成功'); util.successMsg('删除成功');
this.getData() this.getData()
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
@ -439,6 +483,9 @@ export default {
max-width: calc(100% - 80px); max-width: calc(100% - 80px);
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.65); 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}} <span style="display: inline-block;width: 23px;" v-if="!scope.row.secondColumn.length"></span>{{scope.row.typeName}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200" align="center">
<template slot-scope="scope"> <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" 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> <el-button type="text" @click="editType(scope.row)" v-auth="'/quesBank/list:题库分类:编辑'">编辑</el-button>
@ -38,8 +38,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="firstVisible = false">取消</el-button> <el-button size="small" @click="firstVisible = false">取消</el-button>
<el-button type="primary" @click="firstSubmit">确定</el-button> <el-button size="small" type="primary" @click="firstSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -50,8 +50,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="secondVisible = false">取消</el-button> <el-button size="small" @click="secondVisible = false">取消</el-button>
<el-button type="primary" @click="secondSubmit">确定</el-button> <el-button size="small" type="primary" @click="secondSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -93,7 +93,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -110,8 +110,16 @@ export default {
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(err => {}) }).catch(err => {})
}, },
initData(){
this.page = 1
this.getData()
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.getData() this.getData()

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

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

@ -13,18 +13,18 @@
</div> </div>
</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="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 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="roleName" label="角色名称" align="center" width="100"></el-table-column>
<el-table-column prop="remark" label="角色描述" align="center"></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"> <template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/system/list:角色权限:查看'">查看</el-button> <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="editRole(scope.row)" v-auth="'/system/list:角色权限:编辑'">编辑</el-button>
<el-button type="text" @click="handleDelete(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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -133,8 +133,9 @@ export default {
this.permissions = [] this.permissions = []
}, },
currentChange(val) { currentChange(val) {
this.pageNo = val; this.pageNo = val
this.getData(); this.$refs.table.clearSelection()
this.getData()
}, },
getPer(){ getPer(){
if(!this.permissions.length){ if(!this.permissions.length){

@ -18,7 +18,7 @@
</div> </div>
</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="selection" width="80" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center"> <el-table-column type="index" label="序号" width="55" align="center">
</el-table-column> </el-table-column>
@ -38,7 +38,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" width="160" align="center"> <el-table-column prop="lastLoginTime" label="上次登录时间" width="160" align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showTeacher(scope.row)" v-auth="'/system/list:员工管理:查看'">查看</el-button> <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> <el-button type="text" @click="editTeacher(scope.row)" v-auth="'/system/list:员工管理:编辑'">编辑</el-button>
@ -47,7 +47,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <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> </el-pagination>
</div> </div>
@ -144,7 +144,7 @@
</ul> </ul>
</el-dialog> </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}"> <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-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"> <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: [], listData: [],
importVisible: false, importVisible: false,
keyword: '', keyword: '',
pageNo: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
managerDepartmentList: [], managerDepartmentList: [],
@ -335,25 +335,25 @@ export default {
staffGradeIds: this.twoDepartmentIds, staffGradeIds: this.twoDepartmentIds,
searchContent: this.keyword, searchContent: this.keyword,
schoolId: this.clientId, schoolId: this.clientId,
pageNum: this.pageNo, pageNum: this.page,
pageSize: this.pageSize 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.listData = res.data.staffList.list
this.total = res.data.staffList.totalCount this.total = res.data.staffList.totalCount
if(!this.listData.length && this.total){ if(!this.listData.length && this.total){
this.pageNo-- this.page--
this.getData() this.getData()
} }
}).catch(res => {}); }).catch(res => {});
}, },
initData(){ initData(){
this.pageNo = 1 this.page = 1
this.getData() this.getData()
}, },
orgChange(node){ orgChange(node){
this.twoDepartmentIds = node.map(n => n[1]).toString() this.twoDepartmentIds = node.map(n => n[1]).toString()
this.getData() this.initData()
}, },
getRoles() { getRoles() {
let data = { let data = {
@ -559,11 +559,11 @@ export default {
staffIds: delList.join(',') staffIds: delList.join(',')
} }
this.$del(this.api.deleteStaffs,data).then(res => { this.$del(this.api.deleteStaffs,data).then(res => {
this.multipleSelection = []; this.$refs.table.clearSelection()
util.successMsg('删除成功') util.successMsg('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}).catch(() => {}); }).catch(() => {})
}else{ }else{
util.errorMsg('请先选择数据 !') util.errorMsg('请先选择数据 !')
} }
@ -574,12 +574,13 @@ export default {
this.uploadFaild = false this.uploadFaild = false
}, },
searchTeacher(){ searchTeacher(){
this.pageNo = 1; this.page = 1
this.getData() this.getData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNo = val; this.page = val
this.getData(); this.$refs.table.clearSelection()
this.getData()
}, },
downLoad(){ downLoad(){
location.href = this.api.downloadStaffTemp location.href = this.api.downloadStaffTemp
@ -620,9 +621,12 @@ export default {
this.uploadList = fileList this.uploadList = fileList
this.uploadFaild = false this.uploadFaild = false
}, },
closeImport(){
this.uploadList = []
},
uploadSure(){ uploadSure(){
this.importVisible = false this.importVisible = false
this.pageNo = 1 this.page = 1
this.keyword = '' this.keyword = ''
this.getData() this.getData()
} }

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

@ -1,7 +1,7 @@
/** /**
* @description 鉴权指令 * @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 store from '@/store'
import Setting from '@/setting' import Setting from '@/setting'

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

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

@ -284,6 +284,7 @@
color: #ffa900; color: #ffa900;
} }
} }
&:not(.normal){
.el-button--primary{ .el-button--primary{
color: #606266; color: #606266;
background: #fff; background: #fff;
@ -295,6 +296,7 @@
} }
} }
} }
}
.el-dialog__wrapper{ .el-dialog__wrapper{
.el-dialog{ .el-dialog{
@ -356,6 +358,10 @@
} }
} }
.el-tooltip__popper{
width: 300px;
}
@media(max-width: 1600px){ @media(max-width: 1600px){
.el-table{ .el-table{
.el-switch__label--right.is-active{ .el-switch__label--right.is-active{

Loading…
Cancel
Save