<script name="giveScore" setup>
import { ref, onMounted, getCurrentInstance } from 'vue'
import store from '@/store'
import NoData from '@/components/noData/index.vue'
import { changFilesParam, reviewFileParam, fileFormatVerification, handleFileSuccess, handleFileExceed, handleFilePreview, fileTypes, fileDesc, handleFileError } from '@/utils/uploadAction.js'
import {
  draftDetail,
  editSelfAppraisal, saveDraft,
  submitSelfAppraisal,
  templateDetail
} from '@/http/apis/performanceEvaluation/unitSelfEvaluation'
import Accessory from '@/components/accessory/index.vue'

import { useRoute, useRouter } from 'vue-router'
import { proDetail } from '@/http/apis/projectStoreManage/projectStore'
import { submitReAppraisal } from '@/http/apis/performanceEvaluation/projectReview'
import { submitVerify } from '@/http/apis/performanceEvaluation/expertVerification'
import { storeToRefs } from 'pinia'
const uploadUrl = store.dictStore.uploadUrl,
  { statusOptions } = store.dictStore.globalDicts || {},
  route = useRoute(),
  router = useRouter(),
  { proxy } = getCurrentInstance()
const collapseModal = ref(['1', '4']),
  collapseModal1 = ref([]),
  collapseModal2 = ref([]),
  collapseModal3 = ref([]),
  collapseModal4 = ref([]),
  form = ref({
    reAppraisalPass: route.name === 'reviewGiveScore' && route.query.canReAppraisal === 'true' ? true : undefined
  }),
  formRef = ref(),
  rules = {
    isRectify: [{ required: true, message: '请选择' }],
    reAppraisalPass: [{ required: true, message: '请选择' }],
    consultationForm: [{ required: true, message: '请上传' }]
  },
  isTemp = ref(true),
  loading = ref(true),
  projectDetailData = ref({}),
  getProjectDetail = async () => {
    const res = await proDetail(route.query.projectCode)
    projectDetailData.value = res.data
  },
  selfAppraisalTotalScore = ref(),
  reAppraisalTotalScore = ref(),
  verifyTotalScore = ref(),
  getDetail = async () => {
    loading.value = true
    const res1 = await draftDetail({ projectCode: route.query.projectCode, appraisalId: route.query.appraisalId, type: route.name === 'reviewGiveScore' ? 2 : route.name === 'checkGiveScore' ? 3 : 1 })
    if (res1?.data?.templateDetails || res1?.data?.additionalIndexDetails) {
      draftId.value = res1.data.draftId
      isTemp.value = true
      form.value = {
        ...res1.data,
        templateDetails: changeTemplate(res1.data.templateDetails, 1),
        additionalIndexDetails: res1.data.additionalIndexDetails ? changeTemplate(res1.data.additionalIndexDetails, 2) : undefined,
        reAppraisalPass: route.name === 'reviewGiveScore' && route.query.canReAppraisal === 'true' ? true : undefined
      }
      getTotalScore()
      const scoreData = await templateDetail(route.query.projectCode)
      selfAppraisalTotalScore.value = scoreData.data.selfAppraisalTotalScore
      reAppraisalTotalScore.value = scoreData.data.reAppraisalTotalScore
      verifyTotalScore.value = scoreData.data.verifyTotalScore
      loading.value = false
    } else {
      try {
        const res = await templateDetail(route.query.projectCode)
        isTemp.value = true
        form.value = {
          ...res.data,
          templateDetails: changeTemplate(res.data.templateDetails, 1),
          additionalIndexDetails: res.data.additionalIndexDetails ? changeTemplate(res.data.additionalIndexDetails, 2) : undefined,
          reAppraisalPass: route.name === 'reviewGiveScore' && route.query.canReAppraisal === 'true' ? true : undefined
        }
        getTotalScore()
        selfAppraisalTotalScore.value = res.data.selfAppraisalTotalScore
        reAppraisalTotalScore.value = res.data.reAppraisalTotalScore
        verifyTotalScore.value = res.data.verifyTotalScore
        loading.value = false
      } catch (e) {
        isTemp.value = false
        loading.value = false
      }
    }
  },
  userInfo = storeToRefs(store.userStore).userInfo,
  changeTemplate = (data, type) => {
    data.forEach((one, index) => {
      if (type === 1) {
        collapseModal1.value.push(one.templateId)
      } else {
        collapseModal3.value.push(one.templateId)
      }
      one.children.forEach((two, key) => {
        if (type === 1) {
          collapseModal2.value.push(two.templateId)
        } else {
          collapseModal4.value.push(two.templateId)
        }
        two.children.forEach(three => {
          const selfAppraisalScoreInfo1 = three?.selfAppraisalScoreInfo?.find(i => i.appraisalType === 1) || undefined
          three['selfAppraisalScoreInfo1'] = selfAppraisalScoreInfo1 ? { ...selfAppraisalScoreInfo1, appraisalBasisAppendix: selfAppraisalScoreInfo1.appraisalBasisAppendix && (route.name === 'unitSelfGiveScore' || route.name === 'selfGiveScore') ? reviewFileParam(JSON.parse(selfAppraisalScoreInfo1.appraisalBasisAppendix)) : selfAppraisalScoreInfo1.appraisalBasisAppendix && (!['unitSelfGiveScore', 'selfGiveScore'].includes(route.name)) ? selfAppraisalScoreInfo1.appraisalBasisAppendix : undefined } : { appraisalScore: undefined, appraisalBasisAppendix: undefined, appraisalBasis: '' }
          if (three?.reAppraisalScoreInfo && Object.keys(three?.reAppraisalScoreInfo).includes(userInfo.value.realName)) {
            const data = three?.reAppraisalScoreInfo[userInfo.value.realName][0]
            three['selfAppraisalScoreInfo2'] = { ...data, appraisalBasisAppendix: data.appraisalBasisAppendix && reviewFileParam(JSON.parse(data.appraisalBasisAppendix)) || undefined }
          } else {
            three['selfAppraisalScoreInfo2'] = { appraisalScore: undefined, appraisalBasisAppendix: undefined, appraisalBasis: '' }
          }
          if (three?.verifyScoreInfo && Object.keys(three?.verifyScoreInfo).includes(userInfo.value.realName)) {
            const data = three?.verifyScoreInfo[userInfo.value.realName][0]
            three['selfAppraisalScoreInfo3'] = { ...data, appraisalBasisAppendix: data.appraisalBasisAppendix && reviewFileParam(JSON.parse(data.appraisalBasisAppendix)) || undefined }
          } else {
            three['selfAppraisalScoreInfo3'] = { appraisalScore: undefined, appraisalBasisAppendix: undefined, appraisalBasis: '' }
          }
        })
      })
    })
    return data
  },
  submit = async (formEl) => {
    const templateDetailsData = getLastChild(form.value.templateDetails, [])
    const additionalIndexDetailsData = getLastChild(form.value.additionalIndexDetails, [])
    if (!formEl) return
    await formEl.validate(async valid => {
      if (valid) {
        const postData = {
          draftId: draftId.value || undefined,
          groupId: route.query.groupId * 1 || undefined,
          appraisalProjectCode: route.query.projectCode,
          appraisalProjectId: route.query.projectId * 1,
          appraisalId: route.query.appraisalId * 1,
          appraisalInfoList: [...templateDetailsData, ...additionalIndexDetailsData],
          reAppraisalPass: route.name === 'reviewGiveScore' && route.query.canReAppraisal === 'true' ? form.value.reAppraisalPass : undefined,
          consultationForm: route.name === 'reviewGiveScore' && route.query.canReAppraisal === 'true' && form.value.consultationForm?.length && !form.value.reAppraisalPass ? changFilesParam(form.value.consultationForm) : undefined,
          isRectify: route.name === 'checkGiveScore' && route.query.canRectify === 'true' ? form.value.isRectify : undefined,
          rectifyOpinion: route.name === 'checkGiveScore' && route.query.canRectify === 'true' ? form.value.rectifyOpinion : undefined
        }
        const apiFn = (route.name === 'unitSelfGiveScore' || route.name === 'selfGiveScore') && route.query.status === '4' ? editSelfAppraisal : route.name === 'unitSelfGiveScore' || route.name === 'selfGiveScore' ? submitSelfAppraisal : route.name === 'reviewGiveScore' ? submitReAppraisal : submitVerify
        await apiFn(postData)
        proxy.$message.success('提交成功！')
        router.go(-1)
      }
    })
  },
  draftId = ref(),
  save = async () => {
    const templateDetailsData = getLastChild(form.value.templateDetails, [])
    const additionalIndexDetailsData = getLastChild(form.value.additionalIndexDetails, [])
    const postData = {
      groupId: route.query.groupId * 1 || undefined,
      appraisalProjectCode: route.query.projectCode,
      appraisalProjectId: route.query.projectId * 1,
      appraisalId: route.query.appraisalId * 1,
      appraisalInfoList: [...templateDetailsData, ...additionalIndexDetailsData],
      reAppraisalPass: route.name === 'reviewGiveScore' && route.query.canReAppraisal === 'true' ? form.value.reAppraisalPass : undefined,
      consultationForm: route.name === 'reviewGiveScore' && route.query.canReAppraisal === 'true' && form.value.consultationForm?.length && !form.value.reAppraisalPass ? changFilesParam(form.value.consultationForm) : undefined,
      isRectify: route.name === 'checkGiveScore' && route.query.canRectify === 'true' ? form.value.isRectify : undefined,
      rectifyOpinion: route.name === 'checkGiveScore' && route.query.canRectify === 'true' ? form.value.rectifyOpinion : undefined
    }
    const res = await saveDraft(route.name === 'reviewGiveScore' ? 2 : route.name === 'checkGiveScore' ? 3 : 1, postData)
    draftId.value = res.data
    proxy.$message.success('保存成功')
  },
  // 用于回调的函数
  getLastChild = (data, list) => {
    const filedName = route.name === 'unitSelfGiveScore' || route.name === 'selfGiveScore' ? 'selfAppraisalScoreInfo1' : route.name === 'reviewGiveScore' ? 'selfAppraisalScoreInfo2' : 'selfAppraisalScoreInfo3'
    data.forEach((item) => {
      if (item.children && item.children.length > 0) {
        getLastChild(item.children, list)
      } else {
        list.push({
          projectTemplateDetailId: item.templateId,
          score: item[filedName].appraisalScore,
          appraisalBasis: item[filedName].appraisalBasis,
          appraisalBasisAppendix: item[filedName].appraisalBasisAppendix?.length && JSON.stringify(changFilesParam(item[filedName].appraisalBasisAppendix)) || undefined
        // supportFile: filedName === 'unitSelfGiveScore' && item[filedName].supportFile?.length && JSON.stringify(changFilesParam(item[filedName].supportFile)) || undefined
        })
      }
    })
    return list
  },
  getLastScroeChild = (data, list) => {
    const filedName = route.name === 'unitSelfGiveScore' || route.name === 'selfGiveScore' ? 'selfAppraisalScoreInfo1' : route.name === 'reviewGiveScore' ? 'selfAppraisalScoreInfo2' : 'selfAppraisalScoreInfo3'
    data.forEach((item) => {
      if (item.children && item.children.length > 0) {
        getLastScroeChild(item.children, list)
      } else {
        list.push({
          score: item[filedName].appraisalScore
        })
      }
    })
    return list
  },
  nowTotalScore = ref(0),
  getTotalScore = () => {
    const templateDetailsData = getLastScroeChild(form.value.templateDetails, [])
    const additionalIndexDetailsData = getLastScroeChild(form.value.additionalIndexDetails, [])
    nowTotalScore.value = 0
    const total1 = templateDetailsData.reduce((total, cur) => {
      return total + (cur.score || 0)
    }, 0)
    const total2 = additionalIndexDetailsData.reduce((total, cur) => {
      return total + (cur.score || 0)
    }, 0)
    nowTotalScore.value = total1 + total2
  }
onMounted(() => {
  getProjectDetail()
  getDetail()
})
</script>

<template>
  <div class="scoreForm footerPage">
    <el-card class="mb-16">
      <div class="card-header">
        <div class="flex justify-between items-center">
          <div class="flex-1">
            <p class="font-bold">{{ projectDetailData?.projectName }}</p>
            <div class="mt-8 search">
              <el-form label-suffix=":">
                <el-row :gutter="24">
                  <el-col :span="6">
                    <el-form-item label="申报单位">{{ projectDetailData?.buildOrgName }}</el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="项目状态">{{ statusOptions[projectDetailData?.status]?.name||'-' }}</el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="批复金额">{{ projectDetailData?.approvalAmount }}万元</el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="预算年度">{{ projectDetailData?.projectYear }}</el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </div>
          </div>
          <el-button v-if="$route.name==='applicationMarkDetail'" type="primary" icon="Download">下载分析报告</el-button>
        </div>
      </div>
    </el-card>
    <el-card class="mb-16">
      <div class="flex justify-between items-center">
        <div v-if="$route.name==='unitSelfGiveScore'||$route.name==='selfGiveScore'" class="flex">
          <p>自评总分(当前)：<span class="font-bold text-18">{{ nowTotalScore }}</span></p>
        </div>
        <div v-if="$route.name==='reviewGiveScore'" class="flex">
          <p class="mr-16">复评总分(当前)：<span class="font-bold text-18">{{ nowTotalScore }}</span></p>
          <p>自评打分总分：<span class="font-bold text-18">{{ selfAppraisalTotalScore }}</span></p>
        </div>
        <div v-if="$route.name==='checkGiveScore'" class="flex">
          <p class="mr-16">核查总分(当前)：<span class="font-bold text-18">{{ nowTotalScore }}</span></p>
          <p>自评打分总分：<span class="font-bold text-18">{{ selfAppraisalTotalScore }}</span></p>
          <p class="ml-16">复评打分总分：<span class="font-bold text-18">{{ reAppraisalTotalScore?.split(',').join('、') }}</span></p>
        </div>
      </div>
    </el-card>
    <el-form
      v-if="isTemp"
      ref="formRef"
      v-loading="loading"
      :model="form"
      :rules="rules"
      label-suffix=":"
      scroll-to-error
      label-width="160"
    >
      <el-collapse v-model="collapseModal">
        <el-collapse-item name="1" class="mb-16">
          <template #title>
            <div class="collapse-title">评价指标</div>
          </template>
          <el-collapse v-model="collapseModal1" class="customCollapse">
            <el-collapse-item v-for="(one,index) in form.templateDetails" :key="index" :name="one.templateId">
              <template #title>
                <div class="collapse-title">一级指标：{{ one.name }}</div>
              </template>
              <el-collapse v-model="collapseModal2" class="customCollapse">
                <el-collapse-item v-for="(two,key) in one.children" :key="key" :name="two.templateId">
                  <template #title>
                    <div class="collapse-title">二级指标：{{ two.name }}</div>
                  </template>
                  <div v-for="(three,i) in two.children" :key="i" class="pl-16">
                    <el-form-item label="三级指标" style="margin-bottom: 0">
                      <span>{{ three.name }}（{{ three.indexScore }}分）</span>
                    </el-form-item>
                    <el-form-item label="指标细则" style="margin-bottom: 0">
                      <span class="text-info" style="word-break: break-all;">{{ three.indexDetail }}</span>
                    </el-form-item>
                    <el-form-item label="评分细则" style="margin-bottom: 0">
                      <span class="text-info" style="word-break: break-all;">{{ three.gradeDetail }}</span>
                    </el-form-item>
                    <el-form-item label="是否上传佐证材料附件" style="margin-bottom: 0">
                      <span class="text-info" style="word-break: break-all;">{{ three.isUploadSupportFile?'是':'否' }}</span>
                    </el-form-item>
                    <el-form-item v-if="false&&three.isUploadSupportFile" label="佐证材料附件" style="margin-bottom: 0">
                      <p v-for="(file,fileIndex) in three.supportFile&&JSON.parse(three.supportFile)" :key="fileIndex" class="mb-4">
                        <accessory :file-name="file.originalFileName" :file-id="file.id" />
                      </p>
                    </el-form-item>
                    <el-form-item label="佐证材料" style="margin-bottom: 0">
                      <span class="text-info" style="word-break: break-all;">{{ three.supportMaterial }}</span>
                    </el-form-item>
                    <template v-if="$route.name==='unitSelfGiveScore'||$route.name==='selfGiveScore'">
                      <el-row>
                        <el-col :span="24">
                          <el-form-item
                            label="自评得分"
                            :prop="`templateDetails[${index}].children[${key}].children[${i}].selfAppraisalScoreInfo1.appraisalScore`"
                            :rules="{
                              required: true,
                              message: '请输入',
                            }"
                          >
                            <el-input-number
                              v-model="three.selfAppraisalScoreInfo1.appraisalScore"
                              placeholder="请填写"
                              :min="0"
                              :max="three.indexScore"
                              :precision="2"
                              :controls="false"
                              @mousewheel.prevent
                              @blur="getTotalScore"
                            />
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="评价依据" style="margin-bottom:0">
                            <el-input
                              v-model="three.selfAppraisalScoreInfo1.appraisalBasis"
                              placeholder="请填写"
                              maxlength="500"
                              show-word-limit
                              type="textarea"
                            />
                            <el-upload
                              v-if="false"
                              v-model:file-list="form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: fileTypes})"
                              :accept="fileTypes.map(i=>`.${i}`).join(',')"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持{{ fileDesc }}文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item
                            v-if="three.isUploadSupportFile"
                            label="佐证材料附件"
                            :prop="`templateDetails[${index}].children[${key}].children[${i}].selfAppraisalScoreInfo1.appraisalBasisAppendix`"
                            :rules="{
                              required: true,
                              message: '请上传',
                            }"
                          >
                            <el-upload
                              v-model:file-list="form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: ['wps', 'pdf', 'doc', 'docx','zip','rar']})"
                              accept=".wps,.pdf,.doc,.docx,.zip,.rar"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持pdf、word、zip、rar文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                          <el-form-item
                            v-else
                            label="佐证材料附件"
                          >
                            <el-upload
                              v-model:file-list="form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: ['wps', 'pdf', 'doc', 'docx','zip','rar']})"
                              accept=".wps,.pdf,.doc,.docx,.zip,.rar"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持pdf、word、zip、rar文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-else>
                      <el-row :gutter="16" class="w-full">
                        <el-col :span="12">
                          <el-form-item label="自评得分" style="margin-bottom: 0">
                            {{ three.selfAppraisalScoreInfo1.appraisalScore }}分
                          </el-form-item>
                        </el-col>
                        <el-col :span="12">
                          <el-form-item label="自评依据" style="margin-bottom: 0">
                            <div>
                              <p>{{ three.selfAppraisalScoreInfo1.appraisalBasis }}</p>
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="佐证材料附件" style="margin-bottom: 0">
                            <div v-if="three.selfAppraisalScoreInfo1.appraisalBasisAppendix&&JSON.parse(three.selfAppraisalScoreInfo1.appraisalBasisAppendix)?.length">
                              <p v-for="(file,fileIndex) in three.selfAppraisalScoreInfo1.appraisalBasisAppendix&&JSON.parse(three.selfAppraisalScoreInfo1.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">
                                <accessory :file-name="file.originalFileName" :file-id="file.id" />
                              </p>
                            </div>
                            <span v-else>-</span>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-if="$route.name==='reviewGiveScore'&&three.reAppraisalScoreInfo&&Object.keys(three.reAppraisalScoreInfo)?.filter(i=>i!==userInfo.realName)?.length">
                      <el-row>
                        <el-col v-for="(item,infoIndex) in three.reAppraisalScoreInfo&&Object.values(three.reAppraisalScoreInfo)?.length&& Object.values(three.reAppraisalScoreInfo).reduce((arr, cur) => arr.concat((cur), []))?.filter(i=>i.appraisalEmployeeCode!==userInfo.employeeCode)" :key="infoIndex" :span="12">
                          <el-col :span="24">
                            <el-form-item label="复评员" style="margin-bottom: 0">
                              {{ item.appraisalEmployeeName }}
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="复评得分" style="margin-bottom: 0">
                              {{ item.appraisalScore }}分
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="复评依据" style="margin-bottom: 0">
                              <div v-if="item.appraisalBasis||item.appraisalBasisAppendix">
                                <p>{{ item.appraisalBasis }}</p>
                                <p v-for="(file,fileIndex) in item.appraisalBasisAppendix&&JSON.parse(item.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">
                                  <accessory :file-name="file.originalFileName" :file-id="file.id" />
                                </p>
                              </div>
                              <span v-else>-</span>
                            </el-form-item>
                          </el-col>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-else-if="$route.name==='checkGiveScore'">
                      <el-row>
                        <el-col v-for="(item,infoIndex) in three.reAppraisalScoreInfo&&Object.values(three.reAppraisalScoreInfo)?.length&& Object.values(three.reAppraisalScoreInfo).reduce((arr, cur) => arr.concat((cur), []))" :key="infoIndex" :span="12">
                          <el-col :span="24">
                            <el-form-item label="复评员" style="margin-bottom: 0">
                              {{ item.appraisalEmployeeName }}
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="复评得分" style="margin-bottom: 0">
                              {{ item.appraisalScore }}分
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="复评依据" style="margin-bottom: 0">
                              <div v-if="item.appraisalBasis||item.appraisalBasisAppendix">
                                <p>{{ item.appraisalBasis }}</p>
                                <p v-for="(file,fileIndex) in item.appraisalBasisAppendix&&JSON.parse(item.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">
                                  <accessory :file-name="file.originalFileName" :file-id="file.id" />
                                </p>
                              </div>
                              <span v-else>-</span>
                            </el-form-item>
                          </el-col>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-if="$route.name==='reviewGiveScore'">
                      <el-row>
                        <el-col>
                          <el-col :span="24">
                            <el-form-item
                              label="复评得分"
                              :prop="`templateDetails[${index}].children[${key}].children[${i}].selfAppraisalScoreInfo2.appraisalScore`"
                              :rules="{
                                required: true,
                                message: '请输入',
                              }"
                            >
                              <el-input-number
                                v-model="three.selfAppraisalScoreInfo2.appraisalScore"
                                placeholder="请填写"
                                :min="0"
                                :max="three.indexScore"
                                :precision="2"
                                :controls="false"
                                @mousewheel.prevent
                                @blur="getTotalScore"
                              />
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="评价依据">
                              <el-input
                                v-model="three.selfAppraisalScoreInfo2.appraisalBasis"
                                placeholder="请填写"
                                maxlength="500"
                                show-word-limit
                                type="textarea"
                              />
                              <el-upload
                                v-model:file-list="form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo2.appraisalBasisAppendix"
                                class="w-full"
                                :action="uploadUrl"
                                :limit="5"
                                :on-success="res => handleFileSuccess(res, form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo2.appraisalBasisAppendix)"
                                :before-upload="file=>fileFormatVerification(file, {types: fileTypes})"
                                :accept="fileTypes.map(i=>`.${i}`).join(',')"
                                :on-preview="handleFilePreview"
                              >
                                <el-button type="primary" plain size="small">选择文件</el-button>
                                <template #tip>
                                  <div class="el-upload__tip">
                                    支持{{ fileDesc }}文件
                                  </div>
                                </template>
                              </el-upload>
                            </el-form-item>
                          </el-col>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-if="$route.name==='checkGiveScore'&&three.verifyScoreInfo&&Object.keys(three.verifyScoreInfo)?.filter(i=>i!==userInfo.realName)?.length">
                      <el-col v-for="(item,infoIndex) in three.verifyScoreInfo&&Object.values(three.verifyScoreInfo)?.length&& Object.values(three.verifyScoreInfo).reduce((arr, cur) => arr.concat((cur), []))?.filter(i=>i.appraisalEmployeeCode!==userInfo.employeeCode)" :key="infoIndex" :span="12">
                        <el-col :span="24">
                          <el-form-item label="核查员" style="margin-bottom: 0">
                            {{ item.appraisalEmployeeName }}
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="核查得分" style="margin-bottom: 0">
                            {{ item.appraisalScore }}分
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="核查依据" style="margin-bottom: 0">
                            <div v-if="item.appraisalBasis||item.appraisalBasisAppendix">
                              <p>{{ item.appraisalBasis }}</p>
                              <p v-for="(file,fileIndex) in item.appraisalBasisAppendix&&JSON.parse(item.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">
                                <accessory :file-name="file.originalFileName" :file-id="file.id" />
                              </p>
                            </div>
                            <span v-else>-</span>
                          </el-form-item>
                        </el-col>
                      </el-col>
                    </template>
                    <template v-if="$route.name==='checkGiveScore'">
                      <el-row>
                        <el-col :span="24">
                          <el-form-item
                            label="核查得分"
                            :prop="`templateDetails[${index}].children[${key}].children[${i}].selfAppraisalScoreInfo3.appraisalScore`"
                            :rules="{
                              required: true,
                              message: '请输入',
                            }"
                          >
                            <el-input-number
                              v-model="three.selfAppraisalScoreInfo3.appraisalScore"
                              placeholder="请填写"
                              :min="0"
                              :max="three.indexScore"
                              :precision="2"
                              :controls="false"
                              @mousewheel.prevent
                              @blur="getTotalScore"
                            />
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="评价依据">
                            <el-input
                              v-model="three.selfAppraisalScoreInfo3.appraisalBasis"
                              placeholder="请填写"
                              maxlength="500"
                              show-word-limit
                              type="textarea"
                            />
                            <el-upload
                              v-model:file-list="form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo3.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['templateDetails'][index].children[key].children[i].selfAppraisalScoreInfo3.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: fileTypes})"
                              :accept="fileTypes.map(i=>`.${i}`).join(',')"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持{{ fileDesc }}文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </template>
                  </div>
                </el-collapse-item>
              </el-collapse>
            </el-collapse-item>
          </el-collapse>
        </el-collapse-item>
        <el-collapse-item name="4" class="mb-16">
          <template #title>
            <div class="collapse-title">附加阶段</div>
          </template>
          <el-collapse v-if="form.additionalIndexDetails" v-model="collapseModal3" class="customCollapse">
            <el-collapse-item v-for="(one,index) in form.additionalIndexDetails" :key="index" :name="one.templateId">
              <template #title>
                <div class="collapse-title">一级指标：{{ one.name }}</div>
              </template>
              <el-collapse v-model="collapseModal4" class="customCollapse">
                <el-collapse-item v-for="(two,key) in one.children" :key="key" :name="two.templateId">
                  <template #title>
                    <div class="collapse-title">二级指标：{{ two.name }}</div>
                  </template>
                  <div v-for="(three,i) in two.children" :key="i" class="pl-16">
                    <el-form-item label="三级指标" style="margin-bottom: 0">
                      <span>{{ three.name }}（{{ three.indexScore }}分）</span>
                    </el-form-item>
                    <el-form-item label="指标细则" style="margin-bottom: 0">
                      <span class="text-info" style="word-break: break-all;">{{ three.indexDetail }}</span>
                    </el-form-item>
                    <el-form-item label="评分细则" style="margin-bottom: 0">
                      <span class="text-info" style="word-break: break-all;">{{ three.gradeDetail }}</span>
                    </el-form-item>
                    <el-form-item label="是否上传佐证材料附件" style="margin-bottom: 0">
                      <span class="text-info" style="word-break: break-all;">{{ three.isUploadSupportFile?'是':'否' }}</span>
                    </el-form-item>
                    <!--                    <el-form-item v-if="three.isUploadSupportFile&&false" label="佐证材料附件" style="margin-bottom: 0">-->
                    <!--                      <p v-for="(file,fileIndex) in three.supportFile&&JSON.parse(three.supportFile)" :key="fileIndex" class="mb-4">-->
                    <!--                        <accessory :file-name="file.originalFileName" :file-id="file.id" />-->
                    <!--                      </p>-->
                    <!--                    </el-form-item>-->
                    <el-form-item label="佐证材料" style="margin-bottom: 0">
                      <span class="text-info" style="word-break: break-all;">{{ three.supportMaterial }}</span>
                    </el-form-item>
                    <template v-if="$route.name==='unitSelfGiveScore'||$route.name==='selfGiveScore'">
                      <el-row>
                        <el-col :span="24">
                          <el-form-item
                            label="自评得分"
                            :prop="`additionalIndexDetails[${index}].children[${key}].children[${i}].selfAppraisalScoreInfo1.appraisalScore`"
                            :rules="{
                              required: true,
                              message: '请输入',
                            }"
                          >
                            <el-input-number
                              v-model="three.selfAppraisalScoreInfo1.appraisalScore"
                              placeholder="请填写"
                              :min="three.indexScore>0?0:three.indexScore"
                              :max="three.indexScore>=0?three.indexScore:0"
                              :precision="2"
                              :controls="false"
                              @mousewheel.prevent
                              @blur="getTotalScore"
                            />
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="评价依据">
                            <el-input
                              v-model="three.selfAppraisalScoreInfo1.appraisalBasis"
                              placeholder="请填写"
                              maxlength="500"
                              show-word-limit
                              type="textarea"
                            />
                            <el-upload
                              v-if="false"
                              v-model:file-list="form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: fileTypes})"
                              :accept="fileTypes.map(i=>`.${i}`).join(',')"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持{{ fileDesc }}文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item
                            v-if="three.isUploadSupportFile"
                            label="佐证材料附件"
                            :prop="`additionalIndexDetails[${index}].children[${key}].children[${i}].selfAppraisalScoreInfo1.appraisalBasisAppendix`"
                            :rules="{
                              required: true,
                              message: '请上传',
                            }"
                          >
                            <el-upload
                              v-model:file-list="form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: ['wps', 'pdf', 'doc', 'docx','zip','rar']})"
                              accept=".wps,.pdf,.doc,.docx,.zip,.rar"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持pdf、word、zip、rar文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                          <el-form-item
                            v-else
                            label="佐证材料附件"
                          >
                            <el-upload
                              v-model:file-list="form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo1.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: ['wps', 'pdf', 'doc', 'docx','zip','rar']})"
                              accept=".wps,.pdf,.doc,.docx,.zip,.rar"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持pdf、word、zip、rar文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-else>
                      <el-row :gutter="16" class="w-full">
                        <el-col :span="12">
                          <el-form-item label="自评得分" style="margin-bottom: 0">
                            {{ three.selfAppraisalScoreInfo1.appraisalScore||'-' }}分
                          </el-form-item>
                        </el-col>
                        <el-col :span="12">
                          <el-form-item label="自评依据" style="margin-bottom: 0">
                            <div>
                              <p>{{ three.selfAppraisalScoreInfo1.appraisalBasis||'-' }}</p>
                              <!--                              <template v-if="three.selfAppraisalScoreInfo1?.appraisalBasisAppendix">-->
                              <!--                                <p v-for="(file,fileIndex) in three.selfAppraisalScoreInfo1?.appraisalBasisAppendix&&JSON.parse(three.selfAppraisalScoreInfo1.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">-->
                              <!--                                  <accessory :file-name="file.originalFileName" :file-id="file.id" />-->
                              <!--                                </p>-->
                              <!--                              </template>-->
                              <!--                              <span v-else>-</span>-->
                            </div>
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="佐证材料附件" style="margin-bottom: 0">
                            <div v-if="three.selfAppraisalScoreInfo1.appraisalBasisAppendix&&JSON.parse(three.selfAppraisalScoreInfo1.appraisalBasisAppendix)?.length">
                              <p v-for="(file,fileIndex) in three.selfAppraisalScoreInfo1.appraisalBasisAppendix&&JSON.parse(three.selfAppraisalScoreInfo1.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">
                                <accessory :file-name="file.originalFileName" :file-id="file.id" />
                              </p>
                            </div>
                            <span v-else>-</span>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-if="$route.name==='reviewGiveScore'&&three.reAppraisalScoreInfo&&Object.keys(three.reAppraisalScoreInfo)?.filter(i=>i!==userInfo.realName)?.length">
                      <el-row>
                        <el-col v-for="(item,infoIndex) in three.reAppraisalScoreInfo&&Object.values(three.reAppraisalScoreInfo)?.length&& Object.values(three.reAppraisalScoreInfo).reduce((arr, cur) => arr.concat((cur), []))?.filter(i=>i.appraisalEmployeeCode!==userInfo.employeeCode)" :key="infoIndex" :span="12">
                          <el-col :span="24">
                            <el-form-item label="复评员" style="margin-bottom: 0">
                              {{ item.appraisalEmployeeName }}
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="复评得分" style="margin-bottom: 0">
                              {{ item.appraisalScore }}分
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="复评依据" style="margin-bottom: 0">
                              <div v-if="item.appraisalBasis||item.appraisalBasisAppendix">
                                <p>{{ item.appraisalBasis }}</p>
                                <p v-for="(file,fileIndex) in item.appraisalBasisAppendix&&JSON.parse(item.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">
                                  <accessory :file-name="file.originalFileName" :file-id="file.id" />
                                </p>
                              </div>
                              <span v-else>-</span>
                            </el-form-item>
                          </el-col>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-else-if="$route.name==='checkGiveScore'">
                      <el-row>
                        <el-col v-for="(item,infoIndex) in three.reAppraisalScoreInfo&&Object.values(three.reAppraisalScoreInfo)?.length&& Object.values(three.reAppraisalScoreInfo).reduce((arr, cur) => arr.concat((cur), []))" :key="infoIndex" :span="12">
                          <el-col :span="24">
                            <el-form-item label="复评员" style="margin-bottom: 0">
                              {{ item.appraisalEmployeeName }}
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="复评得分" style="margin-bottom: 0">
                              {{ item.appraisalScore }}分
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item label="复评依据" style="margin-bottom: 0">
                              <div v-if="item.appraisalBasis||item.appraisalBasisAppendix">
                                <p>{{ item.appraisalBasis }}</p>
                                <p v-for="(file,fileIndex) in item.appraisalBasisAppendix&&JSON.parse(item.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">
                                  <accessory :file-name="file.originalFileName" :file-id="file.id" />
                                </p>
                              </div>
                              <span v-else>-</span>
                            </el-form-item>
                          </el-col>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-if="$route.name==='reviewGiveScore'">
                      <el-row>
                        <el-col :span="24">
                          <el-form-item
                            label="复评得分"
                            :prop="`additionalIndexDetails[${index}].children[${key}].children[${i}].selfAppraisalScoreInfo2.appraisalScore`"
                            :rules="{
                              required: true,
                              message: '请输入',
                            }"
                          >
                            <el-input-number
                              v-model="three.selfAppraisalScoreInfo2.appraisalScore"
                              placeholder="请填写"
                              :min="three.indexScore>0?0:three.indexScore"
                              :max="three.indexScore>=0?three.indexScore:0"
                              :precision="2"
                              :controls="false"
                              @mousewheel.prevent
                              @blur="getTotalScore"
                            />
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="评价依据">
                            <el-input
                              v-model="three.selfAppraisalScoreInfo2.appraisalBasis"
                              placeholder="请填写"
                              maxlength="500"
                              show-word-limit
                              type="textarea"
                            />
                            <el-upload
                              v-model:file-list="form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo2.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo2.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: fileTypes})"
                              :accept="fileTypes.map(i=>`.${i}`).join(',')"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持{{ fileDesc }}文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </template>
                    <template v-if="$route.name==='checkGiveScore'&&three.verifyScoreInfo&&Object.keys(three.verifyScoreInfo)?.filter(i=>i!==userInfo.realName)?.length">
                      <el-col v-for="(item,infoIndex) in three.verifyScoreInfo&&Object.values(three.verifyScoreInfo)?.length&& Object.values(three.verifyScoreInfo).reduce((arr, cur) => arr.concat((cur), []))?.filter(i=>i.appraisalEmployeeCode!==userInfo.employeeCode)" :key="infoIndex" :span="12">
                        <el-col :span="24">
                          <el-form-item label="核查员" style="margin-bottom: 0">
                            {{ item.appraisalEmployeeName }}
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="核查得分" style="margin-bottom: 0">
                            {{ item.appraisalScore }}分
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="核查依据" style="margin-bottom: 0">
                            <div v-if="item.appraisalBasis||item.appraisalBasisAppendix">
                              <p>{{ item.appraisalBasis }}</p>
                              <p v-for="(file,fileIndex) in item.appraisalBasisAppendix&&JSON.parse(item.appraisalBasisAppendix)" :key="fileIndex" class="mb-4">
                                <accessory :file-name="file.originalFileName" :file-id="file.id" />
                              </p>
                            </div>
                            <span v-else>-</span>
                          </el-form-item>
                        </el-col>
                      </el-col>
                    </template>
                    <template v-if="$route.name==='checkGiveScore'">
                      <el-row>
                        <el-col :span="24">
                          <el-form-item
                            label="核查得分"
                            :prop="`additionalIndexDetails[${index}].children[${key}].children[${i}].selfAppraisalScoreInfo3.appraisalScore`"
                            :rules="{
                              required: true,
                              message: '请输入',
                            }"
                          >
                            <el-input-number
                              v-model="three.selfAppraisalScoreInfo3.appraisalScore"
                              placeholder="请填写"
                              :min="three.indexScore>0?0:three.indexScore"
                              :max="three.indexScore>=0?three.indexScore:0"
                              :precision="2"
                              :controls="false"
                              @mousewheel.prevent
                              @blur="getTotalScore"
                            />
                          </el-form-item>
                        </el-col>
                        <el-col :span="24">
                          <el-form-item label="评价依据">
                            <el-input
                              v-model="three.selfAppraisalScoreInfo3.appraisalBasis"
                              placeholder="请填写"
                              maxlength="500"
                              show-word-limit
                              type="textarea"
                            />
                            <el-upload
                              v-model:file-list="form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo3.appraisalBasisAppendix"
                              class="w-full"
                              :action="uploadUrl"
                              :limit="5"
                              :on-success="res => handleFileSuccess(res, form['additionalIndexDetails'][index].children[key].children[i].selfAppraisalScoreInfo3.appraisalBasisAppendix)"
                              :before-upload="file=>fileFormatVerification(file, {types: fileTypes})"
                              :accept="fileTypes.map(i=>`.${i}`).join(',')"
                              :on-preview="handleFilePreview"
                            >
                              <el-button type="primary" plain size="small">选择文件</el-button>
                              <template #tip>
                                <div class="el-upload__tip">
                                  支持{{ fileDesc }}文件
                                </div>
                              </template>
                            </el-upload>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </template>
                  </div>
                </el-collapse-item>
              </el-collapse>
            </el-collapse-item>
          </el-collapse>
          <no-data v-else />
        </el-collapse-item>
      </el-collapse>
      <el-card v-if="$route.name==='reviewGiveScore'&&$route.query.canReAppraisal==='true'" class="mt-16">
        <template #header>复评结果</template>
        <el-form-item label="是否通过" prop="reAppraisalPass" label-width="140">
          <el-radio-group v-model="form.reAppraisalPass">
            <el-radio :label="true">是</el-radio>
            <el-radio :label="false">否</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item
          v-if="!form.reAppraisalPass"
          label="上传咨询单"
          label-width="140"
          prop="consultationForm"
        >
          <el-upload
            v-model:file-list="form.consultationForm"
            class="w-full"
            :action="uploadUrl"
            :limit="1"
            :on-exceed="handleFileExceed"
            :on-success="res => handleFileSuccess(res, form.consultationForm)"
            :on-error="handleFileError"
            :on-preview="handleFilePreview"
            :before-upload="
              file =>
                fileFormatVerification(file, {
                  types: [
                    'doc',
                    'docx',
                    'wps',
                  ]
                })
            "
            accept=".doc,.docx,.wps"
          >
            <el-button type="primary" class="mr-4">上传附件</el-button>
            <template #tip>
              <div class="el-upload__tip">支持word文件</div>
              <a class="ml-4" href="/丽水市本级政府投资信息化项目绩效评价咨询单.wps" download="丽水市本级政府投资信息化项目绩效评价咨询单.wps">下载模板</a>
            </template>
          </el-upload>
        </el-form-item>
      </el-card>
      <el-card v-if="$route.name==='checkGiveScore'&&$route.query.canRectify==='true'" class="mt-16">
        <template #header>结果</template>
        <el-form-item label="项目是否需要整改" prop="isRectify" label-width="140">
          <el-radio-group v-model="form.isRectify">
            <el-radio :label="true">是</el-radio>
            <el-radio :label="false">否</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="整改意见" label-width="140">
          <el-input
            v-model="form.rectifyOpinion"
            type="textarea"
            :maxlength="2000"
            show-word-limit
            placeholder="请详情填写整改意见，例如1、方案中写明应用将上架浙政钉，但是目前还没完成上架，需要及时完成上架工作，2、..."
          />
        </el-form-item>
      </el-card>
    </el-form>
    <!--   -->
    <el-card v-else>
      <el-result
        icon="error"
        title="该项目匹配不到指标模板，请返回上一页或刷新重试"
      >
        <template #extra>
          <el-button @click="$router.go(-1)">返回列表</el-button>
          <el-button type="primary" @click="$router.go(0)">刷新</el-button>
        </template>
      </el-result>
    </el-card>
    <div class="footer">
      <el-button @click="$router.go(-1)"> 返回 </el-button>
      <el-button type="primary" plain @click="save"> 暂存 </el-button>
      <el-button type="primary" @click="submit(formRef)"> 提交 </el-button>
    </div>
  </div>
</template>

<style lang="less">
.scoreForm{
  font-size: 14px;
  .module-box{
    background: #f5f8fa;
    border-radius: 4px;
    padding: 16px 24px;
    margin-bottom: 16px;
  }
  .customCollapse{
    border: 0;
    .el-collapse-item__header{
      border: 0;
    }
    .el-collapse-item__wrap{
      border: 0;
    }
    .el-collapse-item__content{
      padding: 8px 24px 0;
    }
    .el-collapse-item{
      border-bottom: 1px solid rgba(0,0,0,0.1);
    }
  }
}
</style>
