yujialong 4 years ago
parent a9110a48b9
commit e7fe7a2cfe
  1. 14
      src/libs/util.js
  2. 4
      src/pages/client/list/index.vue
  3. 3
      src/pages/quesBank/list/myQuesBank.vue
  4. 3
      src/pages/quesBank/list/quesDialog.vue
  5. 2
      src/pages/system/list/staff.vue
  6. 6
      src/pages/user/list/index.vue
  7. 2
      src/setting.js
  8. 2
      src/store/modules/user.js

@ -89,6 +89,20 @@ const util = {
getFileExt(fileName) { getFileExt(fileName) {
return fileName.substring(fileName.lastIndexOf('.') + 1) return fileName.substring(fileName.lastIndexOf('.') + 1)
}, },
// 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域
downloadFile(fileName,url) {
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = 'blob'
x.onload=function(e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement('a')
a.href = url
a.download = fileName
a.click()
}
x.send()
},
} }
export default util export default util

@ -137,8 +137,8 @@ export default {
searchContent: this.keyword searchContent: this.keyword
} }
this.$get(`${this.api.queryClient}/${this.pageNo}/${this.pageSize}`,data).then(res => { this.$get(`${this.api.queryClient}/${this.pageNo}/${this.pageSize}`,data).then(res => {
this.customerData = res.data.list this.customerData = res.data.list.list
this.totals = res.data.total this.totals = res.data.list.totalCount
}).catch(res => {}); }).catch(res => {});
}, },
getProvince(){ getProvince(){

@ -277,7 +277,8 @@ export default {
.then(() => { .then(() => {
let data = { let data = {
userId: this.userId, userId: this.userId,
ids: shareList ids: shareList,
source: 1
} }
this.$post(this.api.batchSave,data).then(res => { this.$post(this.api.batchSave,data).then(res => {
this.multipleSelection = []; this.multipleSelection = [];

@ -49,6 +49,7 @@
> >
<el-button type="primary" class="ml20">上传视频/音频</el-button> <el-button type="primary" class="ml20">上传视频/音频</el-button>
</el-upload> </el-upload>
<span v-if="topicForm.videoAudio">已上传</span>
</el-form-item> </el-form-item>
<el-form-item label="题干" prop="questionStem"> <el-form-item label="题干" prop="questionStem">
<quill :border="true" :readonly="isDetail" :key="isDetail" v-model="topicForm.questionStem" :minHeight="150" :height="150" /> <quill :border="true" :readonly="isDetail" :key="isDetail" v-model="topicForm.questionStem" :minHeight="150" :height="150" />
@ -396,12 +397,14 @@ export default {
) )
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
this.uploading = false
this.topicForm.videoAudio = res.data.filesResult.fileId this.topicForm.videoAudio = res.data.filesResult.fileId
}, },
showFaild(){ showFaild(){
location.href = `${this.api.export_failure}?token=${this.token}` location.href = `${this.api.export_failure}?token=${this.token}`
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.uploading = false
this.$message({ this.$message({
message: "上传出错,请重试!", message: "上传出错,请重试!",
type: "error", type: "error",

@ -360,7 +360,7 @@ export default {
this.manageForm.phone = user.phone this.manageForm.phone = user.phone
this.manageForm.email = user.email this.manageForm.email = user.email
this.manageForm.userAccount = user.account this.manageForm.userAccount = user.account
this.originalAccount = Number(user.account) this.originalAccount = user.account
this.manageForm.userId = user.userId this.manageForm.userId = user.userId
this.manageForm.roleValue = or.roleId this.manageForm.roleValue = or.roleId

@ -192,8 +192,8 @@ export default {
pageSize: this.pageSize pageSize: this.pageSize
} }
this.$get(`${this.api.queryUser}/${this.pageNo}/${this.pageSize}`,data).then(res => { this.$get(`${this.api.queryUser}/${this.pageNo}/${this.pageSize}`,data).then(res => {
this.userData = res.data.list this.userData = res.data.list.list
this.totals = res.data.total this.totals = res.data.list.totalCount
}).catch(res => {}); }).catch(res => {});
}, },
accountChange(){ accountChange(){
@ -217,7 +217,7 @@ export default {
cityId: '' cityId: ''
} }
this.$get(`${this.api.queryClient}/1/1000`,data).then(res => { this.$get(`${this.api.queryClient}/1/1000`,data).then(res => {
this.clientList = res.data.list this.clientList = res.data.list.list
}).catch(res => {}); }).catch(res => {});
}, },
closeTeacher(){ closeTeacher(){

@ -62,7 +62,7 @@ const Setting = {
maxSize: 30, maxSize: 30,
}, },
// 是否使用动态路由 // 是否使用动态路由
dynamicRoute: false dynamicRoute: true
}; };
export default Setting; export default Setting;

@ -58,7 +58,7 @@ export default {
get(api.logins,{ account: username.trim(), password: password }).then(res => { get(api.logins,{ account: username.trim(), password: password }).then(res => {
if(res.success){ if(res.success){
let user = res.data.userInfo let user = res.data.userInfo
if(user.isPort == 0 || user.isPort == 1){ if((user.isPort == 0 || user.isPort == 1) && user.roleId != 4){
let routes = res.data.permissions[0].children let routes = res.data.permissions[0].children
commit('SET_INFO',{ commit('SET_INFO',{
avatar: user.userAvatars, avatar: user.userAvatars,

Loading…
Cancel
Save