| | |
| | | "pages/module_consult/consultsearch/consultsearch", |
| | | "pages/module_consult/consultresult/consultresult", |
| | | "pages/module_consult/consultdetail/consultdetail", |
| | | "pages/module_consult/consultonline/consultonline", |
| | | "pages/module_ledger/ledgerhome/ledgerhome", |
| | | "pages/module_ledger/ledgerupload/ledgerupload", |
| | | "pages/module_ledger/ledgerhistory/ledgerhistory", |
| | | "pages/module_user/userloginpw/userloginpw", |
| | | "pages/module_user/userregistertype/userregistertype", |
| | | "pages/module_user/userregistergov/userregistergov", |
| | | "pages/module_user/userregistercompany/userregistercompany" |
| | | "pages/module_user/userregistercompany/userregistercompany", |
| | | "pages/module_consult/consultproblem/consultproblem", |
| | | "pages/icons/icons" |
| | | ], |
| | | "window": { |
| | | "backgroundTextStyle": "light", |
| | |
| | | position: relative; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .flex-v { |
| | |
| | | background-color: var(--fyui-BG-COLOR-ACTIVE); |
| | | } |
| | | |
| | | .no-data { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .no-data image { |
| | | width: 30vw; |
| | | margin-top: 6vh; |
| | | } |
| | | |
| | | .more { |
| | | /* background-color: aqua; */ |
| | | font-size: 24rpx; |
| | | color: rgb(175, 173, 173); |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .fyui-selector { |
| | | background-color: rgb(255, 255, 255); |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | color: var(--fyui-primary-color); |
| | | padding: 2px 4px 2px 18px; |
| | | } |
| | | |
| | | /********************************** éç¨-end ***********************************/ |
| | | |
| | | /********************************** 主çé¢èæ¯-start ***********************************/ |
| | |
| | | <view class="page"> |
| | | <view class="hr-view"></view> |
| | | <mp-cell ext-class="ext-cell"> |
| | | <view slot="title" class="title-cell">{{item.name}}</view> |
| | | <view slot="title" class="title-cell"><text class="{{item.required != false ? 'required' : 'not-required'}}">*</text>{{item.name}}</view> |
| | | <image wx:if="{{item.src}}" slot="icon" class="header-img" src="{{item.src}}"></image> |
| | | |
| | | <view class="flexbox {{alignLeft?'':'flexbox-end'}}"> |
| | | <input wx:if="{{item.input}}" type="{{item.type?item.type:'text'}}" |
| | | maxlength="{{item.maxLength?item.maxLength:'-1'}}" id="{{item.id?item.id:''}}" |
| | | placeholder-style="color:{{item.noValue?'red':'#B2B2B2'}};" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}" |
| | | bindinput="changeV" value="{{item.value}}" placeholder="{{item.placeholder ? item.placeholder : '请è¾å
¥' + item.name}} " /> |
| | | <input wx:if="{{item.input}}" type="{{item.type?item.type:'text'}}" maxlength="{{item.maxLength?item.maxLength:'-1'}}" id="{{item.id?item.id:''}}" placeholder-style="color:{{item.noValue?'red':'#B2B2B2'}};" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}" bindinput="changeV" value="{{item.value}}" placeholder="{{item.placeholder ? item.placeholder : '请è¾å
¥' + item.name}} " /> |
| | | <view wx:else="{{text}}" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}">{{item.value}}</view> |
| | | <view class="unit">{{item.unit}}</view> |
| | | </view> |
| | |
| | | padding-right: 6px; |
| | | } |
| | | |
| | | .required { |
| | | color: red; |
| | | text-align: center; |
| | | } |
| | | |
| | | .not-required { |
| | | color: transparent; |
| | | } |
| | | |
| | | .title-cell{ |
| | | white-space: nowrap; |
| | | display: inline-block; |
| | |
| | | .weui-toptips_show { |
| | | -webkit-transform: translateZ(0) translateY(0); |
| | | transform: translateZ(0) translateY(0); |
| | | opacity: 0.7 |
| | | /* opacity: 0.7 */ |
| | | } |
| | | |
| | | .weui-toptips_success { |
| | |
| | | planYear: "2000", |
| | | maxYear: "2000", |
| | | //å½åçè¯å卿 |
| | | thisPeiod: '2000/1-1', |
| | | thisPeriod: '2000/1-1', |
| | | //è¯ä¼°åå² |
| | | historys: [] |
| | | }, |
| | |
| | | this.setData({ |
| | | planYear: `${year}å¹´`, |
| | | maxYear: year, |
| | | thisPeiod: period, |
| | | thisPeriod: period, |
| | | deadline: deadline |
| | | }) |
| | | }, |
| | |
| | | let lastOne = data[0] |
| | | let date = moment(lastOne.updateDate) |
| | | let period = `${date.year()}/${date.month()+1}-${date.month()+1}` |
| | | if (period == that.data.thisPeiod) { |
| | | if (period == that.data.thisPeriod) { |
| | | that.setData({ |
| | | score: lastOne.totalPoint, |
| | | text1: "徿£!", |
| | |
| | | case "0": |
| | | //廿µè¯æè
æ¥ç详æ
|
| | | if (this.data.score) { |
| | | url = `/pages/gradereport/gradereport?period=${this.data.thisPeiod}` |
| | | url = `/pages/gradereport/gradereport?period=${this.data.thisPeriod}` |
| | | } else { |
| | | url = `/pages/grade/grade?record=false` |
| | | } |
| | |
| | | // pages/home/home.js |
| | | const userservice = require("../../service/userservice") |
| | | const notificationservice = require("../../service/notificationservice") |
| | | const assessmentService = require("../../service/assessmentservice") |
| | | const lawservice = require("../../service/lawservice") |
| | | const promiseservice = require("../../service/promiseservice") |
| | | const ledgerservice = require("../../service/ledgerservice") |
| | | const moment = require('../../utils/moment.min') |
| | | const app = getApp() |
| | | /** |
| | |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | notices: [{ |
| | | notice: "æ¬æå®æ³æ¿è¯ºèªæµæºè¯å·²å¼å¯ï¼è¯·åæ¶è¿è¡è¯ä»·", |
| | | time: "2022/3/1" |
| | | }], |
| | | notices: [], |
| | | |
| | | dynamic: [{ |
| | | title: "ä¼ä¸è¥ä¸æ§ç
§ãé£åç»è¥è®¸å¯è¯ä¸¢å¤±è¯¥å¦ä½è¡¥é¢", |
| | |
| | | score: '--', |
| | | rank: '--', |
| | | legalIndex: '--', |
| | | illegalIndex: '--' |
| | | illegalIndex: '--', |
| | | period: '' |
| | | }, |
| | | period: '' |
| | | //å°è´¦å®ææ
åµ |
| | | ledgerInfo: { |
| | | //å¿
å¡«é¡¹æ»æ° |
| | | totalMust: 0, |
| | | //å¿
填项æäº¤æ° |
| | | finishedMust: 0, |
| | | }, |
| | | //æ¿è¯ºå®ææ
åµ |
| | | promsieInfo: { |
| | | leftDays: 0 |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | this.getUserInfo() |
| | | this.getHistoryPoint() |
| | | this.getNews() |
| | | this.getCommitment() |
| | | this.getLedgerType() |
| | | }, |
| | | |
| | | getNextEvaluationTime() { |
| | |
| | | }, |
| | | |
| | | getNotice() { |
| | | this.setData({ |
| | | notices: [{ |
| | | notice: "æ¬æå®æ³æ¿è¯ºèªæµæºè¯å·²å¼å¯ï¼è¯·åæ¶è¿è¡è¯ä»·", |
| | | time: "2022/5/9" |
| | | }] |
| | | var that = this |
| | | notificationservice.getNotification(app.globalData.accessToken.userId, 1, { |
| | | success(res) { |
| | | let notices = [] |
| | | res.forEach(r => { |
| | | notices.push({ |
| | | notice: r.title, |
| | | time: moment(r.updateTime).format('YYYY/MM/DD'), |
| | | isRead: r.hasRead |
| | | }) |
| | | that.setData({ |
| | | notices |
| | | }) |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | var that = this |
| | | assessmentService.getHistoryPoint(app.globalData.accessToken.userId, 1, { |
| | | success(data) { |
| | | if (data.length == 0) { |
| | | return |
| | | } |
| | | let lastOne = data[0] |
| | | let year = lastOne.updateDate.substring(0, 4) |
| | | let month = lastOne.updateDate.substring(5, 7) |
| | |
| | | score: lastOne.totalPoint, |
| | | rank: lastOne.rank, |
| | | legalIndex: lastOne.level, |
| | | illegalIndex: lastOne.level |
| | | illegalIndex: lastOne.level, |
| | | period: lastOne.period |
| | | } |
| | | }) |
| | | } |
| | |
| | | }, |
| | | |
| | | /** |
| | | * è·åæ¿è¯ºåå²è®°å½ |
| | | */ |
| | | getCommitment() { |
| | | var that = this |
| | | promiseservice.getCommitment(app.globalData.accessToken.userId, { |
| | | success(data) { |
| | | if (data.length > 0) { |
| | | let c = data[0] |
| | | let cTime = moment(c.cmCreateTime) |
| | | let leftDays = cTime.add(1, 'years').diff(moment(), 'days') |
| | | that.setData({ |
| | | promise: { |
| | | leftDays: leftDays |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getLedgerType() { |
| | | var that = this |
| | | var time = moment().format('YYYY-MM-DD') |
| | | ledgerservice.getLedgerSummary(app.globalData.accessToken.userId, app.globalData.userInfo.extension2, time, { |
| | | success(res) { |
| | | that.parseLedgerType(res) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | parseLedgerType(subtypes) { |
| | | let monthInfo = { |
| | | totalMust: 0, |
| | | finishedMust: 0, |
| | | } |
| | | subtypes.forEach(s => { |
| | | //æåº¦ç»è®¡ |
| | | if (s.needUpdate) { |
| | | monthInfo.totalMust++ |
| | | if (s.upLoad) { |
| | | monthInfo.finishedMust++ |
| | | } |
| | | } |
| | | }); |
| | | |
| | | monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100) |
| | | |
| | | this.setData({monthInfo}) |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢è·³è½¬ |
| | | */ |
| | | goto: function (e) { |
| | |
| | | switch (index) { |
| | | case "0": |
| | | //æµè¯åå²è®°å½ |
| | | url = "" |
| | | url = `/pages/gradereport/gradereport?period=${this.data.historyPoint.period}` |
| | | break; |
| | | case "5": |
| | | wx.switchTab({ |
| | | url: '/pages/module_ledger/ledgerhome/ledgerhome', |
| | | }) |
| | | return; |
| | | case "6": |
| | | wx.switchTab({ |
| | | url: '/pages/promise/promise', |
| | | }) |
| | | break; |
| | | case "1": |
| | | //工使é |
| | |
| | | break; |
| | | case "3": |
| | | //å¨çº¿å®æ³å¦ä¹ |
| | | |
| | | url = `/pages/learn/learn` |
| | | |
| | | break; |
| | | case "4": |
| | | //宿³å¨æ |
| | |
| | | success: function (res) { |
| | | console.log('æå¼ææ¡£æå') |
| | | }, |
| | | fail (error) { |
| | | fail(error) { |
| | | console.log(error); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | break; |
| | | case "5": |
| | | break; |
| | | } |
| | | if (url != "") { |
| | |
| | | <cp-notice msg="æé«æµè¯å¾åå°æå·§æ¥äºï¼å¿«ç¹å¦ä¹ å¦" /> |
| | | <view class="page__hd"> |
| | | <view class="page__title">{{userRealName}}</view> |
| | | <view class="page__desc">䏿¬¡æµè¯æ¶é´{{nextEvaluationTime}}</view> |
| | | <view class="top-card" bindtap="goto" data-index="0"> |
| | | <!-- <view class="page__desc">䏿¬¡æµè¯æ¶é´{{nextEvaluationTime}}</view> --> |
| | | <!-- <view class="top-card" bindtap="goto" data-index="0"> |
| | | <view class="top-card__time">{{historyPoint.time}}</view> |
| | | <view class="top-card__score">{{historyPoint.score}}å ></view> |
| | | <view class="top-card__items"> |
| | |
| | | <text>{{historyPoint.illegalIndex}}</text> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="flex-h"> |
| | | <view class="top-card" bindtap="goto" data-index="0"> |
| | | <view class="top-card__score"><text class="top-card__num">{{historyPoint.score}}</text>å</view> |
| | | <view class="top-card__time">èªæµæºè¯å¾å ></view> |
| | | <view class="top-card__tag">ç¹å»æ¥çæ¬æèªæµæºè¯æ
åµ</view> |
| | | <image src="/res/icons/wm_assessment.png"></image> |
| | | </view> |
| | | <view class="top-card" bindtap="goto" data-index="5"> |
| | | <view class="top-card__score"><text class="top-card__num">{{monthInfo.percent}}</text>%</view> |
| | | <view class="top-card__time">å°è´¦å®æç ></view> |
| | | <view class="top-card__tag">ç¹å»æ¥çæ¬æå°è´¦ä¸ä¼ æ
åµ</view> |
| | | <image src="/res/icons/wm_ledger.png"></image> |
| | | </view> |
| | | <view class="top-card" bindtap="goto" data-index="6"> |
| | | <view class="top-card__score">å©ä½<text class="top-card__num">{{promsieInfo.leftDays}}</text>天</view> |
| | | <view class="top-card__time">æ¿è¯ºææåè®¡æ¶ ></view> |
| | | <view class="top-card__tag">ç¹å»æ¥çæ¬ææ¿è¯ºå®ææ
åµ</view> |
| | | <image src="/res/icons/wm_commitment.png"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="page__bd"> |
| | |
| | | <view wx:for="{{notices}}" wx:key="index" data-index="index" wx:item="item"> |
| | | <view class="fyui-cell"> |
| | | <view class="fyui-cell__hd"> |
| | | <image src="/res/icons/tab_1_select.png" class="icon" /> |
| | | <view class="{{item.isRead ? 'notice-read' : 'notice-not-read'}}"></view> |
| | | </view> |
| | | <view class="fyui-cell__bd notice">{{item.notice}}</view> |
| | | <view class="fyui-cell__ft">{{item.time}}</view> |
| | |
| | | <view class="fyui-cell__ft">æ¥çæ´å¤</view> |
| | | </view> |
| | | <view wx:for="{{dynamic}}" wx:key="index" data-index="index" wx:item="item"> |
| | | <view class="fyui-box" bindtap="goto" data-index="4" data-url="{{item.url}}" data-filetype="{{item.fileType}}"> |
| | | <view class="fyui-box" bindtap="goto" data-index="4" data-url="{{item.url}}" data-filetype="{{item.fileType}}"> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content">{{item.title}}</view> |
| | | <view class="fyui-box__tag"> |
| | |
| | | } |
| | | |
| | | .top-card { |
| | | position: relative; |
| | | border-radius: 4px; |
| | | background: linear-gradient(to bottom right, #a5f5e9, #62EAD2); |
| | | background-color: #5bf0d6; |
| | | /* background: linear-gradient(to bottom right, #a5f5e9, #62EAD2); */ |
| | | color: white; |
| | | padding: 8px; |
| | | text-shadow: 1px 1px rgb(0, 0, 0, 0.4); |
| | | width: 26vw; |
| | | /* text-shadow: 1px 1px rgb(0, 0, 0, 0.4); */ |
| | | } |
| | | |
| | | .top-card>image{ |
| | | width: 13vw; |
| | | height: 14vw; |
| | | position: absolute; |
| | | bottom: -2px; |
| | | right: -2px; |
| | | } |
| | | |
| | | .top-card .top-card__time { |
| | | text-align: end; |
| | | /* text-align: end; */ |
| | | font-size: 12px; |
| | | color: #ffffffde; |
| | | } |
| | | |
| | | .top-card .top-card__score { |
| | | font-size: 26px; |
| | | font-size: 12px; |
| | | /* text-align: center; */ |
| | | /* margin: 16px; */ |
| | | } |
| | | |
| | | .top-card .top-card__num { |
| | | font-size: 20px; |
| | | font-weight: 600; |
| | | text-align: center; |
| | | margin: 16px; |
| | | } |
| | | |
| | | .top-card .top-card__tag{ |
| | | font-size: 10px; |
| | | width: 12vw; |
| | | color: #ffffff5e; |
| | | } |
| | | |
| | | .top-card .top-card__items { |
| | |
| | | background-color: var(--fyui-text-color_2); |
| | | } |
| | | |
| | | .notice-read { |
| | | width: 12px; |
| | | height: 12px; |
| | | background-color: #CECECE; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .notice-not-read { |
| | | width: 12px; |
| | | height: 12px; |
| | | background-color: red; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .notice { |
| | | color: var(--fyui-text-color_2); |
| | | font-size: 12px; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | const colorLight = 'rgba(0, 0, 0, .9)' |
| | | const colorDark = 'rgba(255, 255, 255, .8)' |
| | | |
| | | Page({ |
| | | data: { |
| | | iconList: [ |
| | | { |
| | | icon: 'add-friends', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'add', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'add2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'album', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'arrow', |
| | | color: colorLight, |
| | | size: 12, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'at', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'back', |
| | | color: colorLight, |
| | | size: 12, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'back2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'bellring-off', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'bellring-on', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'camera', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'cellphone', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'clip', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'close', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'close2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'comment', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'contacts', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'copy', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'delete-on', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'delete', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'discover', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'display', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'done', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'done2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'download', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'email', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'error', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'eyes-off', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'eyes-on', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'folder', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'group-detail', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'help', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'home', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'imac', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'info', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'keyboard', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'like', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'link', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'location', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'lock', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'max-window', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'me', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'mike', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'mike2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'mobile-contacts', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'more', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'more2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'mosaic', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'music-off', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'music', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'note', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'pad', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'pause', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'pencil', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'photo-wall', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'play', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'play2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'previous', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'previous2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'qr-code', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'refresh', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'report-problem', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'search', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'sending', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'setting', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'share', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'shop', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'star', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'sticker', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'tag', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'text', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'time', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'transfer-text', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'transfer2', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'translate', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'tv', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'video-call', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'voice', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'volume-down', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'volume-off', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | }, |
| | | { |
| | | icon: 'volume-up', |
| | | color: colorLight, |
| | | size: 25, |
| | | name: '' |
| | | } |
| | | ] |
| | | }, |
| | | onLoad() { |
| | | this.setIconColor(this.data.theme) |
| | | |
| | | const app = getApp() |
| | | app.watchThemeChange && app.watchThemeChange(this.setIconColor) |
| | | }, |
| | | setIconColor(theme) { |
| | | const color = theme === 'dark' ? colorDark : colorLight |
| | | |
| | | this.setData({ |
| | | iconList: this.data.iconList.map((icon) => { |
| | | icon.color = color |
| | | return icon |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <view class="page" data-weui-theme="{{theme}}"> |
| | | <view class="page__hd"> |
| | | <view class="page__title">Icons</view> |
| | | <view class="page__desc">徿 </view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <view class="icon-box"> |
| | | <view class="icon-box__title">æè¾¹å</view> |
| | | <view class="weui-grids"> |
| | | <block wx:for="{{iconList}}" wx:key="*this"> |
| | | <navigator url="" class="weui-grid"> |
| | | <mp-icon icon="{{item.icon}}" color="{{item.color}}" size="{{item.size}}"></mp-icon> |
| | | <view class="weui-grid__label">{{item.icon}}</view> |
| | | </navigator> |
| | | </block> |
| | | </view> |
| | | </view> |
| | | <view class="icon-box"> |
| | | <view class="icon-box__title">å¡«å
å</view> |
| | | <view class="weui-grids"> |
| | | <block wx:for="{{iconList}}" wx:key="*this"> |
| | | <navigator url="" class="weui-grid"> |
| | | <mp-icon type="filled" icon="{{item.icon}}" color="{{item.color}}" size="{{item.size}}"></mp-icon> |
| | | <view class="weui-grid__label">{{item.icon}}</view> |
| | | </navigator> |
| | | </block> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | icon{ |
| | | margin-right: 13px; |
| | | } |
| | | |
| | | .weui-grid { |
| | | text-align: center; |
| | | padding: 36px 10px; |
| | | } |
| | | |
| | | .page__bd { |
| | | padding-left: 15px; |
| | | padding-right: 15px; |
| | | text-align: left; |
| | | } |
| | | .icon-box{ |
| | | margin-bottom: 25px; |
| | | } |
| | | .icon-box__ctn{ |
| | | flex-shrink: 100; |
| | | } |
| | | .icon-item_box { |
| | | display: inline-block; |
| | | width: 25%; |
| | | padding: 3px; |
| | | height: 80px; |
| | | line-height: 30px; |
| | | text-align: center; |
| | | box-sizing: border-box; |
| | | } |
| | | .icon-name { |
| | | font-size: 24rpx; |
| | | overflow: hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | .icon-box__title{ |
| | | font-size: 18px; |
| | | margin: 5px 0; |
| | | } |
| | |
| | | white-space: nowrap; |
| | | z-index: 2; |
| | | background-color: #65EAD2; |
| | | padding: 2px; |
| | | } |
| | | |
| | | .swiper-tab-list{ |
| | |
| | | <view>å°åï¼{{content.mfMgtLevel}}</view> |
| | | </view> |
| | | <view class="fyui-panel"> |
| | | <view>æä»¶ç±»å«ï¼{{content.mfFileType}}</view> |
| | | <!-- <view>æä»¶ä¸è½½</view> --> |
| | | </view> |
| | | <view class="fyui-panel"> |
| | | <view>ç¸å
³è¡ä¸ï¼{{content.mfFileIndustry}}</view> |
| | | <view>ç¯ä¿è¦ç´ ï¼{{content.mfEpItemType}}ã{{content.mfEpItemSubtype}}</view> |
| | | <view>便®ï¼{{content.mfFileBasis}}</view> |
| | | </view> |
| | | <view class="fyui-panel"> |
| | | <view>çææ¶é´ï¼{{content.mfEffectiveDate}}--{{content.mfClosingDate? content.mfClosingDate : 'ç°å¨'}}</view> |
| | | <view>çææ¶é´ï¼{{content.mfEffectiveDate}}</view> |
| | | <view>修订æ
åµï¼{{content.mfFileRevise}}</view> |
| | | </view> |
| | | <view class="fyui-panel"> |
| | | <view>æä»¶ç±»å«ï¼{{content.mfFileType}}</view> |
| | | <!-- <view>æä»¶ä¸è½½</view> --> |
| | | </view> |
| | | <view class="fyui-panel"> |
| | | |
| | | <!-- <view class="fyui-panel"> |
| | | <view>å
³é®è¯ï¼{{content.mfKeywordLv1}}</view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="page__ft"> |
| | | <view class="submit" bindtap="openFile">æ¥çæä»¶</view> |
| | |
| | | // pages/module_consult/consulthome/consulthome.js |
| | | const consultservice = require("../../../service/consultservice") |
| | | const moment = require('../../../utils/moment.min') |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | |
| | | */ |
| | | data: { |
| | | searchTips: '请è¾å
¥å
³é®åæç´¢', |
| | | hotTopics: [{ |
| | | id: '', |
| | | name: 'æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§', |
| | | des: 'æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§æ³å¾æ³è§', |
| | | fileIndustry: 'çæç¯å¢', |
| | | itemType: '大æ°', |
| | | fileUrl: '', |
| | | keywords: ['çæç¯å¢', '大æ°', 'çæç¯å¢', '大æ°å¤§', '大æ°', '大æ°', '大æ°å¤§æ°å¤§æ°å¤§æ°å¤§æ°å¤§æ°'], |
| | | time: '' |
| | | }] |
| | | hotTopics: [] |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | }, |
| | | |
| | | gotoSearch () { |
| | | gotoSearch() { |
| | | wx.navigateTo({ |
| | | url: "/pages/module_consult/consultsearch/consultsearch" |
| | | }) |
| | | }, |
| | | |
| | | goto (e) { |
| | | goto(e) { |
| | | var url = "" |
| | | var index = e.currentTarget.dataset.index |
| | | switch (index) { |
| | | case "0": |
| | | url = "" |
| | | url = "/pages/module_consult/consultproblem/consultproblem" |
| | | break; |
| | | case "1": |
| | | url = "/pages/module_consult/consultsearch/consultsearch" |
| | | break; |
| | | case "2": |
| | | url = "" |
| | | url = "/pages/module_consult/consultonline/consultonline" |
| | | break; |
| | | } |
| | | if (url != "") { |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | /** |
| | | * è·åçé¨æç´¢å
容 |
| | | */ |
| | | getHotTopic() { |
| | | var that = this |
| | | consultservice.getTopicLaw(app.globalData.accessToken.userId, { |
| | | success (res) { |
| | | success(res) { |
| | | res.forEach(r => { |
| | | r.mfKeywordLv1 = r.mfKeywordLv1.split('ã').slice(0, 5) |
| | | r.mfReleaseDate = that.formateTime(r.mfReleaseDate) |
| | | r.mfEffectiveDate = that.formateTime(r.mfEffectiveDate) |
| | | r.mfClosingDate = that.formateTime(r.mfClosingDate) |
| | | }); |
| | | that.setData({ |
| | | hotTopics: res |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | |
| | | gotoDetail (e) { |
| | | gotoDetail(e) { |
| | | var i = e.currentTarget.dataset.index |
| | | var fileId = this.data.hotTopics[i].id |
| | | var fileId = this.data.hotTopics[i].mfGuid |
| | | wx.navigateTo({ |
| | | url: '/pages/module_consult/consultdetail/consultdetail', |
| | | success: (res) => { |
| | |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | formateTime (t) { |
| | | if (t) { |
| | | return moment(t).format("YYYYå¹´MMæDDæ¥") |
| | | } else { |
| | | return undefined |
| | | } |
| | | }, |
| | | }) |
| | |
| | | </view> --> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | {{item.name}} |
| | | {{item.mfName}} |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content tag">ç¸å
³è¡ä¸ -> {{item.fileIndustry}}</view> |
| | | <view class="fyui-box__content des">{{item.des}}</view> |
| | | <view class="fyui-box__content tag"> |
| | | <view>æä»¶ç±»å«ï¼{{item.mfFileType}}</view> |
| | | <view>çææ¶é´ï¼{{item.mfEffectiveDate}}</view> |
| | | <view>æå·ï¼{{item.mfReferenceNumber}}</view> |
| | | <view>ç¸å
³è¡ä¸ -> {{item.mfFileIndustry}}</view> |
| | | </view> |
| | | <view class="fyui-box__content des">{{item.mfSummary}}</view> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <text class="keyword">å
³é®è¯ï¼</text> |
| | | <view class="keyword-item"> |
| | | <text wx:for="{{item.keywords}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text> |
| | | <text wx:for="{{item.mfKeywordLv1}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | /* text-overflow: ellipsis; */ |
| | | } |
| | | |
| | | .tag { |
| | | .fyui-box__text .fyui-box__bd .tag { |
| | | margin-bottom: 8px; |
| | | font-size: 14px; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/module_consult/consultonline/consultonline.js |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | userId: app.globalData.accessToken.userId, |
| | | record: [{ |
| | | id: 'system', |
| | | time: '', |
| | | userId: 'system', |
| | | userName: 'æºè½å®¢æ', |
| | | text: 'ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºä½ æå¡', |
| | | }, |
| | | { |
| | | id: 'system', |
| | | time: '', |
| | | userId: 'system', |
| | | userName: 'æºè½å®¢æ', |
| | | text: 'ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºæ¨æå¡ï¼æ¬æä¿¡ç¨èªè¯ç»æè¾ 好ï¼ç»§ç»ä¿æå¦.', |
| | | }, |
| | | |
| | | ], |
| | | |
| | | focus: false, |
| | | value: '', |
| | | placeholder: '请è¾å
¥å
³é®å' |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | clearInput() { |
| | | this.setData({ |
| | | value: '', |
| | | focus: true, |
| | | }); |
| | | }, |
| | | |
| | | inputChange(e) { |
| | | this.setData({ |
| | | value: e.detail.value |
| | | }); |
| | | }, |
| | | |
| | | send() { |
| | | let record = this.data.record |
| | | record.push({ |
| | | id: '', |
| | | time: '', |
| | | userId: app.globalData.accessToken.userId, |
| | | userName: app.globalData.userInfo.acountname, |
| | | text: this.data.value, |
| | | }) |
| | | this.getAnswer(this.data.value) |
| | | this.setData({ |
| | | record, |
| | | value: '' |
| | | }) |
| | | }, |
| | | |
| | | getAnswer(q) { |
| | | let record = this.data.record |
| | | |
| | | setTimeout(() => { |
| | | record.push({ |
| | | id: 'system', |
| | | time: '', |
| | | userId: 'system', |
| | | userName: 'æºè½å®¢æ', |
| | | text: 'ç¨æ·æ¨å¥½ï¼å¾é«å
´ä¸ºä½ æå¡', |
| | | }) |
| | | this.setData({record}) |
| | | }, 1000); |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "navigationBarTitleText": "æºè½å¨è¯¢", |
| | | "navigationBarBackgroundColor": "#EFF9F4", |
| | | "navigationBarTextStyle": "black", |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--pages/module_consult/consultonline/consultonline.wxml--> |
| | | <view class="consult-record"> |
| | | <block wx:for="{{record}}"> |
| | | <view wx:if="{{userId == item.userId}}" class="consult-record_item_user"> |
| | | <view class="consult-text_user">{{item.text}}</view> |
| | | </view> |
| | | <view wx:else class="consult-record_item"> |
| | | <image src="/res/icons/avator_sys.png" class="consult-avator"></image> |
| | | <view class="consult-text">{{item.text}}</view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | <view class="consult-input"> |
| | | <view class="consult-input_box"> |
| | | <view class="search-bar"> |
| | | <!-- <mp-icon icon="search" size="15" color="black"></mp-icon> --> |
| | | <input type="text" class="search-bar__input" placeholder="{{placeholder}}" value="{{value}}" focus="{{focus}}" bindinput="inputChange" /> |
| | | <text class="weui-icon-clear" hover-class="weui-active" wx:if="{{value.length > 0}}" bindtap="clearInput"></text> |
| | | </view> |
| | | <view wx:if="{{value.length > 0}}" class="btn" bindtap="send">åé</view> |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/module_consult/consultonline/consultonline.wxss */ |
| | | .consult-record { |
| | | padding: 8px; |
| | | background-color: #EFF9F4; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .consult-record_item { |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: flex-start; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .consult-record_item_user { |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: flex-end; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .consult-avator { |
| | | width: 40px; |
| | | height: 40px; |
| | | } |
| | | |
| | | .consult-text { |
| | | max-width: 80%; |
| | | margin-left: 4px; |
| | | padding: 10px; |
| | | background-color: white; |
| | | border: 0px solid #CCCCCC; |
| | | border-radius: 16px; |
| | | border-top-left-radius: 0; |
| | | box-shadow: 1px 1px #CCCCCC; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .consult-text_user { |
| | | max-width: 80%; |
| | | margin-left: 4px; |
| | | padding: 10px; |
| | | /* background-color: #49c4ad; */ |
| | | background: linear-gradient(to top right, #58bba9, #52e6ca); |
| | | border: 0px solid #CCCCCC; |
| | | border-radius: 16px; |
| | | border-top-right-radius: 0; |
| | | box-shadow: 1px 1px #CCCCCC; |
| | | font-size: 12px; |
| | | color: white; |
| | | } |
| | | |
| | | |
| | | .consult-input { |
| | | position: fixed; |
| | | bottom: 0; |
| | | /* padding-bottom: calc(10px + constant(safe-area-inset-bottom)); */ |
| | | padding-bottom: calc(10px + env(safe-area-inset-bottom)); |
| | | left: 0; |
| | | width: 100%; |
| | | } |
| | | |
| | | .consult-input_box { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .search-bar { |
| | | flex: 1; |
| | | position: relative; |
| | | min-width: 50vw; |
| | | padding: 6px 8px; |
| | | font-size: 12px; |
| | | line-height: 24px; |
| | | color: var(--fyui-text-color_2); |
| | | text-align: left; |
| | | background-color: white; |
| | | border-radius: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search-bar .weui-icon-clear { |
| | | /* position: absolute; |
| | | top: 50%; |
| | | right: 0; |
| | | margin-top: -16px; */ |
| | | padding-left: 8px; |
| | | width: 16px; |
| | | height: 16px; |
| | | -webkit-mask-size: 16px; |
| | | mask-size: 16px; |
| | | /* display: block; */ |
| | | } |
| | | |
| | | .search-bar .search-bar__input { |
| | | width: 100%; |
| | | border: 0; |
| | | font-size: 14px; |
| | | line-height: 20px; |
| | | box-sizing: content-box; |
| | | background: transparent; |
| | | caret-color: var(--weui-BRAND); |
| | | color: var(--weui-FG-0); |
| | | } |
| | | |
| | | .btn { |
| | | border-radius: 20px; |
| | | line-height: 20px; |
| | | font-size: 12px; |
| | | min-width: 40px; |
| | | background: linear-gradient(to top right, #58bba9, #52e6ca); |
| | | padding: 4px 2px; |
| | | text-align: center; |
| | | color: white; |
| | | margin-left: 4px; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/module_consult/consultproblem/consultproblem.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | problemTypes: ['å±åºè½¬ç§»','ä¼ä¸ææ±¡','ææ±¡çº³ç®¡','设å¤ç»´æ¤','设å¤å®è£
','åºæ°æ²»ç','åºåºè½¬ç§»','æ´å¤ >'], |
| | | selectedIndex: 0, |
| | | |
| | | problems: [ |
| | | [ |
| | | { |
| | | q: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨ï¼', |
| | | a: [{ |
| | | text: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸', |
| | | author: 'NickName', |
| | | time: '2022-05-03' |
| | | },{ |
| | | text: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸', |
| | | author: 'NickName', |
| | | time: '2022-05-03' |
| | | }], |
| | | viewed: 120, |
| | | like: 123, |
| | | favorite: 50 |
| | | }, |
| | | { |
| | | q: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨ï¼', |
| | | a: [{ |
| | | text: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸', |
| | | author: 'NickName', |
| | | time: '2022-05-03' |
| | | }], |
| | | viewed: 120, |
| | | like: 123, |
| | | favorite: 50 |
| | | }, |
| | | { |
| | | q: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨ï¼', |
| | | a: [{ |
| | | text: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸', |
| | | author: 'NickName', |
| | | time: '2022-05-03' |
| | | }], |
| | | viewed: 120, |
| | | like: 123, |
| | | favorite: 50 |
| | | }, |
| | | { |
| | | q: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨ï¼', |
| | | a: [{ |
| | | text: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸', |
| | | author: 'NickName', |
| | | time: '2022-05-03' |
| | | }], |
| | | viewed: 120, |
| | | like: 123, |
| | | favorite: 50 |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | q: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨ï¼', |
| | | a: [{ |
| | | text: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸', |
| | | author: 'NickName', |
| | | time: '2022-05-03' |
| | | },{ |
| | | text: 'ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸ä¼ä¸å±åºè½¬ç§»èåè¿æçè¡¥åæµç¨å¦ä¸', |
| | | author: 'NickName', |
| | | time: '2022-05-03' |
| | | }], |
| | | viewed: 120, |
| | | like: 123, |
| | | favorite: 50 |
| | | }, |
| | | ], |
| | | ], |
| | | problemIndex: 0, |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | selectProblemType(e) { |
| | | const selectedIndex = e.currentTarget.dataset.index |
| | | this.setData({selectedIndex}) |
| | | this.getProblems() |
| | | }, |
| | | |
| | | getProblems() { |
| | | let index = this.data.selectedIndex |
| | | let length = this.data.problems.length |
| | | |
| | | let problemIndex = index % length |
| | | this.setData({problemIndex}) |
| | | console.log(problemIndex); |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "navigationBarTitleText": "常è§é®é¢", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": {} |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--pages/module_consult/consultproblem/consultproblem.wxml--> |
| | | <!--pages/module_consult/consulthome/consulthome.wxml--> |
| | | <view class="page"> |
| | | <view class="page__hd"> |
| | | <view class="switch-tab {{selectedIndex == index ? 'switch-tab_selected' : ''}}" wx:for="{{problemTypes}}" wx:index="index" data-index="{{index}}" bindtap="selectProblemType">{{item}}</view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <block wx:for="{{problems[problemIndex]}}" wx:key="index"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | Q. {{item.q}} |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content">{{item.a.length > 0 ? item.a[0].text : ''}}</view> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <view class="fyui-box__tag"> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/view.png" class="icon"></image>{{item.viewed}} |
| | | </view> |
| | | <view class="flex-h"> |
| | | <image src="/res/icons/like.png" class="icon"></image><view>{{item.like}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | |
| | | </view> |
| | | <view class="page__ft"> |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/module_consult/consultproblem/consultproblem.wxss */ |
| | | .page__hd { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | } |
| | | .switch-tab { |
| | | border-radius: 8px; |
| | | color: var(--fyui-text-color_1); |
| | | width: 20vw; |
| | | background-color: white; |
| | | padding: 1vw; |
| | | margin-bottom: 8px; |
| | | text-align: center; |
| | | font-weight: 500; |
| | | font-size: 14px; |
| | | } |
| | | .switch-tab_selected { |
| | | background: linear-gradient(to bottom right, #65EAD2, #2BDEDC); |
| | | color: white; |
| | | } |
| | | |
| | | .fyui-box__content { |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .fyui-box__tag { |
| | | display: flex; |
| | | /* background-color: red; */ |
| | | width: 100%; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .fyui-box__tag .flex-h{ |
| | | margin-right: 16px; |
| | | } |
| | |
| | | |
| | | gotoDetail (e) { |
| | | var i = e.currentTarget.dataset.index |
| | | var fileId = this.data.hotTopic[i].id |
| | | var fileId = this.data.hotTopic[i].mfGuid |
| | | wx.navigateTo({ |
| | | url: '/pages/module_consult/consultdetail/consultdetail', |
| | | success: (res) => { |
| | |
| | | { |
| | | "navigationBarTitleText": "æç´¢", |
| | | "navigationBarTitleText": "ç¯ä¿ç¥è¯åºä¸é®æ¥è¯¢", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| | |
| | | <view class="hot-topic"> |
| | | <view wx:for="{{hotTopic}}" wx:key="index" class="hot-topic__item" data-index="{{index}}" bindtap="gotoDetail"> |
| | | <view class="{{index < 3 ? 'hot-topic__hot' : 'hot-topic__normal'}}">{{index + 1}}</view> |
| | | <view class="hot-topic__name">{{item.name}}</view> |
| | | <view class="hot-topic__name">{{item.mfName}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/module_ledger/ledgerHistory/ledgerhistory.js |
| | | const ledgerservice = require("../../../service/ledgerservice") |
| | | const moment = require('../../../utils/moment.min') |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | year: 2000, |
| | | maxYear: 2000, |
| | | |
| | | months: [{ |
| | | month: 1, |
| | | hasData: true |
| | | }, { |
| | | month: 2, |
| | | hasData: true |
| | | }, { |
| | | month: 3, |
| | | hasData: true |
| | | }, { |
| | | month: 4, |
| | | hasData: true |
| | | }, { |
| | | month: 5, |
| | | hasData: true |
| | | }, { |
| | | month: 6, |
| | | hasData: true |
| | | }, { |
| | | month: 7, |
| | | hasData: true |
| | | }, { |
| | | month: 8, |
| | | hasData: true |
| | | }, { |
| | | month: 9, |
| | | hasData: true |
| | | }, { |
| | | month: 10, |
| | | hasData: true |
| | | }, { |
| | | month: 11, |
| | | hasData: true |
| | | }, { |
| | | month: 12, |
| | | hasData: true |
| | | }], |
| | | selectedMonIndex: 0, |
| | | |
| | | recordList: [] |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | var that = this |
| | | this.initTime() |
| | | this.getRecord() |
| | | this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) { |
| | | let ledgerMap = new Map() |
| | | data.tabList.forEach(t => { |
| | | ledgerMap.set(t.name, { |
| | | notUpload: t.tag, |
| | | total: t.total, |
| | | ledgers: [] |
| | | }) |
| | | }); |
| | | that.setData({ |
| | | ledgerMap |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | onShow(){ |
| | | if (this.data.marginTop == undefined) { |
| | | this.topHeight('.page__hd') |
| | | } |
| | | }, |
| | | |
| | | initTime(year) { |
| | | var date = new Date() |
| | | let maxYear = date.getFullYear() |
| | | var thisMonth = date.getMonth() |
| | | if (year == undefined) { |
| | | year = maxYear + 'å¹´' |
| | | } |
| | | this.setData({ |
| | | year: year, |
| | | maxYear: maxYear, |
| | | }) |
| | | this.setData({ |
| | | selectedMonIndex: thisMonth |
| | | }) |
| | | }, |
| | | |
| | | bindYearChange(e) { |
| | | let y = e.detail.value |
| | | this.setData({ |
| | | year: `${y}å¹´` |
| | | }) |
| | | this.getRecord() |
| | | }, |
| | | |
| | | selectMonth(e) { |
| | | let index = e.currentTarget.dataset.index |
| | | this.setData({ |
| | | selectedMonIndex: index |
| | | }) |
| | | this.getRecord() |
| | | }, |
| | | |
| | | getRecord() { |
| | | var that = this |
| | | var userId = app.globalData.accessToken.userId |
| | | var sceneType = app.globalData.userInfo.extension2 |
| | | let month = this.data.months[this.data.selectedMonIndex].month |
| | | let year = parseInt(this.data.year.split("å¹´")[0]) |
| | | var time = moment().year(year).month(month - 1).format('YYYY-MM-DD') |
| | | wx.showLoading({ |
| | | title: 'å è½½ä¸', |
| | | mask: true, |
| | | success: (res) => {}, |
| | | fail: (res) => {}, |
| | | complete: (res) => {}, |
| | | }) |
| | | setTimeout(() => { |
| | | wx.hideLoading() |
| | | }, 20000); |
| | | ledgerservice.getLedgerDetail(userId, undefined, sceneType, time, { |
| | | success(res) { |
| | | let ledgerMap = that.data.ledgerMap |
| | | ledgerMap.forEach((e, key) => { |
| | | e.ledgers = [] |
| | | }); |
| | | res.forEach(r => { |
| | | let t = ledgerMap.get(r.ledgerType) |
| | | t.ledgers.push(r) |
| | | }); |
| | | let recordList = [] |
| | | ledgerMap.forEach((e, key) => { |
| | | recordList.push({ |
| | | ledgerType: key, |
| | | total: e.total, |
| | | notUpload: e.notUpload, |
| | | ledgers: e.ledgers |
| | | }) |
| | | }); |
| | | // for (const key in ledgerMap) { |
| | | // const e = ledgerMap.get(key); |
| | | |
| | | // } |
| | | that.setData({ |
| | | ledgerMap: ledgerMap, |
| | | recordList: recordList |
| | | }) |
| | | console.log(recordList); |
| | | }, |
| | | complete(res) { |
| | | wx.hideLoading() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | topHeight(element) { |
| | | let that = this; |
| | | let query = wx.createSelectorQuery(); //å¿
é¡»è¦å
å建ä¸ä¸ªæ¥è¯¢ |
| | | query.select(element).boundingClientRect(function (rect) { |
| | | that.setData({ |
| | | marginTop: rect.height + 'px' |
| | | }); |
| | | }).exec(); |
| | | }, |
| | | |
| | | gotoLedgerDetail(e) { |
| | | var i = e.currentTarget.dataset.index.split(',') |
| | | var indexGroup = [parseInt(i[0]), parseInt(i[1])] |
| | | var ledger = this.data.recordList[indexGroup[0]].ledgers[indexGroup[1]] |
| | | wx.navigateTo({ |
| | | url: '/pages/module_ledger/ledgerupload/ledgerupload', |
| | | success: (res) => { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | ledger: ledger, |
| | | indexGroup: indexGroup, |
| | | barTitle: 'åå²å°è´¦' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--pages/module_ledger/ledgerHistory/ledgerhistory.wxml--> |
| | | <import src="/template/nodata/nodata.wxml"></import> |
| | | <view class="page"> |
| | | <view class="page__hd"> |
| | | <view class="flex-h"> |
| | | <text class="title">æ¥çè®°å½</text> |
| | | <picker bindchange="bindYearChange" data-type="year" value="{{year}}" mode="date" fields="year" end="{{maxYear}}"> |
| | | <view class="fyui-selector"> |
| | | {{year}} |
| | | <mp-icon extClass="arrow-down" icon="arrow" color="black" size="{{12}}"></mp-icon> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <view class="horizal-list"> |
| | | <view class="{{selectedMonIndex == index ? 'tag_selected':'tag_unselected'}} {{item.hasData ? 'tag_has_data':''}}" wx:for="{{months}}" wx:key="month" bindtap="selectMonth" data-index="{{index}}">{{item.month}}æ</view> |
| | | </view> |
| | | </view> |
| | | <view class="page__bd" style="margin-top: {{marginTop}};"> |
| | | <block wx:if="{{recordList.length > 0}}"> |
| | | <view wx:for="{{recordList}}" wx:key="index" wx:for-index="i1" class="fyui-panel"> |
| | | <view class="flex-h"> |
| | | <view class="ledger-type">{{item.ledgerType}}</view> |
| | | <view class="ledger-type_2">({{item.ledgers.length}} / {{item.total}})</view> |
| | | </view> |
| | | <view class="ledger-group"> |
| | | <view wx:for="{{item.ledgers}}" wx:for-item="ledger" wx:for-index="i2" wx:key="i2" class="ledger-group_item" bindtap="gotoLedgerDetail" data-index="{{i1}},{{i2}}"> |
| | | <image class="" src="{{ledger.path1[0]}}"></image> |
| | | <view>{{ledger.ledgerName}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | <template wx:else is="nodataPage"></template> |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/module_ledger/ledgerHistory/ledgerhistory.wxss */ |
| | | .page__hd { |
| | | background-color: var(--fyui-BG_1); |
| | | position: fixed; |
| | | z-index: 2; |
| | | } |
| | | .flex-h{ |
| | | padding: 8px; |
| | | } |
| | | |
| | | .title{ |
| | | font-size: 14px; |
| | | font-weight: 550; |
| | | margin: 4px 0; |
| | | } |
| | | |
| | | .arrow-down { |
| | | transform: rotateZ(90deg); |
| | | margin-left: 6px; |
| | | } |
| | | |
| | | .tag_unselected, |
| | | .tag_selected { |
| | | font-size: 12px; |
| | | background-color: #b4b4b45b; |
| | | /* border: 1px solid rgb(175, 173, 173); */ |
| | | border-radius: 2px; |
| | | color: var(--fyui-text-color_3); |
| | | padding: 6rpx 18rpx; |
| | | margin-bottom: 8px; |
| | | width: 10%; |
| | | text-align: center; |
| | | } |
| | | |
| | | .tag_has_data { |
| | | color: var(--fyui-text-color_1); |
| | | background-color: white; |
| | | } |
| | | |
| | | .tag_selected { |
| | | background-color: var(--fyui-primary-color); |
| | | color: white; |
| | | } |
| | | |
| | | .horizal-list { |
| | | display: flex; |
| | | flex-flow: row; |
| | | flex-wrap: wrap; |
| | | white-space: nowrap; |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .ledger-type{ |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .ledger-type_2{ |
| | | font-size: 14px; |
| | | padding: 0 8px; |
| | | color: var(--fyui-text-color_3); |
| | | } |
| | | |
| | | .ledger-group{ |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .ledger-group_item{ |
| | | width: 30vw; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .ledger-group_item>image{ |
| | | width: 28vw; |
| | | height: 28vw; |
| | | } |
| | | |
| | | .ledger-group_item>view{ |
| | | } |
| | |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | deadline: '', |
| | | leftday:0 , |
| | | thisMonth: '', |
| | | lastMonth: '', |
| | | |
| | | //æäº¤æé |
| | | deadline: '', |
| | | //å©ä½æäº¤å¤©æ° |
| | | leftday: 0, |
| | | |
| | | //æ¬ææ±æ» |
| | | thisMonthInfo: { |
| | | //å¿
å¡«é¡¹æ»æ° |
| | | totalMust: 0, |
| | | //å¿
填项æäº¤æ° |
| | | finishedMust: 0, |
| | | //éå¡«é¡¹æ»æ° |
| | | totalSelect: 0, |
| | | //é填项æäº¤æ° |
| | | finishedSelect: 0, |
| | | //æäº¤æ
åµ |
| | | status: '', |
| | | //è¶
æ¶æ
åµ |
| | | overtime: '', |
| | | //建议 |
| | | suggestion: '' |
| | | }, |
| | | //ä¸ææ±æ» |
| | | lastMonthInfo: { |
| | | totalMust: 0, |
| | | finishedMust: 0, |
| | | totalSelect: 0, |
| | | finishedSelect: 0, |
| | | status: '', |
| | | overtime: '', |
| | | suggestion: '' |
| | | }, |
| | | |
| | | //é项å¡ç¸å
³ |
| | | currentTab: 0, |
| | | tabList: [], |
| | | pageList: [], |
| | | pageheight: '300px', |
| | | |
| | | pageheight: '300px' |
| | | //å½åæ¾ç¤ºæä»½ |
| | | showThisMonth: true, |
| | | }, |
| | | |
| | | //æ¯æå°è´¦æäº¤æéæ¥ |
| | |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | this.getLedgerType() |
| | | |
| | | var deadline = moment().format(`MM-${this.DEADLINEDAY}`) |
| | | var leftday = this.DEADLINEDAY + 1 - moment().date() |
| | | let now = moment() |
| | | let deadline = now.format(`MM-${this.DEADLINEDAY}`) |
| | | let leftday = this.DEADLINEDAY + 1 - now.date() |
| | | let thisMonth = now.format('YYYY-MM') |
| | | let lastMonth = now.add(-1, 'M').format('YYYY-MM') |
| | | this.setData({ |
| | | deadline: deadline, |
| | | leftday: leftday |
| | | deadline, |
| | | leftday, |
| | | thisMonth, |
| | | lastMonth |
| | | }) |
| | | |
| | | now = moment() |
| | | this.getLedgerType(now.format('YYYY-MM-DD'), r => { |
| | | this.setData({ |
| | | tabList: r[0], |
| | | pageList: r[1], |
| | | thisMonthInfo: r[2] |
| | | }) |
| | | }) //æ¬æ |
| | | this.getLedgerType(now.add(-1, 'M').format('YYYY-MM-DD'), r => { |
| | | this.setData({ |
| | | lastMonthInfo: r[2] |
| | | }, true) |
| | | }) //䏿 |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | }, |
| | | |
| | | getLedgerType () { |
| | | getLedgerType(time, success, lastMonth) { |
| | | var that = this |
| | | var time = moment().format('YYYY-MM-DD') |
| | | // var time = moment().format('YYYY-MM-DD') |
| | | ledgerservice.getLedgerSummary(app.globalData.accessToken.userId, app.globalData.userInfo.extension2, time, { |
| | | success (res) { |
| | | // console.log(res); |
| | | let r = that.parseLedgerType(res) |
| | | that.setData({ |
| | | tabList: r[0], |
| | | pageList: r[1] |
| | | }) |
| | | success(res) { |
| | | let r = that.parseLedgerType(res, lastMonth) |
| | | success(r) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | parseLedgerType (subtypes) { |
| | | var map = new Map() |
| | | parseLedgerType(subtypes, lastMonth) { |
| | | let monthInfo = { |
| | | totalMust: 0, |
| | | finishedMust: 0, |
| | | totalSelect: 0, |
| | | finishedSelect: 0, |
| | | status: '', |
| | | overtime: '', |
| | | suggestion: '' |
| | | } |
| | | let map = new Map() |
| | | subtypes.forEach(s => { |
| | | //æåº¦ç»è®¡ |
| | | if (s.needUpdate) { |
| | | monthInfo.totalMust++ |
| | | if (s.upLoad) { |
| | | monthInfo.finishedMust++ |
| | | } |
| | | } else { |
| | | monthInfo.totalSelect++ |
| | | if (s.upLoad) { |
| | | monthInfo.finishedSelect++ |
| | | } |
| | | } |
| | | |
| | | //éé¡¹å¡ |
| | | if (s.upLoad) { |
| | | s.tag = '/res/icons/round_check_fill.png' |
| | | } else if (s.ledgerFinished) { |
| | |
| | | } |
| | | map.get(s.ledgerType).push(s) |
| | | }); |
| | | |
| | | // |
| | | if (monthInfo.finishedMust == 0) { |
| | | monthInfo.status = 'æªæäº¤' |
| | | if (lastMonth) { |
| | | monthInfo.suggestion = '彿å°è´¦å®å
¨æªæäº¤ï¼ä¸¥éå½±åè¯ä¼°ç»æï¼åç»è¯·æ³¨æ' |
| | | } else { |
| | | monthInfo.suggestion = '请尽快æäº¤å°è´¦' |
| | | } |
| | | } else if (monthInfo.finishedMust < monthInfo.totalMust) { |
| | | monthInfo.status = 'é¨åæäº¤' |
| | | if (lastMonth) { |
| | | monthInfo.suggestion = '彿å°è´¦é¨åæªæäº¤ï¼ä¼å½±åè¯ä¼°ç»æï¼åç»è¯·å°½éæäº¤ææå°è´¦' |
| | | } else { |
| | | monthInfo.suggestion = 'å½åå·²æäº¤é¨åå°è´¦ï¼è¯·è¡¥å
¨å©ä½å°è´¦' |
| | | } |
| | | } else { |
| | | monthInfo.status = 'å·²æäº¤' |
| | | if (lastMonth) { |
| | | monthInfo.suggestion = '彿å°è´¦å·²å
¨é¨æäº¤ï¼è¯·ä¿æ' |
| | | } else { |
| | | monthInfo.suggestion = 'æ¬æå°è´¦å·²å
¨é¨æäº¤' |
| | | } |
| | | } |
| | | monthInfo.overtime = moment().date() - this.DEADLINEDAY |
| | | monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100) |
| | | |
| | | //éé¡¹å¡ |
| | | var t = [] |
| | | var p = [] |
| | | for(let item of map){ |
| | | for (let item of map) { |
| | | console.log(item); |
| | | t.push(item[0]) |
| | | let notUpload = 0 |
| | | item[1].forEach(l => { |
| | | if (l.needUpdate && !l.upLoad) { |
| | | notUpload++ |
| | | } |
| | | }); |
| | | t.push({ |
| | | name: item[0], |
| | | tag: notUpload, |
| | | total: item[1].length |
| | | }) |
| | | p.push(item[1]) |
| | | } |
| | | |
| | | return [t, p] |
| | | return [t, p, monthInfo] |
| | | }, |
| | | |
| | | gotoLedgerDetail (e) { |
| | | gotoLedgerDetail(e) { |
| | | var i = e.currentTarget.dataset.index.split(',') |
| | | var indexGroup = [parseInt(i[0]), parseInt(i[1])] |
| | | var ledger = this.data.pageList[indexGroup[0]][indexGroup[1]] |
| | |
| | | }) |
| | | }, |
| | | |
| | | gotoHistory(){ |
| | | let tabList = this.data.tabList |
| | | wx.navigateTo({ |
| | | url: '/pages/module_ledger/ledgerhistory/ledgerhistory', |
| | | success: (res) => { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | tabList: tabList, |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | |
| | | |
| | | //计ç®swiperé«åº¦æ¹æ³ï¼å¨åæ¢çæ¶åè°ç¨ï¼ |
| | | tabsHeight(element) { |
| | | let that = this; |
| | | let query = wx.createSelectorQuery(); //å¿
é¡»è¦å
å建ä¸ä¸ªæ¥è¯¢ |
| | | query.select(element).boundingClientRect(function (rect) { |
| | | // let pageheight = that.data.pageheight.split('px')[0] |
| | | // pageheight = parseInt(pageheight) |
| | | // if (rect > pa) { |
| | | |
| | | // } |
| | | that.setData({ |
| | | pageheight: rect.height + 'px' |
| | | }); |
| | |
| | | currentTab: e.target.dataset.current, |
| | | navScrollLeft: e.target.dataset.current >= 3 ? ((e.target.dataset.current) * 60) : 0 //夿å½åéä¸çä¸ªæ°æ¯å¦æ¯ç¬¬5个 |
| | | }) |
| | | that.tabsHeight('.page'+e.target.dataset.current); //æ¥è¯¢åªä¸ä¸ªå
ç´ |
| | | that.tabsHeight('.page' + e.target.dataset.current); //æ¥è¯¢åªä¸ä¸ªå
ç´ |
| | | } |
| | | }, |
| | | bindChange: function (e) { |
| | |
| | | }); |
| | | // that.tabsHeight('.page'+e.target.dataset.current); //æ¥è¯¢åªä¸ä¸ªå
ç´ |
| | | }, |
| | | |
| | | changeMonth(){ |
| | | let showThisMonth = !this.data.showThisMonth |
| | | this.setData({showThisMonth}) |
| | | } |
| | | }) |
| | |
| | | { |
| | | "navigationBarTitleText": "å°è´¦ç®¡ç", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon" |
| | | } |
| | | } |
| | |
| | | <view class="page"> |
| | | <view class="banner-bg"></view> |
| | | <view class="page__hd"> |
| | | <view class="head_1">æ¬æå°è´¦æäº¤æ¥ï¼{{deadline}}</view> |
| | | <view wx:if="{{leftday > 0}}" class="head_2">å©ä½<text>{{leftday}}</text>天</view> |
| | | <view wx:else class="head_2">已龿ï¼è¯·å°½å¿«æäº¤</view> |
| | | <view class="head_3">åæ¶äº¤å°è´¦ï¼ç»´æ¤å¥½ä¿¡ç¨</view> |
| | | <!-- <view class="fyui-panel"> --> |
| | | <view class="head_right" bindtap="changeMonth"> |
| | | <text class="head_tag" >{{showThisMonth ? thisMonth + 'æ¬æ' : lastMonth + '䏿'}}æ±æ»</text> |
| | | <mp-icon style="margin-left: 4px;" icon="transfer2" color="white" size="{{20}}"></mp-icon> |
| | | </view> |
| | | <view class="card"> |
| | | <block wx:if="{{showThisMonth}}"> |
| | | <view class="head_row"> |
| | | <view class="head_row_item"> |
| | | <view class="head_tag">é填项</view> |
| | | <view class="head_1">{{thisMonthInfo.finishedSelect}}<text class="head_row_item_tag">/{{thisMonthInfo.totalSelect}}</text></view> |
| | | </view> |
| | | <view class="head_row_item"> |
| | | <view class="head_tag">å¿
填项</view> |
| | | <view class="head_1">{{thisMonthInfo.finishedMust}}<text class="head_row_item_tag">/{{thisMonthInfo.totalMust}}</text></view> |
| | | </view> |
| | | <view class="head_row_item"> |
| | | <view class="head_tag">å®æåº¦</view> |
| | | <view class="head_1">{{thisMonthInfo.percent}}<text class="head_row_item_tag">%</text></view> |
| | | </view> |
| | | </view> |
| | | <view class="head_row"> |
| | | <view class="head_tag">æ¬æå°è´¦æäº¤æ¥ï¼{{deadline}}</view> |
| | | <view wx:if="{{leftday > 0}}" class="head_tag">å©ä½<text>{{leftday}}</text>天</view> |
| | | <view wx:else class="head_tag">龿 <text>{{thisMonthInfo.overtime}}</text>天</view> |
| | | </view> |
| | | <view class="head_tag">建议ï¼{{thisMonthInfo.suggestion}}</view> |
| | | |
| | | </block> |
| | | <block wx:else> |
| | | <view class="head_row"> |
| | | <view class="head_row_item"> |
| | | <view class="head_tag">é填项</view> |
| | | <view class="head_1">{{lastMonthInfo.finishedSelect}}<text class="head_row_item_tag">/{{lastMonthInfo.totalSelect}}</text></view> |
| | | </view> |
| | | <view class="head_row_item"> |
| | | <view class="head_tag">å¿
填项</view> |
| | | <view class="head_1">{{lastMonthInfo.finishedMust}}<text class="head_row_item_tag">/{{lastMonthInfo.totalMust}}</text></view> |
| | | </view> |
| | | <view class="head_row_item"> |
| | | <view class="head_tag">å®æåº¦</view> |
| | | <view class="head_1">{{lastMonthInfo.percent}}<text class="head_row_item_tag">%</text></view> |
| | | </view> |
| | | </view> |
| | | <view class="head_row"> |
| | | <view class="head_tag">æäº¤æ
åµï¼{{lastMonthInfo.status}}</view> |
| | | </view> |
| | | <view class="head_tag">建议ï¼{{lastMonthInfo.suggestion}}</view> |
| | | </block> |
| | | </view> |
| | | <view class="head_right"> |
| | | <text class="head_tag" bindtap="gotoHistory">åå²è®°å½ ></text> |
| | | </view> |
| | | </view> |
| | | <!-- </view> --> |
| | | <view class="page__bd"> |
| | | <view class="swiper-tab"> |
| | | <scroll-view scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="false" scroll-with-animation="true"> |
| | | <scroll-view class="swiper-tab_view" scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true"> |
| | | <block wx:for="{{tabList}}" wx:key="i"> |
| | | <view class="swiper-tab-list {{currentTab==index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav">{{item}}</view> |
| | | <view class="swiper-tab-list {{currentTab==index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav"> |
| | | {{item.name}} |
| | | <text wx:if="{{item.tag > 0}}" class="swiper-tab-list__tag">{{item.tag}}</text> |
| | | </view> |
| | | </block> |
| | | </scroll-view> |
| | | </view> |
| | |
| | | .banner-bg { |
| | | position: fixed; |
| | | width: 100%; |
| | | height: 50vh; |
| | | height: 60%; |
| | | background: linear-gradient(to bottom, #57E4CB, #83b6ae); |
| | | } |
| | | |
| | | .page__hd { |
| | | height: 30vh; |
| | | text-align: center; |
| | | /* text-align: center; */ |
| | | display: flex; |
| | | flex-flow: column; |
| | | justify-content: flex-start; |
| | | /* color: #50854C; */ |
| | | color: white; |
| | | padding: 8px 16px; |
| | | } |
| | | |
| | | .card{ |
| | | height: 26vh; |
| | | /* background-color: royalblue; */ |
| | | } |
| | | |
| | | .head_row{ |
| | | display: flex; |
| | | /* padding: 0 30px; */ |
| | | justify-content: space-between; |
| | | color: #50854C; |
| | | align-items: baseline; |
| | | } |
| | | |
| | | .head_1 { |
| | | .head_row_item{ |
| | | text-align: center; |
| | | /* width: 20vw; */ |
| | | flex: 1; |
| | | /* background-color: red; */ |
| | | } |
| | | |
| | | .head_row_item_tag{ |
| | | font-size: 12px; |
| | | font-weight: 559; |
| | | } |
| | | |
| | | .head_2 { |
| | | .head_right { |
| | | text-align: end; |
| | | font-size: 12px; |
| | | /* background-color: brown; */ |
| | | margin-bottom: 8px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .head_tag{ |
| | | font-size: 12px; |
| | | color: rgba(255, 255, 255, 0.8); |
| | | } |
| | | |
| | | .head_tag>text { |
| | | font-size: 40px; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .head_2>text { |
| | | font-size: 40px; |
| | | .head_1 { |
| | | font-size: 30px; |
| | | } |
| | | |
| | | .head_3 { |
| | |
| | | z-index: 2; |
| | | /* background-color: #65EAD2; */ |
| | | /* background-color: #70ea65; */ |
| | | padding: 2px; |
| | | /* padding: 2px; */ |
| | | } |
| | | |
| | | .swiper-tab_view{ |
| | | /* background-color: blueviolet; */ |
| | | } |
| | | |
| | | .swiper-tab-list{ |
| | | position: relative; |
| | | font-size: 30rpx; |
| | | display: inline-block; |
| | | min-width: 18%; |
| | | padding: 0 1%; |
| | | padding: 0 16px; |
| | | color: rgba(255, 255, 255, 0.658); |
| | | } |
| | | |
| | | .swiper-tab-list__tag{ |
| | | position: absolute; |
| | | top: 2px; |
| | | right: 4px; |
| | | font-size: 10px; |
| | | line-height: 16px; |
| | | width: 16px; |
| | | background-color: brown; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .on{ |
| | | color: white; |
| | | font-weight: bold; |
| | |
| | | ledger: data.ledger, |
| | | indexGroup: data.indexGroup |
| | | }) |
| | | if (data.barTitle) { |
| | | wx.setNavigationBarTitle({ |
| | | title: data.barTitle, |
| | | }) |
| | | } |
| | | |
| | | that.checkStatus() |
| | | }) |
| | |
| | | if (res.length > 0) { |
| | | let detail = res[0] |
| | | if (detail.upLoad) { |
| | | let imgFiles = detail.path1.split(';').map((value, index) => { |
| | | return $f.basePicUrl + value |
| | | }) |
| | | let imgFiles = detail.path1 |
| | | let remark = detail.remark1 == null ? '' : detail.remark1 |
| | | let remarkDisable = true |
| | | that.setData({imgFiles, remark, remarkDisable}) |
| | |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady: function () { |
| | | |
| | | // this.login() |
| | | }, |
| | | |
| | | /** |
| | |
| | | }, |
| | | |
| | | loginWx() { |
| | | var that = this |
| | | wx.getUserProfile({ |
| | | lang: 'zh_CN', |
| | | desc: 'ç¨äºæ¾ç¤ºï¼æç¤ºç¨æ·å½åå·²ç»å½', |
| | | success(res) { |
| | | //è·åç¼åçç¨æ·è´¦æ·å¯ç |
| | | console.log(res); |
| | | wx.login({ |
| | | timeout: 10000, |
| | | success: (result) => { |
| | | console.log(result); |
| | | }, |
| | | fail: (res) => {}, |
| | | complete: (res) => {}, |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | login() { |
| | | //è·åç¼åçç¨æ·è´¦æ·å¯ç |
| | | var that = this |
| | | wx.getStorage({ |
| | | key: 'accessToken', |
| | | success(res) { |
| | |
| | | }) |
| | | |
| | | userservice.login(that.data.userName, that.data.password, { |
| | | success (data) { |
| | | success(data) { |
| | | if (data.success) { |
| | | app.globalData.accessToken = { |
| | | userName: that.data.userName, |
| | |
| | | }) |
| | | } |
| | | }, |
| | | complete () { |
| | | complete() { |
| | | that.setData({ |
| | | loading: false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | |
| | | imgFiles: [], |
| | | |
| | | msg: [{ |
| | | name: "è´¦å·", |
| | | name: "ç¨æ·åç§°", |
| | | id: "username", |
| | | input: true, |
| | | value: "", |
| | | noValue: false |
| | | noValue: false, |
| | | }, |
| | | { |
| | | name: "å¯ç ", |
| | | name: "æ°å¯ç ", |
| | | id: "password", |
| | | input: true, |
| | | type: 'password', |
| | | placeholder: '请è¾å
¥å¯ç ï¼æå¤20ä½ï¼', |
| | | maxLength: 20, |
| | | value: "", |
| | | noValue: false |
| | |
| | | noValue: false, |
| | | }, |
| | | { |
| | | name: "å
¬å¸åç§°", |
| | | name: "ä¼ä¸åç§°", |
| | | id: "department", |
| | | input: true, |
| | | value: '', |
| | | noValue: false, |
| | | }, |
| | | { |
| | | name: "ä¼ä¸å°å", |
| | | id: "address", |
| | | input: true, |
| | | value: '', |
| | | noValue: false, |
| | | }, |
| | | { |
| | | name: "èç³»æ¹å¼", |
| | | id: "contract", |
| | | input: true, |
| | | value: '', |
| | | noValue: false, |
| | |
| | | }) |
| | | return false |
| | | } |
| | | //å¯ç å¤æåº¦ç¡®è®¤ |
| | | var pwError |
| | | var pw = msg[1].value |
| | | var regex1 = /[a-zA-Z]/ |
| | | var regex2 = /[0-9]/ |
| | | var r = regex1.test(pw) && regex2.test(pw) |
| | | console.log('regex:' + r); |
| | | if (pw.length < 6) { |
| | | pwError = 'å¯ç 使°æå°6ä½' |
| | | } else if (!r) { |
| | | pwError = 'å¯ç å¿
é¡»å
å«åæ¯åæ°å' |
| | | } |
| | | if (pwError) { |
| | | this.setData({ |
| | | errorMsg: pwError, |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | return true |
| | | } |
| | |
| | | |
| | | <view class="page__bd"> |
| | | <view class="top-card"> |
| | | <view class="tag">ä¼ä¸ç±»å</view> |
| | | <view class="tag"><text style="color: transparent;">*</text>ä¼ä¸ç±»å</view> |
| | | <picker mode="selector" bindchange="changeSceneType" value="{{sceneTypeIndex}}" range="{{sceneTypes}}" range-key="name" class="value"> |
| | | <view>{{sceneTypes[sceneTypeIndex].name}}</view> |
| | | </picker> |
| | |
| | | // pages/notice/notice.js |
| | | const notificationservice = require("../../service/notificationservice") |
| | | const moment = require('../../utils/moment.min') |
| | | const util = require("../../utils/util.js") |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | } |
| | | ], |
| | | pageList: [ |
| | | { |
| | | url: "/res/icons/notice_3.png" |
| | | }, |
| | | { |
| | | url: "/res/icons/notice_1.png" |
| | | }, |
| | | { |
| | | url: "/res/icons/notice_2.png" |
| | | }, |
| | | |
| | | [], |
| | | [], |
| | | [] |
| | | ] |
| | | }, |
| | | |
| | |
| | | */ |
| | | onLoad: function (options) { |
| | | this.tabsHeight('.page0'); |
| | | this.getNotice() |
| | | }, |
| | | |
| | | onReachBottom () { |
| | | if (this.cPage && this.tPage) { |
| | | if (this.cPage < this.tPage) { |
| | | this.getNotice(this.cPage + 1) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | getNotice(cPage = 1) { |
| | | var that = this |
| | | notificationservice.getNotification(app.globalData.accessToken.userId, cPage, { |
| | | onHead(header) { |
| | | that.cPage = parseInt(header.currentPage) |
| | | that.tPage = parseInt(header.totalPage) |
| | | console.log(`cPage:${that.cPage}, tPage:${that.tPage}`); |
| | | }, |
| | | success(res) { |
| | | res.forEach(r => { |
| | | r.updateTime = util.formatTime(r.updateTime) |
| | | }); |
| | | let notices = that.data.pageList[0].concat(res) |
| | | that.setData({ |
| | | ['pageList[0]']: notices |
| | | }) |
| | | |
| | | that.tabsHeight('.page0'); //å·æ°é«åº¦ |
| | | } |
| | | }, 5) |
| | | }, |
| | | }) |
| | |
| | | <!--pages/notice/notice.wxml--> |
| | | <import src="/template/nodata/nodata.wxml"></import> |
| | | |
| | | <view class="page"> |
| | | <view class="swiper-tab"> |
| | | <scroll-view scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="false" scroll-with-animation="true"> |
| | |
| | | <block wx:for="{{pageList}}" wx:for-item="page" wx:key="n"> |
| | | <swiper-item> |
| | | <view class="page{{index}}"> |
| | | <image src="{{page.url}}" mode="aspectFit" style="width: 100%;"></image> |
| | | <image src="{{page.url}}" mode="aspectFit" style="width: 100%;"></image> |
| | | <image src="{{page.url}}" mode="aspectFit" style="width: 100%;"></image> |
| | | <block wx:if="{{page.length > 0}}"> |
| | | <view wx:for="{{page}}" wx:for-item="notice" wx:key="index"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | <image src="/res/icons/notice.png" class=""></image> |
| | | <view class="title"> |
| | | <view>å·¥ä½éç¥</view> |
| | | <text>{{notice.updateTime}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <!-- <view class="fyui-box__content tag">ç¸å
³è¡ä¸ -> {{item.fileIndustry}}</view> --> |
| | | <view class="fyui-box__content des">{{notice.content}}</view> |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <text class="detail">æ¥ç详æ
></text> |
| | | <button wx:if="{{notice.needSigned}}" class="sign" size="mini" type="{{notice.hasSigned ? 'default' : 'primary'}}" plain="{{notice.hasSigned}}" loading=""> |
| | | {{notice.hasSigned ? 'å·²ç¾æ¶' : 'ç¾æ¶'}} |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="page__ft"></view> |
| | | </block> |
| | | <template is="nodataPage" wx:else></template> |
| | | </view> |
| | | </swiper-item> |
| | | </block> |
| | | </swiper> |
| | | |
| | | |
| | | </view> |
| | |
| | | white-space: nowrap; |
| | | z-index: 2; |
| | | background-color: #EAFFF1; |
| | | padding: 2px; |
| | | } |
| | | |
| | | .swiper-tab-list{ |
| | |
| | | display: block; |
| | | top: 80rpx; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | /* margin-top: 10px; */ |
| | | background-color: var(--fyui-BG_1); |
| | | } |
| | | |
| | | .fyui-box { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | |
| | | .fyui-box .fyui-box__hd { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .title { |
| | | display: flex; |
| | | width: 100%; |
| | | justify-content: space-between; |
| | | align-items: flex-end; |
| | | } |
| | | .title>text { |
| | | font-size: small; |
| | | color: var(--fyui-text-color_2); |
| | | } |
| | | |
| | | |
| | | .fyui-box .fyui-box__hd>image { |
| | | width: 12px; |
| | | height: 12px; |
| | | background-color: #4C97F8; |
| | | padding: 5px; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .fyui-box__ft { |
| | | /* position: relative; */ |
| | | /* padding: 20px; */ |
| | | margin-top: 40px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .fyui-box__ft:before{ |
| | | content: " "; |
| | | width: 100%; |
| | | height: 1px; |
| | | background-color: var(--fyui-BG_1); |
| | | bottom: 50px; |
| | | position: absolute; |
| | | } |
| | | |
| | | .detail { |
| | | white-space: nowrap; |
| | | color: var(--fyui-text-color_1); |
| | | } |
| | | .sign { |
| | | background-color: red; |
| | | margin: 0; |
| | | } |
| | | |
| | | .des { |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 4; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | /* text-overflow: ellipsis; */ |
| | | } |
| | | |
| | | .page__ft { |
| | | color: var(--fyui-text-color_2); |
| | | } |
| | |
| | | "checkSiteMap": true, |
| | | "uploadWithSourceMap": true, |
| | | "compileHotReLoad": false, |
| | | "useMultiFrameRuntime": false, |
| | | "useMultiFrameRuntime": true, |
| | | "useApiHook": true, |
| | | "babelSetting": { |
| | | "ignore": [], |
| | |
| | | const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/" |
| | | const baseFileUrl = baseUrl + "/meeting/file/" |
| | | |
| | | function request(fun) { |
| | | function request(fun) { |
| | | if (fun.params != undefined) { |
| | | var param = "" |
| | | Object.keys(fun.params).forEach(key => { |
| | |
| | | } |
| | | }); |
| | | var url = fun.url |
| | | fun.url = baseUrl + url + "?" + param |
| | | }else{ |
| | | fun.url = baseUrl + url + "?" + param |
| | | } else { |
| | | var url = fun.url |
| | | fun.url = baseUrl + url |
| | | } |
| | |
| | | fun1.success = function (res) { |
| | | console.log("--------------请æ±ç»æ----------------" + fun.url); |
| | | console.log(res); |
| | | |
| | | |
| | | if (fun.onHead) { |
| | | fun.onHead(res.header) |
| | | } |
| | | fun.success(res.data) |
| | | // if(res.data.success) { |
| | | // var head = res.data['head'] |
| | |
| | | icon: 'none' |
| | | }) |
| | | if (fun.fail) { |
| | | fun.fail(error) |
| | | fun.fail(error) |
| | | } |
| | | } |
| | | fun1.complete = fun.complete |
| | |
| | | fun['method'] = 'POST' |
| | | request(fun) |
| | | }, |
| | | basePicUrl:basePicUrl, |
| | | baseUrl:baseUrl, |
| | | baseFileUrl:baseFileUrl, |
| | | basePicUrl: basePicUrl, |
| | | baseUrl: baseUrl, |
| | | baseFileUrl: baseFileUrl, |
| | | baseIconUrl: baseIconUrl |
| | | } |
| | |
| | | let cb = { |
| | | url: `/ledger/${userId}/detail2`, |
| | | params: { |
| | | ledgerSubTypeId: ledgerSubTypeId, |
| | | sceneType: sceneType, |
| | | time: time |
| | | }, |
| | | } |
| | | if (ledgerSubTypeId) { |
| | | cb.params.ledgerSubTypeId = ledgerSubTypeId |
| | | } |
| | | Object.assign(cb, fun) |
| | | |
| | | $f.get(cb) |
| | | let fun1 = util.deepCopy(cb) |
| | | fun1.success = function (res) { |
| | | res.forEach(r => { |
| | | r.path1 = r.path1.split(';').map((value, index) => { |
| | | return $f.basePicUrl + value |
| | | }) |
| | | }); |
| | | cb.success(res) |
| | | } |
| | | |
| | | $f.get(fun1) |
| | | }, |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const $f = require('./baserequest') |
| | | const util = require('../utils/util') |
| | | |
| | | module.exports = { |
| | | //è·åå°è´¦ç±»å |
| | | getNotification: function (userId, page, fun, perPage = 3) { |
| | | let cb = { |
| | | url: `/notifications`, |
| | | params: { |
| | | userId: userId, |
| | | page: page, |
| | | per_page: perPage |
| | | }, |
| | | } |
| | | Object.assign(cb, fun) |
| | | |
| | | let fun1 = util.deepCopy(cb) |
| | | fun1.success = function (res) { |
| | | res.forEach(r => { |
| | | r.authorPicUrl = $f.basePicUrl + r.authorPicUrl |
| | | r.picUrl = $f.basePicUrl + r.picUrl |
| | | }); |
| | | cb.success(res) |
| | | } |
| | | $f.get(fun1) |
| | | }, |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template name="nodataPage"> |
| | | <view class="no-data"> |
| | | <image src="/res/icons/nodata.png" mode="widthFix"></image> |
| | | <view class="more">ææ è®°å½</view> |
| | | </view> |
| | | </template> |
| | |
| | | const formatTime = date => { |
| | | const year = date.getFullYear() |
| | | const month = date.getMonth() + 1 |
| | | const day = date.getDate() |
| | | const hour = date.getHours() |
| | | const minute = date.getMinutes() |
| | | const second = date.getSeconds() |
| | | const moment = require('./moment.min') |
| | | |
| | | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') |
| | | |
| | | |
| | | const formatTime = date => { |
| | | const time = moment(date) |
| | | const now = moment() |
| | | |
| | | const timeYear = time.year() |
| | | const timeMonth = time.month() + 1 |
| | | const timeDay = time.date() |
| | | |
| | | const thisYear = now.year() |
| | | const thisMonth = now.month() + 1 |
| | | const thisDay = now.date() |
| | | |
| | | if (timeYear < thisYear) { |
| | | return time.format('YYYYå¹´MMæ') |
| | | } else if (timeMonth < thisMonth) { |
| | | return time.format('MMæDDæ¥') |
| | | } else if (timeDay < thisDay) { |
| | | if (timeDay + 1 == thisDay) { |
| | | return 'æ¨å¤©' |
| | | } else { |
| | | return time.format('MMæDDæ¥') |
| | | } |
| | | } else { |
| | | return time.fromNow() |
| | | } |
| | | } |
| | | |
| | | const formatNumber = n => { |