Commit 68abce88 by 李君

优化

1 parent ffc7b97c
......@@ -89,7 +89,7 @@
</el-pagination>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitImg" class="dialog-btn dialog-confirm-btn">{{$t('dialog.confirm')}}
<el-button type="primary" @click="closeDialog" class="dialog-btn dialog-confirm-btn">{{$t('dialog.close')}}
</el-button>
</div>
</el-dialog>
......@@ -165,7 +165,6 @@
},
methods: {
async dialogInit(data, mall_id, privacy_val) {
console.log(data)
this.currectObj = {
...data
}
......@@ -211,7 +210,6 @@
this.getData();
},
getData() {
this.imgList = [];
this.checkedNum = 0;
this.noImgText = this.$t('echartsTitle.loading');
this.$api.flowReport
......@@ -412,7 +410,6 @@
let bodyPic = this.imgList[index].bodyPic;
let featurePicUrl = this.uploadVal == 1 ? facePic : bodyPic;
featurePicUrl = featurePicUrl.replace(/face-0.jpg/,'face-F.jpg')
console.log(`/feature/${featurePicUrl}.feature`);
this.$api.management.getFeature({
featurePath:`/feature/${featurePicUrl}.feature`
}).then(res => {
......@@ -431,6 +428,8 @@
this.imgList[index].isChecked = false;
} else {
this.imgList[index].isChecked = true;
// 选中直接添加店员库
this.submitImg()
}
}else{
this.imgList[index].isChecked = false;
......@@ -490,9 +489,20 @@
](filterChecked).then(res => {
let result = res.data;
if (result.code == 200) {
this.getHadImg(this.staffId,true)
this.$message({
type: "success",
message: this.$t('message.labelSuccess')
});
// result.data;
this.isShow = false;
this.$parent.handleNodeClick(this.currectObj);
// this.isShow = false;
// this.imgList = [];
// this.$parent.handleNodeClick(this.currectObj);
}else{
this.$message({
type: "warning",
message: result.msg
});
}
});
},
......@@ -502,6 +512,7 @@
this.currentPage = 1;
this.imgList = [];
this.isShow = false;
this.$parent.handleNodeClick(this.currectObj);
}
}
};
......@@ -543,7 +554,7 @@
.img-col {
float: left;
text-align: center;
width: 20%;
width: 10%;
margin-bottom: 20px;
}
......
......@@ -358,7 +358,8 @@ export default {
methods: {
openDialog(row){
this.dialogVisible = true;
this.openDialogUrl = "https://control.aiot.vionyun.com/#/vionIndex?id=" +this.toCode(row.serialnum)
this.openDialogUrl = window._vionConfig.aiotUrl+"/#/vionIndex?id=" +this.toCode(row.serialnum)
console.log(this.openDialogUrl)
},
toCode(str1) {
let str = window.btoa(str1);
......
......@@ -35,10 +35,10 @@
<canvas id='container' class="boxShadow"></canvas>
<div class="time-box1" v-show="progressShow">
<span style="float: left;">{{startTime}}</span>
<span style="color: #2774e9;">{{progressTime}}</span>
<span style="color: #2774e9;">{{progressTime.substring(11)}}</span>
<span style="float: right;">{{endTime}}</span>
</div>
<div id="colorBox" v-show="progressShow"></div>
<!-- <div id="colorBox" v-show="progressShow"></div> -->
</div>
</div>
</div>
......@@ -74,6 +74,7 @@
playBtnShow:false,
colorBoxWidth:0,
channelNum:0,
pauseBtn:false,
granularityListData:[
{
value: 1,
......@@ -219,27 +220,36 @@
playFun(){
this.startTime = moment(this.searchForm.time[0]).format('HH:mm:ss')
this.endTime = moment(this.searchForm.time[1]).format('HH:mm:ss')
document.getElementById("colorBox").innerHTML='';
let openT='',closeT='';
if(this.pauseBtn){
openT = new Date(this.progressTime).getTime();
closeT = new Date(this.searchForm.time[1]).getTime();
}else{
openT = new Date(this.searchForm.time[0]).getTime();
closeT = new Date(this.searchForm.time[1]).getTime();
}
this.getDistribution(moment(openT).format('HH:mm:ss'))
// document.getElementById("colorBox").innerHTML='';
this.playBtnShow = true
this.progressShow = true;
let openT = new Date(this.searchForm.time[0]).getTime();
let closeT = new Date(this.searchForm.time[1]).getTime();
let num = (closeT-openT)/1000/60/this.searchForm.granularity;
this.colorBoxWidth = (this.canvas.width/(num+1)).toFixed(2);
this.colorBoxWidth = this.colorBoxWidth - 0.01
this.getDistribution(moment(openT).format('HH:mm:ss'))
// let num = (closeT-openT)/1000/60/this.searchForm.granularity;
// this.colorBoxWidth = (this.canvas.width/(num+1)).toFixed(2);
// this.colorBoxWidth = this.colorBoxWidth - 0.01
this.timeInterval = setInterval(() => {
openT = openT + 1000 * 60 * this.searchForm.granularity
if(openT > closeT){
clearInterval(this.timeInterval);
return false
}else{
this.progressTime = moment(openT).format('HH:mm:ss')
this.progressTime = moment(openT).format('YYYY-MM-DD HH:mm:ss')
this.getDistribution(moment(openT).format('HH:mm:ss'))
}
}, 1500);
},
pauseFun(){
this.pauseBtn = true;
this.playBtnShow = false
clearInterval(this.timeInterval);
},
......@@ -278,15 +288,15 @@
...green.map((item) => ({ ...item, status: 0 })),
];
if(time){
let color = ''
if(red.length<=this.areaOneObj.safeNum*this.channelNum){
color = 'green'
}else if(red.length>this.areaOneObj.safeNum*this.channelNum && red.length<=this.areaOneObj.warnNum*this.channelNum){
color = 'yellow'
}else{
color = 'red'
}
this.pushBox(color)
// let color = ''
// if(red.length<=this.areaOneObj.safeNum*this.channelNum){
// color = 'green'
// }else if(red.length>this.areaOneObj.safeNum*this.channelNum && red.length<=this.areaOneObj.warnNum*this.channelNum){
// color = 'yellow'
// }else{
// color = 'red'
// }
// this.pushBox(color)
}
this.drawCirlce();
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!