index.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078
  1. <template>
  2. <div class="scal">
  3. <div class="toolbar-part-detail lbg_color1 el-tag--primary">
  4. <!-- <div class="toolbar-content"> -->
  5. <!-- <div class="imgcontent">
  6. </div> -->
  7. <div v-if="value2=='HCFDLab'">
  8. <hcfd ref="hcfd" :objopp="objopp" :ytdata="ytdata" :vectorparam="vectorparam" :pid="pid" @fun="fun()" @changelines="changelines()" @linezhexian="linezhexian()" :elodingfalse="elodingfalse" @exlodingfalse="exlodingfalse" :femnum="femnum"></hcfd>
  9. </div>
  10. <div v-else-if="value2=='FEMLab(结构力学)'">
  11. <fem ref="fem" :femnum="femnum" :logs='logs' @getthislog='getthislog' :pid="pid" @exlodingfalse="exlodingfalse" ></fem>
  12. </div>
  13. <div v-else-if="value2=='FEMLab(结构力学)版本2'">
  14. <fem2 ref="fem2" :femnum="femnum" :logs='logs' :pid="pid" ></fem2>
  15. </div>
  16. <div class="adi" v-else>
  17. <el-tabs :tab-position="tabPosition" v-model="activeName" type="card" @tab-click="handleClick">
  18. <el-tab-pane label="几何建模" name="one"><geometry></geometry></el-tab-pane>
  19. <el-tab-pane label="网格划分" name="two"> <meshindex></meshindex></el-tab-pane>
  20. <el-tab-pane label="几何与单元属性" name="three"> <Geometryandclass></Geometryandclass></el-tab-pane>
  21. <el-tab-pane label="材料属性" name="four"> <Materials></Materials></el-tab-pane>
  22. <el-tab-pane label="接触与连接" name="five"><touch></touch></el-tab-pane>
  23. <el-tab-pane label="初始条件" name="six"> <initial></initial></el-tab-pane>
  24. <el-tab-pane label="边界条件" name="seven"> <boundary></boundary></el-tab-pane>
  25. <el-tab-pane label="网格自适应" name="eight"> <Meshauto></Meshauto> </el-tab-pane>
  26. <el-tab-pane label="载荷工况" name="nine"> <loadcase></loadcase></el-tab-pane>
  27. <el-tab-pane label="作业任务" name="ten"> <zuoye></zuoye></el-tab-pane>
  28. <el-tab-pane label="结果查看" name="eleven"> <result></result></el-tab-pane>
  29. <el-tab-pane label="工具箱" name="twelve"><toolindex></toolindex></el-tab-pane>
  30. <el-tab-pane label="操作" name="thirteen"><caozuo ></caozuo></el-tab-pane>
  31. </el-tabs>
  32. </div>
  33. <div class="textselsect">
  34. <el-select v-model="value0" placeholder="请选择">
  35. <el-option
  36. v-for="item in options0"
  37. :key="item.value"
  38. :label="item.label"
  39. :value="item.value">
  40. </el-option>
  41. </el-select>
  42. <el-select v-model="value2" placeholder="请选择" @change="solverchange">
  43. <el-option
  44. v-for="item in options2"
  45. :key="item.value"
  46. :label="item.label"
  47. :value="item.value">
  48. </el-option>
  49. </el-select>
  50. </div>
  51. </div>
  52. <div class="content">
  53. <transition name="slide-fade">
  54. <div class="left lbg_color3 el-menu" v-show="showtrue" style="padding:0;">
  55. <el-tabs v-model="activeName1" type="card" @tab-click="handleClick">
  56. <el-tab-pane label="模型导航" name="first">
  57. <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
  58. </el-tab-pane>
  59. <el-tab-pane label="动态菜单" name="second">
  60. <div class="dongtia dialog_color selecr">
  61. <el-form>
  62. <el-form-item >
  63. <el-select v-model="zjhval" placeholder="请选择">
  64. <el-option
  65. v-for="item in zjhlist"
  66. :key="item.value"
  67. :label="item.label"
  68. :value="item.value"
  69. >
  70. </el-option>
  71. </el-select>
  72. </el-form-item>
  73. <el-form-item>
  74. <el-select v-model="zjhval1" placeholder="请选择">
  75. <el-option
  76. v-for="item in zjhlist1"
  77. :key="item.value"
  78. :label="item.label"
  79. :value="item.value"
  80. >
  81. </el-option>
  82. </el-select>
  83. </el-form-item>
  84. <div class="leftsearch">
  85. <el-input placeholder="请输入内容" v-model="input3" class="input-with-select">
  86. <el-button slot="append" icon="el-icon-search"></el-button>
  87. </el-input>
  88. </div>
  89. </el-form>
  90. </div>
  91. </el-tab-pane>
  92. </el-tabs>
  93. </div>
  94. </transition>
  95. <div class="right lbg_color2 ">
  96. <!-- <div class="part-panel-collapse-handle lbg_color3 el-tag--primary " @click="showtrue=!showtrue">
  97. <i class="el-icon-arrow-down"></i>
  98. </div> -->
  99. <el-container class="beij-container">
  100. <el-container>
  101. <el-main ref="main3d" :class="headMenu_2Show?'maxh400':'maxh221'" style="padding:0">
  102. <tool1 @startimg="startimg" :monitorHCFD="monitorHCFD" @changehcfd="changehcfd"></tool1>
  103. <!-- 加载折线图 -->
  104. <echartsHFCD ref="monitor" v-if="femnum=='HCFDLab'" @getthislog='getthislog' @restimeyear='restimeyear' :projectId='pid' :nmlsteps="Number(numsteps)"></echartsHFCD>
  105. <!-- 加载图片 -->
  106. <TFileStream :projectId='pid' ref="TFileStream" ></TFileStream>
  107. </el-main>
  108. <div class="footerTitle el-tag--primary">
  109. <div>{{ $t("FEM.other.console") }}
  110. <p class="restime" v-show="elodingfalse" style=" margin-left: 50px; font-size:14px">剩余时长:{{restime}}</p>
  111. </div>
  112. <div>
  113. <li class="exloadbox" v-show="elodingfalse" >
  114. <span>正在求解中</span>
  115. <i class="el-icon-loading"></i>
  116. </li>
  117. <li>
  118. <span @click="footerShows('claer')">清空</span>
  119. </li>
  120. <li>
  121. <span @click="footerShows('foot')">&#9650;&#9660;</span>
  122. </li>
  123. </div>
  124. </div>
  125. <el-footer class="femFooter" v-if="footerShow">
  126. <div class="footerTextBox">
  127. <el-input
  128. class="footerText"
  129. type="textarea"
  130. v-model="logs"
  131. ></el-input>
  132. </div>
  133. </el-footer>
  134. </el-container>
  135. </el-container>
  136. </div>
  137. </div>
  138. </div>
  139. </template>
  140. <script>
  141. //图片引入
  142. import tl1 from '@/assets/icon/axislegend.png'
  143. import tl2 from '@/assets/icon/zoomtowindow.png'
  144. import tl3 from '@/assets/icon/defaultmousecontrol.png'
  145. import tl4 from '@/assets/icon/u3884.png'
  146. import tl5 from '@/assets/icon/16.png'
  147. import tl6 from '@/assets/icon/pan.png'
  148. import tl7 from '@/assets/icon/u3871.png'
  149. import tl8 from '@/assets/icon/u3879.png'
  150. import tl9 from '@/assets/icon/u9872.png'
  151. import tl10 from '@/assets/icon/view_front.png'
  152. import tl11 from '@/assets/icon/view_back.png'
  153. import tl12 from '@/assets/icon/view_top.png'
  154. import tl13 from '@/assets/icon/view_bottom.png'
  155. import tl14 from '@/assets/icon/view_left.png'
  156. import tl15 from '@/assets/icon/view_right.png'
  157. import tl16 from '@/assets/icon/view_isometric.png'
  158. // 引入组件
  159. import { request, getImage } from '@/utils/request'
  160. import { Message, MessageBox } from "element-ui";
  161. import geometry from './geometry/index.vue'
  162. import meshindex from './meshindex/index.vue'
  163. import Geometryandclass from './Geometryandclass/index.vue'
  164. import Materials from './Materials/index.vue'
  165. import touch from './touch/index.vue'
  166. import initial from './initial/index.vue'
  167. import boundary from './boundary/index.vue'
  168. import Meshauto from './Meshauto/index.vue'
  169. import loadcase from './loadcase/index.vue'
  170. import zuoye from './zuoye/index.vue'
  171. import result from './result/index.vue'
  172. import toolindex from './tool/index.vue'
  173. import caozuo from './caozuo/index.vue'
  174. import hcfd from './HCFDLab/index.vue'
  175. import fem from './FEMLab/fem.vue'
  176. import fem2 from './FemLab2_0/index.vue'
  177. import echartsHFCD from "./HCFDLab/echartsHFCD.vue";
  178. import { number } from 'echarts/lib/export'
  179. import TFileStream from "./compoents/TFileStreamhcfd.vue";
  180. import tool1 from "./compoents/tool1.vue";
  181. export default {
  182. components:{geometry,meshindex,Geometryandclass,Materials,touch,initial,boundary,Meshauto,loadcase,zuoye,echartsHFCD,result,caozuo,toolindex,hcfd,fem,TFileStream,tool1,fem2},
  183. data() {
  184. return {
  185. tl1,tl2,tl3,tl4,tl5,tl6,tl7,tl8,tl9,tl10,
  186. tl11,tl12,tl13,tl14,tl15,tl16,
  187. ytdata:{},
  188. vectorparam:{},
  189. active:'',
  190. restime:'',
  191. monitorHCFD:false,
  192. footerShow:true,
  193. headMenu_2Show:false,
  194. elodingfalse:false,
  195. numsteps:'',
  196. logs: "欢迎来到adi平台",
  197. newlog:'',
  198. toollist:[
  199. { icon:tl1, titlie:'坐标轴'},
  200. { icon:tl2, titlie:'缩放'},
  201. ],
  202. toollist2:[
  203. { icon:tl3, titlie:'默认鼠标控制'},
  204. { icon:tl4, titlie:'缩小到窗口'},
  205. { icon:tl5, titlie:'轨道'},
  206. { icon:tl6, titlie:'pan'},
  207. { icon:tl7, titlie:'zoom'},
  208. ],
  209. toollist3:[
  210. { icon:tl8, titlie:'点击选择'},
  211. { icon:tl9, titlie:'点击选择窗口'},
  212. ],
  213. toollist4:[
  214. { icon:tl10, titlie:'前'},
  215. { icon:tl11, titlie:'后'},
  216. { icon:tl12, titlie:'上'},
  217. { icon:tl13, titlie:'底'},
  218. { icon:tl14, titlie:'左'},
  219. { icon:tl15, titlie:'右'},
  220. { icon:tl16, titlie:'等角'},
  221. ],
  222. data: [{
  223. label: '几何(33)',
  224. children: [{
  225. label: '几何点(17)',
  226. children: [{
  227. label: '三级 1-1-1'
  228. }]
  229. },
  230. {
  231. label: '曲线(17)',
  232. children: [{
  233. label: '三级 1-1-1'
  234. }]
  235. },
  236. ]
  237. }, {
  238. label: '网格(20)',
  239. children: [{
  240. label: '节点',
  241. }, {
  242. label: '表格',
  243. }]
  244. }, {
  245. label: '材料',
  246. },
  247. {
  248. label: '接触体',
  249. },
  250. {
  251. label: '接触关系',
  252. },
  253. ],
  254. defaultProps: {
  255. children: 'children',
  256. label: 'label'
  257. },
  258. // current:0,
  259. pid:'',
  260. solverConfigid:'',
  261. activeName: 'one',
  262. activeName1:'first',
  263. objopp:'',
  264. femnum:'',
  265. tab:[
  266. {index:0,name:"几何建模"},
  267. {index:1,name:"网格划分"},
  268. {index:2,name:"几何与单元属性"},
  269. {index:3,name:"材料属性"},
  270. {index:4,name:"接触与连接"},
  271. {index:5,name:"初始条件"},
  272. {index:6,name:" 边界条件"},
  273. {index:7,name:"网格自适应"},
  274. {index:8,name:"载荷工况"},
  275. {index:9,name:"作业任务"},
  276. {index:10,name:"结果查看"},
  277. {index:11,name:" 工具箱"},
  278. ],
  279. tabPosition: 'top',
  280. showtrue:true,
  281. drawer: true,
  282. direction: 'rtl',
  283. options:[
  284. {value: '0',label: 'FEMLab(结构力学)'},
  285. { value: '1',label: 'MPMLab(结构力学)'},
  286. { value: '3',label: 'Bladesign(结构力学)'},
  287. {value: '4',label: 'Marc(结构力学)'},
  288. { value: '5',label: 'Abaqus(结构力学)'},
  289. { value: '6',label: 'Natran(结构力学)'},
  290. { value: '7', label: 'ANSYS-FLUENT(结构力学)'},
  291. {value: '8',label: 'STAR_CCM(流体力学)'},
  292. {value: '9', label: 'Pointwise(流体力学)' },
  293. {value: '10',label: 'ANSYS_ICEMCFD(流体力学)' }
  294. ],
  295. options1:[
  296. {value: '0',label: '结构分析'},
  297. { value: '1',label: '传热分析'},
  298. {value: '2',label: '热/电耦合'},
  299. { value: '3',label: '电/热耦合'},
  300. {value: '4',label: '电/热/力耦合'},
  301. { value: '5',label: '静电场分析'},
  302. {value: '6',label: '静电场/结构耦合'},
  303. { value: '7',label: '压力分析'},
  304. {value: '8',label: '热/压力'},
  305. { value: '9',label: '声场分析'},
  306. {value: '10',label: '声场/结构耦合'},
  307. { value: '11',label: '静磁场分析'},
  308. {value: '12',label: '静磁/热'},
  309. { value: '13',label: '静磁/结构'},
  310. {value: '14',label: '电磁场分析'},
  311. { value: '15',label: '电磁/热'},
  312. {value: '16',label: '电磁/热/结构'},
  313. { value: '17',label: '流体分析'},
  314. {value: '18',label: '流体/传热'},
  315. { value: '19',label: '流固耦合分析'},
  316. {value: '20',label: '流体/传热/结构耦合分析'},
  317. { value: '21',label: '轴承分析'},
  318. {value: '22',label: '扩散分析'},
  319. { value: '23',label: '扩散/热分析'},
  320. {value: '24',label: '扩散结构分析'},
  321. { value: '25',label: '土壤分析'},
  322. ],
  323. value1:'0',
  324. options0:[
  325. {value: 'ADI.SimWork',label: 'ADI.SimWork'},
  326. ],
  327. value0:'ADI.SimWork',
  328. options2:[
  329. {value: 'HCFDLab',label: 'HCFDLab'},
  330. { value: 'FEMLab(结构力学)',label: 'FEMLab(结构力学)'},
  331. { value: 'FEMLab(结构力学)版本2',label: 'FEMLab(结构力学)版本2'},
  332. { value: 'adi',label: 'adi'},
  333. ],
  334. value2:'HCFDLab',
  335. zjhlist:[
  336. {value: '0',label: '全部'},
  337. { value: '1',label: '表格'},
  338. { value: '2',label: '几何特征'},
  339. { value: '3',label: '材料'},
  340. {value: '4',label: '接触体'},
  341. { value: '5',label: '接触关系'},
  342. { value: '6',label: '接触表'},
  343. { value: '7',label: '焊接路径'},
  344. { value: '8',label: '焊缝'},
  345. { value: '9',label: '初始条件'},
  346. {value: '10',label: '边界条件'},
  347. { value: '11',label: '分工情况'},
  348. { value: '12',label: '分析任务'},
  349. { value: '13',label: '集合'}
  350. ],
  351. zjhval:'0',
  352. zjhlist1:[
  353. {value: '0',label: '全部'},
  354. { value: '1',label: '表格1'},
  355. { value: '2',label: '表格2'},
  356. ],
  357. zjhval1:'0',
  358. input3:"",
  359. }
  360. },
  361. created(){
  362. this.pid=this.$route.query.pid;
  363. this.init();
  364. },
  365. mounted(){
  366. let curcolor = this.$store.state.themecolor;
  367. this.classH2 = 'custome-' + curcolor;
  368. },
  369. methods:{
  370. //折线图
  371. changelines(val){
  372. let _this=this;
  373. let vals=JSON.parse(val)
  374. console.log(vals)
  375. if(vals.lineType=='Line'){
  376. this.$set( this.$refs.monitor.option, "type",'Line' );
  377. this.linezhexian(vals.linevalue);
  378. }else{
  379. this.$set( this.$refs.monitor.option, "type","Point" );
  380. this.linezhexian(vals.pointvalue);
  381. }
  382. },
  383. //
  384. linezhexian(num){
  385. this.$set( this.$refs.monitor.option.plotOptions.series, "lineWidth", Number(num));
  386. this.$refs.monitor.newHighcharts("highcharts",this.$refs.monitor.option);
  387. },
  388. meshclick(e,index,key){
  389. let that=this;
  390. that.active=key;
  391. console.log(key);
  392. switch(key){
  393. case 'tl1-0':
  394. break;
  395. case 'tl1-1':
  396. break;
  397. case 'tl2-0':
  398. break;
  399. case 'tl2-1':
  400. break;
  401. case 'tl2-2':
  402. break;
  403. case 'tl2-3':
  404. break;
  405. case 'tl2-4':
  406. break;
  407. case'tl3-0':
  408. break;
  409. case'tl3-1':
  410. break;
  411. case'tl4-0':
  412. break;
  413. case'tl4-1':
  414. break;
  415. case'tl4-2':
  416. break;
  417. case'tl4-3':
  418. break;
  419. case'tl4-4':
  420. break;
  421. case'tl4-5':
  422. break;
  423. case'tl4-6':
  424. break;
  425. }
  426. },
  427. exlodingfalse(res){
  428. this.elodingfalse=res;
  429. },
  430. handleNodeClick(data) {
  431. console.log(data);
  432. },
  433. hide(){
  434. this.showtrue=!this.showtrue;
  435. },
  436. handleClick(tab, event) {
  437. },
  438. init(){
  439. this.pid=this.$route.query.pid;
  440. // this.pid='31f117acb7e74232a3267b091391eab2';
  441. this.solverchange1('HCFDLab');
  442. },
  443. //项目求解查询
  444. pojectquery(){
  445. },
  446. solverchange1(val){
  447. console.log(val)
  448. let that=this;
  449. this.femnum=val;
  450. const params = {
  451. transCode: 'C00003',
  452. pid:this.pid,
  453. company:this.value0,
  454. solverModel:this.value2
  455. }
  456. sessionStorage.setItem('params',JSON.stringify(params))
  457. request(params)
  458. .then((res) => {
  459. if(res.returnCode=='000000000'){
  460. this.objopp=res.parameterObj;
  461. let datas=res;
  462. if(val=='HCFDLab'){
  463. this.$nextTick(()=>{
  464. this.logs='HCFDLab';
  465. this.$refs.hcfd.hcfdchange(this.objopp,res.solverConfigid,datas);
  466. this.solverConfigid=res.solverConfigid;
  467. let data= JSON.parse(this.objopp);
  468. this.numsteps=data.nmlParam.steps;
  469. this.state=datas.state;
  470. setTimeout(function(){
  471. that.initWebSocket();
  472. },500)
  473. })
  474. }else if(val=='FEMLab(结构力学)'){
  475. let data=res;
  476. this.logs='FEMLab(结构力学)';
  477. this.$refs.fem.femchange(res.parameterObj,res.solverConfigid,data);
  478. this.$refs.TFileStream.imgtupian=false;
  479. this.$refs.monitor.container_show=false;
  480. this.solverConfigid=res.solverConfigid;
  481. this.startimg("init",'loaddata');
  482. // }
  483. }else{
  484. }
  485. }else{
  486. }
  487. })
  488. .catch((err) => {
  489. })
  490. },
  491. solverchange(val){
  492. let that=this;
  493. this.femnum=val;
  494. const params = {
  495. transCode: 'C00003',
  496. pid:this.pid,
  497. company:this.value0,
  498. solverModel:this.value2
  499. }
  500. sessionStorage.setItem('params',JSON.stringify(params))
  501. request(params)
  502. .then((res) => {
  503. if(res.returnCode=='000000000'){
  504. let datas=res;
  505. this.objopp=res.parameterObj;
  506. if(val=='HCFDLab'){
  507. this.$nextTick(()=>{
  508. this.logs='HCFDLab'
  509. this.state=datas.state;
  510. this.$refs.hcfd.hcfdchange(this.objopp,res.solverConfigid,datas.state);
  511. this.solverConfigid=res.solverConfigid;
  512. let data= JSON.parse(this.objopp);
  513. this.numsteps=data.nmlParam.steps;
  514. this.exlodingfalse(false)
  515. this.startimg("init",'loaddata');
  516. that.$refs.monitor.container_show=true;
  517. })
  518. }else if(val=='FEMLab(结构力学)'){
  519. let data=res;
  520. this.$refs.fem.femchange(res.parameterObj,res.solverConfigid,data);
  521. this.solverConfigid=res.solverConfigid;
  522. this.logs='FEMLab(结构力学)';
  523. this.startimg("init",'loaddata');
  524. that.$refs.monitor.container_show=false;
  525. }else{
  526. }
  527. }else{
  528. }
  529. })
  530. .catch((err) => {
  531. })
  532. },
  533. // 调用求解过程日志
  534. fun(){
  535. if( this.state=='1'){
  536. console.log(111)
  537. this.$refs.monitor.getwebsocket();
  538. }else{
  539. this.$refs.hcfd.hcfdrun();
  540. }
  541. this.$refs.monitor.container_show=true;
  542. this.monitorHCFD=this.$refs.monitor.container_show
  543. this.$refs.TFileStream.imgtupian=false;
  544. },
  545. funagain(){
  546. this.$refs.monitor.getwebsocket();
  547. this.$refs.monitor.container_show=true;
  548. this.monitorHCFD=this.$refs.monitor.container_show
  549. this.$refs.TFileStream.imgtupian=false;
  550. },
  551. // 工具栏的显示隐藏
  552. changehcfd(pare){
  553. this.$refs.monitor.getwebsocket();
  554. this.$refs.TFileStream.imgtupian=false;
  555. this.$refs.monitor.container_show=pare;
  556. },
  557. // 日志的文本框
  558. footerShows(evt) {
  559. if(evt=='claer'){
  560. this.logs='';
  561. }else{
  562. this.footerShow=!this.footerShow
  563. }
  564. },
  565. //日志
  566. getthislog(log){
  567. this.newlog = log+"\n"+this.newlog;
  568. this.logs=this.newlog;
  569. if ( this.logs.indexOf("newSolver end") >= 0) {
  570. this.elodingfalse=false;
  571. this.isSolverEnd = true;
  572. }
  573. },
  574. // 剩余时间
  575. restimeyear(time){
  576. this.restime=time;
  577. },
  578. //开起loading
  579. loadingopen(){
  580. const loading = this.$loading({
  581. lock: true,
  582. text: 'Loading',
  583. spinner: 'el-icon-loading',
  584. background: 'rgba(0, 0, 0, 0.7)'
  585. });
  586. return loading;
  587. },
  588. // 关闭lodind
  589. loadingend(loading){
  590. loading.close()
  591. },
  592. startimg(action,action2){
  593. let params = {
  594. transCode: "AFT001",// 服务器渲染实例接口创建推流
  595. pid:this.pid,
  596. solverConfigId: this.solverConfigid,
  597. action:action,
  598. paramJson:"",
  599. };
  600. this.loading = true;
  601. request(params)
  602. .then((res) => {
  603. if(res.returnCode=='000000000'){
  604. this.startimgloaddata(action2)
  605. }else{
  606. }
  607. })
  608. .catch((err) => {
  609. this.loadingend(this.loadingopen());
  610. });
  611. },
  612. startimgloaddata(action){
  613. let that=this;
  614. let params = {
  615. transCode: "AFT001",// 服务器渲染实例接口创建推流
  616. pid:this.pid,
  617. solverConfigId: this.solverConfigid,
  618. action:action,
  619. paramJson:"",
  620. };
  621. this.loading = true;
  622. request(params)
  623. .then((res) => {
  624. setTimeout(() => {
  625. this.loadingend(this.loadingopen());
  626. console.log(1111);
  627. }, 90000);
  628. })
  629. .catch((err) => {
  630. this.loadingend(this.loadingopen());
  631. });
  632. },
  633. // // 文件渲染websoket图片的渲染
  634. initWebSocket(){ //初始化weosocket
  635. const wsuri = "ws://192.168.0.43:8087//websocket?projectId="+this.pid;
  636. this.websock = new WebSocket(wsuri);
  637. this.websock.onmessage = this.websocketonmessage;
  638. this.websock.onopen = this.websocketonopen;
  639. this.websock.onerror = this.websocketonerror;
  640. this.websock.onclose = this.websocketclose;
  641. },
  642. websocketonopen(e){ //连接建立之后执行send方法发送数据
  643. this.startimg("init",'loaddata');
  644. },
  645. websocketonerror(){//连接建立失败重连
  646. this.websock.close()
  647. },
  648. websocketonmessage(e){ //数据接收
  649. // console.log(e);
  650. this.loadingopen();
  651. try{
  652. let eadata=e.data
  653. var rdata=JSON.parse(e.data)
  654. console.log(rdata);
  655. if(rdata.hasOwnProperty("img")){
  656. this.loadingend(this.loadingopen());
  657. this.$refs.TFileStream.imgtupian=true;
  658. this.$refs.TFileStream.fetchData(rdata);
  659. this.$refs.monitor.container_show=false;
  660. }
  661. // HCFD云图的参数返回 存储
  662. console.log(rdata);
  663. if(rdata.action=='ResultImport'){
  664. let data=JSON.parse(rdata.paramJson);
  665. if(data.msgType=="contour_param"){
  666. sessionStorage.setItem("ytdata",JSON.stringify(data));
  667. this.ytdata=rdata;
  668. }
  669. if(data.msgType=='line_param'){
  670. sessionStorage.setItem("ytdata",JSON.stringify(data));
  671. this.ytdata=rdata;
  672. }
  673. if(data.msgType=='vector_param'){
  674. sessionStorage.setItem("vectorparam",JSON.stringify(data));
  675. this.vectorparam=rdata;
  676. }
  677. if(data.msgType=='stream_param'){
  678. this.$refs.hcfd.streamdata(JSON.stringify(data))
  679. }
  680. }else if(rdata.action=='LineDisplay'){
  681. this.ytdata=rdata;
  682. }else if(rdata.action=='SliceDisplayAdd'){
  683. let dataslicedisplay=JSON.parse(rdata.paramJson);
  684. if(dataslicedisplay==null||JSON.stringify(dataslicedisplay)=='{}'){
  685. }else{
  686. if(dataslicedisplay.msgType=='addPage_slice_param'){
  687. sessionStorage.setItem("dataslicedisplay",JSON.stringify(rdata.paramJson));
  688. this.$refs.hcfd.addparam();
  689. }
  690. }
  691. }else if(rdata.action=='SliceDisplayUpdate'){
  692. let datadisplayupdate=JSON.parse(rdata.paramJson);
  693. console.log(datadisplayupdate)
  694. if(datadisplayupdate==null||JSON.stringify(datadisplayupdate)=='{}'){
  695. }else{
  696. sessionStorage.setItem("updateparam",JSON.stringify(rdata.paramJson));
  697. this.$refs.hcfd.updataparam();
  698. }
  699. }else if(rdata.action=='StreamDisplayCreate'){
  700. let streamError=JSON.parse(rdata.paramJson)
  701. if(streamError.hasOwnProperty('Error')){
  702. this.loadingend(this.loadingopen());
  703. }
  704. }
  705. return true;
  706. }catch(error){
  707. this.loadingend(this.loadingopen());
  708. return false;
  709. }
  710. },
  711. websocketsend(Data){//数据发送
  712. this.websock.send(Data);
  713. },
  714. websocketclose(e){ //关闭
  715. this.websock.close();
  716. Message({
  717. type: "error",
  718. message: "websock断开连接",
  719. });
  720. this.loadingend(this.loadingopen());
  721. },
  722. }
  723. }
  724. </script>
  725. <style lang="scss">
  726. @import '@/styles/variables.scss';
  727. @import '@/styles/mixin.scss';
  728. .scal{
  729. .toolbar-part-detail{
  730. // background-color: #757070;
  731. .toolbar-content{
  732. padding: 5px;
  733. border-top:1px solid #999;
  734. // border-bottom:1px solid #999;
  735. .imgcontent{
  736. display: flex;
  737. .item{
  738. padding-right: 5px;
  739. }
  740. }
  741. }
  742. }
  743. .toolmain{
  744. width: 100%;
  745. height:32px;
  746. overflow: hidden;
  747. }
  748. html,body{
  749. width: 100%;
  750. height: 100%;
  751. }
  752. .el-tabs__content{
  753. padding: 0 5px;
  754. }
  755. .content{
  756. display: flex;
  757. height: 100%;
  758. position: relative;
  759. .left{
  760. width: 200px;
  761. height: 100%;
  762. flex-direction: column;
  763. padding: 15px;
  764. position: relative;
  765. height: 88vh;
  766. z-index: 10;
  767. }
  768. .part-panel-collapse-handle {
  769. position: absolute;
  770. // right: -56px;
  771. left: -38px;
  772. top: 44%;
  773. width: 94px;
  774. height: 0;
  775. cursor: pointer;
  776. text-align: center;
  777. border-width: 0 20px 18px;
  778. line-height: 18px;
  779. border-style: none solid solid;
  780. transform: rotateZ(
  781. 90deg);
  782. font-size: 19px;
  783. }
  784. .lbg_color3 i:before{
  785. transform: rotateZ(
  786. 0);
  787. }
  788. .right{
  789. padding:0;
  790. flex: 1;
  791. // height: 100%;
  792. position: relative;
  793. }
  794. .imgcontent img{
  795. font-size: 16px;
  796. }
  797. .slide-fade-enter-active {
  798. transition: all .3s ease;
  799. }
  800. }
  801. .tablist{
  802. border-bottom:1px solid #999;
  803. padding: 3px 0;
  804. }
  805. .tablist .tabitem{
  806. color: #b6b6b6;
  807. font-size: 16px;
  808. padding-right: 5px;
  809. cursor: pointer;
  810. &.current{
  811. color: #Fff ;
  812. }
  813. }
  814. .el-tabs--bottom .el-tabs__header.is-bottom{
  815. margin: 0;
  816. }
  817. .el-tabs__header{
  818. margin: 0;
  819. }
  820. .imgcontent{
  821. padding: 0 15px;
  822. }
  823. .el-tabs__item{
  824. height: 30px;
  825. line-height: 30px;
  826. padding: 0 8px;
  827. font-size: 12px;
  828. }
  829. // .imgzong{
  830. // display: flex;
  831. // padding-top: 4px;
  832. // flex-wrap:wrap;
  833. // .el-image{
  834. // width: 30px;
  835. // }
  836. // }
  837. .toolmain .imgzong .item1{
  838. padding-right: 4px;
  839. padding: 0px 4px ;
  840. }
  841. .imgzong .item1{
  842. padding-right: 4px;
  843. padding: 4px 4px ;
  844. }
  845. .shu{
  846. padding: 4px 10px;
  847. color: #666;
  848. }
  849. .el-tabs__item{
  850. height: 30px;
  851. line-height: 30px;
  852. padding: 0 6px;
  853. color:#b6b6b6;
  854. font-size:15px;
  855. }
  856. }
  857. .maxh221{
  858. max-height: calc(100vh - 76px);
  859. }
  860. .maxh400{
  861. max-height: calc(100vh - 410px);
  862. }
  863. .beij-container {
  864. width: 100%;
  865. height: 100%;
  866. background-color: #fff;
  867. // background: linear-gradient(180deg, #ccd3e2 0%, rgba(255, 255, 255, 0) 100%);
  868. }
  869. .el-footer {
  870. padding: 0;
  871. height: 149px;
  872. overflow-y: auto;
  873. }
  874. .footerTitle {
  875. display: flex;
  876. justify-content: space-between;
  877. padding: 5px 20px;
  878. font-size: 20px;
  879. height: 30px !important;
  880. z-index: 99;
  881. }
  882. .footerTitle div {
  883. display: flex;
  884. justify-content: space-around;
  885. align-items: center;
  886. }
  887. .footerTitle p {
  888. margin: 0;
  889. }
  890. .footerTitle span {
  891. padding: 5px 10px;
  892. cursor: default;
  893. }
  894. .femFooter{
  895. height: 135px !important;
  896. padding: 0;
  897. position: relative;
  898. }
  899. .footerText .el-textarea__inner{
  900. width: 100%;
  901. height: 135px !important;
  902. border: 0;
  903. font-size: 12px;
  904. color: #333;
  905. padding: 2px;
  906. }
  907. </style>
  908. <style>
  909. .left{
  910. display: none;
  911. }
  912. .selecr .el-form-item__label{
  913. line-height: 36px;
  914. }
  915. .item1 .el-image{
  916. width: 30px;
  917. cursor: pointer;
  918. }
  919. .el-tabs--border-card{
  920. background-color: none;
  921. }
  922. .baoshi{
  923. margin-top: 4px;
  924. color: #b6b6b6;
  925. }
  926. .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{
  927. background-color: #757070;
  928. }
  929. .el-tabs--card>.el-tabs__header .el-tabs__item.is-active{
  930. border-top:1px solid #757070;
  931. border-bottom:none;
  932. border-top: 1px solid transparent;
  933. }
  934. .part-panel-collapse-handle {
  935. border-color: transparent transparent #6f6f6f;
  936. }
  937. .el-dialog__header{
  938. padding: 15px 20px 10px;
  939. background: #757070;
  940. color: #fff
  941. }
  942. .el-button--primary{
  943. background: #757070;
  944. border-color: #757070;
  945. }
  946. .textselsect{
  947. position: absolute;
  948. z-index: 9;
  949. top: 0;
  950. right: 7px;
  951. z-index: 9;
  952. height: 30px;
  953. overflow: hidden;
  954. }
  955. .dialoglocation{
  956. position: absolute;
  957. top: -15vh;
  958. }
  959. .el-dialog__wrapper{
  960. top: 15vh;
  961. }
  962. .el-tree,.dongtia{
  963. background: none;
  964. color: #b6b6b6;
  965. margin-top: 15px;
  966. }
  967. .itemimg1{
  968. padding: 4px;
  969. }
  970. .itemimg1 .item1 .el-image{
  971. width: 20px;
  972. height: 20px;
  973. }
  974. </style>
  975. <style lang="scss" scoped>
  976. /deep/.toolbar-part-detail{
  977. position: relative;
  978. }
  979. .el-form-item{
  980. margin-bottom: 5px;
  981. }
  982. /deep/.left .el-tabs__item{
  983. padding: 0 19.4px !important;
  984. // box-shadow: 0 8px 0 0 #479a48,0 10px 5px 0 rgba(0,0,0,0.5);
  985. box-shadow: 0 10px 5px 0 rgba(0,0,0,0.2);
  986. }
  987. /deep/.left .is-scrollable {
  988. padding:0;
  989. }
  990. /deep/ .left .el-tabs__nav-next,.left .el-tabs__nav-prev{
  991. display: none;
  992. }
  993. /deep/ .left .el-tabs__nav-prev{
  994. display: none;
  995. }
  996. // /deep/ .el-radio+.el-radio{
  997. // margin: 0;
  998. // }
  999. // /deep/ .el-checkbox+.el-checkbox{
  1000. // margin: 0;
  1001. // }
  1002. /deep/.leftsearch .el-button {
  1003. background-color: #fff;
  1004. }
  1005. </style>