From bf4bee68b9d6406a9d30d559d9f426055acc1846 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期五, 28 六月 2024 17:30:11 +0800
Subject: [PATCH] 修改
---
src/views/notCoalMine/nPlaceManage/nTrainManage/index.vue | 93 +++++++++++++++++++++++++++++++---------------
1 files changed, 63 insertions(+), 30 deletions(-)
diff --git a/src/views/notCoalMine/nPlaceManage/nTrainManage/index.vue b/src/views/notCoalMine/nPlaceManage/nTrainManage/index.vue
index 0c9ca7b..ae695b5 100644
--- a/src/views/notCoalMine/nPlaceManage/nTrainManage/index.vue
+++ b/src/views/notCoalMine/nPlaceManage/nTrainManage/index.vue
@@ -5,7 +5,7 @@
<el-button
type="primary"
plain
- icon="el-icon-refresh"
+ icon="el-icon-plus"
size="mini"
@click="handleAdd('add')"
v-hasPermi="['system:experts:add']"
@@ -14,25 +14,36 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
- <el-table v-loading="loading" :data="expertList">
+ <el-table v-loading="loading" :data="trainList">
<el-table-column type="index" label="序号" width="55" align="center" />
- <el-table-column label="考试点名称" align="center" prop="name" />
- <el-table-column label="所属地区" align="center" prop="name" />
- <el-table-column label="地址" align="center" prop="name" />
- <el-table-column label="负责人及电话" align="center" prop="phone"/>
- <el-table-column label="联系人及电话" align="center" prop="phone"/>
- <el-table-column label="说明(备注)" align="center" prop="phone"/>
+ <el-table-column label="培训机构名称" align="center" prop="institutionName" />
+ <el-table-column label="所属地区" align="center" prop="districtName" />
+ <el-table-column label="地址" align="center" prop="address" />
+ <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="handleUpdate(scope.row)"
+ @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']"
@@ -52,6 +63,7 @@
</template>
<script>
+import { getTrainPage, delTrain } from "@/api/coalMine/placeManage/train";
import addDialog from "@/views/notCoalMine/nPlaceManage/nTrainManage/components/addDialog.vue";
export default {
name: "nPeopleManage",
@@ -64,37 +76,58 @@
multiple: true,
showSearch: true,
addForm: false,
- total: 0,
+ total: 1,
expertTypes: [],
- expertList: [],
- queryParams: {},
- classiFy: [],
+ trainList: [],
+ queryParams: {
+ pageIndex: 1,
+ pageSize: 10
+ },
form: {},
- rules: {
- classifyName: [
- { required: true, message: "分类名称不能为空", trigger: "blur" }
- ]
- }
};
},
created() {
-
+ this.getList();
},
methods: {
- getList(){
-
- },
- handleChange(){
-
- },
- handleQuery(){
-
- },
- resetQuery(){
-
+ async getList() {
+ this.loading = true;
+ const param = {
+ isCm: 0,
+ pageNum: this.queryParams.pageIndex,
+ pageSize: this.queryParams.pageSize
+ }
+ const res = await getTrainPage(param);
+ if(res.code == 200) {
+ this.trainList = 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(() => {
+ delTrain(val.institutionId ).then((res) => {
+ if (res.code == 200) {
+ this.$message({
+ type:'success',
+ message: '删除成功'
+ })
+ this.getList()
+ }
+ })
+ })
}
}
};
--
Gitblit v1.9.2