Commit f9cd4881 authored by huangjie's avatar huangjie

*

parent 5ae1a6dd
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
}) })
}) })
this.navbarWidth=`calc(100% - ${this.offsetWidth}px)` this.navbarWidth=`calc(100% - ${this.offsetWidth}px)`
this.$refs.mydrodown.show() // this.$refs.mydrodown.show()
this.getTetant() this.getTetant()
}, },
methods: { methods: {
......
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
const TokenKey = 'Admin-Token' const TokenKey = 'Admin-Token'
const Tenantid = 'Tenant-Id' const Tenantid = 'Tenantid'
export function getToken() { export function getToken() {
return Cookies.get(TokenKey) return Cookies.get(TokenKey)
......
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
<script> <script>
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user"; import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { getToken } from "@/utils/auth"; import { getToken ,getTenantid} from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
...@@ -458,7 +458,7 @@ export default { ...@@ -458,7 +458,7 @@ export default {
// 是否更新已经存在的用户数据 // 是否更新已经存在的用户数据
updateSupport: 0, updateSupport: 0,
// 设置上传的请求头部 // 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() }, headers: { Authorization: "Bearer " + getToken() ,Tenantid: getTenantid()},
// 上传的地址 // 上传的地址
url: process.env.VUE_APP_BASE_API + "/system/user/importData" url: process.env.VUE_APP_BASE_API + "/system/user/importData"
}, },
...@@ -664,15 +664,27 @@ export default { ...@@ -664,15 +664,27 @@ export default {
this.form.userName = this.form.phonenumber this.form.userName = this.form.phonenumber
if (this.form.userId != undefined) { if (this.form.userId != undefined) {
updateUser(this.form).then(response => { updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); if(response.code == 200){
this.open = false; this.$modal.msgSuccess("修改成功");
this.getList(); this.open = false;
this.getList();
}else{
this.$modal.msgError(response.msg);
this.open = false;
this.getList();
}
}); });
} else { } else {
addUser(this.form).then(response => { addUser(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); if(response.code == 200){
this.open = false; this.$modal.msgSuccess("新增成功");
this.getList(); this.open = false;
this.getList();
}else{
this.$modal.msgError(response.msg);
this.open = false;
this.getList();
}
}); });
} }
} }
...@@ -719,7 +731,11 @@ export default { ...@@ -719,7 +731,11 @@ export default {
this.upload.open = false; this.upload.open = false;
this.upload.isUploading = false; this.upload.isUploading = false;
this.$refs.upload.clearFiles(); 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 }); if(response.code == 200){
this.$message.success('导入成功!')
}else{
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
}
this.getList(); this.getList();
}, },
// 提交上传文件 // 提交上传文件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment