unstructuredDoc.vue 2.38 KB
<template>
  <div class="unstructuredDoc itemForm">
    <el-form :model="ruleForm" :rules="rules" ref="formList" label-width="100px" :key="key">
      <el-row>
        <el-col :span="8">
          <el-form-item prop="FJMC">
            <span slot="label">
              附件名称: <br />
              <p class="label-detail">(FJMC)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.FJMC" placeholder="附件名称"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="FJLX">
            <span slot="label">
              附件类型: <br />
              <p class="label-detail">(FJLX)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.FJLX" placeholder="附件类型"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="FJNR">
            <span slot="label">
              附件内容: <br />
              <p class="label-detail">(FJNR)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.FJNR" placeholder="附件内容"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <message-tips ref="msg" />
  </div>
</template>
<script>
// 非结构化文档
import business from '@/api/business'
import ruleMixin from '@/mixins/ruleMixin.js'
export default {
  mixins: [ruleMixin],
  props: {
    bsmSjsb: {
      type: String,
      default: ''
    },
    bsmYwsjb: {
      type: String,
      default: ''
    }
  },
  data () {
    return {
      ruleForm: {
        FJMC: '',
        FJLX: '',
        FJNR: ''
      }
    }
  },
  methods: {
    async featchData () {
      try {
        let { result: res } = await business.getFjF100ById(this.bsmSjsb)
        this.ruleForm = res
        //this.featchRule()
      } catch (error) {
        this.$refs.msg.messageShow()
      }
    },
    handleUpdateForm () {
      return new Promise(async (resolve) => {
        try {
          let res = await business.updateFjF100(this.ruleForm)
          // this.$refs['formList'].resetFields();
          resolve(res.code)
        } catch (error) {
          this.$refs.msg.messageShow()
        }
      })
    },
  }
}
</script>
<style scoped lang="scss">
@import "./css/itemForm.scss";
</style>