dong преди 1 месец
родител
ревизия
28dd119dbd
променени са 51 файла, в които са добавени 1350 реда и са изтрити 4679 реда
  1. 0
    147
      pages/device/index.js
  2. 0
    5
      pages/device/index.json
  3. 0
    39
      pages/device/index.wxml
  4. 0
    48
      pages/device/index.wxss
  5. 2
    8
      pages/equipment/index.js
  6. 0
    0
      pages/equipment/index.json
  7. 2
    0
      pages/equipment/index.wxml
  8. 1
    0
      pages/equipment/index.wxss
  9. 320
    215
      pages/index/index.js
  10. 6
    8
      pages/index/index.json
  11. 88
    103
      pages/index/index.wxml
  12. 147
    313
      pages/index/index.wxss
  13. 66
    0
      pages/login/index copy.wxml
  14. 8
    1
      pages/login/index.js
  15. 6
    47
      pages/login/index.wxml
  16. 18
    13
      pages/login/index.wxss
  17. 0
    6
      pages/malfunction/index.json
  18. 0
    30
      pages/malfunction/index.wxml
  19. 0
    53
      pages/malfunction/index.wxss
  20. 395
    0
      pages/map/index.js
  21. 6
    0
      pages/map/index.json
  22. 68
    0
      pages/map/index.wxml
  23. 155
    0
      pages/map/index.wxss
  24. 0
    180
      pages/personalInfo/index.js
  25. 0
    45
      pages/personalInfo/index.wxml
  26. 0
    64
      pages/personalInfo/index.wxss
  27. 0
    288
      pages/scheduling/index.js
  28. 0
    9
      pages/scheduling/index.json
  29. 0
    50
      pages/scheduling/index.wxml
  30. 0
    187
      pages/scheduling/index.wxss
  31. 1
    1
      pages/setup/index.wxss
  32. 3
    3
      pages/setuplevel/index.wxss
  33. 0
    164
      pages/statistics/index.js
  34. 0
    6
      pages/statistics/index.json
  35. 0
    109
      pages/statistics/index.wxml
  36. 0
    93
      pages/statistics/index.wxss
  37. 6
    129
      pages/tool/index.js
  38. 18
    130
      pages/tool/index.wxml
  39. 34
    293
      pages/tool/index.wxss
  40. 0
    336
      pages/workorder/index.js
  41. 0
    9
      pages/workorder/index.json
  42. 0
    182
      pages/workorder/index.wxml
  43. 0
    160
      pages/workorder/index.wxss
  44. 0
    503
      pages/workorderdetails/index.js
  45. 0
    13
      pages/workorderdetails/index.json
  46. 0
    174
      pages/workorderdetails/index.wxml
  47. 0
    285
      pages/workorderdetails/index.wxss
  48. 0
    76
      pages/workorderstep/index.js
  49. 0
    8
      pages/workorderstep/index.json
  50. 0
    51
      pages/workorderstep/index.wxml
  51. 0
    95
      pages/workorderstep/index.wxss

+ 0
- 147
pages/device/index.js Целия файл

@@ -1,147 +0,0 @@
1
-// pages/device/index.js
2
-const api = require('../../api/index.js');
3
-
4
-Page({
5
-
6
-  /**
7
-   * 页面的初始数据
8
-   */
9
-  data: {
10
-    devicedata:[],
11
-    latitude:'',
12
-    longitude:'',
13
-    accuracy:'',
14
-    array:['南山','临平','其他'],
15
-    index:0
16
-  },
17
-
18
-  /**
19
-   * 生命周期函数--监听页面加载
20
-   */
21
-  onLoad(options) {
22
-
23
-  },
24
-
25
-  /**
26
-   * 生命周期函数--监听页面初次渲染完成
27
-   */
28
-  onReady() {
29
-this.getdevice()
30
-  },
31
-  getdevice(){
32
-    let data = {
33
-    }
34
-    api.request(`/device/selectdevice`, 'POST',data)
35
-    .then((res) => {
36
-      console.log(res);
37
-      if (res.code==200) {
38
-       
39
-                      for (let index = 0; index < res.data.length; index++) {
40
-                        if (res.data[index].devicesLatitudelongitude) {
41
-          
42
-                          res.data[index].devicesLatitudelongitude=res.data[index].devicesLatitudelongitude.split(",")
43
-                        }
44
-                      }
45
-        this.setData({
46
-          devicedata : res.data
47
-        })
48
-      }
49
-  
50
-    })
51
-    .catch((err) => {
52
-      console.error('请求失败:', err);
53
-      // 在这里处理请求失败的情况
54
-    });
55
-  },
56
-  // 设置当前经纬度
57
-    // 提取获取位置的具体逻辑
58
-    getLocation(e) {
59
-      console.log(e.target.dataset.id);
60
-      const that = this;
61
-      wx.getLocation({
62
-        type: 'wgs84',
63
-        isHighAccuracy:true,
64
-        success: (res) => {
65
-          console.log('位置获取成功:', res);
66
-          that.setData({
67
-            latitude: res.latitude,
68
-            longitude: res.longitude,
69
-            accuracy:res.accuracy
70
-          });
71
-          console.log(this.data.latitude);
72
-          console.log(this.data.longitude);
73
-          that.getpositioning(res.longitude,res.latitude,e.target.dataset.id);
74
-        },
75
-        fail: (err) => {
76
-          console.error('获取位置失败:', err);
77
-          wx.showToast({
78
-            title: '获取位置失败,请重试',
79
-            icon: 'none'
80
-          });
81
-        }
82
-      })},
83
-      getpositioning(latitude,longitude,id){
84
-        let data = {
85
-          deviceId:id,
86
-          latitudelongitude:latitude+','+longitude
87
-        }
88
-        api.request(`/device/updatelatit`, 'POST',data)
89
-        .then((res) => {
90
-          console.log(res);
91
-          if (res.code==200) {
92
-            wx.showToast({
93
-              title: '位置获取成功',
94
-              icon: 'none'
95
-            });
96
-this.getdevice()
97
-          
98
-          }
99
-      
100
-        })
101
-        .catch((err) => {
102
-          console.error('请求失败:', err);
103
-          // 在这里处理请求失败的情况
104
-        });
105
-      },
106
-  /**
107
-   * 生命周期函数--监听页面显示
108
-   */
109
-  onShow() {
110
-
111
-  },
112
-
113
-  /**
114
-   * 生命周期函数--监听页面隐藏
115
-   */
116
-  onHide() {
117
-
118
-  },
119
-
120
-  /**
121
-   * 生命周期函数--监听页面卸载
122
-   */
123
-  onUnload() {
124
-
125
-  },
126
-
127
-  /**
128
-   * 页面相关事件处理函数--监听用户下拉动作
129
-   */
130
-  onPullDownRefresh() {
131
-
132
-  },
133
-
134
-  /**
135
-   * 页面上拉触底事件的处理函数
136
-   */
137
-  onReachBottom() {
138
-
139
-  },
140
-
141
-  /**
142
-   * 用户点击右上角分享
143
-   */
144
-  onShareAppMessage() {
145
-
146
-  }
147
-})

+ 0
- 5
pages/device/index.json Целия файл

@@ -1,5 +0,0 @@
1
-{
2
-  "usingComponents": {
3
-    "t-icon": "tdesign-miniprogram/icon/icon"
4
-  }
5
-}

+ 0
- 39
pages/device/index.wxml Целия файл

@@ -1,39 +0,0 @@
1
-<!--pages/device/index.wxml-->
2
-<view class="device">
3
-<!-- <view class="equipment">
4
-  <picker bindcolumnchange="bindcolumn" bindchange="bindeventChange" value="{{index}}" range="{{array}}">
5
-					<view class="calculation_top">
6
-						<view class="calculation_left">
7
-             选择电站:
8
-						</view>
9
-            <view class="event">
10
-						<view class="uni-input">{{array[index]}}</view>
11
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
12
-            </view>
13
-					</view>
14
-				</picker>
15
-</view> -->
16
-<view class="device_box" wx:for="{{devicedata}}" wx:key="index">
17
-<view class="device_and">
18
-<view>
19
-<text class="device_color">资产编码:</text> {{item.deviceId}}
20
-</view>
21
-
22
-<!-- <view class="device_latitude" data-id="{{item.deviceId}}" bind:tap="getLocation" wx:if="{{item.devicesLatitudelongitude.length==0||item.devicesLatitudelongitude==null}}">获取当前经纬度</view> -->
23
-<!-- <view>{{accuracy}}</view>
24
-<view class="device_latitude" data-id="{{item.deviceId}}" bind:tap="getLocation">获取当前经纬度</view> -->
25
-</view>
26
-<view class="device_content">
27
-<text class="device_color">资产名称:</text> {{item.devicesName}}</view>
28
-<view class="device_content">
29
-<text class="device_color">设备所属:</text> {{item.powerstationName}} > {{item.regionName}}
30
-</view>
31
-<view class="device_content"><text class="device_color">经度:</text> {{item.devicesLatitudelongitude[0]||'--'}}</view>
32
-<view class="device_content"><text class="device_color">纬度:</text> {{item.devicesLatitudelongitude[1]||'--'}}</view>
33
-<view class="device_content">
34
-<text class="device_color">设备地址:</text> {{item.devicesAddress}}
35
-</view>
36
-</view>
37
-
38
-
39
-</view>

+ 0
- 48
pages/device/index.wxss Целия файл

@@ -1,48 +0,0 @@
1
-/* pages/device/index.wxss */
2
-page{
3
-  background-color: #f7f7f7;
4
-  box-sizing: border-box;
5
-}
6
-.device{
7
-  width: 100%;
8
-  height: 100%;
9
-padding: 10rpx 20rpx 20rpx 20rpx;
10
-box-sizing: border-box;
11
-}
12
-.device_box{
13
-  width: 100%;
14
-  background-color: #ffffff;
15
-  border-radius: 10rpx;
16
-  padding: 20rpx;
17
-  box-sizing: border-box;
18
-  margin-top: 20rpx;
19
-}
20
-.device_content{
21
-margin-top: 20rpx;
22
-}
23
-.device_color{
24
-  color: #cccccc;
25
-}
26
-.device_and{
27
-  display: flex;
28
-  align-items: center;
29
-  justify-content: space-between;
30
-}
31
-.device_latitude{
32
- padding: 10rpx 20rpx;
33
-display: flex;
34
-align-items: center;
35
-justify-content: center;
36
-box-sizing: border-box;
37
-color: #ffffff;
38
-background-color: #0F80DC;
39
-border-radius: 10rpx;
40
-}
41
-.equipment{
42
-  padding: 20rpx;
43
-background-color: #ffffff;
44
-border-radius: 10rpx;
45
-}
46
-.calculation_top{
47
-  display: flex;
48
-}

pages/malfunction/index.js → pages/equipment/index.js Целия файл

@@ -1,4 +1,4 @@
1
-// pages/malfunction/index.js
1
+// pages/equipment/index.js
2 2
 Page({
3 3
 
4 4
   /**
@@ -14,13 +14,7 @@ Page({
14 14
   onLoad(options) {
15 15
 
16 16
   },
17
-  toconfigure(e){
18
-    console.log(e.currentTarget.dataset.name);
19
- wx.navigateTo({
20
-   url: `/pages/workorder/index?name=${e.currentTarget.dataset.name}`,
21
- })
22
-  },
23
-  
17
+
24 18
   /**
25 19
    * 生命周期函数--监听页面初次渲染完成
26 20
    */

pages/personalInfo/index.json → pages/equipment/index.json Целия файл


+ 2
- 0
pages/equipment/index.wxml Целия файл

@@ -0,0 +1,2 @@
1
+<!--pages/equipment/index.wxml-->
2
+<text>pages/equipment/index.wxml</text>

+ 1
- 0
pages/equipment/index.wxss Целия файл

@@ -0,0 +1 @@
1
+/* pages/equipment/index.wxss */

+ 320
- 215
pages/index/index.js Целия файл

@@ -1,241 +1,346 @@
1
-// pages/privacy/index.js
2
-const api = require('../../api/index.js');
3
-
4 1
 Page({
5
-
6
-  /**
7
-   * 页面的初始数据
8
-   */
9 2
   data: {
10
-    // 状态栏高度
11
- statusBarHeight:'',
12
- // 导航栏高度
13
- navBarHeight:'',
14
- // 导航栏和状态栏高度
15
- navStatusBarHeight: '',
16
- // 胶囊
17
- menu:'',
18
- workorder:[],
19
- reviewdata:[]
3
+    // 地图初始中心坐标(北京市中心)
4
+    longitude: 116.404,
5
+    latitude: 39.915,
6
+    scale: 14,
7
+    markers: [],
8
+    polyline: [],
9
+    startLocation: {},
10
+    endLocation: {},
11
+    showTripInfo: true,
12
+    showCallButton: true,
13
+    showDriverInfo: true,
14
+    carsNearby: 0,
15
+    // 司机信息
16
+    driverAvatar: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
17
+    driverName: '王师傅',
18
+    carNumber: '京A88888',
19
+    estimatedArrival: 5
20 20
   },
21
-
22
-  /**
23
-   * 生命周期函数--监听页面加载
24
-   */
25
-  onLoad(options) {
26
- this.getuser()
27
- this.getShowScreenHeight()
28
-this.setData({
29
-  statusBarHeight:wx.getStorageSync('statusBarHeight'),
30
-  navBarHeight: wx.getStorageSync('navBarHeight'),
31
-  navStatusBarHeight:wx.getStorageSync('navStatusBarHeight'),
32
-  menu:wx.getStorageSync('menu')
33
-})
21
+// 新世界百货
22
+  onLoad() {
23
+    // 初始化地图
24
+    this.initMap();
25
+    
26
+    // 加载附近车辆数据
27
+    this.loadNearbyCars();
34 28
   },
35
-  getShowScreenHeight(){
36
-    //系统信息
37
-    const systemInfo = wx.getWindowInfo()
38
-    //胶囊位置
39
-    const capsuleInfo = wx.getMenuButtonBoundingClientRect()
40
-    //计算导航栏高度
41
-    let navHeight = systemInfo.statusBarHeight + capsuleInfo.height + (capsuleInfo.top - systemInfo.statusBarHeight) * 2
42
-    //计算tabbar高度    
43
-    let tabHeight = systemInfo.safeArea.bottom - systemInfo.safeArea.height
44
-    //计算可现实内容高度(中间区域)
45
-    // let screenHeight = systemInfo.screenHeight-navHeight-tabHeight-30
46
-
47
-
48
-  const menu =  wx.getMenuButtonBoundingClientRect()
49
-  wx.setStorageSync('menu', menu)
50
-    // 手机系统状态栏高度
51
-    wx.setStorageSync('statusBarHeight', tabHeight)
52
-   // 导航栏高度
53
-   wx.setStorageSync('navBarHeight', menu.height+(menu.top-systemInfo.statusBarHeight) *2 )
54
-  
55
-   // 状态栏加导航栏
56 29
 
57
-   wx.setStorageSync('navStatusBarHeight',navHeight)
58
- 
59
-  },
60
-  getuser(){
61
-    api.request(`/partner/selectinformation`, 'POST',{})
62
-    .then((res) => {
63
-                 // 设置数据到本地存储
64
-                 wx.setStorage({
65
-                  key: 'partnerPosition',  // 存储的key值
66
-                  data:res.data,
67
-                  success: function(ress) {
68
-                
69
-                    // wx.getStorageSync('token');
70
-                  }
71
-                });
72
-    })
73
-    .catch((err) => {
74
-      console.error('请求失败:', err);
75
-      // 在这里处理请求失败的情况
30
+  // 初始化地图,获取用户位置
31
+  initMap() {
32
+    const that = this;
33
+    
34
+    // 获取用户当前位置
35
+    wx.getLocation({
36
+      type: 'gcj02', // 国测局坐标系,微信地图使用该坐标系
37
+      success(res) {
38
+        const longitude = res.longitude;
39
+        const latitude = res.latitude;
40
+        
41
+        // 更新地图中心位置
42
+        that.setData({
43
+          longitude,
44
+          latitude,
45
+          startLocation: {
46
+            longitude,
47
+            latitude,
48
+            name: '我的位置'
49
+          },
50
+          // 添加起点标记
51
+          markers: [{
52
+            id: 0,
53
+            longitude,
54
+            latitude,
55
+            iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
56
+            width: 40,
57
+            height: 40,
58
+            anchor: {x: 0.5, y: 1}
59
+          }]
60
+        });
61
+        
62
+        // 逆地址解析,获取位置名称
63
+        that.reverseGeocoder(longitude, latitude, 'start');
64
+      },
65
+      fail() {
66
+        wx.showToast({
67
+          title: '无法获取位置,请检查权限',
68
+          icon: 'none'
69
+        });
70
+      }
76 71
     });
77 72
   },
78
-  getworkoder(){
79
-    let data = {
80
-      workorderType:''
81
-    }
82
-    api.request(`/workoder/statistics`, 'POST',data)
83
-    .then((res) => {
84
-      console.log(res);
85
-      this.setData({
86
-        workorder:res.data
87
-      })
88
-    })
89
-    .catch((err) => {
90
-      console.error('请求失败:', err);
91
-      // 在这里处理请求失败的情况
73
+
74
+  // 逆地址解析,将经纬度转换为地址名称
75
+  reverseGeocoder(longitude, latitude, type) {
76
+   let _this = this 
77
+    wx.request({
78
+      url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=VRGBZ-ZFRHB-SKIUP-NHHJ3-TXGJT-ZIFG3`,
79
+      success(res) {
80
+        if (res.data.status === 0) {
81
+          const address = res.data.result.address;
82
+          if (type === 'start') {
83
+            _this.setData({
84
+              'startLocation.name': address
85
+            });
86
+          } else if (type === 'end') {
87
+            _this.setData({
88
+              'endLocation.name': address
89
+            });
90
+          }
91
+        }
92
+      },
93
+      fail() {
94
+        wx.showToast({
95
+          title: '地址解析失败',
96
+          icon: 'none'
97
+        });
98
+      }
92 99
     });
93 100
   },
94
-  getreview(){
95
-    let data = {
96
-      workorderName:'',
97
-      workorderType:'',
98
-      workorderAddress:'',
99
-      starttime:'',
100
-      type:'',
101
-      examineType:5
102
-    }
103
-    api.request(`/workoder/selectworkoder`, 'POST',data)
104
-    .then((res) => {
105
-      console.log(res);
101
+  // 更新地图标记和路线
102
+  updateMarkersAndRoute() {
103
+    const { startLocation, endLocation } = this.data;
104
+    
105
+    // 如果起点和终点都存在
106
+    if (startLocation.longitude && endLocation.longitude) {
107
+      // 更新标记
108
+      const markers = [
109
+        {
110
+          id: 0,
111
+          longitude: startLocation.longitude,
112
+          latitude: startLocation.latitude,
113
+          iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
114
+          width: 40,
115
+          height: 40,
116
+          anchor: {x: 0.5, y: 1}
117
+        },
118
+        {
119
+          id: 1,
120
+          longitude: endLocation.longitude,
121
+          latitude: endLocation.latitude,
122
+          iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png',
123
+          width: 40,
124
+          height: 40,
125
+          anchor: {x: 0.5, y: 1}
126
+        }
127
+      ];
128
+      
129
+      // 绘制路线AI云盘
130
+      const polyline = [{
131
+        points: [
132
+          {
133
+            longitude: startLocation.longitude,
134
+            latitude: startLocation.latitude
135
+          },
136
+          {
137
+            longitude: endLocation.longitude,
138
+            latitude: endLocation.latitude
139
+          }
140
+        ],
141
+        color: "#2C85FF",
142
+        width: 6,
143
+        dottedLine: false
144
+      }];
145
+      
146
+      // 计算距离和费用
147
+      const distance = this.calculateDistance(
148
+        startLocation.latitude, startLocation.longitude,
149
+        endLocation.latitude, endLocation.longitude
150
+      );
151
+      
152
+      // 简单的费用计算模型:起步价13元,超过3公里后每公里2.3元
153
+      let price = 13;
154
+      if (distance > 3) {
155
+        price += (distance - 3) * 2.3;
156
+      }
157
+      
106 158
       this.setData({
107
-        reviewdata:res.data
108
-      })
109
-    })
110
-    .catch((err) => {
111
-      console.error('请求失败:', err);
112
-      // 在这里处理请求失败的情况
113
-    });
114
-  },
115
-  rolelocate(e){
116
-    console.log(e.currentTarget.dataset.index);
117
-    if (e.currentTarget.dataset.index==1) {
118
- if (wx.getStorageSync('partnerPosition').partnerPosition==1) {
119
-  wx.showToast({
120
-    title: '暂无权限',
121
-    icon: 'none'
122
-  });
123
-    return
124
- }
125
-      wx.navigateTo({
126
-        url: '/pages/malfunction/index',
127
-      })   
128
-    }else if(e.currentTarget.dataset.index==2){
129
-      wx.navigateTo({
130
-        url: '/pages/statistics/index',
131
-      })   
132
-    }else if(e.currentTarget.dataset.index==3){
133
-      wx.navigateTo({
134
-        url: '/pages/device/index',
135
-      })   
136
-    }else if(e.currentTarget.dataset.index==4){
137
-      wx.navigateTo({
138
-        url: '/pages/scheduling/index',
139
-      })  
159
+        markers,
160
+        polyline,
161
+        distance: distance.toFixed(1),
162
+        estimatedPrice: Math.round(price),
163
+        showTripInfo: true,
164
+        showCallButton: true
165
+      });
166
+    } else if (startLocation.longitude) {
167
+      // 只有起点
168
+      this.setData({
169
+        markers: [{
170
+          id: 0,
171
+          longitude: startLocation.longitude,
172
+          latitude: startLocation.latitude,
173
+          iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
174
+          width: 40,
175
+          height: 40,
176
+          anchor: {x: 0.5, y: 1}
177
+        }],
178
+        polyline: [],
179
+        showTripInfo: false,
180
+        showCallButton: false
181
+      });
140 182
     }
141
-  
142
-  },
143
-  ondetails(e){
144
-    console.log(e.currentTarget.dataset.id);
145
-wx.navigateTo({
146
-  url: `/pages/workorderdetails/index?id=${e.currentTarget.dataset.id}&workorderId=${e.currentTarget.dataset.workorderid}`,
147
-})
148 183
   },
149
-  /**
150
-   * 生命周期函数--监听页面初次渲染完成
151
-   */
152
-  onReady() {
153 184
 
185
+  // 计算两点之间的距离(公里)
186
+  calculateDistance(lat1, lon1, lat2, lon2) {
187
+    const R = 6371; // 地球半径(公里)
188
+    const dLat = this.deg2rad(lat2 - lat1);
189
+    const dLon = this.deg2rad(lon2 - lon1);
190
+    const a = 
191
+      Math.sin(dLat/2) * Math.sin(dLat/2) +
192
+      Math.cos(this.deg2rad(lat1)) * Math.cos(this.deg2rad(lat2)) * 
193
+      Math.sin(dLon/2) * Math.sin(dLon/2); 
194
+    const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); 
195
+    const distance = R * c;
196
+    return distance;
154 197
   },
155 198
 
156
-  /**
157
-   * 生命周期函数--监听页面显示 
158
-   */
159
-  onShow() {
160
-    let _this = this
161
-          _this.authorizationbtn()
162
-          _this.getworkoder()
163
-          _this.getreview()
164
-    // wx.getSetting({
165
-    //   withSubscriptions: true,
166
-    //   success (res) {
167
-    //     console.log(res.authSetting)
168
-    //     if (res.authSetting['scope.subscribeMessage']) {
169
-    //     }else{
170
-    //       wx.showModal({
171
-    //         title: '',
172
-    //         content: '检测到您没有开启工单服务通知的权限,是否开启',
173
-    //         success (res) {
174
-    //           if (res.confirm) {
175
-    //             console.log('用户点击确定')
176
-    //       _this.authorizationbtn()
177
-
178
-    //           } else if (res.cancel) {
179
-    //             console.log('用户点击取消')
180
-    //           }
181
-    //         }
182
-    //       })
183
-    //     }
184
-    //   }
185
-    // })
186
-// 
187
-
188
-   
189
-  },
190
-  authorizationbtn(){
191
-   wx.requestSubscribeMessage({
192
-      tmplIds: ['G_37RkJ_mwZeTdPv5A0fjBlYW6_lRQIW9_SywmUAX7Q','AhToqLaCeOvSvSSQ7RvZYd2WgGA11Da13j1PMvqcGqQ'],
193
-      success(res) {
194
-        console.log(res);
195
-      if(res['AhToqLaCeOvSvSSQ7RvZYd2WgGA11Da13j1PMvqcGqQ'] === 'accept' && res['G_37RkJ_mwZeTdPv5A0fjBlYW6_lRQIW9_SywmUAX7Q'] === 'accept') {
196
-      // 用户同意订阅
197
-      }
198
-      }
199
-      })
199
+  // 角度转弧度
200
+  deg2rad(deg) {
201
+    return deg * (Math.PI/180);
200 202
   },
201
-  /**
202
-   * 生命周期函数--监听页面隐藏
203
-   */
204
-  onHide() {
205 203
 
204
+  // 地图区域变化时触发
205
+  onRegionChange(e) {
206
+    // 可以在这里处理地图移动后的逻辑,如重新加载附近车辆
207
+    if (e.type === 'end' && e.causedBy === 'drag') {
208
+      this.loadNearbyCars();
209
+    }
206 210
   },
207 211
 
208
-  /**
209
-   * 生命周期函数--监听页面卸载
210
-   */
211
-  onUnload() {
212
-
212
+  // 加载附近车辆
213
+  loadNearbyCars() {
214
+    const { longitude, latitude } = this.data;
215
+    
216
+    // 模拟获取附近车辆数据
217
+    // 实际应用中应该调用后端API获取真实数据
218
+    const cars = [];
219
+    const count = Math.floor(Math.random() * 10) + 1; // 1-10辆随机
220
+    
221
+    for (let i = 0; i < count; i++) {
222
+      // 在当前位置附近随机生成车辆位置
223
+      const offsetLon = (Math.random() - 0.5) * 0.02;
224
+      const offsetLat = (Math.random() - 0.5) * 0.02;
225
+      
226
+      cars.push({
227
+        id: 100 + i,
228
+        longitude: longitude + offsetLon,
229
+        latitude: latitude + offsetLat,
230
+        iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
231
+        width: 30,
232
+        height: 30,
233
+        anchor: {x: 0.5, y: 0.5}
234
+      });
235
+    }
236
+    
237
+    // 将车辆标记添加到现有标记中
238
+    const updatedMarkers = [...this.data.markers];
239
+    // 先移除之前的车辆标记
240
+    const filteredMarkers = updatedMarkers.filter(marker => marker.id < 100);
241
+    // 添加新的车辆标记
242
+    filteredMarkers.push(...cars);
243
+    
244
+    this.setData({
245
+      markers: filteredMarkers,
246
+      carsNearby: count
247
+    });
213 248
   },
214 249
 
215
-  /**
216
-   * 页面相关事件处理函数--监听用户下拉动作
217
-   */
218
-  async onPullDownRefresh() {
219
-    console.log(11111111);
220
-    let _this = this
221
-    // _this.authorizationbtn()
222
-    await _this.getworkoder()
223
-    await _this.getreview()
224
-    wx.stopPullDownRefresh();
250
+  // 呼叫车辆
251
+  callCar() {
252
+    wx.showLoading({
253
+      title: '正在呼叫车辆...',
254
+      mask: true
255
+    });
256
+    
257
+    // 模拟呼叫过程
258
+    setTimeout(() => {
259
+      wx.hideLoading();
260
+      
261
+      // 显示司机信息
262
+      this.setData({
263
+        showDriverInfo: true,
264
+        showCallButton: false
265
+      });
266
+      
267
+      // 模拟司机接近动画
268
+      this.simulateDriverApproach();
269
+    }, 2000);
225 270
   },
226 271
 
227
-  /**
228
-   * 页面上拉触底事件的处理函数
229
-   */
230
-  onReachBottom() {
231
-    console.log(11111111);
232
-
272
+  // 模拟司机接近
273
+  simulateDriverApproach() {
274
+    const { startLocation, endLocation, markers } = this.data;
275
+    let driverMarker = markers.find(marker => marker.id === 999);
276
+    
277
+    // 如果司机标记不存在,则创建一个
278
+    if (!driverMarker) {
279
+      // 从终点附近开始
280
+      driverMarker = {
281
+        id: 999,
282
+        longitude: endLocation.longitude + (Math.random() - 0.5) * 0.01,
283
+        latitude: endLocation.latitude + (Math.random() - 0.5) * 0.01,
284
+        iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
285
+        width: 40,
286
+        height: 40,
287
+        anchor: {x: 0.5, y: 0.5}
288
+      };
289
+      
290
+      this.setData({
291
+        markers: [...markers, driverMarker]
292
+      });
293
+    }
294
+    
295
+    // 计算司机到起点的每一步
296
+    const steps = 20; // 分20步接近
297
+    const lonStep = (startLocation.longitude - driverMarker.longitude) / steps;
298
+    const latStep = (startLocation.latitude - driverMarker.latitude) / steps;
299
+    let currentStep = 0;
300
+    
301
+    // 更新司机位置的定时器
302
+    const timer = setInterval(() => {
303
+      currentStep++;
304
+      
305
+      if (currentStep >= steps) {
306
+        clearInterval(timer);
307
+        // 到达起点,更新到达时间
308
+        this.setData({
309
+          estimatedArrival: 0
310
+        });
311
+        return;
312
+      }
313
+      
314
+      // 更新司机标记位置
315
+      const updatedMarkers = this.data.markers.map(marker => {
316
+        if (marker.id === 999) {
317
+          return {
318
+            ...marker,
319
+            longitude: marker.longitude + lonStep,
320
+            latitude: marker.latitude + latStep
321
+          };
322
+        }
323
+        return marker;
324
+      });
325
+      // 更新预计到达时间
326
+      const newArrivalTime = Math.max(0, 5 - Math.floor(currentStep / 4));
327
+      
328
+      this.setData({
329
+        markers: updatedMarkers,
330
+        estimatedArrival: newArrivalTime
331
+      });
332
+    }, 500);
233 333
   },
234 334
 
235
-  /**
236
-   * 用户点击右上角分享
237
-   */
238
-  onShareAppMessage() {
239
-
335
+  // 取消订单
336
+  cancelOrder() {
337
+    // 移除司机标记
338
+    const updatedMarkers = this.data.markers.filter(marker => marker.id !== 999);
339
+    
340
+    this.setData({
341
+      showDriverInfo: false,
342
+      showCallButton: true,
343
+      markers: updatedMarkers
344
+    });
240 345
   }
241
-})
346
+});

+ 6
- 8
pages/index/index.json Целия файл

@@ -1,11 +1,9 @@
1 1
 {
2
-  "navigationBarTitleText": "首页",
2
+  "navigationBarTitleText": "晟能能源",
3
+  "navigationBarBackgroundColor": "#2C85FF",
4
+  "enablePullDownRefresh": false,
3 5
   "navigationStyle": "custom",
4
-  "enablePullDownRefresh": true,
5
-  "backgroundColor": "#B7D7CB",
6
-
7 6
   "usingComponents": {
8
-    "t-icon": "tdesign-miniprogram/icon/icon",
9
-    "t-popup": "tdesign-miniprogram/popup/popup"
10
-  } 
11
-}
7
+    "t-icon": "tdesign-miniprogram/icon/icon"
8
+    }
9
+}

+ 88
- 103
pages/index/index.wxml Целия файл

@@ -1,107 +1,92 @@
1
-<!-- echarts -->
2 1
 <view class="container">
3
-  <view class="navigation-container" style="{{'height: ' + navStatusBarHeight +'px'}}">
4
-  <!--空白来占位状态栏-->
5
-  <view style="{{'height: ' + statusBarHeight +'px'}}"></view>
6
-  <!--自定义导航栏 -->
7
-  <view class="navigation-bar" style="{{'height:' + navBarHeight +'px'}}">
8
-    晟运储能
9
-  </view>
10
-</view>
11
-<view class="home">
12
-<view style="height: 20rpx;"></view>
13
-<view style="{{'height: ' + navStatusBarHeight +'px'}}"></view>
14
-<view class="statistics" data-index="2" bind:tap="rolelocate">
15
-<view class="statistics_top">
16
-<view class="statistics_1">
17
-<view class="statistics_digit">{{workorder.allcount}}</view>
18
-<view class="statistics_title">全部工单</view>
19
-</view>
20
-<view class="statistics_1">
21
-<view class="statistics_digit">{{workorder.incompletecount}}</view>
22
-<view class="statistics_title">全部待办</view>
23
-</view>
24
-<view class="statistics_1">
25
-  <view class="statistics_digit">{{workorder.completecount}}</view>
26
-<view class="statistics_title">全部办结</view>
27
-</view>
28
-</view>
29
-<view style="height: 20rpx;"></view>
30
-<view class="statistics_top">
31
-<view class="statistics_1">
32
-<view class="statistics_digit">{{workorder.myworkodercount}}</view>
33
-<view class="statistics_title">我的工单</view>
34
-</view>
35
-<view class="statistics_1">
36
-<view class="statistics_digit">{{workorder.myworkodertodo}}</view>
37
-<view class="statistics_title">我的待办</view>
38
-</view>
39
-<view class="statistics_1">
40
-  <view class="statistics_digit">{{workorder.myworkoderend}}</view>
41
-<view class="statistics_title">我的已办</view>
42
-</view>
43
-</view>
44
-</view>
45
-<view class="vajra">
46
-<view class="vajra_role" data-index="1" bind:tap="rolelocate">
47
-<image class="role" src="https://esos-iot.bjdexn.cn/myminio/project/e83bca83352e4da68afff3238258a49a.png" mode=""/>
48
-<view>
49
-创建工单
50
-</view> 
51
-</view>
52
-
53
-<view class="vajra_apply" data-index="2" bind:tap="rolelocate">
54
-  <image class="role" src="https://esos-iot.bjdexn.cn/myminio/project/f0de02ce78b14463b1824b35882d3ecf.png" mode=""/>
55
-<view>
56
-  工单统计 
57
-</view>
58
-</view>
59
-<view class="vajra_apply" data-index="3" bind:tap="rolelocate">
60
-  <image class="role" src="https://esos-iot.bjdexn.cn/myminio/project/31fc6a71019744e0bdcd3523afa8dc35.png" mode=""/>
61
-<view>
62
-  资产台账 
63
-</view>
64
-</view>
65
-<view class="vajra_rights" data-index="4" bind:tap="rolelocate">
66
-  <image class="role" src="https://esos-iot.bjdexn.cn/myminio/project/a76948bfa5094d4c90e2a4c5514481e1.png" mode=""/>
67
- <view>
68
-值工排班
69
- </view>
70
-</view>
71
-</view>
72
-<view class="examine">
73
-待审核
74
-</view>
75
-<view class="examine_box" wx:for="{{reviewdata}}" wx:key="index" data-id="{{item.id}}" data-workorderId="{{item.workorderId}}" bind:tap="ondetails">
76
-<view class="examine_title">
77
-<view class="examine_title0" wx:if="{{item.type==1}}">日常<text wx:if="{{item.workorderGrade==1}}"> 低</text><text wx:if="{{item.workorderGrade==2}}"> 中</text><text wx:if="{{item.workorderGrade==3}}"> 高</text></view>
78
-<view class="examine_title01" wx:if="{{item.type==2}}">故障 / <text wx:if="{{item.workorderGrade==1}}"> 低</text><text wx:if="{{item.workorderGrade==2}}"> 中</text><text wx:if="{{item.workorderGrade==3}}"> 高</text>
79
-</view>
80
-<view class="examine_title02" wx:if="{{item.type==3}}">其他<text wx:if="{{item.workorderGrade==1}}"> 低</text><text wx:if="{{item.workorderGrade==2}}"> 中</text><text wx:if="{{item.workorderGrade==3}}"> 高</text></view>
81
-<view class="examine_title1">{{item.workorderName}}</view>
82
-<!-- <view class="examine_title2" wx:if="{{item.examineType==4}}">待审核</view> -->
83
-<view class="examine_title2" wx:if="{{item.examineType==5}}">待审核</view>
84
-<view class="examine_title2" wx:if="{{item.examineType==6}}">审核完成</view>
85
-<view class="examine_title2" wx:if="{{item.examineType==7}}">审核失败</view>
86
-</view>
87
-<view class="examine_content">
88
-<view>描述:{{item.workorderContent}}</view>
89
-<view class="feedback examine_name" wx:if="{{item.examineType==7}}">退回原因:{{item.workoderReason}}</view>
90
-<view class="feedback examine_name" wx:if="{{item.examineCount!=0&&item.examineType!=7}}">退回原因:{{item.lastfail||'无'}}</view>
91
-</view>
92
-<view class="examine_bottom">
93
- <view> <text>发起人:</text>{{item.workorderPromoter}}</view>
94
- <view>发起时间:{{item.workorderStarttime}}</view>
95
-</view>
96
-<!-- <view class="examine_button">
97
-<view class="examine_buttonleft">通过</view>
98
-<view class="examine_buttonright">不通过</view>
99
-</view> -->
100
-</view>
101
-<view class="available" wx:if="{{reviewdata.length==0}}">
2
+  <!-- 地图组件 -->
3
+  <map 
4
+    id="map"
5
+    class="map"
6
+    longitude="{{longitude}}"
7
+    latitude="{{latitude}}"
8
+    scale="{{scale}}"
9
+    markers="{{markers}}"
10
+    polyline="{{polyline}}"
11
+    show-location
12
+    bindregionchange="onRegionChange"
13
+  ></map>
14
+  
15
+  <!-- 底部操作面板 -->
16
+  <view class="bottom-panel">
17
+    <!-- 行程信息卡片 -->
18
+    <!-- <view class="trip-card">
19
+      <view class="location-item">
20
+        <view class="location-icon start-icon">
21
+          <view class="icon-circle"></view>
22
+        </view>
23
+        <view class="location-input">
24
+          <input placeholder="您的位置" value="{{startLocation.name}}" bindtap="chooseStartLocation" />
25
+        </view>
26
+      </view>
27
+      
28
+      <view class="location-item">
29
+        <view class="location-icon end-icon">
30
+          <view class="icon-marker"></view>
31
+        </view>
32
+        <view class="location-input">
33
+          <input placeholder="输入目的地" value="{{endLocation.name}}" bindtap="chooseEndLocation" />
34
+        </view>
35
+      </view>
36
+      
37
+      <view class="trip-info" wx:if="{{showTripInfo}}">
38
+        <view class="distance">距离: {{distance}} 公里</view>
39
+        <view class="estimated-price">预估费用: ¥{{estimatedPrice}}</view>
40
+      </view>
41
+    </view> -->
42
+    
43
+ 
44
+    
45
+    <!-- 司机信息 (叫车后显示) -->
46
+    <!-- <view class="driver-info" wx:if="{{showDriverInfo}}">
47
+      <image src="{{driverAvatar}}" class="driver-avatar"></image>
48
+      <view class="driver-details">
49
+        <view class="driver-name">司机 {{driverName}}</view>
50
+        <view class="driver-car">车牌号: {{carNumber}}</view>
51
+        <view class="driver-arrive">预计{{estimatedArrival}}分钟后到达</view>
52
+      </view>
53
+      <button class="cancel-btn" bindtap="cancelOrder">去查看</button>
54
+    </view> -->
55
+    <!-- <view class="driver-info" wx:if="{{showDriverInfo}}">
56
+      <image src="{{driverAvatar}}" class="driver-avatar"></image>
57
+      <view class="driver-details">
58
+        <view class="driver-name">车牌号: {{carNumber}}</view>
59
+        <view class="driver-car">工作方向: 放电</view>
60
+        <view class="driver-arrive">预计{{estimatedArrival}}分钟后完成工作</view>
61
+      </view>
62
+      <button class="cancel-btn" bindtap="cancelOrder">去查看</button>
63
+    </view> -->
64
+    <!-- <view class="driver-info" wx:if="{{showDriverInfo}}">
65
+      <image src="{{driverAvatar}}" class="driver-avatar"></image>
66
+      <view class="driver-details">
67
+        <view class="driver-name">车牌号: {{carNumber}}</view>
68
+        <view class="driver-car">工作方向: 放电</view>
69
+        <view class="driver-arrive">预计{{estimatedArrival}}分钟后完成工作</view>
70
+      </view>
71
+      <button class="cancel-btn" bindtap="cancelOrder">去查看</button>
72
+    </view> --> 
73
+    <view class="available" wx:if="{{true}}">
102 74
 <image src="https://esos-iot.bjdexn.cn/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
103 75
 </view>
104
-<view style="height: 20rpx;"> </view>
76
+       <!-- 叫车|-|-|-|按钮 -->
77
+       <button class="call-btn" bindtap="callCar" wx:if="{{showCallButton}}">
78
+      <text class="call-btn_left_electricity" bind:tap="onelectricity">买电</text>
79
+      <text class="call-btn_right_electricity" bind:tap="onelectricity">卖电</text>
80
+    </button>
81
+  </view>
82
+  
83
+  <!-- 附近车辆--数量提示 -->
84
+  <view class="cars-nearby" wx:if="{{carsNearby > 0}}">
85
+    <view class="cars-icon">
86
+      <text class="iconfont icon-car"></text>
87
+    </view>
88
+    <view class="cars-count">附近有 {{carsNearby}} 辆车</view>
89
+  </view>
105 90
 </view>
106
-
107
-</view> 
91
+<!---->
92
+<!---->

+ 147
- 313
pages/index/index.wxss Целия файл

@@ -1,346 +1,180 @@
1
-/*  */
2
-.navigation-container {
3
-  position: fixed;
1
+.container {
2
+  position: absolute;
3
+  top: 0;
4
+  left: 0;
5
+  right: 0;
6
+  bottom: 0;
7
+  display: flex;
8
+  flex-direction: column;
9
+}
10
+
11
+.map {
4 12
   width: 100%;
5
-  z-index: 99;
6
-  background-color: #89bfea;
13
+  height: 900rpx;
7 14
 }
8
-.navigation-bar {
9
-  position: relative;
15
+
16
+.bottom-panel {
17
+  /* position: absolute;
18
+  bottom: 0;
19
+  left: 0;
20
+  right: 0; */
10 21
   width: 100%;
11
-  display: flex;
12
-  align-items: center;
13
-  /* justify-content: center; */
14
-  font-size: 36rpx;
15
-  padding-left: 40rpx;
16
-  flex-direction: row;
17
-  color: #fff;
22
+  padding: 16rpx;
23
+  box-sizing: border-box;
18 24
 }
19
-.title_1{
20
-  font-weight: 500;
21
-  font-size: 28rpx;
25
+
26
+.trip-card {
27
+  background-color: white;
28
+  border-radius: 16rpx;
29
+  padding: 24rpx;
30
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
31
+}
32
+
33
+.location-item {
22 34
   display: flex;
23
-  align-items: center;
35
+  align-items: flex-start;
36
+  margin-bottom: 24rpx;
24 37
 }
25
-.title_image{
38
+
39
+.location-icon {
40
+  margin-right: 16rpx;
41
+  margin-top: 8rpx;
42
+}
43
+
44
+.start-icon .icon-circle {
26 45
   width: 24rpx;
27 46
   height: 24rpx;
28
-  margin-left: 10rpx;
29
-  transition: transform 3s ease; /* 添加过渡效果 */
47
+  border-radius: 50%;
48
+  background-color: #666;
30 49
 }
31 50
 
32
-.title_2{
33
-  font-size: 28rpx;
34
-  margin-top: 30rpx;
51
+.end-icon .icon-marker {
52
+  width: 24rpx;
53
+  height: 24rpx;
54
+  background-color: #2C85FF;
55
+  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
35 56
 }
36
-.nav-title {
37
-  height: 100%;
57
+
58
+.location-input input {
59
+  font-size: 32rpx;
60
+  color: #333;
61
+  width: 560rpx;
62
+}
63
+
64
+.trip-info {
65
+  margin-top: 16rpx;
66
+  padding-top: 16rpx;
67
+  border-top: 1rpx solid #eee;
38 68
   display: flex;
39
- align-items: center;
40
-  margin-left: 20rpx;
41
-  box-sizing: border-box;
69
+  justify-content: space-between;
70
+  font-size: 28rpx;
71
+  color: #666;
42 72
 }
43
- 
44
-.nav-search {
45
-  position: absolute;
73
+/*  */
74
+.call-btn {
75
+    position: absolute;
76
+  bottom: 0;
77
+  left: 0;
78
+  right: 0;
79
+  margin-bottom: 24rpx;
80
+  background-color: #00C775;
81
+  color: white;
82
+  width: 90%;
83
+  height: 96rpx;
84
+  line-height: 96rpx;
85
+  font-size: 34rpx;
86
+  border-radius: 48rpx;
87
+  box-sizing: border-box;
46 88
   display: flex;
47
-  justify-content: flex-end;
48
-  align-items: center;
89
+  justify-content:space-around;
49 90
 }
50
-/* // */
51
-.container {
52
-  width: 100%;
53
-  min-height: 100%;
91
+.call-btn_left_electricity{
92
+width: 50%;
93
+ height: 100%;
94
+}
95
+.call-btn_right_electricity{
96
+  width: 50%;
97
+  height: 100%;
98
+  border-left: 4rpx solid #ffffff; 
99
+}
100
+.driver-info {
101
+  background-color: white;
102
+  border-radius: 16rpx;
103
+  padding: 24rpx;
104
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
54 105
   display: flex;
55 106
   align-items: center;
56
-  /* 007544 */
57
- background: linear-gradient(to bottom, #0F80DC -40%, #F0F5F5 40%, #F0F5F5 100%);
58
- /* background: linear-gradient(to bottom, #007544 -40%, #F0F5F5 40%,#F0F5F5 100%); */
107
+  margin-top: 26rpx;
59 108
 }
60
-.home{
61
-  width: 100%;
62
-  padding: 20rpx 20rpx;
63
-  box-sizing: border-box;
109
+
110
+.driver-avatar {
111
+  width: 100rpx;
112
+  height: 100rpx;
113
+  border-radius: 50%;
64 114
 }
65
-.statistics{
66
-  width: 100%;
67
-  padding: 0rpx 40rpx;
68
-  box-sizing: border-box;
115
+
116
+.driver-details {
117
+  margin-left: 24rpx;
118
+  flex: 1;
69 119
 }
70
-.statistics_top{
71
-  display: flex;
72
-  justify-content: space-between;
120
+
121
+.driver-name {
122
+  font-size: 32rpx;
123
+  font-weight: bold;
73 124
 }
74
-.statistics_1{
75
-  display: flex;
76
-  flex-direction: column;
77
-  justify-content: center;
78
-  align-items: center;
125
+
126
+.driver-car {
127
+  font-size: 28rpx;
128
+  color: #666;
129
+  margin-top: 8rpx;
79 130
 }
80
-.statistics_digit{
81
-  font-size: 48rpx;
131
+
132
+.driver-arrive {
133
+  font-size: 28rpx;
134
+  color: #2C85FF;
135
+  margin-top: 8rpx;
82 136
 }
83
-.statistics_title{
84
-  margin-top: 10rpx;
137
+
138
+.cancel-btn {
139
+  width: 160rpx;
140
+  height: 64rpx;
141
+  line-height: 64rpx;
142
+  font-size: 28rpx;
143
+  color: #FF5252;
144
+  border: 1rpx solid #FF5252;
145
+  background-color: white;
146
+  border-radius: 32rpx;
85 147
 }
86
-.vajra{
87
-  width: 100%;
88
-  padding: 16rpx;
89
-  display: flex;
90
-  align-items: center;
91
-  justify-content: space-between;
92
-  background-color: #fff;
93
-  box-sizing: border-box;
94
-  border-radius: 20rpx;
95
-  margin-top: 60rpx;
96
-  }
97
-  .vajra_role{
98
-    width: 22%;
99
-    padding: 20rpx 0rpx;
100
-    display: flex;
101
-    flex-direction: column;
102
-    justify-content: center;
103
-    align-items: center;
104
-    border-radius: 10rpx;
105
-    /* background-color: #ffffff; */
106
-  }
107
-  .vajra_rights{
108
-    width: 22%;
109
-    padding: 20rpx 0rpx;
110
-    display: flex;
111
-    flex-direction: column;
112
-    justify-content: center;
113
-    align-items: center;
114
-    border-radius: 10rpx;
115
-    /* background-color: #ffffff; */
116
-  }
117
-  .vajra_apply{
118
-    width: 22%;
119
-    padding: 20rpx 0rpx;
120
-    display: flex;
121
-    flex-direction: column;
122
-    justify-content: center;
123
-    align-items: center;
124
-    border-radius: 10rpx;
125
-    /* background-color: #ffffff; */
126
-  }
127
-  .role{
128
-    width: 120rpx;
129
-    height: 120rpx;
130
-    margin-bottom: 20rpx;
131
-    border-radius: 16rpx;
132
-    box-sizing: border-box;
133
-  }
134
-  .role_botton{
135
-    width: 60rpx;
136
-    height: 60rpx;
137
-    box-sizing: border-box;
138
-  }
139
-  .vajra_share{
140
-    width: 22%;
141
-    /* padding: 20rpx 0rpx; */
142
-    display: flex;
143
-    flex-direction: column;
144
-    justify-content: center;
145
-    align-items: center;
146
-    border-radius: 10rpx;
147
-    background-color: #ffffff;
148
-  }
149
-  .role_botton{
150
-    width: 60rpx;
151
-    height: 60rpx;
152
-    box-sizing: border-box;
153
-  }
154
-  button{
155
-    padding: 0rpx;
156
-    margin: 0rpx;
157
-    width: 100%;
158
-    height: 148rpx;
159
-  padding-top: 20rpx;
160
-  display: flex;
161
-  flex-direction: column;
162
-  align-items: center;
163
-    font-size: 28rpx;
164
-    /* line-height: 130rpx; */
165
-    border:0rpx #f5f5f5  solid;
166
-  background-color: rgba(0, 0, 0, 0);
167
-  
168
-  }
169
-  wx-button:after {
170
-    display: flex;
171
-  flex-direction: column;
172
-    width: 100%;
173
-    height: 148rpx;
174
-  padding: 20rpx 0rpx;
175
-    font-size: 28rpx;
176
-    /* line-height: 130rpx; */
177
-    border:0rpx #f5f5f5  solid;
178
-  background-color: rgba(0, 0, 0, 0);
179
-  }  
180
- .examine{
181
-margin-top: 40rpx;
182
-font-size: 32rpx;
183
- }
184
- .examine_box{
185
-   width: 100%;
186
-   background-color: #fff;
187
-   padding: 30rpx 0rpx;
188
-margin-top: 20rpx;
189
-border-radius: 10rpx;
190
-box-sizing: border-box;
191
- }
192
- .examine_title{
193
-   width: 100%;
194
-   display: flex;
195
-   align-items: center;
196
-   padding: 0rpx 0rpx 0rpx 20rpx;
197
-   box-sizing: border-box;
198
- }
199
- .examine_title0{
200
-  width: 120rpx;
201
-  height: 40rpx;
202
-  font-size: 22rpx; 
203
-  display: flex;
204
-  align-items: center;
205
-  justify-content: center;
206
-  border-radius: 30rpx;
207
-  /* background-color: #0F80DC; */
208
-  background-color: rgba(15, 128, 220, 0.2);
209
-  color: #0F80DC;
210
-  border: 1rpx solid #0F80DC;
211
-box-sizing: border-box;
212 148
 
213
- }
214
- .examine_title01{
215
-  width: 120rpx;
216
-  height: 40rpx;
217
-  font-size: 22rpx; 
149
+.cars-nearby {
150
+  position: absolute;
151
+  top: 104rpx;
152
+  left: 24rpx;
153
+  background-color: rgba(255, 255, 255, 0.9);
154
+  border-radius: 32rpx;
155
+  padding: 12rpx 20rpx;
218 156
   display: flex;
219 157
   align-items: center;
220
-  justify-content: center;
221
-  border-radius: 30rpx;
222
-  /* background-color: #0F80DC; */
223
-  color:#ee8d60;
224
-  background-color: rgba(241, 120, 20, 0.2);
158
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
159
+}
225 160
 
226
-  border: 1rpx solid #f39b72;
227
- box-sizing: border-box;
228
- }
229
- .examine_title02{
230
-  width: 120rpx;
231
-  height: 40rpx;
232
-  font-size: 22rpx; 
233
-  display: flex;
234
-  align-items: center;
235
-  justify-content: center;
236
-  border-radius: 30rpx;
237
-  /* background-color: #0F80DC; */
238
-  color:#0F80DC;
239
-  background-color: rgba(15, 128, 220, 0.2);
240
-  /* color: #007544; */
241
-  border: 1rpx solid #0F80DC;
242
- box-sizing: border-box;
243
- }
244
- .examine_title1{
245
-   flex: 1;
246
-   font-weight: 600;
247
-   font-size: 32rpx;
248
-   display: flex;
249
-   align-items: center;
250
-   padding: 0rpx 10rpx;
251
-   overflow: hidden;
252
-  display: -webkit-box;
253
-  text-overflow: ellipsis;
254
-  box-orient: vertical;
255
-  -webkit-box-orient: vertical;
256
-  -moz-box-orient: vertical;
257
-  -o-box-orient: vertical;
258
-  -ms-box-orient: vertical;
259
-  line-clamp: 1; /* 超出2行显示省略号 */
260
-  -webkit-line-clamp: 1; /* 超出2行显示省略号 */
261
-   box-sizing: border-box;
262
- }
263
- .examine_title2{
264
-   width: 100rpx;
265
-   height: 40rpx;
266
-  font-size: 22rpx; 
267
-   display: flex;
268
-   align-items: center;
269
-   justify-content: center;
270
-border-top-left-radius:100rpx;
271
-border-bottom-left-radius:100rpx;
272
-   background-color: rgb(255, 0, 0,0.2);
273
-   color: red;
274
-   border: 1rpx solid red;
275
-   border-right: 0rpx solid red;
276
-box-sizing: border-box;
277
- }
278
- .examine_content{
279
-   flex: 1;
280
-   font-size: 24rpx;
281
-   padding: 20rpx 20rpx;
282
-   margin: 20rpx 20rpx;
283
-   color: #cccccc;
284
-   background-color: #f9f9f9;
285
-   border-radius: 8rpx;
286
-   box-sizing: border-box;
287
- }
288
- .feedback{
289
-  margin-top: 8rpx;
290
- }
291
- .examine_bottom{
292
-   display: flex;
293
- }
294
- .examine_bottom{
295
-   display: flex;
296
-   align-items: center;
297
-   justify-content: space-between;
298
-   padding: 0rpx 20rpx;
299
-box-sizing: border-box;
161
+.cars-icon {
162
+  color: #2C85FF;
163
+  margin-right: 12rpx;
164
+}
300 165
 
301
- }
302
- .examine_button{
303
-   width: 100%;
304
-   padding: 0rpx 20rpx;
305
-   margin-top: 30rpx;
306
-   display: flex;
307
-   align-items: center;
308
-   justify-content: space-between;
309
-   box-sizing: border-box;
166
+.cars-count {
167
+  font-size: 28rpx;
168
+  color: #333;
169
+}
310 170
 
311
- }
312
- .examine_buttonleft{
313
-   width: 160rpx;
314
-   height:60rpx;
315
-  border-radius: 12rpx;
171
+.icon-car {
172
+  font-size: 32rpx;
173
+}
174
+.available{
175
+  width: 100%;
176
+  height: 380rpx;
316 177
   display: flex;
317 178
   align-items: center;
318 179
   justify-content: center;
319
-   background-color: #0F80DC;
320
-color: #fff;
321
-box-sizing: border-box;
322
-
323
- }
324
- .examine_buttonright{
325
-   width:160rpx;
326
-   height:60rpx;
327
-   display: flex;
328
-   align-items: center;
329
-   justify-content: center;
330
-   margin-left: 10rpx;
331
-   border-radius: 12rpx;
332
-   background-color: #0F80DC;
333
-   color: #fff;
334
-box-sizing: border-box;
335
-
336
- }
337
- .examine_name{
338
-   color: #cccccc;
339
- }
340
- .available{
341
-   width: 100%;
342
-   display: flex;
343
-   align-items: center;
344
-   justify-content: center;
345
-   margin-top: 60rpx;
346
- }
180
+}

+ 66
- 0
pages/login/index copy.wxml Целия файл

@@ -0,0 +1,66 @@
1
+<!-- pages/user/index.wxml -->
2
+<view class="setup">
3
+  <view class="navigation-container" style="{{'height: ' + navStatusBarHeight +'px'}}">
4
+  <!-- 空白来占位状态栏 -->
5
+  <view style="{{'height: ' + statusBarHeight +'px'}}"></view>
6
+  <!-- 自定义导航栏 -->
7
+  <view class="navigation-bar" style="{{'height:' + navBarHeight +'px'}}">
8
+    <view class="title">晟运能源</view>
9
+  </view>
10
+</view>
11
+<!-- <view style="width: 100%; {{'height: ' + navStatusBarHeight +'px'}}"></view> -->
12
+<!--<view></view>-->
13
+ <view class="log">
14
+ <view class="log_title">
15
+ <view>你好,</view>
16
+ <view>欢迎使用晟运智慧运维</view>
17
+ </view>
18
+ <view><image class="log_image" src="https://esos-iot.bjdexn.cn/myminio/project/72505c1e81bf445dbeb773a18e47da7b.png" mode="aspectFill"/></view>
19
+ </view>
20
+ <view class="login_box">
21
+ <view class="{{Loginswitch?'login_left':'login_right1'}}" data-value="{{true}}" bind:tap="onswitch">一键登录</view>
22
+ <!-- <view class="{{!Loginswitch?'login_left':'login_right'}}" data-value="{{false}}">手机号登录</view> -->
23
+ <view class="{{!Loginswitch?'login_left':'login_right'}}" data-value="{{false}}" bind:tap="onswitch">手机号登录</view>
24
+
25
+ </view>
26
+ <!-- <view class="login_box">
27
+  <view class="login_right1">快捷登录</view>
28
+ <view class="login_left">账户登录</view>
29
+ </view> -->
30
+ <view class="log_bottom">
31
+
32
+ <view class="account_number" wx:if="{{!Loginswitch}}">
33
+ <view wx:if="{{!Loginswitch}}">
34
+  <view class="account">手机号</view>
35
+  <view class="password">
36
+  <image class="login_imgae1" src="https://esos-iot.bjdexn.cn/myminio/project/0458af22ef764cc386d77a76ee665917.png" mode=""/>
37
+  <input class="weui-input"	value="{{account}}" placeholder="请输入手机号"  bindinput="bindKeyInput1"/></view>
38
+ </view>
39
+
40
+ </view>
41
+ <view class="number" wx:if="{{!Loginswitch}}">
42
+  <!-- <view class="account">邀请码</view>
43
+  <view class="password"> 
44
+    <image class="login_imgae1" src="https://esos-iot.bjdexn.cn/myminio/project/b38d8000822b44108beff300cb0c9f69.png" mode="aspectFit"/>
45
+  <input class="weui-input"	value="{{password}}" placeholder="请输入邀请码" bindinput="bindKeyInput2"/>
46
+  </view> -->
47
+  <!-- <view class="password"> 
48
+    <image class="login_imgae1" src="https://esos-iot.bjdexn.cn/myminio/project/b38d8000822b44108beff300cb0c9f69.png" mode="aspectFit"/>
49
+  <input class="weui-input"	value="{{password}}" password="{{passwordtype}}" placeholder="请输入密码" bindinput="bindKeyInput2"/>
50
+    <image class="login_imgae" src="https://esos-iot.bjdexn.cn/wx_images/password_1.png" wx:if="{{passwordtype}}" bind:tap="onpassword" mode=""/>
51
+    <image class="login_imgae" src="https://esos-iot.bjdexn.cn/wx_images/password_2.png" wx:else bind:tap="onpassword" mode=""/>
52
+  </view> -->
53
+ </view>
54
+ <view class="loginbotton">
55
+  <!-- <button wx:if="{{!Loginswitch}}" class="button_button" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">手机号一键登录</button> -->
56
+ <button wx:if="{{Loginswitch}}" wx:if="{{checked}}" class="button_button" color="#00C775" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">手机号一键登录</button>
57
+ <button wx:if="{{Loginswitch}}" wx:if="{{!checked}}" class="button_button" color="#00C775" bind:tap="promptcheck">手机号一键登录</button>
58
+ <button wx:if="{{!Loginswitch}}" class="button_button" color="#00C775" bind:tap="onLogin">登录</button>
59
+ <!-- <button wx:if="{{!Loginswitch}}" bindphoneoneclicklogin="onHandleLogin" open-type="phoneOneClickLogin">一键登录按钮</button> -->
60
+ <view class="agreement">
61
+  <t-radio t-class="t_box" value="{{checked}}" icon="dot" data-value="{{checked}}" bind:tap="checkboxChange"/>
62
+ 我已阅读并同意<text class="agreement_color" data-name="服务协议" bind:tap="onprivacy">《服务协议》</text>和<text class="agreement_color" data-name="隐私政策" bind:tap="onprivacy">《隐私政策》</text> </view>
63
+ </view>
64
+ 
65
+ </view>
66
+</view>

+ 8
- 1
pages/login/index.js Целия файл

@@ -208,7 +208,14 @@ wx.setStorage({
208 208
 
209 209
 
210 210
 },
211
- 
211
+promptcheck(){
212
+  return wx.showToast({
213
+    title: '请勾选同意',
214
+  icon: 'none',
215
+
216
+  });
217
+  
218
+},
212 219
     // 处理登录按钮点击
213 220
     onLogin() {
214 221
            // 获取本地存储的数据

+ 6
- 47
pages/login/index.wxml Целия файл

@@ -1,65 +1,24 @@
1 1
 <!-- pages/user/index.wxml -->
2 2
 <view class="setup">
3 3
   <view class="navigation-container" style="{{'height: ' + navStatusBarHeight +'px'}}">
4
-  <!-- 空白来占位状态栏 -->
5 4
   <view style="{{'height: ' + statusBarHeight +'px'}}"></view>
6
-  <!-- 自定义导航栏 -->
7 5
   <view class="navigation-bar" style="{{'height:' + navBarHeight +'px'}}">
8 6
     <view class="title">晟运能源</view>
9 7
   </view>
10 8
 </view>
11 9
 <!-- <view style="width: 100%; {{'height: ' + navStatusBarHeight +'px'}}"></view> -->
12
-<!--<view></view>-->
13
- <view class="log">
14
- <view class="log_title">
15
- <view>你好,</view>
16
- <view>欢迎使用晟运智慧运维</view>
17
- </view>
18
- <view><image class="log_image" src="https://esos-iot.bjdexn.cn/myminio/project/72505c1e81bf445dbeb773a18e47da7b.png" mode="aspectFill"/></view>
19
- </view>
20
- <view class="login_box">
21
- <view class="{{Loginswitch?'login_left':'login_right1'}}" data-value="{{true}}" bind:tap="onswitch">一键登录</view>
22
- <!-- <view class="{{!Loginswitch?'login_left':'login_right'}}" data-value="{{false}}">手机号登录</view> -->
23
- <view class="{{!Loginswitch?'login_left':'login_right'}}" data-value="{{false}}" bind:tap="onswitch">手机号登录</view>
24
-
25
- </view>
26
- <!-- <view class="login_box">
27
-  <view class="login_right1">快捷登录</view>
28
- <view class="login_left">账户登录</view>
29
- </view> -->
30
- <view class="log_bottom">
31
-
32
- <view class="account_number" wx:if="{{!Loginswitch}}">
33
- <view wx:if="{{!Loginswitch}}">
34
-  <view class="account">手机号</view>
35
-  <view class="password">
36
-  <image class="login_imgae1" src="https://esos-iot.bjdexn.cn/myminio/project/0458af22ef764cc386d77a76ee665917.png" mode=""/>
37
-  <input class="weui-input"	value="{{account}}" placeholder="请输入手机号"  bindinput="bindKeyInput1"/></view>
38
- </view>
39 10
 
40
- </view>
41
- <view class="number" wx:if="{{!Loginswitch}}">
42
-  <!-- <view class="account">邀请码</view>
43
-  <view class="password"> 
44
-    <image class="login_imgae1" src="https://esos-iot.bjdexn.cn/myminio/project/b38d8000822b44108beff300cb0c9f69.png" mode="aspectFit"/>
45
-  <input class="weui-input"	value="{{password}}" placeholder="请输入邀请码" bindinput="bindKeyInput2"/>
46
-  </view> -->
47
-  <!-- <view class="password"> 
48
-    <image class="login_imgae1" src="https://esos-iot.bjdexn.cn/myminio/project/b38d8000822b44108beff300cb0c9f69.png" mode="aspectFit"/>
49
-  <input class="weui-input"	value="{{password}}" password="{{passwordtype}}" placeholder="请输入密码" bindinput="bindKeyInput2"/>
50
-    <image class="login_imgae" src="https://esos-iot.bjdexn.cn/wx_images/password_1.png" wx:if="{{passwordtype}}" bind:tap="onpassword" mode=""/>
51
-    <image class="login_imgae" src="https://esos-iot.bjdexn.cn/wx_images/password_2.png" wx:else bind:tap="onpassword" mode=""/>
52
-  </view> -->
53
- </view>
11
+ <view><image class="log_image" src="https://esos-iot.bjdexn.cn/myminio/project/fd2b0ab2aadb44bbafd940156bf0cdd7.png" mode="widthFix"/></view>
54 12
  <view class="loginbotton">
55 13
   <!-- <button wx:if="{{!Loginswitch}}" class="button_button" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">手机号一键登录</button> -->
56
- <button wx:if="{{Loginswitch}}" class="button_button" color="#0F80DC" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">手机号一键登录</button>
57
- <button wx:if="{{!Loginswitch}}" class="button_button" color="#0F80DC" bind:tap="onLogin">登录</button>
14
+
58 15
  <!-- <button wx:if="{{!Loginswitch}}" bindphoneoneclicklogin="onHandleLogin" open-type="phoneOneClickLogin">一键登录按钮</button> -->
16
+ <button wx:if="{{checked}}" class="button_button" color="#00BA6E" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">手机号一键登录</button>
17
+ <button wx:if="{{!checked}}" class="button_button" color="#00BA6E" bind:tap="promptcheck">手机号一键登录</button>
59 18
  <view class="agreement">
60 19
   <t-radio t-class="t_box" value="{{checked}}" icon="dot" data-value="{{checked}}" bind:tap="checkboxChange"/>
61
- 我已阅读并同意<text class="agreement_color" data-name="服务协议" bind:tap="onprivacy">《服务协议》</text>和<text class="agreement_color" data-name="隐私政策" bind:tap="onprivacy">《隐私政策》</text> </view>
20
+ 我已阅读并同意晟运<text class="agreement_color" data-name="服务协议" bind:tap="onprivacy">《服务协议》</text>和<text class="agreement_color" data-name="隐私政策" bind:tap="onprivacy">《隐私政策》</text> 
62 21
  </view>
63
- 
64 22
  </view>
23
+
65 24
 </view>

+ 18
- 13
pages/login/index.wxss Целия файл

@@ -1,10 +1,12 @@
1 1
 .setup{
2 2
   width: 100%;
3 3
   height: 100vh;
4
-  background: linear-gradient(to bottom, #0F80DC -40%, #F0F5F5 40%,#F0F5F5 100%);
4
+  /* background: linear-gradient(to bottom, #00C775 -40%, #F0F5F5 40%,#F0F5F5 100%); */
5
+/* background: linear-gradient(to bottom, #EAFFFA -40%, #EAFFFA 100%,#F0F5F5 100%); */
6
+background-color: #f9f9f9;
5 7
   box-sizing: border-box;
6 8
 overflow: hidden;
7
-padding: 0rpx 20rpx;
9
+/* padding: 0rpx 20rpx; */
8 10
 }
9 11
  .title{
10 12
    font-size: 36rpx;
@@ -27,8 +29,8 @@ box-sizing: border-box;
27 29
     margin-top: 40rpx;
28 30
   }
29 31
   .log_image{
30
-    width: 194rpx;
31
-    height: 262rpx;
32
+    width: 100%;
33
+    height: 462rpx;
32 34
   }
33 35
  .log_bottom{
34 36
 width: 100%;
@@ -108,44 +110,47 @@ margin-left: 20rpx;
108 110
  }
109 111
  .loginbotton{
110 112
    width: 100%;
111
-   position: fixed;
113
+   /* position: fixed;
112 114
    bottom: 200rpx;
113
-   left: 0rpx;
115
+   left: 0rpx; */
114 116
    display: flex;
115 117
    flex-direction: column;
116 118
    justify-content: center;
117 119
    align-items: center;
118 120
    box-sizing: border-box;
121
+   margin-top: 40rpx;
119 122
  }
120 123
  button{
121 124
   width: 90%;
122 125
   color: #fff;
123
-background-color: #0F80DC;
126
+background-color: #00C775;
124 127
  }
125 128
  .button_button{
126 129
    width: 90%;
127 130
    color: #fff;
128
- background-color: #0F80DC;
131
+ background-color: #00C775;
129 132
  /* background-color: rgba(15,128,220, 0.3);  */
130 133
   }
131 134
 .agreement{
132 135
   margin-top: 20rpx;
133 136
   display: flex;
134
-  align-items: center;
137
+  flex-wrap: wrap;
135 138
   font-size: 28rpx;
139
+  box-sizing: border-box;
136 140
 }
137 141
 .agreement_color{
138
-  color:#0F80DC;
142
+  color:#00C775;
139 143
   margin:0rpx 6rpx;
140 144
 }
145
+ 
141 146
 .t-radio__icon-dot::after{
142
-  background: var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0F80DC))) !important;
147
+  background: var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #00C775))) !important;
143 148
 }
144 149
 .t-radio__icon--checked {
145
-  color: var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0F80DC))) !important;
150
+  color: var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #00C775))) !important;
146 151
 }
147 152
 .t-radio__icon-dot{
148
-  border: 3px solid var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0F80DC))) !important;
153
+  border: 3px solid var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #00C775))) !important;
149 154
 }
150 155
 .t-radio--block{
151 156
   padding: var(--td-radio-vertical-padding, 0rpx) !important;

+ 0
- 6
pages/malfunction/index.json Целия файл

@@ -1,6 +0,0 @@
1
-{
2
-  "navigationBarTitleText": "工单报障",
3
-  "usingComponents": {
4
-    "t-icon": "tdesign-miniprogram/icon/icon"
5
-  }
6
-}

+ 0
- 30
pages/malfunction/index.wxml Целия файл

@@ -1,30 +0,0 @@
1
-<!--pages/malfunction/index.wxml-->
2
-<view class="setup">
3
-<view class="setup_list">
4
-  <view class="allocation" data-name="0" bind:tap="toconfigure">
5
-<view class="allocation_3">日常任务</view>
6
-<view class="allocation_1">
7
-<view class="allocation_2"></view>
8
-<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
9
-</view>
10
-</view>
11
-<view class="allocation" data-name="1" bind:tap="toconfigure">
12
-<view class="allocation_3">设备报修</view>
13
-<view class="allocation_1">
14
-<view class="allocation_2"></view>
15
-<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
16
-</view>
17
-</view>
18
-<view class="allocation" data-name="2" bind:tap="toconfigure">
19
-<view class="allocation_3">其他</view>
20
-<view class="allocation_1">
21
-<view class="allocation_2"></view>
22
-<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
23
-</view>
24
-</view>
25
- </view>
26
-
27
-
28
-
29
-
30
-</view>

+ 0
- 53
pages/malfunction/index.wxss Целия файл

@@ -1,53 +0,0 @@
1
-/* pages/malfunction/index.wxss */
2
-.setup{
3
-  width: 100%;
4
-  height: 100vh;
5
-  background: linear-gradient(to bottom, #0F80DC -40%, #F0F5F5 40%,#F0F5F5 100%);
6
-  padding: 20rpx 20rpx;
7
-  box-sizing: border-box;
8
-
9
-}
10
-.setup_list{
11
-  width: 100%;
12
-  background-color: #ffffff;
13
-  border-radius: 10rpx;
14
-}
15
-.allocation{
16
-  width: 100%;
17
-  height: 80rpx;
18
-display: flex;
19
-align-items: center;
20
-justify-content:space-between;
21
-padding: 0rpx 20rpx;
22
-overflow: hidden;
23
-box-sizing: border-box;
24
-
25
-}
26
-.allocation_1{
27
-  display: flex;
28
-  font-size:13px;
29
-  align-items: center;
30
-}
31
-.allocation_box{
32
- border-radius: 16rpx;
33
- background-color: #ffffff;
34
-  padding: 10rpx 0rpx;
35
-  box-sizing: border-box;
36
-  margin-top: 30rpx;
37
-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
38
-
39
-}
40
-.allocation_2{
41
-  color: #999999;
42
-  
43
-}
44
-.allocation_3{
45
-  font-size: 14px;
46
-}
47
-.content-container{
48
-margin-top: 40rpx;
49
-display: flex;
50
-flex-direction: column;
51
-justify-content: center;
52
-align-items: center;
53
-}

+ 395
- 0
pages/map/index.js Целия файл

@@ -0,0 +1,395 @@
1
+Page({
2
+  data: {
3
+    // 地图初始中心坐标(北京市中心)
4
+    longitude: 116.404,
5
+    latitude: 39.915,
6
+    scale: 14,
7
+    markers: [],
8
+    polyline: [],
9
+    startLocation: {},
10
+    endLocation: {},
11
+    showTripInfo: true,
12
+    distance: 0,
13
+    estimatedPrice: 0,
14
+    showCallButton: true,
15
+    showDriverInfo: false,
16
+    carsNearby: 0,
17
+    // 司机信息
18
+    driverAvatar: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
19
+    driverName: '王师傅',
20
+    carNumber: '京A88888',
21
+    estimatedArrival: 5
22
+  },
23
+
24
+  onLoad() {
25
+    // 初始化地图
26
+    this.initMap();
27
+    
28
+    // 加载附近车辆数据
29
+    this.loadNearbyCars();
30
+  },
31
+
32
+  // 初始化地图,获取用户位置
33
+  initMap() {
34
+    const that = this;
35
+    
36
+    // 获取用户当前位置
37
+    wx.getLocation({
38
+      type: 'gcj02', // 国测局坐标系,微信地图使用该坐标系
39
+      success(res) {
40
+        const longitude = res.longitude;
41
+        const latitude = res.latitude;
42
+        
43
+        // 更新地图中心位置
44
+        that.setData({
45
+          longitude,
46
+          latitude,
47
+          startLocation: {
48
+            longitude,
49
+            latitude,
50
+            name: '我的位置'
51
+          },
52
+          // 添加起点标记
53
+          markers: [{
54
+            id: 0,
55
+            longitude,
56
+            latitude,
57
+            iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
58
+            width: 40,
59
+            height: 40,
60
+            anchor: {x: 0.5, y: 1}
61
+          }]
62
+        });
63
+        
64
+        // 逆地址解析,获取位置名称
65
+        that.reverseGeocoder(longitude, latitude, 'start');
66
+      },
67
+      fail() {
68
+        wx.showToast({
69
+          title: '无法获取位置,请检查权限',
70
+          icon: 'none'
71
+        });
72
+      }
73
+    });
74
+  },
75
+
76
+  // 逆地址解析,将经纬度转换为地址名称
77
+  reverseGeocoder(longitude, latitude, type) {
78
+    wx.request({
79
+      url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=VRGBZ-ZFRHB-SKIUP-NHHJ3-TXGJT-ZIFG3`,
80
+      success(res) {
81
+        if (res.data.status === 0) {
82
+          const address = res.data.result.address;
83
+          if (type === 'start') {
84
+            this.setData({
85
+              'startLocation.name': address
86
+            });
87
+          } else if (type === 'end') {
88
+            this.setData({
89
+              'endLocation.name': address
90
+            });
91
+          }
92
+        }
93
+      },
94
+      fail() {
95
+        wx.showToast({
96
+          title: '地址解析失败',
97
+          icon: 'none'
98
+        });
99
+      }
100
+    });
101
+  },
102
+
103
+  // 选择起点位置
104
+  chooseStartLocation() {
105
+    this.chooseLocation('start');
106
+  },
107
+
108
+  // 选择终点位置
109
+  chooseEndLocation() {
110
+    this.chooseLocation('end');
111
+  },
112
+
113
+  // 选择位置通用方法
114
+  chooseLocation(type) {
115
+    console.log(type);
116
+    const that = this;
117
+    wx.chooseLocation({
118
+      success(res) {
119
+        console.log(res);
120
+        const locationData = {
121
+          longitude: res.longitude,
122
+          latitude: res.latitude,
123
+          name: res.name
124
+        };
125
+        
126
+        // 更新对应位置信息
127
+        if (type === 'start') {
128
+          that.setData({
129
+            'startLocation': locationData
130
+          });
131
+        } else if (type === 'end') {
132
+          that.setData({
133
+            'endLocation': locationData
134
+          });
135
+        }
136
+        
137
+        // 更新标记和路线
138
+        that.updateMarkersAndRoute();
139
+      },
140
+      fail() {
141
+        wx.showToast({
142
+          title: '选择位置失败',
143
+          icon: 'none'
144
+        });
145
+      }
146
+    });
147
+  },
148
+
149
+  // 更新地图标记和路线
150
+  updateMarkersAndRoute() {
151
+    const { startLocation, endLocation } = this.data;
152
+    
153
+    // 如果起点和终点都存在
154
+    if (startLocation.longitude && endLocation.longitude) {
155
+      // 更新标记
156
+      const markers = [
157
+        {
158
+          id: 0,
159
+          longitude: startLocation.longitude,
160
+          latitude: startLocation.latitude,
161
+          iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
162
+          width: 40,
163
+          height: 40,
164
+          anchor: {x: 0.5, y: 1}
165
+        },
166
+        {
167
+          id: 1,
168
+          longitude: endLocation.longitude,
169
+          latitude: endLocation.latitude,
170
+          iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png',
171
+          width: 40,
172
+          height: 40,
173
+          anchor: {x: 0.5, y: 1}
174
+        }
175
+      ];
176
+      
177
+      // 绘制路线
178
+      const polyline = [{
179
+        points: [
180
+          {
181
+            longitude: startLocation.longitude,
182
+            latitude: startLocation.latitude
183
+          },
184
+          {
185
+            longitude: endLocation.longitude,
186
+            latitude: endLocation.latitude
187
+          }
188
+        ],
189
+        color: "#2C85FF",
190
+        width: 6,
191
+        dottedLine: false
192
+      }];
193
+      
194
+      // 计算距离和费用
195
+      const distance = this.calculateDistance(
196
+        startLocation.latitude, startLocation.longitude,
197
+        endLocation.latitude, endLocation.longitude
198
+      );
199
+      
200
+      // 简单的费用计算模型:起步价13元,超过3公里后每公里2.3元
201
+      let price = 13;
202
+      if (distance > 3) {
203
+        price += (distance - 3) * 2.3;
204
+      }
205
+      
206
+      this.setData({
207
+        markers,
208
+        polyline,
209
+        distance: distance.toFixed(1),
210
+        estimatedPrice: Math.round(price),
211
+        showTripInfo: true,
212
+        showCallButton: true
213
+      });
214
+    } else if (startLocation.longitude) {
215
+      // 只有起点
216
+      this.setData({
217
+        markers: [{
218
+          id: 0,
219
+          longitude: startLocation.longitude,
220
+          latitude: startLocation.latitude,
221
+          iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
222
+          width: 40,
223
+          height: 40,
224
+          anchor: {x: 0.5, y: 1}
225
+        }],
226
+        polyline: [],
227
+        showTripInfo: false,
228
+        showCallButton: false
229
+      });
230
+    }
231
+  },
232
+
233
+  // 计算两点之间的距离(公里)
234
+  calculateDistance(lat1, lon1, lat2, lon2) {
235
+    const R = 6371; // 地球半径(公里)
236
+    const dLat = this.deg2rad(lat2 - lat1);
237
+    const dLon = this.deg2rad(lon2 - lon1);
238
+    const a = 
239
+      Math.sin(dLat/2) * Math.sin(dLat/2) +
240
+      Math.cos(this.deg2rad(lat1)) * Math.cos(this.deg2rad(lat2)) * 
241
+      Math.sin(dLon/2) * Math.sin(dLon/2); 
242
+    const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); 
243
+    const distance = R * c;
244
+    return distance;
245
+  },
246
+
247
+  // 角度转弧度
248
+  deg2rad(deg) {
249
+    return deg * (Math.PI/180);
250
+  },
251
+
252
+  // 地图区域变化时触发
253
+  onRegionChange(e) {
254
+    // 可以在这里处理地图移动后的逻辑,如重新加载附近车辆
255
+    if (e.type === 'end' && e.causedBy === 'drag') {
256
+      this.loadNearbyCars();
257
+    }
258
+  },
259
+
260
+  // 加载附近车辆
261
+  loadNearbyCars() {
262
+    const { longitude, latitude } = this.data;
263
+    
264
+    // 模拟获取附近车辆数据
265
+    // 实际应用中应该调用后端API获取真实数据
266
+    const cars = [];
267
+    const count = Math.floor(Math.random() * 10) + 1; // 1-10辆随机
268
+    
269
+    for (let i = 0; i < count; i++) {
270
+      // 在当前位置附近随机生成车辆位置
271
+      const offsetLon = (Math.random() - 0.5) * 0.02;
272
+      const offsetLat = (Math.random() - 0.5) * 0.02;
273
+      
274
+      cars.push({
275
+        id: 100 + i,
276
+        longitude: longitude + offsetLon,
277
+        latitude: latitude + offsetLat,
278
+        iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
279
+        width: 30,
280
+        height: 30,
281
+        anchor: {x: 0.5, y: 0.5}
282
+      });
283
+    }
284
+    
285
+    // 将车辆标记添加到现有标记中
286
+    const updatedMarkers = [...this.data.markers];
287
+    // 先移除之前的车辆标记
288
+    const filteredMarkers = updatedMarkers.filter(marker => marker.id < 100);
289
+    // 添加新的车辆标记
290
+    filteredMarkers.push(...cars);
291
+    
292
+    this.setData({
293
+      markers: filteredMarkers,
294
+      carsNearby: count
295
+    });
296
+  },
297
+
298
+  // 呼叫车辆
299
+  callCar() {
300
+    wx.showLoading({
301
+      title: '正在呼叫车辆...',
302
+      mask: true
303
+    });
304
+    
305
+    // 模拟呼叫过程
306
+    setTimeout(() => {
307
+      wx.hideLoading();
308
+      
309
+      // 显示司机信息
310
+      this.setData({
311
+        showDriverInfo: true,
312
+        showCallButton: false
313
+      });
314
+      
315
+      // 模拟司机接近动画
316
+      this.simulateDriverApproach();
317
+    }, 2000);
318
+  },
319
+
320
+  // 模拟司机接近
321
+  simulateDriverApproach() {
322
+    const { startLocation, endLocation, markers } = this.data;
323
+    let driverMarker = markers.find(marker => marker.id === 999);
324
+    
325
+    // 如果司机标记不存在,则创建一个
326
+    if (!driverMarker) {
327
+      // 从终点附近开始
328
+      driverMarker = {
329
+        id: 999,
330
+        longitude: endLocation.longitude + (Math.random() - 0.5) * 0.01,
331
+        latitude: endLocation.latitude + (Math.random() - 0.5) * 0.01,
332
+        iconPath: 'https://esos-iot.bjdexn.cn/myminio/project/a0d245bf00c6493d949c3be82a6d2b98.png',
333
+        width: 40,
334
+        height: 40,
335
+        anchor: {x: 0.5, y: 0.5}
336
+      };
337
+      
338
+      this.setData({
339
+        markers: [...markers, driverMarker]
340
+      });
341
+    }
342
+    
343
+    // 计算司机到起点的每一步
344
+    const steps = 20; // 分20步接近
345
+    const lonStep = (startLocation.longitude - driverMarker.longitude) / steps;
346
+    const latStep = (startLocation.latitude - driverMarker.latitude) / steps;
347
+    let currentStep = 0;
348
+    
349
+    // 更新司机位置的定时器
350
+    const timer = setInterval(() => {
351
+      currentStep++;
352
+      
353
+      if (currentStep >= steps) {
354
+        clearInterval(timer);
355
+        // 到达起点,更新到达时间
356
+        this.setData({
357
+          estimatedArrival: 0
358
+        });
359
+        return;
360
+      }
361
+      
362
+      // 更新司机标记位置
363
+      const updatedMarkers = this.data.markers.map(marker => {
364
+        if (marker.id === 999) {
365
+          return {
366
+            ...marker,
367
+            longitude: marker.longitude + lonStep,
368
+            latitude: marker.latitude + latStep
369
+          };
370
+        }
371
+        return marker;
372
+      });
373
+      
374
+      // 更新预计到达时间
375
+      const newArrivalTime = Math.max(0, 5 - Math.floor(currentStep / 4));
376
+      
377
+      this.setData({
378
+        markers: updatedMarkers,
379
+        estimatedArrival: newArrivalTime
380
+      });
381
+    }, 500);
382
+  },
383
+
384
+  // 取消订单
385
+  cancelOrder() {
386
+    // 移除司机标记
387
+    const updatedMarkers = this.data.markers.filter(marker => marker.id !== 999);
388
+    
389
+    this.setData({
390
+      showDriverInfo: false,
391
+      showCallButton: true,
392
+      markers: updatedMarkers
393
+    });
394
+  }
395
+});

+ 6
- 0
pages/map/index.json Целия файл

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarTitleText": "晟能能源",
3
+  "navigationBarBackgroundColor": "#2C85FF",
4
+  "navigationBarTextStyle": "white",
5
+  "enablePullDownRefresh": true
6
+}

+ 68
- 0
pages/map/index.wxml Целия файл

@@ -0,0 +1,68 @@
1
+<view class="container">
2
+  <!-- 地图组件 -->
3
+  <map 
4
+    id="map"
5
+    class="map"
6
+    longitude="{{longitude}}"
7
+    latitude="{{latitude}}"
8
+    scale="{{scale}}"
9
+    markers="{{markers}}"
10
+    polyline="{{polyline}}"
11
+    show-location
12
+    bindregionchange="onRegionChange"
13
+  ></map>
14
+  
15
+  <!-- 底部操作面板 -->
16
+  <view class="bottom-panel">
17
+    <!-- 行程信息卡片 -->
18
+    <view class="trip-card">
19
+      <view class="location-item">
20
+        <view class="location-icon start-icon">
21
+          <view class="icon-circle"></view>
22
+        </view>
23
+        <view class="location-input">
24
+          <input placeholder="您的位置" value="{{startLocation.name}}" bindtap="chooseStartLocation" />
25
+        </view>
26
+      </view>
27
+      
28
+      <view class="location-item">
29
+        <view class="location-icon end-icon">
30
+          <view class="icon-marker"></view>
31
+        </view>
32
+        <view class="location-input">
33
+          <input placeholder="输入目的地" value="{{endLocation.name}}" bindtap="chooseEndLocation" />
34
+        </view>
35
+      </view>
36
+      
37
+      <!-- 行程信息 -->
38
+      <view class="trip-info" wx:if="{{showTripInfo}}">
39
+        <view class="distance">距离: {{distance}} 公里</view>
40
+        <view class="estimated-price">预估费用: ¥{{estimatedPrice}}</view>
41
+      </view>
42
+    </view>
43
+    
44
+    <!-- 叫车按钮 -->
45
+    <button class="call-btn" bindtap="callCar" wx:if="{{showCallButton}}">
46
+      呼叫快车
47
+    </button>
48
+    
49
+    <!-- 司机信息 (叫车后显示) -->
50
+    <view class="driver-info" wx:if="{{showDriverInfo}}">
51
+      <image src="{{driverAvatar}}" class="driver-avatar"></image>
52
+      <view class="driver-details">
53
+        <view class="driver-name">司机 {{driverName}}</view>
54
+        <view class="driver-car">车牌号: {{carNumber}}</view>
55
+        <view class="driver-arrive">预计{{estimatedArrival}}分钟后到达</view>
56
+      </view>
57
+      <button class="cancel-btn" bindtap="cancelOrder">取消订单</button>
58
+    </view>
59
+  </view>
60
+  
61
+  <!-- 附近车辆数量提示 -->
62
+  <view class="cars-nearby" wx:if="{{carsNearby > 0}}">
63
+    <view class="cars-icon">
64
+      <text class="iconfont icon-car"></text>
65
+    </view>
66
+    <view class="cars-count">附近有 {{carsNearby}} 辆车</view>
67
+  </view>
68
+</view>

+ 155
- 0
pages/map/index.wxss Целия файл

@@ -0,0 +1,155 @@
1
+.container {
2
+  position: absolute;
3
+  top: 0;
4
+  left: 0;
5
+  right: 0;
6
+  bottom: 0;
7
+  display: flex;
8
+  flex-direction: column;
9
+}
10
+
11
+.map {
12
+  width: 100%;
13
+  height: 800rpx;
14
+}
15
+
16
+.bottom-panel {
17
+  position: absolute;
18
+  bottom: 0;
19
+  left: 0;
20
+  right: 0;
21
+  padding: 16rpx;
22
+  box-sizing: border-box;
23
+}
24
+
25
+.trip-card {
26
+  background-color: white;
27
+  border-radius: 16rpx;
28
+  padding: 24rpx;
29
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
30
+}
31
+
32
+.location-item {
33
+  display: flex;
34
+  align-items: flex-start;
35
+  margin-bottom: 24rpx;
36
+}
37
+
38
+.location-icon {
39
+  margin-right: 16rpx;
40
+  margin-top: 8rpx;
41
+}
42
+
43
+.start-icon .icon-circle {
44
+  width: 24rpx;
45
+  height: 24rpx;
46
+  border-radius: 50%;
47
+  background-color: #666;
48
+}
49
+
50
+.end-icon .icon-marker {
51
+  width: 24rpx;
52
+  height: 24rpx;
53
+  background-color: #2C85FF;
54
+  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
55
+}
56
+
57
+.location-input input {
58
+  font-size: 32rpx;
59
+  color: #333;
60
+  width: 560rpx;
61
+}
62
+
63
+.trip-info {
64
+  margin-top: 16rpx;
65
+  padding-top: 16rpx;
66
+  border-top: 1rpx solid #eee;
67
+  display: flex;
68
+  justify-content: space-between;
69
+  font-size: 28rpx;
70
+  color: #666;
71
+}
72
+
73
+.call-btn {
74
+  margin-top: 24rpx;
75
+  background-color: #2C85FF;
76
+  color: white;
77
+  height: 96rpx;
78
+  line-height: 96rpx;
79
+  font-size: 34rpx;
80
+  border-radius: 48rpx;
81
+}
82
+
83
+.driver-info {
84
+  background-color: white;
85
+  border-radius: 16rpx;
86
+  padding: 24rpx;
87
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
88
+  display: flex;
89
+  align-items: center;
90
+}
91
+
92
+.driver-avatar {
93
+  width: 100rpx;
94
+  height: 100rpx;
95
+  border-radius: 50%;
96
+}
97
+
98
+.driver-details {
99
+  margin-left: 24rpx;
100
+  flex: 1;
101
+}
102
+
103
+.driver-name {
104
+  font-size: 32rpx;
105
+  font-weight: bold;
106
+}
107
+
108
+.driver-car {
109
+  font-size: 28rpx;
110
+  color: #666;
111
+  margin-top: 8rpx;
112
+}
113
+
114
+.driver-arrive {
115
+  font-size: 28rpx;
116
+  color: #2C85FF;
117
+  margin-top: 8rpx;
118
+}
119
+
120
+.cancel-btn {
121
+  width: 160rpx;
122
+  height: 64rpx;
123
+  line-height: 64rpx;
124
+  font-size: 28rpx;
125
+  color: #FF5252;
126
+  border: 1rpx solid #FF5252;
127
+  background-color: white;
128
+  border-radius: 32rpx;
129
+}
130
+
131
+.cars-nearby {
132
+  position: absolute;
133
+  top: 24rpx;
134
+  left: 24rpx;
135
+  background-color: rgba(255, 255, 255, 0.9);
136
+  border-radius: 32rpx;
137
+  padding: 12rpx 20rpx;
138
+  display: flex;
139
+  align-items: center;
140
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
141
+}
142
+
143
+.cars-icon {
144
+  color: #2C85FF;
145
+  margin-right: 12rpx;
146
+}
147
+
148
+.cars-count {
149
+  font-size: 28rpx;
150
+  color: #333;
151
+}
152
+
153
+.icon-car {
154
+  font-size: 32rpx;
155
+}

+ 0
- 180
pages/personalInfo/index.js Целия файл

@@ -1,180 +0,0 @@
1
-// pages/personalInfo/index.js
2
-const api = require('../../api/index.js');
3
-
4
-Page({
5
-
6
-  /**
7
-   * 页面的初始数据
8
-   */
9
-  data: {
10
-    user:'',
11
-    identitycard:"",
12
-    fileurl:'',
13
-    back:"",
14
-    Peakprice:""
15
-  },
16
-
17
-  /**
18
-   * 生命周期函数--监听页面加载 
19
-   */
20
-  onLoad(options) {
21
-//  this.gituser()
22
-  },
23
-gituser(){
24
-  api.request(`/toolprogram/selectuser`, 'POST',{})
25
-  .then((res) => {
26
-    console.log(res);
27
-    this.setData({
28
-      user:res.data,
29
-      fileurl:res.data.userfrontofidcard,
30
-      back:res.data.userreverseofidcard
31
-    })
32
-  })
33
-  .catch((err) => {
34
-    console.error('请求失败:', err);
35
-    // 在这里处理请求失败的情况
36
-  });
37
-},
38
-// 上传头像
39
-bindtoImage(){
40
-  let _this = this
41
-  // 先检查隐私授权状态
42
-  wx.getPrivacySetting({
43
-    success: (res) => {
44
-      if (res.needAuthorization) {
45
-        // 弹出隐私协议弹窗
46
-        wx.requirePrivacyAuthorize({
47
-          success: () => {
48
-            console.log('用户已同意隐私协议');
49
-            _this.choosetoImage(); // 继续执行上传
50
-          },
51
-          fail: () => {
52
-            console.log('用户拒绝了隐私协议');
53
-            wx.showToast({
54
-              title: '需同意隐私协议才能使用',
55
-              icon: 'none'
56
-            });
57
-          }
58
-        });
59
-      } else {
60
-          _this.choosetoImage(); // 已授权,直接上传
61
-      }
62
-    }
63
-  });
64
-},
65
-// 上传头像图片
66
-choosetoImage() {
67
-  let _this = this
68
-  wx.chooseMedia({    
69
-    count: 1,
70
-    mediaType: ['image','video'],
71
-    sourceType: ['album', 'camera'],
72
-    success(res) {
73
-      console.log(res);
74
-      const tempFiles = res.tempFiles;
75
-      _this.setData({
76
-        imageList: tempFiles.map(file => file.tempFilePath),
77
-      });
78
-      _this.uploadtoImages(tempFiles);
79
-    },
80
-    fail(err) {
81
-      console.error("选择失败:", err);
82
-    }
83
-  })
84
-  },
85
-  // 上传到服务器
86
-  uploadtoImages(files) {
87
-  let _this =this
88
-  const token = wx.getStorageSync('token');
89
-  files.forEach((file) => {
90
-  wx.uploadFile({
91
-  url: 'https://esos-iot.bjdexn.cn:8443/toolprogram/upload/webPost',
92
-  filePath: file.tempFilePath,
93
-  name: 'file',
94
-  formData: {
95
-    file:file.tempFilePath
96
-  },
97
-  header: {
98
-    'Authorization': 'Bearer ' + token // Also add to header if needed
99
-  },
100
-  success: (res) => {
101
-  console.log(res);
102
-  const obj = JSON.parse(res.data);
103
- 
104
-  let data ={
105
-    userprofile:obj.data.userprofile,
106
-  }
107
-api.request(`/toolprogram/insertpartner`, 'POST',data)
108
-.then((res) => {
109
-  console.log(res);
110
-  this.setData({
111
-    user:res.data,
112
-    fileurl:res.data.userfrontofidcard,
113
-    back:res.data.userreverseofidcard
114
-  })
115
-  wx.showToast({
116
-    title: res.msg,
117
-    icon: 'none'
118
-  });
119
-})
120
-.catch((err) => {
121
-  console.error('请求失败:', err);
122
-  // 在这里处理请求失败的情况
123
-});
124
-  },
125
-  fail: (err) => {
126
-    console.error('上传失败', err);
127
-  },
128
-  });
129
-  });
130
-  },
131
- 
132
-  /**
133
-   * 生命周期函数--监听页面初次渲染完成
134
-   */
135
-  onReady() {
136
-
137
-  },
138
-
139
-  /**
140
-   * 生命周期函数--监听页面显示
141
-   */
142
-  onShow() {
143
-
144
-  },
145
-
146
-  /**
147
-   * 生命周期函数--监听页面隐藏
148
-   */
149
-  onHide() {
150
-
151
-  },
152
-
153
-  /**
154
-   * 生命周期函数--监听页面卸载
155
-   */
156
-  onUnload() {
157
-
158
-  },
159
-
160
-  /**
161
-   * 页面相关事件处理函数--监听用户下拉动作
162
-   */
163
-  onPullDownRefresh() {
164
-
165
-  },
166
-
167
-  /**
168
-   * 页面上拉触底事件的处理函数
169
-   */
170
-  onReachBottom() {
171
-
172
-  },
173
-
174
-  /**
175
-   * 用户点击右上角分享
176
-   */
177
-  onShareAppMessage() {
178
-
179
-  }
180
-})

+ 0
- 45
pages/personalInfo/index.wxml Целия файл

@@ -1,45 +0,0 @@
1
-<view class="container">
2
-		<view class="account_number">
3
-	     	<image bind:tap="bindtoImage" class="account_to1" src="{{user.userprofile||''}}" mode=""></image>
4
-		</view>
5
-		<view class="toptabbar">
6
-			<view class="toptabbar_">
7
-				<view class="toptabbar_box">
8
-								<view class="toptabbar_left">
9
-									名称
10
-								</view>
11
-									<view class="toptabbar_right">
12
-                    <input class="uni-mt-5" trim="all" value="{{Peakprice}}" clearSize="0"
13
-										placeholder="请输入报修地点" 	bindinput="onPeakprice"></input>
14
-									</view>
15
-							</view>
16
-				<view class="toptabbar_box">
17
-					<view class="toptabbar_left">
18
-						电话
19
-					</view>
20
-						<view class="toptabbar_right">
21
-							{{user.userphone||'--'}}
22
-						</view>
23
-				</view>
24
-				<view class="toptabbar_box">
25
-					<view class="toptabbar_left">
26
-						投资类型
27
-					</view>
28
-						<view class="toptabbar_right">
29
-							{{user.copartnertype||'--'}}
30
-						</view>
31
-				</view>
32
-        <view class="toptabbar_box">
33
-					<view class="toptabbar_left">
34
-						所属电站
35
-					</view>
36
-						<view class="toptabbar_right">
37
-							{{user.copartnertype||'--'}}
38
-						</view>
39
-				</view>
40
-			</view>
41
-	</view>
42
-  </view>
43
-  <!--
44
-    
45
-  -->

+ 0
- 64
pages/personalInfo/index.wxss Целия файл

@@ -1,64 +0,0 @@
1
-/* pages/personalInfo/index.wxss */  .uni-page{
2
-	  		width: 100%;
3
-	  		height: 100%;
4
-	  	}
5
-	  .container {
6
-	  	height: 100%;
7
-	    background: linear-gradient(to bottom, #0F80DC -40%, #f0f5f5 40%, #f0f5f5 100%);
8
-	    box-sizing: border-box;
9
-	  }     
10
-	  .account_number{
11
-	    width: 100%;
12
-		padding: 20rpx;
13
-		display: flex;
14
-		justify-content: center;
15
-		box-sizing: border-box;
16
-	  }
17
-	 .account_to1{
18
-		 width: 200rpx;
19
-		 height: 200rpx;
20
-     border-radius: 100rpx;
21
-     border: 1rpx solid #ffffff;
22
-	 }
23
- 
24
-	   .toptabbar {
25
-	     width: 100%;
26
-	     padding: 10rpx 20rpx;
27
-	     box-sizing: border-box;
28
-	   }
29
-	   .toptabbar_{
30
-		   border-radius: 10rpx;
31
-		   overflow: hidden;
32
-		   padding:0rpx 20rpx 20rpx 20rpx;
33
-		   background-color: #ffffff;
34
-	   }
35
-		.toptabbar_box{
36
-			width: 100%;
37
-			height: 120rpx;
38
-			display: flex;
39
-			align-items: center;
40
-			justify-content: space-between;
41
-			border-bottom: 1rpx #f5f5f5 solid;
42
-		}
43
-        .toptabbar_left{
44
-		 font-size: 28rpx;
45
-		}
46
-    .account_to{
47
-      width: 100%;
48
-      height: 300rpx;
49
-      border-radius: 10rpx;
50
-      display: flex;
51
-      align-items: center;
52
-      justify-content: center;
53
-      border-radius: 10rpx;
54
-      border: #f5f5f5 1rpx solid;
55
-      box-sizing: border-box;
56
-      }
57
-      .user_to{
58
-        width: 100%;
59
-      height: 360rpx;
60
-      border-radius: 10rpx;
61
-      }
62
-      .uni-mt-5{
63
-        text-align: right;
64
-      }

+ 0
- 288
pages/scheduling/index.js Целия файл

@@ -1,288 +0,0 @@
1
-// pages/scheduling/index.js
2
-const api = require('../../api/index.js');
3
-const timestamp = require("../../utils/util.js")
4
-Page({
5
-
6
-  /**
7
-   * 页面的初始数据
8
-   */
9
-  data: {
10
-    visible:false,
11
-    current: [],
12
-    options: [],
13
-    userdata:[],
14
-    value:'',
15
-    minDate: new Date(2022, 0, 10).getTime(),
16
-    maxDate: new Date(2027, 10, 27).getTime(),
17
-    format(day) {
18
-      const { date } = day;
19
-      const year = date.getFullYear();
20
-      const month = date.getMonth() + 1;
21
-      const curDate = date.getDate();
22
-      
23
-      // 农历月份名称
24
-      const lunarMonths = ['正月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '冬月', '腊月'];
25
-      
26
-      // 农历日期名称
27
-      const lunarDays = [
28
-        '初一', '初二', '初三', '初四', '初五', '初六', '初七', '初八', '初九', '初十',
29
-        '十一', '十二', '十三', '十四', '十五', '十六', '十七', '十八', '十九', '二十',
30
-        '廿一', '廿二', '廿三', '廿四', '廿五', '廿六', '廿七', '廿八', '廿九', '三十'
31
-      ];
32
-    
33
-      // 阳历节日映射
34
-      const solarFestivals = {
35
-        '1-1': '元旦',
36
-        '2-14': '情人节',
37
-        '3-8': '妇女节',
38
-        '4-1': '愚人节',
39
-        '5-1': '劳动节',
40
-        '6-1': '儿童节',
41
-        '9-10': '教师节',
42
-        '10-1': '国庆节',
43
-        '12-24': '平安夜',
44
-        '12-25': '圣诞节'
45
-      };
46
-    
47
-      // 农历节日映射(需要根据具体年份计算,这里简化处理)
48
-      const lunarFestivals = {
49
-        '正月-初一': '春节',
50
-        '正月-十五': '元宵',
51
-        '五月-初五': '端午',
52
-        '七月-初七': '七夕',
53
-        '八月-十五': '中秋',
54
-        '九月-初九': '重阳',
55
-        '腊月-三十': '除夕'
56
-      };
57
-    
58
-      // 节气映射(简化版)
59
-      const solarTerms = {
60
-        '2-4': '立春', '2-19': '雨水',
61
-        '3-5': '惊蛰', '3-20': '春分',
62
-        '4-5': '清明', '4-20': '谷雨',
63
-        '5-5': '立夏', '5-21': '小满',
64
-        '6-6': '芒种', '6-21': '夏至',
65
-        '7-7': '小暑', '7-23': '大暑',
66
-        '8-8': '立秋', '8-23': '处暑',
67
-        '9-8': '白露', '9-23': '秋分',
68
-        '10-8': '寒露', '10-23': '霜降',
69
-        '11-7': '立冬', '11-22': '小雪',
70
-        '12-7': '大雪', '12-22': '冬至'
71
-      };
72
-    
73
-      // 计算农历日期(简化算法)
74
-      const lunarMonthIndex = (month - 1 + Math.floor(curDate / 15)) % 12;
75
-      const lunarDayIndex = (curDate - 1) % 30;
76
-      
77
-      let lunarDate = lunarDays[lunarDayIndex];
78
-      const lunarMonth = lunarMonths[lunarMonthIndex];
79
-      
80
-      // 如果是初一,显示月份
81
-      if (lunarDayIndex === 0) {
82
-        lunarDate = lunarMonth;
83
-      }
84
-    
85
-      // 设置农历显示
86
-      day.prefix = lunarDate;
87
-    
88
-      // 检查阳历节日
89
-      const solarFestivalKey = `${month}-${curDate}`;
90
-      if (solarFestivalKey in solarFestivals) {
91
-        day.suffix = solarFestivals[solarFestivalKey];
92
-        day.className = 'is-solar-festival';
93
-      }
94
-    
95
-      // 检查农历节日
96
-      const lunarFestivalKey = `${lunarMonth}-${lunarDays[lunarDayIndex]}`;
97
-      if (lunarFestivalKey in lunarFestivals) {
98
-        day.suffix = lunarFestivals[lunarFestivalKey];
99
-        day.className = 'is-lunar-festival';
100
-      }
101
-    
102
-      // 检查节气
103
-      if (solarFestivalKey in solarTerms) {
104
-        day.suffix = solarTerms[solarFestivalKey];
105
-        day.className = 'is-solar-term';
106
-      }
107
-    
108
-      // 周末样式
109
-      if (date.getDay() === 0 || date.getDay() === 6) {
110
-        day.className = (day.className || '') + ' is-weekend';
111
-      }
112
-    
113
-      // 今天日期样式
114
-      const today = new Date();
115
-      if (year === today.getFullYear() && 
116
-          month === today.getMonth() + 1 && 
117
-          curDate === today.getDate()) {
118
-        day.className = (day.className || '') + ' is-today';
119
-      }
120
-    
121
-      return day;
122
-    },
123
-    selectschedudata:[],
124
-    partnerPosition:wx.getStorageSync('partnerPosition').partnerPosition
125
-  },
126
-
127
-            // day.suffix = '¥100';
128
-  /**
129
-   * 生命周期函数--监听页面加载
130
-   */
131
-  onLoad(options) {
132
-  this.getuser()
133
-  const currentTimestamp = Date.now();
134
-  this.setData({
135
-    value:currentTimestamp,
136
-    valuename:timestamp.timestamp(currentTimestamp)
137
-  })
138
-  this.getdatetime()
139
-
140
-  },
141
-  // 查询人员
142
-  getuser(){
143
-    let data = {
144
-      partnerName:'',
145
-      partnerPhone:'',
146
-      partnerType:''
147
-    }
148
-    api.request(`/partner/selectinformationall`, 'POST',data)
149
-    .then((res) => {
150
-      console.log(res);
151
-      const positionMap = { 1: '值班员', 2: '值长', 3: '站长', 4: '董事长' };
152
-      const transformedData = res.data.map(item => ({
153
-        label: item.partnerName,
154
-        value: item.partnerId,
155
-        content: positionMap[item.partnerPosition] || item.partnerPosition,
156
-        ...item
157
-      }));
158
-      console.log(transformedData);
159
-      this.setData({
160
-        options:transformedData
161
-      })
162
-    })
163
-    .catch((err) => {
164
-      console.error('请求失败:', err);
165
-      // 在这里处理请求失败的情况
166
-    });
167
-  },
168
-  
169
-  handleSelect(e) {
170
-    const { value } = e.detail;
171
-    
172
-this.setData({
173
-  value:value,
174
-  valuename:timestamp.timestamp(value)
175
-})
176
-    console.log(value);
177
-    this.getdatetime()
178
-  },
179
-  handleConfirm(e) {
180
-    this.setData({ value: e.detail.value });
181
-    console.log(e.detail.value);
182
-  },
183
-
184
-  handlePanelChange(e) {
185
-    const { year, month } = e.detail;
186
-    console.log('year: ', year, 'month: ', month);
187
-  },
188
-  ondutyadd(){
189
-    this.setData({
190
-      visible:true
191
-    })
192
-  },
193
-  onVisibleChange(){
194
-    this.setData({
195
-      visible:false
196
-    })
197
-  },
198
-  handleGroupChange(event) {
199
-    console.log('group', event.detail.value);
200
-    this.setData({
201
-      current: event.detail.value,
202
-    });
203
-  },
204
-    // 查询日期
205
-    getdatetime(){
206
-      let data = {
207
-        startdate:this.data.valuename,
208
-        enddate:this.data.valuename,
209
-      }
210
-      api.request(`/scheduling/selectscheduling`, 'POST',data)
211
-      .then((res) => {
212
-        console.log(res);
213
-        this.setData({
214
-          selectschedudata:res.data
215
-        })
216
-      })
217
-      .catch((err) => {
218
-        console.error('请求失败:', err);
219
-        // 在这里处理请求失败的情况
220
-      });
221
-    },
222
-    onworkorder(){
223
-      let data ={
224
-        schedulingId:this.data.selectschedudata[0].id,
225
-        partnerId:this.data.current.toString()
226
-      }
227
-      api.request(`/scheduling`, 'POST',data)
228
-      .then((res) => {
229
-        console.log(res);
230
-       this.setData({
231
-        visible:false
232
-       })
233
-       this.getdatetime()
234
-      })
235
-      .catch((err) => {
236
-        console.error('请求失败:', err);
237
-        // 在这里处理请求失败的情况
238
-      });
239
-    },
240
-  /**
241
-   * 生命周期函数--监听页面初次渲染完成
242
-   */
243
-  onReady() {
244
-
245
-  },
246
-
247
-  /**
248
-   * 生命周期函数--监听页面显示
249
-   */
250
-  onShow() {
251
-
252
-  },
253
-
254
-  /**
255
-   * 生命周期函数--监听页面隐藏
256
-   */
257
-  onHide() {
258
-
259
-  },
260
-
261
-  /**
262
-   * 生命周期函数--监听页面卸载
263
-   */
264
-  onUnload() {
265
-
266
-  },
267
-
268
-  /**
269
-   * 页面相关事件处理函数--监听用户下拉动作
270
-   */
271
-  onPullDownRefresh() {
272
-
273
-  },
274
-
275
-  /**
276
-   * 页面上拉触底事件的处理函数
277
-   */
278
-  onReachBottom() {
279
-
280
-  },
281
-
282
-  /**
283
-   * 用户点击右上角分享
284
-   */
285
-  onShareAppMessage() {
286
-
287
-  }
288
-})

+ 0
- 9
pages/scheduling/index.json Целия файл

@@ -1,9 +0,0 @@
1
-{
2
-  "usingComponents": {
3
-    "t-calendar": "tdesign-miniprogram/calendar/calendar",
4
-    "t-icon": "tdesign-miniprogram/icon/icon",
5
-    "t-popup": "tdesign-miniprogram/popup/popup",
6
-    "t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group",
7
-    "t-checkbox": "tdesign-miniprogram/checkbox/checkbox"
8
-  }
9
-}

+ 0
- 50
pages/scheduling/index.wxml Целия файл

@@ -1,50 +0,0 @@
1
-<!--pages/scheduling/index.wxml-->
2
-<view class="scheduling">
3
-  <t-calendar 
4
-    value="{{value}}" 
5
-    switch-mode="year-month" 
6
-    use-popup="{{false}}" 
7
-    type="single" 
8
-    title="日历标题"
9
-    minDate="{{minDate}}" 
10
-    maxDate="{{maxDate}}" 
11
-    show-lunar="{{true}}" 
12
-    format="{{format}}"
13
-    bind:select="handleSelect"  
14
-    bind:confirm="handleConfirm"
15
-    bind:panel-change="handlePanelChange"
16
-  />
17
-
18
-<view class="content">
19
-<view class="content_fonst">
20
-<view>{{valuename}} 值班</view>
21
-
22
-<view class="Scancode_lefticon" wx:if="{{partnerPosition!=1}}">
23
-  <t-icon bind:tap="ondutyadd" name="add" size="60rpx" data-name="add"/>
24
- </view>
25
- </view>
26
-<view class="Scancode_content" wx:for="{{selectschedudata[0].partner}}">{{item.partnerName}} 
27
-  <!-- 1: '值班员', 2: '值长', 3: '站长', 4: '董事长'  -->
28
-<text class="Scancode_content11" wx:if="{{item.partnerPosition==1}}">值班员</text>
29
-<text class="Scancode_content11" wx:if="{{item.partnerPosition==2}}">值长</text>
30
-<text class="Scancode_content11" wx:if="{{item.partnerPosition==3}}">站长</text>
31
-<text class="Scancode_content11" wx:if="{{item.partnerPosition==4}}">董事长</text>
32
-</view>
33
-
34
-</view>
35
-</view>
36
-
37
-<t-popup
38
-  visible="{{visible}}"
39
-  usingCustomNavbar
40
-  bind:visible-change="onVisibleChange"
41
-  placement="bottom"
42
->
43
-   <view class="popupbox">
44
-   <view class="popupboxname">选择值班员</view>
45
-   <t-checkbox-group value="{{current}}" bind:change="handleGroupChange" options="{{options}}" />
46
-   <view class="workorder_box">
47
-<view class="workorder" bind:tap="onworkorder">提交</view>
48
-</view>
49
-   </view>
50
-</t-popup>

+ 0
- 187
pages/scheduling/index.wxss Целия файл

@@ -1,187 +0,0 @@
1
-/* pages/scheduling/index.wxss */
2
-
3
-page{
4
-  width: 100%;
5
-  height: 100%;
6
-  background-color: #f5f5f5;
7
-box-sizing: border-box;
8
-
9
-}
10
-.scheduling{
11
-  padding:20rpx 20rpx;
12
-box-sizing: border-box;
13
-
14
-}
15
-.content{
16
-  width: 100%;
17
-  margin-top: 20rpx;
18
-  padding: 20rpx;
19
-background-color: #ffffff;
20
-border-radius: 10rpx;
21
-display: flex;
22
-flex-direction: column;
23
-box-sizing: border-box;
24
-
25
-}
26
-.Scancode_content{
27
-  width: 600rpx;
28
-  display: flex;
29
-  margin-top: 20rpx;
30
-  box-sizing: border-box;
31
-}
32
-.Scancode_lefticon{
33
-  width: 100rpx;
34
-  margin-top: 20rpx;
35
-  display: flex;
36
-  align-items: center;
37
-  justify-content: center;
38
-  border: 1rpx solid #cccccc;
39
-  border-radius: 10rpx;
40
-  box-sizing: border-box;
41
-
42
-
43
-}
44
-.popupbox{
45
-  width: 100%;
46
-  min-height: 600rpx;
47
-}
48
-.content_fonst{
49
-  display: flex;
50
-  align-items: center;
51
-  justify-content: space-between;
52
-  /* justify-content:space-around; */
53
-  font-size: 36rpx;
54
-  margin-bottom: 20rpx;
55
-  box-sizing: border-box;
56
-}
57
-.popupboxname{
58
-  width: 100%;
59
-  display: flex;
60
-  justify-content: center;
61
-  align-items: center;
62
-  font-size: 36rpx;
63
-  padding: 20rpx 0rpx;
64
-}
65
-.box {
66
-  padding: 32rpx;
67
-  display: flex;
68
-  justify-content: space-between;
69
-  flex-wrap: wrap;
70
-  background-color: var(--td-bg-color-container, #fff);
71
-}
72
-/* 日历容器 */
73
-.scheduling {
74
-  width: 100%;
75
-  padding: 20rpx;
76
-  background: #f8f9fa;
77
-  min-height: 100vh;
78
-}
79
-
80
-/* 节日样式 */
81
-.is-festival .t-calendar__cell--solar {
82
-  color: #e74c3c !important;
83
-  font-weight: bold !important;
84
-}
85
-
86
-.is-festival .t-calendar__cell--lunar {
87
-  color: #e74c3c !important;
88
-  font-weight: bold !important;
89
-}
90
-
91
-/* 节气样式 */
92
-.is-term .t-calendar__cell--solar {
93
-  color: #27ae60 !important;
94
-}
95
-
96
-.is-term .t-calendar__cell--lunar {
97
-  color: #27ae60 !important;
98
-  font-weight: bold !important;
99
-}
100
-
101
-/* 周末样式 */
102
-.is-weekend .t-calendar__cell--solar {
103
-  color: #7f8c8d !important;
104
-}
105
-
106
-/* 有节日的单元格 */
107
-.has-festival .t-calendar__cell--suffix {
108
-  position: absolute;
109
-  top: 4rpx;
110
-  right: 4rpx;
111
-  font-size: 18rpx;
112
-  color: #e74c3c;
113
-  background: rgba(231, 76, 60, 0.1);
114
-  padding: 2rpx 6rpx;
115
-  border-radius: 8rpx;
116
-  transform: scale(0.8);
117
-}
118
-
119
-/* 调整农历显示样式 */
120
-.t-calendar__cell--lunar {
121
-  font-size: 20rpx !important;
122
-  color: #666 !important;
123
-  margin-top: 2rpx !important;
124
-}
125
-
126
-/* 选中状态样式 */
127
-.t-calendar__cell--selected .t-calendar__cell--solar,
128
-.t-calendar__cell--selected .t-calendar__cell--lunar {
129
-  color: #ffffff !important;
130
-}
131
-
132
-/* 今天日期样式 */
133
-.t-calendar__cell--now .t-calendar__cell--solar {
134
-  color: #007aff !important;
135
-  font-weight: bold !important;
136
-}
137
-
138
-.t-calendar__cell--now .t-calendar__cell--lunar {
139
-  color: #007aff !important;
140
-}
141
-
142
-/* 调整单元格高度 */
143
-.t-calendar__cell {
144
-  min-height: 110rpx !important;
145
-  padding: 8rpx 4rpx !important;
146
-}
147
-
148
-/* 月份切换面板样式 */
149
-.t-calendar__panel {
150
-  background: #fff;
151
-  border-radius: 16rpx;
152
-  margin-bottom: 20rpx;
153
-}
154
-.workorder_box{
155
-  width: 100%;
156
-
157
-  padding-top:30rpx;
158
-  display: flex;
159
-/* align-items: center; */
160
-justify-content: center;
161
-box-sizing: border-box;
162
-background-color: #ffffff;
163
-}
164
-.workorder{
165
-  width: 480rpx;
166
-  height: 80rpx;
167
-  font-size: 32rpx;
168
-  background-color: rgba(15, 128, 220, 0.2);
169
-  color: #0F80DC;
170
-  border:1rpx solid #0F80DC;
171
-display: flex;
172
-align-items: center;
173
-justify-content: center;
174
-border-radius: 10rpx;
175
-}
176
-.Scancode_content11{
177
-  display: flex;
178
-  align-items: center;
179
-  justify-content: center;
180
-  padding: 4rpx 10rpx;
181
-  background-color: #0F80DC;
182
-  border: 1rpx solid #0F80DC;
183
-  border-radius: 100rpx;
184
-margin-left: 20rpx;
185
-  color: #fff;
186
-  box-sizing: border-box;
187
-}

+ 1
- 1
pages/setup/index.wxss Целия файл

@@ -1,7 +1,7 @@
1 1
 .setup{
2 2
   width: 100%;
3 3
   height: 100vh;
4
-  background: linear-gradient(to bottom, #0F80DC -40%, #F0F5F5 40%,#F0F5F5 100%);
4
+  background: linear-gradient(to bottom, #F0F5F5 -40%, #F0F5F5 40%,#F0F5F5 100%);
5 5
   padding: 0rpx 30rpx;
6 6
   box-sizing: border-box;
7 7
 

+ 3
- 3
pages/setuplevel/index.wxss Целия файл

@@ -1,6 +1,6 @@
1 1
 /* pages/setuplevel/index.wxss */
2 2
 page{
3
- background: linear-gradient(to bottom, #0F80DC -40%, #F0F5F5 40%,#F0F5F5 100%);
3
+ background: linear-gradient(to bottom, #00C775 -40%, #F0F5F5 40%,#F0F5F5 100%);
4 4
 }
5 5
 .buttom_{
6 6
   width: 100%;
@@ -13,8 +13,8 @@ page{
13 13
 .buttom{
14 14
   width: 80%;
15 15
   height: 80rpx;
16
-  color: #0F80DC;
17
- border: 1rpx solid #0F80DC;
16
+  color: #00C775;
17
+ border: 1rpx solid #00C775;
18 18
  display: flex;
19 19
  align-items: center;
20 20
  justify-content: center;

+ 0
- 164
pages/statistics/index.js Целия файл

@@ -1,164 +0,0 @@
1
-// pages/statistics/index.js
2
-
3
-const api = require('../../api/index.js');
4
-
5
-Page({
6
-
7
-  /**
8
-   * 页面的初始数据
9
-   */
10
-  data: {
11
-    // 状态栏高度
12
-    statusBarHeight: wx.getStorageSync('statusBarHeight'),
13
-    // 导航栏高度
14
-    navBarHeight: wx.getStorageSync('navBarHeight'),
15
-    // 导航栏和状态栏高度
16
-    navStatusBarHeight: wx.getStorageSync('navStatusBarHeight'),
17
-    // 胶囊
18
-    menu:wx.getStorageSync('menu'),
19
-    sunec: {
20
-      lazyLoad: true
21
-    }
22
-  },
23
-
24
-  /**
25
-   * 生命周期函数--监听页面加载
26
-   */
27
-  onLoad(options) {
28
-    this.sunline = this.selectComponent('#sunlinechart')
29
-    this.onworkorder()
30
-  //  this.getsunlinechart()
31
-  },
32
-  onlevel(){
33
-    console.log(1111111);
34
-wx.navigateBack({
35
-  data:1
36
-})
37
-  },
38
-  onworkorder(){
39
-    let data = {
40
-      workorderType:''
41
-    }
42
-    api.request(`/workoder/statistics`, 'POST',data)
43
-    .then((res) => {
44
-      console.log(res);
45
-      this.setData({
46
-        workorder:res.data
47
-      })
48
-    })
49
-    .catch((err) => {
50
-      console.error('请求失败:', err);
51
-      // 在这里处理请求失败的情况
52
-    });
53
-  },
54
-  // 日用电价走势
55
-  getsunlinechart() {
56
-    this.sunline.init((canvas, width, height, dpr) => {
57
-      const chart = echarts.init(canvas, null, {
58
-        width: width,
59
-        height: height,
60
-        devicePixelRatio: dpr
61
-      });
62
-      canvas.setChart(chart);
63
-      var option = {
64
-        xAxis: {
65
-          type: 'category',
66
-          data: [1,2,3,4,5,6,7,8,9,10]
67
-        },
68
-        yAxis: {
69
-          type: 'value',
70
-          axisLine: {
71
-            show: true,
72
-            lineStyle: {
73
-              color: '#999',
74
-              width: 1
75
-            }
76
-          },
77
-          axisTick: {
78
-            show: false
79
-          },
80
-          splitLine: {
81
-            show: true,
82
-            lineStyle: {
83
-              type: 'dotted',
84
-              color: '#ccc',
85
-              width: 1,
86
-              opacity: 0.6
87
-            }
88
-          }
89
-        },
90
-        grid: {
91
-          top: '10%',
92
-          left: '0%',
93
-          right: '4%',
94
-          bottom: '3%',
95
-          containLabel: true
96
-        },
97
-        series: [
98
-          {
99
-            data: [10,20,30,40,50,60,70,70,70,70,70],
100
-            showSymbol: false,
101
-            type: 'line',
102
-            step: 'start',
103
-            color: '#B2D5CB',
104
-          }
105
-        ]
106
-      };
107
-
108
-      chart.setOption(option);
109
-      return chart;
110
-    });
111
-  },
112
-  /**
113
-   * 生命周期函数--监听页面初次渲染完成
114
-   */
115
-  onReady() {
116
-
117
-  },
118
-  onstatistics(){
119
-    wx.switchTab({
120
-      url: '/pages/tool/index',
121
-    })
122
-  },
123
-  /**
124
-   * 生命周期函数--监听页面显示
125
-   */
126
-  onShow() {
127
-
128
-  },
129
-
130
-  /**
131
-   * 生命周期函数--监听页面隐藏
132
-   */
133
-  onHide() {
134
-
135
-  },
136
-
137
-  /**
138
-   * 生命周期函数--监听页面卸载
139
-   */
140
-  onUnload() {
141
-
142
-  },
143
-
144
-  /**
145
-   * 页面相关事件处理函数--监听用户下拉动作
146
-   */
147
-  onPullDownRefresh() {
148
-
149
-  },
150
-
151
-  /**
152
-   * 页面上拉触底事件的处理函数
153
-   */
154
-  onReachBottom() {
155
-
156
-  },
157
-
158
-  /**
159
-   * 用户点击右上角分享
160
-   */
161
-  onShareAppMessage() {
162
-
163
-  }
164
-})

+ 0
- 6
pages/statistics/index.json Целия файл

@@ -1,6 +0,0 @@
1
-{
2
-  "navigationStyle": "custom",
3
-  "usingComponents": {
4
-    "t-icon": "tdesign-miniprogram/icon/icon"
5
-    }
6
-}

+ 0
- 109
pages/statistics/index.wxml Целия файл

@@ -1,109 +0,0 @@
1
-<!--pages/statistics/index.wxml-->
2
-<view class="statistics_bj">
3
-  <view class="navigation-container" style="{{'height: ' + navStatusBarHeight +'px'}}">
4
-    <!--空白来占位状态栏-->
5
-    <view style="{{'height: ' + statusBarHeight +'px'}}"></view>
6
-    <!--自定义导航栏 -->
7
-    <view class="navigation-bar" style="{{'height:' + navBarHeight +'px'}}">
8
-      <t-icon name="chevron-left" size="70rpx" data-name="chevron-left" bind:tap="onlevel" />
9
-    </view>
10
-
11
- 
12
-  </view>
13
-  <view class="statistics">
14
-      <view class="piece" bind:tap="onstatistics">
15
-        <view class="statistics_top">
16
-          <view class="statistics_1">
17
-            <view class="statistics_digit">{{workorder.allcount}}</view>
18
-            <view class="statistics_title">全部工单</view>
19
-          </view>
20
-          <view class="statistics_1">
21
-            <view class="statistics_digit">{{workorder.incompletecount}}</view>
22
-            <view class="statistics_title">全部待办</view>
23
-          </view>
24
-          <view class="statistics_1">
25
-            <view class="statistics_digit">{{workorder.completecount}}</view>
26
-            <view class="statistics_title">全部办结</view>
27
-          </view>
28
-        </view>
29
-        <view style="height: 20rpx;"></view>
30
-        <view class="statistics_top">
31
-          <view class="statistics_1">
32
-            <view class="statistics_digit">{{workorder.myworkodercount}}</view>
33
-            <view class="statistics_title">我的工单</view>
34
-          </view>
35
-          <view class="statistics_1">
36
-            <view class="statistics_digit">{{workorder.myworkodertodo}}</view>
37
-            <view class="statistics_title">我的待办</view>
38
-          </view>
39
-          <view class="statistics_1">
40
-            <view class="statistics_digit">{{workorder.myworkoderend}}</view>
41
-            <view class="statistics_title">我的已办</view>
42
-          </view>
43
-        </view>
44
-      </view>
45
-<!--  -->
46
-      <view style="height: 40rpx;"></view>
47
-      <view class="piece">
48
-
49
-        <view class="statistics_top">
50
-          <view class="statistics_1">
51
-            <view class="statistics_digit">{{workorder.dayworkoderAssemble}}</view>
52
-            <view class="statistics_title">今天工单</view>
53
-          </view>
54
-          <view class="statistics_1">
55
-            <view class="statistics_digit">{{workorder.dayworkoderTodo}}</view>
56
-            <view class="statistics_title">今天待办</view>
57
-          </view>
58
-          <view class="statistics_1">
59
-            <view class="statistics_digit">{{workorder.dayworkoderEnd}}</view>
60
-            <view class="statistics_title">今天已办</view>
61
-          </view>
62
-        </view>
63
-        <view style="height: 20rpx;"></view>
64
-
65
-        <view class="statistics_top">
66
-          <view class="statistics_1">
67
-            <view class="statistics_digit">{{workorder.weeksworkoderAssemble}}</view>
68
-            <view class="statistics_title">周工单</view>
69
-          </view>
70
-          <view class="statistics_1">
71
-            <view class="statistics_digit">{{workorder.monthworkoderAssemble}}</view>
72
-            <view class="statistics_title">月工单</view>
73
-          </view>
74
-          <view class="statistics_1">
75
-            <view class="statistics_digit">{{workorder.yearworkoderAssemble}}</view>
76
-            <view class="statistics_title">年工单</view>
77
-          </view>
78
-        </view>
79
-        <view class="statistics_top">
80
-          <view class="statistics_1">
81
-            <view class="statistics_digit">{{workorder.failcount}}</view>
82
-            <view class="statistics_title">审核失败</view>
83
-          </view>
84
-          <view class="statistics_1">
85
-            <view class="statistics_digit">{{workorder.successcount}}</view>
86
-            <view class="statistics_title">审核完成</view>
87
-          </view>
88
-          <view class="statistics_1">
89
-            <view class="statistics_digit1"></view>
90
-            <view class="statistics_title1"></view>
91
-          </view>
92
-        </view>
93
-      </view>
94
-    </view>
95
-
96
-    <view class="qiun_data">
97
-        <!-- <qiun-data-charts type="line" :opts="daylineopts" :chartData="daylinechart" /> -->
98
-        <!-- <view class="qiun_box">
99
-          每日工单
100
-    <view class="eccanvas">
101
-
102
-        <ec-canvas force-use-old-canvas="true" id="sunlinechart" canvas-id="sunlinechart" ec="{{ sunec }}"></ec-canvas>
103
-      </view>
104
-        </view> -->
105
-      
106
-      </view>
107
-
108
-
109
-</view>

+ 0
- 93
pages/statistics/index.wxss Целия файл

@@ -1,93 +0,0 @@
1
-/* pages/statistics/index.wxss */
2
-page{
3
-  width: 100%;
4
-  height: 100%;
5
-}
6
-.statistics_bj{
7
-  width: 100%;
8
-  height: 100%;
9
-  background-image: url('https://esos-iot.bjdexn.cn/myminio/project/40d665be18f5406daefdd1716164466e.png');
10
-  background-repeat: no-repeat;
11
-  background-size: 100% 100%;
12
-}
13
-.navigation-container {
14
-  position: fixed;
15
-  width: 100%;
16
-  z-index: 99;
17
-}
18
-.navigation-bar {
19
-  position: relative;
20
-  width: 100%;
21
-  display: flex;
22
-  align-items: center;
23
-  /* justify-content: center; */
24
-  padding-left: 20rpx;
25
-  flex-direction: row;
26
-  color: #333333;
27
-}
28
-.statistics{
29
-  width: 100%;
30
-  padding: 0rpx 20rpx;
31
-  padding-top: 400rpx;
32
-  box-sizing: border-box;
33
-}
34
-.statistics_top{
35
-  display: flex;
36
-  justify-content: space-between;
37
-}
38
-.piece{
39
-  border-radius: 10rpx;
40
-  background-color: #ffffff;
41
-  padding: 10rpx 20rpx;
42
-
43
-}
44
-.statistics_1{
45
-  display: flex;
46
-  flex-direction: column;
47
-  justify-content: center;
48
-  align-items: center;
49
-}
50
-.statistics_digit{
51
-  font-size: 48rpx;
52
-}
53
-.statistics_digit1{
54
-  width: 116rpx;
55
-  font-size: 48rpx;
56
-}
57
-.statistics_title1{
58
-  margin-top: 10rpx;
59
-}
60
-.statistics_title{
61
-  margin-top: 10rpx;
62
-}
63
-
64
-.qiun_data {
65
-  width: 100%;
66
-  margin-top: 20rpx;
67
-  padding: 20rpx;
68
-  display: flex;
69
-  flex-direction: column;
70
-  /* overflow: auto; */
71
-  box-sizing: border-box;
72
-  border-radius: 8rpx;
73
-overflow: hidden;
74
-  
75
-}
76
-.qiun_box{
77
-  width: 100%;
78
-  height: 100%;
79
-  background-color: #ffffff;
80
-  padding: 20rpx;
81
-  box-sizing: border-box;
82
-
83
-}
84
-.eccanvas{
85
-  width: 100%;
86
-  height: 500rpx;
87
-  box-sizing: border-box;
88
-  }
89
-#mychart_line{
90
-  width: 100%;
91
-    height: 500rpx;
92
-  box-sizing: border-box;
93
-  }

+ 6
- 129
pages/tool/index.js Целия файл

@@ -2,16 +2,8 @@ const api = require('../../api/index.js');
2 2
 Page({
3 3
 
4 4
   data: {
5
-    visible:false,
6
-    tabsindex:"1,2",
7
-    workorderName:'',
8
-    datestart:'',
9
-    dateend:'',
10
-    array:['日常','故障','其他'],
11
-    priority:'',
12
-    index:'',
13
-    reviewdata:[],
14
-    examineType:0
5
+    tabsindex:"1",
6
+ 
15 7
   },
16 8
   onLoad() {
17 9
   },
@@ -23,131 +15,16 @@ Page({
23 15
   })
24 16
   this.gitreview()
25 17
   },
26
-  // 输入工单名称
27
-  onPeakprice(e){
28
-console.log(e.detail.value);
29
-this.setData({
30
-  workorderName:e.detail.value
31
-})
32
-  },
33
-    // 事件
34
-    bindeventChange(e){
35
-      console.log(e.detail.value);
36
-      this.setData({
37
-        index:e.detail.value
38
-      })
39
-        },
40
-  // 开始事件
41
-  bindstartChange: function(e) {
42
-    console.log('picker发送选择改变,携带值为', e.detail.value)
43
-    this.setData({
44
-      datestart: e.detail.value
45
-    })
46
-  },
47
-  // 结束时间
48
-  bindendChange: function(e) {
49
-    console.log('picker发送选择改变,携带值为', e.detail.value)
50
-    this.setData({
51
-      dateend: e.detail.value
52
-    })
53
-  },
54
-    // 工单优先级
55
-    onradio(e){
56
-      console.log(e.detail.value); 
57
-      this.setData({
58
-        priority:e.detail.value
59
-      })
60
-        },
61
-          // 工单审核状态
62
-          onexamineType(e){
63
-      console.log(e.detail.value); 
64
-      this.setData({
65
-        examineType:e.detail.value
66
-      })
67
-        },
68
-        
69
-        onworkorder(){
70
-         this.setData({
71
-          visible:false
72
-         })
73
-        this.gitreview()
74
-        },
75
-        onreset(){
76
-          this.setData({
77
-            workorderName:'',
78
-            tabsindex:"1,2",
79
-            datestart:'',
80
-            dateend:'',
81
-            index:'',
82
-            priority:'',
83
-            examineType:0
84
-          })
85
-          this.gitreview()
86 18
 
87
-        },
88
-  gitreview(){
89
-    
90
-    let data = {
91
-      workorderName:this.data.workorderName,
92
-      workorderType:this.data.tabsindex==0?'':this.data.tabsindex,
93
-      workorderAddress:'',
94
-      starttime:this.data.datestart,
95
-      endtime:this.data.dateend,
96
-      type:this.data.index==''?'':this.data.index*1+1,
97
-      examineType:this.data.examineType==0?'':this.data.examineType
98
-    }
99
-  
100
-    api.request(`/workoder/selectworkoder`, 'POST',data)
101
-    .then((res) => {
102
-  if (res.data) {
103
-    this.setData({
104
-      reviewdata:res.data
105
-    })
106
-  }else{
107
-    this.setData({
108
-      reviewdata:[]
109
-    })
110
-  }
111
-    })
112
-    .catch((err) => {
113
-      console.error('请求失败:', err);
114
-    
115
-      // 在这里处理请求失败的情况
116
-    });
117
-  },
118
-  onfilter(){
119
-    this.setData({
120
-      visible:true
121
-    })
122
-  },
123
-  onVisibleChange(){
124
-    this.setData({
125
-      visible:false
126
-    })
127
-  },
128
-  ondetails(e){
129
-    console.log(e.currentTarget.dataset);
130
-wx.navigateTo({
131
-  url: `/pages/workorderdetails/index?id=${e.currentTarget.dataset.id}&workorderId=${e.currentTarget.dataset.workorderid}`,
132
-})
133
-  },
19
+   
134 20
   onShow() {
135
-    // this.setData({
136
-    //   workorderName:'',
137
-    //   tabsindex:"1,2",
138
-    //   datestart:'',
139
-    //   dateend:'',
140
-    //   index:''
141
-    // })
142
-    this.gitreview()
143
-
21
+ 
144 22
   },
145 23
    /**
146 24
    * 页面相关事件处理函数--监听用户下拉动作
147 25
    */
148
-  async onPullDownRefresh() {
149
-   await this.gitreview()
150
-   await wx.stopPullDownRefresh();
26
+   onPullDownRefresh() {
27
+
151 28
 
152 29
   }
153 30
 });

+ 18
- 130
pages/tool/index.wxml Целия файл

@@ -5,143 +5,31 @@
5 5
 
6 6
 <view class="workorder">
7 7
   <t-tabs value="{{tabsindex}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" split="{{false}}">
8
-    <t-tab-panel label="待办" value="1,2" />
9
-    <t-tab-panel label="办结" value="3" />
10
-  <t-tab-panel label="全部" value="0" />
8
+    <t-tab-panel label="全部" value="1" />
9
+    <t-tab-panel label="待接单" value="2" />
10
+  <t-tab-panel label="服务中" value="3" />
11
+  <t-tab-panel label="已完成" value="4" />
11 12
 </t-tabs>
12
-<view bind:tap="onfilter">
13
+<!-- <view bind:tap="onfilter">
13 14
   <t-icon name="filter" size="50rpx" color="#585CE5" data-name="filter" />
14
-</view>
15
+</view> -->
15 16
 </view>
16 17
 <view style="height: 100rpx;"></view>
17
-<view class="examine_list">
18
-  <view class="examine_box" wx:for="{{reviewdata}}" wx:key="index" data-id="{{item.id}}" data-workorderId="{{item.workorderId}}" bind:tap="ondetails">
19
-<view class="examine_title">
20
-<view class="examine_title0" wx:if="{{item.type==1}}">日常<text style="padding: 0rpx 10rpx;">/</text><text wx:if="{{item.workorderGrade==1}}"> 低</text><text wx:if="{{item.workorderGrade==2}}"> 中</text><text wx:if="{{item.workorderGrade==3}}"> 高</text></view>
21
-<view class="examine_title01" wx:if="{{item.type==2}}">故障 <text style="padding: 0rpx 10rpx;">/</text> <text wx:if="{{item.workorderGrade==1}}"> 低</text><text wx:if="{{item.workorderGrade==2}}"> 中</text><text wx:if="{{item.workorderGrade==3}}"> 高</text></view>
22
-<view class="examine_title02" wx:if="{{item.type==3}}">其他<text style="padding: 0rpx 10rpx;">/</text> <text wx:if="{{item.workorderGrade==1}}"> 低</text><text wx:if="{{item.workorderGrade==2}}"> 中</text><text wx:if="{{item.workorderGrade==3}}"> 高</text></view>
23
-<view class="examine_title1">{{item.workorderName}}</view>
24
-<view class="process_bj2" wx:if="{{item.workorderType==1}}">待处理</view>
25
-<view class="process_bj3" wx:if="{{item.workorderType==2}}">处理中</view>
26
-<view class="examine_title2" wx:if="{{item.workorderType==3}}">处理完成</view>
27
-<!-- <view class="examine_title2" wx:if="{{item.workorderType==3&&item.examineType==5}}">待审核</view>
28
-<view class="examine_title2" wx:if="{{item.workorderType==3&&item.examineType==6}}">审核完成</view>
29
-<view class="examine_title2" wx:if="{{item.workorderType==3&&item.examineType==7}}">审核失败</view> -->
30
-</view>
31
-<view class="examine_content">
32
-<view class="examine_name">描述:{{item.workorderContent}}</view>
33
-<view class="feedback examine_name" wx:if="{{item.examineType==7}}">退回原因:{{item.workoderReason}}</view>
34
-<view class="feedback examine_name" wx:if="{{item.examineCount!=0&&item.examineType!=7}}">退回原因:{{item.lastfail||'无'}}</view>
18
+<view class="order">
19
+<view class="order_box">
20
+<view class="order_title">
21
+<view class="order_title1"> <image class="order_image" src="https://esos-iot.bjdexn.cn/myminio/project/458bb7eea14f42cc958eebf0a8b89da3.png" mode="aspectFit"/> 浙C.78Z71</view>
22
+<!-- <view class="order_title1"> <image class="order_image" src="https://esos-iot.bjdexn.cn/myminio/proje  ct/94f976d5afce444a8861b59681069218.png" mode="aspectFit"/> 浙C.78Z71</view> -->
23
+<view>已完成</view>
35 24
 </view>
36
-<view class="examine_bottom">
37
-<view class="examine_bottompro">
38
-  <view class="promoter"> 
39
- <view class="promoter_people">发起人</view>
40
- <view class="promoter_name">{{item.workorderPromoter}}</view> 
41
- </view>
42
- <view class="promoter_right">
43
-  <view class="promoter_people">发起时间</view>
44
-  <view class="promoter_name">{{item.workorderStarttime}}</view>
45
- </view>
25
+<view class="order_direction"><text class="order_text">方向:</text><text style="color: #FDBA67;">放电</text><text style="color: #00C775;">充电</text></view>
26
+<view class="order_address"><text class="order_text"> 地址:</text>北京丰台</view>
27
+<view class="order_time"><text class="order_text">时间:</text> 01月07日 20:42</view>
28
+<view class="order_bottom">
29
+<view></view>
30
+<view class="order_view">查看详情</view>
46 31
 </view>
47
-
48
- <view class="promoter_review">
49
-  <text class="promoter_review_color" wx:if="{{item.workorderType==3&&item.examineType==5}}">待审核</text>
50
-  <text class="promoter_review_color" wx:if="{{item.workorderType==3&&item.examineType==6}}">审核完成</text>
51
-  <text class="promoter_review_colors" wx:if="{{item.workorderType==3&&item.examineType==7}}">审核失败</text>
52
- </view>
53
-</view>
54
-<!-- <view class="examine_button">
55
-<view class="examine_buttonleft">通过</view>
56
-<view class="examine_buttonright">不通过</view>
57
-</view> -->
58
-</view>
59
-<view class="available" wx:if="{{reviewdata.length==0}}">
60
-<image src="https://esos-iot.bjdexn.cn/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
61 32
 </view>
62 33
 </view>
63 34
 <view style="height: 30rpx;"></view>
64 35
 
65
-<t-popup
66
-  visible="{{visible}}"
67
-  bind:visible-change="onVisibleChange"
68
-  placement="right"
69
->
70
-  <view class="filter">
71
-    <view class="mtinput">
72
-<input class="uni-mt-5" trim="all" value="{{workorderName}}" clearSize="0"
73
-										placeholder="请输入工单标题" 	bindinput="onPeakprice"></input>
74
-</view>
75
-<view class="owner_type1">
76
-          <picker mode="date" value="{{datestart}}" start="2000-01-01" end="2060-09-01" bindchange="bindstartChange">
77
-					<view class="calculation_top">
78
-						<view class="calculation_left">
79
-              开始时间
80
-						</view>
81
-            <view class="event">
82
-						<view class="uni-input">{{datestart}}</view>
83
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
84
-            </view>
85
-					</view>
86
-				</picker>
87
-        </view>
88
-        <view class="owner_type1">
89
-          <picker mode="date" value="{{dateend}}" start="2000-01-01" end="2060-09-01" bindchange="bindendChange">   
90
-					<view class="calculation_top">                                                                            
91
-						<view class="calculation_left">
92
-              结束时间
93
-						</view>
94
-            <view class="event">
95
-						<view class="uni-input">{{dateend}}</view>
96
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
97
-            </view>
98
-					</view>
99
-				</picker>
100
-        </view>
101
-        <view class="owner_type1">
102
-					<picker bindcolumnchange="bindcolumn" bindchange="bindeventChange" value="{{index}}" range="{{array}}">
103
-          <view class="calculation_top">                                                                            
104
-						<view class="calculation_left">
105
-              事件
106
-						</view>
107
-            <view class="event">
108
-						<view class="uni-input">{{array[index]}}</view>
109
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
110
-            </view>
111
-					</view>
112
-        </picker>
113
-        </view>
114
- 
115
-       
116
-
117
-        <view class="owner_type11">
118
-        	<view class="calculation_strategy">
119
-					工单优先级
120
-					</view>
121
-				  <view class="calculation_capsule">
122
-            <t-radio-group default-value="{{priority}}" value="{{priority}}" borderless t-class="box" bindchange="onradio">
123
-  <t-radio block="{{false}}" label="低" value="0" />
124
-  <t-radio block="{{false}}" label="中" value="1" />
125
-  <t-radio block="{{false}}" label="高" value="2" />
126
-</t-radio-group>
127
-					</view>
128
-        </view>
129
-        <view class="owner_type11">
130
-        	<view class="calculation_strategy">
131
-            审核状态
132
-					</view>
133
-				  <view class="calculation_capsule">
134
-            <t-radio-group default-value="{{examineType}}" value="{{examineType}}" borderless t-class="box" bindchange="onexamineType">
135
-  <t-radio block="{{false}}" label="成功" value="6" />
136
-  <t-radio block="{{false}}" label="失败" value="7" />
137
-</t-radio-group>
138
-					</view>
139
-        </view>
140
-        <view class="workorder_box">
141
-
142
-<view class="workorder1" bind:tap="onworkorder">提交</view>
143
-<view class="workorder1" bind:tap="onreset">重置</view>
144
-</view>
145
-  </view>
146
-</t-popup>
147
-<!--   -->

+ 34
- 293
pages/tool/index.wxss Целия файл

@@ -88,322 +88,63 @@ box-sizing: border-box;
88 88
   background-color: #ffffff;
89 89
   box-sizing: border-box;
90 90
 }
91
-.examine_list{
92
-  padding: 0rpx 20rpx;
93
-  box-sizing: border-box;
91
+.order{
92
+
93
+padding: 0rpx 20rpx;
94
+
94 95
 }
95
-.examine_box{
96
+.order_box{
96 97
   width: 100%;
97 98
   background-color: #ffffff;
98
-  padding: 30rpx 0rpx;
99
-margin-top: 20rpx;
100
-border-radius: 10rpx;
99
+padding: 20rpx 20rpx;
101 100
 box-sizing: border-box;
101
+  margin-top: 20rpx;
102
+  border-radius: 10rpx;
102 103
 }
103
-.examine_title{
104
-  width: 100%;
105
-  display: flex;
106
-  align-items: center;
107
-  padding: 0rpx 0rpx 0rpx 20rpx;
108
-  box-sizing: border-box;
109
-}
110
-.examine_title0{
111
- width: 120rpx;
112
- height: 40rpx;
113
- font-size: 22rpx; 
114
- display: flex;
115
- align-items: center;
116
- justify-content: center;
117
- border-radius: 30rpx;
118
- /* background-color: #0F80DC; */
119
- background-color: rgba(0, 117, 68, 0.2);
120
- color: #007544;
121
- 
122
- border: 1rpx solid #007544;
123
-box-sizing: border-box;
124
-}
125
-.examine_title01{
126
-  width: 120rpx;
127
-  height: 40rpx;
128
-  font-size: 22rpx; 
129
-  display: flex;
130
-  align-items: center;
131
-  justify-content: center;
132
-  border-radius: 30rpx;
133
-  /* background-color: #0F80DC; */
134
-  color:#ee8d60;
135
-  background-color: rgba(241, 120, 20, 0.2);
136
-
137
-  border: 1rpx solid #f39b72;
138
- box-sizing: border-box;
139
- }
140
- .examine_title02{
141
-  width: 120rpx;
142
-  height: 40rpx;
143
-  font-size: 22rpx; 
144
-  display: flex;
145
-  align-items: center;
146
-  justify-content: center;
147
-  border-radius: 30rpx;
148
-  /* background-color: #0F80DC; */
149
-  color:#0F80DC;
150
-  background-color: rgba(15, 128, 220, 0.2);
151
-  /* color: #007544; */
152
-  border: 1rpx solid #0F80DC;
153
- box-sizing: border-box;
154
- }
155
-.examine_title1{
156
-  flex: 1;
157
-  font-weight: 600;
158
-  font-size: 32rpx;
159
-  display: flex;
160
-  align-items: center;
161
-  padding: 0rpx 10rpx;
162
-  overflow: hidden;
163
-  display: -webkit-box;
164
-  text-overflow: ellipsis;
165
-  box-orient: vertical;
166
-  -webkit-box-orient: vertical;
167
-  -moz-box-orient: vertical;
168
-  -o-box-orient: vertical;
169
-  -ms-box-orient: vertical;
170
-  line-clamp: 1; /* 超出2行显示省略号 */
171
-  -webkit-line-clamp: 1; /* 超出2行显示省略号 */
172
-  box-sizing: border-box;
173
-}
174
-.examine_title2{
175
-  width: 100rpx;
176
-  height: 40rpx;
177
- font-size: 22rpx; 
178
-  display: flex;
179
-  align-items: center;
180
-  justify-content: center;
181
-border-top-left-radius:100rpx;
182
-border-bottom-left-radius:100rpx;
183
-color:#2BB991;
184
-background: linear-gradient(to bottom, #EAFFFA -40%, #EAFFFA 100%,#F0F5F5 100%);
185
-  border: 1rpx solid #2BB991;
186
-  border-right: 0rpx solid #2BB991;
187
-box-sizing: border-box;
188
-}
189
-.process_bj2{
190
-  width: 100rpx;
191
-  height: 40rpx;
192
- font-size: 22rpx; 
193
-  display: flex;
194
-  align-items: center;
195
-  justify-content: center;
196
-border-top-left-radius:100rpx;
197
-border-bottom-left-radius:100rpx;
198
-color:#0F80DC;
199
-background: linear-gradient(to bottom, #cbe4f8 -40%, #cbe4f8 100%,#F0F5F5 100%);
200
-  border: 1rpx solid #0F80DC;
201
-  border-right: 0rpx solid #0F80DC;
202
-box-sizing: border-box;
203
-}.process_bj3{
204
-  width: 100rpx;
205
-  height: 40rpx;
206
- font-size: 22rpx; 
207
-  display: flex;
208
-  align-items: center;
209
-  justify-content: center;
210
-border-top-left-radius:100rpx;
211
-border-bottom-left-radius:100rpx;
212
-color:#D1815C;
213
-
214
-  background: linear-gradient(to bottom, #FFF6F5 -40%, #FFF6F5 100%,#F0F5F5 100%);
215
- border: 1rpx solid red;
216
-  border-right: 0rpx solid red;
217
-box-sizing: border-box;
218
-}
219
-
220
-.examine_content{
221
-  flex: 1;
222
-  font-size: 24rpx;
223
-  padding: 20rpx 20rpx;
224
-  margin: 20rpx 20rpx;
225
-  background-color: #f9f9f9;
226
-  border-radius: 8rpx;
227
-  box-sizing: border-box;
228
-}
229
-.feedback{
230
- margin-top: 8rpx;
231
-}
232
-
233
-.examine_bottom{
104
+.order_title{
105
+  padding-bottom:12rpx;
234 106
   display: flex;
235 107
   align-items: center;
236 108
   justify-content: space-between;
237
-  /* padding: 0rpx 20rpx; */
238
-box-sizing: border-box;
109
+  border-bottom: 1rpx solid #cccccc;
239 110
 }
240
-.examine_bottompro{
241
-  display: flex;
242
-  align-items: center;
243
-  /* padding: 0rpx 20rpx; */
244
-box-sizing: border-box;
245
-}
246
-.promoter_review{
247
-  color: #2BB991;
248
- /* border: 1rpx solid #2BB991; */
249
- /* border-right: 0rpx solid #2BB991; */
250
- border-top-left-radius:100rpx;
251
-border-bottom-left-radius:100rpx;
252
- padding: 4rpx 10rpx;
253
- box-sizing: border-box;
254
-}
255
-.promoter_review_color{
256
-  margin-right: 8rpx;
111
+.order_title1{
112
+display: flex;
113
+align-items: center;
257 114
 }
258
-.promoter_review_colors{
259
-  color: red;
115
+.order_image {
116
+  width: 60rpx;
117
+  height: 60rpx;
118
+  margin-right: 20rpx;
260 119
 }
261
-.examine_button{
262
-  width: 100%;
263
-  padding: 0rpx 20rpx;
264
-  margin-top: 30rpx;
265
-  display: flex;
266
-  align-items: center;
267
-  justify-content: space-between;
268
-  box-sizing: border-box;
120
+.order_direction{
121
+  margin-top: 40rpx;
269 122
 
270 123
 }
271
-.examine_name{
124
+.order_text{
272 125
   color: #cccccc;
273 126
 }
274
-.t-tabs{
275
-  background-color: rgba(255, 255, 255, 0);
276
-}
277
-.promoter{
278
-  display: flex;
279
-  flex-direction: column;
280
-  justify-content: center;
281
-  align-items: center;
282
-  padding: 0rpx 40rpx;
283
-  border-right:1rpx solid #cccccc;
284
-}
285
-.promoter_name{
127
+.order_address{
286 128
 margin-top: 20rpx;
287 129
 }
288
-.promoter_right{
289
-  display: flex;
290
-  flex-direction: column;
291
-  padding: 0rpx 40rpx;
292
-}
293
-.filter{
294
-  width: 500rpx;
295
-  padding: 30rpx;
296
-  box-sizing: border-box;
297
-
298
-}
299
-.mtinput{
300
-  width: 100%;
301
-  /* padding: 20rpx; */
302
-  box-sizing: border-box;
303
-/* background-color: #ffffff; */
130
+.order_time{
131
+margin-top: 20rpx;
304 132
 
305 133
 }
306
-.uni-mt-5{
307
-  width: 100%;
308
-  height: 80rpx;
309
-  border-radius: 100rpx;
310
-  border: 1rpx solid #cccccc;
311
-  padding: 0rpx 20rpx;
312
-  box-sizing: border-box;
313
-}
314
-.owner_type1 {
315
-  width: 100%;
316
-  height: 120rpx;
134
+.order_bottom{
317 135
   display: flex;
318 136
   align-items: center;
319
-  justify-content: space-between;
320
-  border-bottom: #f0f5f5 1rpx solid;
321
-}
322
-.owner_type11 {
323
-  width: 100%;
324
-  /* height: 120rpx; */
325
-  display: flex;
326
-  flex-direction: column;
327
-  /* align-items: center; */
328
-  justify-content: space-between;
329
-  border-bottom: #f0f5f5 1rpx solid;
330
-}
331
-.calculation_strategy {
332
-  font-size: 26rpx;
333
-  color: #222;
334
-  padding: 20rpx 0rpx;
335
-}
336
-.calculation_capsule {
337
-   width: 100%;
338
-  font-size: 26rpx;
339
-  color: #222;
340
-  padding: 10rpx 20rpx;
341
-}
342
-.owner_easyinput1 {
343
-  width: 100%;
344
-  display: flex;
345
-}
346
-.event{
347
-  /* width: 70%; */
348
-  display: flex;
349
-  justify-content: space-between;
350
-  padding-left: 20rpx;
351
-  align-items: center;
137
+  justify-content:space-between;
352 138
 }
353
-.calculation_top {
354
-  width: 100%;
355
-  height: 100%;
356
-  font-size: 26rpx;
357
-  display: flex;
358
-  align-items: center;
359
-  justify-content: space-between;
360
-}
361
-.calculation_left {
362
-  display: flex;
363
-  font-size: 28rpx;
364
-}
365
-picker{
366
-  width: 100%;
367
-}
368
-.switch-container{
369
-  width: 100%;
370
-}
371
-.t-radio-group{
372
-  width: 100%;
373
-}
374
-.t-radio{
375
-  margin-right: 40rpx;
376
-}
377
-.workorder_box{
378
-  padding-top:300rpx;
379
-  display: flex;
380
-align-items: center;
381
- flex-direction: column;
382
-justify-content: center;
383
-box-sizing: border-box;
384
-background-color: #ffffff;
385
-}
386
-.workorder1{
387
-  width: 480rpx;
388
-  height: 68rpx;
389
-  font-size: 32rpx;
390
-  margin-top: 40rpx;
391
-  background-color: rgba(15, 128, 220, 0.2);
392
-  color: #0F80DC;
393
-  border:1rpx solid #0F80DC;
139
+.order_view{
140
+margin-top: 20rpx;
141
+padding: 10rpx 20rpx;
142
+color: #ffffff;
143
+font-weight: 500;
394 144
 display: flex;
395 145
 align-items: center;
396 146
 justify-content: center;
397
-border-radius: 10rpx;
398
-}
399
-.t-overlay{
400
-  width: 100%; 
401
-  height: 100%;
147
+text-align: right;
148
+border-radius:50rpx;
149
+background-color: #00C775;
402 150
 }
403
-.available{
404
-  width: 100%;
405
-  display: flex;
406
-  align-items: center;
407
-  justify-content: center;
408
-  margin-top: 260rpx;
409
-}

+ 0
- 336
pages/workorder/index.js Целия файл

@@ -1,336 +0,0 @@
1
-// pages/workorder/index.js
2
-const api = require('../../api/index.js');
3
-
4
-Page({
5
-
6
-  /**
7
-   * 页面的初始数据
8
-   */
9
-  data: {
10
-    array:['日常','故障','其他'],
11
-    namelist:[],
12
-    typelist:['日常','故障','其他'],
13
-    devicedata:[],
14
-    index:1,
15
-    nameindex:'',
16
-    typeindex:0,
17
-    deviceindex:'',
18
-    date:'',
19
-    partnerAvite:[],
20
-    priority:'1',
21
-    workorderContent:'',
22
-    switchtype:true,
23
-    datestart:'',
24
-    dateend:''
25
-  },
26
-
27
-  /**
28
-   * 生命周期函数--监听页面加载
29
-   */
30
-  onLoad(options) {
31
-    console.log(options.name);
32
-    this.setData({
33
-      index:options.name
34
-    })
35
-this.getselectinformationall()
36
-this.getselectdevicelist()
37
-  },
38
-  onworkorder(){
39
-
40
-    if (this.data.workorderName==''||this.data.workorderAddress==''||this.data.dateend==''||this.data.datestart==''||this.data.nameindex==''||this.data.deviceindex=='') {
41
-      wx.showToast({
42
-        title: '请填写完整工单',
43
-        icon: 'none'
44
-      });
45
-      return
46
-    }
47
-       
48
-    if (!this.data.switchtype) {
49
-      return
50
-    }
51
-    this.setData({
52
-      switchtype:false
53
-    })
54
-    let data = {
55
-      workorderName:this.data.workorderName,
56
-      workorderAddress:this.data.workorderAddress,
57
-      workorderImg:this.data.partnerAvite.length>0?this.data.partnerAvite.toString():'',
58
-      workorderContent:this.data.workorderContent,
59
-      workoderPartner:this.data.namelist[this.data.nameindex].partnerId,
60
-      workorderEndtime:this.data.dateend,   // 开始时间
61
-      workorderStarttime:this.data.datestart,  // 结束时间
62
-      workorderGrade:this.data.priority,
63
-      type:(this.data.index*1)+1,
64
-      deviceId:this.data.devicedata[this.data.deviceindex].deviceId
65
-    }
66
-    api.request(`/workoder/createworkorder`, 'POST',data)
67
-    .then((res) => {
68
-      console.log(res);
69
-   if (res.code==200) {
70
-    // this.requestSubscribeMessage();
71
-    // this.loadMessages();
72
-    this.setData({
73
-      switchtype:true
74
-    })
75
-     wx.switchTab({
76
-       url: '/pages/index/index',
77
-     })
78
-   }
79
-    })
80
-    .catch((err) => {
81
-      console.error('请求失败:', err);
82
-      // 在这里处理请求失败的情况
83
-      this.setData({
84
-        switchtype:true
85
-      })
86
-    });
87
-  },
88
-
89
-  // 用户信息
90
-  getselectinformationall(){
91
-    let data = {
92
-   
93
-    }
94
-    api.request(`/partner/selectinformationall`, 'POST',data)
95
-    .then((res) => {
96
-      console.log(res);
97
-      this.setData({
98
-        namelist:res.data
99
-      })
100
-    })
101
-    .catch((err) => {
102
-      console.error('请求失败:', err);
103
-      // 在这里处理请求失败的情况
104
-    });
105
-  },
106
-    // 设备列表
107
-    getselectdevicelist(){
108
-      let data = {
109
-      }
110
-      api.request(`/device/selectdevicelist`, 'POST',data)
111
-      .then((res) => {
112
-        console.log(res);
113
-        this.setData({
114
-          devicedata:res.data
115
-        })
116
-      })
117
-      .catch((err) => {
118
-        console.error('请求失败:', err);
119
-        // 在这里处理请求失败的情况
120
-      });
121
-    },
122
-  onPeakprice(e){
123
-    console.log(e.detail.value);
124
-    this.setData({
125
-      workorderName:e.detail.value
126
-    })
127
-  },
128
-  onaddress(e){
129
-    console.log(e.detail.value);
130
-    this.setData({
131
-      workorderAddress:e.detail.value
132
-    })
133
-  },
134
-  ontextarea(e){
135
-    console.log(e);
136
-    this.setData({
137
-      workorderContent:e.detail.value
138
-    })
139
-  },
140
-  bindPickerChange(e){
141
-    console.log('picker发送选择改变,携带值为', e.detail.value)
142
-    this.setData({
143
-      nameindex: e.detail.value
144
-    })
145
-  },
146
-  binddeviceChange(e){
147
-    console.log('picker发送选择改变,携带值为', e.detail.value)
148
-    this.setData({
149
-      deviceindex: e.detail.value,
150
-      workorderAddress:this.data.devicedata[e.detail.value].devicesName
151
-    })
152
-  },
153
-  bindeventChange(e){
154
-    this.setData({
155
-      index: e.detail.value
156
-    })
157
-  },
158
-  // 开始时间
159
-  bindstartChange: function(e) {
160
-    console.log('picker发送选择改变,携带值为', e.detail.value)
161
-    this.setData({
162
-      datestart: e.detail.value
163
-    })
164
-  },
165
-  // 结束时间
166
-  bindendChange: function(e) {
167
-    const selectedEnd = e.detail.value;
168
-    console.log('picker发送选择改变,携带值为', e.detail.value)
169
-    const { datestart } = this.data;
170
-  
171
-    // 检查结束时间是否早于开始时间
172
-    if (datestart && selectedEnd < datestart) {
173
-      wx.showToast({
174
-        title: '结束时间不能早于开始时间',
175
-        icon: 'none',
176
-        duration: 2000
177
-      });
178
-      return;  // 不更新结束时间
179
-    }
180
-    
181
-    // 验证通过,更新结束时间
182
-    this.setData({
183
-      dateend: selectedEnd
184
-    });
185
-  
186
-  },
187
-  // 工单优先级 
188
-  onradio(e){
189
-console.log(e.detail.value); 
190
-this.setData({
191
-  priority:e.detail.value
192
-})
193
-  },
194
-   // 预览图片
195
-   previewImage(e) {
196
-    const src = e.currentTarget.dataset.src;
197
-    wx.previewImage({
198
-      current: src, // 当前显示图片的http链接
199
-      urls: [src]   // 需要预览的图片http链接列表
200
-    });
201
-  },
202
-  bindCancel(e){
203
-    console.log(e.currentTarget.dataset.index);
204
-    let index = e.currentTarget.dataset.index
205
-      // 使用 filter 方法创建新数组(推荐)
206
-  const newPartnerAvite = this.data.partnerAvite.filter((item, i) => i !== index);
207
-  
208
-  this.setData({
209
-    partnerAvite: newPartnerAvite
210
-  });
211
-  },
212
-  // 上传头像--项目--文件1
213
-bindtoImage(){
214
-  let _this = this
215
-  // 先检查隐私授权状态 
216
-  wx.getPrivacySetting({
217
-    success: (res) => {
218
-      if (res.needAuthorization) {
219
-        // 弹出隐私协议弹窗
220
-        wx.requirePrivacyAuthorize({
221
-          success: () => {
222
-            console.log('用户已同意隐私协议');
223
-            _this.choosetoImage(); // 继续执行上传
224
-          },
225
-          fail: () => {
226
-            console.log('用户拒绝了隐私协议');
227
-            wx.showToast({
228
-              title: '需同意隐私协议才能使用',
229
-              icon: 'none'
230
-            });
231
-          }
232
-        });
233
-      } else {
234
-          _this.choosetoImage(); // 已授权,直接上传
235
-      }
236
-    }
237
-  });
238
-},
239
-// 上传头像图片
240
-choosetoImage() {
241
-  let _this = this
242
-  wx.chooseMedia({    
243
-    count: 1,
244
-    mediaType: ['image','video'],
245
-    sourceType: ['album', 'camera'],
246
-    success(res) {
247
-      console.log(res);
248
-      const tempFiles = res.tempFiles;
249
-      _this.setData({
250
-        imageList: tempFiles.map(file => file.tempFilePath),
251
-      });
252
-      _this.uploadtoImages(tempFiles);
253
-    },
254
-    fail(err) {
255
-      console.error("选择失败:", err);
256
-    }
257
-  })
258
-  },
259
-  // 上传到服务器
260
-  uploadtoImages(files) {
261
-  let _this =this
262
-  const token = wx.getStorageSync('token');
263
-  files.forEach((file) => {
264
-  wx.uploadFile({
265
-  url: 'https://esos-iot.bjdexn.cn:8443/config/upload/webPost',
266
-  filePath: file.tempFilePath,
267
-  name: 'file',
268
-  formData: {
269
-    file:file.tempFilePath
270
-  },
271
-  header: {
272
-    'Authorization': 'Bearer ' + token // Also add to header if needed
273
-  },
274
-  success: (res) => {
275
-  console.log(res);
276
-  const obj = JSON.parse(res.data);
277
-  this.data.partnerAvite.push(obj.data.partnerAvite)
278
-  this.setData({
279
-    partnerAvite:this.data.partnerAvite
280
-   })
281
-  },
282
-  fail: (err) => {
283
-    console.error('上传失败', err);
284
-  },
285
-  });
286
-  });
287
-  },
288
-  /**
289
-   * 生命周期函数--监听页面初次渲染完成
290
-   */
291
-  onReady() {
292
-
293
-  },
294
-
295
-  /**
296
-   * 生命周期函数--监听页面显示
297
-   */
298
-  onShow() {
299
-
300
-  },
301
-
302
-  /**
303
-   * 生命周期函数--监听页面隐藏
304
-   */
305
-  onHide() {
306
-
307
-  },
308
-
309
-  /**
310
-   * 生命周期函数--监听页面卸载
311
-   */
312
-  onUnload() {
313
-
314
-  },
315
-
316
-  /**
317
-   * 页面相关事件处理函数--监听用户下拉动作
318
-   */
319
-  onPullDownRefresh() {
320
-
321
-  },
322
-
323
-  /**
324
-   * 页面上拉触底事件的处理函数
325
-   */
326
-  onReachBottom() {
327
-
328
-  },
329
-
330
-  /**
331
-   * 用户点击右上角分享
332
-   */
333
-  onShareAppMessage() {
334
-
335
-  }
336
-})

+ 0
- 9
pages/workorder/index.json Целия файл

@@ -1,9 +0,0 @@
1
-{
2
-  "navigationBarTitleText": "创建工单",
3
-  "usingComponents": {
4
-    "t-icon": "tdesign-miniprogram/icon/icon",
5
-    "t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
6
-    "t-radio": "tdesign-miniprogram/radio/radio",
7
-    "t-textarea": "tdesign-miniprogram/textarea/textarea"
8
-  }
9
-}

+ 0
- 182
pages/workorder/index.wxml Целия файл

@@ -1,182 +0,0 @@
1
-<!--pages/workorder/index.wxml-->
2
-<view class="setup">
3
-
4
-<view class="workorder_list">
5
-  <view class="owner_type1">
6
-					<view class="calculation_strategy">
7
-						<text style="color: red;margin-right: 8rpx;">*</text>工单标题
8
-					</view>
9
-					<view class="event">
10
-						<view class="switch-container">
11
-							<view class="owner_easyinput1">
12
-								<view class="calculation_use">
13
-									<input class="uni-mt-5" trim="all" value="{{workorderName}}" clearSize="0"
14
-										placeholder="请输入工单标题" 	bindinput="onPeakprice"></input>
15
-								</view>
16
-							</view>
17
- 
18
-						</view>
19
-					</view>
20
-				</view>
21
-        <view class="owner_type1">
22
-    <picker bindcolumnchange="bindcolumn" bindchange="bindeventChange" value="{{index}}" range="{{array}}">
23
-					<view class="calculation_top">
24
-						<view class="calculation_left">
25
-              <text style="color: red;margin-right: 8rpx;">*</text>事件
26
-						</view>
27
-            <view class="event">
28
-						<view class="uni-input">{{array[index]}}</view>
29
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
30
-            </view>
31
-					</view>
32
-				</picker>
33
-				
34
-				</view>
35
-        <view class="owner_type1">
36
-          <picker mode="date" value="{{datestart}}" start="2000-01-01" end="2060-09-01" bindchange="bindstartChange">
37
-					<view class="calculation_top">
38
-						<view class="calculation_left">
39
-              <text style="color: red;margin-right: 8rpx;">*</text>
40
-              开始时间
41
-						</view>
42
-            <view class="event">
43
-						<view class="uni-inputcolor" wx:if="{{datestart==''}}">请选择开始时间</view>
44
-						<view class="uni-input" wx:else>{{datestart}}</view>
45
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
46
-            </view>
47
-					</view>
48
-				</picker>
49
-        </view>
50
-        <view class="owner_type1">
51
-          <picker mode="date" value="{{dateend}}" start="2000-01-01" end="2060-09-01" bindchange="bindendChange">
52
-					<view class="calculation_top">
53
-						<view class="calculation_left">
54
-              <text style="color: red;margin-right: 8rpx;">*</text>
55
-              结束时间
56
-						</view>
57
-            <view class="event">
58
-						<view class="uni-inputcolor" wx:if="{{dateend==''}}">请选择结束时间</view>
59
-						<view class="uni-input" wx:else>{{dateend}}</view>
60
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
61
-            </view>
62
-					</view>
63
-				</picker>
64
-        </view>
65
-
66
-        <view class="owner_type1">
67
-          <picker bindcolumnchange="bindcolumn" value="{{nameindex}}" range="{{namelist}}" range-key="partnerName" bindchange="bindPickerChange">
68
-					<view class="calculation_top">
69
-						<view class="calculation_left">
70
-              <text style="color: red;margin-right: 8rpx;">*</text>处理人
71
-						</view>
72
-            <view class="event">
73
-						<view class="uni-input" wx:if="{{namelist[nameindex].partnerName}}">{{namelist[nameindex].partnerName}}</view>
74
-						<view class="uni-inputcolor" wx:else>请选择处理人</view>
75
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
76
-            </view>
77
-					</view>
78
-				</picker>
79
-        </view>
80
-        <!-- <view class="owner_type1">
81
-          <picker bindcolumnchange="bindcolumn" bindchange="bindPickerChange" value="{{typeindex}}" range="{{typelist}}">
82
-					<view class="calculation_top">
83
-						<view class="calculation_left">
84
-              <text style="color: red;margin-right: 8rpx;">*</text>类型
85
-						</view>
86
-            <view class="event">
87
-						<view class="uni-input">{{typelist[typeindex]}}</view>
88
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
89
-            </view>
90
-					</view>
91
-				</picker>
92
-        </view> -->
93
-        <view class="owner_type1">
94
-          <picker bindcolumnchange="bindcolumn" bindchange="binddeviceChange" value="{{deviceindex}}" range="{{devicedata}}" range-key="devicesName">
95
-					<view class="calculation_top">
96
-						<view class="calculation_left">
97
-              <text style="color: red;margin-right: 8rpx;">*</text>设备/巡检
98
-						</view>
99
-            <view class="event">
100
-						<view class="uni-input" wx:if="{{devicedata[deviceindex].devicesName}}">{{devicedata[deviceindex].devicesName}}</view>
101
-						<view class="uni-inputcolor" wx:else>请选择设备/巡检</view>
102
-							<t-icon name="chevron-right" size="40rpx" data-name="chevron-right"/>
103
-            </view>
104
-					</view>
105
-				</picker>
106
-        </view>
107
-       
108
-        <view class="owner_type1">
109
-        	<view class="calculation_strategy">
110
-					<text style="color: red;margin-right: 8rpx;">*</text>工单优先级
111
-					</view>
112
-					<view class="calculation_capsule">
113
-            <t-radio-group default-value="{{priority}}" borderless t-class="box" bindchange="onradio">
114
-  <t-radio block="{{false}}" label="低" value="1" />
115
-  <t-radio block="{{false}}" label="中" value="2" />
116
-  <t-radio block="{{false}}" label="高" value="3" />
117
-</t-radio-group>
118
-					</view>
119
-        </view>
120
-        <view class="owner_type1">
121
-					<view class="calculation_strategy">
122
-						<text style="color: red;margin-right: 8rpx;">*</text>报修地点
123
-					</view>
124
-					<view class="event">
125
-						<view class="switch-container">
126
-							<view class="owner_easyinput1">
127
-								<view class="calculation_usebox">
128
-									<input class="uni-mt-5" trim="all" value="{{workorderAddress}}" clearSize="0"
129
-										placeholder="请输入报修地点"	bindinput="onaddress"></input>
130
-               
131
-								</view>
132
-							</view>
133
-
134
-						</view>
135
-					</view>
136
-				</view>
137
-     
138
-        <view class="owner_type1x">
139
-					<view class="calculation_strategy">
140
-						附件上传
141
-					</view>
142
-					<view class="event">
143
-						<view class="switch-container">
144
-							<view class="owner_easyinput1">
145
-              <view class="calculation_imagebox" wx:if="{{partnerAvite}}" wx:for="{{partnerAvite}}" wx:key="index">
146
-							 <image class="calculation_image" src="{{item}}" mode="aspectFit"  data-src="{{item}}" bindtap="previewImage"/>
147
-              <t-icon class="calculation_imagex" data-index="{{index}}" bind:tap="bindCancel" name="close-circle" size="30rpx" data-name="close-circle"/>
148
-              </view>
149
-								<view class="calculation_usebox1" bind:tap="bindtoImage">
150
-                    <t-icon name="add" size="100rpx" data-name="add"/>
151
-								</view>
152
-							</view>
153
-              
154
-						</view>
155
-					</view>
156
-				</view>
157
-        <view class="owner_type2">
158
-        	<view class="calculation_strategy">
159
-            <text style="color: red;margin-right: 20rpx;"></text>描述
160
-					</view>
161
-					<view class="calculation_capsule1">
162
-            <t-textarea
163
-  t-class="external-class"
164
-  placeholder="请输入描述"
165
-  maxlength="200"
166
-  value="{{workorderContent}}"
167
-  disableDefaultPadding="{{true}}"
168
-  indicator
169
-  bindchange="ontextarea"
170
-/>
171
-					</view>
172
-        </view>
173
-</view>
174
-
175
-<view style="height: 200rpx;"></view>
176
-</view>
177
-
178
-<view class="workorder_box">
179
-
180
-<view class="workorder" bind:tap="onworkorder">提交</view>
181
-</view>
182
-

+ 0
- 160
pages/workorder/index.wxss Целия файл

@@ -1,160 +0,0 @@
1
-/* pages/workorder/index.wxss */
2
-page{
3
-  width: 100%;
4
-  height: 100%;
5
-}
6
-.setup{
7
-  width: 100%;
8
-  /* height: 100%; */
9
-  background: linear-gradient(to bottom, #0F80DC -40%, #F0F5F5 40%,#F0F5F5 100%);
10
-  padding: 20rpx 20rpx;
11
-  box-sizing: border-box;
12
-}
13
-.workorder_list{
14
-background-color: #ffffff;
15
-border-radius: 10rpx;
16
-padding: 0rpx 20rpx;
17
-}
18
-picker{
19
-  width: 100%;
20
-}
21
-.owner_type1 {
22
-  width: 100%;
23
-  height: 120rpx;
24
-  display: flex;
25
-  align-items: center;
26
-  justify-content: space-between;
27
-  border-bottom: #f0f5f5 1rpx solid;
28
-}
29
-.owner_type1x{
30
-  width: 100%;
31
-  padding: 20rpx 0rpx;
32
-  display: flex;
33
-  align-items: center;
34
-  justify-content: space-between;
35
-  border-bottom: #f0f5f5 1rpx solid;
36
-}
37
-.calculation_strategy {
38
-  font-size: 26rpx;
39
-  color: #222;
40
-  padding: 20rpx 0rpx;
41
-}
42
-.calculation_capsule {
43
-   width: 70%;
44
-  font-size: 26rpx;
45
-  color: #222;
46
-  padding: 10rpx 20rpx;
47
-}
48
-.owner_easyinput1 {
49
-  width: 100%;
50
-  display: flex;
51
-  flex-wrap: wrap; 
52
-}
53
-.uni-mt-5{
54
-  width: 100%;
55
-  text-align: left;
56
-}
57
-.calculation_use {
58
-  width: 100%;
59
-  font-size: 26rpx;
60
-  display: flex;
61
-  justify-content: space-between;
62
-}
63
-
64
-.calculation_top {
65
-  width: 100%;
66
-  height: 100%;
67
-  font-size: 26rpx;
68
-  display: flex;
69
-  align-items: center;
70
-  justify-content: space-between;
71
-}
72
-.calculation_left {
73
-  display: flex;
74
-  font-size: 28rpx;
75
-}
76
-.uni-input{
77
-  font-size: 28rpx;
78
-  }
79
-  .uni-inputcolor{
80
-    color: #cccccc;
81
-  }
82
- .event{
83
-   width: 70%;
84
-   display: flex;
85
-   justify-content: space-between;
86
-   padding-left: 20rpx;
87
-   align-items: center;
88
- }
89
- .switch-container{
90
-   width: 100%;
91
- }
92
- .t-radio{
93
-   margin-right: 40rpx;
94
- }
95
- .owner_type2 {
96
-  width: 100%;
97
-  display: flex;
98
-  justify-content: space-between;
99
-  border-bottom: #f0f5f5 1rpx solid;
100
-}
101
- .calculation_capsule1 {
102
-  width: 72%;
103
- font-size: 26rpx;
104
- color: #222;
105
- padding: 20rpx 0rpx;
106
-}
107
-.external-class{
108
-  font-size: 28rpx;
109
-  height: 200rpx;
110
-}
111
-.workorder_box{
112
-  width: 100%;
113
-  height: 180rpx;
114
-  position: fixed;
115
-  bottom: 0rpx;
116
-  left: 0rpx;
117
-  padding-top:30rpx;
118
-  display: flex;
119
-/* align-items: center; */
120
-justify-content: center;
121
-box-sizing: border-box;
122
-background-color: #ffffff;
123
-}
124
-.workorder{
125
-  width: 480rpx;
126
-  height: 80rpx;
127
-  font-size: 32rpx;
128
-  background-color: rgba(15, 128, 220, 0.2);
129
-  color: #0F80DC;
130
-  border:1rpx solid #0F80DC;
131
-display: flex;
132
-align-items: center;
133
-justify-content: center;
134
-border-radius: 10rpx;
135
-}
136
-.calculation_usebox1 {
137
-  font-size: 26rpx;
138
-  display: flex;
139
-  align-items: center;
140
-  margin-top: 20rpx;
141
-  border: 1rpx solid #cccccc;
142
-  border-radius: 10rpx;
143
-  /* justify-content: space-between; */
144
-}
145
-.calculation_imagebox{
146
-  width: 120rpx;
147
- height: 120rpx;
148
- margin-right: 40rpx;
149
- position:relative;
150
-}
151
-.calculation_imagex{
152
-position: absolute;
153
-
154
-  top: 0rpx;
155
-  right: 0rpx;
156
-}
157
-.calculation_image{
158
-  width: 120rpx;
159
-  height: 120rpx;
160
-}

+ 0
- 503
pages/workorderdetails/index.js Целия файл

@@ -1,503 +0,0 @@
1
-// pages/Workorderdetails/index.js
2
-const api = require('../../api/index.js');
3
-
4
-Page({
5
-
6
-  /**
7
-   * 页面的初始数据
8
-   */
9
-  data: {
10
-    first: 1,
11
-    second: 1,
12
-    third: 1,
13
-    visible: false,
14
-    workorder: [],
15
-    optionsid: '',
16
-    workorderId: '',
17
-    partnerAvite: [],
18
-    bindreviewtype: '',
19
-    latitude: null,
20
-    longitude: null,
21
-    locationName: '获取中...',
22
-    checkinStatus: 'waiting', // waiting, success, fail
23
-    checkinRecords: [],
24
-    distance: null, // 距离目标点的距离
25
-    canCheckin: false,
26
-    showPermissionGuide: null,
27
-    workorderContent: '',
28
-    switchtype: false,
29
-    partnerPosition: wx.getStorageSync('partnerPosition'),
30
-    scanCode:{},
31
-    result:''
32
-  },
33
-
34
-  /**
35
-   * 生命周期函数--监听页面加载
36
-   */
37
-  onLoad(options) {
38
-
39
-    console.log(options);
40
-    this.setData({
41
-      optionsid: options.id,
42
-      workorderId: options.workorderId
43
-    })
44
-    this.onworkorder()
45
-
46
-  },
47
-  // 获取当前位置
48
-  getCurrentLocation() {
49
-    const that = this;
50
-    // 先检查位置权限
51
-    wx.getSetting({
52
-      success: (res) => {
53
-        if (!res.authSetting['scope.userLocation']) {
54
-          // 如果没有授权,请求授权
55
-          wx.authorize({
56
-            scope: 'scope.userLocation',
57
-            success: () => {
58
-              that._getLocation();
59
-            },
60
-            fail: () => {
61
-              wx.showModal({
62
-                title: '位置权限提示',
63
-                content: '需要位置权限才能使用此功能,是否去设置开启?',
64
-                success: (res) => {
65
-                  if (res.confirm) {
66
-                    wx.openSetting();
67
-                  }
68
-                }
69
-              });
70
-            }
71
-          });
72
-        } else {
73
-          // 已经授权,直接获取位置
74
-          that._getLocation();
75
-        }
76
-      }
77
-    });
78
-  },
79
-  // 提取获取位置的具体逻辑
80
-  _getLocation() {
81
-    const that = this;
82
-    wx.getLocation({
83
-      type: 'wgs84',
84
-      success: (res) => {
85
-        console.log('位置获取成功:', res);
86
-        that.setData({
87
-          latitude: res.latitude,
88
-          longitude: res.longitude
89
-        });
90
-        // that.reverseGeocode(res.latitude, res.longitude);
91
-        that.checkDistance();
92
-      },
93
-      fail: (err) => {
94
-        console.error('获取位置失败:', err);
95
-        wx.showToast({
96
-          title: '获取位置失败,请重试',
97
-          icon: 'none'
98
-        });
99
-      }
100
-    })
101
-  },
102
-  checkDistance() {
103
-    // this.data.workorder.devicesLatitudelongitude.split(",")
104
-
105
-    let position = this.data.workorder.devicesLatitudelongitude;
106
-    console.log(position);
107
-    const targetLng = position[0]; // 目标经度
108
-    const targetLat = position[1]; // 目标纬度
109
-    const allowedDistance = 100; // 允许打卡距离(米)
110
-    // longitude: 116.66504838681816      2号楼位置
111
-    // latitude: 40.088160079721874    2号楼位置
112
-    // longitude: 116.66504838932426   工位位置
113
-    // latitude: 40.08816007901852   工位位置
114
-
115
-    const distance = this.calculateDistance(
116
-      this.data.latitude,
117
-      this.data.longitude,
118
-      targetLat,
119
-      targetLng
120
-    );
121
-
122
-    this.setData({
123
-      distance: distance.toFixed(2),
124
-      canCheckin: distance <= allowedDistance
125
-    });
126
-    console.log(this.data.distance);
127
-    console.log(this.data.canCheckin);
128
-  },
129
-  // 计算两点间距离(Haversine公式)
130
-  calculateDistance(lat1, lng1, lat2, lng2) {
131
-    const R = 6371000; // 地球半径(米)
132
-    const dLat = (lat2 - lat1) * Math.PI / 180;
133
-    const dLng = (lng2 - lng1) * Math.PI / 180;
134
-    const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
135
-      Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) *
136
-      Math.sin(dLng / 2) * Math.sin(dLng / 2);
137
-    const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
138
-    return R * c;
139
-  },
140
-  onposition() {
141
-    this.checkLocationPermission();
142
-
143
-  },
144
-  onworkorder() {
145
-    let _this = this
146
-    let data = {
147
-      workorderId: this.data.workorderId,
148
-      id: this.data.optionsid
149
-    }
150
-    api.request(`/workoder/selectsysworkoderid`, 'POST', data)
151
-      .then((res) => {
152
-        console.log(res);
153
-        if (res.code == 200) {
154
-          if (res.data.workorderImg) {
155
-            res.data.workorderImg = res.data.workorderImg.split(",")
156
-          }
157
-          // console.log(res.data.workoderstationimg==undefined);
158
-          if (res.data.workoderstationimg) {
159
-            res.data.workoderstationimg = res.data.workoderstationimg.split(",")
160
-          }
161
-          if (res.data.workoderendimg) {
162
-            res.data.workoderendimg = res.data.workoderendimg.split(",")
163
-          }
164
-          if (res.data.devicesLatitudelongitude) {
165
-            res.data.devicesLatitudelongitude.split(",")
166
-          } else {
167
-            res.data.devicesLatitudelongitude = ['116.66504838681816', '40.088160079721874']
168
-          }
169
-          this.setData({
170
-            workorder: res.data
171
-          })
172
-          if (res.data.workorderType == 1) {
173
-            console.log('定位开始');
174
-            // _this.goToSetting();
175
-            // this.checkLocationPermission();
176
-            this.getCurrentLocation();
177
-
178
-          }
179
-
180
-        }
181
-
182
-        // .split(" ")
183
-      })
184
-      .catch((err) => {
185
-        console.error('请求失败:', err);
186
-        // 在这里处理请求失败的情况
187
-      });
188
-  },
189
-  onFirstChange(e) {
190
-    this.setData({ first: e.detail.current });
191
-  },
192
-  onSecondChange(e) {
193
-    this.setData({ second: e.detail.current });
194
-  },
195
-  onThirdChange(e) {
196
-    this.setData({ third: e.detail.current });
197
-  },
198
-  onstep() {
199
-    this.setData({
200
-      visible: true
201
-    })
202
-
203
-
204
-    // wx.navigateTo({
205
-    //   url: '/pages/workorderstep/index',
206
-    // })
207
-  },
208
-  // 删除图片
209
-  bindCancel(e) {
210
-    console.log(e.currentTarget.dataset.index);
211
-    let index = e.currentTarget.dataset.index
212
-    // 使用 filter 方法创建新数组(推荐)
213
-    const newPartnerAvite = this.data.partnerAvite.filter((item, i) => i !== index);
214
-
215
-    this.setData({
216
-      partnerAvite: newPartnerAvite
217
-    });
218
-  },
219
-  onVisibleChange() {
220
-    this.setData({
221
-      visible: false
222
-    })
223
-  },
224
-  ontextarea(e) {
225
-    this.setData({
226
-      workorderContent: e.detail.value
227
-    })
228
-  },
229
-  submit() {
230
-
231
-    if (!this.data.switchtype) {
232
-      return
233
-    }
234
-    this.setData({
235
-      switchtype: false
236
-    })
237
-    let data = {
238
-      id: this.data.workorder.id,
239
-      workoderImg: this.data.partnerAvite.length > 0 ? this.data.partnerAvite.toString() : '',
240
-      workoderDetails: this.data.workorderContent,
241
-      devicesRange: this.data.canCheckin ? '到达设备范围' : '不在设备范围'
242
-    }
243
-    api.request(`/workoder/addwork`, 'POST', data)
244
-      .then((res) => {
245
-        console.log(res);
246
-        if (res.code == 200) {
247
-
248
-          wx.showToast({
249
-            title: '提交成功',
250
-            icon: 'success',
251
-          });
252
-          this.setData({
253
-            visible: false,
254
-            partnerAvite: [],
255
-            switchtype: true,
256
-            workorderContent: ''
257
-          })
258
-          if (this.data.workorder.workorderType == 2) {
259
-            wx.reLaunch({
260
-              url: '/pages/index/index',
261
-            })
262
-          }
263
-          this.onworkorder()
264
-        }
265
-
266
-      })
267
-      .catch((err) => {
268
-        console.error('请求失败:', err);
269
-        this.setData({
270
-          switchtype: true
271
-        })
272
-        // 在这里处理请求失败的情况
273
-      });
274
-  },
275
-  // 审核
276
-  bindreview(e) {
277
-    this.setData({
278
-      bindreviewtype: e.currentTarget.dataset.type
279
-    })
280
-    if (e.currentTarget.dataset.type == '不通过') {
281
-      this.setData({
282
-        visible: true,
283
-      })
284
-      return
285
-    }
286
-    let data = {
287
-      id: this.data.workorder.id,
288
-      examineType: e.currentTarget.dataset.type,
289
-      workoderReason: this.data.workorderContent
290
-    }
291
-    api.request(`/workoder/examine`, 'POST', data)
292
-      .then((res) => {
293
-        console.log(res);
294
-        if (res.code == 200) {
295
-          wx.showToast({
296
-            title: '提交成功',
297
-            icon: 'success',
298
-          });
299
-          this.setData({
300
-            visible: false
301
-          })
302
-          wx.reLaunch({
303
-            url: '/pages/index/index',
304
-          })
305
-          // this.onworkorder()
306
-        }
307
-
308
-      })
309
-      .catch((err) => {
310
-        console.error('请求失败:', err);
311
-        // 在这里处理请求失败的情况
312
-      });
313
-  },
314
-  // 预览图片
315
-  previewImage(e) {
316
-    console.log(e);
317
-    const src = e.currentTarget.dataset.src;
318
-    wx.previewImage({
319
-      current: src, // 当前显示图片的http链接
320
-      urls: [src]   // 需要预览的图片http链接列表
321
-    });
322
-  },
323
-  // 上传头像
324
-  bindtoImage() {
325
-    let _this = this
326
-    // 先检查隐私授权状态
327
-    wx.getPrivacySetting({
328
-      success: (res) => {
329
-        if (res.needAuthorization) {
330
-          // 弹出隐私协议弹窗
331
-          wx.requirePrivacyAuthorize({
332
-            success: () => {
333
-              console.log('用户已同意隐私协议');
334
-              _this.choosetoImage(); // 继续执行上传
335
-            },
336
-            fail: () => {
337
-              console.log('用户拒绝了隐私协议');
338
-              wx.showToast({
339
-                title: '需同意隐私协议才能使用',
340
-                icon: 'none'
341
-              });
342
-            }
343
-          });
344
-        } else {
345
-          _this.choosetoImage(); // 已授权,直接上传
346
-        }
347
-      }
348
-    });
349
-  },
350
-  // 上传头像图片
351
-  choosetoImage() {
352
-    let _this = this
353
-    wx.chooseMedia({
354
-      count: 1,
355
-      mediaType: ['image', 'video'],
356
-      sourceType: ['album', 'camera'],
357
-      success(res) {
358
-        console.log(res);
359
-        const tempFiles = res.tempFiles;
360
-        _this.setData({
361
-          imageList: tempFiles.map(file => file.tempFilePath),
362
-        });
363
-        _this.uploadtoImages(tempFiles);
364
-      },
365
-      fail(err) {
366
-        console.error("选择失败:", err);
367
-      }
368
-    })
369
-  },
370
-  // 上传到服务器
371
-  uploadtoImages(files) {
372
-    let _this = this
373
-    const token = wx.getStorageSync('token');
374
-    files.forEach((file) => {
375
-      wx.uploadFile({
376
-        url: 'https://esos-iot.bjdexn.cn:8443/config/upload/webPost',
377
-        filePath: file.tempFilePath,
378
-        name: 'file',
379
-        formData: {
380
-          file: file.tempFilePath
381
-        },
382
-        header: {
383
-          'Authorization': 'Bearer ' + token // Also add to header if needed
384
-        },
385
-        success: (res) => {
386
-          console.log(res);
387
-          const obj = JSON.parse(res.data);
388
-          this.data.partnerAvite.push(obj.data.partnerAvite)
389
-          this.setData({
390
-            partnerAvite: this.data.partnerAvite
391
-          })
392
-        },
393
-        fail: (err) => {
394
-          console.error('上传失败', err);
395
-        },
396
-      });
397
-    });
398
-  },
399
-  scancode() {
400
-    wx.scanCode({
401
-      onlyFromCamera:true,
402
-      success: (res) => {
403
-        console.log(res);
404
-       let rawData = this.data.workorder.devicesQrcode.split(",")
405
-        console.log(rawData);
406
-        for (let index = 0; index < rawData.length; index++) {
407
-            if (rawData[index] ==res.rawData) {
408
-              this.setData({
409
-                switchtype:true,
410
-                result:res.result
411
-              })
412
-              return
413
-            }
414
-        }
415
-        wx.showToast({
416
-          title: '没有匹配到设备码',
417
-          icon: 'none'
418
-        });
419
-     
420
-        console.log(this.data.scanCode);
421
-      },
422
-      fail: (err) => {
423
-        console.log(err);
424
-        wx.showToast({
425
-          title: '扫码失败',
426
-          icon: 'none'
427
-        });
428
-      }
429
-    })
430
-  },
431
-  onqrcode(e){
432
-    console.log(e.target.dataset.name);
433
-    // console.log(this.data.scanCode.result);
434
-  // 优化后的复制代码,增加错误处理
435
-wx.setClipboardData({
436
-  data: e.target.dataset.name,
437
-  success (res) {
438
-    console.log('设置剪贴板成功', res)
439
-    wx.showToast({
440
-      title: '复制成功',
441
-      icon: 'none'
442
-    });
443
- 
444
-  },
445
-  fail (err) {
446
-    console.error('设置剪贴板失败:', err)
447
-    wx.showToast({
448
-      title: '复制失败,请重试',
449
-      icon: 'none'
450
-    });
451
-  }
452
-})
453
- 
454
- 
455
-  },
456
-  /**
457
-   * 生命周期函数--监听页面初次渲染完成
458
-   */
459
-  onReady() {
460
-
461
-  },
462
-
463
-  /**
464
-   * 生命周期函数--监听页面显示
465
-   */
466
-  onShow() {
467
-  },
468
-
469
-  /**
470
-   * 生命周期函数--监听页面隐藏
471
-   */
472
-  onHide() {
473
-
474
-  },
475
-
476
-  /**
477
-   * 生命周期函数--监听页面卸载
478
-   */
479
-  onUnload() {
480
-
481
-  },
482
-
483
-  /**
484
-   * 页面相关事件处理函数--监听用户下拉动作
485
-   */
486
-  onPullDownRefresh() {
487
-
488
-  },
489
-
490
-  /**
491
-   * 页面上拉触底事件的处理函数
492
-   */
493
-  onReachBottom() {
494
-
495
-  },
496
-
497
-  /**
498
-   * 用户点击右上角分享
499
-   */
500
-  onShareAppMessage() {
501
-
502
-  }
503
-})

+ 0
- 13
pages/workorderdetails/index.json Целия файл

@@ -1,13 +0,0 @@
1
-{
2
-  "navigationBarTitleText": "工单详情",
3
-  "component": true,
4
-  "styleIsolation": "apply-shared",
5
-  "usingComponents": {
6
-    "t-steps": "tdesign-miniprogram/steps/steps",
7
-    "t-step-item": "tdesign-miniprogram/step-item/step-item",
8
-    "t-popup": "tdesign-miniprogram/popup/popup",
9
-    "t-button": "tdesign-miniprogram/button/button",
10
-    "t-icon": "tdesign-miniprogram/icon/icon",
11
-    "t-textarea": "tdesign-miniprogram/textarea/textarea"
12
-  }
13
-}

+ 0
- 174
pages/workorderdetails/index.wxml Целия файл

@@ -1,174 +0,0 @@
1
-<!--pages/Workorderdetails/index.wxml-->
2
-<view class="process_bj1" wx:if="{{workorder.workorderType==1&&workorder.examineType==4}}">
3
-<view class="process_name">待处理...</view>
4
-
5
-<image class="process_tp" src="https://esos-iot.bjdexn.cn/myminio/project/b5f745598db6435aac98a4a2b31284d3.png" mode="aspectFit"/>
6
-</view>
7
-<view class="process_bj2" wx:if="{{workorder.workorderType==2&&workorder.examineType==4}}">
8
-<view class="process_name">处理中...</view>
9
-<image class="process_tp" src="https://esos-iot.bjdexn.cn/myminio/project/40dbc668f38a4208940e76a120477467.png" mode="aspectFit"/>
10
-</view>
11
-<view class="process_bj3" wx:if="{{workorder.workorderType==3&&workorder.examineType==5}}">
12
-<view class="process_name">待审核...</view>
13
-<image class="process_tp" src="https://esos-iot.bjdexn.cn/myminio/project/746fd45617b0466cbbe138d8e6dc0567.png" mode="aspectFit"/>
14
-</view>
15
-<view class="process_bj4" wx:if="{{workorder.examineType==6}}">
16
-<view class="process_name">审核成功...</view>
17
-<image class="process_tp" src="https://esos-iot.bjdexn.cn/myminio/project/a76948bfa5094d4c90e2a4c5514481e1.png" mode="aspectFit"/>
18
-</view>
19
-<view class="process_bj5" wx:if="{{workorder.examineType==7}}">
20
-<view class="process_name">审核失败...</view>
21
-<image class="process_tp" src="https://esos-iot.bjdexn.cn/myminio/project/8de18dd8fd204b2d95477a2f2f890ba8.png" mode="aspectFit"/>
22
-</view>
23
-<!-- <view class="flow_box">
24
-  <view class="block">
25
-  <view class="flowflow_name">工单流程</view>
26
-  <t-steps layout="vertical" current="{{first}}" bind:change="onFirstChange">
27
-    <t-step-item title="张三创建维修工单" content="2025-11-12 12:11:22"/>
28
-    <t-step-item title="李四开始处理工单" content="2025-11-12 12:11:22"/>
29
-    <t-step-item title="工单处理中" content="2025-11-12 12:11:22"/>
30
-    <t-step-item title="工单处理完成" content="2025-11-12 12:11:22"/>
31
-    <t-step-item title="工单待审核" content="2025-11-12 12:11:22"/>
32
-    <t-step-item title="工单审核成功" content="2025-11-12 12:11:22"/>
33
-    <t-step-item title="工单审核失败" content="2025-11-12 12:11:22"/>
34
-  </t-steps>
35
-</view>
36
-</view> -->
37
-<view class="flow_box">
38
-  <view class="flowflow">
39
-<!-- <view class="flowflow_name">工单信息</view> -->
40
-<view class="flow_content"> 
41
-<!--  -->
42
-<view class="order" wx:if="{{workorder.workoderReason!=''&&workorder.workoderReason!=null}}"><view class="workorder">审核失败原因:</view><view>{{workorder.workoderReason||'--'}}</view> </view>
43
-
44
-
45
-<view class="order"  wx:if="{{workorder.examineCount!=0&&workorder.examineCount!=null&&workorder.workoderReason==''&&workorder.workoderReason==null}}"><view class="workorder">退回工单原因:</view><view>{{workorder.lastfail||'--'}}</view> </view>
46
-<view class="order" data-name="{{workorder.workorderName}}" bind:tap="onqrcode"><view class="workorder">工单名称:</view> {{workorder.workorderName}}</view>
47
-
48
-<view class="order"><view class="workorder">工单所属:</view> {{workorder.powerstationname}} > {{workorder.devicesname}}</view>
49
-<view class="order"><view class="workorder">创建人:</view> {{workorder.promotername}}</view>
50
-<view class="order"><view class="workorder">工单类型:</view> <text wx:if="{{workorder.type==1}}">日常</text><text wx:if="{{workorder.type==2}}">故障</text> <text wx:if="{{workorder.type==3}}">其他</text>  </view>
51
-<view class="order"><view class="workorder">工单开始时间:</view> {{workorder.workorderStarttime}}</view>
52
-<view class="order"><view class="workorder">工单结束时间:</view> {{workorder.workorderEndtime}}</view>
53
-<view class="order"><view class="workorder">工单编号:</view> {{workorder.workorderId}}</view>
54
-<view class="order"><view class="workorder">创建时间:</view>{{workorder.workorderTime}}</view>
55
-<view class="order"><view class="workorder">位置:</view>{{workorder.workorderAddress}}</view>
56
-<view class="order"><view class="workorder">问题描述:</view>{{workorder.workorderContent}}</view>
57
-<view class="order"><view class="workorder">故障照片:</view><image wx:for="{{workorder.workorderImg}}" wx:key="index" class="workorderimg" src="{{item}}" mode="aspectFit" data-src="{{item}}" bindtap="previewImage"/></view>
58
-</view>
59
-</view>
60
-<view class="block">
61
-  <view class="order"><view class="workorder">处理人:</view>{{workorder.partnername}}</view>
62
-<view class="order"><view class="workorder">当前状态:</view>
63
- <text wx:if="{{workorder.workorderType==1}}">待处理</text> 
64
- <text wx:if="{{workorder.workorderType==2}}">处理中</text> 
65
- <text wx:if="{{workorder.workorderType==3}}">工单完成</text> 
66
- 
67
- </view>
68
- <view class="order"><view class="workorder">地点签到:</view>{{workorder.devicesRange||'--'}}</view>
69
-
70
- <view class="order" wx:if="{{workorder.workorderType==3}}"><view class="workorder">审核状态:</view>
71
- <text wx:if="{{workorder.examineType==5}}">待审核</text> 
72
- <text wx:if="{{workorder.examineType==6}}">审核完成</text> 
73
- <text wx:if="{{workorder.examineType==7}}">审核失败</text> 
74
- </view>
75
-<view class="order"><view class="workorder">处理前照片:</view>
76
-<view wx:if="{{workorder.workoderstationimg}}">
77
-  <image wx:for="{{workorder.workoderstationimg}}" wx:key="index" class="workorderimg" src="{{item}}" mode="" data-src="{{item}}" bindtap="previewImage"/>
78
-</view>
79
-<text wx:else>--</text>
80
-</view>
81
-<view class="order"><view class="workorder">处理后照片:</view>
82
-<view wx:if="{{workorder.workoderendimg}}">
83
-<image wx:for="{{workorder.workoderendimg}}" wx:key="index" class="workorderimg" src="{{item}}" mode="" data-src="{{item}}" bindtap="previewImage"/>
84
-</view>
85
-<text wx:else>--</text>
86
-</view>
87
-
88
-<view class="order"><view class="workorder">处理开始时间:</view>{{workorder.workodersubmittime||'--'}}</view>
89
-<view class="order"><view class="workorder">处理结束时间:</view>{{workorder.workoderResulttime||'--'}}</view>
90
-<view class="order"><view class="workorder">反馈:</view>{{workorder.workoderendContent||'--'}}</view>
91
-
92
-  </view>
93
-</view>
94
-<view style="height: 130rpx;" wx:if="{{workorder.examineType!=6&&workorder.examineType!=7}}"></view>
95
-<view style="height: 60rpx;"></view>
96
-<view class="step" wx:if="{{workorder.examineType!=6&&workorder.examineType!=7}}">
97
-<view class="step_button" bind:tap="onstep" wx:if="{{workorder.workorderType==1&&partnerPosition.partnerId == workorder.workoderPartnerId&&partnerPosition.partnerId == workorder.workoderPartnerId}}">开始工单</view>
98
-<view class="step_button" bind:tap="onstep" wx:if="{{workorder.workorderType==2&&partnerPosition.partnerId == workorder.workoderPartnerId}}">提交工单</view>
99
-<!-- <view class="step_button" bind:tap="onstep" wx:if="{{workorder.workorderType==3}}">待审核</view> -->
100
-<view class="onreview" wx:if="{{workorder.workorderType==3&&workorder.examineType==5&&workorder.permission==1&&partnerPosition.partnerId == workorder.workorderPromoterId}}">
101
-  <view class="step_buttonfailure" data-type="不通过" bind:tap="bindreview">不通过</view>
102
-  <view class="step_button" data-type="6" bind:tap="bindreview">通过</view>
103
-</view>
104
-</view>
105
-<t-popup
106
-  visible="{{visible}}"
107
-  bind:visible-change="onVisibleChange"
108
-  placement="bottom"
109
->
110
-  <view class="popup_box">
111
-    <view class="Scan_problem">
112
-<view class="Scan_feedback1" wx:if="{{workorder.workorderType==1}}">
113
- <view class="Scan_width"><t-icon name="qrcode" size="40rpx" data-name="qrcode"/><view class="Scancode_left"><text style="color: red;">*</text>设备码</view> </view>
114
-  <view class="Scancode_right1" wx:if="{{!switchtype}}" bind:tap="scancode"><view><t-icon name="scan" size="100rpx" data-name="scan"/></view> <view class="Scancode_lefticon1">
115
-   点击扫码</view> </view>
116
-   <view wx:else>{{result}}</view>
117
-</view>
118
-<!-- <view bind:tap="onqrcode">
119
-{{scanCode.result}}|{{scanCode.rawData}}
120
-</view> -->
121
-<view class="Scan_feedback1" wx:if="{{workorder.workorderType==1}}">
122
- <view class="Scan_width"><t-icon name="map-information-2" size="40rpx" data-name="map-information-2"/><view class="Scancode_left"><text style="color: red;">*</text>设备范围</view> </view>
123
-  <view class="Scancode_right1">
124
-   <view class="Scancode_lefticon1" wx:if="{{canCheckin}}">
125
-   <!-- {{distance}}米 -->
126
-   <text class="position_left">到达范围</text></view>
127
-   <view class="Scancode_lefticon1" wx:else>
128
-   <!-- {{distance}}米 -->
129
-   <text class="position_left">不在范围</text></view>
130
-    </view> <view class="position" bind:tap="onposition"><t-icon name="refresh" size="40rpx" data-name="refresh"/> <text class="position_left">刷新</text> </view>
131
-</view>
132
-<view class="Scan_feedback" wx:if="{{workorder.examineType==4}}">
133
-<view class="Scan_width"><t-icon name="image" size="40rpx" data-name="image"/>
134
-<view class="Scancode_left" wx:if="{{workorder.workorderType==1}}">处理前图片</view> 
135
-<view class="Scancode_left" wx:if="{{workorder.workorderType==2}}">处理后图片</view> 
136
-</view>
137
-<view class="calculation_imagebox" wx:if="{{partnerAvite}}" wx:for="{{partnerAvite}}" wx:key="index">
138
-  <image class="Scan_image" wx:if="{{partnerAvite}}" src="{{item}}" mode="aspectFit" data-src="{{item}}" bindtap="previewImage"/>
139
-              <t-icon class="calculation_imagex" data-index="{{index}}" bind:tap="bindCancel" name="close-circle" size="30rpx" data-name="close-circle"/>
140
-              </view>
141
-
142
- <!-- <image class="Scan_image" src="https://esos-iot.bjdexn.cn/myminio/project/8c06ea7e8bfe4b49ab1e3a60132dda3a.jpg" mode=""/>
143
- <image class="Scan_image" src="https://esos-iot.bjdexn.cn/myminio/project/8c06ea7e8bfe4b49ab1e3a60132dda3a.jpg" mode=""/> -->
144
-<view class="Scancode_lefticon" bind:tap="bindtoImage">
145
-  <t-icon name="add" size="60rpx" data-name="add"/>
146
- </view>
147
-</view>
148
-<view class="Scan_feedback" wx:if="{{workorder.workorderType==2||bindreviewtype=='不通过'}}">
149
-<view class="Scan_width"><t-icon name="chat-message" size="40rpx" data-name="chat-message"/>
150
-<view class="Scancode_left">问题反馈</view>
151
- </view>
152
-  <view class="Scancode_textarea"><t-textarea
153
-  t-class="external-class"
154
-  placeholder="请输入描述"
155
-  maxlength="200"
156
-  value="{{workorderContent}}"
157
-
158
-  disableDefaultPadding="{{true}}"
159
-  indicator
160
-  bindchange="ontextarea"
161
-/></view>
162
-</view>
163
-</view>
164
-<view class="onstep">
165
-<view class="onstepbutton" bind:tap="submit" wx:if="{{workorder.workorderType==1&&switchtype}}">开始处理</view>
166
-<view class="onstepbuttonccc" wx:if="{{workorder.workorderType==1&&!switchtype}}">开始处理</view>
167
-<view class="onstepbutton" bind:tap="submit" wx:if="{{workorder.workorderType==2}}">完成处理</view>
168
-<view class="step_buttonfailure" wx:if="{{bindreviewtype=='不通过'}}" data-type="7" bind:tap="bindreview">不通过</view>
169
-</view>
170
-  </view>
171
-</t-popup>
172
-<!-- 
173
-  
174
- -->

+ 0
- 285
pages/workorderdetails/index.wxss Целия файл

@@ -1,285 +0,0 @@
1
-/* pages/Workorderdetails/index.wxss */
2
-page{
3
-  width: 100%;
4
-  height: 100%;
5
-background: linear-gradient(to bottom, #f9f9f9 -40%, #f9f9f9 100%,#F0F5F5 100%);
6
-/* background-color: #0F80DC; */
7
-}
8
-.process_bj1{
9
-width: 100%;
10
-height: 180rpx;
11
-display: flex;
12
-align-items: center;
13
-justify-content: space-around;
14
-/* background-color: #cccccc; */
15
-color:#2BB991;
16
-background: linear-gradient(to bottom, #EAFFFA -40%, #EAFFFA 100%,#F0F5F5 100%);
17
-}
18
-.process_bj2{
19
-  width: 100%;
20
-  height: 180rpx;
21
-  display: flex;
22
-  align-items: center;
23
-  justify-content: space-around;
24
-  /* background-color: #cccccc; */
25
-  color:#0F80DC;
26
-  background: linear-gradient(to bottom, #cbe4f8 -40%, #cbe4f8 100%,#F0F5F5 100%);
27
-}
28
-.process_bj3{
29
-  width: 100%;
30
-  height: 180rpx;
31
-  display: flex;
32
-  align-items: center;
33
-  justify-content: space-around;
34
-  /* background-color: #cccccc; */
35
-color:#D1815C;
36
-
37
-  background: linear-gradient(to bottom, #FFF6F5 -40%, #FFF6F5 100%,#F0F5F5 100%);
38
-}
39
-.process_bj4{
40
-  width: 100%;
41
-  height: 180rpx;
42
-  display: flex;
43
-  align-items: center;
44
-  justify-content: space-around;
45
-  /* background-color: #cccccc; */
46
-color:#0F80DC;
47
-
48
-  background: linear-gradient(to bottom, #cbe4f8 -40%, #cbe4f8 100%,#F0F5F5 100%);
49
-}
50
-.process_bj5{
51
-  width: 100%;
52
-  height: 180rpx;
53
-  display: flex;
54
-  align-items: center;
55
-  justify-content: space-around;
56
-  /* background-color: #cccccc; */
57
-color:#D1815C;
58
-
59
-  background: linear-gradient(to bottom, #FFF6F5 -40%, #FFF6F5 100%,#F0F5F5 100%);
60
-}
61
-.process_tp{
62
-  width: 88rpx;
63
-  height: 88rpx;
64
-}
65
-.process_name{
66
-  font-size: 42rpx;
67
-}
68
-.flow_box{
69
-  padding: 20rpx 20rpx 0rpx 20rpx;
70
-box-sizing: border-box;
71
-}
72
-.block {
73
-  background-color: var(--bg-color-demo);
74
-  padding: 32rpx;
75
-  margin: 2rpx 0 0rpx;
76
-background-color: #ffffff;
77
-border-radius: 10rpx;
78
-
79
-}
80
-.flowflow{
81
-width: 100%;
82
-padding: 16rpx;
83
-margin-bottom: 20rpx;
84
-border-radius: 10rpx;
85
-background-color: #ffffff;
86
-box-sizing: border-box;
87
-}
88
-.flowflow_name{
89
-  font-size: 32rpx;
90
-  margin-bottom: 30rpx;
91
-}
92
-.flow_content{
93
-  padding: 0rpx 20rpx;
94
-}
95
-.order{
96
-  display: flex;
97
-  margin-top: 20rpx;
98
-}
99
-.workorder{
100
-  width: 200rpx;
101
-  min-width: 200rpx;
102
-  font-size: 28rpx;
103
-  color: #cccccc;
104
-}
105
-.workorderimg{
106
-  width: 100rpx;
107
-  height: 100rpx;
108
-  margin-right: 20rpx;
109
-}
110
-.step{
111
-  width: 100%;
112
-  height: 160rpx;
113
-  display: flex;
114
-  /* align-items: center; */
115
-  justify-content: center;
116
-  padding-top: 20rpx;
117
-  position: fixed;
118
-  bottom: 0rpx;
119
-  left: 0rpx;
120
-  background-color: #ffffff;
121
-box-sizing: border-box;
122
-}
123
-.step_button{
124
-  width: 260rpx;
125
-  height: 88rpx;
126
-  display: flex;
127
-  align-items: center;
128
-  justify-content: center;
129
-  color: #ffffff;
130
-  background-color: #0F80DC;
131
-  border-radius: 100rpx;
132
-}
133
-.step_buttonfailure{
134
-  width: 260rpx;
135
-  height: 88rpx;
136
-  display: flex;
137
-  align-items: center;
138
-  justify-content: center;
139
-  color: #ffffff;
140
-  background-color: #e67373;
141
-  border-radius: 100rpx;
142
-}
143
-.popup_box{
144
-  width: 100%;
145
-  height: 600rpx;
146
-  padding: 20rpx;
147
-  box-sizing: border-box;
148
-}
149
-
150
-.Scan_problem{
151
-  padding:0rpx 30rpx 20rpx 30rpx;
152
-  margin-top: 40rpx;
153
-  background-color: #ffffff;
154
-}
155
-.Scan_problemname{
156
-  font-size: 32rpx;
157
-  color: #999999;
158
-}
159
-.Scan_handle{
160
-  display: flex;
161
-  font-size: 28rpx;
162
-  margin-top: 30rpx;
163
-  color: #999999;
164
-}
165
-.Scancode_right{
166
-  display: flex;
167
-}
168
-.Scancode_right1{
169
-  display: flex;
170
-  align-items: center;
171
-  justify-content: center;
172
-}
173
-.Scancode_left{
174
-  margin-left: 6rpx;
175
-}
176
-.Scancode_lefticon1{
177
-  display: flex;
178
-  align-items: center;
179
-  justify-content: center;
180
-  margin-left: 20rpx;
181
-}
182
-.Scan_image{
183
-  width: 100rpx;
184
-  height: 100rpx;
185
-  margin-right: 20rpx;
186
-  border-radius: 10rpx;
187
-
188
-}
189
-.Scancode_lefticon{
190
-  width: 100rpx;
191
-  height: 100rpx;
192
-  display: flex;
193
-  align-items: center;
194
-  justify-content: center;
195
-  border: 1rpx solid #cccccc;
196
-  border-radius: 10rpx;
197
-}
198
-.Scan_feedback{
199
-  display: flex;
200
-  font-size: 28rpx;
201
-  margin-top: 40rpx;
202
-  color: #222222;
203
-  box-sizing: border-box;
204
-}
205
-.Scan_feedback1{
206
-  display: flex;
207
-  font-size: 28rpx;
208
-  margin-top: 40rpx;
209
-  color: #222222;
210
-}
211
-.Scan_width{
212
- width: 200rpx; 
213
- min-width: 200rpx;
214
- display: flex;
215
- align-items: center;
216
-}
217
-.Scancode_textarea{
218
-  width: 100%;
219
- height: 160rpx; 
220
-border: 1rpx solid #cccccc;
221
-padding: 0rpx;
222
-border-radius: 10rpx;
223
-font-size: 26rpx;
224
-}
225
-
226
-.external-class{
227
-  width: 100%;
228
- height: 160rpx; 
229
-
230
-}
231
-.onstep{
232
-  position: fixed;
233
-  left: 0rpx;
234
-  bottom: 60rpx;
235
-  width: 100%;
236
-  display: flex;
237
-  align-items: center;
238
-  justify-content: center;
239
-}
240
-.onstepbutton{
241
-width: 400rpx;
242
-height: 80rpx;
243
-display: flex;
244
-align-items: center;
245
-justify-content: center;
246
-border-radius: 100rpx;
247
-color: #ffffff;
248
-background-color: #0F80DC;
249
-}
250
-.onstepbuttonccc{
251
-  width: 400rpx;
252
-  height: 80rpx;
253
-  display: flex;
254
-  align-items: center;
255
-  justify-content: center;
256
-  border-radius: 100rpx;
257
-  color: #222222;
258
-  background-color: #cccccc;
259
-  }
260
-.onreview{
261
-  width: 100%;
262
-  display: flex;
263
-  padding: 0rpx 40rpx;
264
- justify-content: space-around;
265
-    /* justify-content: space-between; */
266
-}
267
-.calculation_imagebox{
268
-  width: 120rpx;
269
- height: 120rpx;
270
- margin-right: 40rpx;
271
- position:relative;
272
-}
273
-.calculation_imagex{
274
-position: absolute;
275
-
276
-  top: 0rpx;
277
-  right: 0rpx;
278
-}
279
-.position{
280
-margin-left: 60rpx;
281
-display: flex;
282
-}
283
-.position_left{
284
-  margin-left: 10rpx;
285
-}

+ 0
- 76
pages/workorderstep/index.js Целия файл

@@ -1,76 +0,0 @@
1
-// pages/workorderstep/index.js
2
-Page({
3
-
4
-  /**
5
-   * 页面的初始数据
6
-   */
7
-  data: {
8
-    first: 1,
9
-    second: 1,
10
-    third: 1,
11
-  },
12
-
13
-  /**
14
-   * 生命周期函数--监听页面加载
15
-   */
16
-  onLoad(options) {
17
-   
18
-  },
19
-  onFirstChange(e) {
20
-    this.setData({ first: e.detail.current });
21
-  },
22
-  onSecondChange(e) {
23
-    this.setData({ second: e.detail.current });
24
-  },
25
-  onThirdChange(e) {
26
-    this.setData({ third: e.detail.current });
27
-  },
28
-  /**
29
-   * 生命周期函数--监听页面初次渲染完成
30
-   */
31
-  onReady() {
32
-
33
-  },
34
-
35
-  /**
36
-   * 生命周期函数--监听页面显示
37
-   */
38
-  onShow() {
39
-
40
-  },
41
-
42
-  /**
43
-   * 生命周期函数--监听页面隐藏
44
-   */
45
-  onHide() {
46
-
47
-  },
48
-
49
-  /**
50
-   * 生命周期函数--监听页面卸载
51
-   */
52
-  onUnload() {
53
-
54
-  },
55
-
56
-  /**
57
-   * 页面相关事件处理函数--监听用户下拉动作
58
-   */
59
-  onPullDownRefresh() {
60
-
61
-  },
62
-
63
-  /**
64
-   * 页面上拉触底事件的处理函数
65
-   */
66
-  onReachBottom() {
67
-
68
-  },
69
-
70
-  /**
71
-   * 用户点击右上角分享
72
-   */
73
-  onShareAppMessage() {
74
-
75
-  }
76
-})

+ 0
- 8
pages/workorderstep/index.json Целия файл

@@ -1,8 +0,0 @@
1
-{
2
-  "usingComponents": {
3
-    "t-icon": "tdesign-miniprogram/icon/icon",
4
-    "t-steps": "tdesign-miniprogram/steps/steps",
5
-    "t-step-item": "tdesign-miniprogram/step-item/step-item",
6
-    "t-textarea": "tdesign-miniprogram/textarea/textarea"
7
-  }
8
-}

+ 0
- 51
pages/workorderstep/index.wxml Целия файл

@@ -1,51 +0,0 @@
1
-<view class="Scanbox">
2
-  <view class="block">
3
-  <t-steps current="{{first}}" bind:change="onFirstChange">
4
-    <!-- <t-step-item wx:for="{{4}}" wx:key="index" title="{{_.getText(first, index)}}" content="辅助信息" /> -->
5
-    <t-step-item title="待处理" />
6
-    <t-step-item title="处理中" />
7
-    <t-step-item title="处理完成" />
8
-  </t-steps>
9
-</view>
10
-<view class="Scan_problem">
11
- <!-- <view class="Scan_problemname">工单信息</view> -->
12
- <view class="Scan_feedback1" style="color: #999999;">工单编号:123456789</view>
13
- <view class="Scan_handle">工单标题:光伏板损坏</view>
14
- <view class="Scan_handle">报修设备:光伏板</view>
15
- <view class="Scan_handle">工单优先级:高</view>
16
- <view class="Scan_handle">工单类型:故障</view>
17
- <view class="Scan_handle">工单地点:光伏矩阵1号</view>
18
- <view class="Scan_handle">工单描述:更换新的光伏板损坏</view>
19
- <view class="Scan_handle">报修图片:<image class="Scan_image" src="https://esos-iot.bjdexn.cn/myminio/project/8c06ea7e8bfe4b49ab1e3a60132dda3a.jpg" mode=""/></view>
20
-</view>
21
-<view class="Scan_problem">
22
-<view class="Scan_feedback1">
23
- <view class="Scan_width"><t-icon name="qrcode" size="40rpx" data-name="qrcode"/><view class="Scancode_left">设备码</view> </view>
24
-  <view class="Scancode_right"><t-icon name="scan" size="40rpx" data-name="scan"/> <view class="Scancode_left">点击扫码</view> </view>
25
-</view>
26
-<view class="Scan_feedback">
27
-<view class="Scan_width"><t-icon name="image" size="40rpx" data-name="image"/><view class="Scancode_left">处理前图片</view> </view>
28
- <image class="Scan_image" src="https://esos-iot.bjdexn.cn/myminio/project/8c06ea7e8bfe4b49ab1e3a60132dda3a.jpg" mode=""/>
29
- <image class="Scan_image" src="https://esos-iot.bjdexn.cn/myminio/project/8c06ea7e8bfe4b49ab1e3a60132dda3a.jpg" mode=""/>
30
- <image class="Scan_image" src="https://esos-iot.bjdexn.cn/myminio/project/8c06ea7e8bfe4b49ab1e3a60132dda3a.jpg" mode=""/>
31
-<view class="Scancode_lefticon">
32
-  <t-icon name="add" size="60rpx" data-name="add"/>
33
- </view>
34
-</view>
35
-<view class="Scan_feedback">
36
-<view class="Scan_width"><t-icon name="chat-message" size="40rpx" data-name="chat-message"/><view class="Scancode_left">问题反馈</view> </view>
37
-  <view class="Scancode_textarea"><t-textarea
38
-  t-class="external-class"
39
-  placeholder="请输入描述"
40
-  maxlength="200"
41
-  disableDefaultPadding="{{true}}"
42
-  indicator
43
-/></view>
44
-</view>
45
-</view>
46
-<view class="onstep">
47
-<view class="onstepbutton">开始处理</view>
48
-
49
-</view>
50
-
51
-</view>

+ 0
- 95
pages/workorderstep/index.wxss Целия файл

@@ -1,95 +0,0 @@
1
-/* pages/workorderstep/index.wxss */
2
-page{
3
-  width: 100%;
4
-  /* height: 100%; */
5
-  background-color: #f9f9f9;
6
-}
7
-.block{
8
-  margin-top: 30rpx;
9
-}
10
-.Scancode{
11
-  display: flex;
12
-  padding: 30rpx;
13
-  margin-top: 40rpx;
14
-}
15
-.Scancode_left{
16
-  margin-left: 10rpx;
17
-
18
-}
19
-.Scancode_lefticon{
20
-  width: 100rpx;
21
-  display: flex;
22
-  align-items: center;
23
-  justify-content: center;
24
-  border: 1rpx solid #cccccc;
25
-}
26
-.Scancode_right{
27
-  display: flex;
28
-  align-items: center;
29
-}
30
-.Scan_problem{
31
-  padding:20rpx 30rpx 20rpx 30rpx;
32
-  margin-top: 40rpx;
33
-  background-color: #ffffff;
34
-}
35
-.Scan_problemname{
36
-  font-size: 32rpx;
37
-  color: #999999;
38
-}
39
-.Scan_handle{
40
-  display: flex;
41
-  font-size: 28rpx;
42
-  margin-top: 30rpx;
43
-  color: #999999;
44
-}
45
-.Scan_image{
46
-  width: 100rpx;
47
-  height: 100rpx;
48
-  margin-right: 20rpx;
49
-}
50
-.Scan_feedback{
51
-  display: flex;
52
-  font-size: 28rpx;
53
-  margin-top: 40rpx;
54
-  color: #222222;
55
-}
56
-.Scan_feedback1{
57
-  display: flex;
58
-  font-size: 28rpx;
59
-  margin-top: 20rpx;
60
-  color: #222222;
61
-}
62
-.Scan_width{
63
- width: 200rpx; 
64
- min-width: 200rpx;
65
- display: flex;
66
-}
67
-.Scancode_textarea{
68
-  width: 100%;
69
- height: 100rpx; 
70
-
71
-}
72
-.external-class{
73
-  width: 100%;
74
- height: 100rpx; 
75
-
76
-}
77
-.onstep{
78
-  position: fixed;
79
-  left: 0rpx;
80
-  bottom: 60rpx;
81
-  width: 100%;
82
-  display: flex;
83
-  align-items: center;
84
-  justify-content: center;
85
-}
86
-.onstepbutton{
87
-width: 400rpx;
88
-height: 80rpx;
89
-display: flex;
90
-align-items: center;
91
-justify-content: center;
92
-border-radius: 100rpx;
93
-color: #ffffff;
94
-background-color: #0F80DC;
95
-}

Loading…
Отказ
Запис