index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. <template>
  2. <div class="dustMonitor">
  3. <customHeader>粉尘监测报表分析</customHeader>
  4. <div class="content-container">
  5. <div class="file-list">
  6. <ul>
  7. <li v-for="item in selectList" :key="item.id" :class="{ selected: item.id === selectedFileId }" @click="handleFileClick(item)">
  8. {{ item.fileName }}
  9. </li>
  10. </ul>
  11. </div>
  12. <div class="table-container">
  13. <a-table :columns="computedColumns" :data-source="tableData" size="small" :pagination="false" :scroll="{ y: 330 }" class="tableW">
  14. <template #bodyCell="{ record, column }">
  15. <template v-if="record[column.dataIndex] === null">
  16. <span>-</span>
  17. </template>
  18. </template>
  19. </a-table>
  20. <div class="tab-container">
  21. <a-tabs v-model:activeKey="activeTab">
  22. <a-tab-pane key="workplace" class="tab1" tab="监测地点粉尘情况分析">
  23. <div class="filter-container" v-if="workplaceList.length > 0">
  24. <a-select
  25. :key="DefaultValue"
  26. :default-value="DefaultValue"
  27. v-model="selectedWorkplace"
  28. @change="workPlaceChange"
  29. placeholder="选择工作场所"
  30. style="width: 280px; margin: 5px"
  31. >
  32. <a-select-option v-for="workplace in workplaceList" :key="workplace.index" :value="workplace">
  33. {{ workplace }}
  34. </a-select-option>
  35. </a-select>
  36. </div>
  37. <a-table
  38. :columns="DataComputedColumns"
  39. :data-source="filteredResultByWorkplace"
  40. :pagination="false"
  41. size="small"
  42. :scroll="updateScrollPosition"
  43. class="tableW"
  44. />
  45. </a-tab-pane>
  46. <a-tab-pane key="overall" class="tab2" tab="当日粉尘情况分析">
  47. <a-table
  48. :columns="AllDataComputedColumns"
  49. :data-source="AllMaxValues"
  50. size="small"
  51. :pagination="false"
  52. :scroll="{ y: 280 }"
  53. class="tableW"
  54. />
  55. </a-tab-pane>
  56. </a-tabs>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </template>
  62. <script setup lang="ts">
  63. import { ref, onMounted, reactive, computed, watch, nextTick } from 'vue';
  64. import {
  65. columns,
  66. Dltcolumns,
  67. Swcolumns,
  68. Hjtcolumns,
  69. Bdcolumns,
  70. Bltcolumns,
  71. dataColumns,
  72. dataDltColumns,
  73. dataSwColumns,
  74. dataHjtColumns,
  75. dataBdColumns,
  76. dataBltColumns,
  77. AllDataColumns,
  78. AllDataDltColumns,
  79. AllDataSwColumns,
  80. AllDataHjtColumns,
  81. AllDataBdColumns,
  82. AllDataBltColumns,
  83. } from './dust-table.data';
  84. import { getDustInfoList, getAllFileList, getAllFileListById } from './dsut-table.api';
  85. import customHeader from '/@/components/vent/customHeader.vue';
  86. import { result } from 'lodash-es';
  87. // import { nextTick } from 'process';
  88. import { useGlobSetting } from '/@/hooks/setting';
  89. let tableData = ref<any[]>([]);
  90. let selectList = ref<any[]>([]);
  91. let resultByWorkplace = ref<any[]>([]);
  92. let AllMaxValues = ref<any[]>([]);
  93. let resultValues = ref<any[]>([]);
  94. let filteredResultByWorkplace = ref<any[]>([]); //根据工作场所查询的数据
  95. let workplaceList = ref<any[]>([]); //根据工作场所查询的数据
  96. let activeTab = ref<string>('workplace');
  97. let selectedFileId = ref<string | null>(null);
  98. let selectedWorkplace = ref<string | null>(null);
  99. let DefaultValue = ref<string | null>(null);
  100. const { sysOrgCode } = useGlobSetting();
  101. let formSearch = reactive({
  102. pageNum: 1,
  103. pageSize: 1000,
  104. id: '',
  105. fileName: '',
  106. });
  107. const updateScrollPosition = computed(() => {
  108. return {
  109. y: workplaceList.value.length > 0 ? 240 : 280,
  110. };
  111. });
  112. //获取粉尘监测列展示数据
  113. const computedColumns = computed(() => {
  114. switch (sysOrgCode) {
  115. case 'sdmtjtbetmk':
  116. return columns; // 布尔台对应的列配置
  117. case 'sdmtjtdltmk':
  118. return Dltcolumns; // 大柳塔对应的列配置
  119. case 'sdmtjtswmk':
  120. return Swcolumns; // 上湾对应的列配置
  121. case 'sdmtjtdltmkhjtj':
  122. return Hjtcolumns; // 活鸡兔对应的列配置
  123. case 'sdmtjtBdmk':
  124. return Bdcolumns; // 保德对应的列配置
  125. case 'sdmtjtbltmk':
  126. return Bltcolumns; // 补连塔对应的列配置
  127. default:
  128. return columns; // 默认情况下返回的列配置
  129. }
  130. });
  131. const AllDataComputedColumns = computed(() => {
  132. switch (sysOrgCode) {
  133. case 'sdmtjtbetmk':
  134. return AllDataColumns; // 布尔台对应的列配置
  135. case 'sdmtjtdltmk':
  136. return AllDataDltColumns; // 大柳塔对应的列配置
  137. case 'sdmtjtswmk':
  138. return AllDataSwColumns; // 上湾对应的列配置
  139. case 'sdmtjtdltmkhjtj':
  140. return AllDataHjtColumns; // 活鸡兔对应的列配置
  141. case 'sdmtjtBdmk':
  142. return AllDataBdColumns; // 保德对应的列配置
  143. case 'sdmtjtbltmk':
  144. return AllDataBltColumns; // 补连塔对应的列配置
  145. default:
  146. return AllDataColumns; // 默认情况下返回的列配置
  147. }
  148. });
  149. const DataComputedColumns = computed(() => {
  150. switch (sysOrgCode) {
  151. case 'sdmtjtbetmk':
  152. return dataColumns; // 布尔台对应的列配置
  153. case 'sdmtjtdltmk':
  154. return dataDltColumns; // 大柳塔对应的列配置
  155. case 'sdmtjtswmk':
  156. return dataSwColumns; // 上湾对应的列配置
  157. case 'sdmtjtdltmkhjtj':
  158. return dataHjtColumns; // 活鸡兔对应的列配置
  159. case 'sdmtjtBdmk':
  160. return dataBdColumns; // 保德对应的列配置
  161. case 'sdmtjtbltmk':
  162. return dataBltColumns; // 补连塔对应的列配置
  163. default:
  164. return dataColumns; // 默认情况下返回的列配置
  165. }
  166. });
  167. //获取粉尘监测结果数据
  168. async function getTableList(params: any) {
  169. let res = await getDustInfoList({ type: 'smoke', ...params });
  170. const content = res.content;
  171. let contentArr = JSON.parse(content);
  172. tableData.value = contentArr;
  173. processTableData(contentArr);
  174. if (workplaceList.value.length > 0) {
  175. console.log(workplaceList.value, 'workplaceList');
  176. DefaultValue.value = workplaceList.value[0];
  177. workPlaceChange(selectedWorkplace.value);
  178. }
  179. }
  180. async function getTableListById(params: any) {
  181. let res = await getAllFileListById({ ...params });
  182. const content = res.content;
  183. let contentArr = JSON.parse(content);
  184. tableData.value = contentArr;
  185. processTableData(contentArr);
  186. if (workplaceList.value.length > 0) {
  187. console.log(workplaceList.value, 'workplaceList');
  188. DefaultValue.value = workplaceList.value[0];
  189. workPlaceChange(selectedWorkplace.value);
  190. }
  191. }
  192. // 处理 tableData 数据
  193. function processTableData(data: any) {
  194. // 根据 gzcs 字段进行分组
  195. const groupedData = data.reduce((acc: any, item: any) => {
  196. if (sysOrgCode === 'sdmtjtbltmk') {
  197. item.gzcs = item.gzm;
  198. }
  199. const workplace = item.gzcs;
  200. if (!acc[workplace]) {
  201. acc[workplace] = [];
  202. }
  203. acc[workplace].push(item);
  204. return acc;
  205. }, {});
  206. // 筛选每个工作场所下的最大值
  207. const result = Object.keys(groupedData).flatMap((workplace) => {
  208. const items = groupedData[workplace];
  209. const maxValues = [
  210. { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  211. { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  212. { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  213. { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  214. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  215. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  216. { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  217. { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  218. { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  219. { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  220. ];
  221. const DltMaxValues = [
  222. { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  223. { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  224. { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  225. { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  226. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  227. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  228. ];
  229. const SwMaxValues = [
  230. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  231. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  232. ];
  233. const HjtMaxValues = [
  234. { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  235. { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  236. { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  237. { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  238. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  239. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  240. ];
  241. const BdMaxValues = [
  242. { key: 'qc', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  243. { key: 'hc', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
  244. ];
  245. const BltMaxValues = [
  246. { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', scgy: '', gzcs: workplace },
  247. { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', scgy: '', gzcs: workplace },
  248. ];
  249. items.forEach((item: any) => {
  250. maxValues.forEach((maxValue) => {
  251. if (item[maxValue.key] > maxValue.value) {
  252. maxValue.value = item[maxValue.key];
  253. maxValue.gz = item.gz;
  254. maxValue.jcdd = item.jcdd;
  255. maxValue.fczl = item.fczl;
  256. }
  257. });
  258. DltMaxValues.forEach((maxValue) => {
  259. if (item[maxValue.key] > maxValue.value) {
  260. maxValue.value = item[maxValue.key];
  261. maxValue.gz = item.gz;
  262. maxValue.jcdd = item.jcdd;
  263. maxValue.fczl = item.fczl;
  264. maxValue.gzcs = item.gzcs;
  265. }
  266. });
  267. SwMaxValues.forEach((maxValue) => {
  268. if (item[maxValue.key] > maxValue.value) {
  269. maxValue.value = item[maxValue.key];
  270. maxValue.gz = item.gz;
  271. maxValue.jcdd = item.jcdd;
  272. maxValue.fczl = item.fczl;
  273. maxValue.gzcs = item.gzcs;
  274. }
  275. });
  276. HjtMaxValues.forEach((maxValue) => {
  277. if (item[maxValue.key] > maxValue.value) {
  278. maxValue.value = item[maxValue.key];
  279. maxValue.gz = item.gz;
  280. maxValue.jcdd = item.jcdd;
  281. maxValue.fczl = item.fczl;
  282. maxValue.gzcs = item.gzcs;
  283. }
  284. });
  285. BdMaxValues.forEach((maxValue) => {
  286. if (item[maxValue.key] > maxValue.value) {
  287. maxValue.value = item[maxValue.key];
  288. maxValue.gz = item.gz;
  289. maxValue.jcdd = item.jcdd;
  290. maxValue.fczl = item.fczl;
  291. maxValue.gzcs = item.gzcs;
  292. }
  293. });
  294. BltMaxValues.forEach((maxValue) => {
  295. if (item[maxValue.key] > maxValue.value) {
  296. maxValue.value = item[maxValue.key];
  297. maxValue.gz = item.gz;
  298. maxValue.jcdd = item.jcdd;
  299. maxValue.scgy = item.scgy;
  300. maxValue.gzcs = item.gzcs;
  301. }
  302. });
  303. });
  304. switch (sysOrgCode) {
  305. case 'sdmtjtbetmk':
  306. return maxValues; // 布尔台对应的列配置
  307. case 'sdmtjtdltmk':
  308. return DltMaxValues; // 大柳塔对应的列配置
  309. case 'sdmtjtswmk':
  310. return SwMaxValues; // 上湾对应的列配置
  311. case 'sdmtjtdltmkhjtj':
  312. return HjtMaxValues; // 活鸡兔对应的列配置
  313. case 'sdmtjtBdmk':
  314. return BdMaxValues; // 保德对应的列配置
  315. case 'sdmtjtbltmk':
  316. return BltMaxValues; // 补连塔对应的列配置
  317. default:
  318. return maxValues; // 默认情况下返回的列配置
  319. }
  320. });
  321. resultByWorkplace.value = result;
  322. workplaceList.value = Array.from(new Set(resultByWorkplace.value.map((item) => item.gzcs)));
  323. if (workplaceList.value.length > 0) {
  324. selectedWorkplace.value = workplaceList.value[0];
  325. workPlaceChange(selectedWorkplace.value);
  326. }
  327. // 筛选整个 tableData 下的最大值
  328. const overallMaxValues = [
  329. { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  330. { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  331. { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  332. { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  333. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  334. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  335. { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  336. { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  337. { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  338. { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  339. ];
  340. const overallDltMaxValues = [
  341. { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  342. { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  343. { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  344. { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  345. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  346. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  347. ];
  348. const overallSwMaxValues = [
  349. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  350. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  351. ];
  352. const overallHjtMaxValues = [
  353. { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  354. { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  355. { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  356. { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  357. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  358. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  359. ];
  360. const overallBdMaxValues = [
  361. { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  362. { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
  363. ];
  364. const overallBltMaxValues = [
  365. { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', scgy: '', gzcs: '' },
  366. { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', scgy: '', gzcs: '' },
  367. ];
  368. data.forEach((item: any) => {
  369. overallMaxValues.forEach((maxValue) => {
  370. if (item[maxValue.key] > maxValue.value) {
  371. maxValue.value = item[maxValue.key];
  372. maxValue.gz = item.gz;
  373. maxValue.jcdd = item.jcdd;
  374. maxValue.fczl = item.fczl;
  375. maxValue.gzcs = item.gzcs;
  376. }
  377. });
  378. overallDltMaxValues.forEach((maxValue) => {
  379. if (item[maxValue.key] > maxValue.value) {
  380. maxValue.value = item[maxValue.key];
  381. maxValue.gz = item.gz;
  382. maxValue.jcdd = item.jcdd;
  383. maxValue.fczl = item.fczl;
  384. maxValue.gzcs = item.gzcs;
  385. }
  386. });
  387. overallSwMaxValues.forEach((maxValue) => {
  388. if (item[maxValue.key] > maxValue.value) {
  389. maxValue.value = item[maxValue.key];
  390. maxValue.gz = item.gz;
  391. maxValue.jcdd = item.jcdd;
  392. maxValue.fczl = item.fczl;
  393. maxValue.gzcs = item.gzcs;
  394. }
  395. });
  396. overallHjtMaxValues.forEach((maxValue) => {
  397. if (item[maxValue.key] > maxValue.value) {
  398. maxValue.value = item[maxValue.key];
  399. maxValue.gz = item.gz;
  400. maxValue.jcdd = item.jcdd;
  401. maxValue.fczl = item.fczl;
  402. maxValue.gzcs = item.gzcs;
  403. }
  404. });
  405. overallBdMaxValues.forEach((maxValue) => {
  406. if (item[maxValue.key] > maxValue.value) {
  407. maxValue.value = item[maxValue.key];
  408. maxValue.gz = item.gz;
  409. maxValue.jcdd = item.jcdd;
  410. maxValue.fczl = item.fczl;
  411. maxValue.gzcs = item.gzcs;
  412. }
  413. });
  414. overallBltMaxValues.forEach((maxValue) => {
  415. if (item[maxValue.key] > maxValue.value) {
  416. maxValue.value = item[maxValue.key];
  417. maxValue.gz = item.gz;
  418. maxValue.jcdd = item.jcdd;
  419. maxValue.scgy = item.scgy;
  420. maxValue.gzcs = item.gzcs;
  421. }
  422. });
  423. });
  424. AllMaxValues = computed(() => {
  425. switch (sysOrgCode) {
  426. case 'sdmtjtbetmk':
  427. return overallMaxValues; // 布尔台对应的列配置
  428. case 'sdmtjtdltmk':
  429. return overallDltMaxValues; // 大柳塔对应的列配置
  430. case 'sdmtjtswmk':
  431. return overallSwMaxValues; // 上湾对应的列配置
  432. case 'sdmtjtdltmkhjtj':
  433. return overallHjtMaxValues; // 活鸡兔对应的列配置
  434. case 'sdmtjtBdmk':
  435. return overallBdMaxValues; // 保德对应的列配置
  436. case 'sdmtjtbltmk':
  437. return overallBltMaxValues; // 补连塔对应的列配置
  438. default:
  439. return overallMaxValues; // 默认情况下返回的列配置
  440. }
  441. });
  442. }
  443. //获取所有文件列表
  444. async function getAllFile() {
  445. let res = await getAllFileList({ type: 'smoke' });
  446. selectList.value = res.records.map((item: any) => ({
  447. id: item.id,
  448. fileName: item.fileName,
  449. }));
  450. if (selectList.value.length > 0) {
  451. formSearch.id = selectList.value[0].id;
  452. getSearch();
  453. }
  454. }
  455. //查询
  456. // 处理文件点击事件
  457. function handleFileClick(item: any) {
  458. formSearch.id = item.id;
  459. formSearch.fileName = item.fileName;
  460. selectedFileId.value = item.id;
  461. getSearch();
  462. }
  463. function getSearch() {
  464. // const selectedFile = selectList.value.find((item) => item.id === formSearch.id);
  465. const params = {
  466. id: formSearch.id,
  467. // fileName: selectedFile ? selectedFile.fileName : '',
  468. };
  469. getTableListById(params);
  470. // getTableList(params);
  471. }
  472. function workPlaceChange(value: any) {
  473. selectedWorkplace.value = value;
  474. filteredResultByWorkplace.value = resultByWorkplace.value.filter((item) => item.gzcs === value);
  475. }
  476. onMounted(() => {
  477. getTableList({ type: 'smoke' });
  478. getAllFile().then(() => {
  479. if (selectList.value.length > 0) {
  480. formSearch.id = selectList.value[0].id;
  481. selectedFileId.value = selectList.value[0].id;
  482. getSearch();
  483. }
  484. });
  485. });
  486. </script>
  487. <style lang="less" scoped>
  488. @import '/@/design/theme.less';
  489. .content-container {
  490. display: flex;
  491. width: 100%;
  492. height: 100%;
  493. padding-top: 54px;
  494. }
  495. .file-list {
  496. width: 20%;
  497. padding: 10px;
  498. margin-right: 10px;
  499. margin-bottom: 40px;
  500. border: 1px solid #99e8ff66;
  501. background: #27546e1a;
  502. box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
  503. -moz-box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
  504. -webkit-box-shadow: 0px 0px 50px 1px rgb(149 235 255 / 5%) inset;
  505. }
  506. .file-list ul {
  507. list-style: none;
  508. padding: 0;
  509. }
  510. .file-list li {
  511. color: #fff;
  512. padding: 5px;
  513. cursor: pointer;
  514. }
  515. .file-list li:hover,
  516. .file-list li.selected {
  517. background: #1c4869;
  518. }
  519. .table-container {
  520. margin-top: 10px;
  521. width: 80%;
  522. box-sizing: border-box;
  523. }
  524. .tab-container {
  525. display: flex;
  526. align-items: center;
  527. padding-top: 50px;
  528. }
  529. .tab-container .ant-tabs {
  530. flex-grow: 1;
  531. }
  532. :deep(.zxm-tabs-nav) {
  533. margin: 0 !important;
  534. .zxm-tabs-tab {
  535. width: 180px;
  536. height: 45px;
  537. background: url('@/assets/images/defaultbg.png') center no-repeat;
  538. background-size: 100%;
  539. display: flex;
  540. justify-content: center;
  541. font-size: 16px;
  542. margin-right: 10px;
  543. }
  544. .zxm-tabs-tab-active {
  545. width: 180px;
  546. position: relative;
  547. background: url('@/assets/images/selected.png') center no-repeat;
  548. background-size: 100%;
  549. .zxm-tabs-tab-btn {
  550. color: #fff !important;
  551. }
  552. }
  553. .zxm-tabs-ink-bar {
  554. width: 0 !important;
  555. }
  556. .zxm-tabs-tab + .zxm-tabs-tab {
  557. margin: 0 !important;
  558. }
  559. }
  560. .dustMonitor {
  561. width: 100%;
  562. height: 100%;
  563. padding: 10px 10px 15px 10px;
  564. box-sizing: border-box;
  565. position: relative;
  566. }
  567. :deep(.zxm-table-thead > tr > th:last-child) {
  568. border-right: 1px solid #91e9fe !important;
  569. }
  570. :deep(.zxm-picker-input > input) {
  571. color: #fff;
  572. }
  573. :deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
  574. border: 1px solid var(--vent-form-item-border) !important;
  575. background-color: #ffffff00 !important;
  576. }
  577. :deep(.zxm-select-selection-item) {
  578. color: #fff !important;
  579. }
  580. </style>