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. 309
      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-tunnel": "^0.1.3",
"highlight.js": "9.18.5",
"html-docx-js": "^0.3.1",
"imports-loader": "^0.8.0",
"iview": "^3.3.3",
"jquery": "^3.6.0",

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

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

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

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

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

@ -36,50 +36,69 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="初报" name="second" class="file">
<div class="file-box">
<el-form>
<div class="file-title">重要事件</div>
<div class="file-top">
<span class="file-top-fromDept"
>报送单位:
<el-input v-model="fromDept" />
</span>
<span class="file-top-createTime"
>报送时间: {{ createTime }}
</span>
</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>:
<el-tab-pane label="初报" name="second">
<div class="file" ref="file">
<div class="file-box">
<el-form>
<div class="file-title">重要事件</div>
<div class="file-top">
<span class="file-top-fromDept"
>报送单位:
<el-input v-model="fromDept" />
</span>
<span class="file-top-createTime"
>报送时间: {{ createTime }}
</span>
</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
class="file-content-text"
v-model="content"
type="textarea"
:rows="2"
placeholder="请输入内容"
></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>
<el-input
class="file-content-text"
v-model="content"
type="textarea"
:rows="2"
placeholder="请输入内容"
></el-input>
</div>
<div class="file-issuedr">
<span>签发人:</span
><el-input v-model="issued" placeholder=""></el-input>
<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 class="file-issuedr">
<span>签发人:</span
><el-input v-model="issued" placeholder=""></el-input>
</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>
</el-tab-pane>
<el-tab-pane label="续报" name="third"> </el-tab-pane>
@ -88,13 +107,20 @@
</Dialog>
</template>
<script>
import FileSaver from "file-saver";
import htmlDocx from "html-docx-js/dist/html-docx";
import Dialog from "@screen/components/Dialog/index";
import Form from "@screen/components/FormConfig";
import { formList, reportList } from "./data";
import { tabConfigList } from "../../EventInformation/components/EditEventInformationDialog/data.js";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { getEventImportant, editEventImportant } from "@/api/commandDispatch";
import {
getEventImportant,
editEventImportant,
deventImportantFileList,
} from "@/api/commandDispatch";
var moment = require("moment");
export default {
name: "EventDetail",
@ -254,7 +280,12 @@ export default {
});
},
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() {
@ -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() {
this.initData();
@ -470,6 +511,9 @@ export default {
}
}
}
.footer {
display: flex;
}
::v-deep .el-tabs__content {
overflow: auto;
position: relative;

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

@ -12,7 +12,7 @@
<div class="item">
<span class="label">湿度</span>
<span class="text">{{
data.humidity ? data.humidity + "mm" : "-"
data.humidity ? data.humidity + "%" : "-"
}}</span>
</div>
<div class="item">
@ -24,7 +24,7 @@
<div class="item">
<span class="label">风速</span>
<span class="text">{{
data.windSpeed ? data.windSpeed + "" : "-"
data.windSpeed ? data.windSpeed + "m/s" : "-"
}}</span>
</div>
<div class="item">
@ -108,7 +108,7 @@
<div class="item">
<span class="label"> 水膜厚度</span>
<span class="text">{{
data.waterFilmlceSnowValue ? data.waterFilmlceSnowValue + "mm" : "-"
data.waterFilmIceSnowValue ? data.waterFilmIceSnowValue + "mm" : "-"
}}</span>
</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="label">预警等级</div>
<div :class="item.severityColor">
{{
item.severity == "Cancel"
{{ item.severityColorText }}预警
<!-- item.severity == "Cancel"
? "取消"
: item.severity == "None"
? "无"
@ -55,8 +55,7 @@
? "严峻"
: item.severity == "Extreme"
? "极端"
: ""
}}
: "" -->
</div>
</div>
<!-- <div class="left-row">
@ -68,7 +67,7 @@
<div class="left-row">
<div class="label">预警发布时间</div>
<div class="value">
{{ item.pubTime }}
{{ moment(item.pubTime).format("YYYY-MM-DD HH:mm:ss") }}
</div>
</div>
</div>
@ -89,6 +88,7 @@
import { color } from "echarts";
import WgtTitle from "../../../../../widgets/title";
import { getMeteorologicalEarlyWarning } from "@/api/perception/meteorologyCheck";
import moment from "moment";
export default {
name: "infoWarning",
@ -97,6 +97,7 @@ export default {
},
data() {
return {
moment,
warningList: [],
warningData: [
// { typeName: "warning", severityColor: "Red", severity: "Severe" },
@ -106,29 +107,41 @@ export default {
colorSelect: "all",
colors: [
{ label: "全部", value: "all" },
{ label: "白色", value: "White" },
{ label: "蓝色", value: "Blue" },
{ label: "绿色", value: "Green" },
{ label: "黄色", value: "Yellow" },
{ label: "橙色", value: "Orange" },
{ label: "红色", value: "Red" },
{ label: "黑色", value: "Black" },
],
};
},
watch: {
colorSelect(val) {
if (val !== "all") {
const data = this.warningData.filter(
(item) => item.severityColor === val
);
this.warningList = data;
this.warningList = data;
} else {
this.warningList = this.warningData;
}
this.warningList = []; //
// 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() {},

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

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

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

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

Loading…
Cancel
Save