| | |
| | | data |
| | | }) |
| | | } |
| | | // 用户审核 |
| | | export function userExamine(data) { |
| | | return request({ |
| | | url: "/api/user/userExamine", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 设置用户信息 |
| | | export function setUser(data) { |
| | | return request({ |
| | | url: "/api/user/setUser", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | :data="item.menus" |
| | | show-checkbox |
| | | node-key="id" |
| | | @check-change="handleCheckChange" |
| | | :default-checked-keys="editConfig.infomation.menuIDs" |
| | | :props="treeDefaultProp" |
| | | default-expand-all |
| | | > |
| | |
| | | }, |
| | | // 获取参考角色 页面权限 菜单 的数据 |
| | | async getDataInfo(val) { |
| | | const rsp = await getDataRole({ useType: 2 }) |
| | | const rsp = await getDataRole({ useType: 1 }) |
| | | if (rsp.code == 200) { |
| | | // 参考角色 |
| | | this.prepareRoleList = rsp.data.roles ? rsp.data.roles : [] |
| | |
| | | this.form.completeType = this.completeList.length > 0 ? this.completeList[0].systemType : 1 |
| | | } |
| | | if (this.editConfig.visible) { |
| | | console.log("ssss") |
| | | this.resetForm(val) |
| | | } |
| | | }, |
| | |
| | | this.completeList.length > 0 && this.completeList[0].systemType ? this.completeList[0].systemType : 1 |
| | | } |
| | | if (val) { |
| | | console.log("aaaa", val) |
| | | this.form = JSON.parse(JSON.stringify(val)) |
| | | this.form.completeType = |
| | | this.completeList.length > 0 && this.completeList[0].systemType ? this.completeList[0].systemType : 1 |
| | | if (this.form.menuIDs && this.form.menuIDs.length > 0) { |
| | | for (let i in this.menusList) { |
| | | console.log(this.$refs["menuTree&" + this.menusList[i].systemType]) |
| | | // this.$refs["menuTree&" + this.menusList[i].systemType][0].setCheckedKeys(this.form.allMenu.split(",")) |
| | | } |
| | | } |
| | | } else { |
| | | console.log(this.menusList) |
| | | for (let i in this.menusList) { |
| | | console.log(this.$refs["menuTree&" + this.menusList[i]?.systemType]) |
| | | // this.$refs["menuTree&" + this.menusList[i]?.systemType][0].setCheckedKeys([]) |
| | | } |
| | | } |
| | | }, |
| | | imgClick(item, index) { |
| | |
| | | submitFn(param).then((reply) => { |
| | | if (reply && reply.code === 200) { |
| | | this.$message.success("保存成功") |
| | | this.$emit("shutdown", false) |
| | | this.handleClose() |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | |
| | | id: this.editRow.id, |
| | | comment: data.comment || "", |
| | | name: data.name || "", |
| | | useType: 2 |
| | | useType: 1 |
| | | }, |
| | | menuIDs: menuIds |
| | | } |
| | | return params |
| | | }, |
| | | shutdown() { |
| | | this.$emit("shutdown", false) |
| | | } |
| | | } |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="overSpread" v-show="isopen"></div> |
| | | <!-- 添加/编辑 --> |
| | | <AddUserLevel :isopen="isopen" @shutdown="shutdown" :editRow="editRow" /> |
| | | <AddUserLevel v-if="editConfig.visible" :edit-common-config="editConfig" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { getListRole, getUserList, roleChange, deleteRole } from "@/api/unifiedManage/userLevel" |
| | | export default { |
| | | name: "UserLevel", |
| | | props: {}, |
| | | props: { |
| | | isDetail: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | addConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | mixins: [pageMixin], |
| | | components: { AddUserLevel }, |
| | | computed: {}, |
| | |
| | | ], |
| | | showBottomCol: ["用户名", "姓名", "手机号", "岗位职务", "状态"], |
| | | isopen: false, |
| | | editRow: {}, |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | // this.editConfig.title = "新建" |
| | | // this.editConfig.visible = true |
| | | // this.editConfig.infomation = {} |
| | | this.isopen = true |
| | | this.editRow = {} |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.visible = true |
| | | this.editConfig.infomation = {} |
| | | }, |
| | | // 搜索 |
| | | searchClick(val) { |
| | |
| | | // 编辑 |
| | | handleClick(val) { |
| | | console.log(val) |
| | | // this.editConfig.title = "编辑" |
| | | // this.editConfig.infomation = { ...val } |
| | | // this.editConfig.visible = true |
| | | this.editRow = val |
| | | this.isopen = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...val } |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 删除等级 |
| | | delClick(row) { |
| | |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | shutdown() { |
| | | this.isopen = false |
| | | setTimeout(() => { |
| | | this.getData() |
| | | }, 200) |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | |
| | | <el-input v-model="editConfig.form.region" placeholder="--" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="用户等级:" prop="roleIDs"> |
| | | <el-checkbox-group v-model="editConfig.form.roleIDs"> |
| | | <el-checkbox-group v-model="editConfig.form.roleIDs" :disabled="editConfig.title == '查看' ? true : false"> |
| | | <el-checkbox v-for="role in roleList" :label="role.id" :key="role.id">{{ role.name }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getRoleIDs } from "@/api/unifiedManage/userManage" |
| | | import { getRoleIDs, setUser } from "@/api/unifiedManage/userManage" |
| | | export default { |
| | | name: "EditUserInfo", |
| | | props: { |
| | |
| | | return { |
| | | visible: false, |
| | | title: "新建", |
| | | form: {} |
| | | form: { |
| | | roleIDs: [] |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | // form: {}, |
| | | rules: { |
| | | username: [{ required: true, message: "请输入用户名", trigger: "blur" }], |
| | | password: [{ required: true, message: "请输入密码", trigger: "blur" }], |
| | | // password: [{ required: true, message: "请输入密码", trigger: "blur" }], |
| | | phone: [{ required: true, message: "请输入手机号", trigger: "blur" }], |
| | | companyName: [{ required: true, message: "请输入公司名称", trigger: "blur" }], |
| | | // companyName: [{ required: true, message: "请输入公司名称", trigger: "blur" }], |
| | | nickName: [{ required: true, message: "请输入联系人名称", trigger: "blur" }], |
| | | roleIDs: [{ required: true, message: "请选择用户等级", trigger: "change" }] |
| | | }, |
| | |
| | | if (rsp.code == 200) { |
| | | this.roleList = rsp.data ? rsp.data : [] |
| | | } |
| | | }, |
| | | // 确定 |
| | | onSubmit(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | console.log(valid) |
| | | if (valid) { |
| | | let param = this.saveParams() |
| | | setUser(param).then((reply) => { |
| | | if (reply && reply.code === 200) { |
| | | this.$message.success("保存成功") |
| | | this.handleClose() |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | saveParams() { |
| | | let params = { |
| | | dutyIDs: this.editConfig.form.dutyIDs, |
| | | id: this.editConfig.form.id, |
| | | nickName: this.editConfig.form.nickName, |
| | | phone: this.editConfig.form.phone, |
| | | roleIDs: this.editConfig.form.roleIDs |
| | | } |
| | | return params |
| | | } |
| | | } |
| | | } |
| | |
| | | custom-class="iframe-dialog" |
| | | > |
| | | <div class="drawerContent" style="overflow: auto"> |
| | | <el-form ref="form" :rules="rules" :model="form" label-position="right" label-width="100px"> |
| | | <el-form ref="form" :rules="rules" :model="editConfig.infomation" label-position="right" label-width="100px"> |
| | | <el-form-item label="审核结果:" prop="result"> |
| | | <el-select v-model="form.result" placeholder="请选择审核结果"> |
| | | <el-option label="审核通过" value="审核通过"></el-option> |
| | | <el-option label="审核拒绝" value="审核拒绝"></el-option> |
| | | <el-select v-model="editConfig.infomation.result" placeholder="请选择审核结果"> |
| | | <el-option label="审核通过" :value="3"></el-option> |
| | | <el-option label="审核拒绝" :value="4"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.result === '审核拒绝'" label="未通过原因:" prop="reason"> |
| | | <el-input v-model="form.reason" type="textarea"></el-input> |
| | | <el-form-item v-if="editConfig.infomation.result === 4" label="未通过原因:" prop="reason"> |
| | | <el-input v-model="editConfig.infomation.reason" type="textarea"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.result === '审核通过'" label="用户等级:" prop="level"> |
| | | <el-radio-group v-model="form.level"> |
| | | <div style="margin-top: 10px"> |
| | | <el-radio :label="1">三合一经典会员</el-radio> |
| | | <el-radio :label="2">APS+WMS普通会员</el-radio> |
| | | </div> |
| | | <div style="margin-top: 10px"> |
| | | <el-radio :label="3">四合一超级会员</el-radio> |
| | | <el-radio :label="4">APS普通会员</el-radio> |
| | | </div> |
| | | </el-radio-group> |
| | | <el-form-item v-if="editConfig.infomation.result === 3" label="用户等级:" prop="roleIDs"> |
| | | <el-checkbox-group |
| | | v-model="editConfig.infomation.roleIDs" |
| | | :disabled="editConfig.title == '查看' ? true : false" |
| | | > |
| | | <el-checkbox v-for="role in roleList" :label="role.id" :key="role.id">{{ role.name }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getRoleIDs, userExamine } from "@/api/unifiedManage/userManage" |
| | | export default { |
| | | name: "ReviewDialog", |
| | | props: { |
| | |
| | | return { |
| | | visible: false, |
| | | title: "用户审核", |
| | | infomation: {} |
| | | infomation: { |
| | | result: 3, |
| | | roleIDs: [] |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | return { |
| | | dialogWidth: "30%", |
| | | editConfig: this.editCommonConfig, |
| | | form: { |
| | | result: "审核通过" |
| | | }, |
| | | rules: { |
| | | result: [{ required: true, message: "请选择审核结果", trigger: "change" }], |
| | | reason: [{ required: true, message: "请输入拒绝原因", trigger: "blur" }], |
| | | level: [{ required: true, message: "请选择用户等级", trigger: "change" }] |
| | | } |
| | | roleIDs: [{ required: true, message: "请选择用户等级", trigger: "change" }] |
| | | }, |
| | | roleList: [] // 用户等级 |
| | | } |
| | | }, |
| | | watch: { |
| | | "editCommonConfig.visible"(val) { |
| | | if (val) { |
| | | this.$refs.form.resetFields() |
| | | // this.getDataInfo() |
| | | } |
| | | }, |
| | | "editCommonConfig.infomation"(val) { |
| | | if (this.isopen) { |
| | | this.$refs.form.resetFields() |
| | | if (val.id) { |
| | | this.form = val |
| | | // this.form = val |
| | | // this.getDataInfo(val) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getDataInfo() |
| | | this.getDataInfo() |
| | | }, |
| | | methods: { |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 获取等级信息 |
| | | async getDataInfo() { |
| | | const rsp = await getRoleIDs({ useType: 1 }) |
| | | if (rsp.code == 200) { |
| | | this.roleList = rsp.data ? rsp.data : [] |
| | | } |
| | | }, |
| | | // 确定 |
| | | onSubmit(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | console.log(valid) |
| | | if (valid) { |
| | | let param = this.saveParams() |
| | | userExamine(param).then((reply) => { |
| | | if (reply && reply.code === 200) { |
| | | this.$message.success("保存成功") |
| | | this.handleClose() |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | saveParams() { |
| | | let reason = this.editConfig.infomation.result == 3 ? "" : this.editConfig.infomation.reason |
| | | let roleIds = this.editConfig.infomation.result == 3 ? this.editConfig.infomation.roleIDs : [] |
| | | let params = { |
| | | reason: reason, |
| | | roleIds: roleIds, |
| | | status: this.editConfig.infomation.result, |
| | | userId: this.editConfig.infomation.id |
| | | } |
| | | return params |
| | | } |
| | | } |
| | | } |
| | |
| | | editConfig: { |
| | | visible: false, |
| | | title: "查看", |
| | | infomation: {} |
| | | form: {} |
| | | }, |
| | | reviewConfig: { |
| | | visible: false, |
| | |
| | | console.log(row) |
| | | this.reviewConfig.visible = true |
| | | this.reviewConfig.title = "用户审核" |
| | | this.reviewConfig.infomation = { ...row } |
| | | this.reviewConfig.infomation = { result: 3, ...row } |
| | | }, |
| | | // 停用 |
| | | changeStatusClick(row, status) { |