Browse Source

调整派单

dev
战立标 2 years ago
parent
commit
fe38ca49f6
  1. 7
      app.wxss
  2. 143
      components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.js
  3. 12
      components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.json
  4. 105
      components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.wxml
  5. 15
      components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.wxss
  6. 24
      components/DemandDispatchOrder/DemandDispatchOrder.wxml
  7. 18
      components/DemandDispatchOrder/DemandDispatchOrder.wxss
  8. 147
      components/DispatchOrder/DispatchOrder.js
  9. 15
      components/DispatchOrder/DispatchOrder.json
  10. 126
      components/DispatchOrder/DispatchOrder.wxml
  11. 18
      components/DispatchOrder/DispatchOrder.wxss
  12. 9
      components/ResourceScheduling/ResourceScheduling.js
  13. 320
      components/dist/cascader-view/index.js
  14. 5
      components/dist/cascader-view/index.json
  15. 0
      components/dist/cascader-view/index.wxml
  16. 0
      components/dist/cascader-view/index.wxss
  17. 2
      subpages/statistics/pages/demand/detail/detail.wxss
  18. 2
      subpages/statistics/pages/event/detail/detail.wxss
  19. 5
      utils/statisticsApi.js

7
app.wxss

@ -8,3 +8,10 @@
padding: 200rpx 0; padding: 200rpx 0;
box-sizing: border-box; box-sizing: border-box;
} }
page {
--calendar-range-edge-background-color: #3E92FF;
--calendar-range-middle-color: #81B5FB;
--button-danger-background-color: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%);
--button-danger-border-color: 'none';
--calendar-selected-day-background-color: #3E92FF;
}

143
components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.js

@ -1,14 +1,11 @@
import { import {
agencygridtree, agencygridtree, commonDemand,
dictlist, listServerOrg, userdemandAssign, dictlist, listServerOrg,
} from "../../utils/statisticsApi"; } from "../../utils/statisticsApi";
const App = getApp() const App = getApp()
const config = require('../../utils/config') const config = require('../../utils/config')
Component({ Component({
options: {
styleIsolation: 'shared',
},
properties: { properties: {
visible: { visible: {
type: Boolean, type: Boolean,
@ -30,16 +27,21 @@ Component({
form: { form: {
serviceType: "", serviceType: "",
serverId: "", serverId: "",
noticeApproches: [] noticeApproches: [],
serviceScopeList: []
}, },
serviceOptions: [], serviceOptions: [],
serviceIndex: -1, serviceIndex: -1,
serviceOptiondIndex: -1, serviceOptiondIndex: -1,
serviceOptiondList: [], serviceOptiondList: [],
visible2: false, visible2: false,
orgField: {label: 'agencyName', value: 'agencyId', children: 'subAgencyList'}, orgField: {text: 'agencyName', value: 'agencyId', children: 'subAgencyList'},
orgName: "", orgName: "",
orgOptions: [], orgOptions: [],
showService: false,
fieldValue: '',
cascaderValue: '',
showDate: false
}, },
ready: function () { ready: function () {
@ -59,56 +61,85 @@ Component({
}, },
methods: { 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() { getOrgTreeList() {
let params = { let params = {
agencyId: this.data.agencyId, agencyId: this.data.agencyId,
purpose: "query" purpose: "query"
} }
agencygridtree(params).then(res => { agencygridtree(params).then(res => {
let org = this.deleteChildren(res.data.subAgencyList)
this.setData({ this.setData({
orgOptions: res.data.subAgencyList orgOptions: org
}) })
}) })
}, },
onChange1(e) { noticeApprochesChange(e) {
console.log(e)
let noticeApproches = this.data.form.noticeApproches
let index = noticeApproches.indexOf(e.detail.value)
if (index === -1) {
noticeApproches.push(e.detail.value)
} else {
noticeApproches.splice(index, 1)
}
this.setData({ this.setData({
"form.noticeApproches": noticeApproches "form.noticeApproches": e.detail
}) })
console.log(noticeApproches)
}, },
close() { onShowDate() {
this.triggerEvent('close') this.setData({showDate: true});
}, },
sure() { onCloseDate() {
userdemandAssign({ this.setData({showDate: false});
...this.data.form, },
demandRecId: this.data.detail.demandRecId formatDate(date) {
}).then(res => { date = new Date(date);
wx.showToast({ return `${date.getFullYear()}-${date.getMonth() + 1 > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)}-${date.getDate() > 10 ? date.getDate() : '0' + date.getDate()}`;
icon: 'success',
title: '操作成功'
})
this.close()
})
}, },
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) { serviceOptiondListChange(e) {
this.setData({ this.setData({
serviceOptiondIndex: e.detail.value, serviceOptiondIndex: e.detail.value,
"form.serverId": this.data.serviceOptiondList[e.detail.value].id "form.serverOrgId": this.data.serviceOptiondList[e.detail.value].id
}) })
}, },
getServiceuserList(e) { getServiceuserList(e) {
this.setData({ this.setData({
serviceIndex: e.detail.value, serviceIndex: e.detail.value,
"form.serviceType": this.data.serviceOptions[e.detail.value].value "form.serverOrgType": this.data.serviceOptions[e.detail.value].value
}) })
let params = { let params = {
serviceTypeId: this.data.detail.categoryCode[1],//上级ID serviceTypeId: this.data.detail.categoryCode[1],//上级ID
@ -123,27 +154,35 @@ Component({
}) })
}) })
}, },
onOpen2() { deleteChildren(node) {
this.setData({visible2: true}) node.forEach(item => {
}, if ('subAgencyList' in item && !item.subAgencyList) {
onClose2() { delete item.subAgencyList
this.setData({visible2: false}) } else if ('subAgencyList' in item && item.subAgencyList.length) {
console.log('onClose2') this.deleteChildren(item.subAgencyList)
}
})
return node
}, },
onConfirm2(e) {
let data = e.detail
console.log('onConfirm2', e.detail)
let params = data.cols[data.cols.length - 1][data.selectedIndex[data.selectedIndex.length - 1]] close() {
this.setData({ this.triggerEvent('close')
"form.deptId": params.agencyId, },
"form.deptName": params.agencyName, sure() {
"form.orgType": params.level commonDemand({
...this.data.detail,
assignFlag: 1,
assignInfo: {
...this.data.form,
}
// demandRecId: this.data.detail.demandRecId
}).then(res => {
wx.showToast({
icon: 'success',
title: '操作成功'
})
this.close()
}) })
this.setData({orgName: data.displayValue.join('-')})
}, },
change1(e) {
console.log(e)
}
} }
}); });

12
components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.json

@ -1,10 +1,12 @@
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"wux-popup": "../dist/popup/index", "van-cascader": "@vant/weapp/cascader/index",
"wux-checkbox-group": "../dist/checkbox-group/index", "van-popup": "@vant/weapp/popup/index",
"wux-checkbox": "../dist/checkbox/index", "van-field": "@vant/weapp/field/index",
"wux-calendar": "../dist/calendar/index", "van-checkbox": "@vant/weapp/checkbox/index",
"wux-cascader": "../dist/cascader/index" "van-checkbox-group": "@vant/weapp/checkbox-group/index",
"van-calendar": "@vant/weapp/calendar/index",
"van-icon": "@vant/weapp/icon/index"
} }
} }

105
components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.wxml

@ -1,4 +1,4 @@
<wux-popup position="bottom" visible="{{ visible }}" bind:close="close" closable> <van-popup position="bottom" show="{{ visible }}" bind:close="close" closable>
<view class="popup-container"> <view class="popup-container">
<view class="title">需求派单</view> <view class="title">需求派单</view>
<scroll-view scroll-y class="popup-content2"> <scroll-view scroll-y class="popup-content2">
@ -19,47 +19,54 @@
</view> </view>
</view> </view>
<view class="card"> <view class="card">
<view class="items"> <picker range="{{serviceOptions}}" range-key="label" bind:change="getServiceuserList">
<view class="label">服务方类型:</view> <view class="items">
<view class="value"> <view class="label label-width">服务方类型:</view>
<picker range="{{serviceOptions}}" range-key="label" bind:change="getServiceuserList"> <view class="value text-right flex {{serviceIndex >= 0 ? '' : 'gray'}}">
{{serviceIndex >= 0 ? serviceOptions[serviceIndex].label : '请选择服务方类型'}} {{serviceIndex >= 0 ? serviceOptions[serviceIndex].label : '请选择'}}
</picker> <van-icon name="arrow"/>
</view>
</view> </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="items">
<view class="label">服务方:</view> <view class="label label-width">通知服务方:</view>
<view class="value"> <view class="value">
<picker range="{{serviceOptiondList}}" bind:change="serviceOptiondListChange" range-key="label" > <van-checkbox-group value="{{ form.noticeApproches }}"
{{serviceOptiondIndex >= 0 ? serviceOptiondList[serviceOptiondIndex].label : '请选择服务方'}} bind:change="noticeApprochesChange">
</picker> <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> </view>
<view class="checkbox"> <view class="items" bind:tap="onShowService">
<!-- <view class="label">自动通知服务方:</view>--> <view class="label label-width">服务范围:</view>
<view class="value"> <view class="value text-right flex {{fieldValue ? '' : 'gray'}}">
<wux-checkbox-group {{fieldValue ? fieldValue : '请选择'}}
name="noticeApproches" <van-icon name="arrow"/>
value="{{ form.noticeApproches }}" </view>
title="自动通知服务方:"
bind:change="onChange1"
>
<wux-checkbox color="positive" title="短信通知" value="1" />
<wux-checkbox color="positive" title="微信公众号通知" value="2" />
</wux-checkbox-group>
</view>
</view> </view>
<view class="items"> <view class="items" bind:tap="onShowDate">
<view class="label">服务范围:</view> <view class="label label-width">服务时间:</view>
<view class="value" bind:tap="onOpen2"> <view class="value text-right flex {{date ? '' : 'gray'}}">
{{orgName?orgName:'请选择'}} {{date ? date : '请选择'}}
<!-- <wux-cascader-picker-view <van-icon name="arrow"/>
value="{{ value2 }}"
options="{{ orgOptions }}"
bind:valueChange="onValueChange2"
/>-->
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -68,16 +75,24 @@
<view class="btn btn-blue" bind:tap="sure">确定</view> <view class="btn btn-blue" bind:tap="sure">确定</view>
</view> </view>
</view> </view>
</wux-popup>
<wux-cascader
visible="{{ visible2 }}"
default-value="{{ value2 }}"
title="处理部门"
options="{{ orgOptions }}"
bind:change="change1"
bind:close="onClose2"
bind:confirm="onConfirm2"
defaultFieldNames="{{orgField}}"
/>
<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>

15
components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.wxss

@ -58,7 +58,9 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.label-width {
min-width: 160rpx;
}
.items .value { .items .value {
width: calc(100% - 160rpx); width: calc(100% - 160rpx);
overflow: hidden; overflow: hidden;
@ -129,3 +131,14 @@
.checkbox { .checkbox {
text-align: left; text-align: left;
} }
.gray {
color: #999;
}
.text-right {
text-align: right;
}
.flex {
display: flex!important;
justify-content: flex-end;
align-items: center;
}

24
components/DemandDispatchOrder/DemandDispatchOrder.wxml

@ -23,22 +23,22 @@
</view> </view>
</view> </view>
<view class="card"> <view class="card">
<view class="items"> <picker range="{{serviceOptions}}" range-key="label" bind:change="getServiceuserList">
<view class="label">服务方类型:</view> <view class="items">
<view class="value"> <view class="label label-width">服务方类型:</view>
<picker range="{{serviceOptions}}" range-key="label" bind:change="getServiceuserList"> <view class="value flex {{serviceIndex >= 0 ? '' : 'gray'}}">
{{serviceIndex >= 0 ? serviceOptions[serviceIndex].label : '请选择服务方类型'}} {{serviceIndex >= 0 ? serviceOptions[serviceIndex].label : '请选择服务方类型'}}
</picker> </view>
</view> </view>
</view> </picker>
<view class="items"> <picker range="{{serviceOptiondList}}" bind:change="serviceOptiondListChange" range-key="label">
<view class="label">服务方:</view> <view class="items">
<view class="value"> <view class="label label-width">服务方:</view>
<picker range="{{serviceOptiondList}}" bind:change="serviceOptiondListChange" range-key="label" > <view class="value flex {{serviceOptiondIndex >= 0 ? '' : 'gray'}}">
{{serviceOptiondIndex >= 0 ? serviceOptiondList[serviceOptiondIndex].label : '请选择服务方'}} {{serviceOptiondIndex >= 0 ? serviceOptiondList[serviceOptiondIndex].label : '请选择服务方'}}
</picker> </view>
</view> </view>
</view> </picker>
</view> </view>
</scroll-view> </scroll-view>

18
components/DemandDispatchOrder/DemandDispatchOrder.wxss

@ -119,3 +119,21 @@
.btn-gray { .btn-gray {
background: #D9D9D9; 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;
}

147
components/DispatchOrder/DispatchOrder.js

@ -33,11 +33,7 @@ Component({
fileList: [], fileList: [],
timeLimit: [], timeLimit: [],
header: { operationType: ["5"],
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
form: { form: {
operationType: "5", //处理方式[0:已回复 5、指派 6、完成并回复] operationType: "5", //处理方式[0:已回复 5、指派 6、完成并回复]
content: "",//转办意见 content: "",//转办意见
@ -54,8 +50,8 @@ Component({
visible1: false, visible1: false,
visible2: false, visible2: false,
catField: {label: 'categoryName', value: 'id', children: 'children'}, catField: {text: 'categoryName', value: 'id', children: 'children'},
orgField: {label: 'agencyName', value: 'agencyId', children: 'subAgencyList'}, orgField: {text: 'agencyName', value: 'agencyId', children: 'subAgencyList'},
orgName: "", orgName: "",
category: "" category: ""
}, },
@ -63,6 +59,13 @@ Component({
}, },
methods: { methods: {
operationTypeChange(e) {
console.log(e.detail)
this.setData({
operationType: e.detail,
"form.operationType": e.detail[0]
})
},
onOpen1() { onOpen1() {
this.setData({visible1: true}) this.setData({visible1: true})
}, },
@ -73,12 +76,13 @@ Component({
onConfirm1(e) { onConfirm1(e) {
console.log('onConfirm1', e.detail) console.log('onConfirm1', e.detail)
let data = e.detail let data = e.detail
let params = data.cols[data.cols.length - 1][data.selectedIndex[data.selectedIndex.length - 1]] let params = data.selectedOptions[data.selectedOptions.length - 1]
this.setData({ this.setData({
"form.categoryId": params.id, "form.categoryId": params.id,
"form.categoryList": {...params, children: null} "form.categoryList": {...params, children: null},
visible1: false
}) })
this.setData({category: data.displayValue.join('-')}) this.setData({category: data.selectedOptions.map(item => item.categoryName).join('/')})
}, },
setContent(e) { setContent(e) {
console.log(e, 'eee') console.log(e, 'eee')
@ -95,15 +99,15 @@ Component({
}, },
onConfirm2(e) { onConfirm2(e) {
let data = e.detail let data = e.detail
console.log('onConfirm2', e.detail)
let params = data.cols[data.cols.length - 1][data.selectedIndex[data.selectedIndex.length - 1]] let params = data.selectedOptions[data.selectedOptions.length - 1]
this.setData({ this.setData({
"form.deptId": params.agencyId, "form.deptId": params.agencyId,
"form.deptName": params.agencyName, "form.deptName": params.agencyName,
"form.orgType": params.level "form.orgType": params.level,
visible2: false
}) })
this.setData({orgName: data.displayValue.join('-')}) this.setData({orgName: data.selectedOptions.map(item => item.agencyName).join('/')})
}, },
@ -134,7 +138,7 @@ Component({
} }
agencygridtree(params).then(res => { agencygridtree(params).then(res => {
this.setData({ this.setData({
orgOptions: res.data.subAgencyList orgOptions: this.deleteChildren(res.data.subAgencyList, 'subAgencyList')
}) })
}) })
}, },
@ -153,94 +157,89 @@ Component({
}); });
} }
}, },
getCategoryList() { getCategoryList() {
let params = {}; let params = {};
getCategoryTree(params).then(res => { getCategoryTree(params).then(res => {
let treeDataNew = this.deepTree(res.data, "children"); let treeDataNew = this.deepTree(res.data, "children");
console.log(treeDataNew, 'treeDataNew') console.log(treeDataNew, 'treeDataNew')
this.setData({ this.setData({
casOptions: treeDataNew 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() { close() {
this.triggerEvent('close') this.triggerEvent('close')
}, },
openCalendar1() { openCalendar1() {
this.setData({
this.selectComponent('#wux-calendar').open({ showDate: true
// $wuxCalendar('#wux-calendar1').open({
value: this.data.value1,
onChange: (values, displayValues) => {
console.log('onChange', values, displayValues)
this.setData({
value1: displayValues,
})
},
}) })
}, },
onChange(e) { onCloseDate() {
console.log('onChange', e) this.setData({showDate: false});
const {file, fileList} = e.detail
if (file.status === 'uploading') {
this.setData({
progress: 0,
})
wx.showLoading()
} else if (file.status === 'done') {
this.setData({
imageUrl: file.url,
})
}
// Controlled state should set fileList
this.setData({fileList})
},
onSuccess(e) {
console.log('onSuccess', e)
},
onFail(e) {
console.log('onFail', e)
}, },
onComplete(e) { formatDate(date) {
console.log('onComplete', e) date = new Date(date);
wx.hideLoading() return `${date.getFullYear()}-${date.getMonth() + 1 > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)}-${date.getDate() > 10 ? date.getDate() : '0' + date.getDate()}`;
}, },
onProgress(e) { onConfirmDate(event) {
console.log('onProgress', e) console.log(event)
const date = event.detail;
this.setData({ this.setData({
progress: e.detail.file.progress, showDate: false,
}) "form.timeLimit": `${this.formatDate(date)} 00:00:00`,
});
}, },
onPreview(e) {
console.log('onPreview', e) afterRead(event) {
const {file, fileList} = e.detail const {file} = event.detail;
wx.previewImage({ // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
current: file.url, wx.uploadFile({
urls: fileList.map((n) => n.url), url: `${config.BASEURL()}oss/file/uploadvariedfile`,
}) name: 'file',
}, header: {
onRemove(e) { 'Content-type': 'application/json;charset=UTF-8',
const {file, fileList} = e.detail 'Authorization': wx.getStorageSync('token')
wx.showModal({ },
content: '确定删除?', filePath: file.url,
success: (res) => { success: (res) => {
if (res.confirm) { let data = JSON.parse(res.data)
this.setData({ const fileList = this.data.fileList;
fileList: fileList.filter((n) => n.uid !== file.uid), 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() { sure() {
let params = { let params = {
...this.data.form, ...this.data.form,
files: this.data.fileList, files: this.data.fileList,
icEventId: this.data.id, icEventId: this.data.id,
status: "processing", status: "processing",
timeLimit: this.data.value1 && this.data.value1.length ? this.data.value1[0] : "" // timeLimit: this.data.value1 && this.data.value1.length ? this.data.value1[0] : ""
} }
icEventOldReply(params).then(res => { icEventOldReply(params).then(res => {
wx.showToast({ wx.showToast({

15
components/DispatchOrder/DispatchOrder.json

@ -1,12 +1,13 @@
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"wux-popup": "../dist/popup/index", "van-cascader": "@vant/weapp/cascader/index",
"wux-selectable": "../dist/selectable/index", "van-popup": "@vant/weapp/popup/index",
"wux-textarea": "../dist/textarea/index", "van-field": "@vant/weapp/field/index",
"wux-upload": "../dist/upload/index", "van-radio": "@vant/weapp/checkbox/index",
"wux-cell": "../dist/cell/index", "van-radio-group": "@vant/weapp/checkbox-group/index",
"wux-calendar": "../dist/calendar/index", "van-calendar": "@vant/weapp/calendar/index",
"wux-cascader": "../dist/cascader/index" "van-icon": "@vant/weapp/icon/index",
"van-uploader": "@vant/weapp/uploader/index"
} }
} }

126
components/DispatchOrder/DispatchOrder.wxml

@ -1,4 +1,4 @@
<wux-popup position="bottom" visible="{{ visible }}" bind:close="close" closable> <van-popup position="bottom" show="{{ visible }}" round bind:close="close" closable>
<view class="popup-container"> <view class="popup-container">
<view class="title">事件派单</view> <view class="title">事件派单</view>
<scroll-view scroll-y class="popup-content"> <scroll-view scroll-y class="popup-content">
@ -21,41 +21,43 @@
{{detail.eventContent}} {{detail.eventContent}}
</view> </view>
</view> </view>
<view class="items"> <view class="items">
<view class="label">处理方式:</view> <view class="label">处理方式:</view>
<view class="value"> <view class="value">
<wux-selectable color="positive" value="5" name="processingMethod" defaultChecked>指派 <van-radio-group value="{{ operationType }}"
</wux-selectable> bind:change="operationTypeChange">
<!-- <wux-selectable style="margin-left: 10rpx" color="positive" value="" name="processingMethod"> <view class="flex">
转服务 <van-radio name="5">指派</van-radio>
</wux-selectable>--> <view style="width: 40rpx"></view>
<!-- <van-radio name="">转服务</van-radio>-->
</view>
</van-radio-group>
</view> </view>
</view> </view>
<view class="items"> <view class="items" bind:tap="onOpen1">
<view class="label">事件分类:</view> <view class="label label-width">事件分类:</view>
<view class="value" bind:tap="onOpen1"> <view class="value flex {{category?'':'gray'}}">
{{category?category:'请选择'}} {{category ? category : '请选择'}}
<van-icon name="arrow" />
</view> </view>
</view> </view>
<view class="items"> <view class="items" bind:tap="onOpen2">
<view class="label">处理部门:</view> <view class="label label-width">处理部门:</view>
<view class="value" bind:tap="onOpen2"> <view class="value flex {{orgName?'':'gray'}}">
{{orgName?orgName:'请选择'}} {{orgName ? orgName : '请选择'}}
<!-- <wux-cascader-picker-view <van-icon name="arrow" />
value="{{ value2 }}"
options="{{ orgOptions }}"
bind:valueChange="onValueChange2"
/>-->
</view> </view>
</view> </view>
<view class="items"> <view class="items">
<view class="label">转办意见:</view> <view class="label">转办意见:</view>
<view class="value">
</view>
</view> </view>
<view class="items"> <view class="items">
<textarea class="textarea" model:value="{{form.content}}" bind:input="setContent" placeholder-class="textarea-placeholder" placeholder="请填写转办意见。"/> <textarea class="textarea" model:value="{{form.content}}" bind:input="setContent"
placeholder-class="textarea-placeholder" placeholder="请填写转办意见。"/>
</view> </view>
</view> </view>
<view class="card"> <view class="card">
@ -63,29 +65,18 @@
<view class="label">图片/附件:</view> <view class="label">图片/附件:</view>
</view> </view>
<view class="items"> <view class="items">
<wux-upload <van-uploader file-list="{{ fileList }}" bind:delete="deleteFile" max-count="4" bind:after-read="afterRead" />
listType="picture-card"
defaultFileList="{{ fileList }}"
max="4"
url="{{url}}"
header="{{header }}"
bind:change="onChange"
bind:success="onSuccess"
bind:fail="onFail"
bind:complete="onComplete"
bind:preview="onPreview"
>
<text>+</text>
</wux-upload>
</view> </view>
</view> </view>
<view class="card"> <view class="card">
<wux-cell <view class="items" bind:tap="openCalendar1">
title="办结时限" <view class="label label-width">办结时限:</view>
extra="{{ value1 }}" <view class="value flex {{form.timeLimit?'':'gray'}}">
is-link {{form.timeLimit ? form.timeLimit : '请选择'}}
bind:click="openCalendar1" <van-icon name="arrow" />
></wux-cell> </view>
</view>
</view> </view>
</scroll-view> </scroll-view>
@ -94,26 +85,33 @@
<view class="btn btn-blue" bind:tap="sure">确定</view> <view class="btn btn-blue" bind:tap="sure">确定</view>
</view> </view>
</view> </view>
</wux-popup> </van-popup>
<wux-calendar id="wux-calendar" /> <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>
<wux-cascader <van-calendar
visible="{{ visible1 }}" show="{{ showDate }}"
default-value="{{ value1 }}" bind:close="onCloseDate"
title="事件分类" bind:confirm="onConfirmDate"
options="{{ casOptions }}"
bind:close="onClose1"
bind:change="onChange1"
bind:confirm="onConfirm1"
defaultFieldNames="{{catField}}"
/>
<wux-cascader
visible="{{ visible2 }}"
default-value="{{ value2 }}"
title="处理部门"
options="{{ orgOptions }}"
bind:close="onClose2"
bind:change="onChange2"
bind:confirm="onConfirm2"
defaultFieldNames="{{orgField}}"
/> />

18
components/DispatchOrder/DispatchOrder.wxss

@ -119,3 +119,21 @@
.btn-gray { .btn-gray {
background: #D9D9D9; 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;
}

9
components/ResourceScheduling/ResourceScheduling.js

@ -14,14 +14,6 @@ Component({
type: Boolean, type: Boolean,
value: false value: false
}, },
agencyId: {
type: String,
value: '',
observer: function (val) {
this.typeChange()
this.getList()
}
},
}, },
data: { data: {
options: [ options: [
@ -72,7 +64,6 @@ Component({
}, },
ready: function () { ready: function () {
this.typeChange() this.typeChange()
console.log(App.globalData.user.agencyId)
this.getList(); this.getList();
}, },
methods: { methods: {

320
components/dist/cascader-view/index.js

@ -1,320 +0,0 @@
import baseComponent from '../helpers/baseComponent'
import classNames from '../helpers/classNames'
import styleToCssString from '../helpers/styleToCssString'
import arrayTreeFilter from '../helpers/arrayTreeFilter'
const WUX_CASCADER_VIEW = 'wux-cascader-view'
const defaultFieldNames = {
label: 'label',
value: 'value',
children: 'children',
disabled: 'disabled',
}
baseComponent({
externalClasses: ['wux-scroll-view-class'],
properties: {
prefixCls: {
type: String,
value: 'wux-cascader-view',
},
defaultValue: {
type: Array,
value: [],
},
value: {
type: Array,
value: [],
},
controlled: {
type: Boolean,
value: false,
},
options: {
type: Array,
value: [],
},
full: {
type: Boolean,
value: false,
},
placeholder: {
type: String,
value: '请选择',
},
height: {
type: [String, Number],
value: 'auto',
},
defaultFieldNames: {
type: Object,
value: defaultFieldNames,
},
skipAnimation: {
type: Boolean,
value: false,
},
},
data: {
activeOptions: [],
activeIndex: 0,
bodyStyle: '',
activeValue: [],
showOptions: [],
fieldNames: undefined,
scrollViewStyle: '',
},
computed: {
classes: ['prefixCls, full', function(prefixCls, full) {
const wrap = classNames(prefixCls)
const hd = `${prefixCls}__hd`
const bd = `${prefixCls}__bd`
const innerScroll = classNames(`${prefixCls}__inner-scroll`, {
[`${prefixCls}__inner-scroll--full`]: full,
})
const scrollView = `${prefixCls}__scroll-view`
const ft = `${prefixCls}__ft`
return {
wrap,
hd,
bd,
innerScroll,
scrollView,
ft,
}
}],
},
observers: {
value(newVal) {
if (this.data.controlled) {
this.setData({ activeValue: newVal })
this.getCurrentOptions(newVal)
}
},
options() {
this.getCurrentOptions(this.data.activeValue)
},
height(newVal) {
this.updateStyle(newVal)
},
},
methods: {
getActiveOptions(activeValue) {
const { options } = this.data
const value = this.getFieldName('value')
const childrenKeyName = this.getFieldName('children')
return arrayTreeFilter(options, (option, level) => option[value] === activeValue[level], { childrenKeyName })
},
getShowOptions(activeValue) {
const { options } = this.data
const children = this.getFieldName('children')
const result = this.getActiveOptions(activeValue).map((activeOption) => activeOption[children]).filter((activeOption) => !!activeOption)
return [options, ...result]
},
getMenus(activeValue = [], hasChildren) {
const { placeholder } = this.data
const activeOptions = this.getActiveOptions(activeValue)
if (hasChildren) {
const value = this.getFieldName('value')
const label = this.getFieldName('label')
activeOptions.push({
[value]: WUX_CASCADER_VIEW,
[label]: placeholder,
})
}
return activeOptions
},
getNextActiveValue(value, optionIndex) {
let { activeValue } = this.data
activeValue = activeValue.slice(0, optionIndex + 1)
activeValue[optionIndex] = value
return activeValue
},
updated(currentOptions, optionIndex, condition, callback) {
const value = this.getFieldName('value')
const children = this.getFieldName('children')
const hasChildren = currentOptions && currentOptions[children] && currentOptions[children].length > 0
const activeValue = this.getNextActiveValue(currentOptions[value], optionIndex)
const activeOptions = this.getMenus(activeValue, hasChildren)
const activeIndex = activeOptions.length - 1
const showOptions = this.getShowOptions(activeValue)
const props = {
activeValue,
activeOptions,
activeIndex,
showOptions,
}
// 判断 hasChildren 计算需要更新的数据
if (hasChildren || (activeValue.length === showOptions.length && (optionIndex = Math.max(0, optionIndex - 1)))) {
props.bodyStyle = this.getTransform(optionIndex + 1)
props.showOptions = showOptions
}
// 判断是否需要 setData 更新数据
if (condition) {
this.setCascaderView(props)
}
// 回调函数
if (typeof callback === 'function') {
callback.call(this, currentOptions, activeValue)
}
},
/**
* 更新级联数据
* @param {Array} activeValue 当前选中值
*/
getCurrentOptions(activeValue = this.data.activeValue) {
const optionIndex = Math.max(0, activeValue.length - 1)
const activeOptions = this.getActiveOptions(activeValue)
const currentOptions = activeOptions[optionIndex]
if (currentOptions) {
this.updated(currentOptions, optionIndex, true)
} else {
const value = this.getFieldName('value')
const label = this.getFieldName('label')
activeOptions.push({
[value]: WUX_CASCADER_VIEW,
[label]: this.data.placeholder,
})
const showOptions = this.getShowOptions(activeValue)
const activeIndex = activeOptions.length - 1
const props = {
showOptions,
activeOptions,
activeIndex,
bodyStyle: '',
}
this.setCascaderView(props)
}
},
setCascaderView(props) {
const { activeOptions, ...restProps } = props
this.setData({ activeOptions }, () => {
if (this.data.activeIndex !== restProps.activeIndex) {
this.triggerEvent('tabsChange', { index: restProps.activeIndex })
}
this.setData(restProps)
})
},
getTransform(index, animating = !this.data.skipAnimation) {
const pt = this.data.full ? 2 : 1
const i = this.data.full ? index : index - 1
const bodyStyle = styleToCssString({
transition: animating ? 'transform .3s' : 'none',
transform: `translate(${-50 * pt * Math.max(0, i)}%)`,
})
return bodyStyle
},
/**
* 点击菜单时的回调函数
*/
onTabsChange(e) {
const activeIndex = parseInt(e.detail.key)
const bodyStyle = this.getTransform(activeIndex)
if (
this.data.bodyStyle !== bodyStyle ||
this.data.activeIndex !== activeIndex
) {
this.setData({
bodyStyle,
activeIndex,
})
this.triggerEvent('tabsChange', { index: activeIndex })
}
},
/**
* 点击选项时的回调函数
*/
onItemSelect(e) {
const { optionIndex } = e.currentTarget.dataset
const { index } = e.detail
const { showOptions } = this.data
const item = showOptions[optionIndex][index]
// updated
this.updated(item, optionIndex, !this.data.controlled, this.onChange)
},
/**
* 选择完成时的回调函数
*/
onChange(currentOptions = {}, activeValue = []) {
const values = this.getValue(activeValue)
// 判断是否异步加载
if (currentOptions && currentOptions.isLeaf === false && !currentOptions.children) {
this.triggerEvent('change', { ...values })
this.triggerEvent('load', { value: values.value, options: values.options })
return
}
// 正常加载
this.triggerEvent('change', { ...values })
},
getValue(activeValue = this.data.activeValue) {
const optionIndex = Math.max(0, activeValue.length - 1)
const activeOptions = this.getActiveOptions(activeValue)
const currentOptions = activeOptions[optionIndex]
const valueKeyName = this.getFieldName('value')
const childrenKeyName = this.getFieldName('children')
const hasChildren = currentOptions && currentOptions[childrenKeyName] && currentOptions[childrenKeyName].length > 0
const options = activeOptions.filter((n) => n[valueKeyName] !== WUX_CASCADER_VIEW)
const value = options.map((n) => n[valueKeyName])
if (currentOptions && currentOptions.isLeaf === false && !currentOptions.children) {
return {
value,
options,
done: false,
}
}
return {
value,
options,
done: !hasChildren,
}
},
getFieldName(name) {
const { defaultFieldNames, fieldNames } = this.data
return typeof fieldNames !== 'undefined'
? fieldNames[name]
: defaultFieldNames[name]
},
updateStyle(height) {
const scrollViewStyle = styleToCssString({
height,
minHeight: height,
})
if (this.data.scrollViewStyle !== scrollViewStyle) {
this.setData({
scrollViewStyle,
})
}
},
},
attached() {
const { defaultValue, value, controlled, height } = this.data
const activeValue = controlled ? value : defaultValue
const fieldNames = Object.assign({}, defaultFieldNames, this.data.defaultFieldNames)
this.setData({ activeValue, fieldNames })
this.getCurrentOptions(activeValue)
this.updateStyle(height)
},
})

5
components/dist/cascader-view/index.json

@ -1,5 +0,0 @@
{
"component": true,
"usingComponents": {
}
}

0
components/dist/cascader-view/index.wxml

0
components/dist/cascader-view/index.wxss

2
subpages/statistics/pages/demand/detail/detail.wxss

@ -173,7 +173,7 @@ page {
width: 100%; width: 100%;
left: 0; left: 0;
box-sizing: border-box; box-sizing: border-box;
z-index: 999; z-index: 10;
} }
.btn { .btn {
width: 240rpx; width: 240rpx;

2
subpages/statistics/pages/event/detail/detail.wxss

@ -159,7 +159,7 @@ page {
width: 100%; width: 100%;
left: 0; left: 0;
box-sizing: border-box; box-sizing: border-box;
z-index: 999; z-index: 10;
} }
.btn { .btn {
width: 240rpx; width: 240rpx;

5
utils/statisticsApi.js

@ -240,6 +240,11 @@ export function userdemandAssign(params) {
return request.post('governance/userdemand/assign',params) return request.post('governance/userdemand/assign',params)
} }
// 共性需求派单
export function commonDemand(params) {
return request.post('governance/commonDemand/update',params)
}
// 获取服务方 // 获取服务方
export function listServerOrg(params) { export function listServerOrg(params) {
return request.post('actual/base/serviceitem/listServerOrg',params) return request.post('actual/base/serviceitem/listServerOrg',params)

Loading…
Cancel
Save