ZhangXianQiang
2024-05-17 97d1d36d67c0cc29bd21c2575dd8a61a757adaa5
src/views/onlineStudy/file.vue
@@ -61,7 +61,7 @@
    <pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize"
      @pagination="page" />
    <el-dialog title="添加学习内容" :visible.sync="open" width="600px" :close-on-click-modal="false"
    <el-dialog :title="dialogTitle" :visible.sync="open" width="600px" :close-on-click-modal="false"
      :before-close="handleClose">
      <el-form label-position="left" label-width="120px" ref="form" :rules="rules" :model="form">
        <el-form-item label="主题" prop="subject">
@@ -112,6 +112,7 @@
  },
  data() {
    return {
      dialogTitle: '添加学习内容',
      ids: [],
      typeList: [],
      searchForm: {
@@ -124,6 +125,7 @@
      open: false,
      form: {
        contentType: 'video',
        contentUrl: [],
        attachment: [],
        temp: []
      },
@@ -159,14 +161,13 @@
      }
    },
    clearFile() {
      this.form.contentUrl = null;
      this.form.contentUrl = [];
      this.$refs.upload.clearFile();
    },
    removeFile() {
      this.form.contentUrl = null;
      this.form.contentUrl = [];
    },
    removeAttachmentFile(fileList, fileName) {
      console.log(fileList, fileName, "dddddddd");
      this.form.attachment = fileList.filter(item => item.name !== fileName);
    },
    getUploadAttachmentUrl(uploadData) {
@@ -226,6 +227,7 @@
    handlerAdd() {
      this.form = {};
      this.open = true;
      this.dialogTitle = '添加学习内容';
    },
    page() {
      OnlineStudyAPI.page(this.searchForm).then(res => {
@@ -242,7 +244,7 @@
      this.form.attachment = row.attachment || [];
      this.form.subject = row.subject;
      this.form.belongType = row.belongType;
      console.log(row, "dfddddddd");
      this.dialogTitle = '修改学习内容';
      this.open = true;
    }
  },