fjF100.vue 2.41 KB
<!--
 * @Description  :非结构化文档表单
 * @Autor        : miaofang
 * @LastEditTime : 2023-05-17 16:58:48
-->
<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"></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"></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"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <message-tips ref="msg" />
  </div>
</template>
<script>
// 非结构化文档
import fjF100 from '@/api/fjF100'
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 fjF100.getFjF100ById(this.bsmSjsb)
        this.ruleForm = res
        //this.featchRule()
      } catch (error) {
        this.$refs.msg.messageShow()
      }
    },
    handleUpdateForm () {
      return new Promise(async (resolve) => {
        try {
          let res = await fjF100.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>