|
@@ -25,7 +25,15 @@
|
|
clearable
|
|
clearable
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item prop="dimensionIdList" label="毕业要求指标点:">
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ prop="obeCultureProgramRequirementId"
|
|
|
|
+ label="毕业要求指标点:"
|
|
|
|
+ >
|
|
|
|
+ <requirement-select
|
|
|
|
+ v-model="modalForm.obeCultureProgramRequirementId"
|
|
|
|
+ @change="requirementChange"
|
|
|
|
+ ></requirement-select>
|
|
|
|
+
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
class="btn-act-primary"
|
|
class="btn-act-primary"
|
|
@@ -33,34 +41,6 @@
|
|
@click="toSelectDimension"
|
|
@click="toSelectDimension"
|
|
>选择知识点</el-button
|
|
>选择知识点</el-button
|
|
>
|
|
>
|
|
- <el-table
|
|
|
|
- v-if="dimensionList.length"
|
|
|
|
- :data="dimensionList"
|
|
|
|
- :show-header="false"
|
|
|
|
- border
|
|
|
|
- >
|
|
|
|
- <el-table-column prop="name" label="知识点">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- {{ scope.row.name }}({{ scope.row.code }})
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- class-name="action-column"
|
|
|
|
- label="操作"
|
|
|
|
- width="40"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- class="btn-danger"
|
|
|
|
- icon="el-icon-error"
|
|
|
|
- @click="toDeleteDimension(scope.$index)"
|
|
|
|
- >
|
|
|
|
- </el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item prop="degreeRequirement" label="目标分解详情:">
|
|
<el-form-item prop="degreeRequirement" label="目标分解详情:">
|
|
<el-input
|
|
<el-input
|
|
@@ -85,7 +65,7 @@
|
|
<!-- SelectDimensionDialog -->
|
|
<!-- SelectDimensionDialog -->
|
|
<select-dimension-dialog
|
|
<select-dimension-dialog
|
|
ref="SelectDimensionDialog"
|
|
ref="SelectDimensionDialog"
|
|
- :course="{ teachCourseId: instance.teachCourseId }"
|
|
|
|
|
|
+ :param="{ obeCourseOutlineId: instance.obeCourseOutlineId }"
|
|
:selected-data="modalForm.dimensionIdList"
|
|
:selected-data="modalForm.dimensionIdList"
|
|
:disabled-data="instance.disabledDimensionIds"
|
|
:disabled-data="instance.disabledDimensionIds"
|
|
@confirm="dimensionSelected"
|
|
@confirm="dimensionSelected"
|
|
@@ -95,20 +75,25 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { updateCourseOutlineTarget } from "../../api";
|
|
|
|
-import SelectDimensionDialog from "../../../base/components/course-simple/SelectDimensionDialog.vue";
|
|
|
|
|
|
+import {
|
|
|
|
+ updateCourseOutlineTarget,
|
|
|
|
+ courseOutlineTargetRequirementKnowledge,
|
|
|
|
+} from "../../api";
|
|
|
|
+import RequirementSelect from "./RequirementSelect.vue";
|
|
|
|
+import SelectDimensionDialog from "../../SelectDimensionDialog.vue";
|
|
|
|
|
|
const initModalForm = {
|
|
const initModalForm = {
|
|
id: null,
|
|
id: null,
|
|
- teachCourseId: "",
|
|
|
|
|
|
+ obeCourseOutlineId: "",
|
|
targetName: "",
|
|
targetName: "",
|
|
degreeRequirement: "",
|
|
degreeRequirement: "",
|
|
|
|
+ obeCultureProgramRequirementId: "",
|
|
dimensionIdList: [],
|
|
dimensionIdList: [],
|
|
};
|
|
};
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "modify-course-outline-target",
|
|
name: "modify-course-outline-target",
|
|
- components: { SelectDimensionDialog },
|
|
|
|
|
|
+ components: { SelectDimensionDialog, RequirementSelect },
|
|
props: {
|
|
props: {
|
|
instance: {
|
|
instance: {
|
|
type: Object,
|
|
type: Object,
|
|
@@ -130,6 +115,7 @@ export default {
|
|
modalIsShow: false,
|
|
modalIsShow: false,
|
|
isSubmit: false,
|
|
isSubmit: false,
|
|
modalForm: { ...initModalForm },
|
|
modalForm: { ...initModalForm },
|
|
|
|
+ requirementList: [],
|
|
dimensionList: [],
|
|
dimensionList: [],
|
|
rules: {
|
|
rules: {
|
|
targetName: [
|
|
targetName: [
|
|
@@ -144,13 +130,18 @@ export default {
|
|
trigger: "change",
|
|
trigger: "change",
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- dimensionIdList: [
|
|
|
|
|
|
+ obeCultureProgramRequirementId: [
|
|
{
|
|
{
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
- if (value && value.length) {
|
|
|
|
- return callback();
|
|
|
|
|
|
+ if (!value) {
|
|
|
|
+ return callback(new Error("请选择毕业要求指标点"));
|
|
}
|
|
}
|
|
- return callback(new Error("请选择毕业要求指标点"));
|
|
|
|
|
|
+
|
|
|
|
+ if (this.modalForm.dimensionIdList.length) {
|
|
|
|
+ return callback(new Error("请选择知识点"));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return callback();
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -183,6 +174,18 @@ export default {
|
|
this.modalIsShow = false;
|
|
this.modalIsShow = false;
|
|
this.$emit("enforce-close");
|
|
this.$emit("enforce-close");
|
|
},
|
|
},
|
|
|
|
+ async requirementChange() {
|
|
|
|
+ this.modalForm.dimensionIdList = [];
|
|
|
|
+ if (!this.modalForm.obeCultureProgramRequirementId) return;
|
|
|
|
+ const res = await courseOutlineTargetRequirementKnowledge({
|
|
|
|
+ obeCourseOutlineId: this.instance.obeCourseOutlineId,
|
|
|
|
+ obeCultureProgramRequirementId:
|
|
|
|
+ this.modalForm.obeCultureProgramRequirementId,
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ this.modalForm.dimensionIdList = (res || []).map((item) => item.id);
|
|
|
|
+ this.$refs.modalFormComp.validateField("obeCultureProgramRequirementId");
|
|
|
|
+ },
|
|
cancel() {
|
|
cancel() {
|
|
this.modalIsShow = false;
|
|
this.modalIsShow = false;
|
|
},
|
|
},
|
|
@@ -190,6 +193,11 @@ export default {
|
|
this.modalIsShow = true;
|
|
this.modalIsShow = true;
|
|
},
|
|
},
|
|
toSelectDimension() {
|
|
toSelectDimension() {
|
|
|
|
+ if (!this.modalForm.obeCultureProgramRequirementId) {
|
|
|
|
+ this.$message.error("请选择毕业要求指标点");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
this.$refs.SelectDimensionDialog.open();
|
|
this.$refs.SelectDimensionDialog.open();
|
|
},
|
|
},
|
|
updateDimensionIds() {
|
|
updateDimensionIds() {
|
|
@@ -200,12 +208,7 @@ export default {
|
|
dimensionSelected(dimensions) {
|
|
dimensionSelected(dimensions) {
|
|
this.dimensionList = [...dimensions];
|
|
this.dimensionList = [...dimensions];
|
|
this.updateDimensionIds();
|
|
this.updateDimensionIds();
|
|
- this.$refs.modalFormComp.validateField("dimensionIdList");
|
|
|
|
- },
|
|
|
|
- toDeleteDimension(index) {
|
|
|
|
- this.dimensionList.splice(index, 1);
|
|
|
|
- this.updateDimensionIds();
|
|
|
|
- this.$refs.modalFormComp.validateField("dimensionIdList");
|
|
|
|
|
|
+ this.$refs.modalFormComp.validateField("obeCultureProgramRequirementId");
|
|
},
|
|
},
|
|
async submit() {
|
|
async submit() {
|
|
const valid = await this.$refs.modalFormComp.validate().catch(() => {});
|
|
const valid = await this.$refs.modalFormComp.validate().catch(() => {});
|