From 73674d9c8c87314ef467e8ded14f56b4caa113af Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期二, 08 十一月 2022 09:58:27 +0800 Subject: [PATCH] # --- src/main/webapp/views/cstmr/cstmr_more.html | 53 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/main/webapp/views/cstmr/cstmr_more.html b/src/main/webapp/views/cstmr/cstmr_more.html index 029c493..08c2e05 100644 --- a/src/main/webapp/views/cstmr/cstmr_more.html +++ b/src/main/webapp/views/cstmr/cstmr_more.html @@ -183,7 +183,7 @@ <div class="layui-card"> <div class="layui-card-header"> <span>璺熻繘浜�</span> - <span class="follower-add" style="float: right;cursor: pointer;"> + <span id="follower-add" style="float: right;cursor: pointer;"> <i class="layui-icon" style="font-size: 20px;color: #1890ff;"></i> </span> </div> @@ -203,18 +203,18 @@ </form> <!-- 璺熻繘浜� --> <script type="text/html" id="followerEditDialog"> - <form id="matEditForm" lay-filter="matEditForm" class="layui-form model-form"> + <form id="followerEditForm" lay-filter="followerEditForm" class="layui-form model-form"> <input name="experimentId" type="hidden"/> - <div class="layui-form-item" style=""> + <div class="layui-form-item" style="float: left;clear: none;margin-right: 20px"> <label class="layui-form-label">閫夋嫨鎴愬憳</label> <div class="layui-input-block"> - <div id="mat" name="mat"> + <div id="followersBox" name="followersBox"> </div> </div> </div> - <div class="layui-form-item text-right" style=""> + <div class="layui-form-item text-right" style="float: left;clear: none"> <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button> - <button class="layui-btn" lay-filter="matEditSubmit" lay-submit>淇濆瓨</button> + <button class="layui-btn" lay-filter="followerSubmit" lay-submit>淇濆瓨</button> </div> </form> </script> @@ -309,25 +309,50 @@ {field: 'name', title: '宸ヤ綔浜哄憳'} ]], done: function (res, curr, count) { - console.log(res) $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); } }); } // 娣诲姞璺熻繘浜� - $(document).on('click', ".follower-add", function () { - admin.open({ + var followerLayer; + $(document).on('click', "#follower-add", function () { + if (followerLayer) {return;} + followerLayer = admin.open({ type: 1, offset: '150px', - area: '400px', + area: '600px', title: '娣诲姞璺熻繘浜�', content: $('#followerEditDialog').html(), success: function (layero, dIndex) { - // let selectList = matXmSelect.getValue(); - // 娓叉煋鐗╂枡閫夋嫨 - var xmSelectIdx = xmSelect.render({ - el: '#mat', + // 琛ㄥ崟鎻愪氦浜嬩欢 + form.on('submit(followerSubmit)', function (data) { + let selectList = xmSelectIdx.getValue(); + for (let i = 0; i<selectList.length; i++) { + let item = selectList[i]; + // 鏌ヨ鐗╂枡璇︽儏 + // $.ajax({ + // url: baseUrl+"/mat/covert/"+item.value+"/auth", + // headers: {'token': localStorage.getItem('token')}, + // method: 'GET', + // async: false, + // success: function (res) { + // if (res.code === 200){ + // xxDataList.push(res.data); + // insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); + // } else if (res.code === 403){ + // top.location.href = baseUrl+"/"; + // }else { + // layer.msg(res.msg, {icon: 2}) + // } + // } + // }) + } + layer.close(dIndex); + return false; + }); + let xmSelectIdx = xmSelect.render({ + el: '#followersBox', style: { width: '280px', }, -- Gitblit v1.9.1