| | |
| | | |
| | | <template> |
| | | <view> |
| | | <view class="tab"> |
| | | <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs> |
| | | </view> |
| | | <u-sticky> |
| | | <view class="bgc-ff"> |
| | | <view class="tab"> |
| | | <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}" |
| | | :activeStyle="{color:'#017BFC'}"> |
| | | </u-tabs> |
| | | <view class="search flex j-c-s-b a-i-c"> |
| | | <view class="tab-filter flex j-c-c a-i-c" @click="showDateModal"> |
| | | <text class="f-28">时间筛选</text> |
| | | <u-icon name="arrow-down"></u-icon> |
| | | </view> |
| | | <u-search placeholder="请输入需要查询信息的名称" v-model="keyword" :clearabled="true" :showAction="true" |
| | | :animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-sticky> |
| | | |
| | | <view class="list"> |
| | | <view class="list-item bgc-ff mb-20" v-for="i in 3"> |
| | | <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" |
| | | @click="navTo(i.id,i.reportType,i.status,i.type)"> |
| | | <view class="item-title flex a-i-c j-c-s-b mb-20"> |
| | | <text class="f-32 fw">名称</text> |
| | | <!-- <u-tag text="待审批" type="warning" plain plainFill></u-tag> --> |
| | | <u-tag text="审核通过" type="success" plain plainFill></u-tag> |
| | | <!-- <u-tag text="审核拒绝" type="error" plain plainFill></u-tag> --> |
| | | <text class="f-32 fw" v-if="i.reportType == 4">{{i.placeName}}</text> |
| | | <text class="f-32 fw" v-else>{{i.name}}</text> |
| | | <u-tag v-if="i.color" :bgColor='i.color' :borderColor='i.color' color="#191919" |
| | | :text="i.categoryName"></u-tag> |
| | | <u-tag v-if="i.status == 4" text="待完成" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag> |
| | | <u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag> |
| | | </view> |
| | | <view class="item-row flex a-i-c j-c-s-b"> |
| | | <text class="f-28">事件类型</text> |
| | | <text class="f-28 c-66">一次性任务</text> |
| | | </view> |
| | | <view class="item-row flex a-i-c j-c-s-b"> |
| | | <text class="f-28">标签</text> |
| | | <text class="f-28 c-66">打金店</text> |
| | | <text class="f-28">时间</text> |
| | | <text class="f-28 c-66">{{i.createTime}}</text> |
| | | </view> |
| | | <view class="item-row flex a-i-c j-c-s-b"> |
| | | <text class="f-28">地址</text> |
| | | <text class="address f-28 c-66">西市街道万达社区居民委员会滨江西路66号万达晶座11栋303室</text> |
| | | <text class="address f-28 c-66">{{i.addressName || ""}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-toast ref="uToast"></u-toast> |
| | | <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line /> |
| | | |
| | | <date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getAuditReportingList |
| | | } from "@/api/reporting/reporting" |
| | | import dateRangeModal from '@/components/dateRangeModal/modal.vue'; |
| | | export default { |
| | | data(){ |
| | | components: { |
| | | dateRangeModal |
| | | }, |
| | | data() { |
| | | return { |
| | | tabList:[ |
| | | tabList: [ |
| | | |
| | | { |
| | | name:"待审核", |
| | | status:1 |
| | | }, |
| | | { |
| | | name:"审核通过", |
| | | status:2 |
| | | }, |
| | | { |
| | | name:"已拒绝", |
| | | status:3 |
| | | }, |
| | | name: "全部", |
| | | status: "", |
| | | }, |
| | | { |
| | | name: "待完成", |
| | | status: 4, |
| | | }, |
| | | { |
| | | name: "待审核", |
| | | status: 1 |
| | | }, |
| | | { |
| | | name: "审核通过", |
| | | status: 2 |
| | | }, |
| | | { |
| | | name: "已拒绝", |
| | | status: 3 |
| | | } |
| | | ], |
| | | tabIndex:0 |
| | | tabIndex: 0, |
| | | currentStatus: "", |
| | | list: [], |
| | | loadingStatus: 'nomore', |
| | | currentPage: 1, |
| | | frequency: '', |
| | | reportType: "", |
| | | selectDate: [], |
| | | houseCode: "", |
| | | keyword: "" |
| | | } |
| | | }, |
| | | methods:{ |
| | | changeTab(e){ |
| | | this.tabIndex = e.index; |
| | | |
| | | onLoad(option) { |
| | | console.log(option); |
| | | if (option.reportType) { |
| | | this.reportType = option.reportType; |
| | | if (option.from == "task") { |
| | | this.tabIndex = 2; |
| | | this.currentStatus = 1; |
| | | } |
| | | if (option.reportType == 1) { |
| | | uni.setNavigationBarTitle({ |
| | | title: "取保监居" |
| | | }) |
| | | } else if (option.reportType == 7) { |
| | | uni.setNavigationBarTitle({ |
| | | title: "消防自查" |
| | | }) |
| | | } else if (option.reportType == 4) { |
| | | uni.setNavigationBarTitle({ |
| | | title: "校园安全检查" |
| | | }) |
| | | } else if (option.reportType == 5) { |
| | | uni.setNavigationBarTitle({ |
| | | title: "二手交易" |
| | | }) |
| | | // 去掉已完成状态 |
| | | this.tabList.splice(1, 1); |
| | | this.tabIndex = 1; |
| | | } |
| | | } |
| | | |
| | | if (option.from == "index") { |
| | | uni.setNavigationBarTitle({ |
| | | title: "场所任务" |
| | | }) |
| | | } |
| | | |
| | | if (option.code) { |
| | | this.houseCode = option.code; |
| | | } |
| | | // this.getList() |
| | | }, |
| | | |
| | | onShow() { |
| | | this.resetParams(); |
| | | this.getList() |
| | | }, |
| | | |
| | | onReachBottom() { |
| | | this.currentPage++ |
| | | this.getList() |
| | | }, |
| | | |
| | | methods: { |
| | | searchConfirm() { |
| | | this.resetParams() |
| | | this.getList() |
| | | }, |
| | | clearConfirm() { |
| | | this.keyword = '' |
| | | this.searchConfirm() |
| | | }, |
| | | changeTab(e) { |
| | | this.tabIndex = e.index; |
| | | this.currentStatus = e.status; |
| | | this.resetParams(); |
| | | this.getList(); |
| | | }, |
| | | resetParams() { |
| | | this.list = []; |
| | | this.currentPage = 1; |
| | | }, |
| | | getList() { |
| | | this.$nextTick(() => { |
| | | this.loadingStatus = 'loadingmore' |
| | | this.$refs.uToast.show({ |
| | | type: 'loading', |
| | | message: '正在加载', |
| | | duration: 9999999 |
| | | }) |
| | | }) |
| | | let params = { |
| | | current: this.currentPage, |
| | | size: 20, |
| | | status: this.currentStatus, |
| | | frequency: this.frequency |
| | | } |
| | | if (this.selectDate.length) { |
| | | params.startTime = this.selectDate[0] |
| | | params.endTime = this.selectDate[1] |
| | | } |
| | | if (this.houseCode) { |
| | | params.houseCode = this.houseCode; |
| | | } |
| | | |
| | | if (this.reportType) { |
| | | params.reportType = this.reportType |
| | | } |
| | | if (this.keyword) { |
| | | params.name = this.keyword; |
| | | } |
| | | |
| | | getAuditReportingList(params).then(res => { |
| | | if (res.code != 200) { |
| | | uni.showToast({ |
| | | title: '数据请求失败', |
| | | icon: 'error' |
| | | }) |
| | | return |
| | | } |
| | | let records = res.data.records; |
| | | this.list = [...this.list, ...records] |
| | | this.$nextTick(() => { |
| | | this.$refs.uToast.isShow = false |
| | | }) |
| | | this.loadingStatus = 'nomore' |
| | | }) |
| | | }, |
| | | navTo(id, reportType, status, type) { |
| | | if (status == 4) { |
| | | if (reportType == 8) { |
| | | this.navToDetail(reportType, id, type) |
| | | } else { |
| | | if (uni.getStorageSync("activeRole").roleName == "民警") { |
| | | this.navToDetail(reportType, id, type) |
| | | } else { |
| | | this.navToEdit(reportType, id, type); |
| | | } |
| | | } |
| | | } else { |
| | | this.navToDetail(reportType, id, type) |
| | | } |
| | | }, |
| | | |
| | | navToEdit(reportType, id, type) { |
| | | // if (reportType == 1) { |
| | | // this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`) |
| | | // } else if (reportType == 2 || type == 7) { |
| | | // this.$u.func.globalNavigator(`/subPackage/label/hotel?id=${id}`) |
| | | // } else if (reportType == 3 || reportType == 4 || reportType == 5) { |
| | | // this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`) |
| | | // } else if (reportType == 6) { |
| | | // this.$u.func.globalNavigator(`/subPackage/label/school?id=${id}`) |
| | | // } |
| | | |
| | | if (reportType == 1) { |
| | | this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`) |
| | | } else if (reportType == 2) { |
| | | this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}`) |
| | | } else if (reportType == 5) { |
| | | this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`) |
| | | } |
| | | }, |
| | | |
| | | navToDetail(reportType, id, type) { |
| | | // if (reportType == 1) { |
| | | // this.$u.func.globalNavigator(`bailReportDetail?id=${id}`) |
| | | // } else if (reportType == 2 || type == 7) { |
| | | // this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`) |
| | | // } else if (reportType == 3 || reportType == 4 || reportType == 5) { |
| | | // this.$u.func.globalNavigator(`labelReportDetail?id=${id}`) |
| | | // } else if (reportType == 6) { |
| | | // this.$u.func.globalNavigator(`schoolReportDetail?id=${id}`) |
| | | // } else { |
| | | // this.$u.func.globalNavigator(`checkReform?id=${id}`) |
| | | // } |
| | | |
| | | if (reportType == 1) { |
| | | this.$u.func.globalNavigator(`bailReportDetail?id=${id}`) |
| | | } else if (reportType == 7 || reportType == 4) { |
| | | if (reportType == 4) { |
| | | this.$u.func.globalNavigator(`/subPackage/school/securityDetail?id=${id}&type=2`) |
| | | } else { |
| | | this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`) |
| | | } |
| | | |
| | | } else if (reportType == 5) { |
| | | this.$u.func.globalNavigator(`labelReportDetail?id=${id}`) |
| | | } else { |
| | | this.$u.func.globalNavigator(`checkReform?id=${id}`) |
| | | } |
| | | }, |
| | | |
| | | showDateModal() { |
| | | this.$refs.dateRane.open(); |
| | | }, |
| | | |
| | | handleRestDate() { |
| | | this.selectDate = []; |
| | | this.resetParams(); |
| | | this.getList() |
| | | }, |
| | | handleComfirmDate(val) { |
| | | this.selectDate = val; |
| | | this.resetParams(); |
| | | this.getList() |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page{ |
| | | background-color:#F5F5F5; |
| | | page { |
| | | background-color: #F5F5F5; |
| | | } |
| | | .tab{ |
| | | width:100%; |
| | | height:88rpx; |
| | | position:fixed; |
| | | /*#ifdef H5*/ |
| | | top:88rpx; |
| | | /*#endif*/ |
| | | /*#ifdef MP-WEIXIN*/ |
| | | top:0; |
| | | /*#endif*/ |
| | | left:0; |
| | | background-color:#fff; |
| | | padding:0 30rpx; |
| | | box-sizing: border-box; |
| | | z-index: 999; |
| | | |
| | | |
| | | |
| | | |
| | | .tab { |
| | | // width: 100%; |
| | | |
| | | } |
| | | .tab /deep/.u-tabs__wrapper__nav__item{ |
| | | flex:1; |
| | | |
| | | .search { |
| | | padding: 20rpx 20rpx; |
| | | } |
| | | .list{ |
| | | margin:118rpx 30rpx 0; |
| | | |
| | | // .tab /deep/.u-tabs__wrapper__nav__item { |
| | | // flex: 1; |
| | | // } |
| | | .tab-filter { |
| | | padding: 0 20rpx; |
| | | } |
| | | .list-item{ |
| | | padding:0 30rpx 20rpx; |
| | | |
| | | .list { |
| | | margin: 20rpx 30rpx 0; |
| | | } |
| | | |
| | | .list-item { |
| | | padding: 0 30rpx 20rpx; |
| | | border-radius: 8rpx; |
| | | .item-title{ |
| | | padding:30rpx 0; |
| | | border-bottom:1px solid #F5F5F5; |
| | | |
| | | .item-title { |
| | | padding: 30rpx 0; |
| | | border-bottom: 1px solid #F5F5F5; |
| | | } |
| | | .item-row{ |
| | | padding:10rpx 0; |
| | | .address{ |
| | | width:65%; |
| | | |
| | | .item-row { |
| | | padding: 10rpx 0; |
| | | |
| | | .address { |
| | | width: 65%; |
| | | text-align: right; |
| | | } |
| | | } |
| | | } |