<template>
  <div class="detailWrapper">
    <section class="section1 public-flex">
      <div class="public-margin-r-20">
        <h4>
          投资项目
          <span class="alreadyStop" v-if="detailInfo.delFlag === '1'"
            >已终止</span
          >
        </h4>
        <p class="projectNameTit">{{ detailInfo.projectName }}</p>
      </div>
    </section>
    <el-divider></el-divider>
    <section>
      <el-divider></el-divider>
      <div class="public-flex-between basicsInfo" v-if="detailInfo.projectState != '1'">
        <div class="public-flex-center-column">
          <div>项目公司名称</div>
          <p style="width: 250px; text-align: center" class="yichu1"
            v-if="
              detailInfo.tProjectCompany &&
              detailInfo.tProjectCompany.companyName
            ">
            {{ detailInfo.tProjectCompany.companyName }}
          </p>
        </div>
        <div class="public-flex-center-column">
          <div>渠道</div>
          <p
            v-if="
              detailInfo.tProjectChannel &&
              detailInfo.tProjectChannel.channelName
            "
          >
            {{ detailInfo.tProjectChannel.channelName }}
          </p>
          <p v-else-if="detailInfo.channel=='1'" >
            直接触达
          </p>
          <p v-else="detailInfo.channel=='2'" >
            内部推荐
          </p>
        </div>
        <div class="public-flex-center-column">
          <div>项目负责人</div>
          <p>{{ detailInfo.investHead }}</p>
        </div>
        <div class="public-flex-center-column" v-if="detailInfo.projectDate">
          <div>立项通过日期</div>
          <p>{{ detailInfo.projectDate }}</p>
        </div>
        <div class="public-flex-center-column" v-if="detailInfo.decisionDate">
          <div>投决通过日期</div>
          <p>{{ detailInfo.decisionDate }}</p>
        </div>
        <div class="public-flex-center-column">
          <div>投前估值（万元）</div>
          <p>{{ detailInfo.investValuation }}</p>
        </div>
        <div class="public-flex-center-column">
          <div>预计投资金额（万元）</div>
          <p>{{ detailInfo.investMoney }}</p>
        </div>
      </div>
    </section>
    <section class="section3">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="立项信息" name="0"></el-tab-pane>
        <el-tab-pane label="项目基本信息" name="1"></el-tab-pane>
      </el-tabs>
      <section>
        <div v-if="activeName === '0'" class="public-padded-20 detail-meeting">
          <el-tabs type="border-card" v-model="activeTab">
            <el-tab-pane label="项目立项申请表" name="apply">
              <el-form
                v-if="formLXApply.id"
                class="special-el-form public-padded-t-20"
                ref="formLXApply"
                :model="formLXApply"
                :rules="rulesLXApply"
                label-width="120px"
              >
                <el-form-item
                  label="项目概况"
                  prop="projectOverview"
                  class="special-el-form-item"
                >
                  <el-input
                    rows="4"
                    type="textarea"
                    maxlength="200"
                    v-model="formLXApply.projectOverview"
                    disabled
                  />
                </el-form-item>
                <el-form-item
                  label="项目亮点"
                  prop="projectSparkle"
                  class="special-el-form-item"
                >
                  <el-input
                    rows="4"
                    type="textarea"
                    maxlength="200"
                    v-model="formLXApply.projectSparkle"
                    disabled
                  />
                </el-form-item>
                <el-form-item label="立项申请报告" prop="listFile" class="special-el-form-item">
                  <fileItem ref="fileItemLXApply" :id="formLXApply.id" :is-detail="true"></fileItem>
                </el-form-item>
                <el-form-item label="项目行研报告" class="special-el-form-item" v-if="formLXApply.taskDefKey=='president'">
                  <fileItem ref="industryFileItem" :id="formLXApply.id" :is-detail="true"></fileItem>
                </el-form-item>
                <el-form-item label="项目技术报告" class="special-el-form-item" v-if="formLXApply.taskDefKey=='president'">
                  <fileItem ref="technicalFileItem" :id="formLXApply.id" :is-detail="true"></fileItem>
                </el-form-item>
                <el-form-item label="其他附件" prop="otherListFile" class="special-el-form-item">
                  <fileItem ref="otherFileItem" :id="formLXApply.id" :is-detail="true"></fileItem>
                </el-form-item>
                <el-form-item label="项目行研报告" prop="industryListFile" class="special-el-form-item" v-if="formLXApply.taskDefKey=='industryResearch'">
                  <fileItem ref="industryFileItem" :id="formLXApply.id" @getFileList="getIndustryFileList"></fileItem>
                </el-form-item>
                <el-form-item label="项目技术报告" prop="technicalListFile" class="special-el-form-item" v-if="formLXApply.taskDefKey=='technicalResearch'">
                  <fileItem ref="technicalFileItem" :id="formLXApply.id" @getFileList="getTechnicalFileList"></fileItem>
                </el-form-item>
              </el-form>
              <div
                v-else
                class="public-flex-center public-padded-20"
                style="color: #909399"
              >
                暂无数据
              </div>
            </el-tab-pane>
<!--            <el-tab-pane :label="formType === 1 ? '项目立项评估评审表' : '项目立项评估评审汇总表'" v-if="formLXApply.taskDefKey!='deptLeader'&&formLXApply.taskDefKey!='meeting'" name="review">
              <el-form
                class="table-form ss_scoreTable"
                ref="scoreForm"
                :model="scoreForm"
                :rules="scoreRules"
                label-width="0px"
              >
                <table v-if="formType === 1" border="1" cellpadding="0" cellspacing="0">
                  <thead>
                  <tr>
                    <th colspan="10" class="bg-blue">项目立项评估评审表</th>
                  </tr>
                  <tr class="specificTr">
                    <th>项目名称</th>
                    <th>
              <textarea
                class="table-textarea"
                v-model="scoreForm.projectName"
                name=""
                disabled
              ></textarea>
                    </th>
                    <th>项目所属公司</th>
                    <th colspan="3">
              <textarea
                class="table-textarea"
                v-model="form1.tProjectPool.company"
                name=""
                disabled
              ></textarea>
                    </th>

                    <th>项目负责人</th>
                    <th>
              <textarea
                class="table-textarea"
                v-model="scoreForm.investCommissioner"
                name=""
                disabled
              ></textarea>
                    </th>
                    <th>打分人</th>
                    <th>
              <textarea
                v-model="user.nickName"
                class="table-textarea"
                name=""
                disabled
              ></textarea>
                    </th>
                  </tr>
                  <tr class="bg-blue">
                    <th>序号</th>
                    <th>评审类别</th>
                    <th>评审事项</th>
                    <th colspan="3">评审指标</th>
                    <th>标准分值（满分50）</th>
                    <th colspan="2">市场部/投资部打分</th>
                    <th>备注【如不适用，需说明情况】</th>
                  </tr>
                  </thead>
                  <tbody class="text-center">
                  <tr>
                    <td rowspan="2">1</td>
                    <td rowspan="2">模式先进</td>
                    <td>产业优势</td>
                    <td colspan="3" class="text-left">
                      满足以下条件之一：市场热点、新经济、强势传统产业
                    </td>
                    <td>
                      阶段性：0-1<br />
                      持久：2-3<br />
                      持久重大：4-5
                    </td>
                    <td colspan="2">
                      <el-form-item prop="industryAdvantage">
                        <el-input
                          :disabled="readonly"
                          v-model="scoreForm.industryAdvantage"
                          name="industryAdvantage"
                          type="text"
                          class="table-input"
                          prop="industryAdvantage"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>5){value=5}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                v-model="scoreForm.industryAdvantageNote"
                name="industryAdvantageNote"
                class="table-textarea"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td>商业模式</td>
                    <td colspan="3" class="text-left">
                      满足以下条件之一：技术/行业/渠道优势明显、模式创新度高、降本增效显著
                    </td>
                    <td>
                      先进：0-3<br />
                      非常先进：4-5<br />
                      超级先进：6-7<br />
                      颠覆性的：8-9
                    </td>
                    <td colspan="2">
                      <el-form-item prop="businessModel">
                        <el-input
                          :disabled="readonly"
                          v-model="scoreForm.businessModel"
                          name="businessModel"
                          type="text"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>9){value=9}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                v-model="scoreForm.businessModelNote"
                name="businessModelNote"
                class="table-textarea"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="4">2</td>
                    <td rowspan="4">团队优秀</td>
                    <td rowspan="4">核心团队优秀</td>
                    <td colspan="3">
                      创业团队专业，产业背景出身，至少十年以上行业经验
                    </td>
                    <td>
                      10年以上产业经验：0-2<br />
                      15年以上产业经验：3-4
                    </td>
                    <td colspan="2">
                      <el-form-item prop="teamExperience">
                        <el-input
                          :disabled="readonly"
                          v-model="scoreForm.teamExperience"
                          name="teamExperience"
                          type="text"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>4){value=4}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.teamExperienceNote"
                name="teamExperienceNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">
                      创始团队背景为行业内专家/教授/名校哈佛大学博士/行业内龙头企业技术团队等
                    </td>
                    <td>
                      硕士博士团队：0-2<br />
                      行业内知名专家、世界名校博士、行业内龙头企业技术团队：3-4
                    </td>
                    <td colspan="2">
                      <el-form-item prop="teamBackground">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.teamBackground"
                          name="teamBackground"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>4){value=4}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.teamBackgroundNote"
                name="teamBackgroundNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">
                      拥有3位以上德才兼备、同心同德的核心团队成员，能够支撑企业快速扩张
                    </td>
                    <td>
                      强：0-2 <br />
                      很强：3-4
                    </td>
                    <td colspan="2">
                      <el-form-item prop="teamHeart">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.teamHeart"
                          name="teamHeart"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>4){value=4}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.teamHeartNote"
                name="teamHeartNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">
                      团队领袖诚信、学习能力意愿强，具有很强的职业精神、职业道德、职业技能
                    </td>
                    <td>
                      合格：0-2<br />
                      优秀：3-5 <br />
                      卓越：6-8
                    </td>
                    <td colspan="2">
                      <el-form-item prop="teamFaith">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.teamFaith"
                          name="teamFaith"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>8){value=8}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.teamFaithNote"
                name="teamFaithNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="5">3</td>
                    <td rowspan="5">企业价值</td>
                    <td rowspan="2">初步产品原型</td>
                    <td colspan="3">
                      具备一定的技术基础和原型，能够证明产品的可行性和创新性，能够为用户真正带来价值。
                    </td>
                    <td>2</td>
                    <td colspan="2">
                      <el-form-item prop="productBase">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.productBase"
                          name="productBase"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>2){value=2}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.productBaseNote"
                name="productBaseNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">具有明确的盈利模式</td>
                    <td>2</td>
                    <td colspan="2">
                      <el-form-item prop="productProfit">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.productProfit"
                          name="productProfit"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>2){value=2}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.productProfitNote"
                name="productProfitNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="2">机构认可</td>
                    <td colspan="3">
                      清科、投中年度排行前一百位的投资机构或上市公司、中国500强知名企业或知名投资人投资。
                    </td>
                    <td>1</td>
                    <td colspan="2">
                      <el-form-item prop="organInvest">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.organInvest"
                          name="organInvest"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>1){value=1}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.organInvestNote"
                name="organInvestNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">
                      公司近期12个月内估值XX万元以上，且与项目公司无关联关系的专业化投资机构（人）的投资超过500万元。
                    </td>
                    <td>1</td>
                    <td colspan="2">
                      <el-form-item prop="organValuation">
                        <el-input
                          :disabled="readonly"
                          v-model="scoreForm.organValuation"
                          type="text"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>1){value=1}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                v-model="scoreForm.organValuationNote"
                class="table-textarea"
                name="organValuationNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td>估值</td>
                    <td colspan="3">估值水平、预期收益合理</td>
                    <td>1</td>
                    <td colspan="2">
                      <el-form-item prop="valuation">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.valuation"
                          name="valuation"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>1){value=1}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.valuationNote"
                name="valuationNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="2">4</td>
                    <td rowspan="2">市场广阔</td>
                    <td>市场空间大</td>
                    <td colspan="3">
                      行业具有高成长性，细分市场年销售规模已经达到或五年内达到50亿元。
                    </td>
                    <td>
                      50-100亿：0.5<br />
                      100-200亿：1<br />
                      200亿以上：2
                    </td>
                    <td colspan="2">
                      <el-form-item prop="marketSpace">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.marketSpace"
                          name="marketSpace"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>2){value=2}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.marketSpaceNote"
                name="marketSpaceNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td>成长空间大</td>
                    <td colspan="3">预计年增长率在30%以上</td>
                    <td>
                      收入年增长率30%以上：1<br />
                      收入年增长率50%以上：2<br />
                      收入年增长率70%以上：3
                    </td>
                    <td colspan="2">
                      <el-form-item prop="developSpace">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.developSpace"
                          name="developSpace"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>3){value=3}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.developSpaceNote"
                name="developSpaceNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td>5</td>
                    <td>股权收益</td>
                    <td>退出方式</td>
                    <td colspan="3">通过并购、股权转让、股权回购等方式退出</td>
                    <td>
                      退出收益5%-15%：1<br />
                      退出收益15%-50%：2<br />
                      退出收益50%-100%：3<br />
                      退出收益1倍以上：4
                    </td>
                    <td colspan="2">
                      <el-form-item prop="quitWay">
                        <el-input
                          :disabled="readonly"
                          type="text"
                          v-model="scoreForm.quitWay"
                          name="quitWay"
                          class="table-input"
                          :min="0"
                          oninput="if(value){value=value.replace(/[^\d.]/g,'').replace(/^(\-)*(\d+)\.(\d).*$/,'$1$2.$3');if(value>4){value=4}}"
                        />
                      </el-form-item>
                    </td>
                    <td>
              <textarea
                :disabled="readonly"
                class="table-textarea"
                v-model="scoreForm.quitWayNote"
                name="quitWayNote"
              ></textarea>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3" class="big-font">同意或不同意说明</td>
                    <td colspan="7" class="big-font">
                      <el-form-item prop="illustrate">
                        <el-input
                          :disabled="readonly"
                          type="textarea"
                          style="width: 95%; margin-top: 20px"
                          class="table-textarea"
                          v-model="scoreForm.illustrate"
                          name="illustrate"
                        />
                      </el-form-item>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="10" class="text-left big-font">
                      评分说明：<br />
                      1.
                      固定指标分值部分，评分人需根据项目实际情况，评分范围仅有0分和满分，满分为各评审指标对应的标准分值。<br />
                      2.
                      浮动指标分值部分，最高分值为各评审指标对应的最高区间分值，最低分值为0分，分值保留小数点后一位数字。
                    </td>
                  </tr>
                  </tbody>
                </table>
                <table
                  v-if="formType === 2"
                  border="1"
                  cellpadding="0"
                  cellspacing="0"
                  class="allScoring"
                >
                  <thead>
                  <tr>
                    <th colspan="10" class="bg-blue">项目立项评估评审汇总表</th>
                  </tr>
                  <tr class="specificTr">
                    <th>项目名称</th>
                    <th>
              <textarea
                class="table-textarea"
                v-model="scoreForm.projectName"
                name=""
                disabled
              ></textarea>
                    </th>
                    <th>项目所属公司</th>
                    <th colspan="3">
              <textarea
                class="table-textarea"
                v-model="form1.tProjectPool.company"
                name=""
                disabled
              ></textarea>
                    </th>

                    <th>项目负责人</th>
                    <th>
              <textarea
                class="table-textarea"
                name=""
                v-model="collectForm.investCommissioner"
                disabled
              ></textarea>
                    </th>
                    <th>总人数</th>
                    <th>
              <textarea
                v-model="collectForm.totalPerson"
                class="table-textarea"
                name=""
                disabled
              ></textarea>
                    </th>
                  </tr>
                  <tr class="bg-blue">
                    <th>序号</th>
                    <th>评审类别</th>
                    <th>评审事项</th>
                    <th colspan="3">评审指标</th>
                    <th>标准分值（满分50）</th>
                    <th colspan="2">汇总分数</th>
                    <th>平均分数</th>
                  </tr>
                  </thead>
                  <tbody class="text-center">
                  <tr>
                    <td rowspan="2">1</td>
                    <td rowspan="2">模式先进</td>
                    <td>产业优势</td>
                    <td colspan="3" class="text-left">
                      满足以下条件之一：市场热点、新经济、强势传统产业
                    </td>
                    <td>
                      阶段性：0-1<br />
                      持久：2-3<br />
                      持久重大：4-5
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        v-model="collectForm.industryAdvantageSum"
                        name="industryAdvantageSum"
                        type="text"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.industryAdvantageAvg"
                        name="industryAdvantageAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td>商业模式</td>
                    <td colspan="3" class="text-left">
                      满足以下条件之一：技术/行业/渠道优势明显、模式创新度高、降本增效显著
                    </td>
                    <td>
                      先进：0-3<br />
                      非常先进：4-5<br />
                      超级先进：6-7<br />
                      颠覆性的：8-9
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.businessModelSum"
                        name="businessModelSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.businessModelAvg"
                        name="businessModelAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="4">2</td>
                    <td rowspan="4">团队优秀</td>
                    <td rowspan="4">核心团队优秀</td>
                    <td colspan="3">
                      创业团队专业，产业背景出身，至少十年以上行业经验
                    </td>
                    <td>
                      10年以上产业经验：0-2<br />
                      15年以上产业经验：3-4
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.teamExperienceSum"
                        name="teamExperienceSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.teamExperienceAvg"
                        name="teamExperienceAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">
                      创始团队背景为行业内专家/教授/名校哈佛大学博士/行业内龙头企业技术团队等
                    </td>
                    <td>
                      硕士博士团队：0-2<br />
                      行业内知名专家、世界名校博士、行业内龙头企业技术团队：3-4
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.teamBackgroundSum"
                        name="teamBackgroundSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.teamBackgroundAvg"
                        name="teamBackgroundAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">
                      拥有3位以上德才兼备、同心同德的核心团队成员，能够支撑企业快速扩张
                    </td>
                    <td>
                      强：0-2 <br />
                      很强：3-4
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.teamHeartSum"
                        name="teamHeartSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.teamHeartAvg"
                        name="teamHeartAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">
                      团队领袖诚信、学习能力意愿强，具有很强的职业精神、职业道德、职业技能
                    </td>
                    <td>
                      合格：0-2<br />
                      优秀：3-5 <br />
                      卓越：6-8
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.teamFaithSum"
                        name="teamFaithSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.teamFaithAvg"
                        name="teamFaithAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="5">3</td>
                    <td rowspan="5">企业价值</td>
                    <td rowspan="2">初步产品原型</td>
                    <td colspan="3">
                      具备一定的技术基础和原型，能够证明产品的可行性和创新性，能够为用户真正带来价值。
                    </td>
                    <td>2</td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.productBaseSum"
                        name="productBaseSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.productBaseAvg"
                        name="productBaseAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">具有明确的盈利模式</td>
                    <td>2</td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.productProfitSum"
                        name="productProfitSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.productProfitAvg"
                        name="productProfitAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="2">机构认可</td>
                    <td colspan="3">
                      清科、投中年度排行前一百位的投资机构或上市公司、中国500强知名企业或知名投资人投资。
                    </td>
                    <td>1</td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.organInvestSum"
                        name="organInvestSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.organInvestAvg"
                        name="organInvestAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td colspan="3">
                      公司近期12个月内估值XX万元以上，且与项目公司无关联关系的专业化投资机构（人）的投资超过500万元。
                    </td>
                    <td>1</td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        v-model="collectForm.organValuationSum"
                        name="organValuationSum"
                        type="text"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        v-model="collectForm.organValuationAvg"
                        name="organValuationAvg"
                        type="text"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td>估值</td>
                    <td colspan="3">估值水平、预期收益合理</td>
                    <td>1</td>
                    <td colspan="2">
                      <input
                        type="text"
                        v-model="collectForm.valuationSum"
                        name="valuationSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.valuationAvg"
                        name="valuationAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="2">4</td>
                    <td rowspan="2">市场广阔</td>
                    <td>市场空间大</td>
                    <td colspan="3">
                      行业具有高成长性，细分市场年销售规模已经达到或五年内达到50亿元。
                    </td>
                    <td>
                      50-100亿：0.5<br />
                      100-200亿：1<br />
                      200亿以上：2
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.marketSpaceSum"
                        name="marketSpaceSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.marketSpaceAvg"
                        name="marketSpaceAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td>成长空间大</td>
                    <td colspan="3">预计年增长率在30%以上</td>
                    <td>
                      收入年增长率30%以上：1<br />
                      收入年增长率50%以上：2<br />
                      收入年增长率70%以上：3
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.developSpaceSum"
                        name="developSpaceSum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.developSpaceAvg"
                        name="developSpaceAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td>5</td>
                    <td>股权收益</td>
                    <td>退出方式</td>
                    <td colspan="3">通过并购、股权转让、股权回购等方式退出</td>
                    <td>
                      退出收益5%-15%：1<br />
                      退出收益15%-50%：2<br />
                      退出收益50%-100%：3<br />
                      退出收益1倍以上：4
                    </td>
                    <td colspan="2">
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.quitWaySum"
                        name="quitWaySum"
                        class="table-input"
                        disabled
                      />
                    </td>
                    <td>
                      <input
                        autocomplete="off"
                        type="text"
                        v-model="collectForm.quitWayAvg"
                        name="quitWayAvg"
                        class="table-input"
                        disabled
                      />
                    </td>
                  </tr>
                  <tr>
                    <td colspan="10" class="text-left big-font">
                      评分说明：<br />
                      1.
                      固定指标分值部分，评分人需根据项目实际情况，评分范围仅有0分和满分，满分为各评审指标对应的标准分值。<br />
                      2.
                      浮动指标分值部分，最高分值为各评审指标对应的最高区间分值，最低分值为0分，分值保留小数点后一位数字。
                    </td>
                  </tr>
                  </tbody>
                </table>

              </el-form>
            </el-tab-pane>-->
          </el-tabs>
          <!-- 会议信息开始         -->
<!--          <section v-if="formLXApply.taskDefKey==='meeting'">-->
<!--            <el-form-->
<!--              v-if="formLXApply.id"-->
<!--              class="special-el-form public-padded-t-20"-->
<!--              ref="formLXApply"-->
<!--              :model="formLXApply"-->
<!--              label-width="120px"-->
<!--            >-->
<!--              <el-form-item-->
<!--                label="立项审批人"-->
<!--                prop="participants"-->
<!--                class="special-el-form-item public-input-height-2"-->
<!--              >-->
<!--                <div-->
<!--                  class="el-input__inner inputSimulation yichu1"-->
<!--                  @click="handleSelectPeople(1)"-->
<!--                  :title="formLXApply.participants"-->
<!--                >-->
<!--                  {{ formLXApply.participants ? formLXApply.participants : "请选择" }}-->
<!--                </div>-->
<!--              </el-form-item>-->
<!--              <el-form-item-->
<!--                label="附件"-->
<!--                prop="listFile"-->
<!--                class="special-el-form-item"-->
<!--              >-->
<!--                <fileItem-->
<!--                  ref="fileItemLXApply"-->
<!--                  :id="formLXApply.id"-->
<!--                  @getFileList="getFileListLXApply"-->
<!--                ></fileItem>-->
<!--              </el-form-item>-->
<!--              &lt;!&ndash; 关键代码：el-form-item 包裹单选组 &ndash;&gt;-->
<!--              <el-form-item label="是否需要立项会议">-->
<!--                <label>-->
<!--                  <input type="radio" name="needMeeting" value="0" v-model="formLXApply.needMeeting">-->
<!--                  否-->
<!--                </label>-->
<!--                <label>-->
<!--                  <input type="radio" name="needMeeting" value="1" v-model="formLXApply.needMeeting">-->
<!--                  是-->
<!--                </label>-->
<!--              </el-form-item>-->
<!--            </el-form>-->
<!--            <h3 v-if="formLXApply.needMeeting === '1'">会议信息</h3>-->
<!--            <el-form-->
<!--              class="special-el-form"-->
<!--              ref="meetingForm"-->
<!--              :model="meetingForm"-->
<!--              :rules="meetingRules"-->
<!--              label-width="120px"-->
<!--              v-if="formLXApply.needMeeting === '1'"-->
<!--            >-->
<!--              <el-form-item-->
<!--                label="项目名称"-->
<!--                prop="projectName"-->
<!--                class="special-el-form-item public-input-height-2"-->
<!--                :rules="[-->
<!--            { required: verifyProjectName, trigger: 'blur', message: '请选择' },-->
<!--          ]"-->
<!--              >-->
<!--                <div-->
<!--                  class="el-input__inner inputSimulation yichu1"-->
<!--                  @click="handleProjectItem"-->
<!--                  :class="{ show_disabled: pageType === '1' }"-->
<!--                  :title="meetingForm.projectName"-->
<!--                >-->
<!--                  {{ meetingForm.projectName ? meetingForm.projectName : "请选择 " }}-->
<!--                </div>-->
<!--                <projectItem-->
<!--                  ref="projectItem"-->
<!--                  @getProjectInfo="getProjectInfo"-->
<!--                ></projectItem>-->
<!--              </el-form-item>-->
<!--              <el-form-item-->
<!--                label="项目阶段"-->
<!--                prop="projectStage"-->
<!--                class="special-el-form-item"-->
<!--              >-->
<!--                <el-select v-model="meetingForm.projectStage" disabled placeholder="">-->
<!--                  <el-option-->
<!--                    v-for="dict in dict.type.project_stage"-->
<!--                    :key="dict.value"-->
<!--                    :label="dict.label"-->
<!--                    :value="dict.value"-->
<!--                  />-->
<!--                </el-select>-->
<!--              </el-form-item>-->
<!--              <el-form-item label="会议主题" prop="meetingTheme">-->
<!--                <el-input-->
<!--                  maxlength="100"-->
<!--                  v-model="meetingForm.meetingTheme"-->
<!--                  placeholder="请输入会议主题"-->
<!--                />-->
<!--              </el-form-item>-->

<!--              &lt;!&ndash; <el-form-item label="会议编号" prop="meetingCode">-->
<!--                <el-input v-model="form.meetingCode" placeholder="请输入会议编号" />-->
<!--              </el-form-item> &ndash;&gt;-->
<!--              <el-form-item label="会议类别" prop="meetingType">-->
<!--                <el-select-->
<!--                  v-model="meetingForm.meetingType"-->
<!--                  placeholder="请选择会议类别"-->
<!--                  :disabled="-->
<!--              meetingTypeDisabled || (pageType === '1' && meetingType != null)-->
<!--            "-->
<!--                >-->
<!--                  <el-option-->
<!--                    v-for="dict in meetingTypeList"-->
<!--                    :key="dict.value"-->
<!--                    :label="dict.label"-->
<!--                    :value="dict.value"-->
<!--                  ></el-option>-->
<!--                </el-select>-->
<!--              </el-form-item>-->

<!--              <el-form-item label="会议开始时间" prop="startTime">-->
<!--                <el-date-picker-->
<!--                  v-model="meetingForm.startTime"-->
<!--                  type="datetime"-->
<!--                  placeholder="请选择会议开始时间"-->
<!--                  format="yyyy-MM-dd HH:mm"-->
<!--                  value-format="yyyy-MM-dd HH:mm"-->
<!--                >-->
<!--                </el-date-picker>-->
<!--              </el-form-item>-->
<!--              <el-form-item label="会议结束时间" prop="endTime">-->
<!--                <el-date-picker-->
<!--                  v-model="meetingForm.endTime"-->
<!--                  format="yyyy-MM-dd HH:mm"-->
<!--                  value-format="yyyy-MM-dd HH:mm"-->
<!--                  type="datetime"-->
<!--                  placeholder="请选择会议结束时间"-->
<!--                >-->
<!--                </el-date-picker>-->
<!--              </el-form-item>-->
<!--              <el-form-item label="会议地点" prop="place">-->
<!--                <el-input-->
<!--                  maxlength="100"-->
<!--                  v-model="meetingForm.place"-->
<!--                  placeholder="请输入会议地点"-->
<!--                />-->
<!--              </el-form-item>-->
<!--              <el-form-item-->
<!--                label="会议发起人"-->
<!--                prop="promoter"-->
<!--                class="public-input-height"-->
<!--              >-->
<!--                <div class="el-input__inner" @click="openSelectDept(1)">-->
<!--                  {{ meetingForm.promoter ? meetingForm.promoter : "请选择会议发起人" }}-->
<!--                </div>-->
<!--                <selecDept-->
<!--                  ref="selecDepts"-->
<!--                  @getDeptUserInfo="getDeptUserInfo"-->
<!--                  :deptId="deptId"-->
<!--                ></selecDept>-->
<!--              </el-form-item>-->
<!--              <el-form-item-->
<!--                label="会议参与人"-->
<!--                prop="participants"-->
<!--                class="special-el-form-item public-input-height-2"-->
<!--              >-->
<!--                <div-->
<!--                  class="el-input__inner inputSimulation yichu1"-->
<!--                  @click="handleSelectPeople(2)"-->
<!--                  :title="meetingForm.participants"-->
<!--                >-->
<!--                  {{ meetingForm.participants ? meetingForm.participants : "请选择会议参与人" }}-->
<!--                </div>-->
<!--              </el-form-item>-->
<!--              <el-form-item label="附件" prop="file" class="special-el-form-item">-->
<!--                <fileItem-->
<!--                  ref="fileItems"-->
<!--                  :id="meetingForm.id"-->
<!--                  @getFileList="getFileList"-->
<!--                ></fileItem>-->
<!--              </el-form-item>-->
<!--            </el-form>-->
<!--          </section>-->

          <!--会议信息结束-->
        </div>
        <div v-show="activeName === '1'">
          <poolForm :type="type" :id="id"></poolForm>
        </div>
      </section>
    </section>

    <section>
      <flowBase :procInstId="formLXApply.procInstId" :id="id" v-if="formLXApply.procInstId "></flowBase>
    </section>
    <section>

      <el-form
        ref="flowBaseInfo"
        :model="flowBaseInfo"
        label-width="120px"
      >
        <el-form-item label="审批意见" prop="comment">
          <el-input
            maxlength="200"
            rows="4"
            type="textarea"
            v-model="flowBaseInfo.comment"
            placeholder="请填写审批意见"
          >
          </el-input>
        </el-form-item>
        <el-form-item class="btnList">
          <!--          <div class="btn-group">-->
          <el-button @click="goBack">返 回</el-button>
          <el-button type="success" class="editButton" @click="handleComplete(true)">同意</el-button>
          <el-button v-if="formLXApply.taskDefKey!='technicalResearch'&&formLXApply.taskDefKey!='industryResearch'&&formLXApply.taskDefKey!='president'" type="warning" @click="handleComplete(false)">驳回</el-button>
          <el-button v-if="formLXApply.taskDefKey!='decision'&&formLXApply.taskDefKey=='president'" type="warning" @click="handleComplete(false)">驳回（修改）</el-button>
          <el-button v-if="formLXApply.taskDefKey=='president'" type="danger" @click="handleComplete(false,1)">驳回（终止）</el-button>
          <el-button v-if="formLXApply.taskDefKey=='president'" type="warning" @click="handleComplete(false,0)">观望</el-button>
          <!--          </div>-->
        </el-form-item>
      </el-form>
    </section>
    <!--选择人员-->
    <selecUser
      ref="flowUser"
      :checkType="checkType"
      :selectValues="selectValues"
      :selectNameValues="selectNameValues"
      @handleUserSelect="handleUserSelect"
    ></selecUser>
  </div>
</template>
<script>
import poolForm from "../../invest/components/poolForm";
import fileItem from "../../invest/components/fileItem";
import flowBase from "../flowBase.vue";
import selecDept from "../../invest/components/selecDept";
import projectItem from "../../invest/components/projectItem";
import selecUser from "../../invest/components/selecUser";

import {
  getPool
} from "@/api/invest/pool";
import{
  approvalComplete,
  getApprovalInfo,
  getMeetingInfo,
  getSumScore
} from "@/api/project/approval/pool"

import { mapGetters } from "vuex";

export default {
  name: "approvalAudit",
  props: {
    readonly: {
      type: Boolean,
    },
  },
  dicts: ["meeting_type", "project_stage", "project_group"],
  components: {
    selecUser,
    projectItem,
    selecDept,
    poolForm,
    fileItem,
    flowBase,
  },
  data() {
    const industryValidateLogo = (rule, value, callback) => {
      //debugger
      if (this.fileListIndustry.length <= 0) {
        callback(new Error("请上传项目行研报告"));
      } else {
        callback();
      }
    };
    const technicalValidateLogo = (rule, value, callback) => {
      if (this.fileListTechnical.length <= 0) {
        callback(new Error("请上传项目技术报告"));
      } else {
        callback();
      }
    };
    return {
      meetingId: "0",
      type: "2",
      id: "",
      active: 0,
      detailInfo: {
        projectName: "",
      },
      activeName: "0",
      activeTab: 'apply', // 默认激活“项目立项申请表”
      formType:1,
      // 人员选择器
      checkType: "multiple",
      // 数据回显
      selectValues: null,
      selectNameValues: null,
      formLXApply: {
        id: null,
        procInstId:null,
        projectPoolId: null,
        projectName: null,
        projectOverview: null,
        projectSparkle: null,
        listFile: null,
        participants: null,
        participantsId: null,
        taskDefKey:null,
        needMeeting:'0',
        industryListFile: null,
        technicalListFile:null
      },
      fileListIndustry: [],
      fileListTechnical: [],
      rulesLXApply: {
        industryListFile: [{ required: true, validator: industryValidateLogo }],
        technicalListFile: [{ required: true, validator: technicalValidateLogo }],
      },
      // 会议表单参数-开始
      meetingForm: {
        id: null,
        meetingTheme: null,
        meetingCode: null,
        meetingType: null,
        projectPoolId: null,
        projectName: null,
        projectStage: null,
        projectGroup: "",
        startTime: null,
        endTime: null,
        place: null,
        promoter: null,
        promoterId: null,
        participants: null,
        participantsId: null,
        delFlag: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        listFile:null
      },
      //fileList:[],
      // 表单校验
      meetingRules: {
        meetingTheme: [{ required: true, trigger: "blur", message: "请输入" }],
        meetingType: [{ required: true, trigger: "change", message: "请选择" }],
        // projectGroup: [{ required: true, trigger: "change", message: "请选择" }],
        // projectName: [{ required: true, trigger: "blur", message: "请选择" }],
        startTime: [{ required: true, trigger: "change", message: "请选择" }],
        endTime: [{ required: true, trigger: "blur", message: "请选择" }],
        place: [{ required: true, trigger: "blur", message: "请输入" }],
        promoter: [{ required: true, trigger: "blur", message: "请选择" }],
        participants: [{ required: true, trigger: "blur", message: "请选择" }],
      },
      verifyProjectName: false,
      pageType: null,
      showAllType: false,
      meetingTypeDisabled: false, //会议类别
      meetingTypeList: [
        {
          value: "A",
          label: "管理会议",
        },
        {
          value: "LX",
          label: "项目立项会",
        },
        {
          value: "TJ",
          label: "项目投决会",
        },
        {
          value: "X",
          label: "临时会议",
        },
      ],
      deptId: process.env.VUE_APP_DEPTID,
      openLXApply:false,//立项审批人
      openHYApply:false,//会议参与人  这两个字段是判断是那个字段打开人员选择弹窗
      // 会议表单参数-结束
      //打分
      // 打分表单参数
      scoreForm: {
        businessModel: null,
        businessModelNote: null,
        createBy: null,
        createTime: null,
        delFlag: null,
        developSpace: null,
        developSpaceNote: null,
        examine: null,
        id: null,
        illustrate: null, //说明
        industryAdvantage: null,
        industryAdvantageNote: null,
        investCommissioner: null, //项目负责人
        marketSpace: null, //市场空间
        marketSpaceNote: null,
        meetingId: null, //
        organInvest: null,
        organInvestNote: null,
        organValuation: null,
        organValuationNote: null,
        params: {},
        productBase: null,
        productBaseNote: null,
        productProfit: null,
        productProfitNote: null,
        projectPoolId: null,
        quitWay: null,
        quitWayNote: null,
        remark: null,
        scoringPerson: null, //打分人
        teamBackground: null,
        teamBackgroundNote: null,
        teamExperience: null,
        teamExperienceNote: null,
        teamFaith: null,
        teamFaithNote: null,
        teamHeart: null,
        teamHeartNote: null,
        type: null,
        updateBy: null,
        updateTime: null,
        valuation: null,
        valuationNote: null,
      },
      // 会议详情表单
      form1: {
        meetingTheme: null,
        meetingCode: null,
        meetingType: null,
        projectPoolId: null,
        projectName: null,
        projectStage: null,
        projectGroup: "",
        startTime: null,
        endTime: null,
        place: null,
        promoter: null,
        promoterId: null,
        participants: null,
        participantsId: null,
        tProjectPool: {
          company: null,
          projectName: null,
          projectStage: null,
        },
      },
      // 汇总分数表单
      collectForm: {
        businessModelAvg: null,
        businessModelSum: null,
        developSpaceAvg: null,
        developSpaceSum: null,
        industryAdvantageAvg: null,
        industryAdvantageSum: null,
        investCommissioner: null,
        marketSpaceAvg: null,
        marketSpaceSum: null,
        meetingId: null,
        organInvestAvg: null,
        organInvestSum: null,
        organValuationAvg: null,
        organValuationSum: null,
        productBaseAvg: null,
        productBaseSum: null,
        productProfitAvg: null,
        productProfitSum: null,
        projectPoolId: null,
        quitWayAvg: null,
        quitWaySum: null,
        scoringPerson: null,
        teamBackgroundAvg: null,
        teamBackgroundSum: null,
        teamExperienceAvg: null,
        teamExperienceSum: null,
        teamFaithAvg: null,
        teamFaithSum: null,
        teamHeartAvg: null,
        teamHeartSum: null,
        valuationAvg: null,
        valuationSum: null,
      },
      scoreRules: {
        industryAdvantage: [
          { required: true, trigger: "blur", message: "请打分" },
        ],
        businessModel: [{ required: true, trigger: "blur", message: "请打分" }],
        teamExperience: [
          { required: true, trigger: "blur", message: "请打分" },
        ],
        teamBackground: [
          { required: true, trigger: "blur", message: "请打分" },
        ],
        teamHeart: [{ required: true, trigger: "blur", message: "请打分" }],
        teamFaith: [{ required: true, trigger: "blur", message: "请打分" }],
        productBase: [{ required: true, trigger: "blur", message: "请打分" }],
        productProfit: [{ required: true, trigger: "blur", message: "请打分" }],
        organValuation: [
          { required: true, trigger: "blur", message: "请打分" },
        ],
        organInvest: [{ required: true, trigger: "blur", message: "请打分" }],
        valuation: [{ required: true, trigger: "blur", message: "请打分" }],
        marketSpace: [{ required: true, trigger: "blur", message: "请打分" }],
        developSpace: [{ required: true, trigger: "blur", message: "请打分" }],
        quitWay: [{ required: true, trigger: "blur", message: "请打分" }],
        // illustrate: [{ required: true, trigger: "blur", message: "请输入" }],
      },
      //打分-结束
      flowBaseInfo:{
        comment:null,
        taskId:null
      },
      rulesFlow:{
        comment: [{ required: true, trigger: "blur", message: "请输入" }],
      }
    };
  },
  computed: {
    ...mapGetters(["user"]),
  },
  created() {
    this.id = this.$route.query.id;
    this.flowBaseInfo.taskId=this.$route.query.taskId;
    this.getlistProjectPoolIdNewApproval();
    this.getDetail();
    if (this.$route.query.activeName) {
      this.activeName = this.$route.query.activeName;
    }
    this.openMeetingPage(this.id,'LX');
  },
  methods: {
    handleClick(tab, event) {
      let that = this;
      if (this.activeName === "0") {
        // 项目立项
        //this.getMettingId("LX");
        this.getlistProjectPoolIdNewApproval();
      } else if (this.activeName === "1") {
        // 项目报备
        this.getDetail();
      }
    },
    // 获取立项申请
    getlistProjectPoolIdNewApproval() {
      let that = this;
      getApprovalInfo(this.$route.query.pInstId).then((response) => {
        if (response && response.data) {
          that.formLXApply = response.data;
          // 接口返回值存在（非 undefined/null）则用接口值，否则用 '0'
          that.formLXApply.needMeeting = response.data.needMeeting || '0';
          if(response.data.taskDefKey==='decision'){
            //会议投决节点
            this.getMeeting();
            this.formType=1;
          }else if(response.data.taskDefKey==='president'||response.data.taskDefKey === "file"){
            //总裁室
            this.getMeeting();
            this.getSelectMeetingId();
            this.formType=2;
          }
          setTimeout(() => {
            //立项申请报告
            this.$refs.fileItemLXApply.handleButton();
            this.$refs.fileItemLXApply.fileList = [];
            this.$refs.fileItemLXApply.getListFileBusinessId(that.formLXApply.id,"10");
            //项目行研报告
            if(response.data.taskDefKey==='president') {
              this.$refs.industryFileItem.handleButton();
              this.$refs.technicalFileItem.handleButton();
            }
            this.$refs.industryFileItem.fileList = [];
            this.$refs.industryFileItem.getListFileBusinessId(that.formLXApply.id, "12");
            //项目技术报告
            this.$refs.technicalFileItem.fileList = [];
            this.$refs.technicalFileItem.getListFileBusinessId(that.formLXApply.id, "13");
            //其他附件
            this.$refs.otherFileItem.handleButton();
            this.$refs.otherFileItem.fileList = [];
            this.$refs.otherFileItem.getListFileBusinessId(that.formLXApply.id, "0");
          }, 300);
        }
      });
    },
    //项目报备
    getDetail() {
      getPool(this.id).then((response) => {
        this.detailInfo = response.data;
        // 项目退出完成n
        if (response.data.projectState === "n") {
          this.active = parseInt(response.data.projectStage);
        } else {
          this.active = parseInt(response.data.projectStage) - 1;
        }
      });
    },
    //会议详情
    openMeetingPage(projectId, meetingType) {
      let that = this;
      //this.fileList = [];
      this.showAllType = this.type === "3";
      this.meetingTypeDisabled = false;
      this.selectValues = null;
      this.selectNameValues = null;
      //this.reset();
      this.meetingForm.promoter = this.user.nickName;
      this.meetingForm.promoterId = this.user.userId;
      if (meetingType) {
        this.meetingType = meetingType;
        this.meetingTypeDisabled = true;
      }
      if (projectId && typeof projectId === "string") {
        this.pageType = "1";
      }
      // 直接绑定好项目
      if (this.pageType === "1") {
        let projectItemMessage = this.$store.getters.projectItemMessage;
        this.meetingForm.projectPoolId = projectItemMessage.id;
        this.meetingForm.projectName = projectItemMessage.projectName;
        this.meetingForm.projectStage = projectItemMessage.projectStage;
        this.meetingForm.projectGroup = projectItemMessage.projectGroup;
        this.meetingForm.meetingType = this.meetingType;
      }
      //this.$refs.fileItems.fileList = [];
      //如果已经有会议信息的进行回显
      /*if(this.meetingForm.id!=null) {*/
        getMeetingInfo(this.$route.query.pInstId).then((response) => {
          if(response.data) {
            this.meetingForm = response.data;
            this.meetingForm.projectName = response.data.tProjectPool.projectName;
            this.meetingForm.projectStage = response.data.tProjectPool.projectStage;
            this.meetingForm.projectGroup = response.data.tProjectPool.projectGroup;
            //this.openDetail = true;
            this.selectValues = response.data.participantsId;
            this.selectNameValues = response.data.participants;
           /* setTimeout(() => {
              this.$refs.fileItems.fileList = [];
              this.$refs.fileItems.getListFileBusinessId(response.data.id);
              //this.$refs.fileItems.handleButton();
            }, 300);*/
          }
        });
     /* }*/
    },
    //会议投决
    getMeeting(){
      getMeetingInfo(this.$route.query.pInstId).then((response) => {
        this.form1 = response.data;
        this.form1.projectPoolId = response.data.projectPoolId;
        this.form1.projectName = response.data.tProjectPool.projectName;
        this.form1.projectStage = response.data.tProjectPool.projectStage;

        this.scoreForm.projectPoolId = response.data.projectPoolId;
        this.scoreForm.projectName = response.data.tProjectPool.projectName;
        // 打分人
        this.scoreForm.scoringPerson = this.user.userId;
        //  项目负责人
        this.scoreForm.investCommissioner = response.data.tProjectPool.investHead;
        this.collectForm.investCommissioner =
          response.data.tProjectPool.investHead;
        this.scoreForm.meetingId = response.data.id;
        /*setTimeout(() => {
          this.$refs.fileItems.fileList = [];
          this.$refs.fileItems.getListFileBusinessId();
          this.$refs.fileItems.handleButton();
        }, 300);*/
      });
    },
    //总裁室
    // 根据会议ID查询汇总分数和平均分数
    getSelectMeetingId() {
      getSumScore(this.$route.query.pInstId).then((response) => {
        this.collectForm = response.data;
        this.collectForm.investCommissioner = this.scoreForm.investCommissioner;
      });
    },
    //显示用户信息
    handleSelectPeople(number) {
      // this.userVisible = true;
      if(number===1){
        this.openLXApply=true;
        this.openHYApply=false;
      }else if(number===2){
        this.openLXApply=false;
        this.openHYApply=true;
      }
      this.$refs.flowUser.handleUserVisible(true);
    },
    // 用户选中数据
    handleUserSelect(selection) {
      const that = this;
      if (selection && selection[0]) {
        let form;
        if(this.openLXApply) {
          form = this.formLXApply;
        } else if (this.openHYApply) {
          form = this.meetingForm;
        }
        if (selection instanceof Array) {
          const userIds = selection.map((item) => item.userId);
          const nickName = selection.map((item) => item.nickName);
          form.participants = nickName.join(",");
          form.participantsId = userIds.join(",");
          this.selectNameValues = nickName.join(",");
          this.selectValues = userIds.join(",");
        } else {
          form.participants = selection.nickName;
          form.participantsId = selection.userId;
          this.selectNameValues = selection.nickName;
          this.selectValues = selection.userId;
        }
        // this.$refs.meetingForm.clearValidate(["participants"]);
        // this.$refs.formLXApply.clearValidate(["participants"]);
      }
    },
    // 获取公司信息
    getProjectInfo(info) {
      if (info.length > 0) {
        //console.log("info=", info);
        this.form.projectPoolId = info[0].id;
        this.form.projectName = info[0].projectName;
        this.form.projectStage = info[0].projectStage;
        this.form.projectState = info[0].projectState;
        if (info[0].tProjectChannel && info[0].tProjectChannel.channelGroup) {
          this.form.projectGroup = info[0].tProjectChannel.channelGroup;
        } else {
          this.form.projectGroup = "";
        }
        this.$refs.form.clearValidate(["projectName"]);
      }
    },
    //展示人员
    handleProjectItem() {
      this.$refs.projectItem.showProjectItem = true;
    },
    getDeptUserInfo(info) {
      if (info.length > 0) {
        this.meetingForm.promoter = info[0].nickName;
        this.meetingForm.promoterId = info[0].userId.toString();
        this.$refs.meetingForm.clearValidate(["promoter"]);
      }
    },
    // flag 区分同意（true）和驳回（false）
    // isTerminate , 区分是否:终止（1）和观望（0）
    /** 加载审批任务弹框 */
    handleComplete(flag,isTerminate) {
      this.taskComplete(flag,isTerminate);
    },
    /** 用户审批任务 */
    taskComplete(flag,isTerminate) {
      let allValid = true;
      if(this.formLXApply.taskDefKey==="meeting") {//发起会议节点
        this.formLXApply.listFile = this.fileListLXApply;
        this.meetingForm.listFile = this.fileList;
        /*if (!this.formLXApply.participants) {
          this.$modal.msgError("请选择立项审批人!");
          return;
        }
        if (this.formLXApply.needMeeting==='1') {
          this.$refs["meetingForm"].validate((valid) => {
            if (!valid) {
              allValid = false;
              return;
            }
          })
        }*/
      }else if(this.formLXApply.taskDefKey==="decision"){//会议投决
        /*this.$refs["scoreForm"].validate((valid) => {
          if (!valid) {
            allValid = false;
            // 4. 评审表校验失败：切换标签 + 提示
            this.activeTab = 'review'; // 切换到评审表标签
            this.$message.error('项目立项评估评审表未填写完整，请检查！');
            return;
          }
        })*/
      }else if(this.formLXApply.taskDefKey==="industryResearch"){//项目行研
        this.formLXApply.listFile = this.fileListIndustry;
        this.$refs["formLXApply"].validate((valid) => {
          if (!valid) {
            allValid = false;
            return;
          }
        })
      }else if(this.formLXApply.taskDefKey==="technicalResearch"){//项目技术
        this.formLXApply.listFile = this.fileListTechnical;
        this.$refs["formLXApply"].validate((valid) => {
          if (!valid) {
            allValid = false;
            return;
          }
        })
      }
      if (!flag&&!this.flowBaseInfo.comment) {
        this.$modal.msgError("请输入审批意见!");
        return;
      }
      //会议人
      this.formLXApply.flag=flag;
      this.formLXApply.isTerminate=isTerminate;
      const params={
        projectApproval: this.formLXApply,  // 拆分明确字段
        projectMeeting: this.meetingForm,
        projectScoring: this.scoreForm,
        flowBaseInfo: this.flowBaseInfo
      }
      if(allValid) {
        try{
          approvalComplete(params).then(response => {
            this.$modal.msgSuccess(response.msg);
            this.$store.dispatch("getMyTaskApprovalNumber"); //更新代办数量
            this.goMyTask();
          });
        } catch (err) {
          // 捕获重复提交错误
          this.$message.error(err.message);
        }
      }
    },
    /*返回*/
    goBack() {
      this.$router.go(-1);
    },
    //跳转到我的任务
    goMyTask(){
      //this.$router.push({ path: "/myTask/project/approval/myTask"});
      // 关闭当前标签页并返回指定页面
      const obj = { path: "/myTask/project/approval/myTask", query: { t: Date.now()} };
      this.$tab.closeOpenPage(obj);
    },
    // 立项申请附件回显
    getFileListLXApply(fileList) {
      this.fileListLXApply = fileList;
      if (fileList && fileList.length > 0) {
        this.$refs.formLXApply.clearValidate(["listFile"]);
      } else {
        this.fileListLXApply = [];
      }
    },
    // 会议申请附件回显
    getFileList(fileList) {
      if (fileList && fileList.length > 0) {
        this.fileList = fileList;
      } else {
        this.fileList = [];
      }
    },
    //
    getIndustryFileList(fileList) {
      if (fileList && fileList.length > 0) {
        this.fileListIndustry = fileList;
        this.$refs.formLXApply.clearValidate(["industryListFile"]);
      } else {
        this.fileListIndustry = [];
      }
    },
    getTechnicalFileList(fileList) {
      if (fileList && fileList.length > 0) {
        this.fileListTechnical = fileList;
        this.$refs.formLXApply.clearValidate(["technicalListFile"]);
      } else {
        this.fileListTechnical = [];
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.detailWrapper {
  padding: 20px 0;
  width: 92%;
  margin: 0 auto;
  .section1 {
    p {
      font-size: 24px;
      font-weight: bold;
      margin: 0;
    }
    > div:first-child {
      // width: calc(100% - 700px);
      width: 100%;
    }
    .btnList {
      width: 700px;
      display: flex;
      justify-content: flex-end;
    }
  }
  .basicsInfo {
    font-size: 14px;
    background: #f1f1f1;
    margin-top: -24px;
    width: 100%;
    padding: 30px 20px 10px;
    div {
      color: #7e7d7d;
    }
    p {
      font-size: 16px;
      color: #333;
      font-weight: bold;
    }
  }
  .section3 {
    margin-top: 40px;
  }
  .btnList {
    display: flex;
    justify-content: flex-end;
    /* 让内部元素（按钮）整体靠右 */
    gap: 10px; /* 替代 margin，给按钮之间加间距，可选 */
  }
}
.projectNameTit {
}
.alreadyStop {
  font-weight: normal;
  font-size: 12px;
  background: #ff0000;
  color: #fff;
  border-radius: 5px;
  padding: 5px 10px;
  margin-left: 10px;
}
/*表格样式开始*/
.ss_scoreTable {
  padding-bottom: 50px;
  ::v-deep .el-input.is-disabled .el-input__inner {
    background-color: #fff !important;
    color: #606266;
  }
  ::v-deep .el-input__inner {
    border: 1px solid transparent;
    text-align: center;
  }
  ::v-deep.el-textarea__inner {
    border: none;
    height: 50px;
    resize: none;
  }
  ::v-deep .el-textarea.is-disabled .el-textarea__inner {
    background-color: #fff !important;
  }
  textarea:disabled,
  input:disabled {
    background-color: #fff !important;
  }
  // ::v-deep .el-textarea__inner {
  //   // border: 1px solid transparent!important;
  // }
  table {
    // width:80%;
    // width: 600px;
    margin: 0 30px;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -khtml-user-selece: none;
    /*上面都是兼容性问题，具体看浏览器版本或什么浏览器*/
    user-select: none; /*内容禁止选中*/
  }
  tbody td {
    font-size: 14px;
  }
  thead th,
  .big-font {
    font-size: 16px !important;
    font-weight: bold;
  }
  .public-pedded-0 {
    padding: 0;
  }
  .text-center {
    text-align: center;
  }
  .text-left {
    text-align: left;
  }
  .table-textarea {
    width: 100%;
    // width: 180px;
    border: none;
    height: 50px;
    resize: none;
  }
  .table-input {
    width: 100%;
    // width: 100%;
    // height: 80px;
    border: none;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
  }
  .bg-blue,
  .specificTr > th:nth-child(2n-1) {
    background-color: #9bc2e6;
  }
  .specificTr > th:nth-child(2n-1) {
    white-space: nowrap;
    padding: 0 15px;
  }
  .specificTr .table-textarea {
    padding-top: 16px;
    background-color: #fff;
  }
  tr > th {
    height: 50px;
  }
  input:disabled {
    // background-color: #fff !important;
  }
  .btnList {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 40px;
    margin-top: 30px;
  }
}
</style>
