From a89cf3ce016cf0e5b34d4e3f7a37422bef5149ba Mon Sep 17 00:00:00 2001 From: zhanglipeng Date: Thu, 12 Aug 2021 21:57:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E5=9E=8B=E8=AF=BE=E7=A8=8B=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/benyi/microcoursestudy/index.vue | 26 +-- ruoyi-ui/src/views/system/user/index.vue | 208 ++++++++++-------- 2 files changed, 115 insertions(+), 119 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue index 16c22b087..e177b6c61 100644 --- a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue +++ b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue @@ -152,30 +152,12 @@ export default { margin: 10px 0; } } -.box-card-case { - margin: 0; - font-size: 14px; - font-weight: 700; - display: flex; - align-items: center; - &::before { - content: ""; - margin-right: 8px; - width: 4px; - height: 14px; - background: #2c3e50; - } - &.mr { - margin: 10px 0; - } -} -.box-card-info { - font-size: 14px; - font-weight: 700; -} .pad-left { padding-left: 15px; text-align: center; + font-size: 20px; + font-weight: 700; + line-height: 40px; } // 禁止复制 div { @@ -192,6 +174,6 @@ div { } .tree { overflow:auto; - max-height: 300px; + max-height: 600px; } \ 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 580ca3d86..7242080bd 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -11,21 +11,26 @@ size="small" prefix-icon="el-icon-search" /> - -

- {{ deptOptions[0] && deptOptions[0].label }} -

+
+ + +

+ {{ deptOptions[0] && deptOptions[0].label }} +

+
@@ -146,7 +151,12 @@ :data="userList" @selection-change="handleSelectionChange" > - + { + 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; }); }, @@ -539,7 +549,7 @@ export default { isShow(row) { if (row.remark == "xn") { return false; - } else { + } else { return true; } }, @@ -547,7 +557,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; @@ -556,7 +566,7 @@ export default { }, /** 查询部门下拉树结构 */ getTreeselect() { - treeselect().then(response => { + treeselect().then((response) => { this.deptOptions = response.data; //console.log(this.deptOptions); }); @@ -573,24 +583,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"; }); }, // 取消按钮 @@ -607,12 +617,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() { @@ -622,12 +632,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; }, @@ -635,18 +645,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; }); }, @@ -655,7 +665,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; @@ -663,27 +673,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); } @@ -692,13 +702,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 { @@ -706,9 +716,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 { @@ -724,46 +734,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); }); }, @@ -776,19 +786,19 @@ 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(); - } - } + }, + }, };