Commit 68abce88 by 李君

优化

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