checkView.vue 1.87 KB

<template>
  <div class="report-detail">
    <div style="margin-top: 16px;">
      <check-info v-model="checkInfo" />
    </div>
  </div>
</template>
<script>
import moment from 'moment'
import CheckInfo from '@/views/report/check/components/checkInfo'
import AuditList from '@/views/audit/components/auditInfo'
export default {
  name: "projectView",
  components: {
    CheckInfo, AuditList
  },
  data () {
    return {
      checkInfo: {
        id: '',
        projId: '',
        checkYear: null,
        // 工作进展
        workProgress: '',
        // 其他(请做说明)
        otherResults: '',
        // 项目批准经费
        applyMoney: 0,
        // 已使用经费
        usingMoney: 0,
        // 现结余经费
        surplusMoney: 0,
        // 经费具体使用情况说明
        moneyInstructions: '',
        checkState: null,
        projName: '',
        projNo: '',
        appPersonName: '',
        appUnitName: '',
        startDate: '',
        endDate: '',
        // 成果
        results: [],
        auditList: [{ result: '', unit: '', time: '' }],
      },
    };
  },
  props: {
    value: {
      type: String,
      default: () => {
        return null
      }
    },
  },
  created () {
    this.getCheckInfoById()
  },
  methods: {
    moment,
    getCheckInfoById () {
      let pars = { id: this.value }
      this.$api.checkReport.getCheckInfoById(pars).then(({ data = {} }) => {
        if (data) {
          this.checkInfo = data
          this.checkInfo.startDate = moment(this.checkInfo.startDate).format('YYYY年MM月DD日')
          this.checkInfo.endDate = moment(this.checkInfo.endDate).format('YYYY年MM月DD日')
        }
      }).catch(() => {
      })
    },
  },
}
</script>
<style lang="less" scoped>
.report-detail {
  height: 70vh;
  overflow: auto;
  border-left: 1px solid #f0f0f0;
  border-top: 1px solid #f0f0f0;
}
</style>