浏览代码

完成接口调试

wzz 4 年之前
父节点
当前提交
451dd363a3

+ 42 - 8
pages/metrics/importantPage/index.vue

@@ -47,6 +47,7 @@
 	  },
 	  onLoad(option) {
 		  this.active = Number(option.idx)
+		  this.getProjectList(this.active)
 	  },
 	  methods: {
 	    enterProjectDeatil(id) {
@@ -54,21 +55,54 @@
 			url:"/pages/metrics/projectPage/detail?id=" + id
 	      });
 	    },
+		getProjectList(tabVal){
+			let tabObj = {
+				0:'新建',
+				1:'续建',
+			}
+			let md5Sign = md5(
+			  "method=" +
+			    "stat" +
+			    "&timestamp=" +
+			    getApp().globalData.globalTimestamp +
+			    "&secret=" +
+			    getApp().globalData.secret
+			);
+			let url =
+			  getApp().globalData.shareUrl +
+			  "api/api.php" +
+			  "?method=stat&action=importent_project_list&timestamp=" +
+			  getApp().globalData.globalTimestamp +
+			  "&sign=" +
+			  md5Sign;
+			uni.request({
+			  url: url,
+			  method: "POST",
+			  header: {
+			    "content-type": "application/x-www-form-urlencoded",
+			  },
+			  data: {
+				tab : tabObj[tabVal]
+			  },
+			  success: (res) => {
+			    if (res.data.code === 200) {
+		
+			    }
+			  },
+			  fail: () => {
+			    console.log("连接失败");
+			  },
+			});
+		},
 	    changeProjectTabs(idx) {
 	      let that = this;
 	      that.active = idx;
 	      switch (idx) {
 	        case 0:
-	        //  that.getPolicyList("2");
+	        that.getProjectList(0);
 	          break;
 	        case 1:
-	        //  that.getPolicyList("3");
-	          break;
-	        case 2:
-	        //  that.getPolicyList("4");
-	          break;
-	        case 3:
-	        //  that.getPolicyList("5");
+	        that.getProjectList(1);
 	          break;
 	      }
 	    },

+ 9 - 9
pages/metrics/index.vue

@@ -77,7 +77,7 @@
 	    		 <view>重点项目</view>
 	    		 <view>{{importantData.importent_project_count}}</view>
 	    	 </view>
-	    	 <view class="block-box-content" style="width:30%;background-color: #9776F2;" @click="goImportant(1)">
+	    	 <view class="block-box-content" style="width:30%;background-color: #9776F2;" @click="goImportant(0)">
 	    		 <view>新建/续建</view>
 	    		 <view>{{importantData.new_project_count}}/{{importantData.continue_project_count}}</view>
 	    	 </view>
@@ -97,29 +97,29 @@
 	
 	    <qiun-title-bar title="科技创新指标" style="border-top:10rpx solid #f2f2f2;margin-bottom: 10rpx;" />
 	    <view class="block-box display-around items-center">
-	    	 <view class="block-box-content" style="width:47%;color: #555;" @click="goScale('科技创新企业')">
+	    	 <view class="block-box-content" style="width:47%;color: #555;" @click="goScale('科技创新企业','high_tech')">
 	    		 <view>国家高新技术企业</view>
 	    		 <view>{{techData.target.high}}/<text style="color: red;">{{techData.finish.high}}</text></view>
 	    	 </view>
-	    	 <view class="block-box-content" style="width:47%;color: #555;" @click="goScale('科技创新企业')">
+	    	 <view class="block-box-content" style="width:47%;color: #555;" @click="goScale('科技创新企业','tech')">
 	    		 <view>科技型中小企业</view>
 	    		 <view>{{techData.target.mini}}/<text style="color: red;">{{techData.finish.mini}}</text></view>
 	    	 </view>
 		</view>
 		<view class="display-around-column items-center" style="height: 620rpx; margin: 10rpx 0 10rpx 0;">
-		   <view class="block-box-content" style="width:97%;color: #555;">
+		   <view class="block-box-content" style="width:97%;color: #555;" @click="goScale('科技创新企业','standard_industry')">
 		   				 <view>累计研发投入规上工业企业</view>
 		   				 <view>{{techData.target.standard_industry}}/<text style="color: red;">{{techData.finish.standard_industry}}</text></view>
 		   </view>
-		   <view class="block-box-content" style="width:97%;color: #555;">
+		   <view class="block-box-content" style="width:97%;color: #555;" @click="goScale('科技创新企业','standard_service')">
 		   				 <view>累计研发投入规上服务业企业</view>
 		   				 <view>{{techData.target.standard_service}}/<text style="color: red;">{{techData.finish.standard_service}}</text></view>
 		    </view>
-		    <view class="block-box-content" style="width:97%;color: #555;">
+		    <view class="block-box-content" style="width:97%;color: #555;" @click="goScale('科技创新企业','rd_five_percent' )">
 		   				 <view>累计研发投入占主营业务5%的企业</view>
 		   				 <view>{{techData.target.rd_five_percent}}/<text style="color: red;">{{techData.finish.rd_five_percent}}</text></view>
 		   </view>
-		   <view class="block-box-content" style="width:97%;color: #555;">
+		   <view class="block-box-content" style="width:97%;color: #555;" @click="goScale('科技创新企业','rd_five_million')">
 		   				 <view>累计研发投入500万以上的企业</view>
 		   				 <view>{{techData.target.rd_five_million}}/<text style="color: red;">{{techData.finish.rd_five_million}}</text></view>
 		   </view>
@@ -628,9 +628,9 @@
 			  let dataSelect = Number(e.target.value) + 1;
 			  this.getEreaInfos(this.dateYear,this.dateMonth,dataSelect)
 		  },
-		  goScale(title){
+		  goScale(title,techType){
 			  uni.navigateTo({
-			  	url:'./largeScale/index?title=' + title
+			  	url:'./largeScale/index?title=' + title + '&year=' + this.dateYear + '&month=' + this.dateMonth + '&tech=' + techType
 			  })
 		  },
 		  goProject(idx){

+ 125 - 57
pages/metrics/largeScale/detail.vue

@@ -6,7 +6,7 @@
 			<image src="/static/nodata.svg" alt="" class="logo-img" mode="aspectFit"/>
 		  </view>
 		  <view class="name">
-		    {{ company.name || '测试名称'}}
+		    {{ itemObj.name || '-'}}
 		  </view>
 		</view>
 		<view class="uni-list title-date-box">
@@ -17,7 +17,7 @@
 					</picker>
 					<view style="font-size: 26rpx;margin-left: 20rpx;">1月~  </view>
 					<picker :range="arrayMonth" :value="dateMonth"  @change="bindDateMonthChange" class="picker-class">
-						<view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}<image src="/static/calendar_icon.svg" mode="aspectFit"></image></view>
+						<view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}<image src="/static/calendar_icon.svg" mode="aspectFit"></image></view>
 					</picker>
 				</view>
 			</view>
@@ -28,86 +28,154 @@
 		</view>
 		
 		<view class="item-list">
-		  <view v-for="(item, idx) in itemList" :key="idx" class="term">
-		    <view class="term-name">{{ item.name }}:</view>
-		    <view class="term-value-group" >
-		      <p  class="term-value-item">{{ item.value || "-" }}</p>
-		    </view>
-		</view>
+		     <view class="term">
+				<view class="term-name">法定代表人:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.representative || "-" }}</p>
+				</view>
+		      </view>
+		 <view class="term">
+				<view class="term-name">成立日期:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.found_date || "-" }}</p>
+				</view>
+		  </view>
+			<view class="term">
+					<view class="term-name">注册资本:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ itemObj.capital || "-" }}</p>
+					</view>
+			 </view>
+			 <view class="term">
+					<view class="term-name">规上工业企业:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ highType[itemObj.high_tech] || "-" }}</p>
+					</view>
+			  </view>
+			<view class="term">
+					<view class="term-name">先进制造业:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">
+					  {{ advancedType[itemObj.advanced] || "-" }}
+					  </p>
+					</view>
+			 </view>
+			 <view class="term">
+					<view class="term-name">亩均排序:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ itemObj.aera_order || "-" }}</p>
+					</view>
+			  </view>
+			 <view class="term">
+					<view class="term-name">规上评定时间:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ itemObj.advanced_update_time || "-" }}</p>
+					</view>
+			  </view>
+			<view class="term">
+					<view class="term-name">经营地址:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ itemObj.rigiser_address || "-" }}</p>
+					</view>
+			 </view>
+			 <view class="term">
+					<view class="term-name">累计研发投入费用:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ itemObj.insure_count || "-" }}</p>
+					</view>
+			  </view>
+			 <view class="term">
+					<view class="term-name">本年度生产总值:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ itemObj.industry_money || "-" }}</p>
+					</view>
+			  </view>
+			<view class="term">
+				<view class="term-name">本年度工业产值增速:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.increase_ratio || "-" }}</p>
+				</view>
+		 </view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import md5 from "@/common/md5.js";
 	export default {
 	  data() {
 		  return{
 			  dateYear:new Date().getFullYear(),
-			  dateMonth:new Date().getMonth() + 1 + '月',
-			  arrayMonth:["1月", "2月","3月", "4月","5月", "6月","7月", "8月","9月", "10月","11月", "12月"],
+			  dateMonth:new Date().getMonth() + 1,
+			  arrayMonth:["1", "2","3", "4","5", "6","7", "8","9", "10","11", "12"],
 			  chartData:{
 				  "categories": ["1月", "2月","3月", "4月","5月", "6月","7月", "8月","9月", "10月","11月", "12月"],
 				  "series": [
 						{name: "本年度",data: [15,10,16,23,21,36,25,7,18,29,33,12]},
 					]
 			  },
-			  itemList: [
-			    {
-			      name: "法定代表人",
-			      value: '马须伦',
-			    },
-			    {
-			      name: "成立日期",
-			      value: '2017.11.14',
-			    },
-			    {
-			      name: "注册资本",
-			      value: '1,776,759.3',
-			    },
-			    {
-			      name: "规上工业企业",
-			      value: '是',
-			    },
-			    {
-			      name: "先进制造业",
-			      value: '否',
-			    },
-			    {
-			      name: "亩均排序",
-			      value: 'A',
-			    },
-			    {
-			      name: "规上评定时间",
-			      value: '2021.01.01',
-			    },
-			    {
-			      name: "经营地址",
-			      value: '万联大道以东,宣平大街以北',
-			    },
-			    {
-			      name: "累计研发投入费用",
-			      value: '-',
-			    },
-			    {
-			      name: "本年度生产总值",
-			      value: '-',
-			    },
-				{
-				  name: "本年度工业产值增速",
-				  value: '-',
-				},
-			  ],
+			  itemObj:{},
+			  advancedType:{
+					  '0':'是',
+					  '1':'否'
+			  },
+			  highType:{
+					  '0':'是',
+					  '1':'否'
+			  },
+			  nowId:''
 		 }
 	  },
 	  onLoad(option) {
-	  	console.log(option.id)
+		this.nowId = option.id;  
+		this.getCompanyInfo(this.dateYear,this.dateMonth,option.id)
 	  },
 	  methods:{
 		  bindDateChange(e){
 			   this.dateYear = e.target.value
+			   this.getCompanyInfo(this.dateYear,this.dateMonth,this.nowId)
 		  },
 		  bindDateMonthChange(e){
 			   this.dateMonth = this.arrayMonth[e.target.value]
+			   this.getCompanyInfo(this.dateYear,this.dateMonth,this.nowId)
+		  },
+		  getCompanyInfo(y,m,ids) {
+		    let md5Sign = md5(
+		      "method=" +
+		        "stat" +
+		        "&timestamp=" +
+		        getApp().globalData.globalTimestamp +
+		        "&secret=" +
+		        getApp().globalData.secret
+		    );
+		    let url =
+		      getApp().globalData.shareUrl +
+		      "api/api.php" +
+		      "?method=stat&action=company_by_id&timestamp=" +
+		      getApp().globalData.globalTimestamp +
+		      "&sign=" +
+		      md5Sign;
+		    let postData = {
+				   year : y,
+				   month: m,
+				   id: ids
+		    };
+		    uni.request({
+		      url: url,
+		      method: "POST",
+		      header: {
+		        "content-type": "application/x-www-form-urlencoded",
+		      },
+		      data: postData,
+		      success: (res) => {
+		        if (res.data.code === 200) {
+		           this.itemObj = res.data.data;
+		        }
+		      },
+		      fail: () => {
+		        console.log("连接失败");
+		      },
+		    });
 		  },
 	  }
 	};

+ 132 - 31
pages/metrics/largeScale/index.vue

@@ -14,35 +14,35 @@
 		<view class="companys">
 		  <!-- <view>推荐企业</view> -->
 		  <view  v-for="(company, index) in companyList" :key="index" @click="toDetail(company.id)" class="company">
-			<!-- <image src="/static/selfCenter/add-icon.png" mode="aspectFit" class="addIcon"></image> -->
+			<image src="/static/selfCenter/add-icon.png" mode="aspectFit" class="addIcon" v-if="company.is_new"></image>
 		    <view class="title">
 		      <view class="logo">
-		        <!-- <image :src="globalUrl + company.pic_url" alt="" class="logo-img" mode="aspectFit"/> -->
-				<image src="/static/nodata.svg" alt="" class="logo-img" mode="aspectFit"/>
+		        <image v-if="company.logo" :src="globalUrl + company.logo" alt="" class="logo-img" mode="aspectFit"/>
+				<image v-else src="/static/nodata.svg" alt="" class="logo-img" mode="aspectFit"/>
 		      </view>
 		      <view class="name display-around-column" style="align-items: flex-start;">
 		         <view>{{ company.name }}</view>
-				 <!-- <view class="isAdvanced" v-show="index === 0">先进制造业</view> -->
+				 <view class="isAdvanced" v-show="company.advanced">先进制造业</view>
 		      </view>
 		    </view>
 		    <view class="info">
 		      <view class="view">
 		        <view class="info_t">亩均排序</view>
 		        <view class="name">
-		          {{ company.representative }}
+		          {{ company.representative || 'A'}}
 		        </view>
 		      </view>
 		      <view class="line"></view>
 		      <view class="view">
 		        <view class="info_t">总产值</view>
-		        {{ company.capital }}(亿元)
+		        {{ company.total_balance }}(亿元)
 			<!-- 	 <text v-if="company.capital_type == '1'">美元</text>
 				 <text v-else>人民币</text> -->
 		      </view>
 		      <view class="line"></view>
 		      <view class="view">
 		        <view class="info_t">产值增速</view>
-		        {{ company.found_date }}
+		        {{ company.total_ratio }}
 		      </view>
 		    </view>
 		  </view>
@@ -62,28 +62,65 @@
 			  sortSelect:'一至当月产值',
 			  companyList: [],
 			  globalUrl:getApp().globalData.shareUrl,
+			  yearVal:'',
+			  monthVal:'',
+			  titleVal:'',
+			  techVal:''
 		 }
 	  },
 	  onLoad(option) {
 		uni.setNavigationBarTitle({
 			title: option.title
-		})  
-	    this.getCompany();
+		})
+		this.yearVal = option.year;
+		this.monthVal = option.month;
+		this.titleVal = option.title;
+		this.techVal  = option.tech;
+		switch (option.title){
+			case '规上工业企业':
+			    this.getCompany(option.year,option.month,'total_balance desc')
+				break;
+	        case '先进制造业企业':
+			    this.getAdvanced(option.year,option.month,'total_balance desc')
+				break;
+			case '科技创新企业':
+			    this.getTech(option.year,option.month,'total_balance desc',option.tech)
+				break;
+		}
 	  },
 	  methods:{
 		  bindSortChange(e){
-			  this.sortSelect = this.arraySort[e.target.value]
+			  console.log(e)
+			  let sortObj = {
+				  '0' : '',
+				  '1' : 'total_balance desc',
+				  '2' : 'balance desc',
+				  '3' : 'total_ratio desc',
+				  '4' : 'ratio desc',
+				  '5' : 'area',				  
+			  }
+			  this.sortSelect = this.arraySort[e.target.value];
+			  switch (this.titleVal){
+			  	case '规上工业企业':
+			  	    this.getCompany(this.yearVal,this.monthVal,sortObj[e.target.value])
+			  		break;
+			      case '先进制造业企业':
+			  	    this.getAdvanced(this.yearVal,this.monthVal,sortObj[e.target.value])
+			  		break;
+			  	case '科技创新企业':
+			  	    this.getTech(this.yearVal,this.monthVal,sortObj[e.target.value],this.techVal)
+			  		break;
+			  }
 		  },
 		  toDetail(id){
-			  console.log(id)
 			  uni.navigateTo({
 			  	url:'./detail' + '?id=' + id
 			  })
 		  },
-		  getCompany() {
+		  getCompany(y,m,sort) {
 		    let md5Sign = md5(
 		      "method=" +
-		        "common" +
+		        "stat" +
 		        "&timestamp=" +
 		        getApp().globalData.globalTimestamp +
 		        "&secret=" +
@@ -92,13 +129,14 @@
 		    let url =
 		      getApp().globalData.shareUrl +
 		      "api/api.php" +
-		      "?method=common&source=company&action=list&timestamp=" +
+		      "?method=stat&action=standard_company_list&timestamp=" +
 		      getApp().globalData.globalTimestamp +
 		      "&sign=" +
 		      md5Sign;
 		    let postData = {
-		      s_pub: "1",
-		  	order_by : "weight desc,id desc"
+				   year : y,
+				   month: m,
+				   order: sort
 		    };
 		    uni.request({
 		      url: url,
@@ -109,21 +147,84 @@
 		      data: postData,
 		      success: (res) => {
 		        if (res.data.code === 200) {
-		          let list = res.data.data.list;
-		          console.log(res.data.data.list);
-		          list.forEach((e, i) => {
-		            let { pic_url, name, representative, capital, capital_type, found_date, id } = e;
-		            list[i] = {
-		              pic_url,
-		              name,
-		              representative,
-		              capital,
-		  			capital_type,
-		              found_date,
-		              id,
-		            };
-		          });
-		          this.companyList = list;
+		          this.companyList = res.data.data;
+		        }
+		      },
+		      fail: () => {
+		        console.log("连接失败");
+		      },
+		    });
+		  },
+		  getAdvanced(y,m,sort) {
+		    let md5Sign = md5(
+		      "method=" +
+		        "stat" +
+		        "&timestamp=" +
+		        getApp().globalData.globalTimestamp +
+		        "&secret=" +
+		        getApp().globalData.secret
+		    );
+		    let url =
+		      getApp().globalData.shareUrl +
+		      "api/api.php" +
+		      "?method=stat&action=advanced_company_list &timestamp=" +
+		      getApp().globalData.globalTimestamp +
+		      "&sign=" +
+		      md5Sign;
+		    let postData = {
+				   year : y,
+				   month: m,
+				   order: sort
+		    };
+		    uni.request({
+		      url: url,
+		      method: "POST",
+		      header: {
+		        "content-type": "application/x-www-form-urlencoded",
+		      },
+		      data: postData,
+		      success: (res) => {
+		        if (res.data.code === 200) {
+		          this.companyList = res.data.data;
+		        }
+		      },
+		      fail: () => {
+		        console.log("连接失败");
+		      },
+		    });
+		  },
+		  getTech(y,m,sort,techType) {
+		    let md5Sign = md5(
+		      "method=" +
+		        "stat" +
+		        "&timestamp=" +
+		        getApp().globalData.globalTimestamp +
+		        "&secret=" +
+		        getApp().globalData.secret
+		    );
+		    let url =
+		      getApp().globalData.shareUrl +
+		      "api/api.php" +
+		      "?method=stat&action=advanced_company_list&timestamp=" +
+		      getApp().globalData.globalTimestamp +
+		      "&sign=" +
+		      md5Sign;
+		    let postData = {
+				   year : y,
+				   month: m,
+				   order: sort,
+				   item :techType
+		    };
+		    uni.request({
+		      url: url,
+		      method: "POST",
+		      header: {
+		        "content-type": "application/x-www-form-urlencoded",
+		      },
+		      data: postData,
+		      success: (res) => {
+		        if (res.data.code === 200) {
+		          this.companyList = res.data.data;
 		        }
 		      },
 		      fail: () => {

+ 164 - 80
pages/metrics/projectPage/detail.vue

@@ -1,100 +1,184 @@
 <template>
 	<view class="content-box">
 		<view class="item-list">
-		  <view v-for="(item, idx) in itemList" :key="idx" class="term">
-		    <view class="term-name">{{ item.name }}:</view>
-		    <view class="term-value-group" >
-		      <p  class="term-value-item">{{ item.value || "-" }}</p>
+		  <view class="term">
+				<view class="term-name">业主:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.owner || "-" }}</p>
+				</view>
+		   </view>
+		   <view class="term">
+					<view class="term-name">项目名称:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ itemObj.name || "-" }}</p>
+					</view>
 		    </view>
-		</view>
+			<view class="term">
+					<view class="term-name">入库情况:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ storeType[itemObj.store_status] || "-" }}</p>
+					</view>
+			 </view>
+			 <view class="term">
+					<view class="term-name">建设性质:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ constructType[itemObj.character] || "-" }}</p>
+					</view>
+			  </view>
+			<view class="term">
+					<view class="term-name">工业技改:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ industryType[itemObj.status] || "-" }}</p>
+					</view>
+			 </view>
+		     <view class="term">
+					<view class="term-name">入库时间:</view>
+					<view class="term-value-group">
+					  <p  class="term-value-item">{{ itemObj.store_date || "-" }}</p>
+					</view>
+		     </view>
+		     <view class="term">
+				<view class="term-name">建设规模及主要建设内容:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.content || "-" }}</p>
+				</view>
+		      </view>
+		 <view class="term">
+				<view class="term-name">主要经济社会效益:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.effect || "-" }}</p>
+				</view>
+		  </view>
+		<view class="term">
+				<view class="term-name">建设地址:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.address || "-" }}</p>
+				</view>
+		 </view>
+		 <view class="term">
+				<view class="term-name">总用地面积(亩):</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.area || "-" }}</p>
+				</view>
+		  </view>
+		<view class="term">
+				<view class="term-name">建设起止年限:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">
+				  {{ itemObj.construct_start_date || "-" }}  - {{itemObj.construct_end_date || "-" }}
+				  </p>
+				</view>
+		 </view>
+		 <view class="term">
+				<view class="term-name">总投资(万元):</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.investment_count || "-" }}</p>
+				</view>
+		  </view>
+		 <view class="term">
+				<view class="term-name">年度计划投资(万元):</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.investment_year || "-" }}</p>
+				</view>
+		  </view>
+		<view class="term">
+				<view class="term-name">已到位资金额(万元):</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.investment_finish || "-" }}</p>
+				</view>
+		 </view>
+		 <view class="term">
+				<view class="term-name">投资方式:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ investmentType[itemObj.investment_type] || "-" }}</p>
+				</view>
+		  </view>
+		 <view class="term">
+				<view class="term-name">年度主要建设内容及年底前形象进度:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.process || "-" }}</p>
+				</view>
+		  </view>
+		<view class="term">
+				<view class="term-name">重点级别:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.importent_level || "-" }}</p>
+				</view>
+		 </view>
+		 <view class="term">
+				<view class="term-name">备注:</view>
+				<view class="term-value-group">
+				  <p  class="term-value-item">{{ itemObj.remark || "-" }}</p>
+				</view>
+		  </view>							
 		</view>
 	</view>
 </template>
 
 <script>
+	import md5 from "@/common/md5.js";
 	export default {
 	  data() {
 		  return{
-			  itemList: [
-			    {
-			      name: "业主",
-			      value: '普汇中金国际控股有限公司',
-			    },
-			    {
-			      name: "项目名称",
-			      value: '普汇中金生命科学国际合作中心',
-			    },
-			    {
-			      name: "入库情况",
-			      value: '在库/未入库',
-			    },
-			    {
-			      name: "建设性质",
-			      value: '新建/续建',
-			    },
-			    {
-			      name: "工业技改",
-			      value: '是/否',
-			    },
-			    {
-			      name: "入库时间",
-			      value: '2020.6.30',
-			    },
-			    {
-			      name: "建设规模及主要建设内容",
-			      value: '占地面积155.48亩,拟新建机械加工厂房5栋,孵化中心(框架结构)3栋,服务配套中心1栋,总建筑面积约147625平方米。',
-			    },
-			    {
-			      name: "主要经济社会效益",
-			      value: '针对产业链上游(研发)企业中的中小型企业,提供标准研发、检测、生产及配套服务,提升区域产业能级,形成产业聚集,实现规模效益',
-			    },
-			    {
-			      name: "建设地址",
-			      value: '位于空港新城临空产业区内,西安咸阳机场西北侧,东、南侧为机场规划用地,北临正平大街,西侧为项目一期用地。',
-			    },
-			    {
-			      name: "总用地面积(亩)",
-			      value: '155.48',
-			    },
-				{
-				  name: "建设起止年限",
-				  value: '2019.11-2022.12',
-				},
-				{
-				  name: "总投资(万元)",
-				  value: '67330',
-				},
-				{
-				  name: "年度计划投资(万元)",
-				  value: '20199',
-				},
-				{
-				  name: "已到位资金额(万元)",
-				  value: '-',
-				},
-				{
-				  name: "投资方式",
-				  value: '社会投资',
-				},
-				{
-				  name: "年度主要建设内容及年底前形象进度",
-				  value: '服务中心二次结构施工完成;其余楼栋号二次结构、屋面工程、水电安装、装饰装修施工完成。',
-				},
-				{
-				  name: "重点级别",
-				  value: '非重点、省级/市级/新区/新城',
-				},
-				{
-				  name: "备注",
-				  value: '-',
-				},
-			  ],
+			  itemObj:{},
+			  storeType:{
+				  '0':'在库',
+				  '1':'未入库'
+			  },
+			  constructType:{
+				  '0':'新建',
+				  '1':'续建'
+			  },
+			  industryType:{
+				  '0':'是',
+				  '1':'否'
+			  },
+			  investmentType:{
+				 // '0':'是',
+				  '1':'社会投资'
+			  }
 		 }
 	  },
 	  onLoad(option) {
-	  	console.log(option.id)
+		console.log(option)
+		this.getProjectDetail('1')
 	  },
 	  methods:{
+		  getProjectDetail(ids){
+		  	let md5Sign = md5(
+		  	  "method=" +
+		  	    "stat" +
+		  	    "&timestamp=" +
+		  	    getApp().globalData.globalTimestamp +
+		  	    "&secret=" +
+		  	    getApp().globalData.secret
+		  	);
+		  	let url =
+		  	  getApp().globalData.shareUrl +
+		  	  "api/api.php" +
+		  	  "?method=stat&action=project_by_id&timestamp=" +
+		  	  getApp().globalData.globalTimestamp +
+		  	  "&sign=" +
+		  	  md5Sign;
+		  	uni.request({
+		  	  url: url,
+		  	  method: "POST",
+		  	  header: {
+		  	    "content-type": "application/x-www-form-urlencoded",
+		  	  },
+		  	  data: {
+		  		id : ids
+		  	  },
+		  	  success: (res) => {
+		  	    if (res.data.code === 200) {
+		            this.itemObj = res.data.data;
+		  	    }
+		  	  },
+		  	  fail: () => {
+		  	    console.log("连接失败");
+		  	  },
+		  	});
+		  },
 	  }
 	};
 </script>

+ 46 - 7
pages/metrics/projectPage/index.vue

@@ -10,7 +10,7 @@
 		
 		<view class="project-box">
 			<view class="project-content display-around-column" v-for="(item, idx) in projectData" :key="idx" 
-			:class="{ borderBottom: idx == projectData.length - 1 }" @click="enterProjectDeatil()">
+			:class="{ borderBottom: idx == projectData.length - 1 }" @click="enterProjectDeatil(item.id)">
 				<view class="display-between items-center pos-class">
 					<view style="font-size: 30rpx;">{{item.title}}</view>
 					<image src="/static/important_icon.png" mode="aspectFit" style="width:80rpx;height: 80rpx;"></image>
@@ -42,11 +42,13 @@
 	        title:"普汇中金生命科学国际合作中心",
 	        name: "普汇中金国际控股有限公司",
 	        maxMony: "160000(万元)",
+			id:'1'
 	      }),
 	    };
 	  },
 	  onLoad(option) {
 		  this.active = Number(option.idx)
+		  this.getProjectList(this.active)
 	  },
 	  methods: {
 	    enterProjectDeatil(id) {
@@ -54,21 +56,58 @@
 			url:"/pages/metrics/projectPage/detail?id=" + id
 	      });
 	    },
+		getProjectList(tabVal){
+			let tabObj = {
+				0:'在库',
+				1:'技改',
+				2:'在谈'
+			}
+			let md5Sign = md5(
+			  "method=" +
+			    "stat" +
+			    "&timestamp=" +
+			    getApp().globalData.globalTimestamp +
+			    "&secret=" +
+			    getApp().globalData.secret
+			);
+			let url =
+			  getApp().globalData.shareUrl +
+			  "api/api.php" +
+			  "?method=stat&action=project_list&timestamp=" +
+			  getApp().globalData.globalTimestamp +
+			  "&sign=" +
+			  md5Sign;
+			uni.request({
+			  url: url,
+			  method: "POST",
+			  header: {
+			    "content-type": "application/x-www-form-urlencoded",
+			  },
+			  data: {
+				tab : tabObj[tabVal]
+			  },
+			  success: (res) => {
+			    if (res.data.code === 200) {
+
+			    }
+			  },
+			  fail: () => {
+			    console.log("连接失败");
+			  },
+			});
+		},
 	    changeProjectTabs(idx) {
 	      let that = this;
 	      that.active = idx;
 	      switch (idx) {
 	        case 0:
-	        //  that.getPolicyList("2");
+	       that.getProjectList(idx);
 	          break;
 	        case 1:
-	        //  that.getPolicyList("3");
+	       that.getProjectList(idx);
 	          break;
 	        case 2:
-	        //  that.getPolicyList("4");
-	          break;
-	        case 3:
-	        //  that.getPolicyList("5");
+	       that.getProjectList(idx);
 	          break;
 	      }
 	    },