| | |
| | | <el-row> |
| | | <el-col :span="3"> |
| | | <basic-container> |
| | | <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-col> |
| | | <el-col :span="21"> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | @row-click="rowClick"> |
| | | |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | <el-button |
| | | type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.clientManagement_delete" |
| | | @click="handleDelete">删 除 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <!-- <span><!–图例 components–>--> |
| | | <!-- <Legend :datas="datalistLIU"></Legend>--> |
| | |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="devicestate"> |
| | | <el-tag>{{ |
| | | row.devicestate == "0" ? "撤防" : row.devicestate == "1" ? "布防" : "无" |
| | | <el-tag |
| | | >{{ |
| | | row.devicestate == "0" |
| | | ? "撤防" |
| | | : row.devicestate == "1" |
| | | ? "布防" |
| | | : "无" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | |
| | | <template class="tdtype" slot-scope="{ row }" slot="dxzt"> |
| | | <el-tag class="dtype"> |
| | | {{ |
| | | row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "正常" :row.dxzt == "2" ? "预警":row.dxzt == "3" ? "故障":"无" |
| | | row.dxzt == "0" |
| | | ? "掉线" |
| | | : row.dxzt == "1" |
| | | ? "正常" |
| | | : row.dxzt == "2" |
| | | ? "预警" |
| | | : row.dxzt == "3" |
| | | ? "故障" |
| | | : "无" |
| | | }} |
| | | <i class="dx" v-if="row.dxzt == '0' "></i> |
| | | <i class="zc" v-if="row.dxzt == '1' "></i> |
| | | <i class="yj" v-if="row.dxzt == '2' "></i> |
| | | <i class="gz" v-if="row.dxzt == '3' "></i> |
| | | </el-tag> |
| | | |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="type"> |
| | |
| | | >办结 |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | |
| | | <div v-show="menuVisible"> |
| | |
| | | <li class="menu_item" @click.stop="handleMap">定位</li> |
| | | </ul> |
| | | </div> |
| | | |
| | | |
| | | <el-drawer |
| | | title="电子地图" |
| | |
| | | height="100%" |
| | | ></iframe> |
| | | </el-drawer> |
| | | |
| | | </basic-container> |
| | | </el-col> |
| | | <el-dialog title="缴费提醒" :visible.sync="dialogTableVisible" top="280px" custom-class="payWin" append-to-body="true"> |
| | | |
| | | |
| | | <el-dialog |
| | | title="缴费提醒" |
| | | :visible.sync="dialogTableVisible" |
| | | top="280px" |
| | | custom-class="payWin" |
| | | append-to-body="true" |
| | | > |
| | | <el-dialog |
| | | class="real-jf-dialog" |
| | | title="缴费" |
| | |
| | | <el-form-item> |
| | | <el-button type="primary" @click.stop="generate(form)" |
| | | >缴费 |
| | | </el-button |
| | | > |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-table |
| | | :data="gridData" |
| | | border |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | fixed |
| | | prop="xb" |
| | | label="序号" |
| | | width="50"> |
| | | <el-table :data="gridData" border style="width: 100%"> |
| | | <el-table-column fixed prop="xb" label="序号" width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="deviceName" |
| | | label="设备名称" |
| | | width="180"> |
| | | <el-table-column prop="deviceName" label="设备名称" width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="deviceNumber" |
| | | label="设备编码" |
| | | width="150"> |
| | | <el-table-column prop="deviceNumber" label="设备编码" width="150"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ownership" |
| | | label="所属单位" |
| | | width="160"> |
| | | <el-table-column prop="ownership" label="所属单位" width="160"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="expireTime" |
| | | label="到期时间" |
| | | width="160" |
| | | > |
| | | <el-table-column prop="expireTime" label="到期时间" width="160"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="pay" |
| | | label="缴费信息" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="100"> |
| | | <el-table-column prop="pay" label="缴费信息"> </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)">一键缴费</el-button> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)" |
| | | >一键缴费</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, remove, update, add, getclient, getDeptLazyTree, getAll, updates,getBaTree} from "@/api/client/client"; |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getclient, |
| | | getDeptLazyTree, |
| | | getAll, |
| | | updates, |
| | | getBaTree, |
| | | } from "@/api/client/client"; |
| | | // import {getDeptTree} from "@/api/system/dept"; |
| | | import {mapGetters} from "vuex"; |
| | | import axios from "axios"; |
| | | import Legend from '../../components/liu-legend/Legend' |
| | | import Legend from "../../components/liu-legend/Legend"; |
| | | import AvueMap from "avue-plugin-map"; |
| | | import website from '@/config/website'; |
| | | import website from "@/config/website"; |
| | | |
| | | export default { |
| | | components:{ |
| | |
| | | data() { |
| | | return { |
| | | dataLIU:{ |
| | | color:"#DFDFDF" |
| | | color: "#DFDFDF", |
| | | }, |
| | | //legend-liu数据 |
| | | datalistLIU:[ |
| | | { |
| | | color: "#DFDFDF", |
| | | text: '掉线' |
| | | text: "掉线", |
| | | }, |
| | | { |
| | | color: "#29C093", |
| | | text: '正常' |
| | | text: "正常", |
| | | }, |
| | | { |
| | | color: "#F34A4A", |
| | | text: '预警' |
| | | text: "预警", |
| | | }, |
| | | { |
| | | color: "#F48F57", |
| | | text: '故障' |
| | | } |
| | | text: "故障", |
| | | }, |
| | | ], |
| | | form: {}, |
| | | query: {}, |
| | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | total: 0, |
| | | }, |
| | | dialogTableVisible: false, |
| | | realjf: false, |
| | | gridData: null, |
| | | selectionList: [], |
| | | treeDeptId: '', |
| | | treeDeptId: "", |
| | | treeData: [], |
| | | treeOption: { |
| | | nodeKey: 'id', |
| | | nodeKey: "id", |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then(res => { |
| | | resolve(res.data.data.map(item => { |
| | | const parentId = node.level === 0 ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | resolve( |
| | | res.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren |
| | | } |
| | | })) |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: 'small', |
| | | size: "small", |
| | | props: { |
| | | labelText: '标题', |
| | | label: 'title', |
| | | value: 'value', |
| | | children: 'children' |
| | | } |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "value", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | option: { |
| | | height: 'auto', |
| | | indexLabel: '序号', |
| | | height: "auto", |
| | | indexLabel: "序号", |
| | | calcHeight: 54, |
| | | labelWidth: '125', |
| | | labelWidth: "125", |
| | | dialogWidth: 1150, |
| | | menuWidth: 200, |
| | | align:"center", |
| | |
| | | searchMenuSpan: 4, |
| | | searchSpan: 4, |
| | | border: false, |
| | | stripe:true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | |
| | | searchPlaceholder: "设备名称/编号", |
| | | search: true, |
| | | sortable:true, |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入设备名称", |
| | | trigger: "blur" |
| | | }], |
| | | } |
| | | , |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "设备编号", |
| | | prop: "deviceNumber", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入设备编号", |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "使用方", |
| | | prop: "deptName", |
| | | display: false |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "使用方", |
| | |
| | | checkStrictly:true, |
| | | hide:true, |
| | | props: { |
| | | label: "title" |
| | | label: "title", |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择使用方", |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "使用方", |
| | |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=manufacturers", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | value: "dictKey", |
| | | }, |
| | | search:true, |
| | | type:"select", |
| | | rules: [{ |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择设备厂商", |
| | | trigger: "blur" |
| | | }], |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "设备状态", |
| | |
| | | sortable:true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, { |
| | | }, |
| | | { |
| | | label: "地址", |
| | | prop: "street", |
| | | span:10, |
| | |
| | | hide: true, |
| | | span: 2, |
| | | // display:false, |
| | | component: "AvueMap" |
| | | component: "AvueMap", |
| | | }, |
| | | { |
| | | label: "省份", |
| | | prop: "province", |
| | | search: true, |
| | | searchSpan: 2, |
| | | labelWidth: '110', |
| | | labelWidth: "110", |
| | | searchLabelWidth: 45, |
| | | placeholder: "省份", |
| | | type: "select", |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | cascaderItem: ["city", "district"], |
| | | dicUrl: "/api/blade-system/region/select", |
| | |
| | | search: true, |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 2, |
| | |
| | | type: "select", |
| | | props: { |
| | | label: "name", |
| | | value: "code" |
| | | value: "code", |
| | | }, |
| | | dicUrl: "/api/blade-system/region/select?code={{key}}", |
| | | span: 2, |
| | |
| | | width:"100", |
| | | labelWidth: "120", |
| | | formatter: (row,value,label,column)=>{ |
| | | return value = value.substring(0,11); |
| | | return (value = value.substring(0, 11)); |
| | | }, |
| | | span:7, |
| | | }, |
| | |
| | | hide: true, |
| | | prop: "wd", |
| | | formatter: (row,value,label,column) => { |
| | | return value = value.substring(0,10); |
| | | return (value = value.substring(0, 10)); |
| | | }, |
| | | span:5, |
| | | }, |
| | |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | } |
| | | |
| | | ] |
| | | }, |
| | | data: [] |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始 |
| | | var address = val.formattedAddress.toString(); |
| | | if(address.search("县") != -1){ |
| | | this.form.street = address.substring(address.indexOf("县")+1,address.length); |
| | | this.form.street = address.substring( |
| | | address.indexOf("县") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | if(address.search("区") != -1){ |
| | | this.form.street = address.substring(address.indexOf("区")+1,address.length); |
| | | this.form.street = address.substring( |
| | | address.indexOf("区") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | // //写入新的省市区 |
| | | // that.form.province = val.addressComponent.province; |
| | |
| | | handler(val) { |
| | | var that = this; |
| | | if (val != null && val !=""){ |
| | | getBaTree(val).then(res => { |
| | | getBaTree(val).then((res) => { |
| | | if (res) { |
| | | that.form.onePhone = res.data.data.records[0].phone; |
| | | that.form.oneContacts = res.data.data.records[0].name; |
| | |
| | | handler(val) { |
| | | var that = this; |
| | | if (val != null && val !=""){ |
| | | getBaTree(val).then(res => { |
| | | getBaTree(val).then((res) => { |
| | | if (res) { |
| | | that.form.twoPhone = res.data.data.records[0].phone; |
| | | that.form.twoContacts = res.data.data.records[0].name; |
| | |
| | | handler(val) { |
| | | var that = this; |
| | | if (val != null && val !=""){ |
| | | getBaTree(val).then(res => { |
| | | getBaTree(val).then((res) => { |
| | | if (res) { |
| | | that.form.threePhone = res.data.data.records[0].phone; |
| | | that.form.threeContacts = res.data.data.records[0].name; |
| | |
| | | // this.initData(); |
| | | // } |
| | | // } |
| | | |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | |
| | | addBtn: this.vaildData(this.permission.clientManagement_add, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(this.permission.clientManagement_delete, false), |
| | | editBtn: this.vaildData(this.permission.clientManagement_edit, false) |
| | | editBtn: this.vaildData(this.permission.clientManagement_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | }, |
| | | mounted(){ |
| | | // 租户模式默认加载管理组数据 |
| | |
| | | }, |
| | | methods: { |
| | | generate(row) { |
| | | updates(row.expireTime, row.deviceNumber).then(() => { |
| | | updates(row.expireTime, row.deviceNumber).then( |
| | | () => { |
| | | this.dialogTableVisible = false; |
| | | this.realjf = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "缴费成功!" |
| | | message: "缴费成功!", |
| | | }); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | //初始化数据 |
| | |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | | add(row).then(() => { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if(Array.isArray(row.deptId)){ |
| | | row.deptId = row.deptId.join(","); |
| | | } |
| | | update(row).then(() => { |
| | | update(row).then( |
| | | () => { |
| | | // this.initFlag = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | updateDtype(row){ |
| | | row.dtype = "0"; |
| | | update(row).then(() => { |
| | | update(row).then( |
| | | () => { |
| | | // this.initFlag = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.onLoad(this.page); |
| | | }, error => { |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | console.log(params,done) |
| | | console.log(params, done); |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getclient(this.form.id).then(res => { |
| | | getclient(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | this.isEdit=true; |
| | | }); |
| | |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | endTime: releaseTimeRange[1], |
| | | ...this.query |
| | | ...this.query, |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } else { |
| | | values = { |
| | | ...params, |
| | | ...this.query |
| | | ...this.query, |
| | | }; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values, this.treeDeptId).then(res => { |
| | | getList(page.currentPage, page.pageSize, values, this.treeDeptId).then( |
| | | (res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | |
| | |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, rowStyle({row, column, rowIndex}) { |
| | | } |
| | | ); |
| | | }, |
| | | rowStyle({ row, column, rowIndex }) { |
| | | // if (row.heartbeat != null && row.heartbeat != "") { |
| | | // var date = new Date(row.heartbeat).getTime(); |
| | | // var Dqdate = new Date().getTime(); |
| | |
| | | // color: "#29C093" |
| | | // }; |
| | | // } |
| | | if(row.dtype=='2'){ |
| | | if (row.dtype == "2") { |
| | | return { |
| | | color: "#F34A4A" |
| | | color: "#F34A4A", |
| | | }; |
| | | } |
| | | // if(row.dtype=='3'){ |
| | |
| | | }, |
| | | payWin() { |
| | | var that = this; |
| | | getAll().then(res => { |
| | | getAll().then((res) => { |
| | | var data = res.data.data; |
| | | var lists = []; |
| | | var xb = 0; |
| | |
| | | that.dialogTableVisible = true; |
| | | } |
| | | }); |
| | | |
| | | }, handleStart(row) { |
| | | |
| | | }, |
| | | handleStart(row) { |
| | | console.log(row,11111111111); |
| | | row = this.selectRow; |
| | | console.log(row,22222222222); |
| | | var arr = []; |
| | | console.log(this.$store.state.tags.tagList,3333333); |
| | | this.$store.state.tags.tagList.forEach(item => { |
| | | this.$store.state.tags.tagList.forEach((item) => { |
| | | if (item.label != "视频") { |
| | | arr.push(item); |
| | | } |
| | |
| | | this.$store.state.tags.tagList = arr; |
| | | console.log(arr,444444444444); |
| | | this.$router.push({ |
| | | path: `/real/video/`, query: row |
| | | path: `/real/video/`, |
| | | query: row, |
| | | }); |
| | | }, handleMap(row) { |
| | | }, |
| | | handleMap(row) { |
| | | row = this.selectRow; |
| | | this.showMap = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.mapDiv.onload = () => { |
| | | window.frames[1].init("equipment", {x: row.jd, y: row.wd}); |
| | | }; |
| | | }) |
| | | },rightClick(row, event) { |
| | | }); |
| | | }, |
| | | rightClick(row, event) { |
| | | this.selectRow = row; |
| | | this.menuVisible = false; // 先把模态框关死,目的是 第二次或者第n次右键鼠标的时候 它默认的是true |
| | | this.menuVisible = true; // 显示模态窗口,跳出自定义菜单栏 |
| | | var menu = document.querySelector('#menu'); |
| | | var menu = document.querySelector("#menu"); |
| | | this.styleMenu(menu); |
| | | }, |
| | | foo() { |
| | | // 取消鼠标监听事件 菜单栏 |
| | | this.menuVisible = false; |
| | | document.removeEventListener('click', this.foo); // 要及时关掉监听,不关掉的是一个坑,不信你试试,虽然前台显示的时候没有啥毛病,加一个alert你就知道了 |
| | | document.removeEventListener("click", this.foo); // 要及时关掉监听,不关掉的是一个坑,不信你试试,虽然前台显示的时候没有啥毛病,加一个alert你就知道了 |
| | | }, |
| | | styleMenu(menu) { |
| | | let cha = document.body.clientHeight - event.clientY |
| | | let cha = document.body.clientHeight - event.clientY; |
| | | //console.log(document.body.clientHeight,event.clientY,cha) |
| | | // 防止菜单太靠底,根据可视高度调整菜单出现位置 |
| | | if (cha < 150) { |
| | | menu.style.top = event.clientY -120 - (100) + 'px' |
| | | menu.style.top = event.clientY - 120 - 100 + "px"; |
| | | } else { |
| | | menu.style.top = event.clientY -10 - (100) + 'px' |
| | | menu.style.top = event.clientY - 10 - 100 + "px"; |
| | | } |
| | | menu.style.left = event.clientX + 10 - (60) + 'px' |
| | | document.addEventListener('click', this.foo); // 给整个document新增监听鼠标事件,点击任何位置执行foo方法 |
| | | menu.style.left = event.clientX + 10 - 60 + "px"; |
| | | document.addEventListener("click", this.foo); // 给整个document新增监听鼠标事件,点击任何位置执行foo方法 |
| | | }, |
| | | rowClick(val){//行点击事件 |
| | | rowClick(val) { |
| | | //行点击事件 |
| | | // console.log(val); |
| | | this.$router.push({ path: "/dataL/dataL", query: val }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | .payWin .el-dialog__body { |
| | | padding-top: 0px !important; |
| | | } |
| | | |
| | | |
| | | // /*页面样式*/ //丢弃 因为不起作用,样式在cs.vue中 city1,2,3 liuyg改 |
| | | // .el-card__body .cityClass1 { |
| | |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #DFDFDF; |
| | | background: #dfdfdf; |
| | | } |
| | | .zc{ |
| | | position: absolute; |
| | |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #29C093; |
| | | background: #29c093; |
| | | } |
| | | .yj{ |
| | | position: absolute; |
| | |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #F34A4A; |
| | | background: #f34a4a; |
| | | } |
| | | .gz{ |
| | | position: absolute; |
| | |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #F48F57; |
| | | background: #f48f57; |
| | | } |
| | | |
| | | .tabFontSize{ |
| | |
| | | /*border: 1px solid #999999;*/ |
| | | text-align: center; |
| | | background-color: #fff; |
| | | border-radius: .25rem; |
| | | box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); |
| | | border-radius: 0.25rem; |
| | | box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); |
| | | } |
| | | .menu li:hover { |
| | | background-color: rgba(232,237,250,.6); |
| | | background-color: rgba(232, 237, 250, 0.6); |
| | | color: darkslategrey; |
| | | } |
| | | .menu li{ |
| | |
| | | padding-left: 20px; |
| | | padding-right: 5px; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | | |
| | | |
| | |
| | | position: relative !important; |
| | | left: -51px !important; |
| | | } |
| | | |
| | | |
| | | </style> |