基地校初选

This commit is contained in:
paidaxing444 2020-08-21 11:10:32 +08:00
parent ca4af92dc9
commit a149333947
5 changed files with 82 additions and 31 deletions

View File

@ -1,6 +1,7 @@
package com.ruoyi.web.controller.jxjs; package com.ruoyi.web.controller.jxjs;
import java.util.List; import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -28,8 +29,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
*/ */
@RestController @RestController
@RequestMapping("/jxjs/jxjsjbxx") @RequestMapping("/jxjs/jxjsjbxx")
public class TsbzJxjsjbxxController extends BaseController public class TsbzJxjsjbxxController extends BaseController {
{
@Autowired @Autowired
private ITsbzJxjsjbxxService tsbzJxjsjbxxService; private ITsbzJxjsjbxxService tsbzJxjsjbxxService;
@ -38,8 +38,7 @@ public class TsbzJxjsjbxxController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('jxjs:jdx:list')") @PreAuthorize("@ss.hasPermi('jxjs:jdx:list')")
@GetMapping("/listnotjdx") @GetMapping("/listnotjdx")
public TableDataInfo listnotjdx(TsbzJxjsjbxx tsbzJxjsjbxx) public TableDataInfo listnotjdx(TsbzJxjsjbxx tsbzJxjsjbxx) {
{
startPage(); startPage();
List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxListnotjdx(tsbzJxjsjbxx); List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxListnotjdx(tsbzJxjsjbxx);
return getDataTable(list); return getDataTable(list);
@ -50,8 +49,7 @@ public class TsbzJxjsjbxxController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:list')") @PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TsbzJxjsjbxx tsbzJxjsjbxx) public TableDataInfo list(TsbzJxjsjbxx tsbzJxjsjbxx) {
{
startPage(); startPage();
List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxList(tsbzJxjsjbxx); List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxList(tsbzJxjsjbxx);
return getDataTable(list); return getDataTable(list);
@ -63,8 +61,7 @@ public class TsbzJxjsjbxxController extends BaseController
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:export')") @PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:export')")
@Log(title = "见习教师基本信息", businessType = BusinessType.EXPORT) @Log(title = "见习教师基本信息", businessType = BusinessType.EXPORT)
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TsbzJxjsjbxx tsbzJxjsjbxx) public AjaxResult export(TsbzJxjsjbxx tsbzJxjsjbxx) {
{
List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxList(tsbzJxjsjbxx); List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxList(tsbzJxjsjbxx);
ExcelUtil<TsbzJxjsjbxx> util = new ExcelUtil<TsbzJxjsjbxx>(TsbzJxjsjbxx.class); ExcelUtil<TsbzJxjsjbxx> util = new ExcelUtil<TsbzJxjsjbxx>(TsbzJxjsjbxx.class);
return util.exportExcel(list, "jxjsjbxx"); return util.exportExcel(list, "jxjsjbxx");
@ -75,8 +72,7 @@ public class TsbzJxjsjbxxController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:query')") @PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return AjaxResult.success(tsbzJxjsjbxxService.selectTsbzJxjsjbxxById(id)); return AjaxResult.success(tsbzJxjsjbxxService.selectTsbzJxjsjbxxById(id));
} }
@ -86,8 +82,7 @@ public class TsbzJxjsjbxxController extends BaseController
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:add')") @PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:add')")
@Log(title = "见习教师基本信息", businessType = BusinessType.INSERT) @Log(title = "见习教师基本信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TsbzJxjsjbxx tsbzJxjsjbxx) public AjaxResult add(@RequestBody TsbzJxjsjbxx tsbzJxjsjbxx) {
{
return toAjax(tsbzJxjsjbxxService.insertTsbzJxjsjbxx(tsbzJxjsjbxx)); return toAjax(tsbzJxjsjbxxService.insertTsbzJxjsjbxx(tsbzJxjsjbxx));
} }
@ -97,19 +92,41 @@ public class TsbzJxjsjbxxController extends BaseController
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:edit')") @PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:edit')")
@Log(title = "见习教师基本信息", businessType = BusinessType.UPDATE) @Log(title = "见习教师基本信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TsbzJxjsjbxx tsbzJxjsjbxx) public AjaxResult edit(@RequestBody TsbzJxjsjbxx tsbzJxjsjbxx) {
{
return toAjax(tsbzJxjsjbxxService.updateTsbzJxjsjbxx(tsbzJxjsjbxx)); return toAjax(tsbzJxjsjbxxService.updateTsbzJxjsjbxx(tsbzJxjsjbxx));
} }
/**
* 修改见习教师基本信息
*/
@PreAuthorize("@ss.hasPermi('jxjs:jdx:edit')")
@Log(title = "见习教师基本信息", businessType = BusinessType.UPDATE)
@PostMapping("/updatejsjdx/{ids}/{jdxid}")
public AjaxResult updateJsJdx(@PathVariable Long[] ids, @PathVariable String jdxid) {
int iCount = 0;
System.out.println("jsid=" + ids[0]);
System.out.println("jdxid=" + jdxid);
if (ids == null || ids.length == 0) {
return AjaxResult.error("请选择要分配的见习教师");
}
TsbzJxjsjbxx tsbzJxjsjbxx = null;
for (int i = 0; i < ids.length; i++) {
tsbzJxjsjbxx = new TsbzJxjsjbxx();
tsbzJxjsjbxx.setId(ids[i]);
tsbzJxjsjbxx.setJdxid(jdxid);
iCount = iCount + (tsbzJxjsjbxxService.updateTsbzJxjsjbxx(tsbzJxjsjbxx));
}
return toAjax(iCount);
}
/** /**
* 删除见习教师基本信息 * 删除见习教师基本信息
*/ */
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:remove')") @PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:remove')")
@Log(title = "见习教师基本信息", businessType = BusinessType.DELETE) @Log(title = "见习教师基本信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tsbzJxjsjbxxService.deleteTsbzJxjsjbxxByIds(ids)); return toAjax(tsbzJxjsjbxxService.deleteTsbzJxjsjbxxByIds(ids));
} }
} }

View File

@ -35,6 +35,14 @@ export function addJxjsjbxx(data) {
}) })
} }
// 新增基地校
export function updateJxjsJdx(id, jdxid) {
return request({
url: '/jxjs/jxjsjbxx/updatejsjdx/' + id + "/" + jdxid,
method: 'post'
})
}
// 修改见习教师基本信息 // 修改见习教师基本信息
export function updateJxjsjbxx(data) { export function updateJxjsjbxx(data) {
return request({ return request({

View File

@ -285,6 +285,9 @@ export default {
}; };
}, },
created() { created() {
const jdxId = this.$route.params && this.$route.params.id;
//console.log(jdxId);
this.queryParams.jdxid = jdxId;
this.getList(); this.getList();
this.getDicts("sys_user_sex").then((response) => { this.getDicts("sys_user_sex").then((response) => {
this.xbOptions = response.data; this.xbOptions = response.data;

View File

@ -192,8 +192,7 @@
<!-- 添加或修改基地校对话框 --> <!-- 添加或修改基地校对话框 -->
<el-dialog title="基地校分配见习教师" :visible.sync="open_fpjs" width="600px" append-to-body> <el-dialog title="基地校分配见习教师" :visible.sync="open_fpjs" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-table :data="jxjsjbxxList" @selection-change="handleSelectionChangeFpjs">
<el-table :data="jxjsjbxxList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="编号" align="center" prop="id" /> --> <!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column label="姓名" align="center" prop="name" /> <el-table-column label="姓名" align="center" prop="name" />
@ -205,9 +204,8 @@
<el-table-column label="是否师范生" align="center" prop="sfsfs" :formatter="sfsfsFormat" />--> <el-table-column label="是否师范生" align="center" prop="sfsfs" :formatter="sfsfsFormat" />-->
<el-table-column label="录取年份" align="center" prop="lqnf" /> <el-table-column label="录取年份" align="center" prop="lqnf" />
</el-table> </el-table>
</el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm_fpjs"> </el-button>
<el-button @click="cancel_fpjs"> </el-button> <el-button @click="cancel_fpjs"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -217,7 +215,11 @@
<script> <script>
import { listJdx, getJdx, delJdx, addJdx, updateJdx } from "@/api/jxjs/jdx"; import { listJdx, getJdx, delJdx, addJdx, updateJdx } from "@/api/jxjs/jdx";
import { listJxjsjbxxnotjdx, getJxjsjbxx } from "@/api/jxjs/jxjsjbxx"; import {
listJxjsjbxxnotjdx,
getJxjsjbxx,
updateJxjsJdx,
} from "@/api/jxjs/jxjsjbxx";
export default { export default {
name: "Jdx", name: "Jdx",
@ -227,6 +229,8 @@ export default {
loading: true, loading: true,
// //
ids: [], ids: [],
jdxid: "",
jsIds: [],
// //
single: true, single: true,
// //
@ -360,6 +364,10 @@ export default {
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
//
handleSelectionChangeFpjs(selection) {
this.jsIds = selection.map((item) => item.id);
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
@ -400,6 +408,20 @@ export default {
} }
}); });
}, },
/** 分配教师提交按钮 */
submitForm_fpjs() {
if (this.jsIds == null || this.jsIds.length == 0) {
this.msgError("请选择要分配的教师");
} else {
console.log(this.jsIds[0]);
updateJxjsJdx(this.jsIds, this.jdxid).then((response) => {
if (response.code === 200) {
this.msgSuccess("分配成功");
this.open_fpjs = false;
}
});
}
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
@ -421,6 +443,7 @@ export default {
handleFpjs(row) { handleFpjs(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
console.log(ids); console.log(ids);
this.jdxid = ids;
this.open_fpjs = true; this.open_fpjs = true;
this.getJxjsList(); this.getJxjsList();
}, },

View File