linwei
2024-01-06 d8536ee4f4a72b8234c954a9b2ae6e38b9948dde
议事+报名
2 files modified
76 ■■■■■ changed files
subPackage/article/communityList.vue 8 ●●●● patch | view | raw | blame | history
subPackage/article/detail.vue 68 ●●●●● patch | view | raw | blame | history
subPackage/article/communityList.vue
@@ -32,17 +32,19 @@
                list: [],
                currentPage: 1,
                loadingStatus: 'nomore',
                eventType: ""
                eventType: "",
                type: '',
            }
        },
        onLoad(option) {
            this.eventType = option.type;
            if (option.type == 0) {
                this.type = 3
                uni.setNavigationBarTitle({
                    title: "公益报名"
                })
            } else {
                this.type = 4
                uni.setNavigationBarTitle({
                    title: "选举调查"
                })
@@ -91,6 +93,7 @@
                    size: pageSize,
                    articleType: this.tabId,
                    eventType: this.eventType,
                    type: this.type,
                    houseCode: uni.getStorageSync("siteInfo").houseCode
                }).then(res => {
                    this.$refs.paging.complete(res.data.records);
@@ -105,6 +108,7 @@
                    current: this.currentPage,
                    articleType: this.tabId,
                    eventType: this.eventType,
                    type: this.type,
                    houseCode: uni.getStorageSync("siteInfo").houseCode
                }
                const res = await getPage(param)
subPackage/article/detail.vue
@@ -25,10 +25,7 @@
        </view>
        <view class="" v-if="isLoad">
            <view class="" v-if="eventType == 0 && applyInfo.openFlag == 0">
                <!-- <view class="explain-row c-main  f-28">
                    报名和投票先指定好房屋
                </view> -->
                <view class="" v-if="applyInfo.eventType == 0 && applyInfo.openFlag == 0">
                <view class="select-row flex j-c-s-b a-i-c">
                    <text class="f-28">房屋</text>
                    <view class="select-row-content flex a-i-c">
@@ -47,13 +44,16 @@
                    </view>
                    <button v-if="computeEndTime > 0 && !applyInfo.userId" class="apply-btn bgc-main c-ff "
                        @click="handleApply()">报名</button>
                    <button v-if="applyInfo.userId && computeEndTime > 0" class="apply-btn bgc-lightblue c-main  border-current">已报名</button>
                        <button v-if="applyInfo.userId && computeEndTime > 0"
                            class="apply-btn bgc-lightblue c-main  border-current">已报名</button>
                    <button v-if="computeEndTime <= 0"
                        class="apply-btn bgc-lightblue c-main border-current">已结束</button>
                </view>
            </view>
            <view class="mt-20" v-if="eventType == 1 && voteTopicList.length">
                <view class="mt-20" v-if="this.type == 4 && voteTopicList.length">
                <view class="select-row flex j-c-s-b a-i-c mb-20">
                    <text class="f-28">房屋</text>
                    <view class="select-row-content flex a-i-c">
@@ -81,18 +81,20 @@
                                            <uv-line-progress v-if="item.selected" height="6" :showText="false"
                                                :percentage="getRatio(i.number)"
                                                activeColor="#017BFC"></uv-line-progress>
                                            <uv-line-progress v-else height="6" :showText="false"></uv-line-progress>
                                                <uv-line-progress v-else height="6"
                                                    :showText="false"></uv-line-progress>
                                        </view>
                                        <text class="c-33 f-28" v-if="i.number && item.isSubmit">{{i.number}}人</text>
                                            <text class="c-33 f-28"
                                                v-if="i.number && item.isSubmit">{{i.number}}人</text>
                                    </view>
                                </view>
                            </u-radio-group>
                        </view>
                        <view class="" v-if="item.optionRange == 1">
                            <u-checkbox-group size="22" iconPlacement="right" activeColor="#017BFC" placement="column"
                                v-model="item.selected" :disabled="isSubmit" @change="selectOption($event,index)"
                                shape="circle" labelColor="#333">
                                <u-checkbox-group size="22" iconPlacement="right" activeColor="#017BFC"
                                    placement="column" v-model="item.selected" :disabled="isSubmit"
                                    @change="selectOption($event,index)" shape="circle" labelColor="#333">
                                <view class="mb-30" v-for="(i,k) in item.children" :key="k">
                                    <u-checkbox :label="i.optionContent" :name="i.id"></u-checkbox>
                                    <view class="flex j-c-s-b a-i-c mt-10">
@@ -100,7 +102,8 @@
                                            <uv-line-progress v-if="item.selected" height="6" :showText="false"
                                                :percentage="getRatio(i.number)"
                                                activeColor="#017BFC"></uv-line-progress>
                                            <uv-line-progress v-else height="6" :showText="false"></uv-line-progress>
                                                <uv-line-progress v-else height="6"
                                                    :showText="false"></uv-line-progress>
                                        </view>
                                        <text class="c-33 f-28" v-if="i.number">{{i.number}}人</text>
                                    </view>
@@ -171,7 +174,7 @@
                params: {
                    id: ""
                },
                eventType: null,
                type: null,
                detailInfo: {},
                pdId: "",
                curSite: {},
@@ -191,9 +194,9 @@
        onLoad(option) {
            this.$set(this.params, "id", option.id);
            if (option.type) {
                this.$set(this.params, "eventType", option.type);
                this.eventType = option.type;
                this.pdId = option.pdId;
                // this.$set(this.params, "eventType", option.type);
                // this.eventType = option.type;
                // this.pdId = option.pdId;
                this.curSite = uni.getStorageSync("siteInfo")
            }
            this.getDetailInfo()
@@ -226,15 +229,18 @@
            getDetailInfo() {
                getDetail(this.params).then(res => {
                    this.isLoad = true;
                    this.detailInfo = res.data;
                    if (this.pdId) {
                    this.type = res.data.type
                    if (res.data.type == 3) {
                        this.isLoad = true;
                        this.getApplyDetail()
                    }
                    if (this.eventType == 0) {
                        this.getApplyList();
                        console.log(this.type)
                    }
                    if (this.eventType == 1) {
                    if (res.data.type == 4) {
                        this.isLoad = true;
                        this.getApplyDetail()
                        this.getVoteList();
                    }
                })
@@ -255,9 +261,9 @@
            //报名列表
            getApplyList() {
                communityModel.getApplyList({
                    publicDiscussId: this.pdId
                    articleId: this.params.id
                }).then(res => {
                    console.log(res)
                    // console.log(res)
                    if (res.code == 200) {
                        this.applyList = res.data.records;
                    }
@@ -267,9 +273,9 @@
            //报名、投票详情
            getApplyDetail() {
                communityModel.getApplyDetail({
                    id: this.pdId
                    articleId: this.params.id
                }).then(res => {
                    console.log(res)
                    // console.log(res)
                    if (res.code == 200) {
                        this.applyInfo = res.data;
                    }
@@ -279,7 +285,7 @@
            //获取投票议题
            getVoteList() {
                communityModel.getVoteTopics({
                    publicDiscussId: this.pdId
                    articleId: this.params.id
                }).then(res => {
                    if (res.code == 200) {
                        let data = res.data;
@@ -312,14 +318,18 @@
            //报名
            handleApply() {
                if (this.computeEndTime > 0) {
                    communityModel.addApply({
                        publicDiscussId: this.pdId
                        publicDiscussId: this.pdId,
                        articleId: this.params.id,
                        houseCode: uni.getStorageSync("siteInfo").houseCode
                    }).then(res => {
                        if (res.code == 200) {
                            uni.showToast({
                                title: "操作成功"
                            })
                            this.getApplyList();
                            this.getApplyDetail()
                        }
                    })
                } else {
@@ -343,6 +353,8 @@
                    if (i.selected) {
                        delete i.children;
                        i.selected = JSON.stringify(i.selected)
                        i.articleId = this.params.id
                        i.houseCode = uni.getStorageSync("siteInfo").houseCode
                        arr.push(i)
                    }
                }
@@ -385,9 +397,11 @@
    page {
        background-color: #f5f5f5;
    }
    .wrap{
        padding:0 0 130rpx;
    }
    .container {
        padding: 0 30rpx;
        background-color: #fff;