Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
qingzhengli 9 months ago
parent
commit
be4fcaf878
  1. 82
      ruoyi-ui/src/views/JiHeExpressway/components/Card1/index.vue
  2. 105
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  3. 155
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue

82
ruoyi-ui/src/views/JiHeExpressway/components/Card1/index.vue

@ -1,6 +1,10 @@
<template>
<BorderRadiusImage class='Card' borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px">
<BorderRadiusImage
class="Card"
borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))"
borderWidth="2px"
>
<div class="info" :style="{ gap }">
<p v-for="(item, index) in keyMap" :key="index">
<span>{{ item.label }}: </span>
@ -26,15 +30,15 @@
</template>
<script>
import Button from '@screen/components/Buttons/Button.vue';
import Button from "@screen/components/Buttons/Button.vue";
import BorderRadiusImage from "@screen/components/BorderRadiusImage.vue";
import { get as pathGet } from "lodash";
export default {
name: 'Card',
name: "Card",
components: {
Button,
BorderRadiusImage
BorderRadiusImage,
},
props: {
cardData: {
@ -44,70 +48,70 @@ export default {
location: "长清大学城收费站",
direction: "117.123456",
direction2: "37.12234",
state: 1
})
state: 1,
}),
},
keyMap: {
type: Array,
default: () => ([
default: () => [
{
key: "source",
label: "机构名称"
label: "机构名称",
},
{
key: "location",
label: "机构地址"
label: "机构地址",
},
{
key: "direction",
label: "经度"
label: "经度",
},
{
key: "direction2",
label: "纬度"
label: "纬度",
},
{
key: "direction3",
label: "救援外协单位"
}
])
label: "救援外协单位",
},
],
},
buttonIcon: {
type: String,
default: "images/insert.svg"
default: "images/insert.svg",
},
buttonText: {
type: String,
default: "修改"
default: "修改",
},
gap: {
type: String,
default: "6px"
default: "6px",
},
hasBtn: {
type: Boolean,
default: true
}
default: true,
},
},
data() {
return {
stateMap: {
1: "confirmed",
2: 'comfortable',
3: 'congestion',
4: "normal"
}
}
2: "comfortable",
3: "congestion",
4: "normal",
},
};
},
methods: {
getValue(key) {
return pathGet(this.cardData, key) ?? '-'
}
}
}
return pathGet(this.cardData, key) ?? "-";
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.Card {
color: #fff;
display: flex;
@ -127,22 +131,22 @@ export default {
// align-items: center;
// justify-content: space-between;
>p {
height: 21px;
> p {
// height: 21px;
font-size: 14px;
// font-family: PingFang SC, PingFang SC;
font-weight: 400;
line-height: 21px;
display: flex;
&>:first-child {
& > :first-child {
margin-right: 6px;
flex: 1;
}
&>:last-child {
& > :last-child {
flex: 2;
color: #FFFFFF;
color: #ffffff;
}
}
}
@ -173,7 +177,13 @@ export default {
&::after {
content: "";
position: absolute;
background: linear-gradient(-147deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 0%, #FFFFFF 46%, rgba(255, 255, 255, 0) 100%);
background: linear-gradient(
-147deg,
#ffffff 0%,
rgba(255, 255, 255, 0) 0%,
#ffffff 46%,
rgba(255, 255, 255, 0) 100%
);
height: 1px;
width: 124%;
transform: rotate(45deg);

105
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue

@ -8,6 +8,7 @@
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">在线率统计</ElTabPane>
</ElTabs>
<div class="bottom">
@ -16,40 +17,46 @@
</div>
<!-- <DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId || '8697-1'" /> -->
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" />
<DeviceControlDialog
v-model="deviceControlVisible"
:deviceId="dialogData.iotDeviceId"
/>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Descriptions from '@screen/components/Descriptions.vue';
import DeviceControlDialog from "./components/DeviceControlDialog.vue"
import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import Video from "@screen/components/Video"
import Button from "@screen/components/Buttons/Button.vue";
import Descriptions from "@screen/components/Descriptions.vue";
import DeviceControlDialog from "./components/DeviceControlDialog.vue";
import {
getRoadInfoByStakeMark,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import Video from "@screen/components/Video";
import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin"
import { dialogDelayVisible } from "./../mixin";
//
export default {
name: 'DrivingGuidance',
name: "DrivingGuidance",
mixins: [dialogDelayVisible],
provide() {
return {
requestURL: this.requestURL
}
requestURL: this.requestURL,
};
},
components: {
Dialog,
Button,
Descriptions,
DeviceControlDialog,
Video
Video,
},
data() {
return {
activeName: 'first',
activeName: "first",
deviceControlVisible: false,
data: {
deviceType: "行车诱导",
@ -61,77 +68,85 @@ export default {
},
list: [
{
label: '设备名称',
label: "设备名称",
key: "deviceName",
},
{
label: '设备桩号',
label: "设备桩号",
key: "stakeMark",
},
{
label: '道路名称',
label: "道路名称",
key: "roadName",
},
{
label: '设备方向',
label: "设备方向",
key: "direction",
enum: "CameraDirectionEnum"
enum: "CameraDirectionEnum",
},
{
label: '设备状态',
label: "设备状态",
key: "deviceState",
enum: "DeviceTypeEnum"
enum: "DeviceTypeEnum",
},
{
label: '设备厂商',
label: "设备厂商",
key: "brand",
},
{
label: '工作模式',
label: "工作模式",
key: "workMode",
},
{
label: '上行工作状态',
label: "上行工作状态",
key: "onWorkStatus",
},
{
label: '下行工作状态',
label: "下行工作状态",
key: "inWorkStatus",
},
]
}
],
};
},
async created() {
console.log(333,this.dialogData,444)
this.data = { ...this.dialogData, roadName: null }
console.log(333, this.dialogData, 444);
this.data = { ...this.dialogData, roadName: null };
getProduct(this.dialogData.productId)
.then(data => {
.then((data) => {
this.dialogData.brand = data.brand;
})
.catch((err) => {
});
.catch((err) => {});
this.requestURL(52)
.then((result) => {
this.data.workMode = { "00": "手动控制", "01": "自动控制", "02": "万年历" }[result.mode];
this.data.onWorkStatus = result.onWorkStatus
this.data.inWorkStatus = result.inWorkStatus
this.data.workMode = {
"00": "手动控制",
"01": "自动控制",
"02": "万年历",
}[result.mode];
this.data.onWorkStatus = result.onWorkStatus;
this.data.inWorkStatus = result.inWorkStatus;
})
.catch((err) => {
});
.catch((err) => {});
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
console.log("%c [ roadInfo ]-103-「index.vue」", "font-size:15px; background:#36347c; color:#7a78c0;", roadInfo.roadName);
console.log(
"%c [ roadInfo ]-103-「index.vue」",
"font-size:15px; background:#36347c; color:#7a78c0;",
roadInfo.roadName
);
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods: {
requestURL(functionId = 52, options = {}) {
return new Promise((resolve, reject) => {
request.post(`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, options)
request
.post(
`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`,
options
)
.then((result) => {
if (result.code != 200) return reject();
resolve(result.data[0]);
@ -139,13 +154,13 @@ export default {
.catch((err) => {
reject();
});
})
}
}
}
});
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.DrivingGuidance {
width: 600px;
color: #fff;
@ -179,7 +194,7 @@ export default {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

155
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue

@ -1,5 +1,5 @@
<template>
<div class='EmergencyAgencies'>
<div class="EmergencyAgencies">
<div class="filter">
<div>
<ButtonGradient @click.native="handleOpenDialogAddEdit()">
@ -22,21 +22,39 @@
</ButtonGradient>
</div>
<InputSearch style="width: 402px;" :formList="searchFormList" :formConfigOptions="{ labelWidth: '90px' }"
@handleSearch="handleSearch" />
<InputSearch
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '90px' }"
@handleSearch="handleSearch"
/>
</div>
<div class='body'>
<div class="body">
<!-- <ElEmpty v-if="!data.length && !isFirst" description="暂无数据" style="width: 100%;height: 100%;position: absolute;" /> -->
<div v-if="!data.length && !isFirst" class="no-data" style="position: absolute">暂无数据</div>
<div
v-if="!dataList.length && !isFirst"
class="no-data"
style="position: absolute"
>
暂无数据
</div>
<template v-else>
<Card v-for="(item, index) in data" :keyMap="keyMap" :cardData="item" :key="index">
<Card
v-for="(item, index) in dataList"
:keyMap="keyMap"
:cardData="item"
:key="index"
>
<template #button>
<Button @click.native="() => handleOpenDialogAddEdit(item)">
修改
</Button>
<Button style="background-color: #FF5F5F;" @click.native="handleDelete(item)">
<Button
style="background-color: #ff5f5f"
@click.native="handleDelete(item)"
>
删除
</Button>
</template>
@ -49,30 +67,30 @@
</template>
<script>
import Card from "@screen/components/Card1/index.vue"
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 AddNEditDialog from "./components/AddNEditDialog.vue"
import Card from "@screen/components/Card1/index.vue";
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 AddNEditDialog from "./components/AddNEditDialog.vue";
import { searchFormList } from "./data";
import request from "@/utils/request";
import { setLoading } from "@screen/utils/index.js"
import { setLoading } from "@screen/utils/index.js";
import { delay, exportFile, confirm } from "@screen/utils/common";
import { Message } from "element-ui";
let vehicleTypeList = [];
// let vehicleTypeList = [];
//
export default {
name: 'EmergencyAgencies',
inject: ['getPagination', 'setTotal', 'setCurrentPage'],
name: "EmergencyAgencies",
inject: ["getPagination", "setTotal", "setCurrentPage"],
components: {
Card,
ButtonGradient,
InputSearch,
Button,
AddNEditDialog
AddNEditDialog,
},
data() {
return {
@ -85,15 +103,15 @@ export default {
// direction: "117.123456",
// direction2: "37.12234",
// })),
data: [],
dataList: [],
keyMap: [
{
key: "dcOrganizations.organizationName",
label: "机构名称"
label: "机构名称",
},
{
key: "dcOrganizations.organizationAddress",
label: "机构地址"
label: "机构地址",
},
// {
// key: "coordinate.longitude",
@ -105,24 +123,25 @@ export default {
// },
{
key: "dcOrganizations.stakeMark",
label: "桩号"
label: "桩号",
},
// {
// key: "dcOrganizations.latitude",
// label: ""
// },
{
key: "car",
key: "cars",
label: "驻点车辆",
value: "aaa"
},
{
key: "employeesNum",
label: "驻点人员"
}
label: "驻点人员",
suffix: "人",
},
],
isFirst: true
}
isFirst: true,
vehicleTypeList: [],
};
},
created() {
this.getData();
@ -130,24 +149,19 @@ export default {
},
methods: {
getVehicleTypeList() {
if (vehicleTypeList.length) return;
if (this.vehicleTypeList.length) return;
request({
url: `/system/dict/data/type/sys_vehicle_type`,
method: "GET",
params: {}
params: {},
})
.then(({ data, code }) => {
if (code != 200) return ;//Message.error("");
// vehicleTypeList = this.formList[5].options.options = data.map(item => ({
// key: item.dictValue,
// label: item.dictLabel
// }))
console.log("Success", data);
if (code != 200) return; //Message.error("");
this.vehicleTypeList = data;
})
.catch((err) => {
});
.catch((err) => {});
},
async handleDelete(data) {
await confirm({ message: "是否要删除该机构?" });
@ -155,11 +169,11 @@ export default {
request({
url: `/business/organization/${data.dcOrganizations.id}`,
method: "DELETE",
data: {}
data: {},
})
.then((result) => {
if (result.code != 200) return Message.error(`删除失败!`);
this.setCurrentPage(1)
this.setCurrentPage(1);
Message.success(`删除成功!`);
})
.catch((err) => {
@ -182,8 +196,8 @@ export default {
filename: "应急机构",
data: {
...this.searchData,
...this.getPagination()
}
...this.getPagination(),
},
});
},
async getData() {
@ -196,26 +210,47 @@ export default {
method: "get",
params: {
...this.searchData,
...this.getPagination()
}
}).then(result => {
if (result.code != 200) return;
this.data = result.rows;
this.setTotal(result.total)
}).finally(() => {
closeLoading();
this.isFirst = false;
...this.getPagination(),
},
})
}
}
.then((result) => {
if (result.code != 200) return;
}
this.dataList = result.rows;
let data = [];
this.vehicleTypeList.forEach((items) => {
this.dataList.forEach((item) => {
if (item.car.length > 0) {
for (var i = 0; i < item.car.length; i++) {
if (item.car[i].vehicleType == items.dictValue) {
// let data =
data.push(items.dictLabel + "*" + item.car[i].carNum);
// item.cars = items.dictLabel + "*" + item.car[i].carNum;
}
}
}
});
});
console.log(999, this.dataList);
console.log(999, data);
this.dataList.forEach((item) => {
if (item.car.length > 0) {
item.cars = data.join("、");
}
});
this.setTotal(result.total);
})
.finally(() => {
closeLoading();
this.isFirst = false;
});
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.EmergencyAgencies {
.body {
display: grid;
grid-template-columns: repeat(5, 1fr);
@ -227,15 +262,15 @@ export default {
.endSpecial {
font-size: 14px;
font-weight: 400;
color: #00B3CC;
color: #00b3cc;
line-height: 16px;
span:first-child {
color: rgba(0, 179, 204, 1)#000;
color: rgba(0, 179, 204, 1) #000;
}
span:last-child {
color: rgba(217, 0, 27, 1)
color: rgba(217, 0, 27, 1);
}
}
}

Loading…
Cancel
Save