From 6a176ffffc4d0e58b738d1f6597b19859271ba17 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Mon, 16 Jan 2023 22:48:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E8=AE=A1=E5=88=92web?= =?UTF-8?q?=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/app.js | 3 +- .../sections/patrolManage/actions/index.js | 7 + .../src/sections/patrolManage/actions/plan.js | 46 ++++++ .../patrolManage/components/userModal.js | 72 ++++++++++ .../sections/patrolManage/containers/index.js | 5 + .../patrolManage/containers/patrolPlan.js | 131 ++++++++++++++++++ web/client/src/sections/patrolManage/index.js | 15 ++ .../src/sections/patrolManage/nav-item.js | 19 +++ .../sections/patrolManage/reducers/index.js | 5 + .../src/sections/patrolManage/routes.js | 17 +++ web/client/src/utils/webapi.js | 4 + 11 files changed, 323 insertions(+), 1 deletion(-) create mode 100644 web/client/src/sections/patrolManage/actions/index.js create mode 100644 web/client/src/sections/patrolManage/actions/plan.js create mode 100644 web/client/src/sections/patrolManage/components/userModal.js create mode 100644 web/client/src/sections/patrolManage/containers/index.js create mode 100644 web/client/src/sections/patrolManage/containers/patrolPlan.js create mode 100644 web/client/src/sections/patrolManage/index.js create mode 100644 web/client/src/sections/patrolManage/nav-item.js create mode 100644 web/client/src/sections/patrolManage/reducers/index.js create mode 100644 web/client/src/sections/patrolManage/routes.js diff --git a/web/client/src/app.js b/web/client/src/app.js index b1073a0..98d351d 100644 --- a/web/client/src/app.js +++ b/web/client/src/app.js @@ -6,6 +6,7 @@ import Auth from './sections/auth'; import Safetymanage from './sections/safetymanage'; import ProjectRegime from './sections/projectRegime'; import Organization from './sections/organization'; +import PatrolManage from './sections/patrolManage'; const App = props => { const { projectName } = props @@ -17,7 +18,7 @@ const App = props => { return ( ) diff --git a/web/client/src/sections/patrolManage/actions/index.js b/web/client/src/sections/patrolManage/actions/index.js new file mode 100644 index 0000000..aaaafe9 --- /dev/null +++ b/web/client/src/sections/patrolManage/actions/index.js @@ -0,0 +1,7 @@ +'use strict'; + +import * as plan from './plan' + +export default { + ...plan, +} \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/actions/plan.js b/web/client/src/sections/patrolManage/actions/plan.js new file mode 100644 index 0000000..cf3d5f8 --- /dev/null +++ b/web/client/src/sections/patrolManage/actions/plan.js @@ -0,0 +1,46 @@ +'use strict'; + +import { basicAction } from '@peace/utils' +import { ApiTable } from '$utils' + +export function getPatrolPlan() { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'GET_PATROL_PLAN', + url: ApiTable.patrolPlan, + msg: { error: '获取巡检计划失败' }, + }); +} + +export function createPatrolPlan(data) { + return dispatch => basicAction({ + type: 'post', + data, + dispatch: dispatch, + actionType: 'CREATE_PATROL_PLAN', + url: ApiTable.patrolPlan, + msg: { error: '新增巡检计划失败' }, + }); +} + +export function delPatrolPlan(id) { + return dispatch => basicAction({ + type: 'del', + dispatch: dispatch, + actionType: 'DEL_PATROL_PLAN', + url: ApiTable.delPatrolPlan.replace('{id}', id), + msg: { error: '删除巡检计划失败' }, + }); +} + +export function updatePatrolPlan(data) { + return dispatch => basicAction({ + type: 'put', + data, + dispatch: dispatch, + actionType: 'UPDATE_PATROL_PLAN', + url: ApiTable.patrolPlan, + msg: { error: '修改巡检计划失败' }, + }); +} \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/components/userModal.js b/web/client/src/sections/patrolManage/components/userModal.js new file mode 100644 index 0000000..f527e73 --- /dev/null +++ b/web/client/src/sections/patrolManage/components/userModal.js @@ -0,0 +1,72 @@ +import { Button, Form, Input, Modal } from 'antd'; +import React, { useState } from 'react'; + +const UserModal = ({ visible, onCreate, onCancel }) => { + const [form] = Form.useForm(); + const reg_tel = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/; + return ( + { + form.resetFields(); + onCancel(); + }} + onOk={() => { + form + .validateFields() + .then((values) => { + form.resetFields(); + onCreate(values); + }) + .catch((info) => { + console.log('Validate Failed:', info); + }); + }} + > +
+ + + + + + + + + +
+
+ ); +}; + +export default UserModal; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/containers/index.js b/web/client/src/sections/patrolManage/containers/index.js new file mode 100644 index 0000000..4121322 --- /dev/null +++ b/web/client/src/sections/patrolManage/containers/index.js @@ -0,0 +1,5 @@ +'use strict'; + +import PatrolPlan from './patrolPlan'; + +export { PatrolPlan }; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/containers/patrolPlan.js b/web/client/src/sections/patrolManage/containers/patrolPlan.js new file mode 100644 index 0000000..2c20320 --- /dev/null +++ b/web/client/src/sections/patrolManage/containers/patrolPlan.js @@ -0,0 +1,131 @@ +import React, { useState, useRef } from 'react'; +import { connect } from 'react-redux'; +import { Button, Popconfirm } from 'antd'; +import ProTable from '@ant-design/pro-table'; +import UserModal from '../components/userModal'; +import { createPatrolPlan, delPatrolPlan, updatePatrolPlan, getPatrolPlan } from '../actions/plan'; + +function PatrolPlan(props) { + const { dispatch, user } = props; + const tableRef = useRef(); + const [dataSource, setDataSource] = useState([{}]); + const [visible, setVisible] = useState(false); + + const onCreate = (values) => { + console.log(values, 'values') + // dispatch(createEarthquakeUser(values)).then(res => { + // if (res.success) { + // tableRef.current.reload(); + // } + // }) + // setVisible(false); + }; + + const columns = [{ + title: '结构物名称', + dataIndex: 'struName', + key: 'struName', + ellipsis: true + }, { + title: '巡检任务名称', + dataIndex: 'name', + key: 'name', + ellipsis: true + }, { + title: '开始时间', + dataIndex: 'startTime', + key: 'startTime', + ellipsis: true, + }, { + title: '结束时间', + dataIndex: 'endTime', + key: 'endTime', + ellipsis: true, + }, { + title: '巡检频次', + dataIndex: 'frequency', + key: 'frequency', + ellipsis: true, + }, { + title: '巡检点位', + dataIndex: 'patrolPoints', + key: 'patrolPoints', + ellipsis: true, + }, { + title: '巡检人', + dataIndex: 'patrolPerson', + key: 'patrolPerson', + ellipsis: true, + render: (_, record) =>
+ }, { + title: '巡检次数统计', + dataIndex: 'patrolCount', + key: 'patrolCount', + ellipsis: true, + }, { + title: '操作', + dataIndex: 'action', + key: 'action', + search: false, + render: (_, record) => { + return <> + + + { + dispatch(delPatrolPlan(record.id)).then(res => { + if (res.success) { + tableRef.current.reload(); + } + }) + }}> + + + + }, + }]; + + return ( + <> + { + const res = await dispatch(getPatrolPlan(params)); + console.log(res, 'res') + setDataSource(res?.payload.data?.rows); + return { ...res }; + }} + onReset={() => { }} + toolBarRender={() => [ + + ]} + /> + { + setVisible(false); + }} + /> + + ) +} + +function mapStateToProps(state) { + const { auth } = state + return { + user: auth.user + } +} +export default connect(mapStateToProps)(PatrolPlan); diff --git a/web/client/src/sections/patrolManage/index.js b/web/client/src/sections/patrolManage/index.js new file mode 100644 index 0000000..fe6ee58 --- /dev/null +++ b/web/client/src/sections/patrolManage/index.js @@ -0,0 +1,15 @@ +'use strict'; + +import reducers from './reducers'; +import routes from './routes'; +import actions from './actions'; +import { getNavItem } from './nav-item'; + +export default { + key: 'patrolManage', + name: '', + reducers: reducers, + routes: routes, + actions: actions, + getNavItem: getNavItem +}; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/nav-item.js b/web/client/src/sections/patrolManage/nav-item.js new file mode 100644 index 0000000..51174e4 --- /dev/null +++ b/web/client/src/sections/patrolManage/nav-item.js @@ -0,0 +1,19 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { Menu } from 'antd'; +import { SettingOutlined } from '@ant-design/icons'; + +const SubMenu = Menu.SubMenu; + +export function getNavItem(user, dispatch) { + // if (!Func.isAuthorized("ORG_MANAGE")) { + // return null + // } + return ( + } title={'巡检管理'}> + + 巡检计划制定 + + + ); +} \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/reducers/index.js b/web/client/src/sections/patrolManage/reducers/index.js new file mode 100644 index 0000000..0203d01 --- /dev/null +++ b/web/client/src/sections/patrolManage/reducers/index.js @@ -0,0 +1,5 @@ +'use strict'; + +export default { + +}; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/routes.js b/web/client/src/sections/patrolManage/routes.js new file mode 100644 index 0000000..e8e874c --- /dev/null +++ b/web/client/src/sections/patrolManage/routes.js @@ -0,0 +1,17 @@ +'use strict'; +import { PatrolPlan } from './containers'; + +export default [{ + type: 'inner', + route: { + path: '/patrolManage', + key: 'patrolManage', + breadcrumb: '巡检管理', + childRoutes: [{ + path: '/patrolPlan', + key: 'patrolPlan', + component: PatrolPlan, + breadcrumb: '巡检计划制定', + }] + } +}]; \ No newline at end of file diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 8d5e9ff..e09a8a2 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -19,6 +19,10 @@ export const ApiTable = { delUser: 'organization/department/user/{ids}', resetPwd: '/organization/department/user/resetPwd/{id}', + // 巡检计划 + patrolPlan: 'patrolPlan', // 增改查 + delPatrolPlan: 'patrolPlan/{id}', + // 用户权限 getResource: 'resource', getUserResource: 'user/resource', From 3c11974c662ef44db83e2456095f8ba375ecf0e7 Mon Sep 17 00:00:00 2001 From: Archer_cdm Date: Mon, 16 Jan 2023 23:52:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=EF=BC=88*=EF=BC=89=E9=83=A8=E5=88=86UI?= =?UTF-8?q?=E6=90=AD=E5=BB=BA--=E5=BC=80=E5=A7=8B=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E3=80=81=E5=B7=A1=E6=A3=80=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/app.json | 9 +- weapp/images/down.svg | 1 + weapp/package/basic/basic.wxml | 2 +- .../inspectionRecord/inspectionRecord.js | 85 +++++++++++ .../inspectionRecord/inspectionRecord.json | 6 + .../inspectionRecord/inspectionRecord.wxml | 40 +++++ .../inspectionRecord/inspectionRecord.wxss | 47 ++++++ weapp/package/polling/polling.js | 18 ++- weapp/package/polling/polling.wxml | 21 ++- weapp/package/polling/polling.wxss | 38 +++++ .../startInspection/startInspection.js | 138 ++++++++++++++++++ .../startInspection/startInspection.json | 6 + .../startInspection/startInspection.wxml | 87 +++++++++++ .../startInspection/startInspection.wxss | 85 +++++++++++ weapp/pages/index/index.wxml | 2 +- weapp/project.private.config.json | 28 +--- 16 files changed, 580 insertions(+), 33 deletions(-) create mode 100644 weapp/images/down.svg create mode 100644 weapp/package/inspectionRecord/inspectionRecord.js create mode 100644 weapp/package/inspectionRecord/inspectionRecord.json create mode 100644 weapp/package/inspectionRecord/inspectionRecord.wxml create mode 100644 weapp/package/inspectionRecord/inspectionRecord.wxss create mode 100644 weapp/package/startInspection/startInspection.js create mode 100644 weapp/package/startInspection/startInspection.json create mode 100644 weapp/package/startInspection/startInspection.wxml create mode 100644 weapp/package/startInspection/startInspection.wxss diff --git a/weapp/app.json b/weapp/app.json index ca7ade1..0a09b15 100644 --- a/weapp/app.json +++ b/weapp/app.json @@ -9,7 +9,9 @@ "root": "package", "pages": [ "polling/polling", - "basic/basic" + "basic/basic", + "startInspection/startInspection", + "inspectionRecord/inspectionRecord" ] }], "window": { @@ -41,5 +43,10 @@ } ] }, + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + } + }, "sitemapLocation": "sitemap.json" } \ No newline at end of file diff --git a/weapp/images/down.svg b/weapp/images/down.svg new file mode 100644 index 0000000..d3a9661 --- /dev/null +++ b/weapp/images/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/weapp/package/basic/basic.wxml b/weapp/package/basic/basic.wxml index b308372..720786e 100644 --- a/weapp/package/basic/basic.wxml +++ b/weapp/package/basic/basic.wxml @@ -22,7 +22,7 @@ 部门: - 管理部门 + {{userInfo.deptName || '--'}} diff --git a/weapp/package/inspectionRecord/inspectionRecord.js b/weapp/package/inspectionRecord/inspectionRecord.js new file mode 100644 index 0000000..2b1eea3 --- /dev/null +++ b/weapp/package/inspectionRecord/inspectionRecord.js @@ -0,0 +1,85 @@ +// package/inspectionRecord/inspectionRecord.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + ResList: [ //阅读状态 + { + value: 'normal', + text: '正常', + }, + { + value: 'abnormal', + text: '异常', + } + ], + ResIndex: 0, //巡检结果 + dataList: [1, 2, 3, 4, 5,] + }, + + // 巡检结果 + bindPickerRes(e) { + let that = this; + that.setData({ + ResIndex: e.detail.value + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/weapp/package/inspectionRecord/inspectionRecord.json b/weapp/package/inspectionRecord/inspectionRecord.json new file mode 100644 index 0000000..3656c38 --- /dev/null +++ b/weapp/package/inspectionRecord/inspectionRecord.json @@ -0,0 +1,6 @@ +{ + "navigationBarBackgroundColor": "#1979ff", + "navigationBarTextStyle": "white", + "navigationBarTitleText": "巡检记录", + "enablePullDownRefresh": false +} \ No newline at end of file diff --git a/weapp/package/inspectionRecord/inspectionRecord.wxml b/weapp/package/inspectionRecord/inspectionRecord.wxml new file mode 100644 index 0000000..8d7a7ff --- /dev/null +++ b/weapp/package/inspectionRecord/inspectionRecord.wxml @@ -0,0 +1,40 @@ + + + + 时间范围: + + 2022-12-15 + + 2022-12-26 + + + + 巡检结果: + + {{ResList[ResIndex].text}} + + + + + + + + + + + 结构物A + + + 本次巡检日期:2022-12-21 17:00 + + + 巡检人:巡检人 + + + 巡检结果:异常 + + 查看详情 + + + + \ No newline at end of file diff --git a/weapp/package/inspectionRecord/inspectionRecord.wxss b/weapp/package/inspectionRecord/inspectionRecord.wxss new file mode 100644 index 0000000..e981149 --- /dev/null +++ b/weapp/package/inspectionRecord/inspectionRecord.wxss @@ -0,0 +1,47 @@ +/* package/inspectionRecord/inspectionRecord.wxss */ +page{ + background: #F7F7FA; +} + +.my-picker { + white-space: nowrap; + width: 100rpx; +} + +.contentBox { + padding: 210rpx 30rpx 20rpx; +} + +.listBox { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0rpx 0rpx 10rpx #ddd; + margin: 30rpx auto; + overflow: hidden; +} + +.titleBox { + overflow: hidden; + padding-bottom: 20rpx; + padding-top: 40rpx; +} + +.title { + float: left; + font-size: 32rpx; + width: 460rpx; + font-weight: bold; +} + +.btn { + width: 130rpx; + text-align: center; + font-size: 30rpx; + padding: 20rpx; + background: #1979ff; + color: #fff; + border-radius: 10rpx; + float: left; + margin-left: 30rpx; + margin-top: 20rpx; +} \ No newline at end of file diff --git a/weapp/package/polling/polling.js b/weapp/package/polling/polling.js index 2cee9c4..73f31cf 100644 --- a/weapp/package/polling/polling.js +++ b/weapp/package/polling/polling.js @@ -5,12 +5,26 @@ Page({ * 页面的初始数据 */ data: { - + dataList: [1, 2, 3, 4, 5,] }, // 顶部tab切换 clickTab(e) { - + this.setData({ + currentTab: e.currentTarget.dataset.current + }) + if (e.currentTarget.dataset.current == '0') { + wx.navigateTo({ + url: '/package/inspectionRecord/inspectionRecord', + }) + } + }, + + // 开始巡检 + bindStart() { + wx.navigateTo({ + url: '/package/startInspection/startInspection', + }) }, /** diff --git a/weapp/package/polling/polling.wxml b/weapp/package/polling/polling.wxml index 245eab7..4429a68 100644 --- a/weapp/package/polling/polling.wxml +++ b/weapp/package/polling/polling.wxml @@ -6,6 +6,25 @@ - 待巡检 + 待巡检 + + + + + + + + 结构物A巡检计划 + + + 计划时间:2022-12-21至2023-01-15 + + + 计划时间:周期巡检(3天一次) + + 开始巡检 + + + \ No newline at end of file diff --git a/weapp/package/polling/polling.wxss b/weapp/package/polling/polling.wxss index 499c174..5df3410 100644 --- a/weapp/package/polling/polling.wxss +++ b/weapp/package/polling/polling.wxss @@ -30,4 +30,42 @@ .active { color: #1979ff; position: relative; +} + +.contentBox { + padding: 210rpx 30rpx 20rpx; +} + +.listBox { + background-color: #fff; + border-radius: 10rpx; + box-shadow: 0rpx 0rpx 10rpx #ddd; + margin: 30rpx auto; + overflow: hidden; +} + +.titleBox { + overflow: hidden; + padding-bottom: 20rpx; + padding-top: 40rpx; +} + +.title { + float: left; + font-size: 32rpx; + width: 460rpx; + font-weight: bold; +} + +.btn { + width: 130rpx; + text-align: center; + font-size: 30rpx; + padding: 20rpx; + background: #1979ff; + color: #fff; + border-radius: 10rpx; + float: left; + margin-left: 30rpx; + margin-top: 20rpx; } \ No newline at end of file diff --git a/weapp/package/startInspection/startInspection.js b/weapp/package/startInspection/startInspection.js new file mode 100644 index 0000000..f42f352 --- /dev/null +++ b/weapp/package/startInspection/startInspection.js @@ -0,0 +1,138 @@ +// package/startInspection/startInspection.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + dataList: [1, 2, 3] + }, + + handleChangeTwo(e) { + this.setData({ + changeTwo: e.detail.value + }) + }, + + handleChangeThree(e) { + this.setData({ + changeThree: e.detail.value + }) + }, + + showModal() { + this.setData({ + showModal: true + }) + }, + + bindCancel() { + this.setData({ + showModal: false + }) + }, + + selfLocation() { + const self = this + wx.showLoading({ + title: '定位中', + mask: true, + }); + wx.getLocation({ + type: 'gcj02', + success: (res) => { + let latitude, longitude; + latitude = res.latitude.toString(); + longitude = res.longitude.toString(); + this.latitude = res.latitude + this.longitude = res.longitude + getGeocoder({ lat: latitude, long: longitude }).then(res => { // 获取详细信息的接口 + const data = res.data; + self.userAddress.userAddressdetail = '' + var params = { + text: data.address + } + parseAddress(params).then(res => { // 粘贴详细信息的接口 + console.log(res) + if (res.status == 200 && res.message == "success") { + this.$forceUpdate(); // 定位后,界面没有反应,因此加上强制刷新 + this.userAddress.userAddressdetail = res.data.town + res.data.detail; + this.$set(this.userAddress, 'selectAddress', parseInt(res.data.county_info.city_id)); + this.addressInfo[0] = res.data.province_info ? res.data.province_info : {}; + this.addressInfo[1] = res.data.city_info ? res.data.city_info : {}; + this.addressInfo[2] = res.data.county_info ? res.data.county_info : {}; + } + }).catch(res => { + console.log("没有地址信息") + }) + wx.hideLoading(); + }) + }, + fail: (res) => { + console.log(res) + wx.hideLoading(); + wx.showToast({ + title: res.errMsg, + icon: 'none', + duration: 1000 + }); + } + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/weapp/package/startInspection/startInspection.json b/weapp/package/startInspection/startInspection.json new file mode 100644 index 0000000..40e7348 --- /dev/null +++ b/weapp/package/startInspection/startInspection.json @@ -0,0 +1,6 @@ +{ + "navigationBarBackgroundColor": "#1979ff", + "navigationBarTextStyle": "white", + "navigationBarTitleText": "开始巡检", + "enablePullDownRefresh": false +} \ No newline at end of file diff --git a/weapp/package/startInspection/startInspection.wxml b/weapp/package/startInspection/startInspection.wxml new file mode 100644 index 0000000..e71c9f8 --- /dev/null +++ b/weapp/package/startInspection/startInspection.wxml @@ -0,0 +1,87 @@ + + + 巡检要求 + + 结构物名称 + 结构物名称 + + + 开始时间 + 2022-12-25 + + + 结束时间 + 2023-01-15 + + + 巡检方式 + 周期巡检 + + + 巡检频次 + 3天一次 + + + 巡检人 + 巡检人 + + + 巡检单位 + 巡检单位 + + + 巡检点位 + 点位A、点位B、点位C + + + 巡检结果录入 + + + + 巡检点位 + 点位A + 开始巡检 + + + 上次巡检日期 + 2022-10-26 + + + 巡检人 + 巡检人A + + + 本次巡检日期 + 2022-12-23 + + + + + + + + 当前点位: + 点位A + + + 当前位置: + 点位A + + + 正常 + 异常 + + + + 轻微 + 中度 + 严重 + + + 取消 + 提交 + + + + + \ No newline at end of file diff --git a/weapp/package/startInspection/startInspection.wxss b/weapp/package/startInspection/startInspection.wxss new file mode 100644 index 0000000..619c2ee --- /dev/null +++ b/weapp/package/startInspection/startInspection.wxss @@ -0,0 +1,85 @@ +/* package/startInspection/startInspection.wxss */ +.box { + width: 696rpx; + margin: 0 auto; + padding: 30rpx 0; +} + +.titleFirst { + font-size: 32rpx; + margin-bottom: 30rpx; +} + +.txt { + width: 100%; + overflow: hidden; + margin-bottom: 40rpx; + color: #333; + font-size: 28rpx; +} + +.line { + width: 100%; + height: 2rpx; + background: #ccc; + margin-bottom: 40rpx; +} + +.startBtn { + float: right; + padding: 10rpx 20rpx; + background: #1979ff; + color: #fff; + border-radius: 10rpx; + font-size: 26rpx; +} + +.modal { + background: rgba(0, 0, 0, 0.6); + width: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 10; + height: 100%; +} + +.popBox { + position: absolute; + top: 50%; + left: 50%; + z-index: 1000; + background: #fff; + width: 95%; + margin-left: -356rpx; + margin-top: -500rpx; + padding: 20rpx 0; +} + +.btnBox { + padding: 30rpx; + overflow: hidden; + font-size: 30rpx; +} + +.cancel { + width: 180rpx; + float: left; + text-align: center; + background: #fff; + border: 2rpx solid #1979ff; + border-radius: 10rpx; + padding: 12rpx 0; + color: #1979ff; +} + +.submit { + width: 180rpx; + float: right; + text-align: center; + border-radius: 10rpx; + padding: 12rpx 0; + background: #1979ff; + color: #fff; + border: 2rpx solid #1979ff; +} \ No newline at end of file diff --git a/weapp/pages/index/index.wxml b/weapp/pages/index/index.wxml index c584a56..13e3f48 100644 --- a/weapp/pages/index/index.wxml +++ b/weapp/pages/index/index.wxml @@ -8,7 +8,7 @@ - + diff --git a/weapp/project.private.config.json b/weapp/project.private.config.json index 9e505b5..dabc5aa 100644 --- a/weapp/project.private.config.json +++ b/weapp/project.private.config.json @@ -5,32 +5,6 @@ "compileHotReLoad": false, "urlCheck": false }, - "condition": { - "miniprogram": { - "list": [ - { - "name": "", - "pathName": "pages/login/login", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "package/polling/polling", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "package/basic/basic", - "query": "", - "launchMode": "default", - "scene": null - } - ] - } - }, + "condition": {}, "libVersion": "2.29.0" } \ No newline at end of file From f6ffeea23e965c0d4f9e47dc75abb5dfcc786379 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Tue, 17 Jan 2023 09:19:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?user=20id=20=E4=B8=BB=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/1.0.0/schema/1.init_inspection.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/1.0.0/schema/1.init_inspection.sql b/script/1.0.0/schema/1.init_inspection.sql index 83480a9..7d428ae 100644 --- a/script/1.0.0/schema/1.init_inspection.sql +++ b/script/1.0.0/schema/1.init_inspection.sql @@ -7,7 +7,7 @@ START 1 CACHE 1; DROP TABLE IF EXISTS "public"."user"; CREATE TABLE "public"."user" ( - "id" int4 NOT NULL DEFAULT nextval('user_id_seq'::regclass), + "id" int4 NOT NULL PRIMARY KEY DEFAULT nextval('user_id_seq'::regclass), "name" varchar(64) COLLATE "pg_catalog"."default" NOT NULL, "username" varchar(64) COLLATE "pg_catalog"."default" NOT NULL, "password" varchar(512) COLLATE "pg_catalog"."default" NOT NULL,