| | |
| | | <!-- <template name="scene-picker"> --> |
| | | <import src="/behaviors/picker/template-selector.wxml" /> |
| | | |
| | | <block wx:if="{{sceneMode == 0}}"> |
| | | <template is="picker-selector" data="{{key: 'scene', value: sceneText}}" /> |
| | | <t-picker |
| | | visible="{{sceneVisible}}" |
| | | value="{{sceneValue}}" |
| | |
| | | <view class="enterprise-info__wrap" bind:tap="handCellClick"> |
| | | <view class="enterprise-info__wrap"> |
| | | <view class="enterprise-info__top" bind:tap="handCellClick"> |
| | | <view slot="image" class="enterprise-info__img"> |
| | | <view class="enterprise-info__img__score"> {{item.score}} </view> |
| | | <view class="enterprise-info__img__text"> èªè¯ </view> |
| | | <t-tag |
| | | max-width="{{130}}" |
| | | shape="square" |
| | | size="small" |
| | | theme="default" |
| | | variant="light-outline" |
| | | >{{item.updateTime}}</t-tag |
| | | > |
| | | <t-tag max-width="{{130}}" shape="square" size="small" theme="default" variant="light-outline">{{item.updateTime}} |
| | | </t-tag> |
| | | </view> |
| | | <view class="enterprise-info__main"> |
| | | <view slot="title" class="enterprise-info__title"> {{item.name}} </view> |
| | | <t-divider /> |
| | | <view slot="description" class="enterprise-info__tag"> |
| | | <t-tag |
| | | max-width="{{130}}" |
| | | shape="square" |
| | | size="small" |
| | | theme="success" |
| | | variant="light-outline" |
| | | disabled |
| | | >è¿è¥ä¸</t-tag |
| | | > |
| | | <t-tag |
| | | t-class="t-class-tag" |
| | | max-width="{{130}}" |
| | | shape="square" |
| | | size="medium" |
| | | theme="default" |
| | | variant="light" |
| | | >{{item.district}}</t-tag |
| | | > |
| | | <t-tag |
| | | t-class="t-class-tag" |
| | | max-width="{{130}}" |
| | | shape="square" |
| | | size="medium" |
| | | theme="default" |
| | | variant="light" |
| | | >{{item.sceneType}}</t-tag |
| | | > |
| | | <t-tag max-width="{{130}}" shape="square" size="small" theme="success" variant="light-outline" disabled>è¿è¥ä¸ |
| | | </t-tag> |
| | | <t-tag t-class="t-class-tag" max-width="{{130}}" shape="square" size="medium" theme="default" variant="light"> |
| | | {{item.district}}</t-tag> |
| | | <t-tag t-class="t-class-tag" max-width="{{130}}" shape="square" size="medium" theme="default" variant="light"> |
| | | {{item.sceneType}}</t-tag> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <slot></slot> |
| | | </view> |
| | |
| | | box-shadow: var(--td-shadow-4); |
| | | padding: var(--td-spacer-1); |
| | | margin-top: var(--td-spacer); |
| | | display: flex; |
| | | } |
| | | |
| | | .enterprise-info__wrap:active { |
| | | .enterprise-info__top:active { |
| | | background-color: var(--td-gray-color-1); |
| | | } |
| | | |
| | | .enterprise-info__top { |
| | | display: flex; |
| | | } |
| | | |
| | | .enterprise-info__img { |
| | | display: block; |
| | | } |
| | |
| | | <import src="/behaviors/picker/template-selector.wxml" /> |
| | | |
| | | <t-sticky> |
| | | <!-- <t-sticky> --> |
| | | <view class="filter-wrap"> |
| | | <view class="filter-item" bind:tap="handleSort"> |
| | | <text style="color: {{sorts !== '' ? color : '' }}">è¯å</text> |
| | |
| | | <view class="filter-wrap-2"> |
| | | <include src="/behaviors/picker/scene/template-scene.wxml" /> |
| | | </view> |
| | | </t-sticky> |
| | | <!-- </t-sticky> --> |
| | | |
| | | <include src="/behaviors/picker/time/template-time.wxml" /> |
| | | <!-- çéå¼¹æ¡ --> |
| | |
| | | extClass: { |
| | | type: String, |
| | | value: '' |
| | | }, |
| | | // æ¯å¦åºé¨ç©ºåºå®å
¨è·ç¦» |
| | | safeBottom :{ |
| | | type: Boolean, |
| | | value: true |
| | | } |
| | | }, |
| | | data: { |
| | |
| | | <!--component/mygallery/mygallery.wxml--> |
| | | <page-container show="{{show}}"> |
| | | <view class="fyui-gallery {{show ? 'fyui-gallery_show' : ''}} {{extClass}}"> |
| | | <view class="fyui-gallery {{show ? 'fyui-gallery_show' : ''}} {{extClass}} {{safeBottom ? 'safe-bottom' : ''}}"> |
| | | <t-icon wx:if="{{showRemark}}" class="fyui-gallery__close" name="close" color="white" size="26" bindtap="hideGallery"></t-icon> |
| | | <view class="fyui-gallery__info" wx:if="{{true}}">{{current+1}} / {{currentImgs.length}}</view> |
| | | <swiper class="fyui-gallery__img__wrp" bindtap="toggle" indicator-dots="{{false}}" bindanimationfinish="change" current="{{current}}" autoplay="{{false}}" duration="{{500}}"> |
| | |
| | | flex-wrap: nowrap |
| | | } |
| | | |
| | | .safe-bottom { |
| | | bottom: calc(env(safe-area-inset-bottom) + 96rpx); |
| | | } |
| | | |
| | | .fyui-gallery_show { |
| | | display: flex |
| | | } |
| | |
| | | data-key="province" |
| | | bindtap="showCascader" |
| | | > |
| | | <text>{{_.defaultSelectOption(provinceText)}}</text> |
| | | <text class="picker-selector__text">{{_.defaultSelectOption(provinceText)}}</text> |
| | | <t-icon name="caret-down-small" size="36rpx" color="{{color}}" /> |
| | | </view> |
| | | <view |
| | |
| | | color: rgba(51, 51, 51, 1); |
| | | } |
| | | |
| | | .picker-selector>text { |
| | | .picker-selector .picker-selector__text { |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | overflow: hidden; |
| | |
| | | // 宿³èªå©å°ç¨åº |
| | | const baseUrl = 'http://192.168.0.103:8082'; |
| | | // const baseUrl = 'https://fyami.com.cn'; |
| | | // const baseUrl = 'http://192.168.0.103:8082'; |
| | | const baseUrl = 'https://fyami.com.cn'; |
| | | |
| | | // 宿³èªå©å°ç¨åºå¾ç |
| | | const bu = 'https://fyami.com.cn'; |
| | |
| | | m.upload++; |
| | | } |
| | | m.children.push({ |
| | | subTypeId: s.ledgerSubTypeId, |
| | | name: s.ledgerName, |
| | | icon: s.iconUrl, |
| | | upload: s.upLoad, |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // å³ä¸è§æé®ç¹å»äºä»¶ |
| | | noteClick() { |
| | | this.triggerEvent('noteClick'); |
| | | }, |
| | | // å
·ä½æä¸ªå°è´¦ç¹å»äºä»¶ |
| | | ledgerClick(e) { |
| | | this.triggerEvent('ledgerClick', e.currentTarget.dataset.ledger); |
| | | } |
| | | }, |
| | | }); |
| | |
| | | > |
| | | <view |
| | | class="enterprise-info__ledger-wrap {{(child.upload || !child.needUpdate) ? 'enterprise-info__ledger-wrap__disable' : ''}}" |
| | | data-ledger="{{child}}" |
| | | bind:tap="ledgerClick" |
| | | > |
| | | <view class="enterprise-info__ledger-item__left"> |
| | | <text |
| | |
| | | } |
| | | }, |
| | | |
| | | navToLedger(e) { |
| | | navToLedgerHistory(e) { |
| | | const { mode } = e.currentTarget.dataset; |
| | | wx.navigateTo({ |
| | | url: `/pages/enterprise/ledger/history/index?userId=${this.data.enterprise.id}&sceneTypeId=${this.data.enterprise.sceneTypeId}&time=${this.data.monthValue}&mode=${mode}`, |
| | | }); |
| | | }, |
| | | |
| | | navToLedgerDetail(e) { |
| | | const ledger = e.detail; |
| | | console.log('navToLedgerDetail', ledger); |
| | | wx.navigateTo({ |
| | | url: `/pages/enterprise/ledger/detail/index`, |
| | | }); |
| | | }, |
| | | |
| | | navToPromise() { |
| | | // wx.navigateTo({ |
| | | // url: `/pages/enterprise/promise/history/index?userId=${this.data.enterprise.id}`, |
| | |
| | | loading="{{loadStatus == 1}}" |
| | | value="{{selfCheckInfo}}" |
| | | data-mode="1" |
| | | bind:noteClick="navToLedger" |
| | | bind:noteClick="navToLedgerHistory" |
| | | bind:ledgerClick="navToLedgerDetail" |
| | | ></t-ledger-stat> |
| | | <t-ledger-stat |
| | | title="å°è´¦ç®¡ç" |
| | |
| | | loading="{{loadStatus == 1}}" |
| | | value="{{ledgerInfo}}" |
| | | data-mode="2" |
| | | bind:noteClick="navToLedger" |
| | | bind:noteClick="navToLedgerHistory" |
| | | bind:ledgerClick="navToLedgerDetail" |
| | | ></t-ledger-stat> |
| | | <t-assessment-stat |
| | | title="èªæµèªè¯" |
| | |
| | | label: { |
| | | show: true, |
| | | position: 'inside', |
| | | formatter: '{d}%', |
| | | // formatter: '{d}%', |
| | | formatter: function (params) { |
| | | let perStr = params.percent + ''; |
| | | if (perStr.indexOf('.') != -1) { |
| | | let percent = params.percent.toFixed(1); // ä¿ç两ä½å°æ° |
| | | return `${percent}%`; |
| | | } else { |
| | | let percent = params.percent.toFixed(0); |
| | | return `${percent}%`; |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | }, |
| | | |
| | | summaryAnalysis(data) { |
| | | const {time, inspection: v} = this.data |
| | | const { time, inspection: v } = this.data; |
| | | // ç»åè¡æ¿åºå |
| | | let loc = ''; |
| | | loc += v.provinceName ? v.provinceName : ''; |
| | |
| | | loc += v.districtName ? `${v.districtName}` : ''; |
| | | loc += v.townName ? `${v.townName}` : ''; |
| | | // æ¶é´ |
| | | const timeText = dayjs(time).format('YYYYå¹´MMæ') |
| | | const timeText = dayjs(time).format('YYYYå¹´MMæ'); |
| | | |
| | | // æ»ç» |
| | | let summaryText = ''; |
| | |
| | | totalC += p.changeCount; |
| | | }); |
| | | const cPer = totalP == 0 ? '--' : Math.round((totalC / totalP) * 1000) / 10 + '%'; |
| | | summaryText = `${loc+timeText}å
±åç°${data.length}ç§ç±»åé®é¢ï¼é®é¢æ»è®¡${totalP}ä¸ªï¼æ´æ¹ç${cPer}`; |
| | | summaryText = `${loc + timeText}å
±åç°${ |
| | | data.length |
| | | }ç§ç±»åé®é¢ï¼é®é¢æ»è®¡${totalP}ä¸ªï¼æ´æ¹ç${cPer}`; |
| | | this.setData({ summaryText }); |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | item: { |
| | | type: Object, |
| | | observer(value) { |
| | | if (value.path1 && value.path1.length > 0) { |
| | | this.setData({ |
| | | picPath: value.path1[0], |
| | | leftPic: value.path1.length - 1, |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | indexText: '01.' |
| | | indexText: '01.', |
| | | }, |
| | | |
| | | /** |
| | |
| | | <text slot="error">æªæäº¤</text> |
| | | </t-image> |
| | | <block wx:else> |
| | | <t-image |
| | | <!-- <t-image |
| | | wx:for="{{item.path1}}" |
| | | wx:key="index" |
| | | wx:for-item="urlItem" |
| | |
| | | height="80rpx" |
| | | shape="round" |
| | | aria-label="{{item.ledgerName}}" |
| | | /> --> |
| | | <t-image |
| | | t-class="t-class-image" |
| | | src="{{picPath}}" |
| | | mode="aspectFill" |
| | | width="80rpx" |
| | | height="80rpx" |
| | | shape="round" |
| | | aria-label="{{item.ledgerName}}" |
| | | /> |
| | | <view wx:if="{{leftPic > 0}}" class="left-pic">+{{leftPic}}</view> |
| | | </block> |
| | | </view> |
| | | </view> |
| | |
| | | position: relative; |
| | | } |
| | | |
| | | .patrol-unfinished::after { |
| | | /* .patrol-unfinished::after { |
| | | content: ''; |
| | | position: absolute; |
| | | bottom: 0; |
| | |
| | | border-right: var(--ei-triangle-border) solid var(--td-error-color-6); |
| | | border-top: var(--ei-triangle-border) solid transparent; |
| | | border-left: var(--ei-triangle-border) solid transparent; |
| | | } |
| | | } */ |
| | | |
| | | .patrol-finished { |
| | | position: relative; |
| | | opacity: 0.7; |
| | | } |
| | | |
| | | .patrol-finished::after { |
| | | /* .patrol-finished::after { |
| | | content: ''; |
| | | position: absolute; |
| | | bottom: 0; |
| | |
| | | border-right: var(--ei-triangle-border) solid var(--td-success-color-6); |
| | | border-top: var(--ei-triangle-border) solid transparent; |
| | | border-left: var(--ei-triangle-border) solid transparent; |
| | | } |
| | | } */ |
| | | |
| | | .patrol-record-text-wrap { |
| | | width: 50%; |
| | | display: flex; |
| | | gap: 4px; |
| | | align-items: baseline; |
| | | flex: 1; |
| | | } |
| | | |
| | | .patrol-record-img-wrap { |
| | |
| | | border: 1px solid rgba(0, 0, 0, 0.1); |
| | | font-size: var(--td-font-size-s); |
| | | } |
| | | |
| | | .left-pic { |
| | | position: absolute; |
| | | right: 4px; |
| | | bottom: 4px; |
| | | background-color: rgba(250, 250, 250, 0.705); |
| | | border: 1px solid rgba(0, 0, 0, 0.452); |
| | | border-radius: 6px; |
| | | font-size: 12px; |
| | | line-height: 12px; |
| | | width: 14px; |
| | | height: 14px; |
| | | padding: 2px; |
| | | } |
| | |
| | | size="extra-small" |
| | | bindtap="onSelfPatrolPickerChange" |
| | | > |
| | | <!-- {{selectedPatrolTypes[patrolPopupIndex].selectedCount > 0 ? '(' + selectedPatrolTypes[patrolPopupIndex].selectedCount + ')' : ''}} --> |
| | | {{selectedPatrolTypes[patrolPopupIndex].selectedCount > 0 ? '(' + selectedPatrolTypes[patrolPopupIndex].selectedCount + ')' : ''}} |
| | | ç¡®å® |
| | | </t-button> |
| | | </view> |
| | |
| | | // pages/supervision/index.js |
| | | import { useLoading } from '../../behaviors/loading'; |
| | | import { useTopic } from './topic-proxy.js'; |
| | | import { useRankResult } from './rank-result-proxy.js'; |
| | | import { fetchGradeList } from '../../services/enterprise/fetchAssessment'; |
| | | import { sceneTypeList } from '../../common/dataSceneTypes'; |
| | | import dayjs from 'dayjs'; |
| | | |
| | | Page({ |
| | | behaviors: [useLoading], |
| | | behaviors: [useLoading, useTopic, useRankResult], |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | |
| | | init() { |
| | | this.optionsCount++; |
| | | // å
æ¬æ¶é´ãåºæ¯ç±»åãåºåä¸ä¸ªé项ï¼å
¨é¨è·ååå§å¼åï¼æ§è¡å è½½ |
| | | if (this.optionsCount == 3) this._startLoad(); |
| | | if (this.optionsCount == 3) { |
| | | // åå§åä¸é¢ç®¡ççé项 |
| | | this.initselectedTopics(); |
| | | this._startLoad(); |
| | | } |
| | | }, |
| | | |
| | | _fetchData(page) { |
| | | let { |
| | | province, |
| | | city, |
| | | district, |
| | | town, |
| | | area, |
| | | management, |
| | | sorts, |
| | | sceneType, |
| | | period, |
| | | } = this.data.searchOptions; |
| | | let { province, city, district, town, area, management, sorts, sceneType, period } = |
| | | this.data.searchOptions; |
| | | return fetchGradeList({ |
| | | page, |
| | | data: { |
| | |
| | | sceneTypes: [sceneType], |
| | | }, |
| | | }).then(res => { |
| | | const startIndex = page == 1 ? 0 : this.data.searchResult.length |
| | | this.setData({ |
| | | searchResult: |
| | | page == 1 ? res.data : this.data.searchResult.concat(res.data), |
| | | searchResult: page == 1 ? res.data : this.data.searchResult.concat(res.data), |
| | | }); |
| | | // è·åä¸é¢ç¸å
³çå°è´¦ä¿¡æ¯ |
| | | this.fetchTopicLedgers(startIndex); |
| | | return res.head; |
| | | }); |
| | | }, |
| | |
| | | const { timeValue } = e.detail; |
| | | const p = dayjs(timeValue); |
| | | const period = `${p.year()}/${p.month() + 1}-${p.month() + 1}`; |
| | | const time = p.format('YYYY-MM-DD'); |
| | | this.setData({ |
| | | ['searchOptions.period']: period, |
| | | ['searchOptions.time']: time, |
| | | }); |
| | | }, |
| | | initTime(e) { |
| | |
| | | }, |
| | | handleScenePickerChange(e) { |
| | | this.setSceneValue(e); |
| | | // åå§åä¸é¢ç®¡ççé项 |
| | | this.initselectedTopics(); |
| | | this._startLoad(); |
| | | }, |
| | | |
| | |
| | | |
| | | setPopupValue(e) { |
| | | const { searchOptions } = this.data; |
| | | const { |
| | | provinceText, |
| | | cityText, |
| | | districtText, |
| | | townText, |
| | | areaText, |
| | | managementText, |
| | | } = e.detail; |
| | | const { provinceText, cityText, districtText, townText, areaText, managementText } = e.detail; |
| | | searchOptions.province = provinceText; |
| | | searchOptions.city = cityText; |
| | | searchOptions.district = districtText; |
| | |
| | | "load-more": "/components/load-more/index", |
| | | "t-empty-page": "/components/empty-page/index", |
| | | "enterprise-rank-result": "/components/enterprise-rank-result/index", |
| | | "scene-picker": "/components/scene-picker/index" |
| | | "scene-picker": "/components/scene-picker/index", |
| | | "patrol-record": "../selfpatrol/components/patrol-record/index", |
| | | "my-gallery": "/components/gallery/index" |
| | | } |
| | | } |
| | |
| | | <view class="supervision-search" bind:tap="navToSearchPage"> |
| | | <t-search placeholder="{{placeholder}}" leftIcon="search" disabled> </t-search> |
| | | </view> |
| | | <filter |
| | | sceneMode="{{1}}" |
| | | bind:sortsChange="handleSortsChange" |
| | | bind:timeInitValue="initTime" |
| | | bind:timePickerChange="handleTimePickerChange" |
| | | bind:sceneInitValue="initScene" |
| | | bind:scenePickerChange="handleScenePickerChange" |
| | | bind:showFilterPopup="showFilterPopup" |
| | | > |
| | | <filter-popup-2 |
| | | slot="filterPopup" |
| | | show="{{show}}" |
| | | bind:showFilterPopupClose="showFilterPopupClose" |
| | | bind:initValue="initPopup" |
| | | bind:reset="onPopupSearch" |
| | | bind:confirm="onPopupSearch" |
| | | > |
| | | <t-sticky> |
| | | <filter sceneMode="{{1}}" bind:sortsChange="handleSortsChange" bind:timeInitValue="initTime" |
| | | bind:timePickerChange="handleTimePickerChange" bind:sceneInitValue="initScene" |
| | | bind:scenePickerChange="handleScenePickerChange" bind:showFilterPopup="showFilterPopup"> |
| | | <filter-popup-2 slot="filterPopup" show="{{show}}" bind:showFilterPopupClose="showFilterPopupClose" |
| | | bind:initValue="initPopup" bind:reset="onPopupSearch" bind:confirm="onPopupSearch"> |
| | | </filter-popup-2> |
| | | </filter> |
| | | <include src="./topic.wxml" /> |
| | | </t-sticky> |
| | | </view> |
| | | |
| | | <view class="page-container"> |
| | | <template is="pulldown-loading" wx:if="{{pageLoading && searchResult.length != 0}}" /> |
| | | <block wx:if="{{searchResult.length > 0}}"> |
| | | <enterprise-rank-result |
| | | wx:for="{{searchResult}}" |
| | | wx:key="index" |
| | | wx:for-index="index" |
| | | result="{{item}}" |
| | | bind:click="handCellClick" |
| | | ></enterprise-rank-result> |
| | | <include src="./rank-result.wxml" /> |
| | | </block> |
| | | <t-empty-page wx:elif="{{!pageLoading}}" description="æ èªè¯è®°å½" /> |
| | | <load-more list-is-empty="{{!searchResult.length}}" status="{{loadStatus}}" bind:retry="_startLoad" /> |
| | |
| | | /* pages/supervision/index.wxss */ |
| | | @import './topic.wxss'; |
| | | @import './rank-result.wxss'; |
| | | |
| | | .page .page-header { |
| | | /* background: linear-gradient(var(--td-primary-color-7), var(--td-primary-color-4)); |
| | | min-height: 380rpx; |
| | |
| | | padding-top: 1px; |
| | | } |
| | | |
| | | .supervision__loading{ |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 50rpx; |
| | | } |
| | | |
| | | .fy-loading { |
| | | text-align: center; |
| | | background-color: transparent; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * æåå表 |
| | | */ |
| | | export const useRankResult = Behavior({ |
| | | data: {}, |
| | | methods: { |
| | | ledgerClick() {}, |
| | | previewImage(e) { |
| | | const { index1, index2 } = e.currentTarget.dataset; |
| | | const ledger = this.data.searchResult[index1].topics[index2].detail; |
| | | if (ledger.ledgerFinished) { |
| | | const previewTitle = ledger.ledgerName; |
| | | const previewRemark = ledger.remark1; |
| | | const previewImageUrls = ledger.path1; |
| | | this.setData({ |
| | | previewImageUrls, |
| | | previewRemark, |
| | | previewTitle, |
| | | previewCurrent: 0, |
| | | showPreview: true, |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <wxs src="../enterprise/detail/components/utils.wxs" module="_" /> |
| | | |
| | | <enterprise-rank-result wx:for="{{searchResult}}" wx:key="index" wx:for-index="index" result="{{item}}" |
| | | bind:click="handCellClick"> |
| | | <view wx:if="{{item.topicLoading}}" class="supervision__loading"> |
| | | <t-loading theme="dots" size="50rpx" /> |
| | | </view> |
| | | <block wx:elif="{{item.topics.length > 0}}"> |
| | | <t-divider /> |
| | | <!-- <view wx:for="{{item.topics}}" wx:key="index2" wx:for-item="item2" wx:for-index="index2"> |
| | | {{item2.ledgerName}} |
| | | </view> --> |
| | | <t-collapse default-expand-all> |
| | | <t-collapse-panel header="å°è´¦ä¸ä¼ æ
åµ" value="0" t-class-header="t-class-collapse-panel-header" |
| | | t-class-content="t-class-collapse-panel-content" expandIcon |
| | | style="--td-cell-title-color: var(--td-text-color-primary)"> |
| | | <view slot="content"> |
| | | <block wx:for="{{item.topics}}" wx:for-index="index2" wx:key="index2" wx:for-item="item2"> |
| | | <!-- <view |
| | | class="enterprise-info__ledger-wrap {{(item2.upload || !item2.needUpdate) ? 'enterprise-info__ledger-wrap__disable' : ''}}" |
| | | data-ledger="{{item2}}" bind:tap="ledgerClick"> --> |
| | | |
| | | <patrol-record item="{{item2.detail}}" index="{{index2}}" data-index1="{{index}}" data-index2="{{index2}}" |
| | | bindtap="previewImage"> |
| | | </patrol-record> |
| | | <!-- <view class="enterprise-info__ledger-item__left"> |
| | | <text style="color: {{item2.needUpdate ? ' var(--td-error-color);' : 'transparent;'}}">*</text> |
| | | {{item2.ledgerName}} |
| | | </view> |
| | | <view class="enterprise-info__ledger-item__right"> |
| | | {{item2.upload ? 'â' : 'â'}} |
| | | </view> |
| | | <view class="enterprise-info__ledger-item__right"> |
| | | {{item2.onTime ? 'åæ¶' : (item2.upload ? 'è¶
æ¶' : '-')}} |
| | | </view> --> |
| | | <!-- </view> --> |
| | | |
| | | <t-divider /> |
| | | </block> |
| | | </view> |
| | | </t-collapse-panel> |
| | | </t-collapse> |
| | | </block> |
| | | </enterprise-rank-result> |
| | | |
| | | <my-gallery safeBottom="{{true}}" hide-on-click="{{true}}" show-delete="{{false}}" show="{{showPreview}}" |
| | | img-urls="{{previewImageUrls}}" current="{{previewCurrent}}" title="{{previewTitle}}" remark="{{previewRemark}}"> |
| | | </my-gallery> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | .enterprise-info__ledger-wrap { |
| | | display: flex; |
| | | /* color: var(--td-error-color); */ |
| | | font-size: var(--td-font-size-base); |
| | | } |
| | | |
| | | .enterprise-info__ledger-wrap__disable { |
| | | color: var(--td-text-color-disabled); |
| | | } |
| | | |
| | | .enterprise-info__ledger-wrap__header { |
| | | color: var(--td-text-color-secondary); |
| | | /* border-bottom: 1rpx solid var(--td-gray-color-1); */ |
| | | margin-bottom: var(--td-spacer); |
| | | } |
| | | |
| | | .enterprise-info__ledger-wrap .enterprise-info__ledger-item__left, |
| | | .enterprise-info__ledger-item__right { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 2px; |
| | | flex: 3; |
| | | } |
| | | |
| | | .enterprise-info__ledger-item__right { |
| | | justify-content: center; |
| | | flex: 1; |
| | | } |
| | | |
| | | .t-class-divider { |
| | | margin: 0 !important; |
| | | } |
| | | |
| | | .t-class-collapse-panel-header { |
| | | padding: 0 !important; |
| | | padding-top: var(--td-spacer) !important; |
| | | padding-bottom: var(--td-spacer) !important; |
| | | /* font-weight: 600 !important; */ |
| | | } |
| | | |
| | | .t-class-collapse-panel-content { |
| | | padding: 0 !important; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import { fetchLedgerType } from '../../services/enterprise/fetchLedger'; |
| | | import { fetchLedgerDetail } from '../../services/enterprise/fetchLedger'; |
| | | import { toLabel } from '../../common/dataSceneTypes'; |
| | | |
| | | /** |
| | | * å°è´¦ä¸é¢ç®¡ç |
| | | */ |
| | | export const useTopic = Behavior({ |
| | | data: { |
| | | // ä¸é¢éæ©å¼¹åºæ¡ |
| | | popupVisible: false, |
| | | // æåºæ¯ç±»ååç±»çå°è´¦éæ©æ
åµ |
| | | selectedTopics: {}, |
| | | // ä¸é¢å¯¹åºçå°è´¦ä¿¡æ¯å è½½ç¶æ |
| | | topicLoading: false, |
| | | }, |
| | | methods: { |
| | | /** |
| | | * åå§åå½ååºæ¯ç±»åä¸çå¯éå°è´¦éé¡¹ï¼ |
| | | * åå§åé»è®¤éæ©çä¸é¢ï¼å°è´¦ç±»åï¼ï¼ |
| | | * @param {Function} callback å¯éçåè°å½æ° |
| | | */ |
| | | initselectedTopics(callback) { |
| | | const { selectedTopics } = this.data; |
| | | const { sceneType } = this.data.searchOptions; |
| | | if (selectedTopics[sceneType] == undefined || selectedTopics[sceneType].length == 0) { |
| | | fetchLedgerType({ sceneType: parseInt(sceneType) }).then(res => { |
| | | // éæ©åä¸ä¸ªå°è´¦ä¸ºé»è®¤ä¸é¢ |
| | | let count = 3; |
| | | for (let i = 0; i < 3; i++) { |
| | | if (i >= res.length) break; |
| | | res[i].selected = { |
| | | color: 'green', |
| | | count: 'â', |
| | | shape: 'square', |
| | | }; |
| | | } |
| | | selectedTopics[sceneType] = { |
| | | sceneType, |
| | | sceneTypeText: toLabel(sceneType), |
| | | topicText: 'è¯·éæ©ä¸é¢', |
| | | allLedgerTypes: res, |
| | | selectedLedgers: [], |
| | | checkAll: false, |
| | | selectedCount: 0, |
| | | }; |
| | | this.setData({ selectedTopics }); |
| | | this.refreshSelectedLedger(); |
| | | if (typeof callback === 'function') { |
| | | callback(); |
| | | } |
| | | }); |
| | | } else { |
| | | if (typeof callback === 'function') { |
| | | callback(); |
| | | } |
| | | } |
| | | }, |
| | | // æ¾ç¤ºå¼¹åºæ¡ |
| | | showPopUp() { |
| | | this.initselectedTopics(() => this.setData({ popupVisible: true })); |
| | | }, |
| | | // çå¬å¼¹åºæ¡ç¶æååï¼ä¾å¦éè¿ç¹å»å¤é¨é®ç½©å±å
³éå¼¹åºæ¡æ¶ |
| | | onPopupVisibleChange(e) { |
| | | const { visible } = e.detail; |
| | | this.setData({ popupVisible: visible }); |
| | | if (!visible) { |
| | | this.closePatrolList(); |
| | | } |
| | | }, |
| | | // åæ¶å¹¶å
³éå°è´¦ç±»å«éæ©å¼¹åºæ¡ |
| | | closePatrolList() { |
| | | const { selectedTopics } = this.data; |
| | | const { sceneType } = this.data.searchOptions; |
| | | const { allLedgerTypes, selectedLedgers } = selectedTopics[sceneType]; |
| | | allLedgerTypes.forEach(p => { |
| | | if (selectedLedgers.indexOf(p.ledgerSubTypeId) == -1) { |
| | | p.selected = false; |
| | | } else { |
| | | p.selected = { |
| | | color: 'green', |
| | | count: 'â', |
| | | shape: 'square', |
| | | }; |
| | | } |
| | | }); |
| | | this.setData({ |
| | | [`selectedTopics.${sceneType}.allLedgerTypes`]: allLedgerTypes, |
| | | popupVisible: false, |
| | | }); |
| | | this._isCheckAll(); |
| | | }, |
| | | // éæ©å°è´¦ç±»å« |
| | | choseLedgerType(e) { |
| | | const { index } = e.currentTarget.dataset; |
| | | const { selectedTopics } = this.data; |
| | | const { sceneType } = this.data.searchOptions; |
| | | const { allLedgerTypes, selectedLedgers } = selectedTopics[sceneType]; |
| | | let { selected, ledgerSubTypeId } = allLedgerTypes[index]; |
| | | if (selected) { |
| | | selected = null; |
| | | } else { |
| | | selected = { |
| | | color: 'green', |
| | | count: 'â', |
| | | shape: 'square', |
| | | }; |
| | | } |
| | | this.setData({ |
| | | [`selectedTopics.${sceneType}.allLedgerTypes[${index}].selected`]: selected, |
| | | }); |
| | | this._isCheckAll(); |
| | | }, |
| | | // å
¨é |
| | | onCheckAll(e) { |
| | | const { checked } = e.detail; |
| | | const { selectedTopics } = this.data; |
| | | const { sceneType } = this.data.searchOptions; |
| | | const { allLedgerTypes } = selectedTopics[sceneType]; |
| | | allLedgerTypes.forEach(p => { |
| | | if (checked) { |
| | | p.selected = { |
| | | color: 'green', |
| | | count: 'â', |
| | | shape: 'square', |
| | | }; |
| | | } else { |
| | | p.selected = null; |
| | | } |
| | | }); |
| | | this.setData({ [`selectedTopics.${sceneType}.allLedgerTypes`]: allLedgerTypes }); |
| | | this._isCheckAll(); |
| | | }, |
| | | /** |
| | | * å
¨é夿 |
| | | * æ ¹æ®ç¨æ·éæ©çæ
åµï¼å¤ææ¯å¦å·²ç»å
¨éï¼æ´æ°å
¨éåéç¶æ |
| | | */ |
| | | _isCheckAll() { |
| | | const { selectedTopics } = this.data; |
| | | const { sceneType } = this.data.searchOptions; |
| | | const { allLedgerTypes } = selectedTopics[sceneType]; |
| | | // 夿æ¯å¦å
¨éä¸ |
| | | const p = allLedgerTypes.filter(v => { |
| | | return v.selected == undefined || v.selected == null || v.selected == false; |
| | | }); |
| | | this.setData({ |
| | | [`selectedTopics.${sceneType}.selectedCount`]: allLedgerTypes.length - p.length, |
| | | [`selectedTopics.${sceneType}.checkAll`]: p.length == 0, |
| | | }); |
| | | }, |
| | | // å·æ°éæ©ç»æ |
| | | refreshSelectedLedger() { |
| | | const { selectedTopics } = this.data; |
| | | const { sceneType } = this.data.searchOptions; |
| | | const { allLedgerTypes, selectedLedgers } = selectedTopics[sceneType]; |
| | | let topicText = ''; |
| | | allLedgerTypes.forEach(p => { |
| | | const i = selectedLedgers.indexOf(p.ledgerSubTypeId); |
| | | if (p.selected) { |
| | | if (i == -1) { |
| | | selectedLedgers.push(p.ledgerSubTypeId); |
| | | } |
| | | if (topicText != '') { |
| | | topicText += 'ã'; |
| | | } |
| | | topicText += p.ledgerName; |
| | | } else { |
| | | if (i != -1) { |
| | | selectedLedgers.splice(i, 1); |
| | | } |
| | | } |
| | | }); |
| | | if (topicText == '') { |
| | | topicText = 'ç¹å»éæ©'; |
| | | } else if (selectedLedgers.length == allLedgerTypes.length) { |
| | | topicText = 'å·²éå
¨é¨ç±»å«'; |
| | | } else if (topicText.length > 9) { |
| | | topicText = topicText.substring(0, 10); |
| | | topicText += `...ç${selectedLedgers.length}个类å«`; |
| | | } |
| | | this.setData({ |
| | | [`selectedTopics.${sceneType}.selectedLedgers`]: selectedLedgers, |
| | | [`selectedTopics.${sceneType}.topicText`]: topicText, |
| | | }); |
| | | }, |
| | | /** |
| | | * å°è´¦ç±»å«éæ©äºä»¶ |
| | | * å¨ç¨æ·ç¹å»å¼¹åºæ¡çâç¡®å®âæé®åï¼å°[allLedgerTypes]éä¸çå°è´¦æ´æ°å°[selectedLedgers]å表ä¸ï¼ |
| | | * å
³éå¼¹åºæ¡ï¼å¹¶ä¸è§¦åè·åå°è´¦ä¿¡æ¯ç彿° |
| | | */ |
| | | onLedgerPickerChange() { |
| | | this.refreshSelectedLedger(); |
| | | this.setData({ popupVisible: false }); |
| | | this.fetchTopicLedgers(); |
| | | }, |
| | | /** |
| | | * è·åä¸é¢ç¸å
³çå°è´¦ä¿¡æ¯ |
| | | * @param {Int} startIndex éè¦è·åå°è´¦ä¿¡æ¯çèµ·å§ç´¢å¼ |
| | | */ |
| | | fetchTopicLedgers(startIndex) { |
| | | this.setData({ topicLoading: true }); |
| | | // ç¡®å®æéçå°è´¦ç±»å |
| | | const { selectedTopics } = this.data; |
| | | const { sceneType, time } = this.data.searchOptions; |
| | | const { allLedgerTypes, selectedLedgers } = selectedTopics[sceneType]; |
| | | const _selectedLedgers = allLedgerTypes.filter(v => { |
| | | return selectedLedgers.indexOf(v.ledgerSubTypeId) != -1; |
| | | }); |
| | | |
| | | if (_selectedLedgers.length == 0) { |
| | | searchResult.forEach(e => { |
| | | e.topics = []; |
| | | }); |
| | | } else { |
| | | const { searchResult } = this.data; |
| | | const alltask = []; |
| | | for (let i = startIndex ? startIndex : 0; i < searchResult.length; i++) { |
| | | const e = searchResult[i]; |
| | | this.setData({ [`searchResult[${i}].topicLoading`]: true }); |
| | | const t = fetchLedgerDetail({ userId: e.userId, sceneType, time }).then(res => { |
| | | const topics = []; |
| | | _selectedLedgers.forEach(l => { |
| | | const ledger = res.data.find(r => r.ledgerSubTypeId == l.ledgerSubTypeId); |
| | | const detail = ledger ? ledger : { ledgerName: l.ledgerName }; |
| | | topics.push({ ...l, detail }); |
| | | }); |
| | | this.setData({ |
| | | [`searchResult[${i}].topicLoading`]: false, |
| | | [`searchResult[${i}].topics`]: topics, |
| | | }); |
| | | }); |
| | | alltask.push(t); |
| | | } |
| | | Promise.all(alltask).finally(() => { |
| | | this.setData({ topicLoading: false }); |
| | | console.log('searchResult', this.data.searchResult); |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <view bind:tap="showPopUp" class='topic-text'> |
| | | <text>ä¸é¢ç®¡çï¼{{selectedTopics[searchOptions.sceneType].topicText}}</text> |
| | | <t-icon name="caret-down-small" size="36rpx" color="black'" /> |
| | | </view> |
| | | |
| | | <t-popup visible="{{popupVisible}}" bind:visible-change="onPopupVisibleChange" placement="bottom"> |
| | | <view class="popup-btn-group"> |
| | | <t-button block="{{false}}" t-class="t-class-button" theme="default" size="extra-small" bindtap="closePatrolList">åæ¶ |
| | | </t-button> |
| | | <view style="display: flex; align-items: center"> |
| | | <t-checkbox t-class="t-class-checkbox" t-class-border="t-class-border-checkbox" |
| | | t-class-content="t-class-content-checkbox" t-class-label="t-class-label-checkbox" placement="right" borderless |
| | | icon="rectangle" block="{{true}}" label="å
¨é" checked="{{selectedTopics[searchOptions.sceneType].checkAll}}" |
| | | bind:change="onCheckAll" /> |
| | | <t-button block="{{false}}" t-class="t-class-button" theme="primary" size="extra-small" |
| | | bindtap="onLedgerPickerChange"> |
| | | {{selectedTopics[searchOptions.sceneType].selectedCount > 0 ? '(' + selectedTopics[searchOptions.sceneType].selectedCount + ')' : ''}} |
| | | ç¡®å® |
| | | </t-button> |
| | | </view> |
| | | </view> |
| | | <scroll-view style="height: 70vh" scroll-y="{{true}}"> |
| | | <t-grid column="{{4}}" theme="card"> |
| | | <t-grid-item wx:for="{{selectedTopics[searchOptions.sceneType].allLedgerTypes}}" wx:key="index" |
| | | class="{{item.selected ? 'patrol-task-item-selected' : 'patrol-task-item'}}" badge-props="{{ item.selected }}" |
| | | text="{{item.ledgerName}}" image="{{item.iconUrl}}" data-index="{{index}}" bindtap="choseLedgerType" /> |
| | | </t-grid> |
| | | </scroll-view> |
| | | </t-popup> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | .topic-text { |
| | | display: flex; |
| | | padding: 8px; |
| | | align-items: center; |
| | | color: rgba(51, 51, 51, 1); |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .popup-btn-group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 0 var(--td-spacer-2); |
| | | /* background-color: aqua; */ |
| | | align-items: center; |
| | | } |
| | | |
| | | .t-class-checkbox { |
| | | /* background-color: tomato !important; */ |
| | | /* padding: initial !important; */ |
| | | text-align: end; |
| | | } |
| | | |
| | | .t-class-button { |
| | | margin: initial !important; |
| | | } |
| | | |
| | | .patrol-task-item { |
| | | opacity: 0.5; |
| | | } |
| | | |
| | | .patrol-task-item-selected { |
| | | opacity: 1; |
| | | } |
| | |
| | | "outputPath": "" |
| | | }, |
| | | "condition": false, |
| | | "ignoreUploadUnusedFiles": true |
| | | "ignoreUploadUnusedFiles": true, |
| | | "compileWorklet": false, |
| | | "localPlugins": false, |
| | | "disableUseStrict": false, |
| | | "useCompilerPlugins": false, |
| | | "swc": false, |
| | | "disableSWC": true |
| | | }, |
| | | "compileType": "miniprogram", |
| | | "condition": {}, |
| | |
| | | "packOptions": { |
| | | "ignore": [], |
| | | "include": [] |
| | | } |
| | | }, |
| | | "libVersion": "3.15.0", |
| | | "simulatorPluginLibVersion": {} |
| | | } |
| | |
| | | { |
| | | "description": "项ç®ç§æé
ç½®æä»¶ãæ¤æä»¶ä¸çå
容å°è¦ç project.config.json ä¸çç¸ååæ®µã项ç®çæ¹å¨ä¼å
忥尿¤æä»¶ä¸ãè¯¦è§ææ¡£ï¼https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
| | | "projectname": "ep-law-abiding-manage-weixin", |
| | | "projectname": "ep-law-abiding-manage", |
| | | "setting": { |
| | | "compileHotReLoad": true, |
| | | "urlCheck": true |
| | | "urlCheck": true, |
| | | "coverView": true, |
| | | "lazyloadPlaceholderEnable": false, |
| | | "skylineRenderEnable": false, |
| | | "preloadBackgroundData": false, |
| | | "autoAudits": false, |
| | | "useApiHook": true, |
| | | "showShadowRootInWxmlPanel": true, |
| | | "useStaticServer": false, |
| | | "useLanDebug": false, |
| | | "showES6CompileOption": false, |
| | | "checkInvalidKey": true, |
| | | "ignoreDevUnusedFiles": true, |
| | | "bigPackageSizeSupport": false, |
| | | "useIsolateContext": true |
| | | }, |
| | | "libVersion": "3.11.2" |
| | | "libVersion": "3.15.0", |
| | | "condition": {} |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | export { fetchSceneTypes, fetchUserConfig }; |
| | | /** |
| | | * è·åç¨æ·çä¸å¡å±æ§é
置信æ¯ï¼ä¾å¦å°è´¦ä¸æ¥æ¥æï¼èªå·¡æ¥æ¯å¦éè¦æ¿è¯ºçï¼ |
| | | */ |
| | | function fetchUserSetting({ userId }) { |
| | | return get({ |
| | | url: `/config/user/setting`, |
| | | params: { |
| | | userId: userId, |
| | | }, |
| | | }).then(res => { |
| | | if (res.data.success) { |
| | | app.globalData.userSetting = res.data.data; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | export { fetchSceneTypes, fetchUserConfig, fetchUserSetting }; |