| | |
| | | "eventemitter3": { |
| | | "version": "4.0.7", |
| | | "resolved": "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-4.0.7.tgz?cache=0&sync_timestamp=1598517714257&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feventemitter3%2Fdownload%2Feventemitter3-4.0.7.tgz", |
| | | "integrity": "sha1-Lem2j2Uo1WRO9cWVJqG0oHMGFp8=", |
| | | "dev": true |
| | | "integrity": "sha1-Lem2j2Uo1WRO9cWVJqG0oHMGFp8=" |
| | | }, |
| | | "events": { |
| | | "version": "3.2.0", |
| | |
| | | "resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-10.5.0.tgz", |
| | | "integrity": "sha1-Pwn+3mqGV1c3jy2evcvBW6Jo+Y8=", |
| | | "dev": true |
| | | }, |
| | | "hls.js": { |
| | | "version": "0.14.17", |
| | | "resolved": "https://registry.npm.taobao.org/hls.js/download/hls.js-0.14.17.tgz", |
| | | "integrity": "sha1-ASfP8uwvmUpU65Vf5mnvYVOo4xc=", |
| | | "requires": { |
| | | "eventemitter3": "^4.0.3", |
| | | "url-toolkit": "^2.1.6" |
| | | } |
| | | }, |
| | | "hmac-drbg": { |
| | | "version": "1.0.1", |
| | |
| | | "requires-port": "^1.0.0" |
| | | } |
| | | }, |
| | | "url-toolkit": { |
| | | "version": "2.2.1", |
| | | "resolved": "https://registry.npm.taobao.org/url-toolkit/download/url-toolkit-2.2.1.tgz", |
| | | "integrity": "sha1-iQCe09YqNXTeB5UypyZsFNLMHE8=" |
| | | }, |
| | | "use": { |
| | | "version": "3.1.1", |
| | | "resolved": "https://registry.npm.taobao.org/use/download/use-3.1.1.tgz", |
| | |
| | | "classlist-polyfill": "^1.2.0", |
| | | "crypto-js": "^4.0.0", |
| | | "element-ui": "^2.13.2", |
| | | "hls.js": "^0.14.17", |
| | | "js-base64": "^2.5.1", |
| | | "js-cookie": "^2.2.0", |
| | | "js-md5": "^0.7.3", |
| | |
| | | import avueUeditor from 'avue-plugin-ueditor'; |
| | | import website from '@/config/website'; |
| | | import crudCommon from '@/mixins/crud'; |
| | | |
| | | // 注册全局crud驱动 |
| | | window.$crudCommon = crudCommon; |
| | | // 加载Vue拓展 |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crud" |
| | | @row-del="rowDel" |
| | | v-model="form" |
| | | :permission="permissionList" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | :before-open="beforeOpen" |
| | | :row-style="rowStyle" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crud" |
| | | @row-del="rowDel" |
| | | v-model="form" |
| | | :permission="permissionList" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | :before-open="beforeOpen" |
| | | :row-style="rowStyle" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.real_delete" |
| | | @click="handleDelete">删 除 |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.real_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menuRight"> |
| | | <el-button size="small" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getBZdata">本周 |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getBZdata" |
| | | >本周 |
| | | </el-button> |
| | | <el-button size="small" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getBYdata">本月 |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getBYdata" |
| | | >本月 |
| | | </el-button> |
| | | <el-button size="small" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getQBdata">全部 |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getQBdata" |
| | | >全部 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row}" slot="jtype"> |
| | | <el-tag>{{row.jtype=='0'?'否':row.jtype=='1'?'是':'无'}}</el-tag> |
| | | <template slot-scope="{ row }" slot="jtype"> |
| | | <el-tag>{{ |
| | | row.jtype == "0" ? "否" : row.jtype == "1" ? "是" : "无" |
| | | }}</el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{type,size,row}" slot="menu"> |
| | | <el-button icon="el-icon-check" :size="size" :type="type" @click.stop="handleHistory(row)">历史</el-button> |
| | | <el-button icon="el-icon-check" :size="size" :type="type" @click.stop="handleStart(row)">视频</el-button> |
| | | <el-button icon="el-icon-check" :size="size" :type="type" @click.stop="handleManage(row)">处置</el-button> |
| | | <el-button icon="el-icon-check" :size="size" :type="type" @click.stop="handleAdd11()">定位</el-button> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-check" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="handleHistory(row)" |
| | | >历史</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-check" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="handleStart(row)" |
| | | >视频</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-check" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="handleManage(row)" |
| | | >处置</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-check" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="handleAdd11()" |
| | | >定位</el-button |
| | | > |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog |
| | | title="警情处置" |
| | | :visible.sync="dialogTableVisible" |
| | | append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | @close="innerVisibleVideo = false" |
| | | > |
| | | <el-dialog |
| | | class="old-video-dialog" |
| | | :modal="false" |
| | | width="100%" |
| | | title="历史视频" |
| | | :visible.sync="innerVisibleVideo" |
| | | :close-on-press-escape="false" |
| | | append-to-body |
| | | @opened="openOldVideoBox()" |
| | | @close="closeOldVideoBox" |
| | | > |
| | | <video |
| | | src="" |
| | | id="old_video" |
| | | style="width: 100%; height: 100%; object-fit:fill" |
| | | controls |
| | | ></video> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="警情处置" :visible.sync="dialogTableVisible" append-to-body="true"> |
| | | <el-form :model="form" label-position="right" size="mini" label-width="100px"> |
| | | <el-form |
| | | :model="form" |
| | | label-position="right" |
| | | size="mini" |
| | | label-width="100px" |
| | | > |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="报警人" > |
| | | <el-input disabled="true" v-model="form.alarmPeople" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="联系电话" > |
| | | <el-input disabled="true" v-model="form.phoneNumber" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="行政区" > |
| | | <el-input disabled="true" v-model="form.district" autocomplete="off"></el-input> |
| | | <el-form-item label="报警人"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.alarmPeople" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="事发地址" > |
| | | <el-input disabled="true" v-model="form.place" autocomplete="off"></el-input> |
| | | <el-form-item label="联系电话"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.phoneNumber" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="警情类别" > |
| | | <el-input disabled="true" v-model="form.waringType" autocomplete="off"></el-input> |
| | | <el-form-item label="行政区"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.district" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="设备编号" > |
| | | <el-input disabled="true" v-model="form.deviceNumber" autocomplete="off"></el-input> |
| | | <el-form-item label="事发地址"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.place" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="接警人" > |
| | | <el-input disabled="true" v-model="form.galarmPeople" autocomplete="off"></el-input> |
| | | <el-form-item label="警情类别"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.waringType" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="接警时间" > |
| | | <el-input disabled="true" v-model="form.jjTime" autocomplete="off"></el-input> |
| | | <el-form-item label="设备编号"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.deviceNumber" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="报警时间" > |
| | | <el-input disabled="true" v-model="form.alarmTime" autocomplete="off"></el-input> |
| | | <el-form-item label="接警人"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.galarmPeople" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="历史视频" > |
| | | <el-button type="primary">查看视频</el-button> |
| | | <el-form-item label="接警时间"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.jjTime" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form-item label="报警内容" > |
| | | <el-input disabled="true" v-model="form.content" autocomplete="off"></el-input> |
| | | <el-col span="12"> |
| | | <el-form-item label="报警时间"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.alarmTime" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="历史视频"> |
| | | <el-button type="primary" @click="queryOldVideo(form)" |
| | | >查看视频</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form-item label="报警内容"> |
| | | <el-input |
| | | disabled="true" |
| | | v-model="form.content" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="要求处置时间" > |
| | | <el-form-item label="要求处置时间"> |
| | | <el-date-picker |
| | | v-model="form.czTime" |
| | | type="datetime" |
| | | placeholder="选择日期时间"> |
| | | placeholder="选择日期时间" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="备注" > |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.bz" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :align='center'> |
| | | <el-row :align="center"> |
| | | <el-col :offset="4"> |
| | | <el-form-item > |
| | | <el-form-item> |
| | | <el-button type="success">一件呼叫</el-button> |
| | | <el-button type="success">视频对讲</el-button> |
| | | <el-button type="primary">生成警单</el-button> |
| | |
| | | </el-dialog> |
| | | |
| | | <el-drawer |
| | | title="我是标题" |
| | | append-to-body=true |
| | | :visible.sync="qwe" |
| | | :direction="direction"> |
| | | <iframe src="http://www.baidu.com" frameborder="0" width="100%" height="600px"></iframe> |
| | | </el-drawer> |
| | | title="我是标题" |
| | | append-to-body="true" |
| | | :visible.sync="qwe" |
| | | :direction="direction" |
| | | > |
| | | <iframe |
| | | src="http://www.baidu.com" |
| | | frameborder="0" |
| | | width="100%" |
| | | height="600px" |
| | | ></iframe> |
| | | </el-drawer> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <script> |
| | | import {getList, remove, update, add, getclient} from "@/api/real/real"; |
| | | import {mapGetters} from "vuex"; |
| | | import { getList, remove, update, add, getclient } from "@/api/real/real"; |
| | | import { mapGetters } from "vuex"; |
| | | import Hls from "hls.js"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | qwe:false, |
| | | dialogTableVisible:false, |
| | | direction: 'rtl', |
| | | form: {}, |
| | | query: {}, |
| | | dateTime: [], |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height: 'auto', |
| | | indexLabel: '序号', |
| | | calcHeight: 30, |
| | | labelWidth: '100', |
| | | menuWidth:300, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "警情类型", |
| | | prop: "waringType", |
| | | search: true, |
| | | searchSpan: 3, |
| | | }, |
| | | { |
| | | label: "报警时间", |
| | | type: "datetime", |
| | | width:130, |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | prop: "alarmTime", |
| | | }, |
| | | { |
| | | label: "报警时间", |
| | | prop: "releaseTimeRange", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | searchRange: true, |
| | | searchSpan: 5, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | import axios from "axios"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | qwe: false, |
| | | hls: "", |
| | | videoSource: "", |
| | | dialogTableVisible: false, |
| | | innerVisibleVideo: false, |
| | | direction: "rtl", |
| | | form: {}, |
| | | query: {}, |
| | | dateTime: [], |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | indexLabel: "序号", |
| | | calcHeight: 30, |
| | | labelWidth: "100", |
| | | menuWidth: 300, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "警情类型", |
| | | prop: "waringType", |
| | | search: true, |
| | | searchSpan: 3 |
| | | }, |
| | | { |
| | | label: "报警时间", |
| | | type: "datetime", |
| | | width: 130, |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | prop: "alarmTime" |
| | | }, |
| | | { |
| | | label: "报警时间", |
| | | prop: "releaseTimeRange", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | searchRange: true, |
| | | searchSpan: 5, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "报警内容", |
| | | prop: "rname", |
| | | }, { |
| | | label: "报警人", |
| | | prop: "alarmPeople", |
| | | }, { |
| | | label: "联系电话", |
| | | prop: "phoneNumber", |
| | | width:130, |
| | | }, { |
| | | label: "接警人", |
| | | prop: "galarmPeople", |
| | | }, { |
| | | label: "接警时间", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | width:130, |
| | | prop: "jjTime", |
| | | }, { |
| | | label: "事发地址", |
| | | width:200, |
| | | prop: "place", |
| | | }, { |
| | | label: "设备编号", |
| | | search: true, |
| | | searchSpan: 3, |
| | | width:130, |
| | | prop: "deviceNumber", |
| | | }, { |
| | | label: "生成警单", |
| | | search: true, |
| | | searchSpan: 3, |
| | | slot: true, |
| | | searchPlaceholder: "", |
| | | prop: "jtype", |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "否", |
| | | value: '0' |
| | | }, |
| | | { |
| | | label: "是", |
| | | value: '1' |
| | | } |
| | | ], |
| | | }, { |
| | | label: '行政区', |
| | | prop: 'province', |
| | | search: true, |
| | | searchSpan: 3, |
| | | searchLabelWidth: 60, |
| | | placeholder:"行政区", |
| | | type: 'select', |
| | | props: { |
| | | label: 'name', |
| | | value: 'code' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "报警内容", |
| | | prop: "rname" |
| | | }, |
| | | { |
| | | label: "报警人", |
| | | prop: "alarmPeople" |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "phoneNumber", |
| | | width: 130 |
| | | }, |
| | | { |
| | | label: "接警人", |
| | | prop: "galarmPeople" |
| | | }, |
| | | { |
| | | label: "接警时间", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | width: 130, |
| | | prop: "jjTime" |
| | | }, |
| | | { |
| | | label: "事发地址", |
| | | width: 200, |
| | | prop: "place" |
| | | }, |
| | | { |
| | | label: "设备编号", |
| | | search: true, |
| | | searchSpan: 3, |
| | | width: 130, |
| | | prop: "deviceNumber" |
| | | }, |
| | | { |
| | | label: "生成警单", |
| | | search: true, |
| | | searchSpan: 3, |
| | | slot: true, |
| | | searchPlaceholder: "", |
| | | prop: "jtype", |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "否", |
| | | value: "0" |
| | | }, |
| | | cascaderItem: ['city', 'district'], |
| | | dicUrl: '/api/blade-system/region/select', |
| | | span: 6, |
| | | className: 'cityClass1' |
| | | { |
| | | label: "是", |
| | | value: "1" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "行政区", |
| | | prop: "province", |
| | | search: true, |
| | | searchSpan: 3, |
| | | searchLabelWidth: 60, |
| | | placeholder: "行政区", |
| | | type: "select", |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | }, |
| | | { |
| | | label: '地市', |
| | | prop: 'city', |
| | | type: 'select', |
| | | searchPlaceholder: "地市", |
| | | placeholder:"地市", |
| | | searchLabelWidth: 1, |
| | | searchSpan: 2, |
| | | search: true, |
| | | props: { |
| | | label: 'name', |
| | | value: 'code' |
| | | }, |
| | | dicUrl: '/api/blade-system/region/select?code={{key}}', |
| | | span: 3, |
| | | labelWidth: '0', |
| | | className: 'cityClass2' |
| | | cascaderItem: ["city", "district"], |
| | | dicUrl: "/api/blade-system/region/select", |
| | | span: 6, |
| | | className: "cityClass1" |
| | | }, |
| | | { |
| | | label: "地市", |
| | | prop: "city", |
| | | type: "select", |
| | | searchPlaceholder: "地市", |
| | | placeholder: "地市", |
| | | searchLabelWidth: 1, |
| | | searchSpan: 2, |
| | | search: true, |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | }, |
| | | { |
| | | label: '区县', |
| | | searchSpan: 2, |
| | | searchLabelWidth: 1, |
| | | searchPlaceholder: "区县", |
| | | placeholder:"区县", |
| | | search: true, |
| | | prop: 'district', |
| | | type: 'select', |
| | | props: { |
| | | label: 'name', |
| | | value: 'code' |
| | | }, |
| | | dicUrl: '/api/blade-system/region/select?code={{key}}', |
| | | span: 3, |
| | | labelWidth: '0', |
| | | className: 'cityClass3' |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 3, |
| | | labelWidth: "0", |
| | | className: "cityClass2" |
| | | }, |
| | | { |
| | | label: "区县", |
| | | searchSpan: 2, |
| | | searchLabelWidth: 1, |
| | | searchPlaceholder: "区县", |
| | | placeholder: "区县", |
| | | search: true, |
| | | prop: "district", |
| | | type: "select", |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | }, |
| | | |
| | | ] |
| | | }, |
| | | data: [] |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 3, |
| | | labelWidth: "0", |
| | | className: "cityClass3" |
| | | } |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "flowRoutes"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.real_add, false), |
| | | viewBtn: this.vaildData(this.permission.real_view, false), |
| | | delBtn: this.vaildData(this.permission.real_delete, false), |
| | | editBtn: this.vaildData(this.permission.real_edit, false) |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "flowRoutes"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.real_add, false), |
| | | viewBtn: this.vaildData(this.permission.real_view, false), |
| | | delBtn: this.vaildData(this.permission.real_delete, false), |
| | | editBtn: this.vaildData(this.permission.real_edit, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | created() { |
| | | this.dateTime = this.getDate(); |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row.coordinate = ""; |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getclient(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { releaseTimeRange } = this.query; |
| | | let values = { |
| | | ...params |
| | | }; |
| | | if (releaseTimeRange) { |
| | | values = { |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | endTime: releaseTimeRange[1], |
| | | ...this.query |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | getDate() { |
| | | // 当前时间 |
| | | var timestamp = Date.parse(new Date()); |
| | | var serverDate = new Date(timestamp); |
| | | |
| | | // 本周周一的时间 |
| | | var mondayTime = |
| | | timestamp - (serverDate.getDay() - 1) * 24 * 60 * 60 * 1000; |
| | | var mondayData = new Date(mondayTime); |
| | | //年 |
| | | var mondayY = mondayData.getFullYear(); |
| | | //月 |
| | | var mondayM = |
| | | mondayData.getMonth() + 1 < 10 |
| | | ? "0" + (mondayData.getMonth() + 1) |
| | | : mondayData.getMonth() + 1; |
| | | //日 |
| | | var mondayD = |
| | | mondayData.getDate() < 10 |
| | | ? "0" + mondayData.getDate() |
| | | : mondayData.getDate(); |
| | | // 当前时间 |
| | | var currentData = new Date(timestamp); |
| | | //年 |
| | | var currentY = currentData.getFullYear(); |
| | | //月 |
| | | var currentM = |
| | | currentData.getMonth() + 1 < 10 |
| | | ? "0" + (currentData.getMonth() + 1) |
| | | : currentData.getMonth() + 1; |
| | | //日 |
| | | var currentD = |
| | | currentData.getDate() < 10 |
| | | ? "0" + currentData.getDate() |
| | | : currentData.getDate(); |
| | | //时 |
| | | var currenH = |
| | | currentData.getHours() < 10 |
| | | ? "0" + currentData.getHours() |
| | | : currentData.getHours(); |
| | | //分 |
| | | var currenM = |
| | | currentData.getMinutes() < 10 |
| | | ? "0" + currentData.getMinutes() |
| | | : currentData.getMinutes(); |
| | | |
| | | return { |
| | | week: { |
| | | beginTime: mondayY + "-" + mondayM + "-" + mondayD + " 00:00:00", |
| | | endTime: |
| | | currentY + |
| | | "-" + |
| | | currentM + |
| | | "-" + |
| | | currentD + |
| | | " " + |
| | | currenH + |
| | | ":" + |
| | | currenM + |
| | | ":00" |
| | | }, |
| | | month: { |
| | | beginTime: mondayY + "-" + mondayM + "-01 00:00:00", |
| | | endTime: |
| | | currentY + |
| | | "-" + |
| | | currentM + |
| | | "-" + |
| | | currentD + |
| | | " " + |
| | | currenH + |
| | | ":" + |
| | | currenM + |
| | | ":00" |
| | | } |
| | | }; |
| | | }, |
| | | getBZdata() { |
| | | var params = { |
| | | beginTime: this.dateTime.week.beginTime, |
| | | endTime: this.dateTime.week.endTime |
| | | }; |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | }, |
| | | getBYdata() { |
| | | var params = { |
| | | beginTime: this.dateTime.month.beginTime, |
| | | endTime: this.dateTime.month.endTime |
| | | }; |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | }, |
| | | getQBdata() { |
| | | var params = {}; |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | }, |
| | | rowStyle({ row, column, rowIndex }) { |
| | | if (row.jtype == "1") { |
| | | return { |
| | | color: "#15a2fe" |
| | | }; |
| | | } else { |
| | | return { |
| | | color: "#ff7627" |
| | | }; |
| | | } |
| | | }, |
| | | created() { |
| | | this.dateTime = this.getDate(); |
| | | handleStart(row) { |
| | | this.$router.push({ |
| | | path: `/real/video/${row.channelNumber}/${row.serialNumber}` |
| | | }); |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | handleHistory(row) { |
| | | this.$router.push({ path: `/real/history/${row.deviceNumber}` }); |
| | | }, |
| | | handleAdd11() { |
| | | this.qwe = true; |
| | | }, |
| | | handleManage(row) { |
| | | this.form = row; |
| | | this.dialogTableVisible = true; |
| | | }, |
| | | beginTimeOrEndTime(time) { |
| | | var beginTime = new Date(time); |
| | | |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row.coordinate = ""; |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | var endTime = new Date(new Date(time).valueOf() - 1000 * 30); |
| | | |
| | | var beginY = beginTime.getFullYear(); |
| | | |
| | | var beginM = |
| | | beginTime.getMonth() + 1 < 10 |
| | | ? "0" + (beginTime.getMonth() + 1) |
| | | : beginTime.getMonth() + 1; |
| | | |
| | | var beginD = |
| | | beginTime.getDate() < 10 |
| | | ? "0" + beginTime.getDate() |
| | | : beginTime.getDate(); |
| | | |
| | | var beginH = |
| | | beginTime.getHours() < 10 |
| | | ? "0" + beginTime.getHours() |
| | | : beginTime.getHours(); |
| | | |
| | | var beginm = |
| | | beginTime.getMinutes() < 10 |
| | | ? "0" + beginTime.getMinutes() |
| | | : beginTime.getMinutes(); |
| | | |
| | | var begins = |
| | | beginTime.getSeconds() < 10 |
| | | ? "0" + beginTime.getSeconds() |
| | | : beginTime.getSeconds(); |
| | | |
| | | var endY = endTime.getFullYear(); |
| | | |
| | | var endM = |
| | | endTime.getMonth() + 1 < 10 |
| | | ? "0" + (endTime.getMonth() + 1) |
| | | : endTime.getMonth() + 1; |
| | | |
| | | var endD = |
| | | endTime.getDate() < 10 ? "0" + endTime.getDate() : endTime.getDate(); |
| | | |
| | | var endH = |
| | | endTime.getHours() < 10 ? "0" + endTime.getHours() : endTime.getHours(); |
| | | |
| | | var endm = |
| | | endTime.getMinutes() < 10 |
| | | ? "0" + endTime.getMinutes() |
| | | : endTime.getMinutes(); |
| | | |
| | | var ends = |
| | | endTime.getSeconds() < 10 |
| | | ? "0" + endTime.getSeconds() |
| | | : endTime.getSeconds(); |
| | | |
| | | return { |
| | | begin: beginY + beginM + beginD + beginH + beginm + begins, |
| | | end: endY + endM + endD + endH + endm + ends |
| | | }; |
| | | }, |
| | | queryOldVideo(data) { |
| | | console.log(data); |
| | | var newAxios = axios.create({ |
| | | baseURL: "http://s16s652780.51mypc.cn", |
| | | withCredentials: false, |
| | | headers: { |
| | | "Content-type": "application/x-www-form-urlencoded" |
| | | } |
| | | }); |
| | | |
| | | //s16s652780.51mypc.cn/api_control |
| | | |
| | | var time = this.beginTimeOrEndTime(data.alarmTime); |
| | | |
| | | newAxios |
| | | .post( |
| | | "/api_control", |
| | | {}, |
| | | { |
| | | params: { |
| | | param: JSON.stringify({ PktType: "GetAccessToken" }) |
| | | } |
| | | } |
| | | ) |
| | | .then(res => { |
| | | console.log(res.data.data.accessToken); |
| | | |
| | | newAxios |
| | | .get( |
| | | `/GetPlayUrl?deviceCode=${data.channelNumber}&chl=${data.serialNumber}` |
| | | ) |
| | | .then(result => { |
| | | |
| | | this.innerVisibleVideo = true; |
| | | |
| | | this.videoSource = result.data.data.m3u8; |
| | | |
| | | }); |
| | | }); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getclient(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const {releaseTimeRange} = this.query; |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | if (releaseTimeRange) { |
| | | values = { |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | endTime: releaseTimeRange[1], |
| | | ...this.query |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | |
| | | // newAxios |
| | | // .post( |
| | | // "/api_control", |
| | | // {}, |
| | | // { |
| | | // params: { |
| | | // param: JSON.stringify({ |
| | | // PktType: "RemotePlayback", |
| | | // accessToken: res.data.data.accessToken, |
| | | // deviceCode: data.channelNumber, |
| | | // startTime: time.end, |
| | | // endTime: time.begin, |
| | | // chl: data.serialNumber |
| | | // }) |
| | | // } |
| | | // } |
| | | // ) |
| | | // .then(result => { |
| | | |
| | | // this.videoSource = result.data.data.m3u8 |
| | | |
| | | // this.innerVisibleVideo = true |
| | | |
| | | // }); |
| | | }); |
| | | }, |
| | | getDate() { |
| | | // 当前时间 |
| | | var timestamp = Date.parse(new Date()); |
| | | var serverDate = new Date(timestamp); |
| | | }, |
| | | openOldVideoBox() { |
| | | if (Hls.isSupported()) { |
| | | var dom = document.getElementById("old_video"); |
| | | |
| | | // 本周周一的时间 |
| | | var mondayTime = timestamp - ((serverDate.getDay() - 1) * 24 * 60 * 60 * 1000) |
| | | var mondayData = new Date(mondayTime); |
| | | //年 |
| | | var mondayY = mondayData.getFullYear(); |
| | | //月 |
| | | var mondayM = (mondayData.getMonth() + 1 < 10 ? '0' + (mondayData.getMonth() + 1) : mondayData.getMonth() + 1); |
| | | //日 |
| | | var mondayD = mondayData.getDate() < 10 ? '0' + mondayData.getDate() : mondayData.getDate(); |
| | | // 当前时间 |
| | | var currentData = new Date(timestamp); |
| | | //年 |
| | | var currentY = currentData.getFullYear(); |
| | | //月 |
| | | var currentM = (currentData.getMonth() + 1 < 10 ? '0' + (currentData.getMonth() + 1) : currentData.getMonth() + 1); |
| | | //日 |
| | | var currentD = currentData.getDate() < 10 ? '0' + currentData.getDate() : currentData.getDate(); |
| | | //时 |
| | | var currenH = currentData.getHours() < 10 ? '0' + currentData.getHours() : currentData.getHours(); |
| | | //分 |
| | | var currenM = currentData.getMinutes() < 10 ? '0' + currentData.getMinutes() : currentData.getMinutes(); |
| | | // if (dom.volume) dom.volume = 1.0; |
| | | |
| | | return { |
| | | week: { |
| | | beginTime: mondayY + '-' + mondayM + '-' + mondayD + ' 00:00:00', |
| | | endTime: currentY + '-' + currentM + '-' + currentD + ' ' + currenH + ':' + currenM + ':00', |
| | | }, |
| | | month: { |
| | | beginTime: mondayY + '-' + mondayM + '-01 00:00:00', |
| | | endTime: currentY + '-' + currentM + '-' + currentD + ' ' + currenH + ':' + currenM + ':00', |
| | | } |
| | | } |
| | | this.hls = new Hls(); |
| | | |
| | | }, |
| | | getBZdata() { |
| | | var params = { |
| | | beginTime: this.dateTime.week.beginTime, |
| | | endTime: this.dateTime.week.endTime |
| | | }; |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | }, |
| | | getBYdata() { |
| | | var params = { |
| | | beginTime: this.dateTime.month.beginTime, |
| | | endTime: this.dateTime.month.endTime |
| | | }; |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | }, |
| | | getQBdata() { |
| | | var params = {}; |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | }, |
| | | rowStyle({row, column, rowIndex}) { |
| | | if (row.jtype == "1") { |
| | | return { |
| | | color: '#15a2fe' |
| | | } |
| | | } else { |
| | | return { |
| | | color: '#ff7627' |
| | | } |
| | | } |
| | | }, |
| | | handleStart(row) { |
| | | this.$router.push({path: `/real/video/${row.channelNumber}/${row.serialNumber}`}); |
| | | }, |
| | | handleHistory(row) { |
| | | this.$router.push({path: `/real/history/${row.deviceNumber}`}); |
| | | }, |
| | | handleAdd11(){ |
| | | this.qwe=true; |
| | | }, |
| | | handleManage(row){ |
| | | this.form = row; |
| | | this.dialogTableVisible = true; |
| | | var m3u8Url = decodeURIComponent(this.videoSource); |
| | | |
| | | this.hls.loadSource(m3u8Url); |
| | | |
| | | this.hls.attachMedia(dom); |
| | | |
| | | this.hls.on(Hls.Events.MANIFEST_PARSED, function() { |
| | | dom.play(); |
| | | }); |
| | | } |
| | | }, |
| | | closeOldVideoBox() { |
| | | var dom = document.getElementById("old_video"); |
| | | |
| | | if (dom.getAttribute("src") != "") { |
| | | dom.pause(); |
| | | |
| | | dom.setAttribute(""); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .cityClass1 { |
| | | padding-right: 5px !important; |
| | | } |
| | | .cityClass1 { |
| | | padding-right: 5px !important; |
| | | } |
| | | |
| | | .cityClass2 { |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | .cityClass2 { |
| | | padding-left: 0px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | |
| | | .cityClass2 div label { |
| | | display: none; |
| | | } |
| | | .cityClass2 div label { |
| | | display: none; |
| | | } |
| | | |
| | | .cityClass3 div label { |
| | | display: none; |
| | | } |
| | | .cityClass3 div label { |
| | | display: none; |
| | | } |
| | | |
| | | .cityClass3 { |
| | | padding-left: 5px !important; |
| | | } |
| | | .cityClass3 { |
| | | padding-left: 5px !important; |
| | | } |
| | | |
| | | .old-video-dialog { |
| | | position: absolute !important; |
| | | top: 0 !important; |
| | | left: auto !important; |
| | | right: 0px !important; |
| | | bottom: 0 !important; |
| | | margin: auto !important; |
| | | height: 100% !important; |
| | | width: 476px !important; |
| | | } |
| | | |
| | | .old-video-dialog .el-dialog { |
| | | position: absolute !important; |
| | | top: 0 !important; |
| | | left: 0 !important; |
| | | right: 0 !important; |
| | | bottom: 0 !important; |
| | | margin: auto !important; |
| | | margin-top: 15vh !important; |
| | | height: 538px; |
| | | } |
| | | |
| | | .old-video-dialog .el-dialog .el-dialog__body { |
| | | height: calc(100% - 54px); |
| | | box-sizing: border-box; |
| | | } |
| | | </style> |