12345市长热线标准版-前端

voiceTongZhiMuBan.html 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <link rel="stylesheet" href="../css/layer/need/layer.css" />
  8. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  9. <link rel="stylesheet" href="../css/init.css" />
  10. <title>知识库审核</title>
  11. <style>
  12. .toolBar {
  13. padding: 15px 0;
  14. border-bottom: 1px solid #ccc;
  15. }
  16. .boxCon table th {
  17. width: 20%;
  18. }
  19. .boxCon table td textarea {
  20. width: 100%;
  21. }
  22. .inpBox {
  23. border: 1px solid #a9a9a9;
  24. height: 27px;
  25. width: 55%;
  26. display: inline-block;
  27. position: relative;
  28. vertical-align: middle;
  29. }
  30. .inps1,
  31. .inps4 {
  32. width: 100%;
  33. height: 24px;
  34. outline: none;
  35. border: 0;
  36. border-image-width: 0;
  37. padding: 0;
  38. padding-left: 3px;
  39. }
  40. .changeTitle, .changeKey, .addTitle, .addKey {
  41. width: 55%;
  42. }
  43. .xl {
  44. display: inline-block;
  45. background: url(../img/dropDown.png) no-repeat;
  46. height: 100%;
  47. background-position: center center;
  48. width: 20px;
  49. position: absolute;
  50. right: 0;
  51. top: 0px;
  52. background-color: #f7bc8b;
  53. cursor: pointer;
  54. }
  55. .xl:hover {
  56. background-color: #e6d523;
  57. }
  58. .addTree {
  59. background: #fff;
  60. position: absolute;
  61. width: 100%;
  62. border: 1px solid darkgrey;
  63. right: 0;
  64. top: 26px;
  65. display: none;
  66. height: 220px;
  67. overflow-y: auto;
  68. }
  69. .treeTable {
  70. height: 400px;
  71. /*overflow-y: auto;*/
  72. }
  73. .tree {
  74. height: 100%;
  75. }
  76. .trTitle {
  77. width: 100%;
  78. height: 34px;
  79. line-height: 34px;
  80. border-bottom: 1px solid #ebebeb;
  81. color: red;
  82. font-weight: 700;
  83. margin-bottom: 15px;
  84. }
  85. .treeCon {
  86. border: 1px solid #ebebeb;
  87. overflow-y: auto;
  88. }
  89. .ztree li {
  90. width: 100%;
  91. overflow: hidden;
  92. white-space: nowrap;
  93. text-overflow: ellipsis;
  94. }
  95. .content {
  96. width: 270px;
  97. height: 25px;
  98. overflow: hidden;
  99. white-space: nowrap;
  100. text-overflow: ellipsis;
  101. text-align: left;
  102. }
  103. </style>
  104. </head>
  105. <body>
  106. <div class="container-fluid">
  107. <div class="daoHang clearfix">
  108. <div class="dhLeft">
  109. <sapn><i class="syIcon"></i>位置:<a id="ReIndex">首页</a>&gt;<a href="javaScript:;">语音通知</a>&gt;<a href="" class="nowPosition">语音通知模板</a></sapn>
  110. </div>
  111. <div class="dhRight"><i class="fa fa-refresh"></i></div>
  112. </div>
  113. <div class="toolBar clearfix">
  114. <div class="toolRight">
  115. <span>所属类别:<select name="" id="" class="select_">
  116. <option value="1">类别1</option>
  117. <option value="2">类别2</option>
  118. <option value="3">类别3</option>
  119. </select></span>
  120. <span>关键字:<input type="text" style="height: 31px;" /></span>
  121. <button class="btns searchGo">搜索</button>
  122. <button class="btns " onclick="add()">添加</button>
  123. </div>
  124. </div>
  125. <div class="treeTable clearfix">
  126. <div class="tableCon col-md-12">
  127. <table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  128. <thead>
  129. <tr>
  130. <th data-field="state" data-checkbox="true" data-align="center"></th>
  131. <th data-field="CategoryName" data-align="left">标题</th>
  132. <th data-field="F_Title" data-align="left" data-formatter="oper">内容</th>
  133. <th data-field="F_KeyWords" data-align="center">所属类别</th>
  134. <th data-field="F_KeyWords" data-align="center">最新更新时间</th>
  135. <th data-align="center" data-formatter="caoZuo">操作</th>
  136. </tr>
  137. </thead>
  138. <tbody id="tbody"></tbody>
  139. </table>
  140. <p style="margin-top:15px ;">
  141. <button class="btns" onclick="check(1,2)">删除所选</button>
  142. </p>
  143. </div>
  144. </div>
  145. </div>
  146. <script src="../css/layer/layer.js"></script>
  147. <script src="../js/zTree/jquery.ztree.core.js"></script>
  148. <script src="../js/kindeditor/kindeditor-all-min.js"></script>
  149. <script src="../js/kindeditor/lang/zh-CN.js"></script>
  150. <script>
  151. //返回首页
  152. $('#ReIndex').click(function(){
  153. top.home_index();
  154. })
  155. var token = $.cookie("token");
  156. var table=$('#table1');
  157. initTable(token);
  158. function initTable(token) {
  159. //先销毁表格
  160. table.bootstrapTable('destroy');
  161. //初始化表格,动态从服务器加载数据
  162. table.bootstrapTable({
  163. method: "get", //使用get请求到服务器获取数据
  164. url: huayi.config.callcenter_url+"Knowledge/GetList", //获取数据的Servlet地址
  165. contentType: "application/x-www-form-urlencoded",striped: true, //表格显示条纹
  166. pagination: true, //启动分页
  167. pageSize:10, //每页显示的记录数
  168. pageNumber: 1, //当前第几页
  169. pageList: [10, 20, 50, 100], //记录数可选列表
  170. search: false, //是否启用查询
  171. showColumns: false, //显示下拉框勾选要显示的列
  172. showRefresh: false, //显示刷新按钮
  173. sidePagination: "server", //表示服务端请求
  174. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  175. //设置为limit可以获取limit, offset, search, sort, order
  176. queryParamsType: "undefined",
  177. queryParams: function queryParams(params) { //设置查询参数
  178. var param = {
  179. page: params.pageNumber,
  180. pagesize: params.pageSize,
  181. token: token
  182. };
  183. return param;
  184. },
  185. onLoadSuccess: function() { //加载成功时执行
  186. //layer.msg("加载成功");
  187. },
  188. onLoadError: function() { //加载失败时执行
  189. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  190. }
  191. });
  192. }
  193. function oper(str) {
  194. if (str) {
  195. var con = helper.filter.Transcoding(str);
  196. return con = con.substr(0, 10) + "...";
  197. }
  198. else {
  199. return '';
  200. }
  201. }
  202. function caoZuo(val,row){
  203. return '<div><a title="编辑" onclick="XG(' + row.F_RepositoryId + ')"><i class="fa fa-edit"></i>编辑</a> </div>'
  204. }
  205. function check(state,id){
  206. var changes = $.map($('#table1').bootstrapTable('getSelections'), function (row) {
  207. return row.F_RepositoryId;
  208. });
  209. if (changes.length <= 0) {
  210. layer.confirm('请选择一项删除!', {
  211. btn: ['确定']
  212. });
  213. return;
  214. } else {
  215. del(state,id)
  216. }
  217. }
  218. function del(state,id) {
  219. var laye = layer.confirm('您确定要删除吗?', {
  220. btn: ['确定', '取消'] //可以无限个按钮
  221. }, function(index, layero) {
  222. //按钮【按钮一】的回调
  223. layer.msg('删除成功', {
  224. icon: 5
  225. });
  226. }, function(index) {
  227. //按钮【按钮二】的回调
  228. layer.close(laye)
  229. });
  230. }
  231. var bianJi='<table class="table">'+
  232. '<tr>'+
  233. '<th style="text-align: right;"><b>类别:</b></th>'+
  234. '<td><select name="" id="" class="select_">'+
  235. '<option value="1">类别1</option>'+
  236. '<option value="2">类别2</option>'+
  237. '<option value="3">类别3</option></select></td>'+
  238. '</tr>'+
  239. '<tr>'+
  240. '<th style="text-align: right;"><b>类别名称:</b></th>'+
  241. '<td><input type="text" class="input_"/></td>'+
  242. '</tr>'+
  243. '<tr>'+
  244. '<th style="text-align: right;"><b>类别名称:</b></th>'+
  245. '<td><textarea name="" rows="" cols=""></textarea></td>'+
  246. '</tr>'+
  247. '</table>'
  248. function XG(id) {
  249. layer.open({
  250. type: 2,
  251. content: "changTongZhiMuBan.html?id="+id, //iframe的url,no代表不显示滚动条
  252. title: '修改模板',
  253. area: ['40%', '50%'], //宽高
  254. });
  255. }
  256. function add(id) {
  257. layer.open({
  258. type: 2,
  259. content: "changTongZhiMuBan.html?id="+id, //iframe的url,no代表不显示滚动条
  260. title: '添加模板',
  261. area: ['40%', '50%'], //宽高
  262. });
  263. }
  264. </script>
  265. </body>
  266. </html>