Compare commits
1 Commits
master_v2_
...
blending
Author | SHA1 | Date |
---|---|---|
shefengchun | 85adb779af |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "media_player_client",
|
"name": "media_player_client",
|
||||||
"version": "1.6.0",
|
"version": "1.5.6",
|
||||||
"description": "A Quasar Framework app",
|
"description": "A Quasar Framework app",
|
||||||
"productName": "MediaPlayerClient",
|
"productName": "MediaPlayerClient",
|
||||||
"author": "fangxiang <fangxiang@cloudview.work>",
|
"author": "fangxiang <fangxiang@cloudview.work>",
|
||||||
|
|
|
@ -41,12 +41,9 @@ module.exports = configure(function (ctx) {
|
||||||
// Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
|
// Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
|
||||||
build: {
|
build: {
|
||||||
vueRouterMode: "hash", // available values: 'hash', 'history'
|
vueRouterMode: "hash", // available values: 'hash', 'history'
|
||||||
uglifyOptions: {
|
|
||||||
compress: {
|
|
||||||
drop_console: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// transpile: false,
|
// transpile: false,
|
||||||
|
|
||||||
// Add dependencies for transpiling with Babel (Array of string/regex)
|
// Add dependencies for transpiling with Babel (Array of string/regex)
|
||||||
// (from node_modules, which are by default not transpiled).
|
// (from node_modules, which are by default not transpiled).
|
||||||
// Applies only if "transpile" is set to true.
|
// Applies only if "transpile" is set to true.
|
||||||
|
@ -55,7 +52,7 @@ module.exports = configure(function (ctx) {
|
||||||
// rtl: true, // https://v2.quasar.dev/options/rtl-support
|
// rtl: true, // https://v2.quasar.dev/options/rtl-support
|
||||||
// preloadChunks: true,
|
// preloadChunks: true,
|
||||||
// showProgress: false,
|
// showProgress: false,
|
||||||
gzip: true,
|
// gzip: true,
|
||||||
// analyze: true,
|
// analyze: true,
|
||||||
|
|
||||||
// Options below are automatically set depending on the env, set them if you want to override
|
// Options below are automatically set depending on the env, set them if you want to override
|
||||||
|
|
38
src/App.vue
38
src/App.vue
|
@ -15,8 +15,6 @@ import GlobalData from "./common/GlobalData";
|
||||||
import { EProductNames } from "./entities/ProductNames";
|
import { EProductNames } from "./entities/ProductNames";
|
||||||
import { api } from "./boot/axios";
|
import { api } from "./boot/axios";
|
||||||
import { WuJieInitializer } from "./common/WuJieInitializer";
|
import { WuJieInitializer } from "./common/WuJieInitializer";
|
||||||
import ClientConnection from "./common/ClientConnection";
|
|
||||||
import { Common } from "./common/Common";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "App",
|
name: "App",
|
||||||
|
@ -119,7 +117,7 @@ export default defineComponent({
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
EventBus.getInstance().on(EventNamesDefine.CheckDebug, () => {
|
EventBus.getInstance().on(EventNamesDefine.CheckDebug2, () => {
|
||||||
const to_normal_url = () => {
|
const to_normal_url = () => {
|
||||||
const p1 = window.location.href.indexOf("?debug");
|
const p1 = window.location.href.indexOf("?debug");
|
||||||
const p2 = window.location.href.indexOf("#");
|
const p2 = window.location.href.indexOf("#");
|
||||||
|
@ -286,40 +284,6 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
EventBus.getInstance().on(
|
|
||||||
EventNamesDefine.CurrentConnectConnected,
|
|
||||||
async (connection: ClientConnection) => {
|
|
||||||
const show_version_tip = () =>
|
|
||||||
$q.dialog({
|
|
||||||
persistent: true,
|
|
||||||
title: $t.t("Version Mismatch !"),
|
|
||||||
message: $t.t(
|
|
||||||
"Version Mismatch ! Please Upgrade The Software Again ! Otherwise, The File Function Cannot Be Used !"
|
|
||||||
),
|
|
||||||
});
|
|
||||||
if (connection) {
|
|
||||||
let count = 0;
|
|
||||||
while (
|
|
||||||
connection &&
|
|
||||||
!connection.is_login &&
|
|
||||||
count < (1000 * 10) / 100 /* 10 S */
|
|
||||||
) {
|
|
||||||
await Common.waitFor(100);
|
|
||||||
}
|
|
||||||
if (count < (1000 * 10) / 100) {
|
|
||||||
try {
|
|
||||||
const response = await connection.getHttpInterfaceVersion();
|
|
||||||
if (!response || response.version != 2) {
|
|
||||||
show_version_tip();
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
show_version_tip();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -710,17 +710,6 @@ export default class ClientConnection {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public setMagicWallList(list:any) {
|
|
||||||
this.ws?.send(
|
|
||||||
JSON.stringify(
|
|
||||||
new Protocol.SetApplicationConfigRequestEntity(
|
|
||||||
0,
|
|
||||||
"magic_list",
|
|
||||||
typeof (list) == 'string' ? list : JSON.stringify(list)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public setConfigure(k: string, v: string) {
|
public setConfigure(k: string, v: string) {
|
||||||
this.ws?.send(
|
this.ws?.send(
|
||||||
|
@ -834,7 +823,6 @@ export default class ClientConnection {
|
||||||
active_code: string,
|
active_code: string,
|
||||||
online: boolean,
|
online: boolean,
|
||||||
active_forever: boolean,
|
active_forever: boolean,
|
||||||
attribute: number,
|
|
||||||
secret_key?: string,
|
secret_key?: string,
|
||||||
hour?: number
|
hour?: number
|
||||||
) {
|
) {
|
||||||
|
@ -845,7 +833,6 @@ export default class ClientConnection {
|
||||||
active_code,
|
active_code,
|
||||||
online,
|
online,
|
||||||
active_forever,
|
active_forever,
|
||||||
attribute,
|
|
||||||
secret_key,
|
secret_key,
|
||||||
hour,
|
hour,
|
||||||
0
|
0
|
||||||
|
@ -1356,12 +1343,6 @@ export default class ClientConnection {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getHttpInterfaceVersion() {
|
|
||||||
return await this.doRpc<Protocol.RpcGetHttpInterfaceVersionResponseEntity>(
|
|
||||||
new Protocol.RpcGetHttpInterfaceVersionRequestEntity()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async setJointActionEquipment(
|
public async setJointActionEquipment(
|
||||||
entity: JointActionEquipmentTableEntity
|
entity: JointActionEquipmentTableEntity
|
||||||
) {
|
) {
|
||||||
|
@ -1457,8 +1438,7 @@ export default class ClientConnection {
|
||||||
column: number,
|
column: number,
|
||||||
location: number,
|
location: number,
|
||||||
enable: boolean,
|
enable: boolean,
|
||||||
width: number,
|
width: number
|
||||||
auto_sync: boolean,
|
|
||||||
) {
|
) {
|
||||||
return await this.doRpc<Protocol.NoneResponse>(
|
return await this.doRpc<Protocol.NoneResponse>(
|
||||||
new Protocol.SetBlendingOverlapRequestEntity(
|
new Protocol.SetBlendingOverlapRequestEntity(
|
||||||
|
@ -1466,8 +1446,7 @@ export default class ClientConnection {
|
||||||
column,
|
column,
|
||||||
location,
|
location,
|
||||||
enable,
|
enable,
|
||||||
width,
|
width
|
||||||
auto_sync
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1572,15 +1551,21 @@ export default class ClientConnection {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async SetProjectorResolution(width: number, height: number) {
|
public async SetProjectorResolution(
|
||||||
|
width: number,
|
||||||
|
height: number
|
||||||
|
) {
|
||||||
return await this.doRpc<Protocol.GetBlendingConfigResponseEntity>(
|
return await this.doRpc<Protocol.GetBlendingConfigResponseEntity>(
|
||||||
new Protocol.SetProjectorResolutionRequestEntity(width, height)
|
new Protocol.SetProjectorResolutionRequestEntity(width, height)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async SetProjectorLayout(row: number, column: number) {
|
public async SetProjectorLayout(
|
||||||
|
row: number,
|
||||||
|
column: number
|
||||||
|
) {
|
||||||
return await this.doRpc<Protocol.GetBlendingConfigResponseEntity>(
|
return await this.doRpc<Protocol.GetBlendingConfigResponseEntity>(
|
||||||
new Protocol.SetProjectorLayoutRequestEntity(row, column)
|
new Protocol.SetProjectorResolutionRequestEntity(row, column)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-card class="overflow-hidden" style="overflow-y: scroll; max-width: 40vw">
|
<q-card class="overflow-hidden" style="overflow-y: scroll; max-width: 35vw">
|
||||||
<q-form>
|
<q-form>
|
||||||
<q-card-section class="q-ma-none q-pa-sm">
|
<q-card-section class="q-ma-none q-pa-sm">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -37,67 +37,8 @@
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-section style="max-height: 60vh; width: 40vw" class="scroll">
|
<q-card-section style="max-height: 50vh; width: 35vw" class="scroll">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item>
|
|
||||||
<q-item-section avatar>{{ $t("product") }}</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-radio
|
|
||||||
v-model="selected_product"
|
|
||||||
val=""
|
|
||||||
:label="$t('normal')"
|
|
||||||
color="cyan"
|
|
||||||
class="offset-md-1 col"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-radio
|
|
||||||
v-model="selected_product"
|
|
||||||
val="magic_wall"
|
|
||||||
:label="$t('magic wall')"
|
|
||||||
color="cyan"
|
|
||||||
class="offset-md-1 col"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-radio
|
|
||||||
v-model="selected_product"
|
|
||||||
val="fusion"
|
|
||||||
:label="$t('fusion')"
|
|
||||||
color="cyan"
|
|
||||||
class="offset-md-1 col"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item v-if="selected_product == 'fusion'">
|
|
||||||
<q-item-section avatar>{{ $t("fusion") }}</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<div class="row" v-for="(row, row_index) in 3" :key="row">
|
|
||||||
<q-radio
|
|
||||||
v-for="(item, item_index) in 3"
|
|
||||||
:key="row_index * 3 + item"
|
|
||||||
v-model="function_fusion_count"
|
|
||||||
:val="row_index * 3 + item"
|
|
||||||
:label="
|
|
||||||
(row_index * 3 + item).toString() +
|
|
||||||
$t(' ') +
|
|
||||||
$t('fusion out')
|
|
||||||
"
|
|
||||||
color="cyan"
|
|
||||||
class="col"
|
|
||||||
:class="item_index ? 'offset-md-1 ' : ''"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar>{{ $t("function") }}</q-item-section>
|
<q-item-section avatar>{{ $t("function") }}</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
|
@ -128,6 +69,7 @@
|
||||||
:disable="loading"
|
:disable="loading"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar></q-item-section>
|
<q-item-section avatar></q-item-section>
|
||||||
|
@ -141,22 +83,40 @@
|
||||||
:disable="loading"
|
:disable="loading"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
|
||||||
<q-item>
|
|
||||||
<q-item-section> </q-item-section>
|
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
|
<q-checkbox
|
||||||
|
v-model="function_magic_wall"
|
||||||
|
@update:model-value="changeMagic()"
|
||||||
|
:label="$t('magic wall')"
|
||||||
|
color="cyan"
|
||||||
|
class="offset-md-1 col"
|
||||||
|
:loading="loading"
|
||||||
|
:disable="loading"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
<q-checkbox
|
||||||
|
v-model="function_fusion"
|
||||||
|
@update:model-value="changeFusion()"
|
||||||
|
:label="$t('fusion')"
|
||||||
|
color="cyan"
|
||||||
|
class="offset-md-1 col"
|
||||||
|
:loading="loading"
|
||||||
|
:disable="loading"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section avatar>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="setDeviceAttributeAndProduct"
|
@click="setDeviceAttribute"
|
||||||
:label="$t('commit')"
|
:label="$t('commit')"
|
||||||
no-caps
|
no-caps
|
||||||
outline
|
outline
|
||||||
class="q-px-lg"
|
|
||||||
color="primary"
|
color="primary"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section> </q-item-section>
|
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator />
|
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
{{ $t("language") }}
|
{{ $t("language") }}
|
||||||
|
@ -193,6 +153,7 @@
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-separator class="q-mt-md" />
|
<q-separator class="q-mt-md" />
|
||||||
|
|
||||||
<q-item class="q-mt-md">
|
<q-item class="q-mt-md">
|
||||||
|
@ -238,10 +199,8 @@ import { useStore } from "src/store";
|
||||||
import { useQuasar, date as $date } from "quasar";
|
import { useQuasar, date as $date } 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 {
|
import { Protocol } from "src/entities/WSProtocol";
|
||||||
EDeviceAttribute,
|
import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
|
||||||
EDeviceAttributeHelper,
|
|
||||||
} from "src/entities/EDeviceAttribute";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentAdvancedDebugDialog",
|
name: "ComponentAdvancedDebugDialog",
|
||||||
|
@ -267,44 +226,10 @@ export default defineComponent({
|
||||||
const function_magic_wall = ref(
|
const function_magic_wall = ref(
|
||||||
$store.state.custom_defines.function_magic_wall
|
$store.state.custom_defines.function_magic_wall
|
||||||
);
|
);
|
||||||
const function_fusion = ref($store.state.custom_defines.function_fusion);
|
const function_fusion = ref(
|
||||||
const function_fusion_count = ref(0);
|
$store.state.custom_defines.function_magic_wall
|
||||||
|
);
|
||||||
const target_language = ref("zh-CN");
|
const target_language = ref("zh-CN");
|
||||||
const selected_product = ref("");
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => selected_product.value,
|
|
||||||
(newValue) => {
|
|
||||||
function_fusion.value = newValue == "fusion";
|
|
||||||
function_magic_wall.value = newValue == "magic_wall";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const getFinalAttribute = () => {
|
|
||||||
let attribute = EDeviceAttribute.None;
|
|
||||||
if (function_center_control.value) {
|
|
||||||
attribute |= EDeviceAttribute.CenterControl;
|
|
||||||
}
|
|
||||||
if (function_output_board.value) {
|
|
||||||
attribute |= EDeviceAttribute.OutputBoard;
|
|
||||||
}
|
|
||||||
if (function_mirroring_output.value) {
|
|
||||||
attribute |= EDeviceAttribute.MirroringOutput;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (function_custom_ISV.value) {
|
|
||||||
attribute |= EDeviceAttribute.CustomISV;
|
|
||||||
}
|
|
||||||
if (function_magic_wall.value) {
|
|
||||||
attribute |= EDeviceAttribute.ProductMagicWall;
|
|
||||||
}
|
|
||||||
if (function_fusion.value) {
|
|
||||||
attribute |= EDeviceAttributeHelper.getProdictFusionAttributeByIndex(
|
|
||||||
function_fusion_count.value
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return attribute;
|
|
||||||
};
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
show_dialog,
|
show_dialog,
|
||||||
|
@ -314,10 +239,8 @@ export default defineComponent({
|
||||||
function_custom_ISV,
|
function_custom_ISV,
|
||||||
function_magic_wall,
|
function_magic_wall,
|
||||||
function_fusion,
|
function_fusion,
|
||||||
function_fusion_count,
|
|
||||||
function_mirroring_output,
|
function_mirroring_output,
|
||||||
target_language,
|
target_language,
|
||||||
selected_product,
|
|
||||||
|
|
||||||
showDialog() {
|
showDialog() {
|
||||||
show_dialog.value = true;
|
show_dialog.value = true;
|
||||||
|
@ -331,18 +254,8 @@ export default defineComponent({
|
||||||
$store.state.custom_defines.function_mirroring_output;
|
$store.state.custom_defines.function_mirroring_output;
|
||||||
function_magic_wall.value =
|
function_magic_wall.value =
|
||||||
$store.state.custom_defines.function_magic_wall;
|
$store.state.custom_defines.function_magic_wall;
|
||||||
function_fusion.value = $store.state.custom_defines.function_fusion;
|
function_fusion.value =
|
||||||
function_fusion_count.value =
|
$store.state.custom_defines.function_fusion;
|
||||||
EDeviceAttributeHelper.getProductFusionOutputCountDefault(
|
|
||||||
$store.state.device_attribute,
|
|
||||||
1
|
|
||||||
);
|
|
||||||
|
|
||||||
if (function_magic_wall.value) {
|
|
||||||
selected_product.value = "magic_wall";
|
|
||||||
} else if (function_fusion.value) {
|
|
||||||
selected_product.value = "fusion";
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
resetData() {
|
resetData() {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
@ -352,8 +265,7 @@ export default defineComponent({
|
||||||
function_mirroring_output.value = false;
|
function_mirroring_output.value = false;
|
||||||
function_custom_ISV.value = false;
|
function_custom_ISV.value = false;
|
||||||
function_magic_wall.value=false;
|
function_magic_wall.value=false;
|
||||||
function_fusion.value = false;
|
function_fusion.value=false
|
||||||
selected_product.value = "";
|
|
||||||
},
|
},
|
||||||
|
|
||||||
restartDevice() {
|
restartDevice() {
|
||||||
|
@ -431,22 +343,27 @@ export default defineComponent({
|
||||||
</div>`,
|
</div>`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setDeviceAttributeAndProduct() {
|
|
||||||
let attribute = getFinalAttribute();
|
|
||||||
GlobalData.getInstance()
|
|
||||||
.getCurrentClient()
|
|
||||||
?.setDeviceAttribute(attribute);
|
|
||||||
|
|
||||||
$q.notify({
|
|
||||||
color: "positive",
|
|
||||||
icon: "done",
|
|
||||||
message: $t.t("set device function") + $t.t("success") + "!",
|
|
||||||
position: "top",
|
|
||||||
timeout: 1500,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setDeviceAttribute() {
|
setDeviceAttribute() {
|
||||||
let attribute = getFinalAttribute();
|
let attribute = EDeviceAttribute.None;
|
||||||
|
if (function_center_control.value) {
|
||||||
|
attribute |= EDeviceAttribute.CenterControl;
|
||||||
|
}
|
||||||
|
if (function_output_board.value) {
|
||||||
|
attribute |= EDeviceAttribute.OutputBoard;
|
||||||
|
}
|
||||||
|
if (function_mirroring_output.value) {
|
||||||
|
attribute |= EDeviceAttribute.MirroringOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (function_custom_ISV.value) {
|
||||||
|
attribute |= EDeviceAttribute.CustomISV;
|
||||||
|
}
|
||||||
|
if (function_magic_wall.value) {
|
||||||
|
attribute |= EDeviceAttribute.ProductMagicWall;
|
||||||
|
}
|
||||||
|
if (function_fusion.value) {
|
||||||
|
attribute |= EDeviceAttribute.ProductFusion;
|
||||||
|
}
|
||||||
|
|
||||||
GlobalData.getInstance()
|
GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
|
@ -481,7 +398,7 @@ export default defineComponent({
|
||||||
if(function_fusion.value){
|
if(function_fusion.value){
|
||||||
function_magic_wall.value=false;
|
function_magic_wall.value=false;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -222,11 +222,10 @@
|
||||||
style="color: #ffbe4a; font-size: 2.5em"
|
style="color: #ffbe4a; font-size: 2.5em"
|
||||||
></q-icon>
|
></q-icon>
|
||||||
{{
|
{{
|
||||||
props.value.length > 25
|
props.value.length > 60
|
||||||
? props.value.substr(0, 25) + "..."
|
? props.value.substr(0, 60) + "..."
|
||||||
: props.value
|
: props.value
|
||||||
}}
|
}}
|
||||||
|
|
||||||
<q-tooltip> {{ props.value }} </q-tooltip>
|
<q-tooltip> {{ props.value }} </q-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="props.col.name == 'file_size'">
|
<div v-else-if="props.col.name == 'file_size'">
|
||||||
|
@ -919,6 +918,7 @@ export default defineComponent({
|
||||||
const response = await GlobalData.getInstance()
|
const response = await GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.CreateDirectoryFileManager(path.value, data);
|
?.CreateDirectoryFileManager(path.value, data);
|
||||||
|
console.log(response);
|
||||||
if (response && response.success) {
|
if (response && response.success) {
|
||||||
refresh_file_list();
|
refresh_file_list();
|
||||||
$q.notify({
|
$q.notify({
|
||||||
|
@ -1090,8 +1090,6 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
uploading.value = false;
|
uploading.value = false;
|
||||||
refresh_file_list()
|
|
||||||
uploader.value.reset()
|
|
||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
copyFile(file: FileEntity) {
|
copyFile(file: FileEntity) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,19 +17,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="row" v-show="ispad">
|
<div class="row">
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-2 q-px-md" @mousewheel="details_selsect"> <q-select class="q-pt-md" :label="$t('point')" :dense="true" filled
|
<div class="col-2 q-px-md"> <q-select class="q-pt-md" :label="$t('point')" :dense="true" filled
|
||||||
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
|
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
|
||||||
map-options /></div>
|
map-options /></div>
|
||||||
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event,'x')">
|
<div class="col-2 q-px-md"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true"
|
v-model="value[options_model].x" @update:model-value="chang(options_model, $event, 'h')" label="x"
|
||||||
v-model="value[options_model].x" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="x"
|
lazy-rules />
|
||||||
lazy-rules >
|
|
||||||
</q-input>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event,'y')"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
<div class="col-2 q-px-md"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
||||||
v-model="value[options_model].y" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="y"
|
v-model="value[options_model].y" @update:model-value="chang(options_model, $event, 'h')" label="y"
|
||||||
lazy-rules /></div>
|
lazy-rules /></div>
|
||||||
<div class="q-pt-md col-2">
|
<div class="q-pt-md col-2">
|
||||||
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
|
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
|
||||||
|
@ -39,76 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div v-show="!ispad" style="display: flex;justify-content: space-around;">
|
|
||||||
|
|
||||||
<div class="q-px-md" @mousewheel="details_selsect"> <q-select class="q-pt-md" :label="$t('point')" :dense="true" filled
|
|
||||||
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
|
|
||||||
map-options /></div>
|
|
||||||
<div class="q-px-md" @mousewheel="details_selsect_val($event,'x')">
|
|
||||||
<q-input filled type="number" class="q-pt-md" :dense="true"
|
|
||||||
v-model="value[options_model].x" @focus="input_x_focus=true" @blur="input_x_focus=false" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="x"
|
|
||||||
lazy-rules >
|
|
||||||
<template v-if="input_x_focus" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="mousedown('+','x')" @mouseup="mouseup" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="mousedown('-','x')" @mouseup="mouseup" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="q-px-md" @mousewheel="details_selsect_val($event,'y')"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
|
||||||
v-model="value[options_model].y" @focus="input_y_focus=true" @blur="input_y_focus=false" @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" @update:model-value="chang(options_model, $event, 'h')" label="y"
|
|
||||||
lazy-rules >
|
|
||||||
<template v-if="input_y_focus" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="mousedown('+','y')" @mouseup="mouseup" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="mousedown('-','y')" @mouseup="mouseup" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
<div class="q-pt-md">
|
|
||||||
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
|
|
||||||
</div>
|
|
||||||
<div class="q-pt-md">
|
|
||||||
<div><q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- </div> -->
|
|
||||||
<q-dialog v-model="ipad_chang">
|
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
|
||||||
<q-card-section>
|
|
||||||
<!-- <div class="text-h6">{{ $t('point') +(options_model+1 )}}</div> -->
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-4"><q-select class="q-pt-md" :label="$t('point')" :dense="true" filled
|
|
||||||
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
|
|
||||||
map-options /></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up" @touchstart="handlerTouchstart('y','+')" @touchend="handlerTouchend" /></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_left" @touchstart="handlerTouchstart('x','-')" @touchend="handlerTouchend" /></div>
|
|
||||||
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_right" @touchstart="handlerTouchstart('x','+')" @touchend="handlerTouchend" /></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_down" @touchstart="handlerTouchstart('y','-')" @touchend="handlerTouchend" /></div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
|
||||||
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang=false" />
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -123,16 +53,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
|
|
||||||
<style>
|
|
||||||
input::-webkit-outer-spin-button,
|
|
||||||
input::-webkit-inner-spin-button {
|
|
||||||
-webkit-appearance: none !important;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import {
|
||||||
defineComponent,
|
defineComponent,
|
||||||
|
@ -142,9 +62,7 @@ import {
|
||||||
watch,
|
watch,
|
||||||
nextTick,
|
nextTick,
|
||||||
onBeforeUnmount,
|
onBeforeUnmount,
|
||||||
defineExpose,
|
defineExpose
|
||||||
toRefs,
|
|
||||||
inject
|
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { useStore } from "src/store";
|
import { useStore } from "src/store";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
@ -158,39 +76,20 @@ import { config } from "process";
|
||||||
import { QSelect, QInput, QBtn } from "quasar";
|
import { QSelect, QInput, QBtn } from "quasar";
|
||||||
import { div } from "zrender/lib/core/vector";
|
import { div } from "zrender/lib/core/vector";
|
||||||
import GlobalData from "src/common/GlobalData";
|
import GlobalData from "src/common/GlobalData";
|
||||||
|
import { number } from "@intlify/core-base";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentDensityCorrection",
|
name: "ComponentDensityCorrection",
|
||||||
components: {
|
components: {
|
||||||
Vue3DraggableResizable
|
Vue3DraggableResizable
|
||||||
},
|
},
|
||||||
props: {
|
setup() {
|
||||||
col: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
row: {
|
|
||||||
type: String,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setup(props) {
|
|
||||||
const now_selsect_projector:any = inject<string>("now_selsect_projector");
|
|
||||||
let set = GlobalData.getInstance().getCurrentClient();
|
let set = GlobalData.getInstance().getCurrentClient();
|
||||||
let $store = useStore();
|
let $store = useStore();
|
||||||
let $t = useI18n();
|
let $t = useI18n();
|
||||||
const ste_status = ref(0);
|
const ste_status = ref(0);
|
||||||
let allconfig = JSON.parse($store.state.fusion_configuration);
|
let allconfig = JSON.parse($store.state.fusion_configuration);
|
||||||
|
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
|
||||||
/**
|
|
||||||
* 平板弹窗修改
|
|
||||||
*/
|
|
||||||
const ipad_chang=ref(false)
|
|
||||||
/**
|
|
||||||
* 当前url路径
|
|
||||||
*/
|
|
||||||
let url = window.location.href;
|
|
||||||
const configselsect = computed(() => {
|
const configselsect = computed(() => {
|
||||||
return $store.state.selected_projector;
|
return $store.state.selected_projector;
|
||||||
});
|
});
|
||||||
|
@ -205,20 +104,10 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1]
|
$store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 当前配置文件
|
|
||||||
*/
|
|
||||||
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
|
||||||
/**
|
|
||||||
* 当前点的数量
|
|
||||||
*/
|
|
||||||
const value_point_amount = ref(5)
|
const value_point_amount = ref(5)
|
||||||
|
|
||||||
/**
|
|
||||||
* 深度copy函数
|
|
||||||
* @param o1
|
|
||||||
* @param o2
|
|
||||||
*/
|
|
||||||
const deepcopy = (o1: any, o2: any) => {
|
const deepcopy = (o1: any, o2: any) => {
|
||||||
for (let k in o2) {
|
for (let k in o2) {
|
||||||
if (typeof o2[k] === "object") {
|
if (typeof o2[k] === "object") {
|
||||||
|
@ -229,14 +118,11 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 使用服务器配置
|
|
||||||
*/
|
|
||||||
const use_server_config = () => {
|
const use_server_config = () => {
|
||||||
value.value = []
|
value.value = []
|
||||||
value_point.value = []
|
value_point.value = []
|
||||||
for (let index = 0; index < config.point4.length; index++) {
|
for (let index = 0; index < config.point4.length; index++) {
|
||||||
|
|
||||||
let tmp: DensityCorrectionPoint = config.point4[index];
|
let tmp: DensityCorrectionPoint = config.point4[index];
|
||||||
value.value.push(tmp)
|
value.value.push(tmp)
|
||||||
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
|
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
|
||||||
|
@ -251,9 +137,7 @@ export default defineComponent({
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 使用缓存
|
|
||||||
*/
|
|
||||||
const use_set_cache = () => {
|
const use_set_cache = () => {
|
||||||
if (set_cache.value[selectedprojector.value] != null) {
|
if (set_cache.value[selectedprojector.value] != null) {
|
||||||
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
||||||
|
@ -262,16 +146,12 @@ export default defineComponent({
|
||||||
recalculate_coordinates()
|
recalculate_coordinates()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 保存缓存
|
|
||||||
*/
|
|
||||||
const save_set_cache = () => {
|
const save_set_cache = () => {
|
||||||
let tmp = { value: value.value, value_point: value_point.value }
|
let tmp = { value: value.value, value_point: value_point.value }
|
||||||
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 监听是否切换了投影机
|
|
||||||
*/
|
|
||||||
watch(
|
watch(
|
||||||
() => configselsect,
|
() => configselsect,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
|
@ -298,9 +178,7 @@ export default defineComponent({
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存 变量
|
|
||||||
*/
|
|
||||||
const set_cache: any = ref([]);
|
const set_cache: any = ref([]);
|
||||||
//值
|
//值
|
||||||
let value = ref(<DensityCorrection[]>[]);
|
let value = ref(<DensityCorrection[]>[]);
|
||||||
|
@ -310,21 +188,11 @@ export default defineComponent({
|
||||||
* 当前选中的点的索引
|
* 当前选中的点的索引
|
||||||
*/
|
*/
|
||||||
const options_model = ref(0)
|
const options_model = ref(0)
|
||||||
/**
|
|
||||||
* html div元素用来计算
|
|
||||||
*/
|
|
||||||
const div = ref();
|
const div = ref();
|
||||||
/**
|
|
||||||
* 最大值
|
|
||||||
*/
|
|
||||||
const max = ref({ x: 0, y: 0 })
|
const max = ref({ x: 0, y: 0 })
|
||||||
/**
|
|
||||||
* 点大小
|
|
||||||
*/
|
|
||||||
const point = ref({ w: 20, h: 20 })
|
const point = ref({ w: 20, h: 20 })
|
||||||
/**
|
|
||||||
* 监听点的切换
|
|
||||||
*/
|
|
||||||
watch(() => options_model, (newval, oldval) => {
|
watch(() => options_model, (newval, oldval) => {
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `4:${options_model.value + 1}`)
|
set?.SetBlendingOption("blending_grids_select_point", `4:${options_model.value + 1}`)
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
@ -337,9 +205,7 @@ export default defineComponent({
|
||||||
max.value.x = div.value.offsetWidth
|
max.value.x = div.value.offsetWidth
|
||||||
max.value.y = div.value.offsetHeight
|
max.value.y = div.value.offsetHeight
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 计算可供选择的点
|
|
||||||
*/
|
|
||||||
const options = computed(() => {
|
const options = computed(() => {
|
||||||
let tmp = []
|
let tmp = []
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
|
@ -350,61 +216,23 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
return tmp
|
return tmp
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 修改点数量函数
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const chang_point_amount = (val: number) => {
|
const chang_point_amount = (val: number) => {
|
||||||
start_point()
|
start_point()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 小点移动回调
|
|
||||||
* @param $event
|
|
||||||
* @param index
|
|
||||||
*/
|
|
||||||
const dragStartHandle = ($event: any, index: number) => {
|
const dragStartHandle = ($event: any, index: number) => {
|
||||||
let obj_x = $event.x
|
let obj_x = $event.x
|
||||||
let obj_y = $event.y
|
let obj_y = $event.y
|
||||||
let tmp = coordinate_transformation_xy_to_value(obj_x, obj_y)
|
let tmp = coordinate_transformation_xy_to_value(obj_x, obj_y)
|
||||||
value.value[index].x = Math.round(tmp.x)
|
value.value[index].x = Math.round(tmp.x)
|
||||||
value.value[index].y = Math.round(tmp.y)
|
value.value[index].y = Math.round(tmp.y)
|
||||||
/**
|
send_value(index, Math.round(tmp.x), Math.round(tmp.y))
|
||||||
* 判断摄像机
|
|
||||||
*/
|
|
||||||
if(now_selsect_projector?.value=='0-0'){
|
|
||||||
|
|
||||||
if(index==1||index==3){
|
|
||||||
value.value[index].x = Math.round(tmp.x)>allconfig.projector_width?allconfig.projector_width:Math.round(tmp.x)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(now_selsect_projector?.value=='0-1'){
|
|
||||||
if(index==0||index==2){
|
|
||||||
value.value[index].x = Math.round(tmp.x)<0?0:Math.round(tmp.x)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
send_value(index, value.value[index].x , value.value[index].y)
|
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 点的数据发生修改时计算位置
|
|
||||||
* @param index
|
|
||||||
* @param $event
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const chang = (index: number, $event: any, type: string) => {
|
const chang = (index: number, $event: any, type: string) => {
|
||||||
index = Number(index)
|
index = Number(index)
|
||||||
if (now_selsect_projector?.value == '0-0'&&props.col=='2') {
|
|
||||||
|
|
||||||
if (index == 1 || index == 3) {
|
|
||||||
value.value[index].x > allconfig.projector_width ? value.value[index].x =allconfig.projector_width : value.value[index].x
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (now_selsect_projector?.value == '0-1'&&props.col=='2') {
|
|
||||||
if (index == 0 || index == 2) {
|
|
||||||
value.value[index].x < 0 ? value.value[index].x= 0 : value.value[index].x
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
|
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
|
||||||
value_point.value[index].y = Math.round(tmp.y)
|
value_point.value[index].y = Math.round(tmp.y)
|
||||||
value_point.value[index].x = Math.round(tmp.x)
|
value_point.value[index].x = Math.round(tmp.x)
|
||||||
|
@ -468,10 +296,8 @@ export default defineComponent({
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
||||||
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
|
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
|
||||||
set?.GetBlendingConfig("").then((res) => {
|
|
||||||
config=JSON.parse(res?.config??"").projectors[selectedprojector.value];
|
|
||||||
start_point()
|
start_point()
|
||||||
//start()
|
start()
|
||||||
use_server_config()
|
use_server_config()
|
||||||
if (
|
if (
|
||||||
sessionStorage.FourPointCalibration &&
|
sessionStorage.FourPointCalibration &&
|
||||||
|
@ -479,8 +305,7 @@ export default defineComponent({
|
||||||
) {
|
) {
|
||||||
set_cache.value = JSON.parse(sessionStorage.FourPointCalibration);
|
set_cache.value = JSON.parse(sessionStorage.FourPointCalibration);
|
||||||
use_set_cache();
|
use_set_cache();
|
||||||
}})
|
}
|
||||||
keyDown()
|
|
||||||
window.onresize = () => {
|
window.onresize = () => {
|
||||||
return (() => {
|
return (() => {
|
||||||
if (div != null) {
|
if (div != null) {
|
||||||
|
@ -514,7 +339,6 @@ export default defineComponent({
|
||||||
value_point.value[index].x = Math.round(tmp.x)
|
value_point.value[index].x = Math.round(tmp.x)
|
||||||
}
|
}
|
||||||
send_value(-2,0,0)
|
send_value(-2,0,0)
|
||||||
save_set_cache()
|
|
||||||
}
|
}
|
||||||
const recalculate_coordinates = () => {
|
const recalculate_coordinates = () => {
|
||||||
try {
|
try {
|
||||||
|
@ -534,228 +358,10 @@ export default defineComponent({
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 滚轮切换
|
|
||||||
* @param details
|
|
||||||
*/
|
|
||||||
const details_selsect=(details:any) => {
|
|
||||||
let spt=details.deltaY/100
|
|
||||||
if(spt>0){
|
|
||||||
if(options_model.value>=value_point.value.length-1){
|
|
||||||
options_model.value=0
|
|
||||||
}else{
|
|
||||||
options_model.value++
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if(options_model.value<=1){
|
|
||||||
options_model.value=value_point.value.length-1
|
|
||||||
}else{
|
|
||||||
options_model.value--
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 滚轮改变数据
|
|
||||||
*/
|
|
||||||
const details_selsect_val = (details: any, type: string) => {
|
|
||||||
let spt = details.deltaY / 100
|
|
||||||
switch (type) {
|
|
||||||
case 'x':
|
|
||||||
if (spt < 0) {
|
|
||||||
if(now_selsect_projector?.value=='0-0'&&props.col=='2'){
|
|
||||||
if(options_model.value==1||options_model.value==3){
|
|
||||||
value.value[options_model.value].x>allconfig.projector_width?value.value[options_model.value].x = allconfig.projector_width:value.value[options_model.value].x++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if(now_selsect_projector?.value=='0-1'&&props.col=='2'){
|
|
||||||
if(options_model.value==0||options_model.value==2){
|
|
||||||
value.value[options_model.value].x <0?value.value[options_model.value].x = 0:value.value[options_model.value].x --
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x --
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (spt < 0) {
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
chang(options_model.value,"","")
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 长按实现
|
|
||||||
* 单击实现
|
|
||||||
*/
|
|
||||||
let loop: NodeJS.Timeout
|
|
||||||
let loop_end: NodeJS.Timeout
|
|
||||||
const handlerTouchstart=(type:string,fun:string)=>{
|
|
||||||
loop_end = setTimeout(() => {
|
|
||||||
loop=setInterval(()=>{
|
|
||||||
if(type=='x'){
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chang(options_model.value,0,'')
|
|
||||||
},10)
|
|
||||||
}, 1000);
|
|
||||||
if(type=='x'){
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chang(options_model.value,0,'')
|
|
||||||
}
|
|
||||||
const handlerTouchend=()=>{
|
|
||||||
clearTimeout(loop_end)
|
|
||||||
clearInterval(loop)
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 键盘监听
|
|
||||||
*/
|
|
||||||
const keyDown = () => {
|
|
||||||
document.onkeydown = (e) => {
|
|
||||||
let lock=0;
|
|
||||||
let e1 = e || window.event || arguments.callee.caller.arguments[0]
|
|
||||||
switch (e.code) {
|
|
||||||
case "KeyW":
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
break;
|
|
||||||
case "KeyA":
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
break;
|
|
||||||
case "KeyS":
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
break;
|
|
||||||
case "KeyD":
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
lock=1
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(lock==0)chang(options_model.value,"h", 'h')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const ispad=computed(()=>{
|
|
||||||
let url = window.location.href;
|
|
||||||
return url.indexOf("pad")!=-1
|
|
||||||
})
|
|
||||||
const add_cut=(fun:string,type:string)=>{
|
|
||||||
switch (type) {
|
|
||||||
case 'x':
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let loop_start:NodeJS.Timeout
|
|
||||||
let loop_finish:NodeJS.Timeout
|
|
||||||
const input_x_focus=ref(false)
|
|
||||||
const input_y_focus=ref(false)
|
|
||||||
const mousedown = (fun:string,type:string) => {
|
|
||||||
loop_start= setTimeout(() => {
|
|
||||||
loop_finish=setInterval(()=>{
|
|
||||||
switch (type) {
|
|
||||||
case 'x':
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
chang(options_model.value,0,'')
|
|
||||||
},30)
|
|
||||||
}, 1000);
|
|
||||||
switch (type) {
|
|
||||||
case 'x':
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if(fun=='+'){
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
}else{
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
chang(options_model.value,0,'')
|
|
||||||
}
|
|
||||||
|
|
||||||
const mouseup = () => {
|
|
||||||
clearTimeout(loop_start)
|
|
||||||
clearInterval(loop_finish)
|
|
||||||
}
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
options_model,
|
options_model,
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
input_x_focus,
|
|
||||||
input_y_focus,
|
|
||||||
mousedown,
|
|
||||||
mouseup,
|
|
||||||
add_cut,
|
|
||||||
now_selsect_projector,
|
|
||||||
details_selsect,
|
|
||||||
resetall,
|
resetall,
|
||||||
div,
|
div,
|
||||||
max,
|
max,
|
||||||
|
@ -768,13 +374,7 @@ export default defineComponent({
|
||||||
reset,
|
reset,
|
||||||
value_point_amount,
|
value_point_amount,
|
||||||
chang_point_amount,
|
chang_point_amount,
|
||||||
options,
|
options
|
||||||
details_selsect_val,
|
|
||||||
ipad_chang,
|
|
||||||
url,
|
|
||||||
handlerTouchstart,
|
|
||||||
handlerTouchend,
|
|
||||||
ispad
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -11,33 +11,15 @@
|
||||||
<q-toggle class="float-right" v-model="array[0].isshow" label="" />
|
<q-toggle class="float-right" v-model="array[0].isshow" label="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 0"
|
<q-input dense filled type="number" :autofocus="group == 0" :bg-color="group == 0 ? 'cyan-1' : ''"
|
||||||
:bg-color="group == 0 ? 'cyan-1' : ''" @focus="group = 0" v-model.number="array[0].value"
|
@focus="group = 0" v-model="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules
|
||||||
:label="$t('upper fusion zone parameters')" lazy-rules
|
:rules="[
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 0 }"
|
|
||||||
:readonly="url.indexOf('pad') != -1" :rules="[
|
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val < config.height) || $t('Please enter 0-100'),
|
(val >= 0 && val < config.height) || $t('Please enter 0-100'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" dense filled type="number" :autofocus="group == 0"
|
|
||||||
:bg-color="group == 0 ? 'cyan-1' : ''" @focus="() => { group = 0; input_focus[0] = true }"
|
|
||||||
v-model.number="array[0].value" :label="$t('upper fusion zone parameters')" lazy-rules
|
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 0 }"
|
|
||||||
:readonly="url.indexOf('pad') != -1" @blur="input_focus[0] = false" :rules="[
|
|
||||||
(val) =>
|
|
||||||
(val !== null && val !== '') ||
|
|
||||||
$t('Please enter a number'),
|
|
||||||
(val) =>
|
|
||||||
(val >= 0 && val < config.height) || $t('Please enter 0-100'),
|
|
||||||
]">
|
|
||||||
<template v-if="input_focus[0]" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="mousedown('+', 0)" @mouseup="mouseup" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="mousedown('-', 0)" @mouseup="mouseup" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,75 +30,39 @@
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-toggle class="float-right" @click="group = 1" v-model="array[1].isshow" label="" />
|
<q-toggle class="float-right" v-model="array[1].isshow" label="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 1"
|
<q-input dense filled type="number" :autofocus="group == 1" :bg-color="group == 1 ? 'cyan-1' : ''"
|
||||||
:bg-color="group == 1 ? 'cyan-1' : ''" @focus="group = 1" v-model.number="array[1].value"
|
@focus="group = 1" v-model="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules
|
||||||
:label="$t('Left fusion Band Parameters')" lazy-rules
|
:rules="[
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 1 }"
|
|
||||||
:readonly="url.indexOf('pad') != -1" :rules="[
|
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val < config.width) || $t('Please enter 0-100'),
|
(val >= 0 && val < config.width) || $t('Please enter 0-100'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" dense filled type="number" :autofocus="group == 1"
|
|
||||||
:bg-color="group == 1 ? 'cyan-1' : ''" @focus="() => { group = 1; input_focus[1] = true }"
|
|
||||||
v-model.number="array[1].value" :label="$t('Left fusion Band Parameters')" lazy-rules
|
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 1 }"
|
|
||||||
:readonly="url.indexOf('pad') != -1" @blur="input_focus[1] = false" :rules="[
|
|
||||||
(val) =>
|
|
||||||
(val !== null && val !== '') ||
|
|
||||||
$t('Please enter a number'),
|
|
||||||
(val) =>
|
|
||||||
(val >= 0 && val < config.width) || $t('Please enter 0-100'),
|
|
||||||
]">
|
|
||||||
<template v-if="input_focus[1]" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="mousedown('+', 1)" @mouseup="mouseup" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="mousedown('-', 1)" @mouseup="mouseup" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-toggle class="float-right" @click="group = 2" v-model="array[2].isshow" label="" />
|
<q-toggle class="float-right" v-model="array[2].isshow" label="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 2"
|
<q-input dense filled type="number" :autofocus="group == 2" :bg-color="group == 2 ? 'cyan-1' : ''"
|
||||||
:bg-color="group == 2 ? 'cyan-1' : ''" @focus="group = 2" v-model.number="array[2].value"
|
@focus="group = 2" v-model="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules
|
||||||
:label="$t('Right fusion Band Parameters')" lazy-rules
|
:rules="[
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 2 }"
|
|
||||||
:readonly="url.indexOf('pad') != -1" :rules="[
|
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val < config.width) || $t('Please enter 0-100'),
|
(val >= 0 && val < config.width) || $t('Please enter 0-100'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" dense filled type="number" :autofocus="group == 2"
|
|
||||||
:bg-color="group == 2 ? 'cyan-1' : ''" @focus="() => { group = 2; input_focus[2] = true }"
|
|
||||||
v-model.number="array[2].value" :label="$t('Right fusion Band Parameters')" lazy-rules
|
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 2 }"
|
|
||||||
:readonly="url.indexOf('pad') != -1" @blur="input_focus[2] = false" :rules="[
|
|
||||||
(val) =>
|
|
||||||
(val !== null && val !== '') ||
|
|
||||||
$t('Please enter a number'),
|
|
||||||
(val) =>
|
|
||||||
(val >= 0 && val < config.width) || $t('Please enter 0-100'),
|
|
||||||
]">
|
|
||||||
<template v-if="input_focus[2]" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="mousedown('+', 2)" @mouseup="mouseup" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="mousedown('-', 2)" @mouseup="mouseup" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3"><span>{{ $t('Whether to operate synchronously') }}</span><q-checkbox
|
<div class="col-3"><span>{{ $t('Whether to operate synchronously') }}</span><q-checkbox
|
||||||
v-model="auto_sync" @update:model-value="() => { }" /></div>
|
v-model="auto_sync" /></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -129,33 +75,15 @@
|
||||||
<q-toggle class="float-right" v-model="array[3].isshow" label="" />
|
<q-toggle class="float-right" v-model="array[3].isshow" label="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input v-show="ispad" dense filled type="number" :autofocus="group == 3"
|
<q-input dense filled type="number" :autofocus="group == 3" :bg-color="group == 3 ? 'cyan-1' : ''"
|
||||||
:bg-color="group == 3 ? 'cyan-1' : ''" @focus="group = 3" v-model.number="array[3].value"
|
@focus="group = 3" v-model="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules
|
||||||
:label="$t('Lower fusion Zone Parameters')" lazy-rules
|
:rules="[
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 3 }"
|
|
||||||
:readonly="url.indexOf('pad') != -1" :rules="[
|
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val < config.height) || $t('Please enter 0-100'),
|
(val >= 0 && val < config.height) || $t('Please enter 0-100'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" dense filled type="number" :autofocus="group == 3"
|
|
||||||
:bg-color="group == 3 ? 'cyan-1' : ''" @focus="() => { group = 3; input_focus[3] = true }"
|
|
||||||
v-model.number="array[3].value" :label="$t('Lower fusion Zone Parameters')" lazy-rules
|
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : ''; group = 3 }"
|
|
||||||
:readonly="url.indexOf('pad') != -1" @blur="input_focus[3] = false" :rules="[
|
|
||||||
(val) =>
|
|
||||||
(val !== null && val !== '') ||
|
|
||||||
$t('Please enter a number'),
|
|
||||||
(val) =>
|
|
||||||
(val >= 0 && val < config.height) || $t('Please enter 0-100'),
|
|
||||||
]">
|
|
||||||
<template v-if="input_focus[3]" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="handlerTouchstart('+')" @mouseup="handlerTouchend" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="handlerTouchstart('-')" @mouseup="handlerTouchend" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -163,38 +91,20 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12" v-show="group != 4 || ispad">
|
<div class="col-12" v-if="group != 4">
|
||||||
<p class="text-center" style="margin: 0 0 8;">{{ $t("Set Fusion Band Parameters") }}</p>
|
<p class="text-center" style="margin: 0 0 8;">{{ $t("Set Fusion Band Parameters") }}</p>
|
||||||
<div style="display: flex; justify-content: space-evenly">
|
<div style="display: flex; justify-content: space-evenly">
|
||||||
<div>
|
<div>
|
||||||
<q-slider v-model="array[group].alpha" v-show="!ispad" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01"
|
<q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green"
|
||||||
color="green" vertical reverse label-always />
|
vertical reverse label-always />
|
||||||
<div> <q-input v-show="ispad" dense filled hide-bottom-space type="number" max="1" min="0" step="0.1"
|
<div> <q-input dense filled hide-bottom-space type="number" max="1" min="0" step="0.1"
|
||||||
@update:model-value="chang('alpha')"
|
@update:model-value="chang('alpha')" v-model="array[group].alpha" lazy-rules :rules="[
|
||||||
@click="() => { now_apg = 'alpha'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
|
||||||
v-model.number="array[group].alpha" lazy-rules :rules="[
|
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val <= 1) || $t('Please enter a value within the range'),
|
(val >= 0 && val <= 1) || $t('Please enter a value within the range'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" dense filled hide-bottom-space type="number" max="1" min="0" step="0.1"
|
|
||||||
@update:model-value="chang('alpha')"
|
|
||||||
@click="() => { now_apg = 'alpha'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
|
||||||
@focus="input_focus_apg[0] = true" @blur="input_focus_apg[0] = false" v-model.number="array[group].alpha"
|
|
||||||
lazy-rules :rules="[
|
|
||||||
(val) =>
|
|
||||||
(val !== null && val !== '') ||
|
|
||||||
$t('Please enter a number'),
|
|
||||||
(val) =>
|
|
||||||
(val >= 0 && val <= 1) || $t('Please enter a value within the range'),
|
|
||||||
]">
|
|
||||||
<template v-if="input_focus_apg[0]" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
<p style="text-align: center;">Alpha</p>
|
<p style="text-align: center;">Alpha</p>
|
||||||
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('alpha')" text-color="black"
|
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('alpha')" text-color="black"
|
||||||
:label="$t('reset')" />
|
:label="$t('reset')" />
|
||||||
|
@ -202,32 +112,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<q-slider v-model="array[group].p" v-show="!ispad" :min="0" @change="chang('p')" :max="16" :step="0.01"
|
<q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="16" :step="0.01" color="green" vertical
|
||||||
color="green" vertical reverse label-always />
|
reverse label-always />
|
||||||
<div> <q-input v-show="ispad" dense filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
<div> <q-input dense filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
||||||
@update:model-value="chang('p')" @click="() => { now_apg = 'p'; ispad ? ipad_chang_input = true : '' }"
|
@update:model-value="chang('p')" v-model="array[group].p" lazy-rules :rules="[
|
||||||
:readonly="ispad" v-model.number="array[group].p" lazy-rules :rules="[
|
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" dense filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
|
||||||
@focus="input_focus_apg[1] = true" @blur="input_focus_apg[1] = false" @update:model-value="chang('p')"
|
|
||||||
@click="() => { now_apg = 'p'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
|
||||||
v-model.number="array[group].p" lazy-rules :rules="[
|
|
||||||
(val) =>
|
|
||||||
(val !== null && val !== '') ||
|
|
||||||
$t('Please enter a number'),
|
|
||||||
(val) =>
|
|
||||||
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
|
||||||
]">
|
|
||||||
<template v-if="input_focus_apg[1]" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
<p style="text-align: center;">Power</p>
|
<p style="text-align: center;">Power</p>
|
||||||
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('p')" text-color="black"
|
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('p')" text-color="black"
|
||||||
:label="$t('reset')" />
|
:label="$t('reset')" />
|
||||||
|
@ -235,34 +129,17 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<q-slider v-model="array[group].gamma" v-show="!ispad" :min="0" @change="chang('gamma')" :max="16" :step="0.01"
|
<q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="16" :step="0.01" color="green"
|
||||||
color="green" vertical reverse label-always />
|
vertical reverse label-always />
|
||||||
<div>
|
<div>
|
||||||
<q-input v-show="ispad" :dense="true" filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
<q-input :dense="true" filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
||||||
@update:model-value="chang('gamma')"
|
@update:model-value="chang('gamma')" v-model="array[group].gamma" lazy-rules :rules="[
|
||||||
@click="() => { now_apg = 'gamma'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
|
||||||
v-model.number="array[group].gamma" lazy-rules :rules="[
|
|
||||||
(val) =>
|
(val) =>
|
||||||
(val !== null && val !== '') ||
|
(val !== null && val !== '') ||
|
||||||
$t('Please enter a number'),
|
$t('Please enter a number'),
|
||||||
(val) =>
|
(val) =>
|
||||||
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
||||||
]" />
|
]" />
|
||||||
<q-input v-show="!ispad" :dense="true" filled hide-bottom-space type="number" max="16" min="0" step="0.1"
|
|
||||||
@update:model-value="chang('gamma')" @focus="input_focus_apg[2] = true" @blur="input_focus_apg[2] = false"
|
|
||||||
@click="() => { now_apg = 'gamma'; ispad ? ipad_chang_input = true : '' }" :readonly="ispad"
|
|
||||||
v-model.number="array[group].gamma" lazy-rules :rules="[
|
|
||||||
(val) =>
|
|
||||||
(val !== null && val !== '') ||
|
|
||||||
$t('Please enter a number'),
|
|
||||||
(val) =>
|
|
||||||
(val >= 0 && val <= 16) || $t('Please enter a value within the range'),
|
|
||||||
]">
|
|
||||||
<template v-if="input_focus_apg[2]" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="handlerTouchstart_apg('+')" @mouseup="handlerTouchend_apg" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="handlerTouchstart_apg('-')" @mouseup="handlerTouchend_apg" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
<p style="text-align: center;">Gamma</p>
|
<p style="text-align: center;">Gamma</p>
|
||||||
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('gamma')" text-color="black"
|
<q-btn style="margin-top: 0.5rem;" color="white" @click="reset('gamma')" text-color="black"
|
||||||
:label="$t('reset')" />
|
:label="$t('reset')" />
|
||||||
|
@ -270,88 +147,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
|
||||||
<div class="row" style="min-height: 40px;">
|
|
||||||
<div class="col-4 col-sm-3"></div>
|
|
||||||
<div class="col-4 col-sm-6 q-pt-sm">
|
|
||||||
<q-item>
|
|
||||||
<q-item-section avatar class="head_1">
|
|
||||||
{{ $t("background color") }}
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-input v-model="color" :rules="['anyColor']">
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="colorize" class="cursor-pointer">
|
|
||||||
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
|
|
||||||
<q-color v-model="color" @change="submit" />
|
|
||||||
</q-popup-proxy>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div style="position: absolute;bottom: 0;">
|
<div style="position: absolute;bottom: 0;">
|
||||||
<q-checkbox v-model="auxiliary_line" @update:model-value="(value, evt)=>{send_auxiliary_line(value)}"
|
<q-checkbox v-model="auxiliary_line" @update:model-value="(value, evt)=>{send_auxiliary_line(value)}"
|
||||||
:label="$t('auxiliary lines')" />
|
:label="$t('auxiliary lines')" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<q-dialog v-model="ipad_chang" ref="ipadref">
|
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
|
||||||
<q-card-section>
|
|
||||||
<!-- <div class="text-h6">{{ $t('fusion zone') + (group + 1) }}</div> -->
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-4"><q-select class="q-pt-md" :label="$t('fusion zone')" :dense="true" filled v-model="group"
|
|
||||||
@update:model-value="(val) => { group = val }" :options="options" emit-value map-options /></div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
<div class="row q-pb-md">
|
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up"
|
|
||||||
@touchstart="handlerTouchstart('+')" @touchend="handlerTouchend" /></div>
|
|
||||||
</div>
|
|
||||||
<div class="row q-pt-md">
|
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black"
|
|
||||||
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('-')" @touchend="handlerTouchend" /></div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
|
||||||
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang = false" />
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
<q-dialog v-model="ipad_chang_input">
|
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
|
||||||
<q-card-section>
|
|
||||||
<!-- <div class="text-h6">{{ $t('fusion zone') + options[group].label + ` ${now_apg}` }}</div> -->
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-4"><q-select class="q-pt-md" :label="$t('fusion zone') + ` ${now_apg}`" :dense="true" filled v-model="group"
|
|
||||||
@update:model-value="(val) => { group = val }" :options="options" emit-value map-options /></div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
<div class="row q-pb-md">
|
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up"
|
|
||||||
@touchstart="handlerTouchstart_apg('+')" @touchend="handlerTouchend_apg" /></div>
|
|
||||||
</div>
|
|
||||||
<div class="row q-pt-md">
|
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black"
|
|
||||||
icon="keyboard_arrow_down" @touchstart="handlerTouchstart_apg('-')" @touchend="handlerTouchend_apg" /></div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
|
||||||
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang_input = false" />
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -370,14 +171,6 @@
|
||||||
p {
|
p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
|
|
||||||
<style>
|
|
||||||
input::-webkit-outer-spin-button,
|
|
||||||
input::-webkit-inner-spin-button {
|
|
||||||
-webkit-appearance: none !important;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -391,11 +184,12 @@ import {
|
||||||
onBeforeUnmount,
|
onBeforeUnmount,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted,
|
onMounted,
|
||||||
toRefs,
|
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { useStore } from "src/store";
|
import { useStore } from "src/store";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import GlobalData from "src/common/GlobalData";
|
import GlobalData from "src/common/GlobalData";
|
||||||
|
import { number } from "@intlify/core-base";
|
||||||
|
import { switchCase } from "@babel/types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentFusionLocale",
|
name: "ComponentFusionLocale",
|
||||||
|
@ -403,7 +197,7 @@ export default defineComponent({
|
||||||
let set = GlobalData.getInstance().getCurrentClient();
|
let set = GlobalData.getInstance().getCurrentClient();
|
||||||
let $store = useStore();
|
let $store = useStore();
|
||||||
let $t = useI18n();
|
let $t = useI18n();
|
||||||
const group = ref(2);
|
const group = ref(4);
|
||||||
const set_cache: any = ref([]);
|
const set_cache: any = ref([]);
|
||||||
const enablefusion = ref(false);
|
const enablefusion = ref(false);
|
||||||
let array: any = reactive([
|
let array: any = reactive([
|
||||||
|
@ -413,7 +207,7 @@ export default defineComponent({
|
||||||
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
||||||
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
{ alpha: 0, p: 0, gamma: 0, isshow: false, value: 0 },
|
||||||
]);
|
]);
|
||||||
const auto_sync = ref(true)
|
const auto_sync = ref(false)
|
||||||
const auxiliary_line = ref(false)
|
const auxiliary_line = ref(false)
|
||||||
const send_auxiliary_line = (val: boolean) => {
|
const send_auxiliary_line = (val: boolean) => {
|
||||||
set?.SetBlendingOption("blending_grids_assistant_lines", val ? "1" : "0");
|
set?.SetBlendingOption("blending_grids_assistant_lines", val ? "1" : "0");
|
||||||
|
@ -427,15 +221,6 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1]
|
$store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
const color = ref("#ffffff");
|
|
||||||
const ispad = computed(() => {
|
|
||||||
let url = window.location.href;
|
|
||||||
return url.indexOf("pad") != -1
|
|
||||||
})
|
|
||||||
/**
|
|
||||||
* 重置数据
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const reset = (type: string) => {
|
const reset = (type: string) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'gamma':
|
case 'gamma':
|
||||||
|
@ -452,24 +237,13 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
chang(type)
|
chang(type)
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 是否在切换数据 避免切换投影机是发送不该发送的数据
|
|
||||||
*/
|
|
||||||
const ste_status = ref(0);
|
const ste_status = ref(0);
|
||||||
/**
|
|
||||||
* 使用缓存
|
|
||||||
*/
|
|
||||||
const use_set_cache = () => {
|
const use_set_cache = () => {
|
||||||
if (set_cache.value[selectedprojector.value] != null) {
|
if (set_cache.value[selectedprojector.value] != null) {
|
||||||
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
||||||
deepcopy(array, tmp);
|
deepcopy(array, tmp);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 深度拷贝
|
|
||||||
* @param o1
|
|
||||||
* @param o2
|
|
||||||
*/
|
|
||||||
const deepcopy = (o1: any, o2: any) => {
|
const deepcopy = (o1: any, o2: any) => {
|
||||||
for (let k in o2) {
|
for (let k in o2) {
|
||||||
if (typeof o2[k] === "object") {
|
if (typeof o2[k] === "object") {
|
||||||
|
@ -480,29 +254,17 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 保存缓存
|
|
||||||
*/
|
|
||||||
const save_set_cache = () => {
|
const save_set_cache = () => {
|
||||||
set_cache.value[selectedprojector.value] = JSON.stringify(array);
|
set_cache.value[selectedprojector.value] = JSON.stringify(array);
|
||||||
};
|
};
|
||||||
|
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
|
||||||
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
|
||||||
/**
|
|
||||||
* 当前选择的投影机
|
|
||||||
*/
|
|
||||||
const configselsect = computed(() => {
|
const configselsect = computed(() => {
|
||||||
return $store.state.selected_projector;
|
return $store.state.selected_projector;
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 监听投影机切换
|
|
||||||
*/
|
|
||||||
watch(
|
watch(
|
||||||
() => configselsect,
|
() => configselsect,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
set?.GetBlendingConfig("").then((res) => {
|
let tmp = JSON.parse($store.state.fusion_configuration);
|
||||||
let tmp = JSON.parse(res ? res.config : "");
|
|
||||||
// let tmp = JSON.parse($store.state.fusion_configuration);
|
|
||||||
let fortmp = null;
|
let fortmp = null;
|
||||||
let i;
|
let i;
|
||||||
for (i of tmp.projectors) {
|
for (i of tmp.projectors) {
|
||||||
|
@ -517,20 +279,15 @@ export default defineComponent({
|
||||||
|
|
||||||
config = JSON.parse(JSON.stringify(fortmp));
|
config = JSON.parse(JSON.stringify(fortmp));
|
||||||
use_server_config();
|
use_server_config();
|
||||||
// use_set_cache();
|
use_set_cache();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ste_status.value = 0;
|
ste_status.value = 0;
|
||||||
}, 100);
|
}, 100);
|
||||||
setnowindex();
|
setnowindex();
|
||||||
});
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
/**
|
|
||||||
* 输入inpu数据 时发送到后端
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const chang = (type: string) => {
|
const chang = (type: string) => {
|
||||||
if (ste_status.value == 1) return
|
if (ste_status.value == 1) return
|
||||||
if (type == "alpha") {
|
if (type == "alpha") {
|
||||||
|
@ -563,9 +320,6 @@ export default defineComponent({
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
};
|
};
|
||||||
//左上右下
|
//左上右下
|
||||||
/**
|
|
||||||
* 初始化数据时 自动获取焦点 的判断
|
|
||||||
*/
|
|
||||||
const setnowindex = () => {
|
const setnowindex = () => {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
let indexx = 4;
|
let indexx = 4;
|
||||||
|
@ -609,9 +363,6 @@ export default defineComponent({
|
||||||
}, 100);
|
}, 100);
|
||||||
setnowindex();
|
setnowindex();
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 初始化赋值
|
|
||||||
*/
|
|
||||||
const startconfig = () => {
|
const startconfig = () => {
|
||||||
for (let index = 0; index < array.length - 1; index++) {
|
for (let index = 0; index < array.length - 1; index++) {
|
||||||
array[arr[index]].gamma = Number(config.params[index].gamma.toFixed(2));
|
array[arr[index]].gamma = Number(config.params[index].gamma.toFixed(2));
|
||||||
|
@ -626,9 +377,6 @@ export default defineComponent({
|
||||||
use_set_cache();
|
use_set_cache();
|
||||||
setnowindex();
|
setnowindex();
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 使用服务端配置
|
|
||||||
*/
|
|
||||||
const use_server_config = () => {
|
const use_server_config = () => {
|
||||||
for (let index = 0; index < array.length - 1; index++) {
|
for (let index = 0; index < array.length - 1; index++) {
|
||||||
array[arr[index]].gamma = Number(config.params[index].gamma.toFixed(2));
|
array[arr[index]].gamma = Number(config.params[index].gamma.toFixed(2));
|
||||||
|
@ -639,22 +387,14 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
set?.GetBlendingConfig("").then((res) => {
|
|
||||||
let tmp = JSON.parse(res ? res.config : "");
|
|
||||||
config = tmp.projectors[selectedprojector.value];
|
|
||||||
ste_status.value = 1;
|
ste_status.value = 1;
|
||||||
color.value = tmp.blending_grids_background_color ?? "#7f7f7f"
|
|
||||||
// console.log(tmp.blending_grids_background_color )
|
|
||||||
startconfig();
|
startconfig();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ste_status.value = 0;
|
ste_status.value = 0;
|
||||||
}, 100);
|
}, 100);
|
||||||
})
|
|
||||||
if (sessionStorage.FusionLocale_async) auto_sync.value = sessionStorage.FusionLocale_async == 'true'
|
|
||||||
}),
|
}),
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
|
sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
|
||||||
sessionStorage.FusionLocale_async = auto_sync.value
|
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
@ -666,7 +406,7 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
1,
|
1,
|
||||||
array[0].isshow,
|
array[0].isshow,
|
||||||
Number(array[0].value), auto_sync.value
|
Number(array[0].value)
|
||||||
);
|
);
|
||||||
|
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
|
@ -682,13 +422,9 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
0,
|
0,
|
||||||
array[1].isshow,
|
array[1].isshow,
|
||||||
Number(array[1].value), auto_sync.value
|
Number(array[1].value)
|
||||||
);
|
);
|
||||||
if (auto_sync.value) {
|
if (auto_sync.value) left_right_auto_add(newVal);
|
||||||
// left_right_auto_add(Number(newVal)%2==0?newVal:Number(newVal)+1);
|
|
||||||
|
|
||||||
}
|
|
||||||
Number(newVal) % 2 != 0 ? array[1].value = Number(array[1].value) + 1 : ''
|
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
|
@ -702,10 +438,9 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
2,
|
2,
|
||||||
array[2].isshow,
|
array[2].isshow,
|
||||||
Number(array[2].value), auto_sync.value
|
Number(array[2].value)
|
||||||
);
|
);
|
||||||
// if (auto_sync.value) left_right_auto_add(Number(newVal)%2==0?newVal:Number(newVal)+1);
|
if (auto_sync.value) left_right_auto_add(newVal);
|
||||||
Number(newVal) % 2 != 0 ? array[2].value = Number(array[2].value) + 1 : ''
|
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
|
@ -719,7 +454,7 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
3,
|
3,
|
||||||
array[3].isshow,
|
array[3].isshow,
|
||||||
Number(array[3].value), auto_sync.value
|
Number(array[3].value)
|
||||||
);
|
);
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
},
|
},
|
||||||
|
@ -736,7 +471,7 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
1,
|
1,
|
||||||
array[0].isshow,
|
array[0].isshow,
|
||||||
Number(array[0].value), auto_sync.value
|
Number(array[0].value)
|
||||||
);
|
);
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
},
|
},
|
||||||
|
@ -751,9 +486,9 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
0,
|
0,
|
||||||
array[1].isshow,
|
array[1].isshow,
|
||||||
Number(array[1].value), auto_sync.value
|
Number(array[1].value)
|
||||||
);
|
);
|
||||||
// if (auto_sync.value) left_right_auto_add(-1);
|
if (auto_sync.value) left_right_auto_add(-1);
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
|
@ -767,9 +502,9 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
2,
|
2,
|
||||||
array[2].isshow,
|
array[2].isshow,
|
||||||
Number(array[2].value), auto_sync.value
|
Number(array[2].value)
|
||||||
);
|
);
|
||||||
// if (auto_sync.value) left_right_auto_add(-1);
|
if (auto_sync.value) left_right_auto_add(-1);
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
|
@ -783,7 +518,7 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1],
|
$store.getters.GetTheCurrentlySelectedCamera[1],
|
||||||
3,
|
3,
|
||||||
array[3].isshow,
|
array[3].isshow,
|
||||||
Number(array[3].value), auto_sync.value
|
Number(array[3].value)
|
||||||
);
|
);
|
||||||
save_set_cache();
|
save_set_cache();
|
||||||
},
|
},
|
||||||
|
@ -802,220 +537,71 @@ export default defineComponent({
|
||||||
const changenablefusion = () => {
|
const changenablefusion = () => {
|
||||||
$store.commit("setenablefusion", enablefusion.value);
|
$store.commit("setenablefusion", enablefusion.value);
|
||||||
};
|
};
|
||||||
/**
|
const left_right_auto_add = (difference: number) => {
|
||||||
* 利用缓存手动同步
|
|
||||||
*/
|
|
||||||
// const left_right_auto_add = (difference: number) => {
|
|
||||||
// let tmpobjall = JSON.parse($store.state.fusion_configuration)
|
|
||||||
// if ($store.getters.GetTheCurrentlySelectedCamera[1] == 0&&group.value==2) {
|
|
||||||
// let tmp = set_cache.value[1] == null ? tmpobjall.projectors[1].params : JSON.parse(set_cache.value[1]);
|
|
||||||
// let set_cache_tmp: any = []
|
|
||||||
// if (tmp[1].hasOwnProperty("power")) {
|
|
||||||
// for (let index = 0; index < 4; index++) {
|
|
||||||
// let tmpobj = { alpha: Number(tmp[arr[index]].alpha.toFixed(2)), p: Number(tmp[arr[index]].power.toFixed(2)), gamma: Number(tmp[arr[index]].gamma.toFixed(2)), isshow: tmp[arr[index]].enable, value: Number(tmp[arr[index]].size) }
|
|
||||||
// set_cache_tmp.push(tmpobj)
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// set_cache_tmp = tmp
|
|
||||||
// }
|
|
||||||
// if (ste_status.value == 0) {
|
|
||||||
// if (difference == -1) {
|
|
||||||
// set_cache_tmp[1].isshow = array[2].isshow
|
|
||||||
// } else {
|
|
||||||
// set_cache_tmp[1].value = difference
|
|
||||||
// }
|
|
||||||
// set?.SetBlendingOverlap(0, 1, 0, set_cache_tmp[1].isshow, Number(set_cache_tmp[1].value));
|
|
||||||
// set_cache.value[1] = JSON.stringify(set_cache_tmp);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if ($store.getters.GetTheCurrentlySelectedCamera[1] == 1&&group.value==1) {
|
|
||||||
|
|
||||||
// let tmp = set_cache.value[0] == null ? tmpobjall.projectors[0].params : JSON.parse(set_cache.value[0]);
|
let tmpobjall = JSON.parse($store.state.fusion_configuration)
|
||||||
// let set_cache_tmp: any = []
|
if ($store.getters.GetTheCurrentlySelectedCamera[1] == 0) {
|
||||||
// if (tmp[0].hasOwnProperty("power")) {
|
|
||||||
// for (let index = 0; index < 4; index++) {
|
|
||||||
// let tmpobj = { alpha: Number(tmp[arr[index]].alpha.toFixed(2)), p: Number(tmp[arr[index]].power.toFixed(2)), gamma: Number(tmp[arr[index]].gamma.toFixed(2)), isshow: tmp[arr[index]].enable, value: Number(tmp[arr[index]].size) }
|
|
||||||
// set_cache_tmp.push(tmpobj)
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// set_cache_tmp = tmp
|
|
||||||
// }
|
|
||||||
// if (ste_status.value == 0) {
|
|
||||||
// //set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference
|
|
||||||
|
|
||||||
// if (difference == -1) {
|
let tmp = set_cache.value[1] == null ? tmpobjall.projectors[1].params : JSON.parse(set_cache.value[1]);
|
||||||
// set_cache_tmp[2].isshow = array[1].isshow
|
let set_cache_tmp: any = []
|
||||||
// } else {
|
if (tmp[1].hasOwnProperty("power")) {
|
||||||
// set_cache_tmp[2].value = difference
|
for (let index = 0; index < 4; index++) {
|
||||||
// }
|
let tmpobj = { alpha: Number(tmp[arr[index]].alpha.toFixed(2)), p: Number(tmp[arr[index]].power.toFixed(2)), gamma: Number(tmp[arr[index]].gamma.toFixed(2)), isshow: tmp[arr[index]].enable, value: Number(tmp[arr[index]].size) }
|
||||||
// set?.SetBlendingOverlap(0, 0, 2, set_cache_tmp[2].isshow, Number(set_cache_tmp[2].value));
|
set_cache_tmp.push(tmpobj)
|
||||||
// set_cache.value[0] = JSON.stringify(set_cache_tmp);
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// watch(()=>auto_sync,()=>{
|
|
||||||
// console.log(auto_sync.value)
|
|
||||||
// set?.SetBlendingOption("fusion_with_automatic_sync", auto_sync.value?'1':'0');
|
|
||||||
// },{deep:true})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 平板弹窗修改
|
|
||||||
*/
|
|
||||||
const ipad_chang = ref(false)
|
|
||||||
/**
|
|
||||||
* 当前url路径
|
|
||||||
*/
|
|
||||||
let url = window.location.href;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 长按实现
|
|
||||||
* 单击实现
|
|
||||||
*/
|
|
||||||
let loop: NodeJS.Timeout
|
|
||||||
let loop_end: NodeJS.Timeout
|
|
||||||
const handlerTouchstart = (fun: string) => {
|
|
||||||
loop_end = setTimeout(() => {
|
|
||||||
loop = setInterval(() => {
|
|
||||||
if (fun == '+') {
|
|
||||||
array[group.value].value += 2
|
|
||||||
} else {
|
} else {
|
||||||
array[group.value].value -= 2
|
set_cache_tmp = tmp
|
||||||
}
|
}
|
||||||
}, 30)
|
if (ste_status.value == 0) {
|
||||||
}, 100);
|
//set_cache_tmp[1].value = Number(set_cache_tmp[1].value) + difference
|
||||||
if (fun == '+') {
|
|
||||||
array[group.value].value += 2
|
if (difference == -1) {
|
||||||
|
set_cache_tmp[1].isshow = array[2].isshow
|
||||||
} else {
|
} else {
|
||||||
array[group.value].value -= 2
|
set_cache_tmp[1].value = difference
|
||||||
|
}
|
||||||
|
set?.SetBlendingOverlap(0, 1, 0, set_cache_tmp[1].isshow, Number(set_cache_tmp[1].value));
|
||||||
|
set_cache.value[1] = JSON.stringify(set_cache_tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handlerTouchend = () => {
|
if ($store.getters.GetTheCurrentlySelectedCamera[1] == 1) {
|
||||||
clearInterval(loop)
|
|
||||||
clearTimeout(loop_end)
|
|
||||||
}
|
|
||||||
|
|
||||||
const submit = () => {
|
let tmp = set_cache.value[0] == null ? tmpobjall.projectors[0].params : JSON.parse(set_cache.value[0]);
|
||||||
set?.SetBlendingOption("blending_grids_background_color", color.value);
|
let set_cache_tmp: any = []
|
||||||
|
if (tmp[0].hasOwnProperty("power")) {
|
||||||
|
for (let index = 0; index < 4; index++) {
|
||||||
|
let tmpobj = { alpha: Number(tmp[arr[index]].alpha.toFixed(2)), p: Number(tmp[arr[index]].power.toFixed(2)), gamma: Number(tmp[arr[index]].gamma.toFixed(2)), isshow: tmp[arr[index]].enable, value: Number(tmp[arr[index]].size) }
|
||||||
|
set_cache_tmp.push(tmpobj)
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 处理平板模式下 伽马校正操作
|
|
||||||
* 手写实现pad长按点击
|
|
||||||
*/
|
|
||||||
const ipad_chang_input = ref(false)
|
|
||||||
const now_apg = ref("");
|
|
||||||
let loop__apg: NodeJS.Timeout
|
|
||||||
let loop__apg_end: NodeJS.Timeout
|
|
||||||
const handlerTouchstart_apg = (fun: string) => {
|
|
||||||
loop__apg_end = setTimeout(() => {
|
|
||||||
loop__apg = setInterval(() => {
|
|
||||||
if (fun == '+') {
|
|
||||||
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] + 0.1)
|
|
||||||
} else {
|
} else {
|
||||||
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] - 0.1)
|
set_cache_tmp = tmp
|
||||||
}
|
}
|
||||||
chang(now_apg.value)
|
if (ste_status.value == 0) {
|
||||||
}, 30)
|
//set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference
|
||||||
}, 1000);
|
|
||||||
if (fun == '+') {
|
if (difference == -1) {
|
||||||
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] + 0.1)
|
set_cache_tmp[2].isshow = array[1].isshow
|
||||||
} else {
|
} else {
|
||||||
array[group.value][now_apg.value] = toDecimal(array[group.value][now_apg.value] - 0.1)
|
set_cache_tmp[2].value = difference
|
||||||
}
|
}
|
||||||
chang(now_apg.value)
|
set?.SetBlendingOverlap(0, 0, 2, set_cache_tmp[2].isshow, Number(set_cache_tmp[2].value));
|
||||||
}
|
set_cache.value[0] = JSON.stringify(set_cache_tmp);
|
||||||
const handlerTouchend_apg = () => {
|
|
||||||
clearTimeout(loop__apg_end)
|
|
||||||
clearInterval(loop__apg)
|
|
||||||
}
|
|
||||||
const toDecimal = (num: number): number => {
|
|
||||||
return Math.round(num * 100) / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let loop_start: NodeJS.Timeout
|
|
||||||
let loop_finish: NodeJS.Timeout
|
|
||||||
const input_focus = ref([false, false, false, false,])
|
|
||||||
const mousedown = (fun: string, index: number) => {
|
|
||||||
loop_start = setTimeout(() => {
|
|
||||||
loop_finish = setInterval(() => {
|
|
||||||
if (fun == '+') {
|
|
||||||
array[index].value += 2
|
|
||||||
} else {
|
|
||||||
array[index].value -= 2
|
|
||||||
}
|
|
||||||
}, 30)
|
|
||||||
}, 1000);
|
|
||||||
if (fun == '+') {
|
|
||||||
array[index].value += 2
|
|
||||||
} else {
|
|
||||||
array[index].value -= 2
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mouseup = () => {
|
|
||||||
clearTimeout(loop_start)
|
|
||||||
clearInterval(loop_finish)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const input_focus_apg = ref([false, false, false,])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const ["上","左","右","下"]
|
|
||||||
/**
|
|
||||||
* 可供选择的
|
|
||||||
*/
|
|
||||||
const options = [{
|
|
||||||
label: $t.t('up'),
|
|
||||||
value: 0
|
|
||||||
}, {
|
|
||||||
label: $t.t('left'),
|
|
||||||
value: 1
|
|
||||||
}, {
|
|
||||||
label: $t.t('right'),
|
|
||||||
value: 2
|
|
||||||
}, {
|
|
||||||
label: $t.t('down'),
|
|
||||||
value: 3
|
|
||||||
}]
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
options,
|
|
||||||
input_focus_apg,
|
|
||||||
input_focus,
|
|
||||||
mousedown,
|
|
||||||
mouseup,
|
|
||||||
now_apg,
|
|
||||||
handlerTouchstart_apg,
|
|
||||||
handlerTouchend_apg,
|
|
||||||
ipad_chang_input,
|
|
||||||
send_auxiliary_line,
|
send_auxiliary_line,
|
||||||
group,
|
group,
|
||||||
array,
|
array,
|
||||||
chang,
|
chang,
|
||||||
enablefusion,
|
enablefusion,
|
||||||
// changenablefusion,
|
changenablefusion,
|
||||||
selectedprojector,
|
selectedprojector,
|
||||||
set_cache,
|
set_cache,
|
||||||
auxiliary_line,
|
auxiliary_line,
|
||||||
reset,
|
reset,
|
||||||
auto_sync,
|
auto_sync,
|
||||||
config,
|
config
|
||||||
save_set_cache,
|
|
||||||
ipad_chang,
|
|
||||||
url,
|
|
||||||
handlerTouchstart,
|
|
||||||
handlerTouchend,
|
|
||||||
ispad,
|
|
||||||
color,
|
|
||||||
submit
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 col-sm-3"></div>
|
<div class="col-4"></div>
|
||||||
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[0]"
|
<div class="col-4 q-pt-sm"><q-select outlined v-model="model[0]"
|
||||||
@update:model-value="update_row_col(0, model[0])" :options="options" :dense="true" :options-dense="true"
|
@update:model-value="update_row_col(0, model[0])" :options="options" :dense="true" :options-dense="true"
|
||||||
:label="$t('wall row')" /> </div><q-checkbox @update:model-value="send_off(0)"
|
:label="$t('wall row')" /> </div><q-checkbox @update:model-value="send_off(0)"
|
||||||
v-model="RowsColumns[0]" />
|
v-model="RowsColumns[0]" />
|
||||||
|
@ -13,8 +13,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 col-sm-3"></div>
|
<div class="col-4"></div>
|
||||||
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[1]"
|
<div class="col-4 q-pt-sm"><q-select outlined v-model="model[1]"
|
||||||
@update:model-value="update_row_col(1, model[1])" :options="options" :dense="true" :options-dense="true"
|
@update:model-value="update_row_col(1, model[1])" :options="options" :dense="true" :options-dense="true"
|
||||||
:label="$t('wall col')" /> </div><q-checkbox @update:model-value="send_off(1)"
|
:label="$t('wall col')" /> </div><q-checkbox @update:model-value="send_off(1)"
|
||||||
v-model="RowsColumns[1]" />
|
v-model="RowsColumns[1]" />
|
||||||
|
@ -22,16 +22,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 col-sm-3"></div>
|
<div class="col-4"></div>
|
||||||
<div class="col-4 col-sm-6 q-pt-sm"><q-select outlined v-model="model[2]"
|
<div class="col-4 q-pt-sm"><q-select outlined v-model="model[2]"
|
||||||
@update:model-value="update_row_col(2, model[2])" :options="line_width_options" :dense="true" :options-dense="true"
|
@update:model-value="update_row_col(2, model[2])" :options="line_width_options" :dense="true" :options-dense="true"
|
||||||
:label="$t('line width')" /> </div>
|
:label="$t('line width')" /> </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row" style="min-height: 40px;">
|
<div class="row" style="min-height: 40px;">
|
||||||
<div class="col-4 col-sm-3"></div>
|
<div class="col-4"></div>
|
||||||
<div class="col-4 col-sm-6 q-pt-sm">
|
<div class="col-4 q-pt-sm">
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar class="head_1">
|
<q-item-section avatar class="head_1">
|
||||||
{{ $t("line color") }}
|
{{ $t("line color") }}
|
||||||
|
@ -51,11 +51,33 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row" style="min-height: 40px;">
|
<div class="row" style="min-height: 40px;">
|
||||||
<div class="col-4 col-sm-3"></div>
|
<div class="col-4"></div>
|
||||||
<div class="col-4 col-sm-6 q-pt-sm">
|
<div class="col-4 q-pt-sm">
|
||||||
|
<q-item>
|
||||||
|
<q-item-section avatar class="head_1">
|
||||||
|
{{ $t("background color") }}
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
<q-input v-model="color[1]" :rules="['anyColor']">
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="colorize" class="cursor-pointer" @click="index = 1">
|
||||||
|
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
|
||||||
|
<q-color v-model="color[1]" @change="submit" />
|
||||||
|
</q-popup-proxy>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row" style="min-height: 40px;">
|
||||||
|
<div class="col-4"></div>
|
||||||
|
<div class="col-4 q-pt-sm">
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar class="head_1">
|
<q-item-section avatar class="head_1">
|
||||||
{{ $t("center circle color") }}
|
{{ $t("center circle color") }}
|
||||||
|
@ -108,11 +130,8 @@ export default defineComponent({
|
||||||
const index = ref(0);
|
const index = ref(0);
|
||||||
const color = reactive(["#ffffff", "#CCCCCC", "#000", "#000"]);
|
const color = reactive(["#ffffff", "#CCCCCC", "#000", "#000"]);
|
||||||
let model = reactive([20, 40, 20]);
|
let model = reactive([20, 40, 20]);
|
||||||
let options = ref([10, 20, 30, 40, 50, 60 ,80]);
|
let options = ref([10, 20, 30, 40, 50]);
|
||||||
let line_width_options = ref([2,4,6,8,10, 20, 30, 40, 50]);
|
let line_width_options = ref([2,4,6,8,10, 20, 30, 40, 50]);
|
||||||
/**
|
|
||||||
* 发送颜色 根据index不同确定是那个接口
|
|
||||||
*/
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
switch (index.value) {
|
switch (index.value) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -131,11 +150,6 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 修改 横纵 线的数量
|
|
||||||
* @param type 类型
|
|
||||||
* @param value 值
|
|
||||||
*/
|
|
||||||
const update_row_col = (type: number, value: number) => {
|
const update_row_col = (type: number, value: number) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -151,10 +165,6 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 修改 单选 发送数据 使用switch 匹配多个
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const send_off = (type: number) => {
|
const send_off = (type: number) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -176,9 +186,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 使用服务端配置
|
|
||||||
*/
|
|
||||||
const use_server_config = () => {
|
const use_server_config = () => {
|
||||||
let server_conf = JSON.parse($store.state.fusion_configuration).options
|
let server_conf = JSON.parse($store.state.fusion_configuration).options
|
||||||
model[0] = server_conf.blending_grids_row ?? 20;
|
model[0] = server_conf.blending_grids_row ?? 20;
|
||||||
|
@ -196,16 +203,10 @@ export default defineComponent({
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
set_sessionStorage()
|
set_sessionStorage()
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 保存缓存到sessionStorage
|
|
||||||
*/
|
|
||||||
const set_sessionStorage = () => {
|
const set_sessionStorage = () => {
|
||||||
let tmp = { RowsColumns: RowsColumns, color: color, model: model }
|
let tmp = { RowsColumns: RowsColumns, color: color, model: model }
|
||||||
sessionStorage.GridSettings = JSON.stringify(tmp)
|
sessionStorage.GridSettings = JSON.stringify(tmp)
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 获取sessionStorage
|
|
||||||
*/
|
|
||||||
const get_sessionStorage = () => {
|
const get_sessionStorage = () => {
|
||||||
let tmp = JSON.parse(sessionStorage.GridSettings)
|
let tmp = JSON.parse(sessionStorage.GridSettings)
|
||||||
for (let index = 0; index < tmp.RowsColumns.length; index++) {
|
for (let index = 0; index < tmp.RowsColumns.length; index++) {
|
||||||
|
|
|
@ -16,108 +16,52 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="ispad">
|
<div>
|
||||||
<div class="row q-md-py-xl">
|
<div class="row" v-show="false">
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-2 q-px-md">
|
<div class="col-2 q-px-md">
|
||||||
<div class="col-2"> <q-select class="q-pt-md" :label="$t('point amount')"
|
<div class="col-2"> <q-select class="q-pt-md" :label="$t('point amount')"
|
||||||
@update:model-value="(val) => { now_amount = val; chang_point_amount(val) }" :dense="true" filled
|
@update:model-value="(val) => { chang_point_amount(val) }" :dense="true" filled v-model="value_point_amount"
|
||||||
v-model="value_point_amount" :options="options_value_point_amount" emit-value map-options />
|
:options="options_value_point_amount" emit-value map-options />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<div class="col-1 q-pt-md "><q-btn color="white"
|
|
||||||
@click="() => { add_dialog = true; value_point_amount_tmp = value_point_amount; now_amount = value_point_amount }"
|
<div class="col-1 q-pt-md "><q-btn color="white" @click="add_control_points(Number(value_point_amount))"
|
||||||
text-color="black" :label="$t('add control points')" /></div>
|
text-color="black" :label="$t('add control points')" /></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
|
|
||||||
<div class="col-1 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
|
<div class="col-1 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }" :disable="value_point_amount<=9" text-color="black"
|
||||||
:disable="value_point_amount <= 9" text-color="black" :label="$t('reduce control points')" /></div>
|
:label="$t('reduce control points')" /></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="q-pt-md q-px-md col-4"> <q-btn color="white" @click="resetall_all" text-color="black"
|
|
||||||
:label="$t('Reset all program control points')" /></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
<div class="col-2 q-px-md" @mousewheel="details_selsect"> <q-select class="q-pt-md" :label="$t('point')"
|
<div class="col-2 q-px-md"> <q-select class="q-pt-md" :label="$t('point')" :dense="true" filled
|
||||||
:dense="true" filled v-model="options_model" @update:model-value="(val) => { options_model = val }"
|
v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options" emit-value
|
||||||
:options="options" emit-value map-options /></div>
|
map-options /></div>
|
||||||
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'x')"> <q-input v-if="value[options_model]"
|
<div class="col-2 q-px-md"> <q-input filled type="number" class="q-pt-md" :dense="true"
|
||||||
filled type="number" class="q-pt-md" :dense="true" v-model="value[options_model].x"
|
v-model="value[options_model].x" @update:model-value="chang(options_model, $event, 'h')" label="x"
|
||||||
@update:model-value="chang(options_model, $event, 'h')" label="x" lazy-rules
|
lazy-rules />
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
|
|
||||||
</div>
|
|
||||||
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'y')"><q-input v-if="value[options_model]"
|
|
||||||
filled type="number" class="q-pt-md" :dense="true" v-model="value[options_model].y"
|
|
||||||
@update:model-value="chang(options_model, $event, 'h')" label="y" lazy-rules
|
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-2 q-px-md"><q-input filled type="number" class="q-pt-md" :dense="true"
|
||||||
|
v-model="value[options_model].y" @update:model-value="chang(options_model, $event, 'h')" label="y"
|
||||||
|
lazy-rules /></div>
|
||||||
<div class="q-pt-md col-2">
|
<div class="q-pt-md col-2">
|
||||||
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
|
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pt-md q-px-md col-3"> <q-btn color="white" @click="resetall" text-color="black"
|
<div class="col-2 q-pt-md ">
|
||||||
:label="$t('reset all') + value_point_amount + $t('point')" /></div>
|
<div><q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall')" /></div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-show="!ispad">
|
|
||||||
<div style="display: flex;justify-content: space-around;">
|
|
||||||
<div style="min-width: 100px;"> <q-select class="q-pt-md" :label="$t('point amount')"
|
|
||||||
@update:model-value="(val) => { now_amount = val; chang_point_amount(val) }" :dense="true" filled
|
|
||||||
v-model="value_point_amount" :options="options_value_point_amount" emit-value map-options />
|
|
||||||
</div>
|
|
||||||
<div class=" q-pt-md "><q-btn color="white"
|
|
||||||
@click="() => { add_dialog = true; value_point_amount_tmp = value_point_amount; now_amount = value_point_amount }"
|
|
||||||
text-color="black" :label="$t('add control points')" /></div>
|
|
||||||
<div class="q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }" :disable="value_point_amount <= 9"
|
|
||||||
text-color="black" :label="$t('reduce control points')" /></div>
|
|
||||||
|
|
||||||
<div class="q-pt-md q-px-md "> <q-btn color="white" @click="resetall_all" text-color="black"
|
|
||||||
:label="$t('Reset all program control points')" /></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="display: flex;justify-content: space-around;">
|
|
||||||
<div style="min-width: 100px;" @mousewheel="details_selsect"> <q-select class="q-pt-md" :label="$t('point')" :dense="true"
|
|
||||||
filled v-model="options_model" @update:model-value="(val) => { options_model = val }" :options="options"
|
|
||||||
emit-value map-options /></div>
|
|
||||||
<div class=" q-px-md" @mousewheel="details_selsect_val($event, 'x')"> <q-input v-if="value[options_model]" filled
|
|
||||||
type="number" class="q-pt-md" :dense="true" v-model="value[options_model].x"
|
|
||||||
@update:model-value="chang(options_model, $event, 'h')" label="x" lazy-rules
|
|
||||||
@focus="input_x_focus=true" @blur="input_x_focus=false"
|
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" >
|
|
||||||
<template v-if="input_x_focus" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="mousedown('+','x')" @mouseup="mouseup" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="mousedown('-','x')" @mouseup="mouseup" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
<div class=" q-px-md" @mousewheel="details_selsect_val($event, 'y')"><q-input v-if="value[options_model]" filled
|
|
||||||
type="number" class="q-pt-md" :dense="true" v-model="value[options_model].y"
|
|
||||||
@update:model-value="chang(options_model, $event, 'h')" label="y" lazy-rules
|
|
||||||
@focus="input_y_focus=true" @blur="input_y_focus=false"
|
|
||||||
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" >
|
|
||||||
<template v-if="input_y_focus" v-slot:append>
|
|
||||||
<q-icon name="arrow_upward" @mousedown="mousedown('+','y')" @mouseup="mouseup" />
|
|
||||||
<q-icon name="arrow_downward" @mousedown="mousedown('-','y')" @mouseup="mouseup" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
<div class="q-pt-md ">
|
|
||||||
<q-btn color="white" @click="reset(options_model, true, 'h')" text-color="black" :label="$t('reset')" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="q-pt-md q-px-md "> <q-btn color="white" @click="resetall" text-color="black"
|
|
||||||
:label="$t('reset all') + value_point_amount + $t('point')" /></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
<q-dialog v-model="del_dialog">
|
<q-dialog v-model="del_dialog">
|
||||||
<q-card style="width: 500px; max-width: 80vw;">
|
<q-card style="width: 700px; max-width: 80vw;">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="text-h6">{{ $t('confirm delete') }}</div>
|
<div class="text-h6">{{ $t('confirm delete') }}</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
@ -131,65 +75,6 @@
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<q-dialog position="bottom" v-model="add_dialog">
|
|
||||||
<q-card style="width: 500px; max-width: 80vw;">
|
|
||||||
<q-card-section>
|
|
||||||
<div class="text-h6">{{ $t('Whether to add control points') }}</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-10"><q-input filled v-model="now_amount" min="3" disable type="number"
|
|
||||||
:label="$t('Please enter the points you need to add')"
|
|
||||||
@update:model-value="(val: any) => { preview(val) }" />
|
|
||||||
</div>
|
|
||||||
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↑"
|
|
||||||
@click="() => { preview(Math.sqrt(now_amount) + 1) }" /> </div>
|
|
||||||
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↓"
|
|
||||||
@click="() => { preview(Math.sqrt(now_amount) - 1) }" /></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
|
||||||
<q-btn flat :label="$t('Cancel')" @click="() => { preview(Math.sqrt(value_point_amount_tmp)) }" color="primary"
|
|
||||||
v-close-popup />
|
|
||||||
<q-btn flat :label="$t('ok')" @click="add" color="primary" v-close-popup />
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
|
|
||||||
|
|
||||||
<q-dialog v-model="ipad_chang">
|
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
|
||||||
<q-card-section>
|
|
||||||
<!-- <div class="text-h6">{{ $t('point') +(options_model+1 )}}</div> -->
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-4"><q-select class="q-pt-md" :label="$t('point')" :dense="true" filled v-model="options_model"
|
|
||||||
@update:model-value="(val) => { options_model = val }" :options="options" emit-value map-options /></div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black" icon="keyboard_arrow_up"
|
|
||||||
@touchstart="handlerTouchstart('y', '+')" @touchend="handlerTouchend" /></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black"
|
|
||||||
icon="keyboard_arrow_left" @touchstart="handlerTouchstart('x', '-')" @touchend="handlerTouchend" /></div>
|
|
||||||
<div class="col-6" style="text-align: center;"><q-btn color="white" text-color="black"
|
|
||||||
icon="keyboard_arrow_right" @touchstart="handlerTouchstart('x', '+')" @touchend="handlerTouchend" /></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12" style="text-align: center;"><q-btn color="white" text-color="black"
|
|
||||||
icon="keyboard_arrow_down" @touchstart="handlerTouchstart('y', '-')" @touchend="handlerTouchend" /></div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
|
||||||
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang = false" />
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -204,16 +89,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- 取消浏览器自带的input箭头 使用q-input的图标实现 -->
|
|
||||||
<style>
|
|
||||||
input::-webkit-outer-spin-button,
|
|
||||||
input::-webkit-inner-spin-button {
|
|
||||||
-webkit-appearance: none !important;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import {
|
||||||
defineComponent,
|
defineComponent,
|
||||||
|
@ -250,20 +125,11 @@ export default defineComponent({
|
||||||
let $t = useI18n();
|
let $t = useI18n();
|
||||||
const ste_status = ref(0);
|
const ste_status = ref(0);
|
||||||
let allconfig = JSON.parse($store.state.fusion_configuration);
|
let allconfig = JSON.parse($store.state.fusion_configuration);
|
||||||
|
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
|
||||||
const configselsect = computed(() => {
|
const configselsect = computed(() => {
|
||||||
return $store.state.selected_projector;
|
return $store.state.selected_projector;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* 平板弹窗修改
|
|
||||||
*/
|
|
||||||
const ipad_chang = ref(false)
|
|
||||||
/**
|
|
||||||
* 当前url路径
|
|
||||||
*/
|
|
||||||
let url = window.location.href;
|
|
||||||
|
|
||||||
//用于计算当前投影仪的索引
|
//用于计算当前投影仪的索引
|
||||||
let serverconfig = JSON.parse($store.state.fusion_configuration);
|
let serverconfig = JSON.parse($store.state.fusion_configuration);
|
||||||
const selectedprojector = computed(() => {
|
const selectedprojector = computed(() => {
|
||||||
|
@ -272,35 +138,13 @@ export default defineComponent({
|
||||||
$store.getters.GetTheCurrentlySelectedCamera[1]
|
$store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 当前投影机的数据
|
|
||||||
*/
|
|
||||||
let config = JSON.parse($store.state.fusion_configuration).projectors[selectedprojector.value];
|
|
||||||
/**
|
|
||||||
* 当前点的个数
|
|
||||||
*/
|
|
||||||
const value_point_amount = ref(9)
|
const value_point_amount = ref(9)
|
||||||
/**
|
|
||||||
* 删除 弹窗
|
|
||||||
*/
|
|
||||||
const del_dialog = ref(false)
|
const del_dialog = ref(false)
|
||||||
/**
|
|
||||||
* 添加弹窗
|
|
||||||
*/
|
|
||||||
const add_dialog = ref(false)
|
|
||||||
/**
|
|
||||||
* 当前点的个数
|
|
||||||
*/
|
|
||||||
const now_amount = ref(9)
|
|
||||||
/**
|
|
||||||
* 可以选择点数的列表
|
|
||||||
*/
|
|
||||||
const options_value_point_amount = ref(<string[]>[])
|
const options_value_point_amount = ref(<string[]>[])
|
||||||
/**
|
|
||||||
* 深度copy
|
|
||||||
* @param o1
|
|
||||||
* @param o2
|
|
||||||
*/
|
|
||||||
const deepcopy = (o1: any, o2: any) => {
|
const deepcopy = (o1: any, o2: any) => {
|
||||||
for (let k in o2) {
|
for (let k in o2) {
|
||||||
if (typeof o2[k] === "object") {
|
if (typeof o2[k] === "object") {
|
||||||
|
@ -312,12 +156,10 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 使用服务端获取的配置
|
|
||||||
*/
|
|
||||||
const use_server_config = () => {
|
const use_server_config = () => {
|
||||||
value_point_amount.value = Number(Object.keys(config.multi_curved_surface)[0])
|
value_point_amount.value=9
|
||||||
let a = value_point_amount.value
|
let a = 9
|
||||||
value.value = []
|
value.value = []
|
||||||
value_point.value = []
|
value_point.value = []
|
||||||
for (let index = 0; index < config.multi_curved_surface[a].length; index++) {
|
for (let index = 0; index < config.multi_curved_surface[a].length; index++) {
|
||||||
|
@ -335,9 +177,7 @@ export default defineComponent({
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 使用本地缓存配置
|
|
||||||
*/
|
|
||||||
const use_set_cache = () => {
|
const use_set_cache = () => {
|
||||||
if (set_cache.value[selectedprojector.value] != null) {
|
if (set_cache.value[selectedprojector.value] != null) {
|
||||||
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
let tmp = JSON.parse(set_cache.value[selectedprojector.value]);
|
||||||
|
@ -347,17 +187,13 @@ export default defineComponent({
|
||||||
recalculate_coordinates()
|
recalculate_coordinates()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 保存本地缓存
|
|
||||||
*/
|
|
||||||
const save_set_cache = () => {
|
const save_set_cache = () => {
|
||||||
let tmp = { value: value.value, value_point_amount: value_point_amount.value, value_point: value_point.value}
|
let tmp = { value: value.value, value_point_amount: value_point_amount.value, value_point: value_point.value}
|
||||||
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
set_cache.value[selectedprojector.value] = JSON.stringify(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 监听投影机是否切换
|
|
||||||
*/
|
|
||||||
watch(
|
watch(
|
||||||
() => configselsect,
|
() => configselsect,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
|
@ -377,19 +213,15 @@ export default defineComponent({
|
||||||
use_server_config();
|
use_server_config();
|
||||||
use_set_cache();
|
use_set_cache();
|
||||||
options_value_point_amount.value = Object.keys(config.multi_curved_surface)
|
options_value_point_amount.value = Object.keys(config.multi_curved_surface)
|
||||||
setTimeout(() => {
|
|
||||||
set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`)
|
|
||||||
}, 100);
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ste_status.value = 0;
|
ste_status.value = 0;
|
||||||
}, 120);
|
}, 100);
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* 缓存 变量
|
|
||||||
*/
|
|
||||||
const set_cache: any = ref([]);
|
const set_cache: any = ref([]);
|
||||||
//值
|
//值
|
||||||
let value = ref(<DensityCorrection[]>[]);
|
let value = ref(<DensityCorrection[]>[]);
|
||||||
|
@ -401,26 +233,15 @@ export default defineComponent({
|
||||||
const options_model = ref(0)
|
const options_model = ref(0)
|
||||||
|
|
||||||
const div = ref();
|
const div = ref();
|
||||||
/**
|
|
||||||
* 分辨率最大值
|
|
||||||
*/
|
|
||||||
const max = ref({ x: 0, y: 0 })
|
const max = ref({ x: 0, y: 0 })
|
||||||
/**
|
|
||||||
* 点的大小
|
|
||||||
*/
|
|
||||||
const point = ref({ w: 20, h: 20 })
|
const point = ref({ w: 20, h: 20 })
|
||||||
/**
|
|
||||||
* 发送当前选择的点
|
|
||||||
*/
|
|
||||||
watch(() => options_model, (newval, oldval) => {
|
watch(() => options_model, (newval, oldval) => {
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `9:${newval.value + 1}`)
|
set?.SetBlendingOption("blending_grids_select_point", `9:${newval.value + 1}`)
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
/**
|
|
||||||
* 发送当前点的数量
|
|
||||||
*/
|
|
||||||
watch(() => value_point_amount, (newval, oldval) => {
|
watch(() => value_point_amount, (newval, oldval) => {
|
||||||
if (ste_status.value == 0) set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
|
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
|
||||||
options_model.value = 0
|
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
|
@ -433,19 +254,12 @@ export default defineComponent({
|
||||||
max.value.y = div.value.offsetHeight
|
max.value.y = div.value.offsetHeight
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
|
||||||
* 变更点数
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const chang_point_amount = (val: number) => {
|
const chang_point_amount = (val: number) => {
|
||||||
start_point(val)
|
start_point(val)
|
||||||
//use_set_cache()
|
//use_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 拖拽组件移动回调
|
|
||||||
* @param $event
|
|
||||||
* @param index
|
|
||||||
*/
|
|
||||||
const dragStartHandle = ($event: any, index: number) => {
|
const dragStartHandle = ($event: any, index: number) => {
|
||||||
let obj_x = $event.x
|
let obj_x = $event.x
|
||||||
let obj_y = $event.y
|
let obj_y = $event.y
|
||||||
|
@ -455,12 +269,7 @@ export default defineComponent({
|
||||||
send_value(index, Math.trunc(tmp.x), Math.trunc(tmp.y))
|
send_value(index, Math.trunc(tmp.x), Math.trunc(tmp.y))
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 修改input 手动计算拖拽组件的位置
|
|
||||||
* @param index
|
|
||||||
* @param $event
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const chang = (index: number, $event: any, type: string) => {
|
const chang = (index: number, $event: any, type: string) => {
|
||||||
index = Number(index)
|
index = Number(index)
|
||||||
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
|
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
|
||||||
|
@ -470,9 +279,6 @@ export default defineComponent({
|
||||||
|
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 计算可供选择的点
|
|
||||||
*/
|
|
||||||
const options = computed(() => {
|
const options = computed(() => {
|
||||||
let tmp = []
|
let tmp = []
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
|
@ -507,10 +313,7 @@ export default defineComponent({
|
||||||
y = (max.value.y - (y + point.value.h)) * Proportion.value.y
|
y = (max.value.y - (y + point.value.h)) * Proportion.value.y
|
||||||
return { x, y }
|
return { x, y }
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 初始化 赋值
|
|
||||||
* @param a
|
|
||||||
*/
|
|
||||||
const start_point = (a: number) => {
|
const start_point = (a: number) => {
|
||||||
value.value = []
|
value.value = []
|
||||||
value_point.value = []
|
value_point.value = []
|
||||||
|
@ -528,12 +331,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
save_set_cache()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 用于模拟数据让dom先渲染
|
|
||||||
*/
|
|
||||||
const start = () => {
|
const start = () => {
|
||||||
let tmp: DensityCorrectionPoint = { control_point: 0, x: 0, y: 0, def_x: 0, def_y: 0 };
|
let tmp: DensityCorrectionPoint = { control_point: 0, x: 0, y: 0, def_x: 0, def_y: 0 };
|
||||||
value.value.push(tmp)
|
value.value.push(tmp)
|
||||||
|
@ -541,16 +341,11 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
start()
|
start()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
/**
|
|
||||||
* 计算比例
|
|
||||||
*/
|
|
||||||
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
||||||
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
|
Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
|
||||||
|
start_point(9)
|
||||||
start()
|
start()
|
||||||
use_server_config()
|
use_server_config()
|
||||||
options_value_point_amount.value = Object.keys(config.multi_curved_surface)
|
|
||||||
start_point(Number(options_value_point_amount.value[0]))
|
|
||||||
if (
|
if (
|
||||||
sessionStorage.SurfaceCorrection &&
|
sessionStorage.SurfaceCorrection &&
|
||||||
sessionStorage.SurfaceCorrection.length > 0
|
sessionStorage.SurfaceCorrection.length > 0
|
||||||
|
@ -558,7 +353,7 @@ export default defineComponent({
|
||||||
set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection);
|
set_cache.value = JSON.parse(sessionStorage.SurfaceCorrection);
|
||||||
use_set_cache();
|
use_set_cache();
|
||||||
}
|
}
|
||||||
keyDown()
|
options_value_point_amount.value = Object.keys(config.multi_curved_surface)
|
||||||
window.onresize = () => {
|
window.onresize = () => {
|
||||||
return (() => {
|
return (() => {
|
||||||
if (div != null) {
|
if (div != null) {
|
||||||
|
@ -567,54 +362,23 @@ export default defineComponent({
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 注销组件时 把当前修改的数据存入sessionStorage
|
|
||||||
*/
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
sessionStorage.SurfaceCorrection = JSON.stringify(set_cache.value);
|
sessionStorage.SurfaceCorrection = JSON.stringify(set_cache.value);
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 重置
|
|
||||||
* @param index 索引
|
|
||||||
* @param send 是否发送给后端
|
|
||||||
* @param type
|
|
||||||
*/
|
|
||||||
const reset = (index: number, send: boolean, type: string) => {
|
const reset = (index: number, send: boolean, type: string) => {
|
||||||
value.value[index].x = value.value[index].def_x
|
value.value[index].x = value.value[index].def_x
|
||||||
value.value[index].y = value.value[index].def_y
|
value.value[index].y = value.value[index].def_y
|
||||||
chang(index, value.value[index].def_y, type)
|
chang(index, value.value[index].def_y, type)
|
||||||
save_set_cache()
|
save_set_cache()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 发送点的数据
|
|
||||||
* @param index 当前点的索引
|
|
||||||
* @param x x值
|
|
||||||
* @param y y值
|
|
||||||
*/
|
|
||||||
const send_value = (index: number, x: number, y: number) => {
|
const send_value = (index: number, x: number, y: number) => {
|
||||||
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||||
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
||||||
set?.setBlendingCorrection(row, col, 9, value_point.value.length, index + 1, Number(x), Number(y));
|
set?.setBlendingCorrection(row, col, 9, value_point.value.length, index + 1, Number(x), Number(y));
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 重置全部点的参数
|
|
||||||
*/
|
|
||||||
const resetall = () => {
|
const resetall = () => {
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
|
||||||
value.value[index].x = value.value[index].def_x
|
|
||||||
value.value[index].y = value.value[index].def_y
|
|
||||||
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
|
|
||||||
value_point.value[index].y = Math.trunc(tmp.y)
|
|
||||||
value_point.value[index].x = Math.trunc(tmp.x)
|
|
||||||
}
|
|
||||||
send_value(-1, 0, 0)
|
|
||||||
save_set_cache()
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 重置所有配置方案的 配置
|
|
||||||
*/
|
|
||||||
const resetall_all = () => {
|
|
||||||
let amount_tmp = value_point_amount.value
|
|
||||||
for (let index = 0; index < value_point.value.length; index++) {
|
for (let index = 0; index < value_point.value.length; index++) {
|
||||||
value.value[index].x = value.value[index].def_x
|
value.value[index].x = value.value[index].def_x
|
||||||
value.value[index].y = value.value[index].def_y
|
value.value[index].y = value.value[index].def_y
|
||||||
|
@ -623,21 +387,7 @@ export default defineComponent({
|
||||||
value_point.value[index].x = Math.trunc(tmp.x)
|
value_point.value[index].x = Math.trunc(tmp.x)
|
||||||
}
|
}
|
||||||
send_value(-2,0,0)
|
send_value(-2,0,0)
|
||||||
|
|
||||||
for (let key in config.multi_curved_surface) {
|
|
||||||
for (let index = 0; index < config.multi_curved_surface[key].length; index++) {
|
|
||||||
config.multi_curved_surface[key][index].x = config.multi_curved_surface[key][index].def_x
|
|
||||||
config.multi_curved_surface[key][index].y = config.multi_curved_surface[key][index].def_y
|
|
||||||
}
|
}
|
||||||
start_point(Number(key))
|
|
||||||
}
|
|
||||||
value_point_amount.value = amount_tmp
|
|
||||||
start_point(Number(value_point_amount.value))
|
|
||||||
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 窗口改变大小时重新计算 比例
|
|
||||||
*/
|
|
||||||
const recalculate_coordinates = () => {
|
const recalculate_coordinates = () => {
|
||||||
try {
|
try {
|
||||||
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
|
||||||
|
@ -656,12 +406,8 @@ export default defineComponent({
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 增加点数
|
|
||||||
* @param amount 数量 平方
|
|
||||||
*/
|
|
||||||
const add_control_points = (amount: number) => {
|
const add_control_points = (amount: number) => {
|
||||||
if (amount < 9 ||amount>=169) return
|
if (amount < 9) return
|
||||||
let cardinality = Math.sqrt(amount)
|
let cardinality = Math.sqrt(amount)
|
||||||
amount = (cardinality + 1) ** 2
|
amount = (cardinality + 1) ** 2
|
||||||
let tmpconfig: any = null
|
let tmpconfig: any = null
|
||||||
|
@ -683,7 +429,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
ste_status.value = 1;
|
ste_status.value = 1;
|
||||||
tmpconfig = JSON.parse(JSON.stringify(fortmp));
|
tmpconfig = JSON.parse(JSON.stringify(fortmp));
|
||||||
config = fortmp
|
config = JSON.parse(JSON.stringify(fortmp));
|
||||||
options_value_point_amount.value = []
|
options_value_point_amount.value = []
|
||||||
for (let key in tmpconfig.multi_curved_surface) {
|
for (let key in tmpconfig.multi_curved_surface) {
|
||||||
options_value_point_amount.value.push(key)
|
options_value_point_amount.value.push(key)
|
||||||
|
@ -707,14 +453,8 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
ste_status.value = 0;
|
|
||||||
});
|
});
|
||||||
save_set_cache()
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 删除点数量
|
|
||||||
* @param amount
|
|
||||||
*/
|
|
||||||
const del_control_points = (amount: number) => {
|
const del_control_points = (amount: number) => {
|
||||||
let tmp=amount
|
let tmp=amount
|
||||||
if (amount <= 9) return
|
if (amount <= 9) return
|
||||||
|
@ -744,9 +484,8 @@ export default defineComponent({
|
||||||
for (let key in tmpconfig.multi_curved_surface) {
|
for (let key in tmpconfig.multi_curved_surface) {
|
||||||
options_value_point_amount.value.push(key)
|
options_value_point_amount.value.push(key)
|
||||||
}
|
}
|
||||||
value_point_amount.value = Number(options_value_point_amount.value[0])
|
value_point_amount.value = 9
|
||||||
amount = Number(options_value_point_amount.value[0])
|
amount=9
|
||||||
now_amount.value = Number(options_value_point_amount.value[0])
|
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
$store.commit("setfusion_configuration", res?.config);
|
||||||
value.value = []
|
value.value = []
|
||||||
value_point.value = []
|
value_point.value = []
|
||||||
|
@ -764,308 +503,13 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
value_point.value.push(tmp_point)
|
value_point.value.push(tmp_point)
|
||||||
}
|
}
|
||||||
ste_status.value = 0;
|
|
||||||
|
|
||||||
});
|
});
|
||||||
save_set_cache()
|
|
||||||
}
|
}
|
||||||
const add = () => {
|
|
||||||
let tmpconfig: any = null
|
|
||||||
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
|
||||||
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
|
||||||
let amount = now_amount.value
|
|
||||||
set?.AddBlendingCtrlPoint('9', row, col, Number(amount)).then((res) => {
|
|
||||||
if (res == null || typeof (res) == "undefined") return
|
|
||||||
let tmp = JSON.parse(res?.config);
|
|
||||||
let fortmp = null;
|
|
||||||
let i;
|
|
||||||
for (i of tmp.projectors) {
|
|
||||||
if (
|
|
||||||
i.col === $store.getters.GetTheCurrentlySelectedCamera[1] &&
|
|
||||||
i.row === $store.getters.GetTheCurrentlySelectedCamera[0]
|
|
||||||
) {
|
|
||||||
fortmp = JSON.parse(JSON.stringify(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ste_status.value = 1;
|
|
||||||
tmpconfig = JSON.parse(JSON.stringify(fortmp));
|
|
||||||
config = JSON.parse(JSON.stringify(fortmp));
|
|
||||||
options_value_point_amount.value = []
|
|
||||||
for (let key in tmpconfig.multi_curved_surface) {
|
|
||||||
options_value_point_amount.value.push(key)
|
|
||||||
}
|
|
||||||
|
|
||||||
value_point_amount.value = amount
|
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
|
||||||
value.value = []
|
|
||||||
value_point.value = []
|
|
||||||
for (let index = 0; index < tmpconfig.multi_curved_surface[amount].length; index++) {
|
|
||||||
let tmp: DensityCorrectionPoint = tmpconfig.multi_curved_surface[amount][index];
|
|
||||||
value.value.push(tmp)
|
|
||||||
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
|
|
||||||
let def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
|
|
||||||
let tmp_point: DensityCorrectionPoint = {
|
|
||||||
control_point: tmp.control_point,
|
|
||||||
x: x_y.x,
|
|
||||||
y: x_y.y,
|
|
||||||
def_x: def_x_f.x,
|
|
||||||
def_y: def_x_f.y
|
|
||||||
}
|
|
||||||
value_point.value.push(tmp_point)
|
|
||||||
}
|
|
||||||
ste_status.value = 0;
|
|
||||||
});
|
|
||||||
set?.SetBlendingOption("blending_grids_control_point_count", `${value_point_amount.value}`)
|
|
||||||
save_set_cache()
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 预览增加点的效果
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const preview = (val: number) => {
|
|
||||||
val = Number(val)
|
|
||||||
if (val < 3||val>=13) return
|
|
||||||
let width = allconfig.projector_width / (val - 1)
|
|
||||||
let height = allconfig.projector_height / (val - 1)
|
|
||||||
value.value = []
|
|
||||||
value_point.value = []
|
|
||||||
for (let index = 0; index < val; index++) {
|
|
||||||
for (let indexx = 0; indexx < val; indexx++) {
|
|
||||||
let y = allconfig.projector_height - height * index
|
|
||||||
let x = width * indexx
|
|
||||||
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point: index + indexx + 1 };
|
|
||||||
value.value.push(tmp)
|
|
||||||
let x_y = coordinate_transformation_value_to_xy(tmp.x, tmp.y)
|
|
||||||
let def_x_f = coordinate_transformation_value_to_xy(tmp.def_x, tmp.def_y)
|
|
||||||
let tmp_point: DensityCorrectionPoint = {
|
|
||||||
control_point: tmp.control_point,
|
|
||||||
x: x_y.x,
|
|
||||||
y: x_y.y,
|
|
||||||
def_x: def_x_f.x,
|
|
||||||
def_y: def_x_f.y
|
|
||||||
}
|
|
||||||
value_point.value.push(tmp_point)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
now_amount.value = val ** 2
|
|
||||||
value_point_amount.value = val ** 2
|
|
||||||
options_model.value = 1
|
|
||||||
save_set_cache()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 滚轮切换
|
|
||||||
* @param details 鼠标返回对象
|
|
||||||
*/
|
|
||||||
const details_selsect = (details: any) => {
|
|
||||||
let spt = details.deltaY / 100
|
|
||||||
if (spt > 0) {
|
|
||||||
if (options_model.value >= value_point.value.length - 1) {
|
|
||||||
options_model.value = 0
|
|
||||||
} else {
|
|
||||||
options_model.value++
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (options_model.value <= 1) {
|
|
||||||
options_model.value = value_point.value.length - 1
|
|
||||||
} else {
|
|
||||||
options_model.value--
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 滚轮改变数据
|
|
||||||
*/
|
|
||||||
const details_selsect_val = (details: any, type: string) => {
|
|
||||||
let spt = details.deltaY / 100
|
|
||||||
switch (type) {
|
|
||||||
case 'x':
|
|
||||||
if (spt < 0) {
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (spt < 0) {
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
chang(options_model.value, "", "")
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 在增加时 实现回退
|
|
||||||
*/
|
|
||||||
const value_point_amount_tmp = ref(0)
|
|
||||||
/**
|
|
||||||
* 长按实现
|
|
||||||
*/
|
|
||||||
let loop: NodeJS.Timeout
|
|
||||||
let loop_end: NodeJS.Timeout
|
|
||||||
const handlerTouchstart = (type: string, fun: string) => {
|
|
||||||
loop_end = setTimeout(() => {
|
|
||||||
loop = setInterval(() => {
|
|
||||||
if (type == 'x') {
|
|
||||||
if (fun == '+') {
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (fun == '+') {
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chang(options_model.value, 0, '')
|
|
||||||
}, 30)
|
|
||||||
}, 1000);
|
|
||||||
if (type == 'x') {
|
|
||||||
if (fun == '+') {
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (fun == '+') {
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
}
|
|
||||||
chang(options_model.value, 0, '')
|
|
||||||
}
|
|
||||||
const handlerTouchend = () => {
|
|
||||||
clearTimeout(loop_end)
|
|
||||||
clearInterval(loop)
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 键盘监听
|
|
||||||
*/
|
|
||||||
const keyDown = () => {
|
|
||||||
document.onkeydown = (e) => {
|
|
||||||
let lock = 0;
|
|
||||||
let e1 = e || window.event || arguments.callee.caller.arguments[0]
|
|
||||||
switch (e.code) {
|
|
||||||
case "KeyW":
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
break;
|
|
||||||
case "KeyA":
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
break;
|
|
||||||
case "KeyS":
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
break;
|
|
||||||
case "KeyD":
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
lock = 1
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (lock == 0) chang(options_model.value, "h", 'h')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断是否是平板
|
|
||||||
*/
|
|
||||||
const ispad = computed(() => {
|
|
||||||
let url = window.location.href;
|
|
||||||
return url.indexOf("pad") != -1
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 针对平板的 手动实现单机和长按
|
|
||||||
*/
|
|
||||||
let loop_start: NodeJS.Timeout
|
|
||||||
let loop_finish: NodeJS.Timeout
|
|
||||||
|
|
||||||
const mousedown = (fun: string, type: string) => {
|
|
||||||
loop_start = setTimeout(() => {
|
|
||||||
loop_finish = setInterval(() => {
|
|
||||||
switch (type) {
|
|
||||||
case 'x':
|
|
||||||
if (fun == '+') {
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if (fun == '+') {
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
chang(options_model.value, 0, '')
|
|
||||||
}, 30)
|
|
||||||
}, 1000);
|
|
||||||
switch (type) {
|
|
||||||
case 'x':
|
|
||||||
if (fun == '+') {
|
|
||||||
value.value[options_model.value].x++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].x--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if (fun == '+') {
|
|
||||||
value.value[options_model.value].y++
|
|
||||||
} else {
|
|
||||||
value.value[options_model.value].y--
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
chang(options_model.value, 0, '')
|
|
||||||
}
|
|
||||||
|
|
||||||
const mouseup = () => {
|
|
||||||
clearTimeout(loop_start)
|
|
||||||
clearInterval(loop_finish)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 控制是否显示 input x 的自定义监听
|
|
||||||
*/
|
|
||||||
const input_x_focus=ref(false)
|
|
||||||
/**
|
|
||||||
* 控制是否显示 input y 的自定义监听
|
|
||||||
*/
|
|
||||||
const input_y_focus=ref(false)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
options_model,
|
options_model,
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
input_x_focus,
|
|
||||||
input_y_focus,
|
|
||||||
ispad,
|
|
||||||
mousedown,
|
|
||||||
mouseup,
|
|
||||||
value_point_amount_tmp,
|
|
||||||
details_selsect,
|
|
||||||
resetall_all,
|
|
||||||
resetall,
|
resetall,
|
||||||
div,
|
div,
|
||||||
max,
|
max,
|
||||||
|
@ -1082,16 +526,7 @@ export default defineComponent({
|
||||||
chang_point_amount,
|
chang_point_amount,
|
||||||
del_dialog,
|
del_dialog,
|
||||||
add_control_points,
|
add_control_points,
|
||||||
del_control_points,
|
del_control_points
|
||||||
add_dialog,
|
|
||||||
add,
|
|
||||||
now_amount,
|
|
||||||
preview,
|
|
||||||
details_selsect_val,
|
|
||||||
ipad_chang,
|
|
||||||
url,
|
|
||||||
handlerTouchstart,
|
|
||||||
handlerTouchend
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
">
|
">
|
||||||
<q-card class="" id="element" style="max-width: 90vw;padding: 0;">
|
<q-card class="" style="max-width: 90vw;padding: 0;">
|
||||||
<q-form>
|
<q-form>
|
||||||
<q-card-section class="q-ma-none q-pa-sm">
|
<q-card-section class="q-ma-none q-pa-sm">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -18,9 +18,6 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn v-show="ispad" size="sm" dense flat @click="element_full_screen" round :icon="is_pad_screen?'zoom_in_map':'zoom_out_map'" >
|
|
||||||
|
|
||||||
</q-btn>
|
|
||||||
<q-btn size="sm" dense flat round icon="close" color="red" @click="clear()" v-close-popup>
|
<q-btn size="sm" dense flat round icon="close" color="red" @click="clear()" v-close-popup>
|
||||||
<q-tooltip>
|
<q-tooltip>
|
||||||
{{ $t("close") }}
|
{{ $t("close") }}
|
||||||
|
@ -31,55 +28,54 @@
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<!-- height: 80vh -->
|
<!-- height: 80vh -->
|
||||||
<q-card-section class="scroll" :style="{ 'width': is_pad_style, padding: 0 }">
|
<q-card-section class="scroll" style="width: 60vw;padding: 0;">
|
||||||
<div class="row" style="border: 1px solid #b0bec5; text-align: center">
|
<div class="row" style="border: 1px solid #b0bec5; text-align: center">
|
||||||
<div class="col-2" style="border-right: 1px solid #b0bec5">
|
<div class="col-2" style="border-right: 1px solid #b0bec5">
|
||||||
<p class="text-center">{{ $t("Projector") }}</p>
|
<p class="text-center">{{ $t("Projector") }}</p>
|
||||||
<!-- row 在前col在后 -->
|
<!-- row 在前col在后 -->
|
||||||
<!-- <div v-for="(item, index_row) in config.row">
|
|
||||||
<projector-item v-for="(item, index_col) in config.col" class="w-100" :llabel="
|
|
||||||
$t('Projector') + (index_row * config.col + index_col + 1)
|
|
||||||
" :lvalue="index_row + '/' + index_col"
|
|
||||||
@click="currently_selected_projector(index_row + '-' + index_col)"></projector-item>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div v-for="(item, index_row) in config.row">
|
<div v-for="(item, index_row) in config.row">
|
||||||
<projector-item v-for="(item, index_col) in config.col" class="w-100" :llabel="
|
<projector-item v-for="(item, index_col) in config.col" class="w-100" :llabel="
|
||||||
$t('Projector') + (index_row * config.col + index_col + 1)
|
$t('Projector') + (index_row * config.col + index_col + 1)
|
||||||
" :lvalue="index_row + '/' + index_col"
|
" :lvalue="index_row + '/' + index_col"
|
||||||
@click="currently_selected_projector(index_row + '-' + index_col)"></projector-item>
|
@click="currently_selected_projector(index_row + '-' + index_col)"></projector-item>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<div class="col-3 q-px-md "> <q-select class="q-pt-md overflow-hidden" :label="$t('change resolution')"
|
|
||||||
@update:model-value="(val) => { dialog(val, set_resolution, 'resolution') }" :dense="true" filled
|
|
||||||
v-model="now_resolution" :options="options_resolution" emit-value map-options /></div>
|
|
||||||
<!-- <div class="col-3 q-px-md"> <q-select class="q-pt-md " use-input hide-selected fill-input
|
|
||||||
@filter="filterFn_projector" :label="$t('Change projector layout')"
|
|
||||||
@update:model-value="(val) => { dialog(val, send_projectorlayout, 'projector') }" :dense="true" filled
|
|
||||||
v-model="now_select_projectorlayout" :options="show_projectorlayout" emit-value map-options /></div> -->
|
|
||||||
<div class="col-3 q-px-md"> <q-select class="q-pt-md " use-input hide-selected fill-input
|
|
||||||
@filter="filterFn_projector2" :label="$t('Change projector layout')"
|
|
||||||
@update:model-value="(val) => { dialog_projectorlayout(val, send_projectorlayout2) }" :dense="true" filled
|
|
||||||
v-model="now_select_projectorlayout_tmp" :options="show_projectorlayout2" emit-value /></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-12" style="text-align: center">
|
<div class="col-12" style="text-align: center">
|
||||||
{{
|
{{
|
||||||
$t("Enable projection mode")
|
$t("Whether to enable integration")
|
||||||
}}<q-checkbox v-model="EnableBlending" />
|
}}<q-checkbox v-model="EnableBlending" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-3 q-px-md"> <q-select class="q-pt-md " :label="$t('change resolution')"
|
||||||
|
@update:model-value="(val) => { set_resolution(val) }" :dense="true" filled v-model="now_resolution"
|
||||||
|
:options="options_resolution" emit-value map-options /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<div class="q-ta-md">
|
<div class="q-ta-md">
|
||||||
<q-btn-toggle :disable="!$store.state.enablefusion" no-caps v-model="options" toggle-color="primary"
|
<q-btn-toggle :disable="!$store.state.enablefusion" no-caps v-model="options" toggle-color="primary"
|
||||||
:options="btn_options" />
|
:options="[
|
||||||
|
{ label: $t('FusionLocale'), value: 'FusionLocale' },
|
||||||
|
{
|
||||||
|
label: $t('FourPointCalibration'),
|
||||||
|
value: 'FourPointCalibration',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: $t('SurfaceCorrection'),
|
||||||
|
value: 'SurfaceCorrection',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: $t('DensityCorrection'),
|
||||||
|
value: 'DensityCorrection',
|
||||||
|
},
|
||||||
|
{ label: $t('GridSettings'), value: 'GridSettings' },
|
||||||
|
]" />
|
||||||
<q-btn-toggle v-show="isdebug" no-caps v-model="options" toggle-color="primary" :options="[
|
<q-btn-toggle v-show="isdebug" no-caps v-model="options" toggle-color="primary" :options="[
|
||||||
{ label: $t('debugging'), value: 'Debugging' }
|
{ label: $t('debugging'), value: 'Debugging' }
|
||||||
]" />
|
]" />
|
||||||
</div>
|
</div>
|
||||||
<div style="min-height: 72vh">
|
<div style="min-height: 72vh">
|
||||||
<component ref="child" :is="options" :row="config.row" :col="config.col" />
|
<component ref="child" :is="options" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,16 +95,16 @@
|
||||||
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
|
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
|
||||||
<div class="q-space" data-v-39efcd1f=""></div>
|
<div class="q-space" data-v-39efcd1f=""></div>
|
||||||
<q-btn flat :label="$t('Select saved configuration')" no-caps color="primary"
|
<q-btn flat :label="$t('Select saved configuration')" no-caps color="primary"
|
||||||
@click="select_configuration = true; select_configuration_name = ''; get_scenes()" />
|
@click="select_configuration = true; get_scenes()" />
|
||||||
<q-btn flat :label="$t('Cancel')" no-caps color="primary" v-close-popup
|
<q-btn flat :label="$t('Cancel')" no-caps color="primary" v-close-popup
|
||||||
@click="$store.commit('setSelectedProjector', '0/0'); clear()" />
|
@click="$store.commit('setSelectedProjector', '0/0');" />
|
||||||
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" />
|
<q-btn flat :label="$t('save config')" no-caps color="primary" @click="save" />
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-dialog v-model="medium">
|
<q-dialog v-model="medium">
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
<q-card style="width: 700px; max-width: 80vw;">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="text-h6">{{ $t('Whether to save the configuration') }}</div>
|
<div class="text-h6">{{ $t('Whether to save the configuration') }}</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
@ -128,15 +124,15 @@
|
||||||
</q-select>
|
</q-select>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<q-btn flat :label="$t('Cancel')" color="primary" @click="medium = false"/>
|
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
|
||||||
<q-btn flat :label="$t('save')" @click="saveconfig" color="primary" />
|
<q-btn flat :label="$t('save')" @click="saveconfig" color="primary" v-close-popup />
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
|
|
||||||
<q-dialog v-model="select_configuration">
|
<q-dialog v-model="select_configuration">
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
<q-card style="width: 700px; max-width: 80vw;">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="text-h6">{{ $t('read saved configuration') }}</div>
|
<div class="text-h6">{{ $t('read saved configuration') }}</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
@ -155,14 +151,14 @@
|
||||||
</q-select>
|
</q-select>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<q-btn flat :label="$t('Cancel')" color="primary" @click="select_configuration=false" />
|
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
|
||||||
<q-btn flat :label="$t('load')" @click="apply_the_selected_configuration" color="primary" />
|
<q-btn flat :label="$t('apply')" @click="apply_the_selected_configuration" color="primary" v-close-popup />
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<q-dialog v-model="del_dialog">
|
<q-dialog v-model="del_dialog">
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
<q-card style="width: 700px; max-width: 80vw;">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="text-h6">{{ $t('confirm delete') }}</div>
|
<div class="text-h6">{{ $t('confirm delete') }}</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
@ -170,42 +166,8 @@
|
||||||
{{ $t('Whether to delete') + name_to_be_deleted }}
|
{{ $t('Whether to delete') + name_to_be_deleted }}
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<q-btn flat :label="$t('Cancel')" color="primary" @click="del_dialog=false" />
|
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup />
|
||||||
<q-btn flat :label="$t('ok')" @click="()=>{dialog_del_scenes();del_dialog=false}" color="primary" />
|
<q-btn flat :label="$t('ok')" @click="dialog_del_scenes" color="primary" v-close-popup />
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
|
|
||||||
|
|
||||||
<q-dialog v-model="confirm">
|
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
|
||||||
<q-card-section>
|
|
||||||
<div class="text-h6">{{ $t('Do you confirm the modification') }}</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
{{ dialog_data.type == 'resolution' ? $t('Whether to modify the resolution to') +
|
|
||||||
options_resolution[dialog_data.parameter].label : $t('Whether to change the projector layout to') +
|
|
||||||
projectorlayout[dialog_data.parameter].label }}
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
|
||||||
<q-btn flat :label="$t('Cancel')" @click="()=>{re_match_data();confirm=false}" color="primary" />
|
|
||||||
<q-btn flat :label="$t('ok')" @click="()=>{trigger_dialog();confirm=false}" color="primary" />
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
|
|
||||||
|
|
||||||
<q-dialog v-model="confirm_projectorlayout">
|
|
||||||
<q-card style="width: 40vw; max-width: 80vw;">
|
|
||||||
<q-card-section>
|
|
||||||
<div class="text-h6">{{ $t('Do you confirm the modification') }}</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
{{ $t('Whether to change the projector layout to') + dialog_data_projectorlayout.parameter }}
|
|
||||||
</q-card-section>
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
|
||||||
<q-btn flat :label="$t('Cancel')" @click="()=>{re_match_data();confirm_projectorlayout=false}" color="primary" />
|
|
||||||
<q-btn flat :label="$t('ok')" @click="()=>{trigger_dialog_projectorlayout();confirm_projectorlayout=false}" color="primary" />
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
@ -232,7 +194,6 @@ import {
|
||||||
computed,
|
computed,
|
||||||
onMounted,
|
onMounted,
|
||||||
onBeforeMount,
|
onBeforeMount,
|
||||||
provide,
|
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { useStore } from "src/store";
|
import { useStore } from "src/store";
|
||||||
import { useQuasar, copyToClipboard } from "quasar";
|
import { useQuasar, copyToClipboard } from "quasar";
|
||||||
|
@ -249,7 +210,6 @@ import GridSettings from "src/components/FusionSettings/GridSettings.vue";
|
||||||
import SurfaceCorrection from "src/components/FusionSettings/SurfaceCorrection.vue";
|
import SurfaceCorrection from "src/components/FusionSettings/SurfaceCorrection.vue";
|
||||||
import DensityCorrection from "src/components/FusionSettings/DensityCorrection.vue";
|
import DensityCorrection from "src/components/FusionSettings/DensityCorrection.vue";
|
||||||
import Debugging from "src/components/FusionSettings/Debugging.vue";
|
import Debugging from "src/components/FusionSettings/Debugging.vue";
|
||||||
import { number } from "yargs";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentFusionSettingsDialog",
|
name: "ComponentFusionSettingsDialog",
|
||||||
|
@ -272,57 +232,18 @@ export default defineComponent({
|
||||||
const showDialog = async () => {
|
const showDialog = async () => {
|
||||||
show_dialog.value = true;
|
show_dialog.value = true;
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 当前平板是否全屏
|
|
||||||
*/
|
|
||||||
const is_pad_screen = ref(false);
|
|
||||||
/**
|
|
||||||
* 计算平板和pc的样式
|
|
||||||
*/
|
|
||||||
const is_pad_style = computed(() => {
|
|
||||||
let url = window.location.href
|
|
||||||
if (url.indexOf("pad") != -1 && $t.locale.value == "en-US") {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
if (url.indexOf("pad") != -1 && is_pad_screen.value) {
|
|
||||||
return "100vw"
|
|
||||||
}
|
|
||||||
return "60vw"
|
|
||||||
})
|
|
||||||
/**
|
|
||||||
* 选择配置的弹窗
|
|
||||||
*/
|
|
||||||
const select_configuration = ref(false)
|
const select_configuration = ref(false)
|
||||||
/**
|
|
||||||
* 删除配置时弹窗
|
|
||||||
*/
|
|
||||||
const del_dialog = ref(false)
|
const del_dialog = ref(false)
|
||||||
/**
|
|
||||||
* 后端获取的配置
|
|
||||||
*/
|
|
||||||
const config_projectors = ref(null)
|
|
||||||
/**
|
|
||||||
* 选择配置文件的名称
|
|
||||||
*/
|
|
||||||
const select_configuration_name = ref("")
|
const select_configuration_name = ref("")
|
||||||
/**
|
|
||||||
* 发送是否禁用融合参数
|
|
||||||
*/
|
|
||||||
const send_disable_blending_params = () => {
|
const send_disable_blending_params = () => {
|
||||||
set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0");
|
set?.SetBlendingOption(disable_blending_params_id.value, disable_blending_params.value ? "1" : "0");
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 当前分辨率 在配置文件中的索引
|
|
||||||
*/
|
|
||||||
const now_resolution=ref(1)
|
const now_resolution=ref(1)
|
||||||
// let allconfig = JSON.parse($store.state.fusion_configuration);
|
// let allconfig = JSON.parse($store.state.fusion_configuration);
|
||||||
/**
|
/**
|
||||||
* 模拟数据完成dom渲染再次获取真实后台数据
|
* 模拟数据完成dom渲染再次获取真实后台数据
|
||||||
*/
|
*/
|
||||||
let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1920,\"height\": 1080}]}");
|
let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1920,\"height\": 1080}]}");
|
||||||
/**
|
|
||||||
* 计算可供选择的分辨率
|
|
||||||
*/
|
|
||||||
const options_resolution = computed(() => {
|
const options_resolution = computed(() => {
|
||||||
let tmp=[];
|
let tmp=[];
|
||||||
if(allconfig.resolution){
|
if(allconfig.resolution){
|
||||||
|
@ -335,9 +256,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
return tmp
|
return tmp
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 子组件
|
|
||||||
*/
|
|
||||||
const child :any = ref(null);
|
const child :any = ref(null);
|
||||||
/**
|
/**
|
||||||
* 开启网格时发送全部参数
|
* 开启网格时发送全部参数
|
||||||
|
@ -379,7 +297,6 @@ export default defineComponent({
|
||||||
break;
|
break;
|
||||||
case 'SurfaceCorrection':
|
case 'SurfaceCorrection':
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model+1}`)
|
set?.SetBlendingOption("blending_grids_select_point", `9:${child.value!.options_model+1}`)
|
||||||
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`)
|
|
||||||
break;
|
break;
|
||||||
case 'DensityCorrection':
|
case 'DensityCorrection':
|
||||||
if(child.value!.now_v_h=='vertical'){
|
if(child.value!.now_v_h=='vertical'){
|
||||||
|
@ -398,7 +315,6 @@ export default defineComponent({
|
||||||
/**
|
/**
|
||||||
* 重置全部参数
|
* 重置全部参数
|
||||||
*/
|
*/
|
||||||
const tmp_options = ref("")
|
|
||||||
const resetall = () => {
|
const resetall = () => {
|
||||||
set?.ResetBlendingConfig().then((res) => {
|
set?.ResetBlendingConfig().then((res) => {
|
||||||
let tmp = JSON.parse(res ? res.config : "");
|
let tmp = JSON.parse(res ? res.config : "");
|
||||||
|
@ -408,14 +324,12 @@ export default defineComponent({
|
||||||
config.value.row = tmp.row;
|
config.value.row = tmp.row;
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
$store.commit("setfusion_configuration", res?.config);
|
||||||
});
|
});
|
||||||
if (options.value.length != 0) {
|
let tmp = options.value
|
||||||
tmp_options.value = options.value
|
|
||||||
}
|
|
||||||
options.value = ""
|
options.value = ""
|
||||||
$store.commit("setSelectedProjector", "0/0");
|
$store.commit("setSelectedProjector", "0/0");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
clear_sessionStorage()
|
clear_sessionStorage()
|
||||||
options.value = tmp_options.value
|
options.value = tmp
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -428,37 +342,16 @@ export default defineComponent({
|
||||||
sessionStorage.removeItem("FourPointCalibration");
|
sessionStorage.removeItem("FourPointCalibration");
|
||||||
sessionStorage.removeItem("GridSettings");
|
sessionStorage.removeItem("GridSettings");
|
||||||
sessionStorage.removeItem("Debugging");
|
sessionStorage.removeItem("Debugging");
|
||||||
sessionStorage.removeItem("FusionLocale_async");
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 从配置文件中获取的行和列
|
|
||||||
*/
|
|
||||||
const config = ref({ col: 0, row: 0 });
|
const config = ref({ col: 0, row: 0 });
|
||||||
/**
|
|
||||||
* 是否开启融合
|
|
||||||
*/
|
|
||||||
const EnableBlending = ref(false);
|
const EnableBlending = ref(false);
|
||||||
let optionsstr = ref();
|
let optionsstr = ref();
|
||||||
optionsstr.value = "";
|
optionsstr.value = "FusionLocale";
|
||||||
/**
|
|
||||||
* 是否禁用融合参数 的参数名称
|
|
||||||
*/
|
|
||||||
const disable_blending_params_id = ref("blending@disable_blending_params");
|
const disable_blending_params_id = ref("blending@disable_blending_params");
|
||||||
/**
|
|
||||||
* 是否禁用融合参数
|
|
||||||
*/
|
|
||||||
const disable_blending_params = ref(false);
|
const disable_blending_params = ref(false);
|
||||||
/**
|
|
||||||
* 是否开启网格的参数名称
|
|
||||||
*/
|
|
||||||
const show_blending_grids_id = ref("blending_grids_show");
|
const show_blending_grids_id = ref("blending_grids_show");
|
||||||
/**
|
const show_blending_grids = ref(false);
|
||||||
* 是否开启网格
|
|
||||||
*/
|
|
||||||
const show_blending_grids = ref(true);
|
|
||||||
/**
|
|
||||||
* 是否保存配置弹窗
|
|
||||||
*/
|
|
||||||
const medium = ref(false);
|
const medium = ref(false);
|
||||||
const options = computed({
|
const options = computed({
|
||||||
get() {
|
get() {
|
||||||
|
@ -473,7 +366,7 @@ export default defineComponent({
|
||||||
*/
|
*/
|
||||||
watch(
|
watch(
|
||||||
() => EnableBlending,
|
() => EnableBlending,
|
||||||
(newVal) => {
|
(newVal, oldVal) => {
|
||||||
$store.commit("setEnablefusion", newVal.value);
|
$store.commit("setEnablefusion", newVal.value);
|
||||||
set?.EnableBlending(newVal.value);
|
set?.EnableBlending(newVal.value);
|
||||||
},
|
},
|
||||||
|
@ -512,34 +405,20 @@ export default defineComponent({
|
||||||
switch (newVal.value) {
|
switch (newVal.value) {
|
||||||
case 'FusionLocale':
|
case 'FusionLocale':
|
||||||
tmp = "blending"
|
tmp = "blending"
|
||||||
set?.SetBlendingOption("blending_grids_select_ui", tmp)
|
|
||||||
break;
|
break;
|
||||||
case 'FourPointCalibration':
|
case 'FourPointCalibration':
|
||||||
tmp = '4'
|
tmp = '4'
|
||||||
set?.SetBlendingOption("blending_grids_select_ui", tmp)
|
|
||||||
set?.SetBlendingOption("blending_grids_control_point_count", `4`)
|
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `4:1`)
|
|
||||||
break;
|
break;
|
||||||
case 'SurfaceCorrection':
|
case 'SurfaceCorrection':
|
||||||
tmp = '9'
|
tmp = '9'
|
||||||
/**
|
|
||||||
* 延迟发送不然获取不到值
|
|
||||||
*/
|
|
||||||
set?.SetBlendingOption("blending_grids_select_ui", tmp)
|
|
||||||
setTimeout(() => {
|
|
||||||
set?.SetBlendingOption("blending_grids_control_point_count", `${child.value!.value_point_amount}`)
|
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `${child.value!.value_point_amount}:1`)
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'DensityCorrection':
|
case 'DensityCorrection':
|
||||||
tmp = 'hor_density'
|
tmp = 'hor_density'
|
||||||
set?.SetBlendingOption("blending_grids_select_ui", tmp)
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// if (tmp.length) set?.SetBlendingOption("blending_grids_select_ui", tmp)
|
if (tmp.length) set?.SetBlendingOption("blending_grids_select_ui", tmp)
|
||||||
},
|
},
|
||||||
{ deep: true })
|
{ deep: true })
|
||||||
|
|
||||||
|
@ -547,7 +426,6 @@ export default defineComponent({
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
medium.value = true
|
medium.value = true
|
||||||
save_cover_name.value = ''
|
|
||||||
//读取场景
|
//读取场景
|
||||||
get_scenes()
|
get_scenes()
|
||||||
};
|
};
|
||||||
|
@ -563,26 +441,16 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 点击页面取消时调用 恢复默认参数
|
|
||||||
*/
|
|
||||||
const clear = () => {
|
const clear = () => {
|
||||||
record_times.value = 0
|
record_times.value = 0
|
||||||
// show_blending_grids.value = false;
|
show_blending_grids.value = false;
|
||||||
is_pad_screen.value = false
|
|
||||||
send_show_blending_grids();
|
send_show_blending_grids();
|
||||||
$store.commit("setSelectedProjector", "0/0");
|
$store.commit("setSelectedProjector", "0/0");
|
||||||
set?.SetBlendingOption("blending_grids_show", "0");
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
clear_sessionStorage()
|
clear_sessionStorage()
|
||||||
}, 500);
|
}, 500);
|
||||||
//getconfig()
|
getconfig()
|
||||||
if (config.value.col == 1 && config.value.row == 1) {
|
options.value = "FusionLocale"
|
||||||
optionsstr.value = "FourPointCalibration"
|
|
||||||
} else {
|
|
||||||
optionsstr.value = "FourPointCalibration";
|
|
||||||
}
|
|
||||||
now_selsect_projector.value = "0-0"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -602,7 +470,6 @@ export default defineComponent({
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
set?.GetBlendingConfig("").then((res) => {
|
set?.GetBlendingConfig("").then((res) => {
|
||||||
let tmp = JSON.parse(res ? res.config : "");
|
let tmp = JSON.parse(res ? res.config : "");
|
||||||
config_projectors.value = tmp
|
|
||||||
let local_options = [
|
let local_options = [
|
||||||
[disable_blending_params_id, disable_blending_params],
|
[disable_blending_params_id, disable_blending_params],
|
||||||
[show_blending_grids_id, show_blending_grids]
|
[show_blending_grids_id, show_blending_grids]
|
||||||
|
@ -615,77 +482,31 @@ export default defineComponent({
|
||||||
local_opt[1].value = ("0" == opt || "false" == opt.toLowerCase() ? false : true);
|
local_opt[1].value = ("0" == opt || "false" == opt.toLowerCase() ? false : true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
show_blending_grids.value = true
|
|
||||||
EnableBlending.value = tmp.enable;
|
EnableBlending.value = tmp.enable;
|
||||||
$store.commit("setEnablefusion", tmp.enable);
|
$store.commit("setEnablefusion", tmp.enable);
|
||||||
config.value.col = tmp.col;
|
config.value.col = tmp.col;
|
||||||
config.value.row = tmp.row;
|
config.value.row = tmp.row;
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
$store.commit("setfusion_configuration", res?.config);
|
||||||
optionsstr.value = "FourPointCalibration";
|
|
||||||
allconfig = JSON.parse($store.state.fusion_configuration);
|
allconfig = JSON.parse($store.state.fusion_configuration);
|
||||||
/**
|
|
||||||
* 匹配当前分辨率的索引 没有匹配到自动加入当前分辨率
|
|
||||||
*/
|
|
||||||
if(allconfig.resolution){
|
if(allconfig.resolution){
|
||||||
for (let index = 0; index < allconfig.resolution.length; index++) {
|
for (let index = 0; index < allconfig.resolution.length; index++) {
|
||||||
if (allconfig.resolution[index].width == allconfig.projector_width && allconfig.resolution[index].height == allconfig.projector_height) {
|
if(allconfig.resolution.width==allconfig.projector_width&&allconfig.resolution.height==allconfig.projector_height){
|
||||||
now_resolution.value=index
|
now_resolution.value=index
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
allconfig = {resolution: [{width: tmp.projector_width,height: tmp.projector_height}]};
|
allconfig = {resolution: [{width: tmp.projector_width,height: tmp.projector_height}]};
|
||||||
now_resolution.value=0
|
now_resolution.value=0
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 计算当前可供选择的 投影机布局
|
|
||||||
*/
|
|
||||||
projectorlayout.value = []
|
|
||||||
let cont = 0
|
|
||||||
for (let index = 1; index <= tmp.max_projector_count; index++) {
|
|
||||||
for (let indexx = 1; indexx <= tmp.max_projector_count; indexx++) {
|
|
||||||
if (index * indexx > tmp.max_projector_count) {
|
|
||||||
continue
|
|
||||||
} else {
|
|
||||||
projectorlayout.value.push({ label: `${index}x${indexx}`, value: cont })
|
|
||||||
cont++
|
|
||||||
projectorlayout_tmp.value.push(`${index}x${indexx}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 匹配当前投影机布局
|
|
||||||
*/
|
|
||||||
for (let index = 0; index < projectorlayout.value.length; index++) {
|
|
||||||
let arr = projectorlayout.value[index].label.split('x');
|
|
||||||
if (tmp.col == Number(arr[1]) && tmp.row == Number(arr[0])) {
|
|
||||||
now_select_projectorlayout.value = index
|
|
||||||
}
|
|
||||||
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
|
|
||||||
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
get_scenes()
|
get_scenes()
|
||||||
set?.SetBlendingOption("blending_grids_select_ui", "blending")
|
set?.SetBlendingOption("blending_grids_select_ui", "blending")
|
||||||
// show_blending_grids.value=true
|
|
||||||
// send_show_blending_grids()
|
|
||||||
}, 1000);
|
}, 1000);
|
||||||
// console.log("已经挂载 ")
|
|
||||||
});
|
});
|
||||||
/**
|
|
||||||
* 保存配置的名称
|
|
||||||
*/
|
|
||||||
const save_cover_name = ref("")
|
const save_cover_name = ref("")
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
const plan_list = [
|
const plan_list = [
|
||||||
''
|
''
|
||||||
]
|
]
|
||||||
/**
|
|
||||||
* 应用当前选择的配置文件
|
|
||||||
*/
|
|
||||||
const apply_the_selected_configuration = () => {
|
const apply_the_selected_configuration = () => {
|
||||||
$q.loading.show({
|
$q.loading.show({
|
||||||
message: 'Loading please wait'
|
message: 'Loading please wait'
|
||||||
|
@ -697,23 +518,6 @@ export default defineComponent({
|
||||||
config.value.col = tmp.col;
|
config.value.col = tmp.col;
|
||||||
config.value.row = tmp.row;
|
config.value.row = tmp.row;
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
$store.commit("setfusion_configuration", res?.config);
|
||||||
allconfig = tmp
|
|
||||||
for (let index = 0; index < options_resolution.value.length; index++) {
|
|
||||||
let arr = options_resolution.value[index].label.split('*');
|
|
||||||
if (tmp.projector_width == Number(arr[1]) && tmp.projector_height == Number(arr[0])) {
|
|
||||||
now_resolution.value = index
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (let index = 0; index < projectorlayout.value.length; index++) {
|
|
||||||
let arr = projectorlayout.value[index].label.split('x');
|
|
||||||
if (tmp.row == Number(arr[1]) && tmp.col == Number(arr[0])) {
|
|
||||||
now_select_projectorlayout.value = index
|
|
||||||
}
|
|
||||||
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
|
|
||||||
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
select_configuration.value=false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let tmp = options.value
|
let tmp = options.value
|
||||||
|
@ -727,20 +531,12 @@ export default defineComponent({
|
||||||
getconfig()
|
getconfig()
|
||||||
}
|
}
|
||||||
const plan_list_op = ref(plan_list)
|
const plan_list_op = ref(plan_list)
|
||||||
/**
|
const filterFn = (val: any, update: any, abort: any) => {
|
||||||
* select 自动提示函数
|
|
||||||
* @param val
|
|
||||||
* @param update
|
|
||||||
*/
|
|
||||||
const filterFn = (val: any, update: any) => {
|
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLocaleLowerCase()
|
const needle = val.toLocaleLowerCase()
|
||||||
plan_list_op.value = plan_list.filter(v => v.toLocaleLowerCase().indexOf(needle) > -1)
|
plan_list_op.value = plan_list.filter(v => v.toLocaleLowerCase().indexOf(needle) > -1)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 当前按下ctrl 次数
|
|
||||||
*/
|
|
||||||
const record_times = ref(0)
|
const record_times = ref(0)
|
||||||
const setModel = (val: string) => {
|
const setModel = (val: string) => {
|
||||||
save_cover_name.value = val
|
save_cover_name.value = val
|
||||||
|
@ -748,282 +544,32 @@ export default defineComponent({
|
||||||
|
|
||||||
const saveconfig = () => {
|
const saveconfig = () => {
|
||||||
set?.SaveBlendingConfig(save_cover_name.value);
|
set?.SaveBlendingConfig(save_cover_name.value);
|
||||||
medium.value = false
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 是否开启debug页面
|
|
||||||
*/
|
|
||||||
const isdebug = computed(() => {
|
const isdebug = computed(() => {
|
||||||
try {
|
try {
|
||||||
|
let tmp = JSON.parse($store.state.fusion_configuration)
|
||||||
return record_times.value > 2
|
return record_times.value > 2
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
/**
|
|
||||||
* 需要删除的配置 名称
|
|
||||||
*/
|
|
||||||
const name_to_be_deleted = ref("");
|
const name_to_be_deleted = ref("");
|
||||||
/**
|
|
||||||
* 待删除配置函数
|
|
||||||
* @param name 待删除的名称
|
|
||||||
*/
|
|
||||||
const del_scenes = (name: string) => {
|
const del_scenes = (name: string) => {
|
||||||
del_dialog.value = true;
|
del_dialog.value = true;
|
||||||
name_to_be_deleted.value = name;
|
name_to_be_deleted.value = name;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 正式删除配置的函数
|
|
||||||
*/
|
|
||||||
const dialog_del_scenes = () => {
|
const dialog_del_scenes = () => {
|
||||||
set?.DeleteBlendingScene(name_to_be_deleted.value);
|
set?.DeleteBlendingScene(name_to_be_deleted.value);
|
||||||
plan_list.splice(plan_list.findIndex(item => item === name_to_be_deleted.value), 1)
|
plan_list.splice(plan_list.findIndex(item => item === name_to_be_deleted.value), 1)
|
||||||
name_to_be_deleted.value = ''
|
|
||||||
select_configuration_name.value = ''
|
|
||||||
save_cover_name.value = ''
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 当前选择的投影机
|
|
||||||
*/
|
|
||||||
const now_selsect_projector=ref("0-0")
|
const now_selsect_projector=ref("0-0")
|
||||||
/**
|
|
||||||
* 发送当前选择的投影机
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const currently_selected_projector = (value: string) => {
|
const currently_selected_projector = (value: string) => {
|
||||||
set?.SetBlendingOption('blending_grids_select_projector', value);
|
set?.SetBlendingOption('blending_grids_select_projector', value);
|
||||||
now_selsect_projector.value=value
|
now_selsect_projector.value=value
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 依赖注入
|
|
||||||
*/
|
|
||||||
provide("now_selsect_projector", now_selsect_projector);
|
|
||||||
/**
|
|
||||||
* 可以供选择的布局 变量
|
|
||||||
*/
|
|
||||||
let projectorlayout = ref([{ label: '1x1', value: 0 }, { label: '1x2', value: 1 }])
|
|
||||||
let projectorlayout_tmp = ref(<string[]>[])
|
|
||||||
const now_select_projectorlayout = ref(0)
|
|
||||||
const now_select_projectorlayout_tmp = ref("")
|
|
||||||
/**
|
|
||||||
* 发送当前选择的布局
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const send_projectorlayout = (val: number) => {
|
|
||||||
let arr = projectorlayout.value[val].label.split('x');
|
|
||||||
set?.SetProjectorLayout(Number(arr[0]), Number(arr[1])).then(res => {
|
|
||||||
let tmpp = JSON.parse(res!.config)
|
|
||||||
config.value.row = tmpp.row;
|
|
||||||
config.value.col = tmpp.col;
|
|
||||||
$q.loading.show({
|
|
||||||
message: 'Loading please wait'
|
|
||||||
})
|
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
|
||||||
for (let index = 0; index < projectorlayout.value.length; index++) {
|
|
||||||
let arr = projectorlayout.value[index].label.split('x');
|
|
||||||
if (tmpp.col == Number(arr[1]) && tmpp.row == Number(arr[0])) {
|
|
||||||
now_select_projectorlayout.value = index
|
|
||||||
}
|
|
||||||
if(`${tmpp.row}x${tmpp.col}`==projectorlayout_tmp.value[index]){
|
|
||||||
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let tmp = options.value
|
|
||||||
options.value = ""
|
|
||||||
$store.commit("setSelectedProjector", "0/0");
|
|
||||||
setTimeout(() => {
|
|
||||||
clear_sessionStorage()
|
|
||||||
options.value = tmp
|
|
||||||
$q.loading.hide()
|
|
||||||
}, 800);
|
|
||||||
getconfig()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 发送当前选择的布局
|
|
||||||
* @param val
|
|
||||||
*/
|
|
||||||
const send_projectorlayout2 = (val: string) => {
|
|
||||||
let arr = val.split('x');
|
|
||||||
set?.SetProjectorLayout(Number(arr[0]), Number(arr[1])).then(res => {
|
|
||||||
let tmpp = JSON.parse(res!.config)
|
|
||||||
config.value.row = tmpp.row;
|
|
||||||
config.value.col = tmpp.col;
|
|
||||||
$q.loading.show({
|
|
||||||
message: 'Loading please wait'
|
|
||||||
})
|
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
|
||||||
for (let index = 0; index < projectorlayout.value.length; index++) {
|
|
||||||
let arr = projectorlayout.value[index].label.split('x');
|
|
||||||
if (tmpp.col == Number(arr[1]) && tmpp.row == Number(arr[0])) {
|
|
||||||
now_select_projectorlayout.value = index
|
|
||||||
}
|
|
||||||
if(`${tmpp.row}x${tmpp.col}`==projectorlayout_tmp.value[index]){
|
|
||||||
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let tmp = options.value
|
|
||||||
options.value = ""
|
|
||||||
$store.commit("setSelectedProjector", "0/0");
|
|
||||||
setTimeout(() => {
|
|
||||||
clear_sessionStorage()
|
|
||||||
options.value = tmp
|
|
||||||
$q.loading.hide()
|
|
||||||
}, 800);
|
|
||||||
getconfig()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const btn_options = computed(() => {
|
|
||||||
let tmp = []
|
|
||||||
tmp.push({ label: $t.t('FourPointCalibration'), value: 'FourPointCalibration' })
|
|
||||||
tmp.push({ label: $t.t('SurfaceCorrection'), value: 'SurfaceCorrection', })
|
|
||||||
if (now_select_projectorlayout.value != 0) {
|
|
||||||
tmp.push({ label: $t.t('FusionLocale'), value: 'FusionLocale' })
|
|
||||||
} else {
|
|
||||||
optionsstr.value = "FourPointCalibration";
|
|
||||||
}
|
|
||||||
tmp.push({ label: $t.t('DensityCorrection'), value: 'DensityCorrection', })
|
|
||||||
tmp.push({ label: $t.t('GridSettings'), value: 'GridSettings' })
|
|
||||||
return tmp
|
|
||||||
})
|
|
||||||
/**
|
|
||||||
* 计算可以显示的投影机数量
|
|
||||||
*/
|
|
||||||
const projectors_that_can_display = computed(() => {
|
|
||||||
let allconfig = JSON.parse($store.state.fusion_configuration);
|
|
||||||
let col = allconfig.projectors.length
|
|
||||||
return { col }
|
|
||||||
})
|
|
||||||
/**
|
|
||||||
* 弹窗
|
|
||||||
* 浅拷贝
|
|
||||||
*/
|
|
||||||
const confirm = ref(false)
|
|
||||||
let dialog_data: any = { parameter: "", fun: "", type: "" }
|
|
||||||
const dialog = (parameter: any, fun: any, type: string) => {
|
|
||||||
confirm.value = true
|
|
||||||
dialog_data.parameter = parameter
|
|
||||||
dialog_data.fun = fun
|
|
||||||
dialog_data.type = type
|
|
||||||
}
|
|
||||||
const trigger_dialog = () => {
|
|
||||||
dialog_data.fun(dialog_data.parameter)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const confirm_projectorlayout=ref(false);
|
|
||||||
let dialog_data_projectorlayout: any = { parameter: "", fun: ""}
|
|
||||||
const dialog_projectorlayout = (parameter: any, fun: any) => {
|
|
||||||
confirm_projectorlayout.value = true
|
|
||||||
dialog_data_projectorlayout.parameter = parameter
|
|
||||||
dialog_data_projectorlayout.fun = fun
|
|
||||||
}
|
|
||||||
const trigger_dialog_projectorlayout = () => {
|
|
||||||
dialog_data_projectorlayout.fun(dialog_data_projectorlayout.parameter)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* select 组件选中就触发修改 这里是通过再次获取数据判断 显示在页面
|
|
||||||
*/
|
|
||||||
const re_match_data = () => {
|
|
||||||
let tmp = JSON.parse($store.state.fusion_configuration);
|
|
||||||
for (let index = 0; index < options_resolution.value.length; index++) {
|
|
||||||
let arr = options_resolution.value[index].label.split('*');
|
|
||||||
if (tmp.projector_width == Number(arr[0]) && tmp.projector_height == Number(arr[1])) {
|
|
||||||
now_resolution.value = index
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (let index = 0; index < projectorlayout.value.length; index++) {
|
|
||||||
let arr = projectorlayout.value[index].label.split('x');
|
|
||||||
|
|
||||||
if (tmp.row == Number(arr[0]) && tmp.col == Number(arr[1])) {
|
|
||||||
now_select_projectorlayout.value = index
|
|
||||||
}
|
|
||||||
if(`${tmp.row}x${tmp.col}`==projectorlayout_tmp.value[index]){
|
|
||||||
now_select_projectorlayout_tmp.value=projectorlayout_tmp.value[index]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const element: any = ref()
|
|
||||||
/**
|
|
||||||
* 手动全屏指定元素
|
|
||||||
*/
|
|
||||||
const element_full_screen = () => {
|
|
||||||
let elem = document.getElementById("element")
|
|
||||||
if (!document.fullscreenElement) {
|
|
||||||
elem!.requestFullscreen().catch((err) => {
|
|
||||||
|
|
||||||
});
|
|
||||||
is_pad_screen.value = true
|
|
||||||
} else {
|
|
||||||
document.exitFullscreen();
|
|
||||||
is_pad_screen.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
const ispad = computed(() => {
|
|
||||||
let url = window.location.href;
|
|
||||||
return url.indexOf("pad") != -1
|
|
||||||
})
|
|
||||||
interface projectorlayoutarray {
|
|
||||||
label: string; value: number;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 经过筛选的 投影机布局
|
|
||||||
*/
|
|
||||||
const show_projectorlayout = ref(<projectorlayoutarray[]>[])
|
|
||||||
/**
|
|
||||||
* 筛选投影机函数
|
|
||||||
* @param val
|
|
||||||
* @param update
|
|
||||||
*/
|
|
||||||
const filterFn_projector = (val: any, update: any) => {
|
|
||||||
update(() => {
|
|
||||||
const needle = val.toLowerCase()
|
|
||||||
show_projectorlayout.value = projectorlayout.value.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 经过筛选的 投影机布局
|
|
||||||
*/
|
|
||||||
const show_projectorlayout2 = ref(<string[]>[])
|
|
||||||
/**
|
|
||||||
* 筛选投影机函数
|
|
||||||
* @param val
|
|
||||||
* @param update
|
|
||||||
*/
|
|
||||||
const filterFn_projector2 = (val: any, update: any) => {
|
|
||||||
update(() => {
|
|
||||||
const needle = val.toLowerCase()
|
|
||||||
show_projectorlayout2.value = projectorlayout_tmp.value.filter(v => v.toLowerCase().indexOf(needle) > -1)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
now_select_projectorlayout_tmp,
|
|
||||||
show_projectorlayout2,
|
|
||||||
filterFn_projector2,
|
|
||||||
is_pad_screen,
|
|
||||||
dialog_data,
|
|
||||||
allconfig,
|
|
||||||
now_selsect_projector,
|
|
||||||
re_match_data,
|
|
||||||
trigger_dialog,
|
|
||||||
confirm,
|
|
||||||
dialog,
|
|
||||||
currently_selected_projector,
|
currently_selected_projector,
|
||||||
name_to_be_deleted,
|
name_to_be_deleted,
|
||||||
dialog_del_scenes,
|
dialog_del_scenes,
|
||||||
|
@ -1059,23 +605,7 @@ export default defineComponent({
|
||||||
child,
|
child,
|
||||||
options_resolution,
|
options_resolution,
|
||||||
now_resolution,
|
now_resolution,
|
||||||
set_resolution,
|
set_resolution
|
||||||
send_projectorlayout,
|
|
||||||
send_projectorlayout2,
|
|
||||||
now_select_projectorlayout,
|
|
||||||
projectorlayout,
|
|
||||||
btn_options,
|
|
||||||
projectors_that_can_display,
|
|
||||||
is_pad_style,
|
|
||||||
element,
|
|
||||||
element_full_screen,
|
|
||||||
ispad,
|
|
||||||
filterFn_projector,
|
|
||||||
show_projectorlayout,
|
|
||||||
confirm_projectorlayout,
|
|
||||||
dialog_data_projectorlayout,
|
|
||||||
dialog_projectorlayout,
|
|
||||||
trigger_dialog_projectorlayout
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -73,7 +73,6 @@
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-section class="scroll" style="width: 70vw">
|
<q-card-section class="scroll" style="width: 70vw">
|
||||||
<q-scroll-area style="height: 65vh">
|
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item v-if="ext_flag">
|
<q-item v-if="ext_flag">
|
||||||
<q-item-section avatar class="header_label">
|
<q-item-section avatar class="header_label">
|
||||||
|
@ -109,15 +108,7 @@
|
||||||
{{ $t("register code") }}
|
{{ $t("register code") }}
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<div
|
<div style="word-break: break-all">
|
||||||
style="
|
|
||||||
word-break: break-all;
|
|
||||||
-webkit-user-select: text;
|
|
||||||
-moz-user-select: text;
|
|
||||||
-ms-user-select: text;
|
|
||||||
user-select: text;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ register_code }}
|
{{ register_code }}
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
@ -126,7 +117,7 @@
|
||||||
:value="register_code"
|
:value="register_code"
|
||||||
level="H"
|
level="H"
|
||||||
render-as="svg"
|
render-as="svg"
|
||||||
:size="160"
|
:size="195"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
|
@ -265,83 +256,6 @@
|
||||||
</q-input>
|
</q-input>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator class="q-mt-md" />
|
|
||||||
<q-item>
|
|
||||||
<q-item-section avatar class="header_label">
|
|
||||||
{{ $t("product") }}
|
|
||||||
</q-item-section>
|
|
||||||
|
|
||||||
<q-item-section>
|
|
||||||
<div class="row q-gutter-sm">
|
|
||||||
<q-radio
|
|
||||||
v-model="selected_product"
|
|
||||||
val=""
|
|
||||||
:label="$t('normal')"
|
|
||||||
color="cyan"
|
|
||||||
class="offset-md-1 col"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-radio
|
|
||||||
v-model="selected_product"
|
|
||||||
val="magic_wall"
|
|
||||||
:label="$t('magic wall')"
|
|
||||||
color="cyan"
|
|
||||||
class="offset-md-1 col"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
<q-radio
|
|
||||||
v-model="selected_product"
|
|
||||||
val="fusion"
|
|
||||||
:label="$t('fusion')"
|
|
||||||
color="cyan"
|
|
||||||
class="offset-md-1 col"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item v-if="selected_product == 'fusion'">
|
|
||||||
<q-item-section avatar class="header_label">
|
|
||||||
{{ $t("fusion") }}
|
|
||||||
</q-item-section>
|
|
||||||
|
|
||||||
<q-item-section>
|
|
||||||
<div class="row q-gutter-sm">
|
|
||||||
<q-radio
|
|
||||||
v-for="item of 5"
|
|
||||||
:key="item"
|
|
||||||
v-model="function_fusion_count"
|
|
||||||
:val="item"
|
|
||||||
:label="item.toString() + $t(' ') + $t('fusion out')"
|
|
||||||
color="cyan"
|
|
||||||
class="offset-md-1 col"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="row q-gutter-sm">
|
|
||||||
<q-radio
|
|
||||||
v-for="item of 4"
|
|
||||||
:key="5 + item"
|
|
||||||
v-model="function_fusion_count"
|
|
||||||
:val="5 + item"
|
|
||||||
:label="
|
|
||||||
(5 + item).toString() + $t(' ') + $t('fusion out')
|
|
||||||
"
|
|
||||||
color="cyan"
|
|
||||||
class="offset-md-1 col"
|
|
||||||
:loading="loading"
|
|
||||||
:disable="loading"
|
|
||||||
/>
|
|
||||||
<div class="offset-md-1 col"></div>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section avatar> </q-item-section>
|
|
||||||
</q-item>
|
|
||||||
|
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar class="header_label">
|
<q-item-section avatar class="header_label">
|
||||||
|
@ -389,6 +303,24 @@
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:disable="loading"
|
:disable="loading"
|
||||||
/>
|
/>
|
||||||
|
<q-checkbox
|
||||||
|
v-model="function_magic_wall"
|
||||||
|
@update:model-value="changeMagic()"
|
||||||
|
:label="$t('magic wall')"
|
||||||
|
color="cyan"
|
||||||
|
class="offset-md-1 col"
|
||||||
|
:loading="loading"
|
||||||
|
:disable="loading"
|
||||||
|
/>
|
||||||
|
<q-checkbox
|
||||||
|
v-model="function_fusion"
|
||||||
|
@update:model-value="changeFusion()"
|
||||||
|
:label="$t('fusion')"
|
||||||
|
color="cyan"
|
||||||
|
class="offset-md-1 col"
|
||||||
|
:loading="loading"
|
||||||
|
:disable="loading"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
@ -419,8 +351,8 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item> </q-list
|
</q-item>
|
||||||
></q-scroll-area>
|
</q-list>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
@ -469,15 +401,12 @@ import {
|
||||||
nextTick,
|
nextTick,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { useStore } from "src/store";
|
import { useStore } from "src/store";
|
||||||
import { useQuasar, copyToClipboard, Cookies } from "quasar";
|
import { useQuasar, copyToClipboard } 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 QrcodeVue from "qrcode.vue";
|
import QrcodeVue from "qrcode.vue";
|
||||||
import { Protocol } from "src/entities/WSProtocol";
|
import { Protocol } from "src/entities/WSProtocol";
|
||||||
import {
|
import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
|
||||||
EDeviceAttribute,
|
|
||||||
EDeviceAttributeHelper,
|
|
||||||
} from "src/entities/EDeviceAttribute";
|
|
||||||
import ValidationUtil from "src/common/ValidationUtil";
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -511,16 +440,6 @@ export default defineComponent({
|
||||||
const function_custom_ISV = ref(false);
|
const function_custom_ISV = ref(false);
|
||||||
const function_magic_wall = ref(false);
|
const function_magic_wall = ref(false);
|
||||||
const function_fusion = ref(false);
|
const function_fusion = ref(false);
|
||||||
const function_fusion_count = ref(1);
|
|
||||||
const selected_product = ref("");
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => selected_product.value,
|
|
||||||
(newValue) => {
|
|
||||||
function_fusion.value = newValue == "fusion";
|
|
||||||
function_magic_wall.value = newValue == "magic_wall";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const trial_days = ref(0);
|
const trial_days = ref(0);
|
||||||
const last_days = ref(0);
|
const last_days = ref(0);
|
||||||
|
@ -538,7 +457,6 @@ export default defineComponent({
|
||||||
trial_days.value = 0;
|
trial_days.value = 0;
|
||||||
register_date.value = "";
|
register_date.value = "";
|
||||||
last_days.value = 0;
|
last_days.value = 0;
|
||||||
selected_product.value = "";
|
|
||||||
|
|
||||||
function_center_control.value = false;
|
function_center_control.value = false;
|
||||||
function_output_board.value = false;
|
function_output_board.value = false;
|
||||||
|
@ -579,18 +497,7 @@ export default defineComponent({
|
||||||
$store.state.custom_defines.function_mirroring_output;
|
$store.state.custom_defines.function_mirroring_output;
|
||||||
function_magic_wall.value =
|
function_magic_wall.value =
|
||||||
$store.state.custom_defines.function_magic_wall;
|
$store.state.custom_defines.function_magic_wall;
|
||||||
function_fusion.value = $store.state.custom_defines.function_fusion;
|
function_magic_wall.value = $store.state.custom_defines.function_fusion;
|
||||||
function_fusion_count.value =
|
|
||||||
EDeviceAttributeHelper.getProductFusionOutputCountDefault(
|
|
||||||
$store.state.device_attribute,
|
|
||||||
1
|
|
||||||
);
|
|
||||||
|
|
||||||
if (function_magic_wall.value) {
|
|
||||||
selected_product.value = "magic_wall";
|
|
||||||
} else if (function_fusion.value) {
|
|
||||||
selected_product.value = "fusion";
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -614,10 +521,8 @@ export default defineComponent({
|
||||||
function_custom_ISV,
|
function_custom_ISV,
|
||||||
function_magic_wall,
|
function_magic_wall,
|
||||||
function_fusion,
|
function_fusion,
|
||||||
function_fusion_count,
|
|
||||||
function_center_control,
|
function_center_control,
|
||||||
function_mirroring_output,
|
function_mirroring_output,
|
||||||
selected_product,
|
|
||||||
target_language,
|
target_language,
|
||||||
copyToClipboard,
|
copyToClipboard,
|
||||||
isShow() {
|
isShow() {
|
||||||
|
@ -715,9 +620,22 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
let success = false;
|
let success = false;
|
||||||
|
const response = await GlobalData.getInstance()
|
||||||
|
.getCurrentClient()
|
||||||
|
?.registerDevice(
|
||||||
|
register_code.value,
|
||||||
|
active_code.value,
|
||||||
|
register_type.value == "online",
|
||||||
|
active_type.value == "forever",
|
||||||
|
secret_key.value,
|
||||||
|
parseInt(active_hour.value.toString())
|
||||||
|
);
|
||||||
|
if (response) {
|
||||||
|
success = response.success;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (success) {
|
||||||
let attribute = EDeviceAttribute.None;
|
let attribute = EDeviceAttribute.None;
|
||||||
{
|
|
||||||
if (function_center_control.value) {
|
if (function_center_control.value) {
|
||||||
attribute |= EDeviceAttribute.CenterControl;
|
attribute |= EDeviceAttribute.CenterControl;
|
||||||
}
|
}
|
||||||
|
@ -735,33 +653,16 @@ export default defineComponent({
|
||||||
attribute |= EDeviceAttribute.ProductMagicWall;
|
attribute |= EDeviceAttribute.ProductMagicWall;
|
||||||
}
|
}
|
||||||
if (function_fusion.value) {
|
if (function_fusion.value) {
|
||||||
attribute |=
|
attribute |= EDeviceAttribute.ProductFusion;
|
||||||
EDeviceAttributeHelper.getProdictFusionAttributeByIndex(
|
|
||||||
function_fusion_count.value
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await GlobalData.getInstance()
|
GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.registerDevice(
|
?.setDeviceAttribute(attribute);
|
||||||
register_code.value,
|
|
||||||
active_code.value,
|
|
||||||
register_type.value == "online",
|
|
||||||
active_type.value == "forever",
|
|
||||||
attribute,
|
|
||||||
secret_key.value,
|
|
||||||
parseInt(active_hour.value.toString())
|
|
||||||
);
|
|
||||||
if (response) {
|
|
||||||
success = response.success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
GlobalData.getInstance()
|
GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.setServerLanguage(target_language.value);
|
?.setServerLanguage(target_language.value);
|
||||||
Cookies.remove("language");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$q.notify({
|
$q.notify({
|
||||||
|
@ -774,7 +675,7 @@ export default defineComponent({
|
||||||
position: "top",
|
position: "top",
|
||||||
timeout: 1500,
|
timeout: 1500,
|
||||||
});
|
});
|
||||||
show_dialog.value = !success;
|
show_dialog.value = false;
|
||||||
} catch {}
|
} catch {}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
},
|
},
|
||||||
|
@ -793,6 +694,16 @@ export default defineComponent({
|
||||||
isIpAddress(str: string) {
|
isIpAddress(str: string) {
|
||||||
return ValidationUtil.isIpAddress(str);
|
return ValidationUtil.isIpAddress(str);
|
||||||
},
|
},
|
||||||
|
changeMagic() {
|
||||||
|
if (function_magic_wall.value) {
|
||||||
|
function_fusion.value = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeFusion() {
|
||||||
|
if (function_fusion.value) {
|
||||||
|
function_magic_wall.value = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -91,9 +91,7 @@
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-actions>
|
<q-card-actions align="right">
|
||||||
<q-item-section>V: {{ server_version }}</q-item-section>
|
|
||||||
<q-space />
|
|
||||||
<q-btn
|
<q-btn
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
flat
|
flat
|
||||||
|
@ -145,7 +143,7 @@ export default defineComponent({
|
||||||
|
|
||||||
let select_options = [$t.t("software"), $t.t("rootfs")];
|
let select_options = [$t.t("software"), $t.t("rootfs")];
|
||||||
let upgrade_type = ref($t.t("software"));
|
let upgrade_type = ref($t.t("software"));
|
||||||
const server_version = ref("unknow");
|
|
||||||
return {
|
return {
|
||||||
show_dialog,
|
show_dialog,
|
||||||
loading,
|
loading,
|
||||||
|
@ -156,12 +154,12 @@ export default defineComponent({
|
||||||
file_count,
|
file_count,
|
||||||
upgrade_type,
|
upgrade_type,
|
||||||
select_options,
|
select_options,
|
||||||
server_version,
|
|
||||||
loga(a: any) {
|
loga(a: any) {
|
||||||
console.log(a);
|
console.log(a);
|
||||||
},
|
},
|
||||||
showDialog() {
|
showDialog() {
|
||||||
show_dialog.value = true;
|
show_dialog.value = true;
|
||||||
|
|
||||||
let url = GlobalData.getInstance().createCurrentRequestUrl();
|
let url = GlobalData.getInstance().createCurrentRequestUrl();
|
||||||
if (url) {
|
if (url) {
|
||||||
url.pathname = "/upload_soft_file";
|
url.pathname = "/upload_soft_file";
|
||||||
|
@ -169,14 +167,6 @@ export default defineComponent({
|
||||||
url.pathname = "/upload_root_fs_file";
|
url.pathname = "/upload_root_fs_file";
|
||||||
upload_url_rootfs.value = url.toString();
|
upload_url_rootfs.value = url.toString();
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
let client = GlobalData.getInstance().getCurrentClient();
|
|
||||||
client?.getBuildInfo()?.then((build_info) => {
|
|
||||||
if (build_info) {
|
|
||||||
server_version.value = build_info.version;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (error) {}
|
|
||||||
},
|
},
|
||||||
resetData() {
|
resetData() {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
@ -202,15 +192,7 @@ export default defineComponent({
|
||||||
: uploader_rootfs.value;
|
: uploader_rootfs.value;
|
||||||
$q.dialog({
|
$q.dialog({
|
||||||
title: $t.t("Confirm"),
|
title: $t.t("Confirm"),
|
||||||
message:
|
message: $t.t("use this file to upgrade") + "?",
|
||||||
$t.t("Confirm") +
|
|
||||||
$t.t(" ") +
|
|
||||||
$t.t("use this file to upgrade") +
|
|
||||||
"?" +
|
|
||||||
$t.t(" ") +
|
|
||||||
$t.t(
|
|
||||||
"after upgrade, please clear browser cache Or refresh hard (Ctrl/Shift + F5 Or Ctrl + Shift + R)"
|
|
||||||
),
|
|
||||||
ok: {
|
ok: {
|
||||||
label: $t.t("ok"),
|
label: $t.t("ok"),
|
||||||
noCaps: true,
|
noCaps: true,
|
||||||
|
@ -254,15 +236,6 @@ export default defineComponent({
|
||||||
position: "top",
|
position: "top",
|
||||||
timeout: 1500,
|
timeout: 1500,
|
||||||
});
|
});
|
||||||
$q.notify({
|
|
||||||
type: "positive",
|
|
||||||
icon: "done",
|
|
||||||
message: $t.t(
|
|
||||||
"after upgrade, please clear browser cache Or refresh hard (Ctrl/Shift + F5 Or Ctrl + Shift + R)"
|
|
||||||
),
|
|
||||||
position: "top",
|
|
||||||
timeout: 3000,
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
|
@ -45,5 +45,4 @@ export default class ApplicationConfigEntity {
|
||||||
cloud_server_verify_key = "";
|
cloud_server_verify_key = "";
|
||||||
cloud_server_use_wss = "0";
|
cloud_server_use_wss = "0";
|
||||||
cloud_server_enable = "0";
|
cloud_server_enable = "0";
|
||||||
magic_list:any=[]
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,145 +1,38 @@
|
||||||
export enum EDeviceAttribute {
|
export enum EDeviceAttribute {
|
||||||
None = 0x0000000000000001,
|
None_UnKNow = 0x0000,
|
||||||
OutputBoard = 0x0000000000000002,
|
|
||||||
CenterControl = 0x0000000000000004,
|
|
||||||
MirroringOutput = 0x0000000000000008,
|
|
||||||
CustomISV = 0x0000000000000010,
|
|
||||||
Reserve5 = 0x0000000000000020,
|
|
||||||
Reserve6 = 0x0000000000000040,
|
|
||||||
Reserve7 = 0x0000000000000080,
|
|
||||||
Reserve8 = 0x0000000000000100,
|
|
||||||
Reserve9 = 0x0000000000000200,
|
|
||||||
Reserve10 = 0x0000000000000400,
|
|
||||||
Reserve11 = 0x0000000000000800,
|
|
||||||
Reserve12 = 0x0000000000001000,
|
|
||||||
Reserve13 = 0x0000000000002000,
|
|
||||||
Reserve14 = 0x0000000000004000,
|
|
||||||
Reserve15 = 0x0000000000008000,
|
|
||||||
Reserve16 = 0x0000000000010000,
|
|
||||||
Reserve17 = 0x0000000000020000,
|
|
||||||
Reserve18 = 0x0000000000040000,
|
|
||||||
Reserve19 = 0x0000000000080000,
|
|
||||||
Reserve20 = 0x0000000000100000,
|
|
||||||
ProductMagicWall = 0x0000000000200000,
|
|
||||||
ProductFusion_1 = 0x0000000000400000,
|
|
||||||
ProductFusion_2 = 0x0000000000800000,
|
|
||||||
ProductFusion_3 = 0x0000000001000000,
|
|
||||||
ProductFusion_4 = 0x0000000002000000,
|
|
||||||
ProductFusion_5 = 0x0000000004000000,
|
|
||||||
ProductFusion_6 = 0x0000000008000000,
|
|
||||||
ProductFusion_7 = 0x0000000010000000,
|
|
||||||
ProductFusion_8 = 0x0000000020000000,
|
|
||||||
ProductFusion_9 = 0x0000000040000000,
|
|
||||||
Reserve31 = 0x0000000080000000,
|
|
||||||
Reserve32 = 0x0000000100000000,
|
|
||||||
Reserve33 = 0x0000000200000000,
|
|
||||||
Reserve34 = 0x0000000400000000,
|
|
||||||
Reserve35 = 0x0000000800000000,
|
|
||||||
Reserve36 = 0x0000001000000000,
|
|
||||||
Reserve37 = 0x0000002000000000,
|
|
||||||
Reserve38 = 0x0000004000000000,
|
|
||||||
Reserve39 = 0x0000008000000000,
|
|
||||||
Reserve40 = 0x0000010000000000,
|
|
||||||
Reserve41 = 0x0000020000000000,
|
|
||||||
Reserve42 = 0x0000040000000000,
|
|
||||||
Reserve43 = 0x0000080000000000,
|
|
||||||
Reserve44 = 0x0000100000000000,
|
|
||||||
Reserve45 = 0x0000200000000000,
|
|
||||||
Reserve46 = 0x0000400000000000,
|
|
||||||
Reserve47 = 0x0000800000000000,
|
|
||||||
Reserve48 = 0x0001000000000000,
|
|
||||||
Reserve49 = 0x0002000000000000,
|
|
||||||
Reserve50 = 0x0004000000000000,
|
|
||||||
Reserve51 = 0x0008000000000000,
|
|
||||||
Reserve52 = 0x0010000000000000,
|
|
||||||
Reserve53 = 0x0020000000000000,
|
|
||||||
Reserve54 = 0x0040000000000000,
|
|
||||||
Reserve55 = 0x0080000000000000,
|
|
||||||
Reserve56 = 0x0100000000000000,
|
|
||||||
Reserve57 = 0x0200000000000000,
|
|
||||||
Reserve58 = 0x0400000000000000,
|
|
||||||
Reserve59 = 0x0800000000000000,
|
|
||||||
Reserve60 = 0x1000000000000000,
|
|
||||||
Reserve61 = 0x2000000000000000,
|
|
||||||
Reserve62 = 0x4000000000000000,
|
|
||||||
Reserve63 = 0x8000000000000000,
|
|
||||||
|
|
||||||
StandMediaControl = OutputBoard | CenterControl,
|
None = 0x00000001,
|
||||||
All = 0xffffffffffffffff,
|
OutputBoard = 0x00000002,
|
||||||
}
|
CenterControl = 0x00000004,
|
||||||
|
MirroringOutput = 0x00000008,
|
||||||
|
CustomISV = 0x00000010,
|
||||||
|
Reserve5 = 0x00000020,
|
||||||
|
Reserve6 = 0x00000040,
|
||||||
|
Reserve7 = 0x00000080,
|
||||||
|
Reserve8 = 0x00000100,
|
||||||
|
Reserve9 = 0x00000200,
|
||||||
|
Reserve10 = 0x00000400,
|
||||||
|
Reserve11 = 0x00000800,
|
||||||
|
Reserve12 = 0x00001000,
|
||||||
|
Reserve13 = 0x00002000,
|
||||||
|
Reserve14 = 0x00004000,
|
||||||
|
Reserve15 = 0x00008000,
|
||||||
|
Reserve16 = 0x00010000,
|
||||||
|
Reserve17 = 0x00020000,
|
||||||
|
Reserve18 = 0x00040000,
|
||||||
|
Reserve19 = 0x00080000,
|
||||||
|
Reserve20 = 0x00100000,
|
||||||
|
ProductMagicWall = 0x00200000,
|
||||||
|
ProductFusion = 0x00400000,
|
||||||
|
Reserve23 = 0x00800000,
|
||||||
|
Reserve24 = 0x01000000,
|
||||||
|
Reserve25 = 0x02000000,
|
||||||
|
Reserve26 = 0x04000000,
|
||||||
|
Reserve27 = 0x08000000,
|
||||||
|
Reserve28 = 0x10000000,
|
||||||
|
Reserve29 = 0x20000000,
|
||||||
|
Reserve30 = 0x40000000,
|
||||||
|
Reserve31 = 0x80000000,
|
||||||
|
|
||||||
export class EDeviceAttributeHelper {
|
All = 0xffffffff,
|
||||||
public static isProductFusion(attribute: number) {
|
|
||||||
return (
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_1) != 0 ||
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_2) != 0 ||
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_3) != 0 ||
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_4) != 0 ||
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_5) != 0 ||
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_6) != 0 ||
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_7) != 0 ||
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_8) != 0 ||
|
|
||||||
(attribute & EDeviceAttribute.ProductFusion_9) != 0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static getProductFusionOutputCount(attribute: number) {
|
|
||||||
if (attribute & EDeviceAttribute.ProductFusion_1) {
|
|
||||||
return 1;
|
|
||||||
} else if (attribute & EDeviceAttribute.ProductFusion_2) {
|
|
||||||
return 2;
|
|
||||||
} else if (attribute & EDeviceAttribute.ProductFusion_3) {
|
|
||||||
return 3;
|
|
||||||
} else if (attribute & EDeviceAttribute.ProductFusion_4) {
|
|
||||||
return 4;
|
|
||||||
} else if (attribute & EDeviceAttribute.ProductFusion_5) {
|
|
||||||
return 5;
|
|
||||||
} else if (attribute & EDeviceAttribute.ProductFusion_6) {
|
|
||||||
return 6;
|
|
||||||
} else if (attribute & EDeviceAttribute.ProductFusion_7) {
|
|
||||||
return 7;
|
|
||||||
} else if (attribute & EDeviceAttribute.ProductFusion_8) {
|
|
||||||
return 8;
|
|
||||||
} else if (attribute & EDeviceAttribute.ProductFusion_9) {
|
|
||||||
return 9;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static getProductFusionOutputCountDefault(
|
|
||||||
attribute: number,
|
|
||||||
default_Value: number
|
|
||||||
) {
|
|
||||||
const ret = EDeviceAttributeHelper.getProductFusionOutputCount(attribute);
|
|
||||||
if (ret == 0) {
|
|
||||||
return default_Value;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static getProdictFusionAttributeByIndex(index: number) {
|
|
||||||
switch (index) {
|
|
||||||
case 1:
|
|
||||||
return EDeviceAttribute.ProductFusion_1;
|
|
||||||
case 2:
|
|
||||||
return EDeviceAttribute.ProductFusion_2;
|
|
||||||
case 3:
|
|
||||||
return EDeviceAttribute.ProductFusion_3;
|
|
||||||
case 4:
|
|
||||||
return EDeviceAttribute.ProductFusion_4;
|
|
||||||
case 5:
|
|
||||||
return EDeviceAttribute.ProductFusion_5;
|
|
||||||
case 6:
|
|
||||||
return EDeviceAttribute.ProductFusion_6;
|
|
||||||
case 7:
|
|
||||||
return EDeviceAttribute.ProductFusion_7;
|
|
||||||
case 8:
|
|
||||||
return EDeviceAttribute.ProductFusion_8;
|
|
||||||
case 9:
|
|
||||||
return EDeviceAttribute.ProductFusion_9;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -570,9 +570,6 @@ export namespace Protocol {
|
||||||
public static get kRpcCheckModeIndex() {
|
public static get kRpcCheckModeIndex() {
|
||||||
return Commands.PROTOCOL_PREFIX + "RpcCheckModeIndex";
|
return Commands.PROTOCOL_PREFIX + "RpcCheckModeIndex";
|
||||||
}
|
}
|
||||||
public static get kRpcGetHttpInterfaceVersion() {
|
|
||||||
return Commands.PROTOCOL_PREFIX + "RpcGetHttpInterfaceVersion";
|
|
||||||
}
|
|
||||||
static _all_commands = new Set([
|
static _all_commands = new Set([
|
||||||
Commands.kUnKnowCommand,
|
Commands.kUnKnowCommand,
|
||||||
Commands.kSearchDevice,
|
Commands.kSearchDevice,
|
||||||
|
@ -719,7 +716,6 @@ export namespace Protocol {
|
||||||
Commands.kRpcFileManagerDelete,
|
Commands.kRpcFileManagerDelete,
|
||||||
Commands.kRpcFileManagerCreateDirectory,
|
Commands.kRpcFileManagerCreateDirectory,
|
||||||
Commands.kRpcCheckModeIndex,
|
Commands.kRpcCheckModeIndex,
|
||||||
Commands.kRpcGetHttpInterfaceVersion,
|
|
||||||
]);
|
]);
|
||||||
public static get AllCommands() {
|
public static get AllCommands() {
|
||||||
return this._all_commands;
|
return this._all_commands;
|
||||||
|
@ -1828,14 +1824,11 @@ export namespace Protocol {
|
||||||
online: boolean = false;
|
online: boolean = false;
|
||||||
active_forever: boolean = false;
|
active_forever: boolean = false;
|
||||||
hour: number = 0;
|
hour: number = 0;
|
||||||
attribute: number = 0;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
register_code: string,
|
register_code: string,
|
||||||
active_code: string,
|
active_code: string,
|
||||||
online: boolean,
|
online: boolean,
|
||||||
active_forever: boolean,
|
active_forever: boolean,
|
||||||
attribute: number,
|
|
||||||
secret_key?: string,
|
secret_key?: string,
|
||||||
hour?: number,
|
hour?: number,
|
||||||
rcp_id?: number
|
rcp_id?: number
|
||||||
|
@ -1850,7 +1843,6 @@ export namespace Protocol {
|
||||||
this.online = online;
|
this.online = online;
|
||||||
this.active_forever = active_forever;
|
this.active_forever = active_forever;
|
||||||
this.secret_key = secret_key ?? "";
|
this.secret_key = secret_key ?? "";
|
||||||
this.attribute = attribute ?? 0;
|
|
||||||
if (active_forever) {
|
if (active_forever) {
|
||||||
this.hour = 0;
|
this.hour = 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -3460,7 +3452,6 @@ export namespace Protocol {
|
||||||
location: number,
|
location: number,
|
||||||
enable: boolean,
|
enable: boolean,
|
||||||
width: number,
|
width: number,
|
||||||
auto_sync:boolean,
|
|
||||||
rpc_id = 0
|
rpc_id = 0
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
@ -3473,15 +3464,12 @@ export namespace Protocol {
|
||||||
this.location = location ?? 0;
|
this.location = location ?? 0;
|
||||||
this.enable = enable ?? false;
|
this.enable = enable ?? false;
|
||||||
this.width = width ?? 0;
|
this.width = width ?? 0;
|
||||||
this.auto_sync = auto_sync ?? false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
row = 0;
|
row = 0;
|
||||||
column = 0;
|
column = 0;
|
||||||
location = 0; //0:左融合带,1:上融合带,2:右融合带,3:下融合带
|
location = 0; //0:左融合带,1:上融合带,2:右融合带,3:下融合带
|
||||||
enable = false;
|
enable = false;
|
||||||
width = 0;
|
width = 0;
|
||||||
auto_sync=false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetBlendingConfigResponseEntity extends PacketEntity {
|
export class GetBlendingConfigResponseEntity extends PacketEntity {
|
||||||
|
@ -3694,7 +3682,11 @@ export namespace Protocol {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SetProjectorResolutionRequestEntity extends PacketEntity {
|
export class SetProjectorResolutionRequestEntity extends PacketEntity {
|
||||||
constructor(width: number, height: number, rpc_id = 0) {
|
constructor(
|
||||||
|
width: number,
|
||||||
|
height: number,
|
||||||
|
rpc_id = 0
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
super.command = Commands.kSetProjectorResolution;
|
super.command = Commands.kSetProjectorResolution;
|
||||||
super.flag = PacketEntity.FLAG_REQUEST;
|
super.flag = PacketEntity.FLAG_REQUEST;
|
||||||
|
@ -3709,9 +3701,13 @@ export namespace Protocol {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SetProjectorLayoutRequestEntity extends PacketEntity {
|
export class SetProjectorLayoutRequestEntity extends PacketEntity {
|
||||||
constructor(row: number, column: number, rpc_id = 0) {
|
constructor(
|
||||||
|
row: number,
|
||||||
|
column: number,
|
||||||
|
rpc_id = 0
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
super.command = Commands.kSetProjectorLayout;
|
super.command = Commands.kSetProjectorResolution;
|
||||||
super.flag = PacketEntity.FLAG_REQUEST;
|
super.flag = PacketEntity.FLAG_REQUEST;
|
||||||
super.rpc_id = rpc_id;
|
super.rpc_id = rpc_id;
|
||||||
|
|
||||||
|
@ -3831,20 +3827,4 @@ export namespace Protocol {
|
||||||
}
|
}
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RpcGetHttpInterfaceVersionRequestEntity extends PacketEntity {
|
|
||||||
constructor(rpc_id = 0) {
|
|
||||||
super();
|
|
||||||
super.command = Commands.kRpcGetHttpInterfaceVersion;
|
|
||||||
super.flag = PacketEntity.FLAG_REQUEST;
|
|
||||||
}
|
|
||||||
timestamp = 0;
|
|
||||||
}
|
|
||||||
export class RpcGetHttpInterfaceVersionResponseEntity extends PacketEntity {
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
super.flag = PacketEntity.FLAG_RESPONSE;
|
|
||||||
}
|
|
||||||
version = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,10 +57,7 @@ export default {
|
||||||
Accept: "Accept",
|
Accept: "Accept",
|
||||||
"move speed": "Move Speed",
|
"move speed": "Move Speed",
|
||||||
"y offset": "Y Offset",
|
"y offset": "Y Offset",
|
||||||
"the number must be greater than 0": "The Number Must Be Greater Than 0",
|
"the number must be greater than 0": "the number must be greater than 0",
|
||||||
"the number must be less than 2160":"The Number Must Be Less Than 2160",
|
|
||||||
"the number must be less than 3840":"The Number Must Be Less Than 3840",
|
|
||||||
"the number must be greater than 360":"The Number Must Be Less Than 360",
|
|
||||||
"pos x": "X Position",
|
"pos x": "X Position",
|
||||||
"pos y": "Y Position",
|
"pos y": "Y Position",
|
||||||
width: "Width",
|
width: "Width",
|
||||||
|
@ -173,7 +170,6 @@ export default {
|
||||||
advanced: "Advanced",
|
advanced: "Advanced",
|
||||||
"revert and exit": "Revert And Exit",
|
"revert and exit": "Revert And Exit",
|
||||||
apply: "Apply",
|
apply: "Apply",
|
||||||
load: "Load",
|
|
||||||
"current real resolution": "Current Real Resolution",
|
"current real resolution": "Current Real Resolution",
|
||||||
"output type": "Output Type",
|
"output type": "Output Type",
|
||||||
"target resolution": "Target Resolution",
|
"target resolution": "Target Resolution",
|
||||||
|
@ -417,7 +413,7 @@ export default {
|
||||||
FourPointCalibration: "Four Pint Calibration",
|
FourPointCalibration: "Four Pint Calibration",
|
||||||
SurfaceCorrection: "Surface Correction",
|
SurfaceCorrection: "Surface Correction",
|
||||||
DensityCorrection: "Density Correction",
|
DensityCorrection: "Density Correction",
|
||||||
GridSettings: "Auxiliary Settings",
|
GridSettings: "Grid Settings",
|
||||||
point: "dot",
|
point: "dot",
|
||||||
reset: "reset",
|
reset: "reset",
|
||||||
"upper fusion zone parameters": "Upper Fusion Zone Parameters",
|
"upper fusion zone parameters": "Upper Fusion Zone Parameters",
|
||||||
|
@ -431,7 +427,7 @@ export default {
|
||||||
Projector: "Projector",
|
Projector: "Projector",
|
||||||
resetall: "reset all",
|
resetall: "reset all",
|
||||||
"save config": "Save Config",
|
"save config": "Save Config",
|
||||||
"Whether to enable integration": "Enable projection mode",
|
"Whether to enable integration": "Whether to enable integration",
|
||||||
"Whether to hide the desktop": "Whether to hide the desktop",
|
"Whether to hide the desktop": "Whether to hide the desktop",
|
||||||
"resetall config": "resetall config",
|
"resetall config": "resetall config",
|
||||||
"disable blending params": "Dsable blending params",
|
"disable blending params": "Dsable blending params",
|
||||||
|
@ -439,9 +435,9 @@ export default {
|
||||||
"line color": "Line Color",
|
"line color": "Line Color",
|
||||||
"center line color": "center line color",
|
"center line color": "center line color",
|
||||||
"center circle color": "center circle color",
|
"center circle color": "center circle color",
|
||||||
"Whether to operate synchronously": "synchronous operation",
|
"Whether to operate synchronously": "Whether to operate synchronously",
|
||||||
"Select saved configuration": "Configuration list",
|
"Select saved configuration": "Select saved Configuration",
|
||||||
"read saved configuration": "Configuration list",
|
"read saved configuration": "read saved configuration",
|
||||||
"please choose": "please choose",
|
"please choose": "please choose",
|
||||||
save: "Save",
|
save: "Save",
|
||||||
"Whether to save the configuration": "Whether to save the configuration",
|
"Whether to save the configuration": "Whether to save the configuration",
|
||||||
|
@ -474,8 +470,7 @@ export default {
|
||||||
"Please enter the points you need to add",
|
"Please enter the points you need to add",
|
||||||
"Whether to add control points": "Whether to add control points",
|
"Whether to add control points": "Whether to add control points",
|
||||||
"Reset all program control points":"Reset all program control points",
|
"Reset all program control points":"Reset all program control points",
|
||||||
"Reset the current program control point":
|
"Reset the current program control point":"Reset the current program control point",
|
||||||
"Reset the current program control point",
|
|
||||||
"device verify key": "Device Verify Key",
|
"device verify key": "Device Verify Key",
|
||||||
"use wss": "Use Wss",
|
"use wss": "Use Wss",
|
||||||
"server address": "Server Address",
|
"server address": "Server Address",
|
||||||
|
@ -496,22 +491,5 @@ export default {
|
||||||
"the folder name cannot start with a '.'":
|
"the folder name cannot start with a '.'":
|
||||||
"The Folder Name Cannot Start With a '.'",
|
"The Folder Name Cannot Start With a '.'",
|
||||||
"change resolution":"change resolution",
|
"change resolution":"change resolution",
|
||||||
"Loading please wait": "Loading please wait",
|
"Loading please wait":"Loading please wait"
|
||||||
product: "Product",
|
|
||||||
normal: "Normal",
|
|
||||||
"fusion out": "Out",
|
|
||||||
"Please enter the square number": "Please enter the square number",
|
|
||||||
"Change projector layout": "Change projector layout",
|
|
||||||
"reset all": "reset all",
|
|
||||||
"Do you confirm the modification": "Do you confirm the modification",
|
|
||||||
"Whether to modify the resolution to": "Whether to modify the resolution to",
|
|
||||||
"Whether to change the projector layout to":
|
|
||||||
"Whether to change the projector layout to",
|
|
||||||
"after upgrade, please clear browser cache Or refresh hard (Ctrl/Shift + F5 Or Ctrl + Shift + R)":
|
|
||||||
"After Upgrade, Please Clear Browser Cache Or Refresh Hard (Ctrl/Shift + F5 Or Ctrl + Shift + R)",
|
|
||||||
"fusion zone":"fusion zone",
|
|
||||||
"up":"up",
|
|
||||||
"left":"left",
|
|
||||||
"right":"right",
|
|
||||||
"down":"down"
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -218,7 +218,6 @@ export default {
|
||||||
disable: "禁用",
|
disable: "禁用",
|
||||||
enable: "启用",
|
enable: "启用",
|
||||||
apply: "应用",
|
apply: "应用",
|
||||||
load: "加载",
|
|
||||||
"apply and exit": "应用并退出",
|
"apply and exit": "应用并退出",
|
||||||
revert: "恢复",
|
revert: "恢复",
|
||||||
"revert and exit": "不保存退出",
|
"revert and exit": "不保存退出",
|
||||||
|
@ -489,11 +488,7 @@ export default {
|
||||||
"full screen window": "全屏",
|
"full screen window": "全屏",
|
||||||
"restore window size": "恢复",
|
"restore window size": "恢复",
|
||||||
"the number must be greater than 0": "数字必须大于0",
|
"the number must be greater than 0": "数字必须大于0",
|
||||||
"the number must be less than 2160":"数字必须小于等于2160",
|
|
||||||
"the number must be less than 3840":"数字必须小于等于3840",
|
|
||||||
"the number must be greater than 1": "数字必须大于1",
|
"the number must be greater than 1": "数字必须大于1",
|
||||||
"the number must be greater than 360":"数字必须小于等于360",
|
|
||||||
|
|
||||||
X: "X坐标",
|
X: "X坐标",
|
||||||
Y: "Y坐标",
|
Y: "Y坐标",
|
||||||
"edit window rect": "窗口大小调整",
|
"edit window rect": "窗口大小调整",
|
||||||
|
@ -686,7 +681,7 @@ export default {
|
||||||
FourPointCalibration: "四点校正",
|
FourPointCalibration: "四点校正",
|
||||||
SurfaceCorrection: "曲面校正",
|
SurfaceCorrection: "曲面校正",
|
||||||
DensityCorrection: "疏密校正",
|
DensityCorrection: "疏密校正",
|
||||||
GridSettings: "辅助设置",
|
GridSettings: "网格设置",
|
||||||
point: "点",
|
point: "点",
|
||||||
reset: "重置",
|
reset: "重置",
|
||||||
"upper fusion zone parameters": "上融合带参数",
|
"upper fusion zone parameters": "上融合带参数",
|
||||||
|
@ -700,7 +695,7 @@ export default {
|
||||||
Projector: "投影机",
|
Projector: "投影机",
|
||||||
resetall: "重置所有",
|
resetall: "重置所有",
|
||||||
"save config": "保存配置",
|
"save config": "保存配置",
|
||||||
"Enable projection mode": "启用投影模式",
|
"Whether to enable integration": "是否启用融合",
|
||||||
"Whether to hide the desktop": "是否隐藏桌面",
|
"Whether to hide the desktop": "是否隐藏桌面",
|
||||||
"resetall config": "重置所有配置",
|
"resetall config": "重置所有配置",
|
||||||
"disable blending params": "禁用融合参数",
|
"disable blending params": "禁用融合参数",
|
||||||
|
@ -709,8 +704,8 @@ export default {
|
||||||
"center line color": "中心线颜色",
|
"center line color": "中心线颜色",
|
||||||
"center circle color": "中心圆颜色",
|
"center circle color": "中心圆颜色",
|
||||||
"Whether to operate synchronously": "是否同步操作",
|
"Whether to operate synchronously": "是否同步操作",
|
||||||
"Select saved configuration": "配置列表",
|
"Select saved configuration": "选择保存的配置",
|
||||||
"read saved configuration": "融合配置列表",
|
"read saved configuration": "读取保存的配置",
|
||||||
"please choose": "请选择",
|
"please choose": "请选择",
|
||||||
save: "保存",
|
save: "保存",
|
||||||
"Whether to save the configuration": "是否保存配置",
|
"Whether to save the configuration": "是否保存配置",
|
||||||
|
@ -761,24 +756,5 @@ export default {
|
||||||
"raster graph": "栅格图",
|
"raster graph": "栅格图",
|
||||||
"the folder name cannot start with a '.'": "文件夹名称不能以“.” 开头",
|
"the folder name cannot start with a '.'": "文件夹名称不能以“.” 开头",
|
||||||
"change resolution":"更改分辨率",
|
"change resolution":"更改分辨率",
|
||||||
"Loading please wait": "加载中 请稍等",
|
"Loading please wait":"加载中 请稍等"
|
||||||
"Version Mismatch !": "版本不匹配!",
|
|
||||||
"Version Mismatch ! Please Upgrade The Software Again ! Otherwise, The File Function Cannot Be Used !":
|
|
||||||
"版本不匹配!请重新升级软件!否则文件功能无法正常使用!",
|
|
||||||
product: "产品",
|
|
||||||
normal: "普通",
|
|
||||||
"fusion out": "出",
|
|
||||||
"Please enter the square number": "请输入平方数",
|
|
||||||
"Change projector layout": "更改投影机布局",
|
|
||||||
"reset all": "重置所有",
|
|
||||||
"Do you confirm the modification": "是否确认修改",
|
|
||||||
"Whether to modify the resolution to": "是否将分辨率修改到",
|
|
||||||
"Whether to change the projector layout to": "是否更改投影机布局为",
|
|
||||||
"after upgrade, please clear browser cache Or refresh hard (Ctrl/Shift + F5 Or Ctrl + Shift + R)":
|
|
||||||
"升级完成后请清空浏览器缓存或者进行硬刷新(Ctrl/Shift + F5 或者 CTRL + SHIFT + R)",
|
|
||||||
"fusion zone":"融合带",
|
|
||||||
"up":"上",
|
|
||||||
"left":"左",
|
|
||||||
"right":"右",
|
|
||||||
"down":"下"
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -193,24 +193,6 @@
|
||||||
{{ $t("background image setting") }}
|
{{ $t("background image setting") }}
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
$refs.fusion_settings_dialog.showDialog();
|
|
||||||
getconfig();
|
|
||||||
"
|
|
||||||
v-if="$store.state.custom_defines.function_fusion"
|
|
||||||
>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-icon style="color: #63bab4;" name="open_with" />
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
{{ $t("fusion settings") }}
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
|
|
||||||
<q-item clickable v-close-popup @click="switchLanguage">
|
<q-item clickable v-close-popup @click="switchLanguage">
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon name="img:pad/toolbar/cn_en.png" />
|
<q-icon name="img:pad/toolbar/cn_en.png" />
|
||||||
|
@ -253,9 +235,6 @@
|
||||||
<advanced-debug-dialog ref="advanced_debug_dialog" />
|
<advanced-debug-dialog ref="advanced_debug_dialog" />
|
||||||
<window-rect-edit-dialog ref="window_rect_edit_dialog" />
|
<window-rect-edit-dialog ref="window_rect_edit_dialog" />
|
||||||
<system-setting-dialog ref="system_setting_dialog" />
|
<system-setting-dialog ref="system_setting_dialog" />
|
||||||
|
|
||||||
<fusion-settings-dialog ref="fusion_settings_dialog" />
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -263,9 +242,6 @@ import { defineComponent, Ref, ref, computed, watch } from "vue";
|
||||||
import { Cookies, SessionStorage, useQuasar } from "quasar";
|
import { Cookies, SessionStorage, useQuasar } from "quasar";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useStore } from "src/store";
|
import { useStore } from "src/store";
|
||||||
|
|
||||||
import FusionSettingsDialog from "src/components/FusionSettingsDialog.vue";
|
|
||||||
|
|
||||||
import BackgroundImageDialog from "src/components/BackgroundImageDialog.vue";
|
import BackgroundImageDialog from "src/components/BackgroundImageDialog.vue";
|
||||||
import FileManageDialog from "src/components/FileManageDialog.vue";
|
import FileManageDialog from "src/components/FileManageDialog.vue";
|
||||||
import SubtitleDialog from "src/components/SubtitleDialog.vue";
|
import SubtitleDialog from "src/components/SubtitleDialog.vue";
|
||||||
|
@ -289,13 +265,12 @@ export default defineComponent({
|
||||||
AdvancedDebugDialog,
|
AdvancedDebugDialog,
|
||||||
WindowRectEditDialog,
|
WindowRectEditDialog,
|
||||||
SystemSettingDialog,
|
SystemSettingDialog,
|
||||||
FusionSettingsDialog
|
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const $store = useStore();
|
const $store = useStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const $t = useI18n();
|
const $t = useI18n();
|
||||||
let set = GlobalData.getInstance().getCurrentClient();
|
|
||||||
const window_rect_edit_dialog: Ref<any> = ref(null);
|
const window_rect_edit_dialog: Ref<any> = ref(null);
|
||||||
|
|
||||||
const plan_running = computed(
|
const plan_running = computed(
|
||||||
|
@ -313,19 +288,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const getconfig = () => {
|
|
||||||
set?.SetBlendingOption("blending_grids_select_ui", '4')
|
|
||||||
set?.SetBlendingOption('blending_grids_select_projector',"0-0");
|
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `4:1`)
|
|
||||||
set?.SetBlendingOption("blending_grids_show", "1");
|
|
||||||
try {
|
|
||||||
set?.GetBlendingConfig("").then((res) => {
|
|
||||||
let tmp = JSON.parse(res ? res.config : "");
|
|
||||||
$store.commit("setEnablefusion", tmp.enable);
|
|
||||||
$store.commit("setfusion_configuration", res?.config);
|
|
||||||
});
|
|
||||||
} catch (error) {}
|
|
||||||
};
|
|
||||||
return {
|
return {
|
||||||
plan_running,
|
plan_running,
|
||||||
window_rect_edit_dialog,
|
window_rect_edit_dialog,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<q-page class="row items-center justify-evenly" :style-fn="wujie_height">
|
<q-page class="row items-center justify-evenly">
|
||||||
<wall-page />
|
<wall-page />
|
||||||
<media-control-page />
|
<media-control-page />
|
||||||
</q-page>
|
</q-page>
|
||||||
|
@ -70,11 +70,7 @@ export default defineComponent({
|
||||||
new Initializer(options).initialize();
|
new Initializer(options).initialize();
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {};
|
||||||
wujie_height(offset:any){
|
|
||||||
return { minHeight: offset ? `calc(100vh - ${offset}px)` : '100vh' }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -302,22 +302,6 @@
|
||||||
class="shadow-2 text-white"
|
class="shadow-2 text-white"
|
||||||
@dragstart.prevent
|
@dragstart.prevent
|
||||||
>
|
>
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
$refs.fusion_settings_dialog.showDialog();
|
|
||||||
getconfig();
|
|
||||||
"
|
|
||||||
v-if="$store.state.custom_defines.function_fusion"
|
|
||||||
>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-icon name="open_with" />
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
{{ $t("fusion settings") }}
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
:disable="!$store.state.power_state"
|
:disable="!$store.state.power_state"
|
||||||
|
@ -373,7 +357,6 @@
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
v-if="!iswujie"
|
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="$refs.background_image_dialog.showDialog()"
|
@click="$refs.background_image_dialog.showDialog()"
|
||||||
|
@ -387,7 +370,6 @@
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
v-if="!iswujie"
|
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="$refs.recovery_database_dialog.showDialog()"
|
@click="$refs.recovery_database_dialog.showDialog()"
|
||||||
|
@ -423,7 +405,6 @@
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
v-if="!iswujie"
|
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="$refs.upgrade_dialog.showDialog()"
|
@click="$refs.upgrade_dialog.showDialog()"
|
||||||
|
@ -459,7 +440,22 @@
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="
|
||||||
|
$refs.fusion_settings_dialog.showDialog();
|
||||||
|
getconfig();
|
||||||
|
"
|
||||||
|
v-if="$store.state.custom_defines.function_fusion"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon name="open_with" />
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
{{ $t("fusion settings") }}
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
|
@ -491,7 +487,7 @@
|
||||||
|
|
||||||
<q-separator vertical inset />
|
<q-separator vertical inset />
|
||||||
|
|
||||||
<q-item v-if="!iswujie">
|
<q-item v-if="isfan">
|
||||||
<q-item-section avatar style="margin-right: 0px; padding-right: 0px">
|
<q-item-section avatar style="margin-right: 0px; padding-right: 0px">
|
||||||
<!-- <q-icon class="text-white rotate" name="img:svgs/fan.svg" /> -->
|
<!-- <q-icon class="text-white rotate" name="img:svgs/fan.svg" /> -->
|
||||||
<!-- <q-icon class="text-white rotate" name="img:new_icon/fan.png" /> -->
|
<!-- <q-icon class="text-white rotate" name="img:new_icon/fan.png" /> -->
|
||||||
|
@ -653,10 +649,6 @@ export default defineComponent({
|
||||||
return "rotate " + sulv + "s linear infinite";
|
return "rotate " + sulv + "s linear infinite";
|
||||||
});
|
});
|
||||||
const getconfig = () => {
|
const getconfig = () => {
|
||||||
set?.SetBlendingOption("blending_grids_select_ui", '4')
|
|
||||||
set?.SetBlendingOption('blending_grids_select_projector',"0-0");
|
|
||||||
set?.SetBlendingOption("blending_grids_select_point", `4:1`)
|
|
||||||
set?.SetBlendingOption("blending_grids_show", "1");
|
|
||||||
try {
|
try {
|
||||||
set?.GetBlendingConfig("").then((res) => {});
|
set?.GetBlendingConfig("").then((res) => {});
|
||||||
set?.GetBlendingConfig("").then((res) => {
|
set?.GetBlendingConfig("").then((res) => {
|
||||||
|
@ -730,9 +722,9 @@ export default defineComponent({
|
||||||
show_device_list.value =
|
show_device_list.value =
|
||||||
typeof (<any>window).user_search?.hide_device_list == "undefined";
|
typeof (<any>window).user_search?.hide_device_list == "undefined";
|
||||||
});
|
});
|
||||||
let iswujie = ref(false);
|
let isfan = ref(true);
|
||||||
if ((window as any).$wujie) {
|
if ((window as any).$wujie) {
|
||||||
iswujie.value = true;
|
isfan.value = false;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
getconfig,
|
getconfig,
|
||||||
|
@ -745,7 +737,7 @@ export default defineComponent({
|
||||||
power_flag,
|
power_flag,
|
||||||
fan,
|
fan,
|
||||||
isfull,
|
isfull,
|
||||||
iswujie,
|
isfan,
|
||||||
async backupDB() {
|
async backupDB() {
|
||||||
let client = GlobalData.getInstance().getCurrentClient();
|
let client = GlobalData.getInstance().getCurrentClient();
|
||||||
if (client) {
|
if (client) {
|
||||||
|
@ -838,12 +830,9 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
const w = window as any;
|
const w = window as any;
|
||||||
console.log(w);
|
|
||||||
if (w.controlLogout && typeof w.controlLogout == "function") {
|
if (w.controlLogout && typeof w.controlLogout == "function") {
|
||||||
console.log(1);
|
|
||||||
w.controlLogout();
|
w.controlLogout();
|
||||||
} else {
|
} else {
|
||||||
console.log(2);
|
|
||||||
Cookies.remove("auto_login");
|
Cookies.remove("auto_login");
|
||||||
SessionStorage.clear();
|
SessionStorage.clear();
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -93,6 +93,7 @@
|
||||||
style="text-align: center"
|
style="text-align: center"
|
||||||
>
|
>
|
||||||
{{ item.id + 1 }}
|
{{ item.id + 1 }}
|
||||||
|
</vue3-resize-drag>
|
||||||
|
|
||||||
<q-popup-proxy
|
<q-popup-proxy
|
||||||
context-menu
|
context-menu
|
||||||
|
@ -108,7 +109,7 @@
|
||||||
:disable="plan_running || !$store.state.power_state"
|
:disable="plan_running || !$store.state.power_state"
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="openWindowByLocalFile(index, $event)"
|
@click="openWindowByLocalFile($event)"
|
||||||
>
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon name="open_in_browser" />
|
<q-icon name="open_in_browser" />
|
||||||
|
@ -128,7 +129,6 @@
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-popup-proxy>
|
</q-popup-proxy>
|
||||||
</vue3-resize-drag>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -174,7 +174,7 @@
|
||||||
:disable="plan_running || !$store.state.power_state"
|
:disable="plan_running || !$store.state.power_state"
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="openWindowByLocalFile(-1, $event)"
|
@click="openWindowByLocalFile($event)"
|
||||||
>
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon name="open_in_browser" />
|
<q-icon name="open_in_browser" />
|
||||||
|
@ -343,6 +343,10 @@ export default defineComponent({
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
show_windows_flag.value = true;
|
show_windows_flag.value = true;
|
||||||
});
|
});
|
||||||
|
if (wall.value) {
|
||||||
|
let teph = wall.value?.clientHeight / offsetHeight;
|
||||||
|
let tepw = wall.value?.clientWidth / offsetWidth;
|
||||||
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -353,6 +357,8 @@ export default defineComponent({
|
||||||
|
|
||||||
const last_context_menu_pos_x = ref(0);
|
const last_context_menu_pos_x = ref(0);
|
||||||
const last_context_menu_pos_y = ref(0);
|
const last_context_menu_pos_y = ref(0);
|
||||||
|
let offsetHeight = 0;
|
||||||
|
let offsetWidth = 0;
|
||||||
const plan_running = computed(
|
const plan_running = computed(
|
||||||
() => $store.state.current_running_plan.trim() != ""
|
() => $store.state.current_running_plan.trim() != ""
|
||||||
);
|
);
|
||||||
|
@ -378,15 +384,14 @@ export default defineComponent({
|
||||||
const area_open_window_rect = ref(new Rect());
|
const area_open_window_rect = ref(new Rect());
|
||||||
let item_witdh = ref(0);
|
let item_witdh = ref(0);
|
||||||
const item_height = ref(0);
|
const item_height = ref(0);
|
||||||
const radians = (index:number) => {
|
const radians = () => {
|
||||||
const test_monitor_list: any = clacMonitor();
|
const test_monitor_list: any = clacMonitor();
|
||||||
if (test_monitor_list) {
|
if (test_monitor_list) {
|
||||||
const item = test_monitor_list[index];
|
const item = test_monitor_list[current_index.value];
|
||||||
return /*a*/ (item.angle * Math.PI) / 180;
|
return /*a*/ (item.angle * Math.PI) / 180;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const calculateCoordinates = (
|
const calculateCoordinates = (
|
||||||
index:number,
|
|
||||||
px: number,
|
px: number,
|
||||||
py: number,
|
py: number,
|
||||||
cx: number,
|
cx: number,
|
||||||
|
@ -394,13 +399,13 @@ export default defineComponent({
|
||||||
) => {
|
) => {
|
||||||
const x =
|
const x =
|
||||||
cx +
|
cx +
|
||||||
(px - cx) * Math.cos(Number(radians(index))) -
|
(px - cx) * Math.cos(Number(radians())) -
|
||||||
(py - cy) * Math.sin(Number(radians(index)));
|
(py - cy) * Math.sin(Number(radians()));
|
||||||
|
|
||||||
const y =
|
const y =
|
||||||
cy +
|
cy +
|
||||||
(px - cx) * Math.sin(Number(radians(index))) +
|
(px - cx) * Math.sin(Number(radians())) +
|
||||||
(py - cy) * Math.cos(Number(radians(index)));
|
(py - cy) * Math.cos(Number(radians()));
|
||||||
|
|
||||||
return { x, y };
|
return { x, y };
|
||||||
};
|
};
|
||||||
|
@ -424,38 +429,34 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
return test_monitor_list;
|
return test_monitor_list;
|
||||||
};
|
};
|
||||||
const four_point = (index:number) => {
|
const four_point = () => {
|
||||||
const test_monitor_list: any = clacMonitor();
|
const test_monitor_list: any = clacMonitor();
|
||||||
if (test_monitor_list) {
|
if (test_monitor_list) {
|
||||||
const item = test_monitor_list[index];
|
const item = test_monitor_list[current_index.value];
|
||||||
item.centerx = parseInt(item.centerx.toString());
|
item.centerx = parseInt(item.centerx.toString());
|
||||||
item.centery = parseInt(item.centery.toString());
|
item.centery = parseInt(item.centery.toString());
|
||||||
const x2: number = item.currentx + item.w;
|
const x2: number = item.currentx + item.w;
|
||||||
const y2: number = item.currenty + item.h;
|
const y2: number = item.currenty + item.h;
|
||||||
if (item.angle != 0) {
|
if (item.angle != 0) {
|
||||||
const point_left_top = calculateCoordinates(
|
const point_left_top = calculateCoordinates(
|
||||||
index,
|
|
||||||
item.currentx,
|
item.currentx,
|
||||||
item.currenty,
|
item.currenty,
|
||||||
item.centerx,
|
item.centerx,
|
||||||
item.centery
|
item.centery
|
||||||
);
|
);
|
||||||
const point_left_bootom = calculateCoordinates(
|
const point_left_bootom = calculateCoordinates(
|
||||||
index,
|
|
||||||
item.currentx,
|
item.currentx,
|
||||||
y2,
|
y2,
|
||||||
item.centerx,
|
item.centerx,
|
||||||
item.centery
|
item.centery
|
||||||
);
|
);
|
||||||
const point_right_top = calculateCoordinates(
|
const point_right_top = calculateCoordinates(
|
||||||
index,
|
|
||||||
x2,
|
x2,
|
||||||
item.currenty,
|
item.currenty,
|
||||||
item.centerx,
|
item.centerx,
|
||||||
item.centery
|
item.centery
|
||||||
);
|
);
|
||||||
const point_right_bottom = calculateCoordinates(
|
const point_right_bottom = calculateCoordinates(
|
||||||
index,
|
|
||||||
x2,
|
x2,
|
||||||
y2,
|
y2,
|
||||||
item.centerx,
|
item.centerx,
|
||||||
|
@ -472,9 +473,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const select_x = (index:number) => {
|
const select_x = () => {
|
||||||
const point_list = four_point(index);
|
const point_list = four_point();
|
||||||
const item = $store.state.show_monitor_list[index];
|
const item = $store.state.show_monitor_list[current_index.value];
|
||||||
if (item.angle != 0) {
|
if (item.angle != 0) {
|
||||||
if (point_list) {
|
if (point_list) {
|
||||||
let minx = 100000;
|
let minx = 100000;
|
||||||
|
@ -489,8 +490,8 @@ export default defineComponent({
|
||||||
if (wall.value) return item.currentx * wall.value?.clientWidth;
|
if (wall.value) return item.currentx * wall.value?.clientWidth;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const select_y = (index:number) => {
|
const select_y = () => {
|
||||||
const point_list = four_point(index);
|
const point_list = four_point();
|
||||||
let miny = 100000;
|
let miny = 100000;
|
||||||
if (point_list) {
|
if (point_list) {
|
||||||
point_list.forEach((element) => {
|
point_list.forEach((element) => {
|
||||||
|
@ -499,15 +500,15 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const item = $store.state.show_monitor_list[index];
|
const item = $store.state.show_monitor_list[current_index.value];
|
||||||
if (item.angle != 0) {
|
if (item.angle != 0) {
|
||||||
return miny;
|
return miny;
|
||||||
} else {
|
} else {
|
||||||
if (wall.value) return item.currenty * wall.value?.clientHeight;
|
if (wall.value) return item.currenty * wall.value?.clientHeight;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const select_height = (index:number) => {
|
const select_height = () => {
|
||||||
const point_list = four_point(index);
|
const point_list = four_point();
|
||||||
let maxy = 0;
|
let maxy = 0;
|
||||||
let miny = 100000;
|
let miny = 100000;
|
||||||
if (point_list) {
|
if (point_list) {
|
||||||
|
@ -520,7 +521,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const item = $store.state.show_monitor_list[index];
|
const item = $store.state.show_monitor_list[current_index.value];
|
||||||
if (item.angle != 0) {
|
if (item.angle != 0) {
|
||||||
return maxy - miny;
|
return maxy - miny;
|
||||||
} else {
|
} else {
|
||||||
|
@ -528,8 +529,8 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const select_width = (index:number) => {
|
const select_width = () => {
|
||||||
const point_list = four_point(index);
|
const point_list = four_point();
|
||||||
let maxx = 0;
|
let maxx = 0;
|
||||||
let minx = 100000;
|
let minx = 100000;
|
||||||
if (point_list) {
|
if (point_list) {
|
||||||
|
@ -542,7 +543,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const item = $store.state.show_monitor_list[index];
|
const item = $store.state.show_monitor_list[current_index.value];
|
||||||
if (item.angle != 0) {
|
if (item.angle != 0) {
|
||||||
return maxx - minx;
|
return maxx - minx;
|
||||||
} else {
|
} else {
|
||||||
|
@ -728,6 +729,8 @@ export default defineComponent({
|
||||||
let monitorList: any = [];
|
let monitorList: any = [];
|
||||||
|
|
||||||
if (a && wall_dom) {
|
if (a && wall_dom) {
|
||||||
|
offsetHeight = wall_dom.clientHeight;
|
||||||
|
offsetWidth = wall_dom.clientHeight;
|
||||||
a.forEach((element) => {
|
a.forEach((element) => {
|
||||||
let item: test_monitor = new test_monitor(0, 0, 0);
|
let item: test_monitor = new test_monitor(0, 0, 0);
|
||||||
item.h = element.h;
|
item.h = element.h;
|
||||||
|
@ -981,6 +984,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
@ -993,7 +997,6 @@ export default defineComponent({
|
||||||
(element: HTMLElement) => {
|
(element: HTMLElement) => {
|
||||||
if ($store.state.custom_defines.function_magic_wall) {
|
if ($store.state.custom_defines.function_magic_wall) {
|
||||||
show_magic_wall();
|
show_magic_wall();
|
||||||
refresh_windows_pos();
|
|
||||||
}
|
}
|
||||||
if (element) {
|
if (element) {
|
||||||
calcWallItemWH();
|
calcWallItemWH();
|
||||||
|
@ -1239,18 +1242,6 @@ export default defineComponent({
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.replaceWindow2(find_window, uuid, true);
|
?.replaceWindow2(find_window, uuid, true);
|
||||||
} else {
|
} else {
|
||||||
if ($store.state.custom_defines.function_magic_wall) {
|
|
||||||
const item =
|
|
||||||
$store.state.show_monitor_list[current_index.value];
|
|
||||||
if (wall.value) {
|
|
||||||
x = Number(select_x(current_index.value)) / wall.value.clientWidth;
|
|
||||||
y = Number(select_y(current_index.value)) / wall.value.clientHeight;
|
|
||||||
width =
|
|
||||||
Number(select_width(current_index.value)) / wall.value.clientWidth;
|
|
||||||
height =
|
|
||||||
Number(select_height(current_index.value)) / wall.value.clientHeight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const open_polling_request =
|
const open_polling_request =
|
||||||
new Protocol.OpenPollingRequestEntity(
|
new Protocol.OpenPollingRequestEntity(
|
||||||
uuid,
|
uuid,
|
||||||
|
@ -1282,15 +1273,19 @@ export default defineComponent({
|
||||||
if (
|
if (
|
||||||
$store.state.custom_defines.function_magic_wall
|
$store.state.custom_defines.function_magic_wall
|
||||||
) {
|
) {
|
||||||
|
const item =
|
||||||
|
$store.state.show_monitor_list[
|
||||||
|
current_index.value
|
||||||
|
];
|
||||||
if (wall.value) {
|
if (wall.value) {
|
||||||
x = Number(select_x(current_index.value)) / wall.value.clientWidth;
|
x = Number(select_x()) / wall.value.clientWidth;
|
||||||
y =
|
y =
|
||||||
Number(select_y(current_index.value)) / wall.value.clientHeight;
|
Number(select_y()) / wall.value.clientHeight;
|
||||||
width =
|
width =
|
||||||
Number(select_width(current_index.value)) /
|
Number(select_width()) /
|
||||||
wall.value.clientWidth;
|
wall.value.clientWidth;
|
||||||
height =
|
height =
|
||||||
Number(select_height(current_index.value)) /
|
Number(select_height()) /
|
||||||
wall.value.clientHeight;
|
wall.value.clientHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1489,7 +1484,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async openWindowByLocalFile(index: number, event: MouseEvent) {
|
async openWindowByLocalFile(event: MouseEvent) {
|
||||||
if (!wall.value) {
|
if (!wall.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1529,8 +1524,8 @@ export default defineComponent({
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.addSignalSource(signal_source);
|
?.addSignalSource(signal_source);
|
||||||
if (wall.value && response && response.success) {
|
if (wall.value && response && response.success) {
|
||||||
let cell_width = 1.0 / $store.state.wall_col;
|
const cell_width = 1.0 / $store.state.wall_col;
|
||||||
let cell_height = 1.0 / $store.state.wall_row;
|
const cell_height = 1.0 / $store.state.wall_row;
|
||||||
|
|
||||||
const col = Math.floor(
|
const col = Math.floor(
|
||||||
last_context_menu_pos_x.value /
|
last_context_menu_pos_x.value /
|
||||||
|
@ -1543,17 +1538,9 @@ export default defineComponent({
|
||||||
cell_height
|
cell_height
|
||||||
);
|
);
|
||||||
|
|
||||||
let x = col * cell_width;
|
const x = col * cell_width;
|
||||||
let y = row * cell_height;
|
const y = row * cell_height;
|
||||||
if ($store.state.custom_defines.function_magic_wall&&index!=-1) {
|
|
||||||
if (wall.value) {
|
|
||||||
x = Number(select_x(index)) / wall.value.clientWidth;
|
|
||||||
y = Number(select_y(index)) / wall.value.clientHeight;
|
|
||||||
cell_width = Number(select_width(index)) / wall.value.clientWidth;
|
|
||||||
cell_height =
|
|
||||||
Number(select_height(index)) / wall.value.clientHeight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!isNaN(x) && !isNaN(y)) {
|
if (!isNaN(x) && !isNaN(y)) {
|
||||||
const open_window_request =
|
const open_window_request =
|
||||||
new Protocol.OpenWindowRequestEntity(
|
new Protocol.OpenWindowRequestEntity(
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { EDeviceAttributeHelper } from "./../entities/EDeviceAttribute";
|
|
||||||
import { ConnectTableEntity } from "src/entities/ConnectTableEntity";
|
import { ConnectTableEntity } from "src/entities/ConnectTableEntity";
|
||||||
import {
|
import {
|
||||||
PollingEntity,
|
PollingEntity,
|
||||||
|
@ -441,7 +440,7 @@ export default store(function (/* { ssrContext } */) {
|
||||||
state.custom_defines.function_magic_wall =
|
state.custom_defines.function_magic_wall =
|
||||||
(state.device_attribute & EDeviceAttribute.ProductMagicWall) != 0;
|
(state.device_attribute & EDeviceAttribute.ProductMagicWall) != 0;
|
||||||
state.custom_defines.function_fusion =
|
state.custom_defines.function_fusion =
|
||||||
EDeviceAttributeHelper.isProductFusion(state.device_attribute);
|
(state.device_attribute & EDeviceAttribute.ProductFusion) != 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setAvancedDebug(state: StateInterface, playload?: any) {
|
setAvancedDebug(state: StateInterface, playload?: any) {
|
||||||
|
|
Loading…
Reference in New Issue