魔墙:将导出按钮换成shift+s

This commit is contained in:
miao 2023-02-01 09:26:29 +08:00
parent 17118497e2
commit 3accecee65
1 changed files with 18 additions and 5 deletions

View File

@ -57,6 +57,11 @@
// //
alignRight(); alignRight();
} }
//
if (evt.keyCode==83&&evt.shiftKey) {
//
export_magic_wall();
}
} }
" "
@keyup=" @keyup="
@ -555,6 +560,7 @@
<q-separator /> <q-separator />
<q-card-actions> <q-card-actions>
<q-btn <q-btn
v-if="magic_isbutton"
:loading="loading" :loading="loading"
flat flat
:label="$t('export magic')" :label="$t('export magic')"
@ -640,13 +646,10 @@ import {
} from "quasar"; } from "quasar";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import GlobalData from "src/common/GlobalData"; import GlobalData from "src/common/GlobalData";
import { HttpProtocol } from "src/entities/HttpProtocol";
import vue3ResizeDrag from "../third_lib/vue3-resize-drag/components/vue3-resize-drag/index.vue"; import vue3ResizeDrag from "../third_lib/vue3-resize-drag/components/vue3-resize-drag/index.vue";
import itemDrag from "src/third_lib/vue3-resize-drag/components/vue3-resize-drag/func/drag";
import MagicWallConfig from "src/entities/MagicWallConfig"; import MagicWallConfig from "src/entities/MagicWallConfig";
import { PointF } from "src/entities/RectF"; import { PointF } from "src/entities/RectF";
import EventBus, { EventNamesDefine } from "src/common/EventBus"; import EventBus, { EventNamesDefine } from "src/common/EventBus";
import { number } from "@intlify/core-base";
export class test_monitor { export class test_monitor {
uuid = ""; uuid = "";
@ -748,6 +751,7 @@ export default defineComponent({
let $t = useI18n(); let $t = useI18n();
let lcm = ref(0); let lcm = ref(0);
let show_dialog = ref(false); let show_dialog = ref(false);
let magic_isbutton=ref(false)
let loading = ref(false); let loading = ref(false);
let wall: Ref<HTMLElement | null> = ref(null); let wall: Ref<HTMLElement | null> = ref(null);
let current_index = ref(-1); let current_index = ref(-1);
@ -997,6 +1001,14 @@ export default defineComponent({
point_right_bottom, point_right_bottom,
]; ];
return point_list; return point_list;
}else{
const point_list =[
{x:item.currentx,y:item.currenty},//
{x:x2,y:item.currenty},//
{x:item.currentx,y:y2},//
{x:x2,y:y2}//
]
return point_list;
} }
}; };
let offsetHeight = ref(0.0); let offsetHeight = ref(0.0);
@ -1272,6 +1284,7 @@ export default defineComponent({
} }
}); });
return { return {
magic_isbutton,
refresh_all, refresh_all,
getpx, getpx,
lcm, lcm,
@ -1361,7 +1374,6 @@ export default defineComponent({
extend(true, item, test_monitor_list.value[element.index]); extend(true, item, test_monitor_list.value[element.index]);
let sizeh = wall_dom.offsetHeight / element.background_h; let sizeh = wall_dom.offsetHeight / element.background_h;
let sizew = wall_dom.offsetWidth / element.background_w; let sizew = wall_dom.offsetWidth / element.background_w;
item.currentx = element.lt.x * wall_dom.offsetWidth; item.currentx = element.lt.x * wall_dom.offsetWidth;
item.currenty = element.lt.y * wall_dom.offsetHeight; item.currenty = element.lt.y * wall_dom.offsetHeight;
percenter.value = parseFloat(element.percenter.toString()); percenter.value = parseFloat(element.percenter.toString());
@ -1622,6 +1634,7 @@ export default defineComponent({
test_monitor_wall.value[index].isShow = true; test_monitor_wall.value[index].isShow = true;
realtime_upload(); realtime_upload();
}, },
//cache
closeAllWindows() { closeAllWindows() {
current_index.value = -1; current_index.value = -1;
test_monitor_wall.value.forEach((ele) => { test_monitor_wall.value.forEach((ele) => {
@ -1898,7 +1911,7 @@ export default defineComponent({
} }
}); });
res=res.replace(/\"/g,""); res=res.replace(/\"/g,"");
const status = exportFile("important.txt", res); const status = exportFile("magic_wall.txt", res);
if (status === true) { if (status === true) {
} else { } else {
$q.notify({ $q.notify({