import flowService from '@/webflow/flow-service'
import routerService from '@/common/services/router-service'
import '../core/css/iam-audit-custom.scss'
import asyncComponent from '@/common/services/async-component'

// 内控列表
routerService.routeInFrame('mtx-process-list', {
  component: './mtxprocess/mtx-process-list.vue',
})

// 内控-内控措施
routerService.routeInFrame('mtx-measure-form', {
  component: './mtxprocess/mtx-measure-form.vue',
})

// 内控树分类
routerService.routeInFrame('mtx-process-catalog', {
  component: './mtxprocess/mtx-process-catalog.vue',
})

// 内控矩阵版本列表
routerService.routeInFrame('mtx-version-list', {
  component: './mtxversion/mtx-version-list.vue',
})

// 配置在合规的导航-begin

// 内控列表
routerService.routeInFrame('mtx-process-list/cpm', {
  component: './mtxprocess/mtx-process-list.vue',
})
// 内控矩阵版本列表
routerService.routeInFrame('mtx-version-list/cpm', {
  component: './mtxversion/mtx-version-list.vue',
})
// -end

// 评价列表
routerService.routeInFrame('mtx-evaluation-list', {
  component: './evaluation/ic-evaluation-list.vue',
})

// 评价表单
flowService.addFlowForm(
  'vue:ic/evaluation/plan/icEvaluationPlan',
  './evaluation/ic-evaluation-plan-form.vue'
)

// 控制措施表单
flowService.addFlowForm(
  'vue:ic/evaluation/control/icEvaluationControl',
  './evaluation/control/ic-evaluation-work-control-form.vue'
)

// 穿行措施表单
flowService.addFlowForm(
  'vue:ic/evaluation/cross/icEvaluationCross',
  './evaluation/cross/ic-evaluation-work-cross-form.vue'
)

// 内控评价报告流程
flowService.addFlowForm(
  'vue:ic/evaluation/report/icEvaluationReport',
  './evaluation/work/report/iam-ic-evaluation-report-form.vue'
)

// 缺陷确认
flowService.addFlowForm(
  'vue:ic/evaluation/confirm/icEvaluationConfirm',
  './evaluation/confirm/ic-evaluation-work-confirm-form.vue'
)

// 内控评价概况钻取列表
routerService.route('/iam-ic-overview-list', {
  component: './evaluation/work/evaluationOverview/iam-ic-evaluation-overview-list.vue',
})

// 整改要求流程
flowService.addFlowForm(
  'vue:ic/defect/require/icRectRequire',
  './defect/rectifyRequire/iam-ic-rectify-require-form.vue'
)

// 整改要求列表
routerService.routeInFrame('iam-ic-rectify-require-list', {
  component: './defect/rectifyRequire/iam-ic-rectify-require-list.vue',
})

// 整改反馈流程
flowService.addFlowForm(
  'vue:ic/defect/feedback/icRectFeedback',
  './defect/rectifyFeedback/iam-ic-rectify-feedback-form.vue'
)

// 整改反馈列表
routerService.routeInFrame('iam-ic-rectify-feedback-list', {
  component: './defect/rectifyFeedback/iam-ic-rectify-feedback-list.vue',
})

// 内控-测试
routerService.route('/ic-work/', {
  component: './evaluation/work/iam-ic-work.vue',
  children: [
    {
      path: 'iam-ic-control-list',
      components: {
        rightfrm: asyncComponent(() => import('./evaluation/work/iam-work-control-list.vue')),
      },
    },
    {
      path: 'iam-ic-cross-list',
      components: {
        rightfrm: asyncComponent(() => import('./evaluation/work/iam-work-cross-list.vue')),
      },
    },
    {
      path: 'iam-ic-listcon-list',
      components: {
        rightfrm: asyncComponent(() => import('./evaluation/work/iam-work-confirm-list.vue')),
      },
    },
    {
      path: 'iam-ic-confirm',
      components: {
        rightfrm: asyncComponent(() => import('./evaluation/work/iam-work-confirm.vue')),
      },
    },
    // 内控评价报告
    {
      path: 'iam-ic-evaluation-report-list',
      components: {
        rightfrm: asyncComponent(() =>
          import('./evaluation/work/report/iam-ic-evaluation-report-list.vue')
        ),
      },
    },
    // 评价人员
    {
      path: 'ic-planuser-list',
      component: asyncComponent(() => import('./evaluation/work/ic-planuser-list.vue')),
    },
    // 评价概况
    {
      path: 'iam-ic-evaluation-overview',
      component: asyncComponent(() =>
        import('./evaluation/work/evaluationOverview/iam-ic-evaluation-overview.vue')
      ),
    },
  ],
})

// 内控工作报告列表
routerService.routeInFrame('ic-work-report-list', {
  component: './work-report/ic-work-report-list.vue',
})
// 内控工作报告审批单
flowService.addFlowForm('vue:ic/workreport/icWorkReport', './work-report/ic-work-report-form.vue')

// 缺陷清单列表
routerService.routeInFrame('ic-defect-statement-list', {
  component: './defect/statement/ic-defect-statement-list.vue',
})

// 缺陷清单表单
routerService.routeInFrame('ic-defect-statement-form', {
  component: './defect/statement/ic-defect-statement-form.vue',
})

// 整改提醒
routerService.routeInFrame('ic-remind-config', {
  component: './defect/remindConfig/ic-remind-config.vue',
})
