优化点击获取图片

jc
fanluyan 1 year ago
parent 0117821a72
commit 10cd00ab87

@ -78,3 +78,6 @@
.el-image-viewer__actions { .el-image-viewer__actions {
background: rgba(0, 0, 0, 0.15); background: rgba(0, 0, 0, 0.15);
} }
.el-form-item__label{
padding: 0 6px 0 0;
}

@ -68,7 +68,7 @@
<div class="paramsDate setTimebtn"> <div class="paramsDate setTimebtn">
<h3>操作项</h3> <h3>操作项</h3>
<div class="buttonGroup"> <div class="buttonGroup">
<takePicButton v-if="showButton('pzShowBtn')"></takePicButton> <takePicButton v-if="showButton('pzShowBtn')" ref="takepicRef"></takePicButton>
<takeVideoButton v-if="showButton('spShowBtn')"></takeVideoButton> <takeVideoButton v-if="showButton('spShowBtn')"></takeVideoButton>
<deviceInfoButton></deviceInfoButton> <deviceInfoButton></deviceInfoButton>
<scheduleButton v-if="showButton('pztimeShowBtn')"></scheduleButton> <scheduleButton v-if="showButton('pztimeShowBtn')"></scheduleButton>
@ -292,6 +292,10 @@ export default {
this.getDateTime(); this.getDateTime();
}, },
methods: { methods: {
takepicFun(){
console.log("点击了我自己,准备取消轮巡")
this.$refs.takepicRef.clearFn();
},
// //
showButton(key) { showButton(key) {
if (this.roleUser !== "0") { if (this.roleUser !== "0") {

@ -203,10 +203,17 @@
<el-button <el-button
type="primary" type="primary"
:disabled="channelsetLoading" :disabled="channelsetLoading"
@click="handleConfim(true)" @click="handleConfim(false)"
:loading="channelLoading"
> </el-button > </el-button
> <el-button
type="primary"
:disabled="channelsetLoading"
@click="handleConfim(true)"
>保存并关闭</el-button
> >
<!-- :loading="channelLoading" -->
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -532,7 +539,8 @@ export default {
} }
this.searchBtn(); this.searchBtn();
}, },
handleConfim() {
handleConfim(flag) {
console.log("点击了确定"); console.log("点击了确定");
console.log(this.channelForm); console.log(this.channelForm);
@ -727,7 +735,7 @@ export default {
{ name: "type21", value: 0 }, { name: "type21", value: 0 },
]; ];
console.log(params); console.log(params);
this.setTermFn(params); this.setTermFn(params,flag);
} else { } else {
this.$message({ this.$message({
duration: 1500, duration: 1500,
@ -738,7 +746,7 @@ export default {
} }
}); });
}, },
setTermFn(val) { setTermFn(val,flag) {
setTermCamera({ setTermCamera({
termId: this.areaData.id, termId: this.areaData.id,
list: val, list: val,
@ -747,16 +755,17 @@ export default {
console.log(res); console.log(res);
this.requestid = res.data.requestId; this.requestid = res.data.requestId;
this.getTakechannelStatus(); this.getTakechannelStatus(flag);
clearInterval(this.setTimer); clearInterval(this.setTimer);
this.setTimer = window.setInterval(() => { this.setTimer = window.setInterval(() => {
this.getTakechannelStatus(); this.getTakechannelStatus(flag);
this.setNum++; this.setNum++;
}, 1000); }, 1000);
}) })
.catch((err) => {}); .catch((err) => {});
}, },
getTakechannelStatus() { getTakechannelStatus(flag) {
console.log("aaaaaaaaaaaaaaaaaaaaaa",flag)
getTermCameraRequest({ requestid: this.requestid }) getTermCameraRequest({ requestid: this.requestid })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -764,6 +773,10 @@ export default {
window.clearInterval(this.setTimer); window.clearInterval(this.setTimer);
this.setTimer = null; this.setTimer = null;
this.setNum = 0; this.setNum = 0;
if(flag){
this.isShow = false;
}
//this.isShow = false; //this.isShow = false;
this.channelLoading = false; this.channelLoading = false;
this.$message({ this.$message({
@ -774,6 +787,9 @@ export default {
}); });
} else if (this.setNum > 3) { } else if (this.setNum > 3) {
// this.isShow = false; // this.isShow = false;
if(flag){
this.isShow = false;
}
window.clearInterval(this.setTimer); window.clearInterval(this.setTimer);
this.setTimer = null; this.setTimer = null;
this.setNum = 0; this.setNum = 0;
@ -1050,6 +1066,7 @@ export default {
.el-slider { .el-slider {
width: 200px; width: 200px;
margin-right: 12px; margin-right: 12px;
margin-left: 10px;
.el-slider__runway { .el-slider__runway {
height: 8px; height: 8px;
margin: 12px 0; margin: 12px 0;

@ -329,6 +329,7 @@ export default {
this.$store.commit("protocol", this.currentData.protocol); //currentDatavuex this.$store.commit("protocol", this.currentData.protocol); //currentDatavuex
this.$store.commit("cmdId", this.currentData.cmdid); //currentDatavuex this.$store.commit("cmdId", this.currentData.cmdid); //currentDatavuex
this.$parent.getCurrentData(); this.$parent.getCurrentData();
//this.$refs.tree.scrollTo(data); //this.$refs.tree.scrollTo(data);
// localStorage.setItem("currentData", JSON.stringify(this.currentData)); // localStorage.setItem("currentData", JSON.stringify(this.currentData));
}, },

@ -246,6 +246,7 @@ export default {
new Date(val.date).getTime(), new Date(val.date).getTime(),
this.termId this.termId
); // id termid ); // id termid
this.$message({ this.$message({
duration: 1500, duration: 1500,
showClose: true, showClose: true,
@ -264,10 +265,15 @@ export default {
}); });
}, },
clearFn() { clearFn() {
console.log("我要取消了轮巡")
clearInterval(this.statusTimer); clearInterval(this.statusTimer);
this.statusTimer = null; this.statusTimer = null;
this.statusNum = 0; this.statusNum = 0;
this.picLoading = false; this.picLoading = false;
console.log("我要取消了轮巡1111111111111111111111111111111")
clearInterval(this.picPimer);
this.picPimer = null;
this.picNum = 0;
}, },
}, },
destroyed() { destroyed() {

@ -120,13 +120,13 @@ export default {
console.log("杆塔"); console.log("杆塔");
this.LineFlag = false; this.LineFlag = false;
this.towerFlag = true; this.towerFlag = true;
this.terminalPhoto = []; this.terminalPhoto = [];
this.protocolInfo = this.treeSelectData.protocol; this.protocolInfo = this.treeSelectData.protocol;
console.log("asddddddddddddddddddddd", this.treeSelectData); console.log("asddddddddddddddddddddd", this.treeSelectData);
this.towertitle = this.treeSelectData.name; this.towertitle = this.treeSelectData.name;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.areaRef.getChannelList(); this.$refs.areaRef.getChannelList();
this.$refs.areaRef.takepicFun();
}); });
} }
}, },

Loading…
Cancel
Save