| | |
| | | <template #default="scope"> |
| | | <el-image |
| | | style="width: 70px; height: 70px" |
| | | :src=" |
| | | 'http://115.159.85.185:9098' + scope.row.headImageUrl |
| | | " |
| | | :src="'http://115.159.85.185:9098' + scope.row.headImageUrl" |
| | | show-progress |
| | | :initial-index="4" |
| | | fit="cover" |
| | |
| | | <template #default="scope"> |
| | | <el-switch |
| | | :disabled=" |
| | | scope.row.userName == 'admin' || scope.row.user_Id == '1' |
| | | userInfo.userName == 'admin' || userInfo.roleId == '1' |
| | | ? scope.row.userName == 'admin' || scope.row.user_Id == '1' |
| | | : scope.row.userName == 'admin' || |
| | | scope.row.user_Id == '1' || |
| | | scope.row.userName != userInfo.userName |
| | | " |
| | | v-model="scope.row.enable" |
| | | :active-value="1" |
| | |
| | | size="small" |
| | | type="text" |
| | | @click="Edit(scope.row)" |
| | | :disabled=" |
| | | scope.row.userName == 'admin' || scope.row.user_Id == '1' |
| | | " |
| | | :disabled="scope.row.isdisabled" |
| | | >ç¼è¾</el-button |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="text" |
| | | :disabled=" |
| | | scope.row.userName == 'admin' || scope.row.user_Id == '1' |
| | | " |
| | | :disabled="scope.row.isdisabled" |
| | | @click="Editpassword(scope.row)" |
| | | >ä¿®æ¹å¯ç </el-button |
| | | > |
| | |
| | | size="small" |
| | | type="text" |
| | | @click="deletUser(scope.row)" |
| | | :disabled=" |
| | | scope.row.userName == 'admin' || scope.row.user_Id == '1' |
| | | " |
| | | :disabled="scope.row.isdisabled" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | |
| | | <template #default="scope"> |
| | | <span |
| | | v-if=" |
| | | scope.row.roleName != 'è¶
级管çå' || scope.row.roleId != '1' |
| | | !(userInfo.userName == 'admin' || userInfo.roleId == '1' |
| | | ? scope.row.userName == 'admin' || scope.row.user_Id == '1' |
| | | : scope.row.userName == 'admin' || |
| | | scope.row.user_Id == '1' || |
| | | scope.row.userName != userInfo.userName) |
| | | " |
| | | @click="toDetail(scope.row)" |
| | | style="color: #4386ff; cursor: pointer" |
| | |
| | | <template #default="scope"> |
| | | <el-switch |
| | | :disabled=" |
| | | scope.row.roleName == 'è¶
级管çå' || scope.row.roleId == '1' |
| | | !(userInfo.userName == 'admin' || userInfo.roleId == '1') |
| | | " |
| | | v-model="scope.row.enable" |
| | | :active-value="1" |
| | |
| | | <template #default="scope"> |
| | | <span |
| | | v-if=" |
| | | scope.row.roleName != 'è¶
级管çå' || scope.row.roleId != '1' |
| | | !(userInfo.userName == 'admin' || userInfo.roleId == '1' |
| | | ? scope.row.userName == 'admin' || scope.row.user_Id == '1' |
| | | : scope.row.userName == 'admin' || |
| | | scope.row.user_Id == '1' || |
| | | scope.row.userName != userInfo.userName) |
| | | " |
| | | style="color: blue; font-size: 0.88rem; cursor: pointer" |
| | | @click="EditRole(scope.row)" |
| | |
| | | size="small" |
| | | > |
| | | <el-option |
| | | :disabled="item.roleId == 20" |
| | | :disabled="item.roleId == 1" |
| | | v-for="item in groupOptions" |
| | | :key="item.roleId" |
| | | :label="item.roleName" |
| | |
| | | id: undefined, |
| | | username: "", |
| | | phoneno: "", |
| | | roleid: 21, |
| | | roleid: 2, |
| | | rolename: "", |
| | | enable: 1, |
| | | path: "", |
| | |
| | | const dialogVisible = ref(false); |
| | | const imgdialogVisible = ref(false); |
| | | const dialogImageUrl = ref(""); |
| | | const userInfo = ref(); |
| | | //ç¨æ·ä¿¡æ¯ä¿®æ¹å¯ç å¼¹åºæ¡ |
| | | const dialogVisible1 = ref(false); |
| | | //ç¨æ·è§è²æ°å»º |
| | |
| | | startDate: startTime, |
| | | endDate: endTime, |
| | | }).then((res) => { |
| | | tableData.value = res.data.items; |
| | | tableData.value = res.data.items.map((item) => { |
| | | return { |
| | | ...item, |
| | | isdisabled: |
| | | userInfo.value.userName == "admin" || userInfo.value.roleId == "1" |
| | | ? item.userName == "admin" || item.user_Id == "1" |
| | | : item.userName == "admin" || |
| | | item.user_Id == "1" || |
| | | item.userName != userInfo.value.userName, |
| | | }; |
| | | }); |
| | | pageTotal.value = res.data.totalCount; |
| | | }); |
| | | }; |
| | |
| | | formUser.value = { |
| | | username: "", |
| | | phoneno: "", |
| | | roleid: 21, |
| | | roleid: 2, |
| | | rolename: "", |
| | | enable: 1, |
| | | path: "", |
| | |
| | | dialogVisible.value = false; |
| | | initData(); |
| | | }); |
| | | console.log(val); |
| | | }; |
| | | // ç¨æ·è§è²æ¯å¦å¯ç¨ |
| | | const changeRoleSwitch = (val) => { |
| | |
| | | const toDetail = (row) => { |
| | | router.push({ name: "permission", state: { info: JSON.stringify(row) } }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | initData(); |
| | | getRole(); |
| | | userInfo.value = JSON.parse(localStorage.getItem("user")); |
| | | }); |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .Usermanagement { |
| | | display: flex; |
| | | flex-direction: column; |
| | | background-color: #fff; |
| | | |
| | | .content { |
| | |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | :deep(.hide .el-upload--picture-card) { |
| | | display: none; |
| | | } |