Browse Source

渠道发布完善

wangqin
zhangzhang 7 months ago
parent
commit
411a83cfc3
  1. 1
      ruoyi-ui/package.json
  2. 8
      ruoyi-ui/src/api/commandDispatch/index.js
  3. 317
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  4. 128
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue
  5. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/weatherInfoQuery/components/weaterData/index.vue
  6. 49
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/weatherWarning/components/infoWarning/index.vue
  7. 32
      ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/AddNEditDialog.vue
  8. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/index.vue

1
ruoyi-ui/package.json

@ -63,6 +63,7 @@
"gis-map-admin": "^0.9.2", "gis-map-admin": "^0.9.2",
"gis-map-tunnel": "^0.1.3", "gis-map-tunnel": "^0.1.3",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
"html-docx-js": "^0.3.1",
"imports-loader": "^0.8.0", "imports-loader": "^0.8.0",
"iview": "^3.3.3", "iview": "^3.3.3",
"jquery": "^3.6.0", "jquery": "^3.6.0",

8
ruoyi-ui/src/api/commandDispatch/index.js

@ -116,3 +116,11 @@ export function downloadEventImportantFile(data) {
data, data,
}); });
} }
// 无分页查询事件列表
export function deventImportantFileList(eventId, type) {
return request({
url: `/business/eventImportantFile/list/?eventId=${eventId}/&type=${type}`,
method: "get",
});
}

317
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue

@ -1,65 +1,122 @@
<template> <template>
<Dialog v-model="modelVisible" :title="propData.id ? '修改' : '新增'" width="1400px"> <Dialog
v-model="modelVisible"
:title="propData.id ? '修改' : '新增'"
width="1400px"
>
<div class="AddNEditDialog"> <div class="AddNEditDialog">
<!-- <Form :value="propData" class="form" ref="basicInfoForm" :formList="formList" column="1" labelWidth="80px" /> --> <!-- <Form :value="propData" class="form" ref="basicInfoForm" :formList="formList" column="1" labelWidth="80px" /> -->
<el-form ref="basicInfoForm" :model="editData" label-width="80px" :rules="groupBasicRules"> <el-form
ref="basicInfoForm"
:model="editData"
label-width="80px"
:rules="groupBasicRules"
>
<el-form-item label="名称" prop="groupName"> <el-form-item label="名称" prop="groupName">
<el-input v-model="editData.groupName" placeholder="任务组名称"></el-input> <el-input
v-model="editData.groupName"
placeholder="任务组名称"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="描述" prop="remark"> <el-form-item label="描述" prop="remark">
<el-input v-model="editData.remark" placeholder="任务组描述"></el-input> <el-input
v-model="editData.remark"
placeholder="任务组描述"
></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="状态" prop="status"> <!-- <el-form-item label="状态" prop="status">
<el-switch v-model="editData.status" active-value="1" inactive-value="0"></el-switch> <el-switch v-model="editData.status" active-value="1" inactive-value="0"></el-switch>
</el-form-item> --> </el-form-item> -->
<div style="display: flex; justify-content: flex-end;"> <div style="display: flex; justify-content: flex-end">
<el-button @click="(modelVisible = false), (submitting = false)" type="info" size="lg"> <el-button
@click="(modelVisible = false), (submitting = false)"
type="info"
size="lg"
>
取消 取消
</el-button> </el-button>
<el-button type="primary" @click="onSaveTaskGroup('basicInfoForm')" :loading="submitting" size="lg"> 提交 <el-button
type="primary"
@click="onSaveTaskGroup('basicInfoForm')"
:loading="submitting"
size="lg"
>
提交
</el-button> </el-button>
</div> </div>
</el-form> </el-form>
<template v-if="editData.id"> <template v-if="editData.id">
<!-- 如果是新增的还没有保存的任务组不能添加任务 --> <!-- 如果是新增的还没有保存的任务组不能添加任务 -->
<div class="fl-around task_op"> <div class="fl-around task_op">
<el-button size="mini" type="primary" @click="onAddTaskGroup">新增任务组</el-button> <el-button size="mini" type="primary" @click="onAddTaskGroup"
>新增任务组</el-button
>
</div> </div>
<div class="all_groups"> <div class="all_groups">
<div
<div class="task_group" v-for="taskGroup,index in taskGroupsEditing"> class="task_group"
v-for="(taskGroup, index) in taskGroupsEditing"
>
<div class="fl-around task_info"> <div class="fl-around task_info">
<div class="time_show"> <div class="time_show">
<el-input placeholder="请输入内容" v-model="taskGroup.time" style="width: 180px;" disabled> <el-input
placeholder="请输入内容"
v-model="taskGroup.time"
style="width: 180px"
disabled
>
</el-input> </el-input>
<i class="icon el-icon-edit-outline" @click='onModifyTime(taskGroup)'></i> <i
class="icon el-icon-edit-outline"
@click="onModifyTime(taskGroup)"
></i>
</div> </div>
<div class="fl-around task_op"> <div class="fl-around task_op">
<el-button size="mini" type="primary" @click="onAddTaskItem(taskGroup)">新增子任务</el-button> <el-button
<el-button size="mini" type="danger" @click="onDeleteTaskGroup(taskGroup)">删除任务组</el-button> size="mini"
type="primary"
@click="onAddTaskItem(taskGroup)"
>新增子任务</el-button
>
<el-button
size="mini"
type="danger"
@click="onDeleteTaskGroup(taskGroup)"
>删除任务组</el-button
>
</div> </div>
</div> </div>
<div> <div>
<!-- <p v-for="item, index1 in taskGroup.tasksEdit">{{ item }}</p> --> <!-- <p v-for="item, index1 in taskGroup.tasksEdit">{{ item }}</p> -->
<TaskItem v-for="item, index1 in taskGroup.tasksEdit" :propData="item" :groupId="propData.id" <TaskItem
:time="taskGroup.time" @onSubmit="onSubmitTaskItem"> v-for="(item, index1) in taskGroup.tasksEdit"
:propData="item"
:groupId="propData.id"
:time="taskGroup.time"
@onSubmit="onSubmitTaskItem"
>
</TaskItem> </TaskItem>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
</div> </div>
<template #footer> <template #footer> </template>
</template>
<taskEditDialog v-model="isEditing" :groupId="editData.id" :time="selectedTaskGroup.time" :propData="{}" <taskEditDialog
@onSubmit="onSubmitTaskItem" /> v-model="isEditing"
:groupId="editData.id"
<timeEditDialog v-model="isShowTimeEdit" :propData="editingTime" @onSubmit="onSubmitTime" /> :time="selectedTaskGroup.time"
:propData="{}"
@onSubmit="onSubmitTaskItem"
/>
<timeEditDialog
v-model="isShowTimeEdit"
:propData="editingTime"
@onSubmit="onSubmitTime"
/>
</Dialog> </Dialog>
</template> </template>
@ -84,7 +141,7 @@ export default {
Form, Form,
TaskItem, TaskItem,
taskEditDialog, taskEditDialog,
timeEditDialog timeEditDialog,
}, },
model: { model: {
prop: "visible", prop: "visible",
@ -94,33 +151,33 @@ export default {
visible: Boolean, visible: Boolean,
propData: { propData: {
type: Object, type: Object,
default: ()=>{} default: () => {},
}, },
}, },
data() { data() {
let gNameValidator = (rule, value, callback)=>{ let gNameValidator = (rule, value, callback) => {
return callback(new Error('请输入任务组名称')); return callback(new Error("请输入任务组名称"));
// if (value.trim().length<=0){ // if (value.trim().length<=0){
// return callback(new Error('')); // return callback(new Error(''));
// } // }
}; };
return { return {
editingTime:"", editingTime: "",
editData:{}, editData: {},
mode:"", mode: "",
isEditing:false, isEditing: false,
isShowTimeEdit:false, isShowTimeEdit: false,
group:{}, group: {},
submitting: false, submitting: false,
formList: addEditFormList, formList: addEditFormList,
taskGroupsEditing:[], taskGroupsEditing: [],
selectedTaskGroup:{}, selectedTaskGroup: {},
groupBasicRules:{ groupBasicRules: {
groupName: [ groupName: [
// { validator: gNameValidator, trigger: 'blur' } // { validator: gNameValidator, trigger: 'blur' }
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: "请输入活动名称", trigger: "blur" },
], ],
} },
}; };
}, },
computed: { computed: {
@ -152,7 +209,6 @@ export default {
}, },
}, },
mounted() { mounted() {
// "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split('').forEach(item => { // "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split('').forEach(item => {
// request({ // request({
// url: `/business/dcInfoBoardVocabulary`, // url: `/business/dcInfoBoardVocabulary`,
@ -164,115 +220,115 @@ export default {
// }); // });
}, },
methods: { methods: {
onSubmitTaskItem(){ onSubmitTaskItem() {
this.isEditing = false; this.isEditing = false;
this.selectedTaskGroup = {}; this.selectedTaskGroup = {};
console.log("onSubmitTaskItemonSubmitTaskItemonSubmitTaskItem"); console.log("onSubmitTaskItemonSubmitTaskItemonSubmitTaskItem");
request({ request({
url: `/business/dcBatchFunctionsJobGroup/${this.editData.id}`, url: `/business/dcBatchFunctionsJobGroup/${this.editData.id}`,
method: "GET" method: "GET",
}).then(res=>{ }).then((res) => {
this.editData = { this.editData = {
id: res.data.id, id: res.data.id,
groupName: res.data.groupName, groupName: res.data.groupName,
// status: res.data.status, // status: res.data.status,
remark: res.data.remark, remark: res.data.remark,
detailedConfiguration: res.data.detailedConfiguration detailedConfiguration: res.data.detailedConfiguration,
} };
this.getTaskList(); //task this.getTaskList(); //task
}); });
}, },
onAddTaskGroup(){ onAddTaskGroup() {
this.isShowTimeEdit = true; this.isShowTimeEdit = true;
}, },
onModifyTime(taskG){ onModifyTime(taskG) {
this.editingTime = taskG.time; this.editingTime = taskG.time;
this.selectedTaskGroup = taskG; this.selectedTaskGroup = taskG;
this.isShowTimeEdit = true; this.isShowTimeEdit = true;
}, },
onDeleteTaskGroup(taskG){ onDeleteTaskGroup(taskG) {
this.$confirm("确定要删除该任务组么?", "操作确认", { this.$confirm("确定要删除该任务组么?", "操作确认", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { })
.then(() => {
request({
url: `/business/dcBatchFunctionsJob/time/${this.editData.id}/${taskG.time}`,
method: "DELETE"
}).then(res => {
request({ request({
url: `/business/dcBatchFunctionsJobGroup/${this.editData.id}`, url: `/business/dcBatchFunctionsJob/time/${this.editData.id}/${taskG.time}`,
method: "GET" method: "DELETE",
}).then(res => { }).then((res) => {
this.editData = { request({
id: res.data.id, url: `/business/dcBatchFunctionsJobGroup/${this.editData.id}`,
groupName: res.data.groupName, method: "GET",
// status: res.data.status, }).then((res) => {
remark: res.data.remark, this.editData = {
detailedConfiguration: res.data.detailedConfiguration id: res.data.id,
} groupName: res.data.groupName,
this.getTaskList(); //task // status: res.data.status,
remark: res.data.remark,
detailedConfiguration: res.data.detailedConfiguration,
};
this.getTaskList(); //task
});
}); });
});
}) })
.catch(() => { .catch(() => {
this.$message.warn("取消删除。"); this.$message.warn("取消删除。");
}); });
}, },
onSubmitTime(time){ onSubmitTime(time) {
this.isShowTimeEdit = false; this.isShowTimeEdit = false;
if (Object.keys(this.selectedTaskGroup).length>0){ if (Object.keys(this.selectedTaskGroup).length > 0) {
this.selectedTaskGroup.time = time; this.selectedTaskGroup.time = time;
this.selectedTaskGroup = {}; this.selectedTaskGroup = {};
}else{ } else {
this.taskGroupsEditing.push({ time, tasks: [] }); this.taskGroupsEditing.push({ time, tasks: [] });
} }
let detailedConfiguration =[]; let detailedConfiguration = [];
this.taskGroupsEditing.forEach(item=>{ this.taskGroupsEditing.forEach((item) => {
detailedConfiguration.push({time:item.time, tasks:_.map(item.tasksEdit, "jobId")}); detailedConfiguration.push({
time: item.time,
tasks: _.map(item.tasksEdit, "jobId"),
});
}); });
request({ request({
url: `/business/dcBatchFunctionsJobGroup`, url: `/business/dcBatchFunctionsJobGroup`,
method: "PUT", method: "PUT",
data: { data: {
id: this.editData.id, id: this.editData.id,
detailedConfiguration: JSON.stringify(detailedConfiguration) detailedConfiguration: JSON.stringify(detailedConfiguration),
}, },
}) }).then((result) => {
.then((result) => { if (result.code != 200) return;
if (result.code != 200) return; Message.success(`提交成功!`);
Message.success(`提交成功!`); });
})
}, },
onAddTaskItem(taskG){ onAddTaskItem(taskG) {
this.selectedTaskGroup = taskG; this.selectedTaskGroup = taskG;
this.isEditing = true; this.isEditing = true;
}, },
initEditingData(){ initEditingData() {
if(this.propData?.id){ if (this.propData?.id) {
this.mode = "edit" this.mode = "edit";
this.editData = { this.editData = {
id: this.propData.id, id: this.propData.id,
groupName : this.propData.groupName, groupName: this.propData.groupName,
// status: this.propData.status, // status: this.propData.status,
remark: this.propData.remark, remark: this.propData.remark,
detailedConfiguration: this.propData.detailedConfiguration detailedConfiguration: this.propData.detailedConfiguration,
} };
} else { } else {
this.mode = "add" this.mode = "add";
this.editData = { this.editData = {
groupName: "", groupName: "",
// status: "1", // status: "1",
remark: "", remark: "",
detailedConfiguration: "" detailedConfiguration: "",
} };
} }
}, },
getTaskList(){ getTaskList() {
this.taskGroupsEditing = JSON.parse(this.editData.detailedConfiguration); this.taskGroupsEditing = JSON.parse(this.editData.detailedConfiguration);
// this.taskGroupsEditing = [{time:"08:00:00",tasks:[1],tasksEdit:[]}]; // this.taskGroupsEditing = [{time:"08:00:00",tasks:[1],tasksEdit:[]}];
@ -295,45 +351,46 @@ export default {
url: `/business/dcBatchFunctionsJob/query`, url: `/business/dcBatchFunctionsJob/query`,
method: "GET", method: "GET",
params: { params: {
jobGroup: this.propData.id jobGroup: this.propData.id,
}, },
}) }).then((result) => {
.then((result) => { if (result.code != 200) return;
if (result.code != 200) return; console.log("当前任务组下的任务", result.data);
console.log("当前任务组下的任务", result.data); // result.data = [
// result.data = [ // {
// { // id:1,
// id:1, // callParameter: '{"deviceType":"2","devices":[{"id":904,"iotDeviceId":"81221 - 65535","deviceType":"2","direction":"1"},{"id":2116,"iotDeviceId":"26113 - 65535","deviceType":"2","direction":"1"}],"functions":[{"functionId":"11","params":{"size":"65535","fileName":"play012.lst"}},{"functionId":"13","params":{"STAY":90,"ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"24","CONTENT":"\\\\n","width":"160","height":"80","formatStyle":"2"}},{"functionId":"1B","params":{"fileId":"12"}}]}',
// callParameter: '{"deviceType":"2","devices":[{"id":904,"iotDeviceId":"81221 - 65535","deviceType":"2","direction":"1"},{"id":2116,"iotDeviceId":"26113 - 65535","deviceType":"2","direction":"1"}],"functions":[{"functionId":"11","params":{"size":"65535","fileName":"play012.lst"}},{"functionId":"13","params":{"STAY":90,"ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"24","CONTENT":"\\\\n","width":"160","height":"80","formatStyle":"2"}},{"functionId":"1B","params":{"fileId":"12"}}]}', // jobGroup:1
// jobGroup:1 // }
// } // ]
// ] this.taskGroupsEditing.forEach((item) => {
this.taskGroupsEditing.forEach(item=>{ let arr = _.filter(result.data, (itm) => {
let arr = _.filter(result.data, itm => { return item.tasks.includes(itm.jobId)}); return item.tasks.includes(itm.jobId);
this.$set(item, "tasksEdit", arr);
// item.tasksEdit = arr;
}); });
}) this.$set(item, "tasksEdit", arr);
// item.tasksEdit = arr;
});
});
}, },
onSaveTaskGroup(formName) { onSaveTaskGroup(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate((valid) => {
if (!valid){ if (!valid) {
return ; return;
} }
this.editData.groupName = this.editData.groupName.trim(); this.editData.groupName = this.editData.groupName.trim();
this.editData.remark = this.editData.remark.trim(); this.editData.remark = this.editData.remark.trim();
this.submitting = true; this.submitting = true;
// //
// this.$set(this.editData, "id", 11); // this.$set(this.editData, "id", 11);
// this.submitting = false; // this.submitting = false;
// return // return
// //
request({ request({
url: `/business/dcBatchFunctionsJobGroup`, url: `/business/dcBatchFunctionsJobGroup`,
method: this.mode=="edit" ? "PUT" : "POST", method: this.mode == "edit" ? "PUT" : "POST",
data: this.editData, data: this.editData,
}) })
.then((result) => { .then((result) => {
@ -342,8 +399,7 @@ export default {
Message.success(`提交成功!`); Message.success(`提交成功!`);
this.$emit("onSuccess"); this.$emit("onSuccess");
this.editData = { ...result.data }; this.editData = { ...result.data };
this.mode = "edit" this.mode = "edit";
}) })
.catch((err) => { .catch((err) => {
console.log( console.log(
@ -373,19 +429,20 @@ export default {
font-size: 12px; font-size: 12px;
} }
} }
.all_groups{ .all_groups {
border: 1px solid #09B; border: 1px solid #09b;
max-height:500px; max-height: 500px;
overflow-y: scroll; overflow-y: scroll;
} }
.task_group{ .task_group {
.task_info{ .task_info {
padding:10px; background: #004050; padding: 10px;
.time_show{ background: #004050;
color: #0AC; .time_show {
color: #0ac;
} }
} }
.task_op{ .task_op {
} }
} }
</style> </style>

128
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue

@ -36,50 +36,69 @@
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="初报" name="second" class="file"> <el-tab-pane label="初报" name="second">
<div class="file-box"> <div class="file" ref="file">
<el-form> <div class="file-box">
<div class="file-title">重要事件</div> <el-form>
<div class="file-top"> <div class="file-title">重要事件</div>
<span class="file-top-fromDept" <div class="file-top">
>报送单位: <span class="file-top-fromDept"
<el-input v-model="fromDept" /> >报送单位:
</span> <el-input v-model="fromDept" />
<span class="file-top-createTime" </span>
>报送时间: {{ createTime }} <span class="file-top-createTime"
</span> >报送时间: {{ createTime }}
</div> </span>
<div class="file-content">
<div class="file-content-title">
<el-input v-model="title"> </el-input>
</div>
<div class="file-content-toDept">
<el-input v-model="toDept"></el-input>:
</div> </div>
<div class="file-content">
<div class="file-content-title">
<el-input v-model="title"> </el-input>
</div>
<div class="file-content-toDept">
<el-input v-model="toDept"></el-input>:
</div>
<el-input <el-input
class="file-content-text" class="file-content-text"
v-model="content" v-model="content"
type="textarea" type="textarea"
:rows="2" :rows="2"
placeholder="请输入内容" placeholder="请输入内容"
></el-input> ></el-input>
</div>
<div class="file-footer">
<div class="file-createName">
<span>填报人:</span
><el-input v-model="createName" placeholder=""></el-input>
</div>
<div class="file-phoneNumber">
<span>联系电话:</span
><el-input v-model="phoneNumber" placeholder=""></el-input>
</div> </div>
<div class="file-issuedr"> <div class="file-footer">
<span>签发人:</span <div class="file-createName">
><el-input v-model="issued" placeholder=""></el-input> <span>填报人:</span
><el-input v-model="createName" placeholder=""></el-input>
</div>
<div class="file-phoneNumber">
<span>联系电话:</span
><el-input v-model="phoneNumber" placeholder=""></el-input>
</div>
<div class="file-issuedr">
<span>签发人:</span
><el-input v-model="issued" placeholder=""></el-input>
</div>
</div> </div>
</div> </el-form>
</el-form> </div>
</div>
<div class="footer">
<Button style="background: #39d5bf" @click.native="onSubmit"
>重新生成</Button
>
<Button style="background: #3de8ff" @click.native="handlePreview"
>预览</Button
>
<Button style="background: #ffdb82" @click.native="onSubmit"
>保存</Button
>
<Button @click.native="onSubmit">保存并上报</Button>
<Button
style="background: #c9c9c9"
@click.native="modelVisible = false"
>关闭</Button
>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="续报" name="third"> </el-tab-pane> <el-tab-pane label="续报" name="third"> </el-tab-pane>
@ -88,13 +107,20 @@
</Dialog> </Dialog>
</template> </template>
<script> <script>
import FileSaver from "file-saver";
import htmlDocx from "html-docx-js/dist/html-docx";
import Dialog from "@screen/components/Dialog/index"; import Dialog from "@screen/components/Dialog/index";
import Form from "@screen/components/FormConfig"; import Form from "@screen/components/FormConfig";
import { formList, reportList } from "./data"; import { formList, reportList } from "./data";
import { tabConfigList } from "../../EventInformation/components/EditEventInformationDialog/data.js"; import { tabConfigList } from "../../EventInformation/components/EditEventInformationDialog/data.js";
import Button from "@screen/components/Buttons/Button.vue"; import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request"; import request from "@/utils/request";
import { getEventImportant, editEventImportant } from "@/api/commandDispatch";
import {
getEventImportant,
editEventImportant,
deventImportantFileList,
} from "@/api/commandDispatch";
var moment = require("moment"); var moment = require("moment");
export default { export default {
name: "EventDetail", name: "EventDetail",
@ -254,7 +280,12 @@ export default {
}); });
}, },
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); this.activeName = tab.name;
if (this.activeName == "second") {
deventImportantFileList(this.eventId, 1).then((res) => {
console.log("res", res);
});
}
}, },
getProcess() { getProcess() {
@ -313,6 +344,16 @@ export default {
}); });
}); });
}, },
handlePreview() {
const fileContent = this.$refs.file.innerHTML;
console.log(77777);
console.log(fileContent);
// HTMLDOCX
const doc = htmlDocx.asBlob(fileContent);
//
FileSaver.saveAs(doc, "document.docx");
},
}, },
mounted() { mounted() {
this.initData(); this.initData();
@ -470,6 +511,9 @@ export default {
} }
} }
} }
.footer {
display: flex;
}
::v-deep .el-tabs__content { ::v-deep .el-tabs__content {
overflow: auto; overflow: auto;
position: relative; position: relative;

6
ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/weatherInfoQuery/components/weaterData/index.vue

@ -12,7 +12,7 @@
<div class="item"> <div class="item">
<span class="label">湿度</span> <span class="label">湿度</span>
<span class="text">{{ <span class="text">{{
data.humidity ? data.humidity + "mm" : "-" data.humidity ? data.humidity + "%" : "-"
}}</span> }}</span>
</div> </div>
<div class="item"> <div class="item">
@ -24,7 +24,7 @@
<div class="item"> <div class="item">
<span class="label">风速</span> <span class="label">风速</span>
<span class="text">{{ <span class="text">{{
data.windSpeed ? data.windSpeed + "" : "-" data.windSpeed ? data.windSpeed + "m/s" : "-"
}}</span> }}</span>
</div> </div>
<div class="item"> <div class="item">
@ -108,7 +108,7 @@
<div class="item"> <div class="item">
<span class="label"> 水膜厚度</span> <span class="label"> 水膜厚度</span>
<span class="text">{{ <span class="text">{{
data.waterFilmlceSnowValue ? data.waterFilmlceSnowValue + "mm" : "-" data.waterFilmIceSnowValue ? data.waterFilmIceSnowValue + "mm" : "-"
}}</span> }}</span>
</div> </div>
</div> </div>

49
ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/weatherWarning/components/infoWarning/index.vue

@ -36,8 +36,8 @@
<div class="left-row"> <div class="left-row">
<div class="label">预警等级</div> <div class="label">预警等级</div>
<div :class="item.severityColor"> <div :class="item.severityColor">
{{ {{ item.severityColorText }}预警
item.severity == "Cancel" <!-- item.severity == "Cancel"
? "取消" ? "取消"
: item.severity == "None" : item.severity == "None"
? "无" ? "无"
@ -55,8 +55,7 @@
? "严峻" ? "严峻"
: item.severity == "Extreme" : item.severity == "Extreme"
? "极端" ? "极端"
: "" : "" -->
}}
</div> </div>
</div> </div>
<!-- <div class="left-row"> <!-- <div class="left-row">
@ -68,7 +67,7 @@
<div class="left-row"> <div class="left-row">
<div class="label">预警发布时间</div> <div class="label">预警发布时间</div>
<div class="value"> <div class="value">
{{ item.pubTime }} {{ moment(item.pubTime).format("YYYY-MM-DD HH:mm:ss") }}
</div> </div>
</div> </div>
</div> </div>
@ -89,6 +88,7 @@
import { color } from "echarts"; import { color } from "echarts";
import WgtTitle from "../../../../../widgets/title"; import WgtTitle from "../../../../../widgets/title";
import { getMeteorologicalEarlyWarning } from "@/api/perception/meteorologyCheck"; import { getMeteorologicalEarlyWarning } from "@/api/perception/meteorologyCheck";
import moment from "moment";
export default { export default {
name: "infoWarning", name: "infoWarning",
@ -97,6 +97,7 @@ export default {
}, },
data() { data() {
return { return {
moment,
warningList: [], warningList: [],
warningData: [ warningData: [
// { typeName: "warning", severityColor: "Red", severity: "Severe" }, // { typeName: "warning", severityColor: "Red", severity: "Severe" },
@ -106,29 +107,41 @@ export default {
colorSelect: "all", colorSelect: "all",
colors: [ colors: [
{ label: "全部", value: "all" }, { label: "全部", value: "all" },
{ label: "白色", value: "White" },
{ label: "蓝色", value: "Blue" }, { label: "蓝色", value: "Blue" },
{ label: "绿色", value: "Green" },
{ label: "黄色", value: "Yellow" }, { label: "黄色", value: "Yellow" },
{ label: "橙色", value: "Orange" }, { label: "橙色", value: "Orange" },
{ label: "红色", value: "Red" }, { label: "红色", value: "Red" },
{ label: "黑色", value: "Black" },
], ],
}; };
}, },
watch: { watch: {
colorSelect(val) { colorSelect(val) {
if (val !== "all") { this.warningList = []; //
const data = this.warningData.filter(
(item) => item.severityColor === val
);
this.warningList = data;
this.warningList = data;
} else {
this.warningList = this.warningData;
}
// this.changeValue(val); this.warningData.forEach((item) => {
if (
val === "Blue" &&
["White", "Blue", "Green"].includes(item.severityColor)
) {
item.severityColorText = "蓝色";
this.warningList.push(item);
} else if (
val === "Red" &&
["Red", "Black"].includes(item.severityColor)
) {
item.severityColorText = "红色";
this.warningList.push(item);
} else if (val === "Yellow" && item.severityColor === "Yellow") {
item.severityColorText = "黄色";
this.warningList.push(item);
} else if (val === "Orange" && item.severityColor === "Orange") {
item.severityColorText = "橙色";
this.warningList.push(item);
} else if (!["Blue", "Red", "Yellow", "Orange"].includes(val)) {
// val
this.warningList.push(item);
}
});
}, },
}, },
created() {}, created() {},

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

@ -1,5 +1,5 @@
<template> <template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="550px"> <Dialog v-model="modelVisible" :title="title" width="550px">
<div class="AddNEditDialog"> <div class="AddNEditDialog">
<Form <Form
v-model="formData" v-model="formData"
@ -49,6 +49,7 @@ export default {
}, },
data() { data() {
return { return {
title: "新增",
submitting: false, submitting: false,
formData: {}, formData: {},
formList: [ formList: [
@ -56,7 +57,6 @@ export default {
label: "事件类型:", label: "事件类型:",
key: "dataCategory", key: "dataCategory",
type: "select", type: "select",
required: true, required: true,
options: { options: {
disabled: false, disabled: false,
@ -112,7 +112,7 @@ export default {
label: "发布渠道:", label: "发布渠道:",
key: "publishChannels", key: "publishChannels",
type: "CheckboxGroup", type: "CheckboxGroup",
isAlon: true, isAlone: true,
required: true, required: true,
default: [], default: [],
options: { options: {
@ -205,15 +205,18 @@ export default {
}, },
watch: { watch: {
modelVisible: { modelVisible: {
handler() { handler(bool) {
this.formData = { if (!bool) return;
...this.data, this.title = "新增";
}; if (this.data && this.data.id) {
if (this.data.id) { this.title = "修改";
this.formData = {
...this.data,
};
this.formList[0].options.disabled = true; this.formList[0].options.disabled = true;
} else {
this.formData = null;
} }
this.getOptions();
}, },
immediate: true, immediate: true,
deep: true, deep: true,
@ -221,15 +224,16 @@ export default {
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
if (this.formData && this.formData.publishChannels) { // if (this.formData && this.formData.publishChannels) {
this.formData.publishChannels = // this.formData.publishChannels =
this.formData.publishChannels.toString(); // this.formData.publishChannels.toString();
} // }
this.$refs.FormConfigRef.validate().then((data) => { this.$refs.FormConfigRef.validate().then((data) => {
this.submitting = true; this.submitting = true;
let params = { let params = {
...this.formData, ...this.formData,
id: this.data.id, id: this.data.id,
publishChannels: publishChannels.toString(),
}; };
if (this.data.id) { if (this.data.id) {
editChannels(params).then((res) => { editChannels(params).then((res) => {

3
ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/index.vue

@ -88,10 +88,13 @@ export default {
}, },
methods: { methods: {
handleOpenDialogAddEdit(data) { handleOpenDialogAddEdit(data) {
console.log(77777, data);
this.addNEditDialogVisible = true; this.addNEditDialogVisible = true;
if (data) { if (data) {
data.publishChannels = data.publishChannels.toString().split(","); data.publishChannels = data.publishChannels.toString().split(",");
this.dialogData = data; this.dialogData = data;
} else {
this.dialogData = data;
} }
}, },
onRefreshForm() { onRefreshForm() {

Loading…
Cancel
Save