删除报名人

main
lijingyu007 5 months ago
parent d44268b783
commit db90b2f82a
  1. 2
      .env.development
  2. 99
      src/api/trainService/index.js
  3. 1
      src/views/trainService/signlist.vue
  4. 21
      src/views/trainService/signupStudent.vue

@ -5,7 +5,7 @@ ENV = 'development'
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
# VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api'
VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999' VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999'
# VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999' # VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999'
# VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999' # VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999'

@ -1,84 +1,84 @@
import request from '@/utils/request' import request from '@/utils/request'
export function getSchoolList(query) { export function getSchoolList(query) {
return request({ return request({
url: '/train/schoolList', url: '/train/schoolList',
method: 'get', method: 'get',
params: query, params: query,
// headers: { // headers: {
// isToken: false // isToken: false
// }, // },
}) })
} }
export function addSchool(data) { export function addSchool(data) {
return request({ return request({
url: '/train/school/add', url: '/train/school/add',
method: 'post', method: 'post',
data, data,
}) })
} }
export function updateSchool(data) { export function updateSchool(data) {
return request({ return request({
url: '/train/school/update', url: '/train/school/update',
method: 'post', method: 'post',
data, data,
}) })
} }
export function delSchool(id) { export function delSchool(id) {
return request({ return request({
url: `/train/school/del/?schoolId=${id}`, url: `/train/school/del/?schoolId=${id}`,
method: 'delete', method: 'delete',
}) })
} }
export function getSignUpList(query) { export function getSignUpList(query) {
return request({ return request({
url: `/train/trainClassList`, url: `/train/trainClassList`,
method: 'get', method: 'get',
params: query, params: query,
}) })
} }
export function addSignUp(data) { export function addSignUp(data) {
return request({ return request({
url: '/train/trainClass/add', url: '/train/trainClass/add',
method: 'post', method: 'post',
data, data,
}) })
} }
export function updateSignUp(data) { export function updateSignUp(data) {
return request({ return request({
url: '/train/trainClass/update', url: '/train/trainClass/update',
method: 'post', method: 'post',
data, data,
}) })
} }
export function delSignUp(id) { export function delSignUp(id) {
return request({ return request({
url: `/train/trainClass/del?trainClassId=${id}`, url: `/train/trainClass/del?trainClassId=${id}`,
method: 'delete', method: 'delete',
}) })
} }
// 查询已报名列表 // 查询已报名列表
export function searchNum(params) { export function searchNum(params) {
return request({ return request({
url: `/train/trainStudentList`, url: `/train/trainStudentList`,
method: 'get', method: 'get',
params, params,
}) })
} }
@ -180,3 +180,10 @@ export function addRemarkI(data) {
data, data,
}) })
} }
// 删除报名人
export function delSign(id) {
return request({
url: '/train/trainStuden/del?studentId=' + id,
method: 'delete',
})
}

@ -57,6 +57,7 @@
<span v-if="scope.row.classType == 0">校企合作班</span> <span v-if="scope.row.classType == 0">校企合作班</span>
<span v-if="scope.row.classType == 1">线下培训进阶班</span> <span v-if="scope.row.classType == 1">线下培训进阶班</span>
<span v-if="scope.row.classType == 2">可靠性人才培训班</span> <span v-if="scope.row.classType == 2">可靠性人才培训班</span>
<span v-if="scope.row.classType == 3">师资培训班</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训教师" align="center" prop="teacherName" /> <el-table-column label="培训教师" align="center" prop="teacherName" />

@ -40,6 +40,7 @@
>修改备注</el-button >修改备注</el-button
> >
<el-button size="mini" type="text" v-else @click="addRemark(scope.row)">添加备注</el-button> <el-button size="mini" type="text" v-else @click="addRemark(scope.row)">添加备注</el-button>
<el-button size="mini" type="text" @click="delRow(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -52,6 +53,7 @@
>修改备注</el-button >修改备注</el-button
> >
<el-button size="mini" type="text" v-else @click="addRemark(scope.row)">添加备注</el-button> <el-button size="mini" type="text" v-else @click="addRemark(scope.row)">添加备注</el-button>
<el-button size="mini" type="text" @click="delRow(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -86,7 +88,7 @@
</div> </div>
</template> </template>
<script> <script>
import { searchNum, addRemarkI } from '@/api/trainService/index.js' import { searchNum, addRemarkI, delSign } from '@/api/trainService/index.js'
// 1 2 3 4 5 status // 1 2 3 4 5 status
export default { export default {
name: 'peixunbaoming', name: 'peixunbaoming',
@ -136,7 +138,7 @@ export default {
// json // json
if (res.rows[0].data) { if (res.rows[0].data) {
this.headerList = [] this.headerList = []
this.headerData ={} this.headerData = {}
// //
const firstData = JSON.parse(res.rows[0].data) const firstData = JSON.parse(res.rows[0].data)
firstData.forEach((it) => { firstData.forEach((it) => {
@ -177,6 +179,21 @@ export default {
this.resetForm('queryForm') this.resetForm('queryForm')
this.getStudentList() this.getStudentList()
}, },
//
delRow(row) {
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
delSign(row.trainingStudentId).then((res) => {
this.getStudentList()
this.$message.success('删除成功')
})
})
.catch(() => {})
},
// //
addRemark(row) { addRemark(row) {
this.title = '添加备注' this.title = '添加备注'

Loading…
Cancel
Save