|
|
@@ -2,44 +2,6 @@
|
|
2
|
2
|
<basic-container>
|
|
3
|
3
|
<el-form class="whole_form">
|
|
4
|
4
|
<el-row :gutter="20">
|
|
5
|
|
- <el-col :span="6" v-if="userInfo.deptType === '1'">
|
|
6
|
|
- <el-form-item label="省份">
|
|
7
|
|
- <el-select v-model="searchList.provinceSiteIdList" filterable clearable multiple>
|
|
8
|
|
- <el-option v-for="item in provinceList" :key="item.id" :label="item.name" :value="item.code" />
|
|
9
|
|
- </el-select>
|
|
10
|
|
- </el-form-item>
|
|
11
|
|
- </el-col>
|
|
12
|
|
- <el-col :span="6" v-if="userInfo.deptType === '1'">
|
|
13
|
|
- <el-form-item label="储备仓库">
|
|
14
|
|
- <el-select
|
|
15
|
|
- multiple
|
|
16
|
|
- filterable
|
|
17
|
|
- clearable
|
|
18
|
|
- v-model="searchList.warehouseDeptId"
|
|
19
|
|
- :disabled="!searchList.gameDeptId"
|
|
20
|
|
- :placeholder="!searchList.gameDeptId ? '请先选择垂管局' : '请选择储备仓库'"
|
|
21
|
|
- >
|
|
22
|
|
- <el-option
|
|
23
|
|
- v-for="item in warehouseList"
|
|
24
|
|
- :key="item.deptId"
|
|
25
|
|
- :label="item.abbreviationName"
|
|
26
|
|
- :value="item.deptId"
|
|
27
|
|
- />
|
|
28
|
|
- </el-select>
|
|
29
|
|
- </el-form-item>
|
|
30
|
|
- </el-col>
|
|
31
|
|
- <el-col :span="6" v-if="userInfo.deptType === '2'">
|
|
32
|
|
- <el-form-item label="储备仓库">
|
|
33
|
|
- <el-select v-model="searchList.warehouseDeptId" multiple clearable placeholder="请选择储备仓库">
|
|
34
|
|
- <el-option
|
|
35
|
|
- v-for="item in warehouseList"
|
|
36
|
|
- :key="item.deptId"
|
|
37
|
|
- :label="item.abbreviationName"
|
|
38
|
|
- :value="item.deptId"
|
|
39
|
|
- />
|
|
40
|
|
- </el-select>
|
|
41
|
|
- </el-form-item>
|
|
42
|
|
- </el-col>
|
|
43
|
5
|
<el-col :span="6">
|
|
44
|
6
|
<el-form-item label="物资名称">
|
|
45
|
7
|
<el-input v-model="searchList.dmUpname2" clearable />
|
|
|
@@ -240,28 +202,30 @@ const { Storage_state } = useDict("Storage_state");
|
|
240
|
202
|
const tableData: any = ref([]);
|
|
241
|
203
|
const tableLoading = ref(false);
|
|
242
|
204
|
const searchList: any = ref({
|
|
243
|
|
- gameDeptId: [],
|
|
244
|
|
- warehouseDeptId: [],
|
|
245
|
|
- dmUpname2: "",
|
|
246
|
|
- provinceSiteIdList: []
|
|
|
205
|
+ dmUpname2: ""
|
|
247
|
206
|
});
|
|
248
|
207
|
const mergeObj: any = ref({});
|
|
249
|
208
|
const cityList: any = ref([]);
|
|
250
|
209
|
const warehouseList: any = ref([]);
|
|
251
|
210
|
const suppliesList: any = ref([]);
|
|
252
|
211
|
const provinceList: any = ref([]);
|
|
253
|
|
-
|
|
|
212
|
+import { getQuery } from "@/hooks/detailQuery/index";
|
|
254
|
213
|
const { userInfo } = useGetters(["userInfo"]);
|
|
255
|
|
-const props = defineProps({
|
|
256
|
|
- payload: {
|
|
257
|
|
- type: Array,
|
|
258
|
|
- default: () => []
|
|
259
|
|
- },
|
|
260
|
|
- fileName: {
|
|
261
|
|
- type: String,
|
|
262
|
|
- default: ""
|
|
263
|
|
- }
|
|
264
|
|
-});
|
|
|
214
|
+const props = getQuery("/dataStatistics/WarningDetail");
|
|
|
215
|
+// const props = defineProps({
|
|
|
216
|
+// payload: {
|
|
|
217
|
+// type: Array,
|
|
|
218
|
+// default: () => []
|
|
|
219
|
+// },
|
|
|
220
|
+// fileName: {
|
|
|
221
|
+// type: String,
|
|
|
222
|
+// default: ""
|
|
|
223
|
+// },
|
|
|
224
|
+// deptId: {
|
|
|
225
|
+// type: String,
|
|
|
226
|
+// default: ""
|
|
|
227
|
+// }
|
|
|
228
|
+// });
|
|
265
|
229
|
|
|
266
|
230
|
if (userInfo.value.deptType === "1") {
|
|
267
|
231
|
// 获取垂管局列表
|
|
|
@@ -277,7 +241,7 @@ if (userInfo.value.deptType === "1") {
|
|
277
|
241
|
// 获取储备仓库
|
|
278
|
242
|
let postData = {
|
|
279
|
243
|
parentIdList: [userInfo.value.deptId],
|
|
280
|
|
- warehouseType: props.fileName.substr(0, 2) == "救灾" ? 200 : 100
|
|
|
244
|
+ warehouseType: props.dmUpcode0List
|
|
281
|
245
|
};
|
|
282
|
246
|
getCityList(postData).then((res: any) => {
|
|
283
|
247
|
if (res.code === 0) {
|
|
|
@@ -293,7 +257,7 @@ if (userInfo.value.deptType === "1") {
|
|
293
|
257
|
const getSupplies = (value: string) => {
|
|
294
|
258
|
let postData = {
|
|
295
|
259
|
parentIdList: value,
|
|
296
|
|
- warehouseType: props.fileName.substr(0, 2) == "救灾" ? 200 : 100
|
|
|
260
|
+ warehouseType: props.dmUpcode0List
|
|
297
|
261
|
};
|
|
298
|
262
|
getCityList(postData).then((res: any) => {
|
|
299
|
263
|
if (res.code === 0) {
|
|
|
@@ -302,34 +266,21 @@ const getSupplies = (value: string) => {
|
|
302
|
266
|
});
|
|
303
|
267
|
};
|
|
304
|
268
|
|
|
305
|
|
-// 获取物资类别
|
|
306
|
|
-getSysTreeDict({ type: 1, difference: 2, parentCodeList: props.payload }).then((res: any) => {
|
|
307
|
|
- if (res.code === 0) {
|
|
308
|
|
- suppliesList.value = res.data;
|
|
309
|
|
- }
|
|
310
|
|
-});
|
|
311
|
|
-// 获取省份
|
|
312
|
|
-getSysTreeDict({ type: 2, difference: 1 }).then((res: any) => {
|
|
313
|
|
- if (res.code === 0) {
|
|
314
|
|
- provinceList.value = res.data;
|
|
315
|
|
- }
|
|
316
|
|
-});
|
|
317
|
|
-
|
|
318
|
269
|
const clearSearch = () => {
|
|
319
|
270
|
searchList.value = {
|
|
320
|
|
- gameDeptId: [],
|
|
321
|
|
- warehouseDeptId: [],
|
|
322
|
|
- dmUpname2: "",
|
|
323
|
|
- provinceSiteIdList: []
|
|
|
271
|
+ dmUpname2: ""
|
|
324
|
272
|
};
|
|
325
|
273
|
getList();
|
|
326
|
274
|
};
|
|
327
|
275
|
|
|
328
|
276
|
// 获取表格数据
|
|
329
|
277
|
const getList = () => {
|
|
|
278
|
+ console.log(props.deptId, "props.deptId");
|
|
330
|
279
|
const data = {
|
|
331
|
|
- dmUpcode0List: props.payload,
|
|
332
|
|
- ...searchList.value
|
|
|
280
|
+ dmUpcode0List: props.dmUpcode0List,
|
|
|
281
|
+ ...searchList.value,
|
|
|
282
|
+ isDetails: true,
|
|
|
283
|
+ deptId: props.deptId
|
|
333
|
284
|
};
|
|
334
|
285
|
tableLoading.value = true;
|
|
335
|
286
|
getDetaWarninglList(data).then((res: any) => {
|
|
|
@@ -341,17 +292,24 @@ const getList = () => {
|
|
341
|
292
|
};
|
|
342
|
293
|
|
|
343
|
294
|
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }: any) => {
|
|
344
|
|
- if (columnIndex === 1) {
|
|
345
|
|
- if (rowIndex % 2 === 0) {
|
|
346
|
|
- return {
|
|
347
|
|
- rowspan: 2,
|
|
348
|
|
- colspan: 1
|
|
349
|
|
- };
|
|
|
295
|
+ if (columnIndex === 1 || columnIndex === 2) {
|
|
|
296
|
+ const currentValue = row[column.property];
|
|
|
297
|
+ const preRow = tableData.value[rowIndex - 1];
|
|
|
298
|
+ const preValue = preRow ? preRow[column.property] : null;
|
|
|
299
|
+ if (currentValue === preValue) {
|
|
|
300
|
+ return { rowspan: 0, colspan: 0 };
|
|
350
|
301
|
} else {
|
|
351
|
|
- return {
|
|
352
|
|
- rowspan: 0,
|
|
353
|
|
- colspan: 0
|
|
354
|
|
- };
|
|
|
302
|
+ let rowspan = 1;
|
|
|
303
|
+ for (let i = rowIndex + 1; i < tableData.value.length; i++) {
|
|
|
304
|
+ const nextRow = tableData.value[i];
|
|
|
305
|
+ const nextValue = nextRow[column.property];
|
|
|
306
|
+ if (nextValue === currentValue) {
|
|
|
307
|
+ rowspan++;
|
|
|
308
|
+ } else {
|
|
|
309
|
+ break;
|
|
|
310
|
+ }
|
|
|
311
|
+ }
|
|
|
312
|
+ return { rowspan, colspan: 1 };
|
|
355
|
313
|
}
|
|
356
|
314
|
}
|
|
357
|
315
|
};
|