Compare commits

...

16 Commits

Author SHA1 Message Date
shefengchun eb6cf76f69 修复用户输入input后点击加减号时变成字符串 2023-03-08 17:13:26 +08:00
shefengchun 49b38635aa Merge branch 'master_v2' of http://www.cloudview.work/git/fangxiang/media_player_client into master_v2 2023-03-08 16:38:58 +08:00
shefengchun bc87c6dbcb 完成平板完全适配 手写input按钮 融合带大小交由后端计算同步 2023-03-08 16:38:52 +08:00
miao 9e7acc2482 魔墙:打开对话框时初始化变量,多选对齐完清空多选 2023-03-08 15:35:15 +08:00
miao 549b06f756 魔墙:加开窗避免显示为空 2023-03-08 14:14:58 +08:00
miao ea5f50ff8e 魔墙:删除合并信息 2023-03-08 11:58:05 +08:00
miao 59bc352276 Merge branch 'master_v2' of http://www.cloudview.work/git/fangxiang/media_player_client into master_v2
# Conflicts:
#	src/components/ControlPanelDialog.vue
2023-03-08 11:42:44 +08:00
miao 45c30349a0 魔墙:修复清屏未及时通知 2023-03-08 11:41:46 +08:00
miao b2f8814079 魔墙:修复清屏未及时通知 2023-03-08 11:40:05 +08:00
miao 138b19c717 魔墙:修改对话框大小 2023-03-08 10:22:25 +08:00
miao 6f636315b6 魔墙:增加翻译,修复虚拟窗口选中,修改角度坐标会乱选中窗口,添加魔墙的显示器列表宽高信息,增加恢复时恢复显示器列表信息 2023-03-07 17:35:35 +08:00
miao 0e55d165cf 魔墙:保持显示器宽高不变 2023-03-06 15:33:35 +08:00
miao 24bcb57ac0 魔墙:修复多次删除其他窗口消失 2023-03-06 15:13:00 +08:00
shefengchun 9fa316628f 修复平板模式下打开融合设置时不获取配置 2023-03-06 10:53:58 +08:00
shefengchun 299a9fbdd9 Merge branch 'master_v2' of http://www.cloudview.work/git/fangxiang/media_player_client into master_v2 2023-03-06 08:51:39 +08:00
shefengchun ad683c78d2 修复平板模式下调整上下融合带箭头不匹配问题 2023-03-06 08:51:27 +08:00
14 changed files with 1766 additions and 696 deletions

View File

@ -710,6 +710,17 @@ 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) {
this.ws?.send(
@ -1446,7 +1457,8 @@ export default class ClientConnection {
column: number,
location: number,
enable: boolean,
width: number
width: number,
auto_sync: boolean,
) {
return await this.doRpc<Protocol.NoneResponse>(
new Protocol.SetBlendingOverlapRequestEntity(
@ -1454,7 +1466,8 @@ export default class ClientConnection {
column,
location,
enable,
width
width,
auto_sync
)
);
}

View File

@ -102,7 +102,7 @@
<q-separator />
<q-card-section style="max-height: 80vh; width: 55vw" class="q-pa-none">
<q-card-section style="max-height: 70vh; width: 48vw" class="q-pa-none">
<q-scroll-area style="height: 70vh">
<q-card class="my-card" flat bordered>
<q-card-section horizontal>
@ -124,9 +124,22 @@
min="0"
v-model="test_monitor_wall[current_index].angle"
@keydown="testLog($event)"
oninput="if(value<0)value=0;if(value>360)value=360;"
hint=""
@update:model-value="changeAngle()"
:rules="[
(val) =>
(val != null &&
val != undefined &&
val.toString().length > 0) ||
$t('Please type something'),
(val) =>
parseInt(val) >= 0 ||
$t('the number must be greater than 0'),
(val) =>
parseInt(val) <= 360 ||
$t('the number must be greater than 360'),
]"
lazy-rules
>
<template v-slot:append>
<span class="input_append">°</span>
@ -285,8 +298,8 @@
<div
style="
position: absolute;
height: 20.7vw;
width: 36.8vw;
height: 18vw;
width: 32vw;
text-align: center;
"
:class="$store.state.power_state ? 'wall' : ''"
@ -308,8 +321,8 @@
v-if="$store.state.power_state"
style="
position: absolute;
height: 20.7vw;
width: 36.8vw;
height: 18vw;
width: 32vw;
overflow: hidden;
"
@click="canel_active()"
@ -657,7 +670,7 @@
.wall {
border: 1px solid black;
background: no-repeat url("../../public/magic_bg/bg.jpg");
background-size: 36.8vw 20.7vw;
background-size: 32vw 18vw;
}
.wall_row {
@ -856,20 +869,24 @@ export default defineComponent({
const br = 0.6;
const cr = 0.7;
let test_monitor_list: Ref<test_monitor[]> = ref([
new test_monitor(0, "01", aw, ah, ar),
new test_monitor(1, "02", aw, ah, ar),
new test_monitor(2, "03", aw, ah, ar),
new test_monitor(3, "04", aw, ah, ar),
new test_monitor(4, "05", bw, bh, br),
new test_monitor(5, "06", bw, bh, br),
new test_monitor(6, "07", bw, bh, br),
new test_monitor(7, "08", bw, bh, br),
new test_monitor(8, "09", cw, ch, cr),
new test_monitor(9, "10", cw, ch, cr),
new test_monitor(10, "11", cw, ch, cr),
new test_monitor(11, "12", cw, ch, cr),
// new test_monitor(12, "13", cw, ch, cr)
]);
const initialize = () => {
test_monitor_list.value = [
new test_monitor(0, "01", aw, ah, ar),
new test_monitor(1, "02", aw, ah, ar),
new test_monitor(2, "03", aw, ah, ar),
new test_monitor(3, "04", aw, ah, ar),
new test_monitor(4, "05", bw, bh, br),
new test_monitor(5, "06", bw, bh, br),
new test_monitor(6, "07", bw, bh, br),
new test_monitor(7, "08", bw, bh, br),
new test_monitor(8, "09", cw, ch, cr),
new test_monitor(9, "10", cw, ch, cr),
new test_monitor(10, "11", cw, ch, cr),
new test_monitor(11, "12", cw, ch, cr),
];
};
interface show__Rect {
width: number;
height: number;
@ -886,7 +903,7 @@ export default defineComponent({
const realtime_upload = async (
WallList: any = test_monitor_wall.value,
per: number = percenter.value,
tep:number=1
tep: number = 1
) => {
let client = GlobalData.getInstance().getCurrentClient();
const settings = await GlobalData.getInstance()
@ -896,16 +913,6 @@ export default defineComponent({
output_length.value =
parseInt(settings.wall_col.toString()) *
parseInt(settings.wall_row.toString());
if (output_length.value > WallList.length) {
let num = output_length.value - WallList.length;
while (num > 0) {
let index = WallList.length;
let uuid = (index + 1).toString();
WallList.push(new test_monitor(index, uuid, aw, ah, ar));
num--;
}
getpx();
}
}
const cloud_monitor_list = new MagicWallConfig();
@ -914,7 +921,7 @@ export default defineComponent({
cloud_monitor_list.magic_wall_enable = true;
cloud_monitor_list.col = parseInt(settings.wall_col.toString());
cloud_monitor_list.row = parseInt(settings.wall_row.toString());
if(tep==1){
if (tep == 1) {
WallList = ordination(WallList);
}
WallList.forEach((element: any, index: number) => {
@ -927,7 +934,7 @@ export default defineComponent({
),
h: element.h / wall_dom.offsetHeight,
w: element.w / wall_dom.offsetWidth,
angle: parseInt(element.angle.toString()),
angle: Number(element.angle.toString()) ?? 0,
initial_h: element.InitialH,
initial_w: element.InitialW,
percenter: per,
@ -949,7 +956,7 @@ export default defineComponent({
currenty: element.currenty / wall_dom.offsetHeight,
h: element.h / wall_dom.offsetHeight,
w: element.w / wall_dom.offsetWidth,
angle: parseInt(element.angle.toString()),
angle: Number(element.angle.toString()) ?? 0,
centerx: element.centerx / 3840,
centery: element.centery / 2160,
});
@ -1015,56 +1022,56 @@ export default defineComponent({
const four_point = (item: test_monitor) => {
const wall_dom = wall.value;
let centerx: any, centery: any;
if (wall_dom) {
centerx = (item.centerx / 3840) * wall_dom.offsetWidth;
centery = (item.centery / 2160) * wall_dom.offsetHeight;
}
centerx = Math.round(centerx);
centery = Math.round(centery);
// item.centerx = Math.round((item.centerx));
// item.centery = Math.round(item.centery);
const x2: number = item.currentx + item.w;
const y2: number = item.currenty + item.h;
const x1: number = centerx;
const y1: number = centery;
if (item.angle != 0) {
const point_left_top = calculateCoordinates(
item.currentx,
item.currenty,
x1,
y1,
item
);
const point_left_bootom = calculateCoordinates(
item.currentx,
y2,
x1,
y1,
item
);
const point_right_top = calculateCoordinates(
x2,
item.currenty,
x1,
y1,
item
);
const point_right_bottom = calculateCoordinates(x2, y2, x1, y1, item);
const point_list = [
point_left_top,
point_left_bootom,
point_right_top,
point_right_bottom,
];
return point_list;
} else {
const point_list = [
{ x: item.currentx, y: item.currenty }, //
{ x: x2, y: item.currenty }, //
{ x: item.currentx, y: y2 }, //
{ x: x2, y: y2 }, //
];
return point_list;
if (item) {
if (wall_dom) {
centerx = (item.centerx / 3840) * wall_dom.offsetWidth;
centery = (item.centery / 2160) * wall_dom.offsetHeight;
}
centerx = Math.round(centerx);
centery = Math.round(centery);
const x2: number = item.currentx + item.w;
const y2: number = item.currenty + item.h;
const x1: number = centerx;
const y1: number = centery;
if (item.angle != 0) {
const point_left_top = calculateCoordinates(
item.currentx,
item.currenty,
x1,
y1,
item
);
const point_left_bootom = calculateCoordinates(
item.currentx,
y2,
x1,
y1,
item
);
const point_right_top = calculateCoordinates(
x2,
item.currenty,
x1,
y1,
item
);
const point_right_bottom = calculateCoordinates(x2, y2, x1, y1, item);
const point_list = [
point_left_top,
point_left_bootom,
point_right_top,
point_right_bottom,
];
return point_list;
} else {
const point_list = [
{ x: item.currentx, y: item.currenty }, //
{ x: x2, y: item.currenty }, //
{ x: item.currentx, y: y2 }, //
{ x: x2, y: y2 }, //
];
return point_list;
}
}
};
let offsetHeight = ref(0.0);
@ -1090,8 +1097,8 @@ export default defineComponent({
item: test_monitor = test_monitor_wall.value[current_index.value]
) => {
const wall_dom = wall.value;
const point_list = four_point(item);
if (wall_dom) {
const point_list = four_point(item);
if (item.angle != 0 && point_list) {
let minx = 0;
point_list.forEach((element) => {
@ -1164,8 +1171,8 @@ export default defineComponent({
item: test_monitor = test_monitor_wall.value[current_index.value]
) => {
const wall_dom = wall.value;
const point_list = four_point(item);
if (wall_dom) {
const point_list = four_point(item);
if (item.angle != 0 && point_list) {
let miny = 0;
point_list.forEach((element) => {
@ -1191,8 +1198,8 @@ export default defineComponent({
item: test_monitor = test_monitor_wall.value[current_index.value]
) => {
const wall_dom = wall.value;
const point_list = four_point(item);
if (wall_dom) {
const point_list = four_point(item);
if (item.angle != 0 && point_list) {
let maxy = 0;
point_list.forEach((element) => {
@ -1256,6 +1263,11 @@ export default defineComponent({
const moveMonitor = (item: test_monitor, rect: show__Rect) => {
//
const wall_dom = wall.value;
const temp_index = sort_index.value.findIndex((v: any) => v == item.uuid);
if (temp_index != -1) {
sort_index.value.splice(temp_index, 1);
sort_index.value.push(item.uuid);
}
if (item.angle != 0) {
exceedrange(item);
} else if (wall_dom) {
@ -1280,7 +1292,11 @@ export default defineComponent({
((item.currenty + item.h / 2) / wall_dom?.offsetHeight) * 2160
);
}
test_monitor_wall.value = ordination(
JSON.parse(JSON.stringify(test_monitor_wall.value))
);
realtime_upload();
item.active = true;
};
const exceedrange = (item: test_monitor) => {
const wall_dom = wall.value;
@ -1343,32 +1359,24 @@ export default defineComponent({
const refresh_all = () => {
refresh_resize(2);
current_index.value = -1;
monitor_list_current_index.value=-1
monitor_list_current_index.value = -1;
percenter.value = last_percenter.value;
multiple_select.value = [];
multiple.value = false;
loading.value = false;
// test_monitor_list.value.forEach((element) => {
// element.isHide = false;
// element.isactive=false;
// });
// last_wall.value.forEach((element) => {
// element.isShow = true;
// test_monitor_wall.value.push(JSON.parse(JSON.stringify(element)));
// test_monitor_list.value[element.id].isHide = true;
// });
realtime_upload(last_wall.value,last_percenter.value,2);
test_monitor_list.value = JSON.parse(list_magic);
realtime_upload(last_wall.value, last_percenter.value, 2);
};
let sort_index: any = ref([]);
let old_sort_index: any = [];
const ordination = (wall_list: any, sort: any = sort_index.value) => {
let temp_list: test_monitor[] = [];
wall_list.forEach((ele: any, index: number) => {
let i = sort.indexOf(ele.uuid);
temp_list[i] = wall_list[index];
});
current_index.value = wall_list.length - 1;
return temp_list;
};
const refresh_resize = (a: number) => {
@ -1422,7 +1430,7 @@ export default defineComponent({
refresh_resize(1);
});
const refresh_magic = (a: any) => {
sort_index.value=[]
sort_index.value = [];
let monitorList: any = [];
$store.commit("setShowMonitorList", monitorList);
if (a) {
@ -1476,6 +1484,7 @@ export default defineComponent({
);
item.angle = element.angle;
item.isShow = true;
item.active = false;
test_monitor_wall.value.push(JSON.parse(JSON.stringify(item)));
sort_index.value.push(test_monitor_list.value[element.index].uuid);
@ -1486,6 +1495,12 @@ export default defineComponent({
});
});
}
if (a.length == 0) {
test_monitor_list.value.forEach((ele) => {
ele.isHide = false;
});
test_monitor_wall.value = [];
}
};
const sub_x = () => {
const wall_dom = wall.value;
@ -1622,6 +1637,7 @@ export default defineComponent({
}
realtime_upload();
};
let list_magic: any = [];
EventBus.getInstance().on(
EventNamesDefine.NotifyMessage,
(notify: NotifyMessage) => {
@ -1643,9 +1659,7 @@ export default defineComponent({
) as Protocol.SetApplicationConfigRequestEntity;
if (temp.key == "magic_wall_config") {
const a = JSON.parse(temp.value).windows;
if (
true
) {
if (true) {
refresh_magic(a);
}
}
@ -1700,27 +1714,38 @@ export default defineComponent({
console.log(a);
},
async showDialog() {
initialize();
monitor_list_current_index.value = -1;
show_dialog.value = true;
magic_switch.value = true;
sort_index.value = [];
old_sort_index=[]
last_wall.value=[]
old_sort_index = [];
last_wall.value = [];
last_percenter.value = 1;
let client = GlobalData.getInstance().getCurrentClient();
if (client) {
const settings = await GlobalData.getInstance()
.getCurrentClient()
?.getOutputBoardSetting();
const response = await client.getMagicWallConfig();
const wall_dom = wall.value;
const SetMagicWallGridState = await client.setMagicWallGridState(
magic_switch.value
);
list_magic = (await client.getApplicationSettins())?.config
?.magic_list;
if (list_magic) {
test_monitor_list.value = JSON.parse(list_magic);
}
if (wall_dom) {
offsetHeight.value = wall_dom.offsetHeight;
offsetWidth.value = wall_dom.offsetWidth;
getpx();
}
test_monitor_list.value.forEach((element) => {
element.isHide = false;
});
if (response && settings) {
const a = response?.config.windows;
output_length.value =
@ -1749,12 +1774,10 @@ export default defineComponent({
multiple.value = false;
last_wall.value = [];
sort_index.value = [];
test_monitor_list.value.forEach((element) => {
element.isHide = false;
});
$store.commit("setShowMonitorList", []);
loading.value = false;
} else if (a && wall_dom) {
} else if (a && wall_dom) {
a.forEach((element) => {
let item: test_monitor = new test_monitor(0, "0", 0, 0, 0);
extend(true, item, test_monitor_list.value[element.index]);
@ -1778,6 +1801,7 @@ export default defineComponent({
);
item.angle = element.angle;
item.isShow = true;
item.active = false;
test_monitor_wall.value.push(JSON.parse(JSON.stringify(item)));
last_wall.value.push(JSON.parse(JSON.stringify(item)));
sort_index.value.push(
@ -1786,11 +1810,7 @@ export default defineComponent({
old_sort_index.push(
test_monitor_list.value[element.index].uuid
);
test_monitor_list.value.forEach((ele) => {
if (element.index == ele.id) {
ele.isHide = true;
}
});
test_monitor_list.value[element.index].isHide = true;
});
if (a.length == 1) {
current_index.value = 0;
@ -1798,6 +1818,13 @@ export default defineComponent({
current_index.value = -1;
}
}
if (a.length == 0) {
test_monitor_list.value.forEach((ele) => {
ele.isHide = false;
});
sort_index.value = [];
test_monitor_wall.value = [];
}
}
}
},
@ -1840,7 +1867,7 @@ export default defineComponent({
),
h: element.h / wall_dom.offsetHeight,
w: element.w / wall_dom.offsetWidth,
angle: parseInt(element.angle.toString()),
angle: Number(element.angle.toString()) ?? 0,
initial_h: element.InitialH,
initial_w: element.InitialW,
percenter: percenter.value,
@ -1850,7 +1877,9 @@ export default defineComponent({
}
});
const setMagic = await client.setMagicWallConfig(cloud_monitor_list);
client.setMagicWallList(
JSON.parse(JSON.stringify(test_monitor_list.value))
);
if (setMagic?.success) {
let monitorList: any = [];
test_monitor_wall.value.forEach((element, index) => {
@ -1861,7 +1890,7 @@ export default defineComponent({
currenty: element.currenty / wall_dom.offsetHeight,
h: element.h / wall_dom.offsetHeight,
w: element.w / wall_dom.offsetWidth,
angle: parseInt(element.angle.toString()),
angle: Number(element.angle.toString()) ?? 0,
centerx: element.centerx / 3840,
centery: element.centery / 2160,
});
@ -2026,8 +2055,8 @@ export default defineComponent({
},
closeWindow(item: test_monitor, index: number) {
current_index.value = -1;
item.cmw = Math.round(item.w / lcm.value);
item.cmh = Math.round(item.h / lcm.value);
// item.cmw = Math.round(item.w / lcm.value);
// item.cmh = Math.round(item.h / lcm.value);
test_monitor_list.value[item.id] = JSON.parse(
JSON.stringify(test_monitor_wall.value[index])
);
@ -2036,44 +2065,40 @@ export default defineComponent({
test_monitor_list.value[item.id].isHide = false;
test_monitor_wall.value[index].isShow = false;
multiple_select.value = [];
test_monitor_wall.value.splice(temp_index, 1);
realtime_upload();
},
closeOtherWindows(item: test_monitor, index: number) {
current_index.value = index;
test_monitor_wall.value.forEach((ele) => {
ele.cmh = Math.round(ele.h / lcm.value);
ele.cmw = Math.round(ele.w / lcm.value);
test_monitor_list.value[ele.id] = JSON.parse(JSON.stringify(ele));
});
// test_monitor_wall.value.forEach((ele) => {
// ele.cmh = Math.round(ele.h / lcm.value);
// ele.cmw = Math.round(ele.w / lcm.value);
// test_monitor_list.value[ele.id].cmh = Number(JSON.stringify(ele.cmh));
// test_monitor_list.value[ele.id].cmw = Number(JSON.stringify(ele.cmw));
// });
test_monitor_list.value.forEach((element) => {
element.isHide = false;
});
test_monitor_wall.value.forEach((element, i) => {
if (index != i) {
element.isShow = false;
}
});
test_monitor_wall.value = [item];
sort_index.value = [item.uuid];
test_monitor_list.value[item.id].isHide = true;
test_monitor_wall.value[index].isShow = true;
current_index.value = 0;
realtime_upload();
current_index.value = sort_index.value.indexOf(item.uuid);
},
//cache
closeAllWindows() {
sort_index.value = [];
current_index.value = -1;
test_monitor_wall.value.forEach((ele) => {
ele.cmh = Math.round(ele.h / lcm.value);
ele.cmw = Math.round(ele.w / lcm.value);
test_monitor_list.value[ele.id] = JSON.parse(JSON.stringify(ele));
});
// test_monitor_wall.value.forEach((ele) => {
// ele.cmh = Math.round(ele.h / lcm.value);
// ele.cmw = Math.round(ele.w / lcm.value);
// test_monitor_list.value[ele.id].cmh = Number(JSON.stringify(ele.cmh));
// test_monitor_list.value[ele.id].cmw = Number(JSON.stringify(ele.cmw));
// });
test_monitor_list.value.forEach((element) => {
element.isHide = false;
});
test_monitor_wall.value.forEach((element) => {
element.isShow = false;
});
test_monitor_wall.value = [];
multiple_select.value = [];
realtime_upload();
},
@ -2116,7 +2141,7 @@ export default defineComponent({
}
realtime_upload();
},
changePercenter(a:number) {
changePercenter(a: number) {
const wall_dom = wall.value;
let tep = false;
test_monitor_wall.value.forEach((element) => {
@ -2146,7 +2171,7 @@ export default defineComponent({
tep = true;
}
});
if(a==2){
if (a == 2) {
realtime_upload();
}
},
@ -2189,7 +2214,7 @@ export default defineComponent({
tep_item.currenty = item.currenty;
}
});
multiple_select.value=[]
realtime_upload();
},
alignBottom() {
@ -2200,6 +2225,7 @@ export default defineComponent({
tep_item.currenty = item.currenty + item.h - tep_item.h;
}
});
multiple_select.value=[]
realtime_upload();
},
alignRight() {
@ -2210,7 +2236,7 @@ export default defineComponent({
tep_item.currentx = item.currentx + item.w - tep_item.w;
}
});
multiple_select.value=[]
realtime_upload();
},
alignLeft() {
@ -2221,6 +2247,7 @@ export default defineComponent({
tep_item.currentx = item.currentx;
}
});
multiple_select.value=[]
realtime_upload();
},
testLog(a: any) {

View File

@ -7,7 +7,8 @@
<Vue3DraggableResizable v-show="now_v_h == 'vertical'" :class="[options_model_v == index ? 'action' : 'point']"
v-for="(item, index) in value_v_point.length" :initW="point.w" :initH="point.h" :resizable="false" :x="0"
v-model:y="value_v_point[index].y" @activated="options_model_v = index; now_v_h = 'vertical'"
@click="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'v')">
@click="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad') == -1"
@dragging="dragStartHandle($event, index, 'v')">
<span>v{{
index + 1
}}</span>
@ -15,7 +16,8 @@
<Vue3DraggableResizable v-show="now_v_h == 'vertical'" :class="[options_model_v == index ? 'action' : 'point']"
v-for="(item, index) in value_v_point.length" :initW="point.w" :initH="point.h" :resizable="false"
:x="max.x - 20" @click="options_model_v = index; now_v_h = 'vertical'" v-model:y="value_v_point[index].y"
@activated="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'v')">
@activated="options_model_v = index; now_v_h = 'vertical'" :draggable="url.indexOf('pad') == -1"
@dragging="dragStartHandle($event, index, 'v')">
<span>v{{
index + 1
}}</span>
@ -23,7 +25,8 @@
<Vue3DraggableResizable v-show="now_v_h == 'level'" :class="[options_model_h == index ? 'action' : 'point']"
v-for="(item, index) in value_h_point.length" :initW="point.w" :initH="point.h" :resizable="false"
v-model:x="value_h_point[index].x" :y="0" @activated="options_model_h = index; now_v_h = 'level'"
@click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'h')">
@click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad') == -1"
@dragging="dragStartHandle($event, index, 'h')">
<span>h{{
index + 1
}}</span>
@ -31,7 +34,8 @@
<Vue3DraggableResizable v-show="now_v_h == 'level'" :class="[options_model_h == index ? 'action' : 'point']"
v-for="(item, index) in value_h_point.length" :initW="point.w" :initH="point.h" :resizable="false"
v-model:x="value_h_point[index].x" @activated="options_model_h = index; now_v_h = 'level'" :y="max.y - 20"
@click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad')==-1" @dragging="dragStartHandle($event, index, 'h')">
@click="options_model_h = index; now_v_h = 'level'" :draggable="url.indexOf('pad') == -1"
@dragging="dragStartHandle($event, index, 'h')">
<span>h{{
index + 1
}}</span>
@ -40,7 +44,7 @@
</div>
</div>
</div>
<div>
<div v-show="ispad">
<div class="row">
<div class="col-1"></div>
<div class="col-5">
@ -55,11 +59,12 @@
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('vertical point')"
@update:model-value="(val) => { chang_point_amount(val, 'v') }" :dense="true" filled
v-model="value_v_point_amount" :options="options_value_v_point_amount" emit-value map-options /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="()=>{add_dialog=true;value_point_amount_tmp_v=value_v_point_amount}" text-color="black"
<div class="col-2 q-pt-md "><q-btn color="white"
@click="() => { add_dialog = true; value_point_amount_tmp_v = value_v_point_amount }" text-color="black"
:label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:disable="value_v_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
<div class="q-pt-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
@ -68,53 +73,147 @@
<div class="col-2" @mousewheel="details_selsect_v"> <q-select class="q-pt-md " :label="$t('vertical')"
@update:model-value="(val) => { options_v = val }" :dense="true" filled v-model="options_model_v"
:options="options_v" emit-value map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'v')"> <q-input v-if="value_v[options_model_v]"
filled type="number" class="q-pt-md" :dense="true" v-model="value_v[options_model_v].y"
@update:model-value="chang(options_model_v, $event, 'v')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" />
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'v')"> <q-input
v-if="value_v[options_model_v]" filled type="number" class="q-pt-md" :dense="true"
v-model="value_v[options_model_v].y" @update:model-value="chang(options_model_v, $event, 'v')" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
</div>
<div class="q-pt-md col-2">
<q-btn color="white" @click="reset(options_model_v, true, 'v')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all')+value_v_point_amount+$t('point')" /></div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_v_point_amount + $t('point')" /></div>
</div>
</div>
<div>
<div class="row q-md-py-md" v-show="now_v_h == 'level'">
<div class="col-1"></div>
<div class="col-2 q-px-md"> <q-select class="q-pt-md" :label="$t('level point')"
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('level point')"
@update:model-value="(val) => { chang_point_amount(val, 'h') }" :dense="true" filled
v-model="value_h_point_amount" :options="options_value_h_point_amount" emit-value map-options /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="add_dialog = true;value_point_amount_tmp_h=value_h_point_amount" text-color="black"
<div class="col-2 q-pt-md "><q-btn color="white"
@click="add_dialog = true; value_point_amount_tmp_h = value_h_point_amount" text-color="black"
:label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:disable="value_h_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
<div class="row" v-show="now_v_h == 'level'">
<div class="col-1"></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_h"> <q-select class="q-pt-md" :label="$t('level')"
<div class="col-2 q-md-px-md" @mousewheel="details_selsect_h"> <q-select class="q-pt-md" :label="$t('level')"
@update:model-value="(val) => { options_h = val }" :dense="true" filled v-model="options_model_h"
:options="options_h" emit-value map-options /></div>
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input v-if="value_h[options_model_h]"
filled type="number" class="q-pt-md" :dense="true" v-model="value_h[options_model_h].x"
@update:model-value="chang(options_model_h, $event, 'h')" lazy-rules @click="()=>{url.indexOf('pad')!=-1?ipad_chang=true:''}" :readonly="url.indexOf('pad')!=-1" />
<div class="col-2 q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input
v-if="value_h[options_model_h]" filled type="number" class="q-pt-md" :dense="true"
v-model="value_h[options_model_h].x" @update:model-value="chang(options_model_h, $event, 'h')" lazy-rules
@click="() => { url.indexOf('pad') != -1 ? ipad_chang = true : '' }" :readonly="url.indexOf('pad') != -1" />
</div>
<div class="q-pt-md col-2">
<q-btn color="white" @click="reset(options_model_h, true, 'h')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all')+value_h_point_amount+$t('point')" /></div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_h_point_amount + $t('point')" /></div>
</div>
</div>
</div>
<div v-show="!ispad">
<div class="row">
<div class="col-1"></div>
<div class="col-5">
<q-radio v-model="now_v_h" val="level" :label="$t('level')" />
</div>
<div class="col-5"><q-radio v-model="now_v_h" val="vertical" :label="$t('vertical')" /></div>
</div>
<div>
<div class="row q-md-py-md" v-show="now_v_h == 'vertical'">
<div class="col-1"></div>
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('vertical point')"
@update:model-value="(val) => { chang_point_amount(val, 'v') }" :dense="true" filled
v-model="value_v_point_amount" :options="options_value_v_point_amount" emit-value map-options /></div>
<div class="col-2 q-pt-md "><q-btn color="white"
@click="() => { add_dialog = true; value_point_amount_tmp_v = value_v_point_amount }" text-color="black"
:label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:disable="value_v_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
<div v-show="now_v_h == 'vertical'" style="display: flex;justify-content: space-around;">
<div style="min-width: 100px;" @mousewheel="details_selsect_v"> <q-select class="q-pt-md " :label="$t('vertical')"
@update:model-value="(val) => { options_v = val }" :dense="true" filled v-model="options_model_v"
:options="options_v" emit-value map-options /></div>
<div @mousewheel="details_selsect_val($event, 'v')"> <q-input
v-if="value_v[options_model_v]" filled type="number" class="q-pt-md" :dense="true"
v-model="value_v[options_model_v].y" @update:model-value="chang(options_model_v, $event, 'v')" 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_v, true, 'v')" 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_v_point_amount + $t('point')" /></div>
</div>
</div>
<div>
<div class="row q-md-py-md" v-show="now_v_h == 'level'">
<div class="col-1"></div>
<div class="col-2 q-md-px-md"> <q-select class="q-pt-md" :label="$t('level point')"
@update:model-value="(val) => { chang_point_amount(val, 'h') }" :dense="true" filled
v-model="value_h_point_amount" :options="options_value_h_point_amount" emit-value map-options /></div>
<div class="col-2 q-pt-md "><q-btn color="white"
@click="add_dialog = true; value_point_amount_tmp_h = value_h_point_amount" text-color="black"
:label="$t('add control points')" /></div>
<div class="col-2 q-pt-md "><q-btn color="white" @click="() => { del_dialog = true }"
:disable="value_h_point_amount <= 5" text-color="black" :label="$t('reduce control points')" /></div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall_all" text-color="black"
:label="$t('Reset all program control points')" /></div>
</div>
<div v-show="now_v_h == 'level'" style="display: flex;justify-content: space-around;">
<div style="min-width: 100px;" @mousewheel="details_selsect_h"> <q-select class="q-pt-md" :label="$t('level')"
@update:model-value="(val) => { options_h = val }" :dense="true" filled v-model="options_model_h"
:options="options_h" emit-value map-options /></div>
<div class=" q-px-md" @mousewheel="details_selsect_val($event, 'h')"> <q-input
v-if="value_h[options_model_h]" filled type="number" class="q-pt-md" :dense="true"
v-model="value_h[options_model_h].x" @update:model-value="chang(options_model_h, $event, 'h')" 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-pt-md ">
<q-btn color="white" @click="reset(options_model_h, true, 'h')" text-color="black" :label="$t('reset')" />
</div>
<div class="q-pt-md q-px-md col-5"> <q-btn color="white" @click="resetall" text-color="black"
:label="$t('reset all') + value_h_point_amount + $t('point')" /></div>
</div>
</div>
</div>
<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')" />
</div>
@ -141,21 +240,26 @@
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row">
<div v-if="now_v_h=='vertical'" class="col-10"><q-input filled v-model="value_v_point_amount" min="3" disable type="number"
:label="$t('Please enter the points you need to add')" @update:model-value="(val: any) => { }" />
<div v-if="now_v_h == 'vertical'" class="col-10"><q-input filled v-model="value_v_point_amount" min="3" disable
type="number" :label="$t('Please enter the points you need to add')"
@update:model-value="(val: any) => { }" />
</div>
<div v-else class="col-10"><q-input filled v-model="value_h_point_amount" min="3" disable type="number"
:label="$t('Please enter the points you need to add')" @update:model-value="(val: any) => { }" />
:label="$t('Please enter the points you need to add')" @update:model-value="(val: any) => { }" />
</div>
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↑"
@click="() => {now_v_h=='vertical'?preview_v(Number(value_v_point_amount)+1):preview_h(Number(value_h_point_amount)+1)}" /> </div>
@click="() => { now_v_h == 'vertical' ? preview_v(Number(value_v_point_amount) + 1) : preview_h(Number(value_h_point_amount) + 1) }" />
</div>
<div class="col-1 q-pa-sm"> <q-btn color="white" text-color="black" label="↓"
@click="() => {now_v_h=='vertical'?preview_v(Number(value_v_point_amount)-1):preview_h(Number(value_h_point_amount)-1)}" /></div>
@click="() => { now_v_h == 'vertical' ? preview_v(Number(value_v_point_amount) - 1) : preview_h(Number(value_h_point_amount) - 1) }" />
</div>
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white text-teal">
<q-btn flat :label="$t('Cancel')" @click="()=>{now_v_h=='vertical'?preview_v(value_point_amount_tmp_v):preview_h(value_point_amount_tmp_h)}" color="primary" v-close-popup />
<q-btn flat :label="$t('Cancel')"
@click="() => { now_v_h == 'vertical' ? preview_v(value_point_amount_tmp_v) : preview_h(value_point_amount_tmp_h) }"
color="primary" v-close-popup />
<q-btn flat :label="$t('ok')" @click="add" color="primary" v-close-popup />
</q-card-actions>
</q-card>
@ -165,26 +269,41 @@
<q-dialog v-model="ipad_chang">
<q-card style="width: 40vw; max-width: 80vw;">
<q-card-section>
<div class="text-h6">{{ $t('point') +(now_v_h == 'level'?options_model_h+1:options_model_v+1)}}</div>
<!-- <div class="text-h6">{{ $t('point') +(now_v_h == 'level'?options_model_h+1:options_model_v+1)}}</div> -->
<div class="row">
<div class="col-4" v-show="now_v_h != 'level'">
<q-select class="q-pt-md " :label="$t('vertical')" @update:model-value="(val) => { options_v = val }"
:dense="true" filled v-model="options_model_v" :options="options_v" emit-value map-options />
</div>
<div class="col-4" v-show="now_v_h == 'level'">
<q-select class="q-pt-md" :label="$t('level')" @update:model-value="(val) => { options_h = val }"
:dense="true" filled v-model="options_model_h" :options="options_h" emit-value map-options />
</div>
</div>
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row q-pb-md" v-show="now_v_h != 'level'">
<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 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" v-show="now_v_h == 'level'" 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" v-show="now_v_h == 'level'" text-color="black" icon="keyboard_arrow_right" @touchstart="handlerTouchstart('x','+')" @touchend="handlerTouchend" /></div>
<div class="row">
<div class="col-6" style="text-align: center;"><q-btn color="white" v-show="now_v_h == 'level'"
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" v-show="now_v_h == 'level'"
text-color="black" icon="keyboard_arrow_right" @touchstart="handlerTouchstart('x', '+')"
@touchend="handlerTouchend" /></div>
</div>
<div class="row q-pt-md" v-show="now_v_h != 'level'">
<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 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" v-close-popup />
<q-btn flat :label="$t('close')" color="primary" @click="ipad_chang = false" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<style scoped>
@ -199,6 +318,14 @@
}
</style>
<style>
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
</style>
<script lang="ts">
import {
defineComponent,
@ -240,7 +367,7 @@ export default defineComponent({
/**
* 平板弹窗修改
*/
const ipad_chang=ref(false)
const ipad_chang = ref(false)
/**
* 当前url路径
*/
@ -400,24 +527,24 @@ export default defineComponent({
watch(() => value_v_point_amount, (newval, oldval) => {
setTimeout(() => {
if (now_v_h.value != 'level') {
set?.SetBlendingOption("blending_grids_select_ui", "ver_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_v.value=0
}
if (now_v_h.value != 'level') {
set?.SetBlendingOption("blending_grids_select_ui", "ver_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_v.value = 0
}
save_set_cache()
save_set_cache()
}, 100);
}, { deep: true })
watch(() => value_h_point_amount, (newval, oldval) => {
setTimeout(() => {
if (now_v_h.value == 'level') {
set?.SetBlendingOption("blending_grids_select_ui", "hor_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_h.value=0
}
save_set_cache()
set?.SetBlendingOption("blending_grids_select_ui", "hor_density")
set?.SetBlendingOption("blending_grids_control_point_count", `${newval.value}`)
options_model_h.value = 0
}
save_set_cache()
}, 100);
}, { deep: true })
@ -648,7 +775,7 @@ export default defineComponent({
const resetall_all = () => {
switch (now_v_h.value) {
case 'vertical':
let tmp =value_v_point_amount.value
let tmp = value_v_point_amount.value
for (let key in config.multi_ver_density) {
for (let index = 0; index < config.multi_ver_density[key].length; index++) {
config.multi_ver_density[key][index].x = config.multi_ver_density[key][index].def_x
@ -661,7 +788,7 @@ export default defineComponent({
send_value(-2, 'v', 0);
break;
case 'level':
let tmpp =value_h_point_amount.value
let tmpp = value_h_point_amount.value
for (let key in config.multi_hor_density) {
for (let index = 0; index < config.multi_hor_density[key].length; index++) {
config.multi_hor_density[key][index].x = config.multi_hor_density[key][index].def_x
@ -1017,20 +1144,20 @@ export default defineComponent({
value_v_point.value = []
for (let index = 0; index < val; index++) {
let y = allconfig.projector_height - height * index
let x = width * index
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point: index + 1 };
value_v.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_v_point.value.push(tmp_point)
let y = allconfig.projector_height - height * index
let x = width * index
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point: index + 1 };
value_v.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_v_point.value.push(tmp_point)
}
value_v_point_amount.value = val
@ -1043,92 +1170,190 @@ export default defineComponent({
let height = allconfig.projector_height / (val - 1)
value_h.value = []
value_h_point.value = []
for (let index = 0; index < val; index++) {
let y = allconfig.projector_height - height * index
let x = width * index
let tmp: DensityCorrectionPoint = { x, y, def_x: x, def_y: y, control_point:index + 1 }