123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <template>
- <div class="course-outline-target">
- <div class="part-box part-box-pad">
- <div class="box-justify mb-2">
- <div></div>
- <div>
- <el-button type="primary" @click="toAdd">新增课程目标</el-button>
- <el-button type="success" @click="toPredict">预期值</el-button>
- </div>
- </div>
- <el-table ref="TableList" :data="dataList">
- <el-table-column
- type="index"
- label="序号"
- width="70"
- :index="indexMethod"
- ></el-table-column>
- <el-table-column prop="targetName" label="课程目标" min-width="120">
- </el-table-column>
- <el-table-column prop="expectValue" label="预期值" width="120">
- </el-table-column>
- <el-table-column prop="degreeRequirement" label="内容" min-width="300">
- </el-table-column>
- <el-table-column
- prop="obeCultureProgramRequirementName"
- label="指标点"
- width="140"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.obeCultureProgramRequirementName }}</span>
- <el-tooltip
- v-if="scope.row.obeCultureProgramRequirementContent"
- :content="scope.row.obeCultureProgramRequirementContent"
- effect="dark"
- placement="top"
- >
- <i class="el-icon-info ml-1"></i>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column
- class-name="action-column"
- label="操作"
- width="120"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- class="btn-primary"
- type="text"
- @click="toEdit(scope.row)"
- >编辑</el-button
- >
- <el-button
- class="btn-danger"
- type="text"
- @click="toDelete(scope.row)"
- >删除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- ModifyCourseOutlineTarget -->
- <modify-course-outline-target
- ref="ModifyCourseOutlineTarget"
- :instance="curRow"
- @modified="getList"
- ></modify-course-outline-target>
- <!-- ModifyCourseOutlineTargetPredict -->
- <modify-course-outline-target-predict
- ref="ModifyCourseOutlineTargetPredict"
- :rowData="rowData"
- @modified="getList"
- ></modify-course-outline-target-predict>
- </div>
- </template>
- <script>
- import {
- courseOutlineTargetListPage,
- deleteCourseOutlineTarget,
- } from "../../api";
- import ModifyCourseOutlineTarget from "./ModifyCourseOutlineTarget.vue";
- import ModifyCourseOutlineTargetPredict from "./ModifyCourseOutlineTargetPredict.vue";
- export default {
- name: "course-outline-target",
- components: { ModifyCourseOutlineTarget, ModifyCourseOutlineTargetPredict },
- props: {
- rowData: {
- type: Object,
- default() {
- return {};
- },
- },
- },
- data() {
- return {
- modalForm: {
- description: "",
- },
- dataList: [],
- curRow: {},
- };
- },
- mounted() {
- this.getList();
- },
- methods: {
- async getList() {
- const datas = {
- obeCourseOutlineId: this.rowData.id,
- };
- const data = await courseOutlineTargetListPage(datas);
- this.dataList = data || [];
- },
- toAdd() {
- this.curRow = {
- obeCourseOutlineId: this.rowData.id,
- cultureProgramId: this.rowData.cultureProgramId,
- };
- this.$refs.ModifyCourseOutlineTarget.open();
- },
- toPredict() {
- this.$refs.ModifyCourseOutlineTargetPredict.open();
- },
- toEdit(row) {
- this.curRow = {
- ...row,
- obeCourseOutlineId: this.rowData.id,
- cultureProgramId: this.rowData.cultureProgramId,
- };
- this.$refs.ModifyCourseOutlineTarget.open();
- },
- async toDelete(row) {
- const confirm = await this.$confirm(
- `确定要删除课程目标【${row.targetName}】吗?`,
- "提示",
- {
- type: "warning",
- }
- ).catch(() => {});
- if (confirm !== "confirm") return;
- await deleteCourseOutlineTarget(row.id);
- this.$message.success("删除成功!");
- this.getList();
- },
- },
- };
- </script>
|