zhouwx
22 小时以前 a669adb3e80e58aee84be37d865311717ea61990
src/views/hazardousChemicals/systemManage/user/index.vue
@@ -40,13 +40,13 @@
      </el-table-column>
      <el-table-column label="用户类型" prop="userType" align="center">
        <template #default="scope">
          <span>{{scope.row.userType == 0 ?'管理员':scope.row.userType == 1 ? '企业用户':'普通用户'}}</span>
          <span>{{scope.row.userType == 0 ?'管理员':scope.row.userType == 1 ? '企业用户':scope.row.userType ==2 ? '普通用户' : '监管用户'}}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
        <template #default="scope">
          <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button>
          <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
          <el-button link type="danger" v-if="!isAdmin" @click="handleDelete(scope.row)">删除</el-button>
          <el-button link type="primary" @click="openDialog('pwd',scope.row)">修改密码</el-button>
        </template>
      </el-table-column>
@@ -109,10 +109,13 @@
});
const isAdmin = ref(false)
const { queryParams, total, dataList } = toRefs(data);
const userInfo = ref()
onMounted(()=>{
  userInfo.value = JSON.parse(Cookies.get('userInfo'))
  isAdmin.value = userInfo.value.userType === 0;
  getList()
})