<!--
 * @Author: ysh
 * @Date: 2024-04-23 17:08:16
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-05-14 13:45:45
-->
<template>
  <div>
    <sc-table :taskForm="taskForm" :tableForm="tableForm" v-if="taskForm.procDefName == '生产部门考核'"></sc-table>
    <jy-table :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '经营发展部考核'"></jy-table>
    <js-table :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '技术质量部考核'"></js-table>
    <xm-table :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '项目管理部考核'"></xm-table>
    <cw-table :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '财务部考核'"></cw-table>
    <zh-table :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '综合事务部考核'"></zh-table>
    <project-process :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '项目流转'"></project-process>
    <car-form :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '用车审批'"></car-form>
    <technical-form :taskForm="taskForm" v-else-if="taskForm.procDefName == '技术交底'"></technical-form>
    <safe-form :taskForm="taskForm" v-else-if="taskForm.procDefName == '安全交底'"></safe-form>
    <settle-form :taskForm="taskForm" :taskName="''" :disabled="true" v-else-if="taskForm.procDefName == '项目结算'"></settle-form>
    <budget-info :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目预算'"></budget-info>
    <contract-form :taskForm="taskForm" :taskName="''" :formDisabled="true" v-else-if="taskForm.procDefName == '承接合同评审'"></contract-form>
  </div>
</template>

<script>
import ScTable from "@/views/flowable/form/access/scTable.vue";
import JyTable from "@/views/flowable/form/access/jyTable.vue";
import ZhTable from "@/views/flowable/form/access/zhTable.vue";
import JsTable from "@/views/flowable/form/access/jsTable.vue";
import XmTable from "@/views/flowable/form/access/xmTable.vue";
import CwTable from "@/views/flowable/form/access/cwTable.vue";
import CarForm from '@/views/flowable/form/oa/carForm.vue';
import projectProcess from '@/views/flowable/form/projectProcess/index'
import TechnicalForm from '@/views/flowable/form/technicalForm.vue';
import SafeForm from '@/views/flowable/form/safeForm.vue';
import SettleForm from '@/views/flowable/form/settleForm.vue';
import BudgetInfo from '../budget/budgetInfo.vue';
import ContractForm from '../business/contractForm.vue';
export default {
  props: {
    passingParam: {
      type: Object
    }
  },
  watch:{
    passingParam(newval,old){
      this.init(newval)
    }
  },
  components: {
    ScTable,
    ZhTable,
    JsTable,
    XmTable,
    CwTable,
    JyTable,
    CarForm,
    projectProcess,
    TechnicalForm,
    SafeForm,
    SettleForm,
    BudgetInfo,
    ContractForm
  },
  data() {
    return {
      taskForm: {},
      taskName: '',
      procDefName: ''
    }
  },
  created() {
    this.init(this.passingParam)
  },
  methods: {
    init(val) {
      console.log(val);
      this.taskForm = val
      this.taskName = val.taskName
      this.procDefName = val.procDefName
    }
  }
}
</script>

<style lang="scss" scoped></style>