<navigator url="/packageA/project/detail?id={{item.sa_projectid}}" class="project-item" wx:for="{{list}}" wx:key="sa_projectid">
    <view class="chart">
        <view class="circle">
            <view class="circle_left ab" style="{{render.leftRate(item.progress)}}" />
            <view class="circle_right ab" style="{{render.rightRate(item.progress)}}" />
            <view class="circle_text">
                <text class="value">{{item.stage+'/'+item.totalstage}}</text>
                <text class="name">阶段进度</text>
            </view>
        </view>
    </view>
    <view class="main">
        <view class="label">
            <view class="title line-1">{{item.projectname}}</view>
            <view class="state" style="background-color: {{render.getColor(item.status)}};">{{item.status}}</view>
        </view>
        <view class="tag-box">
            <view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{item}}</view>
            <view class="datatag" wx:for="{{item.tags.datatag}}" wx:key="item">{{item}}</view>
        </view>
        <view class="replenish">
            <text style="color: #666;">项目编号：</text>
            <text>{{item.projectnum}}</text>
        </view>
        <view class="replenish">
            <text style="color: #666; flex-shrink: 0;">项目地址：</text>
            <text class="line-1" style="width: 480rpx;">{{item.province?item.province+item.city+item.county+item.address:'--'}}</text>
        </view>
        <view class="replenish">
            <text style="color: #666;">项目类型：</text>
            <text>{{item.projecttype||'--'}}</text>
        </view>
        <view class="replenish">
            <text style="color: #666;">项目等级：</text>
            <text>{{item.grade||'--'}}</text>
        </view>
        <view class="leader">
            <image src="{{item.leader[0].headpic}}" wx:if="{{item.leader[0].headpic}}" mode="aspectFill" />
            <view wx:else>{{item.leader[0].name[0]}}</view>
        </view>
    </view>
</navigator>
<My_empty wx:if="{{list.length==0}}" />
<wxs module="render">
    module.exports = {
        rightRate: function (rate) {
            if (rate - 0 < 50) {
                return 'transform: rotate(' + 3.6 * (rate - 0) + 'deg);';
            } else {
                return 'transform: rotate(0);border-color: var(--assist);';
            }
        },
        leftRate: function (rate) {
            if (rate - 0 >= 50) {
                return 'transform: rotate(' + 3.6 * (rate - 50) + 'deg);';
            }
        },
        getColor: function (status) {
            var color = null;
            if (status == '跟进中') {
                color = '#3874F6';
            } else if (status == '已成交') {
                color = '#52C41A';
            } else if (status == '已失败') {
                color = ' #EB3941';
            } else {
                color = '#FA8C16';
            };
            return color
        }
    }
</wxs>