diff --git a/src/components/DictData/index.js b/src/components/DictData/index.js
index 7b85d4a..8bffdb5 100644
--- a/src/components/DictData/index.js
+++ b/src/components/DictData/index.js
@@ -46,4 +46,4 @@ function install() {
export default {
install,
-}
\ No newline at end of file
+}
diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue
index 6bb5a18..6ee16d4 100644
--- a/src/components/Editor/index.vue
+++ b/src/components/Editor/index.vue
@@ -172,11 +172,11 @@ export default {
// 获取富文本组件实例
let quill = this.Quill;
// 如果上传成功
- if (res.code == 200) {
+ if (res.data.code == 200) {
// 获取光标所在位置
let length = quill.getSelection().index;
- // 插入图片 res.url为服务器返回的图片地址
- quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
+ // 插入图片 res.data.url为服务器返回的图片地址
+ quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.data.fileName);
// 调整光标到最后
quill.setSelection(length + 1);
} else {
diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue
index 6c583cf..b7da7e2 100644
--- a/src/components/FileUpload/index.vue
+++ b/src/components/FileUpload/index.vue
@@ -146,13 +146,13 @@ export default {
},
// 上传成功回调
handleUploadSuccess(res, file) {
- if (res.code === 200) {
- this.uploadList.push({ name: res.fileName, url: res.fileName });
+ if (res.data.code === 200) {
+ this.uploadList.push({ name: res.data.fileName, url: res.data.fileName });
this.uploadedSuccessfully();
} else {
this.number--;
this.$modal.closeLoading();
- this.$modal.msgError(res.msg);
+ this.$modal.msgError(res.data.msg);
this.$refs.fileUpload.handleRemove(file);
this.uploadedSuccessfully();
}
diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue
index b57a15e..0357806 100644
--- a/src/components/ImageUpload/index.vue
+++ b/src/components/ImageUpload/index.vue
@@ -19,7 +19,7 @@
>
-
+
请上传
@@ -154,13 +154,13 @@ export default {
},
// 上传成功回调
handleUploadSuccess(res, file) {
- if (res.code === 200) {
- this.uploadList.push({ name: res.fileName, url: res.fileName });
+ if (res.data.code === 200) {
+ this.uploadList.push({ name: res.data.fileName, url: res.data.fileName });
this.uploadedSuccessfully();
} else {
this.number--;
this.$modal.closeLoading();
- this.$modal.msgError(res.msg);
+ this.$modal.msgError(res.data.msg);
this.$refs.imageUpload.handleRemove(file);
this.uploadedSuccessfully();
}
diff --git a/src/plugins/download.js b/src/plugins/download.js
index ffb8c14..26db158 100644
--- a/src/plugins/download.js
+++ b/src/plugins/download.js
@@ -19,7 +19,7 @@ export default {
const isBlob = blobValidate(res.data);
if (isBlob) {
const blob = new Blob([res.data])
- this.saveAs(blob, decodeURIComponent(res.headers['download-filename']))
+ this.saveAs(blob, decodeURIComponent(res.data.headers['download-filename']))
} else {
this.printErrMsg(res.data);
}
@@ -36,7 +36,7 @@ export default {
const isBlob = blobValidate(res.data);
if (isBlob) {
const blob = new Blob([res.data])
- this.saveAs(blob, decodeURIComponent(res.headers['download-filename']))
+ this.saveAs(blob, decodeURIComponent(res.data.headers['download-filename']))
} else {
this.printErrMsg(res.data);
}
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index cdbab1e..a51a457 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -41,8 +41,8 @@ const user = {
const uuid = userInfo.uuid
return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => {
- setToken(res.token)
- commit('SET_TOKEN', res.token)
+ setToken(res.data)
+ commit('SET_TOKEN', res.data)
resolve()
}).catch(error => {
reject(error)
@@ -54,11 +54,11 @@ const user = {
GetInfo({ commit, state }) {
return new Promise((resolve, reject) => {
getInfo().then(res => {
- const user = res.user
+ const user = res.data.user
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
- if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
- commit('SET_ROLES', res.roles)
- commit('SET_PERMISSIONS', res.permissions)
+ if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
+ commit('SET_ROLES', res.data.roles)
+ commit('SET_PERMISSIONS', res.data.permissions)
} else {
commit('SET_ROLES', ['ROLE_DEFAULT'])
}
diff --git a/src/utils/dict/DictOptions.js b/src/utils/dict/DictOptions.js
index 338a94e..5abfb3e 100644
--- a/src/utils/dict/DictOptions.js
+++ b/src/utils/dict/DictOptions.js
@@ -38,7 +38,7 @@ export const options = {
function responseConverter(response, dictMeta) {
const dicts = response.content instanceof Array ? response.content : response
if (dicts === undefined) {
- console.warn(`no dict data of "${dictMeta.type}" found in the response`)
+ console.warn(`在响应中未找到“${dictMeta.type}”的字典数据`)
return []
}
return dicts.map(d => dictConverter(d, dictMeta))
diff --git a/src/views/login.vue b/src/views/login.vue
index 95cff50..f2be5e5 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -110,10 +110,10 @@ export default {
methods: {
getCode() {
getCodeImg().then(res => {
- this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
+ this.captchaEnabled = res.data.captchaEnabled === undefined ? true : res.data.captchaEnabled;
if (this.captchaEnabled) {
- this.codeUrl = "data:image/gif;base64," + res.img;
- this.loginForm.uuid = res.uuid;
+ this.codeUrl = "data:image/gif;base64," + res.data.img;
+ this.loginForm.uuid = res.data.uuid;
}
});
},
diff --git a/src/views/monitor/job/index.vue b/src/views/monitor/job/index.vue
index 892c727..6cd0fb6 100644
--- a/src/views/monitor/job/index.vue
+++ b/src/views/monitor/job/index.vue
@@ -356,8 +356,8 @@ export default {
getList() {
this.loading = true;
listJob(this.queryParams).then(response => {
- this.jobList = response.rows;
- this.total = response.total;
+ this.jobList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
});
},
diff --git a/src/views/monitor/job/log.vue b/src/views/monitor/job/log.vue
index 60bee1d..c90a028 100644
--- a/src/views/monitor/job/log.vue
+++ b/src/views/monitor/job/log.vue
@@ -233,8 +233,8 @@ export default {
getList() {
this.loading = true;
listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.jobLogList = response.rows;
- this.total = response.total;
+ this.jobLogList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);
diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue
index d6af834..6cb04f1 100644
--- a/src/views/monitor/logininfor/index.vue
+++ b/src/views/monitor/logininfor/index.vue
@@ -175,8 +175,8 @@ export default {
getList() {
this.loading = true;
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.list = response.rows;
- this.total = response.total;
+ this.list = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);
diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue
index ad613c9..e5ebd70 100644
--- a/src/views/monitor/online/index.vue
+++ b/src/views/monitor/online/index.vue
@@ -92,8 +92,8 @@ export default {
getList() {
this.loading = true;
list(this.queryParams).then(response => {
- this.list = response.rows;
- this.total = response.total;
+ this.list = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
});
},
diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue
index 988f983..cdb0c4a 100644
--- a/src/views/monitor/operlog/index.vue
+++ b/src/views/monitor/operlog/index.vue
@@ -254,8 +254,8 @@ export default {
getList() {
this.loading = true;
list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
- this.list = response.rows;
- this.total = response.total;
+ this.list = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);
diff --git a/src/views/register.vue b/src/views/register.vue
index 396d582..e91c593 100644
--- a/src/views/register.vue
+++ b/src/views/register.vue
@@ -113,10 +113,10 @@ export default {
methods: {
getCode() {
getCodeImg().then(res => {
- this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
+ this.captchaEnabled = res.data.captchaEnabled === undefined ? true : res.data.captchaEnabled;
if (this.captchaEnabled) {
- this.codeUrl = "data:image/gif;base64," + res.img;
- this.registerForm.uuid = res.uuid;
+ this.codeUrl = "data:image/gif;base64," + res.data.img;
+ this.registerForm.uuid = res.data.uuid;
}
});
},
diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue
index 3ab81fc..90dce80 100644
--- a/src/views/system/config/index.vue
+++ b/src/views/system/config/index.vue
@@ -240,8 +240,8 @@ export default {
getList() {
this.loading = true;
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.configList = response.rows;
- this.total = response.total;
+ this.configList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);
diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue
index 0b5a8f3..56e5661 100644
--- a/src/views/system/dict/data.vue
+++ b/src/views/system/dict/data.vue
@@ -295,8 +295,8 @@ export default {
getList() {
this.loading = true;
listData(this.queryParams).then(response => {
- this.dataList = response.rows;
- this.total = response.total;
+ this.dataList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
});
},
@@ -399,4 +399,4 @@ export default {
}
}
};
-
\ No newline at end of file
+
diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index 6ca5457..6d4a9c4 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -244,8 +244,8 @@ export default {
getList() {
this.loading = true;
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.typeList = response.rows;
- this.total = response.total;
+ this.typeList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);
@@ -344,4 +344,4 @@ export default {
}
}
};
-
\ No newline at end of file
+
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index 7982b54..a2e92fd 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -224,8 +224,8 @@ export default {
getList() {
this.loading = true;
listNotice(this.queryParams).then(response => {
- this.noticeList = response.rows;
- this.total = response.total;
+ this.noticeList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
});
},
diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue
index 444bf63..195f438 100644
--- a/src/views/system/post/index.vue
+++ b/src/views/system/post/index.vue
@@ -214,8 +214,8 @@ export default {
getList() {
this.loading = true;
listPost(this.queryParams).then(response => {
- this.postList = response.rows;
- this.total = response.total;
+ this.postList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
});
},
diff --git a/src/views/system/role/authUser.vue b/src/views/system/role/authUser.vue
index 147aa33..db7a89e 100644
--- a/src/views/system/role/authUser.vue
+++ b/src/views/system/role/authUser.vue
@@ -143,8 +143,8 @@ export default {
getList() {
this.loading = true;
allocatedUserList(this.queryParams).then(response => {
- this.userList = response.rows;
- this.total = response.total;
+ this.userList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);
@@ -196,4 +196,4 @@ export default {
}
}
};
-
\ No newline at end of file
+
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index fb3b5ef..f0d9ad9 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -349,8 +349,8 @@ export default {
getList() {
this.loading = true;
listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.roleList = response.rows;
- this.total = response.total;
+ this.roleList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);
@@ -382,14 +382,14 @@ export default {
/** 根据角色ID查询菜单树结构 */
getRoleMenuTreeselect(roleId) {
return roleMenuTreeselect(roleId).then(response => {
- this.menuOptions = response.menus;
+ this.menuOptions = response.data.menus;
return response;
});
},
/** 根据角色ID查询部门树结构 */
getDeptTree(roleId) {
return deptTreeSelect(roleId).then(response => {
- this.deptOptions = response.depts;
+ this.deptOptions = response.data.depts;
return response;
});
},
@@ -514,7 +514,7 @@ export default {
this.open = true;
this.$nextTick(() => {
roleMenu.then(res => {
- let checkedKeys = res.checkedKeys
+ let checkedKeys = res.data.checkedKeys
checkedKeys.forEach((v) => {
this.$nextTick(()=>{
this.$refs.menu.setChecked(v, true ,false);
@@ -540,7 +540,7 @@ export default {
this.openDataScope = true;
this.$nextTick(() => {
deptTreeSelect.then(res => {
- this.$refs.dept.setCheckedKeys(res.checkedKeys);
+ this.$refs.dept.setCheckedKeys(res.data.checkedKeys);
});
});
this.title = "分配数据权限";
@@ -602,4 +602,4 @@ export default {
}
}
};
-
\ No newline at end of file
+
diff --git a/src/views/system/role/selectUser.vue b/src/views/system/role/selectUser.vue
index b2b072f..ab6c0f5 100644
--- a/src/views/system/role/selectUser.vue
+++ b/src/views/system/role/selectUser.vue
@@ -103,8 +103,8 @@ export default {
// 查询表数据
getList() {
unallocatedUserList(this.queryParams).then(res => {
- this.userList = res.rows;
- this.total = res.total;
+ this.userList = res.data.rows;
+ this.total = res.data.total;
});
},
/** 搜索按钮操作 */
@@ -126,8 +126,8 @@ export default {
return;
}
authUserSelectAll({ roleId: roleId, userIds: userIds }).then(res => {
- this.$modal.msgSuccess(res.msg);
- if (res.code === 200) {
+ this.$modal.msgSuccess(res.data.msg);
+ if (res.data.code === 200) {
this.visible = false;
this.$emit("ok");
}
diff --git a/src/views/system/user/authRole.vue b/src/views/system/user/authRole.vue
index ab5e72f..7abe26a 100644
--- a/src/views/system/user/authRole.vue
+++ b/src/views/system/user/authRole.vue
@@ -33,7 +33,7 @@
-
+
@@ -71,8 +71,8 @@ export default {
if (userId) {
this.loading = true;
getAuthRole(userId).then((response) => {
- this.form = response.user;
- this.roles = response.roles;
+ this.form = response.data.user;
+ this.roles = response.data.roles;
this.total = this.roles.length;
this.$nextTick(() => {
this.roles.forEach((row) => {
@@ -114,4 +114,4 @@ export default {
},
},
};
-
\ No newline at end of file
+
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index ae87fe4..a81d1e2 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -462,7 +462,7 @@ export default {
this.getList();
this.getDeptTree();
this.getConfigKey("sys.user.initPassword").then(response => {
- this.initPassword = response.msg;
+ this.initPassword = response.data.msg;
});
},
methods: {
@@ -470,8 +470,8 @@ export default {
getList() {
this.loading = true;
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.userList = response.rows;
- this.total = response.total;
+ this.userList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);
@@ -562,8 +562,8 @@ export default {
handleAdd() {
this.reset();
getUser().then(response => {
- this.postOptions = response.posts;
- this.roleOptions = response.roles;
+ this.postOptions = response.data.posts;
+ this.roleOptions = response.data.roles;
this.open = true;
this.title = "添加用户";
this.form.password = this.initPassword;
@@ -574,11 +574,11 @@ export default {
this.reset();
const userId = row.userId || this.ids;
getUser(userId).then(response => {
- this.form = response.data;
- this.postOptions = response.posts;
- this.roleOptions = response.roles;
- this.$set(this.form, "postIds", response.postIds);
- this.$set(this.form, "roleIds", response.roleIds);
+ this.form = response.data.sysUser;
+ this.postOptions = response.data.posts;
+ this.roleOptions = response.data.roles;
+ this.$set(this.form, "postIds", response.data.postIds);
+ this.$set(this.form, "roleIds", response.data.roleIds);
this.open = true;
this.title = "修改用户";
this.form.password = "";
@@ -658,7 +658,7 @@ export default {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
- this.$alert("" + response.msg + "
", "导入结果", { dangerouslyUseHTMLString: true });
+ this.$alert("" + response.data.msg + "
", "导入结果", { dangerouslyUseHTMLString: true });
this.getList();
},
// 提交上传文件
@@ -667,4 +667,4 @@ export default {
}
}
};
-
\ No newline at end of file
+
diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue
index 529c564..c4b0dd2 100644
--- a/src/views/system/user/profile/index.vue
+++ b/src/views/system/user/profile/index.vue
@@ -81,9 +81,9 @@ export default {
methods: {
getUser() {
getUserProfile().then(response => {
- this.user = response.data;
- this.roleGroup = response.roleGroup;
- this.postGroup = response.postGroup;
+ this.user = response.data.sysUser;
+ this.roleGroup = response.data.roleGroup;
+ this.postGroup = response.data.postGroup;
});
}
}
diff --git a/src/views/system/user/profile/userAvatar.vue b/src/views/system/user/profile/userAvatar.vue
index 96aa01f..64df7a2 100644
--- a/src/views/system/user/profile/userAvatar.vue
+++ b/src/views/system/user/profile/userAvatar.vue
@@ -135,7 +135,7 @@ export default {
formData.append("avatarfile", data);
uploadAvatar(formData).then(response => {
this.open = false;
- this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
+ this.options.img = process.env.VUE_APP_BASE_API + response.data.imgUrl;
store.commit('SET_AVATAR', this.options.img);
this.$modal.msgSuccess("修改成功");
this.visible = false;
diff --git a/src/views/tool/gen/editTable.vue b/src/views/tool/gen/editTable.vue
index 951497a..317b1f7 100644
--- a/src/views/tool/gen/editTable.vue
+++ b/src/views/tool/gen/editTable.vue
@@ -183,7 +183,7 @@ export default {
const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
const genForm = this.$refs.genInfo.$refs.genInfoForm;
Promise.all([basicForm, genForm].map(this.getFormPromise)).then(res => {
- const validateResult = res.every(item => !!item);
+ const validateResult = res.data.every(item => !!item);
if (validateResult) {
const genTable = Object.assign({}, basicForm.model, genForm.model);
genTable.columns = this.columns;
@@ -194,8 +194,8 @@ export default {
parentMenuId: genTable.parentMenuId
};
updateGenTable(genTable).then(res => {
- this.$modal.msgSuccess(res.msg);
- if (res.code === 200) {
+ this.$modal.msgSuccess(res.data.msg);
+ if (res.data.code === 200) {
this.close();
}
});
diff --git a/src/views/tool/gen/importTable.vue b/src/views/tool/gen/importTable.vue
index 3ea9532..092ad24 100644
--- a/src/views/tool/gen/importTable.vue
+++ b/src/views/tool/gen/importTable.vue
@@ -85,8 +85,8 @@ export default {
getList() {
listDbTable(this.queryParams).then(res => {
if (res.code === 200) {
- this.dbTableList = res.rows;
- this.total = res.total;
+ this.dbTableList = res.data.rows;
+ this.total = res.data.total;
}
});
},
diff --git a/src/views/tool/gen/index.vue b/src/views/tool/gen/index.vue
index 3f1f930..5c733db 100644
--- a/src/views/tool/gen/index.vue
+++ b/src/views/tool/gen/index.vue
@@ -244,8 +244,8 @@ export default {
getList() {
this.loading = true;
listTable(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.tableList = response.rows;
- this.total = response.total;
+ this.tableList = response.data.rows;
+ this.total = response.data.total;
this.loading = false;
}
);