minitiger 9 лет назад
Родитель
Сommit
bac64c7b12

+ 3 - 3
VisualInspection/js/constant/constant.js

@@ -5,11 +5,11 @@ function queryConstant(){
     }
     var cols = [
                 {width: 80, text: '序号', type: 'number', flex: false, field: 'num'},
-                {width: 80, text: '字典值', type: 'date', flex: false, field: 'code_value'},
+                {width: 80, text: '字典值', type: 'string', flex: false, field: 'code_value'},
                 {width: 80, text: '字典名称', type: 'string', flex: true, field: 'code_name'},
-                {width: 80, text: '有效标志', type: 'date', flex: false, field: 'valid'},
+                {width: 80, text: '有效标志', type: 'string', flex: false, field: 'valid'},
                 {width: 80, text: '代码标识', type: 'string', flex: true, field: 'code_flag'},
-                {width: 160, text: '标识名称', type: 'date', flex: false, field: 'flag_name'},
+                {width: 160, text: '标识名称', type: 'string', flex: false, field: 'flag_name'},
                 {width: 80, text: '备注', type: 'string', flex: true, field: 'remark'},
                 {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[

+ 4 - 4
VisualInspection/js/mytask/unchecked.js

@@ -6,12 +6,12 @@ function queryUncheckedTask(){
         "dept": $("#dept").val()
     }
     var cols = [
-                {width: 80, text: '序号', type: 'number', flex: false, colClass: 'text-center',field: 'num'},
-                {width: 160, text: '任务名称', type: 'date', flex: false, sort: 'down',field: 'name'},
+                {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+                {width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
                 {width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person'},
-                {width: 160, text: '考核部门', type: 'date', flex: false, sort: 'down',field: 'checked_dept'},
+                {width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept'},
                 {width: 80, text: '稽查人员', type: 'string', flex: true, colClass: '',field: 'checkman'},
-                {width: 160, text: '稽查时间段', type: 'date', flex: false, sort: 'down',field: 'start_time'},
+                {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'start_time'},
                 {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
                 {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[

+ 2 - 1
VisualInspection/js/util/service.js

@@ -202,9 +202,10 @@ function get_common_service(url, param, success, fail) {
 
 // 上传文件
 function uploadFile(file, name, successfunc, errorfunc) {
-    var dataurl = base_server_url + FILE_UPLOAD
+    var dataurl = "http://localhost:8080/fileServer" + FILE_UPLOAD
     var form = new FormData();
     form.append(name, file);
+    form.append('parantPath','tt');
     $.ajax({
         url: dataurl,
         type: "POST",

+ 1 - 1
VisualInspection/view/main.html

@@ -7,7 +7,7 @@
     <link rel="import" href="/view/common/commoncsslink.html?__inline">
     <link rel="stylesheet" type="text/css" href="/css/main.css">
     <link rel="import" href="/view/common/commonscriptlink.html?__inline">
-    <script src="/js/mytask/unchecked.js"></script> 
+    <script src="/js/mytask/check.js"></script> 
     <!--<link rel="stylesheet" type="text/css" href="/css/user/userManager.css?__inline">
 <script type="text/javascript" src="/node_modules/zui/dist/lib/dashboard/zui.dashboard.min.js?__inline"></script>
 <link rel="stylesheet" type="text/css" href="/node_modules/zui/dist/lib/dashboard/zui.dashboard.min.css">

+ 5 - 130
VisualInspection/view/mytask/check.html

@@ -47,39 +47,12 @@
                 </div>
             </div>
             <div class="row">
-                <div class="cards cards-borderless col-sm-11">
-                    <div class="col-md-4 col-sm-6 col-lg-3">
-                        <a href="#" style="color:red;"><i class="icon icon-remove-circle"></i> 删除</a>
-                        <a class="card lightbox-toggle" href="../../images/img4.jpg">
-                            <img src="../../images/img4.jpg" alt="">
-                            <div class="caption">“良辰美景” 出自《牡丹亭》</div>
-                        </a>
-                    </div>
-                    <div class="col-md-4 col-sm-6 col-lg-3">
-                        <a href="#" style="color:red;"><i class="icon icon-remove-circle"></i> 删除</a>
-                        <a class="card lightbox-toggle" href="../../images/img4.jpg">
-                            <img src="../../images/img4.jpg" alt="">
-                            <div class="caption">“良辰美景” 出自《牡丹亭》</div>
-                        </a>
-                    </div>
-                    <div class="col-md-4 col-sm-6 col-lg-3">
-                        <a href="#" style="color:red;"><i class="icon icon-remove-circle"></i> 删除</a>
-                        <a class="card lightbox-toggle" href="../../images/img4.jpg">
-                            <img src="../../images/img4.jpg" alt="">
-                            <div class="caption">“良辰美景” 出自《牡丹亭》</div>
-                        </a>
-                    </div>
-                    <div class="col-md-4 col-sm-6 col-lg-3">
-                        <a href="#" style="color:red;"><i class="icon icon-remove-circle"></i> 删除</a>
-                        <a class="card lightbox-toggle" href="../../images/img4.jpg">
-                            <img src="../../images/img4.jpg" alt="">
-                            <div class="caption">“良辰美景” 出自《牡丹亭》</div>
-                        </a>
-                    </div>
+                <div id="img_container" class="cards cards-borderless col-sm-11">
+                
                 </div>
                 <div class="col-sm-1">
                     <br>
-                    <button class="btn btn-primary" type="button">清空</button>
+                    <button class="btn btn-primary" type="button" onclick="clearAllImg()">清空</button>
                     <br>
                     <br>
                     <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#scoreWin">评分</button>
@@ -205,104 +178,6 @@
 </div>
 <script>
     $(document).ready(function() {
-        $('a.lightbox-toggle').lightbox();
-        // 仅选择日期
-        $("#start-time").datetimepicker({
-            language: "zh-CN",
-            weekStart: 1,
-            todayBtn: 1,
-            autoclose: 1,
-            todayHighlight: 1,
-            startView: 2,
-            minView: 2,
-            forceParse: 0,
-            format: "yyyy-mm-dd"
-        });
-        // 仅选择日期
-        $("#end-time").datetimepicker({
-            language: "zh-CN",
-            weekStart: 1,
-            todayBtn: 1,
-            autoclose: 1,
-            todayHighlight: 1,
-            startView: 2,
-            minView: 2,
-            forceParse: 0,
-            format: "yyyy-mm-dd"
-        });
-        setFeSelect("#fsList",$.checkTask.deptid);
-        setLaneSelect("#lane",$.checkTask.checked_location);
-        get_common_service('user/getUserById/'+$.checkTask.checked_person, null, function(data){
-            $("#checked_person").html(data.truename);
-        }) 
-        // 使用data参数更新数据:
-        $('.datatable').datatable({
-            checkable: false,
-            sortable: false,
-            data: {
-                cols: [{
-                    width: 30,
-                    text: '序号',
-                    type: 'number',
-                    flex: true,
-                    colClass: 'text-center'
-                }, {
-                    width: 200,
-                    text: '评分记录',
-                    type: 'string',
-                    flex: true,
-                    sort: 'down'
-                }, {
-                    width: 30,
-                    text: '分数',
-                    type: 'string',
-                    flex: true,
-                    colClass: ''
-                }, {
-                    width: 100,
-                    text: '操作',
-                    type: 'string',
-                    flex: true,
-                    colClass: ''
-                }],
-                rows: [{
-                        checked: false,
-                        data: [1, '服务设施维修及时,小修及时修复', '10', '<a href="#" data-toggle="modal" data-target="#myModal"><i class="icon icon-edit"></i>修改 </a><a href="#"><i class="icon icon-remove-circle"></i>删除</a>']
-                    }, {
-                        checked: false,
-                        data: [2, '服务区垃圾房应封闭,房内垃圾入袋,地面无污水', '20', '<a href="#" data-toggle="modal" data-target="#myModal"><i class="icon icon-edit"></i>修改 </a><a href="#"><i class="icon icon-remove-circle"></i>删除</a>']
-                    },
-                    // 更多数据
-                ]
-            }
-        });
+        initCheck();
     });
-
-        function showPre(id){
-            // $('#myModal').modal({name:"dd"});
-            changePage("/view/mytask/taskDetail.html");
-        }
-
-        function saveValidReason(){
-            alert("提交成功!");
-            $('#validSubmitWin').modal('toggle');
-        }
-        function changePerson(id){
-            $('#checkedPerson').html(id);
-            $('#changePersonWin').modal('toggle');
-        }
-
-        function score(score){
-            alert("扣分:"+score);
-            $('#scoreWin').modal('toggle');
-        }
-
-        function refuseApply(){
-            alert("拒绝申请");
-            $('#refuseApplyWin').modal('toggle');
-        }
-
-        function agreeApply(){
-            alert("同意申请");
-        }
-    </script>
+</script>

+ 1 - 1
VisualInspection/view/mytask/unchecked.html

@@ -1,4 +1,4 @@
-<!--<script src="/js/mytask/unchecked.js"></script> -->
+<script src="/js/mytask/unchecked.js"></script> 
 <div class="container-fluid ">
     <div class="row">
         <form  class="form-horizontal">

+ 4 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Score.java

@@ -28,6 +28,10 @@ public class Score {
     private String videos;
     //考核项id
     private Long check_item_id;
+    
+    private String check_item_name;
+    
+    private Integer check_item_score;
     //扣分内容
     private String content;
     //考核人员ids

+ 17 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/BaseController.java

@@ -2,6 +2,7 @@ package com.xintong.visualinspection.controller;
 
 import java.io.FileNotFoundException;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 
 import com.alibaba.fastjson.JSON;
+import com.github.pagehelper.PageInfo;
 import com.xintong.system.err.BusinessException;
 import com.xintong.system.err.ErrorCode;
 
@@ -84,6 +86,21 @@ public class BaseController {
     }
     
     /**
+     * 返回前台结果分页结构体
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    public String returnSuccessPageResult(Object o){
+    	Map<String,Object> result = new HashMap<>();
+    	result.put("result_code", 0);
+    	result.put("result_desc", "success");
+    	result.put("result_data", new PageInfo((List)o));
+        return JSON.toJSONStringWithDateFormat(result,"yyyy-MM-dd HH:mm");
+    }
+    
+    /**
      * 返回前台结果结构体
      * @return
      * String

+ 4 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/ScoreController.java

@@ -5,6 +5,7 @@ import java.util.List;
 import javax.validation.Valid;
 
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -87,9 +88,9 @@ public class ScoreController extends BaseController {
      * @exception
      * @since  1.0.0
      */
-    @RequestMapping(value = "/getScoreList")
-    public String getScoreList(@RequestBody Score score){
+    @RequestMapping(value = "/getScoreList/{page}/{size}")
+    public String getScoreList(@PathVariable Integer page,@PathVariable Integer size, @RequestBody Score score){
     	List<Score> scorelist = scoreService.getScoreList(score);
-    	return super.returnSuccessResult(scorelist);
+    	return super.returnSuccessPageResult(scorelist);
     }
 }

+ 6 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/ScoreMapper.xml

@@ -8,6 +8,8 @@
         <result column="pics" property="pics" jdbcType="VARCHAR" />
         <result column="videos" property="videos" jdbcType="VARCHAR" />
         <result column="check_item_id" property="check_item_id" jdbcType="INTEGER" />
+        <result column="check_item_name" property="check_item_name" jdbcType="VARCHAR" />
+        <result column="check_item_score" property="check_item_score" jdbcType="INTEGER" />
         <result column="content" property="content" jdbcType="VARCHAR" />
         <result column="checkman" property="checkman" jdbcType="VARCHAR" />
         <result column="checked_person" property="checked_person" jdbcType="INTEGER" />
@@ -27,8 +29,10 @@
     </select>
     
     <select id="getScoreList" parameterType="java.lang.Long" resultMap="BaseResultMap" >
-        SELECT *
-        FROM check_score
+        SELECT *,
+        	  a.score as check_item_score,
+        	  a.name as check_item_name
+        FROM check_score left join check_item a on check_item_id=a.id
         WHERE 1=1
         	 <if test="checked_person != null">AND checked_person = #{checked_person}</if>
         	 <if test="check_item_id != null">AND check_item_id = #{check_item_id}</if>