From 8fd8f7a44cc7e2fa8c49dbbb3762fb53d0026b32 Mon Sep 17 00:00:00 2001 From: zhanglipeng Date: Sun, 8 Aug 2021 11:33:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B6=E5=BA=AD=E6=95=99=E8=82=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 2 + ruoyi-ui/src/assets/styles/index.scss | 6 + ruoyi-ui/src/layout/components/AppMain.vue | 4 +- ruoyi-ui/src/main.js | 4 + .../src/views/benyi/familyedu_study/index.vue | 646 +++++++++++++----- ruoyi-ui/src/views/system/user/index.vue | 185 ++--- .../views/system/user/profile/resetPwd.vue | 152 ++--- .../views/system/user/profile/userAvatar.vue | 274 ++++---- .../views/system/user/profile/userInfo.vue | 160 ++--- 9 files changed, 869 insertions(+), 564 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index e018b5b21..3cf012bb9 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -111,6 +111,8 @@ "serve-static": "^1.13.2", "svg-sprite-loader": "4.1.3", "svgo": "1.2.0", + "swiper": "^5.3.7", + "vue-awesome-swiper": "^4.1.0", "vue-template-compiler": "2.6.10" }, "engines": { diff --git a/ruoyi-ui/src/assets/styles/index.scss b/ruoyi-ui/src/assets/styles/index.scss index 505e1b802..7b9f52ba1 100644 --- a/ruoyi-ui/src/assets/styles/index.scss +++ b/ruoyi-ui/src/assets/styles/index.scss @@ -253,3 +253,9 @@ li { } } } + +.vue-treeselect__control { + height: 34px !important; + line-height: 34px; + overflow: hidden; +} \ No newline at end of file diff --git a/ruoyi-ui/src/layout/components/AppMain.vue b/ruoyi-ui/src/layout/components/AppMain.vue index 423437b72..1266d598f 100644 --- a/ruoyi-ui/src/layout/components/AppMain.vue +++ b/ruoyi-ui/src/layout/components/AppMain.vue @@ -25,7 +25,7 @@ export default { \ No newline at end of file + diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index f0cde0972..024a05e81 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -236,15 +236,15 @@ - + - - + + - + - + - + - + - + --> - + - + - + - + { + this.getDicts('sys_normal_disable').then(response => { this.statusOptions = response.data; }); - this.getDicts("sys_user_sex").then((response) => { + this.getDicts('sys_user_sex').then(response => { this.sexOptions = response.data; }); - this.getConfigKey("sys.user.initPassword").then((response) => { + this.getConfigKey('sys.user.initPassword').then(response => { this.initPassword = response.msg; }); }, @@ -535,7 +535,7 @@ export default { getList() { this.loading = true; listUser(this.addDateRange(this.queryParams, this.dateRange)).then( - (response) => { + response => { this.userList = response.rows; this.total = response.total; this.loading = false; @@ -544,7 +544,7 @@ export default { }, /** 查询部门下拉树结构 */ getTreeselect() { - treeselect().then((response) => { + treeselect().then(response => { this.deptOptions = response.data; //console.log(this.deptOptions); }); @@ -561,24 +561,24 @@ export default { }, // 用户状态修改 handleStatusChange(row) { - let text = row.status === "0" ? "启用" : "停用"; + let text = row.status === '0' ? '启用' : '停用'; this.$confirm( '确认要"' + text + '""' + row.userName + '"用户吗?', - "警告", + '警告', { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } ) - .then(function () { + .then(function() { return changeUserStatus(row.userId, row.status); }) .then(() => { - this.msgSuccess(text + "成功"); + this.msgSuccess(text + '成功'); }) - .catch(function () { - row.status = row.status === "0" ? "1" : "0"; + .catch(function() { + row.status = row.status === '0' ? '1' : '0'; }); }, // 取消按钮 @@ -595,12 +595,12 @@ export default { nickName: undefined, password: undefined, sex: undefined, - status: "0", + status: '0', remark: undefined, postIds: [], - roleIds: [], + roleIds: [] }; - this.resetForm("form"); + this.resetForm('form'); }, /** 搜索按钮操作 */ handleQuery() { @@ -610,12 +610,12 @@ export default { /** 重置按钮操作 */ resetQuery() { this.dateRange = []; - this.resetForm("queryForm"); + this.resetForm('queryForm'); this.handleQuery(); }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map((item) => item.userId); + this.ids = selection.map(item => item.userId); this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -623,18 +623,18 @@ export default { handleAdd() { this.reset(); this.getTreeselect(); - getUser().then((response) => { + getUser().then(response => { this.postOptions = response.posts; this.roleOptions = response.roles; //console.log("school="+response.isSchool); - if (response.isSchool == "0") { + if (response.isSchool == '0') { this.isSchool = true; this.kindergartenOptions = response.kindergartens; } else { this.isSchool = false; } this.open = true; - this.title = "添加用户"; + this.title = '添加用户'; this.form.password = this.initPassword; }); }, @@ -643,7 +643,7 @@ export default { this.reset(); this.getTreeselect(); const userId = row.userId || this.ids; - getUser(userId).then((response) => { + getUser(userId).then(response => { this.form = response.data; this.postOptions = response.posts; this.roleOptions = response.roles; @@ -651,27 +651,27 @@ export default { this.form.roleIds = response.roleIds; this.form.deptIds = response.kindergartenIds; //console.log("school="+response.isSchool); - if (response.isSchool == "0") { + if (response.isSchool == '0') { this.isSchool = true; this.kindergartenOptions = response.kindergartens; } else { this.isSchool = false; } this.open = true; - this.title = "修改用户"; - this.form.password = ""; + this.title = '修改用户'; + this.form.password = ''; }); }, /** 重置密码按钮操作 */ handleResetPwd(row) { - this.$prompt('请输入"' + row.userName + '"的新密码', "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", + this.$prompt('请输入"' + row.userName + '"的新密码', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消' }) .then(({ value }) => { - resetUserPwd(row.userId, value).then((response) => { + resetUserPwd(row.userId, value).then(response => { if (response.code === 200) { - this.msgSuccess("修改成功,新密码是:" + value); + this.msgSuccess('修改成功,新密码是:' + value); } else { this.msgError(response.msg); } @@ -680,13 +680,13 @@ export default { .catch(() => {}); }, /** 提交按钮 */ - submitForm: function () { - this.$refs["form"].validate((valid) => { + submitForm: function() { + this.$refs['form'].validate(valid => { if (valid) { if (this.form.userId != undefined) { - updateUser(this.form).then((response) => { + updateUser(this.form).then(response => { if (response.code === 200) { - this.msgSuccess("修改成功"); + this.msgSuccess('修改成功'); this.open = false; this.getList(); } else { @@ -694,9 +694,9 @@ export default { } }); } else { - addUser(this.form).then((response) => { + addUser(this.form).then(response => { if (response.code === 200) { - this.msgSuccess("新增成功"); + this.msgSuccess('新增成功'); this.open = false; this.getList(); } else { @@ -712,46 +712,46 @@ export default { const userIds = row.userId || this.ids; this.$confirm( '是否确认删除用户编号为"' + userIds + '"的数据项?', - "警告", + '警告', { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' } ) - .then(function () { + .then(function() { return delUser(userIds); }) .then(() => { this.getList(); - this.msgSuccess("删除成功"); + this.msgSuccess('删除成功'); }) - .catch(function () {}); + .catch(function() {}); }, /** 导出按钮操作 */ handleExport() { const queryParams = this.queryParams; - this.$confirm("是否确认导出所有用户数据项?", "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", + this.$confirm('是否确认导出所有用户数据项?', '警告', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' }) - .then(function () { + .then(function() { return exportUser(queryParams); }) - .then((response) => { + .then(response => { this.download(response.msg); }) - .catch(function () {}); + .catch(function() {}); }, /** 导入按钮操作 */ handleImport() { - this.upload.title = "用户导入"; + this.upload.title = '用户导入'; this.upload.open = true; }, /** 下载模板操作 */ importTemplate() { - importTemplate().then((response) => { + importTemplate().then(response => { this.download(response.msg); }); }, @@ -764,17 +764,20 @@ export default { this.upload.open = false; this.upload.isUploading = false; this.$refs.upload.clearFiles(); - this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); + this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true }); this.getList(); }, // 提交上传文件 submitFileForm() { this.$refs.upload.submit(); - }, - }, + } + } };