liuyg
2022-03-07 6e264f6d0bf88b8e7ac1fe76dcec8b74682e235a
+增加取消活动和取消参与
9 files modified
151 ■■■■ changed files
pages/grabOrders/grabOrdersZAFFPX/grabOrders.vue 25 ●●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAFFPX/inPage/page0.vue 16 ●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAFFPX/inPage/page2.vue 5 ●●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAXC/grabOrders.vue 25 ●●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAXC/inPage/page0.vue 14 ●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAXC/inPage/page2.vue 2 ●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue 28 ●●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAYWXC/inPage/page0.vue 26 ●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAYWXC/inPage/page2.vue 10 ●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrdersZAFFPX/grabOrders.vue
@@ -12,7 +12,7 @@
                <view class="swiper-item">
                    <scroll-view scroll-y :style="{ height: useHeight, width: '100%' }" @scrolltolower="onreachBottom">
                        <page0 :listData="rightdata" :swiperCurrent="0" v-if="item.name == '正在进行'" @openOnce="openOnce"
                            @getOrders="getOrders">
                            @getOrders="getOrders" @outOrders="outOrders">
                        </page0>
                        <page1 :listData="leftdata" :swiperCurrent="1" v-if="item.name == '可参与'" @openOnce="openOnce"
                            @getOrders="getOrders">
@@ -122,6 +122,29 @@
            }
        },
        methods: {
            //取消任务
            outOrders(d) {
                let that = this;
                uni.request({
                    url: this.$store.state.piAPI +
                        `taskqd/cancelTask?rid=${d.rid}&serid=${d.serid}&name=${that.$store.state.puserName}`,
                    method: "get",
                    // data: d,
                    header: {
                        "content-type": "application/x-www-form-urlencoded",
                    },
                    success(res) {
                        const data = res.data.msg;
                        if (data == "操作成功") {
                            uni.showToast({
                                title: data,
                                duration: 2000,
                            });
                        }
                        that.$store.commit("changegotuGrabOrders");
                    }
                })
            },
            //实时位置传递
            setNowposition(rid, jd, wd) {
                console.log(uni.getStorageSync("ids") || this.$store.state.puserID, rid, jd, wd);
pages/grabOrders/grabOrdersZAFFPX/inPage/page0.vue
@@ -19,7 +19,7 @@
                    </view>
                    <view class="o-l-m-center" style="padding-left: 13px;">
                        <!-- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon> -->
                    <!--     时间: -->
                        <!--     时间: -->
                        {{item.time}}
                    </view>
                </view>
@@ -34,6 +34,9 @@
                    :disabled="item.type == 1" v-if="item.iscation == 1" @click="getOrders(swiperCurrent,item)">
                    <!-- <span class="Cation">队长</span> -->
                    {{item.type == 1?"完成反馈":item.type == 0?"上传反馈":"开始任务"}}
                </u-button>
                <u-button class="o-r-down" :plain="true" size="mini" type="error" @click="outOrders(item)">
                    {{item.iscation == 0?'退出任务':'取消任务'}}
                </u-button>
                <view class="o-r-$">
                    积分:{{item.integral}}
@@ -77,6 +80,13 @@
                    item: item
                }
                this.$emit("getOrders", b);
            },
            outOrders(val) {
                let b = {
                    rid: val.id,
                    serid: this.$store.state.puserID
                };
                this.$emit("outOrders", b);
            }
        }
    }
@@ -142,8 +152,8 @@
            justify-content: center;
            flex-direction: column;
            view {
                margin-top: 10px;
            .o-r-down {
                margin-top: 4px;
            }
        }
pages/grabOrders/grabOrdersZAFFPX/inPage/page2.vue
@@ -39,10 +39,9 @@
                </view>
            </view>
            <view class="onve-right">
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini" :disabled="true"
                    @click="getOrders(swiperCurrent,item)">
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini" :disabled="true">
                    <!-- <span class="Cation notCation">队员</span> -->
                    {{"完成反馈"}}
                    {{"已完成"}}
                </u-button>
                <view class="o-r-$">
                    积分:{{item.integral}}
pages/grabOrders/grabOrdersZAXC/grabOrders.vue
@@ -12,7 +12,7 @@
                <view class="swiper-item">
                    <scroll-view scroll-y :style="{ height: useHeight, width: '100%' }" @scrolltolower="onreachBottom">
                        <page0 :listData="leftdata" :swiperCurrent="0" v-if="item.name == '正在进行'" @openOnce="openOnce"
                            @getOrders="getOrders"></page0>
                            @getOrders="getOrders" @outOrders="outOrders"></page0>
                        <page1 :listData="rightdata" :swiperCurrent="1" v-if="item.name == '可参与'" @openOnce="openOnce"
                            @getOrders="getOrders"></page1>
                        <page2 :listData="overdata" :swiperCurrent="2" v-if="item.name == '已完成'" @openOnce="openOnce"
@@ -122,6 +122,29 @@
            }
        },
        methods: {
            //取消任务
            outOrders(d) {
                let that = this;
                uni.request({
                    url: this.$store.state.piAPI +
                        `taskqd/cancelTask?rid=${d.rid}&serid=${d.serid}&name=${that.$store.state.puserName}`,
                    method: "get",
                    // data: d,
                    header: {
                        "content-type": "application/x-www-form-urlencoded",
                    },
                    success(res) {
                        const data = res.data.msg;
                        if (data == "操作成功") {
                            uni.showToast({
                                title: data,
                                duration: 2000,
                            });
                        }
                        that.$store.commit("changegotuGrabOrders");
                    }
                })
            },
            //实时位置传递
            setNowposition(rid, jd, wd) {
                console.log(uni.getStorageSync("ids") || this.$store.state.puserID, rid, jd, wd);
pages/grabOrders/grabOrdersZAXC/inPage/page0.vue
@@ -30,6 +30,9 @@
                    <!-- <span class="Cation">队长</span> -->
                    {{item.type == 1?"完成反馈":item.type == 0?"上传反馈":"开始任务"}}
                </u-button>
                <u-button class="o-r-down" :plain="true" size="mini" type="error" @click="outOrders(item)">
                    {{item.iscation == 0?'退出任务':'取消任务'}}
                </u-button>
                <view class="o-r-$">
                    积分:{{item.integral}}
                </view>
@@ -72,6 +75,13 @@
                    item: item
                }
                this.$emit("getOrders", b);
            },
            outOrders(val) {
                let b = {
                    rid: val.id,
                    serid: this.$store.state.puserID
                };
                this.$emit("outOrders", b);
            }
        }
    }
@@ -137,8 +147,8 @@
            justify-content: center;
            flex-direction: column;
            view {
                margin-top: 10px;
            .o-r-down {
                margin-top: 4px;
            }
        }
pages/grabOrders/grabOrdersZAXC/inPage/page2.vue
@@ -22,7 +22,7 @@
            <view class="onve-right">
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini" :disabled="true" <!--
                    <span class="Cation notCation">队员</span> -->
                    {{"完成反馈"}}
                    {{"已完成"}}
                </u-button>
                <view class="o-r-$">
                    积分:{{item.integral}}
pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
@@ -12,7 +12,7 @@
                <view class="swiper-item">
                    <scroll-view scroll-y :style="{ height: useHeight, width: '100%' }" @scrolltolower="onreachBottom">
                        <page0 :listData="leftdata" :swiperCurrent="0" v-if="item.name == '正在进行'" @openOnce="openOnce"
                            @getOrders="getOrders"></page0>
                            @getOrders="getOrders" @outOrders="outOrders"></page0>
                        <page1 :listData="rightdata" :swiperCurrent="1" v-if="item.name == '可参与'" @openOnce="openOnce"
                            @getOrders="getOrders"></page1>
                        <page2 :listData="rightdata" :swiperCurrent="2" v-if="item.name == '已完成'" @openOnce="openOnce"
@@ -122,6 +122,29 @@
            }
        },
        methods: {
            //取消任务
            outOrders(d) {
                let that = this;
                uni.request({
                    url: this.$store.state.piAPI +
                        `taskqd/cancelTask?rid=${d.rid}&serid=${d.serid}&name=${that.$store.state.puserName}`,
                    method: "get",
                    // data: d,
                    header: {
                        "content-type": "application/x-www-form-urlencoded",
                    },
                    success(res) {
                        const data = res.data.msg;
                        if (data == "操作成功") {
                            uni.showToast({
                                title: data,
                                duration: 2000,
                            });
                        }
                        that.$store.commit("changegotuGrabOrders");
                    }
                })
            },
            //实时位置传递
            setNowposition(rid, jd, wd) {
                console.log(uni.getStorageSync("ids") || this.$store.state.puserID, rid, jd, wd);
@@ -148,7 +171,8 @@
            openOnce(val) {
                //打开地图
                // console.log(this.swiperCurrent)
                val["buttype"] = this.swiperCurrent == 1 ? 0 : (this.swiperCurrent == 0 ? 1 : 2); //tab标识,0正在进行,1可参与
                val["buttype"] = this.swiperCurrent == 1 ? 0 : (this.swiperCurrent == 0 ? 1 :
                    2); //tab标识,0正在进行,1可参与
                val["serid"] = (uni.getStorageSync("ids") || this.$store.state.puserID) + ",";
                val["appenUrl"] = this.$store.state.piAPI;
                //打开地图
pages/grabOrders/grabOrdersZAYWXC/inPage/page0.vue
@@ -20,11 +20,20 @@
                </view>
            </view>
            <view class="onve-right">
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini" :disabled="true">
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini" :disabled="true"
                    v-if="item.iscation == 0" @click="getOrders(swiperCurrent,item)">
                    <!-- <span class="Cation notCation">队员</span> -->
                    {{"完成反馈"}}
                    {{item.type == 1?"完成反馈":item.type == 0?"正在进行":"还未开始"}}
                </u-button>
                <view class="o-r-$">
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini"
                    :disabled="item.type == 1" v-if="item.iscation == 1" @click="getOrders(swiperCurrent,item)">
                    <!-- <span class="Cation orange">队长</span> -->
                    {{item.type == 1?"完成反馈":item.type == 0?"上传反馈":"开始任务"}}
                </u-button>
                <u-button class="o-r-down" :plain="true" size="mini" type="error" @click="outOrders(item)">
                    {{item.iscation == 0?'退出任务':'取消任务'}}
                </u-button>
                <view class="o-r-down">
                    积分:{{item.integral}}
                </view>
            </view>
@@ -66,6 +75,13 @@
                    item: item
                }
                this.$emit("getOrders", b);
            },
            outOrders(val) {
                let b = {
                    rid: val.id,
                    serid: this.$store.state.puserID
                };
                this.$emit("outOrders", b);
            }
        }
    }
@@ -131,8 +147,8 @@
            justify-content: center;
            flex-direction: column;
            view {
                margin-top: 10px;
            .o-r-down {
                margin-top: 4px;
            }
        }
pages/grabOrders/grabOrdersZAYWXC/inPage/page2.vue
@@ -20,15 +20,9 @@
                </view>
            </view>
            <view class="onve-right">
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini" :disabled="true"
                    v-if="item.iscation == 0" @click="getOrders(swiperCurrent,item)">
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini" :disabled="true">
                    <!-- <span class="Cation notCation">队员</span> -->
                    {{item.type == 1?"完成反馈":item.type == 0?"正在进行":"还未开始"}}
                </u-button>
                <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini"
                    :disabled="item.type == 1" v-if="item.iscation == 1" @click="getOrders(swiperCurrent,item)">
                    <!-- <span class="Cation orange">队长</span> -->
                    {{item.type == 1?"完成反馈":item.type == 0?"上传反馈":"开始任务"}}
                    {{"已完成"}}
                </u-button>
                <view class="o-r-$">
                    积分:{{item.integral}}