<template>
    <div class="add-project-container">
        <div class="add-project-content" v-loading="loading">
            <el-tabs v-model="pageActiveName" type="border-card">
                <el-tab-pane label="立项填报" name="立项填报">
                    <div class="project-tab-content">
                        <div class="add-project-header">
                            <div class="header-left"></div>
                            <div class="header-right">
                                <el-button type="default" @click="backClick">返回</el-button>
                                <el-button type="primary" v-if="formData.projectLzType === 1 || !formData.projectLzType" @click="saveClick('save')">保存</el-button>
                                <el-button type="primary" v-if="formData.projectLzType === 1" @click="saveClick('submit')">发起立项填报</el-button>
                            </div>
                        </div>
                        <el-tabs v-model="lxTabActiveName">
                            <el-tab-pane label="基本信息" name="基本信息">
                                <div class="tab-content">
                                    <el-form :model="formData" :label-width="150" :disabled="isPreview || (formData.projectLzType <= 5 && formData.projectLzType != 1)">
                                        <el-collapse v-model="activeCollapse">
                                            <el-collapse-item title="项目基本信息" name="项目基本信息">
                                                <el-row :gutter="20">
                                                    <el-col :span="12">
                                                        <el-form-item label="项目名称">
                                                            <el-input v-model="formData.projectName" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="项目编号">
                                                            <el-input v-model="formData.projectCode" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="项目外文名称">
                                                            <el-input v-model="formData.projectForeignName" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否再决策">
                                                            <el-radio-group v-model="formData.sfzjc">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否能建联合体项目">
                                                            <el-radio-group v-model="formData.sfnjlhtxm">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="投资主体">
                                                            <el-select  v-model="formData.tzzt" placeholder="请选择">
                                                                <el-option v-for="item in tzztList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="主业/非主业">
                                                            <el-select  v-model="formData.zyfzy" placeholder="请选择">
                                                                <el-option v-for="item in zyList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="直属企业">
                                                            <el-input v-model="formData.zsqy" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否能建重大或重要投资" :label-width="170">
                                                            <el-radio-group v-model="formData.sfnjzdhzytz">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否自主决策">
                                                            <el-radio-group v-model="formData.sfzzjc">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="9">
                                                        <el-form-item label="财务报表类型">
                                                            <el-select  v-model="formData.cwbblx" placeholder="请选择">
                                                                <el-option v-for="item in cwbblxList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="9">
                                                        <el-form-item label="政府审批（核准、备案）级别" :label-width="200">
                                                            <el-select  v-model="formData.zfsphzbajb" placeholder="请选择">
                                                                <el-option v-for="item in zfspjbList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否履行标前预审程序" :label-width="170">
                                                            <el-radio-group v-model="formData.sflxbqyscx">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="项目所在地" name="项目所在地">
                                                <el-row :gutter="20">
                                                    <el-col :span="8">
                                                        <el-form-item label="境内/外">
                                                            <el-select v-model="formData.jnw" placeholder="请选择">
                                                                <el-option v-for="item in jnwList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="省（境内）/洲际（境外）" :label-width="180">
                                                            <el-select v-model="formData.sjnzjjw" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="地市（境内）/国家（境外）" :label-width="190">
                                                            <el-select v-model="formData.dsjngjjw" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="区县(境内)/国家(境外)">
                                                            <el-select v-model="formData.qxjngjjw" placeholder="请选择">
                                                                <el-option v-for="item in qxgjList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目区域" :label-width="180">
                                                            <el-select v-model="formData.xmqy" placeholder="请选择">
                                                                <el-option v-for="item in xmqyList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="是否一带一路沿线国家" :label-width="190">
                                                            <el-select v-model="formData.sfydylyxgj" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="计量币种" name="计量币种">
                                                <el-row :gutter="20">
                                                    <el-col :span="6">
                                                        <el-form-item label="币种">
                                                            <el-select v-model="formData.bizhong" placeholder="请选择">
                                                                <el-option v-for="item in bzList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="汇率">
                                                            <!-- 999.99 [20,4]-->
                                                            <el-input-number v-model="formData.huilv" :min="0" :precision="2" :max="9999999999999999.99" 
                                                                controls-position="right"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="实施时间" name="实施时间">
                                                <el-row :gutter="20">
                                                    <el-col :span="8">
                                                        <el-form-item label="项目建设期" :label-width="170">
                                                            <el-input-number v-model="formData.xmjsqy" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>月</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="运营年限" :label-width="170">
                                                            <el-input-number v-model="formData.yynxn" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>年</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目合作期">
                                                            <el-input-number v-model="formData.xmhzqn" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>年</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目开工时间（预计）" :label-width="170">
                                                            <el-date-picker
                                                                v-model="formData.xmkgsjyj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目交工时间（预计）" :label-width="170">
                                                            <el-date-picker
                                                                v-model="formData.xmjgsjyj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="投资分类" name="投资分类">
                                                <el-row :gutter="20">
                                                    <el-col :span="6">
                                                        <div class="col-title">投资属性分类</div>
                                                        <el-form-item label="一级分类">
                                                            <el-select v-model="formData.tzsxyjfl" placeholder="请选择"
                                                                @change="changeTzsxyjfl"
                                                            >
                                                                <el-option v-for="item in tzsxyjflList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="二级分类">
                                                            <el-select v-model="formData.tzsxejfl" placeholder="请选择">
                                                                <el-option v-for="item in tzsxejflList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="投资板块">
                                                            <el-select v-model="formData.tzbk" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="细分板块">
                                                            <el-select v-model="formData.subsector" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <div class="col-title">投资目的分类</div>
                                                        <el-form-item label="一级分类">
                                                            <el-select v-model="formData.tzmdyjfl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="二级分类">
                                                            <el-select v-model="formData.tzmdejfl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="四新分类">
                                                            <el-select v-model="formData.sxfl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-row :gutter="20">
                                                            <el-col :span="12">
                                                                <div class="col-title">投资指南分类</div>
                                                                <el-form-item label="一级分类">
                                                                    <el-select v-model="formData.tzznyjfl" placeholder="请选择">
                                                                        <el-option label="1" value="1" />
                                                                    </el-select>
                                                                </el-form-item>
                                                                <el-form-item label="二级分类">
                                                                    <el-select v-model="formData.tzznejfl" placeholder="请选择">
                                                                        <el-option label="1" value="1" />
                                                                    </el-select>
                                                                </el-form-item>
                                                                <el-form-item label="投资指南分类概述">
                                                                    <el-input v-model="formData.tzznflgs" type="textarea" />
                                                                </el-form-item>
                                                            </el-col>
                                                            <el-col :span="12">
                                                                <div class="col-title"></div>
                                                                <el-form-item label="国民经济行业">
                                                                    <el-tree-select
                                                                        v-model="formData.gmjjhy"
                                                                        :data="gmjjhyList"
                                                                        placeholder="请选择"
                                                                        multiple
                                                                        show-checkbox
                                                                        :render-after-expand="false"
                                                                    />
                                                                </el-form-item>
                                                            </el-col>
                                                        </el-row>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="特别关注、特别监管类等信息" name="特别关注、特别监管类等信息">
                                                <el-row :gutter="20">
                                                    <el-col :span="8">
                                                        <el-form-item label="是否需报国家发展改革委和商务部核准" :label-width="170">
                                                            <el-select v-model="formData.sfxbgjfzggwhswbhz" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="是否国家领导见签">
                                                            <el-select v-model="formData.sfgjldjq" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="是否境内特别监管类">
                                                            <el-select v-model="formData.sfjntbjgl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="建设规模（实物量指标）" name="建设规模（实物量指标）">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addSwlzb">新增</el-button>
                                                </div>
                                                <el-table :data="swlzbData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="name" label="指标名称">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.name" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="num" label="数量">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.num" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="unit" label="单位">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.unit" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="bcsm" label="补充说明">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.bcsm" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteSwlzb(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="股东信息" name="股东信息">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addGdxx">新增</el-button>
                                                </div>
                                                <el-table :data="gdxxData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="gdlx" label="股东类型">
                                                        <template #default="scope">
                                                            <el-select  v-model="scope.row.gdlx" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="gdmc" label="股东名称">
                                                        <template #default="scope">
                                                            <el-select  v-model="scope.row.gdmc" placeholder="请选择">
                                                                <el-option label="股东1" value="股东1"></el-option>
                                                                <el-option label="股东2" value="股东2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="cgbl" label="持股比例（%）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.cgbl" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="cze" label="出资额（万元）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.cze" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="yjzczb" label="应缴注册资本（万元）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.yjzczb" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="ycxmzbj" label="应出项目资本金（万元）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.ycxmzbj" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="hzfqk" label="合作方情况">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.hzfqk" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="bz" label="备注">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.bz" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteGdxx(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="项目必要性及可行性" name="项目必要性及可行性">
                                                <el-form-item label="建设内容及规模">
                                                    <el-input v-model="formData.jsnrjgm" type="textarea" />
                                                </el-form-item>
                                                <el-form-item label="项目必要性">
                                                    <el-input v-model="formData.xmbyx" type="textarea" />
                                                </el-form-item>
                                                <el-form-item label="项目可行性">
                                                    <el-input v-model="formData.xmkxx" type="textarea" />
                                                </el-form-item>
                                                <!-- <el-form-item label="其他说明">
                                                    <el-input v-model="formData.qtsm" type="textarea" />
                                                </el-form-item> -->
                                            </el-collapse-item>
                                            <el-collapse-item title="立项资料" name="立项资料">
                                                <el-form-item label="相关支撑材料" :label-width="100">
                                                    <el-upload
                                                        :action="windowConfig.baseUrl + '/api/file/upload'"
                                                        :headers="{Authorization: '8681f75e775447f7903708c55a35634e'}"
                                                        :show-file-list="false"
                                                        :on-success="addZcclFile"
                                                    >
                                                        <el-button type="default">上传</el-button>
                                                    </el-upload>
                                                    <el-button type="default" @click="multiDeleteZccl" :disabled="!zcclSelectIds.length">删除选中文件</el-button>
                                                </el-form-item>
                                                <el-table :data="zcclData" style="width: 100%" empty-text="暂无数据" border
                                                    @selection-change="zcclSelectionChange"
                                                >
                                                    <el-table-column type="selection" width="55" />
                                                    <el-table-column prop="originalname" label="文件名" />
                                                    <el-table-column prop="updatedAt" label="上传时间" />
                                                    <el-table-column prop="size" label="大小" />
                                                    <el-table-column fixed="right" label="操作" width="60">
                                                        <template #default="{ row, index }">
                                                            <el-button link type="danger" size="small" @click="deleteZccl(index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>                                          
                                        </el-collapse>
                                    </el-form>
                                </div>
                            </el-tab-pane>
                            <el-tab-pane label="立项批复" name="立项批复">
                                <div class="tab-content">
                                    <el-form :model="formData" :label-width="150" :disabled="isPreview || (formData.projectLzType <= 5 && formData.projectLzType != 1)">
                                        <el-collapse v-model="activeCollapse">
                                            <el-collapse-item title="项目投资总额（全口径）" name="项目投资总额（全口径）">
                                                <el-table :data="tzzeqkjData" style="width: 100%" empty-text="暂无数据"
                                                    default-expand-all row-key="xh" border
                                                >
                                                    <el-table-column prop="xh" label="序号" />
                                                    <el-table-column prop="zb" label="指标" />
                                                    <el-table-column prop="dw" label="" width="70" />
                                                    <el-table-column prop="rmbjj" label="人民币计价">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.rmbjj" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="财务评价指标" name="财务评价指标">
                                                <el-table :data="cwpjzbData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column prop="name" label="指标" />
                                                    <el-table-column prop="unit" label="" width="70" />
                                                    <el-table-column prop="tzpgjdpfz" label="投资评估阶段批复值">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.num" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="核心边界条件" name="核心边界条件">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addHxbjtj">新增</el-button>
                                                </div>
                                                <el-table :data="hxbjtjData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="type" label="业务类型">
                                                        <template #default="scope">
                                                            <el-select v-model="scope.row.type" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="单位工程造价">
                                                        <el-table-column prop="dwgczjSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.dwgczjSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="dwgczjDw" label="单位">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.dwgczjDw" placeholder="请选择">
                                                                    <el-option label="元" value="元"></el-option>
                                                                    <el-option label="万元" value="万元"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                    </el-table-column>
                                                    <el-table-column label="销售/服务能力">
                                                        <el-table-column prop="xsfwnlSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.xsfwnlSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="xsfwnlDw" label="单位">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.xsfwnlDw" placeholder="请选择">
                                                                    <el-option label="元" value="元"></el-option>
                                                                    <el-option label="万元" value="万元"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                    </el-table-column>
                                                    <el-table-column label="年均负荷率">
                                                        <el-table-column prop="njfhlSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.njfhlSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="njfhlDw" label="单位" width="60" />
                                                    </el-table-column>
                                                    <el-table-column label="单位生产/服务总成本">
                                                        <el-table-column prop="dwscfwzcbSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.dwscfwzcbSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="dwscfwzcbDw" label="单位">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.dwscfwzcbDw" placeholder="请选择">
                                                                    <el-option label="元" value="元"></el-option>
                                                                    <el-option label="万元" value="万元"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                    </el-table-column>
                                                    <el-table-column label="单位售价（含税）">
                                                        <el-table-column prop="dwsjSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.dwsjSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="dwsjDw" label="单位">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.dwsjDw" placeholder="请选择">
                                                                    <el-option label="元" value="元"></el-option>
                                                                    <el-option label="万元" value="万元"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                    </el-table-column>
                                                    <el-table-column label="盈亏平衡点">
                                                        <el-table-column prop="ykphdlx" label="类型">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.ykphdlx" placeholder="请选择">
                                                                    <el-option label="类型1" value="类型1"></el-option>
                                                                    <el-option label="类型2" value="类型2"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="ykphdsz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.ykphdsz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="ykphddw" label="单位" width="60" />
                                                    </el-table-column>
                                                    <el-table-column prop="bcsm" label="核心边界条件补充说明">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.bcsm" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteHxbjtj(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="项目立项信息" name="项目立项信息">
                                                <el-row :gutter="20">
                                                    <el-col :span="24">
                                                        <el-form-item label="其他会议审议情况" :label-width="160">
                                                            <el-input v-model="formData.qthysyqk" type="textarea" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="立项最终审批意见" :label-width="160">
                                                            <el-select v-model="formData.lxzzpfyj" placeholder="请选择">
                                                                <el-option v-for="item in lxzzspyjList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目立项批复时间">
                                                            <el-date-picker
                                                                v-model="formData.lxxmpfsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="立项项目批复文号">
                                                            <el-input v-model="formData.lxxmpfwh" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <el-form-item label="未通过主要原因与要求" :label-width="160">
                                                            <el-input v-model="formData.wtgzyyyyyq" type="textarea" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <el-form-item label="立项批复文件" :label-width="100">
                                                            <el-upload
                                                                :action="windowConfig.baseUrl + '/api/file/upload'"
                                                                :headers="{Authorization: '8681f75e775447f7903708c55a35634e'}"
                                                                :show-file-list="false"
                                                                :on-success="addLxpfFile"
                                                            >
                                                                <el-button type="default">上传</el-button>
                                                            </el-upload>
                                                            <el-button type="default" @click="multiDeleteLxpf" :disabled="!lxpfSelectIds.length">删除选中文件</el-button>
                                                        </el-form-item>
                                                        <el-table :data="lxpfwjData" style="width: 100%" empty-text="暂无数据" border
                                                            @selection-change="lxpfSelectionChange"
                                                        >
                                                            <el-table-column type="selection" width="55" />
                                                            <el-table-column prop="originalname" label="文件名" />
                                                            <el-table-column prop="updatedAt" label="上传时间" />
                                                            <el-table-column prop="size" label="大小" />
                                                            <el-table-column fixed="right" label="操作" width="60">
                                                                <template #default="scope">
                                                                    <el-button link type="danger" size="small" @click="deleteLxpf(index)">删除</el-button>
                                                                </template>
                                                            </el-table-column>
                                                        </el-table>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="审批意见" name="审批意见">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addSpyj">新增</el-button>
                                                </div>
                                                <el-table :data="spyjTableData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="lx" label="类型">
                                                        <template #default="scope">
                                                            <el-select v-model="scope.row.lx" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="批复意见" prop="pfyj">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.pfyj" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="批复意见时间" prop="pfyjsj">
                                                        <template #default="scope">
                                                            <el-date-picker
                                                                v-model="scope.row.pfyjsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteSpyj(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                                <el-form-item label="相关上会材料" :label-width="100">
                                                    <el-upload
                                                        :action="windowConfig.baseUrl + '/api/file/upload'"
                                                        :headers="{Authorization: '8681f75e775447f7903708c55a35634e'}"
                                                        :show-file-list="false"
                                                        :on-success="addShclFile"
                                                    >
                                                        <el-button type="default">上传</el-button>
                                                    </el-upload>
                                                    <el-button type="default" @click="multiDeleteShcl" :disabled="!shclSelectIds.length">删除选中文件</el-button>
                                                </el-form-item>
                                                <el-table :data="shclData" style="width: 100%" empty-text="暂无数据" border
                                                    @selection-change="shclSelectionChange"
                                                >
                                                    <el-table-column type="selection" width="55" />
                                                    <el-table-column prop="originalname" label="文件名" />
                                                    <el-table-column prop="updatedAt" label="上传时间" />
                                                    <el-table-column prop="size" label="大小" />
                                                    <el-table-column fixed="right" label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteShcl(index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                        </el-collapse>
                                    </el-form>
                                </div>
                            </el-tab-pane>
                        </el-tabs>
                    </div>
                </el-tab-pane>
                <el-tab-pane label="决策信息填报" name="决策信息填报" v-if="[5,7].includes(jcFormData.projectLzType)">
                    <div class="project-tab-content">
                        <div class="add-project-header">
                            <div class="header-left"></div>
                            <div class="header-right">
                                <el-button type="default" @click="backClick">返回</el-button>
                                <el-button type="primary" @click="saveClick('save')">保存</el-button>
                                <el-button type="primary" v-if="jcFormData.projectLzType === 7" @click="saveClick('submit')">发起决策信息填报</el-button>
                            </div>
                        </div>
                        <el-tabs v-model="jcTabActiveName">
                            <el-tab-pane label="基本信息" name="基本信息">
                                <div class="tab-content">
                                    <el-form :model="jcFormData" :label-width="150" :disabled="isPreview || [5,7].includes(jcFormData.projectLzType)">
                                        <el-collapse v-model="activeCollapse">
                                            <el-collapse-item title="项目基本信息" name="项目基本信息">
                                                <el-row :gutter="20">
                                                    <el-col :span="12">
                                                        <el-form-item label="项目名称">
                                                            <el-input v-model="jcFormData.projectName" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="项目外文名称">
                                                            <el-input v-model="jcFormData.projectForeignName" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="曾用名">
                                                            <el-input v-model="jcFormData.cym" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="项目编号">
                                                            <el-input v-model="jcFormData.projectCode" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="申报单位">
                                                            <el-select  v-model="jcFormData.sbdw" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="申报单位企业规格">
                                                            <el-select  v-model="jcFormData.sbdwqygg" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目总投资">
                                                            <el-input-number v-model="jcFormData.xmztz" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>万元</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="所属直属企业">
                                                            <el-select  v-model="jcFormData.zsqy" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="管理主体">
                                                            <el-select  v-model="jcFormData.glzt" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目区域" :label-width="180">
                                                            <el-select v-model="jcFormData.xmqy" placeholder="请选择">
                                                                <el-option v-for="item in xmqyList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="境内/外">
                                                            <el-select v-model="jcFormData.jnw" placeholder="请选择">
                                                                <el-option v-for="item in jnwList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="省（境内）/洲际（境外）" :label-width="180">
                                                            <el-select v-model="jcFormData.sjnzjjw" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="地市（境内）/国家（境外）" :label-width="190">
                                                            <el-select v-model="jcFormData.dsjngjjw" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="区县(境内)/国家(境外)">
                                                            <el-select v-model="jcFormData.qxjngjjw" placeholder="请选择">
                                                                <el-option v-for="item in qxgjList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="币种">
                                                            <el-select v-model="jcFormData.bizhong" placeholder="请选择">
                                                                <el-option v-for="item in bzList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="汇率">
                                                            <el-input-number v-model="jcFormData.huilv" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="投资模式">
                                                            <el-input v-model="jcFormData.tzms" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="对外签约品牌">
                                                            <el-input v-model="jcFormData.dwqypp" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否能建重大或重要投资" :label-width="170">
                                                            <el-radio-group v-model="jcFormData.sfnjzdhzytz">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="能建占股比">
                                                            <el-input-number v-model="jcFormData.njzgb" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>%</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目资金来源">
                                                            <el-select v-model="jcFormData.xmzjly" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="商务部项目类型">
                                                            <el-select v-model="jcFormData.swbxmlx" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="国民经济行业">
                                                            <el-tree-select
                                                                v-model="jcFormData.gmjjhy"
                                                                :data="gmjjhyList"
                                                                placeholder="请选择"
                                                                multiple
                                                                show-checkbox
                                                                :render-after-expand="false"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否自主决策">
                                                            <el-radio-group v-model="jcFormData.sfzzjc">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="财务报表类型">
                                                            <el-select  v-model="jcFormData.cwbblx" placeholder="请选择">
                                                                <el-option v-for="item in cwbblxList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目类型">
                                                            <el-select v-model="jcFormData.xmlx" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="主业/非主业">
                                                            <el-select  v-model="jcFormData.zyfzy" placeholder="请选择">
                                                                <el-option v-for="item in zyList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="运营年限" :label-width="170">
                                                            <el-input-number v-model="jcFormData.yynxn" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>年</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目建设期" :label-width="170">
                                                            <el-input-number v-model="jcFormData.xmjsqy" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>月</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目合作期">
                                                            <el-input-number v-model="jcFormData.xmhzqn" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>年</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目开工时间（预计）" :label-width="170">
                                                            <el-date-picker
                                                                v-model="jcFormData.xmkgsjyj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目交工时间（预计）" :label-width="170">
                                                            <el-date-picker
                                                                v-model="jcFormData.xmjgsjyj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否已经立项">
                                                            <el-radio-group v-model="jcFormData.sfyjlx">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否能建联合体项目">
                                                            <el-radio-group v-model="jcFormData.sfnjlhtxm">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否重点区域">
                                                            <el-radio-group v-model="jcFormData.sfzdqy">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="重点区域">
                                                            <el-select v-model="jcFormData.zdqy" placeholder="请选择">
                                                                <el-option :label="1" :value="1"></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <el-form-item label="建设内容及规模">
                                                            <el-input v-model="jcFormData.jsnrjgm" type="textarea" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="关联项目">
                                                            <el-select v-model="jcFormData.glxm" placeholder="请选择">
                                                                <el-option :label="1" :value="1"></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="联系人">
                                                            <el-input v-model="jcFormData.lxr" type="textarea" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="联系人电话">
                                                            <el-input v-model="jcFormData.lxrdh" type="textarea" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="投资回收方式">
                                                            <el-select v-model="jcFormData.tzhsfs" placeholder="请选择">
                                                                <el-option :label="1" :value="1"></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="成本利润率">
                                                            <el-input-number v-model="jcFormData.cblrl" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>%</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <el-form-item label="未通过主要原因与要求" :label-width="160">
                                                            <el-input v-model="jcFormData.wtgzyyyyyq" type="textarea" />
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="投资分类" name="投资分类">
                                                <el-row :gutter="20">
                                                    <el-col :span="8">
                                                        <div class="col-title">投资属性分类</div>
                                                        <el-form-item label="一级分类">
                                                            <el-select v-model="jcFormData.tzsxyjfl" placeholder="请选择"
                                                                @change="changeTzsxyjfl"
                                                            >
                                                                <el-option v-for="item in tzsxyjflList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="二级分类">
                                                            <el-select v-model="jcFormData.tzsxejfl" placeholder="请选择">
                                                                <el-option v-for="item in tzsxejflList" :key="item.value"
                                                                    :label="item.value" :value="item.key"
                                                                ></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="投资板块">
                                                            <el-select v-model="jcFormData.tzbk" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="细分板块">
                                                            <el-select v-model="jcFormData.subsector" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <div class="col-title">投资目的分类</div>
                                                        <el-form-item label="一级分类">
                                                            <el-select v-model="jcFormData.tzmdyjfl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="二级分类">
                                                            <el-select v-model="jcFormData.tzmdejfl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="四新分类">
                                                            <el-select v-model="jcFormData.sxfl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="是否纳入补贴目录" :label-width="170">
                                                            <el-radio-group v-model="jcFormData.sfnrbtml">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <div class="col-title">投资指南分类</div>
                                                        <el-form-item label="一级分类">
                                                            <el-select v-model="jcFormData.tzznyjfl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="二级分类">
                                                            <el-select v-model="jcFormData.tzznejfl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                        <el-form-item label="是否再决策">
                                                            <el-radio-group v-model="jcFormData.sfzjc">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="特别关注、特别监管类等信息" name="特别关注、特别监管类等信息">
                                                <el-row :gutter="20">
                                                    <el-col :span="6">
                                                        <el-form-item label="是否需报国家发展改革委和商务部核准" :label-width="170">
                                                            <el-select v-model="jcFormData.sfxbgjfzggwhswbhz" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否国家领导见签">
                                                            <el-select v-model="jcFormData.sfgjldjq" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否境内特别监管类">
                                                            <el-select v-model="jcFormData.sfjntbjgl" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="是否一带一路沿线国家" :label-width="190">
                                                            <el-select v-model="jcFormData.sfydylyxgj" placeholder="请选择">
                                                                <el-option label="1" value="1" />
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="建设规模（实物量指标）" name="建设规模（实物量指标）">
                                                <el-row :gutter="20">
                                                    <el-col :span="12">
                                                        <el-form-item label="高速公路里程">
                                                            <el-input-number v-model="jcFormData.gsgllc" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>km</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="其他收费公路里程">
                                                            <el-input-number v-model="jcFormData.qtsfgllc" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>km</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addJcSwlzb">新增</el-button>
                                                </div>
                                                <el-table :data="jcSwlzbData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="name" label="指标名称">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.name" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="num" label="数量">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.num" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="unit" label="单位">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.unit" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="bcsm" label="补充说明">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.bcsm" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteJcSwlzb(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="政府审批（核准、备案）情况" name="政府审批（核准、备案）情况">
                                                <el-row :gutter="20">
                                                    <el-col :span="12">
                                                        <el-form-item label="是否已经政府审批" :label-width="170">
                                                            <el-radio-group v-model="jcFormData.sfyjzfsp">
                                                                <el-radio :value="1">是</el-radio>
                                                                <el-radio :value="2">否</el-radio>
                                                            </el-radio-group>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <el-form-item label="审批单位名称（全称）" :label-width="170">
                                                            <el-input v-model="jcFormData.spdwmc" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="审批金额">
                                                            <el-input-number v-model="jcFormData.spje" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>万元</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="审批文号">
                                                            <el-input v-model="jcFormData.pwwh" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="审批级别">
                                                            <el-select  v-model="jcFormData.spjb" placeholder="请选择">
                                                                <el-option :label="1" :value="1"></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="审批时间">
                                                            <el-date-picker
                                                                v-model="jcFormData.spsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="股东信息" name="股东信息">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addGdxx">新增</el-button>
                                                </div>
                                                <el-table :data="gdxxData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="gdlx" label="股东类型">
                                                        <template #default="scope">
                                                            <el-select  v-model="scope.row.gdlx" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="gdmc" label="股东名称">
                                                        <template #default="scope">
                                                            <el-select  v-model="scope.row.gdmc" placeholder="请选择">
                                                                <el-option label="股东1" value="股东1"></el-option>
                                                                <el-option label="股东2" value="股东2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="mycgbl" label="名义持股比例（%）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.mycgbl" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="cgbl" label="持股比例（%）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.cgbl" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="lrfpbl" label="利润分配比例（%）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.cgbl" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="cze" label="出资额（万元）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.cze" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="sffldw" label="是否关联单位">
                                                        <template #default="scope">
                                                            <el-select  v-model="scope.row.sffldw" placeholder="请选择">
                                                                <el-option label="是" :value="1"></el-option>
                                                                <el-option label="否" :value="2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="yjzczb" label="应缴注册资本（万元）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.yjzczb" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="ycxmzbj" label="应出项目资本金（万元）">
                                                        <template #default="scope">
                                                            <el-input-number v-model="scope.row.ycxmzbj" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="sfwqcnsy" label="是否为其承诺收益">
                                                        <template #default="scope">
                                                            <el-select  v-model="scope.row.sfwqcnsy" placeholder="请选择">
                                                                <el-option label="是" :value="1"></el-option>
                                                                <el-option label="否" :value="2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="sfwqtgdbhgcnd" label="是否为其提供担保回购承诺等">
                                                        <template #default="scope">
                                                            <el-select  v-model="scope.row.sfwqtgdbhgcnd" placeholder="请选择">
                                                                <el-option label="是" :value="1"></el-option>
                                                                <el-option label="否" :value="2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteGdxx(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                                <el-row :gutter="20">
                                                    <el-col :span="24">
                                                        <el-form-item label="我方出资人及持股比例" :label-width="170">
                                                            <el-input v-model="jcFormData.wfczrjcgbl" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <el-form-item label="涉及能建方施工单位" :label-width="170">
                                                            <el-select  v-model="jcFormData.sjnjfsgdw" multiple placeholder="请选择">
                                                                <el-option :label="1" :value="1"></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="我方担保及股权融资情况" name="我方担保及股权融资情况">
                                                <el-row :gutter="20">
                                                    <el-col :span="6">
                                                        <el-form-item label="我方负责的股权融资金额" :label-width="170">
                                                            <el-input-number v-model="jcFormData.wffzdgqrzjewy" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>万元</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="融资成本">
                                                            <el-input-number v-model="jcFormData.rzcbgq" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>%</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="期限">
                                                            <el-input-number v-model="jcFormData.qxgq" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>年</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="担保金额">
                                                            <el-input-number v-model="jcFormData.dbje" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>万元</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="我方担保及债权融资情况" name="我方担保及债权融资情况">
                                                <!--  wffzdzqrzjewy: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "我方负责的债权融资金额(万元)" },
    rzcbzq: { type: DataTypes.DECIMAL(19, 8), allowNull: true, comment: "融资成本债权" },
    qxzq: { type: DataTypes.INTEGER, allowNull: true, comment: "期限债权" },TODO:
    yjldsjzq: { type: DataTypes.DATE, allowNull: true, comment: "预计落地时间债权" },建表 -->
                                            </el-collapse-item>
                                            <el-collapse-item title="工程带动情况" name="工程带动情况">
                                                <el-row :gutter="20">
                                                    <el-col :span="6">
                                                        <el-form-item label="带动工程合同额">
                                                            <el-input-number v-model="jcFormData.ddgchte" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>万元</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="投资带动比">
                                                            <el-input-number v-model="jcFormData.tzddb" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>%</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="工程利润">
                                                            <el-input-number v-model="jcFormData.gclrwy" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>万元</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="工程利润率">
                                                            <el-input-number v-model="jcFormData.gclrl" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            >
                                                                <template #suffix>
                                                                    <span>%</span>
                                                                </template>
                                                            </el-input-number>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="项目内容及必要性" name="项目内容及必要性">
                                                <el-form-item label="建设内容及规模">
                                                    <el-input v-model="formData.jsnrjgm" type="textarea" />
                                                </el-form-item>
                                                <el-form-item label="项目必要性">
                                                    <el-input v-model="jcFormData.xmbyx" type="textarea" />
                                                </el-form-item>
                                                <el-form-item label="其他说明">
                                                    <el-input v-model="jcFormData.qtsm" type="textarea" />
                                                </el-form-item>
                                            </el-collapse-item>
                                            <el-collapse-item title="风险管理" name="风险管理">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addFxgl">新增</el-button>
                                                </div>
                                                <el-table :data="fxglData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="fxlb" label="风险类别">
                                                        <template #default="scope">
                                                            <el-select v-model="scope.row.fxlb" placeholder="请选择">
                                                                <el-option :label="1" :value="1"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="fxms" label="风险描述">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.fxms" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="ydcs" label="应对措施">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.ydcs" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteFxgl(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="里程碑节点" name="里程碑节点">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addLcbjd">新增</el-button>
                                                </div>
                                                <el-table :data="lcbjdData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="lcbjdmc" label="里程碑节点名称">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.lcbjdmc" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="jdwcms" label="节点完成描述">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.jdwcms" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="yjwcsj" label="预计完成时间">
                                                        <template #default="scope">
                                                            <el-date-picker
                                                                v-model="jcFormData.yjwcsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteLcbjd(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                                <el-form-item label="里程碑计划审批表" :label-width="130">
                                                    <el-upload
                                                        :action="windowConfig.baseUrl + '/api/file/upload'"
                                                        :headers="{Authorization: '8681f75e775447f7903708c55a35634e'}"
                                                        :show-file-list="false"
                                                        :on-success="addLcbspFile"
                                                    >
                                                        <el-button type="default">上传</el-button>
                                                    </el-upload>
                                                    <el-button type="default" @click="multiDeleteLcbsp" :disabled="!lcbspSelectIds.length">删除选中文件</el-button>
                                                </el-form-item>
                                                <el-table :data="lcbspData" style="width: 100%" empty-text="暂无数据" border
                                                    @selection-change="lcbspSelectionChange"
                                                >
                                                    <el-table-column type="selection" width="55" />
                                                    <el-table-column prop="originalname" label="文件名" />
                                                    <el-table-column prop="updatedAt" label="上传时间" />
                                                    <el-table-column prop="size" label="大小" />
                                                    <el-table-column fixed="right" label="操作" width="60">
                                                        <template #default="{ row, index }">
                                                            <el-button link type="danger" size="small" @click="deleteLcbsp(index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="审批意见" name="审批意见">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addSpyj">新增</el-button>
                                                </div>
                                                <el-table :data="spyjTableData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="lx" label="类型">
                                                        <template #default="scope">
                                                            <el-select v-model="scope.row.lx" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="批复意见" prop="pfyj">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.pfyj" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="批复意见时间" prop="pfyjsj">
                                                        <template #default="scope">
                                                            <el-date-picker
                                                                v-model="scope.row.pfyjsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                          <el-table-column label="执行回复" prop="zxhf">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.zxhf" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="执行回复时间" prop="zxhfsj">
                                                        <template #default="scope">
                                                            <el-date-picker
                                                                v-model="scope.row.zxhfsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="执行回复附件" prop="zxhffj">
                                                        <!-- TODO: 文件上传 和 文件信息展示 暂时只有一个文件 -->
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="投评决策资料" name="投评决策资料">
                                                <el-form-item label="可研材料" :label-width="160">
                                                    <el-upload
                                                        :action="windowConfig.baseUrl + '/api/file/upload'"
                                                        :headers="{Authorization: '8681f75e775447f7903708c55a35634e'}"
                                                        :show-file-list="false"
                                                        :on-success="addKyclFile"
                                                    >
                                                        <el-button type="default">上传</el-button>
                                                    </el-upload>
                                                    <el-button type="default" @click="multiDeleteKycl" :disabled="!kyclSelectIds.length">删除选中文件</el-button>
                                                </el-form-item>
                                                <el-table :data="kyclData" style="width: 100%" empty-text="暂无数据" border
                                                    @selection-change="kyclSelectionChange"
                                                >
                                                    <el-table-column type="selection" width="55" />
                                                    <el-table-column prop="originalname" label="文件名" />
                                                    <el-table-column prop="updatedAt" label="上传时间" />
                                                    <el-table-column prop="size" label="大小" />
                                                    <el-table-column fixed="right" label="操作" width="60">
                                                        <template #default="{ row, index }">
                                                            <el-button link type="danger" size="small" @click="deleteKycl(index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                                <el-form-item label="经济指标初步测算资料" :label-width="160">
                                                    <el-upload
                                                        :action="windowConfig.baseUrl + '/api/file/upload'"
                                                        :headers="{Authorization: '8681f75e775447f7903708c55a35634e'}"
                                                        :show-file-list="false"
                                                        :on-success="addJjzbcsFile"
                                                    >
                                                        <el-button type="default">上传</el-button>
                                                    </el-upload>
                                                    <el-button type="default" @click="multiDeleteJjzbcs" :disabled="!jjzbcsSelectIds.length">删除选中文件</el-button>
                                                </el-form-item>
                                                <el-table :data="jjzbcsData" style="width: 100%" empty-text="暂无数据" border
                                                    @selection-change="jjzbcsSelectionChange"
                                                >
                                                    <el-table-column type="selection" width="55" />
                                                    <el-table-column prop="originalname" label="文件名" />
                                                    <el-table-column prop="updatedAt" label="上传时间" />
                                                    <el-table-column prop="size" label="大小" />
                                                    <el-table-column fixed="right" label="操作" width="60">
                                                        <template #default="{ row, index }">
                                                            <el-button link type="danger" size="small" @click="deleteJjzbcs(index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                                <el-form-item label="其他相关支撑材料" :label-width="160">
                                                    <el-upload
                                                        :action="windowConfig.baseUrl + '/api/file/upload'"
                                                        :headers="{Authorization: '8681f75e775447f7903708c55a35634e'}"
                                                        :show-file-list="false"
                                                        :on-success="addTpzcclFile"
                                                    >
                                                        <el-button type="default">上传</el-button>
                                                    </el-upload>
                                                    <el-button type="default" @click="multiDeleteTpzccl" :disabled="!tpzcclSelectIds.length">删除选中文件</el-button>
                                                </el-form-item>
                                                <el-table :data="tpzcclData" style="width: 100%" empty-text="暂无数据" border
                                                    @selection-change="tpzcclSelectionChange"
                                                >
                                                    <el-table-column type="selection" width="55" />
                                                    <el-table-column prop="originalname" label="文件名" />
                                                    <el-table-column prop="updatedAt" label="上传时间" />
                                                    <el-table-column prop="size" label="大小" />
                                                    <el-table-column fixed="right" label="操作" width="60">
                                                        <template #default="{ row, index }">
                                                            <el-button link type="danger" size="small" @click="deleteTpzccl(index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                                <el-form-item label="上会议案" :label-width="160">
                                                    <el-upload
                                                        :action="windowConfig.baseUrl + '/api/file/upload'"
                                                        :headers="{Authorization: '8681f75e775447f7903708c55a35634e'}"
                                                        :show-file-list="false"
                                                        :on-success="addShyaFile"
                                                    >
                                                        <el-button type="default">上传</el-button>
                                                    </el-upload>
                                                    <el-button type="default" @click="multiDeleteShya" :disabled="!shyaSelectIds.length">删除选中文件</el-button>
                                                </el-form-item>
                                                <el-table :data="shyaData" style="width: 100%" empty-text="暂无数据" border
                                                    @selection-change="shyaSelectionChange"
                                                >
                                                    <el-table-column type="selection" width="55" />
                                                    <el-table-column prop="originalname" label="文件名" />
                                                    <el-table-column prop="updatedAt" label="上传时间" />
                                                    <el-table-column prop="size" label="大小" />
                                                    <el-table-column fixed="right" label="操作" width="60">
                                                        <template #default="{ row, index }">
                                                            <el-button link type="danger" size="small" @click="deleteShya(index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                        </el-collapse>
                                    </el-form>
                                </div>
                            </el-tab-pane>
                            <el-tab-pane label="决策批复" name="决策批复">
                                <div class="tab-content">
                                    <el-form :model="jcFormData" :label-width="150" :disabled="isPreview || [5,7].includes(jcFormData.projectLzType)">
                                        <el-collapse v-model="activeCollapse">
                                            <el-collapse-item title="项目投资总额（全口径）" name="项目投资总额（全口径）">
                                                <el-table :data="jcTzzeqkjData" style="width: 100%" empty-text="暂无数据"
                                                    default-expand-all row-key="xh" border
                                                >
                                                    <el-table-column prop="xh" label="序号" />
                                                    <el-table-column prop="zb" label="指标" />
                                                    <el-table-column prop="dw" label="" width="70" />
                                                    <el-table-column prop="rmbjj" label="人民币计价">
                                                        <template #default="scope">
                                                            <el-input-number v-if="!['一', '二'].includes(scope.row.xh)" v-model="scope.row.rmbjj" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="财务评价指标" name="财务评价指标">
                                                <el-table :data="jcCwpjzbData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column prop="name" label="指标" />
                                                    <el-table-column prop="unit" label="" width="70" />
                                                    <el-table-column prop="num" label="投资评估阶段批复值">
                                                        <template #default="scope">
                                                            <el-date-picker v-if="scope.row.type === 'year'"
                                                                v-model="scope.row.num"
                                                                type="year"
                                                                placeholder="请选择"
                                                            />
                                                            <el-input-number v-else
                                                                v-model="scope.row.num" :min="0" :precision="2" :max="999.99"
                                                                controls-position="right"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="核心边界条件" name="核心边界条件">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addJchxbjtj">新增</el-button>
                                                </div>
                                                <el-table :data="jcHxbjtjData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="type" label="业务类型">
                                                        <template #default="scope">
                                                            <el-select v-model="scope.row.type" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="单位工程造价">
                                                        <el-table-column prop="dwgczjSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.dwgczjSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="dwgczjDw" label="单位">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.dwgczjDw" placeholder="请选择">
                                                                    <el-option label="元" value="元"></el-option>
                                                                    <el-option label="万元" value="万元"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                    </el-table-column>
                                                    <el-table-column label="销售/服务能力">
                                                        <el-table-column prop="xsfwnlSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.xsfwnlSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="xsfwnlDw" label="单位">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.xsfwnlDw" placeholder="请选择">
                                                                    <el-option label="元" value="元"></el-option>
                                                                    <el-option label="万元" value="万元"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                    </el-table-column>
                                                    <el-table-column label="年均负荷率">
                                                        <el-table-column prop="njfhlSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.njfhlSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="njfhlDw" label="单位" width="60" />
                                                    </el-table-column>
                                                    <el-table-column label="单位生产/服务总成本">
                                                        <el-table-column prop="dwscfwzcbSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.dwscfwzcbSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="dwscfwzcbDw" label="单位">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.dwscfwzcbDw" placeholder="请选择">
                                                                    <el-option label="元" value="元"></el-option>
                                                                    <el-option label="万元" value="万元"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                    </el-table-column>
                                                    <el-table-column label="单位售价（含税）">
                                                        <el-table-column prop="dwsjSz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.dwsjSz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="dwsjDw" label="单位">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.dwsjDw" placeholder="请选择">
                                                                    <el-option label="元" value="元"></el-option>
                                                                    <el-option label="万元" value="万元"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                    </el-table-column>
                                                    <el-table-column label="盈亏平衡点">
                                                        <el-table-column prop="ykphdlx" label="类型">
                                                            <template #default="scope">
                                                                <el-select v-model="scope.row.ykphdlx" placeholder="请选择">
                                                                    <el-option label="类型1" value="类型1"></el-option>
                                                                    <el-option label="类型2" value="类型2"></el-option>
                                                                </el-select>
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="ykphdsz" label="数值">
                                                            <template #default="scope">
                                                                <el-input-number v-model="scope.row.ykphdsz" :min="0" :precision="2" :max="999.99"
                                                                    controls-position="right"
                                                                />
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column prop="ykphddw" label="单位" width="60" />
                                                    </el-table-column>
                                                    <el-table-column prop="bcsm" label="核心边界条件补充说明">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.bcsm" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteJchxbjtj(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="决策主体审核情况" name="决策主体审核情况">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addJcztshqk">新增</el-button>
                                                </div>
                                                <el-table :data="jcztshqkData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="hylx" label="会议类型">
                                                        <template #default="scope">
                                                            <el-select v-model="scope.row.hylx" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="hymc" label="会议名称">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.hymc" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="jcsj" label="决策时间">
                                                        <template #default="scope">
                                                            <el-date-picker
                                                                v-model="scope.row.jcsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="jcjl" label="决策结论">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.jcjl" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <!-- TODO: 会议纪要 hyjy 文件上传 -->
                                                    <el-table-column prop="qtsm" label="其他说明">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.qtsm" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteJcztshqk(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="投资主体审核情况" name="投资主体审核情况">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addTzztshqk">新增</el-button>
                                                </div>
                                                <el-table :data="tzztshqkData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="hylx" label="会议类型">
                                                        <template #default="scope">
                                                            <el-select v-model="scope.row.hylx" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="hymc" label="会议名称">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.hymc" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="shsj" label="审核时间">
                                                        <template #default="scope">
                                                            <el-date-picker
                                                                v-model="scope.row.shsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="jl" label="结论">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.jl" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <!-- TODO: 附件  fj 文件上传 -->
                                                    <el-table-column prop="qtsm" label="其他说明">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.qtsm" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteTzztshqk(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                                <el-row :gutter="20">
                                                    <el-col :span="24">
                                                        <el-form-item label="其他会议审议情况">
                                                            <el-input v-model="jcFormData.jcqthysyqk" type="textarea" />
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="项目批复信息" name="项目批复信息">
                                                <el-row :gutter="20">
                                                    <el-col :span="8">
                                                        <el-form-item label="最终审批意见">
                                                            <el-select v-model="jcFormData.jczzpfyj" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目批复时间">
                                                            <el-date-picker
                                                                v-model="jcFormData.jcxmpfsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="项目批复文号">
                                                            <el-input v-model="jcFormData.jcxmpfwh" />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <el-form-item label="未通过主要原因与要求">
                                                            <el-input v-model="jcFormData.jcwtgzyyyyyq" type="textarea" />
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                            <el-collapse-item title="审批意见" name="审批意见">
                                                <div class="tab-handle">
                                                    <el-button type="primary" size="small" @click="addJcspyj">新增</el-button>
                                                </div>
                                                <el-table :data="jcspyjData" style="width: 100%" empty-text="暂无数据" border>
                                                    <el-table-column type="index" width="50" />
                                                    <el-table-column prop="lx" label="类型">
                                                        <template #default="scope">
                                                            <el-select v-model="scope.row.lx" placeholder="请选择">
                                                                <el-option label="类型1" value="类型1"></el-option>
                                                                <el-option label="类型2" value="类型2"></el-option>
                                                            </el-select>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="pfyj" label="批复意见">
                                                        <template #default="scope">
                                                            <el-input v-model="scope.row.pfyj" type="textarea" />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column prop="pfyjsj" label="批复意见时间">
                                                        <template #default="scope">
                                                            <el-date-picker
                                                                v-model="scope.row.pfyjsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="操作" width="60">
                                                        <template #default="scope">
                                                            <el-button link type="danger" size="small" @click="deleteJcspyj(scope.$index)">删除</el-button>
                                                        </template>
                                                    </el-table-column>
                                                </el-table>
                                            </el-collapse-item>
                                            <el-collapse-item title="其他" name="其他">
                                                <el-row :gutter="20">
                                                    <el-col :span="6">
                                                        <el-form-item label="投资主体首次申报时间" :label-width="160">
                                                            <el-date-picker
                                                                v-model="jcFormData.tzztscsbsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="会签完成时间">
                                                            <el-date-picker
                                                                v-model="jcFormData.hqwcsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="首次发函时间">
                                                            <el-date-picker
                                                                v-model="jcFormData.scfhsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="补充资料时间">
                                                            <el-date-picker
                                                                v-model="jcFormData.bczlsj"
                                                                type="date"
                                                                placeholder="请选择"
                                                            />
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="6">
                                                        <el-form-item label="审核人" :label-width="160">
                                                            <el-input v-model="jcFormData.shr" />
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-collapse-item>
                                        </el-collapse>
                                    </el-form>
                                </div>
                            </el-tab-pane>
                        </el-tabs>
                    </div>
                </el-tab-pane>
            </el-tabs>      
        </div>
    </div>
</template>

<script setup>
    import { reactive, ref, onMounted, getCurrentInstance, computed } from "vue";
    import { useRouter, useRoute } from "vue-router";
    import { ElMessage, ElMessageBox } from "element-plus";
    const router = useRouter();
    const route = useRoute();
    const { proxy } = getCurrentInstance();
    import { useProjectStore } from "@/stores/project.js";
    const projectStore = useProjectStore();
    
    // tab相关
    const pageActiveName = ref("立项填报");
    const lxTabActiveName = ref("基本信息");
    const jcTabActiveName = ref("基本信息");
    const activeCollapse = reactive([
        "项目基本信息","项目所在地", "计量币种", "实施时间", "投资分类", "特别关注、特别监管类等信息",
        "建设规模（实物量指标）", "股东信息", "项目必要性及可行性", "立项资料", "项目投资总额（全口径）",
        "财务评价指标", "核心边界条件", "项目立项信息", "审批意见", "政府审批（核准、备案）情况",
        "我方担保及融资情况", "工程带动情况", "项目内容及必要性", "风险管理", "里程碑节点", "投评决策资料",
        "决策主体审核情况", "投资主体审核情况", "项目批复信息", "其他"
    ]);
    let formData = reactive({});
    let jcFormData = reactive({});
    let loading = ref(false);
    // 建设规模（实物量指标）
    let swlzbData = reactive([]);
    const addSwlzb = () => {
        swlzbData.push({});
    };
    const deleteSwlzb = (index) => {
        swlzbData.splice(index, 1);
    };
    // 股东信息
    let gdxxData = reactive([]);
    const addGdxx = () => {
        gdxxData.push({});
    };
    const deleteGdxx = (index) => {
        gdxxData.splice(index, 1);
    };

    // 支撑材料
    let zcclData = ref([]);
    const addZcclFile = (res, file) => {
        zcclData.value.push(res.data);
    }
    const deleteZccl = (index) => {
        ElMessageBox.confirm("确认删除该项？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            zcclData.value.splice(index, 1);
        }).catch(() => {})
    }
    let zcclSelectIds = ref([]);
    const zcclSelectionChange = (datas) => {
        zcclSelectIds.value = datas.map(item => item.id);
    };
    const multiDeleteZccl = () => {
        ElMessageBox.confirm("确认删除选中数据？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            zcclData.value = zcclData.value.filter(item => !zcclSelectIds.value.includes(item.id));
        }).catch(() => {})
    };

    // 项目投资总额全口径
    let tzzeqkjData = reactive([
        {
            xh: "1",
            zb: "项目资本金",
            dw: "万元",
            children: [
                {
                    xh: "1.1",
                    zb: "能建方出资",
                    dw: "万元"
                },
                {
                    xh: "1.2",
                    zb: "外部股东",
                    dw: "万元"
                }
            ]
        },
        {
            xh: "2",
            zb: "贷款",
            dw: "万元",
            children: [
                {
                    xh: "2.1",
                    zb: "其中：并非表项目我方贷款/投保额",
                    dw: "万元"
                }
            ]
        },
        {
            xh: "3",
            zb: "其他出资",
            dw: "万元",
            children: [
                {
                    xh: "3.1",
                    zb: "其中：能建方出资",
                    dw: "万元"
                }
            ]
        },
        {
            xh: "",
            zb: "批复总出资",
            dw: "万元"
        }
    ]);
    
    // 财务评价指标
    let cwpjzbData = reactive([
        {
            name: "项目投资内部收益率",
            unit: "%"
        },
        {
            name: "项目资本金内部收益率",
            unit: "%"
        },
        {
            name: "项目投资回收期（税前）",
            uni: "年"
        }
    ]);

    // 核心边界条件
    let hxbjtjData = reactive([]);
    const addHxbjtj = () => {
        hxbjtjData.push({
            njfhlDw: "%",
            ykphddw: "%"
        });
    }
    const deleteHxbjtj = (index) => {
        hxbjtjData.splice(index, 1);
    }

    // 项目立项信息--立项批复文件
    let lxpfwjData = ref([]);
    const addLxpfFile = (res, file) => {
        lxpfwjData.value.push(res.data);
    }
    const deleteLxpf = (index) => {
        ElMessageBox.confirm("确认删除该项？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            lxpfwjData.value.splice(index, 1);
        }).catch(() => {})
    }
    let lxpfSelectIds = ref([]);
    const lxpfSelectionChange = (datas) => {
        lxpfSelectIds.value = datas.map(item => item.id);
    };
    const multiDeleteLxpf = () => {
        ElMessageBox.confirm("确认删除选中数据？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            lxpfwjData.value = lxpfwjData.value.filter(item => !lxpfSelectIds.value.includes(item.id));
        }).catch(() => {})
    };
    
    // 审批意见
    let spyjTableData = reactive([]);
    const addSpyj = () => {
        spyjTableData.push({});
    }
    const deleteSpyj = (index) => {
        spyjTableData.splice(index, 1);
    }
    let shclData = ref([]);
    const addShclFile = (res, file) => {
        shclData.value.push(res.data);
    }
    const deleteShcl = (index) => {
        ElMessageBox.confirm("确认删除该项？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            shclData.value.splice(index, 1);
        }).catch(() => {})
    }
    let shclSelectIds = ref([]);
    const shclSelectionChange = (datas) => {
        shclSelectIds.value = datas.map(item => item.id);
    };
    const multiDeleteShcl = () => {
        ElMessageBox.confirm("确认删除选中数据？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            shclData.value = shclData.value.filter(item => !shclSelectIds.value.includes(item.id));
        }).catch(() => {})
    };

    // 决策
    // 建设规模（实物量指标）
    let jcSwlzbData = reactive([]);
    const addJcSwlzb = () => {
        jcSwlzbData.push({});
    };
    const deleteJcSwlzb = (index) => {
        jcSwlzbData.splice(index, 1);
    };
    // 风险管理
    let fxglData = reactive([]);
    const addFxgl = () => {
        fxglData.push({});
    };
    const deleteFxgl = (index) => {
        fxglData.splice(index, 1);
    };
    // 里程碑节点
    let lcbjdData = reactive([]);
    const addLcbjd = () => {
        lcbjdData.push({});
    };
    const deleteLcbjd = (index) => {
        lcbjdData.splice(index, 1);
    };
    // 里程碑计划审批表
    let lcbspData = ref([]);
    const addLcbspFile = (res, file) => {
        lcbspData.value.push(res.data);
    }
    const deleteLcbsp = (index) => {
        ElMessageBox.confirm("确认删除该项？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            lcbspData.value.splice(index, 1);
        }).catch(() => {})
    }
    let lcbspSelectIds = ref([]);
    const lcbspSelectionChange = (datas) => {
        lcbspSelectIds.value = datas.map(item => item.id);
    };
    const multiDeleteLcbsp = () => {
        ElMessageBox.confirm("确认删除选中数据？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            lcbspData.value = lcbspData.value.filter(item => !lcbspSelectIds.value.includes(item.id));
        }).catch(() => {})
    };
    // 投评决策资料-可研材料
    let kyclData = ref([]);
    const addKyclFile = (res, file) => {
        kyclData.value.push(res.data);
    }
    const deleteKycl = (index) => {
        ElMessageBox.confirm("确认删除该项？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            kyclData.value.splice(index, 1);
        }).catch(() => {})
    }
    let kyclSelectIds = ref([]);
    const kyclSelectionChange = (datas) => {
        kyclSelectIds.value = datas.map(item => item.id);
    };
    const multiDeleteKycl = () => {
        ElMessageBox.confirm("确认删除选中数据？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            kyclData.value = kyclData.value.filter(item => !kyclSelectIds.value.includes(item.id));
        }).catch(() => {})
    };
    // 投评决策资料-经济指标初步测算资料
    let jjzbcsData = ref([]);
    const addJjzbcsFile = (res, file) => {
        jjzbcsData.value.push(res.data);
    }
    const deleteJjzbcs = (index) => {
        ElMessageBox.confirm("确认删除该项？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            jjzbcsData.value.splice(index, 1);
        }).catch(() => {})
    }
    let jjzbcsSelectIds = ref([]);
    const jjzbcsSelectionChange = (datas) => {
        jjzbcsSelectIds.value = datas.map(item => item.id);
    };
    const multiDeleteJjzbcs = () => {
        ElMessageBox.confirm("确认删除选中数据？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            jjzbcsData.value = jjzbcsData.value.filter(item => !jjzbcsSelectIds.value.includes(item.id));
        }).catch(() => {})
    };
    // 投评决策资料-其他相关支撑材料
    let tpzcclData = ref([]);
    const addTpzcclFile = (res, file) => {
        tpzcclData.value.push(res.data);
    }
    const deleteTpzccl = (index) => {
        ElMessageBox.confirm("确认删除该项？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            tpzcclData.value.splice(index, 1);
        }).catch(() => {})
    }
    let tpzcclSelectIds = ref([]);
    const tpzcclSelectionChange = (datas) => {
        tpzcclSelectIds.value = datas.map(item => item.id);
    };
    const multiDeleteTpzccl = () => {
        ElMessageBox.confirm("确认删除选中数据？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            tpzcclData.value = tpzcclData.value.filter(item => !tpzcclSelectIds.value.includes(item.id));
        }).catch(() => {})
    };
    // 投评决策资料-上会议案
    let shyaData = ref([]);
    const addShyaFile = (res, file) => {
        shyaData.value.push(res.data);
    }
    const deleteShya = (index) => {
        ElMessageBox.confirm("确认删除该项？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            shyaData.value.splice(index, 1);
        }).catch(() => {})
    }
    let shyaSelectIds = ref([]);
    const shyaSelectionChange = (datas) => {
        shyaSelectIds.value = datas.map(item => item.id);
    };
    const multiDeleteShya = () => {
        ElMessageBox.confirm("确认删除选中数据？", "提示",{
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }).then(() => {
            shyaData.value = shyaData.value.filter(item => !shyaSelectIds.value.includes(item.id));
        }).catch(() => {})
    };
    // 决策-项目投资总额全口径
    let jcTzzeqkjData = reactive([
        {
            xh: "一",
            zb: "项目造价构成",
            dw: "",
            children: [
                {
                    xh: "1",
                    zb: "建安设备费",
                    dw: "万元"
                },
                {
                    xh: "2",
                    zb: "其他费用",
                    dw: "万元",
                    children: [
                        {
                            xh: "21",
                            zb: "其中：土地相关费用",
                            dw: "万元"
                        }
                    ]
                },
                {
                    xh: "3",
                    zb: "基本预备费",
                    dw: "万元"
                },
                {
                    xh: "4",
                    zb: "建设期利息",
                    dw: "万元"
                }
            ]
        },
        {
            xh: "二",
            zb: "项目资金构成",
            dw: "",
            children: [
                {
                    xh: "1",
                    zb: "项目资本金",
                    dw: "万元",
                    children: [
                        {
                            xh: "1.1",
                            zb: "能建方出资",
                            dw: "万元"
                        },
                        {
                            xh: "1.2",
                            zb: "外部股东",
                            dw: "万元"
                        }
                    ]
                },
                {
                    xh: "2",
                    zb: "贷款",
                    dw: "万元",
                    children: [
                        {
                            xh: "2.1",
                            zb: "其中：非并表项目我方贷款/担保额",
                            dw: "万元"
                        }
                    ]
                },
                {
                    xh: "3",
                    zb: "其他出资",
                    dw: "万元",
                    children: [
                        {
                            xh: "3.1",
                            zb: "其中：能建方出资",
                            dw: "万元"
                        }
                    ]
                }
            ]
        },
        {
            xh: "",
            zb: "批复总出资",
            dw: "万元"
        }
    ]);
    
    // 财务评价指标
    let jcCwpjzbData = reactive([
        {
            name: "项目投资内部收益率（税前）",
            unit: "%"
        },
        {
            name: "项目资本金内部收益率",
            unit: "%"
        },
        {
            name: "项目投资回收期（税前）",
            unit: "年"
        },
        {
            name: "能建方内部收益率",
            unit: "%"
        },
        {
            name: "净现金流首次回正年份",
            type: "year"
        },
        {
            name: "净利润首次回正年份",
            type: "year"
        },
        {
            name: "可分配利润首次回正年份",
            type: "year"
        }
    ]);

    // 核心边界条件
    let jcHxbjtjData = reactive([]);
    const addJchxbjtj = () => {
        jcHxbjtjData.push({
            njfhlDw: "%",
            ykphddw: "%"
        });
    }
    const deleteJchxbjtj = (index) => {
        jcHxbjtjData.splice(index, 1);
    }
    // 决策主体审核情况
    let jcztshqkData = reactive([]);
    const addJcztshqk = () => {
        jcztshqkData.push({});
    }
    const deleteJcztshqk = (index) => {
        jcztshqkData.splice(index, 1);
    }
    // 投资主体审核情况
    let tzztshqkData = reactive([]);
    const addTzztshqk = () => {
        tzztshqkData.push({});
    }
    const deleteTzztshqk = (index) => {
        tzztshqkData.splice(index, 1);
    }
    // 审批意见
    let jcspyjData = reactive([]);
    const addJcspyj = () => {
        jcspyjData.push({});
    }
    const deleteJcspyj = (index) => {
        jcspyjData.splice(index, 1);
    }

    // 获取资源库数据
    let tzztList = reactive([]); // 投资主体
    let zyList = reactive([]); // 主页/非主业
    let cwbblxList = reactive([]); // 财务报表类型
    let zfspjbList = reactive([]); // 政府审批（核准、备案）级别
    let jnwList = reactive([]); // 境内/外
    let qxgjList = reactive([]); // 区县（境内）/国家（境外）
    let xmqyList = reactive([]); // 项目区域
    let bzList = reactive([]); // 币种
    let tzsxyjflList = ref([]); // 投资属性一级分类
    let tzsxejflList = ref([]); // 投资属性二级分类
    const changeTzsxyjfl = (val) => {
        if (val) {
            let selectData = tzsxyjflList.value.filter(item => item.key === val);
            tzsxejflList.value = selectData[0] && selectData[0].children || [];
        }
    };
    let gmjjhyList = ref([
        {
            value: "1",
            label: "一级1",
            children: [
                {
                    value: "1.1",
                    label: "二级1.1"
                },
                {
                    value: "1.2",
                    label: "二级1.2"
                }
            ]
        },
        {
            value: "2",
            label: "一级2",
            children: [
                {
                    value: "2.1",
                    label: "二级2.1"
                },
                {
                    value: "2.2",
                    label: "二级2.2"
                }
            ]
        }
    ]); //国民经济行业
    let lxzzspyjList = ref([]); // 立项最终审批意见
    const getResourceData = () => {
        proxy.$post({
            url: "/api/resource/listResourceAll",
            data: {
                page: 1,
                pagesize: 1000
            },
            callback: (data) => {
                // 项目基本信息
                zyList = data.zyfzy || [];
                cwbblxList = data.cwbblx || [];
                zfspjbList = data.zfsphzbajb || [];
                // 项目所在地
                jnwList = data.jnw || [];
                qxgjList = data.qxjngjjw || [];
                xmqyList = data.xmqy || [];
                // 计量币种
                bzList = data.bizhong || [];
                // 投资分类
                tzsxyjflList.value = data.tzsxyjfl || [];
                // 项目立项信息
                lxzzspyjList = data.lxzzspyj || [];
            }
        });
    };
    let isPreview = !!route.query.isPreview;
    let projectId = route.query.projectId;
    const getProjectInfo = () => {
        loading.value = true;
        proxy.$post({
            url: "/api/project/getProjectInfo",
            data: {
                id: projectId
            },
            callback: (res) => {
                loading.value = false;
                let data = res.lixiang || {};
                Object.assign(formData, data);
                Object.assign(swlzbData, data.projectJsgms);
                Object.assign(gdxxData, data.projectGdxxs);
                Object.assign(zcclData.value, data.lxzl);
                Object.assign(tzzeqkjData, data.projectXmtzzes);
                Object.assign(cwpjzbData, data.projectCwpjzbs);
                Object.assign(hxbjtjData, data.projectBjtjs);
                Object.assign(lxpfwjData.value, data.lxpfwj);
                Object.assign(spyjTableData, data.projectSpyjs);
                Object.assign(shclData.value, data.xgshcl);
                // 决策
                let jcData = res.juece || res.lixiang || {};
                Object.assign(jcFormData, jcData);
            }
        });
    };
    onMounted(() => {
        projectId && getProjectInfo();
        getResourceData();
    })

    // 返回列表页
    const backClick = () => {
        if (!formData.projectLzType || formData.projectLzType === 1) {
            router.replace("/projectDraft");
        } else if (jcFormData && jcFormData.projectLzType === 7) {
            router.replace("/projectArgument");
        } else if (jcFormData && (jcFormData.projectLzType === 8 || jcFormData.projectLzType === 9)) {
            router.replace("/projectDecision");
        } else if (formData.projectLzType === 3 || formData.projectLzType === 5) {
            router.replace("/projectSetUp");
        }
    }
    // 保存数据
    const saveClick = (type) => {
        if (!formData.projectLzType || formData.projectLzType === 1) {
            let url = formData.id ? type === "submit" ? "startLixiang" : "saveProjectPreLixiang" : "createProject";
            let params = {
                ...formData,
                projectJsgms: swlzbData,
                projectGdxxs: gdxxData,
                lxzl: zcclData.value,
                projectXmtzzes: tzzeqkjData,
                projectCwpjzbs: cwpjzbData,
                projectBjtjs: hxbjtjData,
                lxpfwj: lxpfwjData.value,
                projectSpyjs: spyjTableData,
                xgshcl: shclData.value
            }
            if (type === "submit") {
                params.buttonType = "submit";
            }
            proxy.$post({
                url: "/api/project/" + url,
                data: params,
                callback: (data) => {
                    router.push("/projectDraft");
                }
            })
        } else if (jcFormData.projectLzType === 5 || jcFormData.projectLzType === 7) {
            let url = type === "submit" ? "startJuece" : "saveJuece";
            let params = {
                ...jcFormData,
                projectJsgms: jcSwlzbData,
                projectFxgl: fxglData,
                projectGdxxs: gdxxData,
                projectLcbjds: lcbjdData,
                // lcbjhspb: lcbspData.value,
                kycl: kyclData.value,
                jjzbcbcscl: jjzbcsData.value,
                qtxgzccl: tpzcclData.value,
                shya: shyaData.value,
                projectXmtzzes: jcTzzeqkjData,
                projectCwpjzbs: jcCwpjzbData,
                projectBjtjs: jcHxbjtjData,
                projectJczt: jcztshqkData,
                projectTzzt: tzztshqkData,
                projectSpyj: jcspyjData
            }
            proxy.$post({
                url: "/api/project/" + url,
                data: params,
                callback: (data) => {
                    router.push("/projectArgument");
                }
            })
        }
    };
</script>

<style lang="less">
    .add-project{
        &-container{
            width: 100%;
            height: 100%;
            padding: 20px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            .el-collapse-item__header{
                color: var(--el-color-primary);
            }
        }
        &-header{
            display: flex;
            justify-content: space-between;
        }
        &-content{
            flex: 1;
            height: 0;
            .el-tabs{
                height: 100%;
            }
            .el-tab-pane{
                height: 100%;
                .tab-content{
                    height: 100%;
                    overflow: auto;
                    padding: 0 20px;
                    .col-title{
                        height: 24px;
                        line-height: 24px;
                        font-weight: bold;
                        text-align: center;
                    }
                    .tab-handle{
                        margin: 10px 0;
                        display: flex;
                        justify-content: flex-end;
                    }
                    .el-table{
                        margin-bottom: 10px;
                        thead {
                            color: #000;
                            th{
                                background: #f5f7fa;
                                .cell{
                                    text-align: center;
                                }
                            }
                        }
                    }
                }
            }
            .project-tab-content{
                padding: 0 20px;
                height: 100%;
            }
        }
    }
</style>