8 files modified
2 files added
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/jurisdiction/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getLazyList = (parentId, params) => { |
| | | return request({ |
| | | url: '/api/jurisdiction/lazy-list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | parentId |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/jurisdiction/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/jurisdiction/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/jurisdiction/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const getDept = (id) => { |
| | | return request({ |
| | | url: '/api/jurisdiction/detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDeptTree = (tenantId) => { |
| | | return request({ |
| | | url: '/api/jurisdiction/tree', |
| | | method: 'get', |
| | | params: { |
| | | tenantId, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDeptLazyTree = (parentId) => { |
| | | return request({ |
| | | url: '/api/jurisdiction/lazy-trees', |
| | | method: 'get', |
| | | params: { |
| | | parentId |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const securitySave = (row) => { |
| | | return request({ |
| | | url: '/api/blade-user/securitySave', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | |
| | | <userLogin></userLogin> |
| | | <!-- <codeLogin v-else-if="activeName==='code'"></codeLogin>--> |
| | | <!-- <thirdLogin v-else-if="activeName==='third'"></thirdLogin>--> |
| | | <div class="login-menu"> |
| | | <!-- <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>--> |
| | | <a href="#" @click.stop="zShow">{{ $t('login.phoneLogin') }}</a> |
| | | <!-- <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>--> |
| | | </div> |
| | | <!-- <div class="login-menu">--> |
| | | <!-- <!– <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>–>--> |
| | | <!-- <a href="#" @click.stop="zShow">{{ $t('login.phoneLogin') }}</a>--> |
| | | <!-- <!– <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>–>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | ref="loginForm" |
| | | :model="loginForm" |
| | | label-width="0"> |
| | | <el-form-item v-if="tenantMode" prop="tenantId"> |
| | | <!-- <el-form-item v-if="tenantMode" prop="tenantId">--> |
| | | <el-form-item v-if="false" prop="tenantId"> |
| | | <el-input size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.tenantId" |
| | |
| | | font-size: 40px; |
| | | width: 445px; |
| | | margin: 0; |
| | | padding-bottom: 20px; |
| | | text-align: center; |
| | | letter-spacing: 4px; |
| | | } |
| | |
| | | font-weight: 300; |
| | | color: #409EFF; |
| | | cursor: pointer; |
| | | margin-top: 30px; |
| | | margin-top: 5px; |
| | | font-family: "neo"; |
| | | transition: 0.25s; |
| | | } |
| | |
| | | } |
| | | |
| | | .login-main .login-form .el-form-item--feedback:nth-child(1),.el-form-item--feedback:nth-child(2){ |
| | | margin-bottom: 20px !important; |
| | | margin-bottom: 30px !important; |
| | | } |
| | | |
| | | .login-title-child{ |
| New file |
| | |
| | | <template> |
| | | <basic-container class="jurs"> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | :before-close="beforeClose" |
| | | @row-del="rowDel" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | @tree-load="treeLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | v-if="permission.dept_delete" |
| | | plain |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-circle-plus-outline" |
| | | size="small" |
| | | @click.stop="handleAdd(scope.row, scope.index)" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | >新增子项 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="deptCategory"> |
| | | <el-tag>{{ row.deptCategoryName }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getLazyList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getDept, |
| | | getDeptTree, |
| | | } from "@/api/Jurs/jurs"; |
| | | import { mapGetters } from "vuex"; |
| | | import website from "@/config/website"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | selectionList: [], |
| | | query: {}, |
| | | loading: true, |
| | | parentId: 0, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | option: { |
| | | lazy: true, |
| | | tip: false, |
| | | simplePage: true, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | searchShowBtn: false, |
| | | tree: true, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | menuWidth: 300, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "机构名称", |
| | | prop: "deptName", |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入机构名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属租户", |
| | | prop: "tenantId", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/tenant/select", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: website.tenantMode, |
| | | span: 24, |
| | | props: { |
| | | label: "tenantName", |
| | | value: "tenantId", |
| | | }, |
| | | hide: !website.tenantMode, |
| | | search: website.tenantMode, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入所属租户", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "机构全称", |
| | | prop: "fullName", |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入机构全称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "上级机构", |
| | | prop: "parentId", |
| | | dicData: [], |
| | | type: "tree", |
| | | hide: true, |
| | | addDisabled: false, |
| | | props: { |
| | | label: "title", |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请选择上级机构", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "remark", |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请输入备注", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | hide: true, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.jurs_add, false), |
| | | viewBtn: this.vaildData(this.permission.jurs_view, false), |
| | | delBtn: this.vaildData(this.permission.jurs_delete, false), |
| | | editBtn: this.vaildData(this.permission.jurs_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | methods: { |
| | | initData() { |
| | | getDeptTree().then((res) => { |
| | | try { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.dicData = res.data.data; |
| | | } catch {} |
| | | }); |
| | | }, |
| | | handleAdd(row) { |
| | | this.parentId = row.id; |
| | | try { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.value = row.id; |
| | | column.addDisabled = true; |
| | | } catch {} |
| | | this.$refs.crud.rowAdd(); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then( |
| | | (res) => { |
| | | // 获取新增数据的相关字段 |
| | | const data = res.data.data; |
| | | row.id = data.id; |
| | | row.deptCategoryName = data.deptCategoryName; |
| | | row.tenantId = data.tenantId; |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | // 数据回调进行刷新 |
| | | done(row); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | // 数据回调进行刷新 |
| | | done(row); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row, index, done) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | // 数据回调进行刷新 |
| | | done(row); |
| | | }); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | // 刷新表格数据并重载 |
| | | this.data = []; |
| | | this.parentId = 0; |
| | | this.$refs.crud.refreshTable(); |
| | | this.$refs.crud.toggleSelection(); |
| | | // 表格数据重载 |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.parentId = 0; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.parentId = ""; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["add", "edit"].includes(type)) { |
| | | this.initData(); |
| | | } |
| | | if (["edit", "view"].includes(type)) { |
| | | getDept(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | beforeClose(done) { |
| | | this.parentId = ""; |
| | | try { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.value = ""; |
| | | column.addDisabled = false; |
| | | } catch {} |
| | | done(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getLazyList(this.parentId, Object.assign(params, this.query)).then( |
| | | (res) => { |
| | | this.data = res.data.data; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | } |
| | | ); |
| | | }, |
| | | treeLoad(tree, treeNode, resolve) { |
| | | const parentId = tree.id; |
| | | getLazyList(parentId).then((res) => { |
| | | resolve(res.data.data); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | prop: "account", |
| | | search: true, |
| | | display: false, |
| | | width: 100 |
| | | }, |
| | | // { |
| | | // label: "所属客户", |
| | |
| | | prop: "realName", |
| | | search: true, |
| | | display: false, |
| | | width: 80 |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sexName", |
| | | display: false, |
| | | width: 50 |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | display: false, |
| | | width: 100 |
| | | }, |
| | | { |
| | | label: "所属角色", |
| | |
| | | { |
| | | label: "审查状态", |
| | | prop: "examination_type", |
| | | width: 70, |
| | | slot: true, |
| | | search: true, |
| | | display: false, |
| | |
| | | label: "审查明细", |
| | | prop: "examination_mx", |
| | | display: false, |
| | | width: 70 |
| | | }, |
| | | { |
| | | label: "审查时间", |
| | | prop: "auditTime", |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "工作状态", |
| | |
| | | update, |
| | | updatePlatform, |
| | | add, |
| | | securitySave, |
| | | grant, |
| | | resetPassword, |
| | | } from "@/api/system/user"; |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: "手机号码", |
| | | prop: "phone", |
| | | overHidden: true, |
| | |
| | | this.onLoad(this.page); |
| | | }); |
| | | }, |
| | | // rowSave(row, done, loading) { |
| | | // row.deptId = row.deptId.join(","); |
| | | // row.roleId = row.roleId.join(","); |
| | | // row.postId = row.postId.join(","); |
| | | // add(row).then( |
| | | // () => { |
| | | // this.initFlag = false; |
| | | // this.onLoad(this.page); |
| | | // this.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!", |
| | | // }); |
| | | // done(); |
| | | // }, |
| | | // (error) => { |
| | | // window.console.log(error); |
| | | // loading(); |
| | | // } |
| | | // ); |
| | | // }, |
| | | rowSave(row, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | | row.roleId = row.roleId.join(","); |
| | | row.postId = row.postId.join(","); |
| | | add(row).then( |
| | | const userMap = { |
| | | user: { |
| | | account: row.account, |
| | | avatar: row.avatar, |
| | | fingerprint: row.fingerprint, |
| | | healstats: row.healstats, |
| | | address: row.address, |
| | | birthday: row.birthday, |
| | | cardid: row.cardid, |
| | | deptId: row.deptId, |
| | | roleId: row.roleId, |
| | | education: row.education1, |
| | | email: row.email, |
| | | height: row.height, |
| | | hold: row.hold, |
| | | jurisdiction: row.jurisdiction, |
| | | myPicture: row.myPicture, |
| | | name: row.name, |
| | | nation: row.nation, |
| | | nativeplace: row.nativeplace, |
| | | password: row.password, |
| | | password2: row.password2, |
| | | phone: row.phone, |
| | | politicaloutlook: row.politicaloutlook, |
| | | realName: row.realName, |
| | | registered: row.registered, |
| | | rtime: row.rtime, |
| | | securitynumber: row.securitynumber, |
| | | sex: row.sex, |
| | | district: row.district, |
| | | }, |
| | | }; |
| | | securitySave(userMap).then( |
| | | () => { |
| | | this.initFlag = false; |
| | | this.onLoad(this.page); |
| | |
| | | { |
| | | label: "性别", |
| | | display: false, |
| | | width:55, |
| | | searchSpan: 4, |
| | | search: true, |
| | | disabled: true, |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | disabled: true, |
| | | width:140, |
| | | display: false, |
| | | prop: "cardid", |
| | | }, |
| | | { |
| | | label: "手机号码", |
| | | disabled: true, |
| | | display: false, |
| | | width:95, |
| | | prop: "phone", |
| | | }, |
| | | { |
| | |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 4, |
| | | width:70, |
| | | display: false, |
| | | type: "select", |
| | | dicData: [ |
| | |
| | | // target: 'http://192.168.0.111:83/', |
| | | //target: 'http://localhost:82/', |
| | | // target: 'http://223.82.109.183:2082/api/', |
| | | target: 'http://192.168.0.107:85/',//唐 |
| | | // target: 'http://192.168.0.107:85/',//唐 |
| | | //target: 'http://localhost:83/', |
| | | //target: 'http://223.82.109.183:2082/api/', |
| | | target: 'http://localhost:83/', |
| | | //target: 'https://web.byisf.com/api/', |
| | | //远程演示服务地址,可用于直接启动项目 |
| | | //target: 'https://saber.bladex.vip/api', |