ibp调整
This commit is contained in:
parent
8b05776895
commit
3326f1c917
File diff suppressed because one or more lines are too long
@ -96,7 +96,7 @@ class MouseController extends Eventful {
|
|||||||
mousemove(e) {
|
mousemove(e) {
|
||||||
if (eventTool.notLeftMouse(e) ||
|
if (eventTool.notLeftMouse(e) ||
|
||||||
!this._moveOnMouseMove ||
|
!this._moveOnMouseMove ||
|
||||||
!this._dragging
|
!this._dragging || !this.isAllowDragging
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,6 @@ export default class background extends Group {
|
|||||||
});
|
});
|
||||||
this.add(this.imageBg);
|
this.add(this.imageBg);
|
||||||
}).catch((encodingError) => {
|
}).catch((encodingError) => {
|
||||||
// Do something with the error.
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
import deviceType from './constant/deviceType';
|
||||||
import {createTransform, createBoundingRect} from './utils/parser';
|
import {createTransform, createBoundingRect} from './utils/parser';
|
||||||
|
|
||||||
class TransformHandle {
|
class TransformHandle {
|
||||||
@ -17,7 +17,7 @@ class TransformHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
revisibleView(view) {
|
revisibleView(view) {
|
||||||
if (this.checkVisible(view)) {
|
if (this.checkVisible(view)||view._type === deviceType.Background) {
|
||||||
view.show();
|
view.show();
|
||||||
} else {
|
} else {
|
||||||
view.hide();
|
view.hide();
|
||||||
|
@ -80,13 +80,19 @@ export default {
|
|||||||
this.ibpDestroy();
|
this.ibpDestroy();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show (deviceCode) {
|
show (deviceCode,ibpPart) {
|
||||||
if (!deviceCode) {
|
if (!deviceCode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.getElementById(this.ibpId).oncontextmenu = function (e) {
|
document.getElementById(this.ibpId).oncontextmenu = function (e) {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
let offsetX = 0;
|
||||||
|
if (ibpPart === 'left'){
|
||||||
|
offsetX = 0;
|
||||||
|
}else if (ibpPart === 'right'){
|
||||||
|
offsetX = 1920;
|
||||||
|
}
|
||||||
this.ibpDestroy();
|
this.ibpDestroy();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const data = parser(ibpData[deviceCode], {width: this.canvasWidth, height: this.canvasHeight});
|
const data = parser(ibpData[deviceCode], {width: this.canvasWidth, height: this.canvasHeight});
|
||||||
@ -99,7 +105,7 @@ export default {
|
|||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
scaleRate: 1,
|
scaleRate: 1,
|
||||||
offsetX: 0,
|
offsetX: offsetX,
|
||||||
offsetY: 0
|
offsetY: 0
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -76,7 +76,8 @@ export default {
|
|||||||
simulationShow: false,
|
simulationShow: false,
|
||||||
drivingShow: false,
|
drivingShow: false,
|
||||||
ibpShow: false,
|
ibpShow: false,
|
||||||
panelShow: true
|
panelShow: true,
|
||||||
|
ibpPart: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -279,6 +280,7 @@ export default {
|
|||||||
const res = await getUserRoles(this.group);
|
const res = await getUserRoles(this.group);
|
||||||
this.userRole = res.data.userRole;
|
this.userRole = res.data.userRole;
|
||||||
this.deviceCode = res.data.deviceCode;
|
this.deviceCode = res.data.deviceCode;
|
||||||
|
this.ibpPart = res.data.ibpPart;
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
// 仿真系统
|
// 仿真系统
|
||||||
@ -343,7 +345,7 @@ export default {
|
|||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
this.panelShow = false;
|
this.panelShow = false;
|
||||||
this.ibpShow = true;
|
this.ibpShow = true;
|
||||||
this.$refs.ibpPlate.show(deviceCode);
|
this.$refs.ibpPlate.show(deviceCode,this.ibpPart);
|
||||||
},
|
},
|
||||||
hidepanel() {
|
hidepanel() {
|
||||||
this.panelShow = false;
|
this.panelShow = false;
|
||||||
|
@ -135,22 +135,13 @@
|
|||||||
@click="handleDelUserForStation(nor, index, stationListForIBP, ibpList)"
|
@click="handleDelUserForStation(nor, index, stationListForIBP, ibpList)"
|
||||||
/>
|
/>
|
||||||
<div style="float: right; margin-right: 15px;">
|
<div style="float: right; margin-right: 15px;">
|
||||||
<el-select
|
<el-cascader
|
||||||
v-model="nor.deviceCode"
|
v-model="nor.deviceCode"
|
||||||
:placeholder="$t('global.choose')"
|
size="mini"
|
||||||
size="mini"
|
:placeholder="$t('global.choose')"
|
||||||
:disabled="userId != roomInfo.creatorId"
|
:disabled="userId != roomInfo.creatorId"
|
||||||
@change="handleChangeUser(nor, 'IBP', stationListForIBP, ibpList)"
|
:options="stationListForIBP"
|
||||||
>
|
@change="handleChangeUser(nor, 'IBP', stationListForIBP, ibpList)"></el-cascader>
|
||||||
<el-option
|
|
||||||
v-for="item in stationListForIBP"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
:disabled="item.disabled"
|
|
||||||
style="margin-left: 10px"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -284,6 +275,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
testData: ['Station_203_0.07533','left'],
|
||||||
userId: '',
|
userId: '',
|
||||||
permissionRest: 0,
|
permissionRest: 0,
|
||||||
roomInfo: {
|
roomInfo: {
|
||||||
@ -337,12 +329,7 @@ export default {
|
|||||||
},
|
},
|
||||||
stationListForIBP() {
|
stationListForIBP() {
|
||||||
return this.stationList.map(item => {
|
return this.stationList.map(item => {
|
||||||
const elem = { code: item.code, name: item.name, disabled: false };
|
const elem = { value: item.code, label: item.name, children:[{value: 'left', label: '左'}, {value: 'right', label: '右'}] };
|
||||||
this.ibpList.forEach(nor => {
|
|
||||||
if (elem.code == nor.deviceCode) {
|
|
||||||
elem.disabled = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return elem;
|
return elem;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -416,6 +403,9 @@ export default {
|
|||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.name.indexOf(value) !== -1;
|
return data.name.indexOf(value) !== -1;
|
||||||
},
|
},
|
||||||
|
ibpRoleData(nor) {
|
||||||
|
return [nor.deviceCode,nor.ibpPart]
|
||||||
|
},
|
||||||
async handleRoomInfo(data) {
|
async handleRoomInfo(data) {
|
||||||
const param = {
|
const param = {
|
||||||
creatorId: data.creatorId,
|
creatorId: data.creatorId,
|
||||||
@ -523,6 +513,7 @@ export default {
|
|||||||
this.ibpList.splice(index, 1);
|
this.ibpList.splice(index, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
item.deviceCode = [item.deviceCode,item.ibpPart];
|
||||||
this.ibpList.push(item);
|
this.ibpList.push(item);
|
||||||
break;
|
break;
|
||||||
case 'BigScreen':
|
case 'BigScreen':
|
||||||
@ -625,6 +616,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'IBP':
|
case 'IBP':
|
||||||
item.select = true;
|
item.select = true;
|
||||||
|
item.deviceCode = [item.deviceCode,item.ibpPart]
|
||||||
this.ibpList.push(item);
|
this.ibpList.push(item);
|
||||||
break;
|
break;
|
||||||
case 'BigScreen':
|
case 'BigScreen':
|
||||||
@ -795,17 +787,26 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleChangeUser(val, role, stationList, list) {
|
handleChangeUser(val, role, stationList, list) {
|
||||||
|
let deviceCode = ''
|
||||||
|
if (role === 'IBP'){
|
||||||
|
val.ibpPart = val.deviceCode[1];
|
||||||
|
deviceCode = val.deviceCode[0];
|
||||||
|
}else {
|
||||||
|
val.ibpPart = '';
|
||||||
|
deviceCode = val.deviceCode;
|
||||||
|
}
|
||||||
const params = [{
|
const params = [{
|
||||||
id: val.id,
|
id: val.id,
|
||||||
nickName: val.nickName,
|
nickName: val.nickName,
|
||||||
userRole: role,
|
userRole: role,
|
||||||
deviceCode: val.deviceCode
|
deviceCode: deviceCode,
|
||||||
|
ibpPart: val.ibpPart
|
||||||
}];
|
}];
|
||||||
putUserRoles(params, this.$route.query.group);
|
putUserRoles(params, this.$route.query.group);
|
||||||
stationList.forEach(item => {
|
stationList.forEach(item => {
|
||||||
item.disabled = false;
|
item.disabled = false;
|
||||||
list.forEach(nor => {
|
list.forEach(nor => {
|
||||||
if (item.code == nor.deviceCode) {
|
if (item.code == nor.deviceCode[0]) {
|
||||||
item.disabled = true;
|
item.disabled = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user