Commit 83408e67 by lyy

生产驾驶舱和设备驾驶舱

parent 2aae7781
...@@ -25,12 +25,7 @@ import com.baosight.xservices.xs.util.LoginUserDetails; ...@@ -25,12 +25,7 @@ import com.baosight.xservices.xs.util.LoginUserDetails;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -317,7 +312,27 @@ public class ServiceHGSC007 extends ServiceEPBase { ...@@ -317,7 +312,27 @@ public class ServiceHGSC007 extends ServiceEPBase {
queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate"))); queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate")));
} }
queryRow.put("processNames",Arrays.asList("组立","油漆","埋弧盖面","抛丸除锈","拼装","焊接")); queryRow.put("processNames",Arrays.asList("组立","油漆","埋弧盖面","抛丸除锈","拼装","焊接"));
List<Map> result = DaoBase.getInstance().query("HGSC007.queryBySunWt", queryRow); // List<Map> result = DaoBase.getInstance().query("HGSC007.queryBySunWt", queryRow);
List<HashMap<String, Object>> result = (List<HashMap<String, Object>>)DaoBase.getInstance().query("HGSC007.queryBySunWt", queryRow);
List<String> processNamesList = Arrays.asList("组立", "油漆", "埋弧盖面", "抛丸除锈", "拼装", "焊接");
List<Object> resultList = new ArrayList<>();
for (String processNames:processNamesList){
for(Map<String, Object> item :result){
if(processNames.equals(item.get("processName"))){
resultList.add(item.get("totalWeight"));
}
}
}
EiBlock block = new EiBlock("result");
block.set("processNameList",resultList);
inInfo.addBlock(block);
// Object processNames = queryRow.get("processNames");
// for(Object item:processNames){
// if(item.get("")){
//
// }
// }
inInfo.set(EiConstant.resultBlock, result); inInfo.set(EiConstant.resultBlock, result);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div v-for="(item,index) in sumWtdataList" <div v-for="(item,index) in sumWtdataList"
:key="index" style="width: 28%;height: 70%;display: flex;flex-wrap: wrap;justify-content: center;margin-top: 2.5vh" :key="index" style="width: 28%;height: 70%;display: flex;flex-wrap: wrap;justify-content: center;margin-top: 2.5vh"
> >
<div class="content-main-title">{{ getByProcessSumWtList[item]}}</div> <div class="content-main-title">{{ getByProcessSumWtList[item] || 0}}</div>
<img src="../../hggp/common/img/production-icon.png" class="production-icon" alt/> <img src="../../hggp/common/img/production-icon.png" class="production-icon" alt/>
<div class="content-main-footer">{{ sumWtList[index] }}</div> <div class="content-main-footer">{{ sumWtList[index] }}</div>
</div> </div>
...@@ -23,80 +23,82 @@ ...@@ -23,80 +23,82 @@
</div> </div>
</div> </div>
<div class="page-content-main" style="flex-wrap: wrap"> <div class="page-content-main" style="flex-wrap: wrap">
<div style="width: 45%;height: 30%;display: flex;flex-wrap: wrap;justify-content: space-between;" v-for="(item,index) in queryBySunWtDate"
<div style="width: 100%;height: 30%;display: flex;justify-content: space-between;" :key="index"
> >
<div class="page-content-left" style="margin-left: -1vw"> <div class="page-content-left" style="position: relative">
<div class="data-title-span temp">160</div> <div class="data-title-span temp"> {{ queryBySunWtList[index] || 0 }}</div>
<div style="width: 100%;display: flex;" class="temp"> <div style="width: 100%;display: flex;" class="temp">
<img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/> <img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/>
</div> </div>
<div class="content-main-footer temp">组立/</div> <div class="content-main-footer temp" data-process="组立">{{ queryBySunWtDate[index] }}/ </div>
<div style="width: 100%;display: flex;" class="temp"> <div style="width: 100%;display: flex;" class="temp">
<img src="../../hggp/common/img/produce-put.png" alt/> <img src="../../hggp/common/img/produce-put.png" v-if="index < 4" alt/>
</div>
</div> </div>
<div class="page-content-left" style="margin-right: -1vw">
<div class="data-title-span temp">160</div>
<div style="width: 100%;display: flex;" class="temp">
<img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/>
</div>
<div class="content-main-footer temp">油漆/吨</div>
<div style="width: 100%;display: flex;" class="temp">
<img src="../../hggp/common/img/produce-put.png" alt/>
</div> </div>
<div style="position: relative;top:-8vh; right: 0;bottom: 0;left: 6.5vw;" v-if="index == 4">
<img src="../../hggp/common/img/product-transmission.png" style="width: 4vw;height: 3vh;" alt/>
</div> </div>
<!-- <div class="page-content-left" style="margin-right: -1vw">-->
<!-- <div class="data-title-span temp">160</div>-->
<!-- <div style="width: 100%;display: flex;" class="temp">-->
<!-- <img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/>-->
<!-- </div>-->
<!-- <div class="content-main-footer temp" >{{queryBySunWtList.totalWeight}}</div>-->
<!-- <div style="width: 100%;display: flex;" class="temp">-->
<!-- <img src="../../hggp/common/img/produce-put.png" alt/>-->
<!-- </div>-->
<!-- </div>-->
</div> </div>
<div style="width: 100%;height: 30%;display: flex;justify-content: space-between;" <!-- <div style="width: 100%;height: 30%;display: flex;justify-content: space-between;"-->
> <!-- >-->
<div class="page-content-left" style="margin-left: -1vw"> <!-- <div class="page-content-left" style="margin-left: -1vw">-->
<div class="data-title-span temp">160</div> <!-- <div class="data-title-span temp">160</div>-->
<div style="width: 100%;display: flex;" class="temp"> <!-- <div style="width: 100%;display: flex;" class="temp">-->
<img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/> <!-- <img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/>-->
</div> <!-- </div>-->
<div class="content-main-footer temp">埋弧/吨</div> <!-- <div class="content-main-footer temp">埋弧/吨</div>-->
<div style="width: 100%;display: flex;" class="temp"> <!-- <div style="width: 100%;display: flex;" class="temp">-->
<img src="../../hggp/common/img/produce-put.png" alt/> <!-- <img src="../../hggp/common/img/produce-put.png" alt/>-->
</div> <!-- </div>-->
</div > <!-- </div >-->
<div class="page-content-left" style="margin-right: -1vw"> <!-- <div class="page-content-left" style="margin-right: -1vw">-->
<div class="data-title-span temp">160</div> <!-- <div class="data-title-span temp">160</div>-->
<div style="width: 100%;display: flex;" class="temp"> <!-- <div style="width: 100%;display: flex;" class="temp">-->
<img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/> <!-- <img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/>-->
</div> <!-- </div>-->
<div class="content-main-footer temp">抛丸/吨</div> <!-- <div class="content-main-footer temp">抛丸/吨</div>-->
<div style="width: 100%;display: flex;" class="temp"> <!-- <div style="width: 100%;display: flex;" class="temp">-->
<img src="../../hggp/common/img/produce-put.png" alt/> <!-- <img src="../../hggp/common/img/produce-put.png" alt/>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div style="width: 100%;height: 30%;display: flex;justify-content: space-between;" <!-- <div style="width: 100%;height: 30%;display: flex;justify-content: space-between;"-->
> <!-- >-->
<div class="page-content-left"> <!-- <div class="page-content-left">-->
<div class="data-title-span temp">160</div> <!-- <div class="data-title-span temp">160</div>-->
<div style="width: 100%;display: flex;" class="temp"> <!-- <div style="width: 100%;display: flex;" class="temp">-->
<img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/> <!-- <img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/>-->
</div> <!-- </div>-->
<div class="content-main-footer temp">拼装/吨</div> <!-- <div class="content-main-footer temp">拼装/吨</div>-->
</div> <!-- </div>-->
<div style="height: 9vh;display: flex;align-items: center;"> <!-- <div style="height: 9vh;display: flex;align-items: center;">-->
<img src="../../hggp/common/img/product-transmission.png" style="width: 4vw;height: 3vh;" alt/> <!-- <img src="../../hggp/common/img/product-transmission.png" style="width: 4vw;height: 3vh;" alt/>-->
</div> <!-- </div>-->
<div class="page-content-left"> <!-- <div class="page-content-left">-->
<div class="data-title-span temp">160</div> <!-- <div class="data-title-span temp">160</div>-->
<div style="width: 100%;" class="temp"> <!-- <div style="width: 100%;" class="temp">-->
<img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/> <!-- <img src="../../hggp/common/img/produce-img.png" class="produce-img " alt/>-->
</div> <!-- </div>-->
<div class="content-main-footer temp">焊接/吨</div> <!-- <div class="content-main-footer temp">焊接/吨</div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> </div>
</div> </div>
...@@ -116,6 +118,7 @@ module.exports = { ...@@ -116,6 +118,7 @@ module.exports = {
sumWtdataList:['dayWeight','monthWeight','yearWeight'], sumWtdataList:['dayWeight','monthWeight','yearWeight'],
getByProcessSumWtList:[], getByProcessSumWtList:[],
queryBySunWtList:[], queryBySunWtList:[],
queryBySunWtDate:['组立','油漆','埋弧盖面','抛丸除锈','拼装','焊接'],
}; };
}, },
watch:{ watch:{
...@@ -175,8 +178,9 @@ module.exports = { ...@@ -175,8 +178,9 @@ module.exports = {
IPLAT.EiCommunicator.send('HGSC007', 'queryBySunWt', inInfo, { IPLAT.EiCommunicator.send('HGSC007', 'queryBySunWt', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
console.log('-------------------------') console.log('-------------------------')
console.log('累计工序',res.extAttr.result) console.log('累计工序',res.blocks.result.extAttr.processNameList)
_this.queryBySunWtList = res.extAttr.result console.log('累计工序',res)
_this.queryBySunWtList = res.blocks.result.extAttr.processNameList
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err); console.error('request_tools----------------->错误信息', err);
...@@ -303,7 +307,7 @@ module.exports = { ...@@ -303,7 +307,7 @@ module.exports = {
background-size: contain; background-size: contain;
} }
.page-content-left{ .page-content-left{
width: 50%; width: 100%;
} }
.bootom-content-title{ .bootom-content-title{
width: 100%; width: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment