Add.cshtml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. @{
  2. string RightInfo = ViewBag.RightInfo as string;
  3. string right = ViewBag.right as string;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta charset="utf-8">
  9. <title>App底部导航(增加)</title>
  10. <meta name="renderer" content="webkit">
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  12. <meta name="viewport"
  13. content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  14. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  15. <script src="/admin/js/jquery-1.10.1.min.js"></script>
  16. <script src="/admin/js/LAreaData2.js"></script>
  17. </head>
  18. <body>
  19. <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
  20. <div class="layui-card">
  21. <div class="layui-card-body">
  22. <div class="layui-tab" lay-filter="mytabbar">
  23. <ul class="layui-tab-title">
  24. <li class="layui-this" lay-id="1">基本资料</li>
  25. </ul>
  26. <div class="layui-tab-content mt20">
  27. <div class="layui-tab-item layui-show">
  28. <div class="layui-form-item">
  29. <label class="layui-form-label">角色分类</label>
  30. <div class="layui-input-inline">
  31. <select id="SeoKeyword" name="SeoKeyword" lay-search="">
  32. <option value="">请选择</option>
  33. <option value="consumer">消费者</option>
  34. <option value="cyb">创客</option>
  35. </select>
  36. </div>
  37. </div>
  38. <div class="layui-form-item">
  39. <label class="layui-form-label">标题</label>
  40. <div class="layui-input-block">
  41. <input class="layui-input" type="text" id="Title" name="Title" maxlength="10"
  42. lay-verify="required," autocomplete="off" placeholder="请输入标题">
  43. </div>
  44. </div>
  45. <div class="layui-form-item">
  46. <label class="layui-form-label">选中图标</label>
  47. <div class="layui-input-block">
  48. <div class="layui-upload">
  49. <input type="hidden" id="SelectIcon" name="SelectIcon" value="">
  50. <button class="layui-btn" type="button" id="SelectIconBtn">选择图片</button>
  51. <div class="layui-inline layui-word-aux">图片尺寸88x88,建议大小限制为20K以内</div>
  52. </div>
  53. <div style="margin-top:10px;" id="SelectIconImage">
  54. </div>
  55. </div>
  56. </div>
  57. <div class="layui-form-item">
  58. <label class="layui-form-label">未选中图标</label>
  59. <div class="layui-input-block">
  60. <div class="layui-upload">
  61. <input type="hidden" id="NormalIcon" name="NormalIcon" value="">
  62. <button class="layui-btn" type="button" id="NormalIconBtn">选择图片</button>
  63. <div class="layui-inline layui-word-aux">图片尺寸88x88,建议大小限制为20K以内</div>
  64. </div>
  65. <div style="margin-top:10px;" id="NormalIconImage">
  66. </div>
  67. </div>
  68. </div>
  69. <div class="layui-form-item">
  70. <label class="layui-form-label">选中文字颜色</label>
  71. <div class="layui-input-block">
  72. <input class="layui-input" type="text" id="SelectTextColor" name="SelectTextColor"
  73. maxlength="6" lay-verify="" autocomplete="off" placeholder="请输入选中文字颜色">
  74. </div>
  75. </div>
  76. <div class="layui-form-item">
  77. <label class="layui-form-label">未选中文字颜色</label>
  78. <div class="layui-input-block">
  79. <input class="layui-input" type="text" id="NormalTextColor" name="NormalTextColor"
  80. maxlength="6" lay-verify="" autocomplete="off" placeholder="请输入未选中文字颜色">
  81. </div>
  82. </div>
  83. <div class="layui-form-item">
  84. <label class="layui-form-label">关联页面文件</label>
  85. <div class="layui-input-block">
  86. <input class="layui-input" type="text" id="PageName" name="PageName" maxlength="50"
  87. lay-verify="" autocomplete="off" placeholder="请输入关联页面文件">
  88. </div>
  89. </div>
  90. <div class="layui-form-item">
  91. <label class="layui-form-label">空页面提示信息</label>
  92. <div class="layui-input-block">
  93. <input class="layui-input" type="text" id="NoPageHint" name="NoPageHint"
  94. maxlength="50" lay-verify="" autocomplete="off" placeholder="请输入为关联页面提示信息">
  95. </div>
  96. </div>
  97. <div class="layui-form-item">
  98. <label class="layui-form-label">背景色</label>
  99. <div class="layui-input-block">
  100. <input class="layui-input" type="text" id="BgColor" name="BgColor" maxlength="6"
  101. lay-verify="" autocomplete="off" placeholder="请输入背景色">
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="layui-form-item layui-hide">
  108. <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit"
  109. value="确认">
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <script src="/layuiadmin/layui/layui.js"></script>
  115. <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js"></script>
  116. <script src="/other/mybjq/kindeditor-min.js"></script>
  117. <script src="/other/mybjq/lang/zh_CN.js"></script>
  118. <script>
  119. //编辑器
  120. KindEditor.ready(function (K) {
  121. });
  122. var ids = "";
  123. function getChildren(obj) {
  124. $.each(obj, function (index, value) {
  125. var id = obj[index].id;
  126. ids += id + ",";
  127. var children = obj[index].children;
  128. if (children) {
  129. getChildren(children);
  130. }
  131. });
  132. }
  133. function AreasProvinceInit(tagId, areasVal, form) {
  134. for (var i = 0; i < provs_data.length; i++) {
  135. var sel = "";
  136. if (areasVal.indexOf(provs_data[i].text) > -1) {
  137. sel = " selected=selected";
  138. }
  139. $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' +
  140. provs_data[i].text + '</option>');
  141. }
  142. form.render();
  143. }
  144. function AreasProvinceSelected(tagId, areasVal, form, value) {
  145. $("#" + tagId + "City").html('<option value="">市</option>');
  146. var list = citys_data[value];
  147. for (var i = 0; i < list.length; i++) {
  148. var sel = "";
  149. if (areasVal.indexOf(list[i].text) > -1) {
  150. sel = " selected=selected";
  151. }
  152. $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text +
  153. '</option>');
  154. }
  155. $("#" + tagId + "Area").html('<option value="">县/区</option>');
  156. form.render();
  157. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId +
  158. "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  159. }
  160. function AreasCitySelected(tagId, areasVal, form, value) {
  161. $("#" + tagId + "Area").html('<option value="">县/区</option>');
  162. var list = dists_data[value];
  163. for (var i = 0; i < list.length; i++) {
  164. var sel = "";
  165. if (areasVal.indexOf(list[i].text) > -1) {
  166. sel = " selected=selected";
  167. }
  168. $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text +
  169. '</option>');
  170. }
  171. form.render();
  172. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId +
  173. "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  174. }
  175. function AreasAreaSelected(tagId, form) {
  176. form.render();
  177. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId +
  178. "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  179. }
  180. function movePrev(obj, tagId) {
  181. $(obj).parent().prev().insertAfter($(obj).parent());
  182. checkPics(tagId);
  183. }
  184. function moveNext(obj, tagId) {
  185. $(obj).parent().next().insertBefore($(obj).parent());
  186. checkPics(tagId);
  187. }
  188. function deletePic(obj, tagId) {
  189. $(obj).parent().remove();
  190. checkPics(tagId);
  191. }
  192. function checkPics(tagId) {
  193. var pics = "";
  194. var texts = "";
  195. $("#" + tagId + "Image div img").each(function (i) {
  196. pics += $(this).attr("src").replace(osshost, '') + "|";
  197. });
  198. $("#" + tagId + "Image div input").each(function (i) {
  199. texts += $(this).val() + "|";
  200. });
  201. if (pics == "") {
  202. $("#" + tagId).val("");
  203. } else {
  204. pics = pics.substring(0, pics.length - 1);
  205. texts = texts.substring(0, pics.length - 1);
  206. $("#" + tagId).val(pics + "#cut#" + texts);
  207. }
  208. }
  209. function checkBox(tagId) {
  210. var text = "";
  211. $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
  212. text += $(this).val() + ",";
  213. });
  214. $("#" + tagId).val(text);
  215. }
  216. function showBigPic(picpath) {
  217. parent.layer.open({
  218. type: 1,
  219. title: false,
  220. closeBtn: 0,
  221. shadeClose: true,
  222. area: ['auto', 'auto'],
  223. content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
  224. });
  225. }
  226. var tree;
  227. var element;
  228. var upload;
  229. layui.config({
  230. base: '/layuiadmin/' //静态资源所在路径
  231. }).extend({
  232. index: 'lib/index' //主入口模块
  233. }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'],
  234. function () {
  235. var $ = layui.$,
  236. form = layui.form,
  237. layer = layui.layer,
  238. layedit = layui.layedit,
  239. laydate = layui.laydate,
  240. croppers = layui.croppers,
  241. transfer = layui.transfer,
  242. util = layui.util;
  243. tree = layui.tree;
  244. element = layui.element;
  245. upload = layui.upload;
  246. //Hash地址的定位
  247. var layid = location.hash.replace(/^#test=/, '');
  248. element.tabChange('test', layid);
  249. element.on('tab(test)', function (elem) {
  250. location.hash = 'test=' + $(this).attr('lay-id');
  251. });
  252. //日期
  253. //上传文件
  254. upload.render({
  255. elem: '#SelectIconBtn',
  256. url: '/Admin/AppBottomNavs/UploadPhoto',
  257. multiple: false,
  258. done: function (res) {
  259. $('#SelectIconImage').html('<img src="' + res.data + '" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic(' + res.data + ')">')
  260. $('#SelectIcon').val(res.data);
  261. }
  262. });
  263. upload.render({
  264. elem: '#NormalIconBtn',
  265. url: '/Admin/AppBottomNavs/UploadPhoto',
  266. multiple: false,
  267. done: function (res) {
  268. $('#NormalIconImage').html('<img src="' + res.data + '" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic(' + res.data + ')">')
  269. $('#NormalIcon').val(res.data);
  270. }
  271. });
  272. //穿梭框
  273. //TreeView,比如权限管理
  274. //省市区
  275. })
  276. </script>
  277. </body>
  278. </html>