Compare commits
No commits in common. 'master' and 'dev' have entirely different histories.
1280 changed files with 48212 additions and 197 deletions
@ -0,0 +1,3 @@ |
|||
**/.idea |
|||
.idea |
|||
/node_modules/ |
@ -0,0 +1,13 @@ |
|||
{ |
|||
"pagePath": "pages/information/information", |
|||
"text": "数据", |
|||
"iconPath": "images/home/information.png", |
|||
"selectedIconPath": "images/home/informationSelected.png" |
|||
}, |
|||
|
|||
2a43afb52996723c6517edb048de6c79 小程序密钥 |
|||
15554200534 |
|||
12345678 |
|||
|
|||
18900000002 |
|||
12345678 |
@ -1,12 +1,51 @@ |
|||
// app.js
|
|||
import {getStaffbasicinfo} from "./utils/api"; |
|||
import {getOwnedRolesOfStaffId} from "./utils/statisticsApi"; |
|||
|
|||
App({ |
|||
onLaunch: function () { |
|||
//显示红字,badge
|
|||
}, |
|||
globalData: { |
|||
userInfo: null |
|||
}, |
|||
globalData: { |
|||
userInfo: null |
|||
} |
|||
onLaunch: function (options) { |
|||
//获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度)
|
|||
//这个最初我是在组件中获取,但是出现了一个问题,当第一次进入小程序时导航栏会把
|
|||
//页面内容盖住一部分,当打开调试重新进入时就没有问题,这个问题弄得我是莫名其妙
|
|||
//虽然最后解决了,但是花费了不少时间
|
|||
let code = [1011, 1017, 1025, 1047, 1124, 1001, 1038, 1041, 1089, 1090, 1104, 1131, 1187]; |
|||
if (code.includes(options.scene)) { |
|||
console.log(options.scene); |
|||
this.globalData.share = true |
|||
} else { |
|||
this.globalData.share = false |
|||
} |
|||
const menuButtonInfo = wx.getMenuButtonBoundingClientRect() |
|||
wx.getSystemInfo({ |
|||
success: (res) => { |
|||
this.globalData.height = res.statusBarHeight |
|||
this.globalData.deviceInfo.statusHeight = res.statusBarHeight |
|||
this.globalData.deviceInfo.navigationHeight = menuButtonInfo.height + (menuButtonInfo.top - res.statusBarHeight) * 2 |
|||
} |
|||
}) |
|||
wx.hideTabBar() |
|||
getStaffbasicinfo().then(res=>{ |
|||
this.globalData.user = res.data |
|||
getOwnedRolesOfStaffId(res.data.id).then(res2 => { |
|||
this.globalData.roleList = res2.data |
|||
}) |
|||
}).catch(err=>{ |
|||
console.log(err); |
|||
wx.redirectTo({ |
|||
url: '/pages/login/login', |
|||
}) |
|||
}) |
|||
}, |
|||
globalData: { |
|||
userInfo: null, |
|||
selected: 0, |
|||
deviceInfo: { |
|||
statusHeight: 19, |
|||
navigationHeight: 40 |
|||
}, |
|||
user: {}, |
|||
share: false, |
|||
questionnaireUrl: '', |
|||
roleList: [] |
|||
} |
|||
}) |
|||
|
@ -0,0 +1,188 @@ |
|||
import { |
|||
agencygridtree, commonDemand, |
|||
dictlist, listServerOrg, |
|||
} from "../../utils/statisticsApi"; |
|||
|
|||
const App = getApp() |
|||
const config = require('../../utils/config') |
|||
Component({ |
|||
properties: { |
|||
visible: { |
|||
type: Boolean, |
|||
value: false |
|||
}, |
|||
detail: { |
|||
type: Object, |
|||
value: () => { |
|||
}, |
|||
}, |
|||
id: { |
|||
type: String, |
|||
value: '' |
|||
} |
|||
}, |
|||
data: { |
|||
agencyId: '', |
|||
loading: true, |
|||
form: { |
|||
serviceType: "", |
|||
serverId: "", |
|||
noticeApproches: [], |
|||
serviceScopeList: [] |
|||
}, |
|||
serviceOptions: [], |
|||
serviceIndex: -1, |
|||
serviceOptiondIndex: -1, |
|||
serviceOptiondList: [], |
|||
visible2: false, |
|||
orgField: {text: 'agencyName', value: 'agencyId', children: 'subAgencyList'}, |
|||
orgName: "", |
|||
orgOptions: [], |
|||
showService: false, |
|||
fieldValue: '', |
|||
cascaderValue: '', |
|||
showDate: false |
|||
}, |
|||
ready: function () { |
|||
|
|||
dictlist({ |
|||
dictType: "user_demand_service_type", |
|||
}).then((res) => { |
|||
this.setData({ |
|||
serviceOptions: res.data |
|||
}) |
|||
}) |
|||
if (!this.agencyId) { |
|||
this.setData({ |
|||
agencyId: App.globalData.user.agencyId |
|||
}) |
|||
} |
|||
this.getOrgTreeList() |
|||
}, |
|||
|
|||
methods: { |
|||
onShowService() { |
|||
this.setData({ |
|||
showService: true, |
|||
}); |
|||
console.log(111, this.data.showService) |
|||
}, |
|||
|
|||
onCloseService() { |
|||
this.setData({ |
|||
showService: false, |
|||
}); |
|||
}, |
|||
|
|||
onFinishService(e) { |
|||
const {selectedOptions, value} = e.detail; |
|||
const fieldValue = selectedOptions |
|||
.map((option) => option.agencyName || option.agencyName) |
|||
.join('/'); |
|||
let serviceScopeList = selectedOptions[selectedOptions.length - 1] |
|||
this.setData({ |
|||
fieldValue, |
|||
showService: false, |
|||
cascaderValue: value, |
|||
"form.serviceScopeList": [ |
|||
{ |
|||
objectId: serviceScopeList.agencyId, |
|||
objectName: serviceScopeList.agencyName, |
|||
objectType: serviceScopeList.level |
|||
} |
|||
] |
|||
}) |
|||
}, |
|||
getOrgTreeList() { |
|||
let params = { |
|||
agencyId: this.data.agencyId, |
|||
purpose: "query" |
|||
} |
|||
agencygridtree(params).then(res => { |
|||
let org = this.deleteChildren(res.data.subAgencyList) |
|||
this.setData({ |
|||
orgOptions: org |
|||
}) |
|||
}) |
|||
}, |
|||
noticeApprochesChange(e) { |
|||
this.setData({ |
|||
"form.noticeApproches": e.detail |
|||
}) |
|||
}, |
|||
onShowDate() { |
|||
this.setData({showDate: true}); |
|||
}, |
|||
onCloseDate() { |
|||
this.setData({showDate: false}); |
|||
}, |
|||
formatDate(date) { |
|||
date = new Date(date); |
|||
return `${date.getFullYear()}-${date.getMonth() + 1 > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)}-${date.getDate() > 10 ? date.getDate() : '0' + date.getDate()}`; |
|||
}, |
|||
onConfirmDate(event) { |
|||
const [start, end] = event.detail; |
|||
this.setData({ |
|||
showDate: false, |
|||
date: `${this.formatDate(start)} ~ ${this.formatDate(end)}`, |
|||
"form.serviceTimeStart": `${this.formatDate(start)} 00:00:00`, |
|||
"form.serviceTimeEnd": `${this.formatDate(end)} 00:00:00`, |
|||
}); |
|||
}, |
|||
|
|||
serviceOptiondListChange(e) { |
|||
this.setData({ |
|||
serviceOptiondIndex: e.detail.value, |
|||
"form.serverOrgId": this.data.serviceOptiondList[e.detail.value].id |
|||
}) |
|||
}, |
|||
getServiceuserList(e) { |
|||
this.setData({ |
|||
serviceIndex: e.detail.value, |
|||
"form.serverOrgType": this.data.serviceOptions[e.detail.value].value |
|||
}) |
|||
let params = { |
|||
serviceTypeId: this.data.detail.categoryCode[1],//上级ID
|
|||
serverOrgType: this.data.serviceOptions[e.detail.value].value,//选的类型
|
|||
businessType: "resi_service", |
|||
}; |
|||
|
|||
// serviceOptiondIndex
|
|||
listServerOrg(params).then((res) => { |
|||
this.setData({ |
|||
serviceOptiondList: res.data || [] |
|||
}) |
|||
}) |
|||
}, |
|||
deleteChildren(node) { |
|||
node.forEach(item => { |
|||
if ('subAgencyList' in item && !item.subAgencyList) { |
|||
delete item.subAgencyList |
|||
} else if ('subAgencyList' in item && item.subAgencyList.length) { |
|||
this.deleteChildren(item.subAgencyList) |
|||
} |
|||
}) |
|||
return node |
|||
}, |
|||
|
|||
close() { |
|||
this.triggerEvent('close') |
|||
}, |
|||
sure() { |
|||
commonDemand({ |
|||
...this.data.detail, |
|||
assignFlag: 1, |
|||
assignInfo: { |
|||
...this.data.form, |
|||
} |
|||
// demandRecId: this.data.detail.demandRecId
|
|||
}).then(res => { |
|||
wx.showToast({ |
|||
icon: 'success', |
|||
title: '操作成功' |
|||
}) |
|||
this.close() |
|||
}) |
|||
}, |
|||
} |
|||
}); |
@ -0,0 +1,12 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"van-cascader": "@vant/weapp/cascader/index", |
|||
"van-popup": "@vant/weapp/popup/index", |
|||
"van-field": "@vant/weapp/field/index", |
|||
"van-checkbox": "@vant/weapp/checkbox/index", |
|||
"van-checkbox-group": "@vant/weapp/checkbox-group/index", |
|||
"van-calendar": "@vant/weapp/calendar/index", |
|||
"van-icon": "@vant/weapp/icon/index" |
|||
} |
|||
} |
@ -0,0 +1,98 @@ |
|||
<van-popup position="bottom" show="{{ visible }}" bind:close="close" closable> |
|||
<view class="popup-container"> |
|||
<view class="title">需求派单</view> |
|||
<scroll-view scroll-y class="popup-content2"> |
|||
<view class="card"> |
|||
<view class="items"> |
|||
<view class="label">需求类别:</view> |
|||
<view class="value">{{detail.categoryName}}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">需求标题:</view> |
|||
<view class="value">{{detail.title}}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">详细说明:</view> |
|||
<view class="value"> |
|||
{{detail.content}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="card"> |
|||
<picker range="{{serviceOptions}}" range-key="label" bind:change="getServiceuserList"> |
|||
<view class="items"> |
|||
<view class="label label-width">服务方类型:</view> |
|||
<view class="value text-right flex {{serviceIndex >= 0 ? '' : 'gray'}}"> |
|||
{{serviceIndex >= 0 ? serviceOptions[serviceIndex].label : '请选择'}} |
|||
<van-icon name="arrow"/> |
|||
</view> |
|||
</view> |
|||
</picker> |
|||
<picker range="{{serviceOptiondList}}" bind:change="serviceOptiondListChange" range-key="label"> |
|||
<view class="items"> |
|||
<view class="label label-width">服务方:</view> |
|||
<view class="value text-right flex {{serviceOptiondIndex >= 0 ? '' : 'gray'}}"> |
|||
{{serviceOptiondIndex >= 0 ? serviceOptiondList[serviceOptiondIndex].label : '请选择'}} |
|||
<van-icon name="arrow"/> |
|||
</view> |
|||
</view> |
|||
</picker> |
|||
|
|||
<view class="items"> |
|||
<view class="label label-width">通知服务方:</view> |
|||
<view class="value"> |
|||
<van-checkbox-group value="{{ form.noticeApproches }}" |
|||
bind:change="noticeApprochesChange"> |
|||
<view class="flex"> |
|||
<van-checkbox name="1">短信通知</van-checkbox> |
|||
<view style="width: 40rpx"></view> |
|||
<van-checkbox name="2">公众号通知</van-checkbox> |
|||
</view> |
|||
</van-checkbox-group> |
|||
</view> |
|||
</view> |
|||
<view class="items" bind:tap="onShowService"> |
|||
<view class="label label-width">服务范围:</view> |
|||
<view class="value text-right flex {{fieldValue ? '' : 'gray'}}"> |
|||
{{fieldValue ? fieldValue : '请选择'}} |
|||
<van-icon name="arrow"/> |
|||
</view> |
|||
</view> |
|||
<view class="items" bind:tap="onShowDate"> |
|||
<view class="label label-width">服务时间:</view> |
|||
<view class="value text-right flex {{date ? '' : 'gray'}}"> |
|||
{{date ? date : '请选择'}} |
|||
<van-icon name="arrow"/> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<view class="bottom-btn"> |
|||
<view class="btn btn-gray" bind:tap="close">取消</view> |
|||
<view class="btn btn-blue" bind:tap="sure">确定</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<van-popup show="{{ showService }}" round position="bottom"> |
|||
<van-cascader |
|||
field-names="{{ orgField }}" |
|||
wx:if="{{ showService }}" |
|||
value="{{ cascaderValue }}" |
|||
title="请选择服务范围" |
|||
options="{{ orgOptions }}" |
|||
bind:close="onCloseService" |
|||
bind:finish="onFinishService" |
|||
> |
|||
</van-cascader> |
|||
</van-popup> |
|||
<van-calendar |
|||
show="{{ showDate }}" |
|||
type="range" |
|||
bind:close="onCloseDate" |
|||
bind:confirm="onConfirmDate" |
|||
/> |
|||
</van-popup> |
@ -0,0 +1,144 @@ |
|||
.wux-popup__content { |
|||
background: none!important; |
|||
} |
|||
|
|||
.popup-container { |
|||
padding: 32rpx 20rpx 50rpx; |
|||
background: linear-gradient(180deg, #DBEEFF 0%, #F4FAFF 100%); |
|||
border-radius: 30rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 34rpx; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 39rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.title:before { |
|||
content: ''; |
|||
display: block; |
|||
width: 10rpx; |
|||
height: 28rpx; |
|||
background: #3A80E7; |
|||
border-radius: 4rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
|
|||
.popup-content2 { |
|||
max-height: 60vh; |
|||
background: none!important; |
|||
} |
|||
.popup-content2 .card { |
|||
border-radius: 20px; |
|||
padding: 30rpx; |
|||
box-sizing: border-box; |
|||
background: #fff; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
.items { |
|||
display: flex; |
|||
align-items: flex-start; |
|||
text-align: left; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
margin-bottom: 29rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.items .label { |
|||
white-space: nowrap; |
|||
/*width: 160rpx;*/ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
.label-width { |
|||
min-width: 160rpx; |
|||
} |
|||
.items .value { |
|||
width: calc(100% - 160rpx); |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 3; |
|||
-webkit-box-orient: vertical; |
|||
max-height: 144rpx; |
|||
} |
|||
|
|||
.tel { |
|||
width: 126rpx; |
|||
height: 62rpx; |
|||
position: absolute; |
|||
top: calc(50% - 31rpx); |
|||
right: 0; |
|||
} |
|||
.textarea { |
|||
width: 100%; |
|||
height: 340rpx; |
|||
background: #F7F7F7; |
|||
border-radius: 20rpx; |
|||
padding: 27rpx 31rpx; |
|||
} |
|||
.textarea-placeholder { |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #C1C1C1; |
|||
line-height: 42rpx; |
|||
} |
|||
|
|||
.bottom-btn { |
|||
background: none; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 20rpx 99rpx 20rpx; |
|||
/*padding-bottom: calc(env(safe-area-inset-bottom) + 10rpx);*/ |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
z-index: 999; |
|||
position: static; |
|||
} |
|||
.btn { |
|||
width: 240rpx; |
|||
height: 76rpx; |
|||
border-radius: 38rpx; |
|||
color: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
text-align: center; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
.btn-blue { |
|||
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); |
|||
} |
|||
.btn-gray { |
|||
background: #D9D9D9; |
|||
} |
|||
.checkbox .wux-cell-group__hd { |
|||
padding-left: 0; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
} |
|||
.checkbox { |
|||
text-align: left; |
|||
} |
|||
.gray { |
|||
color: #999; |
|||
} |
|||
.text-right { |
|||
text-align: right; |
|||
} |
|||
.flex { |
|||
display: flex!important; |
|||
justify-content: flex-end; |
|||
align-items: center; |
|||
} |
@ -0,0 +1,91 @@ |
|||
import { |
|||
commonDemandDetail, |
|||
demandDetail, |
|||
dictlist, listServerOrg, userdemandAssign, |
|||
} from "../../utils/statisticsApi"; |
|||
|
|||
const config = require('../../utils/config') |
|||
Component({ |
|||
properties: { |
|||
visible: { |
|||
type: Boolean, |
|||
value: false |
|||
}, |
|||
detail: { |
|||
type: Object, |
|||
value: () => { |
|||
}, |
|||
}, |
|||
id: { |
|||
type: String, |
|||
value: '' |
|||
} |
|||
}, |
|||
data: { |
|||
agencyId: '', |
|||
loading: true, |
|||
form: { |
|||
serviceType: "", |
|||
serverId: "", |
|||
}, |
|||
serviceOptions: [], |
|||
serviceIndex: -1, |
|||
serviceOptiondIndex: -1, |
|||
serviceOptiondList: [], |
|||
}, |
|||
ready: function () { |
|||
|
|||
dictlist({ |
|||
dictType: "user_demand_service_type", |
|||
}) |
|||
.then((res) => { |
|||
this.setData({ |
|||
serviceOptions: res.data |
|||
}) |
|||
}) |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
close() { |
|||
this.triggerEvent('close') |
|||
}, |
|||
sure() { |
|||
userdemandAssign({ |
|||
...this.data.form, |
|||
demandRecId: this.data.detail.demandRecId |
|||
}).then(res => { |
|||
wx.showToast({ |
|||
icon: 'success', |
|||
title: '操作成功' |
|||
}) |
|||
this.close() |
|||
}) |
|||
}, |
|||
serviceOptiondListChange(e) { |
|||
this.setData({ |
|||
serviceOptiondIndex: e.detail.value, |
|||
"form.serverId": this.data.serviceOptiondList[e.detail.value].id |
|||
}) |
|||
}, |
|||
getServiceuserList(e) { |
|||
this.setData({ |
|||
serviceIndex: e.detail.value, |
|||
"form.serviceType": this.data.serviceOptions[e.detail.value].value |
|||
}) |
|||
let params = { |
|||
serviceTypeId: this.data.detail.categoryCode[1],//上级ID
|
|||
serverOrgType: this.data.serviceOptions[e.detail.value].value,//选的类型
|
|||
businessType: "resi_service", |
|||
}; |
|||
|
|||
// serviceOptiondIndex
|
|||
listServerOrg(params).then((res) => { |
|||
this.setData({ |
|||
serviceOptiondList: res.data || [] |
|||
}) |
|||
}) |
|||
}, |
|||
} |
|||
}); |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-popup": "../dist/popup/index" |
|||
} |
|||
} |
@ -0,0 +1,50 @@ |
|||
<wux-popup position="bottom" visible="{{ visible }}" bind:close="close" closable> |
|||
<view class="popup-container"> |
|||
<view class="title">需求派单</view> |
|||
<scroll-view scroll-y class="popup-content"> |
|||
<view class="card"> |
|||
<view class="items"> |
|||
<view class="label">需求类型:</view> |
|||
<view class="value">{{detail.parentCategoryName}}-{{detail.categoryName}}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">上报时间:</view> |
|||
<view class="value">{{detail.reportTime}}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">所属网格:</view> |
|||
<view class="value">{{detail.gridName}}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">需求内容:</view> |
|||
<view class="value"> |
|||
{{detail.content}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="card"> |
|||
<picker range="{{serviceOptions}}" range-key="label" bind:change="getServiceuserList"> |
|||
<view class="items"> |
|||
<view class="label label-width">服务方类型:</view> |
|||
<view class="value flex {{serviceIndex >= 0 ? '' : 'gray'}}"> |
|||
{{serviceIndex >= 0 ? serviceOptions[serviceIndex].label : '请选择服务方类型'}} |
|||
</view> |
|||
</view> |
|||
</picker> |
|||
<picker range="{{serviceOptiondList}}" bind:change="serviceOptiondListChange" range-key="label"> |
|||
<view class="items"> |
|||
<view class="label label-width">服务方:</view> |
|||
<view class="value flex {{serviceOptiondIndex >= 0 ? '' : 'gray'}}"> |
|||
{{serviceOptiondIndex >= 0 ? serviceOptiondList[serviceOptiondIndex].label : '请选择服务方'}} |
|||
</view> |
|||
</view> |
|||
</picker> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<view class="bottom-btn"> |
|||
<view class="btn btn-gray" bind:tap="close">取消</view> |
|||
<view class="btn btn-blue" bind:tap="sure">确定</view> |
|||
</view> |
|||
</view> |
|||
</wux-popup> |
@ -0,0 +1,139 @@ |
|||
.wux-popup__content { |
|||
background: none!important; |
|||
} |
|||
|
|||
.popup-container { |
|||
padding: 32rpx 20rpx 50rpx; |
|||
background: linear-gradient(180deg, #DBEEFF 0%, #F4FAFF 100%); |
|||
border-radius: 30rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 34rpx; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 39rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.title:before { |
|||
content: ''; |
|||
display: block; |
|||
width: 10rpx; |
|||
height: 28rpx; |
|||
background: #3A80E7; |
|||
border-radius: 4rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
|
|||
.popup-content { |
|||
max-height: 60vh; |
|||
} |
|||
.popup-content .card { |
|||
border-radius: 20px; |
|||
padding: 30rpx; |
|||
box-sizing: border-box; |
|||
background: #fff; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
.items { |
|||
display: flex; |
|||
align-items: flex-start; |
|||
text-align: left; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
margin-bottom: 29rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.items .label { |
|||
white-space: nowrap; |
|||
/*width: 160rpx;*/ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.items .value { |
|||
width: calc(100% - 160rpx); |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 3; |
|||
-webkit-box-orient: vertical; |
|||
max-height: 144rpx; |
|||
} |
|||
|
|||
.tel { |
|||
width: 126rpx; |
|||
height: 62rpx; |
|||
position: absolute; |
|||
top: calc(50% - 31rpx); |
|||
right: 0; |
|||
} |
|||
.textarea { |
|||
width: 100%; |
|||
height: 340rpx; |
|||
background: #F7F7F7; |
|||
border-radius: 20rpx; |
|||
padding: 27rpx 31rpx; |
|||
} |
|||
.textarea-placeholder { |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #C1C1C1; |
|||
line-height: 42rpx; |
|||
} |
|||
|
|||
.bottom-btn { |
|||
background: none; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 20rpx 99rpx 20rpx; |
|||
/*padding-bottom: calc(env(safe-area-inset-bottom) + 10rpx);*/ |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
z-index: 999; |
|||
position: static; |
|||
} |
|||
.btn { |
|||
width: 240rpx; |
|||
height: 76rpx; |
|||
border-radius: 38rpx; |
|||
color: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
text-align: center; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
.btn-blue { |
|||
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); |
|||
} |
|||
.btn-gray { |
|||
background: #D9D9D9; |
|||
} |
|||
|
|||
|
|||
|
|||
.gray { |
|||
color: #999; |
|||
} |
|||
.text-right { |
|||
text-align: right; |
|||
} |
|||
.flex { |
|||
display: flex!important; |
|||
justify-content: flex-end; |
|||
align-items: center; |
|||
} |
|||
|
|||
.label-width { |
|||
min-width: 160rpx; |
|||
} |
@ -0,0 +1,254 @@ |
|||
import {agencygridtree, getCategoryTree, icEvent12345, icEventOld, icEventOldReply} from "../../utils/statisticsApi"; |
|||
|
|||
const config = require('../../utils/config') |
|||
Component({ |
|||
properties: { |
|||
visible: { |
|||
type: Boolean, |
|||
value: false |
|||
}, |
|||
eventId: { |
|||
type: String, |
|||
value: '', |
|||
observer: function (val) { |
|||
console.log(val) |
|||
this.setData({ |
|||
id: val |
|||
}) |
|||
this.getData() |
|||
} |
|||
}, |
|||
is12345: { |
|||
type: Boolean, |
|||
value: true |
|||
} |
|||
}, |
|||
data: { |
|||
value: 666, |
|||
|
|||
detail: {}, |
|||
agencyId: '', |
|||
id: '', |
|||
loading: true, |
|||
|
|||
fileList: [], |
|||
timeLimit: [], |
|||
operationType: ["5"], |
|||
form: { |
|||
operationType: "5", //处理方式[0:已回复 5、指派 6、完成并回复]
|
|||
content: "",//转办意见
|
|||
timeLimit: "",//办结时限
|
|||
categoryId: "",//事件分类
|
|||
deptId: "", //指派部门
|
|||
deptName: "", |
|||
categoryList: [], |
|||
files: [] //附件
|
|||
}, |
|||
|
|||
orgOptions: [], |
|||
casOptions: [], |
|||
|
|||
visible1: false, |
|||
visible2: false, |
|||
catField: {text: 'categoryName', value: 'id', children: 'children'}, |
|||
orgField: {text: 'agencyName', value: 'agencyId', children: 'subAgencyList'}, |
|||
orgName: "", |
|||
category: "" |
|||
}, |
|||
ready: function () { |
|||
}, |
|||
|
|||
methods: { |
|||
operationTypeChange(e) { |
|||
console.log(e.detail) |
|||
this.setData({ |
|||
operationType: e.detail, |
|||
"form.operationType": e.detail[0] |
|||
}) |
|||
}, |
|||
onOpen1() { |
|||
this.setData({visible1: true}) |
|||
}, |
|||
onClose1() { |
|||
this.setData({visible1: false}) |
|||
console.log('onClose1') |
|||
}, |
|||
onConfirm1(e) { |
|||
console.log('onConfirm1', e.detail) |
|||
let data = e.detail |
|||
let params = data.selectedOptions[data.selectedOptions.length - 1] |
|||
this.setData({ |
|||
"form.categoryId": params.id, |
|||
"form.categoryList": {...params, children: null}, |
|||
visible1: false |
|||
}) |
|||
this.setData({category: data.selectedOptions.map(item => item.categoryName).join('/')}) |
|||
}, |
|||
setContent(e) { |
|||
console.log(e, 'eee') |
|||
this.setData({ |
|||
"form.content": e.detail.value |
|||
}) |
|||
}, |
|||
onOpen2() { |
|||
this.setData({visible2: true}) |
|||
}, |
|||
onClose2() { |
|||
this.setData({visible2: false}) |
|||
console.log('onClose2') |
|||
}, |
|||
onConfirm2(e) { |
|||
let data = e.detail |
|||
|
|||
let params = data.selectedOptions[data.selectedOptions.length - 1] |
|||
this.setData({ |
|||
"form.deptId": params.agencyId, |
|||
"form.deptName": params.agencyName, |
|||
"form.orgType": params.level, |
|||
visible2: false |
|||
}) |
|||
this.setData({orgName: data.selectedOptions.map(item => item.agencyName).join('/')}) |
|||
}, |
|||
|
|||
|
|||
getData() { |
|||
if (this.data.is12345) { |
|||
icEvent12345({icEventId: this.data.id}).then(res => { |
|||
this.getDetail(res.data); |
|||
}) |
|||
} else { |
|||
icEventOld({icEventId: this.data.id}).then(res => { |
|||
this.getDetail(res.data); |
|||
}) |
|||
} |
|||
}, |
|||
|
|||
getDetail(data) { |
|||
this.setData({ |
|||
detail: data, |
|||
agencyId: data.agencyId |
|||
}) |
|||
this.getOrgTreeList(); |
|||
this.getCategoryList(); |
|||
}, |
|||
getOrgTreeList() { |
|||
let params = { |
|||
agencyId: this.data.agencyId, |
|||
purpose: "query" |
|||
} |
|||
agencygridtree(params).then(res => { |
|||
this.setData({ |
|||
orgOptions: this.deleteChildren(res.data.subAgencyList, 'subAgencyList') |
|||
}) |
|||
}) |
|||
}, |
|||
//重构树,去除网格
|
|||
deepTree(arr, children) { |
|||
if (Array.isArray(arr) && arr.length > 0) { |
|||
return arr.map((item) => { |
|||
return { |
|||
...item, |
|||
[children]: |
|||
(item[children] && |
|||
item[children].length > 0 && |
|||
this.deepTree(item[children], children)) || |
|||
null, |
|||
}; |
|||
}); |
|||
} |
|||
}, |
|||
|
|||
getCategoryList() { |
|||
let params = {}; |
|||
getCategoryTree(params).then(res => { |
|||
let treeDataNew = this.deepTree(res.data, "children"); |
|||
console.log(treeDataNew, 'treeDataNew') |
|||
this.setData({ |
|||
casOptions: this.deleteChildren(treeDataNew, "children") |
|||
}); |
|||
}) |
|||
}, |
|||
deleteChildren(node, key) { |
|||
node.forEach(item => { |
|||
if (key in item && !item[key]) { |
|||
delete item[key] |
|||
} else if (key in item && item[key].length) { |
|||
this.deleteChildren(item[key], key) |
|||
} |
|||
}) |
|||
return node |
|||
}, |
|||
|
|||
close() { |
|||
this.triggerEvent('close') |
|||
}, |
|||
openCalendar1() { |
|||
this.setData({ |
|||
showDate: true |
|||
}) |
|||
}, |
|||
onCloseDate() { |
|||
this.setData({showDate: false}); |
|||
}, |
|||
formatDate(date) { |
|||
date = new Date(date); |
|||
return `${date.getFullYear()}-${date.getMonth() + 1 > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)}-${date.getDate() > 10 ? date.getDate() : '0' + date.getDate()}`; |
|||
}, |
|||
onConfirmDate(event) { |
|||
console.log(event) |
|||
const date = event.detail; |
|||
this.setData({ |
|||
showDate: false, |
|||
"form.timeLimit": `${this.formatDate(date)} 00:00:00`, |
|||
}); |
|||
}, |
|||
|
|||
afterRead(event) { |
|||
const {file} = event.detail; |
|||
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
|||
wx.uploadFile({ |
|||
url: `${config.BASEURL()}oss/file/uploadvariedfile`, |
|||
name: 'file', |
|||
header: { |
|||
'Content-type': 'application/json;charset=UTF-8', |
|||
'Authorization': wx.getStorageSync('token') |
|||
}, |
|||
filePath: file.url, |
|||
success: (res) => { |
|||
let data = JSON.parse(res.data) |
|||
const fileList = this.data.fileList; |
|||
fileList.push({...file, url: data.data.url}); |
|||
console.log(fileList) |
|||
this.setData({fileList}); |
|||
}, |
|||
}); |
|||
}, |
|||
deleteFile(e) { |
|||
console.log(e) |
|||
let index = e.detail.index |
|||
let fileList = this.data.fileList |
|||
fileList.splice(index, 1) |
|||
this.setData({ |
|||
fileList |
|||
}) |
|||
}, |
|||
|
|||
sure() { |
|||
let params = { |
|||
...this.data.form, |
|||
files: this.data.fileList, |
|||
icEventId: this.data.id, |
|||
status: "processing", |
|||
// timeLimit: this.data.value1 && this.data.value1.length ? this.data.value1[0] : ""
|
|||
} |
|||
icEventOldReply(params).then(res => { |
|||
wx.showToast({ |
|||
icon: 'success', |
|||
title: '操作成功' |
|||
}) |
|||
this.close() |
|||
}) |
|||
console.log(params) |
|||
} |
|||
} |
|||
}); |
@ -0,0 +1,13 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"van-cascader": "@vant/weapp/cascader/index", |
|||
"van-popup": "@vant/weapp/popup/index", |
|||
"van-field": "@vant/weapp/field/index", |
|||
"van-radio": "@vant/weapp/checkbox/index", |
|||
"van-radio-group": "@vant/weapp/checkbox-group/index", |
|||
"van-calendar": "@vant/weapp/calendar/index", |
|||
"van-icon": "@vant/weapp/icon/index", |
|||
"van-uploader": "@vant/weapp/uploader/index" |
|||
} |
|||
} |
@ -0,0 +1,117 @@ |
|||
<van-popup position="bottom" show="{{ visible }}" round bind:close="close" closable> |
|||
<view class="popup-container"> |
|||
<view class="title">事件派单</view> |
|||
<scroll-view scroll-y class="popup-content"> |
|||
<view class="card"> |
|||
<view class="items"> |
|||
<view class="label">事件类型:</view> |
|||
<view class="value">{{detail.parentCategoryName}}-{{detail.categoryName}}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">接收时间:</view> |
|||
<view class="value">{{detail.happenTime}}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">发生地点:</view> |
|||
<view class="value">{{detail.address}}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">事件描述:</view> |
|||
<view class="value"> |
|||
{{detail.eventContent}} |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="items"> |
|||
<view class="label">处理方式:</view> |
|||
<view class="value"> |
|||
<van-radio-group value="{{ operationType }}" |
|||
bind:change="operationTypeChange"> |
|||
<view class="flex"> |
|||
<van-radio name="5">指派</van-radio> |
|||
<view style="width: 40rpx"></view> |
|||
<!-- <van-radio name="">转服务</van-radio>--> |
|||
</view> |
|||
</van-radio-group> |
|||
|
|||
|
|||
</view> |
|||
</view> |
|||
<view class="items" bind:tap="onOpen1"> |
|||
<view class="label label-width">事件分类:</view> |
|||
<view class="value flex {{category?'':'gray'}}"> |
|||
{{category ? category : '请选择'}} |
|||
<van-icon name="arrow" /> |
|||
</view> |
|||
</view> |
|||
<view class="items" bind:tap="onOpen2"> |
|||
<view class="label label-width">处理部门:</view> |
|||
<view class="value flex {{orgName?'':'gray'}}"> |
|||
{{orgName ? orgName : '请选择'}} |
|||
<van-icon name="arrow" /> |
|||
</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">转办意见:</view> |
|||
</view> |
|||
<view class="items"> |
|||
<textarea class="textarea" model:value="{{form.content}}" bind:input="setContent" |
|||
placeholder-class="textarea-placeholder" placeholder="请填写转办意见。"/> |
|||
</view> |
|||
</view> |
|||
<view class="card"> |
|||
<view class="items"> |
|||
<view class="label">图片/附件:</view> |
|||
</view> |
|||
<view class="items"> |
|||
<van-uploader file-list="{{ fileList }}" bind:delete="deleteFile" max-count="4" bind:after-read="afterRead" /> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="card"> |
|||
<view class="items" bind:tap="openCalendar1"> |
|||
<view class="label label-width">办结时限:</view> |
|||
<view class="value flex {{form.timeLimit?'':'gray'}}"> |
|||
{{form.timeLimit ? form.timeLimit : '请选择'}} |
|||
<van-icon name="arrow" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<view class="bottom-btn"> |
|||
<view class="btn btn-gray" bind:tap="close">取消</view> |
|||
<view class="btn btn-blue" bind:tap="sure">确定</view> |
|||
</view> |
|||
</view> |
|||
</van-popup> |
|||
<wux-calendar id="wux-calendar"/> |
|||
<van-popup show="{{ visible1 }}" round position="bottom"> |
|||
<van-cascader |
|||
wx:if="{{ visible1 }}" |
|||
default-value="{{ value1 }}" |
|||
title="事件分类" |
|||
options="{{ casOptions }}" |
|||
bind:close="onClose1" |
|||
bind:finish="onConfirm1" |
|||
field-names="{{catField}}" |
|||
/> |
|||
</van-popup> |
|||
<van-popup show="{{ visible2 }}" round position="bottom"> |
|||
<van-cascader |
|||
wx:if="{{ visible2 }}" |
|||
default-value="{{ value2 }}" |
|||
title="处理部门" |
|||
options="{{ orgOptions }}" |
|||
bind:close="onClose2" |
|||
bind:finish="onConfirm2" |
|||
field-names="{{orgField}}" |
|||
/> |
|||
</van-popup> |
|||
|
|||
<van-calendar |
|||
show="{{ showDate }}" |
|||
bind:close="onCloseDate" |
|||
bind:confirm="onConfirmDate" |
|||
/> |
@ -0,0 +1,139 @@ |
|||
.wux-popup__content { |
|||
background: none!important; |
|||
} |
|||
|
|||
.popup-container { |
|||
padding: 32rpx 20rpx 50rpx; |
|||
background: linear-gradient(180deg, #DBEEFF 0%, #F4FAFF 100%); |
|||
border-radius: 30rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 34rpx; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 39rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.title:before { |
|||
content: ''; |
|||
display: block; |
|||
width: 10rpx; |
|||
height: 28rpx; |
|||
background: #3A80E7; |
|||
border-radius: 4rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
|
|||
.popup-content { |
|||
max-height: 60vh; |
|||
} |
|||
.popup-content .card { |
|||
border-radius: 20px; |
|||
padding: 30rpx; |
|||
box-sizing: border-box; |
|||
background: #fff; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
.items { |
|||
display: flex; |
|||
align-items: flex-start; |
|||
text-align: left; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
margin-bottom: 29rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.items .label { |
|||
white-space: nowrap; |
|||
width: 160rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.items .value { |
|||
width: calc(100% - 160rpx); |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 3; |
|||
-webkit-box-orient: vertical; |
|||
max-height: 144rpx; |
|||
} |
|||
|
|||
.tel { |
|||
width: 126rpx; |
|||
height: 62rpx; |
|||
position: absolute; |
|||
top: calc(50% - 31rpx); |
|||
right: 0; |
|||
} |
|||
.textarea { |
|||
width: 100%; |
|||
height: 340rpx; |
|||
background: #F7F7F7; |
|||
border-radius: 20rpx; |
|||
padding: 27rpx 31rpx; |
|||
} |
|||
.textarea-placeholder { |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #C1C1C1; |
|||
line-height: 42rpx; |
|||
} |
|||
|
|||
.bottom-btn { |
|||
background: none; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 20rpx 99rpx 20rpx; |
|||
/*padding-bottom: calc(env(safe-area-inset-bottom) + 10rpx);*/ |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
z-index: 999; |
|||
position: static; |
|||
} |
|||
.btn { |
|||
width: 240rpx; |
|||
height: 76rpx; |
|||
border-radius: 38rpx; |
|||
color: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
text-align: center; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
.btn-blue { |
|||
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); |
|||
} |
|||
.btn-gray { |
|||
background: #D9D9D9; |
|||
} |
|||
|
|||
|
|||
|
|||
.gray { |
|||
color: #999; |
|||
} |
|||
.text-right { |
|||
text-align: right; |
|||
} |
|||
.flex { |
|||
display: flex!important; |
|||
justify-content: flex-end; |
|||
align-items: center; |
|||
} |
|||
|
|||
.label-width { |
|||
min-width: 160rpx; |
|||
} |
@ -0,0 +1,151 @@ |
|||
Component({ |
|||
properties: { |
|||
show: { |
|||
type: Boolean, |
|||
value: false |
|||
}, |
|||
title: { |
|||
type: String, |
|||
value: ' ' |
|||
}, |
|||
formController: { |
|||
type: Object, |
|||
value: () => { |
|||
}, |
|||
observer(val) { |
|||
this.setData({ |
|||
formControllers: val |
|||
}) |
|||
} |
|||
}, |
|||
}, |
|||
data: { |
|||
showDate: false, |
|||
dateKey: "", |
|||
defaultDate: "", |
|||
dateIndex: "", |
|||
formControllers: {}, |
|||
showCheckbox: false, |
|||
checkboxTitle: '', |
|||
checkboxResult: [], |
|||
checkboxOptions: [], |
|||
checkboxIndex: '' |
|||
}, |
|||
methods: { |
|||
onClose() { |
|||
this.triggerEvent('close') |
|||
}, |
|||
onCloseCheckbox() { |
|||
this.setData({ |
|||
showCheckbox: false |
|||
}) |
|||
}, |
|||
sureCheckbox() { |
|||
let formControllers = this.data.formControllers; |
|||
let checkboxResult = this.data.checkboxResult |
|||
let label = [] |
|||
formControllers[this.data.checkboxIndex].value = checkboxResult.join(','); |
|||
checkboxResult.forEach(item => { |
|||
formControllers[this.data.checkboxIndex].options.forEach(option => { |
|||
if (option.value == item) { |
|||
label.push(option.label) |
|||
} |
|||
}) |
|||
}) |
|||
formControllers[this.data.checkboxIndex].selected = label.join(','); |
|||
this.setData({ |
|||
formControllers, |
|||
showCheckbox: false |
|||
}) |
|||
}, |
|||
toggle(event) { |
|||
console.log(event) |
|||
const {index} = event.currentTarget.dataset; |
|||
const checkbox = this.selectComponent(`.checkboxes-${index}`); |
|||
console.log(checkbox) |
|||
checkbox.toggle(); |
|||
}, |
|||
onChangeCheckbox(event) { |
|||
this.setData({ |
|||
checkboxResult: event.detail, |
|||
}); |
|||
}, |
|||
onShowCheckbox(e) { |
|||
let {options, value, label, index} = e.currentTarget.dataset |
|||
this.setData({ |
|||
showCheckbox: true, |
|||
checkboxTitle: '选择' + label, |
|||
checkboxResult: value.split(','), |
|||
checkboxOptions: options, |
|||
checkboxIndex: index |
|||
}) |
|||
}, |
|||
onShowDate(e) { |
|||
let {key, value, index} = e.currentTarget.dataset |
|||
console.log(e.currentTarget.dataset) |
|||
this.setData({ |
|||
showDate: true, |
|||
dateKey: key, |
|||
defaultDate: value, |
|||
dateIndex: index |
|||
}) |
|||
}, |
|||
onCloseDate(e) { |
|||
this.setData({ |
|||
showDate: false |
|||
}) |
|||
}, |
|||
formatDate(date) { |
|||
date = new Date(date); |
|||
return `${date.getFullYear()}-${date.getMonth() + 1 > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)}-${date.getDate() > 10 ? date.getDate() : '0' + date.getDate()}`; |
|||
}, |
|||
onConfirmDate(e) { |
|||
let formControllers = this.data.formControllers; |
|||
formControllers[this.data.dateIndex].value = this.formatDate(e.detail) |
|||
this.setData({ |
|||
showDate: false, |
|||
formControllers |
|||
}); |
|||
console.log(this.data.formControllers) |
|||
|
|||
}, |
|||
setVal(e) { |
|||
let formControllers = this.data.formControllers; |
|||
console.log(e) |
|||
formControllers[e.currentTarget.dataset.index].value = e.detail |
|||
this.setData({ |
|||
showDate: false, |
|||
formControllers |
|||
}); |
|||
console.log(this.data.formControllers) |
|||
}, |
|||
pickerChange(e) { |
|||
let {valuekey, options, currentindex, key} = e.currentTarget.dataset |
|||
let index = e.detail.value |
|||
console.log(key, 'key') |
|||
let formControllers = this.data.formControllers; |
|||
let selected = options[index] |
|||
formControllers[currentindex].value = selected[valuekey] |
|||
formControllers[currentindex].valueIndex = e.detail.value |
|||
if (selected.masterControl) { |
|||
formControllers.forEach(item => { |
|||
if (item.showFlag) { |
|||
if (item.showFlag === selected[valuekey]) { |
|||
item.hide = false |
|||
} else { |
|||
item.hide = true |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
this.setData({ |
|||
formControllers |
|||
}) |
|||
}, |
|||
sure() { |
|||
console.log('ok', this.data.formControllers) |
|||
this.triggerEvent('ok', this.data.formControllers) |
|||
this.onClose(); |
|||
} |
|||
}, |
|||
}); |
@ -0,0 +1,12 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"van-action-sheet": "@vant/weapp/action-sheet/index", |
|||
"van-field": "@vant/weapp/field/index", |
|||
"van-cell": "@vant/weapp/cell/index", |
|||
"van-cell-group": "@vant/weapp/cell-group/index", |
|||
"van-calendar": "@vant/weapp/calendar/index", |
|||
"van-checkbox-group": "@vant/weapp/checkbox-group/index", |
|||
"van-checkbox": "@vant/weapp/checkbox/index" |
|||
} |
|||
} |
@ -0,0 +1,103 @@ |
|||
<van-action-sheet show="{{ show }}" title="{{title}}" bind:close="onClose"> |
|||
<van-cell-group> |
|||
<block wx:for="{{formControllers}}" wx:if="{{!item.hide}}"> |
|||
<van-field |
|||
wx:if="{{item.type === 'input'}}" |
|||
label="{{item.label}}" |
|||
model:value="{{ item.value }}" |
|||
placeholder="请输入{{item.label}}" |
|||
bind:input="setVal" |
|||
|
|||
data-key="{{item.key}}" |
|||
data-index="{{index}}" |
|||
/> |
|||
<van-field |
|||
wx:if="{{item.type === 'textarea'}}" |
|||
type="textarea" |
|||
label="{{item.label}}" |
|||
value="{{ item.value }}" |
|||
placeholder="请输入{{item.label}}" |
|||
autosize |
|||
maxlength="{{item.maxlength?item.maxlength:-1}}" |
|||
show-word-limit="{{item.maxlength}}" |
|||
bind:input="setVal" |
|||
data-key="{{item.key}}" |
|||
data-index="{{index}}" |
|||
/> |
|||
<block wx:if="{{item.type === 'date'}}"> |
|||
<van-cell |
|||
title="{{item.label}}" |
|||
value="{{ item.value?item.value:'请选择'+item.label}}" |
|||
bind:click="onShowDate" |
|||
data-value="{{item.value}}" |
|||
data-index="{{index}}" |
|||
data-key="{{item.key}}" |
|||
/> |
|||
</block> |
|||
<block wx:if="{{item.type === 'checkbox'}}"> |
|||
<van-cell |
|||
title="{{item.label}}" |
|||
value="{{ item.selected?item.selected:'请选择'+item.label}}" |
|||
bind:click="onShowCheckbox" |
|||
data-options="{{item.options}}" |
|||
data-value="{{item.value}}" |
|||
data-label="{{item.label}}" |
|||
data-index="{{index}}" |
|||
data-key="{{item.key}}" |
|||
/> |
|||
</block> |
|||
<block wx:if="{{item.type === 'select'}}"> |
|||
<picker |
|||
value="{{item.valueIndex}}" |
|||
range="{{item.options}}" |
|||
range-key="{{item.optionsKey || 'label'}}" |
|||
bind:change="pickerChange" |
|||
data-value="{{item.value}}" |
|||
data-valuekey="{{item.valueKey || 'value'}}" |
|||
data-options="{{item.options || []}}" |
|||
data-currentindex="{{index}}" |
|||
data-optionsKey="{{item.optionsKey || 'label'}}" |
|||
data-index="{{index}}" |
|||
data-key="{{item.key}}" |
|||
> |
|||
<van-cell title="{{item.label}}" |
|||
value="{{ item.valueIndex>=0?item.options[item.valueIndex][item.optionsKey || 'label']:'请选择'+item.label }}"/> |
|||
</picker> |
|||
</block> |
|||
</block> |
|||
</van-cell-group> |
|||
<view class="bottom-btn"> |
|||
<view class="btn btn-gray" bind:tap="onClose">取消</view> |
|||
<view class="btn btn-blue" bind:tap="sure">确定</view> |
|||
</view> |
|||
</van-action-sheet> |
|||
|
|||
|
|||
<van-calendar |
|||
show="{{ showDate }}" |
|||
bind:close="onCloseDate" |
|||
bind:confirm="onConfirmDate" |
|||
default-date="{{defaultDate}}" |
|||
/> |
|||
<van-action-sheet show="{{ showCheckbox }}" title="{{checkboxTitle}}" bind:close="onCloseCheckbox"> |
|||
<scroll-view scroll-y style="max-height: 50vh"> |
|||
<van-checkbox-group value="{{ checkboxResult }}" bind:change="onChangeCheckbox"> |
|||
<view class="checkbox-item" wx:for="{{checkboxOptions}}" |
|||
data-index="{{ index }}" |
|||
bind:tap="toggle" |
|||
wx:key="index" |
|||
> |
|||
<van-checkbox |
|||
name="{{item.value}}" |
|||
class="checkboxes-{{ index }}" |
|||
> |
|||
{{item.label}} |
|||
</van-checkbox> |
|||
</view> |
|||
</van-checkbox-group> |
|||
</scroll-view> |
|||
<view class="bottom-btn"> |
|||
<view class="btn btn-gray" bind:tap="onCloseCheckbox">取消</view> |
|||
<view class="btn btn-blue" bind:tap="sureCheckbox">确定</view> |
|||
</view> |
|||
</van-action-sheet> |
@ -0,0 +1,38 @@ |
|||
|
|||
.btn { |
|||
width: 240rpx; |
|||
height: 76rpx; |
|||
border-radius: 38rpx; |
|||
color: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
text-align: center; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
.btn-blue { |
|||
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); |
|||
} |
|||
.btn-gray { |
|||
background: #D9D9D9; |
|||
} |
|||
|
|||
.bottom-btn { |
|||
background: none; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 20rpx 99rpx 20rpx; |
|||
/*padding-bottom: calc(env(safe-area-inset-bottom) + 10rpx);*/ |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
z-index: 999; |
|||
position: static; |
|||
} |
|||
.checkbox-item { |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 30rpx 40rpx; |
|||
border-bottom: 1px solid #f2f2f2; |
|||
} |
@ -0,0 +1,52 @@ |
|||
const App = getApp(); |
|||
Component({ |
|||
properties: { |
|||
isBack: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
text: { |
|||
type: String, |
|||
default: "" |
|||
} |
|||
}, |
|||
|
|||
data: { |
|||
statusHeight: 0, |
|||
navigationHeight: 0, |
|||
agencyName: '', |
|||
leftWidth: 0, |
|||
iconWidth: 0, |
|||
}, |
|||
lifetimes: { |
|||
ready: function () { |
|||
this.setData({ |
|||
statusHeight: App.globalData.deviceInfo.statusHeight, |
|||
navigationHeight: App.globalData.deviceInfo.navigationHeight, |
|||
agencyName: App.globalData.user.agencyName, |
|||
}) |
|||
const menuButton = wx.getMenuButtonBoundingClientRect(); |
|||
console.log(menuButton) |
|||
this.setData({ |
|||
leftWidth: menuButton.left, |
|||
iconWidth: menuButton.width, |
|||
}) |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
back() { |
|||
wx.navigateBack({ |
|||
delta: 1 |
|||
}) |
|||
}, |
|||
getNavigationInfo: function () { |
|||
var that = this; |
|||
wx.getSystemInfo({ |
|||
success (res) { |
|||
|
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}); |
@ -0,0 +1,5 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
<view class="header"> |
|||
<image class="header-bg" src="../../images/statistics/nav_bg.jpg"/> |
|||
<view class="navigation" mode="widthFix" style="height: {{navigationHeight}}px; padding-top: {{statusHeight}}px;"> |
|||
<image class="nav-bg" mode="widthFix" src="../../images/statistics/nav_bg.jpg"/> |
|||
<view class="back-nav" wx:if="{{isBack}}"> |
|||
<view class="con" style="width: {{leftWidth}}px"> |
|||
<view style="width: {{iconWidth}}px"> |
|||
<image class="icon back" bind:tap="back" src="../../images/statistics/icon-back.png" mode="widthFix"/> |
|||
</view> |
|||
<view class="text"> |
|||
{{text}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="con index-nav" wx:else> |
|||
<image class="icon" src="../../images/statistics/icon-home.png" mode="widthFix"/> |
|||
{{agencyName}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view style="height: {{navigationHeight + statusHeight}}px"></view> |
@ -0,0 +1,67 @@ |
|||
.header { |
|||
|
|||
} |
|||
|
|||
.header .navigation { |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: start; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
padding-left: 20rpx; |
|||
overflow: hidden; |
|||
z-index: 999999; |
|||
} |
|||
|
|||
.header .navigation .icon { |
|||
width: 34rpx; |
|||
height: 34rpx; |
|||
margin-right: 17rpx; |
|||
} |
|||
.header .navigation .back { |
|||
width: 48rpx; |
|||
height: 48rpx; |
|||
} |
|||
.header .navigation .back-nav { |
|||
width: 100%; |
|||
} |
|||
.header .navigation .back-nav .con { |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
|
|||
.header .navigation .back-nav .con view { |
|||
height: 100%; |
|||
} |
|||
.header .navigation .back-nav .con view.text { |
|||
text-align: center; |
|||
width: 100%; |
|||
} |
|||
.header .navigation .con { |
|||
position: relative; |
|||
z-index: 2; |
|||
} |
|||
.header .navigation .nav-bg { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
height: unset; |
|||
} |
|||
.header-bg { |
|||
width: 100%; |
|||
overflow: hidden; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
z-index: -1; |
|||
} |
|||
.index-nav { |
|||
display: flex; |
|||
align-items: center; |
|||
} |
@ -0,0 +1,127 @@ |
|||
import { |
|||
communitySelfOrgDetail, getServiceTypeRelationByHobbyCode, |
|||
icpartyunitDetail, |
|||
residentEduInfo, |
|||
residentHobbyInfo, |
|||
staffdetailv2, |
|||
volunteerDetail |
|||
} from "../../utils/statisticsApi"; |
|||
|
|||
Component({ |
|||
properties: { |
|||
visible: { |
|||
type: Boolean, |
|||
value: false |
|||
}, |
|||
data: { |
|||
type: Object, |
|||
value: () => { |
|||
}, |
|||
observer: function ({id, type, data}) { |
|||
console.log(id, type, data) |
|||
this.setData({ |
|||
id, |
|||
type, |
|||
rowData: data |
|||
}) |
|||
this.getData(type) |
|||
} |
|||
} |
|||
}, |
|||
data: { |
|||
detail: {}, |
|||
education: {}, |
|||
hobby: {}, |
|||
typeList: { |
|||
1: '志愿者', |
|||
2: '联建单位', |
|||
3: '社区自组织', |
|||
4: '网格员', |
|||
5: '公益岗' |
|||
}, |
|||
id: '', |
|||
type: '', |
|||
rowData: '', |
|||
}, |
|||
ready: function () { |
|||
}, |
|||
methods: { |
|||
close() { |
|||
this.triggerEvent('close') |
|||
}, |
|||
getData(type) { |
|||
if (type === 1) { |
|||
this.getVolunteer() |
|||
} |
|||
if (type === 2) { |
|||
this.getCompany() |
|||
} |
|||
if (type === 3) { |
|||
this.getCommunity() |
|||
} |
|||
if (type === 4) { |
|||
this.getGridOperator() |
|||
} |
|||
if (type === 5) { |
|||
this.getVolunteer() |
|||
} |
|||
}, |
|||
getAgeByDateOfBirth(birthDate) { |
|||
var currentDate = new Date(); |
|||
var yearDiff = currentDate.getFullYear() - birthDate.getFullYear(); |
|||
var monthDiff = currentDate.getMonth() - birthDate.getMonth(); |
|||
var dayDiff = currentDate.getDate() - birthDate.getDate(); |
|||
if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) { |
|||
yearDiff--; |
|||
} |
|||
console.log(yearDiff, 'yearDiff') |
|||
return yearDiff; |
|||
}, |
|||
// 志愿者 公益岗
|
|||
getVolunteer() { |
|||
volunteerDetail(this.data.id).then(({data}) => { |
|||
data.age = data.birthday ? this.getAgeByDateOfBirth(new Date(data.birthday)) : '未知' |
|||
this.setData({ |
|||
detail: data || {} |
|||
}) |
|||
}) |
|||
residentEduInfo(this.data.id).then(({data}) => { |
|||
this.setData({ |
|||
education: data || {} |
|||
}) |
|||
|
|||
}) |
|||
residentHobbyInfo(this.data.id).then(({data}) => { |
|||
this.setData({ |
|||
hobby: data || {} |
|||
}) |
|||
|
|||
}) |
|||
}, |
|||
// 单位
|
|||
getCompany() { |
|||
icpartyunitDetail({id: this.data.id}).then(({data}) => { |
|||
data.serviceMatterNameList = data.serviceMatterNameList ? data.serviceMatterNameList.join('、') : '' |
|||
this.setData({ |
|||
detail: data || {} |
|||
}) |
|||
}) |
|||
}, |
|||
// 社区
|
|||
getCommunity() { |
|||
communitySelfOrgDetail(this.data.id).then(({data}) => { |
|||
this.setData({ |
|||
detail: data || {} |
|||
}) |
|||
}) |
|||
}, |
|||
// 网格
|
|||
getGridOperator() { |
|||
staffdetailv2({staffId: this.data.id}).then(({data}) => { |
|||
this.setData({ |
|||
detail: data || {} |
|||
}) |
|||
}) |
|||
}, |
|||
} |
|||
}); |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-popup": "../dist/popup/index" |
|||
} |
|||
} |
@ -0,0 +1,129 @@ |
|||
<wux-popup position="center" visible="{{ visible }}" bind:close="close" closable> |
|||
<view class="popup-container"> |
|||
<view class="title">资源信息卡</view> |
|||
<view class="popup-content"> |
|||
<view class="items"> |
|||
<view class="label">资源类型:</view> |
|||
<view class="value">{{ typeList[type] }}</view> |
|||
</view> |
|||
<block wx:if="{{type === 2}}"> |
|||
<view class="items"> |
|||
<view class="label">单位名称:</view> |
|||
<view class="value">{{ detail.unitName }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">分类:</view> |
|||
<view class="value">{{ detail.typeName }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">服务事项:</view> |
|||
<view class="value">{{ detail.serviceMatterNameList }} |
|||
</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">联系人:</view> |
|||
<view class="value">{{ detail.contact }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">联系电话:</view> |
|||
<view class="value">{{ detail.contactMobile }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">地理位置:</view> |
|||
<view class="value">{{ detail.address }}</view> |
|||
</view> |
|||
</block> |
|||
<block wx:if="{{type === 3}}"> |
|||
|
|||
<view class="items"> |
|||
<view class="label">组织名称:</view> |
|||
<view class="value">{{ detail.organizationName }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">分类:</view> |
|||
<view class="value">{{ detail.categoryName }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">服务事项:</view> |
|||
<view class="value">{{ detail.serviceItem }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">联系人:</view> |
|||
<view class="value">{{ detail.principalName }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">联系电话:</view> |
|||
<view class="value">{{ detail.principalPhone }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">地理位置:</view> |
|||
<view class="value">{{ detail.address }}</view> |
|||
</view> |
|||
</block> |
|||
|
|||
<block wx:if="{{type === 4}}"> |
|||
<view class="items"> |
|||
<view class="label">姓名:</view> |
|||
<view class="value">{{ detail.name }}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">联系电话:</view> |
|||
<view class="value">{{ detail.mobile }}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">证件号:</view> |
|||
<view class="value">{{ detail.idCard }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">组织/部门:</view> |
|||
<view class="value">{{ detail.orgName }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">职位:</view> |
|||
<view class="value"> |
|||
<text wx:for="{{detail.szsqRoles}}" wx:key="index">{{ item }}<text |
|||
wx:if="{{index < detail.szsqRoles.length - 1}}">、</text></text> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
|
|||
<block wx:if="{{type === 5 || type === 1}}"> |
|||
|
|||
<view class="items"> |
|||
<view class="label">姓名:</view> |
|||
<view class="value">{{ detail.name }}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">联系电话:</view> |
|||
<view class="value">{{ detail.mobile }}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">年龄:</view> |
|||
<view class="value">{{ detail.age }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">学历:</view> |
|||
<view class="value">{{ education ? education.cultureLevelName : '' }}</view> |
|||
</view> |
|||
|
|||
<!-- <view class="items"> |
|||
<view class="label">状态:</view> |
|||
<view class="value">巡查中</view> |
|||
</view>--> |
|||
|
|||
<view class="items"> |
|||
<view class="label">所在位置:</view> |
|||
<view class="value">{{ detail&&detail.houseInfo&&detail.houseInfo.homeName ? detail.houseInfo.homeName : '' }}</view> |
|||
</view> |
|||
<view class="items"> |
|||
<view class="label">兴趣爱好:</view> |
|||
<view class="value">{{ hobby&&hobby.hobbyRemark ? hobby.hobbyRemark : '' }}</view> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</wux-popup> |
@ -0,0 +1,62 @@ |
|||
.wux-popup__content { |
|||
background: none!important; |
|||
} |
|||
|
|||
.popup-container { |
|||
padding: 32rpx 20rpx 50rpx; |
|||
background: linear-gradient(180deg, #DBEEFF 0%, #F4FAFF 100%); |
|||
border-radius: 30rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 34rpx; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 39rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.title:before { |
|||
content: ''; |
|||
display: block; |
|||
width: 10rpx; |
|||
height: 28rpx; |
|||
background: #3A80E7; |
|||
border-radius: 4rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
|
|||
.popup-content { |
|||
background: #fff; |
|||
border-radius: 20px; |
|||
padding: 30rpx; |
|||
} |
|||
.items { |
|||
display: flex; |
|||
align-items: flex-start; |
|||
text-align: left; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
margin-bottom: 29rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.items .label { |
|||
white-space: nowrap; |
|||
min-width: 160rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.tel { |
|||
width: 126rpx; |
|||
height: 62rpx; |
|||
position: absolute; |
|||
top: calc(50% - 31rpx); |
|||
right: 0; |
|||
} |
@ -0,0 +1,179 @@ |
|||
import { |
|||
communityselforganizationlist, |
|||
getGridMemberListByAgencyId, |
|||
icpartyunitList, |
|||
publicWelfarePost, volunteer |
|||
} from "../../utils/statisticsApi"; |
|||
const App = getApp(); |
|||
Component({ |
|||
options: { |
|||
styleIsolation: 'shared', |
|||
}, |
|||
properties: { |
|||
visible: { |
|||
type: Boolean, |
|||
value: false |
|||
}, |
|||
}, |
|||
data: { |
|||
options: [ |
|||
{ |
|||
label: '人资源', |
|||
children: [ |
|||
{ |
|||
label: "网格员", |
|||
value: "staffGrid", |
|||
}, |
|||
{ |
|||
label: "公益岗", |
|||
value: "publicWelfareNum", |
|||
}, |
|||
{ |
|||
label: "志愿者", |
|||
value: "volunteer", |
|||
}, |
|||
{ |
|||
label: "社区自组织", |
|||
value: "4", |
|||
}, |
|||
{ |
|||
label: "联建单位", |
|||
value: "5", |
|||
}, |
|||
/* { |
|||
label: "15分钟生活圈商家", |
|||
value: "6", |
|||
}*/ |
|||
] |
|||
}, |
|||
{ |
|||
label: '物资源', |
|||
children: [] |
|||
}, |
|||
{ |
|||
label: '场所资源', |
|||
children: [] |
|||
} |
|||
], |
|||
typeIndex: 0, |
|||
subTypeOptions: [], |
|||
subTypeIndex: 0, |
|||
isShowViews: false, |
|||
pageNo: 1, |
|||
viewData: {} |
|||
}, |
|||
ready: function () { |
|||
this.typeChange() |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
close() { |
|||
this.triggerEvent('close') |
|||
}, |
|||
typeChange() { |
|||
this.setData({ |
|||
subTypeIndex: 0, |
|||
subTypeOptions: this.data.options[this.data.typeIndex].children |
|||
}) |
|||
}, |
|||
handleViews(e) { |
|||
let data = e.currentTarget.dataset.obj |
|||
let peopleType = this.data.subTypeOptions[this.data.subTypeIndex].value |
|||
let type = peopleType === 'volunteer' ? 1 : |
|||
peopleType === '5' ? 2 : |
|||
peopleType === '4' ? 3 : |
|||
peopleType === 'staffGrid' ? 4 : |
|||
peopleType === 'publicWelfareNum' ? 5 : '' |
|||
|
|||
this.setData({ |
|||
viewData: { |
|||
type, |
|||
id: type === 3 ? data.orgId : data.id, |
|||
data |
|||
}, |
|||
isShowViews: true, |
|||
}) |
|||
}, |
|||
handleDispatchOrder(e) { |
|||
let data = e.currentTarget.dataset.obj |
|||
this.triggerEvent('dispatchOrder', data) |
|||
}, |
|||
handleCallPhone(e) { |
|||
wx.makePhoneCall({ |
|||
phoneNumber: e.currentTarget.dataset.mobile |
|||
}) |
|||
}, |
|||
viewsClose() { |
|||
this.setData({ |
|||
isShowViews: false |
|||
}) |
|||
}, |
|||
|
|||
search() { |
|||
this.setData({ |
|||
pageNo: 1, |
|||
list: [] |
|||
}) |
|||
this.getList() |
|||
}, |
|||
getList() { |
|||
console.log(this.data.subTypeIndex) |
|||
let subTypeIndex = this.data.subTypeOptions[this.data.subTypeIndex].value |
|||
if (subTypeIndex === 'staffGrid' || subTypeIndex === 'publicWelfareNum' || subTypeIndex === 'volunteer') { |
|||
this.getGridList() |
|||
} |
|||
if (subTypeIndex === '4') { |
|||
this.getsqzz() |
|||
} |
|||
if (subTypeIndex === '5') { |
|||
this.getljdw() |
|||
} |
|||
}, |
|||
getsqzz() { |
|||
communityselforganizationlist({ |
|||
agencyId: this.data.agencyId || App.globalData.user.agencyId, |
|||
pageNo: this.data.pageNo, |
|||
pageSize: 5 |
|||
}).then(res => { |
|||
this.setData({ |
|||
list: this.data.list.concat(res.data.list), |
|||
total: res.data.total |
|||
}) |
|||
}) |
|||
}, |
|||
getljdw() { |
|||
icpartyunitList({ |
|||
agencyId: this.data.agencyId || App.globalData.user.agencyId, |
|||
pageNo: this.data.pageNo, |
|||
pageSize: 5 |
|||
}).then(res => { |
|||
this.setData({ |
|||
list: this.data.list.concat(res.data.list), |
|||
total: res.data.total |
|||
}) |
|||
}) |
|||
}, |
|||
getGridList() { |
|||
getGridMemberListByAgencyId({ |
|||
orgId: this.data.agencyId || App.globalData.user.agencyId, |
|||
level: 'agency', |
|||
personnelType: this.data.subTypeOptions[this.data.subTypeIndex].value |
|||
}).then(res => { |
|||
this.setData({ |
|||
list: res.data.personnelInfoVOList |
|||
}) |
|||
}) |
|||
}, |
|||
scrolltolower() { |
|||
let subTypeIndex = this.data.subTypeOptions[this.data.subTypeIndex].value |
|||
if (subTypeIndex === '4' || subTypeIndex === '5') { |
|||
if (this.data.list.length < this.data.total) { |
|||
this.setData({ |
|||
pageNo: this.data.pageNo + 1 |
|||
}) |
|||
this.getList() |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}); |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-popup": "../dist/popup/index", |
|||
"ResourceInfo": "../ResourceInfo/ResourceInfo" |
|||
} |
|||
} |
@ -0,0 +1,65 @@ |
|||
<wux-popup position="bottom" visible="{{ visible }}" bind:close="close" closable> |
|||
<view class="popup-container"> |
|||
<view class="title">资源调度</view> |
|||
<view class="screen"> |
|||
<view class="screen-left"> |
|||
<picker |
|||
range="{{options}}" |
|||
range-key="label" |
|||
model:value="{{ typeIndex }}" |
|||
bind:change="typeChange" |
|||
> |
|||
<view class="picker-type"> |
|||
<text>{{ typeIndex >= 0 ? options[typeIndex].label : '' }}</text> |
|||
<image src="../../images/statistics/down2.png" mode="widthFix"/> |
|||
</view> |
|||
</picker> |
|||
<picker |
|||
range="{{subTypeOptions}}" |
|||
range-key="label" |
|||
model:value="{{ subTypeIndex }}" |
|||
> |
|||
<view class="picker-type"> |
|||
<text>{{ subTypeIndex >= 0 ? subTypeOptions[subTypeIndex].label : '' }}</text> |
|||
<image src="../../images/statistics/down2.png" mode="widthFix"/> |
|||
</view> |
|||
</picker> |
|||
</view> |
|||
<view class="btn" bindtap="search"> |
|||
筛选 |
|||
</view> |
|||
</view> |
|||
|
|||
<scroll-view scroll-y class="popup-content" bind:scrolltolower="scrolltolower"> |
|||
<view class="resource-list"> |
|||
<view class="resource-items" wx:for="{{list}}" wx:key="index"> |
|||
<view class="userInfo"> |
|||
<view class="name">{{item.name || item.principalName || item.contact}} {{item.mobile || item.principalPhone || item.contactMobile}}</view> |
|||
<!-- <view class="status">巡查中</view>--> |
|||
</view> |
|||
<view class="address"> |
|||
<view class="grid">{{item.orgName || item.agencyName}}</view> |
|||
<!-- <view class="distance">1.5Km</view>--> |
|||
</view> |
|||
|
|||
<view class="handle"> |
|||
<view class="btn btn-green" bind:tap="handleViews" data-obj="{{item}}"> |
|||
<image src="../../images/statistics/views.png" mode="widthFix"/> |
|||
<text>查看</text> |
|||
</view> |
|||
<view class="btn btn-orange" bind:tap="handleDispatchOrder" data-id="1"> |
|||
<image src="../../images/statistics/order.png" mode="widthFix"/> |
|||
<text>派单</text> |
|||
</view> |
|||
<view class="btn btn-blue" bind:tap="handleCallPhone" data-mobile="{{item.mobile || item.principalPhone || item.contactMobile}}"> |
|||
<image src="../../images/statistics/phone.png" mode="widthFix"/> |
|||
<text>拨打</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
</view> |
|||
</wux-popup> |
|||
<ResourceInfo visible="{{isShowViews}}" data="{{viewData}}" bind:close="viewsClose"/> |
@ -0,0 +1,178 @@ |
|||
.wux-popup__content { |
|||
background: none!important; |
|||
} |
|||
.wux-popup__content .wux-popup__hd { |
|||
padding: 0!important; |
|||
|
|||
} |
|||
.wux-popup__bd { |
|||
padding: 0!important; |
|||
} |
|||
.popup-container { |
|||
padding: 32rpx 20rpx 50rpx; |
|||
background: linear-gradient(180deg, #DBEEFF 0%, #F4FAFF 100%); |
|||
border-radius: 30rpx 30rpx 0px 0px; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 34rpx; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 39rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.title:before { |
|||
content: ''; |
|||
display: block; |
|||
width: 10rpx; |
|||
height: 28rpx; |
|||
background: #3A80E7; |
|||
border-radius: 4rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
|
|||
|
|||
.screen { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
padding: 18rpx 22rpx; |
|||
} |
|||
.screen .screen-left { |
|||
display: flex; |
|||
} |
|||
|
|||
.screen .picker-type image, |
|||
.screen .picker image { |
|||
width: 48rpx; |
|||
height: 48rpx; |
|||
} |
|||
|
|||
.screen .picker-type text { |
|||
white-space: nowrap; |
|||
text-overflow: ellipsis; |
|||
overflow: hidden; |
|||
width: calc(100% - 24rpx); |
|||
} |
|||
.screen .picker-type { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 0 30rpx; |
|||
margin-right: 10rpx; |
|||
box-sizing: border-box; |
|||
font-size: 30rpx; |
|||
font-weight: 500; |
|||
color: #C1C1C1; |
|||
line-height: 56rpx; |
|||
text-align: center; |
|||
|
|||
width: 221rpx; |
|||
height: 65rpx; |
|||
background: #FFFFFF; |
|||
border: 1px solid #DBDBDB; |
|||
border-radius: 31rpx; |
|||
|
|||
} |
|||
|
|||
.screen .btn { |
|||
width: 120rpx; |
|||
height: 65rpx; |
|||
line-height: 65rpx; |
|||
background: #3A80E7; |
|||
border-radius: 33rpx; |
|||
font-size: 28rpx; |
|||
font-weight: 500; |
|||
color: #FFFFFF; |
|||
text-align: center; |
|||
} |
|||
.popup-content { |
|||
background: #fff; |
|||
height: 50vh; |
|||
border-radius: 20px; |
|||
margin-top: 30rpx; |
|||
} |
|||
|
|||
|
|||
|
|||
.resource-list { |
|||
padding: 0 30rpx; |
|||
} |
|||
.resource-list .resource-items { |
|||
border-bottom: 1px solid #EAEAEA; |
|||
padding: 36rpx 0; |
|||
|
|||
} |
|||
.resource-list .resource-items .userInfo { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
.resource-list .resource-items .userInfo .name { |
|||
font-size: 34rpx; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
} |
|||
.resource-list .resource-items .userInfo .status { |
|||
font-size: 28rpx; |
|||
font-weight: 500; |
|||
color: #13C8BD; |
|||
} |
|||
.resource-list .resource-items .address { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
margin-bottom: 40rpx; |
|||
} |
|||
.resource-list .resource-items .address .grid { |
|||
font-size: 28rpx; |
|||
font-weight: 400; |
|||
color: #666666; |
|||
} |
|||
.resource-list .resource-items .address .distance { |
|||
font-size: 26rpx; |
|||
font-weight: 500; |
|||
color: #C1C1C1; |
|||
} |
|||
.resource-list .resource-items .handle { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.resource-list .resource-items .handle .btn { |
|||
background: #FFFFFF; |
|||
border-width: 2rpx; |
|||
border-style: solid; |
|||
border-radius: 30rpx; |
|||
width: 180rpx; |
|||
height: 60rpx; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
line-height: 60rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
.resource-list .resource-items .handle .btn image { |
|||
flex: 0 0 30rpx; |
|||
width: 30rpx; |
|||
height: 30rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
.resource-list .resource-items .handle .btn.btn-green { |
|||
border-color: #13C8BD; |
|||
color: #13C8BD; |
|||
} |
|||
.resource-list .resource-items .handle .btn.btn-orange { |
|||
border-color: #FF783C; |
|||
color: #FF783C; |
|||
} |
|||
.resource-list .resource-items .handle .btn.btn-blue { |
|||
border-color: #3A80E7; |
|||
color: #3A80E7; |
|||
} |
@ -0,0 +1,53 @@ |
|||
import {urgent_supervision} from "../../utils/statisticsApi"; |
|||
|
|||
Component({ |
|||
properties: { |
|||
visible: { |
|||
type: Boolean, |
|||
value: false |
|||
}, |
|||
detail: { |
|||
type: Object, |
|||
value: () => {} |
|||
}, |
|||
// event services
|
|||
type: { |
|||
type: String, |
|||
value: '', |
|||
}, |
|||
id: { |
|||
type: String, |
|||
value: '' |
|||
}, |
|||
}, |
|||
data: { |
|||
content: '' |
|||
}, |
|||
methods: { |
|||
close() { |
|||
this.triggerEvent('close') |
|||
}, |
|||
sure() { |
|||
console.log(this.data.id,this.id,'this.data.id') |
|||
urgent_supervision({ |
|||
type: this.data.type, |
|||
eventid: this.id, |
|||
serviceId: this.id, |
|||
content: this.data.content |
|||
}).then(({data,code,msg}) => { |
|||
if (code == 0) { |
|||
wx.showToast({ |
|||
title: "提交成功" |
|||
}) |
|||
this.close() |
|||
} else { |
|||
wx.showToast({ |
|||
icon: "none", |
|||
title: msg |
|||
}) |
|||
} |
|||
|
|||
}) |
|||
} |
|||
} |
|||
}); |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-popup": "../dist/popup/index" |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
<wux-popup position="bottom" visible="{{ visible }}" bind:close="close" closable> |
|||
<view class="popup-container"> |
|||
<view class="title">催办督办</view> |
|||
<view scroll-y class="popup-content"> |
|||
<view class="items"> |
|||
<view class="label">当前办理部门:</view> |
|||
<view class="value">{{ detail.gridName || detail.gridName || '' }}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">转入该部门时间:</view> |
|||
<view class="value">{{detail.happenTime || detail.serviceStartTime || ''}}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">联系人:</view> |
|||
<view class="value">{{detail.name || detail.demandUserName || ''}}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">联系电话:</view> |
|||
<view class="value">{{detail.mobile || detail.demandUserMobile || ''}}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">状态:</view> |
|||
<view class="value">{{ detail.statusName}}</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<view class="label">催办说明:</view> |
|||
</view> |
|||
|
|||
<view class="items"> |
|||
<textarea |
|||
class="textarea" |
|||
placeholder-class="textarea-placeholder" |
|||
placeholder="请填写催办说明,不超过500字。" |
|||
model:value="{{content}}" |
|||
/> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="bottom-btn"> |
|||
<view class="btn btn-gray" bind:tap="close">取消</view> |
|||
<view class="btn btn-blue" bind:tap="sure">确定</view> |
|||
</view> |
|||
|
|||
|
|||
</view> |
|||
</wux-popup> |
@ -0,0 +1,107 @@ |
|||
.wux-popup__content { |
|||
background: none!important; |
|||
} |
|||
.wux-popup__content .wux-popup__hd { |
|||
padding: 0!important; |
|||
|
|||
} |
|||
.wux-popup__bd { |
|||
padding: 0!important; |
|||
} |
|||
.popup-container { |
|||
padding: 32rpx 20rpx 50rpx; |
|||
background: linear-gradient(180deg, #DBEEFF 0%, #F4FAFF 100%); |
|||
border-radius: 30rpx 30rpx 0px 0px; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 34rpx; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 39rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.title:before { |
|||
content: ''; |
|||
display: block; |
|||
width: 10rpx; |
|||
height: 28rpx; |
|||
background: #3A80E7; |
|||
border-radius: 4rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.popup-content { |
|||
border-radius: 20px; |
|||
padding: 30rpx; |
|||
box-sizing: border-box; |
|||
background: #fff; |
|||
margin-bottom: 30rpx; |
|||
height: auto!important; |
|||
} |
|||
|
|||
|
|||
.items { |
|||
display: flex; |
|||
align-items: flex-start; |
|||
text-align: left; |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
margin-bottom: 29rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.items .label { |
|||
white-space: nowrap; |
|||
} |
|||
|
|||
.textarea { |
|||
width: 100%; |
|||
height: 340rpx; |
|||
background: #F7F7F7; |
|||
border-radius: 20rpx; |
|||
padding: 27rpx 31rpx; |
|||
} |
|||
.textarea-placeholder { |
|||
font-size: 32rpx; |
|||
font-weight: 500; |
|||
color: #C1C1C1; |
|||
line-height: 42rpx; |
|||
} |
|||
|
|||
|
|||
|
|||
.bottom-btn { |
|||
background: none; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 20rpx 99rpx 20rpx; |
|||
/*padding-bottom: calc(env(safe-area-inset-bottom) + 10rpx);*/ |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
z-index: 999; |
|||
position: static; |
|||
} |
|||
.btn { |
|||
width: 240rpx; |
|||
height: 76rpx; |
|||
border-radius: 38rpx; |
|||
color: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
text-align: center; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
.btn-blue { |
|||
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); |
|||
} |
|||
.btn-gray { |
|||
background: #D9D9D9; |
|||
} |
@ -0,0 +1,23 @@ |
|||
Component({ |
|||
properties: { |
|||
tabList: { |
|||
type: Array |
|||
}, |
|||
noBg: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data: { |
|||
cur: 0 |
|||
}, |
|||
methods: { |
|||
tabChange(e) { |
|||
let index = e.currentTarget.dataset.index |
|||
this.setData({ |
|||
cur: index |
|||
}) |
|||
this.triggerEvent("tabChange",index) |
|||
} |
|||
} |
|||
}); |
@ -0,0 +1,5 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
<view class="tab"> |
|||
<view class="tab-item {{cur - 0 === index - 0?'cur':''}} {{noBg?'noBg':''}}" |
|||
wx:for="{{tabList}}" |
|||
data-index="{{index}}" |
|||
wx:key="{{index}}" |
|||
bind:tap="tabChange" |
|||
> |
|||
<text>{{item.label}}</text> |
|||
<image mode="widthFix" src="../../images/statistics/sel.png" style="width: 12rpx;height: 8rpx" class="cur-img"/> |
|||
</view> |
|||
</view> |
@ -0,0 +1,46 @@ |
|||
.tab { |
|||
display: flex; |
|||
} |
|||
.tab .tab-item { |
|||
background: #F4F8FE; |
|||
border: 2px solid #D6E6FC; |
|||
border-radius: 6rpx; |
|||
flex: 1; |
|||
padding: 25rpx 20rpx; |
|||
font-size: 30rpx; |
|||
font-weight: 500; |
|||
color: #999999; |
|||
margin: 0 15rpx 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
.tab .tab-item.cur { |
|||
color: #3A80E7; |
|||
position: relative; |
|||
} |
|||
|
|||
.tab .tab-item.noBg { |
|||
background: none!important; |
|||
border: none !important; |
|||
margin: 0 0rpx 30rpx; |
|||
} |
|||
.cur-img { |
|||
display: none; |
|||
} |
|||
.tab .tab-item.cur:before { |
|||
content: ''; |
|||
display: block; |
|||
height: 5rpx; |
|||
width: 100%; |
|||
background: #3A80E7; |
|||
position: absolute; |
|||
bottom: 0; |
|||
left: 0; |
|||
} |
|||
.tab .tab-item.cur .cur-img { |
|||
display: block; |
|||
position: absolute; |
|||
bottom: -8rpx; |
|||
left: calc(50% - 6rpx); |
|||
} |
@ -0,0 +1,78 @@ |
|||
import {getStaffbasicinfo} from "../../utils/api"; |
|||
|
|||
const app = getApp() |
|||
import {getOwnedRolesOfStaffId} from '../../utils/statisticsApi.js' |
|||
|
|||
Component({ |
|||
data: { |
|||
selected: 0, |
|||
color: "#999", |
|||
selectedColor: "#3A80E7", |
|||
"list": [ |
|||
{ |
|||
"pagePath": "/pages/index/index", |
|||
"text": "消息", |
|||
"iconPath": "/images/home/message.png", |
|||
"selectedIconPath": "/images/home/messageSelected.png", |
|||
show: true |
|||
}, |
|||
{ |
|||
"pagePath": "/pages/work/work", |
|||
"text": "工作", |
|||
"iconPath": "/images/home/work.png", |
|||
"selectedIconPath": "/images/home/workSelected.png", |
|||
show: true |
|||
|
|||
}, |
|||
{ |
|||
"pagePath": "/pages/statistics/statistics", |
|||
"text": "数据", |
|||
"iconPath": "/images/home/information.png", |
|||
"selectedIconPath": "/images/home/informationSelected.png", |
|||
show: false |
|||
|
|||
}, |
|||
{ |
|||
"pagePath": "/pages/mine/mine", |
|||
"text": "我的", |
|||
"iconPath": "/images/home/mine.png", |
|||
"selectedIconPath": "/images/home/mineSelected.png", |
|||
show: true |
|||
} |
|||
], |
|||
}, |
|||
attached() { |
|||
}, |
|||
ready: function () { |
|||
this.setData({ |
|||
selected: app.globalData.selected |
|||
}) |
|||
// secretary 书记 admin 管理员
|
|||
console.log( app.globalData.roleList.filter(item => item.roleKey === 'secretary')) |
|||
if(app.globalData.roleList.length <= 0) { |
|||
|
|||
getStaffbasicinfo().then(res=>{ |
|||
getOwnedRolesOfStaffId(res.data.id).then(res2 => { |
|||
app.globalData.user = res.data |
|||
this.setData({ |
|||
"list[2].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 |
|||
}) |
|||
}) |
|||
}) |
|||
} else { |
|||
this.setData({ |
|||
"list[2].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 |
|||
}) |
|||
} |
|||
console.log(app.globalData.roleList, 'userss') |
|||
}, |
|||
methods: { |
|||
switchTab(e) { |
|||
console.log(e); |
|||
const data = e.currentTarget.dataset; |
|||
const url = data.path; |
|||
app.globalData.selected = data.index; |
|||
wx.switchTab({url}) |
|||
} |
|||
} |
|||
}) |
@ -0,0 +1,4 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": {} |
|||
} |
@ -0,0 +1,18 @@ |
|||
<view class="tab-bar-block"></view> |
|||
<view class="tab-bar"> |
|||
|
|||
<view wx:for="{{list}}" wx:if="{{item.show}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab"> |
|||
<!-- <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image> --> |
|||
<!-- <view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view> --> |
|||
<!-- <view > |
|||
<image wx:if="{{index!=selected}}" src="{{item.iconPath}}"></image> |
|||
<image wx:else class="bigicon" src="{{item.selectedIconPath}}"></image> |
|||
<view wx:if="{{index!=selected}}" style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view> |
|||
</view> --> |
|||
<view > |
|||
<image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image> |
|||
<view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view> |
|||
</view> |
|||
<view class="isIPhoneXRegexBottom"></view> |
|||
</view> |
|||
</view> |
@ -0,0 +1,40 @@ |
|||
.tab-bar { |
|||
position: fixed; |
|||
bottom: 0; |
|||
left: 0; |
|||
right: 0; |
|||
height: auto; |
|||
background: white; |
|||
display: flex; |
|||
box-shadow: 0px 6rpx 18rpx 0px rgba(216,216,216,0.66); |
|||
} |
|||
.isIPhoneXRegexBottom { |
|||
padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/ |
|||
padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/ |
|||
} |
|||
|
|||
.tab-bar-item { |
|||
flex: 1; |
|||
text-align: center; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex-direction: column; |
|||
padding-top: 10rpx; |
|||
} |
|||
|
|||
.tab-bar-item image { |
|||
width: 54rpx; |
|||
height: 54rpx; |
|||
} |
|||
/* .tab-bar-item image.bigicon{ |
|||
width: 70rpx; |
|||
height: 70rpx; |
|||
} */ |
|||
.tab-bar-item view { |
|||
font-size: 22rpx; |
|||
color:#999999 |
|||
} |
|||
.tab-bar-block { |
|||
height: 150rpx; |
|||
} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames7=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(n,!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var defaults={prefixCls:"wux-actionsheet",theme:"ios",className:"",titleText:"",buttons:[],buttonClicked:function(){},cancelText:"取消",cancel:function(){}};(0,_baseComponent.default)({useFunc:!0,data:defaults,computed:{classes:["prefixCls, theme, buttons, cancelText",function(n,e,t,r){var o,a=(0,_classNames7.default)(n),c="".concat(n,"__popup"),i=(0,_classNames7.default)("".concat(n,"__content"),(_defineProperty(o={},"".concat(n,"__content--theme-").concat(e),e),_defineProperty(o,"".concat(n,"__content--has-cancel"),r),o)),s=(0,_classNames7.default)("".concat(n,"__group"),_defineProperty({},"".concat(n,"__group--options"),!0)),u="".concat(n,"__title"),d=(0,_classNames7.default)("".concat(n,"__button"),_defineProperty({},"".concat(n,"__button--destructive"),!0));return{wrap:a,popup:c,content:i,options:s,title:u,button:t.map(function(e){var t;return{wrap:(0,_classNames7.default)("".concat(n,"__button"),(_defineProperty(t={},"".concat(n,"__button--option"),!0),_defineProperty(t,"".concat(n,"__button--disabled"),e.disabled),_defineProperty(t,"".concat(e.className),e.className),t)),hover:e.hoverClass&&"default"!==e.hoverClass?e.hoverClass:"".concat(n,"__button--hover")}}),icon:"".concat(n,"__icon"),text:"".concat(n,"__text"),destructive:d,group:(0,_classNames7.default)("".concat(n,"__group"),_defineProperty({},"".concat(n,"__group--cancel"),!0)),cancel:(0,_classNames7.default)("".concat(n,"__button"),_defineProperty({},"".concat(n,"__button--cancel"),!0)),hover:"".concat(n,"__button--hover")}}]},methods:{showSheet:function(e){var t=0<arguments.length&&void 0!==e?e:{},n=this.$$mergeOptionsAndBindMethods(Object.assign({},defaults,t));return this.removed=!1,this.$$setData(_objectSpread({in:!0},n)),this.cancel.bind(this)},removeSheet:function(e){if(this.removed)return!1;this.removed=!0,this.$$setData({in:!1}),"function"==typeof e&&e(this.data.buttons)},buttonClicked:function(e){var t=e.currentTarget.dataset.index;!0===this.fns.buttonClicked(t,this.data.buttons[t])&&this.removeSheet()},destructiveButtonClicked:function(){!0===this.fns.destructiveButtonClicked()&&this.removeSheet()},cancel:function(){this.removeSheet(this.fns.cancel)},bindgetuserinfo:function(e){this.triggerEvent("getuserinfo",_objectSpread({},e.detail,{},e.currentTarget.dataset))},bindcontact:function(e){this.triggerEvent("contact",_objectSpread({},e.detail,{},e.currentTarget.dataset))},bindgetphonenumber:function(e){this.triggerEvent("getphonenumber",_objectSpread({},e.detail,{},e.currentTarget.dataset))},bindopensetting:function(e){this.triggerEvent("opensetting",_objectSpread({},e.detail,{},e.currentTarget.dataset))},bindlaunchapp:function(e){this.triggerEvent("launchapp",_objectSpread({},e.detail,{},e.currentTarget.dataset))},bindchooseavatar:function(e){this.triggerEvent("chooseavatar",_objectSpread({},e.detail,{},e.currentTarget.dataset))},onError:function(e){this.triggerEvent("error",_objectSpread({},e.detail,{},e.currentTarget.dataset))}}}); |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-popup": "../popup/index" |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
<wux-popup wux-content-class="{{ theme === 'ios' ? classes.popup : '' }}" position="bottom" visible="{{ in }}" safeArea="bottom" bind:close="cancel"> |
|||
<view class="wux-class {{ classes.wrap }}"> |
|||
<view class="{{ classes.content }}"> |
|||
<view class="{{ classes.options }}"> |
|||
<view class="{{ classes.title }}" wx:if="{{ titleText }}">{{ titleText }}</view> |
|||
<block wx:for="{{ buttons }}" wx:for-item="button" wx:key="index"> |
|||
<button |
|||
class="{{ classes.button[index].wrap }}" |
|||
data-index="{{ index }}" |
|||
disabled="{{ button.disabled }}" |
|||
open-type="{{ button.openType }}" |
|||
hover-class="{{ !button.disabled ? classes.button[index].hover : 'none' }}" |
|||
hover-stop-propagation="{{ button.hoverStopPropagation }}" |
|||
hover-start-time="{{ button.hoverStartTime }}" |
|||
hover-stay-time="{{ button.hoverStayTime }}" |
|||
lang="{{ button.lang }}" |
|||
bindgetuserinfo="bindgetuserinfo" |
|||
session-from="{{ button.sessionFrom }}" |
|||
send-message-title="{{ button.sendMessageTitle }}" |
|||
send-message-path="{{ button.sendMessagePath }}" |
|||
send-message-img="{{ button.sendMessageImg }}" |
|||
show-message-card="{{ button.showMessageCard }}" |
|||
bindcontact="bindcontact" |
|||
bindgetphonenumber="bindgetphonenumber" |
|||
app-parameter="{{ button.appParameter }}" |
|||
binderror="onError" |
|||
bindopensetting="bindopensetting" |
|||
bindlaunchapp="bindlaunchapp" |
|||
bindchooseavatar="bindchooseavatar" |
|||
catchtap="buttonClicked" |
|||
> |
|||
<image class="{{ classes.icon }}" src="{{ button.icon }}" wx:if="{{ button.icon }}" /> |
|||
<text class="{{ classes.text }}">{{ button.text }}</text> |
|||
</button> |
|||
</block> |
|||
<button class="{{ classes.destructive }}" wx:if="{{ destructiveText }}" catchtap="destructiveButtonClicked">{{ destructiveText }}</button> |
|||
</view> |
|||
<view class="{{ classes.group }}" wx:if="{{ cancelText }}"> |
|||
<button class="{{ classes.cancel }}" hover-class="{{ classes.hover }}" catchtap="cancel">{{ cancelText }}</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</wux-popup> |
@ -0,0 +1 @@ |
|||
.wux-actionsheet__popup{background-color:transparent}.wux-actionsheet__content{margin-left:16rpx;margin-right:16rpx;width:auto;overflow:hidden}.wux-actionsheet__content--theme-wx{margin-left:0;margin-right:0;margin-bottom:0}.wux-actionsheet__content--theme-wx .wux-actionsheet__group{border-radius:0;margin-bottom:12rpx}.wux-actionsheet__content--theme-wx .wux-actionsheet__group--options{background-color:#fff}.wux-actionsheet__content--theme-wx .wux-actionsheet__group--cancel{margin-bottom:0}.wux-actionsheet__content--theme-wx .wux-actionsheet__button{font-size:36rpx;color:#000}.wux-actionsheet__content--theme-wx .wux-actionsheet__button--cancel{font-weight:400}.wux-actionsheet__content--theme-wx.wux-actionsheet__content--has-cancel{background-color:#efeff4}.wux-actionsheet__group{margin-bottom:16rpx;border-radius:8rpx;background-color:#fff;overflow:hidden}.wux-actionsheet__group--options{background-color:#f1f2f3}.wux-actionsheet__title{padding:32rpx;color:#8f8f8f;text-align:center;font-size:26rpx}.wux-actionsheet__button{position:relative;display:block;margin:0;padding:0;min-width:104rpx;min-height:96rpx;vertical-align:top;text-align:center;text-overflow:ellipsis;cursor:pointer;width:100%;border-radius:0;background-color:transparent;color:#007aff;font-size:42rpx;line-height:96rpx;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.wux-actionsheet__button--hover{box-shadow:none;border-color:#d1d3d6;color:#007aff;background:#e4e5e7}.wux-actionsheet__button--destructive{color:#ff3b30!important}.wux-actionsheet__button--cancel{font-weight:500}.wux-actionsheet__button--disabled{opacity:.3!important}.wux-actionsheet__group .wux-actionsheet__button{border-top:none}.wux-actionsheet__group .wux-actionsheet__button::after{transform:none;transform-origin:none;border:none;border-radius:0;content:" ";position:absolute;left:0;top:0;right:0;height:1PX;border-top:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 0;transform:scaleY(.5)}.wux-actionsheet__group .wux-actionsheet__button:first-child:last-child::after{border-width:0}.wux-actionsheet__icon{width:48rpx;height:48rpx;display:inline-block;margin-right:20rpx} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}(0,_baseComponent.default)({properties:{prefixCls:{type:String,value:"wux-alert"},classNames:{type:null,value:"wux-animate--fadeIn"},theme:{type:String,value:"balanced"},thumb:{type:String,value:""},title:{type:String,value:""},label:{type:String,value:""},closable:{type:Boolean,value:!1}},data:{visible:!0},computed:{classes:["prefixCls, theme",function(e,t){return{wrap:(0,_classNames2.default)(e,_defineProperty({},"".concat(e,"--").concat(t),t)),hd:"".concat(e,"__hd"),thumb:"".concat(e,"__thumb"),bd:"".concat(e,"__bd"),text:"".concat(e,"__text"),desc:"".concat(e,"__desc"),ft:"".concat(e,"__ft"),closable:"".concat(e,"__closable")}}]},methods:{onClose:function(){this.data.closable&&this.setData({visible:!1}),this.triggerEvent("click")},onClick:function(){this.triggerEvent("click")}}}); |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-animation-group": "../animation-group/index" |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
<wux-animation-group in="{{ visible }}" classNames="{{ classNames }}"> |
|||
<view class="wux-class {{ classes.wrap }}" bindtap="onClick"> |
|||
<view class="{{ classes.hd }}"> |
|||
<block wx:if="{{ thumb }}"> |
|||
<image class="{{ classes.thumb }}" src="{{ thumb }}" /> |
|||
</block> |
|||
<block wx:else> |
|||
<slot name="header"></slot> |
|||
</block> |
|||
</view> |
|||
<view class="{{ classes.bd }}"> |
|||
<view wx:if="{{ title }}" class="{{ classes.text }}">{{ title }}</view> |
|||
<view wx:if="{{ label }}" class="{{ classes.desc }}">{{ label }}</view> |
|||
<slot></slot> |
|||
</view> |
|||
<view class="{{ classes.ft }}"> |
|||
<block wx:if="{{ closable }}"> |
|||
<view class="{{ classes.closable }}" catchtap="onClose">×</view> |
|||
</block> |
|||
<block wx:else> |
|||
<slot name="footer"></slot> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</wux-animation-group> |
@ -0,0 +1 @@ |
|||
.wux-alert{padding:20rpx 30rpx;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:4rpx;font-size:28rpx}.wux-alert__thumb{width:40rpx;height:40rpx;display:block;margin-right:10rpx}.wux-alert__bd{-ms-flex:1;flex:1}.wux-alert__text{text-align:left}.wux-alert__desc{text-align:left;line-height:1.2;font-size:24rpx}.wux-alert--light{color:#fff;background-color:#ddd}.wux-alert--stable{color:#fff;background-color:#b2b2b2}.wux-alert--positive{color:#fff;background-color:#387ef5}.wux-alert--calm{color:#fff;background-color:#11c1f3}.wux-alert--assertive{color:#fff;background-color:#ef473a}.wux-alert--balanced{color:#fff;background-color:#33cd5f}.wux-alert--energized{color:#fff;background-color:#ffc900}.wux-alert--royal{color:#fff;background-color:#886aea}.wux-alert--dark{color:#fff;background-color:#444} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,3 @@ |
|||
{ |
|||
"component": true |
|||
} |
@ -0,0 +1,3 @@ |
|||
<view class="wux-class {{ wrapCls }} {{ animateCss }}" bindtap="onTap" catchtouchmove="{{ disableScroll ? 'noop' : '' }}" bindtransitionend="onTransitionEnd" bindanimationend="onAnimationEnd" wx:if="{{ animateStatus !== 'unmounted' }}" style="{{ extStyle }}"> |
|||
<slot></slot> |
|||
</view> |
@ -0,0 +1 @@ |
|||
.wux-animate--fadeIn-enter{transition:opacity .3s;opacity:0}.wux-animate--fadeIn-enter-active,.wux-animate--fadeIn-enter-done{opacity:1}.wux-animate--fadeIn-exit{transition:opacity .3s;opacity:1}.wux-animate--fadeIn-exit-active,.wux-animate--fadeIn-exit-done{opacity:0}.wux-animate--fadeInDown-enter{transition:opacity .3s,transform .3s;opacity:0;transform:translate3d(0,-100%,0)}.wux-animate--fadeInDown-enter-active,.wux-animate--fadeInDown-enter-done{opacity:1;transform:none}.wux-animate--fadeInDown-exit{transition:opacity .3s,transform .3s;opacity:1;transform:none}.wux-animate--fadeInDown-exit-active,.wux-animate--fadeInDown-exit-done{opacity:0;transform:translate3d(0,-100%,0)}.wux-animate--fadeInLeft-enter{transition:opacity .3s,transform .3s;opacity:0;transform:translate3d(-100%,0,0)}.wux-animate--fadeInLeft-enter-active,.wux-animate--fadeInLeft-enter-done{opacity:1;transform:none}.wux-animate--fadeInLeft-exit{transition:opacity .3s,transform .3s;opacity:1;transform:none}.wux-animate--fadeInLeft-exit-active,.wux-animate--fadeInLeft-exit-done{opacity:0;transform:translate3d(-100%,0,0)}.wux-animate--fadeInRight-enter{transition:opacity .3s,transform .3s;opacity:0;transform:translate3d(100%,0,0)}.wux-animate--fadeInRight-enter-active,.wux-animate--fadeInRight-enter-done{opacity:1;transform:none}.wux-animate--fadeInRight-exit{transition:opacity .3s,transform .3s;opacity:1;transform:none}.wux-animate--fadeInRight-exit-active,.wux-animate--fadeInRight-exit-done{opacity:0;transform:translate3d(100%,0,0)}.wux-animate--fadeInUp-enter{transition:opacity .3s,transform .3s;opacity:0;transform:translate3d(0,100%,0)}.wux-animate--fadeInUp-enter-active,.wux-animate--fadeInUp-enter-done{opacity:1;transform:none}.wux-animate--fadeInUp-exit{transition:opacity .3s,transform .3s;opacity:1;transform:none}.wux-animate--fadeInUp-exit-active,.wux-animate--fadeInUp-exit-done{opacity:0;transform:translate3d(0,100%,0)}.wux-animate--slideInUp-enter{transition:transform .3s;transform:translate3d(0,100%,0);visibility:visible}.wux-animate--slideInUp-enter-active,.wux-animate--slideInUp-enter-done{transform:translateZ(0)}.wux-animate--slideInUp-exit{transition:transform .3s;transform:translateZ(0)}.wux-animate--slideInUp-exit-active,.wux-animate--slideInUp-exit-done{transform:translate3d(0,100%,0);visibility:visible}.wux-animate--slideInDown-enter{transition:transform .3s;transform:translate3d(0,-100%,0);visibility:visible}.wux-animate--slideInDown-enter-active,.wux-animate--slideInDown-enter-done{transform:translateZ(0)}.wux-animate--slideInDown-exit{transition:transform .3s;transform:translateZ(0)}.wux-animate--slideInDown-exit-active,.wux-animate--slideInDown-exit-done{transform:translate3d(0,-100%,0);visibility:visible}.wux-animate--slideInLeft-enter{transition:transform .3s;transform:translate3d(-100%,0,0);visibility:visible}.wux-animate--slideInLeft-enter-active,.wux-animate--slideInLeft-enter-done{transform:translateZ(0)}.wux-animate--slideInLeft-exit{transition:transform .3s;transform:translateZ(0)}.wux-animate--slideInLeft-exit-active,.wux-animate--slideInLeft-exit-done{transform:translate3d(-100%,0,0);visibility:visible}.wux-animate--slideInRight-enter{transition:transform .3s;transform:translate3d(100%,0,0);visibility:visible}.wux-animate--slideInRight-enter-active,.wux-animate--slideInRight-enter-done{transform:none}.wux-animate--slideInRight-exit{transition:transform .3s;transform:none}.wux-animate--slideInRight-exit-active,.wux-animate--slideInRight-exit-done{transform:translate3d(100%,0,0);visibility:visible}.wux-animate--zoom-enter{transition:all .3s cubic-bezier(.215,.61,.355,1);opacity:.01;transform:scale(.75)}.wux-animate--zoom-enter-active,.wux-animate--zoom-enter-done{opacity:1;transform:none}.wux-animate--zoom-exit{transition:all .25s linear;transform:none}.wux-animate--zoom-exit-active,.wux-animate--zoom-exit-done{opacity:.01;transform:scale(.75)}.wux-animate--punch-enter{transition:all .3s cubic-bezier(.215,.61,.355,1);opacity:.01;transform:scale(1.35)}.wux-animate--punch-enter-active,.wux-animate--punch-enter-done{opacity:1;transform:none}.wux-animate--punch-exit{transition:all .25s linear;transform:none}.wux-animate--punch-exit-active,.wux-animate--punch-exit-done{opacity:.01;transform:scale(1.35)} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,10 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-dialog": "../dialog/index", |
|||
"wux-loading": "../loading/index", |
|||
"wux-notification": "../notification/index", |
|||
"wux-toast": "../toast/index", |
|||
"wux-toptips": "../toptips/index" |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
<block wx:if="{{ shadowRoot }}"> |
|||
<wux-dialog id="{{ classes.dialog }}" /> |
|||
<wux-loading id="{{ classes.loading }}" /> |
|||
<wux-notification id="{{ classes.notification }}" /> |
|||
<wux-toast id="{{ classes.toast }}" /> |
|||
<wux-toptips id="{{ classes.toptips }}" /> |
|||
<slot></slot> |
|||
</block> |
|||
<view class="wux-class {{ wrapCls }} {{ classes.wrap }}" style="{{ extStyle }}" wx:else> |
|||
<wux-dialog id="{{ classes.dialog }}" /> |
|||
<wux-loading id="{{ classes.loading }}" /> |
|||
<wux-notification id="{{ classes.notification }}" /> |
|||
<wux-toast id="{{ classes.toast }}" /> |
|||
<wux-toptips id="{{ classes.toptips }}" /> |
|||
<slot></slot> |
|||
</view> |
@ -0,0 +1 @@ |
|||
.wux-app{color:rgba(0,0,0,.85);font-family:-apple-system-font,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;font-size:28rpx;line-height:1.5;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames")),_styleToCssString=_interopRequireDefault(require("../helpers/styleToCssString"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(n=(l=o.next()).done)&&(r.push(l.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw i}}return r}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(0,_baseComponent.default)({properties:{prefixCls:{type:String,value:"wux-avatar"},shape:{type:String,value:"circle"},size:{type:String,value:"default"},src:{type:String,value:""},bodyStyle:{type:[String,Object],value:"",observer:function(e){this.setData({extStyle:(0,_styleToCssString.default)(e)})}},scale:{type:Boolean,value:!1}},data:{extStyle:"",childrenStyle:""},computed:{classes:["prefixCls, shape, size, src",function(e,t,r,n){var a;return{wrap:(0,_classNames2.default)(e,(_defineProperty(a={},"".concat(e,"--").concat(t),t),_defineProperty(a,"".concat(e,"--").concat(r),r),_defineProperty(a,"".concat(e,"--thumb"),n),a)),string:"".concat(e,"__string")}}]},methods:{setScale:function(){var l=this,e=this.data.prefixCls,t=wx.createSelectorQuery().in(this);t.select(".".concat(e)).boundingClientRect(),t.select(".".concat(e,"__string")).boundingClientRect(),t.exec(function(e){if(!e.filter(function(e){return!e}).length){var t=_slicedToArray(e,2),r=t[0],n=t[1],a=r.width-8<n.width?(r.width-8)/n.width:1,i=1!=a?"position: absolute; display: inline-block; transform: scale(".concat(a,"); left: calc(50% - ").concat(Math.round(n.width/2),"px)"):"";l.setData({childrenStyle:i})}})}},ready:function(){!this.data.src&&this.data.scale&&this.setScale()}}); |
@ -0,0 +1,3 @@ |
|||
{ |
|||
"component": true |
|||
} |
@ -0,0 +1,6 @@ |
|||
<view class="wux-class {{ classes.wrap }}" style="{{ extStyle }}"> |
|||
<image src="{{ src }}" wx:if="{{ src }}" /> |
|||
<text class="{{ classes.string }}" style="{{ childrenStyle }}" wx:else> |
|||
<slot></slot> |
|||
</text> |
|||
</view> |
@ -0,0 +1 @@ |
|||
.wux-avatar{box-sizing:border-box;display:inline-block;text-align:center;background:#ccc;color:#fff;white-space:nowrap;position:relative;overflow:hidden;vertical-align:middle;width:64rpx;height:64rpx;line-height:64rpx;border-radius:32rpx;font-size:36rpx}.wux-avatar .wux-avatar__string{line-height:64rpx}.wux-avatar--small{width:48rpx;height:48rpx;line-height:48rpx;border-radius:24rpx;font-size:28rpx}.wux-avatar--small .wux-avatar__string{line-height:48rpx}.wux-avatar--large{width:80rpx;height:80rpx;line-height:80rpx;border-radius:40rpx;font-size:48rpx}.wux-avatar--large .wux-avatar__string{line-height:80rpx}.wux-avatar--square{border-radius:8rpx}.wux-avatar--thumb{background:0 0}.wux-avatar>image{width:100%;height:100%} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,_baseComponent.default)({useExport:!0,properties:{prefixCls:{type:String,value:"wux-backdrop"},transparent:{type:Boolean,value:!1},zIndex:{type:Number,value:1e3},classNames:{type:null,value:"wux-animate--fadeIn"},mountOnEnter:{type:Boolean,value:!0},unmountOnExit:{type:Boolean,value:!0},visible:{type:Boolean,value:!1,observer:function(e){this.setActive(e),e||(this._backdropHolds=0)}}},data:{active:!1},computed:{classes:["prefixCls, transparent",function(e,t){return{wrap:t?"".concat(e,"--transparent"):e,bd:"".concat(e,"__bd"),btn:"".concat(e,"__aria-btn")}}]},methods:_defineProperty({setActive:function(e){this.data.active!==e&&this.setData({active:e})},onEntered:function(){this.triggerEvent("showed")},onExited:function(){this.triggerEvent("closed")},onClick:function(){this.triggerEvent("click")},noop:function(){}},"export",function(){var e=this,t=this;return{retain:function(){"number"==typeof e._backdropHolds&&e._backdropHolds||(e._backdropHolds=0),e._backdropHolds=e._backdropHolds+1,1===e._backdropHolds&&e.setActive(!0)},release:function(){1===e._backdropHolds&&e.setActive(!1),e._backdropHolds=Math.max(0,e._backdropHolds-1)},get backdropHolds(){return t._backdropHolds||0}}}),attached:function(){var e=this.data.visible;this.setActive(e)}}); |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-animation-group": "../animation-group/index" |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
<wux-animation-group |
|||
wux-class="{{ classes.wrap }}" |
|||
in="{{ active }}" |
|||
classNames="{{ classNames }}" |
|||
wrapStyle="{{ { zIndex } }}" |
|||
mountOnEnter="{{ mountOnEnter }}" |
|||
unmountOnExit="{{ unmountOnExit }}" |
|||
disableScroll |
|||
bind:click="onClick" |
|||
bind:entered="onEntered" |
|||
bind:exited="onExited" |
|||
> |
|||
<view class="{{ classes.btn }}" aria-role="button" aria-label="backdrop" catchtap="onClick"></view> |
|||
<view class="{{ classes.bd }}" catchtap="noop"> |
|||
<slot></slot> |
|||
</view> |
|||
</wux-animation-group> |
@ -0,0 +1 @@ |
|||
.wux-backdrop{background:rgba(0,0,0,.4)}.wux-backdrop,.wux-backdrop--transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}.wux-backdrop--transparent{background:0 0}.wux-backdrop__bd{z-index:1}.wux-backdrop__aria-btn{position:absolute;top:0;left:0;z-index:0;width:100%;height:100%;pointer-events:none} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}(0,_baseComponent.default)({externalClasses:["wux-class-badge"],properties:{prefixCls:{type:String,value:"wux-badge"},count:{type:Number,value:0,observer:"updated"},overflowCount:{type:Number,value:99},dot:{type:Boolean,value:!1},showZero:{type:Boolean,value:!1},status:{type:String,value:""},text:{type:String,value:""}},data:{finalCount:0},computed:{classes:["prefixCls, status",function(e,t){return{wrap:(0,_classNames2.default)(e),status:"".concat(e,"__status"),statusDot:(0,_classNames2.default)("".concat(e,"__status-dot"),_defineProperty({},"".concat(e,"__status-dot--").concat(t),t)),statusText:"".concat(e,"__status-text"),dot:"".concat(e,"__dot"),count:"".concat(e,"__count")}}]},methods:{updated:function(e){var t=0<arguments.length&&void 0!==e?e:this.data.count,a=this.data.overflowCount,s=a<=t?"".concat(a,"+"):t;this.setData({finalCount:s})}}}); |
@ -0,0 +1,3 @@ |
|||
{ |
|||
"component": true |
|||
} |
@ -0,0 +1,10 @@ |
|||
<view class="wux-class {{ classes.wrap }}"> |
|||
<slot></slot> |
|||
<view class="{{ classes.status }}" wx:if="{{ status }}"> |
|||
<view class="{{ classes.statusDot }}"></view> |
|||
<view class="{{ classes.statusText }}" wx:if="{{ text }}">{{ text }}</view> |
|||
</view> |
|||
<view class="{{ classes.dot }}" wx:elif="{{ dot }}"></view> |
|||
<view class="{{ classes.count }} wux-class-badge" wx:elif="{{ showZero && count === 0 }}">{{ finalCount }}</view> |
|||
<view class="{{ classes.count }} wux-class-badge" wx:elif="{{ count !== 0 }}">{{ finalCount }}</view> |
|||
</view> |
@ -0,0 +1 @@ |
|||
.wux-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.wux-badge__count{position:absolute;transform:translateX(50%);top:-12rpx;right:0;height:36rpx;border-radius:18rpx;min-width:36rpx;background:#ed3f14;color:#fff;line-height:36rpx;text-align:center;padding:0 10rpx;font-size:24rpx;white-space:nowrap;transform-origin:-10% center;z-index:10;box-shadow:0 0 0 2rpx #fff;box-sizing:border-box;text-rendering:optimizeLegibility}.wux-badge__dot{width:16rpx;height:16rpx;position:absolute;transform:translateX(-50%);transform-origin:0 center;top:-8rpx;right:-16rpx;border-radius:100%;background:#ed3f14;z-index:10;box-shadow:0 0 0 2rpx #fff}.wux-badge__status{line-height:inherit;vertical-align:baseline}.wux-badge__status-dot{width:12rpx;height:12rpx;display:inline-block;border-radius:50%;vertical-align:middle;position:relative;top:-2rpx}.wux-badge__status-dot--success{background-color:#52c41a}.wux-badge__status-dot--processing{background-color:#1890ff;position:relative}.wux-badge__status-dot--processing::after{position:absolute;top:-2rpx;left:-2rpx;width:100%;height:100%;border-radius:50%;border:2rpx solid #1890ff;content:"";animation:statusProcessing 1.2s infinite ease-in-out}.wux-badge__status-dot--default{background-color:#d9d9d9}.wux-badge__status-dot--error{background-color:#f5222d}.wux-badge__status-dot--warning{background-color:#faad14}.wux-badge__status-text{display:inline-block;color:rgba(0,0,0,.65);font-size:28rpx;margin-left:16rpx}@keyframes statusProcessing{0%{transform:scale(.8);opacity:.5}to{transform:scale(2.4);opacity:0}} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,_baseComponent.default)({useFieldButton:!0,properties:{prefixCls:{type:String,value:"wux-button"},type:{type:String,value:"stable"},clear:{type:Boolean,value:!1},block:{type:Boolean,value:!1},full:{type:Boolean,value:!1},outline:{type:Boolean,value:!1},bordered:{type:Boolean,value:!0},shape:{type:String,value:"default"},size:{type:String,value:"default"},disabled:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},formType:{type:String,value:""},openType:{type:String,value:""},hoverClass:{type:String,value:"default"},hoverStopPropagation:{type:Boolean,value:!1},hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},lang:{type:String,value:"en"},sessionFrom:{type:String,value:""},sendMessageTitle:{type:String,value:""},sendMessagePath:{type:String,value:""},sendMessageImg:{type:String,value:""},showMessageCard:{type:Boolean,value:!1},appParameter:{type:String,value:""}},computed:{classes:["prefixCls, hoverClass, type, shape, size, block, full, clear, outline, bordered, disabled",function(e,t,n,a,r,o,i,l,u,s,p){var c,d=["rounded","rectangular"].includes(a)?a:"",g=["small","large"].includes(r)?r:"";return{wrap:(0,_classNames2.default)(e,(_defineProperty(c={},"".concat(e,"--").concat(n),n),_defineProperty(c,"".concat(e,"--").concat(a),d),_defineProperty(c,"".concat(e,"--").concat(r),g),_defineProperty(c,"".concat(e,"--block"),o),_defineProperty(c,"".concat(e,"--full"),i),_defineProperty(c,"".concat(e,"--clear"),l),_defineProperty(c,"".concat(e,"--outline"),u),_defineProperty(c,"".concat(e,"--bordered"),s),_defineProperty(c,"".concat(e,"--disabled"),p),c)),hover:t&&"default"!==t?t:"".concat(e,"--hover")}}]},methods:{onTap:function(){this.data.disabled||this.data.loading||this.triggerEvent("click")},bindgetuserinfo:function(e){this.triggerEvent("getuserinfo",e.detail)},bindcontact:function(e){this.triggerEvent("contact",e.detail)},bindgetphonenumber:function(e){this.triggerEvent("getphonenumber",e.detail)},bindopensetting:function(e){this.triggerEvent("opensetting",e.detail)},bindlaunchapp:function(e){this.triggerEvent("launchapp",e.detail)},bindchooseavatar:function(e){this.triggerEvent("chooseavatar",e.detail)},onError:function(e){this.triggerEvent("error",e.detail)}}}); |
@ -0,0 +1,3 @@ |
|||
{ |
|||
"component": true |
|||
} |
@ -0,0 +1,28 @@ |
|||
<button |
|||
class="wux-class {{ classes.wrap }}" |
|||
disabled="{{ disabled }}" |
|||
loading="{{ loading }}" |
|||
form-type="{{ formType }}" |
|||
open-type="{{ openType }}" |
|||
hover-class="wux-hover-class {{ !disabled ? classes.hover : 'none' }}" |
|||
hover-stop-propagation="{{ hoverStopPropagation }}" |
|||
hover-start-time="{{ hoverStartTime }}" |
|||
hover-stay-time="{{ hoverStayTime }}" |
|||
lang="{{ lang }}" |
|||
bindgetuserinfo="bindgetuserinfo" |
|||
session-from="{{ sessionFrom }}" |
|||
send-message-title="{{ sendMessageTitle }}" |
|||
send-message-path="{{ sendMessagePath }}" |
|||
send-message-img="{{ sendMessageImg }}" |
|||
show-message-card="{{ showMessageCard }}" |
|||
bindcontact="bindcontact" |
|||
bindgetphonenumber="bindgetphonenumber" |
|||
app-parameter="{{ appParameter }}" |
|||
binderror="onError" |
|||
bindopensetting="bindopensetting" |
|||
bindlaunchapp="bindlaunchapp" |
|||
bindchooseavatar="bindchooseavatar" |
|||
bindtap="onTap" |
|||
> |
|||
<slot></slot> |
|||
</button> |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-popup": "../popup/index" |
|||
} |
|||
} |
@ -0,0 +1,67 @@ |
|||
<wux-popup position="bottom" visible="{{ in }}" zIndex="0" safeArea="bottom" bind:close="close"> |
|||
<view class="wux-class {{ classes.wrap }}"> |
|||
<view class="{{ classes.content }}"> |
|||
<view class="{{ classes.hd }}" wx:if="{{ toolbar }}"> |
|||
<view class="{{ classes.toolbar }}"> |
|||
<view class="{{ classes.picker }}"> |
|||
<view class="{{ classes.link }}" bindtap="prevMonth"> |
|||
<view class="{{ classes.prev }}"></view> |
|||
</view> |
|||
<view class="{{ classes.value }}">{{ currentMonthName }}</view> |
|||
<view class="{{ classes.link }}" bindtap="nextMonth"> |
|||
<view class="{{ classes.next }}"></view> |
|||
</view> |
|||
</view> |
|||
<view class="{{ classes.picker }}"> |
|||
<view class="{{ classes.link }}" bindtap="prevYear"> |
|||
<view class="{{ classes.prev }}"></view> |
|||
</view> |
|||
<text class="{{ classes.value }}">{{ currentYear }}</text> |
|||
<view class="{{ classes.link }}" bindtap="nextYear"> |
|||
<view class="{{ classes.next }}"></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="{{ classes.bd }}"> |
|||
<view class="{{ classes.weekdays }}" wx:if="{{ weekHeader }}"> |
|||
<block wx:for="{{ weeks }}" wx:for-item="week" wx:for-index="weekIndex" wx:key="weekIndex"> |
|||
<view class="{{ classes.weekday }} {{ week.weekend ? prefixCls + '__weekday--weekend' : '' }}"> |
|||
{{ week.dayName }} |
|||
</view> |
|||
</block> |
|||
</view> |
|||
<view class="{{ classes.months }}"> |
|||
<view class="{{ classes.monthsContent }}" bindtouchstart="onTouchStart" catchtouchmove="{{ swiping ? 'noop' : '' }}" capture-bind:touchmove="onTouchMove" bindtouchend="onTouchEnd" style="{{ wrapperTranslate }}"> |
|||
<block wx:for="{{ months }}" wx:for-item="month" wx:for-index="monthIndex" wx:key="monthIndex"> |
|||
<view |
|||
data-year="{{ month.year }}" |
|||
data-month="{{ month.month }}" |
|||
class="{{ classes.month }} {{ monthIndex === 0 ? (prefixCls + '__month--prev') : monthIndex === 1 ? (prefixCls + '__month--current') : (prefixCls + '__month--next') }}" |
|||
style="{{ monthsTranslate[monthIndex] }}" |
|||
> |
|||
<block wx:for="{{ month.items }}" wx:for-item="row" wx:for-index="rowIndex" wx:key="rowIndex"> |
|||
<view class="{{ classes.days }}"> |
|||
<block wx:for="{{ row }}" wx:for-item="col" wx:for-index="colIndex" wx:key="colIndex"> |
|||
<view |
|||
data-year="{{ col.year }}" |
|||
data-month="{{ col.month }}" |
|||
data-day="{{ col.day }}" |
|||
data-date="{{ col.date }}" |
|||
data-type="{{ col.type }}" |
|||
class="{{ classes.day }} {{ col.type.prev ? prefixCls + '__day--prev' : '' }} {{ col.type.next ? prefixCls + '__day--next' : '' }} {{ col.type.today ? prefixCls + '__day--today' : '' }} {{ col.type.selected ? prefixCls + '__day--selected' : '' }} {{ col.type.weekend ? prefixCls + '__day--weekend' : '' }} {{ col.type.disabled ? prefixCls + '__day--disabled' : '' }}" |
|||
bindtap="onDayClick" |
|||
> |
|||
<text class="{{ classes.text }}">{{ col.day }}</text> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</wux-popup> |
@ -0,0 +1 @@ |
|||
.wux-calendar{position:relative;background:#fff;height:600rpx;width:100%;overflow:hidden}.wux-calendar__content{position:relative;width:100%;height:100%;transition:transform .3s}.wux-calendar__bd{height:100%;position:relative;overflow:hidden}.wux-calendar__hd{position:relative;width:100%}.wux-calendar__hd::before{content:" ";position:absolute;left:0;top:0;right:0;height:1PX;border-top:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 0;transform:scaleY(.5)}.wux-calendar__hd+.wux-calendar__bd{height:calc(97.8%)}.wux-calendar__toolbar{height:2.2rem;display:-ms-flexbox;display:flex;text-align:center}.wux-calendar__picker{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:50%;max-width:400rpx;-ms-flex-negative:10;flex-shrink:10;display:block;line-height:2.2rem}.wux-calendar__link{float:left;width:25%;height:2.2rem;line-height:2rem;min-width:72rpx}.wux-calendar__icon{display:inline-block;vertical-align:middle;background-size:100% auto;background-position:center}.wux-calendar__icon--next,.wux-calendar__icon--prev{width:.75rem;height:.75rem}.wux-calendar__icon--next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.wux-calendar__icon--prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.wux-calendar__value{-ms-flex-negative:1;flex-shrink:1;position:relative;overflow:hidden;text-overflow:ellipsis;float:left;width:50%;height:2.2rem}.wux-calendar__weekdays{height:36rpx;background:#f7f7f8;display:-ms-flexbox;display:flex;font-size:22rpx;box-sizing:border-box;position:relative}.wux-calendar__weekdays::after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1PX;border-bottom:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 100%;transform:scaleY(.5)}.wux-calendar__weekdays+.wux-calendar__months{height:calc(82%)}.wux-calendar__weekday{-ms-flex-negative:1;flex-shrink:1;width:14.28571429%;width:calc(14.28571429%);line-height:34rpx;text-align:center}.wux-calendar__months{width:100%;height:100%;overflow:hidden;position:relative}.wux-calendar__months-content{width:100%;height:100%;display:-ms-flexbox;display:flex;position:relative;-webkit-backface-visibility:hidden;transform:translate3d(0,0,0)}.wux-calendar__month{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%;position:absolute;left:0;top:0}.wux-calendar__days{height:16.66666667%;height:calc(16.66666667%);display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;width:100%;position:relative}.wux-calendar__days::after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1PX;border-bottom:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 100%;transform:scaleY(.5)}.wux-calendar__days:last-child::after{display:none}.wux-calendar__day{-ms-flex-negative:1;flex-shrink:1;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;width:14.28571429%;width:calc(14.28571429%);text-align:center;color:#3d4145;font-size:30rpx;cursor:pointer}.wux-calendar__day--prev{color:#ccc}.wux-calendar__day--next{color:#ccc}.wux-calendar__day--disabled{color:#d4d4d4;cursor:auto}.wux-calendar__day--today .wux-calendar__text{background:#e3e3e3}.wux-calendar__day--selected .wux-calendar__text{background:#0894ec;color:#fff}.wux-calendar__text{display:inline-block;border-radius:100%;width:60rpx;height:60rpx;line-height:60rpx} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames3=_interopRequireDefault(require("../helpers/classNames")),_styleToCssString=_interopRequireDefault(require("../helpers/styleToCssString"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}(0,_baseComponent.default)({properties:{prefixCls:{type:String,value:"wux-card"},hoverClass:{type:String,value:"none"},bordered:{type:Boolean,value:!0},full:{type:Boolean,value:!1},title:{type:String,value:""},thumb:{type:String,value:""},thumbStyle:{type:[String,Object],value:"",observer:function(e){this.setData({extStyle:(0,_styleToCssString.default)(e)})}},extra:{type:String,value:""},actions:{type:Array,value:[]}},data:{extStyle:"",disabled:!1},computed:{classes:["prefixCls, hoverClass, bordered, full, actions",function(a,e,t,n,r){var o;return{wrap:(0,_classNames3.default)(a,(_defineProperty(o={},"".concat(a,"--bordered"),t),_defineProperty(o,"".concat(a,"--full"),n),_defineProperty(o,"".concat(a,"--has-actions"),0<r.length),o)),hd:"".concat(a,"__hd"),content:"".concat(a,"__content"),thumb:"".concat(a,"__thumb"),extra:"".concat(a,"__extra"),bd:"".concat(a,"__bd"),ft:"".concat(a,"__ft"),actions:"".concat(a,"__actions"),action:r.map(function(e){var t;return{wrap:(0,_classNames3.default)("".concat(a,"__action"),(_defineProperty(t={},"".concat(a,"__action--").concat(e.type||"default"),e.type||"default"),_defineProperty(t,"".concat(a,"__action--bold"),e.bold),_defineProperty(t,"".concat(a,"__action--disabled"),e.disabled),_defineProperty(t,"".concat(e.className),e.className),t)),hover:e.hoverClass&&"default"!==e.hoverClass?e.hoverClass:"".concat(a,"__action--hover")}}),hover:e&&"default"!==e?e:"".concat(a,"--hover")}}]},methods:{onAction:function(e){var t=e.currentTarget.dataset.index,a=this.data.actions,n=a[t];n.disabled||this.triggerEvent("action",{index:t,action:n,actions:a})}}}); |
@ -0,0 +1,3 @@ |
|||
{ |
|||
"component": true |
|||
} |
@ -0,0 +1,28 @@ |
|||
<view class="wux-class {{ classes.wrap }}" hover-class="{{ !disabled ? classes.hover : 'none' }}"> |
|||
<view class="{{ classes.hd }}" wx:if="{{ thumb || title || extra }}"> |
|||
<view class="{{ classes.content }}" wx:if="{{ thumb || title }}"> |
|||
<image class="{{ classes.thumb }}" src="{{ thumb }}" mode="aspectFit" style="{{ extStyle }}" wx:if="{{ thumb }}" /> |
|||
<text>{{ title }}</text> |
|||
</view> |
|||
<view class="{{ classes.extra }}" wx:if="{{ extra }}">{{ extra }}</view> |
|||
<slot name="extra" wx:else></slot> |
|||
</view> |
|||
<view class="{{ classes.bd }}"> |
|||
<slot name="body"></slot> |
|||
</view> |
|||
<view class="{{ classes.ft }}"> |
|||
<slot name="footer"></slot> |
|||
</view> |
|||
<view class="{{ classes.actions }}" wx:if="{{ actions.length > 0 }}"> |
|||
<block wx:for="{{ actions }}" wx:for-item="action" wx:key="index"> |
|||
<view |
|||
class="{{ classes.action[index].wrap }}" |
|||
hover-class="{{ !action.disabled ? classes.action[index].hover : 'none' }}" |
|||
data-index="{{ index }}" |
|||
catchtap="onAction" |
|||
> |
|||
{{ action.text }} |
|||
</view> |
|||
</block> |
|||
</view> |
|||
</view> |
@ -0,0 +1 @@ |
|||
.wux-card{position:relative;min-height:192rpx;padding-bottom:12rpx;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#fff}.wux-card--hover{background-color:#ececec}.wux-card--bordered{border-radius:20rpx}.wux-card--bordered::before{content:" ";position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #d9d9d9;border-radius:20rpx;border-top-width:1PX;border-right-width:1PX;border-bottom-width:1PX;border-left-width:1PX}.wux-card--full{border-radius:0}.wux-card--full::before{border-radius:0;border-right-width:0;border-left-width:0}.wux-card--has-actions{padding-bottom:0}.wux-card__hd{position:relative;display:-ms-flexbox;display:flex;font-size:34rpx;padding:18rpx 30rpx;-ms-flex-align:center;align-items:center}.wux-card__hd::before{content:" ";position:absolute;left:0;bottom:0;right:0;height:1PX;border-bottom:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 100%;transform:scaleY(.5)}.wux-card__content{-ms-flex:1;flex:1;text-align:left;color:#000}.wux-card__thumb{width:64rpx;height:64rpx;display:inline-block;position:relative;margin-left:auto;margin-right:10rpx;overflow:hidden;vertical-align:middle}.wux-card__extra{-ms-flex:1;flex:1;text-align:right;font-size:34rpx;color:rgba(0,0,0,.45)}.wux-card__bd{position:relative;padding:30rpx 30rpx 12rpx;font-size:30rpx;color:rgba(0,0,0,.85);min-height:80rpx}.wux-card__ft{display:-ms-flexbox;display:flex;font-size:28rpx;color:rgba(0,0,0,.45);padding:0 30rpx}.wux-card__actions{position:relative;display:-ms-flexbox;display:flex;line-height:100rpx;margin-top:12rpx;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.wux-card__actions::before{content:" ";position:absolute;left:0;top:0;right:0;height:1PX;border-top:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 0;transform:scaleY(.5)}.wux-card__action{position:relative;display:block;-ms-flex:1;flex:1;color:#33cd5f;text-align:center}.wux-card__action::before{content:" ";position:absolute;right:0;top:0;width:1PX;bottom:0;border-right:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:100% 0;transform:scaleX(.5)}.wux-card__action:last-child::before{display:none}.wux-card__action--default{color:#444!important}.wux-card__action--primary{color:#33cd5f!important}.wux-card__action--light{color:#ddd!important}.wux-card__action--stable{color:#b2b2b2!important}.wux-card__action--positive{color:#387ef5!important}.wux-card__action--calm{color:#11c1f3!important}.wux-card__action--assertive{color:#ef473a!important}.wux-card__action--balanced{color:#33cd5f!important}.wux-card__action--energized{color:#ffc900!important}.wux-card__action--royal{color:#886aea!important}.wux-card__action--dark{color:#444!important}.wux-card__action--bold{font-weight:500!important}.wux-card__action--hover{background-color:#ececec!important}.wux-card__action--disabled{opacity:.3} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames=_interopRequireDefault(require("../helpers/classNames")),_arrayTreeFilter=_interopRequireDefault(require("../helpers/arrayTreeFilter")),_props=require("../multi-picker-view/props");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(r,!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(0,_baseComponent.default)({properties:_objectSpread({},_props.props,{cols:{type:Number,value:3}}),data:{inputValue:[],showOptions:[],fieldNames:_props.defaultFieldNames},observers:_defineProperty({inputValue:function(e){this.fixFieldName();var r=this.getFieldName("value"),i=this.getFieldName("label"),t=this.getShowOptions(e).reduce(function(e,t){return[].concat(_toConsumableArray(e),[t.map(function(e){var t;return _defineProperty(t={},r,e[r]),_defineProperty(t,i,e[i]),_defineProperty(t,"disabled",!!e.disabled),t})])},[]);this.setData({showOptions:t})}},"value, options, cols",function(e,t,r){this.fixFieldName(),this.setValue(e,t,r)}),methods:{updated:function(e){this.data.inputValue!==e&&this.setData({inputValue:e})},setValue:function(e,t,r){var i=this.getRealValue(t,e,r);this.updated(i)},onValueChange:function(e){var t=e.detail,r=t.value,i=t.index,n=this.getNextValue(r,i),a=this.getRealValue(this.data.options,n),o=this.getValue(a);this.updated(a),this.triggerEvent("valueChange",_objectSpread({},o,{index:i}))},getValue:function(e){var t=0<arguments.length&&void 0!==e?e:this.data.inputValue,r=this.getRealValue(this.data.options,t),i=this.getShowOptions(r);return this.picker=this.picker||this.selectComponent("#wux-picker"),this.picker.getValue(r,i)},getNextValue:function(r,i){for(var e=this.data.options,n=this.getFieldName("value"),t=this.getFieldName("children"),a=(0,_arrayTreeFilter.default)(e,function(e,t){return t<=i&&e[n]===r[t]},{childrenKeyName:t})[i],o=i+1;o<this.data.cols;)a&&a[t]&&a[t].length&&(a=a[t][0],r[o]=a[n]),o++;return r.length=o,r},getRealValue:function(o,u,e){var l=this,s=2<arguments.length&&void 0!==e?e:this.data.cols;if(!u||!u.length||-1<u.indexOf(void 0)||u.length!==s){var t=function(){for(var t=l.getFieldName("value"),e=l.getFieldName("children"),r=[],i=_toConsumableArray(o),n=0;n<s;){if(i&&i.length){r[n]=u[n]||i[0][t];var a=0;r[n]&&-1===(a=i.map(function(e){return e[t]}).indexOf(r[n]))&&(a=0,r[n]=i[0][t]),i=i[a][e]}n++}return{v:r}}();if("object"===_typeof(t))return t.v}return u},getActiveOptions:function(r){var e=this.data.options,i=this.getFieldName("value"),t=this.getFieldName("children");return(0,_arrayTreeFilter.default)(e,function(e,t){return e[i]===r[t]},{childrenKeyName:t})},getShowOptions:function(e){var t=this.data,r=t.options,i=t.cols,n=this.getFieldName("children"),a=this.getActiveOptions(e).map(function(e){return e[n]}).filter(function(e){return!!e});return[r].concat(_toConsumableArray(a)).filter(function(e,t){return t<i})},getFieldName:function(e){return this.data.fieldNames[e]},fixFieldName:function(){if(!this.hasFieldName){var e=Object.assign({},_props.defaultFieldNames,this.data.defaultFieldNames);this.setData({fieldNames:e}),this.hasFieldName=!0}}},attached:function(){var e=this.data,t=e.value,r=e.options,i=e.cols;this.fixFieldName(),this.setValue(t,r,i)}}); |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-multi-picker-view": "../multi-picker-view/index" |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
<wux-multi-picker-view |
|||
id="wux-picker" |
|||
prefixCls="{{ prefixCls }}" |
|||
pickerPrefixCls="{{ pickerPrefixCls }}" |
|||
value="{{ inputValue }}" |
|||
itemHeight="{{ itemHeight }}" |
|||
itemStyle="{{ itemStyle }}" |
|||
indicatorStyle="{{ indicatorStyle }}" |
|||
indicatorClass="{{ indicatorClass }}" |
|||
maskStyle="{{ maskStyle }}" |
|||
maskClass="{{ maskClass }}" |
|||
labelAlign="{{ labelAlign }}" |
|||
defaultFieldNames="{{ fieldNames }}" |
|||
options="{{ showOptions }}" |
|||
loading="{{ loading }}" |
|||
bind:valueChange="onValueChange" |
|||
/> |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames3=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,n)}return a}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(a,!0).forEach(function(e){_defineProperty(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(a).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var defaultFieldNames={label:"label",value:"value",children:"children",disabled:"disabled"};(0,_baseComponent.default)({externalClasses:["wux-scroll-view-class"],properties:{prefixCls:{type:String,value:"wux-cascader"},defaultValue:{type:Array,value:[]},value:{type:Array,value:[],observer:function(e){this.data.controlled&&(this.setActiveValue(e),this.setInnerValue(e))}},controlled:{type:Boolean,value:!1},title:{type:String,value:""},cancelText:{type:String,value:"取消"},confirmText:{type:String,value:"确定"},options:{type:Array,value:[]},full:{type:Boolean,value:!1},height:{type:[String,Number],value:"auto"},chooseTitle:{type:String,value:"请选择"},visible:{type:Boolean,value:!1,observer:function(e){e&&this.setShouldRender(!0)}},defaultFieldNames:{type:Object,value:defaultFieldNames},skipAnimation:{type:Boolean,value:!1}},data:{shouldRender:!1,innerValue:[],activeValue:[]},computed:{classes:["prefixCls",function(e){return{wrap:(0,_classNames3.default)(e),hd:"".concat(e,"__hd"),bd:"".concat(e,"__bd"),toolbar:"".concat(e,"__toolbar"),inner:"".concat(e,"__inner"),cancel:(0,_classNames3.default)("".concat(e,"__button"),_defineProperty({},"".concat(e,"__button--cancel"),!0)),confirm:(0,_classNames3.default)("".concat(e,"__button"),_defineProperty({},"".concat(e,"__button--confirm"),!0)),hover:"".concat(e,"__button--hover"),title:"".concat(e,"__title")}}]},methods:{setShouldRender:function(e){this.data.shouldRender!==e&&this.setData({shouldRender:e})},setActiveValue:function(e,t){this.data.activeValue===e&&!t||this.setData({activeValue:e})},setInnerValue:function(e){this.data.innerValue!==e&&this.setData({innerValue:e})},getValue:function(e){var t=0<arguments.length&&void 0!==e?e:this.data.activeValue;return this.cascaderView=this.cascaderView||this.selectComponent("#wux-cascader-view"),this.cascaderView&&this.cascaderView.getValue(t)},onTabsChange:function(e){this.triggerEvent("tabsChange",e.detail)},onLoadOptions:function(e){this.triggerEvent("load",e.detail)},onChange:function(e){var t=this.data.visible,a=e.detail,n=a.value;this.setInnerValue(n),t&&this.triggerEvent("change",a)},close:function(){this.triggerEvent("close")},onClosed:function(){var e=this.data.activeValue;this.setInnerValue(e),this.setShouldRender(!1)},onConfirm:function(){var e=this.data.innerValue;this.data.controlled||this.setActiveValue(e,!0),this.triggerEvent("confirm",_objectSpread({},this.getValue(e))),this.close()},onCancel:function(){this.triggerEvent("cancel",_objectSpread({},this.getValue())),this.close()},noop:function(){}},attached:function(){var e=this.data,t=e.defaultValue,a=e.value,n=e.controlled,r=e.visible,i=n?a:t;this.setActiveValue(i),this.setInnerValue(i),this.setShouldRender(r)}}); |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-popup": "../popup/index", |
|||
"wux-cascader-view": "../cascader-picker-view/index" |
|||
} |
|||
} |
@ -0,0 +1,39 @@ |
|||
<wux-popup |
|||
position="bottom" |
|||
visible="{{ visible }}" |
|||
hasHeader="{{ false }}" |
|||
hasFooter="{{ false }}" |
|||
mountOnEnter="{{ false }}" |
|||
safeArea="bottom" |
|||
bind:close="close" |
|||
bind:closed="onClosed" |
|||
> |
|||
<view class="wux-class {{ classes.wrap }}" wx:if="{{ shouldRender }}" style="background: #fff"> |
|||
<view class="{{ classes.hd }}"> |
|||
<view class="{{ classes.toolbar }}" wx:if="{{ title || cancelText || confirmText }}" catchtouchmove="noop"> |
|||
<view class="{{ classes.inner }}"> |
|||
<view class="{{ classes.cancel }}" hover-class="{{ classes.hover }}" bindtap="onCancel" wx:if="{{ cancelText }}">{{ cancelText }}</view> |
|||
<view class="{{ classes.title }}">{{ title }}</view> |
|||
<view class="{{ classes.confirm }}" hover-class="{{ classes.hover }}" bindtap="onConfirm" wx:if="{{ confirmText }}">{{ confirmText }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="{{ classes.bd }}"> |
|||
<wux-cascader-view |
|||
id="wux-cascader-view" |
|||
controlled="{{ controlled }}" |
|||
defaultValue="{{ innerValue }}" |
|||
value="{{ innerValue }}" |
|||
options="{{ options }}" |
|||
full="{{ full }}" |
|||
height="{{ height }}" |
|||
placeholder="{{ chooseTitle }}" |
|||
defaultFieldNames="{{ defaultFieldNames }}" |
|||
skipAnimation="{{ skipAnimation }}" |
|||
bind:change="onChange" |
|||
bind:load="onLoadOptions" |
|||
bind:tabsChange="onTabsChange" |
|||
/> |
|||
</view> |
|||
</view> |
|||
</wux-popup> |
@ -0,0 +1 @@ |
|||
.wux-cascader{width:100%;overflow:hidden;position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:28rpx;line-height:1.5;color:rgba(0,0,0,.85)}.wux-cascader__hd{position:relative;-ms-flex:none;flex:none;width:100%}.wux-cascader__hd::after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1PX;border-bottom:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 100%;transform:scaleY(.5)}.wux-cascader__bd{position:relative;-ms-flex:auto;flex:auto;width:100%;height:100%}.wux-cascader__toolbar{position:relative;width:100%;font-size:34rpx;line-height:1.5;color:rgba(0,0,0,.85);background-color:#f7f7f8}.wux-cascader__toolbar::before{content:" ";position:absolute;left:0;top:0;right:0;height:1PX;border-top:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 0;transform:scaleY(.5)}.wux-cascader__inner{height:88rpx;display:-ms-flexbox;display:flex;text-align:center}.wux-cascader__title{position:absolute;display:block;width:100%;padding:0;font-size:34rpx;font-weight:400;line-height:88rpx;color:rgba(0,0,0,.85);text-align:center;white-space:nowrap}.wux-cascader__button{position:absolute;box-sizing:border-box;height:88rpx;line-height:88rpx;padding:0 30rpx;z-index:10}.wux-cascader__button--cancel{left:0;color:#b2b2b2}.wux-cascader__button--confirm{right:0;color:#33cd5f}.wux-cascader__button--hover{background-color:#ececec} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames")),_styleToCssString=_interopRequireDefault(require("../helpers/styleToCssString"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,_baseComponent.default)({options:{multipleSlots:!1},relations:{"../cell/index":{type:"descendant",observer:function(){this.callDebounceFn(this.updateIsLastElement)}}},properties:{prefixCls:{type:String,value:"wux-cell-group"},title:{type:String,value:""},label:{type:String,value:""},mode:{type:String,value:"default"},bodyStyle:{type:[String,Object],value:"",observer:function(e){this.setData({internalBodyStyle:(0,_styleToCssString.default)(e)})}}},data:{internalBodyStyle:""},computed:{classes:["prefixCls, mode",function(e,t){return{wrap:(0,_classNames2.default)(e,_defineProperty({},"".concat(e,"--card"),"card"===t)),hd:"".concat(e,"__hd"),bd:"".concat(e,"__bd"),ft:"".concat(e,"__ft")}}]},methods:{updateIsLastElement:function(){var e=this.getRelationNodes("../cell/index");if(0<e.length){var n=e.length-1;e.forEach(function(e,t){e.updateIsLastElement(t===n)})}},getBoundingClientRect:function(t){var n=this,e=".".concat(this.data.prefixCls);wx.createSelectorQuery().in(this).select(e).boundingClientRect(function(e){e&&t.call(n,e.height)}).exec()}}}); |
@ -0,0 +1,3 @@ |
|||
{ |
|||
"component": true |
|||
} |
@ -0,0 +1,7 @@ |
|||
<view class="wux-class {{ classes.wrap }}"> |
|||
<view class="{{ classes.hd }}" wx:if="{{ title }}">{{ title }}</view> |
|||
<view class="{{ classes.bd }}" style="{{ internalBodyStyle }}"> |
|||
<slot></slot> |
|||
</view> |
|||
<view class="{{ classes.ft }}" wx:if="{{ label }}">{{ label }}</view> |
|||
</view> |
@ -0,0 +1 @@ |
|||
.wux-cell-group--card{margin:30rpx}.wux-cell-group__hd{padding:30rpx 30rpx 18rpx;font-size:28rpx;color:rgba(0,0,0,.45);width:100%;box-sizing:border-box}.wux-cell-group__bd{position:relative;background-color:#fff;overflow:hidden}.wux-cell-group__bd::after{content:" ";position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #d9d9d9;border-top-width:1PX;border-bottom-width:1PX}.wux-cell-group__ft{padding:18rpx 30rpx 30rpx;font-size:28rpx;color:rgba(0,0,0,.45)}.wux-cell-group--card .wux-cell-group__hd{padding-left:0;padding-right:0}.wux-cell-group--card .wux-cell-group__bd,.wux-cell-group--card .wux-cell-group__ft{border-radius:12rpx}.wux-cell-group--card .wux-cell-group__bd::after,.wux-cell-group--card .wux-cell-group__ft::after{display:none} |
@ -0,0 +1 @@ |
|||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames")),_styleToCssString=_interopRequireDefault(require("../helpers/styleToCssString")),_eventsMixin=_interopRequireDefault(require("../helpers/eventsMixin")),_withNativeRoutes=_interopRequireDefault(require("../helpers/withNativeRoutes"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var defaultEvents={onClick:function(){},onError:function(){}};(0,_baseComponent.default)({behaviors:[(0,_eventsMixin.default)({defaultEvents:defaultEvents})],relations:{"../cell-group/index":{type:"ancestor"},"../picker/index":{type:"parent"},"../date-picker/index":{type:"parent"},"../popup-select/index":{type:"parent"}},properties:{prefixCls:{type:String,value:"wux-cell"},disabled:{type:Boolean,value:!1},hoverClass:{type:String,value:"default"},hoverStopPropagation:{type:Boolean,value:!1},hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},lang:{type:String,value:"en"},sessionFrom:{type:String,value:""},sendMessageTitle:{type:String,value:""},sendMessagePath:{type:String,value:""},sendMessageImg:{type:String,value:""},showMessageCard:{type:Boolean,value:!1},appParameter:{type:String,value:""},thumb:{type:String,value:""},title:{type:String,value:""},label:{type:String,value:""},extra:{type:String,value:""},hasLine:{type:Boolean,value:!0},isLink:{type:Boolean,value:!1},openType:{type:String,value:"navigateTo"},url:{type:String,value:""},delta:{type:Number,value:1},wrapStyle:{type:[String,Object],value:"",observer:function(e){this.setData({extStyle:(0,_styleToCssString.default)(e)})}}},data:{isLast:!1,extStyle:""},computed:{classes:["prefixCls, hoverClass, isLast, hasLine, isLink, disabled",function(e,t,n,a,i,r){var s;return{wrap:(0,_classNames2.default)(e,(_defineProperty(s={},"".concat(e,"--last"),n),_defineProperty(s,"".concat(e,"--has-line"),a),_defineProperty(s,"".concat(e,"--access"),i),_defineProperty(s,"".concat(e,"--disabled"),r),s)),hd:"".concat(e,"__hd"),thumb:"".concat(e,"__thumb"),bd:"".concat(e,"__bd"),text:"".concat(e,"__text"),desc:"".concat(e,"__desc"),ft:"".concat(e,"__ft"),hover:t&&"default"!==t?t:"".concat(e,"--hover")}}]},methods:{onTap:function(){var e=this.data,t=e.disabled,n=e.url,a=e.isLink,i=e.openType,r=e.delta;t||(this.triggerEvent("click"),a&&n&&(0,_withNativeRoutes.default)({url:n,openType:i,delta:r},this))},bindgetuserinfo:function(e){this.triggerEvent("getuserinfo",e.detail)},bindcontact:function(e){this.triggerEvent("contact",e.detail)},bindgetphonenumber:function(e){this.triggerEvent("getphonenumber",e.detail)},bindopensetting:function(e){this.triggerEvent("opensetting",e.detail)},bindlaunchapp:function(e){this.triggerEvent("launchapp",e.detail)},bindchooseavatar:function(e){this.triggerEvent("chooseavatar",e.detail)},onError:function(e){this.triggerEvent("error",e.detail)},updateIsLastElement:function(e){e!==this.data.isLast&&this.setData({isLast:e})}}}); |
@ -0,0 +1,3 @@ |
|||
{ |
|||
"component": true |
|||
} |
@ -0,0 +1,45 @@ |
|||
<button |
|||
class="wux-class {{ classes.wrap }}" |
|||
disabled="{{ disabled }}" |
|||
open-type="{{ openType }}" |
|||
hover-class="{{ !disabled ? classes.hover : 'none' }}" |
|||
hover-stop-propagation="{{ hoverStopPropagation }}" |
|||
hover-start-time="{{ hoverStartTime }}" |
|||
hover-stay-time="{{ hoverStayTime }}" |
|||
lang="{{ lang }}" |
|||
bindgetuserinfo="bindgetuserinfo" |
|||
session-from="{{ sessionFrom }}" |
|||
send-message-title="{{ sendMessageTitle }}" |
|||
send-message-path="{{ sendMessagePath }}" |
|||
send-message-img="{{ sendMessageImg }}" |
|||
show-message-card="{{ showMessageCard }}" |
|||
bindcontact="bindcontact" |
|||
bindgetphonenumber="bindgetphonenumber" |
|||
app-parameter="{{ appParameter }}" |
|||
binderror="onError" |
|||
bindopensetting="bindopensetting" |
|||
bindlaunchapp="bindlaunchapp" |
|||
bindchooseavatar="bindchooseavatar" |
|||
bindtap="onTap" |
|||
style="{{ extStyle }}" |
|||
> |
|||
<view class="{{ classes.hd }}"> |
|||
<block wx:if="{{ thumb }}"> |
|||
<image class="{{ classes.thumb }}" src="{{ thumb }}" /> |
|||
</block> |
|||
<block wx:else> |
|||
<slot name="header"></slot> |
|||
</block> |
|||
</view> |
|||
<view class="{{ classes.bd }}"> |
|||
<view wx:if="{{ title }}" class="{{ classes.text }}">{{ title }}</view> |
|||
<view wx:if="{{ label }}" class="{{ classes.desc }}">{{ label }}</view> |
|||
<slot></slot> |
|||
</view> |
|||
<view class="{{ classes.ft }}"> |
|||
<block wx:if="{{ extra }}">{{ extra }}</block> |
|||
<block wx:else> |
|||
<slot name="footer"></slot> |
|||
</block> |
|||
</view> |
|||
</button> |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue