Browse Source

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

wangqin
hui 10 months ago
parent
commit
80a3fff5ff
  1. 105
      ruoyi-ui/src/assets/styles/JiHeExpressway.scss
  2. 8
      ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
  3. 4
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElSelect.vue
  4. 131
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
  5. 14
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  6. 19
      ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss

105
ruoyi-ui/src/assets/styles/JiHeExpressway.scss

@ -1,5 +1,5 @@
.theme-jihe { .theme-jihe {
$textColor: #F4F4F4; $textColor: #f4f4f4;
$inputHeight: 26px; $inputHeight: 26px;
color: $textColor; color: $textColor;
@ -17,7 +17,7 @@
line-height: 32px; line-height: 32px;
height: $inputHeight; height: $inputHeight;
overflow: hidden; overflow: hidden;
color: #3DE8FF; color: #3de8ff;
} }
.el-form-item__content { .el-form-item__content {
@ -30,8 +30,8 @@
} }
.el-input__inner { .el-input__inner {
padding: 0 8px; // padding: 0 8px;
background-color: #0D5F79; background-color: #0d5f79;
color: $textColor; color: $textColor;
border-radius: 2px; border-radius: 2px;
line-height: $inputHeight; line-height: $inputHeight;
@ -42,8 +42,8 @@
&::placeholder { &::placeholder {
color: $textColor; color: $textColor;
} }
&[disabled]{ &[disabled] {
color:#667 !important; color: #667 !important;
} }
} }
@ -56,8 +56,8 @@
.el-checkbox__inner { .el-checkbox__inner {
width: 20px; width: 20px;
height: 20px; height: 20px;
border: 1px solid #00B3CC; border: 1px solid #00b3cc;
background-color: #0D5F79; background-color: #0d5f79;
} }
::after { ::after {
@ -70,8 +70,8 @@
.el-checkbox.is-checked { .el-checkbox.is-checked {
.el-checkbox__inner { .el-checkbox__inner {
border: 1px solid #00B3CC; border: 1px solid #00b3cc;
background-color: #00B3CC; background-color: #00b3cc;
} }
} }
} }
@ -87,12 +87,12 @@
.el-input-number__increase { .el-input-number__increase {
width: 22px; width: 22px;
height: $inputHeight; height: $inputHeight;
background-color: #004A69; background-color: #004a69;
border: none; border: none;
color: #FFF; color: #fff;
&.is-disabled { &.is-disabled {
color: #006A99; color: #006a99;
} }
} }
@ -105,8 +105,8 @@
margin-right: 10px; margin-right: 10px;
.el-radio-button__inner { .el-radio-button__inner {
background-color: #0D5F79; background-color: #0d5f79;
border: 1px solid #00B3CC; border: 1px solid #00b3cc;
color: $textColor; color: $textColor;
height: 26px; height: 26px;
padding: 0 10px; padding: 0 10px;
@ -118,9 +118,8 @@
} }
&.is-active { &.is-active {
.el-radio-button__inner { .el-radio-button__inner {
background-image: linear-gradient(180deg, #37E7FF 0%, #009BCC 100%); background-image: linear-gradient(180deg, #37e7ff 0%, #009bcc 100%);
color: $textColor; color: $textColor;
border: none; border: none;
height: 26px; height: 26px;
@ -134,36 +133,56 @@
border-radius: 0; border-radius: 0;
background: linear-gradient(180deg, rgba(6, 66, 88, 0.5) 0%, #064258 93%); background: linear-gradient(180deg, rgba(6, 66, 88, 0.5) 0%, #064258 93%);
border: 1px solid; border: 1px solid;
border-image: linear-gradient(0deg, rgba(55, 231, 255, 0.5), rgba(55, 231, 255, 0)) 10 10; border-image: linear-gradient(
.el-submenu__title {} 0deg,
rgba(55, 231, 255, 0.5),
rgba(55, 231, 255, 0)
)
10 10;
.el-submenu__title {
}
.el-submenu__icon-arrow {} .el-submenu__icon-arrow {
}
.el-menu-item, .el-submenu__title{ .el-menu-item,
.el-submenu__title {
text-align: center; text-align: center;
background: none; background: none;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
color: #00D1FF; color: #00d1ff;
border: 1px solid transparent; border: 1px solid transparent;
transition: none; transition: none;
.el-submenu__icon-arrow{ .el-submenu__icon-arrow {
color: #00D1FF; color: #00d1ff;
} }
&:hover { &:hover {
color: #fff; color: #fff;
background: linear-gradient(90deg, rgba(164, 255, 250, 0) 0%, rgba(164, 255, 250, 0.42) 50%, rgba(164, 255, 250, 0) 100%); background: linear-gradient(
border: 1px solid; 90deg,
border-image: linear-gradient(90deg, rgba(190, 255, 246, 0.03) 0%, rgba(190, 255, 246, 1) 50%, rgba(190, 255, 246, 0.03) 100%) 1 1; rgba(164, 255, 250, 0) 0%,
} rgba(164, 255, 250, 0.42) 50%,
p{ rgba(164, 255, 250, 0) 100%
color: #FFF; );
} border: 1px solid;
border-image: linear-gradient(
90deg,
rgba(190, 255, 246, 0.03) 0%,
rgba(190, 255, 246, 1) 50%,
rgba(190, 255, 246, 0.03) 100%
)
1 1;
}
p {
color: #fff;
}
} }
.el-menu-item.is-active, .el-submenu__title.is-active{ .el-menu-item.is-active,
color: #FFF; .el-submenu__title.is-active {
color: #fff;
} }
} }
.el-menu--popup-bottom-start { .el-menu--popup-bottom-start {

8
ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue

@ -70,13 +70,13 @@ export default {
]; ];
if (scaleX > scaleY) { if (scaleX > scaleY) {
// cssGlobalVariable[0][1] = `scaleX(${1 / scaleX * scaleY})`; cssGlobalVariable[0][1] = `scaleX(${1 / scaleX * scaleY})`;
cssGlobalVariable[0][1] = `scaleX(${1 - (scaleX - scaleY)})`; // cssGlobalVariable[0][1] = `scaleX(${1 - (scaleX - scaleY)})`;
cssGlobalVariable[1][1] = `scaleY(${1 / scaleX})`; cssGlobalVariable[1][1] = `scaleY(${1 / scaleX})`;
cssGlobalVariable[2][1] = `scaleX(${1 - (scaleX - scaleY) / 2})`; cssGlobalVariable[2][1] = `scaleX(${1 - (scaleX - scaleY) / 2})`;
} else { } else {
// cssGlobalVariable[0][1] = `scaleY(${1 / scaleY * scaleX})`; cssGlobalVariable[0][1] = `scaleY(${1 / scaleY * scaleX})`;
cssGlobalVariable[0][1] = `scaleX(${1 - (scaleY - scaleX)})`; // cssGlobalVariable[0][1] = `scaleX(${1 - (scaleY - scaleX)})`;
cssGlobalVariable[1][1] = `scaleX(${1 / scaleY})`; cssGlobalVariable[1][1] = `scaleX(${1 / scaleY})`;
cssGlobalVariable[2][1] = `scaleX(${1 - (scaleY - scaleX) / 2})`; cssGlobalVariable[2][1] = `scaleX(${1 - (scaleY - scaleX) / 2})`;
} }

4
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElSelect.vue

@ -1,6 +1,8 @@
<template> <template>
<ElSelect v-bind="$attrs" v-on="$listeners"> <ElSelect v-bind="$attrs" v-on="$listeners">
<ElOption v-for="item in options" :key="item.key || item.value" :label="item.label" :value="item.key || item.value"> <ElOption v-for="item in options"
:disabled="typeof item.disabled === 'function' ? item.disabled(item, $parent.formData) : item.disabled"
:key="item.key || item.value" :label="item.label" :value="item.key || item.value">
<component :is="optionComponent" /> <component :is="optionComponent" />
</ElOption> </ElOption>
</ElSelect> </ElSelect>

131
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue

@ -30,7 +30,8 @@ import { Message } from "element-ui";
const workStatus = [ const workStatus = [
{ {
key: "00", key: "00",
label: "不更新状态" label: "不更新状态",
disabled: false
}, },
{ {
key: "01", key: "01",
@ -46,8 +47,9 @@ const workStatus = [
}, },
{ {
key: "04", key: "04",
label: "关闭" label: "关闭",
}, disabled: false
}
] ]
export default { export default {
@ -73,18 +75,28 @@ export default {
label: "类型:", label: "类型:",
key: "controlType", key: "controlType",
type: "RadioGroup", type: "RadioGroup",
default: "manual", default: "00",
ons: { ons: {
input: (value, data) => { input: (value, data, that) => {
const oldFormData = this.oldFormData; const oldFormData = this.oldFormData;
if (!oldFormData) return; if (!oldFormData) return;
that.formList[1].options.options.splice(-1, 1, {
...workStatus.slice(-1)[0],
disabled: value != "00"
})
that.formList[1].options.options.splice(0, 1, {
...workStatus[0],
disabled: value != "00"
})
switch (value) { switch (value) {
case "manual": case "01":
data.onWorkStatus = oldFormData.onWorkStatus;
data.inWorkStatus = oldFormData.inWorkStatus; if (['04', '00'].includes(data.onWorkStatus)) data.onWorkStatus = null;
break; if (['04', '00'].includes(data.inWorkStatus)) data.inWorkStatus = null;
case "automatic":
Array.isArray(oldFormData.displayTime) && (data.displayTime = [...oldFormData.displayTime]); Array.isArray(oldFormData.displayTime) && (data.displayTime = [...oldFormData.displayTime]);
break; break;
} }
@ -94,13 +106,17 @@ export default {
type: 'circle', type: 'circle',
options: [ options: [
{ {
key: "manual", key: "00",
label: "手动控制", label: "手动控制",
}, },
{ {
key: "automatic", key: "01",
label: "自动控制", label: "自动控制",
} },
{
key: "02",
label: "万年历",
},
], ],
}, },
}, },
@ -109,7 +125,6 @@ export default {
key: "onWorkStatus", key: "onWorkStatus",
required: true, required: true,
type: "select", type: "select",
visible: (data) => data.controlType == "manual",
options: { options: {
placeholder: "请选择", placeholder: "请选择",
options: workStatus options: workStatus
@ -120,7 +135,6 @@ export default {
key: "inWorkStatus", key: "inWorkStatus",
required: true, required: true,
type: "select", type: "select",
visible: (data) => data.controlType == "manual",
options: { options: {
placeholder: "请选择", placeholder: "请选择",
options: workStatus options: workStatus
@ -131,7 +145,7 @@ export default {
key: "displayTime", key: "displayTime",
type: "timePicker", type: "timePicker",
required: true, required: true,
visible: (data) => data.controlType == "automatic", visible: (data) => data.controlType == "01",
options: { options: {
isRange: true, isRange: true,
rangeSeparator: "至", rangeSeparator: "至",
@ -164,57 +178,67 @@ export default {
} }
}, },
methods: { methods: {
reDisplay() { requestURL(functionId, options = {}) {
request.post(`business/device/functions/${this.deviceId}/${52}`, {}) return new Promise((resolve, reject) => {
.then(async (result) => { request.post(`business/device/functions/${this.deviceId}/${functionId}`, options)
if (result.code != 200) return; .then((result) => {
if (result.code != 200) return reject();
resolve(result.data[0]);
})
.catch((err) => {
reject();
});
});
},
reDisplay() {
this.requestURL(52)
.then(async (data) => {
await delay(0); await delay(0);
const formData = this.$refs.FormConfigRef?.formData; const formData = this.$refs.FormConfigRef?.formData;
const data = result.data[0]; formData.controlType = data.mode;
console.log("%c [ data ]-155-「DeviceControlDialog.vue」", "font-size:15px; background:#66352f; color:#aa7973;", data);
switch (data.mode) { switch (data.mode) {
case "00": case "00":
formData.controlType = "manual";
formData.onWorkStatus = data.onWorkStatus; formData.onWorkStatus = data.onWorkStatus;
formData.inWorkStatus = data.inWorkStatus; formData.inWorkStatus = data.inWorkStatus;
break; break;
case "01": case "01":
formData.controlType = "automatic"; case "02":
await this.requestURL("3C")
.then((data2) => {
formData.onWorkStatus = data2.onWorkStatus;
formData.inWorkStatus = data2.inWorkStatus;
formData.displayTime = [data.startDisplay, data.endDisplay]; if (data.mode === '01')
formData.displayTime = [data.startDisplay, data.endDisplay];
})
.catch(() => { });
break; break;
} }
this.oldFormData = { ...formData }; this.oldFormData = { ...formData };
})
})
}, },
handleSubmit() { handleSubmit() {
const result = {}, formData = this.$refs.FormConfigRef?.formData; const result = {}, formData = this.$refs.FormConfigRef?.formData;
let functionId = 51; result.mode = formData.controlType;
result.mode = formData.controlType === 'manual' ? "00" : "01";
delete result.controlType; delete result.controlType;
if (result.mode === '01') { if (result.mode === '01') {
if (!formData.displayTime?.length) return Message.error(`时间不能为空!`); if (!formData.displayTime?.length) return Message.error(`时间不能为空!`);
result.startDisplayTime = formData.displayTime[0];
result.endDisplayTime = formData.displayTime[1];
delete result.displayTime;
} else {
if (!formData.onWorkStatus || !formData.inWorkStatus) return Message.error(`工作状态不能为空!`);
result.onWorkStatus = formData.onWorkStatus
result.inWorkStatus = formData.inWorkStatus
} }
if (!formData.onWorkStatus || !formData.inWorkStatus) return Message.error(`工作状态不能为空!`);
result.onWorkStatus = formData.onWorkStatus;
result.inWorkStatus = formData.inWorkStatus;
this.submitting = true; this.submitting = true;
// this.submitting = false; // this.submitting = false;
@ -225,10 +249,33 @@ export default {
* *
* https://www.showdoc.com.cn/2450725213006196/10877717880262686 * https://www.showdoc.com.cn/2450725213006196/10877717880262686
*/ */
request.post(`business/device/functions/${this.deviceId}/${functionId}`, result) let promise = [];
.then((result) => {
if (result.code != 200) return Message.error(`设备操作失败!`); switch (result.mode) {
case "00":
promise.push(this.requestURL("51", result))
break;
case "01":
case "02":
const options = { mode: result.mode };
if (result.mode === '01') {
options.startDisplayTime = formData.displayTime[0];
options.endDisplayTime = formData.displayTime[1];
}
promise.push(
this.requestURL("30", {
onWorkStatus: result.onWorkStatus,
inWorkStatus: result.inWorkStatus,
}),
this.requestURL("51", options),
)
break;
}
Promise.all(promise)
.then(() => {
this.modelVisible = false; this.modelVisible = false;
}) })
.catch((err) => { .catch((err) => {
@ -246,7 +293,7 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
.DeviceControlDialog { .DeviceControlDialog {
width: 450px; width: 450px;
height: 180px; height: 210px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 15px; gap: 15px;

14
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue

@ -8,14 +8,14 @@
</div> </div>
<!-- group --> <!-- group -->
<TransitionGroup name="fade-group" tag="div" class="tabs-content"> <div name="fade-group" tag="div" class="tabs-content">
<div class="device-item" v-for="(item, index) in tabContentData" :key="item.id" @click="handleDevice(item)" <div class="device-item" v-for="(item, index) in tabContentData" :key="item.id" @click="handleDevice(item)"
:style="getStart(index)"> :style="getStart(index)">
<div class="device-icon" <div class="device-icon"
:style="{ backgroundImage: `url(${require(`@screen/images/layer/${active}/${item.title}${item.status}.svg`)})`, '--bgColor': `rgba(0, 209, 255, ${item.status ? 0.3 : 0})` }" /> :style="{ backgroundImage: `url(${require(`@screen/images/layer/${active}/${item.title}${item.status}.svg`)})`, '--bgColor': `rgba(0, 209, 255, ${item.status ? 0.3 : 0})` }" />
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
</div> </div>
</TransitionGroup> </div>
<div class="bottom"> <div class="bottom">
<div class="cleared-btn" @click="handleCleared"> <div class="cleared-btn" @click="handleCleared">
@ -86,6 +86,7 @@ export default {
// 0 ControlCamera | 1 Camera // 0 ControlCamera | 1 Camera
component: void 0, component: void 0,
data: void 0, data: void 0,
// component: "DrivingGuidance",
// data: { // data: {
// camId: "57937", // camId: "57937",
// } // }
@ -193,12 +194,6 @@ export default {
opacity: 0; opacity: 0;
} }
.fade-group-leave-active {
// transform: translateY(24px);
position: absolute !important;
overflow: hidden;
}
.RoadAndEvents { .RoadAndEvents {
width: 100%; width: 100%;
// background: url("~@screen/images/bg/box_bg_002.png") no-repeat; // background: url("~@screen/images/bg/box_bg_002.png") no-repeat;
@ -223,6 +218,7 @@ export default {
overflow: auto; overflow: auto;
position: relative; position: relative;
gap: 6px; gap: 6px;
transition: all .24s linear;
.device-item { .device-item {
// position: absolute; // position: absolute;
@ -234,6 +230,7 @@ export default {
align-items: center; align-items: center;
--height-svg: 24px; --height-svg: 24px;
--gap: 12px; --gap: 12px;
transition: all .15s linear;
padding-top: calc(var(--height-svg) + var(--gap)); padding-top: calc(var(--height-svg) + var(--gap));
.device-icon { .device-icon {
@ -241,6 +238,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: absolute; position: absolute;
transition: all .15s linear;
top: 0; top: 0;
height: 33px; height: 33px;
width: 100%; width: 100%;

19
ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss

@ -44,6 +44,25 @@ div.el-popper {
} }
} }
.el-select-dropdown__item.is-disabled {
color: #c0c4cc !important;
background-color: #12242e;
}
label.el-radio {
margin-right: 9px;
}
label.el-radio.is-bordered + label.el-radio.is-bordered {
margin-left: 0;
}
div.el-date-editor--daterange.el-input,
div.el-date-editor--daterange.el-input__inner,
div.el-date-editor--timerange.el-input,
div.el-date-editor--timerange.el-input__inner {
width: 100%;
}
div.el-select { div.el-select {
width: 100%; width: 100%;
} }

Loading…
Cancel
Save