删除报名人

main
lijingyu007 5 months ago
parent d44268b783
commit db90b2f82a
  1. 2
      .env.development
  2. 103
      src/api/trainService/index.js
  3. 3
      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_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://172.16.36.180:9999'

@ -1,84 +1,84 @@
import request from '@/utils/request'
export function getSchoolList(query) {
return request({
url: '/train/schoolList',
method: 'get',
params: query,
// headers: {
// isToken: false
// },
})
return request({
url: '/train/schoolList',
method: 'get',
params: query,
// headers: {
// isToken: false
// },
})
}
export function addSchool(data) {
return request({
url: '/train/school/add',
method: 'post',
data,
return request({
url: '/train/school/add',
method: 'post',
data,
})
})
}
export function updateSchool(data) {
return request({
url: '/train/school/update',
method: 'post',
data,
})
return request({
url: '/train/school/update',
method: 'post',
data,
})
}
export function delSchool(id) {
return request({
url: `/train/school/del/?schoolId=${id}`,
method: 'delete',
return request({
url: `/train/school/del/?schoolId=${id}`,
method: 'delete',
})
})
}
export function getSignUpList(query) {
return request({
url: `/train/trainClassList`,
method: 'get',
params: query,
return request({
url: `/train/trainClassList`,
method: 'get',
params: query,
})
})
}
export function addSignUp(data) {
return request({
url: '/train/trainClass/add',
method: 'post',
data,
return request({
url: '/train/trainClass/add',
method: 'post',
data,
})
})
}
export function updateSignUp(data) {
return request({
url: '/train/trainClass/update',
method: 'post',
data,
return request({
url: '/train/trainClass/update',
method: 'post',
data,
})
})
}
export function delSignUp(id) {
return request({
url: `/train/trainClass/del?trainClassId=${id}`,
method: 'delete',
return request({
url: `/train/trainClass/del?trainClassId=${id}`,
method: 'delete',
})
})
}
// 查询已报名列表
export function searchNum(params) {
return request({
url: `/train/trainStudentList`,
method: 'get',
params,
})
return request({
url: `/train/trainStudentList`,
method: 'get',
params,
})
}
@ -179,4 +179,11 @@ export function addRemarkI(data) {
method: 'post',
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 == 1">线下培训进阶班</span>
<span v-if="scope.row.classType == 2">可靠性人才培训班</span>
<span v-if="scope.row.classType == 3">师资培训班</span>
</template>
</el-table-column>
<el-table-column label="培训教师" align="center" prop="teacherName" />
@ -280,7 +281,7 @@
@pagination="getStudentList"
/>
</el-dialog>
</div>
</template>
<script>

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

Loading…
Cancel
Save