
<template>
  <el-dialog
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :visible.sync="dialogVisible"
    :title="title"
  >
    <el-form
      ref="dialogForm"
      label-position="top"
      :model="dialogForm"
      status-icon
      class="demo-form-inline"
      label-width="180"
      :rules="rules"
    >
      <el-form-item label="任务备注" prop="remarks">
        <el-input
          v-model="dialogForm.remarks"
          type="textarea"
          placeholder="请输入"
        >
        </el-input>
      </el-form-item>
      <el-form-item label="" prop="fileRemarks">
        <FileUpload
          v-model="dialogForm.fileRemarks"
          accept=".xls,.xlsx,.doc,.docx,.pdf,.png,.jpg,.jpeg,.gif,.ppt,.pptx"
        ></FileUpload>
      </el-form-item>
    </el-form>

    <span slot="footer" class="dialog-footer">
      <el-button @click="closeVisible">取消</el-button>
      <el-button type="primary" v-loading="saving" @click="submitForm"
        >保存</el-button>
    </span>
  </el-dialog>
</template>

<script>
import TableEditMixin from "@/mixins/table-edit-mixin";
import FileUpload from "@/components/FileUpload";
import { updateInfo } from "@/api/task/info";


export default {
  name: 'RemarkDialog',
  components: {
    FileUpload,
  },
  mixins: [TableEditMixin],
  pageInfo: {
    defaultForm: {
    },
    title: "任务备注",
    updateApi: updateInfo,
    // addApi: addBranch,
  },
  data() {
    return {
      rules: {
      },
    };
  },
  methods: {
    open(data = {}) {
      this.title = `编辑${
        this.$options.pageInfo.title
      }`;
      this.dialogVisible = true;
      this.dialogForm = { ...this.$options.pageInfo.defaultForm, ...data };

    },
  },
};
</script>

<style>
</style>
