表单定义权限控制和属性权限&&成员管理添加密级&&首页修改密码&&登录判断过期停用修改密码后跳转首页
| | |
| | | }) |
| | | } |
| | | |
| | | // 表格查询模板下拉查询 |
| | | export function refPersonOrgTree(params) { |
| | | return request({ |
| | | url: "/api/userQueryController/refPersonOrgTree", |
| | | method: "get", |
| | | params |
| | | }) |
| | | } |
| | | |
| | | const cloneObj = { |
| | | "clonePortalVIDTOList": [{ |
| | | "viName": "ppartProp",//--克隆的表单/表格名称 |
| | |
| | | <top-color></top-color> |
| | | </div> |
| | | </el-tooltip> |
| | | <!-- 错误日志--> |
| | | <!-- <el-tooltip v-if="showDebug"--> |
| | | <!-- :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"--> |
| | | <!-- effect="dark"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item">--> |
| | | <!-- <top-logs></top-logs>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- 错误日志--> |
| | | <!-- <el-tooltip v-if="showDebug"--> |
| | | <!-- :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"--> |
| | | <!-- effect="dark"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item">--> |
| | | <!-- <top-logs></top-logs>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <el-tooltip v-if="showLock" |
| | | :content="$t('navbar.lock')" |
| | | effect="dark" |
| | |
| | | <top-theme></top-theme> |
| | | </div> |
| | | </el-tooltip> |
| | | <!-- 消息通知--> |
| | | <!-- <el-tooltip :content="$t('navbar.notice')"--> |
| | | <!-- effect="dark"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item top-bar__item--show">--> |
| | | <!-- <top-notice></top-notice>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- 消息通知--> |
| | | <!-- <el-tooltip :content="$t('navbar.notice')"--> |
| | | <!-- effect="dark"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item top-bar__item--show">--> |
| | | <!-- <top-notice></top-notice>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <el-tooltip :content="$t('navbar.language')" |
| | | effect="dark" |
| | | placement="bottom"> |
| | |
| | | :visible.sync="passwordVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | style="margin-top: -15vh" |
| | | title="修改密码" |
| | | width="50%"> |
| | | width="50%" |
| | | @close="passwordClose"> |
| | | <avue-form ref="form" v-model="passwordForm" :option="passwordOption" @submit="submitSwitch"/> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | passwordVisible: false, |
| | | passwordForm: {}, |
| | | passwordOption: { |
| | | submitText:'保存', |
| | | submitText: '保存', |
| | | column: [ |
| | | { |
| | | label: '登陆密码', |
| | | prop: 'oldPassword', |
| | | span: 24, |
| | | labelWidth:"15%", |
| | | type:'password', |
| | | labelWidth: "15%", |
| | | type: 'password', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: '新登陆密码', |
| | | prop: 'password', |
| | | span: 24, |
| | | labelWidth:"15%", |
| | | type:'password', |
| | | labelWidth: "15%", |
| | | type: 'password', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: '新密码登陆确认', |
| | | prop: 'confirmPassword', |
| | | span: 24, |
| | | labelWidth:"15%", |
| | | type:'password', |
| | | labelWidth: "15%", |
| | | type: 'password', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | }, |
| | | submitSwitch(form, done) { |
| | | let userInfo = JSON.parse(localStorage.getItem('saber-userInfo')); |
| | | |
| | | let params = { |
| | | userOid:userInfo.content.userOid, |
| | | oldPassword:func.encryptData(form.oldPassword,'daliantan0v0vcip'), |
| | | password:func.encryptData(form.password,'daliantan0v0vcip'), |
| | | confirmPassword:func.encryptData(form.confirmPassword,'daliantan0v0vcip'), |
| | | userName: userInfo.content.userId, |
| | | oldPassword: func.encryptData(form.oldPassword, 'daliantan0v0vcip'), |
| | | password: func.encryptData(form.password, 'daliantan0v0vcip'), |
| | | confirmPassword: func.encryptData(form.confirmPassword, 'daliantan0v0vcip'), |
| | | |
| | | } |
| | | changePassword(params).then(res =>{ |
| | | if(res.data.code === 200){ |
| | | changePassword(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.msg); |
| | | this.passwordVisible = false; |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | resetRouter(); |
| | | this.$router.push({path: "/login"}); |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | // this.$store.dispatch("refreshToken", form).then(() => { |
| | | // this.userBox = false; |
| | | // this.$router.push({path: "/"}); |
| | | // }) |
| | | done(); |
| | | }, |
| | | |
| | | // 关闭修改密码对话框 |
| | | passwordClose() { |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | |
| | | logout() { |
| | | this.$confirm(this.$t("logoutTip"), this.$t("tip"), { |
| | | confirmButtonText: this.$t("submitText"), |
| | |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | console.log('123'); |
| | | resetRouter(); |
| | | this.$router.push({path: "/login"}); |
| | | }); |
| | |
| | | @click.native.prevent="handleLogin">{{ $t('login.submit') }} |
| | | </el-button> |
| | | </el-form-item> |
| | | |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :visible.sync="passwordVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | style="margin-top: -15vh" |
| | | title="修改密码" |
| | | width="50%"> |
| | | <avue-form ref="changeForm" v-model="passwordForm" :option="passwordOption" @submit="submitSwitch"/> |
| | | </el-dialog> |
| | | |
| | | </el-form> |
| | | </template> |
| | |
| | | import {mapGetters} from "vuex"; |
| | | import {info} from "@/api/system/tenant"; |
| | | import {getTopUrl} from "@/util/util"; |
| | | import func from "@/util/func"; |
| | | import {changePassword} from "@/api/user"; |
| | | |
| | | export default { |
| | | name: "userlogin", |
| | | data() { |
| | | return { |
| | | userName:'', |
| | | passwordVisible: false, |
| | | passwordForm: {}, |
| | | passwordOption: { |
| | | submitText: '保存', |
| | | column: [ |
| | | { |
| | | label: '登陆密码', |
| | | prop: 'oldPassword', |
| | | span: 24, |
| | | labelWidth: "15%", |
| | | type: 'password', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入登陆密码', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '新登陆密码', |
| | | prop: 'password', |
| | | span: 24, |
| | | labelWidth: "15%", |
| | | type: 'password', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入新登陆密码', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '新密码登陆确认', |
| | | prop: 'confirmPassword', |
| | | span: 24, |
| | | labelWidth: "15%", |
| | | type: 'password', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请确认登陆密码', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | tenantMode: this.website.tenantMode, |
| | | ButtonList: [], |
| | | loginForm: { |
| | |
| | | spinner: "el-icon-loading" |
| | | }); |
| | | this.$store.dispatch("LoginByUsername", this.loginForm).then((data) => { |
| | | if (data.obj.passwordInfo) { |
| | | this.$message.warning(data.obj.passwordInfo); |
| | | if (data.obj.failCode !== 'loginSuccess') { |
| | | // console.log('data', data); |
| | | this.$message.error(data.msg); |
| | | if (data.obj.mustChangePassword) { |
| | | this.passwordVisible = true; |
| | | } |
| | | } |
| | | |
| | | if (this.website.switchMode) { |
| | | const deptId = this.userInfo.deptOid; |
| | | const roleId = this.userInfo.userOid; |
| | |
| | | }); |
| | | return false; |
| | | } |
| | | } |
| | | ; |
| | | }; |
| | | this.$router.push({path: this.tagWel.value}); |
| | | loading.close(); |
| | | }).catch((err) => { |
| | | console.log('err', err) |
| | | loading.close(); |
| | | |
| | | }); |
| | | } |
| | | }); |
| | |
| | | this.$parent.$refs.login.style.backgroundImage = `url(${data.data.backgroundUrl})`; |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | submitSwitch(form, done) { |
| | | let userInfo = JSON.parse(localStorage.getItem('saber-userInfo')); |
| | | |
| | | let params = { |
| | | userName: this.loginForm.username, |
| | | oldPassword: func.encryptData(form.oldPassword, 'daliantan0v0vcip'), |
| | | password: func.encryptData(form.password, 'daliantan0v0vcip'), |
| | | confirmPassword: func.encryptData(form.confirmPassword, 'daliantan0v0vcip'), |
| | | } |
| | | changePassword(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('修改成功,即将跳转到首页'); |
| | | this.passwordVisible = false; |
| | | this.$refs.changeForm.resetFields(); |
| | | this.$store.dispatch("LoginByUsername",{...this.loginForm,password:form.confirmPassword}).then(data => { |
| | | if (data.obj.failCode !== 'loginSuccess') { |
| | | this.$message.error(data.msg); |
| | | } |
| | | this.$router.push({path: this.tagWel.value}); |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | done(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | let passwordDes = func.encryptData(userInfo.password,'daliantan0v0vcip') |
| | | loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username,passwordDes, userInfo.type, userInfo.key,).then(res => { |
| | | const data = res.data; |
| | | if (data.code === 200) { |
| | | // commit('SET_TOKEN', data.obj.sessionInfo.token); |
| | | // commit('SET_REFRESH_TOKEN', data.obj.sessionInfo.token); |
| | | |
| | | if (data.obj.failCode === 'loginSuccess') { |
| | | commit('SET_TOKEN', data.obj.tokenVO.accessToken); |
| | | commit('SET_REFRESH_TOKEN', data.obj.tokenVO.accessToken); |
| | | commit('DEL_ALL_TAG'); |
| | |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | |
| | | } else { |
| | | Message({ |
| | | message: data.msg, |
| | | type: 'error' |
| | | }) |
| | | } |
| | | resolve(data); |
| | | }).catch(error => { |
| | | // console.log(error) |
| | | reject(error); |
| | | }) |
| | | }) |
| | |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="rowSaveHandlerClick">创建</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">删除</el-button> |
| | | <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">查看使用范围</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">下载导入模板</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler"> |
| | | 下载导入模板 |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadHandler">导入</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downLoadHandler">导出</el-button> |
| | | </template> |
| | |
| | | 标签 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.name }} |
| | | {{ lastItem.name }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | 描述 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.description }} |
| | | {{ lastItem.description }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | 允许为空 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | <el-tag :type="lastItem.nullableFlag ? 'success' : 'danger'"> |
| | | {{ lastItem.nullableFlag ? '是' : '否' }} |
| | | </el-tag> |
| | | <el-tag :type="lastItem.nullableFlag ? 'success' : 'danger'"> |
| | | {{ lastItem.nullableFlag ? '是' : '否' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item v-if="accuracy"> |
| | |
| | | 长度 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.attrLength }} |
| | | {{ lastItem.attrLength }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | 默认值 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.defaultValue }} |
| | | {{ lastItem.defaultValue }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | |
| | | 当前类型 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version ? '链接类型' : '业务类型' }} |
| | | {{ lastItem.version ? '链接类型' : '业务类型' }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | 当前类型值 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version ? lastItem.linkTypeName : lastItem.btmTypeId }} |
| | | {{ lastItem.version ? lastItem.linkTypeName : lastItem.btmTypeId }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item v-if="lastItem.version"> |
| | |
| | | 当前版本次 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version }} |
| | | {{ lastItem.version }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | 使用枚举 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | <el-tag :type="lastItem.enumId ? 'success' : 'danger'"> |
| | | {{ lastItem.enumId ? '是' : '否' }} |
| | | </el-tag> |
| | | <el-tag :type="lastItem.enumId ? 'success' : 'danger'"> |
| | | {{ lastItem.enumId ? '是' : '否' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | 当前枚举类型 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.enumId }} |
| | | {{ lastItem.enumId }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | 使用枚举 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | <el-tag :type="lastItem.enumFlag ? 'success' : 'danger'"> |
| | | {{ lastItem.enumFlag ? '是' : '否' }} |
| | | </el-tag> |
| | | <el-tag :type="lastItem.enumFlag ? 'success' : 'danger'"> |
| | | {{ lastItem.enumFlag ? '是' : '否' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | 枚举类型 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.enumFlag }} |
| | | {{ lastItem.enumFlag }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | |
| | | <el-button size="mini" @click="operationHandler('<=')"> <=</el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> =</el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> !=</el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> ()</el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> ([])</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item :label="form.enumSwitch ? '当前枚举值:' : '当前值域:'" prop="rangeValue"> |
| | |
| | | <el-button size="mini" @click="operationHandler('<=')"> <=</el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> =</el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> !=</el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> ()</el-button> |
| | | <el-button size="mini" @click="operationHandler('()')">([])</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item :label="form.enumSwitch ? '当前枚举值:' : '当前值域:'" prop="rangeValue"> |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | menuWidth:160, |
| | | menuWidth: 160, |
| | | column |
| | | }, |
| | | tableLoading: false, |
| | |
| | | |
| | | // 处理 '()' 运算符的情况 |
| | | if (val === '()') { |
| | | let regex = /[,\[\]()]+/g; |
| | | let firstValue = this.form.enumAddValue[0]; |
| | | let lastValue = this.form.enumAddValue[(this.form.enumAddValue.length - 1)]; |
| | | // 切割 enumAddValue 的逗号 |
| | | let values = this.form.enumAddValue.split(',').map(item => item.trim()); |
| | | let values = this.form.enumAddValue.split(regex).map(item => item.trim()).filter(item => item !== ""); |
| | | ; |
| | | |
| | | |
| | | // 检查是否有有效的值 |
| | | if (values.length < 2 || values.some(item => item === '')) { |
| | |
| | | } |
| | | |
| | | // 构建 newValue 的形式 (值1,值2) |
| | | let newValue = `(${values.join(',')})`; |
| | | let newValue = `${firstValue}${values.join(',')}${lastValue}`; |
| | | |
| | | // 检查新的值是否已存在 |
| | | if (currentRangeArray.includes(newValue)) { |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | if (this.dialogTitle === 'add') { |
| | | this.form.range = this.form.rangeValue.replace(/\n/g, ';'); |
| | | this.form.range = this.form.rangeValue ? this.form.rangeValue.replace(/\n/g, ';') : ''; |
| | | if (this.form.attributeSelectType === 'business') { |
| | | this.form.btmTypeId = this.form.referValue; |
| | | } else { |
| | |
| | | }) |
| | | } |
| | | if (this.dialogTitle === 'edit') { |
| | | this.form.range = this.form.rangeValue.replace(/\n/g, ';'); |
| | | this.form.range = this.form.rangeValue ? this.form.rangeValue.replace(/\n/g, ';') : ''; |
| | | if (this.form.attributeSelectType === 'business') { |
| | | this.form.btmTypeId = this.form.referValue; |
| | | } else { |
| | |
| | | <el-form-item label="权限控制"> |
| | | <div style="display: flex;align-items: center"> |
| | | <el-input v-model="form.itemRight" placeholder="请输入内容" size="mini"></el-input> |
| | | <el-button plain size="mini" style="margin-left: 3px" type="success">选择</el-button> |
| | | <el-button plain size="mini" style="margin-left: 3px" type="success" @click="authClickHandler"> |
| | | 选择 |
| | | </el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | |
| | | <el-col :span="24"> |
| | | <el-form-item label="权限控制"> |
| | | <el-form-item label="属性权限"> |
| | | <div style="display: flex;align-items: center"> |
| | | <el-input v-model="customForm.itemRight" placeholder="请输入内容" size="mini"></el-input> |
| | | <el-button plain size="mini" style="margin-left: 3px" type="success">选择</el-button> |
| | | <el-button plain size="mini" style="margin-left: 3px" type="success" @click="customAuthClickHandler"> |
| | | 选择 |
| | | </el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :visible.sync="authVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="权限控制-人员列表" |
| | | width="60%" |
| | | @close="authDialogClose"> |
| | | <div style="height: 650px"> |
| | | <div style="height: 600px;"> |
| | | <avue-tree :key="refresh" ref="authTree" v-model="treeAuthForm" :data="treeAuthData" :option="treeAuthOption" |
| | | @check-change="treeAuthCheckChange"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="authDialogClose">取 消</el-button> |
| | | <el-button type="primary" @click="authDialogSaveHandler">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getObjTypeQTs, getTreeAttributes, savePortalVI} from "@/api/UI/formDefine/api"; |
| | | import {getObjTypeQTs, getTreeAttributes, savePortalVI, refPersonOrgTree} from "@/api/UI/formDefine/api"; |
| | | import func from "@/util/func"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {gridAttribute} from "@/api/modeling/attributePool/api"; |
| | | import {getSysModelTreeMenuByPID} from "@/api/systemModel/mangeModel/api"; |
| | | |
| | | export default { |
| | | name: "formDialog", |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | authType: 'default', |
| | | refresh: Math.random(), |
| | | treeAuthOption: { |
| | | multiple: true, |
| | | height: 'auto', |
| | | menu: false, |
| | | addBtn: false, |
| | | defaultExpandAll: true, |
| | | lazy: true, |
| | | props: { |
| | | label: 'text', |
| | | value: 'oid', |
| | | children: 'childNodes', |
| | | }, |
| | | treeLoad: (node, resolve) => { |
| | | // console.log(node); |
| | | const params = { |
| | | 'conditionMap[dataType]': node.data.data, |
| | | 'conditionMap[parentId]': node.data.data, |
| | | 'conditionMap[orgType]': 'all' |
| | | } |
| | | refPersonOrgTree(node.level === 0 ? {} : params).then(res => { |
| | | resolve(res.data.treeData.map(item => { |
| | | return { |
| | | ...item, |
| | | id: item.id, |
| | | name: item.name, |
| | | leaf: item.leaf |
| | | } |
| | | })) |
| | | }) |
| | | } |
| | | }, |
| | | treeAuthData: [], |
| | | treeAuthForm: {}, |
| | | authVisible: false, |
| | | searchQtNameList: [], |
| | | customAttrRow: {}, |
| | | customAttrOption: { |
| | |
| | | text: data.text, |
| | | oid: data.oid, |
| | | itemType: 'text', |
| | | itemName:data.data.name |
| | | itemName: data.data.name |
| | | } |
| | | console.log(data); |
| | | const isDuplicate = this.formList.some(item => item.text === data.text); |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 权限选择按钮 |
| | | authClickHandler() { |
| | | this.authVisible = true; |
| | | }, |
| | | |
| | | // 自定义表单选择权限 |
| | | customAuthClickHandler() { |
| | | this.authVisible = true; |
| | | this.authType = 'attr'; |
| | | }, |
| | | |
| | | // 权限树对话框关闭 |
| | | authDialogClose() { |
| | | this.authVisible = false; |
| | | this.refresh = Math.random(); // 刷新左侧树 |
| | | }, |
| | | |
| | | // 权限控制保存 |
| | | authDialogSaveHandler() { |
| | | const filterList = ['root', 'user', 'role', 'department'] |
| | | const data = this.$refs.authTree.getCheckedNodes().filter(item => !filterList.includes(item.oid)); |
| | | if (!data || data.length <= 0) { |
| | | this.$message.error('请检查是否勾选子节点'); |
| | | return; |
| | | } |
| | | |
| | | const resultMap = {}; |
| | | |
| | | data.forEach(item => { |
| | | const key = item.parentBtmName; |
| | | if (!resultMap[key]) { |
| | | resultMap[key] = []; // 初始化数组 |
| | | } |
| | | resultMap[key].push(item.parentBtmName === 'user' ? item.data.userName : item.data.name); |
| | | }); |
| | | |
| | | // 组装字符串 |
| | | const resultString = Object.entries(resultMap).map(([key, oids]) => { |
| | | return `${key}=${oids.join(',')}`; // 用 , 连接同一类型的 oid |
| | | }).join('&&'); // 最后用 && 连接不同类型 |
| | | |
| | | // console.log(resultString); |
| | | if (this.authType === 'attr') { |
| | | this.customForm.itemRight = resultString; |
| | | } else { |
| | | this.form.itemRight = resultString; |
| | | } |
| | | // this.form.itemRight = resultString; |
| | | this.authDialogClose(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | prop: 'id', |
| | | search:true, |
| | | sortable:true, |
| | | editDisabled: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | { |
| | | label: '所属密级', |
| | | prop: 'secretGradeText', |
| | | display:false, |
| | | width: 80 |
| | | width: 80, |
| | | sortable: true, |
| | | type: 'select', |
| | | dicUrl: 'api/webEnumController/getEnum?comboxKey=usersecurityenum', |
| | | props: { |
| | | label: 'value', |
| | | value: 'key', |
| | | res: "obj", |
| | | }, |
| | | }, |
| | | ]; |