From e26e02fd97880a30b48a6fe086c1b3298903b970 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期五, 22 十一月 2024 11:04:43 +0800 Subject: [PATCH] 后台管理更新 --- se-ui/src/utils/request.js | 6 se-ui/public/index.html | 56 +++++--- se-ui/src/layout/components/Navbar.vue | 5 se-ui/src/permission.js | 13 +- se-ui/src/router/index.js | 4 se-ui/src/api/system/user.js | 20 ++ se-ui/src/views/login.vue | 4 se-ui/src/utils/jsencrypt.js | 19 +++ se-ui/.env.development | 2 se-ui/src/views/system/user/index.vue | 218 ++++++++++++++++++++++++++++------- se-ui/src/store/modules/user.js | 10 + 11 files changed, 267 insertions(+), 90 deletions(-) diff --git a/se-ui/.env.development b/se-ui/.env.development index caf7958..0cc7be0 100644 --- a/se-ui/.env.development +++ b/se-ui/.env.development @@ -11,4 +11,4 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true #椤圭洰瀛愯矾寰� -VUE_APP_ITEM_PATH = '' \ No newline at end of file +VUE_APP_ITEM_PATH = '/' \ No newline at end of file diff --git a/se-ui/public/index.html b/se-ui/public/index.html index 925455c..c7d88ba 100644 --- a/se-ui/public/index.html +++ b/se-ui/public/index.html @@ -1,14 +1,23 @@ <!DOCTYPE html> <html> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="renderer" content="webkit"> - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> - <link rel="icon" href="<%= BASE_URL %>favicon.ico"> - <title><%= webpackConfig.name %></title> - <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> - <style> + +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="renderer" content="webkit"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> + <link rel="icon" href="<%= BASE_URL %>favicon.ico"> + <title> + <%= webpackConfig.name %> + </title> + <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> + <!-- <script src="rsa.min.js"></script> --> + <!-- <script src="rollups.js"></script> --> + <script src="<%= BASE_URL %>config/rsa.min.js"></script> + + <script src="<%= BASE_URL %>config/rollups.js"></script> + + <style> html, body, #app { @@ -16,6 +25,7 @@ margin: 0px; padding: 0px; } + .chromeframe { margin: 0.2em 0; background: #ccc; @@ -92,6 +102,7 @@ -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); -ms-transform: rotate(360deg); @@ -105,6 +116,7 @@ -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); -ms-transform: rotate(360deg); @@ -194,15 +206,17 @@ opacity: 0.5; } </style> - </head> - <body> - <div id="app"> - <div id="loader-wrapper"> - <div id="loader"></div> - <div class="loader-section section-left"></div> - <div class="loader-section section-right"></div> - <div class="load_title">姝e湪鍔犺浇绯荤粺璧勬簮锛岃鑰愬績绛夊緟</div> - </div> - </div> - </body> -</html> +</head> + +<body> + <div id="app"> + <div id="loader-wrapper"> + <div id="loader"></div> + <div class="loader-section section-left"></div> + <div class="loader-section section-right"></div> + <div class="load_title">姝e湪鍔犺浇绯荤粺璧勬簮锛岃鑰愬績绛夊緟</div> + </div> + </div> +</body> + +</html> \ No newline at end of file diff --git a/se-ui/src/api/system/user.js b/se-ui/src/api/system/user.js index 468ba78..df953c7 100644 --- a/se-ui/src/api/system/user.js +++ b/se-ui/src/api/system/user.js @@ -1,5 +1,6 @@ import request from '@/utils/request' import { parseStrEmpty } from "@/utils/se"; +import { encr } from "@/utils/jsencrypt"; // 鏌ヨ鐢ㄦ埛鍒楄〃 export function listUser(query) { @@ -20,19 +21,27 @@ // 鏂板鐢ㄦ埛 export function addUser(data) { + let modifiedObject = { + ...data, + password: encr(data.password), + }; return request({ url: '/system/user', method: 'post', - data: data + data: modifiedObject }) } // 淇敼鐢ㄦ埛 export function updateUser(data) { + let modifiedObject = { + ...data, + password: encr(data.password), + }; return request({ url: '/system/user', method: 'put', - data: data + data: modifiedObject }) } @@ -45,7 +54,8 @@ } // 鐢ㄦ埛瀵嗙爜閲嶇疆 -export function resetUserPwd(userId, password) { +export function resetUserPwd(userId, newPassword) { + let password = encr(newPassword); const data = { userId, password @@ -88,7 +98,9 @@ } // 鐢ㄦ埛瀵嗙爜閲嶇疆 -export function updateUserPwd(oldPassword, newPassword) { +export function updateUserPwd(OPWD, NPWD) { + let oldPassword = encr(OPWD); + let newPassword = encr(NPWD); const data = { oldPassword, newPassword diff --git a/se-ui/src/layout/components/Navbar.vue b/se-ui/src/layout/components/Navbar.vue index c90562c..acc5355 100644 --- a/se-ui/src/layout/components/Navbar.vue +++ b/se-ui/src/layout/components/Navbar.vue @@ -103,9 +103,10 @@ }) .then(() => { this.$store.dispatch("LogOut").then(() => { - if ((process.env.ENV == "development")) { + console.log(process.env.NODE_ENV); + if (process.env.NODE_ENV == "development") { window.location.href = "http://localhost:8080/login"; - } else if ((process.env.ENV == "production")) { + } else if (process.env.NODE_ENV == "production") { window.location.href = window.location.origin + "/sso/login"; } }); diff --git a/se-ui/src/permission.js b/se-ui/src/permission.js index 78523d8..bec8366 100644 --- a/se-ui/src/permission.js +++ b/se-ui/src/permission.js @@ -16,9 +16,9 @@ to.meta.title && store.dispatch('settings/setTitle', to.meta.title) /* has token*/ if (to.path === '/login') { - if (process.env.ENV == 'development') { + if (process.env.NODE_ENV == 'development') { window.location.href = 'http://localhost:8080/login' - } else if (process.env.ENV == 'production') { + } else if (process.env.NODE_ENV == 'production') { window.location.href = window.location.origin + '/sso/login' } // next({ path: '/' }) @@ -39,9 +39,10 @@ }).catch(err => { store.dispatch('LogOut').then(() => { Message.error(err) - if (process.env.ENV == 'development') { + console.log(process.env.NODE_ENV); + if (process.env.NODE_ENV == 'development') { window.location.href = 'http://localhost:8080/login' - } else if (process.env.ENV == 'production') { + } else if (process.env.NODE_ENV == 'production') { window.location.href = window.location.origin + '/sso/login' } // next({ path: '/' }) @@ -57,9 +58,9 @@ // 鍦ㄥ厤鐧诲綍鐧藉悕鍗曪紝鐩存帴杩涘叆 next() } else { - if (process.env.ENV == 'development') { + if (process.env.NODE_ENV == 'development') { window.location.href = 'http://localhost:8080/login' - } else if (process.env.ENV == 'production') { + } else if (process.env.NODE_ENV == 'production') { window.location.href = window.location.origin + '/sso/login' } NProgress.done() diff --git a/se-ui/src/router/index.js b/se-ui/src/router/index.js index e504bad..7991978 100644 --- a/se-ui/src/router/index.js +++ b/se-ui/src/router/index.js @@ -64,8 +64,8 @@ { path: '', component: Layout, - redirect: '/login', - // redirect: 'system/user', + // redirect: '/login', + redirect: 'system/user', // children: [ // { // path: 'index', diff --git a/se-ui/src/store/modules/user.js b/se-ui/src/store/modules/user.js index 766d9c9..70530cf 100644 --- a/se-ui/src/store/modules/user.js +++ b/se-ui/src/store/modules/user.js @@ -1,5 +1,6 @@ import { login, logout, getInfo, refreshToken } from '@/api/login' import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth' +import { encr } from "@/utils/jsencrypt"; const user = { state: { @@ -38,8 +39,11 @@ actions: { // 鐧诲綍 Login({ commit }, userInfo) { + const username = userInfo.username.trim() - const password = userInfo.password + let pwd = encr(userInfo.password); + const password = pwd; + // const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid return new Promise((resolve, reject) => { @@ -79,7 +83,7 @@ }, // 鍒锋柊token - RefreshToken({commit, state}) { + RefreshToken({ commit, state }) { return new Promise((resolve, reject) => { refreshToken(state.token).then(res => { setExpiresIn(res.data) @@ -90,7 +94,7 @@ }) }) }, - + // 閫�鍑虹郴缁� LogOut({ commit, state }) { return new Promise((resolve, reject) => { diff --git a/se-ui/src/utils/jsencrypt.js b/se-ui/src/utils/jsencrypt.js index 78d9523..41f3742 100644 --- a/se-ui/src/utils/jsencrypt.js +++ b/se-ui/src/utils/jsencrypt.js @@ -28,3 +28,22 @@ return encryptor.decrypt(txt) // 瀵规暟鎹繘琛岃В瀵� } +// 鏂板姞瀵嗘柟寮� +export function encr(word) { + return CryptoJS.AES.encrypt( + CryptoJS.enc.Utf8.parse(word), + CryptoJS.enc.Utf8.parse(base64Decode('QSNzX3paM3NlUnZlX2sueQ==')), + { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 } + ).toString(); +} + +// 鏂拌В瀵嗘柟寮� +export function decr(word) { + return CryptoJS.enc.Utf8.stringify( + CryptoJS.AES.decrypt( + word, + // CryptoJS.enc.Utf8.parse(base64Decode('QSNzX3paM3NlUnZlX2sueQ==')), + { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 } + ) + ).toString(); +} \ No newline at end of file diff --git a/se-ui/src/utils/request.js b/se-ui/src/utils/request.js index 2ebc750..f93db4f 100644 --- a/se-ui/src/utils/request.js +++ b/se-ui/src/utils/request.js @@ -88,9 +88,11 @@ MessageBox.confirm('鐧诲綍鐘舵�佸凡杩囨湡锛屾偍鍙互缁х画鐣欏湪璇ラ〉闈紝鎴栬�呴噸鏂扮櫥褰�', '绯荤粺鎻愮ず', { confirmButtonText: '閲嶆柊鐧诲綍', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { - if ((process.env.ENV == "development")) { + console.log(process.env.NODE_ENV); + if (process.env.NODE_ENV == "development") { window.location.href = "http://localhost:8080/login"; - } else if ((process.env.ENV == "production")) { + } else if (process.env.NODE_ENV == "production") { + window.location.href = window.location.origin + "/sso/login"; } }) diff --git a/se-ui/src/views/login.vue b/se-ui/src/views/login.vue index 1053070..aad1cfd 100644 --- a/se-ui/src/views/login.vue +++ b/se-ui/src/views/login.vue @@ -93,7 +93,7 @@ this.getCookie(); }, methods: { - // getCode() { + getCode() { // getCodeImg().then(res => { // this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled; // if (this.captchaEnabled) { @@ -101,7 +101,7 @@ // this.loginForm.uuid = res.uuid; // } // }); - // }, + }, getCookie() { const username = Cookies.get("username"); const password = Cookies.get("password"); diff --git a/se-ui/src/views/system/user/index.vue b/se-ui/src/views/system/user/index.vue index 6b2a0aa..2951b32 100644 --- a/se-ui/src/views/system/user/index.vue +++ b/se-ui/src/views/system/user/index.vue @@ -29,7 +29,14 @@ </el-col> <!--鐢ㄦ埛鏁版嵁--> <el-col :span="20" :xs="24"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form + :model="queryParams" + ref="queryForm" + size="small" + :inline="true" + v-show="showSearch" + label-width="68px" + > <el-form-item label="鐢ㄦ埛鍚嶇О" prop="userName"> <el-input v-model="queryParams.userName" @@ -138,11 +145,45 @@ <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="50" align="center" /> - <el-table-column label="鐢ㄦ埛缂栧彿" align="center" key="userId" prop="userId" v-if="columns[0].visible" /> - <el-table-column label="鐢ㄦ埛鍚嶇О" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> - <el-table-column label="鐢ㄦ埛鏄电О" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" /> - <el-table-column label="閮ㄩ棬" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" /> - <el-table-column label="鎵嬫満鍙风爜" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" /> + <el-table-column + label="鐢ㄦ埛缂栧彿" + align="center" + key="userId" + prop="userId" + v-if="columns[0].visible" + /> + <el-table-column + label="鐢ㄦ埛鍚嶇О" + align="center" + key="userName" + prop="userName" + v-if="columns[1].visible" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鐢ㄦ埛鏄电О" + align="center" + key="nickName" + prop="nickName" + v-if="columns[2].visible" + :show-overflow-tooltip="true" + /> + <el-table-column + label="閮ㄩ棬" + align="center" + key="deptName" + prop="dept.deptName" + v-if="columns[3].visible" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鎵嬫満鍙风爜" + align="center" + key="phonenumber" + prop="phonenumber" + v-if="columns[4].visible" + width="120" + /> <el-table-column label="鐘舵��" align="center" key="status" v-if="columns[5].visible"> <template slot-scope="scope"> <el-switch @@ -153,7 +194,13 @@ ></el-switch> </template> </el-table-column> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" v-if="columns[6].visible" width="160"> + <el-table-column + label="鍒涘缓鏃堕棿" + align="center" + prop="createTime" + v-if="columns[6].visible" + width="160" + > <template slot-scope="scope"> <span>{{ parseTime(scope.row.createTime) }}</span> </template> @@ -179,13 +226,23 @@ @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']" >鍒犻櫎</el-button> - <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']"> + <el-dropdown + size="mini" + @command="(command) => handleCommand(command, scope.row)" + v-hasPermi="['system:user:resetPwd', 'system:user:edit']" + > <el-button size="mini" type="text" icon="el-icon-d-arrow-right">鏇村</el-button> <el-dropdown-menu slot="dropdown"> - <el-dropdown-item command="handleResetPwd" icon="el-icon-key" - v-hasPermi="['system:user:resetPwd']">閲嶇疆瀵嗙爜</el-dropdown-item> - <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" - v-hasPermi="['system:user:edit']">鍒嗛厤瑙掕壊</el-dropdown-item> + <el-dropdown-item + command="handleResetPwd" + icon="el-icon-key" + v-hasPermi="['system:user:resetPwd']" + >閲嶇疆瀵嗙爜</el-dropdown-item> + <el-dropdown-item + command="handleAuthRole" + icon="el-icon-circle-check" + v-hasPermi="['system:user:edit']" + >鍒嗛厤瑙掕壊</el-dropdown-item> </el-dropdown-menu> </el-dropdown> </template> @@ -213,7 +270,12 @@ </el-col> <el-col :span="12"> <el-form-item label="褰掑睘閮ㄩ棬" prop="deptId"> - <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" /> + <treeselect + v-model="form.deptId" + :options="deptOptions" + :show-count="true" + placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" + /> </el-form-item> </el-col> </el-row> @@ -237,7 +299,13 @@ </el-col> <el-col :span="12"> <el-form-item v-if="form.userId == undefined" label="鐢ㄦ埛瀵嗙爜" prop="password"> - <el-input v-model="form.password" placeholder="璇疯緭鍏ョ敤鎴峰瘑鐮�" type="password" maxlength="20" show-password/> + <el-input + v-model="form.password" + placeholder="璇疯緭鍏ョ敤鎴峰瘑鐮�" + type="password" + maxlength="20" + show-password + /> </el-form-item> </el-col> </el-row> @@ -323,13 +391,21 @@ drag > <i class="el-icon-upload"></i> - <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> + <div class="el-upload__text"> + 灏嗘枃浠舵嫋鍒版澶勶紝鎴� + <em>鐐瑰嚮涓婁紶</em> + </div> <div class="el-upload__tip text-center" slot="tip"> <div class="el-upload__tip" slot="tip"> - <el-checkbox v-model="upload.updateSupport" /> 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹� + <el-checkbox v-model="upload.updateSupport" />鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹� </div> <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span> - <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">涓嬭浇妯℃澘</el-link> + <el-link + type="primary" + :underline="false" + style="font-size:12px;vertical-align: baseline;" + @click="importTemplate" + >涓嬭浇妯℃澘</el-link> </div> </el-upload> <div slot="footer" class="dialog-footer"> @@ -341,14 +417,23 @@ </template> <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 Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { name: "User", - dicts: ['sys_normal_disable', 'sys_user_sex'], + dicts: ["sys_normal_disable", "sys_user_sex"], components: { Treeselect }, data() { return { @@ -426,15 +511,29 @@ rules: { userName: [ { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }, - { min: 2, max: 20, message: '鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿', trigger: 'blur' } + { + min: 2, + max: 20, + message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿", + trigger: "blur" + } ], nickName: [ { required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" } ], password: [ { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" }, - { min: 5, max: 20, message: '鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿', trigger: 'blur' }, - { pattern: /^[^<>"'|\\]+$/, message: "涓嶈兘鍖呭惈闈炴硶瀛楃锛�< > \" ' \\\ |", trigger: "blur" } + { + min: 5, + max: 20, + message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿", + trigger: "blur" + }, + { + pattern: /^[^<>"'|\\]+$/, + message: "涓嶈兘鍖呭惈闈炴硶瀛楃锛�< > \" ' \\ |", + trigger: "blur" + } ], email: [ { @@ -470,7 +569,8 @@ /** 鏌ヨ鐢ㄦ埛鍒楄〃 */ getList() { this.loading = true; - listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => { + listUser(this.addDateRange(this.queryParams, this.dateRange)).then( + response => { this.userList = response.rows; this.total = response.total; this.loading = false; @@ -496,13 +596,17 @@ // 鐢ㄦ埛鐘舵�佷慨鏀� handleStatusChange(row) { let text = row.status === "0" ? "鍚敤" : "鍋滅敤"; - this.$modal.confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵').then(function() { - return changeUserStatus(row.userId, row.status); - }).then(() => { - this.$modal.msgSuccess(text + "鎴愬姛"); - }).catch(function() { - row.status = row.status === "0" ? "1" : "0"; - }); + this.$modal + .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵') + .then(function() { + return changeUserStatus(row.userId, row.status); + }) + .then(() => { + this.$modal.msgSuccess(text + "鎴愬姛"); + }) + .catch(function() { + row.status = row.status === "0" ? "1" : "0"; + }); }, // 鍙栨秷鎸夐挳 cancel() { @@ -593,16 +697,18 @@ closeOnClickModal: false, inputPattern: /^.{5,20}$/, inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿", - inputValidator: (value) => { + inputValidator: value => { if (/<|>|"|'|\||\\/.test(value)) { - return "涓嶈兘鍖呭惈闈炴硶瀛楃锛�< > \" ' \\\ |" + return "涓嶈兘鍖呭惈闈炴硶瀛楃锛�< > \" ' \\ |"; } - }, - }).then(({ value }) => { + } + }) + .then(({ value }) => { resetUserPwd(row.userId, value).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value); }); - }).catch(() => {}); + }) + .catch(() => {}); }, /** 鍒嗛厤瑙掕壊鎿嶄綔 */ handleAuthRole: function(row) { @@ -613,6 +719,7 @@ submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { + if (this.form.userId != undefined) { updateUser(this.form).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); @@ -632,18 +739,26 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const userIds = row.userId || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�').then(function() { - return delUser(userIds); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); + this.$modal + .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�') + .then(function() { + return delUser(userIds); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }) + .catch(() => {}); }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('system/user/export', { - ...this.queryParams - }, `user_${new Date().getTime()}.xlsx`) + this.download( + "system/user/export", + { + ...this.queryParams + }, + `user_${new Date().getTime()}.xlsx` + ); }, /** 瀵煎叆鎸夐挳鎿嶄綔 */ handleImport() { @@ -652,8 +767,11 @@ }, /** 涓嬭浇妯℃澘鎿嶄綔 */ importTemplate() { - this.download('system/user/importTemplate', { - }, `user_template_${new Date().getTime()}.xlsx`) + this.download( + "system/user/importTemplate", + {}, + `user_template_${new Date().getTime()}.xlsx` + ); }, // 鏂囦欢涓婁紶涓鐞� handleFileUploadProgress(event, file, fileList) { @@ -664,7 +782,13 @@ this.upload.open = false; this.upload.isUploading = false; 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 }); + this.$alert( + "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + + response.msg + + "</div>", + "瀵煎叆缁撴灉", + { dangerouslyUseHTMLString: true } + ); this.getList(); }, // 鎻愪氦涓婁紶鏂囦欢 -- Gitblit v1.9.3