| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <template>
-
- <view class="content-box">
-
- <view class="policy-item-box">
- <view v-for="(item, idx) in projectList" :key="idx" :class="{ active: active === idx }" class="policy-item-name" @click="changeProjectTabs(idx)">
- {{ item }}
- </view>
- </view>
-
- <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(item.id)">
- <view class="display-between items-center pos-class" :class="{ marginTop20: active === 2 }" >
- <view style="font-size: 30rpx;">{{item.name}}</view>
- <image v-if="item.importent === '1'" src="/static/important_icon.png" mode="aspectFit" style="width:80rpx;height: 80rpx;"></image>
- </view>
- <view class="display-flex-start pos-class">
- <view class="left-title">业主名称</view>
- <view>{{item.owner}}</view>
- </view>
- <view class="display-flex-start pos-class" style="margin-bottom: 20rpx;">
- <view class="left-title">总投资</view>
- <view>{{item.investment_count || '-'}}</view>
- </view>
- </view>
- </view>
-
- </view>
-
- </template>
- <script>
- import md5 from "@/common/md5.js";
- export default {
- data() {
- return {
- swiperList: [],
- projectList: ["在库", "技改", "在谈"],
- active: 0,
- // projectData: new Array(5).fill({
- // title:"普汇中金生命科学国际合作中心",
- // name: "普汇中金国际控股有限公司",
- // maxMony: "160000(万元)",
- // id:'1'
- // }),
- projectData:[]
- };
- },
- onLoad(option) {
- this.active = Number(option.idx)
- this.getProjectList(this.active)
- },
- methods: {
- enterProjectDeatil(id) {
- if(this.active == '2'){
- return
- }
- uni.navigateTo({
- url:"/pages/metrics/projectPage/detail?id=" + id
- });
- },
- getProjectList(tabVal){
- let tabObj = {
- 0:'在库',
- 1:'技改',
- 2:'在谈'
- }
- let md5Sign = md5(
- "method=" +
- "stat" +
- "×tamp=" +
- getApp().globalData.globalTimestamp +
- "&secret=" +
- getApp().globalData.secret
- );
- let url =
- getApp().globalData.shareUrl +
- "api/api.php" +
- "?method=stat&action=project_list×tamp=" +
- 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) {
- this.projectData = res.data.data
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- changeProjectTabs(idx) {
- let that = this;
- that.active = idx;
- switch (idx) {
- case 0:
- that.getProjectList(idx);
- break;
- case 1:
- that.getProjectList(idx);
- break;
- case 2:
- that.getProjectList(idx);
- break;
- }
- },
- },
- };
- </script>
- <style lang="scss">
- .content-box {
- display: flex;
- flex-direction: column;
- flex: 1;
- }
- .policy-item-box {
- display: flex;
- justify-content: space-between;
- margin: 0 20rpx;
- margin-top: 20rpx;
- .policy-item-name {
- padding-bottom: 10rpx;
- font-size: 30rpx;
- width: 25%;
- text-align: center;
- }
- .active {
- font-weight: 600;
- border-bottom: 7rpx solid #02a7f0;
- }
- }
- .project-content {
- border-top: 1px solid #f2f2f2;
- }
- .pos-class {
- padding-left: 10rpx;
- margin-bottom: 10rpx;
- font-size: 28rpx;
- }
- .left-title {
- width: 20%;
- color: #7F7F7F;
- font-size: 26rpx;
- }
- .borderBottom {
- border-bottom: 1px solid #f2f2f2;
- }
- .marginTop20 {
- margin-top: 20rpx;
- }
- </style>
|