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"
>
<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="mathconent" />
<el-table-column label="备注" align="center" prop="remark" />
@ -135,7 +140,7 @@
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item label="月份" prop="month">
<el-date-picker
v-model="form.month"
@ -145,18 +150,24 @@
>
</el-date-picker>
</el-form-item>
<el-form-item label="选择内容" prop="mathconent">
<el-select v-model="form.mathconent" size="small" >
<el-option
v-for="item in mathOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-form-item label="选择方案" prop="mathconent">
<el-checkbox-group v-model="mathFaList" :max="max" @change="getMathFaContentValue">
<el-checkbox
v-for="(item, i) in mathFaOptions"
:label="item.id"
:key="i"
:max="max"
>{{ item.name }}</el-checkbox
>
</el-checkbox-group>
<el-input v-model="form.mathconent" v-if="false" />
</el-form-item>
<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>
<div slot="footer" class="dialog-footer">
@ -176,25 +187,31 @@ import {
updateMathtermplanitem,
} from "@/api/benyi/mathtermplanitem";
//
import { listMath, getMath } from "@/api/benyi/math";
//
import {
listMath,
getMath,
} from "@/api/benyi/math";
listPlan,
getPlan,
delPlan,
addPlan,
updatePlan,
} from "@/api/benyi/plan";
//
import { listClass } from "@/api/system/class";
//
import {
listMathtermplan,
getMathtermplan,
} from "@/api/benyi/mathtermplan";
import { listMathtermplan, getMathtermplan } from "@/api/benyi/mathtermplan";
export default {
name: "Mathtermplanitem",
data() {
return {
//chebox
mathFaList: [],
//
max: 5,
//
isShow: true,
isShow: true,
//
loading: true,
//
@ -211,6 +228,8 @@ export default {
mathPlanOptions: [],
//
mathOptions: [],
//
mathFaOptions: [],
//
defaultMathType: "",
//
@ -228,10 +247,13 @@ export default {
updateuserid: undefined,
},
queryParams_class: {
bjbh: undefined
bjbh: undefined,
},
queryParams_classtype: {
classtypeId: undefined
classtypeId: undefined,
},
queryParams_mathfa: {
mathid: undefined,
},
//
form: {},
@ -275,6 +297,17 @@ export default {
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() {
listClass(this.queryParams_class).then((response) => {
@ -286,6 +319,15 @@ export default {
getMathList() {
listMath(this.queryParams_classtype).then((response) => {
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);
});
},
//