首页地图相关功能。

This commit is contained in:
Renpc-kilig 2020-11-02 18:19:50 +08:00
parent e756906ffa
commit d9d768ad4f
6 changed files with 577 additions and 6 deletions

View File

@ -382,6 +382,10 @@
AND
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="partyOrganizeId != null and partyOrganizeId != ''">
AND
t1.belong_party_organize = #{partyOrganizeId}
</if>
<if test="partyMemberOrganizeIds != null and partyMemberOrganizeIds.size > 0">
AND
t1.party_member_organize_id IN

View File

@ -368,6 +368,10 @@
<if test="endTime != null and endTime != ''">
AND t1.creat_time <![CDATA[ <= ]]> #{endTime}
</if>
<if test="partyOrganizeId != null and partyOrganizeId != ''">
AND
t1.party_organize_id = #{partyOrganizeId}
</if>
<if test="partyOrganizeIds != null and partyOrganizeIds.size > 0">
AND
t1.party_organize_id IN

View File

@ -0,0 +1,187 @@
<!doctype html>
<html lang="en">
<head>
<base href="/partybuilding/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<style>
*{margin:0;padding:0;}
[v-cloak]{display: none}
ul{list-style: none}
.container{width: 97%;margin:0 auto;}
.tab{margin-bottom: 10px;float: right;width: 74%;height:140px;overflow-y: auto}
.top:after, .tab:after, .list:after{content: '';display: block;clear: both}
.logo-box{float: left;width:25%;}
.logo{max-width: 100%}
.tab-box{padding-right: 5px;float:left;box-sizing: border-box;width:32%;margin-right: 2%;margin-bottom: 10px;}
.tab-box:nth-child(3n){margin-right: 0}
.box{border:1px solid #DDD;border-radius: 5px;padding: 5px;height: 60px;box-sizing: border-box}
.box h3{white-space: nowrap;overflow: hidden;text-overflow: ellipsis;font-size: 18px;font-weight: normal;color: #000;}
.list-box{float:left;width: 32%;margin-right: 2%;padding: 5px;box-sizing: border-box;border-radius: 5px}
.list-box:last-child{margin-right: 0}
.list-box h4{font-size: 16px;font-weight: normal;color: #000;}
.list-box ul li{height: 35px;color: #000;border-bottom: 1px solid #DDD;font-size: 0}
.list-box ul li a{display:inline-block;margin-right:5px;color: #000;text-decoration: none;font-size: 14px;line-height: 35px;vertical-align: top;}
.list-box ul li span{float:right;font-size: 14px;line-height: 35px;display: inline-block;max-width: 70%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;vertical-align: top;}</style>
<script type="text/javascript" src="assets/js/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="assets/js/vue.min.js"></script>
</head>
<body>
<div id="app">
<div class="container" style="padding-left: 15px;padding-right: 15px;padding-top: 15px;">
<div class="top">
<div class="logo-box">
<img :src="'route/file/downloadfile/false/' + partyOrganizeData.logo" alt="" class="logo">
</div>
<div class="tab" v-cloak>
<div class="tab-box" v-for="tab in tabList">
<div class="box" v-on:click="showPartyMemberList(tab.url, tab.count, tab.msgTitle);">
<h3>{{tab.title}}</h3>
</div>
</div>
</div>
</div>
<div class="list" style="padding-left: 15px;padding-right: 15px;">
<div class="list-box" style="margin-top:30px;">
<h4>{{partyOrganizeData.name}}</h4>
<ul style="margin-top:10px;">
<li>
<a href="javascript:void(0);">组织类型</a>
<span>{{partyOrganizeData.typeDictionaryName}}</span>
</li>
<li>
<a href="javascript:void(0);">直属类型</a>
<span>{{partyOrganizeData.belongTypeDictionaryName}}</span>
</li>
<li>
<a href="javascript:void(0);">隶属类型</a>
<span>{{partyOrganizeData.subjectionTypeDictionaryName}}</span>
</li>
<li>
<a href="javascript:void(0);">所属级别</a>
<span>{{partyOrganizeData.belongLevel}}</span>
</li>
</ul>
</div>
<div class="list-box" style="margin-top:61px;">
<ul>
<li>
<a href="javascript:void(0);">区域面积</a>
<span>{{partyOrganizeData.areaMeasure}}</span>
</li>
<li>
<a href="javascript:void(0);">单位类型</a>
<span>{{partyOrganizeData.companyTypeName}}</span>
</li>
<li>
<a href="javascript:void(0);">负责人</a>
<span>{{partyOrganizeData.linkMan}}</span>
</li>
</ul>
</div>
<div class="list-box" style="margin-top:61px;">
<ul>
<li>
<a href="javascript:void(0);">联系电话</a>
<span>{{partyOrganizeData.phone}}</span>
</li>
<li>
<a href="javascript:void(0);">建立时间</a>
<span>{{partyOrganizeData.creatTime}}</span>
</li>
<li>
<a href="javascript:void(0);">详细地址</a>
<span>{{partyOrganizeData.location}}</span>
</li>
</ul>
</div>
</div>
</div>
</div>
<script>
var vue = new Vue({
el: '#app',
computed: {
oWidth: function () {
return 100 / this.tabList.length + '%'
}
},
data: {
tabList: [],
partyOrganizeId: top.restAjax.params(window.location.href).partyOrganizeId,
partyOrganizeData: {
name: '', // 组织名称
logo: '', // 组织logo
typeDictionaryName: '', // 组织类型
belongTypeDictionaryName: '', // 直属类型
subjectionTypeDictionaryName: '', // 隶属类型
belongLevel: '', // 所属级别
areaMeasure: '', // 区域面积
companyTypeName: '', // 单位类型
linkMan: '', // 负责人
phone: '', // 联系电话
creatTime: '', // 建立事件
location: '' // 详细地址
}, // 党组织信息数据
partyMemberCount: 0, // 当前党组织中党员数量
},
methods: {
// 党组织信息
showPartyOrganize: function() {
var self = this;
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/partyorganize/listpagepartyorganize?partyOrganizeId={partyOrganizeId}', [self.partyOrganizeId]), {}, null, function(code, data) {
self.partyOrganizeData = data.rows[0];
console.log(self.partyOrganizeData)
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
},
// 当前党组织中党员数量
getPartyMemberCount: function() {
var self = this;
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/partyorganize/countpartymember?partyOrganizeId={partyOrganizeId}', [self.partyOrganizeId]), {}, null, function(code, data) {
self.partyMemberCount = data.data;
self.tabList.unshift({title: '党员数量: ' + data.data, msgTitle: '党员信息', openTitle: '党员列表', count: data.data, url: 'route/partymemberorganize/view-partymemberorganize.html?partyOrganizeId=' + self.partyOrganizeId});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
},
showPartyMemberList: function (url, count, msgTitle, openTitle) {
var self = this;
if(count <= 0) {
top.dialog.msg('暂无' + msgTitle);
return false;
}
top.dialog.open({
url: top.restAjax.path(url, []),
title: openTitle,
width: '1040px',
height: '98%',
onClose: function(data) {
}
});
}
},
mounted: function () {
var self = this;
self.showPartyOrganize();
self.getPartyMemberCount();
}
})
</script>
</body>
</html>

View File

@ -41,13 +41,13 @@
<!-- 表头按钮组 -->
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent" id="saveBtn">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent" id="updateBtn">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent" id="removeBtn">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
</div>

View File

@ -304,7 +304,7 @@
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm" id="submitBtn">提交编辑</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
@ -328,11 +328,16 @@
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var partyMemberOrganizeId = top.restAjax.params(window.location.href).partyMemberOrganizeId;
var isView = top.restAjax.params(window.location.href).isView;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
if(isView) {
$('#submitBtn').hide();
}
function valueFun(formData) {
$("#dataForm").find('select').each(function(){
var value;

View File

@ -0,0 +1,371 @@
<!doctype html>
<html lang="en">
<head>
<base href="/partybuilding/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body" id="dataTableBox">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
</div>
<div class="layui-inline">
<input type="text" id="birthday" class="layui-input search-item" placeholder="出生年月日" readonly>
</div>
<div class="layui-inline">
<input type="text" id="regularTime" class="layui-input search-item" placeholder="转正日期" readonly>
</div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="录入开始时间" readonly>
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item" placeholder="录入结束时间" readonly>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
<!-- 表头按钮组 -->
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent" id="updateBtn">
<i class="fa fa-lg fa-edit"></i> 查看
</button>
</div>
</script>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/partymemberorganize/listpagepartymemberorganize?partyOrganizeId={partyOrganizeId}';
var viewer = new Viewer(document.getElementById("dataTableBox"), {navbar: false});
var initImageTimeout;
var partyOrganizeId = top.restAjax.params(window.location.href).partyOrganizeId;
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [partyOrganizeId]),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
toolbar: '#headerToolBar',
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'photo', width: 150, title: '照片', align:'center',height: '150px',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
var img = '<img id="' + rowData + '" src="route/file/downloadfile/false/' + rowData + '" align="加载失败" lay-event="photoEvent">';
if(initImageTimeout) {
clearTimeout(initImageTimeout);
}
initImageTimeout = setTimeout(function() {
viewer.update();
}, 500);
return img;
}
},
{field: 'belongPartyOrganizeName', width: 150, title: '所属党组织', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'name', width: 150, title: '姓名', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'sexName', width: 150, title: '性别', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'birthday', width: 150, title: '出生日期', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'nationName', width: 150, title: '民族', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'educationName', width: 150, title: '学历', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'partyMembershipStatusName', width: 150, title: '党籍状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'partyMemberTypeName', width: 150, title: '党员类型', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'occupationName', width: 150, title: '人员职业', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isFlow', width: 150, title: '是否流动', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(rowData == 0) {
rowData = '否';
}else {
rowData = '是';
}
return rowData;
}
},
{field: 'joinTime', width: 150, title: '入党时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'regularTime', width: 150, title: '转正时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isOutofcontact', width: 150, title: '是否失联', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(rowData == 0) {
rowData = '否';
}else {
rowData = '是';
}
return rowData;
}
}
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
}
});
}
// 重载表格
function reloadTable(currentPage) {
top.dialog.dialogData.toNow = '';
if($('#birthday').val() || $('#regularTime').val()) {
layer.confirm('请选择搜索范围', {
btn: ['仅选择日','选择日到今天'] //按钮
}, function(){
top.dialog.dialogData.toNow = 'no';
layer.close(layer.index);
searchFun(currentPage);
}, function(){
top.dialog.dialogData.toNow = 'yes';
searchFun(currentPage);
});
}else {
searchFun(currentPage);
}
}
function searchFun(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
birthday: $('#birthday').val(),
regularTime: $('#regularTime').val(),
toNow: top.dialog.dialogData.toNow
},
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
// 初始化日期
function initDate() {
// 日期选择
laydate.render({
elem: '#startTime',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#endTime',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#birthday',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#regularTime',
format: 'yyyy-MM-dd'
});
}
// 删除
function removeData(ids) {
top.dialog.msg(top.dataMessage.delete, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.delete(top.restAjax.path('api/partymemberorganize/removepartymemberorganize/{ids}', [ids]), {}, null, function (code, data) {
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
reloadTable();
}, function (code, data) {
top.dialog.msg(data.msg);
}, function () {
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
}, function () {
top.dialog.close(layIndex);
});
}
});
}
initTable();
initDate();
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
// 事件 - 增删改
table.on('toolbar(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'updateEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
top.dialog.open({
url: top.restAjax.path('route/partymemberorganize/update-partymemberorganize.html?partyMemberOrganizeId={partyMemberOrganizeId}&isView=yes', [checkDatas[0].partyMemberOrganizeId]),
title: '党员列表',
width: '1040px',
height: '98%',
onClose: function(data) {
}
});
}
}
});
});
</script>
</body>
</html>