liuyg
2021-06-11 f04efcae7635378aed3bca570322a38cae97d722
widgets/searchL/Widget.js
@@ -236,6 +236,7 @@
            })
         },
         beginLayUi: function (data = 1, data1 = 1, data2 = 1) {
            // console.log(data,data1,data2)
            var that = this;
            layui.use(function () {
               var element = layui.element
@@ -246,7 +247,7 @@
                  table.render({
                     elem: '#test'
                     // , url: './data'
                     // , url: './data'全景
                     , page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
                        // layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                        layout: ['count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
@@ -257,9 +258,9 @@
                     }
                     , cols: [[
                        { field: 'tableId', width: 59, align: 'center', unresize: true, title: '序号' }
                        , { field: 'name', width: 90, align: 'center', unresize: true, title: '图层名称' }
                        , { field: 'remarks', width: 95, align: 'center', unresize: true, title: '图层属性1' }
                        , { field: 'createTime', width: 95, align: 'center', unresize: true, title: '图层属性2' }
                        , { field: 'name', width: 90, align: 'center', unresize: true, title: '名称' }
                        , { field: 'protectArea', width: 95, align: 'center', unresize: true, title: '所属保护区' }
                        , { field: 'remarks', width: 95, align: 'center', unresize: true, title: '备注' }
                        , { fixed: 'right', align: 'center', unresize: true, title: '操作', toolbar: '#demoTable' }
                     ]],
                     data: data,
@@ -283,9 +284,10 @@
                  });
               }
               if (data1 != 1) {
                  table.render({
                     elem: '#test1'
                     // , url: './data'
                     // , url: './data'//监控
                     , page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
                        // layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                        layout: ['count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
@@ -296,9 +298,9 @@
                     }
                     , cols: [[
                        { field: 'tableId', width: 59, align: 'center', unresize: true, title: '序号' }
                        , { field: 'name', width: 90, align: 'center', unresize: true, title: '图层名称' }
                        , { field: 'protectName', width: 95, align: 'center', unresize: true, title: '图层属性1' }
                        , { field: 'serviceUrl', width: 95, align: 'center', unresize: true, title: '图层属性2' }
                        , { field: 'name', width: 90, align: 'center', unresize: true, title: '名称' }
                        , { field: 'protectName', width: 95, align: 'center', unresize: true, title: '所属保护区' }
                        , { field: 'remark', width: 95, align: 'center', unresize: true, title: '备注' }
                        , { fixed: 'right', align: 'center', unresize: true, title: '操作', toolbar: '#demoTable1' }
                     ]],
                     data: data1,
@@ -365,7 +367,7 @@
                  table.render({
                     elem: '#test2'
                     // , url: './data'
                     // , url: './data'//检测
                     , page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
                        // layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                        layout: ['count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
@@ -376,9 +378,9 @@
                     }
                     , cols: [[
                        { field: 'tableId', width: 59, align: 'center', unresize: true, title: '序号' }
                        , { field: 'name', width: 90, align: 'center', unresize: true, title: '图层名称' }
                        , { field: 'stcd', width: 95, align: 'center', unresize: true, title: '图层属性1' }
                        , { field: 'createTime', width: 95, align: 'center', unresize: true, title: '图层属性2' }
                        , { field: 'name', width: 90, align: 'center', unresize: true, title: '名称' }
                        , { field: 'wetlandName', width: 95, align: 'center', unresize: true, title: '所属保护区' }
                        , { field: 'remark', width: 95, align: 'center', unresize: true, title: '备注' }
                        , { fixed: 'right', align: 'center', unresize: true, title: '操作', toolbar: '#demoTable2' }
                     ]],
                     data: data2,
@@ -412,20 +414,6 @@
               //…
            });
         },
         setdefaultTime: function () {
            //获取当前时间7天前
            var date = new Date();
            var date1 = new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
            var myDate = date.setDate(date.getDate() - 7);
            var date2 = new Date(+new Date(myDate) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
            console.log([date1, date2], 123456789);
            //设置value
            $('#test-startDate-1').val(date1);
            $('#test-endDate-1').val(date2);
            that.times = [date1, date2];
            var stcd = $('.jimu-widget-searchTabaPopup').find('#userMyStcd').val();
            // that.getOurData(that.times, stcd);//默认7天时间完成
         },
         setXiangqing(obj) {
            var str = '';