Browse Source

修改bug,新增vant插件

dev
战立标 2 years ago
parent
commit
2a6a382b4e
  1. 55
      app.js
  2. 1
      app.json
  3. 72
      components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.js
  4. 6
      components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.json
  5. 41
      components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.wxml
  6. 14
      components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.wxss
  7. 8
      components/DemandDispatchOrder/DemandDispatchOrder.json
  8. 22
      components/DemandDispatchOrder/DemandDispatchOrder.wxml
  9. 1
      components/ResourceScheduling/ResourceScheduling.js
  10. 113
      components/custom-tab-bar/index.js
  11. 2
      components/custom-tab-bar/index.wxml
  12. 320
      components/dist/cascader-view/index.js
  13. 5
      components/dist/cascader-view/index.json
  14. 0
      components/dist/cascader-view/index.wxml
  15. 0
      components/dist/cascader-view/index.wxss
  16. 2
      pages/work/work.wxml
  17. 2
      pages/work/work.wxss
  18. 12
      project.config.json
  19. 2
      subpages/searchResult/pages/punchCard/punchCard.wxml
  20. 25
      subpages/statistics/pages/demand/detail/detail.js
  21. 1
      subpages/statistics/pages/demand/detail/detail.json
  22. 27
      subpages/statistics/pages/demand/detail/detail.wxml
  23. 2
      subpages/statistics/pages/event/list/list.js
  24. 2
      subpages/statistics/pages/event/list/list.wxml
  25. 7
      utils/statisticsApi.js

55
app.js

@ -1,36 +1,51 @@
// app.js
import {getStaffbasicinfo} from "./utils/api";
import {getOwnedRolesOfStaffId} from "./utils/statisticsApi";
App({
onLaunch: function (options) {
//获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度)
//这个最初我是在组件中获取,但是出现了一个问题,当第一次进入小程序时导航栏会把
//页面内容盖住一部分,当打开调试重新进入时就没有问题,这个问题弄得我是莫名其妙
//虽然最后解决了,但是花费了不少时间
let code = [1011,1017,1025,1047,1124,1001,1038,1041,1089,1090,1104,1131,1187];
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 = 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
}
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()
},
globalData: {
userInfo: null,
selected:0,
deviceInfo: {
statusHeight: 19,
navigationHeight: 40
},
user:{},
share:false,
questionnaireUrl:''
}
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: []
}
})

1
app.json

@ -158,6 +158,5 @@
"provider": "wx4418e3e031e551be"
}
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}

72
components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.js

@ -1,9 +1,14 @@
import {
agencygridtree,
dictlist, listServerOrg, userdemandAssign,
} from "../../utils/statisticsApi";
const App = getApp()
const config = require('../../utils/config')
Component({
options: {
styleIsolation: 'shared',
},
properties: {
visible: {
type: Boolean,
@ -25,27 +30,60 @@ Component({
form: {
serviceType: "",
serverId: "",
noticeApproches: []
},
serviceOptions: [],
serviceIndex: -1,
serviceOptiondIndex: -1,
serviceOptiondList: [],
visible2: false,
orgField: {label: 'agencyName', value: 'agencyId', children: 'subAgencyList'},
orgName: "",
orgOptions: [],
},
ready: function () {
dictlist({
dictType: "user_demand_service_type",
}).then((res) => {
this.setData({
serviceOptions: res.data
})
})
.then((res) => {
this.setData({
serviceOptions: res.data
})
if (!this.agencyId) {
this.setData({
agencyId: App.globalData.user.agencyId
})
}
this.getOrgTreeList()
},
methods: {
getOrgTreeList() {
let params = {
agencyId: this.data.agencyId,
purpose: "query"
}
agencygridtree(params).then(res => {
this.setData({
orgOptions: res.data.subAgencyList
})
})
},
onChange1(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({
"form.noticeApproches": noticeApproches
})
console.log(noticeApproches)
},
close() {
this.triggerEvent('close')
},
@ -85,5 +123,27 @@ Component({
})
})
},
onOpen2() {
this.setData({visible2: true})
},
onClose2() {
this.setData({visible2: false})
console.log('onClose2')
},
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]]
this.setData({
"form.deptId": params.agencyId,
"form.deptName": params.agencyName,
"form.orgType": params.level
})
this.setData({orgName: data.displayValue.join('-')})
},
change1(e) {
console.log(e)
}
}
});

6
components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.json

@ -2,10 +2,8 @@
"component": true,
"usingComponents": {
"wux-popup": "../dist/popup/index",
"wux-selectable": "../dist/selectable/index",
"wux-textarea": "../dist/textarea/index",
"wux-upload": "../dist/upload/index",
"wux-cell": "../dist/cell/index",
"wux-checkbox-group": "../dist/checkbox-group/index",
"wux-checkbox": "../dist/checkbox/index",
"wux-calendar": "../dist/calendar/index",
"wux-cascader": "../dist/cascader/index"
}

41
components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.wxml

@ -1,7 +1,7 @@
<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">
<scroll-view scroll-y class="popup-content2">
<view class="card">
<view class="items">
<view class="label">需求类别:</view>
@ -35,6 +35,31 @@
</picker>
</view>
</view>
<view class="checkbox">
<!-- <view class="label">自动通知服务方:</view>-->
<view class="value">
<wux-checkbox-group
name="noticeApproches"
value="{{ form.noticeApproches }}"
title="自动通知服务方:"
bind:change="onChange1"
>
<wux-checkbox color="positive" title="短信通知" value="1" />
<wux-checkbox color="positive" title="微信公众号通知" value="2" />
</wux-checkbox-group>
</view>
</view>
<view class="items">
<view class="label">服务范围:</view>
<view class="value" bind:tap="onOpen2">
{{orgName?orgName:'请选择'}}
<!-- <wux-cascader-picker-view
value="{{ value2 }}"
options="{{ orgOptions }}"
bind:valueChange="onValueChange2"
/>-->
</view>
</view>
</view>
</scroll-view>
@ -44,25 +69,15 @@
</view>
</view>
</wux-popup>
<wux-calendar id="wux-calendar"/>
<wux-cascader
visible="{{ visible1 }}"
default-value="{{ value1 }}"
title="事件分类"
options="{{ casOptions }}"
bind:close="onClose1"
bind:change="onChange1"
bind:confirm="onConfirm1"
defaultFieldNames="{{catField}}"
/>
<wux-cascader
visible="{{ visible2 }}"
default-value="{{ value2 }}"
title="处理部门"
options="{{ orgOptions }}"
bind:change="change1"
bind:close="onClose2"
bind:change="onChange2"
bind:confirm="onConfirm2"
defaultFieldNames="{{orgField}}"
/>

14
components/CommonDemandDispatchOrder/CommonDemandDispatchOrder.wxss

@ -29,10 +29,11 @@
}
.popup-content {
.popup-content2 {
max-height: 60vh;
background: none!important;
}
.popup-content .card {
.popup-content2 .card {
border-radius: 20px;
padding: 30rpx;
box-sizing: border-box;
@ -119,3 +120,12 @@
.btn-gray {
background: #D9D9D9;
}
.checkbox .wux-cell-group__hd {
padding-left: 0;
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.checkbox {
text-align: left;
}

8
components/DemandDispatchOrder/DemandDispatchOrder.json

@ -1,12 +1,6 @@
{
"component": true,
"usingComponents": {
"wux-popup": "../dist/popup/index",
"wux-selectable": "../dist/selectable/index",
"wux-textarea": "../dist/textarea/index",
"wux-upload": "../dist/upload/index",
"wux-cell": "../dist/cell/index",
"wux-calendar": "../dist/calendar/index",
"wux-cascader": "../dist/cascader/index"
"wux-popup": "../dist/popup/index"
}
}

22
components/DemandDispatchOrder/DemandDispatchOrder.wxml

@ -48,25 +48,3 @@
</view>
</view>
</wux-popup>
<wux-calendar id="wux-calendar"/>
<wux-cascader
visible="{{ visible1 }}"
default-value="{{ value1 }}"
title="事件分类"
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}}"
/>

1
components/ResourceScheduling/ResourceScheduling.js

@ -73,6 +73,7 @@ Component({
ready: function () {
this.typeChange()
console.log(App.globalData.user.agencyId)
this.getList();
},
methods: {
close() {

113
components/custom-tab-bar/index.js

@ -1,50 +1,77 @@
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"
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
}
],
},
{
"pagePath": "/pages/work/work",
"text": "工作",
"iconPath": "/images/home/work.png",
"selectedIconPath": "/images/home/workSelected.png"
attached() {
},
{
"pagePath": "/pages/statistics/statistics",
"text": "统计",
"iconPath": "/images/home/information.png",
"selectedIconPath": "/images/home/informationSelected.png"
ready: function () {
this.setData({
selected: app.globalData.selected
})
// secretary 书记
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 => {
this.setData({
"list[2].show": res2.data.filter(item => item.roleKey === 'secretary').length > 0
})
})
})
} else {
this.setData({
"list[2].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary').length > 0
})
}
console.log(app.globalData.roleList, 'userss')
},
{
"pagePath": "/pages/mine/mine",
"text": "我的",
"iconPath": "/images/home/mine.png",
"selectedIconPath": "/images/home/mineSelected.png"
methods: {
switchTab(e) {
console.log(e);
const data = e.currentTarget.dataset;
const url = data.path;
app.globalData.selected = data.index;
wx.switchTab({url})
}
}
]
},
attached() {
},
ready: function() {
this.setData({
selected: app.globalData.selected
})
},
methods: {
switchTab(e) {
console.log(e);
const data = e.currentTarget.dataset;
const url = data.path;
app.globalData.selected = data.index;
wx.switchTab({url})
}
}
})

2
components/custom-tab-bar/index.wxml

@ -1,7 +1,7 @@
<view class="tab-bar-block"></view>
<view class="tab-bar">
<view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<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 >

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

@ -0,0 +1,320 @@
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

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

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

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

2
pages/work/work.wxml

@ -3,7 +3,7 @@
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
<image src="../../images/work/header_left.png" mode=""/> {{agencyName}}
</view>
<view class="content">
<view class="content" style="margin-top: {{statusHeight}}px;">
<view class="tab">
<text bind:tap="handelTab" data-value="resi" >查询居民</text>
<text bind:tap="handelTab" data-value="house">查询房屋</text>

2
pages/work/work.wxss

@ -68,7 +68,7 @@ page {
margin-right: 17rpx;
}
.header .content{
margin:90rpx 0 0;
/* margin:90rpx 0 0; */
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;

12
project.config.json

@ -27,9 +27,14 @@
"useApiHook": true,
"useApiHostProcess": true,
"showShadowRootInWxmlPanel": true,
"packNpmManually": false,
"packNpmManually": true,
"enableEngineNative": false,
"packNpmRelationList": [],
"packNpmRelationList": [
{
"packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram/"
}
],
"minifyWXSS": true,
"showES6CompileOption": false,
"minifyWXML": true,
@ -38,7 +43,8 @@
"disablePlugins": [],
"outputPath": ""
},
"condition": false
"condition": false,
"ignoreUploadUnusedFiles": true
},
"compileType": "miniprogram",
"libVersion": "2.19.4",

2
subpages/searchResult/pages/punchCard/punchCard.wxml

@ -32,7 +32,7 @@
<view class="card ">
<view class="title">走访打卡</view>
<view class="punch {{animationClass}}" bind:tap="handlePunch">
<view class="{{animationClass}}" style="font-size: 36rpx;">{{!punchFlag ? '开始打卡' : '更新打卡'}}</view>
<view class="{{animationClass}}" style="font-size: 36rpx;">{{!punchFlag ? '打卡' : '更新打卡'}}</view>
<view class="{{animationClass}}" style="font-family:PingFang-SC-Regular;font-size: 28rpx;opacity: 0.72;">{{currentTime}}</view>
</view>
<view class="address">当前位置:{{addressContent}}</view>

25
subpages/statistics/pages/demand/detail/detail.js

@ -9,6 +9,7 @@ Page({
isSupervision: false,
type: '1',
isShowOrder: false,
isShowCommonOrder: false
},
onLoad(options) {
this.setData({
@ -57,14 +58,26 @@ Page({
handleDispatchOrder(){
this.dispatchClose()
this.setData({
isShowOrder: true
})
if (this.data.type === '1') {
this.setData({
isShowOrder: true
})
} else {
this.setData({
isShowCommonOrder: true
})
}
},
orderClose() {
this.setData({
isShowOrder: false
})
if (this.data.type === '1') {
this.setData({
isShowOrder: false
})
} else {
this.setData({
isShowCommonOrder: false
})
}
},
})

1
subpages/statistics/pages/demand/detail/detail.json

@ -5,6 +5,7 @@
"Head": "../../../../../components/Head",
"ResourceScheduling": "../../../../../components/ResourceScheduling/ResourceScheduling",
"DemandDispatchOrder": "../../../../../components/DemandDispatchOrder/DemandDispatchOrder",
"CommonDemandDispatchOrder": "../../../../../components/CommonDemandDispatchOrder/CommonDemandDispatchOrder",
"Supervision": "../../../../../components/Supervision/Supervision"
}
}

27
subpages/statistics/pages/demand/detail/detail.wxml

@ -27,6 +27,17 @@
</view>
<view class="bottom-btn-block"></view>
<view class="bottom-btn" wx:if="{{type === '1' }}">
<view class="btn btn-blue" bind:tap="dispatchOpen">资源调度</view>
<view class="btn btn-orange" bind:tap="supervisionOpen">督办催办</view>
</view>
<view class="bottom-btn2" wx:else>
<view class="btn btn-blue" bind:tap="dispatchOpen">资源调度</view>
</view>
<ResourceScheduling
visible="{{isDispatch}}"
agencyId="{{detail.agencyId}}"
@ -43,18 +54,14 @@
/>
<DemandDispatchOrder
is12345="{{is12345}}"
visible="{{isShowOrder}}"
eventId="{{id}}"
bind:close="orderClose"
detail="{{detail}}"
/>
<view class="bottom-btn-block"></view>
<view class="bottom-btn" wx:if="{{type === '1' }}">
<view class="btn btn-blue" bind:tap="dispatchOpen">资源调度</view>
<view class="btn btn-orange" bind:tap="supervisionOpen">督办催办</view>
</view>
<view class="bottom-btn2" wx:else>
<view class="btn btn-blue" bind:tap="dispatchOpen">资源调度</view>
</view>
<CommonDemandDispatchOrder
visible="{{isShowCommonOrder}}"
eventId="{{id}}"
bind:close="orderClose"
detail="{{detail}}"
/>

2
subpages/statistics/pages/event/list/list.js

@ -107,7 +107,7 @@ Page({
},
gotopage(e) {
wx.navigateTo({
url: '/subpages/statistics/pages/event/detail/detail?id=' + JSON.stringify(e.currentTarget.dataset.id)
url: '/subpages/statistics/pages/event/detail/detail?is12345=2&id=' + e.currentTarget.dataset.id
})
},

2
subpages/statistics/pages/event/list/list.wxml

@ -42,7 +42,7 @@
<scroll-view bind:scrolltolower="scrolltolower" scroll-y style="height: calc(90vh - 46rpx)" class="statistics-container">
<view class="card-list" wx:for="{{list}}" wx:key="{{index}}">
<view class="content">
<view class="item" bind:tap="gotopage" data-id="{{item}}">
<view class="item" bind:tap="gotopage" data-id="{{item.icEventId}}">
<view class="user-info">
<view class="name">
{{item.name ? item.name : ''}} {{item.mobile ? item.mobile : ''}}

7
utils/statisticsApi.js

@ -254,7 +254,12 @@ export function commonDemandCountByCategory(params) {
return request.post('governance/commonDemand/countByCategory',params)
}
// tuchu
// 问题突出列表
export function dwdEventEventList(params) {
return request.post('governance/dwdEvent/eventList',params)
}
// 获取角色
export function getOwnedRolesOfStaffId(id) {
return request.get('gov/access/govroleuser/getOwnedRolesOfStaffId/'+id)
}

Loading…
Cancel
Save