diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Card1/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Card1/index.vue index ce415288..2f04db6d 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Card1/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Card1/index.vue @@ -6,7 +6,7 @@ {{ item.label }}: - {{ cardData[item.key] || '-' }} + {{ getValue(item.key) }}

@@ -28,6 +28,7 @@ diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue index d0f92ec8..d1d558e2 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue @@ -62,7 +62,7 @@ export default { */ dFormData: { type: Object, - default: () => {} + default: () => { } }, formList: { type: Array, @@ -101,7 +101,7 @@ export default { }, created() { this.reset(true); - if(this.dFormData) { + if (this.dFormData) { this.modelFormData = this.dFormData; } }, @@ -231,7 +231,7 @@ export default { align-content: start; width: 100%; gap: 15px 15px; - overflow-x: hidden; + // overflow-x: hidden; padding-right: 9px; .formItem { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue index 7d5b68cf..76001a59 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue @@ -6,7 +6,7 @@ -
+
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/components/PeopleCard/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/components/PeopleCard/index.vue index 32b322a0..f37de983 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/components/PeopleCard/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/components/PeopleCard/index.vue @@ -4,8 +4,8 @@

- {{ item.label }}: - {{ cardData[item.key] }} + {{ item.label || '-' }}: + {{ cardData[item.key] || '-' }}

@@ -29,17 +29,13 @@ export default { cardData: { type: Object, default: () => ({ - source: "济菏运管中心", - name: "王亮亮", - work: "主任", - number: "18666666666" }) }, keyMap: { type: Array, default: () => ([ { - key: "source", + key: "organizationName", label: "机构" }, { @@ -47,11 +43,11 @@ export default { label: "姓名" }, { - key: "work", + key: "postName", label: "岗位" }, { - key: "number", + key: "contactNumber", label: "电话" } ]) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/index.vue index 7e417934..9a0a4ae3 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/index.vue @@ -5,13 +5,14 @@
- +
@@ -36,6 +37,15 @@ export default { FirstResponders, JurisdictionalManagement }, + provide() { + return { + getPagination: () => ({ + pageSize: this.pageSize || 30, + pageNum: this.pageNum || 1 + }), + setTotal: (total) => this.total = total + } + }, data() { return { activeName: "FirstResponders", @@ -56,13 +66,21 @@ export default { label: "辖段管理", key: "JurisdictionalManagement" }, - ] + ], + total: 0 } }, methods: { handleSelect(activeName) { + this.pageNum = 1; this.activeName = activeName; - } + }, + handleSizeChange(size) { + this.pageNum = size; + }, + handleCurrentChange(currentPage) { + this.pageNum = currentPage; + }, } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/data.js new file mode 100644 index 00000000..02af7c09 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/data.js @@ -0,0 +1,22 @@ +// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; + +export const searchFormList = [ + // { + // label: "岗位:", + // key: "postId", + // type: "select", + // options: { + // clearable: true, + // options: [], + // }, + // }, + // { + // label: "机构:", + // key: "organizationId", + // type: "select", + // options: { + // clearable: true, + // options: [], + // }, + // }, +]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue index eaba71cf..d8785e24 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue @@ -28,10 +28,12 @@
- +
+ - + 导出 - + @@ -22,20 +22,25 @@ - +
- - - + + +
@@ -46,8 +51,14 @@ import InputSearch from '@screen/components/InputSearch/index.vue'; import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; import Button from '@screen/components/Buttons/Button.vue'; +import { searchFormList } from "./data"; +import request from "@/utils/request"; +import { setLoading } from "@screen/utils/index.js" +import { delay } from "@screen/utils/common"; + export default { name: 'EmergencyAgencies', + inject: ['getPagination', 'setTotal'], components: { Card, ButtonGradient, @@ -56,12 +67,65 @@ export default { }, data() { return { - data: Array.from({ length: 20 }).map(() => ({ - source: "济菏运管中心", - location: "长清大学城收费站", - direction: "117.123456", - direction2: "37.12234", - })), + searchFormList, + // data: Array.from({ length: 20 }).map(() => ({ + // source: "济菏运管中心", + // location: "长清大学城收费站", + // direction: "117.123456", + // direction2: "37.12234", + // })), + data: [], + keyMap: [ + { + key: "dcOrganizations.organizationName", + label: "机构名称" + }, + { + key: "dcOrganizations.organizationAddress", + label: "机构地址" + }, + { + key: "coordinate.longitude", + label: "经度" + }, + { + key: "coordinate.longitude", + label: "纬度" + }, + { + key: "dcOrganizations.latitude", + label: "救援外协单位" + }] + } + }, + created() { + this.getData(); + }, + methods: { + handleSearch(data) { + this.searchData = data; + this.getData(); + }, + async getData() { + const closeLoading = setLoading(); + + await delay(150); + + request({ + url: `/business/organization/list`, + method: "get", + params: { + ...this.searchData, + ...this.getPagination() + } + }).then(result => { + if (result.code != 200) return; + + this.data = result.data; + this.total = result.total; + }).finally(() => { + closeLoading(); + }) } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/data.js index 3cb25cff..822cb016 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/data.js @@ -3,18 +3,20 @@ export const searchFormList = [ { label: "岗位:", - key: "key009", + key: "postId", type: "select", options: { - type: "daterange", + clearable: true, + options: [], }, }, { - label: "驻点:", - key: "key018", + label: "机构:", + key: "organizationId", type: "select", options: { - type: "daterange", + clearable: true, + options: [], }, }, ]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue index a94333cc..59e489ae 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue @@ -14,7 +14,7 @@ 导出
- + @@ -22,11 +22,15 @@ - +
- + +
@@ -35,7 +39,11 @@ import PeopleCard from "./../../components/PeopleCard/index.vue"; import InputSearch from '@screen/components/InputSearch/index.vue'; import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; + import { searchFormList } from "./data"; +import request from "@/utils/request"; +import { setLoading } from "@screen/utils/index.js" +import { delay } from "@screen/utils/common"; export default { name: 'FirstResponders', @@ -44,9 +52,75 @@ export default { ButtonGradient, InputSearch }, + inject: ['getPagination', 'setTotal'], data() { return { - searchFormList + searchFormList, + data: [] + } + }, + created() { + this.getData(); + this.getSearchOptions(); + }, + methods: { + getSearchOptions() { + Promise.allSettled([ + // 岗位 + request({ + url: `/business/employees/sysPost`, + method: "post", + data: {} + }), + + // 机构 + request({ + url: `/business/employees/organization`, + method: "post", + data: {} + }) + ]) + .then(([post, organization]) => { + if (post.status === 'fulfilled' && post.value.code == 200) { + this.searchFormList[0].options.options = post.value.data.map(item => ({ + key: item.postId, + label: item.postName, + })) + } + if (organization.status === 'fulfilled' && organization.value.code == 200) { + this.searchFormList[1].options.options = organization.value.data.map(item => ({ + key: item.id, + label: item.organizationName, + })) + } + + console.log(this.searchFormList) + + }) + }, + handleSearch(data) { + this.searchData = data; + this.getData(); + }, + async getData() { + const closeLoading = setLoading(); + + await delay(150); + + request({ + url: `/business/employees/list`, + method: "get", + params: { + ...this.searchData, + ...this.getPagination() + } + }).then(result => { + if (result.code != 200) return; + this.data = result.rows; + this.total = result.total; + }).finally(() => { + closeLoading(); + }) } } } @@ -62,6 +136,7 @@ export default { // grid-auto-flow: row; justify-content: space-between; grid-auto-rows: minmax(270px, max-content); + position: relative; } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js new file mode 100644 index 00000000..02af7c09 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js @@ -0,0 +1,22 @@ +// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; + +export const searchFormList = [ + // { + // label: "岗位:", + // key: "postId", + // type: "select", + // options: { + // clearable: true, + // options: [], + // }, + // }, + // { + // label: "机构:", + // key: "organizationId", + // type: "select", + // options: { + // clearable: true, + // options: [], + // }, + // }, +]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue index 29afc82b..14bb764a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue @@ -14,7 +14,7 @@ 导出
- + @@ -22,24 +22,30 @@ - +
- - - + + + +
@@ -51,6 +57,11 @@ import EditEventInformationDialog from "./components/EditEventInformationDialog/ import InputSearch from '@screen/components/InputSearch/index.vue'; import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; +import { searchFormList } from "./data"; +import request from "@/utils/request"; +import { setLoading } from "@screen/utils/index.js" +import { delay } from "@screen/utils/common"; + export default { name: 'JurisdictionalManagement', components: { @@ -59,11 +70,12 @@ export default { ButtonGradient, InputSearch }, + inject: ['getPagination', 'setTotal'], data() { return { keyMap: [ { - key: "source", + key: "sectionName", label: "路段名称" }, { @@ -71,28 +83,94 @@ export default { label: "路段桩号" }, { - key: "time", + key: "createTime", label: "采集时间" }, { - key: "km", + key: "mileage", label: "路段里程" } ], - data: Array.from({ length: 20 }).map(() => ({ - time: "2023.12.22 13:00:00", - source: "视频智能识别", - location: "k100+000", - km: "13.588km", - direction2: "37.12234", - state: (() => { - const min = 1; - const max = 5; - return Math.floor(Math.random() * (max - min + 1)) + min; - })() - })), + // data: Array.from({ length: 20 }).map(() => ({ + // time: "2023.12.22 13:00:00", + // source: "视频智能识别", + // location: "k100+000", + // km: "13.588km", + // direction2: "37.12234", + // state: (() => { + // const min = 1; + // const max = 5; + // return Math.floor(Math.random() * (max - min + 1)) + min; + // })() + // })), + data: [], editEventInformationDialogVisible: false } + }, + created() { + this.getData(); + // this.getSearchOptions(); + }, + methods: { + getSearchOptions() { + Promise.allSettled([ + // 岗位 + request({ + url: `/business/employees/sysPost`, + method: "post", + data: {} + }), + + // 机构 + request({ + url: `/business/employees/organization`, + method: "post", + data: {} + }) + ]) + .then(([post, organization]) => { + if (post.status === 'fulfilled' && post.value.code == 200) { + this.searchFormList[0].options.options = post.value.data.map(item => ({ + key: item.postId, + label: item.postName, + })) + } + + if (organization.status === 'fulfilled' && organization.value.code == 200) { + this.searchFormList[1].options.options = organization.value.data.map(item => ({ + key: item.id, + label: item.organizationName, + })) + } + + console.log(this.searchFormList) + + }) + }, + handleSearch(data) { + this.searchData = data; + this.getData(); + }, + async getData() { + const closeLoading = setLoading(); + + await delay(150); + + request({ + url: `/business/roadSection/list`, + method: "get", + params: { + ...this.searchData, + ...this.getPagination() + } + }).then(result => { + if (result.code != 200) return; + this.data = result.rows; + this.total = result.total; + }).finally(() => { + closeLoading(); + }) + } } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss b/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss index 9b748583..e58a711b 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss +++ b/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss @@ -500,3 +500,19 @@ div.el-popper.global-input-search-popover { margin-top: 15px; } } + +.el-loading-mask { + background-color: rgba(255, 255, 255, 0.15); + .el-loading-spinner { + i, + p { + // color: #fff; + color: #00b3cc; + } + svg { + circle { + stroke: #00b3cc; + } + } + } +} diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/index.js b/ruoyi-ui/src/views/JiHeExpressway/utils/index.js new file mode 100644 index 00000000..147ab532 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/utils/index.js @@ -0,0 +1,17 @@ +import { Loading } from "element-ui"; + +/** + * 设置 一个Loading + * @param {{ target: HTMLElement; fullscreen: boolean; spinner: string; text: string; }} options + * @returns close callback + */ +export function setLoading(options) { + let loadingInstance = Loading.service({ + fullscreen: true, + text: "数据加载中...", + lock: true, + ...options, + }); + + return () => loadingInstance.close(); +}