This commit is contained in:
joylink_cuiweidong 2022-07-19 14:04:08 +08:00
commit 226f0fd71b
3 changed files with 329 additions and 337 deletions

View File

@ -35,7 +35,7 @@ export default class SignalButton extends Group {
return item.includes('ctc'); return item.includes('ctc');
}); });
const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST']; const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
const typeList = [] const typeList = [];
if (queryCtc && ctcArcList.includes(model.type)) { if (queryCtc && ctcArcList.includes(model.type)) {
this.arcShape = new Arc({ this.arcShape = new Arc({
zlevel: this.zlevel, zlevel: this.zlevel,
@ -52,9 +52,9 @@ export default class SignalButton extends Group {
} }
}); });
this.add(this.arcShape); this.add(this.arcShape);
} else if (this.style.SignalButton } else if (this.style.SignalButton &&
&& this.style.SignalButton.shape === 'roundWithDock' this.style.SignalButton.shape === 'roundWithDock' &&
&& typeList.includes(model.type)) { typeList.includes(model.type)) {
const circle1 = new Circle({ const circle1 = new Circle({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z + 2, z: this.z + 2,
@ -68,7 +68,7 @@ export default class SignalButton extends Group {
lineWidth: 1, lineWidth: 1,
fill: fillColor fill: fillColor
} }
}) });
const circle2 = new Circle({ const circle2 = new Circle({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z + 1, z: this.z + 1,
@ -80,7 +80,7 @@ export default class SignalButton extends Group {
style: { style: {
fill: '#000' fill: '#000'
} }
}) });
const circle3 = new Circle({ const circle3 = new Circle({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
@ -92,16 +92,16 @@ export default class SignalButton extends Group {
style: { style: {
fill: '#eee' fill: '#eee'
} }
}) });
this.arcShape = circle1 this.arcShape = circle1;
this.add(circle1).add(circle2).add(circle3) this.add(circle1).add(circle2).add(circle3);
} else { } else {
this.rectButton = new Rect({ this.rectButton = new Rect({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
shape: { shape: {
x: model.position.x, x: computedPosition.x,
y: model.position.y, y: computedPosition.y,
width: 14, width: 14,
height: 14 height: 14
}, },

View File

@ -42,7 +42,6 @@ export default {
this.initStationListMode(); this.initStationListMode();
}, },
'$store.state.training.simulationUserList': function(val) { '$store.state.training.simulationUserList': function(val) {
console.log('----------11');
this.initData(); this.initData();
}, },
'$store.state.socket.simulationRoleList':function(list) { '$store.state.socket.simulationRoleList':function(list) {

View File

@ -110,7 +110,7 @@
</div> </div>
</template> </template>
<script> <script>
import { setUID } from '@/jmapNew/utils/Uid'; // import { setUID } from '@/jmapNew/utils/Uid';
import { deepAssign } from '@/utils/index'; import { deepAssign } from '@/utils/index';
import { saveAssist } from '@/api/assist'; import { saveAssist } from '@/api/assist';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -160,11 +160,11 @@
}, },
rules: { rules: {
'name':[ 'name':[
{ required: true, message: '请输入名称', trigger: 'blur' }, { required: true, message: '请输入名称', trigger: 'blur' }
], ],
'stationCode':[ 'stationCode':[
{ required: true, message: '请选择关联车站', trigger: 'blur' }, { required: true, message: '请选择关联车站', trigger: 'blur' },
{ required: true, message: '请选择关联车站', trigger: 'change' }, { required: true, message: '请选择关联车站', trigger: 'change' }
], ],
'labelEnum': [ 'labelEnum': [
{ required: true, message: '请选择运行方向', trigger: 'change' } { required: true, message: '请选择运行方向', trigger: 'change' }
@ -181,13 +181,6 @@
], ],
'runStatus': [ 'runStatus': [
{ required: true, message: '请选择默认状态', trigger: 'change' } { required: true, message: '请选择默认状态', trigger: 'change' }
],
'relativeStationCode': [
{ required: true, message: '请选择相对运行车站', trigger: 'blur' },
{ required: true, message: '请选择相对运行车站', trigger: 'change' }
],
'relativeLabelEnum': [
{ required: true, message: '请选择相对运行方向', trigger: 'change' }
] ]
}, },
runModelList: [ runModelList: [