123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410 |
- {extend name="public/layout"/} {block name="title"}VR楼书{/block} {block name="body"}
- <link rel="stylesheet" href="__STATIC__/css/csspc.css">
- <link rel="stylesheet" href="__STATIC__/css/font.css">
- <style>
- html {
- min-width: 1100px;
- margin: 0 auto;
- width: 100%;
- height: 100%;
- }
- body {
- background: #EEEEEE;
- height: 100%;
- width: 100%;
- color: #333;
- font-size: 14px;
- padding:15px;
- }
- .layui-fluid {
- display: block;
- box-shadow: 0 0 4px 0 #B6CADE;
- border-radius: 5px;
- background-color: #ffffff;
- }
- .layui-card {
- background: #fff;
- }
- .rst_box_top {
- background: #fff;
- padding: 0px 0px 1px;
- border-radius: 8px;
- }
- .layui-tab-title .layui-this:after {
- width: 50px !important;
- }
- .layui-tab-brief>.layui-tab-more li.layui-this:after,
- .layui-tab-brief>.layui-tab-title .layui-this:after {
- border-bottom: 4px solid #28A1FF !important;
- }
- .layui-tab-title .layui-this:after {
- width: 60%;
- height: 2px;
- border-radius: 3px;
- left: 50%;
- transform: translateX(-50%);
- }
- .layui-tab-title {
- height: auto !important;
- }
- .layui-this {
- color: #28A1FF !important;
- }
- .lanse {
- color: #28A1FF;
- }
- .huise999 {
- color: #999;
- }
- .layui-bodys {
- background: #fff;
- border-radius: 8px;
- padding: 25px 15px;
- overflow: hidden;
- height: 85vh;
- min-height: 650px;
- }
- .rst_box_b_left_input {
- width: 210px;
- height: 40px;
- border: 1px solid #ECECEC;
- }
- .layui-form-item {
- margin-bottom: 0;
- clear: initial;
- }
- .layui-input,
- .layui-select {
- height: 38px;
- }
- /* .searchIco{right:5%;font-size:24px;color:#28A1FF;top:8%; text-align: center;line-height: 38px;cursor: pointer;} */
- .huise333 {
- color: #333;
- }
- input,select{
- font-size: 14px;
- }
- .building_list_li_dl dd {
- border: 1px solid #ECECEC;
- border-radius: 8px;
- padding: 20px;
- overflow: hidden;
- }
- .building_list_li_dd_img {
- width: 122px;
- height: 122px;
- overflow: hidden;
- }
- .building_list_li_dd_ul li {
- float: left;
- margin-right: 1.2%;
- }
- .vr_icos {
- height: 17px;
- }
- .vr_icos2 {
- vertical-align: -10%;
- }
- .building_list_li {
- margin-top: 25px;
- }
- .abc_list {
- right: 0;
- top: 25px;
- overflow-y: auto;
- height: 90%;
- -ms-overflow-style: none;
- width: 40px;
- text-align: center;
- }
- .building_list_ul {
- -ms-overflow-style: none;
- overflow-y: auto;
- height: 90%;
- }
- .abc_list::-webkit-scrollbar {
- display: none;
- }
- .building_list_ul::-webkit-scrollbar {
- display: none;
- }
- .abc_list a {
- display: block;
- margin-bottom: 15px;
- color: #999999;
- font-size: 18px;
- cursor: pointer;
- }
- .abc_list a:hover {
- color: #28A1FF;
- }
- .hongse {
- color: #FE0000;
- }
- .urge_indexbg {
- background: #fff;
- padding: 25px;
- border-radius: 8px;
- height: 100%;
- }
- .noneimgs {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- margin: auto;
- }
- .layui-btn-primary {
- color: #249EFB;
- border: 1px solid #249EFB;
- background-color: #fff;
- }
- .layui-btn-primary:hover {
- background-color: #E3F7FF;
- color: #249EFB;
- }
- .layui-form-select dl dd.layui-this {
- color: #ffffff !important;
- }
- .widthAuto {
- width: calc(100% - 140px);
- }
- .istextshow {
- display: none;
- }
- .building_list_uls {
- -ms-overflow-style: none;
- overflow-y: auto;
- height: 90%;
- }
- .building_list_uls::-webkit-scrollbar {
- display: none;
- }
- .noneClass {
- display: none !important;
- }
- .c_wordlist,
- .c_wordlist1 {
- width: 20px;
- position: absolute;
- top: 43px;
- right: 1px;
- display: flex;
- flex-direction: column;
- z-index: 99999;
- height: auto;
- justify-content: flex-start;
- align-items: center;
- box-sizing: border-box;
- padding: 4px 0px;
- overflow: hidden;
- max-height: 297px;
- -ms-overflow-style: none;
- /* IE 10+ */
- scrollbar-width: none;
- /* Firefox */
- overflow-y: scroll;
- background-color: #f5f5f5;
- }
- .c_wordlist::-webkit-scrollbar,
- .c_wordlist1::-webkit-scrollbar {
- display: none;
- /* Chrome Safari */
- }
- .c_wordlist>li,
- .c_wordlist1>li {
- width: 20px;
- height: 37px;
- cursor: pointer;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-bottom: 0px;
- line-height: 37px;
- }
- .c_wordlist>li.li_active {
- font-weight: 700 !important;
- background-color: #249EFB !important;
- color: #fff !important;
- }
- .c_wordlist1>li.li_active {
- font-weight: 700 !important;
- background-color: #249EFB !important;
- color: #fff !important;
- }
- .flex-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .flex-sub {
- flex: 1;
- }
- .layui-form-item .layui-input-inline {
- width: auto !important;
- }
- .justify-end {
- justify-content: flex-end;
- }
- .iwidth {
- width: 240px;
- text-align: center;
- }
- .layui-form-select dl {
- width: 100% !important;
- }
- .isdatawpsa{height: 311px;width:100%}
- .isdatas{display: none;}
- .setempHtml{
- overflow: hidden;
- }
- .setempHtml li{float:left;border:1px solid #999;height: 38px;line-height: 38px;text-align: center;margin:15px 1.25% 0;background: #f7f7f7;font-size: 14px;padding:0 10px;}
- .setempHtml li .xxx{font-size: 16px;cursor: pointer;width:16px; vertical-align: -8%;margin-left:5px}
- .max_content{width: max-content;}
- .returnico{position:fixed;bottom:9%;right:1.5%;width:68px;cursor: pointer;display:none}
- .noneimgs{width:20%;}
- #pages a,#pages span{font-size: 13px;}
- .layui-tab-item{height: 100%;}
- </style>
- <body>
- <div class="layui-fluid">
- <div class="layui-card" style="box-shadow:none;">
- <div class="layui-tab layui-tab-brief">
- <ul class="layui-tab-title rst_box_top">
- <li data-index="1" class="font16 layui_pcupload">小区楼盘</li>
- <li data-index="3" class="font16 layui-tjbtns">手机上传</li>
- <li data-index="4" class="font16 layui-lpsjtjbtns">楼盘数据统计</li>
- <li data-index="5" class="font16 setemp">设置可见人</li>
- </ul>
- <div class="layui-tab-content pd0 mdt20">
- <!--01-->
- <div class="layui-tab-item">
- <div class="layui-bodys">
- <div class="wauto height100_">
- <div class=" layui-form " style="height: 45px;">
- <div class="layui-form-item flex-row">
- <div class="layui-inline flex-row">
- {auth:check name="building/add"}
- <button type="button"
- class="layui-btn layuiadmin-btn-course wleft layui-btn-normal layui-btn-primary"
- data-type="add">添加楼盘</button>
- {/auth:check}
- <a href="#" type="button" class="layui-btn wleft layui-btn-primary" data-type="lplist"
- id="lplist">楼盘列表</a>
- </div>
- <div class="flex-sub flex-row justify-end">
- <div class="layui-inline flex-row" style="margin-right:0;">
- <div class="layui-input-inline flex-sub relative">
- <input type="text" class="iwidth layui-input" name="time" id="time_date"
- placeholder="上传开始时间 - 结束时间" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline flex-row" style="margin-right:0;">
- <div class="layui-input-inline flex-sub relative" id="box212">
- <select name="community" lay-filter="community" id="community" lay-search>
- <option value="">请选择小区</option>
- {notempty name="communityList"}
- {volist name="communityList.arr" id="t"}
- <option data-py="{$t.s}" value="{$t.id}">{$t.name}</option>
- {/volist}
- {/notempty}
- </select>
- <ul class="c_wordlist noneClass">
- {notempty name="communityList"}
- {volist name="communityList.sort" id="vo"}
- <li data-py="{$vo}">{$vo}</li>
- {/volist}
- {/notempty}
- </ul>
- </div>
- </div>
- <div class="layui-inline flex-row" style="margin-right:0;">
- <div class="layui-input-block mdl0">
- <select name="employee_id" class="pdl12" id='employee_id' lay-search
- lay-filter="selectuploadpeople">
- <option value="">请选择上传人员</option>
- {volist name="employee" id="e"}
- <option value="{$e.id}">{$e.name}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-inline flex-row" style="margin-right:0;">
- <div class="layui-input-inline mdl0 pdl12 height100_">
- <input type="text" name="name" required lay-verify="required" placeholder="请输入楼盘名称"
- autocomplete="off" class="layui-input keywords" id="keyword">
- </div>
- </div>
- </div>
- <div class="layui-inline" style="margin-right: 0;">
- <button class="layui-btn layuiadmin-btn-list searchIco submitbtn" style="float: right;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- </div>
- </div>
- </div>
- <!--body-->
- <div class="wpsr height100_ woverflow" style="width: 100%;">
- <ul class="width100_ building_list_ul buliding_list_html">
- <!--01-->
- <!--01-->
- </ul>
- <div class="wpsa abc_list"></div>
- <div id="pages"></div>
- <div class="wpsa returnico">
- <img class="width50_ wauto" src="__STATIC__/img/returnico.png" alt="">
- <p class="textc mdt05 lanse font12">返回顶部</p>
- </div>
- </div>
- <!--body-->
- </div>
- </div>
- </div>
- <!--01-->
- <!--03-->
- <div class="layui-tab-item">
- <div class="layui-bodys">
- <div class="wauto height100_">
- <div class=" layui-form" style="height: 45px;">
- <div class="layui-form-item flex-row">
- <div class="flex-sub flex-row justify-end">
- <div class="layui-inline flex-row" style="margin-right:0;">
- <div class="layui-input-inline flex-sub relative">
- <input type="text" class="iwidth layui-input" name="time" id="time_date1"
- placeholder="添加开始时间 - 添加结束时间" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline flex-row" style="margin-right:0;">
- <div class="layui-input-inline flex-sub relative" id="box21">
- <select name="community" lay-filter="community1" id="community1" lay-search>
- <option value="">请选择小区</option>
- {notempty name="communityList"}
- {volist name="communityList.arr" id="t"}
- <option data-py="{$t.s}" value="{$t.id}">{$t.name}</option>
- {/volist}
- {/notempty}
- </select>
- <ul class="c_wordlist1 noneClass">
- {notempty name="communityList"}
- {volist name="communityList.sort" id="vo"}
- <li data-py="{$vo}">{$vo}</li>
- {/volist}
- {/notempty}
- </ul>
- </div>
- </div>
- <div class="layui-inline flex-row" style="margin-right:0;">
- <div class="layui-input-block mdl0">
- <select name="employee_id" class="pdl12" id='employee_ids' lay-filter="selectuploadpeoples">
- <option value="">请选择上传人员</option>
- {volist name="employee_mb" id="e"}
- <option value="{$e.id}">{$e.name}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-inline flex-row" style="margin-right:0;">
- <div class="layui-input-inline mdl0 pdl12 height100_">
- <input type="text" name="name" required lay-verify="required" placeholder="请输入楼盘名称"
- autocomplete="off" class="layui-input keywords" id="keywords">
- </div>
- </div>
- </div>
- <div class="layui-inline">
- <button class="layui-btn layuiadmin-btn-list searchIcos" style="float: right;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- </div>
- </div>
- </div>
- <!--body-->
- <div class="wpsr height100_ woverflow" style="width: 100%;">
- <ul class="width96_ building_list_uls">
- <!--01-->
- <!--01-->
- </ul>
- <div id="mobelepage"></div>
- <div class="wpsa abc_list"></div>
- </div>
- <!--body-->
- </div>
- </div>
- </div>
- <!--03-->
-
- <!-- 05 -->
- <div class="layui-tab-item">
- <div class="layui-bodys" style="padding:0 10px;">
- <div class="body04 width100_ height100_">
- <iframe class="lpsjtjbtnsrc" src="" style="width: 100%;height:100%;" scrolling="0" frameborder="0"></iframe>
- </div>
- </div>
- </div>
- <!-- 05 -->
-
- <!-- 04 -->
- <div class="layui-tab-item">
- <div class="layui-bodys" style="padding:0 15px;">
- <div class="body04 width100_ height100_" style="overflow:auto;">
- <div class="isdatas wpsr width100_ height100_">
- <div class="isdatawpsa wpsa wpsauto">
- <div class="isdata_img wauto"></div>
- <p class="textc font16 mdt20" style="color: #999;">暂无数据请<span class="addsetemp1 lanse href">去添加</span></p>
- </div>
- </div>
-
- <div class="isdatas02">
- <div class="">
- <ul class="setempHtml mdl10">
-
- </ul>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- <!-- 04 -->
- </div>
- </div>
- </div>
- </div>
- </body>
- {/block} {block name="js"}
- <script>
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index', 'element', 'table', 'form', 'laydate','laypage'], function () {
- var $ = layui.$,
- layer = layui.layer,
- laypage = layui.laypage,
- table = layui.table,
- form = layui.form
- element = layui.element,
- laydate = layui.laydate,
- scrollTopNum = 0,
- cIndex = 0,
- page = 1,
- limit=10,
- datass = {
- name: '',
- page:page,
- limit:limit
- },
- datas1 = {
- name: '',
- },
- returns_data = {};
-
- laydate.render({
- elem: '#time_date'
- , type: 'date'
- , range: true
- , trigger: 'click'//呼出事件改成click
- , done: function (value, date, endDate) { // 选择完毕的回调
- var keyword = $('#keyword').val();
- var employee_id = $('#employee_id').val();
- var community = $('#community').val();
- returns_data['time'] = value;
- var returns_datas=JSON.stringify(returns_data);
- localStorage.setItem('return_datas',returns_datas);
- datass = {
- name: keyword,
- employee_id: employee_id,
- time: value,
- community_id: community,
- page:page,
- limit:limit
- }
- getList(datass);
- }
- });
- form.on('select(community)', function (data) {
- var keyword = $('#keyword').val();
- var employee_id = $('#employee_id').val();
- var time = $('#time_date').val();
- returns_data['community_id'] = data.value;
- var returns_datas=JSON.stringify(returns_data);
- localStorage.setItem('return_datas',returns_datas);
- datass = {
- name: keyword,
- employee_id: employee_id,
- time: time,
- community_id: data.value,
- page:page,
- limit:limit
- }
- getList(datass);
- });
- form.on('select(selectuploadpeople)', function (data) {
- var keyword = $('#keyword').val();
- var employee_id = data.value;
- var time = $('#time_date').val();
- var community = $('#community').val();
- returns_data['employee_id'] = data.value;
- var returns_datas=JSON.stringify(returns_data);
- localStorage.setItem('return_datas',returns_datas);
- datass = {
- name: keyword,
- employee_id: employee_id,
- time: time,
- community_id: community,
- page:page,
- limit:limit
- }
- getList(datass);
- });
-
- $('#keyword').off('input').on('input',function(obj){
- returns_data['name'] = $(this).val();
- var returns_datas=JSON.stringify(returns_data);
- localStorage.setItem('return_datas',returns_datas);
- })
-
- $('#keyword').on('keypress', function (e) {
- if (e.keyCode === 13) {
- var keyword = $('#keyword').val();
- var employee_id = $('#employee_id').val();
- var time = $('#time_date').val();
- var community = $('#community').val();
- datass = {
- name: keyword,
- employee_id: employee_id,
- time: time,
- community_id: community,
- page:page,
- limit:limit
- }
- getList(datass);
- }
- })
- laydate.render({
- elem: '#time_date1'
- , type: 'date'
- , range: true
- , trigger: 'click'//呼出事件改成click
- , done: function (value, date, endDate) { // 选择完毕的回调
- var keyword = $('#keywords').val();
- var employee_id = $('#employee_ids').val();
- var community = $('#community1').val();
- datas1 = {
- name: keyword,
- employee_id: employee_id,
- time: value,
- community_id: community
- }
- getList(datas1, 's');
- }
- });
- form.on('select(community1)', function (data) {
- var keyword = $('#keywords').val();
- var employee_id = $('#employee_ids').val();
- var time = $('#time_date1').val();
- datas1 = {
- name: keyword,
- employee_id: employee_id,
- time: time,
- community_id: data.value
- }
- getList(datas1, 's');
- });
- $('#keywords').on('keypress', function (e) {
- if (e.keyCode === 13) {
- var keyword = $('#keywords').val();
- var employee_id = $('#employee_ids').val();
- var time = $('#time_date1').val();
- var community = $('#community1').val();
- datas1 = {
- name: keyword,
- employee_id: employee_id,
- time: time,
- community_id: community
- }
- getList(datas1, 's');
- }
- })
- form.on('select(selectuploadpeoples)', function (data) {
- var keyword = $('#keywords').val();
- var employee_id = data.value;
- var time = $('#time_date1').val();
- var community = $('#community1').val();
- datas1 = {
- name: keyword,
- employee_id: employee_id,
- time: time,
- community_id: community
- }
- getList(datas1, 's');
- });
- $('.searchIco').click(function () {
- var keyword = $('#keyword').val();
- var employee_id = $('#employee_id').val();
- var time = $('#time_date').val();
- var community = $('#community').val();
- datass = {
- name: keyword,
- employee_id: employee_id,
- time: time,
- community_id: community,
- page:page,
- limit:limit
- }
- getList(datass);
- })
- $('.searchIcos').click(function () {
- var keyword = $('#keywords').val();
- var employee_id = $('#employee_ids').val();
- var time = $('#time_date1').val();
- var community = $('#community1').val();
- datas1 = {
- name: keyword,
- employee_id: employee_id,
- time: time,
- community_id: community
- }
- getList(datas1, 's');
- })
- $('.rst_box_top li').click(function(e) {
- let props = $(this).prop('dataset');
- localStorage.setItem('CUR_TAB_INDEX',props.index);
- })
- $('.layui_pcupload').click(function () {
- getList(datass);
- })
- $('.layui-tjbtns').click(function () {
- $('.buliding_list_html').html('');
- getList(datas1, 's');
- })
- $('.layui-lpsjtjbtns').click(function () {
- $('.lpsjtjbtnsrc').attr('src','analysis.html');
- })
- let TAB_INDEX = localStorage.getItem('CUR_TAB_INDEX');
- if (TAB_INDEX) {
- let index = parseInt(TAB_INDEX) - 1;
- $('.rst_box_top li').eq(index).addClass('layui-this').siblings().removeClass("layui-this");
- $('.layui-tab-item').eq(index).addClass('layui-show').siblings().removeClass("layui-show");
- if (index == 2) {
- getList(datas1, 's');
- }
- if (index == 0) {
- getList(datass);
- }
- if (index == 1) {
- urge_list();
- }
- if (index == 4) {
- empapi();
- }
- if (index == 3) {
- $('.lpsjtjbtnsrc').attr('src','analysis.html');
- }
- } else {
- $('.rst_box_top li').eq(0).addClass('layui-this').siblings().removeClass("layui-this");
- $('.layui-tab-item').eq(0).addClass('layui-show').siblings().removeClass("layui-show");
- getList(datass);
- }
-
- function getList(datass, t = '') {
- var url = '{:url("building/index")}';
- if (t == 's') {
- url = '{:url("building/index",array("from"=>1))}';
- }
- $.ajax({
- url: url,
- type: 'post',
- dataType: 'json',
- data: datass,
- success: function (res) {
- if (res.code == 0) {
- setListHtml(res.data, t);
- if (res.data.length == 0) {
- $('.building_list_ul' + t).append('<img class="noneimgs" src="__STATIC__/img/nonedata.png"/>');
- }
- if(t==''){
- pages('pages',datass, res.count);
- }else{
- pages('mobelepage',datass, res.count);
- }
- }
- }
- });
- }
- function pages(objname,where,count) {
- laypage.render({
- elem: objname
- , count: count
- , curr: where.page
- , limit: where.limit
- , prev:'<i class="layui-icon layui-icon-left"></i>'
- , next:'<i class="layui-icon layui-icon-right"></i>'
- , layout: ['prev', 'page', 'next' , 'skip','count','limit']
- , jump: function (obj, first) {
- limit = obj.limit;
- where.page = obj.curr;
- where.limit = obj.limit;
-
- if (!first) {
- $('.building_list_ul').animate({scrollTop:0}, 0);
- if(objname == 'pages'){
- getList(where);
- }
- if(objname == 'mobelepage'){
- getList(where,'s');
- }
- }
- }
- });
- }
-
- // 04
- $('.setemp').click(function(){
- empapi();
- })
- function empapi(){
- $.ajax({
- url: '{:url("building/special_emplist")}',
- type: 'post',
- dataType: 'json',
- success: function(res) {
- if(res.code==0){
- emphtmls(res.data);
- }
- }
- });
- }
- function emphtmls(data){
- var emplistHtml = '';
- if(data.length==0){
- $('.setempHtml').html('<li style="border: 0;background:none;padding:0;"><button type="button" class="layui-btn layui-btn-primary addsetemp2" style="vertical-align: 13px;">+添加</button></li>');
- $('.isdatas').show();
- $('.isdatas02').hide();
- $('.isdata_img').html('<img class="width20_ wauto" src="__STATIC__/img/nonedata.png"/>');
- }else{
- $('.setempHtml').html('<li style="border: 0;background:none;padding:0;"><button type="button" class="layui-btn layui-btn-primary addsetemp2" style="vertical-align: 13px;">+添加</button></li>');
- for(let i=0;i<data.length;i++){
- emplistHtml+='<li><div class="max_content"><span class="ids">'+data[i].name+'</span><img data-id="'+data[i].id+'" class="deletebtns xxx ids" src="__STATIC__/img/xxx.png"/></div></li>'
- }
- $('.setempHtml').append(emplistHtml);
- $('.isdatas').hide();
- $('.isdatas02').show();
- $('.deletebtns').on('click',function(){
- var id = $(this).data('id');
- $.ajax({
- url: '{:url("building/del_special_emp")}',
- type: 'post',
- dataType: 'json',
- data:{
- eid:id
- },
- success: function(res) {
- if(res.code==0){
- empapi();
- }
- }
- });
- })
- addsetemp('.addsetemp2');
- }
- }
- addsetemp('.addsetemp1');
- function addsetemp(obj){
- $(obj).on('click',function() {
- layer.open({
- type: 2,
- title: ['设置可见人', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("building/building_special_assigns")}',
- area: ['80%', '80%'],
- btn: ['确定', '取消'],
- yes: function (index, layero) {
- layer.close(index);
- empapi();
- },
- end: function() {
- cIndex = 0;
- }
- });
- })
- }
- function setListHtml(arr, t = '') {
- let htmls = arr.map((u, x) => {
- return `<li class="building_list_li" id="A">
- <dl class="building_list_li_dl mdt15">
- <dd class="mdt15" style="min-width:1120px;">
- <div class="building_list_li_dd_img wleft">
- <img class="width100_ height100_" src="${u.cover[0]}"/>
- </div>
- <div class="wleft mdl01_ widthAuto">
- <div class="lh16 mdt14">
- <span class="huise999 font16">名称 ${u.name}</span>
- <img class="ids vrico mdl06 ${u.vr_link ? '' : 'dsnone'}" src="__STATIC__/img/vrico.png"/>
- <span class="font12 huise999 mdl20">上传时间:${u.addtime}</span>
- </div>
- <p class="font14 width100_ huise999 ids textlh1 content_txt_span lh24 mdtb15">简介:<span class="contentspan">${u.content}</span> <span class="istextshow lanse href" data-index="${x}" data-isshow=1>[展开]</span></p>
- <div class="">
- <ul class="building_list_li_dd_ul lh22 woverflow">
- <li class="font14 huise333">交房 <span class="huise999">${u.duetime?u.duetime:'暂未填写'}</span></li>
- <li class="font14 huise333">进度 <span class="huise999">${u.progress_count}条</span></li>
- <li class="font14 huise333">VR <span class="huise999">${u.vr_count}条</span></li>
- <li class="font14 huise333 href material_case" data-type="material_case">案例 <span class="huise999">${u.material_case_count}个</span></li>
- <li class="font14 huise333">浏览次数 <span class="huise999">${u.view_times}次</span></li>
- <li class="font14 huise333">上传人 <span class="huise999">${(u.from == 1 && u.employee && u.employee.name) ? u.employee.name : (u.employee && u.employee.opt_name) ? u.employee.opt_name : (u.employee && u.employee.name) ? u.employee.name : '无'}</span></li>
- <li class="font14 href housetype"><a href="housetype.html?building_id=${u.id}" class="lanse xiaoqubtn">小区户型${u.housetype_count}个</a></li>
- <li class="font14 href progress" data-id="${u.id}"><a href="progress.html?building_id=${u.id}" class="lanse lpjdbtn">楼盘进度</a></li>
-
- <li class="font14 lanse href vr_edit" data-id="${u.id}" data-type="edit">
- <span data-id="${u.id}" data-xin="${t}" class="mdl03">编辑</span>
- </li>
- <li data-id="${u.id}" class="font14 lanse href cluesBtn">线索记录</li>
- <li data-id="${u.id}" data-xin="${t}" class="font14 lanse href assignTask">指派</li>
- <li data-id="${u.id}" class="font14 hongse href vr_del">
- <span data-id="${u.id}" data-xin="${t}" class="hongse">删除</span>
- </li>
- </ul>
- </div>
- </div>
- </dd>
- </dl>
- </li>`;
- }).join('');
- $('.building_list_ul' + t).html(htmls);
- $('.lpjdbtn').on('click',function(){
- returns_data['scrollPos'] = scrollTopNum;
- var returns_datas=JSON.stringify(returns_data);
- localStorage.setItem('return_datas',returns_datas);
- })
- $('.xiaoqubtn').on('click',function(){
- returns_data['scrollPos'] = scrollTopNum;
- var returns_datas=JSON.stringify(returns_data);
- localStorage.setItem('return_datas',returns_datas);
- })
-
- var content_arr = [];
- $('.building_list_li').each(function () {
- var content = $.trim($(this).find('.contentspan').html());
- content_arr.push(content);
- })
- for (let i = 0; i < content_arr.length; i++) {
- if (content_arr[i].length < 64) {
- $('.istextshow').eq(i).hide();
- } else {
- $('.istextshow').eq(i).show();
- content = content_arr[i].substr(0, 60) + '...';
- $(".contentspan").eq(i).html(content);
- }
- }
- $('.istextshow').on('click', function () {
- var this_ = $(this);
- indexs = this_.data('index');
- offshows = parseInt(this_.attr('data-isshow'));
- if (offshows == 1) {
- content = content_arr[indexs];
- this_.parents(".content_txt_span").removeClass('textlh1');
- this_.siblings(".contentspan").html(content);
- this_.html('[收起]');
- this_.attr('data-isshow', 2)
- } else {
- content = content_arr[indexs].substr(0, 64) + '...';
- this_.parents(".content_txt_span").addClass('textlh1');
- this_.siblings(".contentspan").html(content);
- this_.html('[展开]');
- this_.attr('data-isshow', 1)
- }
- })
- setTimeout(() => {
- $('.vr_edit').on('click', (e) => {
- let id = e.target.dataset.id;
- let xin = e.target.dataset.xin;
- if (cIndex == 0) {
- cIndex++;
- layer.open({
- type: 2,
- title: ['编辑楼盘', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("building/edit")}?id=' + id,
- resize: false,
- area: ['80%', '80%'],
- end: function (index, layero) {
- getList('', xin);
- scrollPostion(scrollTopNum);
- cIndex = 0;
- }
- });
- }
- })
- $('.vr_del').on('click', (e) => {
- let id = e.target.dataset.id;
- let xin = e.target.dataset.xin;
- if (cIndex == 0) {
- cIndex++;
- layer.confirm('确定删除当前楼盘信息', {
- title: ['信息', 'color:#333333;background-color:#D8E6F1;'],
- end: function () {
- cIndex = 0;
- }
- }, function (index) {
- $.ajax({
- url: "{:url('building/delete')}",
- data: {
- id: id
- },
- type: 'post',
- success: function (res) {
- if (res.code == 0) {
- layer.msg('删除成功')
- getList('', xin);
- scrollPostion(scrollTopNum);
- layer.close(index);
- } else {
- layer.msg(res.msg)
- }
- }
- });
- });
- }
- })
- $('.cluesBtn').on('click', (e) => {
- let id = e.target.dataset.id;
- if (cIndex == 0) {
- cIndex++;
- layer.open({
- type: 2,
- title: ['线索记录', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("data/cluedata")}?type=building&id=' + id,
- resize: false,
- area: ['80%', '80%'],
- end: function () {
- cIndex = 0;
- }
- });
- }
- })
- $('.change_construction').on('click', (e) => {
- let id = e.target.dataset.id;
- if (cIndex == 0) {
- cIndex++;
- layer.open({
- type: 2,
- title: ['在施工地绑定', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("building/construction")}?building_id=' + id,
- resize: false,
- area: ['80%', '80%'],
- end: function () {
- cIndex = 0;
- }
- });
- }
- })
- $('.assignTask').click(function () {
- let id = $(this).prop('dataset').id;
- let xin = $(this).prop('dataset').xin;
- if (cIndex == 0) {
- cIndex++;
- layer.open({
- type: 2,
- title: ['指派', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("building/building_assigns")}?id=' + id,
- area: ['80%', '80%'],
- btn: ['确定', '取消'],
- yes: function (index, layero) {
- if (xin) {
- getList(datas1, xin);
- } else {
- getList(datass, xin);
- }
- layer.close(index);
- //点击确认触发 iframe 内容中的按钮提交
- },
- end: function () {
- cIndex = 0;
- }
- });
- }
- })
-
-
-
- }, 300)
- }
-
- if(localStorage.getItem('return02')==1){
- setTimeout(function(){
- localStorage.setItem('return02','');
- },3000)
- }else{
- localStorage.setItem('return_datas','');
- }
- if(localStorage.getItem('return_datas')){
- var bodyjson = JSON.parse(localStorage.getItem('return_datas'));
- returns_data['time'] = bodyjson.time?bodyjson.time:'';
- if(bodyjson.employee_id==''||bodyjson.employee_id==undefined||bodyjson.employee_id==null){
- }else{
- set_select('employee_id',bodyjson.employee_id);
- returns_data['employee_id'] = parseInt(bodyjson.employee_id)
- }
- if(bodyjson.community_id==''||bodyjson.community_id==undefined||bodyjson.community_id==null){
- }else{
- set_select('community',bodyjson.community_id);
- returns_data['community_id'] = parseInt(bodyjson.community_id)
- }
- if(bodyjson.name==''||bodyjson.name==undefined||bodyjson.name==null){
- }else{
- $('#keyword').val(bodyjson.name);
- returns_data['name'] = bodyjson.name;
- }
- if(bodyjson.time==''||bodyjson.time==undefined||bodyjson.time==null){
- }else{
- $('#time_date').val(bodyjson.time);
- returns_data['time'] = bodyjson.time;
- }
- setTimeout(function() {
- getList(returns_data);
- scrollPostion(bodyjson.scrollPos);
- },1000);
- }
- function set_select(id,value){
- let obj=$("#"+id);
- let names='';
- for(var i=0;i<obj.find('option').length;i++){
- if(obj.find('option').eq(i).val()==value){
- obj.find("option").eq(i).attr("selected",true);
- names=obj.find('option').eq(i).html();
- }
- }
- setTimeout(function(){
- obj.parent().find(".layui-select-title").find("input").val(names);
- },500)
- }
-
-
- setTimeout(() => {
- $('.building_list_ul').scroll(function (e) {
- scrollTopNum = $(this).scrollTop();
- // console.log(scrollTopNum, '<<<记录位置');
- if(scrollTopNum>550){
- $('.returnico').show();
- }else{
- $('.returnico').hide();
- }
- })
- }, 800)
- function scrollPostion(num) {
- $('.building_list_ul').scrollTop(num)
- }
- $('.returnico').on('click',function(){
- $('.building_list_ul').animate({scrollTop:0}, 500);
- scrollTopNum = 0;
- })
-
- //查询页面返回值
- function getQueryString(name) {
- var reg = new RegExp('(^|&)' + name +'=([^&]*)(&|$)', 'i');
- var r = window.location.search.substr(1).match(reg);
- if (r != null) {
- return unescape(r[2]);
- }
- return null;
- }
-
- let xqElement = $('.layui-anim-upbit')[0];
- xqElement.classList.add('xqElement');
- let options = [];
- let xqDatalist = $('#community').children();
- for (let i = 0; i < xqDatalist.length; i++) {
- if (xqDatalist[i].dataset.py) {
- options.push(xqDatalist[i].dataset.py)
- }
- }
- $('dd').click(() => {
- $('.c_wordlist').addClass('noneClass');
- $('.c_wordlist1').addClass('noneClass');
- })
- $('#box212').click(() => {
- $('.c_wordlist').toggleClass('noneClass');
- })
- $('#box21').click(() => {
- $('.c_wordlist1').toggleClass('noneClass');
- })
- $(document).click((e) => {
- let c_element = $('#community').next();
- if (c_element[0].className.indexOf('layui-form-selected') < 0) {
- $('.c_wordlist').addClass('noneClass');
- }
- let c_element1 = $('#community1').next();
- if (c_element1[0].className.indexOf('layui-form-selected') < 0) {
- $('.c_wordlist1').addClass('noneClass');
- }
- })
- $('.c_wordlist').click((e) => {
- if (e.target.localName != 'li') {
- e.stopPropagation();
- return;
- }
- let index = 0;
- let curWord = e.target.dataset.py;
- let lilist = $('.c_wordlist').children();
- for (let i = 0; i < lilist.length; i++) {
- lilist[i].className = '';
- }
- if (parseInt(curWord) != NaN) {
- let word1 = curWord.toLowerCase();
- index = options.indexOf(word1)
- } else {
- index = options.indexOf(curWord)
- }
- setTimeout(() => {
- e.target.className = 'li_active';
- let num = index * 36 + 36;
- $('.xqElement').scrollTop(num);
- }, 50)
- e.stopPropagation();
- })
- let xqElement1 = $('.layui-anim-upbit')[2];
- xqElement1.classList.add('xqElement1');
- let options1 = [];
- let xqDatalist1 = $('#community1').children();
- for (let i = 0; i < xqDatalist1.length; i++) {
- if (xqDatalist1[i].dataset.py) {
- options1.push(xqDatalist1[i].dataset.py)
- }
- }
- $('.c_wordlist1').click((e) => {
- if (e.target.localName != 'li') {
- e.stopPropagation();
- return;
- }
- let index = 0;
- let curWord = e.target.dataset.py;
- let lilist = $('.c_wordlist1').children();
- for (let i = 0; i < lilist.length; i++) {
- lilist[i].className = '';
- }
- if (parseInt(curWord) != NaN) {
- let word1 = curWord.toLowerCase();
- index = options1.indexOf(word1)
- } else {
- index = options1.indexOf(curWord)
- }
- setTimeout(() => {
- e.target.className = 'li_active';
- let num = index * 36 + 36;
- $('.xqElement1').scrollTop(num);
- }, 50)
- e.stopPropagation();
- })
- function scrollTo(ele, time, type) {
- var eletop = $(ele).offset().top;
- if (type) {
- var boxscroll = $(".building_list_uls").scrollTop();
- var boxtop = $(".building_list_uls").offset().top;
- $(".building_list_uls").animate({
- scrollTop: boxscroll + eletop - boxtop - 24
- }, 300);
- } else {
- var boxscroll = $(".building_list_ul").scrollTop();
- var boxtop = $(".building_list_ul").offset().top;
- $(".building_list_ul").animate({
- scrollTop: boxscroll + eletop - boxtop - 24
- }, 300);
- }
- }
- $('.layui-select-title input').on('input',function(e) {
- if (e.target.placeholder == '请选择小区') {
- let val = $(this).val();
- if (!val) {
- $('.c_wordlist').removeClass('noneClass');
- $('.c_wordlist1').removeClass('noneClass');
- return;
- }
- $('.c_wordlist').addClass('noneClass');
- $('.c_wordlist1').addClass('noneClass');
- }
- })
- //----------------------------------------------------------------------------------------
- //事件
- var active = {
- add: function () {
- layer.open({
- type: 2,
- title: ['添加楼盘', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("building/add")}',
- resize: false,
- area: ['80%', '80%'],
- end: function (index, layero) {
- getList();
- }
- });
- },
- };
- $('#lplist').click(function () {
- layer.open({
- type: 2,
- title: ['添加楼盘', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("building/community")}',
- resize: false,
- area: ['80%', '80%'],
- end: function (index, layero) {
- }
- });
- })
- $('.material_case').click(function () {
- layer.open({
- type: 2,
- title: ['关联案例', 'color:#333333;background-color:#D8E6F1;'],
- content: '{:url("building/material_case")}',
- resize: false,
- area: ['900px', '520px'],
- yes: function (index, layero) {
- }
- });
- })
- $('.layui-btn.layuiadmin-btn-course').on('click', function () {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
- $('.layui-tjbtn').click(function () {
- urge_list();
- })
- function urge_list() {
- table.render({
- elem: '#urge_index',
- url: '{:url("building/urge_index")}',
- page: true,
- height: 'full-160',
- cols: [
- [{
- align: 'center', title: '客户名称', templet: function (e) {
- var str;
- if (e.user.nickname !== null) {
- str = e.user.nickname
- } else {
- str = '暂无数据'
- }
- return str;
- }
- }, {
- title: '所属业务员',
- align: 'center',
- templet: function (e) {
- var str;
- if (e.employee.name !== null) {
- str = e.employee.name
- } else {
- str = '暂无数据'
- }
- return str;
- }
- }, {
- title: '催更小区 ',
- align: 'center',
- templet: function (e) {
- var str;
- if (e.building && e.building.name !== null) {
- str = e.building.name
- } else {
- str = '暂无数据'
- }
- return str;
- }
- }, {
- field: 'addtime',
- title: '催更时间',
- align: 'center'
- }]
- ],
- text: '对不起,加载出现异常!'
- });
- }
- })
- </script>
- {/block}
|