注册细分产品

This commit is contained in:
fangxiang 2023-02-21 19:55:55 +08:00
parent 6c304fdfe6
commit 53ca6af019
8 changed files with 670 additions and 385 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "media_player_client", "name": "media_player_client",
"version": "1.5.8", "version": "1.5.9",
"description": "A Quasar Framework app", "description": "A Quasar Framework app",
"productName": "MediaPlayerClient", "productName": "MediaPlayerClient",
"author": "fangxiang <fangxiang@cloudview.work>", "author": "fangxiang <fangxiang@cloudview.work>",

View File

@ -41,7 +41,11 @@ 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).

View File

@ -11,7 +11,7 @@
} }
" "
> >
<q-card class="overflow-hidden" style="overflow-y: scroll; max-width: 35vw"> <q-card class="overflow-hidden" style="overflow-y: scroll; max-width: 40vw">
<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,8 +37,67 @@
<q-separator /> <q-separator />
<q-card-section style="max-height: 50vh; width: 35vw" class="scroll"> <q-card-section style="max-height: 60vh; width: 40vw" 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>
@ -69,7 +128,6 @@
: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>
@ -83,40 +141,22 @@
: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="setDeviceAttribute" @click="setDeviceAttributeAndProduct"
: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") }}
@ -153,7 +193,6 @@
/> />
</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">
@ -199,8 +238,10 @@ 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 { Protocol } from "src/entities/WSProtocol"; import {
import { EDeviceAttribute } from "src/entities/EDeviceAttribute"; EDeviceAttribute,
EDeviceAttributeHelper,
} from "src/entities/EDeviceAttribute";
export default defineComponent({ export default defineComponent({
name: "ComponentAdvancedDebugDialog", name: "ComponentAdvancedDebugDialog",
@ -226,10 +267,44 @@ 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( const function_fusion = ref($store.state.custom_defines.function_fusion);
$store.state.custom_defines.function_magic_wall const function_fusion_count = ref(0);
);
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,
@ -239,8 +314,10 @@ 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;
@ -254,8 +331,18 @@ 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 = function_fusion.value = $store.state.custom_defines.function_fusion;
$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";
}
}, },
resetData() { resetData() {
loading.value = false; loading.value = false;
@ -264,8 +351,9 @@ export default defineComponent({
function_output_board.value = false; function_output_board.value = false;
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() {
@ -343,27 +431,22 @@ export default defineComponent({
</div>`, </div>`,
}); });
}, },
setDeviceAttribute() { setDeviceAttributeAndProduct() {
let attribute = EDeviceAttribute.None; let attribute = getFinalAttribute();
if (function_center_control.value) { GlobalData.getInstance()
attribute |= EDeviceAttribute.CenterControl; .getCurrentClient()
} ?.setDeviceAttribute(attribute);
if (function_output_board.value) {
attribute |= EDeviceAttribute.OutputBoard;
}
if (function_mirroring_output.value) {
attribute |= EDeviceAttribute.MirroringOutput;
}
if (function_custom_ISV.value) { $q.notify({
attribute |= EDeviceAttribute.CustomISV; color: "positive",
} icon: "done",
if (function_magic_wall.value) { message: $t.t("set device function") + $t.t("success") + "!",
attribute |= EDeviceAttribute.ProductMagicWall; position: "top",
} timeout: 1500,
if (function_fusion.value) { });
attribute |= EDeviceAttribute.ProductFusion; },
} setDeviceAttribute() {
let attribute = getFinalAttribute();
GlobalData.getInstance() GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()
@ -389,16 +472,16 @@ export default defineComponent({
timeout: 1500, timeout: 1500,
}); });
}, },
changeMagic(){ changeMagic() {
if(function_magic_wall.value){ if (function_magic_wall.value) {
function_fusion.value=false; function_fusion.value = false;
} }
}, },
changeFusion(){ changeFusion() {
if(function_fusion.value){ if (function_fusion.value) {
function_magic_wall.value=false; function_magic_wall.value = false;
} }
} },
}; };
}, },
}); });

View File

@ -73,286 +73,346 @@
<q-separator /> <q-separator />
<q-card-section class="scroll" style="width: 70vw"> <q-card-section class="scroll" style="width: 70vw">
<q-list> <q-scroll-area style="height: 65vh">
<q-item v-if="ext_flag"> <q-list>
<q-item-section avatar class="header_label"> <q-item v-if="ext_flag">
{{ $t("register type") }} <q-item-section avatar class="header_label">
</q-item-section> {{ $t("register type") }}
<q-item-section> </q-item-section>
<div class="row q-gutter-sm"> <q-item-section>
<q-radio <div class="row q-gutter-sm">
v-model="register_type" <q-radio
checked-icon="task_alt" v-model="register_type"
unchecked-icon="panorama_fish_eye" checked-icon="task_alt"
val="offline" unchecked-icon="panorama_fish_eye"
:label="$t('offline register')" val="offline"
class="offset-md-1 col" :label="$t('offline register')"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
<q-radio
v-model="register_type"
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
val="online"
:label="$t('online register')"
class="col"
:loading="loading"
:disable="loading"
/>
</div>
</q-item-section>
</q-item>
<q-item v-if="register_type == 'offline'">
<q-item-section avatar class="header_label">
{{ $t("register code") }}
</q-item-section>
<q-item-section>
<div style="word-break: break-all">
{{ register_code }}
</div>
</q-item-section>
<q-item-section avatar>
<qrcode-vue
:value="register_code"
level="H"
render-as="svg"
:size="160"
/>
</q-item-section>
<q-item-section avatar>
<q-btn
round
flat
icon="content_copy"
color="green"
:loading="loading" :loading="loading"
:disable="loading" :disable="loading"
/> @click="
<q-radio copyToClipboard(register_code).then(() =>
v-model="register_type" $q.notify({
checked-icon="task_alt" color: 'positive',
unchecked-icon="panorama_fish_eye" icon: 'done',
val="online" message: $t('copy') + $t('success'),
:label="$t('online register')" position: 'top',
class="col" timeout: 1500,
})
)
"
>
<q-tooltip>
{{ $t("copy") }}{{ $t("register code") }}
</q-tooltip>
</q-btn>
</q-item-section>
</q-item>
<q-item v-if="register_type == 'offline'">
<q-item-section avatar class="header_label">
{{ $t("active code") }}
</q-item-section>
<q-item-section>
<q-input
type="textarea"
v-model="active_code"
lazy-rules
autofocus
:loading="loading" :loading="loading"
:disable="loading" :disable="loading"
:rules="[
(val) =>
(val && val.length > 0) || $t('Please type something'),
]"
/> />
</div> </q-item-section>
</q-item-section> <q-item-section avatar>
</q-item> <q-btn
<q-item v-if="register_type == 'offline'"> icon="attach_file"
<q-item-section avatar class="header_label"> round
{{ $t("register code") }} flat
</q-item-section>
<q-item-section>
<div style="word-break: break-all">
{{ register_code }}
</div>
</q-item-section>
<q-item-section avatar>
<qrcode-vue
:value="register_code"
level="H"
render-as="svg"
:size="195"
/>
</q-item-section>
<q-item-section avatar>
<q-btn
round
flat
icon="content_copy"
color="green"
:loading="loading"
:disable="loading"
@click="
copyToClipboard(register_code).then(() =>
$q.notify({
color: 'positive',
icon: 'done',
message: $t('copy') + $t('success'),
position: 'top',
timeout: 1500,
})
)
"
>
<q-tooltip>
{{ $t("copy") }}{{ $t("register code") }}
</q-tooltip>
</q-btn>
</q-item-section>
</q-item>
<q-item v-if="register_type == 'offline'">
<q-item-section avatar class="header_label">
{{ $t("active code") }}
</q-item-section>
<q-item-section>
<q-input
type="textarea"
v-model="active_code"
lazy-rules
autofocus
:loading="loading"
:disable="loading"
:rules="[
(val) =>
(val && val.length > 0) || $t('Please type something'),
]"
/>
</q-item-section>
<q-item-section avatar>
<q-btn
icon="attach_file"
round
flat
:loading="loading"
:disable="loading"
class="rotate-90"
color="green"
@click="$refs.select_file_dialog.pickFiles($event)"
>
<q-tooltip>
{{ $t("open file") }}
</q-tooltip>
</q-btn>
</q-item-section>
</q-item>
<q-item v-if="false && register_type == 'offline'">
<q-item-section avatar class="header_label">
{{ $t("secret key") }}
</q-item-section>
<q-item-section>
<q-input v-model="secret_key"> </q-input>
</q-item-section>
<q-item-section avatar> ({{ $t("optional") }}) </q-item-section>
</q-item>
<q-item v-if="register_type == 'online'">
<q-item-section avatar class="header_label">
{{ $t("server ipaddress") }}
</q-item-section>
<q-item-section>
<q-input
v-model="server_address"
autofocus
:loading="loading"
:disable="loading"
lazy-rules
:rules="[
(val) =>
isIpAddress(val) || $t('Please input vaild ip address'),
]"
/>
</q-item-section>
</q-item>
<q-item v-if="register_type == 'online'">
<q-item-section avatar class="header_label">
{{ $t("active type") }}
</q-item-section>
<q-item-section>
<div class="row q-gutter-sm">
<q-radio
v-model="active_type"
checked-icon="task_alt"
unchecked-icon="panorama_fish_eye"
val="forever"
:label="$t('forever active')"
class="offset-md-1 col"
:loading="loading" :loading="loading"
:disable="loading" :disable="loading"
/> class="rotate-90"
<q-radio color="green"
v-model="active_type" @click="$refs.select_file_dialog.pickFiles($event)"
checked-icon="task_alt" >
unchecked-icon="panorama_fish_eye" <q-tooltip>
val="limit" {{ $t("open file") }}
:label="$t('time limit active')" </q-tooltip>
class="col" </q-btn>
</q-item-section>
</q-item>
<q-item v-if="false && register_type == 'offline'">
<q-item-section avatar class="header_label">
{{ $t("secret key") }}
</q-item-section>
<q-item-section>
<q-input v-model="secret_key"> </q-input>
</q-item-section>
<q-item-section avatar> ({{ $t("optional") }}) </q-item-section>
</q-item>
<q-item v-if="register_type == 'online'">
<q-item-section avatar class="header_label">
{{ $t("server ipaddress") }}
</q-item-section>
<q-item-section>
<q-input
v-model="server_address"
autofocus
:loading="loading" :loading="loading"
:disable="loading" :disable="loading"
lazy-rules
:rules="[
(val) =>
isIpAddress(val) || $t('Please input vaild ip address'),
]"
/> />
</div> </q-item-section>
</q-item-section> </q-item>
</q-item> <q-item v-if="register_type == 'online'">
<q-item v-if="active_type == 'limit'"> <q-item-section avatar class="header_label">
<q-item-section avatar class="header_label"> {{ $t("active type") }}
{{ $t("active time") }} </q-item-section>
</q-item-section> <q-item-section>
<q-item-section> <div class="row q-gutter-sm">
<q-input <q-radio
v-model="active_hour" v-model="active_type"
type="number" checked-icon="task_alt"
min="1" unchecked-icon="panorama_fish_eye"
max="120" val="forever"
:loading="loading" :label="$t('forever active')"
:disable="loading" class="offset-md-1 col"
> :loading="loading"
<template v-slot:append> :disable="loading"
{{ $t("day") }} />
</template> <q-radio
</q-input> v-model="active_type"
</q-item-section> checked-icon="task_alt"
</q-item> unchecked-icon="panorama_fish_eye"
val="limit"
:label="$t('time limit active')"
class="col"
:loading="loading"
:disable="loading"
/>
</div>
</q-item-section>
</q-item>
<q-item v-if="active_type == 'limit'">
<q-item-section avatar class="header_label">
{{ $t("active time") }}
</q-item-section>
<q-item-section>
<q-input
v-model="active_hour"
type="number"
min="1"
max="120"
:loading="loading"
:disable="loading"
>
<template v-slot:append>
{{ $t("day") }}
</template>
</q-input>
</q-item-section>
</q-item>
<q-separator class="q-mt-md" />
<q-item>
<q-item-section avatar class="header_label">
{{ $t("product") }}
</q-item-section>
<q-item> <q-item-section>
<q-item-section avatar class="header_label"> <div class="row q-gutter-sm">
{{ $t("function") }} <q-radio
</q-item-section> v-model="selected_product"
<q-item-section> val=""
<div class="row q-gutter-sm"> :label="$t('normal')"
<q-checkbox color="cyan"
v-model="function_output_board" class="offset-md-1 col"
:label="$t('output board')" :loading="loading"
color="cyan" :disable="loading"
class="offset-md-1 col" />
:loading="loading"
:disable="loading"
/>
<q-checkbox
v-model="function_center_control"
:label="$t('center control')"
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
<q-checkbox
v-model="function_mirroring_output"
:label="$t('mirroring output')"
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
</div>
</q-item-section>
</q-item>
<q-item> <q-radio
<q-item-section avatar class="header_label"> </q-item-section> v-model="selected_product"
<q-item-section> val="magic_wall"
<div class="row q-gutter-sm"> :label="$t('magic wall')"
<q-checkbox color="cyan"
v-model="function_custom_ISV" class="offset-md-1 col"
:label="$t('Custom ISV')" :loading="loading"
color="cyan" :disable="loading"
class="offset-md-1 col" />
:loading="loading" <q-radio
:disable="loading" v-model="selected_product"
/> val="fusion"
<q-checkbox :label="$t('fusion')"
v-model="function_magic_wall" color="cyan"
@update:model-value="changeMagic()" class="offset-md-1 col"
:label="$t('magic wall')" :loading="loading"
color="cyan" :disable="loading"
class="offset-md-1 col" />
:loading="loading" </div>
:disable="loading" </q-item-section>
/> </q-item>
<q-checkbox <q-item v-if="selected_product == 'fusion'">
v-model="function_fusion" <q-item-section avatar class="header_label">
@update:model-value="changeFusion()" {{ $t("fusion") }}
:label="$t('fusion')" </q-item-section>
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
</div>
</q-item-section>
</q-item>
<q-item> <q-item-section>
<q-item-section avatar class="header_label"> <div class="row q-gutter-sm">
{{ $t("language") }} <q-radio
</q-item-section> v-for="item of 5"
<q-item-section> :key="item"
<div class="row q-gutter-sm"> v-model="function_fusion_count"
<q-radio :val="item"
color="cyan" :label="item.toString() + $t(' ') + $t('fusion out')"
:loading="loading" color="cyan"
:disable="loading" class="offset-md-1 col"
class="offset-md-1 col" :loading="loading"
v-model="target_language" :disable="loading"
val="zh-CN" />
:label="$t('chinese')" </div>
/> <div class="row q-gutter-sm">
<q-radio <q-radio
color="cyan" v-for="item of 4"
:loading="loading" :key="5 + item"
:disable="loading" v-model="function_fusion_count"
class="offset-md-1 col" :val="5 + item"
v-model="target_language" :label="
val="en-US" (5 + item).toString() + $t(' ') + $t('fusion out')
:label="$t('english')" "
/> color="cyan"
</div> class="offset-md-1 col"
</q-item-section> :loading="loading"
</q-item> :disable="loading"
</q-list> />
<div class="offset-md-1 col"></div>
</div>
</q-item-section>
<q-item-section avatar> </q-item-section>
</q-item>
<q-item>
<q-item-section avatar class="header_label">
{{ $t("function") }}
</q-item-section>
<q-item-section>
<div class="row q-gutter-sm">
<q-checkbox
v-model="function_output_board"
:label="$t('output board')"
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
<q-checkbox
v-model="function_center_control"
:label="$t('center control')"
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
<q-checkbox
v-model="function_mirroring_output"
:label="$t('mirroring output')"
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
</div>
</q-item-section>
</q-item>
<q-item>
<q-item-section avatar class="header_label"> </q-item-section>
<q-item-section>
<div class="row q-gutter-sm">
<q-checkbox
v-model="function_custom_ISV"
:label="$t('Custom ISV')"
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
</div>
</q-item-section>
</q-item>
<q-item>
<q-item-section avatar class="header_label">
{{ $t("language") }}
</q-item-section>
<q-item-section>
<div class="row q-gutter-sm">
<q-radio
color="cyan"
:loading="loading"
:disable="loading"
class="offset-md-1 col"
v-model="target_language"
val="zh-CN"
:label="$t('chinese')"
/>
<q-radio
color="cyan"
:loading="loading"
:disable="loading"
class="offset-md-1 col"
v-model="target_language"
val="en-US"
:label="$t('english')"
/>
</div>
</q-item-section>
</q-item> </q-list
></q-scroll-area>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
@ -406,7 +466,10 @@ 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 { EDeviceAttribute } from "src/entities/EDeviceAttribute"; import {
EDeviceAttribute,
EDeviceAttributeHelper,
} from "src/entities/EDeviceAttribute";
import ValidationUtil from "src/common/ValidationUtil"; import ValidationUtil from "src/common/ValidationUtil";
export default defineComponent({ export default defineComponent({
@ -440,6 +503,16 @@ 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);
@ -457,6 +530,7 @@ 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;
@ -497,7 +571,18 @@ 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_magic_wall.value = $store.state.custom_defines.function_fusion; function_fusion.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 {
@ -521,8 +606,10 @@ 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() {
@ -653,7 +740,10 @@ export default defineComponent({
attribute |= EDeviceAttribute.ProductMagicWall; attribute |= EDeviceAttribute.ProductMagicWall;
} }
if (function_fusion.value) { if (function_fusion.value) {
attribute |= EDeviceAttribute.ProductFusion; attribute |=
EDeviceAttributeHelper.getProdictFusionAttributeByIndex(
function_fusion_count.value
);
} }
GlobalData.getInstance() GlobalData.getInstance()
@ -694,16 +784,6 @@ 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;
}
},
}; };
}, },
}); });

View File

@ -1,38 +1,145 @@
export enum EDeviceAttribute { export enum EDeviceAttribute {
None_UnKNow = 0x0000, None = 0x0000000000000001,
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,
None = 0x00000001, StandMediaControl = OutputBoard | CenterControl,
OutputBoard = 0x00000002, All = 0xffffffffffffffff,
CenterControl = 0x00000004, }
MirroringOutput = 0x00000008,
CustomISV = 0x00000010, export class EDeviceAttributeHelper {
Reserve5 = 0x00000020, public static isProductFusion(attribute: number) {
Reserve6 = 0x00000040, return (
Reserve7 = 0x00000080, (attribute & EDeviceAttribute.ProductFusion_1) != 0 ||
Reserve8 = 0x00000100, (attribute & EDeviceAttribute.ProductFusion_2) != 0 ||
Reserve9 = 0x00000200, (attribute & EDeviceAttribute.ProductFusion_3) != 0 ||
Reserve10 = 0x00000400, (attribute & EDeviceAttribute.ProductFusion_4) != 0 ||
Reserve11 = 0x00000800, (attribute & EDeviceAttribute.ProductFusion_5) != 0 ||
Reserve12 = 0x00001000, (attribute & EDeviceAttribute.ProductFusion_6) != 0 ||
Reserve13 = 0x00002000, (attribute & EDeviceAttribute.ProductFusion_7) != 0 ||
Reserve14 = 0x00004000, (attribute & EDeviceAttribute.ProductFusion_8) != 0 ||
Reserve15 = 0x00008000, (attribute & EDeviceAttribute.ProductFusion_9) != 0
Reserve16 = 0x00010000, );
Reserve17 = 0x00020000, }
Reserve18 = 0x00040000,
Reserve19 = 0x00080000, public static getProductFusionOutputCount(attribute: number) {
Reserve20 = 0x00100000, if (attribute & EDeviceAttribute.ProductFusion_1) {
ProductMagicWall = 0x00200000, return 1;
ProductFusion = 0x00400000, } else if (attribute & EDeviceAttribute.ProductFusion_2) {
Reserve23 = 0x00800000, return 2;
Reserve24 = 0x01000000, } else if (attribute & EDeviceAttribute.ProductFusion_3) {
Reserve25 = 0x02000000, return 3;
Reserve26 = 0x04000000, } else if (attribute & EDeviceAttribute.ProductFusion_4) {
Reserve27 = 0x08000000, return 4;
Reserve28 = 0x10000000, } else if (attribute & EDeviceAttribute.ProductFusion_5) {
Reserve29 = 0x20000000, return 5;
Reserve30 = 0x40000000, } else if (attribute & EDeviceAttribute.ProductFusion_6) {
Reserve31 = 0x80000000, return 6;
} else if (attribute & EDeviceAttribute.ProductFusion_7) {
All = 0xffffffff, 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;
}
}
} }

View File

@ -470,8 +470,9 @@ export default {
"Please enter the points you need to add": "Please enter the points you need to add":
"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",
@ -490,6 +491,12 @@ export default {
"export magic": "Export", "export magic": "Export",
"raster graph": "Raster Graph", "raster graph": "Raster Graph",
"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",
"Loading please wait": "Loading please wait",
product: "Product",
normal: "Normal",
"fusion out": "Out",
"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",

View File

@ -761,6 +761,9 @@ export default {
"Version Mismatch !": "版本不匹配!", "Version Mismatch !": "版本不匹配!",
"Version Mismatch ! Please Upgrade The Software Again ! Otherwise, The File Function Cannot Be Used !": "Version Mismatch ! Please Upgrade The Software Again ! Otherwise, The File Function Cannot Be Used !":
"版本不匹配!请重新升级软件!否则文件功能无法正常使用!", "版本不匹配!请重新升级软件!否则文件功能无法正常使用!",
product: "产品",
normal: "普通",
"fusion out": "出",
"Please enter the square number":"请输入平方数", "Please enter the square number":"请输入平方数",
"Change projector layout":"更改投影机布局" "Change projector layout":"更改投影机布局"
}; };

View File

@ -1,3 +1,4 @@
import { EDeviceAttributeHelper } from "./../entities/EDeviceAttribute";
import { ConnectTableEntity } from "src/entities/ConnectTableEntity"; import { ConnectTableEntity } from "src/entities/ConnectTableEntity";
import { import {
PollingEntity, PollingEntity,
@ -440,7 +441,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 =
(state.device_attribute & EDeviceAttribute.ProductFusion) != 0; EDeviceAttributeHelper.isProductFusion(state.device_attribute);
} }
}, },
setAvancedDebug(state: StateInterface, playload?: any) { setAvancedDebug(state: StateInterface, playload?: any) {