Merge branch 'master' of git.code.tencent.com:xian-ncc-da/xian-ncc-da-client
This commit is contained in:
commit
ce017c77ed
22
src/api/PlatformApi.ts
Normal file
22
src/api/PlatformApi.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { api } from 'src/boot/axios';
|
||||||
|
|
||||||
|
const PublishUriBase = '/mock/platform/status/3';
|
||||||
|
|
||||||
|
export function mockApi(data: {
|
||||||
|
emergstop?: boolean;
|
||||||
|
trainberth?: boolean;
|
||||||
|
close?: boolean;
|
||||||
|
upHold?: boolean;
|
||||||
|
downHold?: boolean;
|
||||||
|
upOccHold?: boolean;
|
||||||
|
downOccHold?: boolean;
|
||||||
|
psdOpen?: boolean;
|
||||||
|
psdCut?: boolean;
|
||||||
|
upSkipstop?: boolean;
|
||||||
|
downSkipstop?: boolean;
|
||||||
|
upTrainSkipstop?: boolean;
|
||||||
|
downTrainSkipstop?: boolean;
|
||||||
|
id?: string;
|
||||||
|
}) {
|
||||||
|
return api.post(`${PublishUriBase}`, data);
|
||||||
|
}
|
@ -15,6 +15,7 @@ import {
|
|||||||
JlGraphic,
|
JlGraphic,
|
||||||
} from 'src/jl-graphic';
|
} from 'src/jl-graphic';
|
||||||
import { DisplayObject, FederatedMouseEvent } from 'pixi.js';
|
import { DisplayObject, FederatedMouseEvent } from 'pixi.js';
|
||||||
|
// import { mockApi } from 'src/api/PlatformApi';
|
||||||
|
|
||||||
export class PlatformData extends GraphicDataBase implements IPlatformData {
|
export class PlatformData extends GraphicDataBase implements IPlatformData {
|
||||||
constructor(data?: graphicData.Platform) {
|
constructor(data?: graphicData.Platform) {
|
||||||
@ -296,6 +297,28 @@ export class PlatformOperateInteraction extends GraphicInteractionPlugin<Platfor
|
|||||||
platform.states.upHold = true;
|
platform.states.upHold = true;
|
||||||
platform.states.upOccHold = true;
|
platform.states.upOccHold = true;
|
||||||
platform.doRepaint();
|
platform.doRepaint();
|
||||||
|
// mockApi({
|
||||||
|
// emergstop: false,
|
||||||
|
// trainberth: false,
|
||||||
|
// close: false,
|
||||||
|
// upHold: false,
|
||||||
|
// upOccHold: false,
|
||||||
|
// downOccHold: false,
|
||||||
|
// psdOpen: false,
|
||||||
|
// psdCut: false,
|
||||||
|
// upSkipstop: false,
|
||||||
|
// downSkipstop: false,
|
||||||
|
// upTrainSkipstop: false,
|
||||||
|
// downTrainSkipstop: false,
|
||||||
|
// downHold: true,
|
||||||
|
// id: platform.id,
|
||||||
|
// })
|
||||||
|
// .then((res) => {
|
||||||
|
// console.log(res, '---res--');
|
||||||
|
// })
|
||||||
|
// .catch((err) => {
|
||||||
|
// console.log(err, '---err---');
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
removeHoldrConfig.handler = () => {
|
removeHoldrConfig.handler = () => {
|
||||||
platform.states.upHold = false;
|
platform.states.upHold = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user