weieryang vor 1 Monat
Ursprung
Commit
ee24282a72
29 geänderte Dateien mit 3559 neuen und 1057 gelöschten Zeilen
  1. 55 21
      bigScreen3/src/views/dashboard/cpns/VideoSurveillance.vue
  2. 303 299
      web/src/views/basesystem_manage/parceldata/parcellandList.vue
  3. 55 54
      web/src/views/basesystem_manage/zhdgList.vue
  4. 8 23
      web/src/views/sbss_manage/drivelist.vue
  5. 73 72
      web/src/views/sbss_manage/maintainlogs.vue
  6. 2 2
      web/src/views/workorder/Workorder.vue
  7. 6 8
      web/src/views/workorder/workorder_all.vue
  8. 176 17
      web/src/views/workorder/workorder_dcl.vue
  9. 179 11
      web/src/views/workorder/workorder_ycl.vue
  10. 6 8
      web/src/views/workorder/workorder_ywj.vue
  11. 275 74
      web/src/views/workorder/workordercreate.vue
  12. 448 431
      web/src/views/zgzs_manage/xsxclist.vue
  13. 2 1
      wxproject/app.json
  14. 3 3
      wxproject/packageA/pages/onDuty/onDuty.wxml
  15. 243 0
      wxproject/packageA/pages/recordDetail/recordDetail.js
  16. 4 0
      wxproject/packageA/pages/recordDetail/recordDetail.json
  17. 89 0
      wxproject/packageA/pages/recordDetail/recordDetail.wxml
  18. 163 0
      wxproject/packageA/pages/recordDetail/recordDetail.wxss
  19. 1 1
      wxproject/packagePersonnel/pages/personAdd/personAdd.js
  20. 2 2
      wxproject/packagePersonnel/pages/personAddCenter/personAddCenter.js
  21. 1 1
      wxproject/packagePersonnel/pages/personCenterInfo/personCenterInfo.js
  22. 1 1
      wxproject/packagePersonnel/pages/personInfo/personInfo.js
  23. 28 0
      wxproject/packagePersonnel/utils/CryptoJs.js
  24. 505 0
      wxproject/packagePersonnel/utils/abc.js
  25. 680 0
      wxproject/packagePersonnel/utils/china.js
  26. 2 2
      wxproject/pages/work_order_list/work_order_list.wxml
  27. 197 21
      wxproject/pages/workprocessing/workprocessing.js
  28. 22 4
      wxproject/pages/workprocessing/workprocessing.wxml
  29. 30 1
      wxproject/pages/workprocessing/workprocessing.wxss

+ 55 - 21
bigScreen3/src/views/dashboard/cpns/VideoSurveillance.vue

@@ -41,7 +41,6 @@
41 41
               playsinline 
42 42
               controls 
43 43
               class="video-player" 
44
-              style="width: 100%; height: 100%; object-fit: contain;"
45 44
               autoplay
46 45
               muted
47 46
             ></video>
@@ -60,6 +59,10 @@ import { getPageListData } from '@/api/index'
60 59
 import videoSrc from '@/assets/mp4/ziyuan.mp4'
61 60
 import defaultImg from '@/assets/defaultImg.png'
62 61
 import axios from 'axios'
62
+import { getToken } from '@/utils/auth'
63
+import { ElMessage } from 'element-plus'
64
+
65
+
63 66
 
64 67
 // 监控设备列表(响应式数据)
65 68
 const videoList = ref([])
@@ -86,8 +89,8 @@ const fetchDriveInfoList = async () => {
86 89
         return {
87 90
           name: device.deviceName || device.fRemark || '未知监控设备',
88 91
           time: formattedTime,
89
-          deviceId: device.id || device.deviceId || '',
90
-          streamUrl: 'rtsp://'+device.fAccount+':'+device.fPassword+'@'+device.fIp,
92
+          deviceId: device.fDriveid,
93
+          streamUrl: device.url,
91 94
           fImg: device.fImg || '' // 保存设备图片地址
92 95
         }
93 96
       })
@@ -134,14 +137,18 @@ watch(() => props.selectedProjectId, () => {
134 137
   // 重新获取数据
135 138
   fetchDriveInfoList();
136 139
 }, { immediate: true })
137
-
140
+const fDriveid = ref('')
138 141
 // 关闭所有视频并打开模态框
139 142
 function closeAllVideosAndOpenModal(video) {
140
-  
143
+  if (!video.streamUrl) {
144
+    ElMessage.warning('视频流URL为空,无法播放');
145
+
146
+    return;
147
+  }
141 148
   // 打开模态框播放当前视频
142 149
   selectedVideo.value = video
143 150
   isModalOpen.value = true
144
-  
151
+  fDriveid.value = video.deviceId
145 152
   // 等待模态框完全渲染后初始化视频元素并自动播放
146 153
   setTimeout(() => {
147 154
     if (videoElement.value) {
@@ -159,7 +166,7 @@ function closeAllVideosAndOpenModal(video) {
159 166
 // 关闭视频播放模态框
160 167
 function closeModal() {
161 168
   // 先触发截图并上传
162
-  // captureAndUploadSnapshot();
169
+  captureAndUploadSnapshot();
163 170
   
164 171
   // 停止视频播放
165 172
   if (videoElement.value) {
@@ -204,29 +211,57 @@ async function captureAndUploadSnapshot() {
204 211
           console.warn('创建截图失败');
205 212
           return;
206 213
         }
207
-        
214
+        console.log('截图创建成功,大小:', blob.size);
208 215
         try {
209
-          // 创建FormData用于上传
216
+          // 创建FormData用于上传,添加文件名参数
210 217
           const formData = new FormData();
211
-          const fileName = `${selectedVideo.value?.deviceId || 'unknown'}_${new Date().getTime()}_snapshot.jpg`;
218
+          // 为文件添加文件名参数,格式为:监控截图_时间戳.jpg
219
+          const fileName = `监控截图_${Date.now()}.jpg`;
212 220
           formData.append('file', blob, fileName);
213 221
           
214
-          // 添加其他可能需要的参数
215
-          if (selectedVideo.value) {
216
-            formData.append('deviceId', selectedVideo.value.deviceId);
217
-            formData.append('deviceName', selectedVideo.value.name);
218
-          }
219
-          
220 222
           // 上传图片到指定接口
221
-          const response = await axios.post('/file/uploadFacilityFile', formData, {
223
+          const response = await axios.post(import.meta.env.VITE_APP_BASE_API +'/file/uploadFile', formData, {
222 224
             headers: {
223 225
               'Content-Type': 'multipart/form-data',
224
-              'token': localStorage.getItem('token') || ''
226
+              'fSource':2,
227
+              'token':getToken()
225 228
             },
226 229
             timeout: 10000 // 设置10秒超时
227 230
           });
228 231
           
229 232
           console.log('截图上传成功:', response.data);
233
+          // 上传成功后保存图片路径到设备信息
234
+          if (response.data && response.data.data && response.data.data[0]) {
235
+            const fFileurl = response.data.data[0].fFileurl;
236
+            // 获取当前设备ID
237
+           
238
+            
239
+            // 调用更新设备信息接口保存图片路径
240
+            try {
241
+              if (!fDriveid.value) {
242
+                console.warn('设备ID为空,无法保存图片路径');
243
+                return;
244
+              }
245
+              await axios.post(import.meta.env.VITE_APP_BASE_API + 'tbasedriveinfo/updateDriveInfo', {
246
+                data: {
247
+                  fDriveid: fDriveid.value,
248
+                  fImg: fFileurl,
249
+                }
250
+              }, {
251
+                headers: {
252
+                  'Content-Type': 'application/json',
253
+                  'token': getToken(),
254
+                  'fSource':2
255
+                }
256
+              });
257
+              fDriveid.value = ''
258
+              fetchDriveInfoList()
259
+              console.log('图片路径保存成功');
260
+            } catch (saveError) {
261
+              console.error('图片路径保存失败:', saveError.message || saveError);
262
+            }
263
+          }
264
+
230 265
         } catch (uploadError) {
231 266
           console.error('截图上传失败:', uploadError.message || uploadError);
232 267
         }
@@ -551,7 +586,6 @@ onUnmounted(() => {
551 586
     height: 72vh;
552 587
     background-image: url('@/assets/bj2.png');
553 588
     background-size: 100% 100%;
554
-    background-size: cover;
555 589
     background-position: center;
556 590
     background-repeat: no-repeat;
557 591
     border-radius: 6px;
@@ -564,7 +598,7 @@ onUnmounted(() => {
564 598
       flex: 1;
565 599
       display: flex;
566 600
       flex-direction: column;
567
-      
601
+      height: 100%;
568 602
       .video-wrapper {
569 603
         position: relative;
570 604
         flex: 1;
@@ -577,7 +611,7 @@ onUnmounted(() => {
577 611
         .video-player {
578 612
           width: 100%;
579 613
           height: 100%;
580
-          object-fit: contain;
614
+          object-fit: cover;
581 615
           background: #000;
582 616
           cursor: pointer;
583 617
         }

Datei-Diff unterdrückt, da er zu groß ist
+ 303 - 299
web/src/views/basesystem_manage/parceldata/parcellandList.vue


+ 55 - 54
web/src/views/basesystem_manage/zhdgList.vue

@@ -4,13 +4,13 @@
4 4
     <div class="head-container">
5 5
       <div>
6 6
         <!-- 搜索 -->
7
-        <el-input  clearable size="small" placeholder="请输入设备识别号" style="width: 200px;" class="filter-item" v-model="input_name"/>
7
+        <el-input v-model="input_name" clearable size="small" placeholder="请输入设备识别号" style="width: 200px;" class="filter-item" />
8 8
         <!--<el-input  clearable size="small" placeholder="请输入参数内容" style="width: 200px;" class="filter-item" v-model="input_content"/>-->
9 9
         <span>
10
-    <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="search">搜索</el-button>
11
-    <el-button  class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="reset">重置</el-button>
12
-   <el-button  class="filter-item" type="primary" size="mini" @click="showLog" icon="el-icon-plus">新增</el-button>
13
-  </span>
10
+          <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="search">搜索</el-button>
11
+          <el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="reset">重置</el-button>
12
+          <el-button class="filter-item" type="primary" size="mini" icon="el-icon-plus" @click="showLog">新增</el-button>
13
+        </span>
14 14
       </div>
15 15
     </div>
16 16
     <el-row :gutter="24">
@@ -18,23 +18,23 @@
18 18
         <el-card class="box-card box-cardh map-container" shadow="never" style="overflow:auto;">
19 19
           <!--表格渲染-->
20 20
           <el-table :data="tableData" style="width: 100%;">
21
-            <el-table-column type="selection" width="55"></el-table-column>
21
+            <el-table-column type="selection" width="55" />
22 22
             <!--<el-table-column fixed label="参数ID" width="60" align="center">-->
23 23
             <!--<template slot-scope="scope">{{ scope.row.fParamid }}</template>-->
24 24
             <!--</el-table-column>-->
25
-            <el-table-column prop="name"  label="设备名称" width="150"></el-table-column>
26
-            <el-table-column prop="number"  label="设备识别号" width="150"></el-table-column>
27
-            <el-table-column prop="lightPole" label="灯杆号" show-overflow-tooltip></el-table-column>
28
-            <el-table-column prop="voltage" label="电压" show-overflow-tooltip></el-table-column>
25
+            <el-table-column prop="name" label="设备名称" width="150" />
26
+            <el-table-column prop="number" label="设备识别号" width="150" />
27
+            <el-table-column prop="lightPole" label="灯杆号" show-overflow-tooltip />
28
+            <el-table-column prop="voltage" label="电压" show-overflow-tooltip />
29 29
             <el-table-column prop="ms" label="类型">
30
-            <template slot-scope="scope">
31
-              <span>{{ scope.row.ms == '0' ? '自动' : '' }}</span>
32
-              <span>{{ scope.row.ms == '1' ? '手动' : '' }}</span>
33
-            </template>
34
-          </el-table-column>
35
-            <el-table-column prop="longitude" label="经度"  show-overflow-tooltip></el-table-column>
36
-            <el-table-column prop="latitude" label="纬度" show-overflow-tooltip></el-table-column>
37
-            <el-table-column label="参数操作" width="200"  align="center" fixed="right">
30
+              <template slot-scope="scope">
31
+                <span>{{ scope.row.ms == '0' ? '自动' : '' }}</span>
32
+                <span>{{ scope.row.ms == '1' ? '手动' : '' }}</span>
33
+              </template>
34
+            </el-table-column>
35
+            <el-table-column prop="longitude" label="经度" show-overflow-tooltip />
36
+            <el-table-column prop="latitude" label="纬度" show-overflow-tooltip />
37
+            <el-table-column label="参数操作" width="200" align="center" fixed="right">
38 38
               <template slot-scope="scope">
39 39
                 <el-button size="mini" type="primary" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
40 40
                 <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
@@ -43,43 +43,44 @@
43 43
           </el-table>
44 44
           <!--分页组件-->
45 45
           <el-pagination
46
-            @size-change="handleSizeChange"
47
-            @current-change="handleCurrentChange"
48 46
             :current-page="page.current"
49 47
             :page-sizes="[10, 20, 30, 40]"
50 48
             :page-size="page.size"
51 49
             layout="total, sizes, prev, pager, next, jumper"
52 50
             :total="totals"
53
-          ></el-pagination>
51
+            @size-change="handleSizeChange"
52
+            @current-change="handleCurrentChange"
53
+          />
54 54
         </el-card>
55 55
       </el-col>
56 56
     </el-row>
57 57
     <!-- 新增 表格 数据 弹框 -->
58 58
     <el-dialog :title="titleType" :visible.sync="basedatadialogVisible" width="50%" height>
59 59
       <!--<div class="addBox">-->
60
-      <el-scrollbar class="editbox-cardh"
61
-                    v-loading="loadingdialog"
60
+      <el-scrollbar v-loading="loadingdialog"
61
+                    class="editbox-cardh"
62 62
                     element-loading-text="数据加载中"
63
-                    element-loading-spinner="el-icon-loading">
63
+                    element-loading-spinner="el-icon-loading"
64
+      >
64 65
         <el-form
65
-          :model="basedataForm"
66 66
           ref="ruleForm"
67
+          :model="basedataForm"
67 68
           size="small"
68 69
           label-width="150px"
69 70
           class="demo-ruleForm"
70 71
           style="width:80%"
71 72
         >
72 73
 
73
-         <el-row :gutter="20">
74
+          <el-row :gutter="20">
74 75
             <el-col :span="24">
75
-              <el-form-item label="所属公园" prop="parkId" >
76
+              <el-form-item label="所属公园" prop="parkId">
76 77
                 <el-select v-model="basedataForm.parkId" clearable filterable placeholder="请选择所属公园" class="filter-item">
77 78
                   <el-option
78 79
                     v-for="item in parkList"
79 80
                     :key="item.fParkid"
80 81
                     :label="item.fParkname"
81 82
                     :value="{value:item.fParkid,label:item.fParkname}"
82
-                  ></el-option>
83
+                  />
83 84
                 </el-select>
84 85
               </el-form-item>
85 86
             </el-col>
@@ -87,49 +88,49 @@
87 88
           <el-row :gutter="20" style="padding-top: 10px;">
88 89
             <el-col :span="24">
89 90
               <el-form-item label="设备识别号" prop="number">
90
-                <el-input v-model="basedataForm.number" placeholder="设备识别号" ></el-input>
91
+                <el-input v-model="basedataForm.number" placeholder="设备识别号" />
91 92
               </el-form-item>
92 93
             </el-col>
93 94
           </el-row>
94 95
           <el-row :gutter="20">
95 96
             <el-col :span="24">
96 97
               <el-form-item label="设备别名" prop="name">
97
-                <el-input v-model="basedataForm.name" placeholder="设备别名" ></el-input>
98
+                <el-input v-model="basedataForm.name" placeholder="设备别名" />
98 99
               </el-form-item>
99 100
             </el-col>
100 101
           </el-row>
101 102
           <el-row :gutter="20">
102 103
             <el-col :span="24">
103 104
               <el-form-item label="灯杆号" prop="lightPole">
104
-                <el-input v-model="basedataForm.lightPole" placeholder="灯杆号" ></el-input>
105
+                <el-input v-model="basedataForm.lightPole" placeholder="灯杆号" />
105 106
               </el-form-item>
106 107
             </el-col>
107 108
           </el-row>
108 109
           <el-row :gutter="20">
109 110
             <el-col :span="24">
110
-              <el-form-item label="经度" prop="longitude" >
111
-                <el-input v-model="basedataForm.longitude" placeholder="经度" ></el-input>
111
+              <el-form-item label="经度" prop="longitude">
112
+                <el-input v-model="basedataForm.longitude" placeholder="经度" />
112 113
               </el-form-item>
113 114
             </el-col>
114 115
           </el-row>
115 116
           <el-row :gutter="20">
116 117
             <el-col :span="24">
117 118
               <el-form-item label="纬度" prop="latitude">
118
-                <el-input v-model="basedataForm.latitude" placeholder="纬度" ></el-input>
119
+                <el-input v-model="basedataForm.latitude" placeholder="纬度" />
119 120
               </el-form-item>
120 121
             </el-col>
121 122
           </el-row>
122 123
           <el-row :gutter="20">
123 124
             <el-col :span="24">
124 125
               <el-form-item label="电压" prop="voltage">
125
-                <el-input v-model="basedataForm.voltage" placeholder="电压" ></el-input>
126
+                <el-input v-model="basedataForm.voltage" placeholder="电压" />
126 127
               </el-form-item>
127 128
             </el-col>
128 129
           </el-row>
129 130
           <el-row :gutter="20">
130 131
             <el-col :span="24">
131 132
               <el-form-item label="地址" prop="address">
132
-                <el-input type="textarea" v-model="basedataForm.address" ></el-input>
133
+                <el-input v-model="basedataForm.address" type="textarea" />
133 134
               </el-form-item>
134 135
             </el-col>
135 136
           </el-row>
@@ -137,9 +138,9 @@
137 138
       </el-scrollbar>
138 139
       <!--</div>-->
139 140
       <span slot="footer" class="dialog-footer">
140
-         <el-button type="danger" @click="resetForm" :visible.sync="resetnew">重置</el-button>
141
-           <el-button type="warning" @click="cancel">取 消</el-button>
142
-           <el-button type="primary" @click="submitForm">确 定</el-button>
141
+        <el-button type="danger" :visible.sync="resetnew" @click="resetForm">重置</el-button>
142
+        <el-button type="warning" @click="cancel">取 消</el-button>
143
+        <el-button type="primary" @click="submitForm">确 定</el-button>
143 144
       </span>
144 145
     </el-dialog>
145 146
   </div>
@@ -197,6 +198,21 @@
197 198
         parkList: []
198 199
       }
199 200
     },
201
+    //  优化  查询功能
202
+    watch: {
203
+      input_name: {
204
+        handler(val) {
205
+          if (val === '') {
206
+            this.page.number = val
207
+            // 获取 列表
208
+            this.getList(this.page)
209
+            this.page.current = 1
210
+          }
211
+        },
212
+        deep: true,
213
+        immediate: true
214
+      }
215
+    },
200 216
     created() {
201 217
       // 获取 列表
202 218
       this.getList()
@@ -432,21 +448,6 @@
432 448
       checkboxT(row, rowIndex) {
433 449
         return row.id !== 1
434 450
       }
435
-    },
436
-    //  优化  查询功能
437
-    watch: {
438
-      input_name: {
439
-        handler(val) {
440
-          if (val === '') {
441
-            this.page.number = val
442
-            // 获取 列表
443
-            this.getList(this.page)
444
-            this.page.current = 1
445
-          }
446
-        },
447
-        deep: true,
448
-        immediate: true
449
-      }
450 451
     }
451 452
   }
452 453
 </script>

+ 8 - 23
web/src/views/sbss_manage/drivelist.vue

@@ -167,17 +167,8 @@
167 167
           <el-form-item label="设备编号" prop="fNvscode" >
168 168
             <el-input  v-model="tableForm.fNvscode" placeholder="设备编号"></el-input>
169 169
           </el-form-item>
170
-          <el-form-item label="地址" prop="fIp" >
171
-            <el-input  v-model="tableForm.fIp" placeholder="设备地址"></el-input>
172
-          </el-form-item>
173
-          <el-form-item label="端口" prop="fPort" >
174
-            <el-input  v-model="tableForm.fPort" placeholder="设备端口"></el-input>
175
-          </el-form-item>
176
-          <el-form-item label="用户名" prop="fAccount" >
177
-            <el-input  v-model="tableForm.fAccount" placeholder="登录用户名"></el-input>
178
-          </el-form-item>
179
-          <el-form-item label="密码" prop="fPassword" >
180
-            <el-input  v-model="tableForm.fPassword" placeholder="登录密码" show-password></el-input>
170
+          <el-form-item label="地址" prop="url" >
171
+            <el-input  v-model="tableForm.url" placeholder="设备地址"></el-input>
181 172
           </el-form-item>
182 173
           <el-form-item label="设备名称" prop="fName" >
183 174
             <el-input  v-model="tableForm.fName" placeholder="设备名称"></el-input>
@@ -397,10 +388,7 @@
397 388
                   fIsuse: this.tableForm.fIsuse,
398 389
                   fState: this.tableForm.fState,
399 390
                   fDriveid: null,
400
-                  fIp: this.tableForm.fIp,
401
-                  fPort: this.tableForm.fPort,
402
-                  fAccount: this.tableForm.fAccount,
403
-                  fPassword: this.tableForm.fPassword
391
+                  url: this.tableForm.url
404 392
                 }
405 393
               })
406 394
               // console.log('res', res)
@@ -427,14 +415,11 @@
427 415
               fParkname: this.tableForm.fParkname,
428 416
               fParkid: this.tableForm.fParkid,
429 417
               fIsuse: this.tableForm.fIsuse,
430
-                  fX: this.tableForm.fX,
431
-                  fY: this.tableForm.fY,
432
-                  fState: this.tableForm.fState,
433
-                  fDriveid: this.tableForm.fDriveid,
434
-                  fIp: this.tableForm.fIp,
435
-                  fPort: this.tableForm.fPort,
436
-                  fAccount: this.tableForm.fAccount,
437
-                  fPassword: this.tableForm.fPassword
418
+              fX: this.tableForm.fX,
419
+              fY: this.tableForm.fY,
420
+              fState: this.tableForm.fState,
421
+              fDriveid: this.tableForm.fDriveid,
422
+              url: this.tableForm.url,
438 423
             }
439 424
           }).then(res => {
440 425
             // console.log('res修改,', res)

+ 73 - 72
web/src/views/sbss_manage/maintainlogs.vue

@@ -4,13 +4,13 @@
4 4
     <div class="head-container">
5 5
       <div>
6 6
         <!-- 搜索 -->
7
-        <el-input  clearable size="small" placeholder="请输入公园名称" style="width: 200px;" class="filter-item" v-model="input_parkName"/>
8
-        <el-input  clearable size="small" placeholder="请输入设备名称" style="width: 200px;" class="filter-item" v-model="input_equipmentName"/>
7
+        <el-input v-model="input_parkName" clearable size="small" placeholder="请输入公园名称" style="width: 200px;" class="filter-item" />
8
+        <el-input v-model="input_equipmentName" clearable size="small" placeholder="请输入设备名称" style="width: 200px;" class="filter-item" />
9 9
         <span>
10
-    <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="search">搜索</el-button>
11
-    <el-button  class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="reset">重置</el-button>
12
-   <el-button  class="filter-item" type="primary" size="mini" @click="showLog" icon="el-icon-plus">新增</el-button>
13
-  </span>
10
+          <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="search">搜索</el-button>
11
+          <el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="reset">重置</el-button>
12
+          <el-button class="filter-item" type="primary" size="mini" icon="el-icon-plus" @click="showLog">新增</el-button>
13
+        </span>
14 14
       </div>
15 15
     </div>
16 16
     <el-row :gutter="24">
@@ -18,21 +18,21 @@
18 18
         <el-card class="box-card box-cardh map-container" shadow="never" style="overflow:auto;">
19 19
           <!--表格渲染-->
20 20
           <el-table :data="tableData" style="width: 100%;">
21
-            <el-table-column type="selection" width="55"></el-table-column>
22
-            <el-table-column prop="parkName"  label="公园名称" width="150"></el-table-column>
23
-            <el-table-column prop="equipmentName"  label="设备名称" width="150"></el-table-column>
24
-            <el-table-column prop="equipmentId"  label="设备编号" width="150"></el-table-column>
25
-            <el-table-column prop="maintenanceContent" label="保养内容" show-overflow-tooltip></el-table-column>
26
-            <el-table-column prop="maintenanceCost" label="保养费用" width="120"></el-table-column>
27
-            <el-table-column prop="maintenanceDate" label="保养日期" width="150"></el-table-column>
28
-            <el-table-column prop="maintenancePerson" label="保养人员" width="120"></el-table-column>
29
-            <el-table-column prop="maintenanceType" label="保养类型" width="120"></el-table-column>
30
-            <el-table-column prop="nextMaintenanceDate" label="下次保养日期" width="150"></el-table-column>
31
-            <el-table-column prop="parkName" label="所属公园" width="150"></el-table-column>
32
-            <el-table-column prop="workHours" label="工时(小时)" width="120"></el-table-column>
33
-            <el-table-column prop="createdBy" label="记录创建人" width="120"></el-table-column>
34
-            <el-table-column prop="createdAt" label="创建时间" width="180"></el-table-column>
35
-            <el-table-column label="操作" width="200"  align="center" fixed="right">
21
+            <el-table-column type="selection" width="55" />
22
+            <el-table-column prop="parkName" label="公园名称" width="150" />
23
+            <el-table-column prop="equipmentName" label="设备名称" width="150" />
24
+            <el-table-column prop="equipmentId" label="设备编号" width="150" />
25
+            <el-table-column prop="maintenanceContent" label="保养内容" show-overflow-tooltip />
26
+            <el-table-column prop="maintenanceCost" label="保养费用" width="120" />
27
+            <el-table-column prop="maintenanceDate" label="保养日期" width="150" />
28
+            <el-table-column prop="maintenancePerson" label="保养人员" width="120" />
29
+            <el-table-column prop="maintenanceType" label="保养类型" width="120" />
30
+            <el-table-column prop="nextMaintenanceDate" label="下次保养日期" width="150" />
31
+            <el-table-column prop="parkName" label="所属公园" width="150" />
32
+            <el-table-column prop="workHours" label="工时(小时)" width="120" />
33
+            <el-table-column prop="createdBy" label="记录创建人" width="120" />
34
+            <el-table-column prop="createdAt" label="创建时间" width="180" />
35
+            <el-table-column label="操作" width="200" align="center" fixed="right">
36 36
               <template slot-scope="scope">
37 37
                 <el-button size="mini" type="primary" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
38 38
                 <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
@@ -41,26 +41,27 @@
41 41
           </el-table>
42 42
           <!--分页组件-->
43 43
           <el-pagination
44
-            @size-change="handleSizeChange"
45
-            @current-change="handleCurrentChange"
46 44
             :current-page="page.current"
47 45
             :page-sizes="[10, 20, 30, 40]"
48 46
             :page-size="page.size"
49 47
             layout="total, sizes, prev, pager, next, jumper"
50 48
             :total="totals"
51
-          ></el-pagination>
49
+            @size-change="handleSizeChange"
50
+            @current-change="handleCurrentChange"
51
+          />
52 52
         </el-card>
53 53
       </el-col>
54 54
     </el-row>
55 55
     <!-- 新增 表格 数据 弹框 -->
56 56
     <el-dialog :title="titleType" :visible.sync="maintainDialogVisible" width="50%" height>
57
-      <el-scrollbar class="editbox-cardh"
58
-                    v-loading="loadingdialog"
57
+      <el-scrollbar v-loading="loadingdialog"
58
+                    class="editbox-cardh"
59 59
                     element-loading-text="数据加载中"
60
-                    element-loading-spinner="el-icon-loading">
60
+                    element-loading-spinner="el-icon-loading"
61
+      >
61 62
         <el-form
62
-          :model="maintainForm"
63 63
           ref="ruleForm"
64
+          :model="maintainForm"
64 65
           size="small"
65 66
           label-width="150px"
66 67
           class="demo-ruleForm"
@@ -68,14 +69,14 @@
68 69
         >
69 70
           <el-row :gutter="20">
70 71
             <el-col :span="24">
71
-              <el-form-item label="所属公园" prop="parkId" >
72
+              <el-form-item label="所属公园" prop="parkId">
72 73
                 <el-select v-model="maintainForm.parkId" clearable filterable placeholder="请选择所属公园" class="filter-item">
73 74
                   <el-option
74 75
                     v-for="item in parkList"
75 76
                     :key="item.fParkid"
76 77
                     :label="item.fParkname"
77 78
                     :value="{value:item.fParkid,label:item.fParkname}"
78
-                  ></el-option>
79
+                  />
79 80
                 </el-select>
80 81
               </el-form-item>
81 82
             </el-col>
@@ -89,7 +90,7 @@
89 90
                     :key="item.ffacilityid"
90 91
                     :label="item.fname"
91 92
                     :value="{value:item.ffacilityid,label:item.fname,name:item.fname}"
92
-                  ></el-option>
93
+                  />
93 94
                 </el-select>
94 95
               </el-form-item>
95 96
             </el-col>
@@ -97,65 +98,65 @@
97 98
           <el-row :gutter="20">
98 99
             <el-col :span="24">
99 100
               <el-form-item label="设备名称" prop="equipmentName">
100
-                <el-input v-model="maintainForm.equipmentName" placeholder="设备名称" :disabled="true"></el-input>
101
+                <el-input v-model="maintainForm.equipmentName" placeholder="设备名称" :disabled="true" />
101 102
               </el-form-item>
102 103
             </el-col>
103 104
           </el-row>
104 105
           <el-row :gutter="20">
105 106
             <el-col :span="24">
106 107
               <el-form-item label="保养内容" prop="maintenanceContent">
107
-                <el-input type="textarea" v-model="maintainForm.maintenanceContent" placeholder="保养内容"></el-input>
108
+                <el-input v-model="maintainForm.maintenanceContent" type="textarea" placeholder="保养内容" />
108 109
               </el-form-item>
109 110
             </el-col>
110 111
           </el-row>
111 112
           <el-row :gutter="20">
112 113
             <el-col :span="24">
113 114
               <el-form-item label="保养费用" prop="maintenanceCost">
114
-                <el-input v-model="maintainForm.maintenanceCost" placeholder="保养费用" type="number"></el-input>
115
+                <el-input v-model="maintainForm.maintenanceCost" placeholder="保养费用" type="number" />
115 116
               </el-form-item>
116 117
             </el-col>
117 118
           </el-row>
118 119
           <el-row :gutter="20">
119 120
             <el-col :span="24">
120 121
               <el-form-item label="保养日期" prop="maintenanceDate">
121
-                <el-date-picker v-model="maintainForm.maintenanceDate" type="datetime" placeholder="选择保养日期" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
122
+                <el-date-picker v-model="maintainForm.maintenanceDate" type="datetime" placeholder="选择保养日期" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" />
122 123
               </el-form-item>
123 124
             </el-col>
124 125
           </el-row>
125 126
           <el-row :gutter="20">
126 127
             <el-col :span="24">
127 128
               <el-form-item label="保养人员" prop="maintenancePerson">
128
-                <el-input v-model="maintainForm.maintenancePerson" placeholder="请输入保养人员" class="filter-item"></el-input>
129
+                <el-input v-model="maintainForm.maintenancePerson" placeholder="请输入保养人员" class="filter-item" />
129 130
               </el-form-item>
130 131
             </el-col>
131 132
           </el-row>
132 133
           <el-row :gutter="20">
133 134
             <el-col :span="24">
134 135
               <el-form-item label="保养类型" prop="maintenanceType">
135
-                <el-input v-model="maintainForm.maintenanceType" placeholder="保养类型"></el-input>
136
+                <el-input v-model="maintainForm.maintenanceType" placeholder="保养类型" />
136 137
               </el-form-item>
137 138
             </el-col>
138 139
           </el-row>
139 140
           <el-row :gutter="20">
140 141
             <el-col :span="24">
141 142
               <el-form-item label="下次保养日期" prop="nextMaintenanceDate">
142
-                <el-date-picker v-model="maintainForm.nextMaintenanceDate" type="datetime" placeholder="选择下次保养日期" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
143
+                <el-date-picker v-model="maintainForm.nextMaintenanceDate" type="datetime" placeholder="选择下次保养日期" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" />
143 144
               </el-form-item>
144 145
             </el-col>
145 146
           </el-row>
146 147
           <el-row :gutter="20">
147 148
             <el-col :span="24">
148 149
               <el-form-item label="工时(小时)" prop="workHours">
149
-                <el-input v-model="maintainForm.workHours" placeholder="工时(小时)" type="number"></el-input>
150
+                <el-input v-model="maintainForm.workHours" placeholder="工时(小时)" type="number" />
150 151
               </el-form-item>
151 152
             </el-col>
152 153
           </el-row>
153 154
         </el-form>
154 155
       </el-scrollbar>
155 156
       <span slot="footer" class="dialog-footer">
156
-         <el-button type="danger" @click="resetForm" :visible.sync="resetnew">重置</el-button>
157
-           <el-button type="warning" @click="cancel">取 消</el-button>
158
-           <el-button type="primary" @click="submitForm">确 定</el-button>
157
+        <el-button type="danger" :visible.sync="resetnew" @click="resetForm">重置</el-button>
158
+        <el-button type="warning" @click="cancel">取 消</el-button>
159
+        <el-button type="primary" @click="submitForm">确 定</el-button>
159 160
       </span>
160 161
     </el-dialog>
161 162
   </div>
@@ -213,6 +214,34 @@
213 214
         equipmentList: []
214 215
       }
215 216
     },
217
+    // 监听设备编号变化,自动填充设备名称
218
+    watch: {
219
+      'maintainForm.equipmentId': {
220
+        handler(val) {
221
+          if (val && val.name) {
222
+            this.maintainForm.equipmentName = val.name
223
+          }
224
+        },
225
+        deep: true
226
+      },
227
+      'maintainForm.parkId': {
228
+        handler(val) {
229
+          if (val && val.value) {
230
+            // 公园切换时,更新设备列表
231
+            this.getEquipmentList(val.value)
232
+            // 重置设备选择和设备名称
233
+            this.maintainForm.equipmentId = ''
234
+            this.maintainForm.equipmentName = ''
235
+          } else {
236
+            // 清空公园时,清空设备列表和选择
237
+            this.equipmentList = []
238
+            this.maintainForm.equipmentId = ''
239
+            this.maintainForm.equipmentName = ''
240
+          }
241
+        },
242
+        deep: true
243
+      }
244
+    },
216 245
     created() {
217 246
       // 获取 列表
218 247
       this.getList()
@@ -298,7 +327,7 @@
298 327
         }).then(() => {
299 328
           request({
300 329
             url: `/t-equipment-maintenance/${row.id}`,
301
-            method: 'delete',
330
+            method: 'delete'
302 331
             // data: [row]
303 332
           })
304 333
             .then(res => {
@@ -468,34 +497,6 @@
468 497
             this.$message.error(err || '加载失败')
469 498
           })
470 499
       }
471
-    },
472
-    // 监听设备编号变化,自动填充设备名称
473
-    watch: {
474
-      'maintainForm.equipmentId': {
475
-        handler(val) {
476
-          if (val && val.name) {
477
-            this.maintainForm.equipmentName = val.name
478
-          }
479
-        },
480
-        deep: true
481
-      },
482
-      'maintainForm.parkId': {
483
-        handler(val) {
484
-          if (val && val.value) {
485
-            // 公园切换时,更新设备列表
486
-            this.getEquipmentList(val.value)
487
-            // 重置设备选择和设备名称
488
-            this.maintainForm.equipmentId = ''
489
-            this.maintainForm.equipmentName = ''
490
-          } else {
491
-            // 清空公园时,清空设备列表和选择
492
-            this.equipmentList = []
493
-            this.maintainForm.equipmentId = ''
494
-            this.maintainForm.equipmentName = ''
495
-          }
496
-        },
497
-        deep: true
498
-      },
499 500
     }
500 501
   }
501 502
 </script>
@@ -618,4 +619,4 @@
618 619
   .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
619 620
     background-color: #e7faf0;
620 621
   }
621
-</style>
622
+</style>

+ 2 - 2
web/src/views/workorder/Workorder.vue

@@ -54,10 +54,10 @@
54 54
         <div class="worderorder_item_right">{{ post.fLevelname }}</div>
55 55
       </div>
56 56
       <!-- 养护单位 -->
57
-      <div class="worderorder_item">
57
+      <!-- <div class="worderorder_item">
58 58
         <div class="worderorder_item_left">养护单位 :</div>
59 59
         <div class="worderorder_item_right">{{ post.fYhdeptname }}</div>
60
-      </div>
60
+      </div> -->
61 61
       <!-- 整改限期-->
62 62
       <div class="worderorder_item">
63 63
         <div class="worderorder_item_left">整改限期 :</div>

+ 6 - 8
web/src/views/workorder/workorder_all.vue

@@ -201,11 +201,9 @@
201 201
               </el-form-item>
202 202
             </el-col>
203 203
           </el-row>
204
-          <el-row :gutter="20">
204
+          <!-- <el-row :gutter="20">
205 205
             <el-col :span="24">
206
-              <!-- 养护单位名称 -->
207 206
               <el-form-item label="养护单位名称" prop="fYhdeptname">
208
-                <!--<el-input v-model="workForm.fYhdeptname" placeholder="养护单位名称"></el-input>-->
209 207
                 <el-select v-model="workForm.fYhdeptname" style="width:280px;" placeholder="请选择养护单位" class="filter-item" @change="selectyhdwnameTrigger" >
210 208
                   <el-option
211 209
                     v-for="item in yhdwList"
@@ -216,7 +214,7 @@
216 214
                 </el-select>
217 215
               </el-form-item>
218 216
             </el-col>
219
-          </el-row>
217
+          </el-row> -->
220 218
           <el-row :gutter="20">
221 219
             <el-col :span="24">
222 220
               <!-- 整改限期 -->
@@ -319,11 +317,11 @@
319 317
                       <el-input v-model="dialogModel.fLevelname"></el-input>
320 318
                     </el-form-item>
321 319
                   </el-col>
322
-                  <el-col :span="12">
320
+                  <!-- <el-col :span="12">
323 321
                     <el-form-item label="养护单位">
324 322
                       <el-input v-model="dialogModel.fYhdeptname"></el-input>
325 323
                     </el-form-item>
326
-                  </el-col>
324
+                  </el-col> -->
327 325
                 </el-row>
328 326
                 <el-row :gutter="10">
329 327
                   <el-col :span="12">
@@ -331,11 +329,11 @@
331 329
                       <el-input v-model="dialogModel.fSgusername"></el-input>
332 330
                     </el-form-item>
333 331
                   </el-col>
334
-                  <el-col :span="12">
332
+                  <!-- <el-col :span="12">
335 333
                     <el-form-item label="公园园长">
336 334
                       <el-input v-model="dialogModel.fYhusername"></el-input>
337 335
                     </el-form-item>
338
-                  </el-col>
336
+                  </el-col> -->
339 337
                 </el-row>
340 338
                 <el-row :gutter="10">
341 339
                   <el-col :span="24">

+ 176 - 17
web/src/views/workorder/workorder_dcl.vue

@@ -45,8 +45,9 @@
45 45
         <template slot-scope="scope">
46 46
           <!--<el-button size="mini" type="info" icon="el-icon-view" @click="handleSearch(scope.$index, scope.row)">查看</el-button>-->
47 47
           <el-button type="primary" size="mini" icon="el-icon-view"  @click="btnShow(scope.row)">查看</el-button>
48
-          <el-button size="mini" type="primary" icon="el-icon-view" @click="handleEdit(scope.$index, scope.row)">处置</el-button>
49
-          <el-button size="mini" type="danger" icon="el-icon-delete" @click="handlefinishOrAfresh(scope.$index, scope.row)">注销</el-button>
48
+          <el-button type="primary" size="mini" icon="el-icon-edit"  @click="showDispatchDialog(scope.row)">派单</el-button>
49
+          <!-- <el-button size="mini" type="primary" icon="el-icon-view" @click="handleEdit(scope.$index, scope.row)">处置</el-button> -->
50
+          <!-- <el-button size="mini" type="danger" icon="el-icon-delete" @click="handlefinishOrAfresh(scope.$index, scope.row)">注销</el-button> -->
50 51
         </template>
51 52
       </el-table-column>
52 53
     </el-table>
@@ -234,12 +235,12 @@
234 235
       </span>
235 236
     </el-dialog>
236 237
     <el-dialog append-to-body
237
-               width="80%"
238
-               :close-on-click-modal="false"
239
-               :destroy-on-close="true"
240
-               :before-close="dialogClose"
241
-               :title="`${dialogTitle}`"
242
-               :visible.sync="dialogFormVisible">
238
+      width="80%"
239
+      :close-on-click-modal="false"
240
+      :destroy-on-close="true"
241
+      :before-close="dialogClose"
242
+      :title="`${dialogTitle}`"
243
+      :visible.sync="dialogFormVisible">
243 244
       <el-container
244 245
         v-loading="loadingdialog"
245 246
         element-loading-text="数据加载中"
@@ -285,11 +286,11 @@
285 286
                       <el-input v-model="dialogModel.fLevelname"></el-input>
286 287
                     </el-form-item>
287 288
                   </el-col>
288
-                  <el-col :span="12">
289
+                  <!-- <el-col :span="12">
289 290
                     <el-form-item label="养护单位">
290 291
                       <el-input v-model="dialogModel.fYhdeptname"></el-input>
291 292
                     </el-form-item>
292
-                  </el-col>
293
+                  </el-col> -->
293 294
                 </el-row>
294 295
                 <el-row :gutter="10">
295 296
                   <el-col :span="12">
@@ -297,11 +298,11 @@
297 298
                       <el-input v-model="dialogModel.fSgusername"></el-input>
298 299
                     </el-form-item>
299 300
                   </el-col>
300
-                  <el-col :span="12">
301
+                  <!-- <el-col :span="12">
301 302
                     <el-form-item label="公园园长">
302 303
                       <el-input v-model="dialogModel.fYhusername"></el-input>
303 304
                     </el-form-item>
304
-                  </el-col>
305
+                  </el-col> -->
305 306
                 </el-row>
306 307
                 <el-row :gutter="10">
307 308
                   <el-col :span="24">
@@ -324,8 +325,7 @@
324 325
             </div>
325 326
           </el-card>
326 327
         </el-aside>
327
-        <el-main style="background-color: rgb(255, 255, 255); margin-bottom: 0px; padding:0px;line-height: 32px;
328
-    font-size: 16px;">
328
+        <el-main style="background-color: rgb(255, 255, 255); margin-bottom: 0px; padding:0px;line-height: 32px;    font-size: 16px;">
329 329
           <el-card class="box-card map-container" shadow="never" style="overflow:auto;">
330 330
             <div slot="header" class="clearfix">
331 331
               <span>工单处理信息</span>
@@ -370,6 +370,46 @@
370 370
       </el-container>
371 371
       <div slot="footer" class="dialog-footer">
372 372
         <el-button @click="dialogClose" type="warning" style="border:0px ">取 消</el-button>
373
+        
374
+      </div>
375
+    </el-dialog>
376
+    
377
+    <!-- 派单弹框 -->
378
+    <el-dialog title="派单" :visible.sync="dispatchDialogVisible" width="50%">
379
+      <el-form
380
+        :model="dispatchForm"
381
+        ref="dispatchForm"
382
+        size="small"
383
+        label-width="120px"
384
+        class="demo-ruleForm"
385
+      >
386
+        <el-form-item label="选择部门" prop="selectedDepartment">
387
+          <el-select v-model="selectedDepartment" @change="onDepartmentChange" placeholder="请选择部门">
388
+            <el-option
389
+              v-for="item in departmentList"
390
+              :key="item.fDeptid"
391
+              :label="item.fDeptname"
392
+              :value="item.fDeptid"
393
+            ></el-option>
394
+          </el-select>
395
+        </el-form-item>
396
+        
397
+        <!-- 人员选择 - 仅当选择了部门后显示 -->
398
+        <el-form-item v-if="selectedDepartment" label="选择人员" prop="selectedUser">
399
+          <el-select v-model="selectedUser" placeholder="请选择人员">
400
+            <el-option
401
+              v-for="item in userList"
402
+              :key="item.fUserid"
403
+              :label="item.fUsername"
404
+              :value="{id: item.fUserid, name: item.fUsername}"
405
+            ></el-option>
406
+          </el-select>
407
+        </el-form-item>
408
+      </el-form>
409
+      
410
+      <div slot="footer" class="dialog-footer">
411
+        <el-button @click="closeDispatchDialog">取 消</el-button>
412
+        <el-button type="primary" @click="submitDispatch">确 定</el-button>
373 413
       </div>
374 414
     </el-dialog>
375 415
   </div>
@@ -387,7 +427,7 @@
387 427
     data() {
388 428
       return {
389 429
 // 工单类型列表
390
-        statetype: 2,
430
+        statetype: 1,
391 431
         workcode: '',
392 432
         worktype: '',
393 433
         // 工单类型列表
@@ -469,7 +509,14 @@
469 509
         dialogImageVisible: false,
470 510
         dialogModel: {
471 511
           id: null
472
-        }
512
+        },
513
+        // 派单相关数据
514
+        dispatchDialogVisible: false,
515
+        selectedDepartment: '',
516
+        departmentList: [],
517
+        userList: [],
518
+        selectedUser: '',
519
+        dispatchForm: {}
473 520
       }
474 521
     },
475 522
     created() {
@@ -751,7 +798,119 @@
751 798
             this.$message.error(err || '加载失败')
752 799
           })
753 800
       },
754
-      //  处置功能+完结功能
801
+      // 显示派单弹框
802
+      showDispatchDialog(row) {
803
+        this.workForm = row
804
+        this.dispatchDialogVisible = true
805
+        this.selectedDepartment = ''
806
+        this.selectedUser = ''
807
+        this.userList = []
808
+        this.getDepartmentList()
809
+      },
810
+      
811
+      // 关闭派单弹框
812
+      closeDispatchDialog() {
813
+        this.dispatchDialogVisible = false
814
+        this.selectedDepartment = ''
815
+        this.selectedUser = ''
816
+        this.userList = []
817
+      },
818
+      
819
+      // 提交派单
820
+      submitDispatch() {
821
+        // 验证是否选择了人员
822
+        if (!this.selectedUser || !this.selectedUser.id) {
823
+          this.$message.warning('请选择派单人员')
824
+          return
825
+        }
826
+        
827
+        // 准备派单参数
828
+        const params = {
829
+          fYhuserid: this.selectedUser.id,
830
+          fWorkorderid: this.workForm.fWorkorderid
831
+        }
832
+        
833
+        // 调用派单接口
834
+        request({
835
+          url: '/workorderbaseApp/dispatchAppOrder',
836
+          method: 'post',
837
+          data: params
838
+        })
839
+          .then(res => {
840
+            if (res.status === 200) {
841
+              this.$message.success('派单成功')
842
+              this.closeDispatchDialog()
843
+              // 刷新工单列表
844
+              this.getList()
845
+              // 刷新当前工单详情
846
+              this.getDetail()
847
+            } else {
848
+              this.$message.error(res.data.msg || '派单失败')
849
+            }
850
+          })
851
+          .catch(err => {
852
+            this.$message.error(err || '派单失败')
853
+          })
854
+      },
855
+      
856
+      // 获取部门列表
857
+      getDepartmentList() {
858
+        request({
859
+          url: '/sysdepartment/selectDepartmentByPageListpara?stateid=0',
860
+          method: 'post',
861
+          data: {
862
+            current: 1,
863
+            fDeptname: "",
864
+            size: 1000
865
+          }
866
+        })
867
+          .then(res => {
868
+            if (res.data && res.data.data) {
869
+              this.departmentList = res.data.data;
870
+            }
871
+          })
872
+          .catch(err => {
873
+            this.$message.error(err || '加载部门列表失败')
874
+          })
875
+      },
876
+      
877
+      // 部门变更处理
878
+      onDepartmentChange(deptId) {
879
+        this.selectedUser = ''; // 清空已选人员
880
+        // 当部门变更时,获取该部门下的人员列表
881
+        if (deptId) {
882
+          this.getUserListByDepartment(deptId);
883
+        } else {
884
+          this.userList = [];
885
+        }
886
+      },
887
+      
888
+      // 根据部门获取人员列表
889
+      getUserListByDepartment(deptId) {
890
+        request({
891
+          url: '/sysuseraccount/selectUserAccountAppByPageList',
892
+          method: 'post',
893
+          data: {
894
+            current: 1,
895
+            fDeptid: deptId,
896
+            size: 9999
897
+          }
898
+        })
899
+          .then(res => {
900
+            if (res.data && res.data.data) {
901
+              this.userList = res.data.data;
902
+            } else {
903
+              this.userList = [];
904
+              this.$message.info('该部门下暂无人员');
905
+            }
906
+          })
907
+          .catch(err => {
908
+            this.$message.error(err || '加载人员列表失败');
909
+            this.userList = [];
910
+          })
911
+      },
912
+      
913
+      // 处置功能+完结功能
755 914
       submitForm() {
756 915
         // acceptOrDispose:1接收,2处置,3完结,4重新指派
757 916
         if (this.key === 'dcl') {

+ 179 - 11
web/src/views/workorder/workorder_ycl.vue

@@ -46,8 +46,9 @@
46 46
         <template slot-scope="scope">
47 47
           <!--<el-button size="mini" type="info" icon="el-icon-view" @click="handleSearch(scope.$index, scope.row)">查看</el-button>-->
48 48
           <el-button type="primary" size="mini" icon="el-icon-view"  @click="btnShow(scope.row)">查看</el-button>
49
-          <el-button size="mini" type="primary" icon="el-icon-view" @click="handleEdit(scope.$index, scope.row)">完结</el-button>
50
-          <el-button size="mini" type="danger" icon="el-icon-delete" @click="handlefinishOrAfresh(scope.$index, scope.row)">注销</el-button>
49
+          <el-button type="primary" size="mini" icon="el-icon-view"  @click="btnDispatch(scope.row)">处理</el-button>
50
+          <!-- <el-button size="mini" type="primary" icon="el-icon-view" @click="handleEdit(scope.$index, scope.row)">完结</el-button>
51
+          <el-button size="mini" type="danger" icon="el-icon-delete" @click="handlefinishOrAfresh(scope.$index, scope.row)">注销</el-button> -->
51 52
         </template>
52 53
       </el-table-column>
53 54
     </el-table>
@@ -286,11 +287,11 @@
286 287
                       <el-input v-model="dialogModel.fLevelname"></el-input>
287 288
                     </el-form-item>
288 289
                   </el-col>
289
-                  <el-col :span="12">
290
+                  <!-- <el-col :span="12">
290 291
                     <el-form-item label="养护单位">
291 292
                       <el-input v-model="dialogModel.fYhdeptname"></el-input>
292 293
                     </el-form-item>
293
-                  </el-col>
294
+                  </el-col> -->
294 295
                 </el-row>
295 296
                 <el-row :gutter="10">
296 297
                   <el-col :span="12">
@@ -298,11 +299,11 @@
298 299
                       <el-input v-model="dialogModel.fSgusername"></el-input>
299 300
                     </el-form-item>
300 301
                   </el-col>
301
-                  <el-col :span="12">
302
+                  <!-- <el-col :span="12">
302 303
                     <el-form-item label="公园园长">
303 304
                       <el-input v-model="dialogModel.fYhusername"></el-input>
304 305
                     </el-form-item>
305
-                  </el-col>
306
+                  </el-col> -->
306 307
                 </el-row>
307 308
                 <el-row :gutter="10">
308 309
                   <el-col :span="24">
@@ -325,8 +326,7 @@
325 326
             </div>
326 327
           </el-card>
327 328
         </el-aside>
328
-        <el-main style="background-color: rgb(255, 255, 255); margin-bottom: 0px; padding:0px;line-height: 32px;
329
-    font-size: 16px;">
329
+        <el-main style="background-color: rgb(255, 255, 255); margin-bottom: 0px; padding:0px;line-height: 32px;  font-size: 16px;">
330 330
           <el-card class="box-card map-container" shadow="never" style="overflow:auto;">
331 331
             <div slot="header" class="clearfix">
332 332
               <span>工单处理信息</span>
@@ -373,6 +373,53 @@
373 373
         <el-button @click="dialogClose" type="warning" style="border:0px ">取 消</el-button>
374 374
       </div>
375 375
     </el-dialog>
376
+    
377
+    <!-- 处理工单弹框 -->
378
+    <el-dialog title="处理工单" :visible.sync="dispatchDialogVisible" width="55%">
379
+      <el-form
380
+        :model="dispatchForm"
381
+        ref="dispatchForm"
382
+        size="small"
383
+        label-width="120px"
384
+        class="demo-ruleForm"
385
+      >
386
+        <el-form-item label="处理内容" prop="disposeRemark">
387
+          <el-input 
388
+            type="textarea" 
389
+            :rows="4" 
390
+            v-model="dispatchForm.disposeRemark" 
391
+            placeholder="请输入处理内容"
392
+          ></el-input>
393
+        </el-form-item>
394
+        
395
+        <el-form-item label="上传附件">
396
+          <el-upload
397
+            ref="upload"
398
+            multiple
399
+            :file-list="fileList"
400
+            :limit="20"
401
+            :on-exceed="handleFileExceed"
402
+            :before-remove="handleFileBeforeRemove"
403
+            :on-success="handleFileSuccess"
404
+            :on-error="handleFileError"
405
+            :headers="headers"
406
+            :action="uploadActionUrl"
407
+            list-type="picture"
408
+            :on-preview="handlePictureCardPreview"
409
+            :on-remove="handleFileRemove">
410
+            <el-button size="small" type="primary">点击上传</el-button>
411
+          </el-upload>
412
+          <el-dialog :visible.sync="dialogImageVisible">
413
+            <img width="100%" :src="dialogImageUrl" alt="">
414
+          </el-dialog>
415
+        </el-form-item>
416
+      </el-form>
417
+      
418
+      <div slot="footer" class="dialog-footer">
419
+        <el-button @click="closeDispatchDialog">取 消</el-button>
420
+        <el-button type="primary" @click="submitDispose">确 定</el-button>
421
+      </div>
422
+    </el-dialog>
376 423
   </div>
377 424
 </template>
378 425
 
@@ -380,6 +427,7 @@
380 427
   import request from '@/utils/request'
381 428
   import DateRangePicker from '@/components/DateRangePicker'
382 429
   import { parseTime, downloadFile } from '@/utils/index'
430
+  import { getToken } from '@/utils/auth'
383 431
   // 详情组件
384 432
   import workorder from '@/views/workorder/Workorder'
385 433
   export default {
@@ -387,8 +435,8 @@
387 435
     components: { workorder, DateRangePicker },
388 436
     data() {
389 437
       return {
390
-// 工单类型列表
391
-        statetype: 3,
438
+        // 工单类型列表
439
+        statetype: 2,
392 440
         workcode: '',
393 441
         worktype: '',
394 442
         // 工单类型列表
@@ -398,6 +446,7 @@
398 446
         dialogVisible: false,
399 447
         // 表格数据
400 448
         tableData: [],
449
+        rowListData: [],
401 450
         // 公园列表
402 451
         parkList: [],
403 452
         parkname: '',
@@ -457,7 +506,20 @@
457 506
         dialogImageVisible: false,
458 507
         dialogModel: {
459 508
           id: null
460
-        }
509
+        },
510
+        // 处理工单弹框相关数据
511
+        dispatchDialogVisible: false,
512
+        dispatchForm: {
513
+          id: '',
514
+          disposeRemark: ''
515
+        },
516
+        fileList: [],
517
+        uploadActionUrl:   process.env.VUE_APP_BASE_API+'/file/uploadFile',
518
+        headers: {
519
+          fSource:2,
520
+          token:getToken()
521
+        },
522
+        fileInfoList: []
461 523
       }
462 524
     },
463 525
     created() {
@@ -769,6 +831,7 @@
769 831
           // this.dialogVisible = false;
770 832
         }
771 833
         if (this.key === 'ycl') {
834
+          
772 835
           request({
773 836
             url: '/workorderbaseApp/finishOrAfreshWorkOrder',
774 837
             method: 'post',
@@ -820,6 +883,111 @@
820 883
       },
821 884
       checkboxT(row, rowIndex) {
822 885
         return row.id !== 1
886
+      },
887
+      
888
+      // 显示处理工单弹框
889
+      btnDispatch(row) {
890
+        this.dispatchDialogVisible = true
891
+        this.rowListData = row
892
+        this.dispatchForm.id = row.fWorkorderid
893
+        this.fileList = []
894
+      },
895
+      
896
+      // 关闭处理工单弹框
897
+      closeDispatchDialog() {
898
+        this.dispatchDialogVisible = false
899
+        this.dispatchForm.disposeRemark = ''
900
+        this.fileList = []
901
+        this.fileInfoList = []
902
+        this.$refs.dispatchForm && this.$refs.dispatchForm.resetFields()
903
+      },
904
+      
905
+      // 文件超出限制处理
906
+      handleFileExceed(files, fileList) {
907
+        this.$message.warning(`当前限制选择 20 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
908
+      },
909
+      
910
+      // 文件移除前确认
911
+      handleFileBeforeRemove(file, fileList) {
912
+        return this.$confirm(`确定移除 ${file.name}?`)
913
+      },
914
+      
915
+      // 文件上传成功处理
916
+      handleFileSuccess(response, file, fileList) {
917
+        if (response.status === 200) {
918
+          // 上传成功,将文件信息添加到列表
919
+          this.fileInfoList.push(response.data[0])
920
+          this.$message.success('上传成功')
921
+        } else {
922
+          this.$message.error('上传失败')
923
+        }
924
+      },
925
+      
926
+      // 文件上传失败处理
927
+      handleFileError(err, file, fileList) {
928
+        this.$message.error('上传失败')
929
+      },
930
+      
931
+      // 图片预览
932
+      handlePictureCardPreview(file) {
933
+        this.dialogImageUrl = file.url
934
+        this.dialogImageVisible = true
935
+      },
936
+      
937
+      // 文件移除处理
938
+      handleFileRemove(file, fileList) {
939
+        // 从fileInfoList中移除对应的文件信息
940
+        if (file.response && file.response.status === 200) {
941
+          const filePath = file.response.data.filePath
942
+          const index = this.fileInfoList.findIndex(item => item.filePath === filePath)
943
+          if (index > -1) {
944
+            this.fileInfoList.splice(index, 1)
945
+          }
946
+        }
947
+      },
948
+      
949
+      // 提交处理工单
950
+      submitDispose() {
951
+        this.$refs.dispatchForm.validate(valid => {
952
+          if (valid) {
953
+            // 准备请求参数
954
+            const dialogModelList = this.rowListData
955
+            const params = {
956
+              fWorkorderid: this.dispatchForm.id,
957
+              acceptOrDispose: 3, // 3表示处理工单
958
+              fileList: this.fileInfoList // 上传的文件信息 []
959
+            }
960
+            const dataObject = Object.assign(params, dialogModelList);
961
+            console.log(dataObject)
962
+            
963
+            this.$confirm('确定要处理此工单吗?', '提示', {
964
+              confirmButtonText: '确定',
965
+              cancelButtonText: '取消',
966
+              type: 'warning'
967
+            }).then(() => {
968
+              request({
969
+                url: '/workorderbaseApp/finishOrAfreshWorkOrder',
970
+                method: 'post',
971
+                data: dataObject
972
+              }).then(res => {
973
+                  if (res.status === 200) {
974
+                    this.$message.success('处理成功')
975
+                    this.closeDispatchDialog()
976
+                    // 重新加载列表数据
977
+                    this.getList(this.page)
978
+                  } else {
979
+                    this.$message.error(res.message || '处理失败')
980
+                  }
981
+                })
982
+                .catch(err => {
983
+                  this.$message.error(err || '处理失败')
984
+                })
985
+            })
986
+          } else {
987
+            this.$message.warning('请完善处理信息')
988
+            return false
989
+          }
990
+        })
823 991
       }
824 992
 
825 993
     },

+ 6 - 8
web/src/views/workorder/workorder_ywj.vue

@@ -166,11 +166,9 @@
166 166
               </el-form-item>
167 167
             </el-col>
168 168
           </el-row>
169
-          <el-row :gutter="20">
169
+          <!-- <el-row :gutter="20">
170 170
             <el-col :span="24">
171
-              <!-- 养护单位名称 -->
172 171
               <el-form-item label="养护单位名称" prop="fYhdeptname">
173
-                <!--<el-input v-model="workForm.fYhdeptname" placeholder="养护单位名称"></el-input>-->
174 172
                 <el-select v-model="workForm.fYhdeptname" style="width:280px;" placeholder="请选择养护单位" class="filter-item" @change="selectyhdwnameTrigger" >
175 173
                   <el-option
176 174
                     v-for="item in yhdwList"
@@ -181,7 +179,7 @@
181 179
                 </el-select>
182 180
               </el-form-item>
183 181
             </el-col>
184
-          </el-row>
182
+          </el-row> -->
185 183
           <el-row :gutter="20">
186 184
             <el-col :span="24">
187 185
               <!-- 整改限期 -->
@@ -284,11 +282,11 @@
284 282
                       <el-input v-model="dialogModel.fLevelname"></el-input>
285 283
                     </el-form-item>
286 284
                   </el-col>
287
-                  <el-col :span="12">
285
+                  <!-- <el-col :span="12">
288 286
                     <el-form-item label="养护单位">
289 287
                       <el-input v-model="dialogModel.fYhdeptname"></el-input>
290 288
                     </el-form-item>
291
-                  </el-col>
289
+                  </el-col> -->
292 290
                 </el-row>
293 291
                 <el-row :gutter="10">
294 292
                   <el-col :span="12">
@@ -296,11 +294,11 @@
296 294
                       <el-input v-model="dialogModel.fSgusername"></el-input>
297 295
                     </el-form-item>
298 296
                   </el-col>
299
-                  <el-col :span="12">
297
+                  <!-- <el-col :span="12">
300 298
                     <el-form-item label="公园园长">
301 299
                       <el-input v-model="dialogModel.fYhusername"></el-input>
302 300
                     </el-form-item>
303
-                  </el-col>
301
+                  </el-col> -->
304 302
                 </el-row>
305 303
                 <el-row :gutter="10">
306 304
                   <el-col :span="24">

+ 275 - 74
web/src/views/workorder/workordercreate.vue

@@ -28,8 +28,7 @@
28 28
                     <el-form-item label="紧急程度" prop="fLevelname">
29 29
                       <el-select v-model="sizeForm.fLevelname" placeholder="请选择紧急程度">
30 30
                         <el-option
31
-                          v-for="item in  dicList"
32
-                          @change="selectlevelTrigger"
31
+                          v-for="item in dicList"
33 32
                           :key="item.fDictionaryvalueid"
34 33
                           :label="item.fName"
35 34
                           :value="{value:item.fValuecode,label:item.fName}"
@@ -51,7 +50,7 @@
51 50
                       </el-select>
52 51
                     </el-form-item>
53 52
                   </el-col>
54
-                  <el-col :span="12">
53
+                  <!-- <el-col :span="12">
55 54
                     <el-form-item label="公园园长" prop="director">
56 55
                       <el-select v-model="sizeForm.director" placeholder="请选择公园园长">
57 56
                         <el-option
@@ -62,7 +61,7 @@
62 61
                         ></el-option>
63 62
                       </el-select>
64 63
                     </el-form-item>
65
-                  </el-col>
64
+                  </el-col> -->
66 65
                 </el-row>
67 66
                 <!--
68 67
                 <el-form-item label="养护单位" prop="unit">
@@ -85,12 +84,18 @@
85 84
                      ></el-option>
86 85
                    </el-select>
87 86
                  </el-form-item>-->
88
-                <!--<el-form-item label="反映人姓名">-->
89
-                  <!--<el-input v-model="sizeForm.fCustomername"  placeholder="反映人姓名" ></el-input>-->
90
-                <!--</el-form-item>-->
91
-                <!--<el-form-item label="联系电话">-->
92
-                  <!--<el-input v-model="sizeForm.fPhone"  placeholder="联系电话" ></el-input>-->
93
-                <!--</el-form-item>-->
87
+                 <el-row :gutter="20">
88
+                    <el-col :span="12">
89
+                      <el-form-item label="反映人姓名">
90
+                        <el-input v-model="sizeForm.fCustomername"  placeholder="反映人姓名" ></el-input>
91
+                      </el-form-item>
92
+                    </el-col>
93
+                    <el-col :span="12">
94
+                      <el-form-item label="联系电话">
95
+                        <el-input v-model="sizeForm.fPhone"  placeholder="联系电话" ></el-input>
96
+                      </el-form-item>
97
+                    </el-col>
98
+                 </el-row>
94 99
                 <el-row :gutter="20">
95 100
                   <el-col :span="12">
96 101
                     <el-form-item label="整改期限" prop="fAskfinishtime">
@@ -132,7 +137,59 @@
132 137
                 <el-form-item label="工单内容" prop="content">
133 138
                   <el-input type="textarea" v-model="sizeForm.content" ></el-input>
134 139
                 </el-form-item>
135
-
140
+                
141
+                <el-form-item label="是否抄送">
142
+                  <el-switch v-model="isCc" active-text="是" inactive-text="否"></el-switch>
143
+                </el-form-item>
144
+                
145
+                <!-- 部门选择 - 仅当需要抄送时显示 -->
146
+                <el-form-item v-if="isCc" label="选择部门" prop="selectedDepartment">
147
+                  <el-select v-model="selectedDepartment" @change="onDepartmentChange" placeholder="请选择部门">
148
+                    <el-option
149
+                      v-for="item in departmentList"
150
+                      :key="item.fDeptid"
151
+                      :label="item.fDeptname"
152
+                      :value="item.fDeptid"
153
+                    ></el-option>
154
+                  </el-select>
155
+                </el-form-item>
156
+                
157
+                <!-- 人员选择 - 仅当选择了部门后显示 -->
158
+                <el-form-item v-if="isCc && selectedDepartment" label="选择人员" prop="selectedUser">
159
+                  <el-select v-model="selectedUser" placeholder="请选择人员">
160
+                    <el-option
161
+                      v-for="item in userList"
162
+                      :key="item.fUserid"
163
+                      :label="item.fUsername"
164
+                      :value="{id: item.fUserid, name: item.fUsername}"
165
+                    ></el-option>
166
+                  </el-select>
167
+                </el-form-item>
168
+                
169
+                <!-- 图片上传 -->
170
+                <el-form-item label="图片上传">
171
+                  <el-upload
172
+                    ref="upload"
173
+                    multiple
174
+                    :file-list="fileList"
175
+                    :limit="20"
176
+                    :on-exceed="handleFileExceed"
177
+                    :before-remove="handleFileBeforeRemove"
178
+                    :on-success="handleFileSuccess"
179
+                    :on-error="handleFileError"
180
+                    :headers="headers"
181
+                    :action="uploadActionUrl"
182
+                    list-type="picture"
183
+                    :on-preview="handlePictureCardPreview"
184
+                    :on-remove="handleFileRemove">
185
+                    <el-button size="small" type="primary">点击上传</el-button>
186
+                  </el-upload>
187
+                  <el-dialog :visible.sync="dialogImageVisible">
188
+                    <img width="100%" :src="dialogImageUrl" alt="">
189
+                  </el-dialog>
190
+                </el-form-item>
191
+                             
192
+                         
136 193
                 <!--<el-form-item size="large">-->
137 194
                   <!--<el-button type="primary" @click="onSubmit">提交工单</el-button>-->
138 195
                   <!--<el-button @click="resetForm">继续录入</el-button>-->
@@ -152,7 +209,11 @@
152 209
 </template>
153 210
 <script>
154 211
   import request from '@/utils/request'
212
+  import { getToken } from '@/utils/auth'
213
+
155 214
   import { parseTime, downloadFile } from '@/utils/index'
215
+  import { mapGetters } from 'vuex'
216
+
156 217
   export default {
157 218
       name: 'Workordercreate',
158 219
       data() {
@@ -166,6 +227,21 @@
166 227
               fName: ''
167 228
             }
168 229
           ],
230
+          // 图片上传相关
231
+          fileList: [],
232
+          uploadActionUrl: process.env.VUE_APP_BASE_API+'/file/uploadFile', // 上传文件接口地址
233
+          dialogImageVisible: false,
234
+          dialogImageUrl: '',
235
+          headers:{
236
+            fSource:2,
237
+            token:getToken()
238
+          },
239
+          // 抄送相关
240
+          isCc: false, // 是否抄送
241
+          departmentList: [], // 部门列表
242
+          selectedDepartment: '', // 选中的部门
243
+          userList: [], // 部门人员列表
244
+          selectedUser: '', // 选中的人员
169 245
           sizeForm: {
170 246
             delivery: false,
171 247
             // 类型
@@ -268,7 +344,13 @@
268 344
         }
269 345
       }
270 346
     },
347
+    computed: {
348
+    ...mapGetters([
349
+      'user'
350
+    ])
351
+  },
271 352
     created() {
353
+      this.sizeForm.fCustomername = this.user.fUsername
272 354
       //  获取 工单 类型
273 355
       this.getOrderType()
274 356
       // 获取 养护单位
@@ -277,22 +359,34 @@
277 359
       this.getParkList()
278 360
       this.Dealuser()
279 361
       this.getlevelType()
362
+      // 获取部门列表
363
+      this.getDepartmentList()
280 364
     },
281 365
     methods: {
282
-      selectlevelTrigger(params) {
283
-        const { value, label } = params
284
-        this.size.fLevelid = value
285
-        this.size.fLevelname = label
286
-      },
287 366
       // 重置工单状态
288 367
       resetForm() {
368
+        // 重置表单数据
369
+        this.fileList = []
370
+        // this.sizeForm.type = ''
371
+        this.sizeForm.company = ''
372
+        this.sizeForm.director = ''
373
+        this.sizeForm.unit = ''
374
+        this.sizeForm.user = ''
375
+        this.sizeForm.bigType = ''
376
+        this.sizeForm.fLevelname = ''
289 377
         this.sizeForm.fAskfinishtime = ''
290 378
         this.sizeForm.fCustomername = ''
291 379
         this.sizeForm.fPhone = ''
292 380
         this.sizeForm.fAddress = ''
293 381
         this.sizeForm.content = ''
382
+        // 重置抄送相关数据
383
+        this.isCc = false
384
+        this.selectedDepartment = ''
385
+        this.selectedUser = ''
386
+        this.userList = []
294 387
       },
295
-      //  获取  工单 类型
388
+      
389
+      // 获取工单类型
296 390
       getOrderType(fLayer) {
297 391
         request({
298 392
           url: '/woworkordertype/selectOrderTypeList',
@@ -306,7 +400,6 @@
306 400
                 if (item.fLayer === 1) {
307 401
                   this.sizeForm.orderTypeList.push(item)
308 402
                 } else if (item.fLayer === 2) {
309
-                  console.log(item)
310 403
                   this.sizeForm.orderBigClass.push(item)
311 404
                 }
312 405
               })
@@ -317,13 +410,15 @@
317 410
             this.$message.error(err || '加载失败')
318 411
           })
319 412
       },
413
+      
320 414
       // 工单类型变更处理
321 415
       onTypeChange(data) {
322 416
         // 清空已选择的工单大类
323 417
         this.sizeForm.bigType = ''
324 418
         this.sizeForm.orderfilterBigClass = this.sizeForm.orderBigClass.filter(item => item.fParentid === data.sort)
325 419
       },
326
-      //  获取  养护单位
420
+      
421
+      // 获取养护单位
327 422
       getYanghuUnit() {
328 423
         request({
329 424
           url: '/tbaseyhcompany/selectYhCompanyList',
@@ -337,7 +432,8 @@
337 432
             this.$message.error(err || '加载失败')
338 433
           })
339 434
       },
340
-      // 获取
435
+      
436
+      // 获取紧急程度类型
341 437
       getlevelType() {
342 438
         request({
343 439
           url: '/sysdictionaryvalue/selectFlagInfoList?flag=GDJJCD',
@@ -351,7 +447,8 @@
351 447
             this.$message.error(err || '加载失败')
352 448
           })
353 449
       },
354
-      //  获取 公园
450
+      
451
+      // 获取公园列表
355 452
       getParkList() {
356 453
         request({
357 454
           url: '/tbaseparkinfo/selectParkInfoList',
@@ -366,13 +463,8 @@
366 463
             this.$message.error(err || '加载失败')
367 464
           })
368 465
       },
369
-      //  工单大类
370
-      getGDbigclass() {
371
-        // 不再需要单独获取工单大类,由工单类型联动获取
372
-        // 这里保留方法但不执行实际请求
373
-      },
374
-
375
-      //  获取处理人
466
+      
467
+      // 获取处理人
376 468
       Dealuser() {
377 469
         request({
378 470
           url: '/sysuseraccount/selectDealuserList?deptid=7',
@@ -386,7 +478,8 @@
386 478
             this.$message.error(err || '加载失败')
387 479
           })
388 480
       },
389
-      // 获取公园 园长
481
+      
482
+      // 获取公园园长
390 483
       getParkHead(val) {
391 484
         if (this.sizeForm.parkHeader.length !== 0) {
392 485
           // 当再次 选择 公园 清空上一次的园长列表
@@ -398,59 +491,166 @@
398 491
         //    获取 当个公园   的园长数据
399 492
         console.log('this.sizeForm.parkHeader', this.sizeForm.parkHeader)
400 493
       },
401
-      //  新增功能 + 修改功能
494
+
495
+      // 图片上传相关方法
496
+      handleFileExceed(files, fileList) {
497
+        this.$message.warning(`当前限制上传20个文件,本次选择了${files.length}个文件,已自动过滤多余文件`);
498
+      },
499
+      
500
+      handleFileBeforeRemove(file, fileList) {
501
+        return this.$confirm(`确定移除 ${file.name}?`);
502
+      },
503
+      
504
+      handleFileSuccess(response, file, fileList) {
505
+        // 根据接口要求,fileInfoList取data.data[0]
506
+        this.$message.success('上传成功');
507
+        this.fileList = fileList;
508
+      },
509
+      
510
+      handleFileError(err, file, fileList) {
511
+        this.$message.error('上传失败,请重试');
512
+        console.error('上传失败', err);
513
+      },
514
+      
515
+      handlePictureCardPreview(file) {
516
+        this.dialogImageUrl = file.url;
517
+        this.dialogImageVisible = true;
518
+      },
519
+      handleFileRemove(file, fileList) {
520
+        this.fileList = fileList;
521
+      },
522
+      
523
+      // 获取部门列表
524
+      getDepartmentList() {
525
+        request({
526
+          url: '/sysdepartment/selectDepartmentByPageListpara?stateid=0',
527
+          method: 'post',
528
+          data: {
529
+            current: 1,
530
+            fDeptname: "",
531
+            size: 1000
532
+          }
533
+        })
534
+          .then(res => {
535
+            if (res.data && res.data.data) {
536
+              this.departmentList = res.data.data;
537
+            }
538
+          })
539
+          .catch(err => {
540
+            this.$message.error(err || '加载部门列表失败')
541
+          })
542
+      },
543
+      
544
+      // 部门变更处理
545
+      onDepartmentChange(deptId) {
546
+        this.selectedUser = ''; // 清空已选人员
547
+        // 当部门变更时,获取该部门下的人员列表
548
+        if (deptId) {
549
+          this.getUserListByDepartment(deptId);
550
+        } else {
551
+          this.userList = [];
552
+        }
553
+      },
554
+      
555
+      // 根据部门获取人员列表
556
+      getUserListByDepartment(deptId) {
557
+        request({
558
+          url: '/sysuseraccount/selectUserAccountAppByPageList',
559
+          method: 'post',
560
+          data: {
561
+            current: 1,
562
+            fDeptid: deptId,
563
+            size: 9999
564
+          }
565
+        })
566
+          .then(res => {
567
+            if (res.data && res.data.data) {
568
+              this.userList = res.data.data;
569
+            } else {
570
+              this.userList = [];
571
+              this.$message.info('该部门下暂无人员');
572
+            }
573
+          })
574
+          .catch(err => {
575
+            this.$message.error(err || '加载人员列表失败');
576
+            this.userList = [];
577
+          })
578
+      },
579
+      
580
+      // 表单提交方法 - 新增功能
402 581
       onSubmit() {
403 582
         if (this.key === 'add') {
404 583
           this.$refs.ruleForm.validate(async valid => {
405 584
             if (valid) {
406
-              // console.log('提交')
407
-              // 发送 请求
585
+              // 验证抄送信息
586
+              if (this.isCc && !this.selectedUser) {
587
+                this.$message.warning('请选择要抄送的人员');
588
+                return;
589
+              }
590
+              
591
+              // 处理上传的文件,提取fileInfoList
592
+              const fileInfoList = this.fileList.filter(file => file.response && file.response.data && file.response.data[0]).map(file => file.response.data[0]);
593
+              
594
+              // 构建提交数据
595
+              const submitData = {
596
+                workOrderbase: {
597
+                  fWorkordertypeid: this.sizeForm.type.value,
598
+                  fWorkordertype: this.sizeForm.type.label,
599
+                  fStateid: 1,
600
+                  fState: '预警',
601
+                  fFromtype: '巡视巡查',
602
+                  fCustomername: this.sizeForm.fCustomername,
603
+                  fPhone: this.sizeForm.fPhone,
604
+                  fAddress: this.sizeForm.fAddress,
605
+                  // fRegionname: this.sizeForm.parkHeader[0].fStreet,
606
+                  fContent: this.sizeForm.content,
607
+                  fCategoryid1: this.sizeForm.bigType.value,
608
+                  fCategoryname1: this.sizeForm.bigType.label,
609
+                  // fYhdeptid: this.sizeForm.parkHeader[0].fYhcompanyid,
610
+                  // fYhdeptname: this.sizeForm.parkHeader[0].fYhcompanyname,
611
+                  fAskfinishtime: null,
612
+                  fCreateid: 84,
613
+                  fCreatename: '自动预警',
614
+                  fLevelname: this.sizeForm.fLevelname.label,
615
+                  fLevelid: this.sizeForm.fLevelname.value,
616
+                  // fYhuserid: this.sizeForm.parkHeader[0].fParkid,
617
+                  // fYhusername: this.sizeForm.parkHeader[0].fHeader,
618
+                  fSguserid: this.sizeForm.parkHeader[0].fParkid,
619
+                  fSgusername: this.sizeForm.parkHeader[0].fParkname,
620
+                  syncstatus: 1,
621
+                  distributedept: '生态环境局',
622
+                  distributedeptcode: 'sthjj',
623
+                  handlejgdept: '生态环境局',
624
+                  riskclassify: '6',
625
+                  riskclassifyname: this.sizeForm.bigType.label,
626
+                  disposalmethod: '5',
627
+                  // checkdept: this.sizeForm.parkHeader[0].fYhcompanyname,
628
+                  // checkusername: this.sizeForm.parkHeader[0].fParkname,
629
+                  fDeleteflag: 0,
630
+                  deptType: 1,
631
+                  fWorkorderid: null
632
+                },
633
+                fileInfoList: fileInfoList
634
+              };
635
+              
636
+              // 添加抄送信息
637
+              if (this.isCc && this.selectedUser) {
638
+                submitData.workOrderbase.cc = this.selectedUser.id; // 人员ID
639
+                submitData.workOrderbase.ccName = this.selectedUser.name; // 人员姓名
640
+              }
641
+              
642
+              // 发送请求
408 643
               const res = await request({
409 644
                 url: '/workorderbaseApp/saveAppWorkorderbase',
410 645
                 method: 'post',
411
-                data: {
412
-                  workOrderbase: {
413
-                    fWorkordertypeid: this.sizeForm.type.value,
414
-                    fWorkordertype: this.sizeForm.type.label,
415
-                    fStateid: 1,
416
-                    fState: '预警',
417
-                    fFromtype: '巡视巡查',
418
-                    fCustomername: this.sizeForm.fCustomername,
419
-                    fPhone: this.sizeForm.fPhone,
420
-                    fAddress: this.sizeForm.fAddress,
421
-                    fRegionname: this.sizeForm.parkHeader[0].fStreet,
422
-                    fContent: this.sizeForm.content,
423
-                    fCategoryid1: this.sizeForm.bigType.value,
424
-                    fCategoryname1: this.sizeForm.bigType.label,
425
-                    fYhdeptid: this.sizeForm.parkHeader[0].fYhcompanyid,
426
-                    fYhdeptname: this.sizeForm.parkHeader[0].fYhcompanyname,
427
-                    fAskfinishtime: null,
428
-                    fCreateid: 84,
429
-                    fCreatename: '自动预警',
430
-                    fLevelname: this.sizeForm.fLevelname.label,
431
-                    fLevelid: this.sizeForm.fLevelname.value,
432
-                    fYhuserid: this.sizeForm.parkHeader[0].fParkid,
433
-                    fYhusername: this.sizeForm.parkHeader[0].fHeader,
434
-                    fSguserid: this.sizeForm.parkHeader[0].fParkid,
435
-                    fSgusername: this.sizeForm.parkHeader[0].fParkname,
436
-                    syncstatus: 1,
437
-                    distributedept: '生态环境局',
438
-                    distributedeptcode: 'sthjj',
439
-                    handlejgdept: '生态环境局',
440
-                    riskclassify: '6',
441
-                    riskclassifyname: this.sizeForm.bigType.label,
442
-                    disposalmethod: '5',
443
-                    checkdept: this.sizeForm.parkHeader[0].fYhcompanyname,
444
-                    checkusername: this.sizeForm.parkHeader[0].fParkname,
445
-                    fDeleteflag: 0,
446
-                    deptType: 1,
447
-                    fWorkorderid: null
448
-                  }
449
-                }
646
+                data: submitData
450 647
               })
451
-               console.log('res', res)
452
-              if (res.status === 200) {
453
-                this.$message('新增成功!')
648
+              if (res && res.status === 200 && res.data) {
649
+                this.$message.success('新增成功!');
650
+                // 提交成功后可以重置表单
651
+                this.resetForm();
652
+              } else {
653
+                this.$message.error('提交失败,请重试');
454 654
               }
455 655
             }
456 656
           })
@@ -484,3 +684,4 @@
484 684
   }
485 685
 </style>
486 686
 
687
+

Datei-Diff unterdrückt, da er zu groß ist
+ 448 - 431
web/src/views/zgzs_manage/xsxclist.vue


+ 2 - 1
wxproject/app.json

@@ -34,7 +34,8 @@
34 34
         "pages/examinedetail/examinedetail",
35 35
         "pages/dailyWeeklyReport/dailyWeeklyReport",
36 36
         "pages/createReport/createReport",
37
-        "pages/onDuty/onDuty"
37
+        "pages/onDuty/onDuty",
38
+        "pages/recordDetail/recordDetail"
38 39
       ]
39 40
     },
40 41
     {

+ 3 - 3
wxproject/packageA/pages/onDuty/onDuty.wxml

@@ -3,9 +3,9 @@
3 3
 	<view class="calendar">
4 4
 		<view class='bcfff'>
5 5
 			<view class="map_box">
6
-        <view class="jilu"  catchtap="nav" data-url="/packageA/pages/recordDetail/recordDetail">
7
-          打卡记录
8
-        </view>
6
+			<view class="jilu"  catchtap="nav" data-url="/packageA/pages/recordDetail/recordDetail">
7
+			打卡记录
8
+			</view>
9 9
 				<map id="map" longitude="{{posObj.longitude}}" latitude="{{posObj.latitude}}" markers='{{markers}}' scale="17" show-location class="mapSize" polyline="{{polyline}}" circles="{{circles}}" ></map>
10 10
 			</view>
11 11
 			<view class="timeactive">

+ 243 - 0
wxproject/packageA/pages/recordDetail/recordDetail.js

@@ -0,0 +1,243 @@
1
+// packageA/pages/recordDetail/recordDetail.js
2
+var app = getApp();
3
+Page({
4
+  /**
5
+   * 页面的初始数据
6
+   */
7
+  data: {
8
+    inputValue1: '',
9
+    inputValue2: '',
10
+    startTime: '请选择时间', //默认起始时间
11
+    endTime: '请选择时间', //默认结束时间
12
+    startStamp: null, // 开始时间戳
13
+    endStamp: null, // 结束时间戳
14
+    startOrenDFlag: true,
15
+    // 上拉加载
16
+    total: '',
17
+    dataUrl: '',
18
+    listData: [],
19
+    isPage: false,
20
+    pageSize: 15,
21
+    pageNum: 1,
22
+    loading: false,
23
+    noMore: false,
24
+    loadingFailed: false,
25
+    scrollY: '',
26
+    fUserid: '', // 用户ID
27
+    scaling: false, // 控制筛选框
28
+    date3: null, //筛选时间
29
+    time3: null, // 开始时间
30
+    date4: null, //结束时间筛选
31
+    time4: null, //结束时间筛选
32
+    directorName: null, // 园长名称
33
+    objectName: null, // 公园名称
34
+    showBtnFlag: false, // 权限判断
35
+  },
36
+
37
+  //页面跳转
38
+  nav(e) {
39
+    ////console.log("路径", e.currentTarget.dataset.url)
40
+    var url = e.currentTarget.dataset.url;
41
+    wx.navigateTo({
42
+      url: url,
43
+    });
44
+  },
45
+
46
+  //到达底部
47
+  scrollToLower(e) {
48
+    if (!this.data.loading && !this.data.noMore) {
49
+      this.setData({
50
+        loading: true,
51
+        pageNum: this.data.pageNum + 1,
52
+      });
53
+      this.getData(true);
54
+    }
55
+  },
56
+
57
+  //请求数据
58
+  getData(isPage) {
59
+    var that = this;
60
+    var url = app.globalData.httpsUrlServer +'/tbaseemployeeworkrecords/selectEmployeeworkrecordsByPageList';
61
+    var data = {
62
+      size: 15,
63
+      current: that.data.pageNum,
64
+      startTime: that.data.time3,
65
+      endTime: that.data.time4,
66
+      fExpand2: that.data.objectName,
67
+      fRealname: that.data.directorName,
68
+      fExpandint1: that.data.fUserid,
69
+    };
70
+    if (that.data.noMore) {
71
+      that.setData({
72
+        noMore: false,
73
+      });
74
+    }
75
+    //请求
76
+    wx.showLoading({
77
+      title: '加载中',
78
+      mark: 'true',
79
+    });
80
+    app.postReq(url, data, (res) => {
81
+      if (res.message == '请求成功') {
82
+        wx.hideLoading();
83
+        if (isPage) {
84
+          //下一页的数据拼接在原有数据后面
85
+          ////console.log(res.data.data)
86
+          that.setData({
87
+            listData: that.data.listData.concat(res.data.data),
88
+            total: res.data.total,
89
+            loading: false,
90
+          });
91
+        } else {
92
+          //第一页数据直接赋值
93
+
94
+          that.setData({
95
+            listData: res.data.data,
96
+            total: res.data.total,
97
+          });
98
+        }
99
+        if (that.data.total == that.data.listData.length) {
100
+          that.setData({
101
+            noMore: true,
102
+          });
103
+        }
104
+      } else {
105
+        that.setData({
106
+          loading: false,
107
+        });
108
+      }
109
+      wx.hideLoading();
110
+    });
111
+  },
112
+
113
+  // 选择筛选条件
114
+  showScaling() {
115
+    ////console.log("ss")
116
+    this.setData({
117
+      scaling: true,
118
+    });
119
+  },
120
+  // 关闭筛选
121
+  close() {
122
+    this.setData({
123
+      scaling: false,
124
+    });
125
+  },
126
+  //  重置
127
+  qxScaling() {
128
+    this.setData({
129
+      pageNum: 1,
130
+      listData: [],
131
+      date3: null, //筛选时间
132
+      time3: null, // 开始时间
133
+      date4: null, //结束时间筛选
134
+      time4: null, //结束时间筛选
135
+      directorName: null, // 园长名称
136
+      objectName: null, // 公园名称
137
+      showBtnFlag: false, // 权限判断
138
+    });
139
+  },
140
+  // 确定
141
+  qdScaling() {
142
+    var that = this;
143
+    that.setData({
144
+      scaling: false,
145
+      pageNum: 1,
146
+      scrollY: 0,
147
+      listData: [],
148
+    });
149
+    this.getData(true);
150
+  },
151
+
152
+  // 园长名称
153
+  parkname2(e) {
154
+    this.setData({
155
+      directorName: e.detail.value,
156
+    });
157
+  },
158
+  // 计划公园
159
+  parkname3(e) {
160
+    this.setData({
161
+      objectName: e.detail.value,
162
+    });
163
+  },
164
+  // 筛选日期(开始)
165
+  bindDateChange3(e) {
166
+    let val = e.detail.value;
167
+    let times = new Date(val + ' 00:00:00').getTime();
168
+    if (this.data.time4) {
169
+      if (times >= this.data.time4) {
170
+        return app.toast('不能大于结束时间');
171
+      }
172
+    }
173
+    this.setData({
174
+      date3: val,
175
+      time3: times,
176
+    });
177
+  },
178
+  // 筛选日期(结束)
179
+  bindDateChange4(e) {
180
+    let val = e.detail.value;
181
+    let times = new Date(val + ' 23:59:59').getTime();
182
+    if (this.data.time3) {
183
+      if (times <= this.data.time3) {
184
+        return app.toast('不能小于开始时间');
185
+      }
186
+    }
187
+    this.setData({
188
+      date4: val,
189
+      time4: times,
190
+    });
191
+  },
192
+
193
+  /**
194
+   * 生命周期函数--监听页面加载
195
+   */
196
+  onLoad: function (options) {
197
+    if (wx.getStorageSync('position')) {
198
+      var flag = '';
199
+      if (wx.getStorageSync('position') == '中心') {
200
+        flag = false;
201
+      } else {
202
+        flag = true;
203
+      }
204
+      this.setData({
205
+        showBtnFlag: flag,
206
+      });
207
+    }
208
+    // 获取请求地址
209
+    this.setData({
210
+      dataUrl: app.globalData.httpsUrlServer,
211
+      fUserid: wx.getStorageSync('fUserid'),
212
+    });
213
+    this.getData(true);
214
+  },
215
+  /**
216
+   * 生命周期函数--监听页面初次渲染完成
217
+   */
218
+  onReady: function () {},
219
+  /**
220
+   * 生命周期函数--监听页面显示
221
+   */
222
+  onShow: function () {},
223
+  /**
224
+   * 生命周期函数--监听页面隐藏
225
+   */
226
+  onHide: function () {},
227
+  /**
228
+   * 生命周期函数--监听页面卸载
229
+   */
230
+  onUnload: function () {},
231
+  /**
232
+   * 页面相关事件处理函数--监听用户下拉动作
233
+   */
234
+  onPullDownRefresh: function () {},
235
+  /**
236
+   * 页面上拉触底事件的处理函数
237
+   */
238
+  onReachBottom: function () {},
239
+  /**
240
+   * 用户点击右上角分享
241
+   */
242
+  onShareAppMessage: function () {},
243
+});

+ 4 - 0
wxproject/packageA/pages/recordDetail/recordDetail.json

@@ -0,0 +1,4 @@
1
+{
2
+  "usingComponents": {},
3
+  "navigationBarTitleText": "签到记录"
4
+}

+ 89 - 0
wxproject/packageA/pages/recordDetail/recordDetail.wxml

@@ -0,0 +1,89 @@
1
+<!--packageA/pages/recordDetail/recordDetail.wxml-->
2
+<view class="record">
3
+	<view class="times">
4
+		<!-- 模态框 -->
5
+		<view bind:tap="showScaling" class="scaling">筛选</view>
6
+		<!-- <view class="title">时间筛选:</view>
7
+		<view class="time_box">
8
+			<view class="start">
9
+				<picker mode="date" value="{{startTime}}" bindchange="bindDateChange">
10
+					<view class="picker">
11
+						{{startTime}}
12
+					</view>
13
+				</picker>
14
+			</view>
15
+			<view style="margin: 0 15rpx">---</view>
16
+			<view class="end">
17
+				<picker mode="date" value="{{endTime}}" bindchange="bindDateChange2">
18
+					<view class="picker">
19
+						{{endTime}}
20
+					</view>
21
+				</picker>
22
+			</view>
23
+			<view class="all" bindtap="getAll">全部</view>
24
+		</view> -->
25
+	</view>
26
+	<view class="record_box">
27
+		<scroll-view scroll-y scroll-top="{{ scrollY }}" lower-threshold="50" bindscrolltolower="scrollToLower" style="height: 87vh;">
28
+			<view class="items" wx:for="{{ listData }}" wx:key="index">
29
+				<view class="time-box">
30
+					<view class="name">打卡人:{{ item.fRealname }}</view>
31
+					<view class="onTime" wx:if="{{item.fWorktype == 1 }}">
32
+						上班打卡
33
+					</view>
34
+					<view class="outTime" wx:elif="{{item.fWorktype == 2 }}">
35
+						下班打卡
36
+					</view>
37
+				</view>
38
+				<view class="place">所属公园:{{ item.fExpand2 ? item.fExpand2: ""  }}</view>
39
+				<view class="place">打卡地点:{{ item.fExpand1 ? item.fExpand1: "" }}</view>
40
+				<view class="nows">打卡时间:{{ item.fWorktime }}</view>
41
+			</view>
42
+			<view style="text-align: center;margin: 10px;">
43
+				<view wx:if="{{loading}}">加载中...</view>
44
+				<view wx:if="{{noMore}}">没有更多了</view>
45
+				<view wx:if="{{loadingFailed}}">数据加载失败,请重试</view>
46
+			</view>
47
+		</scroll-view>
48
+	</view>
49
+</view>
50
+
51
+
52
+<!-- 筛选框 -->
53
+<view class="dailogBox" wx:if='{{ scaling }}'>
54
+	<view class="scalingBox">
55
+		<view class="closeImg" catchtap="close">
56
+			<image src="./../../../images/weatherImg/close.png"></image>
57
+		</view>
58
+
59
+		<view class="scaling_itme" wx:if="{{ !showBtnFlag  }}">
60
+			<view class="scaling_itme_left">园长名称:</view>
61
+			<view class="scaling_itme_right">
62
+				<input bindinput="parkname2" value="{{ directorName }}" type="text" placeholder="请输入园长名称" maxlength="20"></input>
63
+			</view>
64
+		</view>
65
+		<view class="scaling_itme" wx:if="{{ !showBtnFlag }}">
66
+			<view class="scaling_itme_left">公园名称:</view>
67
+			<view class="scaling_itme_right">
68
+				<input bindinput="parkname3" value="{{ objectName  }}" type="text" placeholder="请输入公园名称" maxlength="20"></input>
69
+			</view>
70
+		</view>
71
+
72
+		<view class="scaling_itme">
73
+			<view class="scaling_itme_left">开始时间:</view>
74
+			<picker class="scaling_itme_right" mode="date" value="{{date3}}" bindchange="bindDateChange3">
75
+				<view>{{ date3 ? date3: "请选择开始时间" }}</view>
76
+			</picker>
77
+		</view>
78
+		<view class="scaling_itme">
79
+			<view class="scaling_itme_left">结束时间:</view>
80
+			<picker class="scaling_itme_right" mode="date" value="{{date4}}" bindchange="bindDateChange4">
81
+				<view>{{ date4 ? date4: "请选择结束时间" }}</view>
82
+			</picker>
83
+		</view>
84
+		<view class="scaling_fooder">
85
+			<view class="scaling_fooder_left" bind:tap="qxScaling">重置</view>
86
+			<view class="scaling_fooder_right" bind:tap="qdScaling">确定</view>
87
+		</view>
88
+	</view>
89
+</view>

+ 163 - 0
wxproject/packageA/pages/recordDetail/recordDetail.wxss

@@ -0,0 +1,163 @@
1
+/* packageA/pages/recordDetail/recordDetail.wxss */
2
+page {
3
+  color: #000000;
4
+  font-size: 28rpx;
5
+  padding: 20rpx;
6
+  background-color: #f4f4f4f4;
7
+}
8
+view {
9
+  width: auto;
10
+  box-sizing: border-box;
11
+  display: block;
12
+}
13
+.times {
14
+  height: 8vh;
15
+  display: flex;
16
+  align-items: center;
17
+  padding:0 20rpx;
18
+  position: fixed;
19
+  top: 0;
20
+  left: 0;
21
+  right: 0;
22
+  background-color: #fff;
23
+}
24
+.times .title {
25
+  width: 21%;
26
+}
27
+.time_box {
28
+  width: 79%;
29
+  display: flex;
30
+  align-items: center;
31
+}
32
+.time_box view {
33
+  text-align: center;
34
+}
35
+.start {
36
+  padding: 5rpx 10rpx;
37
+  border: 1rpx solid #c4c4c4;
38
+}
39
+.end {
40
+  padding: 5rpx 10rpx;
41
+  border: 1rpx solid #c4c4c4;
42
+}
43
+.record_box {
44
+  margin-top: 9vh;
45
+  /* height: 87vh; */
46
+  border-radius: 15rpx;
47
+  /* box-shadow: 0 0 10px #C0C0C0; */
48
+}
49
+.time-box {
50
+  display: flex;
51
+  justify-content: space-between;
52
+}
53
+.time-box .name {
54
+  padding-bottom: 10rpx;
55
+}
56
+.onTime {
57
+  font-weight: 600;
58
+  color: #4e72b8;
59
+} 
60
+.outTime {
61
+  font-weight: 600;
62
+  color: #d71345;
63
+}
64
+.items {
65
+  padding: 20rpx;
66
+  box-shadow: 0 0 10rpx #CCCCCC;
67
+  border-radius: 15rpx;
68
+  margin-bottom: 20rpx;
69
+  background-color: #fff;
70
+}
71
+.nows {
72
+  margin-bottom: 10rpx;
73
+}
74
+.place {
75
+  width: 80%;
76
+  overflow: hidden;
77
+  text-overflow:ellipsis;
78
+  white-space: nowrap;
79
+}
80
+.all {
81
+  margin-left: 30rpx;
82
+} 
83
+
84
+
85
+/* 展开 筛选框 */
86
+.scaling {
87
+  /* width: 85rpx; */
88
+  /* height: 60rpx; */
89
+  background-color: rgba(123, 104, 238, 0.65);
90
+  /* position: fixed;
91
+  top: 80rpx;
92
+  left: 0rpx; */
93
+  border-radius: 0 20rpx 20rpx 0;
94
+  color: #fff;
95
+  display: flex;
96
+  align-items: center;
97
+  padding: 5rpx 20rpx;
98
+}
99
+.scalingBox {
100
+  width: 100%;
101
+  background-color: #fff;
102
+  border-radius: 0 0 30rpx 30rpx;
103
+}
104
+.scaling_fooder {
105
+  width: 100%;
106
+  height: 80rpx;
107
+  display: flex;
108
+}
109
+.scaling_fooder_left {
110
+  flex: 1;
111
+  display: flex;
112
+  justify-content: center;
113
+  align-items: center;
114
+  color: #333;
115
+  background-color: #c4c4c4;
116
+  border-radius: 0 0 0 10rpx;
117
+}
118
+
119
+.scaling_fooder_right {
120
+  flex: 1;
121
+  display: flex;
122
+  justify-content: center;
123
+  color: #333;
124
+  align-items: center;
125
+  background-color: #0099FF;
126
+  border-radius: 0 0 10rpx 0;
127
+  color: #fff;
128
+}
129
+.scaling_itme {
130
+  color: #333;
131
+  height: 100rpx;
132
+  display: flex;
133
+  align-items: center;
134
+  padding: 0 20rpx;
135
+}
136
+.scaling_itme_left {
137
+  flex: 2;
138
+  display: flex;
139
+}
140
+.scaling_itme_right {
141
+  flex: 3;
142
+  display: flex;
143
+}
144
+.closeImg {
145
+  width: 50rpx;
146
+  height: 50rpx;
147
+  position: absolute;
148
+  right: 10rpx;
149
+  top: 10rpx;
150
+}
151
+.closeImg>image {
152
+  width: 50rpx;
153
+  height: 50rpx;
154
+}
155
+.dailogBox {
156
+  width: 100%;
157
+  height: 100vh;
158
+  background: rgba(0, 0, 0, 0.5);
159
+  z-index: 99;
160
+  position: fixed;
161
+  left: 0;
162
+  top: 0;
163
+}

+ 1 - 1
wxproject/packagePersonnel/pages/personAdd/personAdd.js

@@ -1,6 +1,6 @@
1 1
 // packagePersonnel/pages/personAdd/personAdd.js
2 2
 const app = getApp()
3
-import { chineseToPinYin } from "../../../utils/china"
3
+import { chineseToPinYin } from "../../utils/china"
4 4
 Page({
5 5
   /**
6 6
    * 页面的初始数据

+ 2 - 2
wxproject/packagePersonnel/pages/personAddCenter/personAddCenter.js

@@ -1,7 +1,7 @@
1 1
 // packagePersonnel/pages/personAdd/personAdd.js
2 2
 const app = getApp()
3
-import { chineseToPinYin } from "../../../utils/china"
4
-import CryptoJS from "../../../utils/CryptoJs"
3
+import { chineseToPinYin } from "../../utils/china"
4
+import CryptoJS from "../../utils/CryptoJs"
5 5
 // ////console.log(CryptoJS)
6 6
 Page({
7 7
   /**

+ 1 - 1
wxproject/packagePersonnel/pages/personCenterInfo/personCenterInfo.js

@@ -1,5 +1,5 @@
1 1
 const app = getApp()
2
-import { chineseToPinYin } from "../../../utils/china"
2
+import { chineseToPinYin } from "../../utils/china"
3 3
 Page({
4 4
   /**
5 5
    * 页面的初始数据

+ 1 - 1
wxproject/packagePersonnel/pages/personInfo/personInfo.js

@@ -1,5 +1,5 @@
1 1
 const app = getApp()
2
-import { chineseToPinYin } from "../../../utils/china"
2
+import { chineseToPinYin } from "../../utils/china"
3 3
 Page({
4 4
   /**
5 5
    * 页面的初始数据

+ 28 - 0
wxproject/packagePersonnel/utils/CryptoJs.js

@@ -0,0 +1,28 @@
1
+var CryptoJS = require("./abc.js").CryptoJS
2
+
3
+function a10010(word, para, value) {
4
+  var keyStr = para + "!@#" + value
5
+  var key = CryptoJS.enc.Utf8.parse(keyStr)
6
+  var srcs = CryptoJS.enc.Utf8.parse(word)
7
+  var encrypted = CryptoJS.AES.encrypt(srcs, key, {
8
+    mode: CryptoJS.mode.ECB,
9
+    padding: CryptoJS.pad.Pkcs7,
10
+  })
11
+  return encrypted.toString()
12
+}
13
+function b10086(word, para, value) {
14
+  if (!word) {
15
+    return ""
16
+  }
17
+  var keyStr = para + "!@#" + value
18
+  var key = CryptoJS.enc.Utf8.parse(keyStr)
19
+
20
+  var decrypt = CryptoJS.AES.decrypt(word, key, {
21
+    mode: CryptoJS.mode.ECB,
22
+    padding: CryptoJS.pad.Pkcs7,
23
+  })
24
+  return CryptoJS.enc.Utf8.stringify(decrypt).toString()
25
+}
26
+//暴露接口
27
+module.exports.a10010 = a10010
28
+module.exports.b10086 = b10086

Datei-Diff unterdrückt, da er zu groß ist
+ 505 - 0
wxproject/packagePersonnel/utils/abc.js


Datei-Diff unterdrückt, da er zu groß ist
+ 680 - 0
wxproject/packagePersonnel/utils/china.js


+ 2 - 2
wxproject/pages/work_order_list/work_order_list.wxml

@@ -14,7 +14,7 @@
14 14
 								{{ jiaobiao.znfxCount > 99 ? 99 : jiaobiao.znfxCount }}
15 15
 						</view>
16 16
 				</view>
17
-				<view class="{{currentTab=='2'? 'checked' : ''}}" id="2" data-id="2" bindtap="tab">
17
+				<!-- <view class="{{currentTab=='2'? 'checked' : ''}}" id="2" data-id="2" bindtap="tab">
18 18
 						信访投诉
19 19
 						<text></text>
20 20
 						<view class="jiaobiao" wx:if="{{jiaobiao.xftsCount>0}}">
@@ -27,7 +27,7 @@
27 27
 						<view class="jiaobiao" wx:if="{{jiaobiao.zxjcCount>0}}">
28 28
 								{{ jiaobiao.zxjcCount > 99 ? 99 :  jiaobiao.zxjcCount }}
29 29
 						</view>
30
-				</view>
30
+				</view> -->
31 31
 				<!-- <view class="{{currentTab=='4'? 'checked' : ''}}" id="4" data-id="4" bindtap="tab">本单位检查
32 32
 		  <text></text>
33 33
 		</view> -->

+ 197 - 21
wxproject/pages/workprocessing/workprocessing.js

@@ -8,6 +8,16 @@ Page({
8 8
   data: {
9 9
     // 防抖时间
10 10
     timer: null,
11
+    // 抄送相关
12
+    isCc: false,
13
+    departmentList: [],
14
+    departmentNames: [],
15
+    selectedDepartmentId: '',
16
+    selectedDepartmentIndex: '',
17
+    userList: [],
18
+    userNames: [],
19
+    selectedUserId: '',
20
+    selectedUserIndex: '',
11 21
     // 工单类型
12 22
     handleClassIndex1: 0,
13 23
     handleClassIndex: [], //所有id
@@ -516,6 +526,155 @@ Page({
516 526
       },
517 527
     })
518 528
   },
529
+  // 抄送开关切换
530
+  switchCcChange(e) {
531
+    var that = this;
532
+    var checked = e.detail.value;
533
+    
534
+    that.setData({
535
+      isCc: checked,
536
+      selectedDepartmentId: '',
537
+      selectedDepartmentIndex: '',
538
+      userList: [],
539
+      userNames: [],
540
+      selectedUserId: '',
541
+      selectedUserIndex: ''
542
+    });
543
+    
544
+    // 如果开启抄送,获取部门列表
545
+    if (checked) {
546
+      that.getDepartmentList();
547
+    }
548
+  },
549
+  
550
+  // 获取部门列表
551
+  getDepartmentList() {
552
+    var that = this;
553
+    var token = wx.getStorageSync('token');
554
+    
555
+    wx.showLoading({
556
+      title: '加载部门中...',
557
+      mask: true
558
+    });
559
+    
560
+    wx.request({
561
+      url: app.globalData.httpsUrlServer + '/sysdepartment/selectDepartmentByPageListpara?stateid=2',
562
+      method: 'post',
563
+      data: {data:{
564
+        current: 1,
565
+        fDeptname: "",
566
+        size: 1000
567
+      }},
568
+      dataType: 'json',
569
+      header: {
570
+        'Content-Type': 'application/json;charset=UTF-8',
571
+        token: token,
572
+        fSource: 1,
573
+      },
574
+      success: function (res) {
575
+        wx.hideLoading();
576
+        if (res.statusCode == 200 && res.data.status == 200) {
577
+          console.log('部门列表:', res.data.data.data);
578
+          var departments = res.data.data.data || [];
579
+          that.setData({
580
+            departmentList: departments,
581
+            departmentNames: departments.map(item => item.fDeptname),
582
+            selectedDepartmentId: '',
583
+            selectedDepartmentIndex: ''
584
+          });
585
+        }
586
+      },
587
+      fail: function (err) {
588
+        wx.hideLoading();
589
+        console.error('获取部门列表失败:', err);
590
+        wx.showToast({
591
+          title: '获取部门失败',
592
+          icon: 'none'
593
+        });
594
+      }
595
+    });
596
+  },
597
+  
598
+  // 选择部门
599
+  bindDepartmentChange(e) {
600
+    var that = this;
601
+    var index = e.detail.value;
602
+    console.log('选择的部门索引:', index);
603
+    var departmentId = that.data.departmentList[index].fDeptid;
604
+    
605
+    that.setData({
606
+      selectedDepartmentIndex: index,
607
+      selectedDepartmentId: departmentId,
608
+      userList: [],
609
+      userNames: [],
610
+      selectedUserId: '',
611
+      selectedUserIndex: ''
612
+    });
613
+    
614
+    // 获取该部门的人员列表
615
+    that.getUserListByDepartment(departmentId);
616
+  },
617
+  
618
+  // 根据部门ID获取人员列表
619
+  getUserListByDepartment(departmentId) {
620
+    var that = this;
621
+    var token = wx.getStorageSync('token');
622
+    
623
+    wx.showLoading({
624
+      title: '加载人员中...',
625
+      mask: true
626
+    });
627
+    
628
+    wx.request({
629
+      url: app.globalData.httpsUrlServer + '/sysuseraccount/selectUserAccountAppByPageList',
630
+      method: 'post',
631
+      data: {data:{
632
+        current: 1,
633
+        size: 9999,
634
+        fDeptid: departmentId
635
+      }},
636
+      dataType: 'json',
637
+      header: {
638
+        'Content-Type': 'application/json;charset=UTF-8',
639
+        token: token,
640
+        fSource: 1,
641
+      },
642
+      success: function (res) {
643
+        wx.hideLoading();
644
+        if (res.statusCode == 200 && res.data.status == 200) {
645
+          var users = res.data.data.data || [];
646
+          console.log('人员列表:', users);
647
+          that.setData({
648
+            userList: users,
649
+            userNames: users.map(item => item.fUsername),
650
+            selectedUserId: '',
651
+            selectedUserIndex: ''
652
+          });
653
+        }
654
+      },
655
+      fail: function (err) {
656
+        wx.hideLoading();
657
+        console.error('获取人员列表失败:', err);
658
+        wx.showToast({
659
+          title: '获取人员失败',
660
+          icon: 'none'
661
+        });
662
+      }
663
+    });
664
+  },
665
+  
666
+  // 选择人员
667
+  bindUserChange(e) {
668
+    var that = this;
669
+    var index = e.detail.value;
670
+    console.log('选择的人员索引:', index);
671
+    
672
+    that.setData({
673
+      selectedUserIndex: index,
674
+      selectedUserId: that.data.userList[index].fUserid
675
+    });
676
+  },
677
+  
519 678
   // 删除文档
520 679
   deleteWord(e) {
521 680
     var that = this
@@ -599,6 +758,14 @@ Page({
599 758
         duration: 2000,
600 759
       })
601 760
       return
761
+    } else if (that.data.isCc && !that.data.selectedUserId) {
762
+      wx.showToast({
763
+        title: "请选择抄送人员",
764
+        icon: "none",
765
+        mask: "true",
766
+        duration: 2000,
767
+      })
768
+      return
602 769
     } else {
603 770
       wx.showLoading({
604 771
         title: "加载中···",
@@ -606,28 +773,37 @@ Page({
606 773
       })
607 774
       var url =
608 775
         app.globalData.httpsUrlServer + "/workorderbaseApp/saveAppWorkorderbase"
776
+      // 构建提交数据
777
+      var workOrderbaseData = {
778
+        fWorkordertype: that.data.array_handleAllClassMoren.fEname, //工单类型
779
+        fWorkordertypeid: that.data.array_handleAllClassMoren.fWorkordertypeid,
780
+        fCustomername: that.data.reportMan, //反映人名
781
+        fSgusername: parkname, //公园名
782
+        fSguserid: parkid, //公园id
783
+        fPhone: that.data.inputPhone, //电话
784
+        fAddress: that.data.input_place, //地址
785
+        // 紧急程度
786
+        fLevelid: that.data.indexLevelDate * 1 + that.data.indexLevel * 1,
787
+        fLevelname: that.data.arrayLevelDate,
788
+        // 大类工单
789
+        fCategoryid1: that.data.indexBigClassValue.fValuecode,
790
+        fCategoryname1: that.data.indexBigClassValue.fName,
791
+        // 小类工单 - 已完全屏蔽
792
+        // 工单内容
793
+        fContent: that.data.ceshi,
794
+        // 限制期限
795
+        fAskfinishtime: that.data.ScrollStateTime,
796
+      };
797
+      
798
+      // 如果选择了抄送,添加抄送信息
799
+      if (that.data.isCc && that.data.selectedUserId) {
800
+        var selectedUser = that.data.userList[that.data.selectedUserIndex];
801
+        workOrderbaseData.cc = selectedUser.fUserid;
802
+        workOrderbaseData.ccName = selectedUser.fUsername;
803
+      }
804
+      
609 805
       var data = {
610
-        workOrderbase: {
611
-          fWorkordertype: that.data.array_handleAllClassMoren.fEname, //工单类型
612
-          fWorkordertypeid:
613
-            that.data.array_handleAllClassMoren.fWorkordertypeid,
614
-          fCustomername: that.data.reportMan, //反映人名
615
-          fSgusername: parkname, //公园名
616
-          fSguserid: parkid, //公园id
617
-          fPhone: that.data.inputPhone, //电话
618
-          fAddress: that.data.input_place, //地址
619
-          // 紧急程度
620
-          fLevelid: that.data.indexLevelDate * 1 + that.data.indexLevel * 1,
621
-          fLevelname: that.data.arrayLevelDate,
622
-          // 大类工单
623
-          fCategoryid1: that.data.indexBigClassValue.fValuecode,
624
-            fCategoryname1: that.data.indexBigClassValue.fName,
625
-            // 小类工单 - 已完全屏蔽
626
-          // 工单内容
627
-          fContent: that.data.ceshi,
628
-          // 限制期限
629
-          fAskfinishtime: that.data.ScrollStateTime,
630
-        },
806
+        workOrderbase: workOrderbaseData,
631 807
         fileInfoList: that.data.formFileurl,
632 808
         wordInfoList: that.data.fileDocList,
633 809
       }

+ 22 - 4
wxproject/pages/workprocessing/workprocessing.wxml

@@ -13,10 +13,7 @@
13 13
 					<view class="img">
14 14
 						<image src="../../images/icon/icon_jt.png"></image>
15 15
 					</view>
16
-				</view>
17
-			</picker>
18
-		</view>
19
-	</view> -->
16
+	-->
20 17
 	<!-- 来源编号 -->
21 18
 	<!-- <view class="time_choose">
22 19
 		<view class="title">来源编号</view>
@@ -184,6 +181,27 @@
184 181
 				</view>
185 182
 			</view>
186 183
 		</view>
184
+		<view class="paidanzi" style="padding: 30rpx;">
185
+			<view class="paidanziRow" style="margin-bottom: 20rpx;">
186
+				<view class="paidanziFirst">是否抄送:</view>
187
+				<switch checked="{{isCc}}" bindchange="switchCcChange" />
188
+			</view>
189
+			<view class="paidanziRow" wx:if="{{isCc}}" style="margin-bottom: 20rpx;">
190
+				<view class="paidanziFirst">选择部门:</view>
191
+				<picker value="{{selectedDepartmentIndex}}" range="{{departmentNames}}" style="width:80%" bindchange="bindDepartmentChange">
192
+					<view>{{departmentNames.length > 0 && selectedDepartmentIndex !== '' ? departmentNames[selectedDepartmentIndex] : '请选择部门'}}</view>
193
+				</picker>
194
+				<image class="paidanziImg" src="../../images/icon/icon_jt.png"></image>
195
+			</view>
196
+			<view class="paidanziRow" wx:if="{{isCc && userNames.length > 0}}">
197
+				<view class="paidanziFirst">选择人员:</view>
198
+				<picker value="{{selectedUserIndex}}" range="{{userNames}}" style="width:80%" bindchange="bindUserChange">
199
+					<view>{{userNames.length > 0 && selectedUserIndex !== '' ? userNames[selectedUserIndex] : '请选择人员'}}</view>
200
+				</picker>
201
+				<image class="paidanziImg" src="../../images/icon/icon_jt.png"></image>
202
+			</view>
203
+		</view>
204
+
187 205
 
188 206
 	</view>
189 207
 	<view class="btn">

+ 30 - 1
wxproject/pages/workprocessing/workprocessing.wxss

@@ -296,4 +296,33 @@ page {
296 296
   height: 80rpx;
297 297
   line-height: 80rpx;
298 298
   display: flex;
299
-} 
299
+} 
300
+.paidanzi {
301
+  padding: 20rpx;
302
+  background-color: #fff;
303
+}
304
+
305
+.paidanziFirst {
306
+  width: 170rpx;
307
+}
308
+
309
+.paidanziRow {
310
+  position: relative;
311
+  display: flex;
312
+  flex-direction: row;
313
+  align-items: center;
314
+  height: 80rpx;
315
+  line-height: 80rpx;
316
+  width: 100%;
317
+}
318
+
319
+.paidanziImg {
320
+  position: absolute;
321
+  right: 20rpx;
322
+  top: 50%;
323
+  transform: translateY(-50%);
324
+  width: 34rpx;
325
+  height: 34rpx;
326
+  margin-right: 10rpx;
327
+  z-index: 99;
328
+}