Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
eb8f171bdd
@ -39,3 +39,11 @@ export function getCompanyListPaging(params) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 设定公司管理人员 */
|
||||||
|
export function setCompanyManager(companyId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/company/${companyId}/addManager`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -140,17 +140,19 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
|
|||||||
passerTrain.toptrain.position.x = 0;
|
passerTrain.toptrain.position.x = 0;
|
||||||
passerTrain.toptrain.position.y = 0;
|
passerTrain.toptrain.position.y = 0;
|
||||||
passerTrain.toptrain.position.z = 0;
|
passerTrain.toptrain.position.z = 0;
|
||||||
|
|
||||||
// passerTrain.downtrain.position.z = 40;
|
// passerTrain.downtrain.position.z = 40;
|
||||||
getPublishMapDetail(skinCode).then(netdata => {
|
getPublishMapDetail(skinCode).then(netdata => {
|
||||||
scope.switchviews('freeview');
|
scope.switchviews('freeview');
|
||||||
passerHuman.initHumans(scope.modelmanager.man1.mesh,scope.modelmanager.man2.mesh);
|
passerHuman.init(scope.modelmanager.man1.mesh,scope.modelmanager.man2.mesh,scope.modelmanager.seat.mesh);
|
||||||
scene.add(humanlist);
|
scene.add(humanlist);
|
||||||
|
|
||||||
socktest = new TrainConnect(scope,deviceaction,passerTrain.toptrain,routegroup,passerAi);
|
socktest = new TrainConnect(scope,deviceaction,passerTrain.toptrain,routegroup,passerAi);
|
||||||
|
|
||||||
store.dispatch('app/animationsClose');
|
|
||||||
|
|
||||||
let checkobject = setInterval(function(){
|
let checkobject = setInterval(function(){
|
||||||
|
store.dispatch('app/animationsClose');
|
||||||
|
|
||||||
clearInterval(checkobject);
|
clearInterval(checkobject);
|
||||||
//进站控制
|
//进站控制
|
||||||
@ -339,6 +341,7 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
|
|||||||
let trainDataList = getnum(scope.trainList[k].num,6);
|
let trainDataList = getnum(scope.trainList[k].num,6);
|
||||||
// nowTrunk.code = newCode;
|
// nowTrunk.code = newCode;
|
||||||
scope.nowTrunk.numList = trainDataList;
|
scope.nowTrunk.numList = trainDataList;
|
||||||
|
scope.trainList[k].text = k+"(现有乘客"+scope.trainList[k].num+"人)";
|
||||||
updateTrainNum(trainDataList);
|
updateTrainNum(trainDataList);
|
||||||
}
|
}
|
||||||
// i = scope.trainList.length;
|
// i = scope.trainList.length;
|
||||||
|
@ -67,6 +67,14 @@ export function ModelManager(){
|
|||||||
action:null
|
action:null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.seat = {
|
||||||
|
code:null,
|
||||||
|
screenDoorOpenStatus:"01",
|
||||||
|
animations:null,
|
||||||
|
mesh:null,
|
||||||
|
action:null
|
||||||
|
};
|
||||||
|
|
||||||
//读取模型
|
//读取模型
|
||||||
this.loadpromise = function (data,mixers,loadmode){
|
this.loadpromise = function (data,mixers,loadmode){
|
||||||
mode = loadmode;
|
mode = loadmode;
|
||||||
@ -96,6 +104,9 @@ export function ModelManager(){
|
|||||||
if(data[i].type == "cctvSection"){
|
if(data[i].type == "cctvSection"){
|
||||||
initlist.push(fbxpromise(data[i],mixers,scope.section));
|
initlist.push(fbxpromise(data[i],mixers,scope.section));
|
||||||
}
|
}
|
||||||
|
if(data[i].type == "seat"){
|
||||||
|
initlist.push(fbxpromise(data[i],mixers,scope.seat));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//promise按顺序加载
|
//promise按顺序加载
|
||||||
return new Promise(function(resolve, reject){
|
return new Promise(function(resolve, reject){
|
||||||
|
@ -5,14 +5,14 @@ var Staticmodel = [
|
|||||||
name: "人物1",
|
name: "人物1",
|
||||||
deviceType: "man1",
|
deviceType: "man1",
|
||||||
type: "man1",
|
type: "man1",
|
||||||
url: BASE_ASSET_API + "/MODEL/2020-07-16/1-9933.FBX"
|
url: BASE_ASSET_API + "/MODEL/2020-11-30/447-44484.fbx"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
name: "人物2",
|
name: "人物2",
|
||||||
deviceType: "man2",
|
deviceType: "man2",
|
||||||
type: "man2",
|
type: "man2",
|
||||||
url: BASE_ASSET_API + "/MODEL/2020-07-16/2-87850.FBX"
|
url: BASE_ASSET_API + "/MODEL/2020-11-30/448-11525.fbx"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "7",
|
id: "7",
|
||||||
@ -21,6 +21,14 @@ var Staticmodel = [
|
|||||||
type: "cctvTrain",
|
type: "cctvTrain",
|
||||||
url: BASE_ASSET_API + "/MODEL/2020-11-16/48-14909.FBX"
|
url: BASE_ASSET_API + "/MODEL/2020-11-16/48-14909.FBX"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "8",
|
||||||
|
name: "seat",
|
||||||
|
deviceType: "seat",
|
||||||
|
type: "seat",
|
||||||
|
url: JL3D_LOCAL_STATIC + "/trafficplan/seatposition.FBX"
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ export function PasserHuman() {
|
|||||||
let trunkManager = new PasserTrunkManager();
|
let trunkManager = new PasserTrunkManager();
|
||||||
let waitGroup = new THREE.Group();
|
let waitGroup = new THREE.Group();
|
||||||
|
|
||||||
this.nowTrunk = "";
|
this.nowTrunk = 0+'';
|
||||||
|
|
||||||
this.speed = "0";
|
this.speed = "0";
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ export function PasserHuman() {
|
|||||||
let originanima1 = null;
|
let originanima1 = null;
|
||||||
let originanima2 = null;
|
let originanima2 = null;
|
||||||
//初始化人物模型动画
|
//初始化人物模型动画
|
||||||
this.initHumans = function(object1,object2,mixers,deviceaction,scene){
|
this.init = function(object1,object2,seatmesh,mixers,deviceaction,scene){
|
||||||
originhuman1 = object1;
|
originhuman1 = object1;
|
||||||
originhuman1.progress = 1;
|
originhuman1.progress = 1;
|
||||||
// scene.add(originhuman1);
|
// scene.add(originhuman1);
|
||||||
@ -22,38 +22,22 @@ export function PasserHuman() {
|
|||||||
|
|
||||||
let mixer1 = new THREE.AnimationMixer( originhuman1 );
|
let mixer1 = new THREE.AnimationMixer( originhuman1 );
|
||||||
let mixer2 = new THREE.AnimationMixer( originhuman2 );
|
let mixer2 = new THREE.AnimationMixer( originhuman2 );
|
||||||
originanima1 = originhuman1.animations[ 0 ];
|
originanima1 = originhuman1.animations;
|
||||||
originanima2 = originhuman2.animations[ 0 ];
|
originanima2 = originhuman2.animations;
|
||||||
originhuman1.remove(originhuman1.children[2]);
|
originhuman1.remove(originhuman1.children[2]);
|
||||||
|
|
||||||
for(let i=0;i<220;i++){
|
for(let i=0;i<220;i++){
|
||||||
let newhuman;
|
let newhuman;
|
||||||
createHumanModel(newhuman,waitGroup,mixers,new THREE.Vector3(0,0,0));
|
createHumanModel(newhuman,waitGroup,mixers,new THREE.Vector3(0,0,0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(let i=0;i<seatmesh.children.length;i++){
|
||||||
|
seatmesh.children[i].position.x = -seatmesh.children[i].position.x;
|
||||||
|
}
|
||||||
|
trunkManager.initTrunkSeat(seatmesh);
|
||||||
// console.log(waitGroup);
|
// console.log(waitGroup);
|
||||||
}
|
}
|
||||||
//创建新的进站乘客
|
|
||||||
// this.newInHuman= function(humanlist,position){
|
|
||||||
// if(scope.humanWaitIn.length != 0){
|
|
||||||
// let newhuman;
|
|
||||||
// createHumanModel(newhuman,humanlist,position,scope.humanWaitIn[0].stage,scope.humanWaitIn[0].direct,scope.humanWaitIn[0].door);
|
|
||||||
// scope.humanWaitIn.shift();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// //创建新的出站乘客
|
|
||||||
// this.newOutHuman = function(humanlist,position){
|
|
||||||
// if(scope.humanWaitOut.length != 0){
|
|
||||||
// let newhuman;
|
|
||||||
// createHumanModel(newhuman,humanlist,position,scope.humanWaitOut[0].stage,scope.humanWaitOut[0].direct,scope.humanWaitOut[0].door);
|
|
||||||
// scope.humanWaitOut.shift();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//创建新的乘客
|
|
||||||
// this.newHumanCreate = function(humanlist,position,stage,direct,door){
|
|
||||||
// let newhuman;
|
|
||||||
// createHumanModel(newhuman,humanlist,position,stage,direct,door);
|
|
||||||
// }
|
|
||||||
|
|
||||||
function createHumanModel(newhuman,humanlist,mixers,position,stage,direct,door){
|
function createHumanModel(newhuman,humanlist,mixers,position,stage,direct,door){
|
||||||
let mantype = Math.floor(Math.random()*(3-1+1))+1;
|
let mantype = Math.floor(Math.random()*(3-1+1))+1;
|
||||||
@ -61,13 +45,14 @@ export function PasserHuman() {
|
|||||||
if(mantype == 1){
|
if(mantype == 1){
|
||||||
newhuman = THREE.SkeletonUtils.clone( originhuman1 );
|
newhuman = THREE.SkeletonUtils.clone( originhuman1 );
|
||||||
newhuman.animations = [];
|
newhuman.animations = [];
|
||||||
newhuman.animations.push(originanima1.clone());
|
newhuman.animations.push(originanima1[0].clone());
|
||||||
|
newhuman.animations.push(originanima1[1].clone());
|
||||||
}else{
|
}else{
|
||||||
newhuman = THREE.SkeletonUtils.clone( originhuman2 );
|
newhuman = THREE.SkeletonUtils.clone( originhuman2 );
|
||||||
newhuman.animations = [];
|
newhuman.animations = [];
|
||||||
newhuman.animations.push(originanima2.clone());
|
newhuman.animations.push(originanima2[0].clone());
|
||||||
|
newhuman.animations.push(originanima2[1].clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
let mixer = new THREE.AnimationMixer( newhuman );
|
let mixer = new THREE.AnimationMixer( newhuman );
|
||||||
newhuman.position.copy(position);
|
newhuman.position.copy(position);
|
||||||
|
|
||||||
@ -89,8 +74,20 @@ export function PasserHuman() {
|
|||||||
}else{
|
}else{
|
||||||
newhuman.door = null;
|
newhuman.door = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newhuman.seat = null;
|
||||||
newhuman.progress = 1;
|
newhuman.progress = 1;
|
||||||
newhuman.action = mixer.clipAction( newhuman.animations[ 0 ] );
|
for(let i=0;i<2;i++){
|
||||||
|
if(newhuman.animations[i].name == "walk"){
|
||||||
|
newhuman.action = mixer.clipAction( newhuman.animations[ i ] );
|
||||||
|
}
|
||||||
|
if(newhuman.animations[i].name == "SITDOWN"){
|
||||||
|
newhuman.actionDown = mixer.clipAction( newhuman.animations[ i ] );
|
||||||
|
newhuman.actionDown.setLoop(THREE.LoopOnce);
|
||||||
|
newhuman.actionDown.clampWhenFinished = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// newhuman.action = mixer.clipAction( newhuman.animations[ 0 ] );
|
||||||
newhuman.mixer = mixer;
|
newhuman.mixer = mixer;
|
||||||
newhuman.runrail = null;
|
newhuman.runrail = null;
|
||||||
newhuman.speed = 0;
|
newhuman.speed = 0;
|
||||||
@ -108,7 +105,7 @@ export function PasserHuman() {
|
|||||||
// enable当前动画开关
|
// enable当前动画开关
|
||||||
// speed动画速度
|
// speed动画速度
|
||||||
// console.log(curve);
|
// console.log(curve);
|
||||||
|
model.actionDown.stop();
|
||||||
model.action.play();
|
model.action.play();
|
||||||
model.progress = 0;
|
model.progress = 0;
|
||||||
model.runrail = curve;
|
model.runrail = curve;
|
||||||
@ -121,6 +118,10 @@ export function PasserHuman() {
|
|||||||
//更新模型坐标
|
//更新模型坐标
|
||||||
humanlist.children[i].progress = 1;
|
humanlist.children[i].progress = 1;
|
||||||
humanlist.children[i].action.stop();
|
humanlist.children[i].action.stop();
|
||||||
|
if(humanlist.children[i].seat){
|
||||||
|
humanlist.children[i].actionDown.play();
|
||||||
|
}
|
||||||
|
|
||||||
if(humanlist.children[i].status == 1){
|
if(humanlist.children[i].status == 1){
|
||||||
|
|
||||||
|
|
||||||
@ -154,8 +155,13 @@ export function PasserHuman() {
|
|||||||
this.resetPasser = function(humanlist){
|
this.resetPasser = function(humanlist){
|
||||||
let passerlength = humanlist.children.length;
|
let passerlength = humanlist.children.length;
|
||||||
for(let i=0;i<passerlength;i++){
|
for(let i=0;i<passerlength;i++){
|
||||||
|
humanlist.children[0].actionDown.stop();
|
||||||
|
// humanlist.children[0].action.play();
|
||||||
|
// humanlist.children[0].action.stop();
|
||||||
|
humanlist.children[0].seat = null;
|
||||||
waitGroup.add(humanlist.children[0]);
|
waitGroup.add(humanlist.children[0]);
|
||||||
}
|
}
|
||||||
|
trunkManager.reSeats(scope.nowTrunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initTrainRail = function(humanlist,inNum,leaveNum,direct){
|
this.initTrainRail = function(humanlist,inNum,leaveNum,direct){
|
||||||
@ -165,16 +171,6 @@ export function PasserHuman() {
|
|||||||
// console.log(inPasser);
|
// console.log(inPasser);
|
||||||
// console.log(outPasser);
|
// console.log(outPasser);
|
||||||
// let outPassers = inNum[scope.nowTrunk].num;
|
// let outPassers = inNum[scope.nowTrunk].num;
|
||||||
|
|
||||||
for(let i=0;i<inPasser.length;i++){
|
|
||||||
for(let j=0;j<inPasser[i];j++){
|
|
||||||
setTimeout(function(){
|
|
||||||
scope.createInPasser(humanlist,direct);
|
|
||||||
}, Math.random()*1000*i);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let created = 0;
|
let created = 0;
|
||||||
for(let i=0;i<outPasser.length;i++){
|
for(let i=0;i<outPasser.length;i++){
|
||||||
for(let j=0;j<outPasser[i];j++){
|
for(let j=0;j<outPasser[i];j++){
|
||||||
@ -185,16 +181,32 @@ export function PasserHuman() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for(let i=0;i<inPasser.length;i++){
|
||||||
|
for(let j=0;j<inPasser[i];j++){
|
||||||
|
setTimeout(function(){
|
||||||
|
scope.createInPasser(humanlist,direct);
|
||||||
|
}, Math.random()*1000*i);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.createInPasser = function(humanlist,direct){
|
this.createInPasser = function(humanlist,direct){
|
||||||
waitGroup.children[0].progress = 0;
|
waitGroup.children[0].progress = 0;
|
||||||
waitGroup.children[0].status = 0;
|
waitGroup.children[0].status = 0;
|
||||||
|
waitGroup.children[0].actionDown.stop();
|
||||||
waitGroup.children[0].action.play();
|
waitGroup.children[0].action.play();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let points = [];
|
let points = [];
|
||||||
let point1 = trunkManager.getDoorRandomPos(scope.nowTrunk,direct);
|
let point1 = trunkManager.getDoorRandomPos(scope.nowTrunk,direct);
|
||||||
let overpoint = trunkManager.getTrunkRandomPos(scope.nowTrunk);
|
|
||||||
waitGroup.children[0].position.copy(point1);
|
waitGroup.children[0].position.copy(point1);
|
||||||
points.push(point1);
|
points.push(point1);
|
||||||
if(direct == 1){
|
if(direct == 1){
|
||||||
@ -203,7 +215,18 @@ export function PasserHuman() {
|
|||||||
points.push(new THREE.Vector3(point1.x,point1.y,point1.z-0.5));
|
points.push(new THREE.Vector3(point1.x,point1.y,point1.z-0.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
points.push(overpoint);
|
|
||||||
|
let newPos = trunkManager.getSeatRandomPos(scope.nowTrunk);
|
||||||
|
if(newPos){
|
||||||
|
waitGroup.children[0].seat = newPos.seat;
|
||||||
|
points.push(newPos.pos[0]);
|
||||||
|
points.push(newPos.pos[1]);
|
||||||
|
}else{
|
||||||
|
waitGroup.children[0].seat = null;
|
||||||
|
let overpoint = trunkManager.getTrunkRandomPos(scope.nowTrunk);
|
||||||
|
points.push(overpoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let curve = new THREE.CatmullRomCurve3(points);
|
let curve = new THREE.CatmullRomCurve3(points);
|
||||||
@ -217,10 +240,14 @@ export function PasserHuman() {
|
|||||||
|
|
||||||
humanlist.children[created].progress = 0;
|
humanlist.children[created].progress = 0;
|
||||||
humanlist.children[created].status = 1;
|
humanlist.children[created].status = 1;
|
||||||
|
humanlist.children[created].actionDown.stop();
|
||||||
humanlist.children[created].action.play();
|
humanlist.children[created].action.play();
|
||||||
|
|
||||||
let points = [];
|
let points = [];
|
||||||
let point1 = new THREE.Vector3(humanlist.children[created].position.x,humanlist.children[created].position.y,humanlist.children[created].position.z);
|
let point1 = new THREE.Vector3(humanlist.children[created].position.x,humanlist.children[created].position.y,humanlist.children[created].position.z);
|
||||||
|
if(humanlist.children[created].seat){
|
||||||
|
trunkManager.reSeat(scope.nowTrunk,humanlist.children[created].seat)
|
||||||
|
}
|
||||||
|
|
||||||
let overpoint = trunkManager.getDoorRandomPos(scope.nowTrunk,direct);
|
let overpoint = trunkManager.getDoorRandomPos(scope.nowTrunk,direct);
|
||||||
points.push(point1);
|
points.push(point1);
|
||||||
@ -239,22 +266,52 @@ export function PasserHuman() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.setNowTrunkPasser = function(humanlist,num,trunknum){
|
this.setNowTrunkPasser = function(humanlist,num,trunknum){
|
||||||
// let array = getnum(num,6);
|
// let array = getnum(num,6);
|
||||||
// console.log(array);
|
// console.log(array);
|
||||||
|
// console.log(trunknum);
|
||||||
if(num){
|
if(num){
|
||||||
// for(let i=0;i<array.length;i++){
|
// for(let i=0;i<array.length;i++){
|
||||||
for(let j=0;j<num;j++){
|
// console.log(trunkManager.trunk[trunknum].seats);
|
||||||
let pos = trunkManager.getTrunkRandomPos(trunknum);
|
|
||||||
waitGroup.children[0].zone = trunkManager.trunk[trunknum].name;
|
|
||||||
waitGroup.children[0].position.x = pos.x;
|
|
||||||
waitGroup.children[0].position.y = pos.y;
|
|
||||||
waitGroup.children[0].position.z = pos.z;
|
|
||||||
|
|
||||||
if(pos.z<0){
|
for(let j=0;j<num;j++){
|
||||||
waitGroup.children[0].rotation.y = Math.PI;
|
if(j<trunkManager.trunk[trunknum].seats.length){
|
||||||
|
let newPos = trunkManager.getSeatRandomPos(trunknum);
|
||||||
|
|
||||||
|
waitGroup.children[0].seat = newPos.seat;
|
||||||
|
waitGroup.children[0].zone = trunkManager.trunk[trunknum].name;
|
||||||
|
waitGroup.children[0].position.x = newPos.pos[0].x;
|
||||||
|
waitGroup.children[0].position.y = newPos.pos[0].y;
|
||||||
|
|
||||||
|
if(newPos.pos[0].z<0){
|
||||||
|
waitGroup.children[0].position.z = newPos.pos[0].z+0.4;
|
||||||
|
waitGroup.children[0].rotation.y = 0;
|
||||||
|
}else{
|
||||||
|
waitGroup.children[0].position.z = newPos.pos[0].z-0.4;
|
||||||
|
waitGroup.children[0].rotation.y = Math.PI;
|
||||||
|
}
|
||||||
|
// console.log(waitGroup.children[0].actionDown);
|
||||||
|
// waitGroup.children[0].actionDown.play();
|
||||||
|
waitGroup.children[0].action.stop();
|
||||||
|
waitGroup.children[0].actionDown.reset();
|
||||||
|
waitGroup.children[0].actionDown.time = waitGroup.children[0].actionDown._clip.duration;
|
||||||
|
waitGroup.children[0].actionDown.timeScale = 1;
|
||||||
|
waitGroup.children[0].actionDown.play();
|
||||||
}else{
|
}else{
|
||||||
waitGroup.children[0].rotation.y = 0;
|
let pos = trunkManager.getTrunkRandomPos(trunknum);
|
||||||
|
waitGroup.children[0].seat = null;
|
||||||
|
waitGroup.children[0].zone = trunkManager.trunk[trunknum].name;
|
||||||
|
waitGroup.children[0].position.x = pos.x;
|
||||||
|
waitGroup.children[0].position.y = pos.y;
|
||||||
|
waitGroup.children[0].position.z = pos.z;
|
||||||
|
|
||||||
|
if(pos.z<0){
|
||||||
|
waitGroup.children[0].rotation.y = Math.PI;
|
||||||
|
}else{
|
||||||
|
waitGroup.children[0].rotation.y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
humanlist.add(waitGroup.children[0]);
|
humanlist.add(waitGroup.children[0]);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ export function PasserTrunkManager(data) {
|
|||||||
new THREE.Vector3(11.6,1.22,1.6),
|
new THREE.Vector3(11.6,1.22,1.6),
|
||||||
new THREE.Vector3(16,1.22,1.6)
|
new THREE.Vector3(16,1.22,1.6)
|
||||||
],
|
],
|
||||||
|
seats:null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"trunk2",
|
name:"trunk2",
|
||||||
@ -31,6 +32,7 @@ export function PasserTrunkManager(data) {
|
|||||||
new THREE.Vector3(33,1.22,1.6),
|
new THREE.Vector3(33,1.22,1.6),
|
||||||
new THREE.Vector3(37,1.22,1.6),
|
new THREE.Vector3(37,1.22,1.6),
|
||||||
],
|
],
|
||||||
|
seats:null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"trunk3",
|
name:"trunk3",
|
||||||
@ -46,6 +48,7 @@ export function PasserTrunkManager(data) {
|
|||||||
new THREE.Vector3(54,1.22,1.6),
|
new THREE.Vector3(54,1.22,1.6),
|
||||||
new THREE.Vector3(58,1.22,1.6)
|
new THREE.Vector3(58,1.22,1.6)
|
||||||
],
|
],
|
||||||
|
seats:null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"trunk4",
|
name:"trunk4",
|
||||||
@ -61,6 +64,7 @@ export function PasserTrunkManager(data) {
|
|||||||
new THREE.Vector3(75,1.22,1.6),
|
new THREE.Vector3(75,1.22,1.6),
|
||||||
new THREE.Vector3(79,1.22,1.6)
|
new THREE.Vector3(79,1.22,1.6)
|
||||||
],
|
],
|
||||||
|
seats:null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"trunk5",
|
name:"trunk5",
|
||||||
@ -76,6 +80,7 @@ export function PasserTrunkManager(data) {
|
|||||||
new THREE.Vector3(97,1.22,1.6),
|
new THREE.Vector3(97,1.22,1.6),
|
||||||
new THREE.Vector3(101,1.22,1.6)
|
new THREE.Vector3(101,1.22,1.6)
|
||||||
],
|
],
|
||||||
|
seats:null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"trunk6",
|
name:"trunk6",
|
||||||
@ -91,9 +96,28 @@ export function PasserTrunkManager(data) {
|
|||||||
new THREE.Vector3(118.5,1.22,1.6),
|
new THREE.Vector3(118.5,1.22,1.6),
|
||||||
new THREE.Vector3(122.5,1.22,1.6),
|
new THREE.Vector3(122.5,1.22,1.6),
|
||||||
],
|
],
|
||||||
|
seats:null,
|
||||||
}
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
this.initTrunkSeat = function(seatModel){
|
||||||
|
for(let i=0;i<seatModel.children.length;i++){
|
||||||
|
seatModel.children[i].position.x = -seatModel.children[i].position.x;
|
||||||
|
for(let j=0;j<seatModel.children[i].children.length;j++){
|
||||||
|
seatModel.children[i].children[j].isDown = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scope.trunk[0].seats = seatModel.getObjectByName("C6").children;
|
||||||
|
scope.trunk[1].seats = seatModel.getObjectByName("C5").children;
|
||||||
|
scope.trunk[2].seats = seatModel.getObjectByName("C4").children;
|
||||||
|
scope.trunk[3].seats = seatModel.getObjectByName("C3").children;
|
||||||
|
scope.trunk[4].seats = seatModel.getObjectByName("C2").children;
|
||||||
|
scope.trunk[5].seats = seatModel.getObjectByName("C1").children;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var rand = (min,max) => Math.round(Math.random()*(max-min))+min;
|
var rand = (min,max) => Math.round(Math.random()*(max-min))+min;
|
||||||
|
|
||||||
this.getDoorRandomPos = function(trunkNum,direct){
|
this.getDoorRandomPos = function(trunkNum,direct){
|
||||||
@ -108,15 +132,55 @@ export function PasserTrunkManager(data) {
|
|||||||
return newPos;
|
return newPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.getSeatRandomPos = function(index){
|
||||||
|
|
||||||
|
for(let i=0;i<scope.trunk[index].seats.length;i++){
|
||||||
|
if(scope.trunk[index].seats[i].isDown == false){
|
||||||
|
scope.trunk[index].seats[i].isDown = true;
|
||||||
|
|
||||||
|
let seatWorldPosition = scope.trunk[index].seats[i].getWorldPosition();
|
||||||
|
let offset = scope.trunk[index].position.x;
|
||||||
|
let newPos = {
|
||||||
|
pos:[new THREE.Vector3(-seatWorldPosition.x+offset,1.22,seatWorldPosition.y)],
|
||||||
|
seat:i,
|
||||||
|
};
|
||||||
|
if(seatWorldPosition.y<0){
|
||||||
|
newPos.pos.push(new THREE.Vector3(-seatWorldPosition.x+offset,1.22,seatWorldPosition.y+0.4));
|
||||||
|
}else{
|
||||||
|
newPos.pos.push(new THREE.Vector3(-seatWorldPosition.x+offset,1.22,seatWorldPosition.y-0.4));
|
||||||
|
}
|
||||||
|
return newPos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
this.getTrunkRandomPos = function(index){
|
this.getTrunkRandomPos = function(index){
|
||||||
let newPos = new THREE.Vector3(
|
let newPos = new THREE.Vector3(
|
||||||
scope.trunk[index].position.x+RandomNum(-11,11),
|
scope.trunk[index].position.x+RandomNum(-11,11),
|
||||||
1.22,
|
1.22,
|
||||||
scope.trunk[index].position.z+RandomNum(-1.28,1.28));
|
scope.trunk[index].position.z+RandomNum(-1,1));
|
||||||
|
|
||||||
return newPos;
|
return newPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.reSeat = function(index,seat){
|
||||||
|
scope.trunk[index].seats[seat].isDown = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.reSeats = function(index){
|
||||||
|
for (let i=0;i<scope.trunk.length;i++){
|
||||||
|
for(let j=0;j<scope.trunk[i].seats.length;j++){
|
||||||
|
scope.trunk[i].seats[j].isDown = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function RandomNum(Min, Max) {
|
function RandomNum(Min, Max) {
|
||||||
var Range = Max - Min;
|
var Range = Max - Min;
|
||||||
var Rand = Math.random();
|
var Rand = Math.random();
|
||||||
|
@ -7,7 +7,7 @@ const runPlan = {
|
|||||||
editData: {}, // 运行图编辑数据
|
editData: {}, // 运行图编辑数据
|
||||||
planSizeCount: 0, // 运行图canvas 大小变更标识
|
planSizeCount: 0, // 运行图canvas 大小变更标识
|
||||||
planLoadedCount: 0, // 运行图数据更新
|
planLoadedCount: 0, // 运行图数据更新
|
||||||
planUpdateCount: 0, // 运行图更新标识
|
// planUpdateCount: 0, // 运行图更新标识
|
||||||
selected: {}, // 选择的对象
|
selected: {}, // 选择的对象
|
||||||
width: 800, // 运行图canvas 容器 宽度
|
width: 800, // 运行图canvas 容器 宽度
|
||||||
height: 600, // 运行图canvas 容器 高度
|
height: 600, // 运行图canvas 容器 高度
|
||||||
|
@ -20,6 +20,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
companyList: [],
|
companyList: [],
|
||||||
|
companyMap: {},
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
@ -78,11 +79,14 @@ export default {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// title: '创建人',
|
title: '单位',
|
||||||
// prop: 'createUserName',
|
prop: 'companyId',
|
||||||
// width: '100'
|
width: '100',
|
||||||
// },
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.getCompanyName(row.companyId); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: '操 作',
|
title: '操 作',
|
||||||
@ -108,7 +112,7 @@ export default {
|
|||||||
actions: [
|
actions: [
|
||||||
{ text: '添 加', handler: this.doCreate },
|
{ text: '添 加', handler: this.doCreate },
|
||||||
{ text: '导 入', fileType: 'file', handler: this.importQuestionBank },
|
{ text: '导 入', fileType: 'file', handler: this.importQuestionBank },
|
||||||
{ text: '出题规则管理', handler: this.questionsRuleManage},
|
{ text: '试卷规则管理', handler: this.questionsRuleManage},
|
||||||
{ text: '模板导出', handler: this.exportTemplate}
|
{ text: '模板导出', handler: this.exportTemplate}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -124,6 +128,7 @@ export default {
|
|||||||
getCompanyList().then(resp => {
|
getCompanyList().then(resp => {
|
||||||
resp.data.forEach(item => {
|
resp.data.forEach(item => {
|
||||||
this.queryForm.queryObject.companyId.config.data.push({ value: item.id, label: item.name });
|
this.queryForm.queryObject.companyId.config.data.push({ value: item.id, label: item.name });
|
||||||
|
this.companyMap[item.id] = item.name;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -131,7 +136,9 @@ export default {
|
|||||||
doCreate() {
|
doCreate() {
|
||||||
this.$router.push({path: `${UrlConfig.bank.questionCreate}`});
|
this.$router.push({path: `${UrlConfig.bank.questionCreate}`});
|
||||||
},
|
},
|
||||||
|
getCompanyName(companyId) {
|
||||||
|
return this.companyMap[companyId];
|
||||||
|
},
|
||||||
edit(index, row) {
|
edit(index, row) {
|
||||||
this.$router.push({path: `${UrlConfig.bank.questionUpdate}/${row.id}`});
|
this.$router.push({path: `${UrlConfig.bank.questionUpdate}/${row.id}`});
|
||||||
},
|
},
|
||||||
@ -267,6 +274,7 @@ export default {
|
|||||||
param.optionList.push({content:dataList[option4Index][index], correct: dataList[answerIndex][index].includes('D')});
|
param.optionList.push({content:dataList[option4Index][index], correct: dataList[answerIndex][index].includes('D')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
param.id = questionList.length;
|
||||||
questionList.push(param);
|
questionList.push(param);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -277,11 +285,6 @@ export default {
|
|||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
that.$message.error('导入题库失败!');
|
that.$message.error('导入题库失败!');
|
||||||
});
|
});
|
||||||
// importQuestionBand(questionList, 'DRTS').then(resp => {
|
|
||||||
// this.$message.success('导入题库成功!');
|
|
||||||
// }).catch(()=>{
|
|
||||||
// this.$message.error('导入题库失败!');
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (that.rABS) {
|
if (that.rABS) {
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-loading="loading"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="doSave"
|
@click="doSave"
|
||||||
@ -75,7 +76,6 @@
|
|||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
import { importQuestionBand } from '@/api/race';
|
import { importQuestionBand } from '@/api/race';
|
||||||
import { getCompanyList } from '@/api/company';
|
import { getCompanyList } from '@/api/company';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -83,7 +83,8 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
companyId: '',
|
companyId: '',
|
||||||
companyList: []
|
companyList: [],
|
||||||
|
loading: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -96,6 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.handlePreDataPaging();
|
this.handlePreDataPaging();
|
||||||
|
this.loading = false;
|
||||||
getCompanyList().then(resp => {
|
getCompanyList().then(resp => {
|
||||||
this.companyList = resp.data;
|
this.companyList = resp.data;
|
||||||
});
|
});
|
||||||
@ -166,12 +168,45 @@ export default {
|
|||||||
this.handlePreDataPaging();
|
this.handlePreDataPaging();
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
|
this.loading = true;
|
||||||
|
let selectNum = 0;
|
||||||
|
let judgeNum = 0;
|
||||||
|
let multiNum = 0;
|
||||||
|
let fillNum = 0;
|
||||||
|
let answerNum = 0;
|
||||||
|
this.$store.state.race.preTheoryData.forEach(item => {
|
||||||
|
switch (item.type) {
|
||||||
|
case 'select':
|
||||||
|
selectNum++;
|
||||||
|
break;
|
||||||
|
case 'judge':
|
||||||
|
judgeNum++;
|
||||||
|
break;
|
||||||
|
case 'multi':
|
||||||
|
multiNum++;
|
||||||
|
break;
|
||||||
|
case 'fill':
|
||||||
|
fillNum++;
|
||||||
|
break;
|
||||||
|
case 'answer':
|
||||||
|
answerNum++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
importQuestionBand(this.$store.state.race.preTheoryData, this.companyId).then(resp => {
|
importQuestionBand(this.$store.state.race.preTheoryData, this.companyId).then(resp => {
|
||||||
this.$store.dispatch('race/setPreTheoryData', []);
|
this.$store.dispatch('race/setPreTheoryData', []);
|
||||||
this.$message.success('导入题库成功!');
|
// this.$message.success('导入题库成功!');
|
||||||
|
|
||||||
|
this.$alert(`<strong>本次导入:</strong><br><strong>${judgeNum}道判断题;</strong><br><strong>${selectNum}道选择题;</strong><br><strong>${multiNum}道多选题;</strong><br>`, '导入题库成功!', {
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
type: 'success',
|
||||||
|
center: true
|
||||||
|
});
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
|
this.loading = false;
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.$message.error('导入题库失败!');
|
this.$message.error('导入题库失败!');
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doCancel() {
|
doCancel() {
|
||||||
|
@ -162,8 +162,6 @@ export default {
|
|||||||
this.examList = response.data.userExamQuestionsVOs;
|
this.examList = response.data.userExamQuestionsVOs;
|
||||||
this.userExam = response.data;
|
this.userExam = response.data;
|
||||||
const list = response.data.userExamQuestionsVOs;
|
const list = response.data.userExamQuestionsVOs;
|
||||||
await this.$store.dispatch('exam/setUsedTime', this.userExam.usedTime);
|
|
||||||
await this.$store.dispatch('exam/setTotalTime', this.userExam.duration);
|
|
||||||
await this.$store.dispatch('trainingList/setTrainingList', list);
|
await this.$store.dispatch('trainingList/setTrainingList', list);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 判断是否有考试权限,如果没有权限则跳到购买页面,否则报错
|
// 判断是否有考试权限,如果没有权限则跳到购买页面,否则报错
|
||||||
|
@ -117,6 +117,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
initCode:null,
|
initCode:null,
|
||||||
|
nowCode:null,
|
||||||
isActive:0,
|
isActive:0,
|
||||||
beforeUnloadTime:'',
|
beforeUnloadTime:'',
|
||||||
gapTime:'',
|
gapTime:'',
|
||||||
@ -190,7 +191,7 @@ export default {
|
|||||||
unloadHandler(){
|
unloadHandler(){
|
||||||
this.gapTime=new Date().getTime()-this.beforeUnloadTime;
|
this.gapTime=new Date().getTime()-this.beforeUnloadTime;
|
||||||
//判断是窗口关闭还是刷新
|
//判断是窗口关闭还是刷新
|
||||||
alert("netdata");
|
// alert("netdata");
|
||||||
if(this.gapTime<=5){
|
if(this.gapTime<=5){
|
||||||
deletePassenger(this.$route.query.group,this.initCode).then(netdata => {
|
deletePassenger(this.$route.query.group,this.initCode).then(netdata => {
|
||||||
alert(netdata);
|
alert(netdata);
|
||||||
@ -199,7 +200,8 @@ export default {
|
|||||||
},
|
},
|
||||||
init: function (code) {
|
init: function (code) {
|
||||||
// let mapdata = this.$store.state.socket.device;
|
// let mapdata = this.$store.state.socket.device;
|
||||||
this.value = code;
|
this.nowCode = code;
|
||||||
|
this.value = this.nowCode;
|
||||||
const dom = document.getElementById('jl3d');
|
const dom = document.getElementById('jl3d');
|
||||||
this.jl3d = new Jl3dTrafficTrain(dom, this.$route.query.mapid, this.$route.query.group, 'normal',code);
|
this.jl3d = new Jl3dTrafficTrain(dom, this.$route.query.mapid, this.$route.query.group, 'normal',code);
|
||||||
},
|
},
|
||||||
@ -211,17 +213,7 @@ export default {
|
|||||||
updateValue(newcode){
|
updateValue(newcode){
|
||||||
this.value = newcode;
|
this.value = newcode;
|
||||||
},
|
},
|
||||||
switchrender() {
|
|
||||||
if (this.renderswitch == true) {
|
|
||||||
this.rendermode = '退出监控';
|
|
||||||
this.renderswitch = false;
|
|
||||||
this.jl3d.switchviews('freeview');
|
|
||||||
} else {
|
|
||||||
this.rendermode = '监控视角';
|
|
||||||
this.renderswitch = true;
|
|
||||||
this.jl3d.switchviews('4views');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// updateTrainCode(codeData){
|
// updateTrainCode(codeData){
|
||||||
// this.jl3d.updateNowTrainCode(codeData);
|
// this.jl3d.updateNowTrainCode(codeData);
|
||||||
// },
|
// },
|
||||||
@ -242,15 +234,13 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateTrainCode(selVal) {
|
updateTrainCode(selVal) {
|
||||||
// console.log(selVal);
|
// this.jl3d.changeTrain(selVal);
|
||||||
// this.jl3d.changeTrain(selVal);
|
this.isActive=0;
|
||||||
this.isActive=0;
|
this.jl3d.updateNowTrainCode(selVal);
|
||||||
this.jl3d.updateNowTrainCode(selVal);
|
this.jl3d.switchcamera(0+'');
|
||||||
this.jl3d.switchcamera(0+'');
|
this.value = selVal;
|
||||||
|
// let oldgroupnum = this.groupnum;
|
||||||
|
// this.value = selVal;
|
||||||
// let oldgroupnum = this.groupnum;
|
|
||||||
// this.value = selVal;
|
|
||||||
},
|
},
|
||||||
updateTrainNum(dataList){
|
updateTrainNum(dataList){
|
||||||
this.takelist = dataList;
|
this.takelist = dataList;
|
||||||
@ -258,7 +248,7 @@ export default {
|
|||||||
for(let i = 0;i<this.takelist.length;i++){
|
for(let i = 0;i<this.takelist.length;i++){
|
||||||
this.allPassers = this.allPassers + this.takelist[i].num;
|
this.allPassers = this.allPassers + this.takelist[i].num;
|
||||||
}
|
}
|
||||||
|
this.value = this.nowCode+"(现有乘客"+this.allPassers+"人)";
|
||||||
},
|
},
|
||||||
getnum(num,pnum){
|
getnum(num,pnum){
|
||||||
let re = [];
|
let re = [];
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="text-align: center;width: 100%;height: 50px;line-height: 50px;font-size: 18px;color: #ccc;">
|
<div v-else class="empty-text">
|
||||||
<span>暂无留言</span>
|
<span>暂无留言</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%;text-align: center;">
|
<div style="width: 100%;text-align: center;">
|
||||||
@ -80,7 +80,7 @@
|
|||||||
<el-button @click="handleClear">清空</el-button>
|
<el-button @click="handleClear">清空</el-button>
|
||||||
<el-button type="danger" @click="commitComment">留言</el-button>
|
<el-button type="danger" @click="commitComment">留言</el-button>
|
||||||
</span>
|
</span>
|
||||||
<el-button size="mini" type="danger" style="position: fixed; right: 100px;top: 80px;width: 90px;" @click="goSlide">我要留言</el-button>
|
<el-button size="mini" type="danger" style="position: fixed; left: 91%;top: 80px;width: 90px;" @click="goSlide">我要留言</el-button>
|
||||||
<div v-show="imgShow" style="position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;" @click="handelCloseImg">
|
<div v-show="imgShow" style="position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;" @click="handelCloseImg">
|
||||||
<img id="targetImg" src="" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;">
|
<img id="targetImg" src="" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;">
|
||||||
</div>
|
</div>
|
||||||
@ -100,7 +100,6 @@ export default {
|
|||||||
name: 'MessageBoard',
|
name: 'MessageBoard',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// dialogVisible: false,
|
|
||||||
content: '',
|
content: '',
|
||||||
postCommentList: [],
|
postCommentList: [],
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@ -201,7 +200,7 @@ export default {
|
|||||||
},
|
},
|
||||||
avatarUrl(val) {
|
avatarUrl(val) {
|
||||||
if (val && val.creatorAvatarPath) {
|
if (val && val.creatorAvatarPath) {
|
||||||
return 'https://joylink.club/oss/joylink' + val.creatorAvatarPath;
|
return process.env.VUE_APP_VOICE_API + val.creatorAvatarPath;
|
||||||
} else {
|
} else {
|
||||||
return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';
|
return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';
|
||||||
}
|
}
|
||||||
@ -355,6 +354,14 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
.empty-text{
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
.head_portrait{
|
.head_portrait{
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
@ -246,22 +246,6 @@ export default {
|
|||||||
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
|
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
|
||||||
);
|
);
|
||||||
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries];
|
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries];
|
||||||
// let index = 0;
|
|
||||||
// this.stations.forEach((station, ii) => {
|
|
||||||
// if (station.visible) {
|
|
||||||
// index++;
|
|
||||||
// series.push({
|
|
||||||
// type: 'bar',
|
|
||||||
// barGap: '-100%',
|
|
||||||
// yAxisIndex: index,
|
|
||||||
// barWidth: '3000%',
|
|
||||||
// itemStyle: {
|
|
||||||
// color: 'red'
|
|
||||||
// },
|
|
||||||
// data: [[29030, 50], [29060, 60], [29090, 20], [29120, 60], [29150, 80], [29180, 160], [29210, 50], [29240, 80], [29270, 30]]
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
this.myChart && this.myChart.setOption({series: series});
|
this.myChart && this.myChart.setOption({series: series});
|
||||||
},
|
},
|
||||||
async loadChartPage() {
|
async loadChartPage() {
|
||||||
@ -402,23 +386,6 @@ export default {
|
|||||||
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
||||||
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
|
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
|
||||||
option.series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
option.series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
||||||
// let index = 0;
|
|
||||||
// this.stations.forEach((station, ii) => {
|
|
||||||
// if (station.visible) {
|
|
||||||
// index++;
|
|
||||||
// option.series.push({
|
|
||||||
// type: 'bar',
|
|
||||||
// barGap: '-100%',
|
|
||||||
// yAxisIndex: index,
|
|
||||||
// barWidth: '3000%',
|
|
||||||
// itemStyle: {
|
|
||||||
// color: 'red'
|
|
||||||
// },
|
|
||||||
// data: [[29030, 50], [29060, 60], [29090, 20], [29120, 60], [29150, 80], [29180, 160], [29210, 50], [29240, 80], [29270, 30]]
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||||
if (this.myChart) {
|
if (this.myChart) {
|
||||||
this.myChart.setOption(option);
|
this.myChart.setOption(option);
|
||||||
@ -438,9 +405,6 @@ export default {
|
|||||||
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
||||||
},
|
},
|
||||||
xAxisLableFormat(value, index) {
|
xAxisLableFormat(value, index) {
|
||||||
// if (value % 60 === 0) {
|
|
||||||
// return timeFormat(value);
|
|
||||||
// }
|
|
||||||
return timeFormat(value);
|
return timeFormat(value);
|
||||||
},
|
},
|
||||||
yAxisLableFormat(value, index) {
|
yAxisLableFormat(value, index) {
|
||||||
@ -467,18 +431,6 @@ export default {
|
|||||||
if (Object.keys(this.PlanConvert).length) {
|
if (Object.keys(this.PlanConvert).length) {
|
||||||
option.yAxis[0].min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
option.yAxis[0].min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||||
option.yAxis[0].max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
option.yAxis[0].max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||||
// let index = 1;
|
|
||||||
// this.stations.forEach((station, ii) => {
|
|
||||||
// if (station.visible) {
|
|
||||||
// option.yAxis.push({
|
|
||||||
// type: 'value',
|
|
||||||
// min: Math.floor(option.yAxis[0].min - this.PlanConvert.getYaxisValueByStation(station, ii)),
|
|
||||||
// max: Math.floor(option.yAxis[0].max - this.PlanConvert.getYaxisValueByStation(station, ii)),
|
|
||||||
// show: false,
|
|
||||||
// yAxisIndex : index++
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisTooltip(param) {
|
axisTooltip(param) {
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { querySechedulingNew, generateSchedulingNew, saveSchedulingNew, generateSchedulingAgain } from '@/api/scheduling';
|
import { querySechedulingNew, generateSchedulingNew, saveSchedulingNew } from '@/api/scheduling';
|
||||||
import { hexColor } from '@/utils/runPlan';
|
import { hexColor } from '@/utils/runPlan';
|
||||||
import EditTable from '@/views/components/editTable/index';
|
import EditTable from '@/views/components/editTable/index';
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-dialog v-dialogDrag title="场景列表" :visible.sync="dialogVisible" width="920px" center>
|
<el-dialog v-dialogDrag title="场景列表" :visible.sync="dialogVisible" width="920px" center>
|
||||||
<el-tabs v-model="activeName" type="card" style="height:650px">
|
<el-tabs v-model="activeName" type="card" style="height:650px">
|
||||||
<!-- style="height: 500px;" -->
|
|
||||||
<el-tab-pane label="主场景列表" name="first">
|
<el-tab-pane label="主场景列表" name="first">
|
||||||
<el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="600" stripe :cell-style="{padding: '8px 0'}">
|
<el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="600" stripe :cell-style="{padding: '8px 0'}">
|
||||||
<el-table-column type="index" width="50" label="序号" />
|
<el-table-column type="index" width="50" label="序号" />
|
||||||
@ -17,34 +16,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="说明" width="240">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div v-if="scope.row.result">
|
|
||||||
<template v-for="(each,index) in scope.row.result">
|
|
||||||
<el-button :key="index" type="primary" size="small" @click="handleExplain(each)">{{ each.name }}</el-button>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="副场景列表" name="second">
|
|
||||||
<el-table :data="deputySceneData" border stripe>
|
|
||||||
<el-table-column type="index" width="50" label="序号" />
|
|
||||||
<el-table-column prop="scene" width="550" label="场景" />
|
|
||||||
<el-table-column label="操作">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button v-if="scope.row.id" type="text" size="small" @click="handleLoad(scope.row)">方案一</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-tab-pane> -->
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// import { ScriptMode } from '@/scripts/ConstDic';
|
|
||||||
import { getDraftScriptByGroupNew } from '@/api/script';
|
import { getDraftScriptByGroupNew } from '@/api/script';
|
||||||
import {loadCompetitionPracticalScene, getCompetitionPracticalScene} from '@/api/competition';
|
import {loadCompetitionPracticalScene, getCompetitionPracticalScene} from '@/api/competition';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
@ -64,7 +42,6 @@ export default {
|
|||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
memberList: [],
|
memberList: [],
|
||||||
selectMapLineCode:'',
|
selectMapLineCode:'',
|
||||||
// operationType: '',
|
|
||||||
mainSceneData: [
|
mainSceneData: [
|
||||||
{type: '车辆故障', scene: '列车救援', result:[]},
|
{type: '车辆故障', scene: '列车救援', result:[]},
|
||||||
{type: '信号系统故障', scene: '道岔故障', result:[]},
|
{type: '信号系统故障', scene: '道岔故障', result:[]},
|
||||||
@ -79,14 +56,6 @@ export default {
|
|||||||
{type: '轨道故障', scene: '计轴故障', result:[]}
|
{type: '轨道故障', scene: '计轴故障', result:[]}
|
||||||
// {type: '在区域控制器故障', scene: '线路故障多车降级', result:[]}
|
// {type: '在区域控制器故障', scene: '线路故障多车降级', result:[]}
|
||||||
]
|
]
|
||||||
// deputySceneData: [
|
|
||||||
// { scene: '列车在站停车超时' },
|
|
||||||
// { scene: '列车无移动授权(站间区间或车站)' },
|
|
||||||
// { scene: '信号机故障(防护、分界点、出站等)' },
|
|
||||||
// { scene: '站台门关不上(单个或多个)' },
|
|
||||||
// { scene: '客流激增行车处置' },
|
|
||||||
// { scene: '路网协调请求(限流、换乘站通过)' }
|
|
||||||
// ]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -116,18 +85,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// if (process.env.NODE_ENV ==;= 'development' || process.env.NODE_ENV === 'test') {
|
|
||||||
// this.mainSceneData = [
|
|
||||||
// {type: '车辆故障', scene: '列车救援'},
|
|
||||||
// {type: '信号系统故障', scene: '道岔故障', id: '12'},
|
|
||||||
// {type: '信号系统故障', scene: '区域控制器故障'},
|
|
||||||
// {type: '信号系统故障', scene: '联锁故障'},
|
|
||||||
// {type: '供电系统故障', scene: '接触轨(网)断电'},
|
|
||||||
// {type: '供电系统故障', scene: '车站照明熄灭影响乘降'},
|
|
||||||
// {type: '车站机电设备故障', scene: '站台门故障'},
|
|
||||||
// {type: '轨道故障', scene: '线路故障影响列车运行'}
|
|
||||||
// ];
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
doShow(param) {
|
doShow(param) {
|
||||||
@ -235,8 +192,6 @@ export default {
|
|||||||
window.open(href, '_blank');
|
window.open(href, '_blank');
|
||||||
},
|
},
|
||||||
confirm(playerList) {
|
confirm(playerList) {
|
||||||
// this.$store.dispatch('training/setScriptOperationType', this.operationType);
|
|
||||||
// operationType:ScriptMode[this.operationType]
|
|
||||||
this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation});
|
this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation});
|
||||||
this.doClose();
|
this.doClose();
|
||||||
},
|
},
|
||||||
|
@ -110,7 +110,6 @@ export default {
|
|||||||
completed:false, // 竞赛是否已完成
|
completed:false, // 竞赛是否已完成
|
||||||
fullScore:'', // 总分
|
fullScore:'', // 总分
|
||||||
userScore:'', // 用户得分
|
userScore:'', // 用户得分
|
||||||
// actionList:[], // 动作列表
|
|
||||||
fullScoreOfCommand:0, // 指令发布部分总分
|
fullScoreOfCommand:0, // 指令发布部分总分
|
||||||
userScoreOfCommand:0, // 关键步骤部分用户得分
|
userScoreOfCommand:0, // 关键步骤部分用户得分
|
||||||
fullScoreOfOperationStatistic:0, // 运营统计满分
|
fullScoreOfOperationStatistic:0, // 运营统计满分
|
||||||
@ -128,7 +127,6 @@ export default {
|
|||||||
this.finalStopInSectionStatistics = data.operationIndexStatisticVO.finalStopInSectionStatistics;
|
this.finalStopInSectionStatistics = data.operationIndexStatisticVO.finalStopInSectionStatistics;
|
||||||
this.finalStoppedRunningStatistics = data.operationIndexStatisticVO.finalStoppedRunningStatistics;
|
this.finalStoppedRunningStatistics = data.operationIndexStatisticVO.finalStoppedRunningStatistics;
|
||||||
this.commandPublishStatisticVO = data.commandPublishStatisticVO;
|
this.commandPublishStatisticVO = data.commandPublishStatisticVO;
|
||||||
// this.actionList = actionList;
|
|
||||||
this.fullScore = data.fullScore;
|
this.fullScore = data.fullScore;
|
||||||
this.userScore = data.userScore;
|
this.userScore = data.userScore;
|
||||||
this.fullScoreOfCommand = data.fullScoreOfCommand;
|
this.fullScoreOfCommand = data.fullScoreOfCommand;
|
||||||
|
@ -75,7 +75,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.map.mapViewLoadedCount': function() {
|
'$store.state.map.mapViewLoadedCount': function() {
|
||||||
this.$store.dispatch('exam/countUsedTime');
|
// this.$store.dispatch('exam/countUsedTime');
|
||||||
this.locateDeviceCode && this.$store.dispatch('exam/setCenter', this.locateDeviceCode); // 设置考题对象居中
|
this.locateDeviceCode && this.$store.dispatch('exam/setCenter', this.locateDeviceCode); // 设置考题对象居中
|
||||||
},
|
},
|
||||||
$route() {
|
$route() {
|
||||||
@ -90,7 +90,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// mounted() {
|
// mounted() {
|
||||||
// this.initData();
|
// this.initDate();
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
tipInfo(opt) {
|
tipInfo(opt) {
|
||||||
|
@ -148,6 +148,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
this.$store.dispatch('exam/stopCountTime');
|
||||||
this.clearScanCommit();
|
this.clearScanCommit();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<edit-company ref="editCompany" @reloadTable="reloadTable" />
|
<edit-company ref="editCompany" @reloadTable="reloadTable" />
|
||||||
|
<company-manager ref="companyManager" />
|
||||||
<qr-code ref="qrCode" />
|
<qr-code ref="qrCode" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -10,11 +11,13 @@
|
|||||||
import { getCompanyListPaging, deleteCompany } from '@/api/company';
|
import { getCompanyListPaging, deleteCompany } from '@/api/company';
|
||||||
import EditCompany from './add';
|
import EditCompany from './add';
|
||||||
import QrCode from '@/components/QrCode';
|
import QrCode from '@/components/QrCode';
|
||||||
|
import CompanyManager from './manager';
|
||||||
export default {
|
export default {
|
||||||
name: 'CompanyManage',
|
name: 'CompanyManage',
|
||||||
components: {
|
components: {
|
||||||
EditCompany,
|
EditCompany,
|
||||||
QrCode
|
QrCode,
|
||||||
|
CompanyManager
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -45,15 +48,23 @@ export default {
|
|||||||
title: '单位地址',
|
title: '单位地址',
|
||||||
prop: 'address'
|
prop: 'address'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '单位管理人员',
|
||||||
|
prop: ''
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '250',
|
width: '370',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('global.edit'),
|
name: this.$t('global.edit'),
|
||||||
handleClick: this.handleUpdate
|
handleClick: this.handleUpdate
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '绑定管理人员',
|
||||||
|
handleClick: this.setManager
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: '生成二维码',
|
name: '生成二维码',
|
||||||
handleClick: this.handleGenerateQrCode
|
handleClick: this.handleGenerateQrCode
|
||||||
@ -89,6 +100,9 @@ export default {
|
|||||||
handleUpdate(index, row) {
|
handleUpdate(index, row) {
|
||||||
this.$refs.editCompany.doShow(row);
|
this.$refs.editCompany.doShow(row);
|
||||||
},
|
},
|
||||||
|
setManager(index, row) {
|
||||||
|
this.$refs.companyManager.doShow(row.id);
|
||||||
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
},
|
},
|
||||||
|
136
src/views/system/companyManage/manager.vue
Normal file
136
src/views/system/companyManage/manager.vue
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="绑定单位管理人员"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
width="80%"
|
||||||
|
:before-close="handleClose"
|
||||||
|
>
|
||||||
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getUserList } from '@/api/management/user';
|
||||||
|
import { getCompanyList, setCompanyManager } from '@/api/company';
|
||||||
|
export default {
|
||||||
|
name: 'Manager',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
companyId: '',
|
||||||
|
companyMap: {},
|
||||||
|
pagerConfig: {
|
||||||
|
pageSize: 'pageSize',
|
||||||
|
pageIndex: 'pageNum'
|
||||||
|
},
|
||||||
|
queryForm: {
|
||||||
|
labelWidth: '80px',
|
||||||
|
reset: true,
|
||||||
|
queryObject: {
|
||||||
|
name: {
|
||||||
|
type: 'text',
|
||||||
|
label: this.$t('system.name')
|
||||||
|
},
|
||||||
|
roles: {
|
||||||
|
type: 'select',
|
||||||
|
label: this.$t('system.roles'),
|
||||||
|
config: {
|
||||||
|
data: this.$ConstSelect.roleList
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
queryList: {
|
||||||
|
query: getUserList,
|
||||||
|
beforeQuery: this.addParams,
|
||||||
|
onSelectionChange: this.handleSelectionChange,
|
||||||
|
selectAllClick: this.selectAllClick,
|
||||||
|
selectCheckShow: true,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: this.$t('system.name'),
|
||||||
|
prop: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('system.nickname'),
|
||||||
|
prop: 'nickname'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('global.mobile'),
|
||||||
|
prop: 'mobile'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('global.email'),
|
||||||
|
prop: 'email'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '单位',
|
||||||
|
prop: 'companyId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.getCompanyName(row.companyId); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('system.roles'),
|
||||||
|
prop: 'roles',
|
||||||
|
type: 'tagMore',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.companyMap = {};
|
||||||
|
getCompanyList().then(resp => {
|
||||||
|
if (resp && resp.data && resp.data.length) {
|
||||||
|
resp.data.forEach(item => {
|
||||||
|
this.companyMap[item.id] = item.name;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(companyId) {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.companyId = companyId;
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.companyId = '';
|
||||||
|
},
|
||||||
|
getCompanyName(companyId) {
|
||||||
|
return this.companyMap[companyId];
|
||||||
|
},
|
||||||
|
reloadTable() {
|
||||||
|
this.queryList.reload();
|
||||||
|
},
|
||||||
|
addParams(params) {
|
||||||
|
params.companyId = this.companyId;
|
||||||
|
return params;
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
},
|
||||||
|
selectAllClick(val) {
|
||||||
|
const userIds = [];
|
||||||
|
val && val.forEach(item => {
|
||||||
|
userIds.push(item.id);
|
||||||
|
});
|
||||||
|
setCompanyManager(this.companyId, userIds).then(resp => {
|
||||||
|
this.$message.success('绑定单位管理员成功!');
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error('绑定单位管理员失败!');
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -10,23 +10,26 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { putRoles } from '@/api/management/user';
|
import { putRoles } from '@/api/management/user';
|
||||||
import { getCompanyList } from '@/api/company';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DictionaryEdit',
|
name: 'DictionaryEdit',
|
||||||
|
props: {
|
||||||
|
companyList: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
// nickname: '',
|
|
||||||
// mobile: '',
|
|
||||||
// email: '',
|
|
||||||
companyId: '',
|
companyId: '',
|
||||||
roles: []
|
roles: []
|
||||||
},
|
}
|
||||||
companyList: []
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -35,9 +38,6 @@ export default {
|
|||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
|
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
|
||||||
// { prop: 'nickname', label: '昵称', type: 'text' },
|
|
||||||
// { prop: 'mobile', label: '电话', type: 'number' },
|
|
||||||
// { prop: 'email', label: '邮箱', type: 'text' },
|
|
||||||
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true },
|
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true },
|
||||||
{ prop: 'companyId', label: '单位', type: 'select', options: this.companyList, clearable: true }
|
{ prop: 'companyId', label: '单位', type: 'select', options: this.companyList, clearable: true }
|
||||||
]
|
]
|
||||||
@ -53,23 +53,11 @@ export default {
|
|||||||
roles: [
|
roles: [
|
||||||
{ required: true, message: this.$t('rules.pleaseSelectPermission'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectPermission'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
// nickname: [
|
|
||||||
// { required: true, message: this.$t('rules.pleaseInputNickName'), trigger: 'blur' },
|
|
||||||
// { min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
|
||||||
// ],
|
|
||||||
// mobile: [
|
|
||||||
// { required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'blur' }
|
|
||||||
// ]
|
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
getCompanyList().then(resp => {
|
|
||||||
resp.data.forEach(item => {
|
|
||||||
this.companyList.push({label: item.name, value: parseInt(item.id)});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(data) {
|
doShow(data) {
|
||||||
@ -78,9 +66,6 @@ export default {
|
|||||||
this.formModel = {
|
this.formModel = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
// nickname: data.nickname,
|
|
||||||
// mobile: data.mobile,
|
|
||||||
// email: data.email,
|
|
||||||
companyId: data.companyId,
|
companyId: data.companyId,
|
||||||
roles: data.roles
|
roles: data.roles
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<dictionary-edit ref="edit" @reloadTable="reloadTable" />
|
<dictionary-edit ref="edit" :company-list="companyList" @reloadTable="reloadTable" />
|
||||||
<correlation-map ref="correlationMap" />
|
<correlation-map ref="correlationMap" />
|
||||||
<create-user ref="createUser" />
|
<create-user ref="createUser" />
|
||||||
</div>
|
</div>
|
||||||
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getUserList } from '@/api/management/user';
|
import { getUserList } from '@/api/management/user';
|
||||||
|
import { getCompanyList } from '@/api/company';
|
||||||
import DictionaryEdit from './edit';
|
import DictionaryEdit from './edit';
|
||||||
import CorrelationMap from './correlationMap';
|
import CorrelationMap from './correlationMap';
|
||||||
import CreateUser from './createUser';
|
import CreateUser from './createUser';
|
||||||
@ -26,6 +27,8 @@ export default {
|
|||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
|
companyMap: {},
|
||||||
|
companyList: [],
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '80px',
|
||||||
reset: true,
|
reset: true,
|
||||||
@ -65,6 +68,13 @@ export default {
|
|||||||
title: this.$t('global.email'),
|
title: this.$t('global.email'),
|
||||||
prop: 'email'
|
prop: 'email'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '单位',
|
||||||
|
prop: 'companyId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.getCompanyName(row.companyId); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.roles'),
|
title: this.$t('system.roles'),
|
||||||
prop: 'roles',
|
prop: 'roles',
|
||||||
@ -98,6 +108,18 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.companyMap = {};
|
||||||
|
this.companyList = [];
|
||||||
|
getCompanyList().then(resp => {
|
||||||
|
if (resp && resp.data && resp.data.length) {
|
||||||
|
resp.data.forEach(item => {
|
||||||
|
this.companyMap[item.id] = item.name;
|
||||||
|
this.companyList.push({label: item.name, value: parseInt(item.id)});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 编辑
|
// 编辑
|
||||||
@ -105,29 +127,13 @@ export default {
|
|||||||
this.$refs.edit.doShow(row);
|
this.$refs.edit.doShow(row);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除
|
|
||||||
handleUserDelete(index, row) {
|
|
||||||
this.$confirm(this.$t('system.wellDelType'), this.$t('global.tips'), {
|
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
// delPublishMap(row.id).then(response => {
|
|
||||||
// this.$message.success('删除成功')
|
|
||||||
// this.reloadTable()
|
|
||||||
// localStore.remove('mapId')
|
|
||||||
// }).catch(error => {
|
|
||||||
// this.reloadTable()
|
|
||||||
// this.$messageBox('删除失败')
|
|
||||||
// })
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 关联地图
|
// 关联地图
|
||||||
handleMapCorrelation(index, row) {
|
handleMapCorrelation(index, row) {
|
||||||
this.$refs.correlationMap.doShow(row);
|
this.$refs.correlationMap.doShow(row);
|
||||||
},
|
},
|
||||||
|
getCompanyName(companyId) {
|
||||||
|
return this.companyMap[companyId];
|
||||||
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
},
|
},
|
||||||
|
BIN
static/trafficplan/seatposition.FBX
Normal file
BIN
static/trafficplan/seatposition.FBX
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user