基地校初选
This commit is contained in:
parent
ca4af92dc9
commit
a149333947
@ -1,6 +1,7 @@
|
||||
package com.ruoyi.web.controller.jxjs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -28,8 +29,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/jxjs/jxjsjbxx")
|
||||
public class TsbzJxjsjbxxController extends BaseController
|
||||
{
|
||||
public class TsbzJxjsjbxxController extends BaseController {
|
||||
@Autowired
|
||||
private ITsbzJxjsjbxxService tsbzJxjsjbxxService;
|
||||
|
||||
@ -38,8 +38,7 @@ public class TsbzJxjsjbxxController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jdx:list')")
|
||||
@GetMapping("/listnotjdx")
|
||||
public TableDataInfo listnotjdx(TsbzJxjsjbxx tsbzJxjsjbxx)
|
||||
{
|
||||
public TableDataInfo listnotjdx(TsbzJxjsjbxx tsbzJxjsjbxx) {
|
||||
startPage();
|
||||
List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxListnotjdx(tsbzJxjsjbxx);
|
||||
return getDataTable(list);
|
||||
@ -50,8 +49,7 @@ public class TsbzJxjsjbxxController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TsbzJxjsjbxx tsbzJxjsjbxx)
|
||||
{
|
||||
public TableDataInfo list(TsbzJxjsjbxx tsbzJxjsjbxx) {
|
||||
startPage();
|
||||
List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxList(tsbzJxjsjbxx);
|
||||
return getDataTable(list);
|
||||
@ -63,8 +61,7 @@ public class TsbzJxjsjbxxController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:export')")
|
||||
@Log(title = "见习教师基本信息", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(TsbzJxjsjbxx tsbzJxjsjbxx)
|
||||
{
|
||||
public AjaxResult export(TsbzJxjsjbxx tsbzJxjsjbxx) {
|
||||
List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxList(tsbzJxjsjbxx);
|
||||
ExcelUtil<TsbzJxjsjbxx> util = new ExcelUtil<TsbzJxjsjbxx>(TsbzJxjsjbxx.class);
|
||||
return util.exportExcel(list, "jxjsjbxx");
|
||||
@ -75,8 +72,7 @@ public class TsbzJxjsjbxxController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(tsbzJxjsjbxxService.selectTsbzJxjsjbxxById(id));
|
||||
}
|
||||
|
||||
@ -86,8 +82,7 @@ public class TsbzJxjsjbxxController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:add')")
|
||||
@Log(title = "见习教师基本信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TsbzJxjsjbxx tsbzJxjsjbxx)
|
||||
{
|
||||
public AjaxResult add(@RequestBody TsbzJxjsjbxx tsbzJxjsjbxx) {
|
||||
return toAjax(tsbzJxjsjbxxService.insertTsbzJxjsjbxx(tsbzJxjsjbxx));
|
||||
}
|
||||
|
||||
@ -97,19 +92,41 @@ public class TsbzJxjsjbxxController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:edit')")
|
||||
@Log(title = "见习教师基本信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TsbzJxjsjbxx tsbzJxjsjbxx)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody TsbzJxjsjbxx 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')")
|
||||
@Log(title = "见习教师基本信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(tsbzJxjsjbxxService.deleteTsbzJxjsjbxxByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
return request({
|
||||
|
@ -285,6 +285,9 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const jdxId = this.$route.params && this.$route.params.id;
|
||||
//console.log(jdxId);
|
||||
this.queryParams.jdxid = jdxId;
|
||||
this.getList();
|
||||
this.getDicts("sys_user_sex").then((response) => {
|
||||
this.xbOptions = response.data;
|
||||
|
@ -192,8 +192,7 @@
|
||||
|
||||
<!-- 添加或修改基地校对话框 -->
|
||||
<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="handleSelectionChange">
|
||||
<el-table :data="jxjsjbxxList" @selection-change="handleSelectionChangeFpjs">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
|
||||
<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="lqnf" />
|
||||
</el-table>
|
||||
</el-form>
|
||||
<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>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -217,7 +215,11 @@
|
||||
<script>
|
||||
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 {
|
||||
name: "Jdx",
|
||||
@ -227,6 +229,8 @@ export default {
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
jdxid: "",
|
||||
jsIds: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
@ -360,6 +364,10 @@ export default {
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChangeFpjs(selection) {
|
||||
this.jsIds = selection.map((item) => item.id);
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
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) {
|
||||
const ids = row.id || this.ids;
|
||||
@ -421,6 +443,7 @@ export default {
|
||||
handleFpjs(row) {
|
||||
const ids = row.id || this.ids;
|
||||
console.log(ids);
|
||||
this.jdxid = ids;
|
||||
this.open_fpjs = true;
|
||||
this.getJxjsList();
|
||||
},
|
||||
|
0
ruoyi-ui/src/views/jxjs/jdxcx/index.vue
Normal file
0
ruoyi-ui/src/views/jxjs/jdxcx/index.vue
Normal file
Loading…
x
Reference in New Issue
Block a user