liuzhuo 2 тижднів тому
джерело
коміт
402b5162f0

+ 10
- 0
src/router/index.ts Переглянути файл

@@ -594,6 +594,16 @@ const router = createRouter({
594 594
 			name: 'accidentJuBaoLedger',
595 595
 			component: () => import('@/view/accidentManager/accidentJuBaoLedger/index.vue')
596 596
 		},
597
+		{
598
+			path: '/knowledge/accident',
599
+			name: '事故案例',
600
+			component: () => import('@/view/knowledge/accident.vue')
601
+		},
602
+		{
603
+			path: '/accidentList',
604
+			name: '事故案例编辑',
605
+			component: () => import('@/view/knowledge/accidentList.vue')
606
+		},
597 607
 	]
598 608
 })
599 609
 

+ 14
- 1
src/view/Home2.vue Переглянути файл

@@ -229,6 +229,19 @@
229 229
         </van-grid-item>
230 230
       </van-grid>
231 231
     </div>
232
+    <div class="card">
233
+      <div class="title">知识共享库</div>
234
+      <van-grid :border="false" :column-num="4" v-if="showCheckTakeN">
235
+        <van-grid-item to="/knowledge/accident">
236
+          <img src="../../public/images/zd.png" width="45rpx" />
237
+          <span class="vanicon_text">事故案例</span>
238
+        </van-grid-item>
239
+        <van-grid-item to="/notice" v-if="showCheckTakeN">
240
+          <img src="../../public/images/yj.png" width="45rpx" />
241
+          <span class="vanicon_text">通知公告</span>
242
+        </van-grid-item>
243
+      </van-grid>
244
+    </div>
232 245
 
233 246
   </div>
234 247
 
@@ -253,7 +266,7 @@ const role = localStorage.getItem('role')[0].roleCode;
253 266
 if (role == 'SX0201' || role == 'SX0201' || role == 'SX0302' || role == 'SX0303') {
254 267
  showCheckTake.value = true;
255 268
 }
256
-if (userDesc == '贾俊臣' || userDesc == '张瑞楠') {
269
+if (userDesc == '贾俊臣' || userDesc == '张瑞楠' || userDesc == '刘焯') {
257 270
   showCheckTake.value = true;
258 271
   showCheckTakeN.value=true
259 272
 }

+ 0
- 93
src/view/accidentManager/accidentJuBao/accidentJuBao_edit/index.vue Переглянути файл

@@ -181,22 +181,6 @@ const checklistForm = ref({
181 181
   checklistType: '',
182 182
   hiddenDangerId: ''
183 183
 });
184
-const saveCheckInfo = async () => {
185
-  let url = '/safe/ActivityRecords/save';
186
-  if (checklistForm.value.checklistType === 'equipment') {
187
-    url = '/safe/EquipmentRecords/save';
188
-  }
189
-  const param = {
190
-    json: JSON.stringify(checklistForm.value)
191
-  };
192
-  const res = await proxy.$axios.post(url, param);
193
-  if (res.data.code === 0) {
194
-    showSuccessToast('新增排查记录成功!');
195
-    sessionStorage.setItem('inspectionResult', '已排查');
196
-  } else {
197
-    showFailToast('操作失败!' + res.data.msg);
198
-  }
199
-};
200 184
 
201 185
 const ifElseReadonly = ref(false)
202 186
 const title = ref('')
@@ -228,16 +212,6 @@ onMounted(async () => {
228 212
   }
229 213
 });
230 214
 
231
-const getTimeFormatter = (date) => {
232
-  const year = date.getFullYear();
233
-  const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需加 1
234
-  const day = String(date.getDate()).padStart(2, '0');
235
-  const hours = String(date.getHours()).padStart(2, '0');
236
-  const minutes = String(date.getMinutes()).padStart(2, '0');
237
-  const seconds = String(date.getSeconds()).padStart(2, '0');
238
-  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
239
-};
240
-
241 215
 /**表单*/
242 216
 const form = ref({
243 217
   seriousInjuryCount:'',//重伤人数
@@ -318,17 +292,6 @@ const onConfirmDatetime = () => {
318 292
   dateOrTime.value = false;
319 293
 };
320 294
 
321
-const showPicker2 = ref(false);
322
-
323
-const onConfirmYhdj = ({ selectedOptions }) => {
324
-  showPicker2.value = false;
325
-  form.value.hdLevel = selectedOptions[0].value;
326
-  console.log('选择的内容', form.value);
327
-};
328
-
329
-const yhdjs = ref([{ text: '一般隐患', value: '一般隐患' },
330
-  { text: '重大隐患', value: '重大隐患' }]
331
-);
332 295
 
333 296
 const formRef = ref(null);
334 297
 const qvxiao = () => {
@@ -360,16 +323,6 @@ const baocun = async () => {
360 323
   }
361 324
 };
362 325
 
363
-const handleChangeHdSelect = (value) => {
364
-  form.value.hdSelect = value;
365
-  if (value === '隐患举报') {
366
-    isStandardFlow.value = true;
367
-  } else if (value === '即查即改') {
368
-    isStandardFlow.value = false;
369
-  }
370
-  getYHID();
371
-};
372
-
373 326
 const guid = () => {
374 327
   function S4() {
375 328
     return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
@@ -377,27 +330,6 @@ const guid = () => {
377 330
 
378 331
   return (S4() + S4() + S4() + S4() + S4() + S4() + S4() + S4());
379 332
 };
380
-/* 发现人 */
381
-const leaderKey = guid();
382
-const PopupDepartmentLeaderNameRef = ref();
383
-const handleDepartmentLeaderName = () => {
384
-  PopupDepartmentLeaderNameRef.value.open();
385
-};
386
-
387
-const codeAndDesc = ref([]);
388
-const getDepartmentLeaderName = (item) => {
389
-  form.value.discoverer = item.user.userCode;
390
-  form.value.discovererDesc = item.user.userDesc;
391
-  form.value.discovererDeptCode = item.dept.deptCode;
392
-  form.value.discovererDept = item.dept.deptName;
393
-};
394
-
395
-/* 其他发现人 */
396
-const leaderKey2 = guid();
397
-const PopupDepartmentLeaderNameRef2 = ref();
398
-const handleDepartmentLeaderName2 = () => {
399
-  PopupDepartmentLeaderNameRef2.value.open();
400
-};
401 333
 
402 334
 const codeAndDesc2 = ref([]);
403 335
 const getDepartmentLeaderName2 = (items) => {
@@ -707,29 +639,4 @@ const accidentLevel = computed(()=>{
707 639
   padding-bottom: 20px;
708 640
 }
709 641
 
710
-.radio-group {
711
-  display: flex;
712
-  background-color: white;
713
-  padding: 10px;
714
-  border-radius: 5px;
715
-  margin: 10px 0;
716
-  gap: 10px;
717
-}
718
-
719
-.radio-item {
720
-  padding: 8px 12px;
721
-  border: 1px solid #222;
722
-  border-radius: 4px;
723
-  background-color: white;
724
-  cursor: pointer;
725
-  transition: background-color 0.3s ease;
726
-  /* 添加过渡效果 */
727
-}
728
-
729
-.radio-item.active {
730
-  background-color: #4285f4;
731
-  /* 选中时的蓝色 */
732
-  color: white;
733
-  border-color: #4285f4;
734
-}
735 642
 </style>

+ 844
- 0
src/view/knowledge/accident.vue Переглянути файл

@@ -0,0 +1,844 @@
1
+<template>
2
+  <div class="h5-container">
3
+    <van-nav-bar title="事故案例" @click-left="onClickLeft" @click-right="handAdd">
4
+      <template #right>
5
+        <van-icon name="add" size="25" color="#000" />
6
+      </template>
7
+    </van-nav-bar>
8
+    <van-search v-model="query.caseTitle" show-action placeholder="请输入案例标题" @search="onRefresh"
9
+                @cancel="handdelectTitle" />
10
+
11
+    <!-- 项目列表 -->
12
+    <van-pull-refresh v-model="isRefreshing" success-text="刷新成功" @refresh="onRefresh">
13
+      <van-list v-model:loading="isLoading" :finished="isFinished" finished-text="没有更多了" offset="200" @load="onLoad">
14
+        <div v-for="(item, idx) in resultData" :key="item.id">
15
+          <van-swipe-cell title-style="color: #007aff" style="height: 80px;" :ref="el => getSwipeCellRef(el, idx)">
16
+            <template #default>
17
+              <div class="swipe-cell-default">
18
+                <van-cell style="min-height: 100px; padding: 0 0 0 0; display: flex; align-items: flex-start;" @click="edits(item)">
19
+                  <template #title>
20
+                    <div class="cell-title">
21
+                      {{ item.caseTitle }}
22
+                    </div>
23
+                  </template>
24
+                  <template #label>
25
+                      <div>案例编号:{{ item.caseNumber }} </div>
26
+                      <div>事故等级:{{ item.accidentLevel }}</div>
27
+                      <div>下载量:{{ item.downloadCount }} 浏览量:{{item.viewCount}}</div>
28
+
29
+<!--                    <div style="width: 112px" :class="getStatusClass(item.isFinish)">
30
+                      类型:
31
+                      <span v-if="item.isFinish === '待学习'" style="width: 200px">待学习</span>
32
+                      <span v-else-if="item.isFinish === '已学习'" style="width: 200px">已学习</span>
33
+                      <span v-else-if="item.isFinish === '已扣除'" style="width: 200px">已扣除</span>
34
+                    </div>-->
35
+                  </template>
36
+                </van-cell>
37
+                <div class="swipe-cell-default-icon">
38
+                  <van-icon v-if="openStatus[idx]" name="arrow-double-left" @click.stop="openSwipe(idx)" />
39
+                  <van-icon v-else name="arrow-double-right" @click.stop="closeSwipe(idx)" />
40
+                </div>
41
+              </div>
42
+            </template>
43
+
44
+            <template #right>
45
+              <van-button  square class="delete-button" text="删除" @click="handleDelete(item)" />
46
+            </template>
47
+          </van-swipe-cell>
48
+        </div>
49
+
50
+      </van-list>
51
+    </van-pull-refresh>
52
+
53
+    <!-- 删除确认弹窗 -->
54
+    <van-dialog v-model:show="deleteDialogVisible" show-cancel-button @confirm="confirmDelete">
55
+      <template #title>
56
+        <div>删除确认</div>
57
+      </template>
58
+      <div style="padding: 30px;">确定要删除该项目吗?</div>
59
+    </van-dialog>
60
+
61
+  </div>
62
+</template>
63
+
64
+<script setup>
65
+import { ref, reactive, onMounted, getCurrentInstance, nextTick, toRaw } from 'vue';
66
+import { Dialog, showDialog, showSuccessToast, showToast, Toast } from 'vant';
67
+
68
+import tools from '@/tools'
69
+
70
+const { proxy } = getCurrentInstance();
71
+
72
+const onClickLeft = () => {
73
+  history.back();
74
+};
75
+const headers = ref({
76
+  token: localStorage.getItem('token'),
77
+  userId: localStorage.getItem('userId'),
78
+  dept: JSON.parse(localStorage.getItem('dept'))[0].deptCode
79
+});
80
+const switchIconState = (idx) => {
81
+  openStatus.value[idx] = !openStatus.value[idx]
82
+  openStatus.value = new Array(resultData.value.length).fill(true);
83
+}
84
+
85
+// const onClickRight = () =>{
86
+//   searchShow.value = !searchShow.value;
87
+// }
88
+
89
+const searchShow = ref(false);
90
+const query = ref({
91
+  caseNumber:'',
92
+  caseTitle:'',
93
+})
94
+
95
+
96
+
97
+const tableData = ref([]);
98
+const selectedRows = ref([]);
99
+const dialogVisibleLook = ref(false);
100
+const deleteDialogVisible = ref(false);
101
+const currentDeleteItem = ref([]);
102
+const dialogVisible = ref(false);
103
+const dialogVisibleFile = ref(false);
104
+const date = ref(null);
105
+
106
+const kz = ref(true);
107
+import { useRouter } from 'vue-router';
108
+const router = useRouter();
109
+const handAdd =  () => {
110
+
111
+  router.push({ path: "/accidentList",
112
+    query: {
113
+      mark:-1
114
+    } });
115
+
116
+};
117
+const goaddPeo = (item) => {
118
+  router.push({
119
+    path: '/addPeo',
120
+    query: {
121
+      data: JSON.stringify(item)
122
+    }
123
+  })
124
+}
125
+
126
+const edits = (row) => {
127
+  const isOwner = String(row.addId) === currentUserId;
128
+  kz.value = true;
129
+  form.value = { ...row };
130
+  router.push({ path: "/accidentList",
131
+    query: {
132
+      mark:1,
133
+      data:JSON.stringify(form.value),
134
+      readOnly: !isOwner ? 'true' : undefined
135
+    } });
136
+};
137
+const form = ref({
138
+  caseNumber:'',
139
+  caseTitle:'',
140
+  caseSource:'',
141
+  accidentLevel:'',
142
+  accidentDept:'',
143
+  accidentLocation:'',
144
+  accidentTime:'',
145
+  accidentType:'',
146
+  accidentTags:'',
147
+  casualtyCount:'',
148
+  accidentSummary:'',
149
+  preventiveMeasures:'',
150
+  fileId:'',
151
+  viewCount:'',
152
+  downloadCount:''
153
+});
154
+
155
+
156
+const isRefreshing = ref(false);
157
+const isLoading = ref(false);
158
+const isFinished = ref(false);
159
+const currentPage = ref(1);
160
+const pageSize = ref(10);
161
+const totalRows = ref(0);
162
+const resultData = ref([]);
163
+
164
+const dept=localStorage.getItem("dept")[0].deptCode;
165
+const currentUserId = String(localStorage.getItem('userId'));
166
+const getTableData = async () => {
167
+  var url = '/sgsafe/Manager/queryAccident'
168
+  var param = {
169
+    page: currentPage.value,
170
+    rows: pageSize.value,
171
+    params: JSON.stringify(query.value)
172
+  }
173
+  const response = await proxy.$axios.get(url, param);
174
+  if (response.data.code == 0) {
175
+    tableData.value = response.data.data.records.map(item => ({
176
+      ...item,
177
+      canDelete: String(item.addId) === currentUserId
178
+    }));
179
+    console.log('列表数据',tableData.value)
180
+    totalRows.value = response.data.data.total;
181
+  } else {
182
+    showToast({
183
+      type: 'error',
184
+      message: '操作失败!' + response.data.msg
185
+    });
186
+  }
187
+};
188
+const ruleIds = ref([]);
189
+
190
+const onRefresh = () => {
191
+  basicReset();
192
+  onLoad();
193
+};
194
+
195
+//*************************************
196
+
197
+
198
+
199
+//定义字典集合
200
+const dicList = ref([])
201
+
202
+const getDicList = () => {
203
+  tools.dic.getDicList([ 'case_type','SEX', 'case_source','accident_level','accident_type','sgsafe_taccidentTags']).then((response => {
204
+    console.log(JSON.stringify(response.data.data))
205
+    dicList.value = response.data.data
206
+
207
+  }))
208
+}
209
+
210
+
211
+const onLoad = async () => {
212
+  if (isRefreshing.value) {
213
+    resultData.value = [];
214
+    currentPage.value = 1;
215
+    isRefreshing.value = false;
216
+  }
217
+
218
+  getDicList()
219
+
220
+
221
+
222
+
223
+
224
+  try {
225
+    await getTableData();
226
+
227
+    if (pageSize.value * currentPage.value < totalRows.value) {
228
+      resultData.value = [...resultData.value, ...tableData.value];
229
+      openStatus.value = new Array(resultData.value.length).fill(true);
230
+      currentPage.value++;
231
+
232
+    } else {
233
+      resultData.value = [...resultData.value, ...tableData.value];
234
+      openStatus.value = new Array(resultData.value.length).fill(true);
235
+      isFinished.value = true;
236
+    }
237
+
238
+    console.log('resultData',resultData.value)
239
+  } catch (error) {
240
+    console.log(error);
241
+    isFinished.value = true;
242
+  } finally {
243
+    isLoading.value = false;
244
+  }
245
+};
246
+/* 通用方法: 重置list数据 */
247
+const basicReset = () => {
248
+  isFinished.value = false;
249
+  isLoading.value = true;
250
+  currentPage.value = 1;
251
+  resultData.value = [];
252
+};
253
+
254
+/*onMounted(() => {
255
+  handleSearch();
256
+});
257
+
258
+const handleSearch = () => {
259
+/!*  currentPage.value = 1;
260
+  isFinished.value = false;
261
+  tableData.value = [];*!/
262
+  basicReset()
263
+  onLoad()
264
+};*/
265
+
266
+const handdelectNumber = () => {
267
+  query.value.caseNumber = '';
268
+  onRefresh()
269
+};
270
+
271
+const handdelectTitle = () => {
272
+  query.value.caseTitle = '';
273
+  onRefresh()
274
+};
275
+
276
+
277
+
278
+
279
+// 定义生成编号的函数
280
+const generateCode = () => {
281
+  // 获取当前日期并格式化为 YYYYMMDD
282
+  const now = new Date();
283
+  const year = now.getFullYear();
284
+  const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需加1
285
+  const day = String(now.getDate()).padStart(2, '0');
286
+  const formattedDate = `${year}${month}${day}`;
287
+  // 时间部分:HHmmss
288
+  const hours = String(now.getHours()).padStart(2, '0');
289
+  const minutes = String(now.getMinutes()).padStart(2, '0');
290
+  const seconds = String(now.getSeconds()).padStart(2, '0');
291
+  const formattedTime = `${hours}${minutes}${seconds}`;
292
+
293
+  // 模拟生成三位流水号(可以根据需要替换为递增逻辑)
294
+  const sequenceNumber = Math.floor(Math.random() * 1000); // 随机生成 0-999
295
+  const paddedSequence = String(sequenceNumber).padStart(3, '0'); // 补零到三位
296
+
297
+  // 拼接编号
298
+  return `SGAL${formattedDate}${formattedTime}${paddedSequence}`;
299
+};
300
+
301
+// 使用 ref 存储生成的编号
302
+const generatedCode = ref(generateCode());
303
+
304
+// 定义重新生成编号的方法
305
+const regenerateCode = () => {
306
+  generatedCode.value = generateCode();
307
+};
308
+
309
+const handleDetailLook = (row) => {
310
+  form.value = { ...row };
311
+  proxy.$router.push({
312
+    name: 'taiZhang_detail',
313
+    query: {
314
+      form: form.value.id
315
+    }
316
+  });
317
+  // dialogVisibleLook.value = true;
318
+};
319
+const deleteData=ref({})
320
+
321
+const handleDelete = (item) => {
322
+
323
+  deleteData.value=item
324
+  const now = new Date();
325
+  const year = now.getFullYear();
326
+  const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始
327
+  const day = String(now.getDate()).padStart(2, '0');
328
+  const hours = String(now.getHours()).padStart(2, '0');
329
+  const minutes = String(now.getMinutes()).padStart(2, '0');
330
+  const seconds = String(now.getSeconds()).padStart(2, '0');
331
+  deleteData.value.cancelTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
332
+
333
+    deleteData.value.cancelFlag='1'
334
+  var url = '/sgsafe/Manager/saveAccident';
335
+  var param = {
336
+    json: JSON.stringify(deleteData.value)
337
+  };
338
+  proxy.$axios.post(url, param).then(response => {
339
+    if (response.data.code == '0') {
340
+      showSuccessToast("删除成功")
341
+      onRefresh();
342
+
343
+    } else {
344
+    }
345
+
346
+  })
347
+};
348
+
349
+
350
+const confirmDelete = () => {
351
+  for (let item of currentDeleteItem.value) {
352
+    if (item.addId !== headers.value.userId) {
353
+      showToast({
354
+        type: 'warning',
355
+        message: '只能删除自己添加的数据!'
356
+      });
357
+      return;
358
+    }
359
+  }
360
+
361
+  if (currentDeleteItem.value[0].status !== '0' && currentDeleteItem.value[0].hdSelect !== '下发隐患'
362
+    && currentDeleteItem.value[0].hdSelect !== '即查即改') {
363
+    showToast({
364
+      type: 'fail',
365
+      message: '只有尚未提交流程的记录或回到起点的流程经过作废后才可以删除!'
366
+    });
367
+    return;
368
+  }
369
+  if (currentDeleteItem.value[0].status !== '2' && currentDeleteItem.value[0].hdSelect === '下发隐患'
370
+    && currentDeleteItem.value[0].hdSelect !== '即查即改') {
371
+    showToast({
372
+      type: 'fail',
373
+      message: '只有尚未提交流程的记录或回到起点的流程经过作废后才可以删除!'
374
+    });
375
+    return;
376
+  }
377
+
378
+  var url = 'sgsafe/Hiddendanger/remove';
379
+  var param = {
380
+    params: JSON.stringify({ ...currentDeleteItem.value.map(x => x.id) })
381
+  };
382
+  proxy.$axios.get(url, param).then(response => {
383
+    if (response.data.code == 0) {
384
+      showToast({
385
+        type: 'success',
386
+        message: '删除成功'
387
+      });
388
+      onRefresh();
389
+    } else {
390
+      showToast({
391
+        type: 'fail',
392
+        message: '操作失败!' + response.data.msg
393
+      });
394
+    }
395
+  });
396
+};
397
+
398
+
399
+
400
+
401
+const resetForm = () => {
402
+  form.value = {
403
+    projectName: '',
404
+    projectLeader: '',
405
+    phone: '',
406
+    dept: ''
407
+  };
408
+};
409
+
410
+const baocun = () => {
411
+  nextTick(() => {
412
+    if (form.value.hdSelect === '正常登记') {
413
+      form.value.status = '0';
414
+    } else if (form.value.hdSelect === '下发隐患') {
415
+      form.value.status = '2';
416
+    } else {
417
+      form.value.status = '-1';
418
+    }
419
+  });
420
+  // 原有保存逻辑保持不变
421
+  var url = 'sgsafe/Hiddendanger/save';
422
+  var param = {
423
+    json: JSON.stringify(form.value)
424
+  };
425
+  proxy.$axios.post(url, param).then(response => {
426
+    if (response.data.code == '0') {
427
+      showSuccessToast('保存成功!');
428
+      getTableData();
429
+      orJsons();
430
+      // clearDeptUsers()
431
+    } else {
432
+      showToast({
433
+        type: 'fail',
434
+        message: '操作失败!' + response.data.msg
435
+      });
436
+    }
437
+  });
438
+};
439
+
440
+//处理人员code
441
+const repairLL = ref('');
442
+const repairOO = ref('');
443
+const acceptLL = ref('');
444
+const orJsons = () => {
445
+  // console.log('forms',form.value)
446
+  if (form.value.hdSelect === '正常登记') {
447
+    nextTick(() => {
448
+      nextTick(() => {
449
+        repairLL.value = qq('repairLL', form.value.discoverer);//隐患发现人
450
+        nextTick(() => {
451
+          repairOO.value = qq('repairOO', form.value.discovererOther);//其他隐患发现人
452
+          nextTick(() => {
453
+            acceptLL.value = qq('acceptLL', form.value.discoverer);//隐患销号人
454
+          });
455
+        });
456
+      });
457
+
458
+      // acceptOO.value = qq('acceptOO', form.value.acceptOther)
459
+    });
460
+  } else {
461
+    // console.log('noiajdoifjpoewjfopjp')
462
+    nextTick(() => {
463
+      nextTick(() => {
464
+        repairLL.value = qq('repairLL', form.value.acceptLeader);//隐患发现人
465
+        nextTick(() => {
466
+          repairOO.value = qq('repairOO', form.value.acceptOther);//其他隐患发现人
467
+          nextTick(() => {
468
+            acceptLL.value = qq('acceptLL', form.value.discoverer);//隐患销号人
469
+          });
470
+        });
471
+      });
472
+
473
+      // acceptOO.value = qq('acceptOO', form.value.acceptOther)
474
+    });
475
+  }
476
+};
477
+
478
+const jsons = ref({});
479
+const qq = (a, val) => {
480
+  let aa = '';
481
+  var url = 'sgsafe/Hiddendanger/qqId';
482
+  var param = {
483
+    params: val
484
+  };
485
+  proxy.$axios.post(url, param).then(response => {
486
+    if (response.data.code == 0) {
487
+
488
+      aa = response.data.data;
489
+      switch (a) {
490
+        case 'repairLL':
491
+          repairLL.value = response.data.data;
492
+          // console.log('repairLL',repairLL.value);
493
+          break;
494
+        case 'repairOO':
495
+          repairOO.value = response.data.data;
496
+          // console.log('repairOO',repairLL.value);
497
+          break;
498
+        case 'acceptLL':
499
+          acceptLL.value = response.data.data;
500
+          // console.log('acceptLL',repairLL.value);
501
+          break;
502
+        default:
503
+          break;
504
+      }
505
+      jsons.value = {
506
+        hdConfirm: repairLL.value,
507
+        hdConfirmO: repairOO.value,
508
+        hdCancel: acceptLL.value
509
+      };
510
+
511
+      // 处理函数
512
+      function processValue(value) {
513
+        // 将逗号替换为分号
514
+        const replacedValue = value.replace(/,/g, ';');
515
+        // 分割值
516
+        const parts = replacedValue.split(';');
517
+        // 每个部分前加上 U_
518
+        const processedParts = parts.map(part => `U_${part.trim()}`);
519
+        // 重新组合
520
+        return processedParts.join(';');
521
+      }
522
+
523
+      // 处理整个对象
524
+      const processedData = {};
525
+      for (const key in jsons.value) {
526
+        if (jsons.value.hasOwnProperty(key)) {
527
+          processedData[key] = processValue(jsons.value[key]);
528
+        }
529
+      }
530
+
531
+      console.log('对象', toRaw(processedData));
532
+
533
+      let b = {
534
+        acceptL: processedData.hdConfirm,
535
+        acceptO: processedData.hdConfirmO,
536
+        id: form.value.id
537
+      };
538
+
539
+      if (form.value.hdSelect === '即查即改') {
540
+        b = {
541
+          hdFxr: processedData.hdCancel,
542
+          id: form.value.id
543
+        };
544
+      }
545
+
546
+      if (form.value.hdSelect === '正常登记') {
547
+        b = {
548
+          // hdConfirm: processedData.hdConfirm,
549
+          // hdConfirmO: processedData.hdConfirmO,
550
+          id: form.value.id
551
+        };
552
+      }
553
+
554
+      const aaa = JSON.stringify(toRaw(b));
555
+      sessionStorage.setItem('variables', aaa);
556
+      console.log('aaa', aaa);
557
+    } else {
558
+      showToast({
559
+        type: 'fail',
560
+        message: '操作失败!' + response.data.msg
561
+      });
562
+    }
563
+  });
564
+  return aa;
565
+};
566
+
567
+const reback = () => {
568
+  // 返回逻辑
569
+};
570
+
571
+const deleteRow = (row) => {
572
+  selectedRows.value = [row];
573
+  handleDelete(row);
574
+};
575
+
576
+const deleteRowa = (row) => {
577
+  deleteRow(row);
578
+};
579
+
580
+const bm = (val) => {
581
+  // 部门选择逻辑
582
+};
583
+
584
+//提交审批流程
585
+import { workflowSubmit, workflowCancel } from '@/tools/workflow.js';
586
+
587
+const flowId = ref('');
588
+flowId.value = 'hazardManagementFlowId';
589
+const handleSubmit2 = (val, idx) => {
590
+  openStatus.value[idx] = !openStatus.value[idx]
591
+  openStatus.value = new Array(resultData.value.length).fill(true);
592
+  console.log('提交');
593
+  console.log('selectedRows', selectedRows.value);
594
+  let row = val;
595
+  form.value = { ...row }
596
+  form.value.workCreate = headers.value.dept;
597
+
598
+  let b = {
599
+    id: form.value.id,
600
+  }
601
+  const aaa = JSON.stringify(toRaw(b))
602
+  sessionStorage.setItem('variables', aaa)
603
+
604
+  if (form.value.hdSelect === '正常登记') {
605
+    flowId.value = 'hazardManagementFlowId'
606
+  } else if (form.value.hdSelect === '下发隐患') {
607
+    flowId.value = 'hazardImmediatelyCM'
608
+    form.value.status = '2'
609
+  } else {
610
+    flowId.value = 'hazardImmediatelyCMUpdate'
611
+    form.value.status = '-1'
612
+  }
613
+
614
+  console.log('----');
615
+  console.log(flowId.value);
616
+  console.log(sessionStorage.getItem('variables'));
617
+  console.log(row.workId);
618
+  console.log(row.trackId);
619
+  let titles = '隐患排查治理'
620
+  showDialog({
621
+    title: '提示',
622
+    message: '确定提交审批?',
623
+    showCancelButton: true,
624
+    confirmButtonText: '确定',
625
+    type: 'warning',
626
+    cancelButtonText: '取消'
627
+  }
628
+  ).then(() => {
629
+    return workflowSubmit(
630
+      flowId.value,
631
+      '隐患排查治理',
632
+      '初始化提交',
633
+      // JSON.stringify({}),
634
+      sessionStorage.getItem('variables'),
635
+      row.workId,
636
+      row.trackId);
637
+  }).then((result) => {
638
+    if (result.status === 'success') {
639
+      // 将结果返回的workId和trackId保存
640
+      var url = 'sgsafe/Hiddendanger/saveProcessInfo';
641
+      console.log('id', result, row.id);
642
+      var process = {
643
+        'id': form.value.id,
644
+        'workId': result.workId,
645
+        'trackId': result.trackId
646
+      };
647
+      var param = {
648
+        json: JSON.stringify(process)
649
+      };
650
+      proxy.$axios.post(url, param).then(response => {
651
+        if (response.data.code === 0) {
652
+          form.value = response.data.data;
653
+          console.log('我要进来啦保存成功');
654
+          showToast({
655
+            type: 'success',
656
+            message: '提交审批成功'
657
+          });
658
+          onRefresh()
659
+        }
660
+      });
661
+    } else {
662
+      showToast({
663
+        type: 'error',
664
+        message: '提交审批失败,' + result.msg
665
+      });
666
+    }
667
+  }).catch(() => {
668
+    showToast({
669
+      type: 'info',
670
+      message: '已取消提交'
671
+    });
672
+  });
673
+};
674
+
675
+/**
676
+ * 按钮实现swipe-cell滑动
677
+ */
678
+const openStatus = ref([])
679
+const swipeCellRefs = ref([])
680
+const getSwipeCellRef = (el, index) => {
681
+  if (el) {
682
+    swipeCellRefs.value[index] = el;
683
+  }
684
+}
685
+const openSwipe = (idx) => {
686
+  openStatus.value = new Array(resultData.value.length).fill(true);
687
+  if (idx >= 0 && idx < swipeCellRefs.value.length) {
688
+    openStatus.value[idx] = false
689
+    swipeCellRefs.value[idx].open('right')
690
+  }
691
+  document.addEventListener('click', handleDocumentClick)
692
+}
693
+/**
694
+ * 当点击滑动单元格时,开始监听点击事件
695
+ */
696
+const handleDocumentClick = (event) => {
697
+  openStatus.value = new Array(resultData.value.length).fill(true);
698
+}
699
+
700
+const closeSwipe = (idx) => {
701
+  if (idx >= 0 && idx < swipeCellRefs.value.length) {
702
+    openStatus.value[idx] = true
703
+    swipeCellRefs.value[idx].close()
704
+  }
705
+}
706
+// *********************************** 事故案例 ************************************************
707
+
708
+
709
+
710
+
711
+
712
+</script>
713
+
714
+<style scoped>
715
+.h5-container {
716
+  width: 100%;
717
+  padding: 5px;
718
+  box-sizing: border-box;
719
+}
720
+
721
+.status-pending {
722
+  background-color: #fff3cd;
723
+  color: #856404;
724
+  padding: 2px 4px;
725
+  border-radius: 4px;
726
+}
727
+
728
+.status-registered {
729
+  background-color: #d1ecf1;
730
+  color: #0c5460;
731
+  padding: 2px 4px;
732
+  border-radius: 4px;
733
+}
734
+
735
+.status-analyzing {
736
+  background-color: #fff8e1;
737
+  color: #ff8f00;
738
+  padding: 2px 4px;
739
+  border-radius: 4px;
740
+}
741
+
742
+.status-rectifying {
743
+  background-color: #e8f5e9;
744
+  color: #2e7d32;
745
+  padding: 2px 4px;
746
+  border-radius: 4px;
747
+}
748
+
749
+.status-accepting {
750
+  background-color: #e3f2fd;
751
+  color: #1565c0;
752
+  padding: 2px 2px;
753
+  border-radius: 2px;
754
+}
755
+
756
+.status-closed {
757
+  background-color: #f8bbd0;
758
+  color: #b71c1c;
759
+  padding: 2px 2px;
760
+  border-radius: 2px;
761
+}
762
+
763
+.status-finished {
764
+  background-color: #e8eaf6;
765
+  color: #311b92;
766
+  padding: 2px 2px;
767
+  border-radius: 2px;
768
+}
769
+
770
+.status-unknown {
771
+  background-color: #efebe9;
772
+  color: #424242;
773
+  padding: 2px 2px;
774
+  border-radius: 2px;
775
+}
776
+
777
+.cell-title {
778
+  display: -webkit-box;
779
+  /* 旧版弹性盒子模型 */
780
+  -webkit-box-orient: vertical;
781
+  /* 内容垂直排列 */
782
+  -webkit-line-clamp: 2;
783
+  /* 限制显示行数 */
784
+  overflow: hidden;
785
+  /* 超出隐藏 */
786
+  text-overflow: ellipsis;
787
+  /* 省略号 */
788
+  line-height: 1.5;
789
+  /* 可选:设置行高 */
790
+  max-height: calc(1.5em * 2);
791
+  /* 可选:根据行高限制最大高度 */
792
+  font-size: 16px;
793
+  font-weight: bold;
794
+  color: #333;
795
+  /* 字号 */
796
+}
797
+
798
+.swipe-cell-default {
799
+  display: flex;
800
+  background-color: #ffffff;
801
+  justify-content: center;
802
+  align-items: center;
803
+}
804
+
805
+.swipe-cell-default-icon {
806
+  width: 60px;
807
+  display: flex;
808
+  justify-content: center;
809
+}
810
+
811
+.delete-button {
812
+  height: 100%;
813
+  border: none;
814
+  color: #ff0000;
815
+  background-image: url('@/assets/img/del.png');
816
+  background-size: auto 100%;
817
+  background-repeat: no-repeat;
818
+}
819
+
820
+.submit-button {
821
+  height: 100%;
822
+  border: none;
823
+  color: #07c160;
824
+  background-image: url('@/assets/img/sub.png');
825
+  background-size: auto 100%;
826
+  background-repeat: no-repeat;
827
+}
828
+
829
+.subsuccess {
830
+  height: 100%;
831
+  border: none;
832
+  color: #07c160;
833
+  background-image: url('@/assets/img/sub1.png');
834
+  background-size: auto 100%;
835
+  background-repeat: no-repeat;
836
+}
837
+.single-line-text {
838
+  white-space: nowrap;        /* 强制不换行 */
839
+  overflow: hidden;           /* 超出部分隐藏 */
840
+  text-overflow: ellipsis;    /* 超出显示省略号 ... */
841
+  width: 100%;                /* 或指定宽度 */
842
+  box-sizing: border-box;
843
+}
844
+</style>

+ 575
- 0
src/view/knowledge/accidentList.vue Переглянути файл

@@ -0,0 +1,575 @@
1
+<script setup>
2
+import { getCurrentInstance, onMounted, ref , computed } from 'vue';
3
+import { useRoute, useRouter } from 'vue-router';
4
+import tools from '@/tools'
5
+import OrganizationalWithLeafUserOne from '@/components/OrganizationalWithLeafUserOne.vue';
6
+const {
7
+  proxy
8
+} = getCurrentInstance()
9
+const accidentDictList = ref([])
10
+const columns =  ref([])
11
+const columnsLevel =  ref([])
12
+
13
+//     [
14
+//   { text: '杭州', value: 'Hangzhou' },
15
+//   { text: '宁波', value: 'Ningbo' },
16
+//   { text: '温州', value: 'Wenzhou' },
17
+//   { text: '绍兴', value: 'Shaoxing' },
18
+//   { text: '湖州', value: 'Huzhou' },
19
+// ];
20
+
21
+// 定义生成编号的函数(你已写好的逻辑)
22
+
23
+const generateCode = () => {
24
+  const now = new Date();
25
+  const year = now.getFullYear();
26
+  const month = String(now.getMonth() + 1).padStart(2, '0');
27
+  const day = String(now.getDate()).padStart(2, '0');
28
+  const formattedDate = `${year}${month}${day}`;
29
+  const hours = String(now.getHours()).padStart(2, '0');
30
+  const minutes = String(now.getMinutes()).padStart(2, '0');
31
+  const seconds = String(now.getSeconds()).padStart(2, '0');
32
+  const formattedTime = `${hours}${minutes}${seconds}`;
33
+  const sequenceNumber = Math.floor(Math.random() * 1000);
34
+  const paddedSequence = String(sequenceNumber).padStart(3, '0');
35
+  return `SGAL${formattedDate}${formattedTime}${paddedSequence}`;
36
+};
37
+
38
+// 存储生成的编号(响应式变量)
39
+const generatedCode = ref(generateCode());
40
+
41
+// 重新生成编号的方法
42
+const regenerateCode = () => {
43
+  generatedCode.value = generateCode();
44
+};
45
+
46
+
47
+
48
+const getAccidentDicList = () => {
49
+  tools.dic.getDicList([ 'case_type','SEX', 'case_source','accident_level','accident_type','sgsafe_taccidentTags']).then((response => {
50
+    console.log(JSON.stringify(response.data.data))
51
+    accidentDictList.value = response.data.data
52
+    console.log('case_source',accidentDictList.value.case_source)
53
+    columns.value = accidentDictList.value.case_source.map(item => ({
54
+      text: item.dicName,
55
+      value: item.dicCode
56
+    }));
57
+    columnsLevel.value = accidentDictList.value.accident_level.map(item => ({
58
+      text: item.dicName,
59
+      value: item.dicCode
60
+    }));
61
+
62
+
63
+    console.log('accident_level',accidentDictList.value.accident_level)
64
+
65
+  }))
66
+}
67
+
68
+
69
+const caseSourceFlag = ref(false)
70
+const accidentLevelFlag = ref(false)
71
+let title = '新增事故案例'
72
+
73
+/* 返回上一级页面 */
74
+const router = useRouter()
75
+const onClickLeft = () => {
76
+  router.go(-1)
77
+}
78
+
79
+const currentYear = ref()
80
+currentYear.value = new Date().getFullYear()
81
+
82
+/* 获取用户部门信息 */
83
+const jsonArray = localStorage.getItem('dept')
84
+const deptInformation = ref([])
85
+try {
86
+  deptInformation.value = jsonArray ? JSON.parse(jsonArray) : [];
87
+} catch (error) {
88
+  deptInformation.value = [];
89
+}
90
+const deptName = deptInformation.value[0].deptName
91
+const deptCode = deptInformation.value[0].deptCode
92
+
93
+const guid = () =>  {
94
+  function S4() {
95
+    return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
96
+  }
97
+  return (S4()+S4()+S4()+S4()+S4()+S4()+S4()+S4())
98
+}
99
+const formJieguo = ref({
100
+  resultWhether:'',
101
+  resultDetail:'',
102
+  resultWhy:'',
103
+  resultFile:'',
104
+  itemsId:'',
105
+  resultFileId:'',
106
+  resType:''
107
+})
108
+const route = useRoute()
109
+let planInfo = {}
110
+const  userName1=localStorage.getItem('userName');
111
+const isEdit = ref(route.query.mark === '1');
112
+
113
+const result=ref('')
114
+const fromVue=ref({})
115
+if (route.query.mark) {
116
+  planInfo = JSON.parse(route.query.mark)
117
+}
118
+console.log(planInfo);
119
+if (planInfo==-1){
120
+  result.value=guid()
121
+  console.log( result.value);
122
+}
123
+
124
+const resDetail=ref('')
125
+const ruleIds = ref([]);
126
+/*const getRuleId = () => {
127
+  var url = '/sgsafe/ExamHead/getCheckRuleId'
128
+  var param = {}
129
+  proxy.$axios.get(url, param).then(response => {
130
+    if (response.data.code == '0') {
131
+      ruleIds.value = response.data.data
132
+    } else {
133
+      console.log("1111111");
134
+    }
135
+  })
136
+  console.log('ruleIds', ruleIds)
137
+}
138
+getRuleId()*/
139
+const showRule=ref(false);
140
+
141
+const distestType=ref(false)
142
+if (planInfo==1) {
143
+  console.log(planInfo);
144
+  title = '修改事故案例'
145
+  fromVue.value= JSON.parse(route.query.data)
146
+
147
+  result.value=fromVue.value.fileId
148
+  console.log(result.value);
149
+}
150
+ const  whether=ref(false)
151
+
152
+const planLevelList1=ref([])
153
+
154
+
155
+/* 下拉框 */
156
+const showActionSheet = ref(false)
157
+const showActionSheet1 = ref(false)
158
+const planLevelList = [
159
+  { name: '转发', value: '转发' },
160
+  { name: '内部', value: '内部' },
161
+  { name: '文章', value: '文章' }
162
+];
163
+const isdisabled=ref(true)
164
+const isdisabled2=ref(true)
165
+const onSelect = (item) => {
166
+fromVue.value.fileContent = item.name
167
+
168
+  showActionSheet.value=false
169
+}
170
+
171
+const onSelect2 = (item) => {
172
+  fromVue.value.fileType=item.name
173
+  showActionSheet2.value=false
174
+  }
175
+
176
+const onCaseSourseSelect = (item) => {
177
+  fromVue.value.caseSource=item.dicCode
178
+  caseSourceFlag.value = false
179
+}
180
+
181
+const onAccidentLevelSelect = (item) => {
182
+  fromVue.value.accidentLevel = item.dicCode
183
+  accidentLevelFlag.value = false
184
+
185
+}
186
+
187
+const displayFileName = ref('')
188
+const onSelect1 = (item) => {
189
+  console.log(item);
190
+  formJieguo.value.resultFile = item.value
191
+  result.value=formJieguo.value.resultFile
192
+  displayFileName.value = item.name
193
+  console.log(result.value);
194
+  showActionSheet1.value = false
195
+}
196
+const questionIds = ref([])
197
+const actions=ref([])
198
+/*const getQuestionId = () => {
199
+  var url = '/sgsafe/AssessmentRecord/queryRuleNoPage';
200
+  var param = {};
201
+  proxy.$axios.get(url, param).then(response => {
202
+    if (response.data.code == '0') {
203
+      questionIds.value = response.data.data; // 先赋值给 questionIds.value
204
+
205
+
206
+      // ✅ 关键:使用 questionIds.value.map
207
+      actions.value = questionIds.value.map(item => ({
208
+        name: item.ruleName,
209
+        value: item.id
210
+      }));
211
+      console.log('actions:', actions.value); // 看看有没有输出
212
+    } else {
213
+      ElMessage.error('操作失败!' + response.data.msg);
214
+    }
215
+  });
216
+};
217
+getQuestionId()*/
218
+
219
+const baocun3 = (ruleFormRef) => {
220
+  console.log(formJieguo.value)
221
+  ruleFormRef.validate((valid, fields) => {
222
+    if (valid) {
223
+
224
+      var url = '/sgsafe/ItemsResult/save';
225
+      var param = {
226
+        json: JSON.stringify(formJieguo.value)
227
+      };
228
+      proxy.$axios.post(url, param).then(response => {
229
+        if (response.data.code == '0') {
230
+          getTableData1()
231
+          ElMessage({
232
+            message: '保存成功',
233
+            type: 'success',
234
+          })
235
+          if (ruleFormRef.value) {
236
+            ruleFormRef.value.resetFields();
237
+          }
238
+          dialogVisibletemplate.value=false
239
+        } else {
240
+          ElMessage.error('操作失败!' + response.data.msg)
241
+        }
242
+
243
+      })
244
+    }
245
+  })
246
+}
247
+
248
+/* 组织树选择 */
249
+const showBottom = ref(false)
250
+import OrganizationalWithLeaf from '@/components/OrganizationalWithLeaf.vue';
251
+import { showFailToast, showLoadingToast, showSuccessToast } from 'vant';
252
+const handleTableDataUserDeptUpdate = async (nodeData) => {
253
+  formJieguo.value.drillDept = nodeData.deptCode + '-' + nodeData.deptName
254
+  showBottom.value = false
255
+}
256
+
257
+const addEmergencyDrillPlan = async () => {
258
+  const loadingToast = showLoadingToast({
259
+    duration: 0,
260
+    message: '加载中',
261
+    forbidClick: true
262
+  })
263
+  var url = '/sgsafe/Manager/saveAccident';
264
+  const params = {
265
+    json: JSON.stringify(fromVue.value)
266
+  }
267
+  proxy.$axios.post(url,params).then(res=>{
268
+    if (res.data.code === 0) {
269
+      loadingToast.close()
270
+      showSuccessToast('保存成功')
271
+      onClickLeft()
272
+
273
+    } else {
274
+      loadingToast.close()
275
+      showFailToast('操作失败!' + res.data.msg)
276
+    }
277
+  })
278
+}
279
+const showDatePicker = ref(false)
280
+const onDatePicker = (value) => {
281
+  const dateArr = value.selectedValues
282
+  fromVue.value.checkTime = dateArr[0] + '-' + dateArr[1] + '-' + dateArr[2]
283
+  showDatePicker.value = false
284
+}
285
+const currentDate = ref([2025, 7, 25])
286
+//定义字典集合
287
+const dicList = ref([])
288
+//获取字典集合
289
+// import tools from '@/tools'
290
+const getDicList = () => {
291
+  tools.dic.getDicList(['systemTypes']).then((response => {
292
+
293
+   const rawData = response.data.data
294
+    dicList.value = rawData.systemTypes.map(item => ({
295
+      name: item.dicName,      // 必须有 name 字段!
296
+      code: item.dicCode       // 可选,保留原始 code 供后续使用
297
+    }));
298
+    console.log(JSON.stringify(dicList.value))
299
+  }))
300
+}
301
+onMounted(() => {
302
+  getAccidentDicList()
303
+  console.log('这是编辑页面')
304
+  const today = new Date()
305
+  const year = today.getFullYear()
306
+  const month = today.getMonth() + 1 // 月份从 0 开始
307
+  const day = today.getDate()
308
+  currentDate.value = [year, month, day]
309
+  //selectedDateText.value = `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`
310
+  getDicList()
311
+})
312
+const showActionSheet2=ref(false)
313
+/* 文件上传 */
314
+import AttachmentS3 from '@/components/AttachmentS3.vue';
315
+
316
+const onSubmit = (values) => {
317
+  addEmergencyDrillPlan()
318
+}
319
+const leaderKeyysr = guid();
320
+const PopupDepartmentLeaderNameRefysr = ref();
321
+const handleDepartmentLeaderNameysr = () => {
322
+  PopupDepartmentLeaderNameRefysr.value.open();
323
+};
324
+const getDepartmentLeaderNameysr = (item) => {
325
+  fromVue.value.punCode = item.user.userCode;
326
+  fromVue.value.punName = item.user.userDesc;
327
+  fromVue.value.punId = item.user.id
328
+};
329
+
330
+const onCaseSourceConfirm = ({ selectedOptions }) => {
331
+  caseSourceFlag.value = false;
332
+  fromVue.value.caseSource = selectedOptions[0].text;
333
+};
334
+
335
+const onAccidentLevelConfirm = ({ selectedOptions }) => {
336
+  accidentLevelFlag.value = false;
337
+  fromVue.value.accidentLevel = selectedOptions[0].text;
338
+};
339
+
340
+</script>
341
+
342
+<template>
343
+
344
+  <div class="page-container">
345
+    <van-sticky class="header">
346
+      <van-nav-bar
347
+        :title="title"
348
+        left-text="返回"
349
+        left-arrow
350
+        @click-left="onClickLeft" >
351
+      </van-nav-bar>
352
+    </van-sticky>
353
+    <div class="scroll-container">
354
+      <van-form @submit="onSubmit">
355
+<!--        <van-field-->
356
+<!--          v-model="fromVue.caseNumber"-->
357
+<!--          label="案例编号"-->
358
+<!--          name="caseNumber"-->
359
+<!--          required-->
360
+<!--          placeholder="请输入案例编号"-->
361
+<!--          :rules="[{required: true, message: '请输入文件编号'}]"-->
362
+<!--        />-->
363
+        <van-field
364
+            v-model="generatedCode"
365
+        label="案例编号"
366
+        name="caseNumber"
367
+            :readonly="isCaseSubmitted"
368
+        :rules="[{required: true, message: '编号生成失败,请点击“重新生成”'}]"
369
+        />
370
+
371
+        <van-field
372
+          v-model="fromVue.caseTitle"
373
+          label="案例标题"
374
+          name="caseTitle"
375
+          required
376
+          placeholder="请输入案例标题"
377
+          :rules="[{required: true, message: '请输入文件名称'}]"
378
+        />
379
+
380
+        <van-field
381
+          v-model="fromVue.caseSource"
382
+          readonly
383
+          label="案例来源"
384
+          name="caseSource"
385
+          required
386
+          @click="caseSourceFlag = true"
387
+        />
388
+        <van-field
389
+          readonly
390
+          v-model="fromVue.accidentLevel"
391
+          label="事故等级"
392
+          name="accidentLevel"
393
+          @click="accidentLevelFlag = true"
394
+        />
395
+
396
+
397
+
398
+        <van-field
399
+            v-model="fromVue.accidentDept"
400
+            label="事故单位"
401
+            name="accidentDept"
402
+            required
403
+            placeholder="请输入事故单位"
404
+            :rules="[{required: true, message: '请输入事故单位'}]"
405
+        />
406
+
407
+        <van-field
408
+            v-model="fromVue.accidentLocation"
409
+            label="事故地点"
410
+            name="accidentLocation"
411
+            required
412
+            placeholder="请输入事故地点"
413
+            :rules="[{required: true, message: '请输入事故地点'}]"
414
+        />
415
+
416
+<!--        //时间-->
417
+
418
+<!--        // 标签-->
419
+        <van-field
420
+            v-model="fromVue.casualtyCount"
421
+            label="事故造成后果"
422
+            name="casualtyCount"
423
+            required
424
+            rows="1"
425
+            autosize
426
+            type="textarea"
427
+            placeholder="请输入事故造成后果"
428
+            :rules="[{required: true, message: '请输入事故造成后果'}]"
429
+        />
430
+        <van-field
431
+            v-model="fromVue.accidentSummary"
432
+            label="事故简要经过"
433
+            name="accidentSummary"
434
+            required
435
+            rows="3"
436
+            autosize
437
+            type="textarea"
438
+            placeholder="请输入事故简要经过"
439
+            :rules="[{required: true, message: '请输入事故简要经过'}]"
440
+        />
441
+        <van-field
442
+            v-model="fromVue.preventiveMeasures"
443
+            label="防范与整改措施"
444
+            name="preventiveMeasures"
445
+            required
446
+            rows="3"
447
+            autosize
448
+            type="textarea"
449
+            placeholder="请输入防范与整改措施"
450
+            :rules="[{required: true, message: '请输入防范与整改措施'}]"
451
+        />
452
+
453
+
454
+
455
+        <van-field label="附件上传" >
456
+          <template #input>
457
+            <AttachmentS3 :f-id="result" />
458
+          </template>
459
+        </van-field>
460
+        <div style="margin: 16px;">
461
+          <van-button round block type="primary" native-type="submit">
462
+            {{ isEdit ? '保存' : '提交' }}
463
+          </van-button>
464
+        </div>
465
+      </van-form>
466
+
467
+      <van-action-sheet
468
+        v-model:show="showActionSheet"
469
+        :actions="planLevelList"
470
+        @select="onSelect"
471
+      />
472
+      <van-action-sheet
473
+        v-model:show="showActionSheet2"
474
+        :actions="dicList"
475
+        @select="onSelect2"
476
+      />
477
+
478
+      <van-action-sheet
479
+          v-model:show="caseSourceFlag"
480
+          :actions="accidentDictList.case_source"
481
+          @select="onCaseSourseSelect"
482
+      />
483
+
484
+      <van-popup v-model:show="caseSourceFlag" round position="bottom">
485
+        <van-picker
486
+            :columns="columns"
487
+            @cancel="caseSourceFlag = false"
488
+            @confirm="onCaseSourceConfirm"
489
+        />
490
+      </van-popup>
491
+
492
+      <van-popup v-model:show="accidentLevelFlag" round position="bottom">
493
+        <van-picker
494
+            :columns="columnsLevel"
495
+            @cancel="accidentLevelFlag = false"
496
+            @confirm="onAccidentLevelConfirm"
497
+        />
498
+      </van-popup>
499
+
500
+<!--      <van-action-sheet-->
501
+<!--          v-model:show="accidentLevelFlag"-->
502
+<!--          :actions="accidentDictList.accident_level"-->
503
+<!--          @select="onAccidentLevelSelect"-->
504
+<!--      />-->
505
+
506
+<!--      <van-action-sheet-->
507
+<!--        v-model:show="showActionSheet1"-->
508
+<!--        :actions="planLevelList1"-->
509
+<!--        field-names="{ text: 'fileName', value: 'fileId' }"-->
510
+<!--        @select="onSelect1"-->
511
+<!--      />-->
512
+
513
+      <van-popup v-model:show="showBottom" position="bottom" :style="{ height: '30%' }">
514
+        <OrganizationalWithLeaf @update:selected-node="handleTableDataUserDeptUpdate" />
515
+      </van-popup>
516
+      <van-popup v-model:show="showDatePicker" position="bottom">
517
+        <van-date-picker
518
+          v-model="currentDate"
519
+          @confirm="onDatePicker"
520
+          @cancel="showDatePicker = false" />
521
+      </van-popup>
522
+    </div>
523
+  </div>
524
+</template>
525
+
526
+<style scoped>
527
+.page-container {
528
+  height: 100vh; /* 关键:外层容器高度设为视口高度 */
529
+  display: flex;
530
+  flex-direction: column;
531
+
532
+}
533
+/*  overflow-y: auto; !* 启用垂直滚动 *!*/
534
+
535
+
536
+.scroll-container {
537
+  flex: 1;
538
+  overflow: auto;
539
+  -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
540
+}
541
+
542
+/* 可选:隐藏滚动条(视觉优化) */
543
+.scroll-container::-webkit-scrollbar {
544
+  display: none;
545
+}
546
+
547
+.header, .footer {
548
+  /* 固定高度区域 */
549
+  flex-shrink: 0; /* 防止被压缩 */
550
+  background: #f5f5f5;
551
+  padding: 12px;
552
+}
553
+.row-container {
554
+  display: flex;
555
+  justify-content: space-between; /* 关键:左右分布 */
556
+  align-items: center;             /* 垂直居中 */
557
+
558
+}
559
+
560
+.cell-period-text {
561
+  font-size: 14px;
562
+  color: #333;
563
+  white-space: nowrap;
564
+  overflow: hidden;
565
+  text-overflow: ellipsis;
566
+
567
+}
568
+
569
+.mini-btn {
570
+  height: 22px;
571
+  font-size: 12px;
572
+  padding: 0 8px;
573
+  min-width: 60px;                 /* 可选:保持按钮最小宽度一致 */
574
+}
575
+</style>

+ 67
- 67
src/view/yinhuan/JuBaoheLedger_detail/index.vue Переглянути файл

@@ -22,9 +22,9 @@
22 22
           margin: 0 -10px 10px -10px;">奖励信息</div>
23 23
           <van-field v-model="form.bonusAmount" name="奖励金额" label="奖励金额" :colon="true" readonly clickable @touchstart.stop="showBonusAmount = true" />
24 24
           <van-number-keyboard
25
-            v-model="form.bonusAmount"
26
-            :show="showBonusAmount"
27
-            @blur="showBonusAmount = false"
25
+              v-model="form.bonusAmount"
26
+              :show="showBonusAmount"
27
+              @blur="showBonusAmount = false"
28 28
           />
29 29
           <van-divider :style="{ color: '#7e98b2', borderColor: '#60708a', padding: '0 16px' }" />
30 30
           <van-field border v-model="form.bonusDetail" name="奖励详情" label="奖励详情"
@@ -35,22 +35,22 @@
35 35
           <div style="color: #4C93E6;font-size: 14px;margin-left: 0px;background-color: #f5f5f5;padding: 8px 12px;
36 36
           margin: 0 -10px 10px -10px;">隐患信息</div>
37 37
           <van-field border v-model="form.hdId" name="隐患编号" label="隐患编号" :colon="true" placeholder=""
38
-            :readonly="form.status > 0" />
38
+                     :readonly="form.status > 0" />
39 39
           <van-field is-link :colon="true" readonly v-model="form.hdType" required label="隐患类型" placeholder="选择隐患类型"
40
-            @click="showPicker = true" :rules="[{ required: true, message: '请选择内容' }]" />
40
+                     @click="showPicker = true" :rules="[{ required: true, message: '请选择内容' }]" />
41 41
           <van-popup v-model:show="showPicker" round position="bottom">
42 42
             <van-picker :columns="yhlxs" @cancel="showPicker = false" @confirm="onConfirmYhlx" />
43 43
           </van-popup>
44 44
 
45 45
           <van-field readonly v-model="form.discoveryTime" is-link name="datetime" label="发现时间" :colon="true"
46
-            placeholder="点击选择日期和时间" @click="showDatetimePicker = true" required
47
-            :rules="[{ required: true, message: '请选择内容' }]" />
46
+                     placeholder="点击选择日期和时间" @click="showDatetimePicker = true" required
47
+                     :rules="[{ required: true, message: '请选择内容' }]" />
48 48
           <van-popup v-if="!form.status > 0" v-model:show="showDatetimePicker" position="bottom" round
49
-            style="height: 60%">
49
+                     style="height: 60%">
50 50
             <van-date-picker v-model="currentDate" title="选择日期" :min-date="minDate" :max-date="maxDate"
51
-              @confirm="onDateConfirm" @cancel="showDatetimePicker = false" />
51
+                             @confirm="onDateConfirm" @cancel="showDatetimePicker = false" />
52 52
             <van-time-picker v-model="currentTime" title="选择时间" :columns-type="['hour', 'minute', 'second']"
53
-              @confirm="onTimeConfirm" @cancel="showDatetimePicker = false" />
53
+                             @confirm="onTimeConfirm" @cancel="showDatetimePicker = false" />
54 54
             <div style="display: flex; justify-content: space-between; padding: 10px;">
55 55
               <van-button type="danger" @click="showDatetimePicker = false">取消</van-button>
56 56
               <van-button type="primary" @click="onConfirmDatetime">确定</van-button>
@@ -59,16 +59,16 @@
59 59
           <van-field readonly v-model="form.hdLocation" :colon="true" label="隐患区域" name="隐患区域"
60 60
                      required :rules="[{ required: true, message: '请选择' }]" @click="handleDepartmentLeaderName" />
61 61
           <van-field readonly v-model="form.discovererDesc" :colon="true" label="发现人" name="发现人" placeholder="请选择发现人"
62
-            required :rules="[{ required: true, message: '请选择' }]" @click="handleDepartmentLeaderName" />
62
+                     required :rules="[{ required: true, message: '请选择' }]" @click="handleDepartmentLeaderName" />
63 63
           <OrganizationalWithLeafUserOne v-if="!form.status > 0" ref="PopupDepartmentLeaderNameRef"
64
-            @receive-from-child="getDepartmentLeaderName" :main-key="leaderKey" />
64
+                                         @receive-from-child="getDepartmentLeaderName" :main-key="leaderKey" />
65 65
           <van-field :readonly="form.status > 0" border v-model="form.hdDescription" name="隐患描述" label="隐患描述"
66
-            :colon="true" placeholder="请输入内容" required :rules="[{ required: true, message: '请输入内容' }]" type="textarea"
67
-            rows="1" autosize />
66
+                     :colon="true" placeholder="请输入内容" required :rules="[{ required: true, message: '请输入内容' }]" type="textarea"
67
+                     rows="1" autosize />
68 68
 
69 69
           <van-field v-if="form.hdSelect !== '下发隐患'" is-link :colon="true" readonly v-model="form.hdLevel" required
70
-            label="隐患等级" placeholder="选择等级" @click="showPicker2 = true"
71
-            :rules="[{ required: true, message: '请选择内容' }]" />
70
+                     label="隐患等级" placeholder="选择等级" @click="showPicker2 = true"
71
+                     :rules="[{ required: true, message: '请选择内容' }]" />
72 72
           <van-popup v-if="!form.status > 0" v-model:show="showPicker2" round position="bottom">
73 73
             <van-picker :columns="yhdjs" @cancel="showPicker2 = false" @confirm="onConfirmYhdj" />
74 74
           </van-popup>
@@ -82,23 +82,23 @@
82 82
           <div v-if="form.status > 0" style="color: #4C93E6;font-size: 14px;margin-left: 0px;background-color: #f5f5f5;padding: 8px 12px;
83 83
           margin: 0 -10px 10px -10px;">隐患分析确认</div>
84 84
           <van-field v-if="form.status > 0" readonly v-model="form.repairLeaderDesc" :colon="true" label="整改人"
85
-            name="整改人" placeholder="请选择整改人" required :rules="[{ required: true, message: '请选择' }]"
86
-            @click="handleDepartmentLeaderNamezgr" />
85
+                     name="整改人" placeholder="请选择整改人" required :rules="[{ required: true, message: '请选择' }]"
86
+                     @click="handleDepartmentLeaderNamezgr" />
87 87
           <OrganizationalWithLeafUserOne ref="PopupDepartmentLeaderNameRefzgr"
88
-            @receive-from-child="getDepartmentLeaderNamezgr" :main-key="leaderKeyzgr" />
89
-          
88
+                                         @receive-from-child="getDepartmentLeaderNamezgr" :main-key="leaderKeyzgr" />
89
+
90 90
           <van-field v-if="form.status > 0" border
91
-            v-model="form.repairSuggest" name="整改建议" label="整改建议" :colon="true" placeholder="请输入整改建议" required
92
-            :rules="[{ required: true, message: '请输入整改建议' }]" type="textarea" rows="1" autosize />
91
+                     v-model="form.repairSuggest" name="整改建议" label="整改建议" :colon="true" placeholder="请输入整改建议" required
92
+                     :rules="[{ required: true, message: '请输入整改建议' }]" type="textarea" rows="1" autosize />
93 93
 
94 94
           <van-field v-if="form.status > 0"
95
-            v-model="form.repairDdl" is-link readonly name="datetime" label="整改期限" :colon="true" placeholder="点击选择整改期限"
96
-            @click="showDatetimePicker2 = true" required :rules="[{ required: true, message: '请选择整改期限' }]" />
95
+                     v-model="form.repairDdl" is-link readonly name="datetime" label="整改期限" :colon="true" placeholder="点击选择整改期限"
96
+                     @click="showDatetimePicker2 = true" required :rules="[{ required: true, message: '请选择整改期限' }]" />
97 97
           <van-popup v-model:show="showDatetimePicker2" position="bottom" round style="height: 60%">
98 98
             <van-date-picker v-model="currentDate2" title="选择日期" :min-date="minDate2" :max-date="maxDate2"
99
-              @confirm="onDateConfirm2" @cancel="showDatetimePicker2 = false" />
99
+                             @confirm="onDateConfirm2" @cancel="showDatetimePicker2 = false" />
100 100
             <van-time-picker v-model="currentTime2" title="选择时间" :columns-type="['hour', 'minute', 'second']"
101
-              @confirm="onTimeConfirm2" @cancel="showDatetimePicker2 = false" />
101
+                             @confirm="onTimeConfirm2" @cancel="showDatetimePicker2 = false" />
102 102
             <div style="display: flex; justify-content: space-between; padding: 10px;">
103 103
               <van-button type="danger" @click="showDatetimePicker2 = false">取消</van-button>
104 104
               <van-button type="primary" @click="onConfirmDatetime2">确定</van-button>
@@ -107,48 +107,48 @@
107 107
 
108 108
           <!--        部门选择-->
109 109
           <van-field v-if="form.status > 0" v-model="form.repairDept" label="整改部门"
110
-            placeholder="请选择整改部门" readonly right-icon="arrow-down" @click="showPickerHandle" required
111
-            :rules="[{ required: true, message: '请选择' }]" />
110
+                     placeholder="请选择整改部门" readonly right-icon="arrow-down" @click="showPickerHandle" required
111
+                     :rules="[{ required: true, message: '请选择' }]" />
112 112
           <!--        部门弹出框-->
113 113
           <van-popup v-model:show="showBottom" position="bottom">
114 114
             <OrganizationalWithLeaf @update:selected-node="handleTableDataUserDeptUpdate" />
115 115
           </van-popup>
116 116
 
117 117
           <van-field v-if="form.status > 0 && form.hdSelect !== '即查即改' && false" readonly v-model="form.acceptLeaderDesc"
118
-            :colon="true" label="验收人" name="验收人" placeholder="请选择验收人" required
119
-            :rules="[{ required: true, message: '请选择' }]" @click="handleDepartmentLeaderNameysr" />
118
+                     :colon="true" label="验收人" name="验收人" placeholder="请选择验收人" required
119
+                     :rules="[{ required: true, message: '请选择' }]" @click="handleDepartmentLeaderNameysr" />
120 120
           <OrganizationalWithLeafUserOne ref="PopupDepartmentLeaderNameRefysr"
121
-            @receive-from-child="getDepartmentLeaderNameysr" :main-key="leaderKeyysr" />
121
+                                         @receive-from-child="getDepartmentLeaderNameysr" :main-key="leaderKeyysr" />
122 122
 
123 123
           <van-field v-if="form.status > 0 && form.hdSelect !== '下发隐患' && form.hdSelect !== '即查即改' && false" readonly border
124
-            v-model="form.acceptOtherDesc" name="其他验收人" label="其他验收人" :colon="true" placeholder="请选择其他验收人"
125
-            @click="handleDepartmentLeaderName2qtysr" required :rules="[{ required: true, message: '请选择' }]" />
124
+                     v-model="form.acceptOtherDesc" name="其他验收人" label="其他验收人" :colon="true" placeholder="请选择其他验收人"
125
+                     @click="handleDepartmentLeaderName2qtysr" required :rules="[{ required: true, message: '请选择' }]" />
126 126
           <OrganizationalWithLeafUser ref="PopupDepartmentLeaderNameRef2qtysr"
127
-            @receive-from-child="getDepartmentLeaderName2qtysr" :main-key="leaderKey2qtysr" />
127
+                                      @receive-from-child="getDepartmentLeaderName2qtysr" :main-key="leaderKey2qtysr" />
128 128
 
129 129
           <van-field label-width="300px" v-if="form.status > 1 && form.hdSelect !== '下发隐患'" :colon="true" readonly label="临时管控现场图片" />
130 130
           <AttachmentS3Image style="background-color: white;" v-if="form.status > 1 && form.hdSelect !== '下发隐患'"
131
-            :f-id="form.hdPicId + 'lsgkxctp'" />
131
+                             :f-id="form.hdPicId + 'lsgkxctp'" />
132 132
           <van-field label-width="300px" v-if="form.status > 1 && form.hdSelect !== '即查即改' && form.hdSelect !== '下发隐患'" :colon="true"
133
-            readonly label="临时管控告知书" />
133
+                     readonly label="临时管控告知书" />
134 134
           <AttachmentS3 style="background-color: white;"
135
-            v-if="form.status > 1 && form.hdSelect !== '即查即改' && form.hdSelect !== '下发隐患'"
136
-            :f-id="form.hdPicId + 'lsgkwj'" />
135
+                        v-if="form.status > 1 && form.hdSelect !== '即查即改' && form.hdSelect !== '下发隐患'"
136
+                        :f-id="form.hdPicId + 'lsgkwj'" />
137 137
           <van-field v-if="form.status > 1 && form.hdSelect !== '即查即改' && form.hdSelect !== '下发隐患'" :colon="true"
138
-            readonly label="销号单" />
138
+                     readonly label="销号单" />
139 139
           <AttachmentS3 style="background-color: white;"
140
-            v-if="form.status > 1 && form.hdSelect !== '即查即改' && form.hdSelect !== '下发隐患'"
141
-            :f-id="form.hdPicId + 'xhdwj'" />
140
+                        v-if="form.status > 1 && form.hdSelect !== '即查即改' && form.hdSelect !== '下发隐患'"
141
+                        :f-id="form.hdPicId + 'xhdwj'" />
142 142
           <van-field v-if="form.status > 1" v-model="form.picAfter" :colon="true" readonly label="整改后图片" />
143 143
           <AttachmentS3Image style="background-color: white;" v-if="form.status > 1" :f-id="form.hdPicId + 'zgh'" />
144 144
 
145 145
           <van-field label-width="110px" v-if="form.status > 1" border v-model="form.repairDescription" name="整改后情况描述" label="整改后情况描述"
146
-            :colon="true" placeholder="请输入整改后情况描述" required :rules="[{ required: true, message: '请输入内容' }]"
147
-            type="textarea" rows="1" autosize />
146
+                     :colon="true" placeholder="请输入整改后情况描述" required :rules="[{ required: true, message: '请输入内容' }]"
147
+                     type="textarea" rows="1" autosize />
148 148
 
149 149
           <van-field v-if="form.status > 3 && false" border v-model="form.hdRoot" name="隐患溯源" label="隐患溯源" :colon="true"
150
-            placeholder="请输入隐患溯源" required :rules="[{ required: true, message: '请输入内容' }]" type="textarea" rows="1"
151
-            autosize />
150
+                     placeholder="请输入隐患溯源" required :rules="[{ required: true, message: '请输入内容' }]" type="textarea" rows="1"
151
+                     autosize />
152 152
 
153 153
         </van-form>
154 154
 
@@ -184,32 +184,32 @@
184 184
 
185 185
 
186 186
   <van-dialog v-model:show="showDialog" title="提示" show-cancel-button :confirm-button-text="confirmButtonText"
187
-    :cancel-button-text="cancelButtonText" @confirm="handleJumpRejectStart" @cancel="handleCancel">
187
+              :cancel-button-text="cancelButtonText" @confirm="handleJumpRejectStart" @cancel="handleCancel">
188 188
     <div>确定退回?</div>
189 189
   </van-dialog>
190 190
 
191 191
   <van-dialog v-model:show="showDialog2" title="提示" show-cancel-button :confirm-button-text="confirmButtonText"
192
-    :cancel-button-text="cancelButtonText" @confirm="handleGetBack" @cancel="handleCancel">
192
+              :cancel-button-text="cancelButtonText" @confirm="handleGetBack" @cancel="handleCancel">
193 193
     <div>确定退回?</div>
194 194
   </van-dialog>
195 195
 
196 196
   <van-dialog v-model:show="showDialog3" title="提示" show-cancel-button :confirm-button-text="confirmButtonText"
197
-    :cancel-button-text="cancelButtonText" @confirm="handleStop" @cancel="handleCancel">
197
+              :cancel-button-text="cancelButtonText" @confirm="handleStop" @cancel="handleCancel">
198 198
     <div>确定退回?</div>
199 199
   </van-dialog>
200 200
 
201 201
   <van-dialog v-model:show="showDialog4" title="提示" show-cancel-button :confirm-button-text="confirmButtonText"
202
-    :cancel-button-text="cancelButtonText" @confirm="handleReaded" @cancel="handleCancel">
202
+              :cancel-button-text="cancelButtonText" @confirm="handleReaded" @cancel="handleCancel">
203 203
     <div>确定退回?</div>
204 204
   </van-dialog>
205 205
 
206 206
   <van-dialog v-model:show="showDialog5" title="提示" show-cancel-button :confirm-button-text="confirmButtonText"
207
-    :cancel-button-text="cancelButtonText" @confirm="handleReject" @cancel="handleCancel">
207
+              :cancel-button-text="cancelButtonText" @confirm="handleReject" @cancel="handleCancel">
208 208
     <div>确定退回?</div>
209 209
   </van-dialog>
210 210
 
211 211
   <van-dialog v-model:show="showDialog7" title="提示" show-cancel-button :confirm-button-text="confirmButtonText"
212
-    :cancel-button-text="cancelButtonText" @confirm="handleConfirmSubmitQueDing" @cancel="handleCancel">
212
+              :cancel-button-text="cancelButtonText" @confirm="handleConfirmSubmitQueDing" @cancel="handleCancel">
213 213
     <div>确定退回?</div>
214 214
   </van-dialog>
215 215
 </template>
@@ -323,8 +323,8 @@ const showConfirmDialog7 = () => {
323 323
 const handleConfirmSubmit = (nodeName) => {
324 324
   variables.value = oldVariables.value;
325 325
   if (sessionStorage.getItem('variables') !== null
326
-    && sessionStorage.getItem('variables') !== undefined
327
-    && sessionStorage.getItem('variables') !== '') {
326
+      && sessionStorage.getItem('variables') !== undefined
327
+      && sessionStorage.getItem('variables') !== '') {
328 328
     const newVariables = JSON.parse(sessionStorage.getItem('variables'));
329 329
 
330 330
     variables.value = { ...oldVariables.value, ...newVariables };
@@ -419,13 +419,13 @@ const buttonType = (buttonId) => {
419 419
 };
420 420
 const shouldShowButton = (buttonId) => {
421 421
   return buttonId === 'submit'
422
-    || buttonId === 'reject'
423
-    // || buttonId === 'jumpreject'
424
-    || buttonId === 'jumprejectstart'
425
-    || buttonId === 'stop'
426
-    || buttonId === 'getback'
427
-    || buttonId === 'readed'
428
-    || buttonId === 'move';
422
+      || buttonId === 'reject'
423
+      // || buttonId === 'jumpreject'
424
+      || buttonId === 'jumprejectstart'
425
+      || buttonId === 'stop'
426
+      || buttonId === 'getback'
427
+      || buttonId === 'readed'
428
+      || buttonId === 'move';
429 429
 };
430 430
 
431 431
 import style from '@/tools/style';
@@ -665,8 +665,8 @@ const handleTabsClick = (tab, event, item) => {
665 665
     getHistory();
666 666
   } else if (activeTab.value == 'image') {
667 667
     urlFrame.value =
668
-      `${import.meta.env.VITE_WORKFLOW_ADDR}` + '/horizon-workflow-boot/workflow/module/designer/index.html?workid=' + workId
669
-        .value + '&showtype=2&dataid=' + workId.value;
668
+        `${import.meta.env.VITE_WORKFLOW_ADDR}` + '/horizon-workflow-boot/workflow/module/designer/index.html?workid=' + workId
669
+            .value + '&showtype=2&dataid=' + workId.value;
670 670
   }
671 671
 };
672 672
 
@@ -911,8 +911,8 @@ const variables = ref({});
911 911
 const handlePreSubmit = () => {
912 912
   variables.value = oldVariables.value;
913 913
   if (sessionStorage.getItem('variables') !== null
914
-    && sessionStorage.getItem('variables') !== undefined
915
-    && sessionStorage.getItem('variables') !== '') {
914
+      && sessionStorage.getItem('variables') !== undefined
915
+      && sessionStorage.getItem('variables') !== '') {
916 916
     const newVariables = JSON.parse(sessionStorage.getItem('variables'));
917 917
     variables.value = { ...oldVariables.value, ...newVariables };
918 918
   }
@@ -944,7 +944,7 @@ const handlePreSubmit = () => {
944 944
         // 后续就只有一个节点,不需要选择节点
945 945
         if (nextNodes && nextNodes.length === 1) {
946 946
           if ((nextNodes[0].authors.Author && nextNodes[0].authors.Author.initAuthor)
947
-            || (nextNodes[0].authors.Author && nextNodes[0].authors.Author.selectAuthor === undefined)) {
947
+              || (nextNodes[0].authors.Author && nextNodes[0].authors.Author.selectAuthor === undefined)) {
948 948
 
949 949
             var positions = undefined;
950 950
             var depts = undefined;
@@ -975,7 +975,7 @@ const handlePreSubmit = () => {
975 975
             }
976 976
 
977 977
             if (nextNodes[0].authors.Author.initAuthor === undefined
978
-              && nextNodes[0].authors.Author.selectAuthor === undefined) {
978
+                && nextNodes[0].authors.Author.selectAuthor === undefined) {
979 979
               getDataPost();
980 980
               getDataDeptTree();
981 981
             }
@@ -1385,7 +1385,7 @@ const onConfirmYhdj = ({ selectedOptions }) => {
1385 1385
 };
1386 1386
 
1387 1387
 const yhdjs = ref([{ text: '一般隐患', value: '一般隐患' },
1388
-{ text: '重大隐患', value: '重大隐患' }]
1388
+  { text: '重大隐患', value: '重大隐患' }]
1389 1389
 );
1390 1390
 
1391 1391
 const formRef = ref(null);

Завантаження…
Відмінити
Зберегти