Browse Source

事件处置信息发布

develop
lau572 3 weeks ago
parent
commit
83a6167ea0
  1. 191
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue

191
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue

@ -31,7 +31,7 @@
<div class="bottom"> <div class="bottom">
<Button <Button
v-if="detailData.eventState != 2" v-if="detailData.eventState != 2"
@click.native="handleSubmit" @click.native="openDialog"
:loading="submitting" :loading="submitting"
class="title-button special-button" class="title-button special-button"
> >
@ -41,10 +41,65 @@
发布预案 发布预案
</ButtonGradient> --> </ButtonGradient> -->
</div> </div>
<Dialog
title="接收人"
v-model="dialogVisible"
width="1000px"
>
<div class="StatsDetail">
<el-form ref="dialogForm" :model="dialogForm">
<el-table :data="tableData">
<el-table-column
prop="organizationName"
label="路管驻点"
width="180"
align="center"
>
</el-table-column>
<el-table-column
prop="difference"
label="距离"
width="180"
align="center"
>
<template slot-scope="scope">
<span>{{ scope.row.difference }}公里</span>
</template>
</el-table-column>
<el-table-column label="人员" align="center">
<template slot-scope="scope">
<div style="max-height: 100px;overflow-y: auto;">
<el-checkbox-group v-model="dialogForm.employees">
<el-checkbox
v-for="item in scope.row.employeesList"
:key="item.id"
:label="item.id"
>{{ item.name }}</el-checkbox
>
</el-checkbox-group>
</div>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<template #footer>
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(dialogVisible = false), (submitting = false)"
>
关闭
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定</Button>
</template>
</Dialog>
</Card> </Card>
</template> </template>
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue";
import Card from "@screen/components/Card2/Card.vue"; import Card from "@screen/components/Card2/Card.vue";
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue"; import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Button from "@screen/components/Buttons/Button.vue"; import Button from "@screen/components/Buttons/Button.vue";
@ -58,6 +113,7 @@ export default {
name: "ReleaseInformation", name: "ReleaseInformation",
mixins: [provideMixin], mixins: [provideMixin],
components: { components: {
Dialog,
Card, Card,
ButtonGradient, ButtonGradient,
CheckboxGroup, CheckboxGroup,
@ -72,13 +128,13 @@ export default {
this.eventId = newValue.id; this.eventId = newValue.id;
this.bindChannels(); this.bindChannels();
this.bindEmployees(newValue.stakeMark);
// console.log("", this.provideDetail); // console.log("", this.provideDetail);
}, },
}, },
data() { data() {
return { return {
list: [ list: [
{ {
label: "情报板", label: "情报板",
@ -116,6 +172,12 @@ export default {
// default: [], // default: [],
// }, // },
], ],
dialogVisible:false,
dialogForm:{
employees:[]
},
tableData:[],
}; };
}, },
mounted() { mounted() {
@ -139,7 +201,21 @@ export default {
}, 1000); }, 1000);
}, },
async handleSubmit() { bindEmployees(stakeMark){
setTimeout(() => {
request({
url: `/business/employees/getAllEmployees`,
method: "get",
params: {stakeMark: stakeMark }
}).then((result) => {
if(result && result.length > 0){
this.tableData = result
}
})
}, 1000);
},
async openDialog(){
await this.$refs.FormMsgRef.validate() await this.$refs.FormMsgRef.validate()
.then(async (res) => { .then(async (res) => {
let data = _.cloneDeep(res); let data = _.cloneDeep(res);
@ -158,14 +234,27 @@ export default {
} }
data.eventId = this.detailData.id; data.eventId = this.detailData.id;
data.stakeMark = this.detailData.stakeMark data.stakeMark = this.detailData.stakeMark
console.log(this.detailData) for (let key in data) {
if (data.hasOwnProperty(key)) {
this.dialogForm[key] = data[key];
}
}
this.dialogVisible = true
})
.catch((err) => {
console.log("catch" + err);
});
},
async handleSubmit() {
this.submitting = true; this.submitting = true;
await request({ await request({
url: `/business/sms/pushAll`, url: `/business/sms/pushAll`,
method: "post", method: "post",
data: data, data: this.dialogForm,
}) }).then((result) => {
.then((result) => {
if (result.code != 200) return this.$message.error(result?.msg); if (result.code != 200) return this.$message.error(result?.msg);
this.$message.success("提交成功"); this.$message.success("提交成功");
this.reload(); this.reload();
@ -175,10 +264,7 @@ export default {
}) })
.finally(() => { .finally(() => {
this.submitting = false; this.submitting = false;
}); this.dialogVisible = false;
})
.catch((err) => {
console.log("catch" + err);
}); });
}, },
}, },
@ -243,4 +329,87 @@ export default {
} }
} }
} }
::v-deep .el-table__empty-text {
color: #3ae0f8;
}
.StatsDetail {
// height: 770px;
margin: 20px 0;
width: 100%;
display: flex;
gap: 5px;
}
.el-table {
border: 1px solid #07aec6;
background: #0b6581;
}
@media (min-width: 3000px) {
::v-deep .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
height: 55px !important;
background: #0b6581;
border: 1px solid #07aec6;
font-size: 22px;
}
::v-deep .el-table td.el-table__cell div{
font-size: 22px;
}
}
::v-deep .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
background: #0b6581;
border: 1px solid #07aec6;
}
::v-deep .el-table th.el-table__cell > .cell {
color: #3de8ff;
}
::v-deep .el-table thead.is-group th.el-table__cell {
background: #0b6581;
border: 1px solid #07aec6;
}
// ::v-deep .el-table th.el-table__cell.is-leaf,
::v-deep .el-table td.el-table__cell {
border: 1px solid #07aec6;
background: #1b586d;
color: #fff;
}
::v-deep .el-table td.el-table__cell div {
line-height: 30px;
}
::v-deep .el-checkbox-group {
text-align: left;
.el-checkbox {
min-width: 70px;
}
}
::v-deep .el-table tr {
border: 1px solid #07aec6;
background-color: #0b6581;
}
::v-deep
.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background: #1b586d;
border: 1px solid #07aec6;
}
::v-deep .el-table::before,
.el-table--group::after,
.el-table--border::after {
background: none;
}
.footer {
margin-top: 20px;
display: flex;
}
</style> </style>

Loading…
Cancel
Save