From dcdf423d669e64a9cbe5bd5854a000b78af1f7fe Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 16 三月 2022 14:06:00 +0800 Subject: [PATCH] update 更新 sqlserver sql脚本 处理遇到的问题 --- ruoyi-ui/src/views/system/role/index.vue | 78 ++++++++++++++++----------------------- 1 files changed, 32 insertions(+), 46 deletions(-) diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 1aee567..a120245 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -1,12 +1,11 @@ <template> <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form-item label="瑙掕壊鍚嶇О" prop="roleName"> <el-input v-model="queryParams.roleName" placeholder="璇疯緭鍏ヨ鑹插悕绉�" clearable - size="small" style="width: 240px" @keyup.enter.native="handleQuery" /> @@ -16,7 +15,6 @@ v-model="queryParams.roleKey" placeholder="璇疯緭鍏ユ潈闄愬瓧绗�" clearable - size="small" style="width: 240px" @keyup.enter.native="handleQuery" /> @@ -26,7 +24,6 @@ v-model="queryParams.status" placeholder="瑙掕壊鐘舵��" clearable - size="small" style="width: 240px" > <el-option @@ -40,7 +37,6 @@ <el-form-item label="鍒涘缓鏃堕棿"> <el-date-picker v-model="dateRange" - size="small" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" @@ -94,7 +90,6 @@ plain icon="el-icon-download" size="mini" - :loading="exportLoading" @click="handleExport" v-hasPermi="['system:role:export']" >瀵煎嚭</el-button> @@ -192,15 +187,15 @@ <el-form-item label="鑿滃崟鏉冮檺"> <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">灞曞紑/鎶樺彔</el-checkbox> <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">鍏ㄩ��/鍏ㄤ笉閫�</el-checkbox> - <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">鐖跺瓙鑱斿姩</el-checkbox> + <el-checkbox v-model="form.menuCheckStrictly == 1" @change="handleCheckedTreeConnect($event, 'menu')">鐖跺瓙鑱斿姩</el-checkbox> <el-tree class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id" - :check-strictly="!form.menuCheckStrictly" - empty-text="鍔犺浇涓紝璇风◢鍚�" + :check-strictly="!form.menuCheckStrictly == 1" + empty-text="鍔犺浇涓紝璇风◢鍊�" :props="defaultProps" ></el-tree> </el-form-item> @@ -236,7 +231,7 @@ <el-form-item label="鏁版嵁鏉冮檺" v-show="form.dataScope == 2"> <el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">灞曞紑/鎶樺彔</el-checkbox> <el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">鍏ㄩ��/鍏ㄤ笉閫�</el-checkbox> - <el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">鐖跺瓙鑱斿姩</el-checkbox> + <el-checkbox v-model="form.deptCheckStrictly == 1" @change="handleCheckedTreeConnect($event, 'dept')">鐖跺瓙鑱斿姩</el-checkbox> <el-tree class="tree-border" :data="deptOptions" @@ -244,8 +239,8 @@ default-expand-all ref="dept" node-key="id" - :check-strictly="!form.deptCheckStrictly" - empty-text="鍔犺浇涓紝璇风◢鍚�" + :check-strictly="!form.deptCheckStrictly == 1" + empty-text="鍔犺浇涓紝璇风◢鍊�" :props="defaultProps" ></el-tree> </el-form-item> @@ -270,8 +265,6 @@ return { // 閬僵灞� loading: true, - // 瀵煎嚭閬僵灞� - exportLoading: false, // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� @@ -358,8 +351,7 @@ /** 鏌ヨ瑙掕壊鍒楄〃 */ getList() { this.loading = true; - listRole(this.addDateRange(this.queryParams, this.dateRange)).then( - response => { + listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => { this.roleList = response.rows; this.total = response.total; this.loading = false; @@ -413,17 +405,13 @@ // 瑙掕壊鐘舵�佷慨鏀� handleStatusChange(row) { let text = row.status === "0" ? "鍚敤" : "鍋滅敤"; - this.$confirm('纭瑕�"' + text + '""' + row.roleName + '"瑙掕壊鍚�?', "璀﹀憡", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning" - }).then(function() { - return changeRoleStatus(row.roleId, row.status); - }).then(() => { - this.msgSuccess(text + "鎴愬姛"); - }).catch(function() { - row.status = row.status === "0" ? "1" : "0"; - }); + this.$modal.confirm('纭瑕�"' + text + '""' + row.roleName + '"瑙掕壊鍚楋紵').then(function() { + return changeRoleStatus(row.roleId, row.status); + }).then(() => { + this.$modal.msgSuccess(text + "鎴愬姛"); + }).catch(function() { + row.status = row.status === "0" ? "1" : "0"; + }); }, // 鍙栨秷鎸夐挳 cancel() { @@ -452,8 +440,8 @@ status: "0", menuIds: [], deptIds: [], - menuCheckStrictly: true, - deptCheckStrictly: true, + menuCheckStrictly: 1, + deptCheckStrictly: 1, remark: undefined }; this.resetForm("form"); @@ -513,9 +501,9 @@ // 鏍戞潈闄愶紙鐖跺瓙鑱斿姩锛� handleCheckedTreeConnect(value, type) { if (type == 'menu') { - this.form.menuCheckStrictly = value ? true: false; + this.form.menuCheckStrictly = value ? 1: 0; } else if (type == 'dept') { - this.form.deptCheckStrictly = value ? true: false; + this.form.deptCheckStrictly = value ? 1: 0; } }, /** 鏂板鎸夐挳鎿嶄綔 */ @@ -579,14 +567,14 @@ if (this.form.roleId != undefined) { this.form.menuIds = this.getMenuAllCheckedKeys(); updateRole(this.form).then(response => { - this.msgSuccess("淇敼鎴愬姛"); + this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; this.getList(); }); } else { this.form.menuIds = this.getMenuAllCheckedKeys(); addRole(this.form).then(response => { - this.msgSuccess("鏂板鎴愬姛"); + this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; this.getList(); }); @@ -599,7 +587,7 @@ if (this.form.roleId != undefined) { this.form.deptIds = this.getDeptAllCheckedKeys(); dataScope(this.form).then(response => { - this.msgSuccess("淇敼鎴愬姛"); + this.$modal.msgSuccess("淇敼鎴愬姛"); this.openDataScope = false; this.getList(); }); @@ -608,21 +596,19 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const roleIds = row.roleId || this.ids; - this.$confirm('鏄惁纭鍒犻櫎瑙掕壊缂栧彿涓�"' + roleIds + '"鐨勬暟鎹」?', "璀﹀憡", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning" - }).then(function() { - return delRole(roleIds); - }).then(() => { - this.getList(); - this.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); + this.$modal.confirm('鏄惁纭鍒犻櫎瑙掕壊缂栧彿涓�"' + roleIds + '"鐨勬暟鎹」锛�').then(function() { + return delRole(roleIds); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.downLoadExcel('/system/role/export', this.queryParams); + this.download('system/role/export', { + ...this.queryParams + }, `role_${new Date().getTime()}.xlsx`) } } }; -</script> \ No newline at end of file +</script> -- Gitblit v1.9.3