Browse Source

bug更改

wangqin
zhangzhang 12 months ago
parent
commit
29f64ddebc
  1. 96
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
  2. 74
      ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/AddNEditDialog.vue

96
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue

@ -1,11 +1,18 @@
<template> <template>
<BorderRadiusImage class='RoadStateCard' borderRadius="2px" <BorderRadiusImage
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px"> class="RoadStateCard"
borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))"
borderWidth="2px"
>
<div class="left"> <div class="left">
<!-- <img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png`)"> --> <!-- <img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png`)"> -->
<!-- <img :src="require(`./test.png`)"> --> <!-- <img :src="require(`./test.png`)"> -->
<ElImage style="width: 212px; height: 159px;" :src="cardData.pictures ? cardData.pictures[0] : null" <ElImage
:preview-src-list="cardData.pictures || []"> style="width: 212px; height: 159px"
:src="cardData.pictures ? cardData.pictures[0] : null"
:preview-src-list="cardData.pictures || []"
>
<div slot="error"> <div slot="error">
<i class="el-icon-picture-outline icon"></i> <i class="el-icon-picture-outline icon"></i>
</div> </div>
@ -19,27 +26,35 @@
</p> </p>
</div> </div>
<div class="controls"> <div class="controls">
<Button :style="{ background: firstBtnColor, width: '50%' }" <Button
@click.native="$emit('firstBtnClick', cardData.id)">{{ :style="{ background: firstBtnColor, width: '50%' }"
getFirstBtnText(cardData.state) @click.native="$emit('firstBtnClick', cardData.id)"
}}</Button> >{{ getFirstBtnText(cardData.state) }}</Button
<Button v-if="cardData.state == 4" :style="{ background: lastBtnColor, width: '50%' }" >
@click.native="$emit('lastBtnClick', cardData.id)">{{ getLastBtnText(cardData.state) <Button
}}</Button> v-if="cardData.state == 4"
:style="{ background: lastBtnColor, width: '50%' }"
@click.native="$emit('lastBtnClick', cardData.id)"
>{{ getLastBtnText(cardData.state) }}</Button
>
</div> </div>
</div> </div>
<img v-if="cardData.state" class="status" :src="require(`./images/${statusMap[cardData.state]}.svg`) " /> <img
v-if="cardData.state"
class="status"
:src="require(`./images/${statusMap[cardData.state]}.svg`)"
/>
</BorderRadiusImage> </BorderRadiusImage>
</template> </template>
<script> <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 BorderRadiusImage from "@screen/components/BorderRadiusImage.vue";
import { statusMap } from "./data.js" import { statusMap } from "./data.js";
export default { export default {
name: 'RoadStateCard', name: "RoadStateCard",
props: { props: {
cardData: { cardData: {
type: Object, type: Object,
@ -48,80 +63,80 @@ export default {
source: "视频智能识别", source: "视频智能识别",
location: "k100+000", location: "k100+000",
direction: "济南方向", direction: "济南方向",
}) }),
}, },
firstBtnText: { firstBtnText: {
type: String, type: String,
default: "详情" default: "详情",
}, },
lastBtnText: { lastBtnText: {
type: String, type: String,
default: "调度记录" default: "调度记录",
}, },
firstBtnColor: { firstBtnColor: {
type: String, type: String,
default: "#00B3CC" default: "#00B3CC",
}, },
lastBtnColor: { lastBtnColor: {
type: String, type: String,
default: "#CB7A00" default: "#CB7A00",
}, },
keyMap: { keyMap: {
type: Array, type: Array,
default: () => ([ default: () => [
{ {
key: "stringEventType", key: "stringEventType",
label: "事件" label: "事件",
}, },
{ {
key: "stringEventSource", key: "stringEventSource",
label: "来源" label: "来源",
}, },
{ {
key: "stakeMark", key: "stakeMark",
label: "位置" label: "位置",
}, },
{ {
key: "stringDirection", key: "stringDirection",
label: "方向" label: "方向",
}, },
{ {
key: "startTime", key: "startTime",
label: "时间" label: "时间",
},
],
}, },
])
}
}, },
data() { data() {
return { return {
picUrl: './test.png' picUrl: "./test.png",
} };
}, },
emit: ['firstBtnClick', "lastBtnClick"], emit: ["firstBtnClick", "lastBtnClick"],
components: { components: {
Button, Button,
BorderRadiusImage BorderRadiusImage,
}, },
created() { created() {
this.statusMap = statusMap; this.statusMap = statusMap;
}, },
methods: { methods: {
getFirstBtnText(state) { getFirstBtnText(state) {
let text = '详情'; let text = "详情";
if (state == 5) text = '去确认' if (state == 5) text = "去确认";
if (state == 4) text = '详情' if (state == 4) text = "详情";
if (state == 3) text = '处置记录' if (state == 3) text = "处置记录";
return text; return text;
}, },
getLastBtnText(state) { getLastBtnText(state) {
let text = '去处置'; let text = "去处置";
return text; return text;
}, },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.RoadStateCard { .RoadStateCard {
color: #fff; color: #fff;
display: flex; display: flex;
@ -171,7 +186,7 @@ export default {
line-height: 24px; line-height: 24px;
&:nth-child(-n + 2) { &:nth-child(-n + 2) {
color: #37E7FF; color: #37e7ff;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
@ -179,7 +194,6 @@ export default {
&:nth-child(2) { &:nth-child(2) {
margin-bottom: 3px; margin-bottom: 3px;
} }
} }
.linText { .linText {

74
ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/AddNEditDialog.vue

@ -1,24 +1,32 @@
<template> <template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'"> <Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<div class='AddNEditDialog'> <div class="AddNEditDialog">
<Form v-model="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="90px" /> <Form
v-model="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="90px"
/>
</div> </div>
<template #footer> <template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false"> <Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消 取消
</Button> </Button>
<Button @click.native="handleSubmit" :loading="submitting"> <Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
确定
</Button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue" import Button from "@screen/components/Buttons/Button.vue";
import Form from '@screen/components/FormConfig'; import Form from "@screen/components/FormConfig";
import request from "@/utils/request"; import request from "@/utils/request";
import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js"; import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js";
@ -26,21 +34,21 @@ import { Message } from "element-ui";
import * as PresetFormItems from "@screen/common/PresetFormItems.js"; import * as PresetFormItems from "@screen/common/PresetFormItems.js";
export default { export default {
name: 'AddNEditDialog', name: "AddNEditDialog",
components: { components: {
Dialog, Dialog,
Button, Button,
Form Form,
}, },
model: { model: {
prop: 'visible', prop: "visible",
event: "update:value" event: "update:value",
}, },
props: { props: {
visible: Boolean, visible: Boolean,
data: Object data: Object,
}, },
inject: ['setCurrentPage'], inject: ["setCurrentPage"],
data() { data() {
return { return {
submitting: false, submitting: false,
@ -68,7 +76,7 @@ export default {
PresetFormItems.releaseChannel, PresetFormItems.releaseChannel,
{ {
label: "审核方式:", label: "审核方式:",
key: "level", key: "process",
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
options: { options: {
@ -89,21 +97,20 @@ export default {
label: "启用日期:", label: "启用日期:",
key: "startDate", key: "startDate",
type: "DatePicker", type: "DatePicker",
required: true required: true,
} },
],
] };
}
}, },
computed: { computed: {
modelVisible: { modelVisible: {
get() { get() {
return this.visible return this.visible;
}, },
set(val) { set(val) {
this.$emit('update:value', val) this.$emit("update:value", val);
} },
} },
}, },
watch: { watch: {
modelVisible: { modelVisible: {
@ -112,24 +119,21 @@ export default {
if (!bool) return; if (!bool) return;
this.formData = { this.formData = {
...this.data ...this.data,
} };
this.getOptions(); this.getOptions();
}
}
}, },
methods: {
getOptions() {
}, },
handleSubmit() {
}
}, },
} methods: {
getOptions() {},
handleSubmit() {},
},
};
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.AddNEditDialog { .AddNEditDialog {
width: 450px; width: 450px;
height: 200px; height: 200px;

Loading…
Cancel
Save