From f2ee6178a39c0b713ff6c5d30f13d4a223ae5a94 Mon Sep 17 00:00:00 2001 From: 侯瑞军 <411269194@kidgrow.com> Date: Wed, 13 May 2020 17:19:37 +0800 Subject: [PATCH] 1.给common.js增加通用功能按钮按权限隐藏函数 2.修改医生模版,公司管理静态页面,支持按权限显示隐藏功能按钮。 --- kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/doctor.html | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/doctor.html b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/doctor.html index 78f2921..3af7eb2 100644 --- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/doctor.html +++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/doctor.html @@ -16,11 +16,10 @@ <option value="false">试用</option> </select> <select id="hospitalName-seach" placeholder="选择一个应用" lay-filter="role_clients"> - <option value="">-请选择医院-</option> </select> - <input id="doctorTel" class="layui-input search-input" type="text" placeholder="按手机号..." />  + <input id="doctorTel" class="layui-input search-input" type="text" placeholder="按手机号..." />  <input id="doctorName" class="layui-input search-input" type="text" placeholder="按医生..." />  - <button id="app-btn-search" class="layui-btn icon-btn" value="sysdoctor-list"><i + <button id="app-btn-search" class="layui-btn icon-btn" layt="abc" value="sysdoctor-list"><i class="layui-icon"></i>搜索</button> </div> @@ -43,7 +42,7 @@ <script type="text/html" id="doctor-tpl-state"> <input type="checkbox" lay-filter="doctor-tpl-state" value="{{d.id}}" lay-skin="switch" lay-text="正常|已停用" {{d.enabled==true?'checked':''}}/> - <input class="radioChecked" type="hidden" value="sysdoctor-enable" /> + <input class="radioCheckedsop" type="hidden" value="sysdoctor-enable" /> </script> <!-- 表单弹窗 --> <script type="text/html" id="app-model"> @@ -350,11 +349,13 @@ var user = ""; //职称 var doctorRank = ""; - var test = $(".layui-btn"); - + debugger//layui-btn icon-btn + var test = $(".layui-btn.icon-btn"); + // var nk=test.length; var permissions = admin.getTempData("permissions"); test.each(function () { var item = $(this) + debugger if (permissions.indexOf(item.val()) != -1) { item.show(); } else { @@ -466,26 +467,26 @@ cols: [[ { type: 'numbers' }, { field: 'hospitalName', width: 180, title: '医院名称' }, - { field: 'doctorName', width: 200, title: '医生姓名' }, + { field: 'doctorName', width: 120, title: '医生姓名' }, { field: 'doctorRank', width: 180, title: '职称' }, - { field: 'username', width: 300, title: '登录帐号' }, - { field: 'doctorTel', width: 300, title: '联系方式' }, + { field: 'username', width: 150, title: '登录帐号' }, + { field: 'doctorTel', width: 150, title: '联系方式' }, + // { + // field: 'doctorState', width: 300, title: '状态', templet: function (d) { + // return d.doctorState ? "正式" : "试用" + // } + // }, { - field: 'doctorState', width: 300, title: '状态', templet: function (d) { - return d.doctorState ? "正式" : "试用" - } - }, - { - field: 'isAnswer', width: 300, title: '医答', templet: function (d) { + field: 'isAnswer', width: 100, title: '医答', templet: function (d) { return d.isAnswer ? "是" : "否" } }, { - field: 'isSigning', width: 300, title: '签约', templet: function (d) { + field: 'isSigning', width: 100, title: '签约', templet: function (d) { return d.isSigning ? "是" : "否" } }, - { field: 'enabled', width: 250, align: 'center', templet: '#doctor-tpl-state', title: '状态' }, + { field: 'enabled', width: 150, align: 'center', templet: '#doctor-tpl-state', title: '状态' }, { field: 'createTime', width: 250, title: '时间', templet: "<div>{{layui.util.toDateString(d.createTime, 'yyyy年MM月dd日 HH:mm:ss')}}</div>" }, { field: 'serverUserName', width: 100, title: '销售代表' }, { width: 200, width: 300, align: 'center', toolbar: '#doctor-table-bar', title: '操作' }, @@ -501,12 +502,12 @@ } }) //layui-unselect layui-form-switch layui-form-onswitch <input class="radioChecked" value="sysdoctor-enable" /> - $(".radioChecked").each(function () { + $(".radioCheckedsop").each(function () { var item = $(this) if (permissions.indexOf(item.val()) != -1) { - $(".layui-unselect").show(); + $(".layui-unselect.layui-form-switch.layui-form-onswitch").show(); } else { - $(".layui-unselect").hide(); + $(".layui-unselect.layui-form-switch.layui-form-onswitch").hide(); } }) } -- Gitblit v1.8.0