| | |
| | | <span>{{ scope.row.userType == 1 ? "个人" : "公司" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="authDuration" label="授权时长" > </el-table-column> |
| | | <el-table-column prop="dataNames" label="权限"> |
| | | |
| | | <el-table-column prop="authDuration" label="授权时长"> |
| | | </el-table-column> |
| | | <el-table-column prop="dataNames" label="权限"> </el-table-column> |
| | | |
| | | <el-table-column label="状态"> |
| | | <template slot-scope="scope"> |
| | |
| | | style="width: 350px" |
| | | placeholder="请选择授权时长" |
| | | > |
| | | <el-option label="一年" value="一年"></el-option> |
| | | <el-option label="两年" value="两年"></el-option> |
| | | <el-option label="一年" :value="1"></el-option> |
| | | <el-option label="两年" :value="2"></el-option> |
| | | <el-option label="三年" :value="3"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { findUserList, saveSubUser, getMenu, getDataTree} from "@/api/user"; |
| | | import { findUserList, saveSubUser, getMenu, getDataTree } from "@/api/user"; |
| | | import { getAreas, getDic } from "@/api/login"; |
| | | |
| | | import Steps from "./Steps"; |
| | | import StepsCard from "./StepCard"; |
| | | import TreeBox from "./TreeBox"; |
| | | export default { |
| | | components: { |
| | | Steps, |
| | | StepsCard, |
| | | TreeBox, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | dataList: [], |
| | | isShowAdd: false, //是否展示新增弹窗 |
| | | isShowUnbind: false, //是否展示解绑弹窗 |
| | | isShowRelate: false,isEditing: false, |
| | | isShowRelate: false, |
| | | isEditing: false, |
| | | unbindId: "", |
| | | durationArr: [ |
| | | { |
| | | value: "一年", |
| | | value: 1, |
| | | label: "一年", |
| | | }, |
| | | { |
| | | value: "两年", |
| | | value: 2, |
| | | label: "两年", |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "三年", |
| | | }, |
| | | ], //所属集群下拉框 |
| | | timeLength: null, //选中的授权时长 |
| | | showQuit: false, //展示退出集群的弹窗 |
| | | showJoin: false, //展示加入集群的弹窗 |
| | | activeEquipment: null, //处理中的设备 |
| | | checkedData:[], |
| | | checkedMenu:[], |
| | | checkedData: [], |
| | | checkedMenu: [], |
| | | ruleForm: { |
| | | id: "", |
| | | username: "", |
| | |
| | | }, |
| | | editUser(row) { |
| | | this.isShowAdd = true; |
| | | this.isEditing = true |
| | | this.isEditing = true; |
| | | this.ruleForm.id = row.id; |
| | | this.ruleForm.username = row.username; |
| | | this.ruleForm.userType = row.userType; |
| | |
| | | this.ruleForm.email = row.email; |
| | | this.ruleForm.isChangePwd = row.isChangePwd; |
| | | this.ruleForm.industryId = row.industryId; |
| | | this.ruleForm.areaId =row.areaId ; |
| | | debugger |
| | | this.ruleForm.address = [ row.provinceId,row.areaId] |
| | | this.ruleForm.areaId = row.areaId; |
| | | debugger; |
| | | this.ruleForm.address = [row.provinceId, row.areaId]; |
| | | this.ruleForm.provinceId = row.provinceId; |
| | | this.ruleForm.authDuration = row.authDuration; |
| | | this.checkedMenu = row.menuIds; |
| | |
| | | this.ruleForm.menuIds = this.$refs.treeMenus.getCheckedKeys(); |
| | | this.ruleForm.dataIds = this.$refs.treeData.getCheckedKeys(); |
| | | let json = { |
| | | id: this.isEditing? this.ruleForm.id:"", |
| | | id: this.isEditing ? this.ruleForm.id : "", |
| | | username: this.ruleForm.username, |
| | | password: this.ruleForm.password, |
| | | isChangePwd: this.ruleForm.isChangePwd, |
| | |
| | | menuIds: this.ruleForm.menuIds, |
| | | dataIds: this.ruleForm.dataIds, |
| | | }; |
| | | debugger |
| | | debugger; |
| | | saveSubUser(json).then((res) => { |
| | | debugger; |
| | | }); |
| | |
| | | }, |
| | | goback() { |
| | | this.isShowAdd = false; |
| | | this.isEditing =false |
| | | this.isEditing = false; |
| | | this.isShowRelate = false; |
| | | this.activeIndex = 0; |
| | | }, |
| | |
| | | |
| | | .option { |
| | | margin-right: 10px; |
| | | font-size: 14px; |
| | | font-size: 14px; |
| | | color: rgb(0, 101, 255); |
| | | cursor: pointer; |
| | | } |