<!--
 * @Author: ysh
 * @Date: 2024-04-23 17:08:16
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-05-07 16:08:23
-->
<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>
  </div>
</template>

<script>
import ScTable from "@/views/flowable/form/scTable.vue";
import JyTable from "@/views/flowable/form/jyTable.vue";
import ZhTable from "@/views/flowable/form/zhTable.vue";
import JsTable from "@/views/flowable/form/jsTable.vue";
import XmTable from "@/views/flowable/form/xmTable.vue";
import CwTable from "@/views/flowable/form/cwTable.vue";
import CarForm from '@/views/flowable/form/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';
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
  },
  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>