| | |
| | | import request from '@/utils/request' |
| | | import { parseStrEmpty } from "@/utils/ruoyi"; |
| | | import { parseStrEmpty } from "@/utils/ruoyi" |
| | | |
| | | // 查询用户列表 |
| | | export function listUser(query) { |
| | |
| | | this.fuse = new Fuse(list, {
|
| | | shouldSort: true,
|
| | | threshold: 0.4,
|
| | | location: 0,
|
| | | distance: 100,
|
| | | minMatchCharLength: 1,
|
| | | keys: [{
|
| | | name: 'title',
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.jobId != undefined) {
|
| | | updateJob(this.form).then(response => {
|
| | | updateJob(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功");
|
| | | this.open = false;
|
| | | this.getList();
|
| | | });
|
| | | } else {
|
| | | addJob(this.form).then(response => {
|
| | | addJob(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功");
|
| | | this.open = false;
|
| | | this.getList();
|
| | |
| | | this.$refs.registerForm.validate(valid => {
|
| | | if (valid) {
|
| | | this.loading = true
|
| | | register(this.registerForm).then(res => {
|
| | | register(this.registerForm).then(() => {
|
| | | const username = this.registerForm.username
|
| | | this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
|
| | | dangerouslyUseHTMLString: true,
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.configId != undefined) {
|
| | | updateConfig(this.form).then(response => {
|
| | | updateConfig(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | addConfig(this.form).then(response => {
|
| | | addConfig(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.deptId != undefined) {
|
| | | updateDept(this.form).then(response => {
|
| | | updateDept(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | addDept(this.form).then(response => {
|
| | | addDept(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.dictCode != undefined) {
|
| | | updateData(this.form).then(response => {
|
| | | updateData(this.form).then(() => {
|
| | | this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | addData(this.form).then(response => {
|
| | | addData(this.form).then(() => {
|
| | | this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.dictId != undefined) {
|
| | | updateType(this.form).then(response => {
|
| | | updateType(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | addType(this.form).then(response => {
|
| | | addType(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.menuId != undefined) {
|
| | | updateMenu(this.form).then(response => {
|
| | | updateMenu(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | addMenu(this.form).then(response => {
|
| | | addMenu(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.noticeId != undefined) {
|
| | | updateNotice(this.form).then(response => {
|
| | | updateNotice(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | addNotice(this.form).then(response => {
|
| | | addNotice(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.postId != undefined) {
|
| | | updatePost(this.form).then(response => {
|
| | | updatePost(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | addPost(this.form).then(response => {
|
| | | addPost(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | |
| | | }).catch(() => {})
|
| | | },
|
| | | /** 批量取消授权按钮操作 */
|
| | | cancelAuthUserAll(row) {
|
| | | cancelAuthUserAll() {
|
| | | const roleId = this.queryParams.roleId
|
| | | const userIds = this.userIds.join(",")
|
| | | this.$modal.confirm('是否取消选中用户授权数据项?').then(function() {
|
| | |
| | | if (valid) {
|
| | | if (this.form.roleId != undefined) {
|
| | | this.form.menuIds = this.getMenuAllCheckedKeys()
|
| | | updateRole(this.form).then(response => {
|
| | | updateRole(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | this.form.menuIds = this.getMenuAllCheckedKeys()
|
| | | addRole(this.form).then(response => {
|
| | | addRole(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | |
| | | submitDataScope: function() {
|
| | | if (this.form.roleId != undefined) {
|
| | | this.form.deptIds = this.getDeptAllCheckedKeys()
|
| | | dataScope(this.form).then(response => {
|
| | | dataScope(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.openDataScope = false
|
| | | this.getList()
|
| | |
| | | submitForm() {
|
| | | const userId = this.form.userId
|
| | | const roleIds = this.roleIds.join(",")
|
| | | updateAuthRole({ userId: userId, roleIds: roleIds }).then((response) => {
|
| | | updateAuthRole({ userId: userId, roleIds: roleIds }).then(() => {
|
| | | this.$modal.msgSuccess("授权成功")
|
| | | this.close()
|
| | | })
|
| | |
| | | }
|
| | | },
|
| | | }).then(({ value }) => {
|
| | | resetUserPwd(row.userId, value).then(response => {
|
| | | resetUserPwd(row.userId, value).then(() => {
|
| | | this.$modal.msgSuccess("修改成功,新密码是:" + value)
|
| | | })
|
| | | }).catch(() => {})
|
| | |
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.userId != undefined) {
|
| | | updateUser(this.form).then(response => {
|
| | | updateUser(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | | })
|
| | | } else {
|
| | | addUser(this.form).then(response => {
|
| | | addUser(this.form).then(() => {
|
| | | this.$modal.msgSuccess("新增成功")
|
| | | this.open = false
|
| | | this.getList()
|
| | |
| | | submit() {
|
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
|
| | | updateUserPwd(this.user.oldPassword, this.user.newPassword).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | })
|
| | | }
|
| | |
| | | submit() {
|
| | | this.$refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | updateUserProfile(this.form).then(response => {
|
| | | updateUserProfile(this.form).then(() => {
|
| | | this.$modal.msgSuccess("修改成功")
|
| | | this.user.phonenumber = this.form.phonenumber
|
| | | this.user.email = this.form.email
|
| | |
| | | <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="表名称" align="center" prop="tableName" :show-overflow-tooltip="true" width="120" /> |
| | | <el-table-column label="表描述" align="center" prop="tableComment" :show-overflow-tooltip="true" width="120" /> |
| | | <el-table-column label="实体" align="center" prop="className" :show-overflow-tooltip="true" width="120" /> |
| | | <el-table-column label="表名称" align="center" prop="tableName" :show-overflow-tooltip="true" width="140" /> |
| | | <el-table-column label="表描述" align="center" prop="tableComment" :show-overflow-tooltip="true" width="140" /> |
| | | <el-table-column label="实体" align="center" prop="className" :show-overflow-tooltip="true" width="140" /> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="160" /> |
| | | <el-table-column label="更新时间" align="center" prop="updateTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="160" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | |
| | | return |
| | | } |
| | | if(row.genType === "1") { |
| | | genCode(row.tableName).then(response => { |
| | | genCode(row.tableName).then(() => { |
| | | this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath) |
| | | }) |
| | | } else { |