<template>
  <!-- 项目信息 -->
  <div class="do-jump items bgc" id="page1">
    <!-- 标题 -->
    <div class="title">
      <span class="icon"></span>
      <span class="text">项目信息</span>
    </div>
    <!-- 详情 -->
    <table align="center">
      <tr>
        <td class="bgColor" style="width: 130px">项目名称</td>
        <!-- <td>{{ data.projectName }}</td> -->
        <td>
          <el-tooltip :content="data.projectName" placement="top">
            <p class="descStyle">
              {{ data.projectName }}
            </p>
          </el-tooltip>
        </td>
        <td class="bgColor" style="width: 130px">项目类型</td>
        <td style="width: 240px">
          {{ getDictName('xmgl-xmlx', data.projectType) }}
        </td>
      </tr>
      <tr>
        <td class="bgColor">总投资(万元)</td>
        <td>{{ data.projectMoney }}</td>
        <td class="bgColor">开工时间</td>
        <td>{{ data.commencementTime }}</td>
      </tr>
      <tr>
        <td class="bgColor">完工时间</td>
        <td>{{ data.completionTime }}</td>
        <td class="bgColor">竣工验收时间</td>
        <td>{{ data.completionAcceptanceTime }}</td>
      </tr>
      <tr>
        <td class="bgColor">建设规模及内容</td>
        <td colspan="3">{{ data.projectContent }}</td>
      </tr>
      <!-- <tr>
            <td class="bgColor">附件信息</td>
            <td colspan="3">
              <el-link
                type="primary"
                @click="handleLook(data.accessoryInfo)"
                v-if="data.accessoryInfo && data.accessoryInfo.length > 0"
                >查看附件({{ data.accessoryInfo.length }}个)</el-link
              >
              <span v-else></span>
            </td>
          </tr> -->
      <tr>
        <td class="bgColor">备注</td>
        <td colspan="3">{{ data.remarks }}</td>
      </tr>
    </table>
    <!-- <dialog-accessory ref="accessory" :accessoryInfo="data.accessoryInfo" /> -->
    <!-- <dialog-accessory ref="accessory" /> -->
  </div>
</template>
<script>
// import dialogAccessory from '../dialog/dialogAccessory.vue'
export default {
  name: 'projectInfo',
  components: {
    // dialogAccessory,
  },
  data() {
    return {
      data: {},
    }
  },
  mounted() {
    this.loadData()
  },
  methods: {
    //附件
    handleLook(obj) {
      this.$refs.accessory.open(obj)
    },
    loadData() {
      let param = {
        pageBean: {
          page: 1,
          pageSize: -1,
          total: true,
        },
        querys: [
          {
            group: 'main',
            operation: 'EQUAL',
            parentGroup: '',
            property: 'id_',
            relation: 'AND',
            value: this.$route.params.id,
          },
        ],
      }
      this.$http.post('${cqxy}/biz/projectManagement/pm/v1/page', param).then(
        (resp) => {
          let response = resp.data.value
          this.data = response.rows[0]
        },
        (error) => {
          reject(error)
        }
      )
    },
  },
}
</script>
<style lang="scss" scoped>
@import '../css/projectCommon.scss';
</style>