| | |
| | | <!--é¨é¨æ°æ®-->
|
| | | <el-col :span="4" :xs="24">
|
| | | <div class="head-container">
|
| | | <el-input
|
| | | v-model="deptName"
|
| | | placeholder="请è¾å
¥é¨é¨åç§°"
|
| | | clearable
|
| | | size="small"
|
| | | prefix-icon="el-icon-search"
|
| | | style="margin-bottom: 20px"
|
| | | />
|
| | | <el-input v-model="deptName" placeholder="请è¾å
¥é¨é¨åç§°" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" />
|
| | | </div>
|
| | | <div class="head-container">
|
| | | <el-tree
|
| | | :data="deptOptions"
|
| | | :props="defaultProps"
|
| | | :expand-on-click-node="false"
|
| | | :filter-node-method="filterNode"
|
| | | ref="tree"
|
| | | default-expand-all
|
| | | @node-click="handleNodeClick"
|
| | | />
|
| | | <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" default-expand-all @node-click="handleNodeClick" />
|
| | | </div>
|
| | | </el-col>
|
| | | <!--ç¨æ·æ°æ®-->
|
| | | <el-col :span="20" :xs="24">
|
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
| | | <el-form-item label="ç¨æ·åç§°" prop="userName">
|
| | | <el-input
|
| | | v-model="queryParams.userName"
|
| | | placeholder="请è¾å
¥ç¨æ·åç§°"
|
| | | clearable
|
| | | size="small"
|
| | | style="width: 240px"
|
| | | @keyup.enter.native="handleQuery"
|
| | | />
|
| | | <el-input v-model="queryParams.userName" placeholder="请è¾å
¥ç¨æ·åç§°" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
|
| | | </el-form-item>
|
| | | <el-form-item label="ææºå·ç " prop="phonenumber">
|
| | | <el-input
|
| | | v-model="queryParams.phonenumber"
|
| | | placeholder="请è¾å
¥ææºå·ç "
|
| | | clearable
|
| | | size="small"
|
| | | style="width: 240px"
|
| | | @keyup.enter.native="handleQuery"
|
| | | />
|
| | | <el-input v-model="queryParams.phonenumber" placeholder="请è¾å
¥ææºå·ç " clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
|
| | | </el-form-item>
|
| | | <el-form-item label="ç¶æ" prop="status">
|
| | | <el-select
|
| | | v-model="queryParams.status"
|
| | | placeholder="ç¨æ·ç¶æ"
|
| | | clearable
|
| | | size="small"
|
| | | style="width: 240px"
|
| | | >
|
| | | <el-option
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | />
|
| | | <el-select v-model="queryParams.status" placeholder="ç¨æ·ç¶æ" clearable size="small" style="width: 240px">
|
| | | <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | <el-form-item label="å建æ¶é´">
|
| | | <el-date-picker
|
| | | v-model="dateRange"
|
| | | size="small"
|
| | | style="width: 240px"
|
| | | value-format="yyyy-MM-dd"
|
| | | type="daterange"
|
| | | range-separator="-"
|
| | | start-placeholder="å¼å§æ¥æ"
|
| | | end-placeholder="ç»ææ¥æ"
|
| | | ></el-date-picker>
|
| | | <el-date-picker v-model="dateRange" size="small" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="å¼å§æ¥æ" end-placeholder="ç»ææ¥æ"></el-date-picker>
|
| | | </el-form-item>
|
| | | <el-form-item>
|
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button>
|
| | |
| | |
|
| | | <el-row :gutter="10" class="mb8">
|
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="primary"
|
| | | icon="el-icon-plus"
|
| | | size="mini"
|
| | | @click="handleAdd"
|
| | | v-hasPermi="['system:user:add']"
|
| | | >æ°å¢</el-button>
|
| | | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:user:add']">æ°å¢</el-button>
|
| | | </el-col>
|
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="success"
|
| | | icon="el-icon-edit"
|
| | | size="mini"
|
| | | :disabled="single"
|
| | | @click="handleUpdate"
|
| | | v-hasPermi="['system:user:edit']"
|
| | | >ä¿®æ¹</el-button>
|
| | | <el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['system:user:edit']">ä¿®æ¹</el-button>
|
| | | </el-col>
|
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="danger"
|
| | | icon="el-icon-delete"
|
| | | size="mini"
|
| | | :disabled="multiple"
|
| | | @click="handleDelete"
|
| | | v-hasPermi="['system:user:remove']"
|
| | | >å é¤</el-button>
|
| | | <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:user:remove']">å é¤</el-button>
|
| | | </el-col>
|
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="info"
|
| | | icon="el-icon-upload2"
|
| | | size="mini"
|
| | | @click="handleImport"
|
| | | v-hasPermi="['system:user:import']"
|
| | | >导å
¥</el-button>
|
| | | <el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport" v-hasPermi="['system:user:import']">导å
¥</el-button>
|
| | | </el-col>
|
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | type="warning"
|
| | | icon="el-icon-download"
|
| | | size="mini"
|
| | | @click="handleExport"
|
| | | v-hasPermi="['system:user:export']"
|
| | | >导åº</el-button>
|
| | | <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:user:export']">导åº</el-button>
|
| | | </el-col>
|
| | | <div class="top-right-btn">
|
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top">
|
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
|
| | | </el-tooltip>
|
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top">
|
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
|
| | | </el-tooltip>
|
| | | </div>
|
| | | <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
|
| | | </el-row>
|
| | |
|
| | | <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
| | |
| | | <el-table-column label="ææºå·ç " align="center" prop="phonenumber" width="120" />
|
| | | <el-table-column label="ç¶æ" align="center">
|
| | | <template slot-scope="scope">
|
| | | <el-switch
|
| | | v-model="scope.row.status"
|
| | | active-value="0"
|
| | | inactive-value="1"
|
| | | @change="handleStatusChange(scope.row)"
|
| | | ></el-switch>
|
| | | <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="160">
|
| | |
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column
|
| | | label="æä½"
|
| | | align="center"
|
| | | width="180"
|
| | | class-name="small-padding fixed-width"
|
| | | >
|
| | | <el-table-column label="æä½" align="center" width="180" class-name="small-padding fixed-width">
|
| | | <template slot-scope="scope">
|
| | | <el-button
|
| | | size="mini"
|
| | | type="text"
|
| | | icon="el-icon-edit"
|
| | | @click="handleUpdate(scope.row)"
|
| | | v-hasPermi="['system:user:edit']"
|
| | | >ä¿®æ¹</el-button>
|
| | | <el-button
|
| | | v-if="scope.row.userId !== 1"
|
| | | size="mini"
|
| | | type="text"
|
| | | icon="el-icon-delete"
|
| | | @click="handleDelete(scope.row)"
|
| | | v-hasPermi="['system:user:remove']"
|
| | | >å é¤</el-button>
|
| | | <el-button
|
| | | size="mini"
|
| | | type="text"
|
| | | icon="el-icon-key"
|
| | | @click="handleResetPwd(scope.row)"
|
| | | v-hasPermi="['system:user:resetPwd']"
|
| | | >éç½®</el-button>
|
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']">ä¿®æ¹</el-button>
|
| | | <el-button v-if="scope.row.userId !== 1" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">å é¤</el-button>
|
| | | <el-button size="mini" type="text" icon="el-icon-key" @click="handleResetPwd(scope.row)" v-hasPermi="['system:user:resetPwd']">éç½®</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | | <pagination
|
| | | v-show="total>0"
|
| | | :total="total"
|
| | | :page.sync="queryParams.pageNum"
|
| | | :limit.sync="queryParams.pageSize"
|
| | | @pagination="getList"
|
| | | />
|
| | | <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
| | | </el-col>
|
| | | </el-row>
|
| | |
|
| | |
| | | <el-col :span="12">
|
| | | <el-form-item label="ç¨æ·æ§å«">
|
| | | <el-select v-model="form.sex" placeholder="è¯·éæ©">
|
| | | <el-option
|
| | | v-for="dict in sexOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | ></el-option>
|
| | | <el-option v-for="dict in sexOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue"></el-option>
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="ç¶æ">
|
| | | <el-radio-group v-model="form.status">
|
| | | <el-radio
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictValue"
|
| | | >{{dict.dictLabel}}</el-radio>
|
| | | <el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{dict.dictLabel}}</el-radio>
|
| | | </el-radio-group>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | |
| | | <el-col :span="12">
|
| | | <el-form-item label="å²ä½">
|
| | | <el-select v-model="form.postIds" multiple placeholder="è¯·éæ©">
|
| | | <el-option
|
| | | v-for="item in postOptions"
|
| | | :key="item.postId"
|
| | | :label="item.postName"
|
| | | :value="item.postId"
|
| | | :disabled="item.status == 1"
|
| | | ></el-option>
|
| | | <el-option v-for="item in postOptions" :key="item.postId" :label="item.postName" :value="item.postId" :disabled="item.status == 1"></el-option>
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12">
|
| | | <el-form-item label="è§è²">
|
| | | <el-select v-model="form.roleIds" multiple placeholder="è¯·éæ©">
|
| | | <el-option
|
| | | v-for="item in roleOptions"
|
| | | :key="item.roleId"
|
| | | :label="item.roleName"
|
| | | :value="item.roleId"
|
| | | :disabled="item.status == 1"
|
| | | ></el-option>
|
| | | <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId" :disabled="item.status == 1"></el-option>
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | |
| | |
|
| | | <!-- ç¨æ·å¯¼å
¥å¯¹è¯æ¡ -->
|
| | | <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
| | | <el-upload
|
| | | ref="upload"
|
| | | :limit="1"
|
| | | accept=".xlsx, .xls"
|
| | | :headers="upload.headers"
|
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport"
|
| | | :disabled="upload.isUploading"
|
| | | :on-progress="handleFileUploadProgress"
|
| | | :on-success="handleFileSuccess"
|
| | | :auto-upload="false"
|
| | | drag
|
| | | >
|
| | | <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
| | | <i class="el-icon-upload"></i>
|
| | | <div class="el-upload__text">
|
| | | å°æä»¶æå°æ¤å¤ï¼æ
|
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus, importTemplate } from "@/api/system/user";
|
| | | import {
|
| | | listUser,
|
| | | getUser,
|
| | | delUser,
|
| | | addUser,
|
| | | updateUser,
|
| | | exportUser,
|
| | | resetUserPwd,
|
| | | changeUserStatus,
|
| | | importTemplate,
|
| | | } from "@/api/system/user";
|
| | | import { getToken } from "@/utils/auth";
|
| | | import { treeselect } from "@/api/system/dept";
|
| | | import Treeselect from "@riophae/vue-treeselect";
|
| | |
| | | form: {},
|
| | | defaultProps: {
|
| | | children: "children",
|
| | | label: "label"
|
| | | label: "label",
|
| | | },
|
| | | // ç¨æ·å¯¼å
¥åæ°
|
| | | upload: {
|
| | |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨
|
| | | headers: { Authorization: "Bearer " + getToken() },
|
| | | // ä¸ä¼ çå°å
|
| | | url: process.env.VUE_APP_BASE_API + "/system/user/importData"
|
| | | url: process.env.VUE_APP_BASE_API + "/system/user/importData",
|
| | | },
|
| | | // æ¥è¯¢åæ°
|
| | | queryParams: {
|
| | |
| | | userName: undefined,
|
| | | phonenumber: undefined,
|
| | | status: undefined,
|
| | | deptId: undefined
|
| | | deptId: undefined,
|
| | | },
|
| | | // è¡¨åæ ¡éª
|
| | | rules: {
|
| | | userName: [
|
| | | { required: true, message: "ç¨æ·åç§°ä¸è½ä¸ºç©º", trigger: "blur" }
|
| | | { required: true, message: "ç¨æ·åç§°ä¸è½ä¸ºç©º", trigger: "blur" },
|
| | | ],
|
| | | nickName: [
|
| | | { required: true, message: "ç¨æ·æµç§°ä¸è½ä¸ºç©º", trigger: "blur" }
|
| | | { required: true, message: "ç¨æ·æµç§°ä¸è½ä¸ºç©º", trigger: "blur" },
|
| | | ],
|
| | | deptId: [
|
| | | { required: true, message: "å½å±é¨é¨ä¸è½ä¸ºç©º", trigger: "blur" }
|
| | | { required: true, message: "å½å±é¨é¨ä¸è½ä¸ºç©º", trigger: "blur" },
|
| | | ],
|
| | | password: [
|
| | | { required: true, message: "ç¨æ·å¯ç ä¸è½ä¸ºç©º", trigger: "blur" }
|
| | | { required: true, message: "ç¨æ·å¯ç ä¸è½ä¸ºç©º", trigger: "blur" },
|
| | | ],
|
| | | email: [
|
| | | { required: true, message: "é®ç®±å°åä¸è½ä¸ºç©º", trigger: "blur" },
|
| | | {
|
| | | type: "email",
|
| | | message: "'请è¾å
¥æ£ç¡®çé®ç®±å°å",
|
| | | trigger: ["blur", "change"]
|
| | | }
|
| | | trigger: ["blur", "change"],
|
| | | },
|
| | | ],
|
| | | phonenumber: [
|
| | | { required: true, message: "ææºå·ç ä¸è½ä¸ºç©º", trigger: "blur" },
|
| | | {
|
| | | pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
| | | message: "请è¾å
¥æ£ç¡®çææºå·ç ",
|
| | | trigger: "blur"
|
| | | }
|
| | | ]
|
| | | }
|
| | | trigger: "blur",
|
| | | },
|
| | | ],
|
| | | },
|
| | | };
|
| | | },
|
| | | watch: {
|
| | | // æ ¹æ®åç§°çéé¨é¨æ
|
| | | deptName(val) {
|
| | | this.$refs.tree.filter(val);
|
| | | }
|
| | | },
|
| | | },
|
| | | created() {
|
| | | this.getList();
|
| | | this.getTreeselect();
|
| | | this.getDicts("sys_normal_disable").then(response => {
|
| | | 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;
|
| | | });
|
| | | },
|
| | |
| | | /** æ¥è¯¢ç¨æ·å表 */
|
| | | 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;
|
| | |
| | | },
|
| | | /** æ¥è¯¢é¨é¨ä¸ææ ç»æ */
|
| | | getTreeselect() {
|
| | | treeselect().then(response => {
|
| | | treeselect().then((response) => {
|
| | | this.deptOptions = response.data;
|
| | | });
|
| | | },
|
| | |
| | | // ç¨æ·ç¶æä¿®æ¹
|
| | | handleStatusChange(row) {
|
| | | let text = row.status === "0" ? "å¯ç¨" : "åç¨";
|
| | | this.$confirm('确认è¦"' + text + '""' + row.userName + '"ç¨æ·å?', "è¦å", {
|
| | | this.$confirm(
|
| | | '确认è¦"' + text + '""' + row.userName + '"ç¨æ·å?',
|
| | | "è¦å",
|
| | | {
|
| | | confirmButtonText: "ç¡®å®",
|
| | | cancelButtonText: "åæ¶",
|
| | | type: "warning"
|
| | | }).then(function() {
|
| | | type: "warning",
|
| | | }
|
| | | )
|
| | | .then(function () {
|
| | | return changeUserStatus(row.userId, row.status);
|
| | | }).then(() => {
|
| | | })
|
| | | .then(() => {
|
| | | this.msgSuccess(text + "æå");
|
| | | }).catch(function() {
|
| | | })
|
| | | .catch(function () {
|
| | | row.status = row.status === "0" ? "1" : "0";
|
| | | });
|
| | | },
|
| | |
| | | status: "0",
|
| | | remark: undefined,
|
| | | postIds: [],
|
| | | roleIds: []
|
| | | roleIds: [],
|
| | | };
|
| | | this.resetForm("form");
|
| | | },
|
| | |
| | | },
|
| | | // å¤éæ¡é䏿°æ®
|
| | | 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;
|
| | | },
|
| | |
| | | handleAdd() {
|
| | | this.reset();
|
| | | this.getTreeselect();
|
| | | getUser().then(response => {
|
| | | getUser().then((response) => {
|
| | | this.postOptions = response.posts;
|
| | | this.roleOptions = response.roles;
|
| | | this.open = true;
|
| | |
| | | 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;
|
| | |
| | | handleResetPwd(row) {
|
| | | this.$prompt('请è¾å
¥"' + row.userName + '"çæ°å¯ç ', "æç¤º", {
|
| | | confirmButtonText: "ç¡®å®",
|
| | | cancelButtonText: "åæ¶"
|
| | | }).then(({ value }) => {
|
| | | resetUserPwd(row.userId, value).then(response => {
|
| | | cancelButtonText: "åæ¶",
|
| | | })
|
| | | .then(({ value }) => {
|
| | | resetUserPwd(row.userId, value).then((response) => {
|
| | | if (response.code === 200) {
|
| | | this.msgSuccess("ä¿®æ¹æåï¼æ°å¯ç æ¯ï¼" + value);
|
| | | }
|
| | | });
|
| | | }).catch(() => {});
|
| | | })
|
| | | .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.open = false;
|
| | |
| | | }
|
| | | });
|
| | | } else {
|
| | | addUser(this.form).then(response => {
|
| | | addUser(this.form).then((response) => {
|
| | | if (response.code === 200) {
|
| | | this.msgSuccess("æ°å¢æå");
|
| | | this.open = false;
|
| | |
| | | /** å é¤æé®æä½ */
|
| | | handleDelete(row) {
|
| | | const userIds = row.userId || this.ids;
|
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤ç¨æ·ç¼å·ä¸º"' + userIds + '"çæ°æ®é¡¹?', "è¦å", {
|
| | | this.$confirm(
|
| | | 'æ¯å¦ç¡®è®¤å é¤ç¨æ·ç¼å·ä¸º"' + userIds + '"çæ°æ®é¡¹?',
|
| | | "è¦å",
|
| | | {
|
| | | confirmButtonText: "ç¡®å®",
|
| | | cancelButtonText: "åæ¶",
|
| | | type: "warning"
|
| | | }).then(function() {
|
| | | type: "warning",
|
| | | }
|
| | | )
|
| | | .then(function () {
|
| | | return delUser(userIds);
|
| | | }).then(() => {
|
| | | })
|
| | | .then(() => {
|
| | | this.getList();
|
| | | this.msgSuccess("å 餿å");
|
| | | }).catch(function() {});
|
| | | })
|
| | | .catch(function () {});
|
| | | },
|
| | | /** å¯¼åºæé®æä½ */
|
| | | handleExport() {
|
| | | const queryParams = this.queryParams;
|
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºææç¨æ·æ°æ®é¡¹?', "è¦å", {
|
| | | confirmButtonText: "ç¡®å®",
|
| | | cancelButtonText: "åæ¶",
|
| | | type: "warning"
|
| | | }).then(function() {
|
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºææç¨æ·æ°æ®é¡¹?", "è¦å", {
|
| | | confirmButtonText: "ç¡®å®",
|
| | | cancelButtonText: "åæ¶",
|
| | | type: "warning",
|
| | | })
|
| | | .then(function () {
|
| | | return exportUser(queryParams);
|
| | | }).then(response => {
|
| | | })
|
| | | .then((response) => {
|
| | | this.download(response.msg);
|
| | | }).catch(function() {});
|
| | | })
|
| | | .catch(function () {});
|
| | | },
|
| | | /** 导å
¥æé®æä½ */
|
| | | handleImport() {
|
| | |
| | | },
|
| | | /** ä¸è½½æ¨¡æ¿æä½ */
|
| | | importTemplate() {
|
| | | importTemplate().then(response => {
|
| | | importTemplate().then((response) => {
|
| | | this.download(response.msg);
|
| | | });
|
| | | },
|
| | |
| | | // æäº¤ä¸ä¼ æä»¶
|
| | | submitFileForm() {
|
| | | this.$refs.upload.submit();
|
| | | }
|
| | | }
|
| | | },
|
| | | },
|
| | | };
|
| | | </script> |