|
@@ -28,7 +28,7 @@
|
|
|
</image>
|
|
</image>
|
|
|
<button class="button-background en_button sys-weight-500 text-color-fff size-28 r-100"
|
|
<button class="button-background en_button sys-weight-500 text-color-fff size-28 r-100"
|
|
|
style="width: 200rpx;height: 70rpx;line-height: 70rpx;" type="default"
|
|
style="width: 200rpx;height: 70rpx;line-height: 70rpx;" type="default"
|
|
|
- hover-class="is-hover" v-else-if="type === 2">领取任务</button>
|
|
|
|
|
|
|
+ hover-class="is-hover" v-else-if="type === 2" @click.stop="takeTask(index)">领取任务</button>
|
|
|
<button class="button-background en_button sys-weight-500 text-color-fff size-28 r-100"
|
|
<button class="button-background en_button sys-weight-500 text-color-fff size-28 r-100"
|
|
|
style="width: 200rpx;height: 70rpx;line-height: 70rpx;" type="default"
|
|
style="width: 200rpx;height: 70rpx;line-height: 70rpx;" type="default"
|
|
|
hover-class="is-hover" v-else-if="type === 4">去处理</button>
|
|
hover-class="is-hover" v-else-if="type === 4">去处理</button>
|
|
@@ -46,14 +46,19 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="placeholder sys-list-background-color" v-if="is_bottom"></view>
|
|
<view class="placeholder sys-list-background-color" v-if="is_bottom"></view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <en-blank v-if="taskList.length<=0"></en-blank>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import EnButton from "@/components/en-utils/en-button/en-button.vue";
|
|
import EnButton from "@/components/en-utils/en-button/en-button.vue";
|
|
|
|
|
+ import {takeTask} from "@/api/task";
|
|
|
|
|
+ import tools from "@/service/tools";
|
|
|
|
|
+ import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
|
|
+ EnBlank,
|
|
|
EnButton
|
|
EnButton
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
@@ -85,15 +90,35 @@
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false
|
|
default: false
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
leftImg: ['task-house', 'task-business', 'task-repayment'],
|
|
leftImg: ['task-house', 'task-business', 'task-repayment'],
|
|
|
iconList: ['task-audit', 'task-do', 'task-stay'],
|
|
iconList: ['task-audit', 'task-do', 'task-stay'],
|
|
|
- lineColor: ['#DE5847', '#EF8F27', '#0FB160']
|
|
|
|
|
|
|
+ lineColor: ['#DE5847', '#EF8F27', '#0FB160'],
|
|
|
|
|
+ isAjax:false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ takeTask(index) {
|
|
|
|
|
+ if (this.isAjax) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isAjax = true;
|
|
|
|
|
+ takeTask({
|
|
|
|
|
+ 'id': this.taskList[index].id
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ this.isAjax = false
|
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
|
+ tools.success(res.msg)
|
|
|
|
|
+ // this.taskList.splice(index, 1)
|
|
|
|
|
+ this.$emit('takeTask',index)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ tools.error(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
getIconStatus() {
|
|
getIconStatus() {
|
|
|
return `/static/img/task/${this.iconList[this.iconStatus]}.png`
|
|
return `/static/img/task/${this.iconList[this.iconStatus]}.png`
|
|
|
},
|
|
},
|