Procházet zdrojové kódy

Merge branch 'master' of http://116.63.33.55/git/nazw

elis před 1 rokem
rodič
revize
bce2114a1d

+ 2 - 1
nngkxxdp/src/main/resources/static/district/css/sy_mobile_new.css

@@ -994,6 +994,7 @@ a {
 .url_from_ajax {
   display: flex;
   padding: 15px 12px 0;
+  align-items: center;
 }
 .point_from_ajax {
   width: 4px;
@@ -1182,7 +1183,7 @@ a {
 	position: fixed;
 	right: 15px;
 	top: 160px;
-	z-index: 999;
+	z-index: 99999;
 	border-radius: 15px;
 	height: 60px;
 }

+ 13 - 3
nngkxxdp/src/main/resources/static/district/js/sy_mobile.js

@@ -1564,7 +1564,7 @@ function getDistances(lat1, lng1, lat2, lng2) {
     debugger
     $("#deptDiv2").empty();
     $("#deptDiv2").prev().remove();
-    $(".wrap_handle").hide();
+    // $(".wrap_handle").hide();
     var discript = "";
     $.each(arrey, function (i) {
       discrptAddress = arrey[i].address;
@@ -3048,8 +3048,8 @@ function getDistances(lat1, lng1, lat2, lng2) {
         $(".right-map").innerHeight() - $(".head").innerHeight() + 45;
       var spWidth =
         ($(".show-sixth").innerWidth() - $(".wrap_handle").innerWidth()) / 2;
-      $(".wrap_handle").css({ top: spWidth, left: spWidth });
-      $(".title-second").css({ top: windowHeight, left: spWidth });
+      // $(".wrap_handle").css({ top: spWidth, left: spWidth });
+      // $(".title-second").css({ top: windowHeight, left: spWidth });
       $(".right-search").hide().css("top", "0px");
       var getdep = $(this)
         .parents(".layui-tab-title")
@@ -3283,6 +3283,11 @@ function getDistances(lat1, lng1, lat2, lng2) {
             let getClick = getAllArr.filter((i) => {
               return i.address == discript_text;
             });
+			if (!getClick.length) {
+				getClick = digitGroupItem.filter((i) => {
+				  return i.address == discript_text;
+				});
+			}
             for (let i = 0; i < getClick.length; i++) {
               for (let j = i + 1; j < getClick.length; j++) {
                 if (getClick[j].dep === getClick[i].dep) {
@@ -3336,6 +3341,11 @@ function getDistances(lat1, lng1, lat2, lng2) {
             let getClick = getAllArr.filter((i) => {
               return i.address == discript_text;
             });
+			if (!getClick.length) {
+				getClick = digitGroupItem.filter((i) => {
+				  return i.address == discript_text;
+				});
+			}
             for (let i = 0; i < getClick.length; i++) {
               for (let j = i + 1; j < getClick.length; j++) {
                 if (getClick[j].dep === getClick[i].dep) {

+ 5 - 1
nngkxxdp/src/main/resources/static/district/sy.html

@@ -25,10 +25,13 @@
     iframe {
         border: 0px;
     }
+	.pFoot-btm {
+		margin-top: 0px !important;
+	}
 </style>
 
 <body>
-    <iframe id="childshell" width="100%" height="1000px" src="syDteail.html?isfooter=true"></iframe>
+    <iframe id="childshell" width="100%" height="100%" src="syDteail.html?isfooter=true"></iframe>
     <!--<div style="width:100%;" id="footer"></div>-->
     <!-- <iframe width="100%" height="358px" src="https://www.cqna.gov.cn/data/footer/footer.html"></iframe> -->
 	<div style="width:100%;" id="footer"></div>
@@ -44,6 +47,7 @@
 		var is_mobi = navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
 		if (is_mobi) {
 			$('#childshell').attr('src', 'sy_mobile.html?isfooter=true')
+			$('.pFoot-btm').css('margin-top', '0px !important')
 		}
     }
 

+ 4 - 3
nngkxxdp/src/main/resources/static/district/sy_mobile.html

@@ -8,7 +8,7 @@
     <title>重庆市南岸区政务公开惠民便民地图</title>
 </head>
 <style>
-    body{
+    html, body{
         width: 100%;
         height: 100%;
         margin: 0px;
@@ -16,11 +16,12 @@
     }
     iframe{
         border: 0px;
+		margin: 0px;
+		padding: 0px;
     }
-
 </style>
 <body>
-<iframe id="childshell" width="100%" height="1000px" src="sy_mobileDetail.html"></iframe>
+<iframe id="childshell" width="100%" height="100%" src="sy_mobileDetail.html"></iframe>
 <div style="width:100%;" id="footer"></div>
 
 </body>

+ 26 - 2
nngkxxdp/src/main/resources/static/district/sy_mobileDetail.html

@@ -20,6 +20,12 @@
 		<link rel="stylesheet" href="./css/sy_mobile_new.css">
 		<title>重庆市南岸区政务公开惠民便民地图</title>
 		<style>
+			html, body {
+				height: 100%;
+				margin: 0px;
+				padding: 0px;
+				overflow-y: auto !important;
+			}
 			.dept-sty {
 				margin-left: 15px;
 				margin-top: 15px;
@@ -29,6 +35,24 @@
 				overflow: hidden;
 				text-overflow: ellipsis;
 			}
+			.wrap_result {
+				height: 100% !important;
+				    margin-bottom: 15px;
+			}
+			.wrap_result1 {
+				height: 100% !important;
+				    margin-bottom: 15px;
+			}
+			.show-sixth {
+				height: 100% !important;
+			}
+			.show-fifth {
+				height: 100% !important;
+				/* overflow-y: auto; */
+			}
+			.show-fourth {
+				height: 100% !important;
+			}
 		</style>
 	</head>
 
@@ -46,7 +70,7 @@
 				<img src="./img/second-erw-3.png" alt="" class="first_erw">
 			</a>
 		</div>
-		<div class="main">
+		<div class="main" style="height: 100%;">
 
 			<div class="top_search">
 				<div class="input-icon">
@@ -104,7 +128,7 @@
 				</div>
 			</div>
 			<div class="right-map" id="right-map"></div>
-			<div class="left-map">
+			<div class="left-map" style="height: 70%;">
 				<div class="bttom-tab show-first">
 					<div class="flex_box">
 						<ul>

+ 1 - 1
nngkxxdp/src/main/resources/static/page/css/webStatis.css

@@ -113,7 +113,7 @@ body {
 
 .commonTitle {
 	width: 100%;
-	height: 42px;
+	height: 50px;
 }
 
 .commonTitle span {

+ 27 - 8
nngkxxdp/src/main/resources/static/page/index.html

@@ -8,6 +8,7 @@
     <link rel="stylesheet" type="text/css" href="./layui/css/modules/laydate/default/laydate.css"/>
     <link rel="stylesheet" href="./css/login.css">
     <link rel="stylesheet" type="text/css" href="./css/webStatis.css"/>
+	<link rel="stylesheet" type="text/css" href="./layui/labelGeneration.css"/>
     <script type="text/javascript" src="../constans.js"></script>
     <style type="text/css">
         .layui-nav .layui-this:after,
@@ -292,7 +293,7 @@
         }
 
         .layui-form-label {
-            width: 110px;
+            width: 150px;
         }
 
         #web_sitesms {
@@ -1741,27 +1742,40 @@
 <div id="ly-sms" class="layui-hide">
     <form id="ly-form2" class="layui-form" action="" style="margin: 20px;">
         <input type="hidden" id="ly-type2">
+		<div class="layui-form-item">
+		    <label class="layui-form-label">已有联系人:</label>
+		    <div class="layui-input-block" style="margin-left:150px">
+		        <div id="ly-sms-phones" style="width:500px"></div>
+		    </div>
+		</div>
         <div class="layui-form-item">
-            <label class="layui-form-label">手机号:</label>
-            <div class="layui-input-block">
-                <input type="text" id="ly-sms-phone" autocomplete="off" placeholder="请输入手机号" class="layui-input">
+            <label class="layui-form-label">自定义手机号:</label>
+            <div class="layui-input-block" style="margin-left:150px">
+				<div id="ly-sms-phone"></div>
             </div>
         </div>
         <div class="layui-form-item">
             <label class="layui-form-label">短信内容:</label>
-            <div class="layui-input-block">
-                <textarea id="ly-sms-remark" placeholder="请输入内容" class="layui-textarea" maxlength="500"></textarea>
+            <div class="layui-input-block" style="margin-left:150px">
+                <textarea id="ly-sms-remark" placeholder="请输入内容" class="layui-textarea" maxlength="500" style="width:500px"></textarea>
             </div>
         </div>
         <div class="layui-form-item">
+            <label class="layui-form-label">已选择联系人:</label>
+            <div class="layui-input-block tags" style="margin-left:150px">
+               
+            </div>
+        </div>
+        <!-- <div class="layui-form-item">
             <div class="layui-input-block">
                 <button id="ly-ljbtn-sms" type="button" class="layui-btn">发送</button>
                 <button id="ly-back-sms" type="reset" class="layui-btn layui-btn-primary">返回</button>
             </div>
-        </div>
+        </div> -->
     </form>
 </div>
 </body>
+
 <script type="text/html" id="query_bar" class="">
     <a class="  layui-btn-xs " lay-event="del" style="color: #0970D8;">提醒</a>
 </script>
@@ -1825,7 +1839,12 @@
         element.tabChange('page-item', 'main-zntj');
     }
 
-    layui.use(["layer", "form", "table", "element", "laydate", "dropdown", "upload"], function () {
+    layui.config({
+		base: './layui/'
+	}).extend({
+		xmSelect: 'xm-select',
+		labelGeneration: 'labelGeneration'
+	}).use(["layer", "form", "table", "element", "laydate", "dropdown", "upload", "xmSelect", "labelGeneration"], function () {
         form = layui.form;
         table = layui.table;
         element = layui.element;

+ 186 - 14
nngkxxdp/src/main/resources/static/page/js/base/fbtx.item.js

@@ -440,7 +440,22 @@ function lyupload() {
         });
 
         $('#ly-ljbtn-sms').on('click', function () {
-            if (!$('#ly-sms-phone').val()) {
+			let phones = []
+			let arr = smsView.phoneSelect.getValue()
+			for (let i = 0; i < arr.length; i++) {
+				const p = arr[i].value.replace(/\s/g, "")
+				if (!phones.includes(p)) {
+					phones.push(p)
+				}
+			}
+			let arr2 = $("#ly-sms-phone .layui-btn")
+			for (let i = 0; i < arr2.length; i++) {
+				const p = $(arr2[i]).text().replace(/\s/g, "")
+				if (!phones.includes(p)) {
+					phones.push(p)
+				}
+			}
+            if (!phones.length) {
                 layer.msg("请输入手机号", {icon: 5});
                 return false;
             }
@@ -448,17 +463,19 @@ function lyupload() {
                 layer.msg("请输入短信内容", {icon: 5});
                 return false;
             }
-            post("/smsmessage/sendSms", true, {
-                'phone': $('#ly-sms-phone').val(),
-                'content': $('#ly-sms-remark').val()
-            }, function (res) {
-                if (res.result) {
-                    layer.close(index);
-                    layer.msg('发送成功!');
-                }
-            }, function (err) {
-
-            });
+			const indexss = layer.load(2)
+			smsView.sendMsg(phones, 0, indexss)
+            // post("/smsmessage/sendSms", true, {
+            //     'phone': $('#ly-sms-phone').val(),
+            //     'content': $('#ly-sms-remark').val()
+            // }, function (res) {
+            //     if (res.result) {
+            //         layer.close(index);
+            //         layer.msg('发送成功!');
+            //     }
+            // }, function (err) {
+
+            // });
         })
 
         $('#smsSendRecord').on('click', function () {
@@ -637,18 +654,56 @@ function errorSensitive(index) {
 }
 
 $('#smsSend').on('click', function () {
-    index = layer.open({
+    layer.open({
         type: 1,
         title: '短信发送',
-        area: ['600px', '400px'], //宽高
+        area: ['50%', '70%'], //宽高
+		btn: ['发送', '关闭'],
         content: $('#ly-sms'),
         success: function (layero, index) {
             $('#ly-sms').removeClass('layui-hide');
+			smsView.initPhones()
+			smsView.initPhoneInput()
+			
         },
         end: function () {
             $('#ly-sms').addClass('layui-hide');
             $('#ly-sms-phone').val('')
             $('#ly-sms-remark').val('')
+        },
+		btn1: function() {
+			let phones = []
+			// let arr = smsView.phoneSelect.getValue()
+			// for (let i = 0; i < arr.length; i++) {
+			// 	const p = arr[i].value.replace(/\s/g, "")
+			// 	if (!phones.includes(p)) {
+			// 		phones.push(p)
+			// 	}
+			// }
+			let arr2 = $(".tags .layui-btn")
+           
+			for (let i = 0; i < arr2.length; i++) {
+				const p = parseFloat($(arr2[i]).text().replace(/\s/g, ""))
+				if (!phones.includes(p)) {
+					phones.push(p)
+				}
+			}
+			if (!phones.length) {
+			    layer.msg("请输入手机号", {icon: 5});
+			    return false;
+			}
+			if (!$('#ly-sms-remark').val()) {
+			    layer.msg("请输入短信内容", {icon: 5});
+			    return false;
+			}
+			const indexss = layer.load(2)
+			smsView.sendMsg(phones, 0, indexss)
+		},
+        btn2:function () {
+            $('.tags').html('')
+        },
+        cancel: function(){
+            $('.tags').html('')
         }
     });
 });
@@ -1048,3 +1103,120 @@ function xg1(staffName ,leadName, leadPhone, staffPhone,id ) {
     });
 }
 
+const smsView = {
+	phoneSelect: null,
+	initPhones: function() {
+		const _this = this
+		$('#ly-sms-phones').empty()
+		$.ajax({
+		    url: PATH + '/websitesms/getShortMessage',
+			data: {
+				page: 1,
+				limit: 10
+			},
+		    type: 'get',
+		    success: function (json) {
+				if (json.data && json.data.length) {
+					let arr = []
+					for (let i = 0; i < json.data.length; i++) {
+						if (json.data[i].leaderphone) {
+							arr.push({
+								name: json.data[i].leaderphone + '(' + json.data[i].leaderperson+':'+json.data[i].deptname +  '分管领导' +  ')',
+								value: json.data[i].leaderphone,
+                                id:json.data[i].deptid+Math.random()
+							})
+						}
+						if (json.data[i].mainLeaderPhone) {
+							arr.push({
+								name: json.data[i].mainLeaderPhone + '(' +json.data[i].mainLeader+':'+ json.data[i].deptname  + '主要领导' + ')',
+								value: json.data[i].mainLeaderPhone,
+                                id:json.data[i].deptid+Math.random()
+							})
+						}
+						if (json.data[i].workphone) {
+							arr.push({
+								name: json.data[i].workphone + '(' + json.data[i].workperson+':'+json.data[i].deptname +  '工作人员'  + ')',
+								value: json.data[i].workphone,
+                                id:json.data[i].deptid+Math.random()
+							})
+						}
+					}
+					_this.phoneSelect = layui.xmSelect.render({
+						el: '#ly-sms-phones',
+						language: 'zn',
+						filterable: true,
+                        theme: {
+                            color: '#1E9FFF',
+                        },
+						data: arr,
+                        on:function(data){
+                            if(data.isAdd){
+                                var _html = '<div class="layui-btn layui-btn-normal {0} none-transition" id="{2}" ng-index="{3}" ng-color="{0}">{1}<i class="layui-icon layui-icon-close"></i></div>'
+                                    .format('', data.change[0].name,data.change[0].id, data.change[0].id);
+                                    $('.tags').append(_html);
+                                    let child=$('.tags').children()
+                                    for (let i = 0; i < child.length; i++) {
+                                        const item = child[i];
+                                        item.addEventListener('click',function(e){
+                                            if(e.target.tagName==='I'){
+                                                let arr1 = smsView.phoneSelect.getValue()
+                                                let index= arr1.findIndex(o=>{
+                                                return o.id===Number($(item).attr('id'))
+                                                })
+                                                if(index!=-1){
+                                                    arr1.splice(index,1)
+                                                    smsView.phoneSelect.setValue(arr1)
+                                                    $(item).remove()
+                                                }
+                                            }
+                                        })
+                                    }
+                            }else{
+                                let child=$('.tags').children()
+                                for (let i = 0; i < child.length; i++) {
+                                    const item = child[i];
+                                    if($(item).text()===data.change[0].name){
+                                       $(item).remove()
+                                    }
+                                }
+                            }
+                        }
+					})
+                   
+				}
+		        
+		    }
+		});
+	},
+
+
+	initPhoneInput: function() {
+		$('#ly-sms-phone').empty()
+		layui.labelGeneration.render({
+			elem:'#ly-sms-phone',
+			isEnter:true
+		})
+	},
+	sendMsg: function(arr, idx, indexss) {
+		
+		this.sendSms(arr, idx, indexss)
+	},
+	sendSms: function(arr, idx, indexss) {
+		if (idx >= arr.length) {
+			layer.close(indexss)
+			layer.msg('发送完成!')
+			return
+		}
+		const _this = this
+		post("/smsmessage/sendSms", true, {
+		    'phone': arr[idx],
+		    'content': $('#ly-sms-remark').val()
+		}, function (res) {
+			idx++;
+		    _this.sendMsg(arr, idx, indexss)
+		}, function (err) {
+			idx++;
+			 _this.sendMsg(arr, idx, indexss)
+		});
+	}
+}

+ 7 - 0
nngkxxdp/src/main/resources/static/page/layui/labelGeneration.css

@@ -0,0 +1,7 @@
+.none-transition{
+    transition: none;
+    -webkit-transition: none;
+}
+.layui-btn{
+	margin: 10px 0px 10px 10px;
+}

+ 342 - 0
nngkxxdp/src/main/resources/static/page/layui/labelGeneration.js

@@ -0,0 +1,342 @@
+layui.define(['form'], function (exports) {
+
+    var form = layui.form,
+        $ = layui.jquery,
+        index = 0,
+		oldId,
+    MOD_NAME = 'labelGeneration',
+        formField = {
+            label: {
+                id: '-1',
+                tag: "label",
+            },
+        },
+        labelGeneration = {
+            set: function (options) {
+                var that = this;
+                that.config = $.extend({}
+                    , that.config
+                    , options);
+                return that;
+            }
+            //事件监听
+            , on: function (events
+                , callback) {
+                return layui.onevent.call(this
+                    , MOD_NAME
+                    , events
+                    , callback);
+            }
+        },
+        Class = function (options) {
+            var that = this;
+            that.config = $.extend({}
+                , that.config
+                , labelGeneration.config
+                , options);
+            that.render();
+        },
+        thisIns = function () {
+            var that = this
+                , options = that.config;
+            return {
+                reload: function (options) {
+                    that.reload.call(that
+                        , options);
+                }, getOptions: function () {
+                    return options || null;
+                }, getData: function () {
+                    return options.data || null;
+                }
+            }
+        }
+
+    Class.prototype.config = {
+        version: "1.0.0"
+        , Author: "谁家没一个小强"
+        , generateId: 0
+        , data: []
+        , isEnter: false
+    };
+
+    /* 自动生成ID 当前页面自动排序*/
+    Class.prototype.autoId = function (tag) {
+        var that = this,
+            options = that.config;
+        options.generateId = options.generateId + 1;
+        return tag + '_' + options.generateId;
+    }
+
+    Class.prototype.components = {
+        label: {
+            render: function (json,options) {
+                // var _html = '<blockquote class="layui-elem-quote">';
+                var _html = ''
+                _html += '<div class="layui-form layui-form-pane layui-form-item" style="clear:none">';
+                // _html += '<label class="layui-form-label">输入手机号</label>';
+                _html += '<div class="layui-input-inline" >';
+				if (options.isEnter) {
+                _html += '<input type="text" id="{0}" lay-verify="required" placeholder="请输入手机号 按回车生成" autocomplete="off" class="layui-input">'
+                    .format(json.id);
+				} else {
+					_html += '<input type="text" id="{0}" lay-verify="required" placeholder="通过按钮生成标签" autocomplete="off" class="layui-input">'
+                    .format(json.id);
+				}
+                _html += '</div>';
+                if (!options.isEnter) {
+                    _html += '<button type="button" id="{0}-button" class="layui-btn layui-btn-normal">确定</button>'.format(json.id);
+                }
+                  _html += '<div class="layui-input-inline">';
+                  _html += '<div class=" generate" style="margin:0;line-height:38px;width:60px;text-align:center;    border-color: #1E9FFF;background-color: #1E9FFF;color: #fff;cursor:pointer">确定</div>';
+                  _html += '</div>';
+                // _html += '<label class="layui-form-label">颜色选择</label>';
+                // _html += '<div class="layui-input-inline">';
+                // _html += '<select lay-filter="{0}-switchTest">'.format(json.id);
+                // _html += '<option value="" selected>墨绿色</option>';
+                // _html += '<option value="layui-btn-primary">原始色</option>';
+                // _html += '<option value="layui-btn-normal">天蓝色</option>';
+                // _html += '<option value="layui-btn-warm">暖黄色</option>';
+                // _html += '<option value="layui-btn-danger">红色</option>';
+                // _html += '</select>';
+                // _html += '</div>';
+                _html += '</div>';
+                _html += '<div id="{0}-content"></div>'.format(json.id);
+                // _html += '</blockquote>';
+                return _html;
+            },
+            update: function (json) {
+
+            },
+            /* 获取对象 */
+            jsonData: function (id, that) {
+                //分配一个新的ID
+                var _json = JSON.parse(JSON.stringify(formField.label));
+                _json.id = id == undefined ? that.autoId(_json.tag) : id;
+				that.checkId(_json,that);
+                return _json;
+            }
+        }
+    };
+
+	/* 判定id是否重复*/
+    Class.prototype.checkId = function (json,that) {
+        if ($("#" + json.id + "-content").length != 0) {
+				json.id = that.autoId(json.tag);
+				that.checkId(json);
+		} else {
+			return;
+		}
+    }
+
+    // Class.prototype.bindGridSortEvent = function (json) {
+    //     var that = this
+    //         , options = that.config;
+    //     var formItemSort = Sortable.create(document.getElementById(json.id + "-content"), {
+    //         group: {
+    //             name: 'group' + json.id
+    //         },
+    //         animation: 1000,
+    //         onEnd: function (evt) {
+    //             var _values = $("#" + json.id + "-content").find("div");
+    //             var ops = [];
+    //             for (var i = 0; i < _values.length; i++) {
+    //                 ops.push({"ngColor": $(_values[i]).attr("ng-color"), "value": $(_values[i]).text()});
+    //             }
+    //             options.data = ops;
+    //         }
+    //     });
+    // }
+
+    /* 绑定事件*/
+    Class.prototype.deleteValue = function (value, ngValue) {
+        var that = this
+            , options = that.config;
+        for (var i = 0; i < options.data.length; i++) {
+            if (options.data[i].value === value && options.data[i].ngColor === ngValue) {
+                options.data.splice(i, 1);
+                break;
+            }
+        }
+    }
+
+    /* 绑定事件*/
+    Class.prototype.bindPropertyEvent = function (_json) {
+        var that = this
+            , options = that.config;
+        var colorClass = "";
+        if (options.isEnter) {
+            $("#" + _json.id).keypress(function (event) {
+                if (event.which === 13) {
+                    var _value = $(this).val();
+					if (!_value) {
+						layer.msg('请输入手机号!')
+						return;
+					}
+					if (!/^1[3456789]\d{9}$/.test(_value)) {
+						layer.msg('手机号格式错误!')
+						return;
+					}
+					let arr = $("#" + _json.id + "-content .layui-btn")
+					for (let i = 0; i < arr.length; i++) {
+						if ($(arr[i]).text().trim() == _value) {
+							layer.msg('输入手机号重复!')
+							return
+						}
+					}
+                    // let arr1 = smsView.phoneSelect.getValue()
+                    // arr1.push({
+                    //     children:undefined,
+                    //     name:_value,
+                    //     selected:false,
+                    //     value:_value
+                    // })
+                    // smsView.phoneSelect.setValue(arr1)
+                    index = index + 1;
+                    var _html = '<div class="layui-btn layui-btn-normal {0} none-transition" id="{2}"  ng-index="{3}" ng-color="{0}">{1}<i class="layui-icon layui-icon-close"></i></div>'
+                        .format(colorClass, _value, _json.id + index, index);
+                        $('.tags').append(_html);
+                    // $("#" + _json.id + "-content").append(_html);
+					 $("#" + _json.id).val('');
+                    options.data.push({"ngColor": colorClass, "value": _value});
+                    
+                    $("#" + _json.id + index + " .layui-icon-close").click(function () {
+                        // let arr1 = smsView.phoneSelect.getValue()
+                        // arr1.splice(arr1.findIndex(item=>{
+                        //     return item.value===$(this).parent().text()
+                        // }),1)
+                        // smsView.phoneSelect.setValue(arr1)
+                        that.deleteValue($(this).parent().text(), $(this).parent().attr("ng-color"));
+                        $(this).parent().remove();
+                    });
+                }
+            });
+            $('.generate').click(function(){
+                var _value = $("#" + _json.id).val();
+					if (!_value) {
+						layer.msg('请输入手机号!')
+						return;
+					}
+					if (!/^1[3456789]\d{9}$/.test(_value)) {
+						layer.msg('手机号格式错误!')
+						return;
+					}
+					let arr = $("#" + _json.id + "-content .layui-btn")
+					for (let i = 0; i < arr.length; i++) {
+						if ($(arr[i]).text().trim() == _value) {
+							layer.msg('输入手机号重复!')
+							return
+						}
+					}
+                    index = index + 1;
+                    var _html = '<div class="layui-btn layui-btn-normal {0} none-transition" id="{2}" ng-index="{3}" ng-color="{0}">{1}<i class="layui-icon layui-icon-close"></i></div>'
+                        .format(colorClass, _value, _json.id + index, index);
+                        $('.tags').append(_html);
+                    // $("#" + _json.id + "-content").append(_html);
+					 $("#" + _json.id).val('');
+                    options.data.push({"ngColor": colorClass, "value": _value});
+                    
+                    $("#" + _json.id + index + " .layui-icon-close").click(function () {
+                        // let arr1 = smsView.phoneSelect.getValue()
+                        // arr1.splice(arr1.findIndex(item=>{
+                        //     return item.value===$(this).parent().text()
+                        // }),1)
+                        // smsView.phoneSelect.setValue(arr1)
+                        that.deleteValue($(this).parent().text(), $(this).parent().attr("ng-color"));
+                        $(this).parent().remove();
+                    });
+            })
+        } else {
+            $("#" + _json.id + "-button").click(function (event) {
+                var _value = $("#" + _json.id).val();
+                index = index + 1;
+                var _html = '<div class="layui-btn {0} none-transition" id="{2}" ng-index="{3}" ng-color="{0}">{1}<i class="layui-icon layui-icon-close"></i></div>'
+                    .format(colorClass, _value, _json.id + index, index);
+                $("#" + _json.id + "-content").append(_html);
+                options.data.push({"ngColor": colorClass, "value": _value});
+                $("#" + _json.id + index + " .layui-icon-close").click(function () {
+                    that.deleteValue($(this).parent().text(), $(this).parent().attr("ng-color"));
+                    $(this).parent().remove();
+                });
+            });
+        }
+
+        form.on('select(' + _json.id + '-switchTest)', function (data) {
+            colorClass = data.value;
+        });
+        for (var i = 0; i < options.data.length; i++) {
+            index = index + 1;
+            // var _html = '<div class="layui-btn {0} none-transition" id="{2}" ng-index="{3}" ng-color="{0}">{1}<i class="layui-icon layui-icon-close"></i></div>'
+            //     .format(options.data[i].ngColor, options.data[i].value, _json.id + index, index);
+            // $("#" + _json.id + "-content").append(_html);
+            $("#" + _json.id + index + " .layui-icon-close").click(function () {
+                that.deleteValue($(this).parent().text(), $(this).parent().attr("ng-color"));
+                $(this).parent().remove();
+            });
+        }
+    }
+
+    /* 渲染组件 */
+    Class.prototype.renderComponents = function () {
+        var that = this
+            , options = that.config;
+        var elem = $(options.elem);
+        elem.empty();
+        var jsonData = that.components['label'].jsonData(undefined, that);
+        elem.append(that.components['label'].render(jsonData,options));
+        that.bindPropertyEvent(jsonData);
+        // that.bindGridSortEvent(jsonData);
+        form.render();
+    }
+
+    Class.prototype.reload = function (options) {
+        var that = this;
+        options = options || {};//如果是空的话,就赋值 {}
+        that.config = $.extend({}
+            , that.config
+            , labelGeneration.config
+            , options);
+        that.render();
+    }
+
+    //核心入口 初始化一个 regionSelect 类
+    labelGeneration.render = function (options) {
+        var ins = new Class(options);
+        return thisIns.call(ins);
+    }
+    /**
+     * 渲染组件
+     */
+    Class.prototype.render = function (options) {
+        var that = this
+            , options = that.config;
+        that.renderComponents();
+    }
+
+    String.prototype.format = function (args) {
+        var result = this;
+        if (arguments.length > 0) {
+            if (arguments.length == 1 && typeof (args) == "object") {
+                for (var key in args) {
+                    if (args[key] != undefined) {
+                        var reg = new RegExp("({" + key + "})"
+                            , "g");
+                        result = result.replace(reg
+                            , args[key]);
+                    }
+                }
+            } else {
+                for (var i = 0; i < arguments.length; i++) {
+                    if (arguments[i] != undefined) {
+                        var reg = new RegExp("({[" + i + "]})"
+                            , "g");
+                        result = result.replace(reg
+                            , arguments[i]);
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
+    exports(MOD_NAME, labelGeneration);
+});

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 7 - 0
nngkxxdp/src/main/resources/static/page/layui/xm-select.js


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů