周计划
This commit is contained in:
parent
54d4dffe5b
commit
893a520a48
@ -43,6 +43,14 @@ export function delPlanweek(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 提交周计划(家长和教育部门)
|
||||
export function checkPlanweek(id) {
|
||||
return request({
|
||||
url: '/benyi/planweek/check/' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出周计划(家长和教育部门)
|
||||
export function exportPlanweek(query) {
|
||||
return request({
|
||||
|
@ -202,6 +202,21 @@ export const constantRoutes = [{
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/benyi_course/planweek',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'data/:id',
|
||||
component: () =>
|
||||
import ('@/views/benyi/planweek/data'),
|
||||
name: 'planweek1',
|
||||
meta: {
|
||||
title: '周计划(明细)',
|
||||
icon: ''
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/benyi_course/theme',
|
||||
component: Layout,
|
||||
|
430
ruoyi-ui/src/views/benyi/planweek/data.vue
Normal file
430
ruoyi-ui/src/views/benyi/planweek/data.vue
Normal file
@ -0,0 +1,430 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="周计划" prop="wid">
|
||||
<el-select v-model="queryParams.wid" size="small">
|
||||
<el-option
|
||||
v-for="item in planweekOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动类型" prop="activitytype">
|
||||
<el-select v-model="queryParams.activitytype" placeholder="请选择活动类型" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in activitytypeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动内容" prop="content">
|
||||
<el-input
|
||||
v-model="queryParams.content"
|
||||
placeholder="请输入活动内容"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="activitytime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="queryParams.activitytime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择活动时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="创建人" prop="createuserid">
|
||||
<el-input
|
||||
v-model="queryParams.createuserid"
|
||||
placeholder="请输入创建人"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改人" prop="updateuserid">
|
||||
<el-input
|
||||
v-model="queryParams.updateuserid"
|
||||
placeholder="请输入修改人"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['benyi:planweekitem:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['benyi:planweekitem:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['benyi:planweekitem:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['benyi:planweekitem:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="planweekitemList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="所属计划" align="center" prop="wid" />
|
||||
<el-table-column
|
||||
label="活动类型"
|
||||
align="center"
|
||||
prop="activitytype"
|
||||
:formatter="activitytypeFormat"
|
||||
/>
|
||||
<el-table-column label="活动内容" align="center" prop="content" />
|
||||
<el-table-column label="活动时间" align="center" prop="activitytime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.activitytime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" align="center" prop="createuserid" />
|
||||
<el-table-column label="修改人" align="center" prop="updateuserid" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['benyi:planweekitem:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['benyi:planweekitem:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改周计划(家长和教育部门细化)对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="所属计划" prop="wid">
|
||||
<el-select v-model="form.wid" size="small" :disabled="true">
|
||||
<el-option
|
||||
v-for="item in planweekOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动类型">
|
||||
<el-select v-model="form.activitytype" placeholder="请选择活动类型">
|
||||
<el-option
|
||||
v-for="dict in activitytypeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动内容" prop="content">
|
||||
<el-input v-model="form.content" placeholder="请输入活动内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="activitytime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="form.activitytime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择活动时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listPlanweekitem,
|
||||
getPlanweekitem,
|
||||
delPlanweekitem,
|
||||
addPlanweekitem,
|
||||
updatePlanweekitem,
|
||||
exportPlanweekitem
|
||||
} from "@/api/benyi/planweekitem";
|
||||
|
||||
import { getPlanweek, listPlanweek } from "@/api/benyi/planweek";
|
||||
|
||||
export default {
|
||||
name: "Planweekitem",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 周计划(家长和教育部门细化)表格数据
|
||||
planweekitemList: [],
|
||||
// 周计划
|
||||
planweekOptions: [],
|
||||
// 默认周计划
|
||||
defaultWeekType: "",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 活动类型字典
|
||||
activitytypeOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
wid: undefined,
|
||||
activitytype: undefined,
|
||||
content: undefined,
|
||||
activitytime: undefined,
|
||||
createuserid: undefined,
|
||||
updateuserid: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const planweekid = this.$route.params && this.$route.params.id;
|
||||
this.getPlanweek2(planweekid);
|
||||
this.getPlanWeekList();
|
||||
this.getDicts("sys_math_type").then(response => {
|
||||
this.activitytypeOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 周计划
|
||||
getPlanweek2(planweekid) {
|
||||
getPlanweek(planweekid).then((response) => {
|
||||
this.queryParams.wid = response.data.id;
|
||||
this.defaultWeekType = response.data.id;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 查询周计划(家长和教育部门细化)列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPlanweekitem(this.queryParams).then(response => {
|
||||
this.planweekitemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 查询周计划选项
|
||||
getPlanWeekList() {
|
||||
listPlanweek().then((response) => {
|
||||
this.planweekOptions = response.rows;
|
||||
});
|
||||
},
|
||||
// 周计划字典翻译
|
||||
themePlanFormat(row, column) {
|
||||
// return this.selectDictLabel(this.classOptions, row.classid);
|
||||
var actions = [];
|
||||
var datas = this.planweekOptions;
|
||||
Object.keys(datas).map((key) => {
|
||||
if (datas[key].id == "" + row.wid) {
|
||||
actions.push(datas[key].name);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return actions.join("");
|
||||
},
|
||||
// 活动类型字典翻译
|
||||
activitytypeFormat(row, column) {
|
||||
return this.selectDictLabel(this.activitytypeOptions, row.activitytype);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
wid: undefined,
|
||||
activitytype: undefined,
|
||||
content: undefined,
|
||||
activitytime: undefined,
|
||||
createuserid: undefined,
|
||||
createTime: undefined,
|
||||
updateuserid: undefined,
|
||||
updateTime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.wid = this.defaultWeekType;
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加周计划(家长和教育部门细化)";
|
||||
this.form.wid = this.queryParams.wid;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getPlanweekitem(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改周计划(家长和教育部门细化)";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updatePlanweekitem(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addPlanweekitem(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm(
|
||||
'是否确认删除周计划(家长和教育部门细化)编号为"' + ids + '"的数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
return delPlanweekitem(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm(
|
||||
"是否确认导出所有周计划(家长和教育部门细化)数据项?",
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
return exportPlanweekitem(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,24 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="学校id" prop="schoolid">
|
||||
<el-input
|
||||
v-model="queryParams.schoolid"
|
||||
placeholder="请输入学校id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班级id" prop="classid">
|
||||
<el-input
|
||||
v-model="queryParams.classid"
|
||||
placeholder="请输入班级id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
@ -28,6 +10,16 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="当前状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择当前状态" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in statusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="starttime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
@ -59,46 +51,29 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="教学目标(社会)" prop="jxmbSh">
|
||||
<el-form-item label="审核人" prop="shrid">
|
||||
<el-input
|
||||
v-model="queryParams.jxmbSh"
|
||||
placeholder="请输入教学目标(社会)"
|
||||
v-model="queryParams.shrid"
|
||||
placeholder="请输入审核人"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="教学目标(语言)" prop="jxmbYy">
|
||||
<!--
|
||||
<el-form-item label="学校id" prop="schoolid">
|
||||
<el-input
|
||||
v-model="queryParams.jxmbYy"
|
||||
placeholder="请输入教学目标(语言)"
|
||||
v-model="queryParams.schoolid"
|
||||
placeholder="请输入学校id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="教学目标(健康)" prop="jxmbJk">
|
||||
<el-form-item label="班级id" prop="classid">
|
||||
<el-input
|
||||
v-model="queryParams.jxmbJk"
|
||||
placeholder="请输入教学目标(健康)"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="教学目标(科学)" prop="jxmbKx">
|
||||
<el-input
|
||||
v-model="queryParams.jxmbKx"
|
||||
placeholder="请输入教学目标(科学)"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="教学目标(艺术)" prop="jxmbYs">
|
||||
<el-input
|
||||
v-model="queryParams.jxmbYs"
|
||||
placeholder="请输入教学目标(艺术)"
|
||||
v-model="queryParams.classid"
|
||||
placeholder="请输入班级id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@ -112,22 +87,9 @@
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="当前状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择当前状态" clearable size="small">
|
||||
<el-option label="请选择字典生成" value />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人" prop="shrid">
|
||||
<el-input
|
||||
v-model="queryParams.shrid"
|
||||
placeholder="请输入审核人"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核时间" prop="shtime">
|
||||
</el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="审核时间" prop="shtime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
@ -137,7 +99,7 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择审核时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -188,9 +150,14 @@
|
||||
<el-table v-loading="loading" :data="planweekList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="学校id" align="center" prop="schoolid" />
|
||||
<el-table-column label="班级id" align="center" prop="classid" />
|
||||
<el-table-column label="计划名称" align="center" prop="name" />
|
||||
<el-table-column label="班级id" align="center" prop="classid" :formatter="classFormat" />
|
||||
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/benyi_course/planweek/data/' + scope.row.id" class="link-type">
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center" prop="starttime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d}') }}</span>
|
||||
@ -202,19 +169,15 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本周主题" align="center" prop="themeofweek" />
|
||||
<el-table-column label="教学目标(社会)" align="center" prop="jxmbSh" />
|
||||
<el-table-column label="教学目标(语言)" align="center" prop="jxmbYy" />
|
||||
<el-table-column label="教学目标(健康)" align="center" prop="jxmbJk" />
|
||||
<el-table-column label="教学目标(科学)" align="center" prop="jxmbKx" />
|
||||
<el-table-column label="教学目标(艺术)" align="center" prop="jxmbYs" />
|
||||
<el-table-column label="创建人" align="center" prop="createuserid" />
|
||||
<el-table-column label="当前状态" align="center" prop="status" />
|
||||
<el-table-column label="当前状态" align="center" prop="status" :formatter="statusFormat" />
|
||||
<el-table-column label="审核人" align="center" prop="shrid" />
|
||||
<el-table-column label="审核时间" align="center" prop="shtime" width="180">
|
||||
<!-- <el-table-column label="审核时间" align="center" prop="shtime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.shtime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="学校id" align="center" prop="schoolid" />
|
||||
-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -224,6 +187,14 @@
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:planweek:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-check"
|
||||
@click="handleCheck(scope.row)"
|
||||
v-hasPermi="['system:planweek:edit']"
|
||||
v-show="isShow(scope.row)"
|
||||
>提交</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -246,12 +217,6 @@
|
||||
<!-- 添加或修改周计划(家长和教育部门)对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="学校id" prop="schoolid">
|
||||
<el-input v-model="form.schoolid" placeholder="请输入学校id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级id" prop="classid">
|
||||
<el-input v-model="form.classid" placeholder="请输入班级id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入计划名称" />
|
||||
</el-form-item>
|
||||
@ -295,18 +260,26 @@
|
||||
<el-form-item label="教学目标(艺术)" prop="jxmbYs">
|
||||
<el-input v-model="form.jxmbYs" placeholder="请输入教学目标(艺术)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createuserid">
|
||||
<el-input v-model="form.createuserid" placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人" prop="shrid">
|
||||
<!-- <el-form-item label="当前状态">
|
||||
<el-select v-model="form.status" placeholder="请选择当前状态">
|
||||
<el-option
|
||||
v-for="dict in statusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="审核人" prop="shrid">
|
||||
<el-input v-model="form.shrid" placeholder="请输入审核人" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="学校id" prop="schoolid">
|
||||
<el-input v-model="form.schoolid" placeholder="请输入学校id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="审核时间" prop="shtime">
|
||||
<el-form-item label="班级id" prop="classid">
|
||||
<el-input v-model="form.classid" placeholder="请输入班级id" />
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="审核时间" prop="shtime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
@ -316,7 +289,7 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择审核时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -334,8 +307,11 @@ import {
|
||||
addPlanweek,
|
||||
updatePlanweek,
|
||||
exportPlanweek,
|
||||
checkPlanweek
|
||||
} from "@/api/benyi/planweek";
|
||||
|
||||
import { listClass } from "@/api/system/class";
|
||||
|
||||
export default {
|
||||
name: "Planweek",
|
||||
data() {
|
||||
@ -352,6 +328,10 @@ export default {
|
||||
total: 0,
|
||||
// 周计划(家长和教育部门)表格数据
|
||||
planweekList: [],
|
||||
// 周计划当前状态
|
||||
statusOptions: [],
|
||||
//班级
|
||||
classOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -374,27 +354,66 @@ export default {
|
||||
createuserid: undefined,
|
||||
status: undefined,
|
||||
shrid: undefined,
|
||||
shtime: undefined,
|
||||
shtime: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getClassList();
|
||||
// 审核状态获取数据
|
||||
this.getDicts("sys_dm_planweekstatus").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询周计划(家长和教育部门)列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPlanweek(this.queryParams).then((response) => {
|
||||
listPlanweek(this.queryParams).then(response => {
|
||||
this.planweekList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 获取班级列表
|
||||
getClassList() {
|
||||
listClass(null).then((response) => {
|
||||
this.classOptions = response.rows;
|
||||
});
|
||||
},
|
||||
// // 主题名称家班级
|
||||
// getClassName(val) {
|
||||
// //locations是v-for里面的也是datas里面的值
|
||||
// let obj = {};
|
||||
// obj = this.classOptions.find((item) => {
|
||||
// return item.bjbh === val;
|
||||
// });
|
||||
// let getName = "";
|
||||
// getName = obj.bjmc;
|
||||
// this.form.name = getName;
|
||||
// },
|
||||
// 当前状态翻译
|
||||
statusFormat(row, column) {
|
||||
return this.selectDictLabel(this.statusOptions, row.status);
|
||||
},
|
||||
// 班级字典翻译
|
||||
classFormat(row, column) {
|
||||
// return this.selectDictLabel(this.classOptions, row.classid);
|
||||
var actions = [];
|
||||
var datas = this.classOptions;
|
||||
Object.keys(datas).map((key) => {
|
||||
if (datas[key].bjbh == "" + row.classid) {
|
||||
actions.push(datas[key].bjmc);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return actions.join("");
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@ -419,7 +438,7 @@ export default {
|
||||
createTime: undefined,
|
||||
status: "0",
|
||||
shrid: undefined,
|
||||
shtime: undefined,
|
||||
shtime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -435,7 +454,7 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
@ -449,18 +468,46 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getPlanweek(id).then((response) => {
|
||||
getPlanweek(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改周计划(家长和教育部门)";
|
||||
});
|
||||
},
|
||||
/** 审核提交按钮操作 */
|
||||
handleCheck(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm(
|
||||
'确认提交周计划编号为"' + ids + '"的数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(function () {
|
||||
return checkPlanweek(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("提交成功");
|
||||
})
|
||||
.catch(function () {});
|
||||
},
|
||||
isShow(row) {
|
||||
if (row.status == "1" || row.status == "2") {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updatePlanweek(this.form).then((response) => {
|
||||
updatePlanweek(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -468,7 +515,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addPlanweek(this.form).then((response) => {
|
||||
addPlanweek(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
@ -488,7 +535,7 @@ export default {
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
type: "warning"
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
@ -506,16 +553,16 @@ export default {
|
||||
this.$confirm("是否确认导出所有周计划(家长和教育部门)数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return exportPlanweek(queryParams);
|
||||
})
|
||||
.then((response) => {
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2,6 +2,8 @@ package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -32,6 +34,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
public class ByPlanweekController extends BaseController {
|
||||
@Autowired
|
||||
private IByPlanweekService byPlanweekService;
|
||||
@Autowired
|
||||
private SchoolCommon schoolCommon;
|
||||
|
||||
/**
|
||||
* 查询周计划(家长和教育部门)列表
|
||||
@ -61,7 +65,7 @@ public class ByPlanweekController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return AjaxResult.success(byPlanweekService.selectByPlanweekById(id));
|
||||
}
|
||||
|
||||
@ -72,7 +76,22 @@ public class ByPlanweekController extends BaseController {
|
||||
@Log(title = "周计划(家长和教育部门)", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByPlanweek byPlanweek) {
|
||||
String classId = schoolCommon.getClassId();
|
||||
//首先判断当前账户是否为幼儿园账号
|
||||
//if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) {
|
||||
String uuid = schoolCommon.getUuid();
|
||||
byPlanweek.setId(uuid);
|
||||
//学校id
|
||||
byPlanweek.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
//创建人id
|
||||
byPlanweek.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
//班级id
|
||||
byPlanweek.setClassid(classId);
|
||||
byPlanweek.setStatus("0");
|
||||
return toAjax(byPlanweekService.insertByPlanweek(byPlanweek));
|
||||
// } else {
|
||||
// return AjaxResult.error("当前用户非幼儿园,无法添加计划");
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -85,13 +104,33 @@ public class ByPlanweekController extends BaseController {
|
||||
return toAjax(byPlanweekService.updateByPlanweek(byPlanweek));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交审核周计划(家长和教育部门)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:edit')")
|
||||
@Log(title = "周计划(家长和教育部门)", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/check/{ids}")
|
||||
public AjaxResult check(@PathVariable String[] ids) {
|
||||
int iCount = 0;
|
||||
ByPlanweek byPlanweek = null;
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
byPlanweek = new ByPlanweek();
|
||||
byPlanweek.setId(ids[i]);
|
||||
byPlanweek.setStatus("1");
|
||||
//byPlanweek.setShrid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
|
||||
iCount = iCount + byPlanweekService.updateByPlanweek(byPlanweek);
|
||||
}
|
||||
return toAjax(iCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除周计划(家长和教育部门)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:remove')")
|
||||
@Log(title = "周计划(家长和教育部门)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(byPlanweekService.deleteByPlanweekByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
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;
|
||||
@ -25,20 +24,22 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
* 周计划(家长和教育部门细化)Controller
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-24
|
||||
* @date 2020-08-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/planweekitem")
|
||||
public class ByPlanweekitemController extends BaseController {
|
||||
public class ByPlanweekitemController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IByPlanweekitemService byPlanweekitemService;
|
||||
|
||||
/**
|
||||
* 查询周计划(家长和教育部门细化)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:list')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByPlanweekitem byPlanweekitem) {
|
||||
public TableDataInfo list(ByPlanweekitem byPlanweekitem)
|
||||
{
|
||||
startPage();
|
||||
List<ByPlanweekitem> list = byPlanweekitemService.selectByPlanweekitemList(byPlanweekitem);
|
||||
return getDataTable(list);
|
||||
@ -47,10 +48,11 @@ public class ByPlanweekitemController extends BaseController {
|
||||
/**
|
||||
* 导出周计划(家长和教育部门细化)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:export')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:export')")
|
||||
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByPlanweekitem byPlanweekitem) {
|
||||
public AjaxResult export(ByPlanweekitem byPlanweekitem)
|
||||
{
|
||||
List<ByPlanweekitem> list = byPlanweekitemService.selectByPlanweekitemList(byPlanweekitem);
|
||||
ExcelUtil<ByPlanweekitem> util = new ExcelUtil<ByPlanweekitem>(ByPlanweekitem.class);
|
||||
return util.exportExcel(list, "planweekitem");
|
||||
@ -59,39 +61,43 @@ public class ByPlanweekitemController extends BaseController {
|
||||
/**
|
||||
* 获取周计划(家长和教育部门细化)详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:query')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(byPlanweekitemService.selectByPlanweekitemById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增周计划(家长和教育部门细化)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:add')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:add')")
|
||||
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem) {
|
||||
public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem)
|
||||
{
|
||||
return toAjax(byPlanweekitemService.insertByPlanweekitem(byPlanweekitem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改周计划(家长和教育部门细化)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:edit')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:edit')")
|
||||
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem) {
|
||||
public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem)
|
||||
{
|
||||
return toAjax(byPlanweekitemService.updateByPlanweekitem(byPlanweekitem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除周计划(家长和教育部门细化)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweek:remove')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:planweekitem:remove')")
|
||||
@Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(byPlanweekitemService.deleteByPlanweekitemByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class ByPlanweek extends BaseEntity {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 学校id
|
||||
@ -115,11 +115,19 @@ public class ByPlanweek extends BaseEntity {
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date shtime;
|
||||
|
||||
public void setId(Long id) {
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@Excel(name = "审核意见")
|
||||
private String shyj;
|
||||
|
||||
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@ -263,6 +271,15 @@ public class ByPlanweek extends BaseEntity {
|
||||
.append("status", getStatus())
|
||||
.append("shrid", getShrid())
|
||||
.append("shtime", getShtime())
|
||||
.append("shyj", getShyj())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public String getShyj() {
|
||||
return shyj;
|
||||
}
|
||||
|
||||
public void setShyj(String shyj) {
|
||||
this.shyj = shyj;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
* 周计划(家长和教育部门细化)对象 by_planweekitem
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-24
|
||||
* @date 2020-08-27
|
||||
*/
|
||||
public class ByPlanweekitem extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -26,7 +26,7 @@ public class ByPlanweekitem extends BaseEntity {
|
||||
* 所属计划
|
||||
*/
|
||||
@Excel(name = "所属计划")
|
||||
private Long wid;
|
||||
private String wid;
|
||||
|
||||
/**
|
||||
* 活动类型
|
||||
@ -67,11 +67,11 @@ public class ByPlanweekitem extends BaseEntity {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setWid(Long wid) {
|
||||
public void setWid(String wid) {
|
||||
this.wid = wid;
|
||||
}
|
||||
|
||||
public Long getWid() {
|
||||
public String getWid() {
|
||||
return wid;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ public interface ByPlanweekMapper
|
||||
* @param id 周计划(家长和教育部门)ID
|
||||
* @return 周计划(家长和教育部门)
|
||||
*/
|
||||
public ByPlanweek selectByPlanweekById(Long id);
|
||||
public ByPlanweek selectByPlanweekById(String id);
|
||||
|
||||
/**
|
||||
* 查询周计划(家长和教育部门)列表
|
||||
@ -49,7 +49,7 @@ public interface ByPlanweekMapper
|
||||
* @param id 周计划(家长和教育部门)ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByPlanweekById(Long id);
|
||||
public int deleteByPlanweekById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除周计划(家长和教育部门)
|
||||
@ -57,5 +57,5 @@ public interface ByPlanweekMapper
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByPlanweekByIds(Long[] ids);
|
||||
public int deleteByPlanweekByIds(String[] ids);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import com.ruoyi.project.benyi.domain.ByPlanweekitem;
|
||||
* 周计划(家长和教育部门细化)Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-24
|
||||
* @date 2020-08-27
|
||||
*/
|
||||
public interface ByPlanweekitemMapper
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ public interface IByPlanweekService {
|
||||
* @param id 周计划(家长和教育部门)ID
|
||||
* @return 周计划(家长和教育部门)
|
||||
*/
|
||||
public ByPlanweek selectByPlanweekById(Long id);
|
||||
public ByPlanweek selectByPlanweekById(String id);
|
||||
|
||||
/**
|
||||
* 查询周计划(家长和教育部门)列表
|
||||
@ -49,7 +49,7 @@ public interface IByPlanweekService {
|
||||
* @param ids 需要删除的周计划(家长和教育部门)ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByPlanweekByIds(Long[] ids);
|
||||
public int deleteByPlanweekByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除周计划(家长和教育部门)信息
|
||||
@ -57,5 +57,5 @@ public interface IByPlanweekService {
|
||||
* @param id 周计划(家长和教育部门)ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByPlanweekById(Long id);
|
||||
public int deleteByPlanweekById(String id);
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByPlanweekitem;
|
||||
|
||||
/**
|
||||
* 周计划(家长和教育部门细化)Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-24
|
||||
* @date 2020-08-27
|
||||
*/
|
||||
public interface IByPlanweekitemService {
|
||||
public interface IByPlanweekitemService
|
||||
{
|
||||
/**
|
||||
* 查询周计划(家长和教育部门细化)
|
||||
*
|
||||
|
@ -27,7 +27,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService {
|
||||
* @return 周计划(家长和教育部门)
|
||||
*/
|
||||
@Override
|
||||
public ByPlanweek selectByPlanweekById(Long id) {
|
||||
public ByPlanweek selectByPlanweekById(String id) {
|
||||
return byPlanweekMapper.selectByPlanweekById(id);
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByPlanweekByIds(Long[] ids) {
|
||||
public int deleteByPlanweekByIds(String[] ids) {
|
||||
return byPlanweekMapper.deleteByPlanweekByIds(ids);
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByPlanweekById(Long id) {
|
||||
public int deleteByPlanweekById(String id) {
|
||||
return byPlanweekMapper.deleteByPlanweekById(id);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.ruoyi.project.benyi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -13,10 +12,11 @@ import com.ruoyi.project.benyi.service.IByPlanweekitemService;
|
||||
* 周计划(家长和教育部门细化)Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-08-24
|
||||
* @date 2020-08-27
|
||||
*/
|
||||
@Service
|
||||
public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
|
||||
public class ByPlanweekitemServiceImpl implements IByPlanweekitemService
|
||||
{
|
||||
@Autowired
|
||||
private ByPlanweekitemMapper byPlanweekitemMapper;
|
||||
|
||||
@ -27,7 +27,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
|
||||
* @return 周计划(家长和教育部门细化)
|
||||
*/
|
||||
@Override
|
||||
public ByPlanweekitem selectByPlanweekitemById(Long id) {
|
||||
public ByPlanweekitem selectByPlanweekitemById(Long id)
|
||||
{
|
||||
return byPlanweekitemMapper.selectByPlanweekitemById(id);
|
||||
}
|
||||
|
||||
@ -38,7 +39,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
|
||||
* @return 周计划(家长和教育部门细化)
|
||||
*/
|
||||
@Override
|
||||
public List<ByPlanweekitem> selectByPlanweekitemList(ByPlanweekitem byPlanweekitem) {
|
||||
public List<ByPlanweekitem> selectByPlanweekitemList(ByPlanweekitem byPlanweekitem)
|
||||
{
|
||||
return byPlanweekitemMapper.selectByPlanweekitemList(byPlanweekitem);
|
||||
}
|
||||
|
||||
@ -49,7 +51,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByPlanweekitem(ByPlanweekitem byPlanweekitem) {
|
||||
public int insertByPlanweekitem(ByPlanweekitem byPlanweekitem)
|
||||
{
|
||||
byPlanweekitem.setCreateTime(DateUtils.getNowDate());
|
||||
return byPlanweekitemMapper.insertByPlanweekitem(byPlanweekitem);
|
||||
}
|
||||
@ -61,7 +64,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByPlanweekitem(ByPlanweekitem byPlanweekitem) {
|
||||
public int updateByPlanweekitem(ByPlanweekitem byPlanweekitem)
|
||||
{
|
||||
byPlanweekitem.setUpdateTime(DateUtils.getNowDate());
|
||||
return byPlanweekitemMapper.updateByPlanweekitem(byPlanweekitem);
|
||||
}
|
||||
@ -73,7 +77,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByPlanweekitemByIds(Long[] ids) {
|
||||
public int deleteByPlanweekitemByIds(Long[] ids)
|
||||
{
|
||||
return byPlanweekitemMapper.deleteByPlanweekitemByIds(ids);
|
||||
}
|
||||
|
||||
@ -84,7 +89,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByPlanweekitemById(Long id) {
|
||||
public int deleteByPlanweekitemById(Long id)
|
||||
{
|
||||
return byPlanweekitemMapper.deleteByPlanweekitemById(id);
|
||||
}
|
||||
}
|
||||
|
@ -22,10 +22,11 @@
|
||||
<result property="status" column="status"/>
|
||||
<result property="shrid" column="shrid"/>
|
||||
<result property="shtime" column="shtime"/>
|
||||
<result property="shyj" column="shyj" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByPlanweekVo">
|
||||
select id, schoolid, classid, name, starttime, endtime, themeofweek, jxmb_sh, jxmb_yy, jxmb_jk, jxmb_kx, jxmb_ys, createuserid, create_time, status, shrid, shtime from by_planweek
|
||||
select id, schoolid, classid, name, starttime, endtime, themeofweek, jxmb_sh, jxmb_yy, jxmb_jk, jxmb_kx, jxmb_ys, createuserid, create_time, status, shrid, shtime, shyj from by_planweek
|
||||
</sql>
|
||||
|
||||
<select id="selectByPlanweekList" parameterType="ByPlanweek" resultMap="ByPlanweekResult">
|
||||
@ -46,17 +47,19 @@
|
||||
<if test="status != null and status != ''">and status = #{status}</if>
|
||||
<if test="shrid != null ">and shrid = #{shrid}</if>
|
||||
<if test="shtime != null ">and shtime = #{shtime}</if>
|
||||
<if test="shyj != null and shyj != ''"> and shyj = #{shyj}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByPlanweekById" parameterType="Long" resultMap="ByPlanweekResult">
|
||||
<select id="selectByPlanweekById" parameterType="String" resultMap="ByPlanweekResult">
|
||||
<include refid="selectByPlanweekVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByPlanweek" parameterType="ByPlanweek" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insertByPlanweek" parameterType="ByPlanweek" >
|
||||
insert into by_planweek
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="schoolid != null ">schoolid,</if>
|
||||
<if test="classid != null and classid != ''">classid,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
@ -73,8 +76,10 @@
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="shrid != null ">shrid,</if>
|
||||
<if test="shtime != null ">shtime,</if>
|
||||
<if test="shyj != null and shyj != ''">shyj,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="schoolid != null ">#{schoolid},</if>
|
||||
<if test="classid != null and classid != ''">#{classid},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
@ -91,6 +96,7 @@
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="shrid != null ">#{shrid},</if>
|
||||
<if test="shtime != null ">#{shtime},</if>
|
||||
<if test="shyj != null and shyj != ''">#{shyj},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -113,11 +119,12 @@
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="shrid != null ">shrid = #{shrid},</if>
|
||||
<if test="shtime != null ">shtime = #{shtime},</if>
|
||||
<if test="shyj != null and shyj != ''">shyj = #{shyj},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPlanweekById" parameterType="Long">
|
||||
<delete id="deleteByPlanweekById" parameterType="String">
|
||||
delete from by_planweek where id = #{id}
|
||||
</delete>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
<select id="selectByPlanweekitemList" parameterType="ByPlanweekitem" resultMap="ByPlanweekitemResult">
|
||||
<include refid="selectByPlanweekitemVo"/>
|
||||
<where>
|
||||
<if test="wid != null ">and wid = #{wid}</if>
|
||||
<if test="wid != null and wid != ''"> and wid = #{wid}</if>
|
||||
<if test="activitytype != null and activitytype != ''"> and activitytype = #{activitytype}</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="activitytime != null "> and activitytime = #{activitytime}</if>
|
||||
@ -40,7 +40,7 @@
|
||||
<insert id="insertByPlanweekitem" parameterType="ByPlanweekitem" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_planweekitem
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="wid != null ">wid,</if>
|
||||
<if test="wid != null and wid != ''">wid,</if>
|
||||
<if test="activitytype != null and activitytype != ''">activitytype,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="activitytime != null ">activitytime,</if>
|
||||
@ -50,7 +50,7 @@
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="wid != null ">#{wid},</if>
|
||||
<if test="wid != null and wid != ''">#{wid},</if>
|
||||
<if test="activitytype != null and activitytype != ''">#{activitytype},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="activitytime != null ">#{activitytime},</if>
|
||||
@ -64,7 +64,7 @@
|
||||
<update id="updateByPlanweekitem" parameterType="ByPlanweekitem">
|
||||
update by_planweekitem
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="wid != null ">wid = #{wid},</if>
|
||||
<if test="wid != null and wid != ''">wid = #{wid},</if>
|
||||
<if test="activitytype != null and activitytype != ''">activitytype = #{activitytype},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="activitytime != null ">activitytime = #{activitytime},</if>
|
||||
|
Loading…
x
Reference in New Issue
Block a user