| | |
| | | <el-table-column label="姓名" prop="name" align="center" /> |
| | | <el-table-column label="手机号" prop="phone" align="center" /> |
| | | <el-table-column label="用户名" prop="username" align="center" /> |
| | | <el-table-column label="账号类型" prop="accountType" align="center" > |
| | | <el-table-column label="账号类型" prop="userType" align="center" > |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.accountType === 1">工作人员</span> |
| | | <span v-if="scope.row.accountType === 2">领导</span> |
| | | {{scope.row.userType == 0?'工作人员':scope.row.userType == 1?'领导':'其他'}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="监管地区" prop="area" align="center" /> |
| | | <el-table-column label="监管地区" prop="manageRegion" align="center"/> |
| | | <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)" v-hasPermi="['system:role:edit']">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']">删除</el-button> |
| | | <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="primary" @click="openDialog('pwd',scope.row)">修改密码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import superviseDialog from "./components/superviseDialog.vue" |
| | | import { getMonitorList, delMonitor } from "../../../../api/sysUsers" |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const superRef = ref(); |
| | |
| | | pageSize: 10, |
| | | }, |
| | | total: 0, |
| | | dataList: [ |
| | | ] |
| | | |
| | | |
| | | dataList: [] |
| | | }); |
| | | |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | |
| | | const getList = () => { |
| | | loading.value = true; |
| | | console.log("获取数据") |
| | | loading.value = false; |
| | | onMounted(()=>{ |
| | | getList() |
| | | }) |
| | | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getMonitorList(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list |
| | | data.total = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | |
| | | const res = await delMonitor(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | |