Commit a5c9f778 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop' of http://172.16.10.76/station/amos-convertor-view into develop

# Conflicts: # src/routes/view.js # src/view/planMgmt/view/pubview/StageActuator.js
parents 7244a98b 8fb9a894
......@@ -31,6 +31,18 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon fasicon">&#xe60a;</span>
<div class="name">任务列表</div>
<div class="code-name">&amp;#xe60a;</div>
</li>
<li class="dib">
<span class="icon fasicon">&#xe609;</span>
<div class="name">文本预案</div>
<div class="code-name">&amp;#xe609;</div>
</li>
<li class="dib">
<span class="icon fasicon">&#xe608;</span>
<div class="name">排烟线</div>
<div class="code-name">&amp;#xe608;</div>
......@@ -1167,6 +1179,24 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon fasicon fasicon-renwuliebiao"></span>
<div class="name">
任务列表
</div>
<div class="code-name">.fasicon-renwuliebiao
</div>
</li>
<li class="dib">
<span class="icon fasicon fasicon-jiuyuanjiagou"></span>
<div class="name">
文本预案
</div>
<div class="code-name">.fasicon-jiuyuanjiagou
</div>
</li>
<li class="dib">
<span class="icon fasicon fasicon-paiyanxian"></span>
<div class="name">
排烟线
......@@ -2826,6 +2856,22 @@
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#fasicon-renwuliebiao"></use>
</svg>
<div class="name">任务列表</div>
<div class="code-name">#fasicon-renwuliebiao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#fasicon-jiuyuanjiagou"></use>
</svg>
<div class="name">文本预案</div>
<div class="code-name">#fasicon-jiuyuanjiagou</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#fasicon-paiyanxian"></use>
</svg>
<div class="name">排烟线</div>
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,20 @@
"description": "",
"glyphs": [
{
"icon_id": "13937674",
"name": "任务列表",
"font_class": "renwuliebiao",
"unicode": "e60a",
"unicode_decimal": 58890
},
{
"icon_id": "13937625",
"name": "文本预案",
"font_class": "jiuyuanjiagou",
"unicode": "e609",
"unicode_decimal": 58889
},
{
"icon_id": "13719442",
"name": "排烟线",
"font_class": "paiyanxian",
......
......@@ -20,6 +20,12 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="renwuliebiao" unicode="&#58890;" d="M594.1248 22.784H483.9936V742.7584a52.5312 52.5312 0 0 0 55.04 50.7904 55.4496 55.4496 0 0 0 55.04-50.8416v-719.9232zM191.744 382.7712h559.0528a38.4512 38.4512 0 0 1 29.6448 12.6976l80.4864 93.184a33.2288 33.2288 0 0 1 0 46.592l-80.4864 88.9344a38.4512 38.4512 0 0 1-29.6448 12.6976H191.744a37.3248 37.3248 0 0 1-38.0928-33.8944V420.864a37.9392 37.9392 0 0 1 38.0928-38.0928M742.8096 344.6784L297.984 272.2304a60.2112 60.2112 0 0 1-25.6-8.448l-58.112-58.9312c-8.448-8.448-8.448-16.9472 4.2496-21.1968l71.9872-38.144a53.7088 53.7088 0 0 1 25.6-4.2496l452.4544 75.008c16.9472 4.2496 21.504 15.36 19.7632 33.536l-11.1616 71.424c0 20.48-17.5616 27.5968-34.5088 23.3472" horiz-adv-x="1024" />
<glyph glyph-name="jiuyuanjiagou" unicode="&#58889;" d="M719.4624 54.016h-414.72a102.4 102.4 0 1 0-121.7024 122.88V591.1552A102.4 102.4 0 1 0 305.152 712.0896h413.8496a102.4 102.4 0 1 0 121.344-121.0368v-414.0544a102.4 102.4 0 1 0-120.8832-122.88z m1.536 51.5072a102.4 102.4 0 0 0 70.5024 69.8368V592.5888a102.4 102.4 0 0 0-70.5024 69.8368H303.1552a102.4 102.4 0 0 0-72.96-70.5024v-415.9488a102.4 102.4 0 0 0 72.96-70.5024zM481.7408 264.4992V492.8H372.5824v-60.928H312.8832V543.2832H712.0384v-111.616H652.288V492.8h-108.544v-228.2496h47.9232V204.8H432.3328v59.7504h49.3568z" horiz-adv-x="1024" />
<glyph glyph-name="paiyanxian" unicode="&#58888;" d="M491.78279488 427.59837603h-137.49844541a51.85686299 51.85686299 0 0 1 0-103.71372601h168.70909098a51.85686299 51.85686299 0 1 1 0 103.71372601zM338.73265322 111.36267688999999h-52.92939376a108.27198177 108.27198177 0 1 1 0-103.71372599h52.92939376a51.85686299 51.85686299 0 0 1 0 103.71372599zM641.29358499 111.41630341999996h-143.34373814a51.85686299 51.85686299 0 0 1 0-103.71372597h143.34373814a51.85686299 51.85686299 0 1 1 0 103.71372597zM823.62381682 291.65510023a51.85686299 51.85686299 0 0 1 34.48186442 90.62885052 172.30206908 172.30206908 0 0 1-126.9876438 45.31442528h-57.80940881a51.85686299 51.85686299 0 1 1 0-103.71372601h57.80940881a70.73340464 70.73340464 0 0 0 58.07754147-19.09104779 51.48147723 51.48147723 0 0 1 34.42823791-13.138502zM887.43939793 247.09144651999998a52.33950186 52.33950186 0 0 1-53.62653875-50.30169337c-1.17978384-39.79089175-21.02160321-57.70215572-57.00501072-75.07715428a51.85686299 51.85686299 0 1 1 44.99266604-93.4710571 181.36495412 181.36495412 0 0 1 115.67244412 165.3842456 51.80323646 51.80323646 0 0 1-50.03356069 53.46565915zM547.92978096 640.12034917h172.83833449c1.34066346 0 2.62770038 0.2681327 3.96836386 0.37538577v-123.34103915l208.28547659 174.66163678-208.28547659 174.7152633v-123.34103916c-1.34066346 0-2.62770038 0.4290123-3.96836386 0.4290123H547.92978096a51.85686299 51.85686299 0 1 1 0-103.71372598zM250.73150309 626.87459411a52.07136915 52.07136915 0 0 1 22.46951976 5.36265388 59.84721727 59.84721727 0 0 0 34.4282379 8.09760735h101.89042366a51.85686299 51.85686299 0 1 1 0 103.71372598h-101.89042366a159.64620592 159.64620592 0 0 1-79.36727739-18.34027626 51.85686299 51.85686299 0 0 1 22.52314628-98.61920481zM167.98575378 377.02854997a51.85686299 51.85686299 0 0 1 68.96372887 77.43672199 106.34142639 106.34142639 0 0 0-35.60802176 79.42090392 28.74382478 28.74382478 0 0 0 1.12615731 13.51388777 51.85686299 51.85686299 0 0 1-100.49613368 25.47260592 119.37267531 119.37267531 0 0 1-4.34374963-38.98649369 210.10877893 210.10877893 0 0 1 70.35801889-156.85762591z" horiz-adv-x="1024" />
......
......@@ -30,17 +30,18 @@
}
.text-plan-root {
width: calc(100% - 168px);
width: calc(100% - 230px);
height: 100%;
padding-top: 40px;
margin-left: 168px;
margin-left: 230px;
}
}
}
.publish-view-side {
width: 168px;
width: 230px;
right: 0px;
.planDrill {
.amos-tree-node-content-wrapper {
......@@ -74,6 +75,31 @@
border-radius: 10px;
}
.plan-tree-planDrill{
position: absolute !important;
background-color: rgba(0, 0, 0, 0.6);
color: white;
overflow: auto;
top: 82px !important;
right: 0px !important;
left:calc(100% - 230px) !important;
bottom: 32px;
.amos-tree-title{
padding-left: 2px;
}
}
.plan-tree-textPlan{
position: absolute !important;
background-color: rgb(255, 255, 255);
overflow: auto;
top: 82px !important;
bottom: 0px;
border-right: 1px solid rgb(234, 234, 234);
left: 0px !important;
}
.text-button {
i {
padding: 4px 6px;
......
......@@ -254,7 +254,8 @@ $play-control-bg: rgba(0,0,0,0.8);
}
.tip-control-panel {
position: absolute !important;
bottom: 50px !important;
top: 100px !important;
left: 15px !important;
width: 206px;
height: 245px;
font-size: 12px;
......@@ -326,12 +327,12 @@ $play-control-bg: rgba(0,0,0,0.8);
}
}
}
.task-open{
right: 250px !important;
}
.task-close{
right: 20px !important;
}
// .task-open{
// right: 250px !important;
// }
// .task-close{
// right: 20px !important;
// }
.zimu-control-panel{
width: 60%;
left: 20%;
......
......@@ -79,6 +79,10 @@
width: calc(100% - 36px) !important;
float: left !important;
.amos-collapse{
border-radius: 0px;
}
.board-tasktab-all{
color: white;
background:rgba(0,0,0,0.5);
......@@ -186,57 +190,61 @@
background: rgba(0,0,0,0.8);
height: 30px;
padding: 0;
border-bottom: 1px solid #605f5f;
border-bottom: none;
.amos-modal-title{
color: white;
line-height: 30px;
padding-left: 9px;
padding-left: 15px;
font-size: 13px;
}
}
.amos-modal-content{
padding: 0;
background: rgba(0,0,0,0.6);
background: rgba(0,0,0,0.7);
.board-actuator-modal-row{
display: flex;
height: 45px;
background: rgba(0,0,0,0);
.colTitle {
float: left;
font-weight: bold;
padding-top: 7px;
padding-top: 10px;
height: 40px;
padding-left: 8px;
padding-left: 30px;
box-sizing: border-box;
flex: 1;
width: 40%;
}
.colValue {
float: left;
padding-top: 7px;
padding-top: 10px;
height: 40px;
padding-left: 8px;
flex: 1;
border-left: 1px solid #605f5f;
width: 60%;
border-bottom: 1px solid rgba(0,0,0,0.1);
}
}
.board-actuator-popupContent{
padding: 1em;
padding: 1.5em;
text-align: center;
}
}
.amos-modal-footer{
border-top: 1px solid #605f5f;
background: rgba(0,0,0,0.6);
border: none;
background: rgba(0,0,0,0.7);
text-align: center;
padding: 5px;
padding: 0px 0px 10px 0px;
.amos-btn{
height: 25px;
background-color: rgba(0,0,0,0);
border: 1px solid white;
height: 30px;
background-color: rgba(0,0,0,0.4);
padding: 0 2.5em;
border: none;
}
}
}
......
.plan-view {
height: 100%;
width: calc(100% - 168px);
width: calc(100% - 230px);
display: flex;
left: 168px;
left: 230px;
position: relative;
top: 40px;
......
......@@ -161,7 +161,7 @@ class RiskSourceModel extends Component {
<FormItem label={<span>参考编号</span>} field="code" {...formItemLayout}>
<Input disabled={disabled} className="risk-model-input" required value={form.code} onChange={e => this.onSelectChange('code', e.target.value)} />
</FormItem>
{ (form.riskLevelId !== 0) &&
{ (form.riskLevelId !== 0 && isEdit) &&
<FormItem label={<span>风险等级</span>} field="riskLevelId" {...formItemLayout}>
<span style={{ lineHeight: '32px' }}>{this.getriskLevel(riskLevelData, form.riskLevelId)}</span>
</FormItem>
......
......@@ -2,8 +2,8 @@ export const headerButton = [
// { key: 'back', text: '返回', icon: 'fanhui' },
{ key: 'onOff', text: '显示窗', icon: 'yuan1' },
{ key: 'planDrill', text: '预案演练', icon: 'yuan1' },
{ key: 'textPlan', text: '文字预案', icon: 'yuan-shuxing' },
{ key: 'taskList', text: '任务列表', icon: 'renwu' },
{ key: 'textPlan', text: '文字预案', icon: 'jiuyuanjiagou' },
{ key: 'taskList', text: '任务列表', icon: 'renwuliebiao' },
];
export const pageUrl = {
......
......@@ -4,12 +4,11 @@ import { browserHistory } from 'amos-react-router';
import _amosTool from 'amos-tool';
import SysConsts from 'amos-processor/lib/config/consts';
import formatUrl from 'amos-processor/lib/utils/urlFormat';
import { Modal,AmosAlert } from 'amos-framework';
import { Modal,AmosAlert,message } from 'amos-framework';
import 'amos-iot-webstudio/lib/styles';// 独立使用,需要引入样式
import { pageUrl } from './../common/conf';
import Upload from './../common/upload';
import { FasSerUrl } from '../../../consts/urlConsts';
import { PubSub } from 'ray-eventpool';
import { eventTopics } from './../../3dview/consts';
const ls = _amosTool.Store.lsTool;
......@@ -20,7 +19,7 @@ const uploadUrl = FasSerUrl.uploadTextPlan;
// 额外的操作,系统默认的操作有 edit、publish、cancelpub、see、copy、delete,禁止重复
const extraMenus = [
{ key: 'preview', text: '预览', icon: 'eye' },
{ key: 'textImport', text: '文字预案', icon: 'user' },
{ key: 'textImport', text: '文字预案', icon: 'totop1' },
{ key: 'leaderStruct', text: '领导架构', icon: 'user' }
];
......@@ -40,13 +39,18 @@ class CusVizLib extends Component {
}
onItemClick = (itemKey, data) => {
if (itemKey === 'preview') {
let path = {
pathname: pageUrl.planDrill,
state: { appId: data.id,isPublish: !!data.publishState }
};
ls.write(eventTopics.plan_drill_appId,data.id)
browserHistory.push(path);
// if(data.publishState == 1){
let path = {
pathname: pageUrl.planDrill,
state: { appId: data.id,isPublish: !!data.publishState }
};
ls.write(eventTopics.plan_drill_appId,data.id)
browserHistory.push(path);
// }else{
// message.danger('预案未发布!!!');
// }
}
if (itemKey === 'textImport') {
this.setState({ appId: data.id, visible: true });
......
import React , { Component } from 'react';
import _amosTool from 'amos-tool';
/**
* 模型库
*
* @class ModelManage
* @extends {Component}
*/
class ModelManage extends Component {
constructor(props){
super(props);
this.state = {
};
}
render() {
return (
<div style={{height:'100%'}}>
模型库
</div>
);
}
}
export default ModelManage;
......@@ -114,12 +114,13 @@ class PlanTreeView extends Component {
getTreeIcon = (props) => {
let { type } = props;
let { activeKey } = this.props;
if (type === 'treeNode') {
return <BizIcon icon="shu-changqu" /> ;
return <BizIcon icon="shu-changqu" color={ activeKey === 'planDrill' ? '#ffffff' : '#345FA6'}/> ;
} else if (type === 'listNode') {
return <BizIcon icon="shu-zhukonglou" /> ;
return <BizIcon icon="shu-zhukonglou" color={ activeKey === 'planDrill' ? '#ffffff' : '#345FA6'}/> ;
} else if (type === 'textNode') {
return <BizIcon icon="yuan-shuxing" />;
return <BizIcon icon="yuan-shuxing" color={ activeKey === 'planDrill' ? '#ffffff' : '#345FA6'}/>;
} else {
return '';
}
......
......@@ -17,13 +17,14 @@ const ls = _amosTool.Store.lsTool;
const sidePaneStyle = {
planDrill: {
left: 0,
right: 0,
top: 82,
bottom: 32,
left: 'calc(100% - 230px)',
style: {
backgroundColor: 'rgba(0,0,0,0.6)',
color: 'white',
overflow: 'auto'
overflow: 'auto',
}
},
textPlan: {
......@@ -119,7 +120,11 @@ class PublishView extends Component {
pathname: pageUrl.planDrill,
state: { ...params }
};
this.setState({ activeKey,visible: true });
if(this.state.taskTabsShow) {
this.state.taskTabsShow = false;
PubSub.publish(eventTopics.plan_task_list,this.state.taskTabsShow);
}
this.setState({ activeKey,visible: true, taskTabsShow: this.state.taskTabsShow });
browserHistory.push($path);
break;
case 'textPlan':
......@@ -134,11 +139,16 @@ class PublishView extends Component {
browserHistory.push(pageUrl.back);
break;
case 'onOff':
this.setState({ visible: !this.state.visible });
if(this.state.taskTabsShow) {
this.state.taskTabsShow = false;
PubSub.publish(eventTopics.plan_task_list,this.state.taskTabsShow);
}
this.setState({ visible: !this.state.visible, taskTabsShow: this.state.taskTabsShow });
break;
case 'taskList': //任务列表
if(this.state.visible) this.state.visible = false;
PubSub.publish(eventTopics.plan_task_list,!this.state.taskTabsShow);
this.setState({ taskTabsShow: !this.state.taskTabsShow });
this.setState({ visible: this.state.visible, taskTabsShow: !this.state.taskTabsShow });
break;
default:
break;
......@@ -148,7 +158,11 @@ class PublishView extends Component {
renderButton = (activeKey)=>{
if (activeKey === 'textPlan') {
return headerButton.filter(item=>item.key !== 'onOff').map(e=>{
return headerButton.filter(item=>{
if(item.key !== 'onOff' && item.key !== 'taskList'){
return item;
}
}).map(e=>{
return <TextButton key={e.key} {...e} onClick={()=>this.handleChange(e.key)} />;
});
} else {
......@@ -283,12 +297,13 @@ class PublishView extends Component {
{this.renderButton(activeKey)}
</div>
<SidePane
className='publish-view-side'
animateName="fade-left"
// className={`publish-view-side plan-tree-${activeKey}`}
className={`publish-view-side plan-tree-${activeKey}`}
animateName="fade"
animateProps={animateProps}
animateDelay={animateDelay}
visible={visible}
{...sidePaneStyle[activeKey]}
// {...sidePaneStyle[activeKey]}
>
{activeKey && this.getSidePaneContent(activeKey)}
</SidePane>
......
......@@ -4,7 +4,6 @@ import { deepCopy } from 'amos-tool';
import A3DDesigner, { r3d, Connect, DESIGNER_CONSTS,EVENT_CONSTS } from 'amos-3d/lib/designer';
import { A3DUtil } from 'amos-3d/lib/threeTools';
import WorkerObjContent from 'amos-3d/lib/worker/WorkerObjContent';
import { ObjAnchorHelper } from 'base-r3d/lib/plugins';
import { BaseObjHelper } from 'base-r3d/lib/factory';
import { ELEMENT_TYPE } from 'amos-iot-3dgraph/lib/view/pubview/../design/conf';
import { imageStyles } from 'amos-iot-3dgraph/lib/view/settingpanel/scenery/conf';
......@@ -68,7 +67,6 @@ class StageActuator extends Component {
componentWillUnmount() {
r3d.off(ANIMATION_CONSTS.ANIMATION_FRAME_CHANGE, this.onAnimationChange);
this.objAnchorHelper && this.objAnchorHelper.destroy();
}
onAnimationChange = (animate) => {
......@@ -79,7 +77,6 @@ class StageActuator extends Component {
if(animate.showPopup){
this.a3dRef && this.a3dRef.changePlayState('pause');
// setTimeout( e => {
this.setState({
modal: true,
modalContent: animate.popupContent,
......@@ -87,7 +84,6 @@ class StageActuator extends Component {
ativeAnimate: animate.animateKey,
playing: false
});
// }, animate.animateParams.duration );
}else{
if(animate.showVoiceBroadcast){
this.text2Speech(animate.description);
......@@ -192,13 +188,11 @@ class StageActuator extends Component {
const { animations } = this.props;
let anim = animations[animateIndex];
if(anim.showPopup){
// setTimeout(e => {
this.setState({
modal: true,
modalContent: animations[animateIndex].popupContent,
currentIndex: animateIndex
})
// }, anim.animateParams.duration );
this.setState({
modal: true,
modalContent: animations[animateIndex].popupContent,
currentIndex: animateIndex
});
}
this.a3dRef && this.a3dRef.playAnimation(animateIndex);
}
......@@ -222,7 +216,6 @@ class StageActuator extends Component {
/**停止动画 */
playStop = () => {
// this.a3dRef.changePlayState('stop');
this.a3dRef && this.a3dRef.changePlayState('pause');
this.setState({ playing: false })
}
......@@ -264,6 +257,32 @@ class StageActuator extends Component {
// if (evt.object && evt.object._boh){
// evt.object._boh.style.color = 0xff00ff;
// }
=======
//单击
this.r3d.on('click', (evt) => {
console.log('click');
if (evt.object && evt.object.type === 'Mesh') {
const realObj = evt.object.parent;
const userData = realObj.userData;
if(userData && userData.dataConfig && userData.dataConfig.dataDetailUrl){
fetch(userData.dataConfig.dataDetailUrl)
.then(response => response.json())
.then(data => this.setState({ modelModal: true , detailData: data.dataList}));
}
if(userData.bubbleConfig && userData.bubbleConfig.displayMode == 'click'){
//该模型之前顶牌展示状态
userData.clickShow = userData.clickShow == undefined ? true : !userData.clickShow;
if(userData.clickShow){//判断之前是否显示
this.state.objs.find(e => e.uuid == realObj.uuid).baseObjHelper.title = userData.displayName || null;
}else{
this.state.objs.find(e => e.uuid == realObj.uuid).baseObjHelper.title = null;
}
}
}
>>>>>>> 8fb9a8945dbc9b22583d592d76bcad99c63fb840
});
// 鼠标移出
this.r3d.on(EVENT_TYPE_CORE.MouseLeave, evt => {
......@@ -272,6 +291,7 @@ class StageActuator extends Component {
// evt.object._boh.style.color = null;
// }
});
<<<<<<< HEAD
//单击
this.r3d.on(EVENT_TYPE_CORE.Click, (evt) => {
if (evt.button === 0 && evt.object && evt.object.type === 'Mesh') {
......@@ -285,22 +305,54 @@ class StageActuator extends Component {
console.error(userData.dataConfig.dataDetailUrl + '请求元素详情失败');
}
);
=======
// 鼠标移入事件
this.r3d.on('mouseover', (evt) => {
if (evt.object && evt.object.type === 'Mesh') {
const realObj = evt.object.parent;
const userData = realObj.userData;
//清除其他
this.state.objs.forEach(o => {
if(o.userData.bubbleConfig && o.userData.bubbleConfig.displayMode == 'hover'){
o.baseObjHelper.title = null;
}
});
if(userData.bubbleConfig && userData.bubbleConfig.displayMode == 'hover'){
this.state.objs.find(e => e.uuid == realObj.uuid).baseObjHelper.title = userData.displayName || null;
}
}
});
// 鼠标移出事件
this.r3d.on('mouseout', (evt) => {
// console.log('mouseout');
if (evt.object && evt.object.type === 'Mesh') {
const realObj = evt.object.parent;
const userData = realObj.userData;
if(userData.bubbleConfig && userData.bubbleConfig.displayMode == 'hover'){
this.state.objs.find(e => e.uuid == realObj.uuid).baseObjHelper.title = null;
>>>>>>> 8fb9a8945dbc9b22583d592d76bcad99c63fb840
}
}
});
};
<<<<<<< HEAD
onComplete = obj => {
const boh = new BaseObjHelper({ obj });
obj._boh = boh;
};
=======
>>>>>>> 8fb9a8945dbc9b22583d592d76bcad99c63fb840
afterRender = () => {
this.objAnchorHelper && this.objAnchorHelper.update();
}
handleModelParserData = (parser, fmtData) => {
<<<<<<< HEAD
// 将 fmtData 绑定到 parser 的 node.userData 上
// Object.assign(parser.obj.userData, fmtData)
parser.bindUserData(fmtData);
......@@ -328,6 +380,39 @@ class StageActuator extends Component {
image: imageUrl
};
parser.objHelper.title = displayName;
=======
// 将 eid 绑定到 parser 的 node 上
// Object.assign(parser.obj.userData, { eid: fmtData.eid, displayName: fmtData.displayName })
// or
parser.bindUserData(deepCopy(fmtData));
//为模型添加顶牌属性
let obj = parser.obj;
const boh = new BaseObjHelper({ obj });
obj.baseObjHelper = boh;
obj.baseObjHelper.titleConfig = {
// 顶牌平面参数
planeOptions: {
...obj.userData.displayName,
width: 256 * 0.1,
height: 128 * 0.1,
position:{ x: 0, y: 30, z: 0 },
},
canvasOptions: {
fillStyle: 'rgb(51, 51, 51)',
font: '32px sans-serif',
textBaseline: 'middle',
},
imgWidth: 256,
imgHeight: 128,
// 设置顶牌 图片路径
image: `/src/assets/planMgmt/center.png`
};
if(obj.userData.displayName && obj.userData.bubbleConfig && obj.userData.bubbleConfig.displayMode == 'show'){
obj.baseObjHelper.title = obj.userData.displayName;
}else{
obj.baseObjHelper.title = null;
>>>>>>> 8fb9a8945dbc9b22583d592d76bcad99c63fb840
}
this.objs.push(parser.obj);
}
......@@ -358,15 +443,13 @@ class StageActuator extends Component {
getFooter = () => {
return (
<div>
<Button onClick={() => this.playCancel()}>取消</Button>
<Button style={{color:'red'}} onClick={() => this.playCancel()}>取消</Button>
<Button onClick={() => this.playAnimation()}>确定</Button>
</div> )
;
}
playAnimation = () => {
// const { currentIndex } = this.state;
// this.a3dRef && this.a3dRef.playAnimation(currentIndex);
this.a3dRef && this.a3dRef.changePlayState('start');
this.setState({ modal: false, playing: true });
};
......@@ -432,7 +515,6 @@ class StageActuator extends Component {
enableParticles
particlesProps={particlesProps}
onCreated={this.onGraphCreated}
afterRender={this.afterRender}
handleModelParserData={this.handleModelParserData}
handleModelParserDone={this.handleModelParserDone}
modelContentProps={modelContentProps}
......@@ -455,7 +537,7 @@ class StageActuator extends Component {
header='提示'
visible={modal}
destroyContent
width='20%'
width='17%'
className='board-actuator-detail-modal'
content={this.getContext()}
outterClosable={false}
......
......@@ -25,17 +25,17 @@ class PlayMenuBar extends Component {
constructor(props){
super(props);
this.state = {
tulieActive: false,
tulieActive: true,
zimuActive: true,
quanpingActive: false,
taskTabsShow: false
// taskTabsShow: false
};
}
componentDidMount(){
this.tabsPubsub = PubSub.subscribe(eventTopics.plan_task_list,function(topic,message){
this.setState({ taskTabsShow: message })
}.bind(this));
// this.tabsPubsub = PubSub.subscribe(eventTopics.plan_task_list,function(topic,message){
// this.setState({ taskTabsShow: message })
// }.bind(this));
}
componentWillUnmount(){
......@@ -94,7 +94,7 @@ class PlayMenuBar extends Component {
}
render() {
const { tulieActive,zimuActive,quanpingActive,taskTabsShow } = this.state;
const { tulieActive,zimuActive,quanpingActive } = this.state;
const animateProps = {
transitionAppear: true
};
......@@ -116,7 +116,7 @@ class PlayMenuBar extends Component {
</Select>
{/* 图列 */}
<SidePane
className={`tip-control-panel ${taskTabsShow ? 'task-open' : 'task-close'}`}
className={`tip-control-panel`}
left={false}
top={false}
animateName="slide-down"
......
......@@ -23,7 +23,8 @@ class taskTabs extends Component {
tabs:[
{key:1, type:'person', icon:'person', models:[]},
{key:2, type:'car', icon:'car', models:[]}
]
],
activeKey: '',
};
}
......@@ -55,8 +56,8 @@ class taskTabs extends Component {
}
addTask = (animate) => {
let { tabs } = this.state;
let { tabs,activeKey } = this.state;
activeKey = animate.target;
outerloop :
for (let i = 0; i < tabs.length; i++) {
for (let j = 0; j < tabs[i].models.length; j++) {
......@@ -70,7 +71,7 @@ class taskTabs extends Component {
}
}
}
this.setState({ tabs });
this.setState({ tabs, activeKey});
}
resetTaskTabs = () => {
......@@ -84,8 +85,8 @@ class taskTabs extends Component {
}
getTaskContent = () => {
const { tabs } = this.state;
return <Tabs defaultActiveKey="1" tabPosition="left">
const { tabs, activeKey } = this.state;
return <Tabs defaultActiveKey={["1"]} tabPosition="left">
<TabList>
{tabs.map(e => (
<Tab tab={`Tab-${e.key}`} key={e.key}>
......@@ -98,9 +99,9 @@ class taskTabs extends Component {
<TabPanel tab={`Tab-${tab.key}`} key={tab.key}>
<Collapse className='board-tasktab-all' activeKey={['1']}>
<Panel header='全部' key={'1'}>
<Collapse className='board-tasktab-part' accordion>
<Collapse className='board-tasktab-part' activeKey={[activeKey]} accordion>
{tab.models && tab.models.map(model => {
return <Panel header={model.displayName} key={model.key}>
return <Panel header={model.displayName} key={model.eid}>
<Timeline className='board-tasktab-timeLine'>
{model.tasks && model.tasks.map(task => {
return <Timeline.Item>
......@@ -125,10 +126,8 @@ class taskTabs extends Component {
transitionAppear: true
};
const animateDelay = 0;
// if(taskTabsShow){
return (
<SidePane
<SidePane
className='board-actuator-tasktab'
animateName="fade"
animateProps={animateProps}
......
......@@ -11,7 +11,6 @@
{ "objName": "ground_01.obj", "mtlName": "ground_01.mtl", "modelLevel": "Park" },
{ "objName": "ground_02.obj", "mtlName": "ground_02.mtl", "modelLevel": "Park"},
{ "objName": "guandao_02.obj", "mtlName": "guandao_02.mtl", "modelLevel": "Park" },
{ "objName": "gis.obj", "mtlName": "gis.mtl", "modelLevel": "Building" },
{ "objName": "gis_guandao_01.obj", "mtlName": "gis_guandao_01.mtl", "modelLevel": "Building" },
{ "objName": "gis_guandao_02.obj", "mtlName": "gis_guandao_02.mtl", "modelLevel": "Building" },
......@@ -29,13 +28,9 @@
{ "objName": "gis_guandao_14.obj", "mtlName": "gis_guandao_14.mtl", "modelLevel": "Building" },
{ "objName": "gis_guandao_15.obj", "mtlName": "gis_guandao_15.mtl", "modelLevel": "Building" },
{ "objName": "gis_guandao_16.obj", "mtlName": "gis_guandao_16.mtl", "modelLevel": "Building" },
{ "objName": "szn_00.obj", "mtlName": "szn_00.mtl", "modelLevel": "Building" },
{ "objName": "szn_01.obj", "mtlName": "szn_01.mtl", "modelLevel": "Building" },
{ "objName": "szn_02.obj", "mtlName": "szn_02.mtl", "modelLevel": "Building" },
{ "objName": "szn_03.obj", "mtlName": "szn_03.mtl", "modelLevel": "Building" },
{ "objName": "szn_04.obj", "mtlName": "szn_04.mtl", "modelLevel": "Building" },
{ "objName": "szn_05.obj", "mtlName": "szn_05.mtl", "modelLevel": "Building" },
{ "objName": "szn_06.obj", "mtlName": "szn_06.mtl", "modelLevel": "Building" },
......@@ -49,24 +44,6 @@
{ "objName": "szn_22.obj", "mtlName": "szn_22.mtl", "modelLevel": "Building" },
{ "objName": "szn_23.obj", "mtlName": "szn_23.mtl", "modelLevel": "Building" },
{ "objName": "szn_24.obj", "mtlName": "szn_24.mtl", "modelLevel": "Building" },
{ "objName": "valve-hall_01.obj", "mtlName": "valve-hall_01.mtl", "modelLevel": "Building", "foreignKey": "valve-hall_01" },
{ "objName": "valve-hall_02.obj", "mtlName": "valve-hall_02.mtl", "modelLevel": "Building", "foreignKey": "valve-hall_02" },
{ "objName": "valve-hall_03.obj", "mtlName": "valve-hall_03.mtl", "modelLevel": "Building", "foreignKey": "valve-hall_03" }
......@@ -114,15 +91,10 @@
]}
],
"asyncModels": [
{ "objName": "hlb_01.obj", "mtlName": "hlb_01.mtl", "modelLevel": "Building" },
{ "objName": "hlb_02.obj", "mtlName": "hlb_02.mtl", "modelLevel": "Building" },
{ "objName": "hlb_03.obj", "mtlName": "hlb_03.mtl", "modelLevel": "Building" },
{ "objName": "hlb_04.obj", "mtlName": "hlb_04.mtl", "modelLevel": "Building" },
{ "objName": "fkl_01.obj", "mtlName": "fkl_01.mtl", "modelLevel": "Building" },
{ "objName": "fkl_02.obj", "mtlName": "fkl_02.mtl", "modelLevel": "Building" },
{ "objName": "fklt_01.obj", "mtlName": "fklt_01.mtl", "modelLevel": "Building" },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment