| | |
| | | <pane size="12"> |
| | | <el-col> |
| | | <div class="head-container addButton"> |
| | | <el-input v-model="deptName" placeholder="部门名称" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" /> |
| | | <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle @click="addSchema"></el-button> |
| | | <el-input v-model="deptName" placeholder="部门名称" clearable size="small" prefix-icon="el-icon-search" |
| | | style="margin-bottom: 20px" /> |
| | | <!-- <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle |
| | | @click="addSchema"></el-button> --> |
| | | </div> |
| | | <div class="head-container"> |
| | | <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current @node-click="handleNodeClick" /> |
| | | <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" |
| | | :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current |
| | | @node-click="handleNodeClick" /> |
| | | </div> |
| | | </el-col> |
| | | </pane> |
| | |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form-item label="用户名称" prop="nickName"> |
| | | <el-input v-model="queryParams.nickName" placeholder="请输入用户名称" clearable @keyup.enter.native="handleQuery" /> |
| | | <el-input v-model="queryParams.nickName" placeholder="请输入用户名称" clearable |
| | | @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="用户状态" clearable> |
| | | <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" /> |
| | | <el-select v-model="queryParams.status" placeholder="用户状态" clearable @change="handleQuery"> |
| | | <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" |
| | | :value="dict.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查 询</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重 置</el-button> |
| | | <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> |
| | | <el-button size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="options_button"> |
| | | <el-button type="primary" size="mini" @click="openthirdParty" 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-button type="primary" size="mini" @click="openthirdParty" |
| | | 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> |
| | | </div> |
| | | </div> |
| | | <el-col> |
| | | <el-table v-loading="loading" :data="userList"> |
| | | <el-table v-loading="loading" :data="userList" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border> |
| | | <el-table-column label="序号" align="center" type="index" /> |
| | | <el-table-column label="姓名" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="角色" align="center" key="roleName" prop="roleName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="状态" align="center" key="status"> |
| | | <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" key="phonenumber" prop="phonenumber" width="120" /> |
| | | <el-table-column label="操作" align="center" width="160" class-nickName="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 size="mini" type="text" icon="el-icon-delete" @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-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-menu>--> |
| | | <!-- </el-dropdown>--> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:user:edit']">修改</el-button> |
| | | <!-- <el-button size="mini" type="text" icon="el-icon-delete" @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-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-menu>--> |
| | | <!-- </el-dropdown>--> |
| | | </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> |
| | | </pane> |
| | | </splitpanes> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio> |
| | | <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ |
| | | dict.label |
| | | }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="角色" prop="roleIds"> |
| | | <el-select v-model="form.roleIds" multiple placeholder="请选择角色" clearable> |
| | | <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-col :span="12"> |
| | | <el-form-item label="单位" prop="company"> |
| | | <el-select v-model="form.company" placeholder="请选择单位" style="width: 100%" clearable> |
| | | <el-option v-for="item in postOptions" :key="item.id" :label="item.company" :value="item.id"></el-option> |
| | | <el-option v-for="item in postOptions" :key="item.id" :label="item.company" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="归属部门" prop="deptId"> |
| | | <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true" |
| | | placeholder="请选择归属部门" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="签名"> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | :action="uploadAction" |
| | | :show-file-list="false" |
| | | accept=".png, .jpg, .jpeg, .gif" |
| | | :on-error="handleUploadError" |
| | | :on-success="handleUploadSuccess" |
| | | :before-upload="handleBeforeUpload"> |
| | | <img v-if="signatureUrl" :src="signatureUrl" class="avatar" alt=""> |
| | | <el-upload class="avatar-uploader" :action="uploadAction" :show-file-list="false" |
| | | :headers="upload.headers" accept=".png, .jpg, .jpeg, .gif" :on-error="handleUploadError" |
| | | :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload"> |
| | | <img v-if="form.signatureUrl" :src="javaApi + '/img/' + form.signatureUrl" class="avatar" alt=""> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="个人照片"> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | :action="uploadAction" |
| | | :show-file-list="false" |
| | | accept=".png, .jpg, .jpeg, .gif" |
| | | :on-error="handleUploadError1" |
| | | :on-success="handleUploadSuccess1" |
| | | :before-upload="handleBeforeUpload1"> |
| | | <img v-if="pictureUrl" :src="pictureUrl" class="avatar" alt=""> |
| | | <el-upload class="avatar-uploader" :action="uploadAction" :show-file-list="false" |
| | | :headers="upload.headers" accept=".png, .jpg, .jpeg, .gif" :on-error="handleUploadError1" |
| | | :on-success="handleUploadSuccess1" :before-upload="handleBeforeUpload1"> |
| | | <img v-if="form.pictureUrl" :src="javaApi + '/img/' + form.pictureUrl" class="avatar" alt=""> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </el-form-item> |
| | |
| | | |
| | | <!-- 用户导入对话框 --> |
| | | <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">将文件拖到此处,或<em>点击上传</em></div> |
| | | <div class="el-upload__tip text-center" slot="tip"> |
| | |
| | | <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据 |
| | | </div> |
| | | <span>仅允许导入xls、xlsx格式文件。</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"> |
| | |
| | | <el-dialog title="获取人事系统人员信息" :visible.sync="addthirdParty" width="70%"> |
| | | <div class="body" v-loading="thirdPartyLoading"> |
| | | <el-row> |
| | | <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length!=1"> |
| | | <el-input v-model="search2" placeholder="输入关键字搜索" clearable size="small" |
| | | @clear="searchFilter2" @keyup.enter.native="searchFilter2" |
| | | prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%"/> |
| | | <el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps" @node-click="nodeClick2" |
| | | style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2" |
| | | highlight-current> |
| | | <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length != 1"> |
| | | <el-input v-model="search2" placeholder="输入关键字搜索" clearable size="small" @clear="searchFilter2" |
| | | @keyup.enter.native="searchFilter2" prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%" /> |
| | | <el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps1" @node-click="nodeClick2" |
| | | style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2" |
| | | highlight-current> |
| | | </el-tree> |
| | | </el-col> |
| | | <el-col :span="companiesList.length==1?24:16" style="height: 70vh;padding-left: 8px;"> |
| | | <el-col :span="companiesList.length == 1 ? 24 : 16" style="height: 70vh;padding-left: 8px;"> |
| | | <div style="display: flex;align-items: center;margin-bottom: 10px"> |
| | | <span style="width: 140px">员工号/员工姓名:</span> |
| | | <el-input size="small" placeholder="请输入员工号/员工姓名" @clear="searchPerson" clearable v-model="userSearch2" |
| | | style="width: 50%" |
| | | @keyup.enter.native="searchPerson()"></el-input> |
| | | style="width: 50%" @keyup.enter.native="searchPerson()"></el-input> |
| | | </div> |
| | | <el-table height="67vh" stripe :data="personList" v-loading="personLoad" ref="personTable" |
| | | @selection-change="handleSelectionChange"> |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="50"> |
| | | </el-table-column> |
| | | <el-table-column prop="employeeID" label="员工号"> |
| | | </el-table-column> |
| | | <el-table-column prop="nickName" label="员工姓名"> |
| | | <el-table-column prop="name" label="员工姓名"> |
| | | </el-table-column> |
| | | <el-table-column prop="department" label="部门" min-width="200"> |
| | | </el-table-column> |
| | |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | multipleSelection: [], |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | |
| | | children: "children", |
| | | label: "label" |
| | | }, |
| | | defaultProps1: { |
| | | children: "children", |
| | | label: "companyName" |
| | | }, |
| | | // 用户导入参数 |
| | | upload: { |
| | | // 是否显示弹出层(用户导入) |
| | |
| | | url: process.env.VUE_APP_BASE_API + "/system/user/importData" |
| | | }, |
| | | uploadAction: process.env.VUE_APP_BASE_API + '/deviceScope/uploadFile', |
| | | signatureUrl: '', |
| | | pictureUrl: '', |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | userName: [ |
| | | { required: true, message: "请填写账号", trigger: "blur" } |
| | | ], |
| | | nameEn: [ |
| | | { required: true, message: "请输入姓名EN", trigger: "blur" } |
| | | ], |
| | | // nameEn: [ |
| | | // { required: true, message: "请输入姓名EN", trigger: "blur" } |
| | | // ], |
| | | status: [ |
| | | { required: true, message: "请选择状态", trigger: "change" } |
| | | ], |
| | | roleIds: [ |
| | | { required: true, message: "请选择角色", trigger: "change" } |
| | | ], |
| | | password: [ |
| | | { required: true, message: "密码不能为空", trigger: "blur" }, |
| | | ], |
| | | // password: [ |
| | | // { required: true, message: "密码不能为空", trigger: "blur" }, |
| | | // ], |
| | | phonenumber: [ |
| | | { |
| | | required: true, |
| | |
| | | }, |
| | | // 获取三方人员弹框 |
| | | addthirdParty: false, |
| | | thirdPartyLoading:false, |
| | | thirdPartyLoading: false, |
| | | companiesList: [], |
| | | search2: '', |
| | | datathirdParty: [], |
| | |
| | | getList() { |
| | | this.loading = true; |
| | | listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | this.userList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | } |
| | | this.userList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | } |
| | | ); |
| | | }, |
| | | // 打开添加架构弹框 |
| | | addSchema () { |
| | | addSchema() { |
| | | this.addDia = true |
| | | }, |
| | | // 提交架构 |
| | | addStandardTree () { |
| | | addStandardTree() { |
| | | if (this.addOb.nickName == null || this.addOb.factory == '') { |
| | | this.$message.error('构架名称是必填项') |
| | | return |
| | | } |
| | | this.addLoad = true |
| | | addDepartment(this.addOb).then(res => { |
| | | if (res.code === 201) { |
| | | this.addLoad = false |
| | | return |
| | | } |
| | | this.$message.success('添加成功') |
| | | this.addDia = false |
| | | this.getList() |
| | |
| | | // 用户状态修改 |
| | | handleStatusChange(row) { |
| | | let text = row.status === "0" ? "启用" : "停用"; |
| | | this.$modal.confirm('确认要"' + text + '""' + row.nickName + '"用户吗?').then(function() { |
| | | this.$modal.confirm('确认要"' + text + '""' + row.nickName + '"用户吗?').then(function () { |
| | | return changeUserStatus(row.userId, row.status); |
| | | }).then(() => { |
| | | this.$modal.msgSuccess(text + "成功"); |
| | | }).catch(function() { |
| | | }).catch(function () { |
| | | row.status = row.status === "0" ? "1" : "0"; |
| | | }); |
| | | }, |
| | |
| | | sex: undefined, |
| | | status: "0", |
| | | company: '', |
| | | roleIds: [] |
| | | roleIds: [], |
| | | signatureUrl: '', |
| | | pictureUrl: '' |
| | | }; |
| | | // this.signatureUrl = ''; |
| | | // this.pictureUrl = '' |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.multipleSelection = selection; |
| | | this.ids = selection.map(item => item.userId); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | |
| | | } |
| | | }, |
| | | // 获取三方人员 |
| | | openthirdParty() { |
| | | this.addthirdParty = true; |
| | | this.thirdPartyLoading = true; |
| | | selectCompaniesList().then(res => { |
| | | this.companiesList = this.HaveJson(res.data); |
| | | if(this.companiesList.length ==1){ |
| | | selectSimpleList({companyId: this.companiesList[0].companyId}).then(res => { |
| | | this.thirdPartyLoading = false; |
| | | this.personListCopy = JSON.parse(JSON.stringify(res.data)) |
| | | this.personList = res.data |
| | | this.$refs.personTable.doLayout() |
| | | }) |
| | | }else{ |
| | | this.thirdPartyLoading = false; |
| | | async openthirdParty() { |
| | | try { |
| | | this.addthirdParty = true; |
| | | this.thirdPartyLoading = true; |
| | | |
| | | const companiesResponse = await selectCompaniesList(); |
| | | this.companiesList = this.HaveJson(companiesResponse.data); |
| | | |
| | | if (this.companiesList.length === 1) { |
| | | const personResponse = await selectSimpleList({ companyId: this.companiesList[0].companyId }); |
| | | this.personListCopy = JSON.parse(JSON.stringify(personResponse.data)); |
| | | this.personList = personResponse.data; |
| | | this.$refs.personTable.doLayout(); |
| | | } |
| | | this.datathirdParty = this.tranListToTreeData(res.data, "ROOT"); |
| | | }).catch(() => { |
| | | |
| | | this.datathirdParty = this.tranListToTreeData(this.companiesList, "ROOT"); |
| | | console.log(' this.datathirdParty---', this.datathirdParty) |
| | | } catch (error) { |
| | | console.error("Error fetching third party data:", error); |
| | | } finally { |
| | | this.thirdPartyLoading = false; |
| | | }) |
| | | if(this.componentData.entity.roleId > 10000)this.$message.warning('由于未选中具体角色,新增用户将成为默认角色') |
| | | } |
| | | }, |
| | | tranListToTreeData(list, rootValue) { |
| | | const arr = []; |
| | | list.forEach((item) => { |
| | | return list.reduce((arr, item) => { |
| | | if (item.parentCompanyId === rootValue) { |
| | | const children = this.tranListToTreeData(list, item.companyId); |
| | | if (children.length) { |
| | |
| | | } |
| | | arr.push(item); |
| | | } |
| | | }); |
| | | return arr; |
| | | return arr; |
| | | }, []); |
| | | }, |
| | | searchPerson() { |
| | | let arr = JSON.parse(JSON.stringify(this.personListCopy)) |
| | |
| | | this.getNodeParent(node) |
| | | if (ob.companyId !== 'SC21') { |
| | | this.personLoad = true |
| | | selectSimpleList({companyId: ob.companyId}).then(res => { |
| | | selectSimpleList({ companyId: ob.companyId }).then(res => { |
| | | this.personListCopy = JSON.parse(JSON.stringify(res.data)) |
| | | this.personList = res.data |
| | | this.personLoad = false |
| | |
| | | } |
| | | }, |
| | | nodeOpen0(data, node, el) { |
| | | this.currentCompaniesList[node.level - nodeOpen01] = data.id |
| | | // this.currentCompaniesList[node.level - nodeOpen01] = data.id |
| | | }, |
| | | filterNode2(value, data) { |
| | | if (!value) return true; |
| | |
| | | addPersonUser({ |
| | | company: arr, |
| | | person: this.multipleSelection, |
| | | roleId: this.componentData.entity.roleId |
| | | // roleId: this.componentData.entity.roleId |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.addLoad = false |
| | | return |
| | | } |
| | | this.$message.success('操作成功') |
| | | this.multipleSelection = [] |
| | | this.$refs.personTable.clearSelection() |
| | | this.addLoad = false |
| | | this.addthirdParty = false |
| | | this.userSearch2 = '' |
| | | this.getList() |
| | | }).catch(e => { |
| | |
| | | const userId = row.userId || this.ids; |
| | | getUser(userId).then(response => { |
| | | this.form = response.data; |
| | | this.form.password = '' |
| | | this.roleOptions = response.roles; |
| | | this.$set(this.form, "roleIds", response.roleIds); |
| | | this.open = true; |
| | |
| | | } |
| | | }, |
| | | }).then(({ value }) => { |
| | | resetUserPwd(row.userId, value).then(response => { |
| | | this.$modal.msgSuccess("修改成功,新密码是:" + value); |
| | | }); |
| | | }).catch(() => {}); |
| | | resetUserPwd(row.userId, value).then(response => { |
| | | this.$modal.msgSuccess("修改成功,新密码是:" + value); |
| | | }); |
| | | }).catch(() => { }); |
| | | }, |
| | | /** 分配角色操作 */ |
| | | handleAuthRole: function(row) { |
| | | handleAuthRole: function (row) { |
| | | const userId = row.userId; |
| | | this.$router.push("/system/user-auth/role/" + userId); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm: function() { |
| | | submitForm: function () { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.userId != undefined) { |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const userIds = row.userId || this.ids; |
| | | this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function () { |
| | | return delUser(userIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }).catch(() => { }); |
| | | }, |
| | | /** 下载模板操作 */ |
| | | importTemplate() { |
| | |
| | | // 如果上传成功 |
| | | if (res.code == 200) { |
| | | // 获取富文本组件实例 |
| | | let quill = this.Quill; |
| | | // 获取光标所在位置 |
| | | let length = quill.getSelection().index; |
| | | // 插入图片 res.url为服务器返回的图片地址 |
| | | quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); |
| | | // 调整光标到最后 |
| | | quill.setSelection(length + 1); |
| | | this.signatureUrl = res.data.url |
| | | // let quill = this.Quill; |
| | | // // 获取光标所在位置 |
| | | // let length = quill.getSelection().index; |
| | | // // 插入图片 res.url为服务器返回的图片地址 |
| | | // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); |
| | | // // 调整光标到最后 |
| | | // quill.setSelection(length + 1); |
| | | this.form.signatureUrl = res.data.url |
| | | } else { |
| | | this.$message.error("图片插入失败"); |
| | | } |
| | |
| | | // 如果上传成功 |
| | | if (res.code == 200) { |
| | | // 获取富文本组件实例 |
| | | let quill = this.Quill; |
| | | // 获取光标所在位置 |
| | | let length = quill.getSelection().index; |
| | | // 插入图片 res.url为服务器返回的图片地址 |
| | | quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); |
| | | // 调整光标到最后 |
| | | quill.setSelection(length + 1); |
| | | this.pictureUrl = res.data.url |
| | | // let quill = this.Quill; |
| | | // // 获取光标所在位置 |
| | | // let length = quill.getSelection().index; |
| | | // // 插入图片 res.url为服务器返回的图片地址 |
| | | // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); |
| | | // // 调整光标到最后 |
| | | // quill.setSelection(length + 1); |
| | | this.form.pictureUrl = res.data.url |
| | | } else { |
| | | this.$message.error("图片插入失败"); |
| | | } |
| | |
| | | .search_form { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .options_button { |
| | | margin-top: 3px; |
| | | } |
| | | } |
| | | |
| | | .avatar-uploader ::v-deep .el-upload { |
| | | border: 1px dashed #666666; |
| | | border-radius: 6px; |
| | |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader ::v-deep .el-upload:hover { |
| | | border-color: #409EFF; |
| | | } |
| | | |
| | | .avatar-uploader-icon { |
| | | font-size: 20px; |
| | | color: #8c939d; |
| | |
| | | line-height: 90px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .avatar { |
| | | width: 90px; |
| | | height: 90px; |
| | | display: block; |
| | | } |
| | | |
| | | .addButton { |
| | | display: flex; |
| | | align-items: flex-start; |