index.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043
  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"></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. this.logs='FEMLab(结构力学)';
  476. this.$refs.fem.femchange(res.parameterObj,res.solverConfigid);
  477. this.$refs.TFileStream.imgtupian=false;
  478. this.$refs.monitor.container_show=false;
  479. this.$nextTick(()=>{
  480. })
  481. }else{
  482. }
  483. }else{
  484. console.log(2222)
  485. }
  486. })
  487. .catch((err) => {
  488. })
  489. },
  490. solverchange(val){
  491. let that=this;
  492. this.femnum=val;
  493. const params = {
  494. transCode: 'C00003',
  495. pid:this.pid,
  496. company:this.value0,
  497. solverModel:this.value2
  498. }
  499. sessionStorage.setItem('params',JSON.stringify(params))
  500. request(params)
  501. .then((res) => {
  502. if(res.returnCode=='000000000'){
  503. let datas=res;
  504. this.objopp=res.parameterObj;
  505. if(val=='HCFDLab'){
  506. this.$nextTick(()=>{
  507. this.logs='HCFDLab'
  508. this.state=datas.state;
  509. this.$refs.hcfd.hcfdchange(this.objopp,res.solverConfigid,datas.state);
  510. this.solverConfigid=res.solverConfigid;
  511. let data= JSON.parse(this.objopp);
  512. this.numsteps=data.nmlParam.steps;
  513. that.$refs.TFileStream.imgtupian=true;
  514. that.$refs.monitor.container_show=true;
  515. })
  516. }else if(val=='FEMLab(结构力学)'){
  517. this.logs='FEMLab(结构力学)'
  518. this.$refs.fem.femchange(res.parameterObj,res.solverConfigid);
  519. that.$refs.TFileStream.imgtupian=false;
  520. that.$refs.monitor.container_show=false;
  521. that.$nextTick(()=>{
  522. // this.$refs.fem.femchange(res.parameterObj,res.solverConfigid);
  523. })
  524. }else{
  525. }
  526. }else{
  527. console.log(2222)
  528. }
  529. })
  530. .catch((err) => {
  531. })
  532. },
  533. // 调用求解过程日志
  534. fun(){
  535. if( this.state=='1'){
  536. this.$refs.monitor.getwebsocket();
  537. }else{
  538. this.$refs.hcfd.hcfdrun();
  539. }
  540. this.$refs.monitor.container_show=true;
  541. this.monitorHCFD=this.$refs.monitor.container_show
  542. this.$refs.TFileStream.imgtupian=false;
  543. },
  544. // 工具栏的显示隐藏
  545. changehcfd(pare){
  546. this.$refs.monitor.getwebsocket();
  547. this.$refs.TFileStream.imgtupian=false;
  548. this.$refs.monitor.container_show=pare;
  549. },
  550. // 日志的文本框
  551. footerShows(evt) {
  552. if(evt=='claer'){
  553. this.logs='';
  554. }else{
  555. this.footerShow=!this.footerShow
  556. }
  557. },
  558. //日志
  559. getthislog(log){
  560. this.newlog = log+"\n"+this.newlog;
  561. this.logs=this.newlog;
  562. if ( this.logs.indexOf("newSolver end") >= 0) {
  563. this.elodingfalse=false;
  564. this.isSolverEnd = true;
  565. }
  566. },
  567. // 剩余时间
  568. restimeyear(time){
  569. this.restime=time;
  570. },
  571. //开起loading
  572. loadingopen(){
  573. const loading = this.$loading({
  574. lock: true,
  575. text: 'Loading',
  576. spinner: 'el-icon-loading',
  577. background: 'rgba(0, 0, 0, 0.7)'
  578. });
  579. return loading;
  580. },
  581. // 关闭lodind
  582. loadingend(loading){
  583. loading.close()
  584. },
  585. // 文件渲染之前的动作
  586. startimg(action,action2){
  587. let params = {
  588. transCode: "AFT001",// 服务器渲染实例接口创建推流
  589. pid:this.pid,
  590. solverConfigId: this.solverConfigid,
  591. action:action,
  592. paramJson:"",
  593. };
  594. this.loading = true;
  595. request(params)
  596. .then((res) => {
  597. if(res.returnCode=='000000000'){
  598. this.startimgloaddata(action2)
  599. }else{
  600. }
  601. })
  602. .catch((err) => {
  603. this.loadingend(this.loadingopen());
  604. });
  605. },
  606. startimgloaddata(action){
  607. let that=this;
  608. let params = {
  609. transCode: "AFT001",// 服务器渲染实例接口创建推流
  610. pid:this.pid,
  611. solverConfigId: this.solverConfigid,
  612. action:action,
  613. paramJson:"",
  614. };
  615. this.loading = true;
  616. request(params)
  617. .then((res) => {
  618. })
  619. .catch((err) => {
  620. this.loadingend(this.loadingopen());
  621. });
  622. },
  623. // // 文件渲染websoket图片的渲染
  624. initWebSocket(){ //初始化weosocket
  625. const wsuri = "ws://192.168.0.43:8087//websocket?projectId="+this.pid;
  626. this.websock = new WebSocket(wsuri);
  627. this.websock.onmessage = this.websocketonmessage;
  628. this.websock.onopen = this.websocketonopen;
  629. this.websock.onerror = this.websocketonerror;
  630. this.websock.onclose = this.websocketclose;
  631. },
  632. websocketonopen(e){ //连接建立之后执行send方法发送数据
  633. this.startimg("init",'loaddata');
  634. },
  635. websocketonerror(){//连接建立失败重连
  636. this.websock.close()
  637. },
  638. websocketonmessage(e){ //数据接收
  639. this.loadingopen();
  640. // this.$refs.monitor.container_show=true;
  641. try{
  642. const redata = JSON.parse(e.data);
  643. if(redata.hasOwnProperty("img")){
  644. this.$refs.TFileStream.imgtupian=true;
  645. this.$refs.TFileStream.fetchData(redata);
  646. this.$refs.monitor.container_show=false;
  647. }
  648. // 云图的参数返回 存储
  649. console.log(redata);
  650. if(redata.action=='ResultImport'){
  651. if(redata.msgType=="contour_param"){
  652. sessionStorage.setItem("ytdata",JSON.stringify(redata));
  653. this.ytdata=redata;
  654. }
  655. if(redata.msgType=='line_param'){
  656. sessionStorage.setItem("ytdata",JSON.stringify(redata));
  657. this.ytdata=redata;
  658. }
  659. if(redata.msgType=='vector_param'){
  660. sessionStorage.setItem("vectorparam",JSON.stringify(redata));
  661. this.vectorparam=redata;
  662. }else{
  663. }
  664. }else if(redata.action=='LineDisplay'){
  665. console.log(redata)
  666. this.ytdata=redata;
  667. }
  668. return true;
  669. }catch(error){
  670. return false;
  671. }
  672. },
  673. websocketsend(Data){//数据发送
  674. this.websock.send(Data);
  675. },
  676. websocketclose(e){ //关闭
  677. Message({
  678. type: "error",
  679. message: "websock断开连接",
  680. });
  681. },
  682. }
  683. }
  684. </script>
  685. <style lang="scss">
  686. @import '@/styles/variables.scss';
  687. @import '@/styles/mixin.scss';
  688. .scal{
  689. .toolbar-part-detail{
  690. // background-color: #757070;
  691. .toolbar-content{
  692. padding: 5px;
  693. border-top:1px solid #999;
  694. // border-bottom:1px solid #999;
  695. .imgcontent{
  696. display: flex;
  697. .item{
  698. padding-right: 5px;
  699. }
  700. }
  701. }
  702. }
  703. .toolmain{
  704. width: 100%;
  705. height:32px;
  706. overflow: hidden;
  707. }
  708. html,body{
  709. width: 100%;
  710. height: 100%;
  711. }
  712. .el-tabs__content{
  713. padding: 0 5px;
  714. }
  715. .content{
  716. display: flex;
  717. height: 100%;
  718. position: relative;
  719. .left{
  720. width: 200px;
  721. height: 100%;
  722. flex-direction: column;
  723. padding: 15px;
  724. position: relative;
  725. height: 88vh;
  726. z-index: 10;
  727. }
  728. .part-panel-collapse-handle {
  729. position: absolute;
  730. // right: -56px;
  731. left: -38px;
  732. top: 44%;
  733. width: 94px;
  734. height: 0;
  735. cursor: pointer;
  736. text-align: center;
  737. border-width: 0 20px 18px;
  738. line-height: 18px;
  739. border-style: none solid solid;
  740. transform: rotateZ(
  741. 90deg);
  742. font-size: 19px;
  743. }
  744. .lbg_color3 i:before{
  745. transform: rotateZ(
  746. 0);
  747. }
  748. .right{
  749. padding:0;
  750. flex: 1;
  751. // height: 100%;
  752. position: relative;
  753. }
  754. .imgcontent img{
  755. font-size: 16px;
  756. }
  757. .slide-fade-enter-active {
  758. transition: all .3s ease;
  759. }
  760. }
  761. .tablist{
  762. border-bottom:1px solid #999;
  763. padding: 3px 0;
  764. }
  765. .tablist .tabitem{
  766. color: #b6b6b6;
  767. font-size: 16px;
  768. padding-right: 5px;
  769. cursor: pointer;
  770. &.current{
  771. color: #Fff ;
  772. }
  773. }
  774. .el-tabs--bottom .el-tabs__header.is-bottom{
  775. margin: 0;
  776. }
  777. .el-tabs__header{
  778. margin: 0;
  779. }
  780. .imgcontent{
  781. padding: 0 15px;
  782. }
  783. .el-tabs__item{
  784. height: 30px;
  785. line-height: 30px;
  786. padding: 0 8px;
  787. font-size: 12px;
  788. }
  789. // .imgzong{
  790. // display: flex;
  791. // padding-top: 4px;
  792. // flex-wrap:wrap;
  793. // .el-image{
  794. // width: 30px;
  795. // }
  796. // }
  797. .toolmain .imgzong .item1{
  798. padding-right: 4px;
  799. padding: 0px 4px ;
  800. }
  801. .imgzong .item1{
  802. padding-right: 4px;
  803. padding: 4px 4px ;
  804. }
  805. .shu{
  806. padding: 4px 10px;
  807. color: #666;
  808. }
  809. .el-tabs__item{
  810. height: 30px;
  811. line-height: 30px;
  812. padding: 0 6px;
  813. color:#b6b6b6;
  814. font-size:15px;
  815. }
  816. }
  817. .maxh221{
  818. max-height: calc(100vh - 76px);
  819. }
  820. .maxh400{
  821. max-height: calc(100vh - 410px);
  822. }
  823. .beij-container {
  824. width: 100%;
  825. height: 100%;
  826. background-color: #fff;
  827. // background: linear-gradient(180deg, #ccd3e2 0%, rgba(255, 255, 255, 0) 100%);
  828. }
  829. .el-footer {
  830. padding: 0;
  831. height: 149px;
  832. overflow-y: auto;
  833. }
  834. .footerTitle {
  835. display: flex;
  836. justify-content: space-between;
  837. padding: 5px 20px;
  838. font-size: 20px;
  839. height: 30px !important;
  840. z-index: 99;
  841. }
  842. .footerTitle div {
  843. display: flex;
  844. justify-content: space-around;
  845. align-items: center;
  846. }
  847. .footerTitle p {
  848. margin: 0;
  849. }
  850. .footerTitle span {
  851. padding: 5px 10px;
  852. cursor: default;
  853. }
  854. .femFooter{
  855. height: 135px !important;
  856. padding: 0;
  857. position: relative;
  858. }
  859. .footerText .el-textarea__inner{
  860. width: 100%;
  861. height: 135px !important;
  862. border: 0;
  863. font-size: 12px;
  864. color: #333;
  865. padding: 2px;
  866. }
  867. </style>
  868. <style>
  869. .selecr .el-form-item__label{
  870. line-height: 36px;
  871. }
  872. .item1 .el-image{
  873. width: 30px;
  874. cursor: pointer;
  875. }
  876. .el-tabs--border-card{
  877. background-color: none;
  878. }
  879. .baoshi{
  880. margin-top: 4px;
  881. color: #b6b6b6;
  882. }
  883. .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{
  884. background-color: #757070;
  885. }
  886. .el-tabs--card>.el-tabs__header .el-tabs__item.is-active{
  887. border-top:1px solid #757070;
  888. border-bottom:none;
  889. border-top: 1px solid transparent;
  890. }
  891. .part-panel-collapse-handle {
  892. border-color: transparent transparent #6f6f6f;
  893. }
  894. .el-dialog__header{
  895. padding: 15px 20px 10px;
  896. background: #757070;
  897. color: #fff
  898. }
  899. .el-button--primary{
  900. background: #757070;
  901. border-color: #757070;
  902. }
  903. .textselsect{
  904. position: absolute;
  905. z-index: 9;
  906. top: 0;
  907. right: 7px;
  908. z-index: 9;
  909. height: 30px;
  910. overflow: hidden;
  911. }
  912. .dialoglocation{
  913. position: absolute;
  914. top: -15vh;
  915. }
  916. .el-dialog__wrapper{
  917. top: 15vh;
  918. }
  919. .el-tree,.dongtia{
  920. background: none;
  921. color: #b6b6b6;
  922. margin-top: 15px;
  923. }
  924. .itemimg1{
  925. padding: 4px;
  926. }
  927. .itemimg1 .item1 .el-image{
  928. width: 20px;
  929. height: 20px;
  930. }
  931. </style>
  932. <style lang="scss" scoped>
  933. /deep/.toolbar-part-detail{
  934. position: relative;
  935. }
  936. .el-form-item{
  937. margin-bottom: 5px;
  938. }
  939. /deep/.left .el-tabs__item{
  940. padding: 0 19.4px !important;
  941. // box-shadow: 0 8px 0 0 #479a48,0 10px 5px 0 rgba(0,0,0,0.5);
  942. box-shadow: 0 10px 5px 0 rgba(0,0,0,0.2);
  943. }
  944. /deep/.left .is-scrollable {
  945. padding:0;
  946. }
  947. /deep/ .left .el-tabs__nav-next,.left .el-tabs__nav-prev{
  948. display: none;
  949. }
  950. /deep/ .left .el-tabs__nav-prev{
  951. display: none;
  952. }
  953. // /deep/ .el-radio+.el-radio{
  954. // margin: 0;
  955. // }
  956. // /deep/ .el-checkbox+.el-checkbox{
  957. // margin: 0;
  958. // }
  959. /deep/.leftsearch .el-button {
  960. background-color: #fff;
  961. }
  962. </style>