<template>
  <div>
    <el-form ref="basicInfoForm" label-position="top" :model="info" :rules="rules" label-width="150px">
      <div class="fomebox">
        <div class="ftop flexc">
          <img class="timg flex0" src="@/assets/images/project/tabtit.png"/>
          <div class="flex1 tit">建设信息</div>
        </div>
        <div class="rowbox">
          <el-row  :gutter="22">
            <el-col :span="24" style="padding-left: 0;" class="mbstb">
              <el-col :span="6" class="magnt">
              	<div class="xiangw" >
              				<span>建设起止时间：</span>
              				<span>{{info.beginTime?info.beginTime+"至"+info.endTime:"暂无数据"}}</span>
              	</div>

              </el-col>
				<el-col :span="6" class="magnt">
					<div class="xiangw" >
									  <span>竣工时间：</span>
									  <span>{{info.jgTime||"暂无数据"}}</span>
					</div>

				</el-col>
				<el-col :span="6" class="magnt">
					<div class="xiangw">
									  <span>入统时间：</span>
									  <span>{{info.rtTime||"暂无数据"}}</span>
					</div>

				</el-col>
				<!-- <el-col :span="6" class="magnt">
					<div class="xiangw">
									  <span>发票金额：</span>
									  <span>{{info.yjncz?info.yjncz+"万元":'暂无数据'}}</span>
					</div>
				</el-col> -->

			</el-col>
           <!-- <el-col :span="24" style="padding-left: 0;" class="magnt mbstb">
				<el-col :span="6">
					<div class="xiangw">
									  <span>厂房投入金额：</span>
									  <span>{{info.yjncz?info.yjncz+"万元":'暂无数据'}}</span>
					</div>
				</el-col>
				<el-col :span="6">
					<div class="xiangw">
									  <span>设备清单金额：</span>
									  <span>{{info.yjncz?info.yjncz+"万元":'暂无数据'}}</span>
					</div>
				</el-col>
				<el-col :span="6" >
					<div class="xiangw">
									  <span>土地出让金总额：</span>
									  <span>{{info.yjncz?info.yjncz+"万元":'暂无数据'}}</span>
					</div>
				</el-col>

				<el-col :span="6">
					<div class="xiangw">
									  <span>设备合同金额：</span>
									  <span>{{info.yjncz?info.yjncz+"万元":'暂无数据'}}</span>
					</div>
				</el-col>
			</el-col> -->
          </el-row>
        </div>
      </div>
      <div class="fomebox">
        <div class="ftop flexc">
          <img class="timg flex0" src="@/assets/images/project/tabtit.png"/>
          <div class="flex1 tit">建设进度跟踪</div>
        </div>
        <div class="rowbox">
          <!-- <el-row :gutter="22">
            <el-col :span="6" class="magnt mbstb">
				<div class="xiangw">
								  <span>建设周期：</span>
								  <span>2025-03-14</span>
				</div>
            </el-col>
          </el-row> -->
        </div>
        <div class="ftab flexc" style="padding-top: 0;">
          <div class="line"></div>每月项目建设进展情况
          <div class="flex1"></div>
        </div>
        <div class="rowbox" style="width: 100%;overflow: hidden;">
            <el-table :max-height="213"  :data="tableDataa" border style="width: 100%;margin-bottom: 15px;">
                    <el-table-column align="center" prop="jzqk" label="建设进展情况"  > </el-table-column>
                    <el-table-column align="center" prop="czwt" label="存在的问题" > </el-table-column>
            <el-table-column align="center" prop="shiji" label="实际到位资金"  > </el-table-column>
            <el-table-column align="center" prop="tdcrzje" label="土地出让金总额" > </el-table-column>
            <el-table-column align="center" prop="cftrje" label="厂房投入金额" > </el-table-column>
            <el-table-column align="center" prop="sbqd" label="设备清单金额"  > </el-table-column>
            <el-table-column align="center" prop="fpje" label="发票金额" > </el-table-column>
            <el-table-column align="center" prop="htje" label="设备合同金额" > </el-table-column>
                    <!-- <el-table-column align="center" label="操作" :width="120">
                      <template slot-scope="scope">
                       <div class="flexcc">
                        <div class="btna flexc cob" @click="getLook(scope.row['fjUrl'])">
                          <div class="imgs">
                            <img class="imgb" src="@/assets/images/project/upb.png"/>
                          </div>预览
                        </div>
                        <div class="btna flexc coc" @click="handleDownload(scope.row)">
                          <div class="imgs">
                            <img class="imga" src="@/assets/images/project/upc.png"/>
                          </div>下载
                        </div>
                       </div>
                      </template>
                    </el-table-column> -->
            </el-table>
        </div>
      </div>

      <div class="fomebox">
        <div class="ftop flexc">
          <img class="timg flex0" src="@/assets/images/project/tabtit.png"/>
          <div class="flex1 tit">上传附件</div>
        </div>
        <div class="rowbox">
            <el-table  :data="tableData" border style="width: 100%;margin-bottom: 15px;">
                <el-table-column align="center" type="index" label="序号"  width="10%"> </el-table-column>
                <el-table-column align="center" prop="fjName" label="文件名称"  width="40%"> </el-table-column>
                <el-table-column align="center" label="操作" width="30%">
                  <template slot-scope="scope">
                   <div class="flexcc">
                     <div class="btna flexc cob" style="cursor: pointer;" @click="getLook(scope.row['fjUrl'])">
                       <div class="imgs">
                         <img class="imgb" src="@/assets/images/project/upb.png"/>
                       </div>预览
                     </div>
                     <div class="btna flexc coc" style="cursor: pointer;" @click="handleDownload(scope.row)">
                       <div class="imgs">
                         <img class="imga" src="@/assets/images/project/upc.png"/>
                       </div>下载
                     </div>
                     <!-- <div class="btna flexc cod">
                       <div class="imgs">
                         <img class="imgc" src="@/assets/images/project/upd.png"/>
                       </div>删除
                     </div> -->
                   </div>
                  </template>
                </el-table-column>
              </el-table>
        </div>
      </div>
    </el-form>
  </div>

</template>

<script>
	const defaultSettings = require("@/settings.js");
export default {
  props: {
    info: {
      type: Object,
      default: null
    },
    jdqkData:{
      type: Array,
      default: []
    }
  },
  watch: {
    jdqkData: {
      handler(newVal, oldVal) {
        this.tableDataa=JSON.parse(JSON.stringify(newVal))
      },
      deep: true
    },
    info: {
      handler(newVal, oldVal) {
        if(newVal&&newVal.zsyzFjList){
          this.tableData=JSON.parse(JSON.stringify(newVal.zsyzFjList))
        }
      },
      deep: true
    },
  },
  data() {
    return {
      value:'',
      value1:'',
      tableData: [],
      tableDataa:[],
      rules: {
      },
	  defaultSettings:defaultSettings,
    }
  },
  methods:{
    handleDownload(row){
          var name = row.fjName;
          var url = row.fjUrl;
          this.$download.resource(url,false)
    },
	getLook(url){
		this.$emit('getTreeData',url);
	},
  }
}
</script>
<style lang="scss" scoped>
::v-deep {
  .fomebox{
    .el-button--primary{font-size: 14px;padding: 8px 14px;}
    .el-form-item__label{padding-bottom: 0;line-height: 38px;}
    .el-form-item{margin-bottom: 15px;}
    .el-input__inner{height: 40px;line-height: 40px;}
    .el-date-editor.el-input{width: 100%;}
    .el-select{width: 100%;}
    table{width: 100% !important;}
    .upbox{padding:8px 12px;
      img{width: 12px;height: 12px;margin-right: 2px;}
      color: #00A854;
    }
   }
}
.fomebox{background: #FFFFFF;margin-bottom: 15px;border-radius: 4px;
  .ftop{padding: 10px 17px 10px 16px;border-bottom: 1px solid #E6E6E6;
    .timg{width: 20px;height: 20px;margin-right: 13px;}
    .tit{font-weight: bold;font-size: 16px;color: #222838;}
  }
  .rowbox{padding: 10px 15px 9px;}
  .ftab{font-weight: bold;font-size: 14px;color: #2777D0;padding: 24px 16px 7px;
    .line{width: 6px;margin-right: 9px;height: 20px;background: #2777D0;}
  }
  .txt{font-weight: 500;padding-right: 34px;
font-size: 14px;
color: #666666;}
  .btna{font-weight: 500;font-size: 14px;padding: 0 13px;
    .imgs{width: 15px;height: 15px;display: flex;align-items: center;justify-content: center;margin-right: 7px;
      .imga{width: 13px;height: 14px;}
      .imgb{width: 14px;height: 14px;}
      .imgc{width: 15px;height: 15px;}
      .imgd{width: 13px;height: 14px;}
    }
    &.coa{color: #1890FF;}
    &.cob{color: #FE7F0E;}
    &.coc{color: #00A854;}
    &.cod{color: #F25858;}
  }
}
.xiangw{
	// margin-top: 20px;
	span:nth-child(1){
		font-family: PingFang SC;
		font-weight: bold;
		font-size: 14px;
		color: #000000;
	}
	span:nth-child(2){
		font-family: PingFang SC;
		font-weight: 400;
		font-size: 14px;
		color: #222838;
	}
}
.magnt{
	margin-top: 10px;
}
.mbstb{
	margin-bottom: 10px;
}
</style>
