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

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>
<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-section avatar>
{{ $t("language") }}
@ -169,6 +181,7 @@ export default defineComponent({
const function_center_control = ref(false);
const function_output_board = ref(false);
const function_mirroring_output = ref(false);
const function_custom_ISV = ref(false);
const target_language = ref("zh-CN");
return {
@ -176,6 +189,7 @@ export default defineComponent({
loading,
function_center_control,
function_output_board,
function_custom_ISV,
function_mirroring_output,
target_language,
@ -201,6 +215,10 @@ export default defineComponent({
($store.state.device_attribute &
Protocol.EDeviceAttribute.MirroringOutput) !=
0;
function_custom_ISV.value =
(response.attribute & Protocol.EDeviceAttribute.CustomISV) !=
0;
});
}
} catch {}
@ -211,6 +229,8 @@ export default defineComponent({
function_center_control.value = false;
function_output_board.value = false;
function_mirroring_output.value = false;
function_custom_ISV.value = false;
},
restartDevice() {
@ -299,6 +319,11 @@ export default defineComponent({
if (function_mirroring_output.value) {
attribute |= Protocol.EDeviceAttribute.MirroringOutput;
}
if (function_custom_ISV.value) {
attribute |= Protocol.EDeviceAttribute.CustomISV;
}
GlobalData.getInstance()
.getCurrentClient()
?.setDeviceAttribute(attribute);

View File

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

View File

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

View File

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

View File

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