zhouwenxuan
2023-11-29 88d7869b422a1070a0ea8efd22613997e9dbe2fe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<template>
    <div class="app-container">
        <!-- 表格数据 -->
        <el-table v-loading="loading" :data="dataList" :border="true">
            <el-table-column label="用户ID" prop="userID" align="center"  />
            <el-table-column label="机构名称" prop="name" align="center" />
            <el-table-column label="信用代码" prop="code" align="center"  />
            <el-table-column label="用户名" prop="username" align="center"  />
            <el-table-column label="注册手机号" prop="phone" align="center"  />
            <el-table-column label="注册审批" prop="examine" align="center" >
                <template #default="scope">
                    <span v-if="scope.row.examine === 1">待审批</span>
                    <span v-if="scope.row.examine === 2">未通过</span>
                    <span v-if="scope.row.examine === 3">已通过</span>
                </template>
            </el-table-column>
            <el-table-column label="状态" prop="status" align="center" >
                <template #default="scope">
                    <span v-if="scope.row.status === 1">可用</span>
                    <span v-if="scope.row.status === 2">不可用</span>
                </template>
            </el-table-column>
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  width="300px">
                <template #default="scope">
                    <el-button link type="primary"  @click="openDialog('review',scope.row)" >查看</el-button>
                    <el-button link type="primary"  @click="openDialog('edit',scope.row)" v-hasPermi="['system:role:edit']">编辑</el-button>
                    <el-button link type="danger" v-if="!(scope.row.status === 1 && scope.row.examine === 3)" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']">删除</el-button>
                    <el-button link type="primary" v-if="scope.row.examine === 3 && scope.row.status === 1"  @click="stop(scope.row)" >停用</el-button>
                    <el-button link type="primary" v-if="scope.row.examine !== 3 && scope.row.status === 2"  @click="pass(scope.row)" >审批通过</el-button>
                </template>
            </el-table-column>
        </el-table>
 
        <pagination
            v-show="total > 0"
            :total="total"
            v-model:page="queryParams.pageNum"
            v-model:limit="queryParams.pageSize"
            @pagination="getList"
        />
    </div>
</template>
 
<script setup>
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
import {ElMessageBox} from "element-plus";
const { proxy } = getCurrentInstance();
const loading = ref(false);
const superRef = ref();
const data = reactive({
    queryParams: {
        pageNum: 1,
        pageSize: 10,
    },
    total: 0,
    dataList: []
 
 
});
 
const { queryParams, total, dataList } = toRefs(data);
 
const getList = () => {
    loading.value = true;
    console.log("获取数据")
    loading.value = false;
}
 
const openDialog = (type, value) => {
    superRef.value.openDialog(type, value);
}
 
/** 重置新增的表单以及其他数据  */
function reset() {
    proxy.resetForm("roleRef");
}
const handleDelete = (val) => {
    ElMessageBox.confirm(
        '确定删除此条数据?',
        '提示',
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
        })
        .then( async() => {
 
        })
}
const stop = (val) => {
 
}
const pass= (val) => {
 
}
</script>