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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<template>
    <div class="app-container">
        <div style="margin-bottom: 10px">
            <el-button
                type="primary"
                plain
                icon="Plus"
                @click="openDialog('add',{})"
            >新增</el-button>
        </div>
        <div style="margin-top: 15px;margin-bottom: 15px;">
            <el-radio-group v-model="queryParams.checkType" @change="changeType">
                <el-radio-button label="all">全部</el-radio-button>
                <el-radio-button label="1">安全评价</el-radio-button>
                <el-radio-button label="2">检验检测</el-radio-button>
            </el-radio-group>
        </div>
 
        <!-- 表格数据 -->
        <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="phone" align="center" />
            <el-table-column label="用户名" prop="username" align="center"  />
            <el-table-column label="性别" prop="sex" align="center"  />
            <el-table-column label="所属机构" prop="institution" align="center"  />
            <el-table-column label="社保" prop="socialSecurity" align="center" width="120">
                <template #default="scope">
                    <div class="demo-image__preview" v-if="scope.row.socialList && scope.row.socialList.length>0">
                          <el-image
                              style="width: 100px; height: 100px"
                              :src="scope.row.socialList[0]"
                              :zoom-rate="1.2"
                              :max-scale="7"
                              :min-scale="0.2"
                              :preview-src-list="scope.row.socialList"
                              :initial-index="0"
                              fit="cover"
                              preview-teleported="true"
                          />
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="医保" prop="medicalInsurance" align="center" width="120">
                <template #default="scope">
                    <div class="demo-image__preview" v-if="scope.row.medicalList && scope.row.medicalList.length>0">
                        <el-image
                            style="width: 100px; height: 100px"
                            :src="scope.row.medicalList[0]"
                            :zoom-rate="1.2"
                            :max-scale="7"
                            :min-scale="0.2"
                            :preview-src-list="scope.row.medicalList"
                            :initial-index="0"
                            fit="cover"
                            preview-teleported="true"
                        />
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="工资清单" prop="salaryList" align="center" width="120">
                <template #default="scope">
                    <div class="demo-image__preview" v-if="scope.row.salaryList && scope.row.salaryList.length>0">
                        <el-image
                            style="width: 100px; height: 100px"
                            :src="scope.row.salaryList[0]"
                            :zoom-rate="1.2"
                            :max-scale="7"
                            :min-scale="0.2"
                            :preview-src-list="scope.row.salaryList"
                            :initial-index="0"
                            fit="cover"
                            preview-teleported="true"
                        />
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="职务" prop="duty" align="center"  />
            <el-table-column label="职称" prop="lecture" align="center"  />
            <el-table-column label="专业方向" prop="major" align="center"  />
            <el-table-column label="业绩汇总" prop="summary" align="center"  />
            <el-table-column label="最近评价时间" prop="lastTime" align="center" width="120" />
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" >
                <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>
                </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 expertRef = ref();
const data = reactive({
    queryParams: {
        pageNum: 1,
        pageSize: 10,
        checkType: "all"
 
    },
    total: 0,
    dataList: [
    ]
 
 
});
 
const { queryParams, total, dataList } = toRefs(data);
 
const getList = () => {
    loading.value = true;
    console.log("获取数据")
    loading.value = false;
}
 
const openDialog = (type, value) => {
    expertRef.value.openDialog(type, value);
}
const changeType = (val) => {
    console.log("val", val)
    queryParams.checkType = val;
    queryParams.pageNum = 1;
    getList();
}
 
/** 重置新增的表单以及其他数据  */
function reset() {
    proxy.resetForm("roleRef");
}
const handleDelete = (val) => {
    ElMessageBox.confirm(
        '确定删除此条数据?',
        '提示',
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
        })
        .then( async() => {
 
        })
}
 
</script>
<style scoped lang="scss">
.demo-image__error .image-slot {
    font-size: 30px;
}
.demo-image__error .image-slot .el-icon {
    font-size: 30px;
}
.demo-image__error .el-image {
    width: 100%;
    height: 200px;
}
</style>