非法采矿、耕地非粮化、重点问题、巡查审计专题方位角图片修改

dianlixunjian
徐景良 2024-09-19 17:27:08 +08:00
parent 3d83ec988d
commit 718bca919b
7 changed files with 81 additions and 95 deletions

View File

@ -503,24 +503,22 @@
const isInitImageLisener = ref<Boolean>(false);
//
function handlerImageChange(e): void {
isInitImageLisener.value = false;
if (e && !isInitImageLisener.value) {
setTimeout(function () {
const targetNode = document.getElementsByClassName('ant-image-preview-img');
//
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'attributes') {
if (targetNode[0].getAttribute(mutation.attributeName).match('http')) {
handlerPreviewImage(0, targetNode[0].getAttribute(mutation.attributeName));
targetNode?.forEach((node,index)=>{
let imageObserver = new MutationObserver((mutationsList)=>{
for(const mutation of mutationsList){
if (node.getAttribute(mutation.attributeName).match('http')){
handlerPreviewImage(0, node.getAttribute(mutation.attributeName));
}
}
}
});
//
const config = { attributes: true };
//
observer.observe(targetNode[0], config);
isInitImageLisener.value = true;
})
const config = { attributes: true };
imageObserver.observe(node, config);
isInitImageLisener.value = true;
})
}, 250);
}
}

View File

@ -502,24 +502,22 @@
const isInitImageLisener = ref<Boolean>(false);
//
function handlerImageChange(e): void {
isInitImageLisener.value = false;
if (e && !isInitImageLisener.value) {
setTimeout(function () {
const targetNode = document.getElementsByClassName('ant-image-preview-img');
//
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'attributes') {
if (targetNode[0].getAttribute(mutation.attributeName).match('http')) {
handlerPreviewImage(0, targetNode[0].getAttribute(mutation.attributeName));
targetNode?.forEach((node,index)=>{
let imageObserver = new MutationObserver((mutationsList)=>{
for(const mutation of mutationsList){
if (node.getAttribute(mutation.attributeName).match('http')){
handlerPreviewImage(0, node.getAttribute(mutation.attributeName));
}
}
}
});
//
const config = { attributes: true };
//
observer.observe(targetNode[0], config);
isInitImageLisener.value = true;
})
const config = { attributes: true };
imageObserver.observe(node, config);
isInitImageLisener.value = true;
})
}, 250);
}
}

View File

@ -888,25 +888,23 @@
const isInitImageLisener = ref<Boolean>(false);
//
function handlerImageChange(e):void{
if(e && !isInitImageLisener.value){
setTimeout(function(){
isInitImageLisener.value = false;
if (e && !isInitImageLisener.value) {
setTimeout(function () {
const targetNode = document.getElementsByClassName('ant-image-preview-img');
//
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'attributes') {
if(targetNode[0].getAttribute(mutation.attributeName).match("http")){
handlerPreviewImage(0,targetNode[0].getAttribute(mutation.attributeName))
}
}
targetNode?.forEach((node,index)=>{
let imageObserver = new MutationObserver((mutationsList)=>{
for(const mutation of mutationsList){
if (node.getAttribute(mutation.attributeName).match('http')){
handlerPreviewImage(0, node.getAttribute(mutation.attributeName));
}
}
});
//
const config = { attributes: true };
//
observer.observe(targetNode[0], config);
isInitImageLisener.value = true;
},250)
})
const config = { attributes: true };
imageObserver.observe(node, config);
isInitImageLisener.value = true;
})
}, 250);
}
}
</script>

View File

@ -522,24 +522,22 @@
const isInitImageLisener = ref<Boolean>(false);
//
function handlerImageChange(e): void {
isInitImageLisener.value = false;
if (e && !isInitImageLisener.value) {
setTimeout(function () {
const targetNode = document.getElementsByClassName('ant-image-preview-img');
//
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'attributes') {
if (targetNode[0].getAttribute(mutation.attributeName).match('http')) {
handlerPreviewImage(0, targetNode[0].getAttribute(mutation.attributeName));
targetNode?.forEach((node,index)=>{
let imageObserver = new MutationObserver((mutationsList)=>{
for(const mutation of mutationsList){
if (node.getAttribute(mutation.attributeName).match('http')){
handlerPreviewImage(0, node.getAttribute(mutation.attributeName));
}
}
}
});
//
const config = { attributes: true };
//
observer.observe(targetNode[0], config);
isInitImageLisener.value = true;
})
const config = { attributes: true };
imageObserver.observe(node, config);
isInitImageLisener.value = true;
})
}, 250);
}
}

View File

@ -400,24 +400,22 @@
const isInitImageLisener = ref<Boolean>(false);
//
function handlerImageChange(e): void {
isInitImageLisener.value = false;
if (e && !isInitImageLisener.value) {
setTimeout(function () {
const targetNode = document.getElementsByClassName('ant-image-preview-img');
//
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'attributes') {
if (targetNode[0].getAttribute(mutation.attributeName).match('http')) {
handlerPreviewImage(0, targetNode[0].getAttribute(mutation.attributeName));
targetNode?.forEach((node,index)=>{
let imageObserver = new MutationObserver((mutationsList)=>{
for(const mutation of mutationsList){
if (node.getAttribute(mutation.attributeName).match('http')){
handlerPreviewImage(0, node.getAttribute(mutation.attributeName));
}
}
}
});
//
const config = { attributes: true };
//
observer.observe(targetNode[0], config);
isInitImageLisener.value = true;
})
const config = { attributes: true };
imageObserver.observe(node, config);
isInitImageLisener.value = true;
})
}, 250);
}
}

View File

@ -386,24 +386,22 @@
const isInitImageLisener = ref<Boolean>(false);
//
function handlerImageChange(e): void {
isInitImageLisener.value = false;
if (e && !isInitImageLisener.value) {
setTimeout(function () {
const targetNode = document.getElementsByClassName('ant-image-preview-img');
//
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'attributes') {
if (targetNode[0].getAttribute(mutation.attributeName).match('http')) {
handlerPreviewImage(0, targetNode[0].getAttribute(mutation.attributeName));
targetNode?.forEach((node,index)=>{
let imageObserver = new MutationObserver((mutationsList)=>{
for(const mutation of mutationsList){
if (node.getAttribute(mutation.attributeName).match('http')){
handlerPreviewImage(0, node.getAttribute(mutation.attributeName));
}
}
}
});
//
const config = { attributes: true };
//
observer.observe(targetNode[0], config);
isInitImageLisener.value = true;
})
const config = { attributes: true };
imageObserver.observe(node, config);
isInitImageLisener.value = true;
})
}, 250);
}
}

View File

@ -870,24 +870,22 @@
const isInitImageLisener = ref<Boolean>(false);
//
function handlerImageChange(e): void {
isInitImageLisener.value = false;
if (e && !isInitImageLisener.value) {
setTimeout(function () {
const targetNode = document.getElementsByClassName('ant-image-preview-img');
//
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'attributes') {
if (targetNode[0].getAttribute(mutation.attributeName).match('http')) {
handlerPreviewImage(0, targetNode[0].getAttribute(mutation.attributeName));
targetNode?.forEach((node,index)=>{
let imageObserver = new MutationObserver((mutationsList)=>{
for(const mutation of mutationsList){
if (node.getAttribute(mutation.attributeName).match('http')){
handlerPreviewImage(0, node.getAttribute(mutation.attributeName));
}
}
}
});
//
const config = { attributes: true };
//
observer.observe(targetNode[0], config);
isInitImageLisener.value = true;
})
const config = { attributes: true };
imageObserver.observe(node, config);
isInitImageLisener.value = true;
})
}, 250);
}
}