|
@@ -1,5 +1,11 @@
|
|
|
<template>
|
|
|
<view v-show="show">
|
|
|
+ <view v-if="isfeedback && total" class="clear" @click="clearList">
|
|
|
+ <view class="total">共 {{ total }} 条</view>
|
|
|
+ <view class="clear-but" hover-class="navigator-hover">
|
|
|
+ 清空队列
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<operate-list :list="list" />
|
|
|
</view>
|
|
|
</template>
|
|
@@ -11,10 +17,14 @@ export default {
|
|
|
components: { operateList },
|
|
|
name: "queue",
|
|
|
props: {
|
|
|
- w_deviceid: String
|
|
|
+ w_deviceid: String,
|
|
|
+ isfeedback: {
|
|
|
+ type: [String, Number]
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ total: 0,
|
|
|
show: false,
|
|
|
uninitialized: true,
|
|
|
list: [],
|
|
@@ -47,17 +57,40 @@ export default {
|
|
|
paging.pageNumber = res.pageNumber + 1;
|
|
|
paging.pageTotal = res.pageTotal;
|
|
|
this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data)
|
|
|
+ this.total = res.total;
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ clearList() {
|
|
|
+ let that = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确定清空操作队列',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) that.$Http.basic({
|
|
|
+ "id": 20231128145402,
|
|
|
+ "content": {
|
|
|
+ w_deviceid: that.w_deviceid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if (that.cutoff(res.msg, '已清空队列')) return;
|
|
|
+ that.getList(true)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.search {
|
|
|
- position: sticky;
|
|
|
- top: 34px;
|
|
|
- z-index: 998;
|
|
|
+.clear {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ color: #fff;
|
|
|
+ width: 100vw;
|
|
|
+ padding: 0 18px 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-size: 12px;
|
|
|
}
|
|
|
</style>
|