<template>
  <div>
    <table class="tab-content" style="width: 100%">
      <tr>
        <th>序号</th>
        <th>内容</th>
        <th>指标</th>
        <th>评分内容</th>
        <th>指标值</th>
        <th>分值</th>
        <th>评估评审标准</th>
        <th>打分</th>
      </tr>
      <tr v-for="(item,index) in fromList" :key="'tr1'+index">
        <td :rowspan="item.row1" v-if="item.row1>0">{{item.showIndex}}</td>
        <td :rowspan="item.row1" v-if="item.row1>0">{{ item.title1 }}</td>
        <td :rowspan="item.row2" v-if="item.row2>0">{{ item.title2  }}</td>
        <td :rowspan="item.row3" v-if="item.row3>0">{{ item.title3  }}</td>
        <td style="text-align: center;">{{ item.title }}</td>
        <td style="text-align: center;">{{ item.score }}</td>
        <td>{{ item.meaning }}</td>
        <td style="text-align: center;" :rowspan="item.row3" v-if="item.row3>0">
          <span v-if="item.order==1">{{ value.score1 }}</span>
          <span v-if="item.order==2">{{ value.score2 }}</span>
          <span v-if="item.order==3">{{ value.score3 }}</span>
          <span v-if="item.order==4">{{ value.score4 }}</span>
          <span v-if="item.order==5">{{ value.score5 }}</span>
          <span v-if="item.order==6">{{ value.score6 }}</span>
          <span v-if="item.order==7">{{ value.score7 }}</span>
          <span v-if="item.order==8">{{ value.score8 }}</span>
          <span v-if="item.order==9">{{ value.score9 }}</span>
          <span v-if="item.order==10">{{ value.score10 }}</span>
          <span v-if="item.order==11">{{ value.score11 }}</span>
          <span v-if="item.order==12">{{ value.score12 }}</span>
          <span v-if="item.order==13">{{ value.score13 }}</span>
          <span v-if="item.order==14">{{ value.score14 }}</span>
          <span v-if="item.order==15">{{ value.score15 }}</span>
          <span v-if="item.order==16">{{ value.score16}}</span>
          <span v-if="item.order==17">{{ value.score17 }}</span>
          <span v-if="item.order==18">{{ value.score18 }}</span>
          <span v-if="item.order==19">{{ value.score19 }}</span>
        </td>
      </tr>
      <tr>
        <td>5</td>
        <td>附加项</td>
        <td>审计或科技计划项目检验情况</td>
        <td>申报单位所承担科技计划项目在接受审计中期评估、“双随机一公开”等工作中的情况。</td>
        <td colspan="3">未发现问题，则该指标不适用;发现问题的，每涉及一个项目扣3分<br /><span style="color: red;">(注：本项填写0或负数)</span></td>
        <td style="text-align: center;">
          <span style="color: red;">{{ value.additionalScore }}</span>
        </td>
      </tr>
      <tr>
        <td style="text-align: center;" colspan="7">总得分</td>
        <td style="text-align: center;">
          <span>{{ value.totalScore }}</span>
        </td>
      </tr>
      <tr>
        <td colspan="4" style="text-align: right;">项目申报财政支持金额（万元）</td>
        <td colspan="4" style="text-align: left;"> {{ value.applyFunding}}</td>
      </tr>
      <tr>
        <td colspan="4" style="text-align: right;">项目预算评审建议财政支持金额（万元）</td>
        <td colspan="4" style="text-align: left;">
          <span>{{ value.recommendFunding }}</span>
        </td>
      </tr>
      <tr>
        <td colspan="4" style="text-align: right;">意见与建议</td>
        <td colspan="4" style="text-align: left;">
          <div v-html="toTextarea(value.remark)"></div>
        </td>
      </tr>
      <tr>
        <td colspan="4" class="bg-title" style="text-align: right;">评审结果</td>
        <td colspan="4">
          <a-tag :color="'#87d068'" v-if="value.evaluationType==1">{{ evaluationTypeA }}</a-tag>
          <a-tag :color="'#2db7f5'" v-if="value.evaluationType==2">{{ evaluationTypeB }}</a-tag>
          <a-tag :color="'#f50'" v-if="value.evaluationType==3">{{ evaluationTypeC }}</a-tag>
        </td>
      </tr>
    </table>
    <!-- </a-form-model> -->
  </div>
</template>

<script>
import { toTextarea, getEvaluationType } from '@/views/utils/common'
import { standardList } from '@/views/evaluation/components/config'
export default {
  name: "economy",
  components: {},
  props: {
    value: {
      type: Object,
      default () {
        return null;
      },
    },
  },
  data () {
    return {
      fromList: standardList,
      w: {
        score1: null,
        score2: null,
        score3: null,
        score4: null,
        score5: null,
        score6: null,
        score7: null,
        score8: null,
        score9: null,
        score10: null,
        score11: null,
        score12: null,
        score13: null,
        score14: null,
        score15: null,
        score16: null,
        score17: null,
        score18: null,
        score19: null,
        additionalScore: null,
        totalScore: null,
        applyFunding: null,
        recommendFunding: null,
        remark: null,
        evaluationType: null,
      },
      rules: {
        score1: { required: true, message: "*", trigger: "blur" },
        score2: { required: true, message: "*", trigger: "blur" },
        score3: { required: true, message: "*", trigger: "blur" },
        score4: { required: true, message: "*", trigger: "blur" },
        score5: { required: true, message: "*", trigger: "blur" },
        score6: { required: true, message: "*", trigger: "blur" },
        score7: { required: true, message: "*", trigger: "blur" },
        score8: { required: true, message: "*", trigger: "blur" },
        score9: { required: true, message: "*", trigger: "blur" },
        score10: { required: true, message: "*", trigger: "blur" },
        score11: { required: true, message: "*", trigger: "blur" },
        score12: { required: true, message: "*", trigger: "blur" },
        score13: { required: true, message: "*", trigger: "blur" },
        score14: { required: true, message: "*", trigger: "blur" },
        score15: { required: true, message: "*", trigger: "blur" },
        score16: { required: true, message: "*", trigger: "blur" },
        score17: { required: true, message: "*", trigger: "blur" },
        score18: { required: true, message: "*", trigger: "blur" },
        score19: { required: true, message: "*", trigger: "blur" },
        additionalScore: { required: true, message: "*", trigger: "blur" },
        recommendFunding: { required: true, message: "*", trigger: "blur" },
        remark: { required: true, message: "*", trigger: "blur" },
        evaluationType: { required: true, message: "*", trigger: "change" },
      },
    };
  },
  computed: {
    evaluationTypeA () {
      return getEvaluationType(0)
    },
    evaluationTypeB () {
      return getEvaluationType(1)
    },
    evaluationTypeC () {
      return getEvaluationType(2)
    },
  },
  created () {

  },
  methods: {
    toTextarea,
  },
};
</script>
<style scoped lang="less">
.app-content {
  table {
    table-layout: fixed;
    width: 100%;
    border: 1;
    border-collapse: collapse;
  }
  table tr td,
  th {
    border: 1px solid #e8e8e8;
    padding: 6px 6px;
    color: rgba(0, 0, 0, 0.65);
  }
  table tr th {
    text-align: center;
  }
  table tr {
    th:first-child {
      width: 4%;
    }
    th:nth-child(2) {
      width: 6%;
    }
    th:nth-child(3) {
      width: 8%;
    }
    th:nth-child(4) {
      width: 18%;
    }
    th:nth-child(5) {
      width: 6%;
    }
    th:nth-child(6) {
      width: 6%;
    }
    th:nth-child(7) {
      width: 40%;
    }
  }
  table {
    ::v-deep .ant-row {
      border: 0 !important;
    }
    ::v-deep .ant-row .ant-col {
      border: 0 !important;
      min-height: 30px !important;
    }
    ::v-deep .ant-form-item-control {
      line-height: 30px !important;
    }
    ::v-deep .ant-form-item {
      margin: 0 !important;
    }
    ::v-deep .ant-input-number {
      height: 30px !important;
    }
    ::v-deep .ant-input-number-input {
      height: 30px !important;
    }
  }
}
.none-bottom {
  ::v-deep .ant-col {
    border-bottom: 0 !important;
  }
}
</style>
ant-tabs