主题整合学期月计划(明细)

This commit is contained in:
paidaxing444
2020-08-26 09:07:40 +08:00
parent e47e97b89d
commit 2d8e96e661
17 changed files with 345 additions and 204 deletions

View File

@ -43,6 +43,14 @@ export function delMonthplan(id) {
})
}
// 提交主题整合学期计划
export function checkMonthplan(id) {
return request({
url: '/benyi/thememonthplan/check/' + id,
method: 'post'
})
}
// 导出主题整合月计划
export function exportMonthplan(query) {
return request({

View File

@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询主题整合周计划列表
export function listWeekplan(query) {
return request({
url: '/benyi/themeweekplan/list',
url: '/benyi/thememonthplanitem/list',
method: 'get',
params: query
})
@ -12,7 +12,7 @@ export function listWeekplan(query) {
// 查询主题整合周计划详细
export function getWeekplan(id) {
return request({
url: '/benyi/themeweekplan/' + id,
url: '/benyi/thememonthplanitem/' + id,
method: 'get'
})
}
@ -20,7 +20,7 @@ export function getWeekplan(id) {
// 新增主题整合周计划
export function addWeekplan(data) {
return request({
url: '/benyi/themeweekplan',
url: '/benyi/thememonthplanitem',
method: 'post',
data: data
})
@ -29,7 +29,7 @@ export function addWeekplan(data) {
// 修改主题整合周计划
export function updateWeekplan(data) {
return request({
url: '/benyi/themeweekplan',
url: '/benyi/thememonthplanitem',
method: 'put',
data: data
})
@ -38,7 +38,7 @@ export function updateWeekplan(data) {
// 删除主题整合周计划
export function delWeekplan(id) {
return request({
url: '/benyi/themeweekplan/' + id,
url: '/benyi/thememonthplanitem/' + id,
method: 'delete'
})
}
@ -46,7 +46,7 @@ export function delWeekplan(id) {
// 导出主题整合周计划
export function exportWeekplan(query) {
return request({
url: '/benyi/themeweekplan/export',
url: '/benyi/thememonthplanitem/export',
method: 'get',
params: query
})

View File

@ -350,7 +350,7 @@ import {
delChild,
addChild,
updateChild,
updateChild_tb
updateChild_tb,
} from "@/api/benyi/child";
import { listClass } from "@/api/system/class";
@ -365,22 +365,22 @@ export default {
placeholders: {
province: "请选择省",
city: "请选择市",
area: "请选择区"
area: "请选择区",
},
diglogForm: {
province: null,
city: null,
area: null
area: null,
},
diglogForm1: {
province: null,
city: null,
area: null
area: null,
},
diglogForm2: {
province: null,
city: null,
area: null
area: null,
},
// 遮罩层
loading: true,
@ -455,46 +455,47 @@ export default {
firstLanguage: undefined,
seconderLanguage: undefined,
otherLanguage: undefined,
createuserid: undefined
createuserid: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
name: [
{ required: true, message: "幼儿姓名不能为空", trigger: "blur" }
{ required: true, message: "幼儿姓名不能为空", trigger: "blur" },
],
phone: [
{ required: true, message: "家长手机号码不能为空", trigger: "blur" }
]
{ required: true, message: "家长手机号码不能为空", trigger: "blur" },
],
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }],
},
rules_tb: {
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }]
}
classid: [{ required: true, message: "班级不能为空", trigger: "blur" }],
},
};
},
created() {
this.getList();
this.getClassList();
this.getDicts("sys_user_sex").then(response => {
this.getDicts("sys_user_sex").then((response) => {
this.sexOptions = response.data;
});
this.getDicts("sys_normal_disable").then(response => {
this.getDicts("sys_normal_disable").then((response) => {
this.statusOptions = response.data;
});
this.getDicts("sys_dm_mz").then(response => {
this.getDicts("sys_dm_mz").then((response) => {
this.mzOptions = response.data;
});
this.getDicts("sys_yes_no").then(response => {
this.getDicts("sys_yes_no").then((response) => {
this.ynOptions = response.data;
});
this.getDicts("sys_dm_ryqd").then(response => {
this.getDicts("sys_dm_ryqd").then((response) => {
this.sourceOptions = response.data;
});
},
components: {
//省市区三级联动全局组件
VDistpicker
VDistpicker,
},
methods: {
// 性别字典翻译
@ -522,7 +523,7 @@ export default {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.classOptions;
Object.keys(datas).map(key => {
Object.keys(datas).map((key) => {
if (datas[key].bjbh == "" + row.classid) {
actions.push(datas[key].bjmc);
return false;
@ -531,14 +532,14 @@ export default {
return actions.join("");
},
getClassList() {
listClass(null).then(response => {
listClass(null).then((response) => {
this.classOptions = response.rows;
});
},
/** 查询幼儿信息列表 */
getList() {
this.loading = true;
listChild(this.queryParams).then(response => {
listChild(this.queryParams).then((response) => {
this.childList = response.rows;
this.total = response.total;
this.loading = false;
@ -597,7 +598,7 @@ export default {
seconderLanguage: undefined,
otherLanguage: undefined,
createuserid: undefined,
createTime: undefined
createTime: undefined,
};
this.diglogForm.province = "";
@ -626,7 +627,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;
},
@ -640,7 +641,7 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getChild(id).then(response => {
getChild(id).then((response) => {
this.form = response.data;
this.diglogForm.province = response.data.birthProvincename;
@ -660,11 +661,11 @@ export default {
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
updateChild(this.form).then(response => {
updateChild(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
@ -672,7 +673,7 @@ export default {
}
});
} else {
addChild(this.form).then(response => {
addChild(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
@ -684,11 +685,11 @@ export default {
});
},
/** 提交按钮 */
submitForm_tb: function() {
this.$refs["form"].validate(valid => {
submitForm_tb: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
console.log(this.ids + "---" + this.form.classid);
updateChild_tb(this.form, this.ids).then(response => {
updateChild_tb(this.form, this.ids).then((response) => {
if (response.code === 200) {
this.msgSuccess("调班成功");
this.open_tb = false;
@ -714,17 +715,17 @@ export default {
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}
)
.then(function() {
.then(function () {
return delChild(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function() {});
.catch(function () {});
},
//所在省市区触发联动方法
onSelected_brith(data) {
@ -779,7 +780,7 @@ export default {
this.form.addrAreaname = data.area.value;
this.form.addrArea = data.area.code;
}
}
}
},
},
};
</script>

View File

@ -12,9 +12,9 @@
</el-select>
</el-form-item>
<el-form-item label="周次" prop="zc">
<el-input
<el-input-number
v-model="queryParams.zc"
placeholder="请输入周次"
placeholder="周次"
clearable
size="small"
@keyup.enter.native="handleQuery"
@ -34,6 +34,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['benyi:thememonthplan:add']"
v-show="isShow"
>新增</el-button>
</el-col>
<el-col :span="1.5">
@ -44,6 +45,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['benyi:thememonthplan:edit']"
v-show="isShow"
>修改</el-button>
</el-col>
<el-col :span="1.5">
@ -54,6 +56,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['benyi:thememonthplan:remove']"
v-show="isShow"
>删除</el-button>
</el-col>
</el-row>
@ -61,7 +64,7 @@
<el-table v-loading="loading" :data="weekplanList" @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="mpid" :formatter="themeMonthPlanFormat"/>
<el-table-column label="所属月计划" align="center" prop="mpid" :formatter="themeMonthPlanFormat" />
<el-table-column label="周次" align="center" prop="zc" />
<el-table-column label="开始时间" align="center" prop="starttime" width="180">
<template slot-scope="scope">
@ -73,7 +76,12 @@
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="活动" align="center" prop="activityid" />
<el-table-column
label="活动"
align="center"
prop="activityid"
:formatter="themeactivityFormat"
/>
<el-table-column label="家长支持" align="center" prop="jzzc" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -83,6 +91,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:thememonthplan:edit']"
v-show="isShow"
>修改</el-button>
<el-button
size="mini"
@ -90,6 +99,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:thememonthplan:remove']"
v-show="isShow"
>删除</el-button>
</template>
</el-table-column>
@ -174,7 +184,7 @@ import {
delWeekplan,
addWeekplan,
updateWeekplan,
} from "@/api/benyi/themeweekplan";
} from "@/api/benyi/thememonthplanitem";
import { listMonthplan, getMonthplan } from "@/api/benyi/thememonthplan";
import { listActivityByThemeId } from "@/api/benyi/activity";
@ -182,6 +192,7 @@ export default {
name: "Weekplan",
data() {
return {
isShow: true,
// 遮罩层
loading: true,
// 选中数组
@ -196,8 +207,11 @@ export default {
weekplanList: [],
//主题整合月计划列表
themeMonthPlanOptions: [],
//id默认值
defaultThemeMonthType: "",
//选中的chebox值
themeactivityList: [],
//获取的活动列表
themeactivityOptions: [],
max: 5,
// 弹出层标题
@ -239,6 +253,25 @@ export default {
this.getThemeMonthPlanList();
},
methods: {
// 主题--字典状态字典翻译
themeactivityFormat(row, column) {
if (row.activityid != null) {
var ilength = row.activityid.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeactivityOptions,
row.activityid.split(";")[i]
) +
"";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
}
return "";
},
//获取选中的checkbox
getThemeActivityIdValue() {
//console.log(this.themeList);
@ -257,7 +290,7 @@ export default {
this.themeactivityOptions = response.rows;
});
},
// 字典翻译
// 字典翻译
themeMonthPlanFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
@ -287,6 +320,12 @@ export default {
});
this.getThemeActivityList(array);
if (response.data.status == "0") {
this.isShow = true;
} else {
this.isShow = false;
}
this.getList();
});
},
@ -323,6 +362,7 @@ export default {
createTime: undefined,
};
this.resetForm("form");
this.themeactivityList = [];
},
/** 搜索按钮操作 */
handleQuery() {
@ -355,7 +395,17 @@ export default {
getWeekplan(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改主题整合周计划";
this.title = "修改主题整合周计划明细";
var activityid = response.data.activityid.split(";");
var array = [];
//console.log(arr);
activityid.forEach(function (value, key, arr) {
//console.log(value); // 结果依次为123
if (value != "") {
array.push(parseInt(value));
}
});
this.themeactivityList = array;
});
},
/** 提交按钮 */

View File

@ -90,8 +90,8 @@
</el-row>
<el-table v-loading="loading" :data="monthplanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<el-table-column type="selection" width="55" align="center" :selectable="isShow" />
<el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/benyi_course/thememonthplan/data/' + scope.row.id" class="link-type">
<span>{{ scope.row.name }}</span>
@ -112,7 +112,7 @@
</template>
</el-table-column>
<!-- <el-table-column label="家长支持" align="center" prop="support" />
<el-table-column label="备注" align="center" prop="remarks" /> -->
<el-table-column label="备注" align="center" prop="remarks" />-->
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -122,6 +122,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:thememonthplan:edit']"
v-show="isShow(scope.row)"
>修改</el-button>
<el-button
size="mini"
@ -129,7 +130,16 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:thememonthplan:remove']"
v-show="isShow(scope.row)"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-check"
@click="handleCheck(scope.row)"
v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow(scope.row)"
>提交</el-button>
</template>
</el-table-column>
</el-table>
@ -188,6 +198,7 @@ import {
delMonthplan,
addMonthplan,
updateMonthplan,
checkMonthplan
} from "@/api/benyi/thememonthplan";
import Editor from "@/components/Editor";
import { listClass } from "@/api/system/class";
@ -269,6 +280,13 @@ export default {
});
},
methods: {
isShow(row) {
if (row.status == "0") {
return true;
} else {
return false;
}
},
// 当前状态类型--字典状态字典翻译
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
@ -419,7 +437,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合月计划编号为"' + ids + '"的数据项?',
'是否确认删除主题整合月计划数据项?',
"警告",
{
confirmButtonText: "确定",
@ -436,6 +454,27 @@ export default {
})
.catch(function () {});
},
/** 提交按钮操作 */
handleCheck(row) {
const id = row.id;
this.$confirm(
"是否确认提交主题整合月计划?提交后数据将不能维护",
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return checkMonthplan(id);
})
.then(() => {
this.getList();
this.msgSuccess("提交成功");
})
.catch(function () {});
},
},
};
</script>

View File

@ -376,7 +376,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合学期计划编号为"' + ids + '"的数据项?',
'是否确认删除主题整合学期计划数据项?',
"警告",
{
confirmButtonText: "确定",