Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
gaoguangchao 3 weeks ago
parent
commit
9e1b4c3255
  1. 221
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue

221
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,11 +41,66 @@
发布预案 发布预案
</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 Card from "@screen/components/Card2/Card.vue"; import Dialog from "@screen/components/Dialog/index.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";
import Form from "@screen/components/FormConfig"; import Form from "@screen/components/FormConfig";
@ -58,6 +113,7 @@ export default {
name: "ReleaseInformation", name: "ReleaseInformation",
mixins: [provideMixin], mixins: [provideMixin],
components: { components: {
Dialog,
Card, Card,
ButtonGradient, ButtonGradient,
CheckboxGroup, CheckboxGroup,
@ -67,18 +123,18 @@ export default {
}, },
inject: ["provideData","reload"], inject: ["provideData","reload"],
watch: { watch: {
async "provideData.detail"(newValue, oldValue) { async "provideData.detail"(newValue, oldValue) {
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,11 +172,17 @@ export default {
// default: [], // default: [],
// }, // },
], ],
dialogVisible:false,
dialogForm:{
employees:[]
},
tableData:[],
}; };
}, },
mounted() { mounted() {
// //
}, },
methods: { methods: {
bindChannels(){ bindChannels(){
@ -137,9 +199,23 @@ 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,29 +234,39 @@ 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) {
this.submitting = true; if (data.hasOwnProperty(key)) {
await request({ this.dialogForm[key] = data[key];
url: `/business/sms/pushAll`, }
method: "post", }
data: data, this.dialogVisible = true
})
.then((result) => {
if (result.code != 200) return this.$message.error(result?.msg);
this.$message.success("提交成功");
this.reload();
})
.catch(() => {
this.$message.error("提交失败");
})
.finally(() => {
this.submitting = false;
});
}) })
.catch((err) => { .catch((err) => {
console.log("catch" + err); console.log("catch" + err);
}); });
}, },
async handleSubmit() {
this.submitting = true;
await request({
url: `/business/sms/pushAll`,
method: "post",
data: this.dialogForm,
}).then((result) => {
if (result.code != 200) return this.$message.error(result?.msg);
this.$message.success("提交成功");
this.reload();
})
.catch(() => {
this.$message.error("提交失败");
})
.finally(() => {
this.submitting = false;
this.dialogVisible = false;
});
},
}, },
}; };
</script> </script>
@ -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