From 6ceacf9f42897398055d9579f4c7b0b9a8fdc704 Mon Sep 17 00:00:00 2001 From: itgaojian Date: Thu, 7 Dec 2023 09:31:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=88=E4=BB=B6=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 102 ++-- pages/caseReport/caseReport.js | 881 +++++++++++++++---------------- pages/caseReport/caseReport.json | 9 +- pages/caseReport/caseReport.wxml | 224 ++++---- pages/caseReport/caseReport.wxss | 488 +++++++++++------ pages/index/index.js | 10 +- utils/restAjax.js | 4 +- 7 files changed, 916 insertions(+), 802 deletions(-) diff --git a/app.json b/app.json index a7cd317..9abda0c 100644 --- a/app.json +++ b/app.json @@ -1,52 +1,54 @@ { - "pages": [ - "pages/index/index", - "pages/caseCheck/caseCheck", - "pages/caseReport/caseReport", - "pages/caseDetail/caseDetail", - "pages/process/process", - "pages/waitCheck/waitCheck", - "pages/census/census", - "pages/mine/mine", - "pages/censusinput/censusinput", - "pages/chooseArea/chooseArea", - "pages/censusDetail/censusDetail", - "pages/censusEdit/censusEdit" - ], - "window": { - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#4583FE", - "navigationBarTitleText": "包头高新网格化", - "navigationBarTextStyle": "white" - }, - "style": "v2", - "sitemapLocation": "sitemap.json", - "permission": { - "scope.userLocation": { - "desc": "你的位置信息将用于小程序位置接口的效果展示" - } - }, - "usingComponents": { - "scroller": "components/coolui-scroller/scroller/index" - }, - "tabBar": { - "color": "#000", - "borderStyle": "white", - "selectedColor": "#4583FE", - "backgroundColor": "#F8F8F8", - "list": [ - { - "pagePath": "pages/index/index", - "iconPath": "images/ic_home_nomarl_icon.png", - "text": "首页", - "selectedIconPath": "images/ic_home_sel_icon.png" - }, - { - "pagePath": "pages/mine/mine", - "iconPath": "images/ic_mine_nomarl_icon.png", - "text": "我的", - "selectedIconPath": "images/ic_mine_sel_icon.png" - } - ] - } + "pages": [ + "pages/index/index", + "pages/caseCheck/caseCheck", + "pages/caseReport/caseReport", + "pages/caseDetail/caseDetail", + "pages/process/process", + "pages/waitCheck/waitCheck", + "pages/census/census", + "pages/mine/mine", + "pages/censusinput/censusinput", + "pages/chooseArea/chooseArea", + "pages/censusDetail/censusDetail", + "pages/censusEdit/censusEdit" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#4583FE", + "navigationBarTitleText": "包头高新网格化", + "navigationBarTextStyle": "white" + }, + "style": "v2", + "sitemapLocation": "sitemap.json", + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + } + }, + "requiredPrivateInfos": [ + "getLocation" + ], + "usingComponents": { + "scroller": "components/coolui-scroller/scroller/index" + }, + "tabBar": { + "color": "#000", + "borderStyle": "white", + "selectedColor": "#4583FE", + "backgroundColor": "#F8F8F8", + "list": [{ + "pagePath": "pages/index/index", + "iconPath": "images/ic_home_nomarl_icon.png", + "text": "首页", + "selectedIconPath": "images/ic_home_sel_icon.png" + }, + { + "pagePath": "pages/mine/mine", + "iconPath": "images/ic_mine_nomarl_icon.png", + "text": "我的", + "selectedIconPath": "images/ic_mine_sel_icon.png" + } + ] + } } \ No newline at end of file diff --git a/pages/caseReport/caseReport.js b/pages/caseReport/caseReport.js index 56ebe5f..6df4f17 100644 --- a/pages/caseReport/caseReport.js +++ b/pages/caseReport/caseReport.js @@ -1,472 +1,439 @@ const app = getApp() -var bmap = require('../../lib/bmap-wx.js'); -let wxMarkerData = []; +var bmap = require('../../lib/bmap-wx.js'); +let wxMarkerData = []; // pages/caseReport/caseReport.js Page({ - /** - * 页面的初始数据 - */ - data: { - address: '获取案件地址中...', - recodePath: '', - recorderManager: wx.getRecorderManager(), - innerAudioContext: wx.createInnerAudioContext(), - // 办事处 - officeIndex: 0, - officeArray: [], - officeList: [], - officeSelectedId: '', - // 社区 - communityIndex: 0, - communityArray: [], - communityList: [], - communitySelectedId: '', - // 类型 - typeIndex: 0, - typeArray: [], - typeList: [], - typeSelectedId: '', - // 类型二级 - typeLvIndex: 0, - typeLvArray: [], - typeLvList: [], - typeLvSelectedId: '', - // 案件类型 - caseIndex: 0, - caseArray: [], - caseList: [], - caseSelectedId: '', - photoList: [], - startTouch: {}, - selfHandle: 0, - caseDesc: '', - imageList: [], - token: '' - }, - // 办事处列表 - getOfficeList: function () { - var self = this - app.restAjax.get(app.restAjax.path('{reqesutUrl}app/dict/listdict/9d179f05-3ea0-48f7-853c-d3b7124b791c', [app.requestUrl]), {}, { - headers: { - token: self.data.token - } - }, function (code, data) { - var arr = [] - for (let i = 0 ; i < data.length; i++) { - arr.push(data[i].dictName) - } - self.setData({ - officeArray: arr, - officeList: data, - officeSelectedId: data[0].dictId - }) - self.getCommunityList() - }); - }, - // 办事处选中 - bindPickerChange: function (e) { - var self = this - this.setData({ - officeIndex: e.detail.value, - officeSelectedId: self.data.officeList[e.detail.value].dictId - }) - wx.showToast({ - title: '加载中', - icon: 'loading' - }) - this.getCommunityList() - }, - // 社区列表 - getCommunityList: function () { - var self = this - self.setData({ - communityIndex: 0 - }) - app.restAjax.get(app.restAjax.path('{reqesutUrl}app/community/listareacommunity/' + self.data.officeSelectedId, [app.requestUrl]), {}, { - headers: { - token: self.data.token - } - }, function (code, data) { - var arr = [] - for (let i = 0 ; i < data.length; i++) { - arr.push(data[i].communityName) - } - self.setData({ - communityArray: arr, - communityList: data, - communitySelectedId: data[0].communityId - }) - wx.hideToast() - }); - }, - // 选中社区 - bindCommunityChange: function (e) { - var self = this - this.setData({ - communityIndex: e.detail.value, - communitySelectedId: self.data.communityList[e.detail.value].communityId - }) - }, - // 类型列表 - getTypeList: function () { - var self = this - app.restAjax.get(app.restAjax.path('{reqesutUrl}app/dict/listdict/46d108b2-4ef9-4f6f-b30c-0c700e3ee852' + self.data.officeSelectedId, [app.requestUrl]), {}, { - headers: { - token: self.data.token - } - }, function (code, data) { - var arr = [] - for (let i = 0 ; i < data.length; i++) { - arr.push(data[i].dictName) - } - self.setData({ - typeArray: arr, - typeList: data, - typeSelectedId: data[0].dictId - }) - self.getTypeLv() - }); - }, - // 类型选中 - bindTypeChange: function (e) { - var self = this - this.setData({ - typeIndex: e.detail.value, - typeSelectedId: self.data.typeList[e.detail.value].dictId - }) - self.getTypeLv() - }, - // 类型二级 - getTypeLv: function () { - var self = this - self.setData({ - typeLvIndex: 0 - }) - wx.showToast({ - title: '加载中', - icon: 'loading' - }) - app.restAjax.get(app.restAjax.path('{reqesutUrl}app/dict/listdict/' + self.data.typeSelectedId, [app.requestUrl]), {}, { - headers: { - token: self.data.token - } - }, function (code, data) { - var arr = [] - for (let i = 0 ; i < data.length; i++) { - arr.push(data[i].dictName) - } - self.setData({ - typeLvArray: arr, - typeLvList: data, - typeLvSelectedId: data[0].dictId - }) - wx.hideToast() - }); - }, - // 类型二级选中 - bindTypeLvChange: function (e) { - var self = this - this.setData({ - typeLvIndex: e.detail.value, - typeLvSelectedId: self.data.typeLvList[e.detail.value].dictId - }) - self.getTypeLv() - }, - // 案件类型列表 - getCaseList: function () { - var self = this - app.restAjax.get(app.restAjax.path('{reqesutUrl}app/dict/listdict/46d108b2-4ef9-4f6f-b30c-0c700e3ee852' + self.data.officeSelectedId, [app.requestUrl]), {}, { - headers: { - token: self.data.token - } - }, function (code, data) { - var arr = [] - for (let i = 0 ; i < data.length; i++) { - arr.push(data[i].dictName) - } - self.setData({ - typeArray: arr, - typeList: data, - typeSelectedId: data[0].dictId - }) - self.getTypeLv() - }); - }, - // 录音 - recordVoice: function (e) { - this.setData({ - startTouch: e.touches[0] - }) - var options = { - format: 'mp3' - } - this.data.recorderManager.start(options) - wx.showToast({ - title: "正在录音", - icon: "none", - duration: 60000//先定义个60秒,后面可以手动调用wx.hideToast()隐藏 - }); - }, - // 录音结束 - recordEnd: function () { - var self = this - this.data.recorderManager.stop() - this.data.recorderManager.onStop(function (res) { - var path = res.tempFilePath - self.setData({ - recodePath: path - }) - wx.showToast({ - title: '上传中', - icon: 'loading' - }) - app.restAjax.file(app.restAjax.path('{requestUrl}app/file/uploadaudio', [app.requestUrl]), path, 'audio', { - headers: { - token: self.data.token - } - }, function (code, data) { - var id = JSON.parse(data).data - self.setData({ - audioId: id - }) - wx.hideToast() - }, function (code, data) { - console.log(data) - }) - }) - var self = this - wx.hideToast() - }, - // 播放录音 - playRecord: function () { - var innerAudioContext = wx.createInnerAudioContext() - innerAudioContext.src = this.data.recodePath - innerAudioContext.play() - }, - // 选择图片 - chooseImage: function () { - var self = this - wx.chooseImage({ - count: 9 - self.data.photoList.length, - sourceType: ['album', 'camera'], - success: function (res) { - self.setData({ - photoList: self.data.photoList.concat(res.tempFiles) - }) - wx.showToast({ - title: '上传中', - icon: 'loading' - }) - var arr = [] - for (let i = 0; i < res.tempFiles.length; i++) { - var path = res.tempFiles[i].path; - app.restAjax.file(app.restAjax.path('{requestUrl}app/file/uploadimage', [app.requestUrl]), path, 'image', { - headers: { - token: self.data.token - } - }, function (code, data) { - var id = JSON.parse(data).data - arr.push(id) - if (arr.length == res.tempFiles.length) { - self.setData({ - imageList: arr - }) - wx.hideToast() - } - }, function (code, data) { - console.log(data) - }) - } - } - }) - }, - // 删除图片 - deleteImg: function (e) { - var idx = e.currentTarget.dataset.num - var self = this - self.data.photoList.splice(idx, 1) - self.data.imageList.splice(idx, 1) - self.setData({ - photoList: self.data.photoList, - imageList: self.data.imageList - }) - }, - // touchMove: function (e) { - // var moveLenght = e.touches[e.touches.length - 1].clientY - this.data.startTouch.clientY; - // if (Math.abs(moveLenght) > 50) { - // wx.showToast({ - // title: "松开手指,取消发送", - // icon: "none", - // duration: 60000 - // }); - // } else { - // wx.showToast({ - // title: "正在录音,上划取消发送", - // icon: "none", - // duration: 60000 - // }); - // } - // }, - /** - * 生命周期函数--监听页面加载 - */ - // 是否自行处理 - isSelfHandle: function (e) { - this.setData({ - selfHandle: e.detail.value - }) - }, - // 提交上报 - submitReport: function () { - var self = this - var photos = '' - if (!self.data.caseDesc) { - wx.showToast({ - title: '案件内容不能为空', - icon: 'none', - duration: 2000 - }) - return - } - if (self.data.imageList.length != 'undefined' && self.data.imageList.length != 0) { - for (let i = 0; i < self.data.imageList.length; i++) { - if (i == self.data.imageList.length - 1) { - photos += self.data.imageList[i] - } else { - photos += self.data.imageList[i] + ',' - } - } - } else { - wx.showToast({ - title: '请至少上传一张照片', - icon: 'none', - duration: 2000 - }) - return - } - - var info = { - areaId: self.data.officeSelectedId, - areaName: self.data.officeArray[self.data.officeIndex], - casePhotos: photos, - caseAudio: self.data.audioId, - communityId: self.data.communitySelectedId, - communityName: self.data.communityArray[self.data.communityIndex], - caseSource: 1, - isSelf: self.data.selfHandle, - caseTypeId: self.data.typeLvSelectedId, - caseTypeName: self.data.typeLvArray[self.data.typeLvIndex], - caseContent: self.data.caseDesc, - caseLatitude: self.data.latitude, - caseLongitude: self.data.longitude, - casePosition: self.data.address - } - wx.showToast({ - title: '上传中', - icon: 'loading' - }) - app.restAjax.post(app.restAjax.path('{reqesutUrl}app/reportcase/saveappautoreportcase', [app.requestUrl]), info, { - headers: { - token: self.data.token - } - }, function (code, data) { - if (code == '200') { - wx.hideToast() - wx.showToast({ - title: '上报成功', - duration: 1500 - }) - setTimeout(function () { - wx.reLaunch({ - url: '../index/index', - }) - }, 1500) - } - }, function (code, data) { - wx.showToast({ - title: data.msg, - duration: 2000 - }) - }); - }, - onLoad: function (options) { - var self = this - wx.getStorage({ - key: 'token', - success: function (res) { - self.setData({ - token: res.data - }) - self.getOfficeList() - self.getTypeList() - } - }) - var BMap = new bmap.BMapWX({ - ak: 'Zk732rbyjd327q7Zj9EOtRjUn2ED1GWK' - }); - var success = function (data) { - self.setData({ - address: data.wxMarkerData[0].address, - latitude: data.wxMarkerData[0].latitude, - longitude: data.wxMarkerData[0].longitude - }) - } - var fail = function (data) { - console.log(data); - } - BMap.regeocoding({ - fail:fail, - success:success - }); - }, + /** + * 页面的初始数据 + */ + data: { + address: '获取案件地址中...', + recodePath: '', + recorderManager: wx.getRecorderManager(), + innerAudioContext: wx.createInnerAudioContext(), + //街道 + streetPicker: false, + streetList: [], + streetKeys: { + label: 'dictName', + value: 'dictId' + }, + selStreet: null, + //社区 + communityPicker: false, + communityList: [], + communityKeys: { + label: 'communityName', + value: 'communityId' + }, + selCommunity: null, + //类型 + typePicker: false, + typeList: [], + typeKeys: { + label: 'dictName', + value: 'dictId' + }, + selType: null, + //详细类型 + type2Picker: false, + type2List: [], + type2Keys: { + label: 'dictName', + value: 'dictId' + }, + selType2: null, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - }, + // 案件类型 + photoList: [], + startTouch: {}, + selfHandle: 0, + caseDesc: '', + imageList: [], + token: '', + scrollHeight: 0, + }, + onLoad: function (options) { + var self = this + wx.getStorage({ + key: 'token', + success: function (res) { + self.setData({ + token: res.data + }) + self.getOfficeList() + self.getTypeList() + } + }) + var BMap = new bmap.BMapWX({ + ak: 'Zk732rbyjd327q7Zj9EOtRjUn2ED1GWK' + }); + var success = function (data) { + self.setData({ + address: data.wxMarkerData[0].address, + latitude: data.wxMarkerData[0].latitude, + longitude: data.wxMarkerData[0].longitude + }) + } + var fail = function (data) { + console.log(data); + } + BMap.regeocoding({ + fail: fail, + success: success + }); + let screenHeight = wx.getSystemInfoSync().windowHeight; + this.setData({ + scrollHeight: screenHeight + }) + }, + //街道选择 + onShowStreetPick() { + this.setData({ + streetPicker: true + }) + }, + onStreetPick(e) { + var _self = this; + var index = e.detail.columns[0].index; + _self.setData({ + communityList: [], + selCommunity: null, + selStreet: _self.data.streetList[index] + }) + _self.getCommunityList(); + }, + onStreetCancel(e) { + this.setData({ + streetPicker: false, + }) + }, + //社区 + onShowCommunitPicker() { + this.setData({ + communityPicker: true, + }) + }, + onCommunityPick(e) { + var index = e.detail.columns[0].index; + var _self = this; + _self.setData({ + selCommunity: _self.data.communityList[index] + }) + }, + onCommunityCancel(e) { + this.setData({ + communityPicker: false + }) + }, + //类型选择 + onShowType1() { + this.setData({ + typePicker: true + }) + }, + onTypePick(e) { + var index = e.detail.columns[0].index; + var _self = this; + _self.setData({ + selType: _self.data.typeList[index] + }) + _self.getTypeLv(); + }, + onTypeCancel(e) { + this.setData({ + typePicker: false + }) + }, - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { + //详细类型 + onShowType2() { + this.setData({ + type2Picker: true + }) + }, + onType2Pick(e) { + var index = e.detail.columns[0].index; + var _self = this; + _self.setData({ + selType2: _self.data.type2List[index] + }) + }, + onType2Cancel(e) { + this.setData({ + typePicker: false + }) + }, - }, + // 办事处列表 + getOfficeList: function () { + var self = this + app.restAjax.get(app.restAjax.path('{reqesutUrl}app/dict/listdict/9d179f05-3ea0-48f7-853c-d3b7124b791c', [app.requestUrl]), {}, { + headers: { + token: self.data.token + } + }, function (code, data) { + self.setData({ + streetList: data, + selStreet: data[0] + }) + self.getCommunityList() + }); + }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { + // 社区列表 + getCommunityList: function () { + var self = this + self.setData({ + communityIndex: 0 + }) + app.restAjax.get(app.restAjax.path('{reqesutUrl}app/community/listareacommunity/' + self.data.selStreet.dictId, [app.requestUrl]), {}, { + headers: { + token: self.data.token + } + }, function (code, data) { + self.setData({ + communityList: data, + selCommunity: data[0] + }) + wx.hideToast() + }); + }, - }, + // 类型列表 + getTypeList: function () { + var self = this + app.restAjax.get(app.restAjax.path('{reqesutUrl}app/dict/listdict/46d108b2-4ef9-4f6f-b30c-0c700e3ee852', [app.requestUrl]), {}, { + headers: { + token: self.data.token + } + }, function (code, data) { + self.setData({ + typeList: data, + selType: data[0] + }) + self.getTypeLv() + }); + }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { + // 类型二级 + getTypeLv: function () { + var self = this + wx.showLoading({ + title: '加载中...', + }) + app.restAjax.get(app.restAjax.path('{reqesutUrl}app/dict/listdict/' + self.data.selType.dictId, [app.requestUrl]), {}, { + headers: { + token: self.data.token + } + }, function (code, data) { + self.setData({ + type2List: data, + selType2: data[0] + }) + wx.hideLoading() + }, (code, error) => { + wx.hideLoading() + }); + }, + //案件描述 + inputCaseDesc(e) { + this.setData({ + caseDesc: e.detail.value + }) + }, + // 案件类型列表 + getCaseList: function () { + var self = this + app.restAjax.get(app.restAjax.path('{reqesutUrl}app/dict/listdict/46d108b2-4ef9-4f6f-b30c-0c700e3ee852' + self.data.officeSelectedId, [app.requestUrl]), {}, { + headers: { + token: self.data.token + } + }, function (code, data) { + var arr = [] + for (let i = 0; i < data.length; i++) { + arr.push(data[i].dictName) + } + self.setData({ + typeArray: arr, + typeList: data, + typeSelectedId: data[0].dictId + }) + self.getTypeLv() + }); + }, + // 录音 + recordVoice: function (e) { + this.setData({ + startTouch: e.touches[0] + }) + var options = { + format: 'mp3' + } + this.data.recorderManager.start(options) + wx.showToast({ + title: "正在录音", + icon: "none", + duration: 60000//先定义个60秒,后面可以手动调用wx.hideToast()隐藏 + }); + }, + // 录音结束 + recordEnd: function () { + var self = this + this.data.recorderManager.stop() + this.data.recorderManager.onStop(function (res) { + var path = res.tempFilePath + self.setData({ + recodePath: path + }) + wx.showToast({ + title: '上传中', + icon: 'loading' + }) + app.restAjax.file(app.restAjax.path('{requestUrl}app/file/uploadaudio', [app.requestUrl]), path, 'audio', { + headers: { + token: self.data.token + } + }, function (code, data) { + var id = JSON.parse(data).data + self.setData({ + audioId: id + }) + wx.hideToast() + }, function (code, data) { + console.log(data) + }) + }) + var self = this + wx.hideToast() + }, + // 播放录音 + playRecord: function () { + var innerAudioContext = wx.createInnerAudioContext() + innerAudioContext.src = this.data.recodePath + innerAudioContext.play() + }, + // 选择图片 + chooseImage: function () { + var self = this + wx.chooseImage({ + count: 9 - self.data.photoList.length, + sourceType: ['album', 'camera'], + success: function (res) { + self.setData({ + photoList: self.data.photoList.concat(res.tempFiles) + }) + wx.showToast({ + title: '上传中', + icon: 'loading' + }) + var arr = [] + for (let i = 0; i < res.tempFiles.length; i++) { + var path = res.tempFiles[i].path; + app.restAjax.file(app.restAjax.path('{requestUrl}app/file/uploadimage', [app.requestUrl]), path, 'image', { + headers: { + token: self.data.token + } + }, function (code, data) { + var id = JSON.parse(data).data + arr.push(id) + if (arr.length == res.tempFiles.length) { + self.setData({ + imageList: arr + }) + wx.hideToast() + } + }, function (code, data) { + console.log(data) + }) + } + } + }) + }, + // 删除图片 + deleteImg: function (e) { + var idx = e.currentTarget.dataset.num + var self = this + self.data.photoList.splice(idx, 1) + self.data.imageList.splice(idx, 1) + self.setData({ + photoList: self.data.photoList, + imageList: self.data.imageList + }) + }, - }, + // 提交上报 + submitReport: function () { + var self = this + var photos = '' + if (!self.data.caseDesc) { + wx.showToast({ + title: '案件内容不能为空', + icon: 'none', + duration: 2000 + }) + return + } + if (self.data.imageList.length != 'undefined' && self.data.imageList.length != 0) { + for (let i = 0; i < self.data.imageList.length; i++) { + if (i == self.data.imageList.length - 1) { + photos += self.data.imageList[i] + } else { + photos += self.data.imageList[i] + ',' + } + } + } else { + wx.showToast({ + title: '请至少上传一张照片', + icon: 'none', + duration: 2000 + }) + return + } - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { + var info = { + areaId: self.data.selStreet.dictId, + areaName: self.data.selStreet.dictName, + casePhotos: photos, + caseAudio: self.data.audioId, + communityId: self.data.selCommunity.communityId, + communityName: self.data.selCommunity.communityName, + caseSource: 1, + isSelf: self.data.selfHandle, + caseTypeId: self.data.selType2.dictId, + caseTypeName: self.data.selType2.dictName, + caseContent: self.data.caseDesc, + caseLatitude: self.data.latitude, + caseLongitude: self.data.longitude, + casePosition: self.data.address + } + wx.showLoading({ + title: '上报中...', + }) + app.restAjax.post(app.restAjax.path('{reqesutUrl}app/reportcase/saveappautoreportcase', [app.requestUrl]), info, { + headers: { + token: self.data.token + } + }, function (code, data) { + if (code == '200') { + wx.hideLoading() + wx.showToast({ + title: '上报成功', + duration: 1500 + }) + setTimeout(function () { + wx.navigateBack() + }, 1500) + } + }, function (code, data) { + wx.hideLoading() + wx.showToast({ + title: data.msg, + duration: 2000 + }) + }); + }, - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - } }) \ No newline at end of file diff --git a/pages/caseReport/caseReport.json b/pages/caseReport/caseReport.json index 8835af0..0ee5cea 100644 --- a/pages/caseReport/caseReport.json +++ b/pages/caseReport/caseReport.json @@ -1,3 +1,10 @@ { - "usingComponents": {} + "usingComponents": { + "t-picker": "/miniprogram_npm/tdesign-miniprogram/picker/picker", + "t-picker-item": "/miniprogram_npm/tdesign-miniprogram/picker-item/picker-item", + "t-date-time-picker": "/miniprogram_npm/tdesign-miniprogram/date-time-picker/date-time-picker" + }, + "navigationBarTitleText": "案件上报", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#FFFFFF" } \ No newline at end of file diff --git a/pages/caseReport/caseReport.wxml b/pages/caseReport/caseReport.wxml index 04c5c3e..66acb82 100644 --- a/pages/caseReport/caseReport.wxml +++ b/pages/caseReport/caseReport.wxml @@ -1,132 +1,92 @@ - - 基本信息 - - - * - - - - - {{officeArray[officeIndex]}} - - - - - - - - - - * - - - - - {{communityArray[communityIndex]}} - - - - - - - - - - * - - - - - {{typeArray[typeIndex]}} - - - - - - - - - - * - - - - - {{typeLvArray[typeLvIndex]}} - - - - - - - - - - * - - 巡检采集 - - - - * - - 自行处理 - - - - - - - - - * - - {{address}} - - - - - - 详细信息 - - - * - - - - - - - - - 录音 - - - - 播放录音 - - 长按录音 - - - - - * - - - - - - - - - - - - - - - - 上报 - \ No newline at end of file + + + + + + + 基本信息 + + + + + 街道 + {{selStreet==null?'请选择案件所属街道':selStreet.dictName}} + + + 社区 + {{selCommunity==null?'请选择案件所属社区':selCommunity.communityName}} + + + 类别 + {{selType==null?'请选择所属类别':selType.dictName}} + + + 详细类型 + {{selType2==null?'请选择详细类别':selType2.dictName}} + + + 地址 + {{address==null?'请选择地址':address}} + + + + + + 详细信息 + + + + + 案件描述 +