fix游戏数学学期计划详细功能

This commit is contained in:
sk1551 2020-10-30 16:58:07 +08:00
parent 7136d8de58
commit d84bd59fe8

View File

@ -83,7 +83,12 @@
@selection-change="handleSelectionChange" @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="tpid" :formatter="mathPlanFormat" /> <el-table-column
label="所属计划"
align="center"
prop="tpid"
:formatter="mathPlanFormat"
/>
<el-table-column label="月份" align="center" prop="month" /> <el-table-column label="月份" align="center" prop="month" />
<el-table-column label="游戏数学内容" align="center" prop="mathconent" /> <el-table-column label="游戏数学内容" align="center" prop="mathconent" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
@ -145,18 +150,24 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="选择内容" prop="mathconent"> <el-form-item label="选择方案" prop="mathconent">
<el-select v-model="form.mathconent" size="small" > <el-checkbox-group v-model="mathFaList" :max="max" @change="getMathFaContentValue">
<el-option <el-checkbox
v-for="item in mathOptions" v-for="(item, i) in mathFaOptions"
:key="item.id" :label="item.id"
:label="item.name" :key="i"
:value="item.id" :max="max"
/> >{{ item.name }}</el-checkbox
</el-select> >
</el-checkbox-group>
<el-input v-model="form.mathconent" v-if="false" />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" /> <el-input
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -176,23 +187,29 @@ import {
updateMathtermplanitem, updateMathtermplanitem,
} from "@/api/benyi/mathtermplanitem"; } from "@/api/benyi/mathtermplanitem";
// //
import { listMath, getMath } from "@/api/benyi/math";
//
import { import {
listMath, listPlan,
getMath, getPlan,
} from "@/api/benyi/math"; delPlan,
addPlan,
updatePlan,
} from "@/api/benyi/plan";
// //
import { listClass } from "@/api/system/class"; import { listClass } from "@/api/system/class";
// //
import { import { listMathtermplan, getMathtermplan } from "@/api/benyi/mathtermplan";
listMathtermplan,
getMathtermplan,
} from "@/api/benyi/mathtermplan";
export default { export default {
name: "Mathtermplanitem", name: "Mathtermplanitem",
data() { data() {
return { return {
//chebox
mathFaList: [],
//
max: 5,
// //
isShow: true, isShow: true,
// //
@ -211,6 +228,8 @@ export default {
mathPlanOptions: [], mathPlanOptions: [],
// //
mathOptions: [], mathOptions: [],
//
mathFaOptions: [],
// //
defaultMathType: "", defaultMathType: "",
// //
@ -228,10 +247,13 @@ export default {
updateuserid: undefined, updateuserid: undefined,
}, },
queryParams_class: { queryParams_class: {
bjbh: undefined bjbh: undefined,
}, },
queryParams_classtype: { queryParams_classtype: {
classtypeId: undefined classtypeId: undefined,
},
queryParams_mathfa: {
mathid: undefined,
}, },
// //
form: {}, form: {},
@ -275,6 +297,17 @@ export default {
this.getList(); this.getList();
}); });
}, },
//checkbox
getMathFaContentValue() {
//console.log(this.themeList);
var text = ";";
this.mathFaList.forEach(function (value, key, arr) {
//console.log(value); // 123
text = text + value + ";";
//console.log(text);
});
this.form.mathconent = text;
},
// //
getClassType() { getClassType() {
listClass(this.queryParams_class).then((response) => { listClass(this.queryParams_class).then((response) => {
@ -286,6 +319,15 @@ export default {
getMathList() { getMathList() {
listMath(this.queryParams_classtype).then((response) => { listMath(this.queryParams_classtype).then((response) => {
this.mathOptions = response.rows; this.mathOptions = response.rows;
this.queryParams_mathfa.mathid = response.rows[0].id;
this.getMathFa();
});
},
//
getMathFa() {
listPlan(this.queryParams_mathfa).then((response) => {
this.mathFaOptions = response.rows;
console.log(this.mathFaOptions);
}); });
}, },
// //