<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      javaWeb上移下移(SpringMVC+Mabits+MySql)

      文章已移至:https://blog.csdn.net/baidu_35468322/article/details/79643356

      移動之前:

      移動之后:

      1、控制層

       1     /**
       2      * 修改排序
       3      * 
       4      * @param out
       5      * @author wangsai
       6      */
       7     @RequestMapping(value = "/upDownMove")  
       8     public void updESort(PrintWriter out){  
       9         PageData pd=this.getPageData();
      10         try {
      11             pd.put("EDIT_TIME", Tools.date2Str(new Date()));
      12             exampleQuestionService.upDownMove(pd);
      13             out.print("success");
      14         } catch (Exception e) {
      15             e.printStackTrace();
      16         }
      17         out.flush();
      18     }

      2、XML

       1     <!-- 上移下移 -->
       2     <update id="upDownMove" parameterType="pd">
       3         update 
       4             <include refid="examQuesTableName"></include> 
       5         set 
       6             E_SORT = (
       7                 select 
       8                     e.E_SORT 
       9                 from (
      10                     select 
      11                         E_SORT 
      12                     from 
      13                         <include refid="examQuesTableName"></include> 
      14                     where 
      15                         ID = #{ID} 
      16                     and 
      17                         EXAMPLE_ID = #{EXAMPLE_ID} 
      18                     and 
      19                         ACTIVE_FALG = '0'
      20                 ) e 
      21             ),
      22             EDIT_TIME = #{EDIT_TIME} 
      23         where 
      24             ID = (
      25                 select 
      26                     i.ID 
      27                 from (
      28                     select 
      29                         ID 
      30                     from 
      31                         <include refid="examQuesTableName"></include> 
      32                     where 
      33                         E_SORT = #{E_SORT} 
      34                     and 
      35                         EXAMPLE_ID = #{EXAMPLE_ID} 
      36                     and 
      37                         ACTIVE_FALG = '0'
      38                 ) i 
      39             ) 
      40         and 
      41             EXAMPLE_ID = #{EXAMPLE_ID} 
      42         and 
      43             ACTIVE_FALG = '0';<!-- 正常情況下這句話是沒用的 -->
      44             
      45         update 
      46             <include refid="examQuesTableName"></include> 
      47         set 
      48             E_SORT = #{E_SORT},
      49             EDIT_TIME = #{EDIT_TIME} 
      50         where 
      51             ID = #{ID} 
      52         and 
      53             ACTIVE_FALG = '0';<!-- 正常情況下這句話是沒用的 -->
      54     </update>

      3、html

       1         <table class="content_main_table">        
       2                 <thead>
       3                     <tr>
       4                         <th style="width:50px;">序號</th>
       5                         <th>問題</th>
       6                         <th style="width: 160px;">移動</th>
       7                         <th style="width: 160px;">操作</th>
       8                     </tr>
       9                 </thead>
      10                 <tbody>
      11                 <!-- 開始循環(huán) -->    
      12                 <c:choose>
      13                     <c:when test="${not empty examQuesList}">
      14                         <c:if test="${QX.cha == 1 }">
      15                             <c:forEach items="${examQuesList}" var="ques" varStatus="i">
      16                                 <tr class="courseList">
      17                                     <td>${i.index+1}</td>
      18                                     <td>
      19                                         <p style="line-height: 30px; color: #000; font-size: 14px;">
      20                                             ${ques.CONTENT}
      21                                         </p>
      22                                     </td>
      23                                     <td>
      24                                         <c:choose>
      25                                         <c:when test="${QX.edit != 1}">
      26                                         無權(quán)限
      27                                         </c:when>
      28                                         <c:otherwise>
      29                                         <c:if test="${QX.edit == 1 }">
      30                                         <a class="saveBtn ${i.index+1 == 1 ? 'canNotClick' : ''}" title="上移" onclick="moveUp(this,'${i.index+1}','${ques.ID}')"><i class='icon-arrow-up'></i></a>
      31                                         <a class="whiteBtn ${i.index+1 == fn:length(examQuesList) ? 'canNotClick' : ''}" title="下移" onclick="moveDown(this,'${i.index+1}','${ques.ID}')"><i class='icon-arrow-down'></i></a>
      32                                         </c:if>
      33                                         </c:otherwise>
      34                                         </c:choose>
      35                                     </td>
      36                                     <td>
      37                                         <c:choose>
      38                                             <c:when test="${(QX.edit != 1 && QX.del != 1)}">
      39                                                 無權(quán)限
      40                                             </c:when>
      41                                             <c:otherwise>
      42                                                 <c:if test="${QX.edit == 1 }">
      43                                                     <a class="a_blue" title="編輯" onclick="edit('${ques.ID}')"><i class='icon-edit'></i></a>
      44                                                 </c:if>
      45                                                 <c:if test="${QX.del == 1 }">
      46                                                     <a class="delBtn" onclick="del('${ques.ID}');" title="刪除"><i class='icon-trash'></i></a>
      47                                                 </c:if>
      48                                             </c:otherwise>
      49                                         </c:choose>
      50                                     </td>
      51                                 </tr>
      52                             </c:forEach>
      53                         </c:if>
      54                         <c:if test="${QX.cha == 0 }">
      55                             <tr>
      56                                 <td colspan="4">您無權(quán)查看</td>
      57                             </tr>
      58                         </c:if>
      59                     </c:when>
      60                     <c:otherwise>
      61                         <tr class="main_info">
      62                             <td colspan="4">沒有相關(guān)數(shù)據(jù)</td>
      63                         </tr>
      64                     </c:otherwise>
      65                 </c:choose>
      66                 </tbody>
      67             </table>

      4、js

       1         //當(dāng)前頁
       2         var currentPage = "${page.currentPage}";
       3         //每頁顯示的記錄
       4         var showCount = "${page.showCount}";
       5 
       6         //上移
       7         function moveUp(obj,index,id) {
       8             if(index == 1){
       9                 layer.msg("上移到頂了");
      10                 return;
      11             }
      12             var self = $(obj);
      13             var _old = self.closest("tr.courseList");
      14             var _new = self.closest("tr.courseList").prev("tr");
      15             if (_new.length > 0) {
      16                 var _temp = _old.html();
      17                 _old.empty().append(_new.html());
      18                 _new.empty().append(_temp);
      19             }
      20             var eSort = (currentPage-1)*showCount+parseInt(index)-1;
      21             $.post("exampleQuestion/upDownMove.do",{E_SORT:eSort,ID:id,EXAMPLE_ID:"${pd.EXAMPLE_ID}"},function(data){
      22                 if(data != 'success'){
      23                     layer.alert("移動失敗,請重試!");
      24                 }
      25                 window.location.reload();
      26             });
      27         }
      28 
      29         //下移
      30         function moveDown(obj,index,id) {
      31             if(index == "${fn:length(examQuesList)}"){
      32                 layer.msg("下移到底了");
      33                 return;
      34             }
      35             var self = $(obj);
      36             var _old = self.closest("tr.courseList");
      37             var _new = self.closest("tr.courseList").next("tr");
      38             if (_new.length > 0) {
      39                 var _temp = _old.html();
      40                 _old.empty().append(_new.html());
      41                 _new.empty().append(_temp);
      42             }
      43             var eSort = (currentPage-1)*showCount+parseInt(index)+1;
      44             $.post("exampleQuestion/upDownMove.do",{E_SORT:eSort,ID:id,EXAMPLE_ID:"${pd.EXAMPLE_ID}"},function(data){
      45                 if(data != 'success'){
      46                     layer.alert("移動失敗,請重試!");
      47                 }
      48                 window.location.reload();
      49             });
      50         }    

       

      posted @ 2017-10-26 16:58  王小白吖~  閱讀(1816)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 狠狠婷婷色五月中文字幕| 4399理论片午午伦夜理片| 免费又爽又大又高潮视频| 亚洲国产精品久久久天堂麻豆宅男| 亚洲av无码牛牛影视在线二区| 国产成人一区二区三区视频免费 | 亚洲人成人一区二区三区| 亚洲日本韩国欧美云霸高清| 欧美大胆老熟妇乱子伦视频| 拍真实国产伦偷精品| 久久夜色精品国产噜噜亚洲sv| 国产精品色哟哟成人av| 亚洲av无码成人精品区一区| 精品一区二区不卡免费| 亚洲精品综合一区二区三区| 精品国产一区二区三区性色| 99无码中文字幕视频| 日韩av日韩av在线| 熟女在线视频一区二区三区| 成人精品日韩专区在线观看| 免费观看的AV毛片的网站不卡 | 亚洲国产午夜精品理论片妓女| 国产无遮挡吃胸膜奶免费看| 亚洲人妻一区二区精品| 国产精品一精品二精品三| 无码人妻h动漫| 国产盗摄xxxx视频xxxx| 日本高清一区免费中文视频 | 亚洲日韩乱码中文无码蜜桃| 国产日韩一区二区四季| 精品久久久噜噜噜久久久| 18无码粉嫩小泬无套在线观看| 色8久久人人97超碰香蕉987| 亚洲人成网站77777在线观看| 婷婷国产成人精品视频| 日韩精品亚洲精品第一页| 国产精品有码在线观看| 国产精品办公室沙发| 欧美片内射欧美美美妇| 精品中文人妻中文字幕| 亚洲欧美综合人成在线 |