<template>
|
<div class="app-container">
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="1.5">
|
<el-button
|
type="primary"
|
plain
|
icon="el-icon-plus"
|
size="mini"
|
@click="handleAdd('add')"
|
v-hasPermi="['system:experts:add']"
|
>新增</el-button>
|
</el-col>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
</el-row>
|
|
<el-table v-loading="loading" :data="examList">
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
<el-table-column label="考试点名称" align="center" prop="siteName" />
|
<el-table-column label="所属地区" align="center" prop="districtName" />
|
<el-table-column label="地址" align="center" prop="address" />
|
<!-- <el-table-column label="关联培训机构" align="center" prop="institutionName" />-->
|
<el-table-column label="负责人及电话" align="center" prop="phone">
|
<template #default="scope">
|
<div>{{scope.row.header}}</div>
|
<div>{{scope.row.hphone}}</div>
|
</template>
|
</el-table-column>
|
<el-table-column label="联系人及电话" align="center" prop="phone">
|
<template #default="scope">
|
<div>{{scope.row.contact}}</div>
|
<div>{{scope.row.cphone}}</div>
|
</template>
|
</el-table-column>
|
<el-table-column label="说明(备注)" align="center" prop="remark"/>
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<template #default="scope">
|
<el-button
|
size="mini"
|
type="text"
|
icon="el-icon-edit"
|
@click="handleAdd('edit',scope.row)"
|
>编辑</el-button>
|
<el-button
|
size="mini"
|
type="text"
|
style="color: #f56c6c"
|
icon="el-icon-delete"
|
@click="handleDelete(scope.row)"
|
v-hasPermi="['system:experts:remove']"
|
>删除</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<pagination
|
v-show="total>0"
|
:total="total"
|
:page.sync="queryParams.pageIndex"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
<add-dialog ref="addDialogRef" @getList = "getList"></add-dialog>
|
</div>
|
</template>
|
|
<script>
|
import addDialog from "@/views/coalMine/cPlaceManage/cExamManage/components/addDialog.vue";
|
import {delExam, getExamPage} from "@/api/coalMine/placeManage/exam";
|
export default {
|
name: "nPeopleManage",
|
dicts: [],
|
components: {addDialog},
|
data() {
|
return {
|
loading: false,
|
single: true,
|
multiple: true,
|
showSearch: true,
|
addForm: false,
|
total: 0,
|
expertTypes: [],
|
examList: [],
|
queryParams: {
|
pageIndex: 1,
|
pageSize: 10
|
},
|
form: {},
|
};
|
},
|
created() {
|
this.getList()
|
},
|
methods: {
|
async getList() {
|
this.loading = true;
|
const param = {
|
isCm: 1,
|
pageNum: this.queryParams.pageIndex,
|
pageSize: this.queryParams.pageSize
|
}
|
const res = await getExamPage(param);
|
console.log("res",res)
|
if(res.code == 200) {
|
this.examList = res.rows;
|
this.total = res.total
|
}else {
|
this.$message({
|
message: res.msg,
|
type: 'warning'
|
})
|
}
|
this.loading = false;
|
},
|
handleAdd(type, data){
|
this.$refs.addDialogRef.openDialog(type, data);
|
},
|
handleDelete(val) {
|
this.$confirm('删除此条信息,是否继续', '提示', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
delExam( val.siteId).then((res) => {
|
if (res.code == 200) {
|
this.$message({
|
type:'success',
|
message: '删除成功'
|
})
|
this.getList()
|
}
|
})
|
})
|
}
|
}
|
};
|
</script>
|