bug修复
This commit is contained in:
parent
ae777c7b4e
commit
a9810093fa
|
|
@ -37,6 +37,9 @@ export const personFileUpLoad = (data) => {
|
|||
return request({
|
||||
url: '/base/tbPeople/importData',
|
||||
method: 'post',
|
||||
data
|
||||
data: data,
|
||||
headers:{
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ const CONFIG = {
|
|||
IS_CODE_LOGIN: LOGIN_CONFIG.CODE_EMAIL_LOGIN || LOGIN_CONFIG.CODE_PHONE_LOGIN, // 是否开启短信登录
|
||||
// 数据设置
|
||||
dataSettings: {
|
||||
integrityCheck: DATA_SETTINGS.CLOSE, // 数据完整性校验(true:开启,false:关闭)
|
||||
encryptRequest: DATA_SETTINGS.CLOSE, // 数据传输加密(true:开启,false:关闭)
|
||||
encryptResponse: DATA_SETTINGS.CLOSE // 数据返回解密(true:开启,false:关闭)
|
||||
integrityCheck: DATA_SETTINGS.OPEN, // 数据完整性校验(true:开启,false:关闭)
|
||||
encryptRequest: DATA_SETTINGS.OPEN, // 数据传输加密(true:开启,false:关闭)
|
||||
encryptResponse: DATA_SETTINGS.OPEN // 数据返回解密(true:开启,false:关闭)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,15 +35,11 @@
|
|||
size="mini"
|
||||
>导出数据</el-button
|
||||
>
|
||||
<el-upload
|
||||
:http-request="(obj) => uploadData(obj)"
|
||||
action="#"
|
||||
:file-list="fileList"
|
||||
:on-exceed="fileExceed"
|
||||
accept=".xls, .xlsx"
|
||||
:limit="1"
|
||||
style="display: flex"
|
||||
>
|
||||
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
|
||||
:on-success="handleFileSuccess" :auto-upload="true"
|
||||
:show-file-list="false"
|
||||
>
|
||||
<el-button
|
||||
style="height: 100%; margin-left: 6px"
|
||||
icon="el-icon-download"
|
||||
|
|
@ -105,6 +101,7 @@ import {
|
|||
personFileUpLoad
|
||||
} from '@/api/base/person'
|
||||
import FormPerson from './components/form-person.vue'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'person',
|
||||
methods: {
|
||||
|
|
@ -150,10 +147,18 @@ export default {
|
|||
this.$refs.tableRef.getTableList()
|
||||
}
|
||||
}).catch(err => {})
|
||||
this.fileList=[];
|
||||
},
|
||||
fileExceed() {
|
||||
this.$modal.msgError('最多上传1个文件!')
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.isUploading = false
|
||||
this.$refs.upload.clearFiles()
|
||||
this.$alert('<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' + response.msg + '</div>', '导入结果', { dangerouslyUseHTMLString: true })
|
||||
this.$refs.tableRef.getTableList()
|
||||
},
|
||||
},
|
||||
mixins: [commonMixin],
|
||||
components: {
|
||||
|
|
@ -164,6 +169,20 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/base/tbPeople/importData'
|
||||
},
|
||||
// 搜索区表单配置项
|
||||
formLabel,
|
||||
// 表格导出id列表
|
||||
|
|
|
|||
|
|
@ -37,15 +37,11 @@
|
|||
)"
|
||||
>数据模板下载</el-button
|
||||
>
|
||||
<el-upload
|
||||
:http-request="(obj) => uploadData(obj)"
|
||||
action="#"
|
||||
:file-list="fileList"
|
||||
:on-exceed="fileExceed"
|
||||
accept=".xls, .xlsx"
|
||||
:limit="1"
|
||||
style="display: flex"
|
||||
>
|
||||
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||
:action="upload.url + '?id=' + upload.id" :disabled="upload.isUploading"
|
||||
:on-success="handleFileSuccess" :auto-upload="true"
|
||||
:show-file-list="false"
|
||||
>
|
||||
<el-button
|
||||
style="height: 100%; margin-left: 6px"
|
||||
icon="el-icon-download"
|
||||
|
|
@ -96,6 +92,7 @@ import {
|
|||
import { formLabelTower, columnsListTower, dialogConfigTowerAdd } from '../config-tower'
|
||||
import { commonMixin } from '../../mixins/common'
|
||||
import TableTowerAdd from './table-tower-add.vue'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'tower',
|
||||
props: {
|
||||
|
|
@ -161,6 +158,13 @@ export default {
|
|||
},
|
||||
fileExceed() {
|
||||
this.$modal.msgError('最多上传1个文件!')
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.isUploading = false
|
||||
this.$refs.upload.clearFiles()
|
||||
this.$alert('<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' + response.msg + '</div>', '导入结果', { dangerouslyUseHTMLString: true })
|
||||
this.$refs.tableRef.getTableList()
|
||||
},
|
||||
},
|
||||
mixins: [commonMixin],
|
||||
|
|
@ -171,12 +175,27 @@ export default {
|
|||
this.sendParams = {
|
||||
id: this.sendData.id
|
||||
}
|
||||
this.upload.id=this.sendData.id;
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.sendData, '-----------')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的用户数据
|
||||
id: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/base/tbProPower/importData'
|
||||
},
|
||||
// 搜索区表单配置项
|
||||
formLabelTower,
|
||||
// 表格导出id列表
|
||||
|
|
|
|||
|
|
@ -102,10 +102,14 @@ export default {
|
|||
submitForm() {
|
||||
const userId = this.form.userId;
|
||||
const roleIds = this.roleIds.join(",");
|
||||
if(this.roleIds.length>1){
|
||||
this.$modal.msgError('最多只能勾选一个角色!!!')
|
||||
}else{
|
||||
updateAuthRole({ userId: userId, roleIds: roleIds }).then((response) => {
|
||||
this.$modal.msgSuccess("授权成功");
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 关闭按钮 */
|
||||
close() {
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="角色" prop="roleIds">
|
||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色" multiple-limit="1">
|
||||
<el-option
|
||||
v-for="item in roleOptions"
|
||||
:key="item.roleId"
|
||||
|
|
|
|||
Loading…
Reference in New Issue