李书文 2 lat temu
rodzic
commit
784f794e79

+ 8 - 3
src/main/java/com/lsw/controller/BigScreenController.java

@@ -10,7 +10,14 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 public class BigScreenController extends BaseController {
+
+    //首页
     public void index() {
+        render("index.html");
+    }
+
+    //部门和产品线数据
+    public void gd(){
         String ID = "ZMMMGm5mnGCE4WvWFeI";//部门ID
         List<Record> department_list = Db.template("department", Kv.by("ID", ID)).find();
         List<Record> list = department_list.stream().filter(r -> r.get("ID").equals(ID)).collect(Collectors.toList());
@@ -32,9 +39,7 @@ public class BigScreenController extends BaseController {
 
         }
         List<Record> prouname = Db.template("prouname").find();
-        set("prouname", JsonKit.toJson(prouname));
-        set("department", JsonKit.toJson(list));
-        render("index.html");
+        renderJson(Kv.by("prouname", prouname).set("department",list));
     }
 
     //试验次数

+ 2 - 2
src/main/resources/report.sql

@@ -306,7 +306,7 @@ SELECT * FROM
                    tlk_myjcs y
                WHERE
                    y.item_upbh IS NULL
-                    AND y.item_name =#para(ITEM_NAME)
+                    AND y.item_name =#para(name)
                   #if(ITEM_XL_NUM)
                      AND y.ITEM_XL_NUM=#para(ITEM_XL_NUM)
                   #end
@@ -328,7 +328,7 @@ FROM
         LEFT JOIN TLK_EXAMINE w ON w.item_wt_num = y.item_value
 WHERE
     y.item_upbh IS NULL
-  AND y.item_name =#para(ITEM_NAME)
+  AND y.item_name =#para(name)
  #end
 
 ###委托单联动

+ 13 - 5
src/main/webapp/WEB-INF/view/big-screen/index.html

@@ -205,7 +205,7 @@
                             <div class="f omit tl">标题名称</div>
                             <div class="f omit cn" style="flex: 0.4;">当前处理人</div>
                             <div class="f omit cn" style="flex: 0.4;">流程状态</div>
-                            <div class="f omit cn" style="flex: 0.45;">当前流程耗时</div>
+                            <div class="f omit cn" style="flex: 0.45;">流程耗时</div>
                         </div>
                         <div id="marquee-view" class="marquee-view">
                             <div id="comment1">
@@ -326,8 +326,6 @@
 <script type="text/javascript" src="#(path)/static/big-screen/js/js.js"></script>
 <script type="text/javascript" src="#(path)/static/js/layer/layer.js"></script>
 <script>
-    var options=#(department);
-    var prouname=#(prouname);
     let vm = new Vue({
         el: "#app",
         data: {
@@ -357,8 +355,8 @@
             zc_time_list:[],//使用时长条形图
             zc_pc_list:[],//使用频次条形图
             examine_list: [],//已完成试验
-            options:options, //部门
-            prouname:prouname, //产品线
+            options:[], //部门
+            prouname:[], //产品线
             tab: [{
                 name: '设备总数',
                 value: '0',
@@ -388,6 +386,7 @@
         },
         mounted() {
             start_time();
+            this.gd();//部门数据和产品线
             this.finish_s();//实验完成率
             this.yj();//样机改装信息
             this.no_examine();//待完成试验
@@ -398,6 +397,15 @@
             this.yj_xx(); //样机信息:(样机数量和样机试验次数)
         },
         methods: {
+            //部门数据和产品线
+            gd(){
+                sendAjax("#(path)/big/gd", this.param, res => {
+                    cancelLoding();
+                    this.options=res.department;
+                    this.prouname=res.prouname;
+                })
+            },
+            //选则年,季,月
             change_date(tag,value){
                 if(tag=='xx'){
                     if(value=='quarter'||value=='month'){

+ 1 - 3
src/main/webapp/WEB-INF/view/report/forms.html

@@ -119,7 +119,6 @@
             loading: false,
             loading2: false,
             param: {
-                ITEM_NAME: 'CLG923FCR',
                 ITEM_XL_NUM: '',
                 time_name: '#(time_name)',
                 DOMAINID: '#(DOMAINID)',
@@ -142,7 +141,6 @@
                 vm.loading = true;
                 sendAjax("#(path)/report/getYj", this.param, res => {
                     cancelLoding();
-                    //vm.param.time = res.time;
                     if( res.yj){
                         vm.param.ITEM_KEY = res.yj.ITEM_KEY;
                     }else{
@@ -177,7 +175,7 @@
                 row.check = true;
                 this.key = !this.key;
                 this.param.ITEM_WT_NUM=row.ITEM_WT_NUM;
-                this.param.ITEM_PRO_NUM=vm.param.ITEM_NAME;
+                this.param.ITEM_PRO_NUM=vm.param.name;
                 sendAjax("#(path)/report/getWtd", this.param, res => {
                     cancelLoding();
                     vm.tableData2 = res.data;