|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <template>
- <view class="pages">
- <view class="header">
- <view class="items" @tap="jumpPage">
- 项目未标记{{ pageParams.statDateStart }}至{{ pageParams.statDateEnd }}
- </view>
- </view>
- <view class="wordslist">
- <!-- block -->
- <view v-for="(data, index) in pageData" class="item" :key="data.houseId" @tap="jumpPage(data, index)">
- <view class="items blue" :class="{noneColor: index == 0 }">{{ data.houseName }}</view>
- <view class="items">{{ data.unTagCustomer || 0 }}</view>
- <view class="items">{{ data.tagCustomer || 0 }}</view>
- </view>
- </view>
-
- <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
- </view>
- </template>
-
- <script>
- export default {
- data() {
- return {
- pageParams: {
- statDateStart: '', //开始时间
- statDateEnd: '', //结束时间
- orgCode: '', //id
- messageType: '',
- },
- showTimeCalender: '选择日期', //
- totalTimeShow: false, // 自定义时间
- inParams: '', // 入参
- pageData: [], // 页面数据
- };
- },
-
- onLoad(option) {
- if (option) {
- this.inParams = this.params(option)
- }
- if (option.orgCode) {
- this.pageParams.orgCode = option.orgCode
- }
- if (option.staTime && option.endtime) {
- this.pageParams.statDateStart = option.staTime
- this.pageParams.statDateEnd = option.endtime
- }
- if (option.messageType) {
- this.pageParams.messageType = option.messageType
- }
- console.log(this.inParams)
- this.findSensitiveWordsData()
- },
-
- methods: {
- // 对象转url参数
- params(json) {
- return Object.keys(json).map(key => key + '=' + json[key]).join('&');
- },
-
- //
- jumpPage(data, index) {
- if (index == 0) return
- uni.navigateTo({
- url: `/pages/center/records/index?${this.inParams}&houseId=${data.houseId}`
- });
- },
-
- // findSensitiveWordsData
- findSensitiveWordsData() {
- this.$u.post('/customer/findNotMarkAdvisorCount', this.pageParams).then(res => {
- console.log(res)
- res.unshift({
- houseName: '项目名称',
- tagCustomer: this.pageParams.messageType == 1 ? '对比昨天' : '对比上一周',
- unTagCustomer: '未标记数量',
- houseId: new Date().getTime(),
- })
- this.pageData = res
- })
- },
-
- // 自定义时间
- totalTimeChange(e) {
- console.log(e)
- this.pageParams.statDateStart = startDate
- this.pageParams.statDateEnd = endDate
- this.findSensitiveWordsData()
- },
- }
- }
- </script>
-
- <style lang="scss">
- .pages {
- width: 100vw;
- min-height: 100vh;
- display: flex;
- flex-direction: column;
-
- .header {
- width: 100%;
- height: 90rpx;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .items {
- height: 100%;
- flex-grow: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 32rpx;
- font-weight: bold;
-
- }
- }
-
- .wordslist {
- width: 100%;
- padding: 20rpx;
-
- .item {
- width: 100%;
- height: 90rpx;
- display: flex;
- align-items: center;
-
- .items {
- flex-grow: 1;
- width: 125rpx;
- text-align: center;
- font-size: 26rpx;
-
- &.blue {
- color: #1890FF;
- }
-
- &.noneColor {
- color: #333;
- }
- }
- }
- }
- }
- </style>
|