From 6a9c3f0cae9ada3228349f5f97e78b9f36d55788 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 28 Feb 2023 14:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=88=B6=E5=AE=9A=E8=A1=A8?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/app.json | 3 +- weapp/package/troubleshooting/index.js | 28 ++++- weapp/package/troubleshooting/index.wxml | 16 ++- weapp/package/troubleshooting/index.wxss | 4 + .../troubleshooting/shootingForm/index.js | 109 ++++++++++++++++++ .../troubleshooting/shootingForm/index.json | 12 ++ .../troubleshooting/shootingForm/index.wxml | 78 +++++++++++++ .../troubleshooting/shootingForm/index.wxss | 26 +++++ weapp/project.private.config.json | 7 ++ 9 files changed, 275 insertions(+), 8 deletions(-) create mode 100644 weapp/package/troubleshooting/shootingForm/index.js create mode 100644 weapp/package/troubleshooting/shootingForm/index.json create mode 100644 weapp/package/troubleshooting/shootingForm/index.wxml create mode 100644 weapp/package/troubleshooting/shootingForm/index.wxss diff --git a/weapp/app.json b/weapp/app.json index a9321fa..48ca4ea 100644 --- a/weapp/app.json +++ b/weapp/app.json @@ -14,7 +14,8 @@ "basic/basic", "startInspection/startInspection", "inspectionInput/inspectionInput", - "troubleshooting/index" + "troubleshooting/index", + "troubleshooting/shootingForm/index" ] } ], diff --git a/weapp/package/troubleshooting/index.js b/weapp/package/troubleshooting/index.js index 1219045..ffa2bbb 100644 --- a/weapp/package/troubleshooting/index.js +++ b/weapp/package/troubleshooting/index.js @@ -12,7 +12,9 @@ Page({ structResult: ['a', 'b'], pointList: ['a', 'b', 'c'], pointResult: ['a', 'b'], - + // 时间筛选 + startTime: '', + endTime: '' }, // 顶部tab切换 @@ -58,6 +60,30 @@ Page({ }, noop () { }, + // 时间选择 + onStartTimeChange (event) { + this.setData({ + startTime: event.detail, + }); + }, + onEndTimeChange (event) { + this.setData({ + endTime: event.detail, + }); + }, + + search () { + console.log(this.data); + }, + + // 页面跳转 + toShootingForm (e) { + console.log(e); + const { shootingid } = e.currentTarget.dataset + wx.navigateTo({ + url: '/package/troubleshooting/shootingForm/index?shootingid=' + shootingid, + }) + }, /** * 生命周期函数--监听页面加载 diff --git a/weapp/package/troubleshooting/index.wxml b/weapp/package/troubleshooting/index.wxml index 0734315..45c5093 100644 --- a/weapp/package/troubleshooting/index.wxml +++ b/weapp/package/troubleshooting/index.wxml @@ -11,7 +11,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -33,9 +33,11 @@ - - - + + + + + @@ -44,7 +46,9 @@ asd - 按钮 + + 按钮 + diff --git a/weapp/package/troubleshooting/index.wxss b/weapp/package/troubleshooting/index.wxss index be72845..33f25ba 100644 --- a/weapp/package/troubleshooting/index.wxss +++ b/weapp/package/troubleshooting/index.wxss @@ -54,4 +54,8 @@ .value-class { flex: none !important; +} + +.time-option .van-picker{ + width: 45vw; } \ No newline at end of file diff --git a/weapp/package/troubleshooting/shootingForm/index.js b/weapp/package/troubleshooting/shootingForm/index.js new file mode 100644 index 0000000..dd490de --- /dev/null +++ b/weapp/package/troubleshooting/shootingForm/index.js @@ -0,0 +1,109 @@ +// package/troubleshooting/shootingForm/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + shootingid: '', + maintenancePersonId: null, + maintenanceRequirement: '', + planStartTimePopupShow: false, + planStartTime: '', + planEndTimePopupShow: false, + planEndTime: '', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + const { shootingid } = options + if (shootingid) { + this.setData({ + shootingid + }) + } else { + + } + }, + + onMaintenancePersonPopupChange (e) { + this.setData({ + multiIndex: e.detail.value + }) + }, + + showPlanStartTimePopup () { + this.setData({ planStartTimePopupShow: true }) + }, + + closePlanStartTimePopup () { + this.setData({ planStartTimePopupShow: false }) + }, + + onPlanStartTimeChange (event) { + this.setData({ planStartTime: event.detail, }) + }, + + showPlanEndTimePopup () { + this.setData({ planEndTimePopupShow: true }) + }, + + closePlanEndTimePopup () { + this.setData({ planEndTimePopupShow: false }) + }, + + onPlanEndTimeChange (event) { + this.setData({ planEndTime: event.detail, }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage () { + + } +}) \ No newline at end of file diff --git a/weapp/package/troubleshooting/shootingForm/index.json b/weapp/package/troubleshooting/shootingForm/index.json new file mode 100644 index 0000000..31ef396 --- /dev/null +++ b/weapp/package/troubleshooting/shootingForm/index.json @@ -0,0 +1,12 @@ +{ + "usingComponents": { + "van-button": "@vant/weapp/button/index", + "van-field": "@vant/weapp/field/index", + "van-cell": "@vant/weapp/cell/index", + "van-cell-group": "@vant/weapp/cell-group/index", + "van-picker": "@vant/weapp/picker/index", + "van-popup": "@vant/weapp/popup/index", + "van-icon": "@vant/weapp/icon/index", + "van-datetime-picker": "@vant/weapp/datetime-picker/index" + } +} \ No newline at end of file diff --git a/weapp/package/troubleshooting/shootingForm/index.wxml b/weapp/package/troubleshooting/shootingForm/index.wxml new file mode 100644 index 0000000..aaaa05d --- /dev/null +++ b/weapp/package/troubleshooting/shootingForm/index.wxml @@ -0,0 +1,78 @@ + + + + 巡检信息 + + + + + + + 问题详情 + + + + + + + + 现场照片 + + 123 + + + + + + 维修计划信息 + + + + 维修人 + + + 当前选择 + + + + + + + + + 质检人 + + + 当前选择 + + + + + + + + 计划开始时间 + + 当前选择 + + + + + + + + + + 计划结束时间 + + 当前选择 + + + + + + + + + + \ No newline at end of file diff --git a/weapp/package/troubleshooting/shootingForm/index.wxss b/weapp/package/troubleshooting/shootingForm/index.wxss new file mode 100644 index 0000000..d523d05 --- /dev/null +++ b/weapp/package/troubleshooting/shootingForm/index.wxss @@ -0,0 +1,26 @@ +/* package/troubleshooting/shootingForm/index.wxss */ + +.mission-card-title { + background-color: #fff; + overflow: auto; + padding: 24rpx 16px; + display: flex; + justify-content: space-between; + align-items: center +} + +.mission-center-card-title { + padding-top: 64rpx; +} + +.fs-cell-title { + max-width: 6.2em; + min-width: 6.2em; + margin-right: 12px; + text-align: left; + color: var(--field-label-color, #646566) +} + +.fs-cell-content { + color: var(--field-input-text-color, #323233) +} \ No newline at end of file diff --git a/weapp/project.private.config.json b/weapp/project.private.config.json index b16d2d1..7aeb8b7 100644 --- a/weapp/project.private.config.json +++ b/weapp/project.private.config.json @@ -14,6 +14,13 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "事件处理详情", + "pathName": "package/troubleshooting/shootingForm/index", + "query": "shootingid=5", + "launchMode": "default", + "scene": null } ] }