Add.cshtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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>上传配置项(增加)</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-block">
  31. <input class="layui-input" type="text" id="TableName" name="TableName"
  32. maxlength="50" lay-verify="" autocomplete="off" placeholder="请输入表名">
  33. </div>
  34. </div>
  35. <div class="layui-form-item">
  36. <label class="layui-form-label">表英文名</label>
  37. <div class="layui-input-block">
  38. <input class="layui-input" type="text" id="TableEnName" name="TableEnName"
  39. maxlength="50" lay-verify="" autocomplete="off" placeholder="请输入表英文名">
  40. </div>
  41. </div>
  42. <div class="layui-form-item">
  43. <label class="layui-form-label">字段名</label>
  44. <div class="layui-input-block">
  45. <input class="layui-input" type="text" id="ColumnName" name="ColumnName"
  46. maxlength="50" lay-verify="" autocomplete="off" placeholder="请输入字段名">
  47. </div>
  48. </div>
  49. <div class="layui-form-item">
  50. <label class="layui-form-label">字段英文名</label>
  51. <div class="layui-input-block">
  52. <input class="layui-input" type="text" id="ColumnEnName" name="ColumnEnName"
  53. maxlength="50" lay-verify="" autocomplete="off" placeholder="请输入字段英文明">
  54. </div>
  55. </div>
  56. <div class="layui-form-item">
  57. <label class="layui-form-label">参数</label>
  58. <div class="layui-input-block">
  59. <input class="layui-input" type="text" id="ParamString" name="ParamString"
  60. maxlength="200" lay-verify="" autocomplete="off" placeholder="请输入参数">
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="layui-form-item layui-hide">
  67. <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit"
  68. value="确认">
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <script src="/layuiadmin/layui/layui.js"></script>
  74. <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js"></script>
  75. <script src="/other/mybjq/kindeditor-min.js"></script>
  76. <script src="/other/mybjq/lang/zh_CN.js"></script>
  77. <script>
  78. //编辑器
  79. KindEditor.ready(function (K) {
  80. });
  81. var ids = "";
  82. function getChildren(obj) {
  83. $.each(obj, function (index, value) {
  84. var id = obj[index].id;
  85. ids += id + ",";
  86. var children = obj[index].children;
  87. if (children) {
  88. getChildren(children);
  89. }
  90. });
  91. }
  92. function AreasProvinceInit(tagId, areasVal, form) {
  93. for (var i = 0; i < provs_data.length; i++) {
  94. var sel = "";
  95. if (areasVal.indexOf(provs_data[i].text) > -1) {
  96. sel = " selected=selected";
  97. }
  98. $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' +
  99. provs_data[i].text + '</option>');
  100. }
  101. form.render();
  102. }
  103. function AreasProvinceSelected(tagId, areasVal, form, value) {
  104. $("#" + tagId + "City").html('<option value="">市</option>');
  105. var list = citys_data[value];
  106. for (var i = 0; i < list.length; i++) {
  107. var sel = "";
  108. if (areasVal.indexOf(list[i].text) > -1) {
  109. sel = " selected=selected";
  110. }
  111. $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text +
  112. '</option>');
  113. }
  114. $("#" + tagId + "Area").html('<option value="">县/区</option>');
  115. form.render();
  116. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId +
  117. "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  118. }
  119. function AreasCitySelected(tagId, areasVal, form, value) {
  120. $("#" + tagId + "Area").html('<option value="">县/区</option>');
  121. var list = dists_data[value];
  122. for (var i = 0; i < list.length; i++) {
  123. var sel = "";
  124. if (areasVal.indexOf(list[i].text) > -1) {
  125. sel = " selected=selected";
  126. }
  127. $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text +
  128. '</option>');
  129. }
  130. form.render();
  131. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId +
  132. "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  133. }
  134. function AreasAreaSelected(tagId, form) {
  135. form.render();
  136. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId +
  137. "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  138. }
  139. function movePrev(obj, tagId) {
  140. $(obj).parent().prev().insertAfter($(obj).parent());
  141. checkPics(tagId);
  142. }
  143. function moveNext(obj, tagId) {
  144. $(obj).parent().next().insertBefore($(obj).parent());
  145. checkPics(tagId);
  146. }
  147. function deletePic(obj, tagId) {
  148. $(obj).parent().remove();
  149. checkPics(tagId);
  150. }
  151. function checkPics(tagId) {
  152. var pics = "";
  153. var texts = "";
  154. $("#" + tagId + "Image div img").each(function (i) {
  155. pics += $(this).attr("src").replace(osshost, '') + "|";
  156. });
  157. $("#" + tagId + "Image div input").each(function (i) {
  158. texts += $(this).val() + "|";
  159. });
  160. if (pics == "") {
  161. $("#" + tagId).val("");
  162. } else {
  163. pics = pics.substring(0, pics.length - 1);
  164. texts = texts.substring(0, pics.length - 1);
  165. $("#" + tagId).val(pics + "#cut#" + texts);
  166. }
  167. }
  168. function checkBox(tagId) {
  169. var text = "";
  170. $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
  171. text += $(this).val() + ",";
  172. });
  173. $("#" + tagId).val(text);
  174. }
  175. function showBigPic(picpath) {
  176. parent.layer.open({
  177. type: 1,
  178. title: false,
  179. closeBtn: 0,
  180. shadeClose: true,
  181. area: ['auto', 'auto'],
  182. content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
  183. });
  184. }
  185. var tree;
  186. var element;
  187. layui.config({
  188. base: '/layuiadmin/' //静态资源所在路径
  189. }).extend({
  190. index: 'lib/index' //主入口模块
  191. }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'],
  192. function () {
  193. var $ = layui.$,
  194. form = layui.form,
  195. layer = layui.layer,
  196. layedit = layui.layedit,
  197. laydate = layui.laydate,
  198. croppers = layui.croppers,
  199. upload = layui.upload,
  200. transfer = layui.transfer,
  201. util = layui.util;
  202. tree = layui.tree;
  203. element = layui.element;
  204. //Hash地址的定位
  205. var layid = location.hash.replace(/^#test=/, '');
  206. element.tabChange('test', layid);
  207. element.on('tab(test)', function (elem) {
  208. location.hash = 'test=' + $(this).attr('lay-id');
  209. });
  210. //日期
  211. //上传文件
  212. //穿梭框
  213. //TreeView,比如权限管理
  214. //省市区
  215. })
  216. </script>
  217. </body>
  218. </html>