Commit 7b7ec8f7 by 宋祥

Merge branch 'dev' of http://129.211.46.84:8800/platform/hg-smart into master-dc

parents c1bab8cf c02459bb
......@@ -106,8 +106,7 @@
<script src="${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"></script>
<script src="${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"></script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script>
<script src="${ctx}/common/js/httpVueLoader.js"></script>
<link rel="stylesheet" href="${ctx}/common/css/element-ui.css">
......@@ -206,24 +205,29 @@
getByProcessWtDate:[],
getByProcessDayWtList:[],
getByProcessDayWtDate:[],
timer: ''
};
},
mounted() {
this.getYesterdayDateFormatted();
setInterval(() => {
this.date = new Date(); // 更新日期时间
}, 1000);
this.getYesterdayDateFormatted();
this.getRoleFactory();
this.getByProcessWt();
this.setOption();
this.getByProcessDayWt();
this.setOption2();
setInterval(()=> {
this.initPage();
}, 60000);
this.onSetInterval()
},
methods: {
onSetInterval(){
if(this.timer){
clearInterval(this.timer)
this.timer = ''
}
this.timer = setInterval(()=>{
this.getYesterdayDateFormatted();
this.initPage();
},60000)
},
initPage(){
this.getByProcessWt();
this.setOption();
......@@ -232,19 +236,11 @@
},
handledataPicker(){
this.getByProcessWt();
this.setOption();
this.getByProcessDayWt();
this.setOption2();
this.initPage();
this.onSetInterval()
},
getYesterdayDateFormatted() {
const today = new Date();
today.setDate(today.getDate() - 1);
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要加1
const day = String(today.getDate()).padStart(2, '0');
const formattedDate = year+month+day;
this.dataPicker = formattedDate;
this.dataPicker = dayjs().format("YYYYMMDD");
},
getRoleFactory(){
let _this = this;
......@@ -253,11 +249,9 @@
onSuccess: function (res) {
_this.factoryList = res.extAttr.result
_this.factory = res.extAttr.result[0].factoryCode
console.log('_this.factoryList',_this.factoryList)
console.log('factory',_this.factory)
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......@@ -266,22 +260,17 @@
getByProcessWt(){
let _this = this;
var inInfo = new EiInfo();
console.log('factory',this.factory)
console.log('dataPicker',this.dataPicker)
inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProcessWt', inInfo, {
onSuccess: function (res) {
console.log('getByProcessWt',res)
if(undefined != res.blocks.result.extAttr){
_this.getByProcessWtList = res.blocks.result.extAttr.processNameList
console.log('getByProcessWtList',_this.getByProcessWtList)
_this.getByProcessWtDate = res.blocks.result.extAttr.totalWeightList
console.log('getByProcessWtDate',_this.getByProcessWtDate)
}
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......@@ -338,22 +327,17 @@
getByProcessDayWt(){
let _this = this;
var inInfo = new EiInfo();
console.log('factory',this.factory)
console.log('dataPicker',this.dataPicker)
inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProcessDayWt', inInfo, {
onSuccess: function (res) {
console.log('七日综合产量')
if(undefined != res.blocks.result.extAttr){
_this.getByProcessDayWtList = res.blocks.result.extAttr.depositDateList;
console.log('_this.getByProcessDayWtList',_this.getByProcessDayWtList)
_this.getByProcessDayWtDate = res.blocks.result.extAttr.totalWeightList;
console.log('_this.getByProcessDayWtDate',_this.getByProcessDayWtDate)
}
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......
......@@ -109,7 +109,7 @@
<script src="${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"></script>
<script src="${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"></script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script>
<script src="${ctx}/common/js/httpVueLoader.js"></script>
<link rel="stylesheet" href="${ctx}/common/css/element-ui.css">
......@@ -252,59 +252,41 @@
querySbYesDate:[],
querySbNoList:[],
querySbNODate:[],
currentTime:dayjs().format("YYYY-MM-DD HH:mm:ss"),
lineOption1:'',
lineOption2:''
};
},
mounted() {
this.getYesterdayDateFormatted();
setInterval(() => {
this.date = new Date(); // 更新日期时间
this.currentTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
}, 1000);
this.getYesterdayDateFormatted();
this.getRoleFactory();
this.queryBySbStatus();
this.querySbYes();
this.querySbNo();
this.initPage();
this.setOption();
this.setOption2();
// var self = this;
// setTimeout(function() {
// self.init();
// }, 60000);
setInterval(()=> {
this.initPage();
}, 60000);
this.onSetInterval()
},
methods: {
initPage(){
onSetInterval(){
if(this.timer){
clearInterval(this.timer)
this.timer = ''
}
this.timer = setInterval(()=>{
this.getYesterdayDateFormatted();
this.initPage();
},60000)
},
initPage(){
this.queryBySbStatus();
this.querySbYes();
this.querySbNo();
},
formatTime(currentTime) {
const formattedTime =
currentTime.getFullYear() +
"-" +
(currentTime.getMonth() + 1) +
"-" +
currentTime.getDate() +
" " +
currentTime.getHours() +
":" +
currentTime.getMinutes() +
":" +
currentTime.getSeconds();
return formattedTime;
},
getYesterdayDateFormatted() {
const today = new Date();
today.setDate(today.getDate() - 1);
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要加1
const day = String(today.getDate()).padStart(2, '0');
const formattedDate = year+month+day;
this.dataPicker = formattedDate;
console.log('ctx',this.ctx)
this.dataPicker = dayjs().format("YYYYMMDD");
},
getRoleFactory(){
let _this = this;
......@@ -313,20 +295,17 @@
onSuccess: function (res) {
_this.factoryList = res.extAttr.result
_this.factory = res.extAttr.result[0].factoryCode
console.log('_this.factoryList',_this.factoryList)
console.log('factory',_this.factory)
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
);
},
handledataPicker(){
this.queryBySbStatus();
this.querySbYes();
this.querySbNo();
this.initPage();
this.onSetInterval()
},
queryBySbStatus(){
let _this = this;
......@@ -335,7 +314,7 @@
inInfo.set('inqu_status-0-date',this.dataPicker)
IPLAT.EiCommunicator.send('HGSB010', 'queryBySbStatus', inInfo, {
onSuccess: function (res) {
console.log('queryBySbStatus',res)
if(undefined != res.extAttr.result){
_this.queryBySbStatusList = res.extAttr.result;
}
......@@ -351,7 +330,7 @@
})
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......@@ -364,7 +343,7 @@
inInfo.set('inqu_status-0-date',this.dataPicker)
IPLAT.EiCommunicator.send('HGSB010', 'querySbYes', inInfo, {
onSuccess: function (res) {
console.log('querySbYes',res)
if(undefined != res.extAttr.result[0]){
const dataList = res.extAttr.result;
_this.querySbYesDate = res.extAttr.date;
......@@ -433,10 +412,10 @@
_this.querySbYesList = []
_this.querySbYesDate = []
}
console.log('querySbYesList',_this.querySbYesList)
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......@@ -449,7 +428,7 @@
inInfo.set('inqu_status-0-date',this.dataPicker)
IPLAT.EiCommunicator.send('HGSB010', 'querySbNo', inInfo, {
onSuccess: function (res) {
console.log('querySbNo',res)
if(undefined != res.extAttr.result[0]){
const dataList = res.extAttr.result;
_this.querySbNODate = res.extAttr.date;
......@@ -518,7 +497,7 @@
}
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......@@ -526,7 +505,7 @@
},
setOption(){
this.testOption1 = {
this.lineOption1 = {
title: {
left: 'left',
text: '设备作业时长/分钟',
......@@ -577,7 +556,7 @@
}
},
setOption2(){
this.testOption2 ={
this.lineOption2 ={
title: {
left: 'left',
text: '设备故障次数/分钟',
......@@ -628,19 +607,6 @@
}
},
},
computed:{
lineOption1() {
// 这里我们不需要再次调用 setOption,因为 Vue 会自动处理绑定
return this.testOption1;
},
lineOption2() {
// 这里我们不需要再次调用 setOption,因为 Vue 会自动处理绑定
return this.testOption2;
},
currentTime() {
return this.formatTime(this.date);
},
}
})
</script>
......
......@@ -124,7 +124,6 @@ module.exports = {
},
watch:{
factory(newVal) {
console.log(1)
this.getByProcessSumWt();
this.queryBySunWt();
},
......@@ -143,15 +142,11 @@ module.exports = {
var inInfo = new EiInfo();
// inInfo.set('inqu_status-0-factoryCode','R24070364')
// inInfo.set('inqu_status-0-depositDate','20241019')
console.log('this.factory',this.factory)
console.log('this.factory',this.datapicker)
inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.datapicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProcessSumWt', inInfo, {
onSuccess: function (res) {
if(undefined != res.extAttr.result[0]){
console.log('累计产量',res.extAttr.result[0])
console.log('getByProcessSumWt',res)
_this.getByProcessSumWtList = res.extAttr.result[0]
}else {
_this.getByProcessSumWtList.push({
......@@ -163,7 +158,7 @@ module.exports = {
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......@@ -172,19 +167,14 @@ module.exports = {
queryBySunWt(){
let _this = this;
var inInfo = new EiInfo();
console.log('this.factory',this.factory)
console.log('this.factory',this.datapicker)
inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'queryBySunWt', inInfo, {
onSuccess: function (res) {
console.log('-------------------------')
console.log('累计工序',res.blocks.result.extAttr.processNameList)
console.log('累计工序',res)
_this.queryBySunWtList = res.blocks.result.extAttr.processNameList
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......
......@@ -60,18 +60,14 @@ module.exports = {
getByProjCodewt(){
let _this = this;
var inInfo = new EiInfo();
console.log('this.factory',this.factory)
console.log('this.factory',this.datapicker)
inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProjCodeWt', inInfo, {
onSuccess: function (res) {
_this.getByProjCodewtWtList = res.extAttr.result
console.log('项目生产',res.extAttr.result)
console.log('项目生产',res)
},
onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
......
......@@ -27,7 +27,8 @@ let singleDownload = function (row) {
EiCommunicator.send("HGWD001C", "add", inInfo, {
onSuccess(res) {
if (res.status > -1) {
window.open(res.extAttr.url, '_blank');
let url = res.extAttr.url + "?filename=" + row['docName'];
window.open(url, '_blank');
} else {
message(res.msg);
}
......
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