注册页面增加优霸定制选项

This commit is contained in:
fangxiang 2022-07-04 10:46:10 +08:00
parent 52ffed28d9
commit 22742894e6
5 changed files with 71 additions and 1 deletions

View File

@ -77,6 +77,18 @@
/> />
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item>
<q-item-section avatar></q-item-section>
<q-item-section>
<q-checkbox
v-model="function_custom_ISV"
:label="$t('Custom ISV')"
color="cyan"
:loading="loading"
:disable="loading"
/>
</q-item-section>
</q-item>
<q-item> <q-item>
<q-item-section avatar> <q-item-section avatar>
{{ $t("language") }} {{ $t("language") }}
@ -169,6 +181,7 @@ export default defineComponent({
const function_center_control = ref(false); const function_center_control = ref(false);
const function_output_board = ref(false); const function_output_board = ref(false);
const function_mirroring_output = ref(false); const function_mirroring_output = ref(false);
const function_custom_ISV = ref(false);
const target_language = ref("zh-CN"); const target_language = ref("zh-CN");
return { return {
@ -176,6 +189,7 @@ export default defineComponent({
loading, loading,
function_center_control, function_center_control,
function_output_board, function_output_board,
function_custom_ISV,
function_mirroring_output, function_mirroring_output,
target_language, target_language,
@ -201,6 +215,10 @@ export default defineComponent({
($store.state.device_attribute & ($store.state.device_attribute &
Protocol.EDeviceAttribute.MirroringOutput) != Protocol.EDeviceAttribute.MirroringOutput) !=
0; 0;
function_custom_ISV.value =
(response.attribute & Protocol.EDeviceAttribute.CustomISV) !=
0;
}); });
} }
} catch {} } catch {}
@ -211,6 +229,8 @@ export default defineComponent({
function_center_control.value = false; function_center_control.value = false;
function_output_board.value = false; function_output_board.value = false;
function_mirroring_output.value = false;
function_custom_ISV.value = false;
}, },
restartDevice() { restartDevice() {
@ -299,6 +319,11 @@ export default defineComponent({
if (function_mirroring_output.value) { if (function_mirroring_output.value) {
attribute |= Protocol.EDeviceAttribute.MirroringOutput; attribute |= Protocol.EDeviceAttribute.MirroringOutput;
} }
if (function_custom_ISV.value) {
attribute |= Protocol.EDeviceAttribute.CustomISV;
}
GlobalData.getInstance() GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()
?.setDeviceAttribute(attribute); ?.setDeviceAttribute(attribute);

View File

@ -291,6 +291,22 @@
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item v-if="register_type == 'online'">
<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 v-if="register_type == 'online'"> <q-item v-if="register_type == 'online'">
<q-item-section avatar class="header_label"> <q-item-section avatar class="header_label">
{{ $t("language") }} {{ $t("language") }}
@ -399,6 +415,7 @@ export default defineComponent({
const function_center_control = ref(false); const function_center_control = ref(false);
const function_output_board = ref(false); const function_output_board = ref(false);
const function_mirroring_output = ref(false); const function_mirroring_output = ref(false);
const function_custom_ISV = ref(false);
const trial_days = ref(0); const trial_days = ref(0);
const last_days = ref(0); const last_days = ref(0);
@ -420,6 +437,7 @@ export default defineComponent({
function_center_control.value = false; function_center_control.value = false;
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;
}; };
const showDialog = async () => { const showDialog = async () => {
@ -456,6 +474,10 @@ export default defineComponent({
($store.state.device_attribute & ($store.state.device_attribute &
Protocol.EDeviceAttribute.MirroringOutput) != Protocol.EDeviceAttribute.MirroringOutput) !=
0; 0;
function_custom_ISV.value =
($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) !=
0;
}; };
return { return {
@ -476,6 +498,7 @@ export default defineComponent({
select_file_dialog, select_file_dialog,
server_address, server_address,
function_output_board, function_output_board,
function_custom_ISV,
function_center_control, function_center_control,
function_mirroring_output, function_mirroring_output,
target_language, target_language,
@ -601,6 +624,10 @@ export default defineComponent({
attribute |= Protocol.EDeviceAttribute.MirroringOutput; attribute |= Protocol.EDeviceAttribute.MirroringOutput;
} }
if (function_custom_ISV.value) {
attribute |= Protocol.EDeviceAttribute.CustomISV;
}
GlobalData.getInstance() GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()
?.setDeviceAttribute(attribute); ?.setDeviceAttribute(attribute);

View File

@ -2549,7 +2549,7 @@ export namespace Protocol {
OutputBoard = 0x0002, OutputBoard = 0x0002,
CenterControl = 0x0004, CenterControl = 0x0004,
MirroringOutput = 0x0008, MirroringOutput = 0x0008,
Reserve3 = 0x0010, CustomISV = 0x0010,
Reserve4 = 0x0020, Reserve4 = 0x0020,
Reserve5 = 0x0040, Reserve5 = 0x0040,
Reserve6 = 0x0080, Reserve6 = 0x0080,

View File

@ -595,4 +595,5 @@ export default {
"host name": "主机名称", "host name": "主机名称",
"Host names can only be numbers and letters and _-": "Host names can only be numbers and letters and _-":
"主机名只能由数字、字母和_-组成", "主机名只能由数字、字母和_-组成",
"Custom ISV": "优霸定制",
}; };

View File

@ -4,6 +4,7 @@
<q-btn-dropdown <q-btn-dropdown
v-if="false" v-if="false"
v-touch-hold:10000.mouse="handleHold" v-touch-hold:10000.mouse="handleHold"
no-caps
:disable-dropdown="!show_advanced_menu" :disable-dropdown="!show_advanced_menu"
stretch stretch
flat flat
@ -29,6 +30,7 @@
<q-btn-dropdown <q-btn-dropdown
stretch stretch
no-caps
flat flat
icon="devices" icon="devices"
:label="$store.state.device_ip_address" :label="$store.state.device_ip_address"
@ -73,6 +75,7 @@
<q-btn <q-btn
stretch stretch
no-caps
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
flat flat
stack stack
@ -84,6 +87,7 @@
<q-btn <q-btn
stretch stretch
no-caps
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
flat flat
stack stack
@ -94,6 +98,7 @@
/> />
<q-btn <q-btn
stretch stretch
no-caps
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
flat flat
stack stack
@ -105,6 +110,7 @@
<q-btn <q-btn
stretch stretch
no-caps
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
flat flat
stack stack
@ -116,6 +122,7 @@
<q-btn <q-btn
stretch stretch
no-caps
flat flat
stack stack
:disable="plan_running || !$store.state.power_state" :disable="plan_running || !$store.state.power_state"
@ -127,6 +134,7 @@
<q-btn <q-btn
stretch stretch
no-caps
flat flat
stack stack
:disable="plan_running || !$store.state.power_state" :disable="plan_running || !$store.state.power_state"
@ -138,6 +146,7 @@
<q-btn <q-btn
stretch stretch
no-caps
flat flat
stack stack
:disable="plan_running || !$store.state.power_state" :disable="plan_running || !$store.state.power_state"
@ -149,6 +158,7 @@
<q-btn <q-btn
stretch stretch
no-caps
flat flat
stack stack
:disable="plan_running || !$store.state.power_state" :disable="plan_running || !$store.state.power_state"
@ -161,6 +171,7 @@
<q-btn <q-btn
stretch stretch
flat flat
no-caps
stack stack
:disable="plan_running || !$store.state.power_state" :disable="plan_running || !$store.state.power_state"
:icon="/*clear_all*/ 'img:new_icon/clean_windows.png'" :icon="/*clear_all*/ 'img:new_icon/clean_windows.png'"
@ -171,6 +182,7 @@
<q-btn <q-btn
stretch stretch
no-caps
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
flat flat
stack stack
@ -183,6 +195,7 @@
<q-btn <q-btn
stretch stretch
no-caps
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
flat flat
stack stack
@ -195,6 +208,7 @@
<q-btn <q-btn
stretch stretch
no-caps
flat flat
stack stack
icon="img:new_icon/power_off.png" icon="img:new_icon/power_off.png"
@ -205,6 +219,7 @@
<q-btn <q-btn
stretch stretch
no-caps
flat flat
stack stack
icon="img:new_icon/power_on.png" icon="img:new_icon/power_on.png"
@ -216,6 +231,7 @@
<q-btn <q-btn
v-if="function_center_control" v-if="function_center_control"
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
no-caps
stretch stretch
flat flat
stack stack
@ -228,6 +244,7 @@
<q-space /> <q-space />
<q-btn-dropdown <q-btn-dropdown
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
no-caps
stretch stretch
flat flat
:icon="/*build*/ 'img:new_icon/other_setting.png'" :icon="/*build*/ 'img:new_icon/other_setting.png'"