洋浦学校 八大中心管理 课程管理

init
gongdi 3 years ago
parent 324e29bdf5
commit be160ea0a8

@ -46,6 +46,10 @@
defaultValue: { defaultValue: {
type: Array, type: Array,
default: [], default: [],
},
planInfo:{
type:Object,
default:{}
} }
}, },
data(){ data(){
@ -64,6 +68,13 @@
this.getStageList(); this.getStageList();
}, },
mounted(){ mounted(){
console.log("planInfo:",this.$props.planInfo)
if(this.planInfo && this.planInfo.plan_id !== ""){
this.planId = this.planInfo.plan_id;
this.courseName = this.planInfo.course_name;
this.planNumber = this.planInfo.plan_number;
this.realNumber = this.planInfo.real_number;
}
this.stageId = this.defaultValue[0]; this.stageId = this.defaultValue[0];
this.yearId = this.defaultValue[1]; this.yearId = this.defaultValue[1];
}, },

@ -19,7 +19,9 @@
v-if="record.real_plan_matching_degree < 0"/> v-if="record.real_plan_matching_degree < 0"/>
</span> </span>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="toDelete(record)"></a> <a @click="toEdit(record)"></a>
<a-divider type="vertical"/>
<a @click="toDelete(record)"></a>
</span> </span>
</a-table> </a-table>
</template> </template>
@ -33,7 +35,7 @@
是否确定删除此条信息 是否确定删除此条信息
</a-modal> </a-modal>
<template v-if="pageType === 1"> <template v-if="pageType === 1">
<course-info :defaultValue="defaultValue" @cancel="cancel" @submit="submit"/> <course-info :defaultValue="defaultValue" @cancel="cancel" @submit="submit" :planInfo="planInfo"/>
</template> </template>
</div> </div>
</template> </template>
@ -101,7 +103,7 @@
tableColumn: tableColumn, tableColumn: tableColumn,
dataList: [], dataList: [],
loading: false, loading: false,
honorId: "", planInfo: {},
visible: false, visible: false,
} }
}, },
@ -185,10 +187,15 @@
this.getListPlanByStageYear(); this.getListPlanByStageYear();
}, },
toAdd: function () { toAdd: function () {
this.planInfo = {};
this.pageType = 1; this.pageType = 1;
}, },
toEdit:function (record) {
this.pageType = 1;
this.planInfo = record;
},
toDelete: function (record) { toDelete: function (record) {
this.honorId = record.honor_id; this.planId = record.plan_id;
this.visible = true; this.visible = true;
}, },
cancel: function () { cancel: function () {
@ -223,14 +230,14 @@
// //
handleOk: function () { handleOk: function () {
let param = { let param = {
honor_ids: this.honorId, plan_ids: this.planId,
bureau_id: this.BaseConfig.person_info_my.bureau_id, bureau_id: this.BaseConfig.person_info_my.bureau_id,
} }
this.InterfaceConfig.callInterface([{ this.InterfaceConfig.callInterface([{
url: InterConfig.deleteHonor.url, url: InterConfig.deleteCourse.url,
params: param, params: param,
method: InterConfig.deleteHonor.method, method: InterConfig.deleteCourse.method,
isTestLogin: InterConfig.deleteHonor.isTestLogin, isTestLogin: InterConfig.deleteCourse.isTestLogin,
}], (result) => { }], (result) => {
let resData = result[0].data; let resData = result[0].data;
if (resData.code === 2000) { if (resData.code === 2000) {
@ -240,13 +247,13 @@
centered: true centered: true
}); });
this.handleCancel(); this.handleCancel();
this.getHonorList(); this.getListPlanByStageYear();
} }
}) })
}, },
// //
handleCancel: function () { handleCancel: function () {
this.honorId = ""; this.planId = "";
this.visible = false; this.visible = false;
} }
}, },

Loading…
Cancel
Save