<!--
 * @Author: ysh
 * @Date: 2024-04-23 17:08:16
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-08-16 15:26:43
-->
<template>
  <div>
    <sc-table :key="'sc'+taskForm.taskId" :taskForm="taskForm" :tableForm="tableForm" v-if="taskForm.procDefName == '生产部门考核'"></sc-table>
    <jy-table :key="'jy'+taskForm.taskId" :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '经营发展部考核'"></jy-table>
    <js-table :key="'js'+taskForm.taskId" :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '技术质量与安全部考核'"></js-table>
    <xm-table :key="'xm'+taskForm.taskId" :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '项目管理部考核'"></xm-table>
    <cw-table :key="'cw'+taskForm.taskId" :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '财务部考核'"></cw-table>
    <zh-table :key="'zh'+taskForm.taskId" :taskForm="taskForm" :tableForm="tableForm" v-else-if="taskForm.procDefName == '综合事务部考核'"></zh-table>
    <project-process :key="'pro'+taskForm.taskId" :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '项目流转'"></project-process>
    <car-form :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '用车审批'"></car-form>
    <technical-plan :key="'tec'+taskForm.taskId" :taskForm="taskForm" v-else-if="taskForm.procDefName == '技术方案'"></technical-plan>
    <safe-form :key="'safe'+taskForm.taskId" :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '安全交底'"></safe-form>
    <technical-form :key="'technical'+taskForm.taskId" :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '技术交底'"></technical-form>
    <settle-form :key="'fb'+taskForm.taskId" :taskForm="taskForm" :taskName="''" :disabled="true"
      v-else-if="taskForm.procDefName == '项目结算'"></settle-form>
    <settle-other :key="'so'+taskForm.taskId" :taskForm="taskForm" :taskName="''" :disabled="true"
      v-else-if="taskForm.procDefName == '其他结算'"></settle-other>
    <!-- <budget-in :key="'budget'+taskForm.taskId" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目预算'"></budget-in> -->
    <budget-tab :key="'budget'+taskForm.taskId" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目预算'"></budget-tab>
    <contract-form :key="'cj'+taskForm.taskId" :taskForm="taskForm" :taskName="''" :formDisabled="true"
      v-else-if="taskForm.procDefName == '承接合同评审'"></contract-form>
    <sub-contract :key="'sub'+taskForm.taskId" :taskForm="taskForm" :taskName="''" :formDisabled="true"
      v-else-if="taskForm.procDefName == '分包合同评审'"></sub-contract>
    <archive-form :key="'arc'+taskForm.taskId" :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '成果归档'"></archive-form>
    <borrow-form :key="'bor'+taskForm.taskId" :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '借款审批'"></borrow-form>
    <brand-form :key="'brand'+taskForm.taskId" :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '品牌项目支付'"></brand-form>
    <deposit-form :key="'deposit'+taskForm.taskId" :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '保证金审批'"></deposit-form>
    <device-form :key="'device'+taskForm.taskId" :taskForm="taskForm" :taskName="''" :formDisabled="true" v-else-if="taskForm.procDefName == '设备审批'"></device-form>
    <change-form :key="'change'+taskForm.taskId" :taskForm="taskForm" :taskName="''" v-else-if="taskForm.procDefName == '项目变更'"></change-form>
    <declare :key="'work'+taskForm.taskId" :taskForm="taskForm" :taskName="''" :formDisabled="true" v-else-if="taskForm.procDefName == '工作填报'"></declare>
  </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 TechnicalPlan from '@/views/flowable/form/technicalPlan.vue';
import SafeForm from '@/views/flowable/form/safeForm.vue';
import TechnicalForm from '@/views/flowable/form/technicalForm.vue';
import SettleForm from '@/views/flowable/form/settleForm.vue';
import SettleOther from '@/views/flowable/form/settleOther.vue';
import BudgetInfo from '../budget/budgetInfo.vue';
import ContractForm from '../business/contractForm.vue';
import SubContract from '../business/subContract.vue';
import ArchiveForm from '../archiveForm.vue';
import BorrowForm from '../finance/borrowForm.vue';
import BudgetTab from '../projectProcess/budgetTab.vue';
import BrandForm from '../business/brandForm.vue';
import DepositForm from '../finance/depositForm.vue';
import DeviceForm from '../oa/deviceForm.vue';
import changeForm from "../changeForm.vue";
import workFilling from "../work/declareForm.vue";
import declare from "../work/declareForm.vue";
export default {
  props: {
    passingParam: {
      type: Object
    }
  },
  watch: {
    'passingParam.taskId'(newval, old){
      this.init(this.passingParam)
    }
  },
  components: {
    ScTable,
    ZhTable,
    JsTable,
    XmTable,
    CwTable,
    JyTable,
    CarForm,
    projectProcess,
    TechnicalPlan,
    TechnicalForm,
    SafeForm,
    SettleForm,
    SettleOther,
    BudgetInfo,
    ContractForm,
    SubContract,
    ArchiveForm,
    BorrowForm,
    BudgetTab,
    BrandForm,
    DepositForm,
    DeviceForm,
    changeForm,
    declare
  },
  data() {
    return {
      taskForm: {},
      taskName: '',
      procDefName: ''
    }
  },
  created() {
    this.init(this.passingParam)
  },
  methods: {
    init(val) {
      this.taskForm = val
      this.taskName = val.taskName
      this.procDefName = val.procDefName
    }
  }
}
</script>

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