|
@@ -0,0 +1,223 @@
|
|
|
+<template>
|
|
|
+ <base-drag-bg-dialog
|
|
|
+ :dialogConfig="baseDialogConfig"
|
|
|
+ @handleClose="closeDialog"
|
|
|
+ @onActivated="onActivated"
|
|
|
+ >
|
|
|
+ <!-- 弹窗内容 -->
|
|
|
+ <div class="dialog_box">
|
|
|
+ <!-- 内容 -->
|
|
|
+ <div class="detail-table-box">
|
|
|
+ <base-table-list
|
|
|
+ :tableConfig="tableConfig"
|
|
|
+ @handleClick="handleTableClick"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </base-drag-bg-dialog>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import BaseTableList from "@/views/components/base/BaseTableList";
|
|
|
+import BaseDragBgDialog from "@/views/components/base/BaseDragBgDialog.vue";
|
|
|
+import { dealAlarm } from "@/API/common";
|
|
|
+import { getElementList } from "@/API/visual";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+export default {
|
|
|
+ name: "soundDialog",
|
|
|
+ components: { BaseDragBgDialog, BaseTableList },
|
|
|
+ watch: {
|
|
|
+ "soundDialog.show": {
|
|
|
+ handler(newVal) {
|
|
|
+ this.baseDialogConfig.show = newVal;
|
|
|
+ },
|
|
|
+ // deep: true,
|
|
|
+ immediate: true,
|
|
|
+ },
|
|
|
+ dataList: {
|
|
|
+ handler(newValue, oldValue) {
|
|
|
+ this.filterKey = "";
|
|
|
+ this.tableConfig.tableData = newValue;
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ BASE_URL,
|
|
|
+ dataList: [
|
|
|
+ {
|
|
|
+ id: "",
|
|
|
+ name: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ baseDialogConfig: {
|
|
|
+ dialogId: "soundDialog",
|
|
|
+ show: false,
|
|
|
+ title: "防爆扩音",
|
|
|
+ width: 640,
|
|
|
+ height: 540,
|
|
|
+ center: true,
|
|
|
+ zIndex: 10,
|
|
|
+ },
|
|
|
+ tableConfig: {
|
|
|
+ needIndex: true,
|
|
|
+ height: 456,
|
|
|
+ header: [
|
|
|
+ { title: "名称", prop: "name", width: "" },
|
|
|
+ { title: "描述", prop: "desc", width: "" },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ prop: "operation",
|
|
|
+ width: "",
|
|
|
+ btns: [
|
|
|
+ { btnName: "打开", btnType: "open" },
|
|
|
+ { btnName: "关闭", btnType: "close" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ tableData: [],
|
|
|
+ rowClick: this.location,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.initSoundList();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["soundDialog"]),
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ async initSoundList() {
|
|
|
+ try {
|
|
|
+ const res = await getElementList({ id: "784748250065281024" });
|
|
|
+ this.dataList = res.data.content;
|
|
|
+ console.log("防爆扩音列表", this.dataList);
|
|
|
+ // content.forEach((d) => {
|
|
|
+ // d.GPSPoints = this.transPosition(d.pointList);
|
|
|
+ // });
|
|
|
+ // elementData.push(...content)
|
|
|
+ } catch (err) {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ closeDialog() {
|
|
|
+ this.$store.dispatch("globalConfig/setSoundDialog", {
|
|
|
+ show: false,
|
|
|
+ dialogMsg: {},
|
|
|
+ type: "All",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async handleDeal() {
|
|
|
+ try {
|
|
|
+ await dealAlarm({
|
|
|
+ id: this.soundDialog.dialogMsg.id,
|
|
|
+ dealContent: this.soundDialog.dialogMsg.dealContent,
|
|
|
+ });
|
|
|
+ this.closeDialog();
|
|
|
+ // 刷新报警列表页
|
|
|
+ } catch (err) {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleTableClick(data, btnType) {
|
|
|
+ if (btnType === "open") {
|
|
|
+ console.log("打开扩音", data);
|
|
|
+ }
|
|
|
+ if (btnType === "close") {
|
|
|
+ console.log("关闭扩音", data);
|
|
|
+ }
|
|
|
+ // const tableData = this.$parent.$parent.alarmLiveData.filter((item) => {
|
|
|
+ // return item.Category == "100001" && item.ObjectID == data.id;
|
|
|
+ // });
|
|
|
+ // this.$store.dispatch("dialog/openLayerDetailDialog", {
|
|
|
+ // id: data.id,
|
|
|
+ // type: "rail",
|
|
|
+ // name: "围栏",
|
|
|
+ // detail: {
|
|
|
+ // id: data.id,
|
|
|
+ // name: data.name,
|
|
|
+ // tableData,
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ onActivated() {
|
|
|
+ // console.log("aaa");
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.dealContent.focus();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.dialog_box {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .dialog_content_box {
|
|
|
+ height: 2.083333rem /* 400/192 */;
|
|
|
+ padding: 0.104167rem /* 20/192 */ 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: #fff;
|
|
|
+ .detail-box {
|
|
|
+ .el-row {
|
|
|
+ margin-top: 0.052083rem /* 10/192 */;
|
|
|
+ line-height: 0.145833rem /* 28/192 */;
|
|
|
+ .detail-label {
|
|
|
+ vertical-align: top;
|
|
|
+ display: inline-block;
|
|
|
+ width: 0.520833rem /* 100/192 */;
|
|
|
+ text-align: right;
|
|
|
+ padding-right: 0.052083rem /* 10/192 */;
|
|
|
+ }
|
|
|
+ .el-input {
|
|
|
+ width: 1.302083rem /* 250/192 */;
|
|
|
+ height: 0.145833rem /* 28/192 */;
|
|
|
+ }
|
|
|
+ .el-textarea {
|
|
|
+ width: 3.385417rem /* 650/192 */;
|
|
|
+ }
|
|
|
+
|
|
|
+ .image-box {
|
|
|
+ display: inline-block;
|
|
|
+ max-width: 1.666667rem /* 320/192 */;
|
|
|
+ height: 0.9375rem /* 180/192 */;
|
|
|
+ .el-image {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn-box {
|
|
|
+ width: 100%;
|
|
|
+ height: 0.15625rem /* 30/192 */;
|
|
|
+ text-align: center;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0.15625rem /* 30/192 */;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, 0);
|
|
|
+ .el-button {
|
|
|
+ width: 0.40625rem /* 78/192 */;
|
|
|
+ height: 0.145833rem /* 28/192 */;
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin-top: 0.015625rem /* 3/192 */;
|
|
|
+ color: #fff;
|
|
|
+ padding: 0;
|
|
|
+ border-color: #fff9de;
|
|
|
+ border-radius: 0;
|
|
|
+ &:hover {
|
|
|
+ border-color: #ccc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn-handle.el-button {
|
|
|
+ // background: url('../../../../assets/out/imgs/popup/button_bg.png') center no-repeat;
|
|
|
+ background: rgba(4, 42, 47, 0.6);
|
|
|
+ }
|
|
|
+ .btn-cancel.el-button {
|
|
|
+ background: rgba(13, 35, 64, 0.1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|