Browse Source

Merge branch 'dev-jichu' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-jichu

shibei_master
jiangyy 4 years ago
parent
commit
6d00298f5a
  1. BIN
      src/assets/img/staff-default-avatar.png
  2. 4
      src/views/main-navbar.vue
  3. 8
      src/views/main-shuju/main-navbar.vue
  4. 543
      src/views/modules/communityService/shzz/cpts/edit.vue
  5. 551
      src/views/modules/communityService/shzz/index.vue
  6. 1
      src/views/modules/visual/basicinfo/people.vue
  7. 366
      src/views/modules/visual/warning/components/screen-table/index.vue

BIN
src/assets/img/staff-default-avatar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

4
src/views/main-navbar.vue

@ -8,10 +8,10 @@
<div class="aui-navbar__header">
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
<a class="aui-navbar__brand-lg" href="javascript:;">{{
userType === 'work' ? customerName : $t('brand.lg')
customerName
}}</a>
<a class="aui-navbar__brand-mini" href="javascript:;">{{
$t('brand.mini')
customerName.slice(0, 2)
}}</a>
</h1>
</div>

8
src/views/main-shuju/main-navbar.vue

@ -10,7 +10,7 @@
userType === 'work' ? customerName : $t('brand.lg')
}}</a>
<a class="navbar__brand-mini" href="javascript:;">{{
$t('brand.mini')
customerName.slice(0, 2)
}}</a>
</h1>
</div>
@ -94,11 +94,7 @@
<el-menu-item index="4" class="navbar__avatar">
<el-dropdown placement="bottom" :show-timeout="0">
<span class="el-dropdown-link">
<img
v-if="$store.state.user.gender === '2'"
src="~@/assets/img/staff-default-avatar-girl.png"
/>
<img v-else src="~@/assets/img/staff-default-avatar-boy.png" />
<img src="~@/assets/img/staff-default-avatar.png" />
<span>{{ $store.state.user.realName }}</span>
<i class="el-icon-arrow-down"></i>
</span>

543
src/views/modules/communityService/shzz/cpts/edit.vue

@ -0,0 +1,543 @@
<template>
<div>
<div>
<div v-show="!propertyFormShow">
<el-form ref="ref_form"
:inline="true"
:model="dataForm"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="所属组织"
label-width="150px"
style="display: block">
<span>{{ dataForm.agencyName }}</span>
</el-form-item>
<el-form-item label="所属网格"
prop="gridId"
label-width="150px"
style="display: block">
<el-select class="item_width_1"
v-model="dataForm.gridId"
placeholder="请选择"
clearable>
<el-option v-for="item in gridList"
:key="item.gridId"
:label="item.gridName"
:value="item.gridId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="小区名称"
prop="neighborHoodName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入小区名称"
v-model="dataForm.neighborHoodName">
</el-input>
</el-form-item>
<el-form-item label="关联物业"
prop="propertyId"
label-width="150px"
style="display: block">
<el-select class="item_width_2"
v-model="dataForm.propertyId"
placeholder="请选择"
filterable
clearable>
<el-option v-for="item in propertyList"
:key="item.propertyId"
:label="item.propertyName"
:value="item.propertyId">
</el-option>
</el-select>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleAddProperty">添加物业</el-button>
</el-form-item>
<el-form-item label="详细地址"
prop="address"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入详细地址"
v-model="dataForm.address">
</el-input>
</el-form-item>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="dataForm.remark"></el-input>
</el-form-item>
<el-form-item label="位置坐标"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width:500px">
<el-input class="item_width_4"
maxlength="50"
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap">查询</el-button>
<div id="app"
class="div_map"></div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude">
</el-input>
</div>
</div>
</el-form-item>
</el-form>
</div>
<div v-show="propertyFormShow">
<el-form :inline="false"
:model="propertyForm"
:rules="propertyRule"
class="form">
<el-form-item label="物业名称"
prop="name"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="10"
placeholder="请输入小区名称"
v-model="propertyForm.name">
</el-input>
</el-form-item>
</el-form>
</div>
</div>
<div class="div_btn">
<el-button @click="handleCancle"> </el-button>
<el-button v-if="formType != 'detail'"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
var map
var search
var markers
var infoWindowList
let loading //
export default {
data () {
return {
formType: 'add', // addeditdetail
gridList: [],
propertyList: [],
btnDisable: false,
neighborHoodId: '', //ID
dataForm: {
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
propertyId: '', //
address: '', //
remark: '', //500
location: '', //
longitude: '', //
latitude: '' //
},
propertyFormShow: false,
propertyForm: {
name: ''
},
keyWords: '',
agencyObj: {}
}
},
components: {},
mounted () {
this.initMap()
},
methods: {
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
},
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
])
},
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.dataForm.latitude = lat
this.dataForm.longitude = lng
} else {
this.$message.error('未检索到相关位置坐标')
}
})
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.dataForm.latitude = lat
this.dataForm.longitude = lng
this.setMarker(lat, lng)
},
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
// debugger
map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
this.formType = type
if (row) {
this.dataForm = JSON.parse(JSON.stringify(row))
this.neighborHoodId = this.dataForm.neighborHoodId
}
await this.loadAgency()
await this.loadGrid()
await this.loadProperty()
},
//
async loadAgency () {
const url = '/epmetuser/customerstaff/staffbasicinfo'
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.dataForm.agencyId = data.agencyId
this.dataForm.agencyName = data.agencyName
} else {
this.$message.error(msg)
}
},
//
async loadGrid () {
const url = '/gov/org/grid/allgridsnopermission '
// const url = "https://epmet-dev.elinkservice.cn:7082/api/apimock-v2/95518686fa128a53f64c678906848062/gov/org/grid/allgrids"
let params = {
agencyId: this.dataForm.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
//
async loadProperty () {
const url = '/gov/org/propertymanagement/list'
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/propertymanagement/list"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.propertyList = data
} else {
this.$message.error(msg)
}
},
handleAddProperty () {
this.propertyForm.name = ''
this.propertyFormShow = true
},
async handleComfirm () {
if (this.propertyFormShow) {
this.addProperty()
} else {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 10000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
this.btnDisable = false
} else {
this.addCommunity()
}
})
}
},
async addCommunity () {
let url = ''
if (this.formType === 'add') {
url = '/gov/org/neighborhood/neighborhoodadd'
// url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodadd"
} else {
url = '/gov/org/neighborhood/neighborhoodupdate'
this.dataForm.neighborHoodId = this.neighborHoodId
}
const { data, code, msg } = await requestPost(url, this.dataForm)
if (code === 0) {
this.$message({
type: 'success',
message: '添加小区成功'
})
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
} else {
this.btnDisable = false
this.$message.error(msg)
}
},
async addProperty () {
if (!this.propertyForm.name || this.propertyForm.name === '') {
this.$message({
type: 'error',
message: '物业名称不能为空'
})
return false
}
const url = '/gov/org/propertymanagement/add'
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/propertymanagement/add"
let params = {
name: this.propertyForm.name
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
this.dataForm.propertyId = data.propertyId
this.propertyForm.name = ''
this.propertyFormShow = false
this.loadProperty()
} else {
this.$message.error(msg)
}
},
handleCancle () {
if (this.propertyFormShow) {
this.propertyForm.name = ''
this.propertyFormShow = false
} else {
this.resetData()
this.$emit('dialogCancle')
}
},
resetData () {
this.keyWords = ''
this.neighborHoodId = '' //ID
this.dataForm = {
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
propertyId: '', //
address: '', //
remark: '', //500
location: '', //
longitude: '', //
latitude: '' //
}
this.propertyFormShow = false
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
neighborHoodName: [
{ required: true, message: '小区名称不能为空', trigger: 'blur' },
{
min: 1,
max: 50,
message: '小区名称长度在 1 到 50个字符',
trigger: 'blur'
}
],
agencyId: [
{ required: true, message: '所属组织不能为空', trigger: 'blur' }
],
gridId: [
{ required: true, message: '所属网格不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '详细地址不能为空', trigger: 'blur' }
],
longitude: [
{ required: true, message: '坐标不能为空', trigger: 'blur' }
]
}
},
propertyRule () {
name: [
{ required: true, message: '物业名称不能为空', trigger: 'blur' }
// { min: 1, max: 50, message: ' 1 50', trigger: 'blur' }
]
}
},
props: {}
}
</script>
<style scoped>
.item_width_1 {
width: 500px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_map {
margin-top: 10px;
}
.div_btn {
display: flex;
justify-content: flex-end;
}
.el-tabs {
margin: 0 20px;
}
.el-upload__tip {
color: rgb(155, 155, 155);
margin: 0;
}
.form {
margin-top: 30px;
}
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

551
src/views/modules/communityService/shzz/index.vue

@ -0,0 +1,551 @@
<template>
<div>
<div class="resi-container">
<el-card class="resi-card">
<el-row class="resi-row-box" :class="openSearch && 'resi-row-more'">
<el-row class="resi-row" :gutter="20">
<el-col :span="8">
<div class="resi-cell">
<div class="resi-cell-label">组织名称</div>
<div class="resi-cell-value" :class="'resi-cell-value-radio'">
<el-input
v-model="fmData.societyName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="resi-cell">
<div class="resi-cell-label">负责人</div>
<div class="resi-cell-value" :class="'resi-cell-value-radio'">
<el-input
v-model="fmData.personInCharge"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="resi-cell">
<div class="resi-cell-label">联系电话</div>
<div class="resi-cell-value" :class="'resi-cell-value-radio'">
<el-input
v-model="fmData.mobile"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="resi-cell">
<div class="resi-cell-label">服务时间</div>
<div class="resi-cell-value" :class="'resi-cell-value-radio'">
<el-date-picker
v-model="fmData.serviceTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
</div>
</el-col>
</el-row>
</el-row>
<el-row class="resi-search">
<el-col :span="24">
<el-button type="primary" size="small" @click="handleSearch"
>查询</el-button
>
</el-col>
</el-row>
</el-card>
</div>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button type="success" size="small" @click="handleAdd"
>新增</el-button
>
<el-button @click="handleRu" type="warning" size="small"
>excel导入</el-button
>
<el-button @click="handleChu" type="danger" size="small"
>excel导出</el-button
>
</div>
<el-table
:data="tableData"
border
style="width: 100%"
class="resi-table"
:max-height="maxTableHeight"
>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column prop="societyName" label="社会组织名称">
</el-table-column>
<el-table-column prop="serviceMatters" label="服务事项">
</el-table-column>
<el-table-column prop="personInCharge" label="负责人">
</el-table-column>
<el-table-column prop="mobile" label="负责人电话"> </el-table-column>
<el-table-column prop="serviceTime" label="服务时间"> </el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button
@click="handleWatch(scope.row, scope.$index)"
type="text"
size="small"
>查看</el-button
>
<el-button
@click="handleEdit(scope.row)"
type="text"
size="small"
style="margin-right: 10px; color: #00a7a9"
>编辑</el-button
>
<el-popconfirm
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row, scope.$index)"
@confirm="handleDel(scope.row, scope.$index)"
>
<el-button
slot="reference"
type="text"
size="small"
style="color: #d51010"
>删除</el-button
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next"
:total="total"
>
</el-pagination>
</div>
</el-card>
<!-- 修改弹出框 -->
<el-dialog
:visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
@closed="handleClose"
>
<edit-form
ref="ref_form"
@dialogCancle="handleClose"
@dialogOk="handleEditSuccess"
></edit-form>
</el-dialog>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import editForm from "./cpts/edit";
export default {
components: { editForm },
data() {
return {
openSearch: false,
formShow: false,
formTitle: "",
formShow: false,
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
tableData: [
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
{
societyName: "亿联科技",
personInCharge: "嘻嘻",
serviceMatters: "1111111111111",
mobile: "13512345678",
serviceTime: "2001-1-1至2022-2-2",
},
],
fmData: {
societyName: "",
personInCharge: "",
mobile: "",
serviceStartTime: "",
serviceEndTime: "",
serviceTime: "",
},
};
},
computed: {
maxTableHeight() {
return this.clientHeight - 450;
},
...mapGetters(["clientHeight"]),
},
watch: {
"fmData.serviceTime": function (val) {
if (Array.isArray(val) && val.length == 2) {
this.fmData.serviceStartTime = val[0];
this.fmData.serviceEndTime = val[1];
}
},
},
mounted() {
this.getTableData();
},
methods: {
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
handleClose() {
this.formShow = false;
},
handleSearch(val) {
console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
handleAdd() {
this.formShow = true;
},
handleRu() {},
handleChu() {},
handleWatch(rowData, rowIndex) {
console.log(rowData, rowIndex);
this.formShow = true;
},
handleEdit(rowData, rowIndex) {
this.formShow = true;
},
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
async handleDel(rowData, rowIndex) {
console.log(rowData, rowIndex);
const url = "/heart/societyorg/del";
const { tableData } = this;
const { data, code, msg } = await requestPost(url, {
societyId: tableData[rowIndex].societyId,
});
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.success("操作失败!");
}
},
async getTableData() {
const url = "/heart/societyorg/getlist";
const { pageSize, pageNo, fmData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...fmData,
});
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total;
this.tableData = data.list.map((item) => {
item.serviceTime = item.serviceStartTime + "至" + item.serviceEndTime;
return item;
});
} else {
}
},
},
};
</script>
<style lang="scss" scoped>
.tabs-other-info {
.el-tabs__item {
// width: 50px;
height: 20px;
box-sizing: border-box;
margin-right: 7px;
padding: 0 10px !important;
font-size: 8px;
font-weight: 500;
color: #666666;
line-height: 20px;
background: #ebecf1;
border-radius: 2px;
}
.el-tabs__nav-wrap::after,
.el-tabs__active-bar {
display: none;
}
.el-tabs__nav-next,
.el-tabs__nav-prev {
line-height: 20px;
}
}
.resi-card-table {
margin-top: 20px;
}
.resi-row-btn {
margin-bottom: 13px;
}
.resi-other {
width: 100%;
display: flex;
.resi-other-title {
width: 100px;
box-sizing: border-box;
margin-bottom: 10px;
// padding: 6px 12px 0 0;
font-size: 16px;
font-weight: 500;
color: #333;
text-align: center;
}
.tabs-other-info {
// padding-left: 60px;
}
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
.resi-container .resi-card {
position: relative;
overflow: visible;
}
.resi-down {
position: absolute;
left: 50%;
bottom: -10px;
display: flex;
justify-content: center;
align-items: center;
width: 46px;
height: 12px;
box-sizing: border-box;
margin-left: -23rpx;
cursor: pointer;
background: #ffffff;
border-radius: 0 0 10px 10px;
img {
display: block;
}
}
.resi-row-box {
height: 104px;
overflow: hidden;
transition: height 0.5s;
}
.resi-row-more {
height: max-content;
transition: height 0.5s;
}
.resi-row {
margin-bottom: 20px;
}
.resi-search {
.el-col {
text-align: right;
}
}
.resi-cell {
display: flex;
align-items: center;
.resi-cell-label {
width: 70px;
box-sizing: border-box;
margin-right: 15px;
text-align: right;
// line-height: 32;
}
.resi-cell-value-radio {
display: flex;
align-items: center;
min-height: 32px;
}
.resi-cell-input {
width: 180px;
}
.resi-cell-select {
width: 180px;
box-sizing: border-box;
margin-right: 10px;
&-middle {
width: 130px;
}
&-small {
width: 88px;
}
}
.resi-cell-select:last-child {
margin-right: 0;
}
}
</style>

1
src/views/modules/visual/basicinfo/people.vue

@ -353,6 +353,7 @@ export default {
},
userId() {
this.getApiData();
window.scrollTo(0, 0);
},
},

366
src/views/modules/visual/warning/components/screen-table/index.vue

@ -1,62 +1,101 @@
<template>
<div class="warning-table">
<div class="table">
<div class="table-header">
<div class="table-header-th" v-for="(item,index) in headerList" :key='item.title' :style="headerStyle[index]">{{item.title}}</div>
<div class="table">
<div class="table-header">
<div
class="table-header-th"
v-for="(item, index) in headerList"
:key="item.title"
:style="headerStyle[index]"
>
{{ item.title }}
</div>
<div class="table-body">
<div class="table-body-tr" v-for="(value,index) in tableData" :key='index'>
<div class="td" v-for="(item,indexs) in value" :key="indexs" :style="tableContentStyle[indexs]">{{item}}
<span v-if="(indexs+1==value.length) && item.length>8" class="more" @click="onClickMorePop(index)" ref='morePop'>
更多>
<span class="more-pop" v-if="visiblePopList[index]">
<!-- 李佳琪刘阳赵欣丁一嘉敏李岩何嘉慧
</div>
<div class="table-body">
<div
class="table-body-tr"
v-for="(value, index) in tableData"
:key="index"
>
<div
class="td"
v-for="(item, indexs) in value"
:key="indexs"
:style="tableContentStyle[indexs]"
>
{{ item }}
<span
v-if="indexs + 1 == value.length && item.length > 8"
class="more"
@click.stop="onClickMorePop(index)"
ref="morePop"
>
更多>
<span class="more-pop" v-if="visiblePopList[index]">
<!-- 李佳琪刘阳赵欣丁一嘉敏李岩何嘉慧
李易峰赵敏何军曲树惠 -->
{{item}}
</span>
{{ item }}
</span>
</div>
</div>
<screen-loading v-if="visibleLoading">加载中</screen-loading>
<div class="no-data" v-if="tableData.length==0 && !visibleLoading">
<img src="../../../../../../assets/img/modules/visual/noData.png" alt="" srcset="" class="no-data-img">
</span>
</div>
</div>
<screen-loading v-if="visibleLoading">加载中</screen-loading>
<div class="no-data" v-if="tableData.length == 0 && !visibleLoading">
<img
src="../../../../../../assets/img/modules/visual/noData.png"
alt=""
srcset=""
class="no-data-img"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import ScreenLoading from '../screen-loading/index'
import Vue from 'vue'
import ScreenLoading from "../screen-loading/index";
import Vue from "vue";
export default {
name: 'warning-table',
components:{
ScreenLoading
},
props: {
name: "warning-table",
components: {
ScreenLoading,
},
props: {
headerList: {
type: Array,
required: false,
default: () => {
return [
{ title: '序号' },
{ title: '所属网格'},
{ title: '所属小区'},
{ title: '楼号'},
{ title: '姓名' },
]
}
{ title: "序号" },
{ title: "所属网格" },
{ title: "所属小区" },
{ title: "楼号" },
{ title: "姓名" },
];
},
},
tableData: {
type: Array,
required: false,
default: () => {
return [
[1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[2,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
]
}
// [
// 1,
// "",
// "",
// "2",
// "",
// ],
// [
// 2,
// "",
// "",
// "2",
// "",
// ],
];
},
},
//
headerStyle: {
@ -70,8 +109,8 @@ props: {
// {
// width:'200px'
// }
]
}
];
},
},
//
tableContentStyle: {
@ -85,13 +124,13 @@ props: {
// {
// width:'200px'
// }
]
}
];
},
},
visibleLoading: {
type: Boolean,
default: true,
},
visibleLoading:{
type:Boolean,
default:true
}
// //
// ava: {
// type: Number,
@ -110,145 +149,162 @@ props: {
},
data() {
return {
visiblePopList:[false,false,false,false,false,false,false,false,false,false],
visiblePopList: [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
],
};
},
mounted () {
// window.addEventListener('click', e => {
// if (this.$refs.morePop && !this.$refs.morePop.contains(e.target)) {
// this.visiblePopList.forEach((item,indexs)=>{
// Vue.set(this.visiblePopList, indexs, false)
// })
// }
// })
watch: {
tableData(arr) {
if (Array.isArray(arr)) {
this.visiblePopList = new Array(arr.length).fill(false);
}
},
},
created(){
mounted() {
window.addEventListener("click", (e) => {
this.visiblePopList = new Array(this.visiblePopList.length).fill(false);
});
},
created() {},
methods: {
onClickMorePop(index) {
this.visiblePopList.forEach((item,indexs)=>{
if(index==indexs){
Vue.set(this.visiblePopList, index, true)
}else{
Vue.set(this.visiblePopList, indexs, false)
}
})
}
onClickMorePop(index) {
this.visiblePopList.forEach((item, indexs) => {
if (index == indexs) {
Vue.set(this.visiblePopList, index, true);
} else {
Vue.set(this.visiblePopList, indexs, false);
}
});
},
},
};
</script>
<style lang="scss" scoped>
.warning-table{
box-sizing: border-box;
width: 100%;
height: 100%;
.table {
.warning-table {
box-sizing: border-box;
width: 100%;
height: 100%;
.table {
width: 100%;
height: 100%;
&-header {
width: 100%;
height: 50px;
display: flex;
justify-content: space-around;
align-items: center;
background: rgba(8, 37, 134, 0.85);
font-size: 16px;
font-weight: 400;
color: #ffffff;
&-th {
text-align: center;
width: calc(100% / 5);
}
}
&-body {
box-sizing: border-box;
width: 100%;
height: 100%;
&-header {
height: calc(100% - 50px);
font-size: 18px;
font-weight: 400;
color: #ffffff;
&-tr {
width: 100%;
height: 50px;
// height: calc(100% / 10);
display: flex;
justify-content: space-around;
align-items: center;
background: rgba(8, 37, 134, 0.85);
font-size: 16px;
font-weight: 400;
color: #FFFFFF;
&-th {
.td {
text-align: center;
width: calc(100% / 5);
}
}
.more {
font-size: 18px;
font-weight: 400;
color: #e4dc00;
position: relative;
cursor: pointer;
&-body {
box-sizing: border-box;
width: 100%;
height: calc(100% - 50px);
font-size: 18px;
font-weight: 400;
color: #FFFFFF;
&-tr {
width: 100%;
height: 50px;
// height: calc(100% / 10);
display: flex;
justify-content: space-around;
align-items: center;
.td {
text-align: center;
width: calc(100% / 5);
.more {
font-size: 18px;
&-pop {
box-sizing: border-box;
display: block;
box-sizing: border-box;
width: 215px;
height: auto;
line-height: 20px;
border: 1px solid red;
position: absolute;
right: -100%;
top: 150%;
background: #06186d;
border: 1px solid #1a64cc;
border-radius: 5px;
font-size: 9px;
font-weight: 400;
color: #E4DC00;
position: relative;
&-pop{
box-sizing: border-box;
display: block;
box-sizing: border-box;
width: 215px;
height: auto;
line-height: 20px;
border: 1px solid red;
position: absolute;
left: -100%;
top: 150%;
background: #06186D;
border: 1px solid #1A64CC;
border-radius: 5px;
font-size: 9px;
font-weight: 400;
color: #FFFFFF;
padding:16px 8px 10px 9px;
z-index: 1;
// &::after{
// position: absolute;
// left: 30%;
// top: -30%;
// display: flex;
// content:'';
// width: 0;
// height: 0;
// border-width: 13px;
// border-style: solid;
// border-color: transparent transparent rgba(26, 100, 204,0.5) transparent;
// // border-color: transparent transparent red transparent;
// transform: translate(-50%,0);
// }
}
color: #ffffff;
padding: 16px 8px 10px 9px;
z-index: 1;
cursor: default;
// &::after{
// position: absolute;
// left: 30%;
// top: -30%;
// display: flex;
// content:'';
// width: 0;
// height: 0;
// border-width: 13px;
// border-style: solid;
// border-color: transparent transparent rgba(26, 100, 204,0.5) transparent;
// // border-color: transparent transparent red transparent;
// transform: translate(-50%,0);
// }
}
}
}
}
&-tr:nth-child(2n) {
background: rgba(16, 75, 164, 0.24);
}
&-tr:nth-child(2n) {
background: rgba(16, 75, 164, 0.24);
}
&-tr:hover {
background: url('../../../../../../assets/img/modules/visual/hover-bac.png') no-repeat center;
background-size: 100% 100%;
}
//
.no-data{
width: 100%;
height: calc(100% - 50px);
display: flex;
align-items: center;
justify-content: center;
&-img{
width: 249px;
height: 172px;
}
&-tr:hover {
background: url("../../../../../../assets/img/modules/visual/hover-bac.png")
no-repeat center;
background-size: 100% 100%;
}
//
.no-data {
width: 100%;
height: calc(100% - 50px);
display: flex;
align-items: center;
justify-content: center;
&-img {
width: 249px;
height: 172px;
}
}
}
}
}
</style>
</style>

Loading…
Cancel
Save