satelliteCompute.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. <template>
  2. <div class="table2-satelliteBasicCalculate ch-box satelliteCompute"
  3. v-if="commonFunction.getUserConfig($store.state.userOwnMenus, 102).available">
  4. <div v-show="$store.state.jcfwSatelliteComputeVisible" class="rt-content">
  5. <div class="title3-pic">
  6. <i class="el-icon-close" @click="$store.state.jcfwSatelliteComputeVisible = false"></i>
  7. </div>
  8. <div class="table3-area">
  9. <div class="table3-passway">
  10. <div class="table3-passway-info">
  11. <el-table ref="tableRef" :data="tableData" tooltip-effect="light" style="width: 100%" height="350">
  12. <!-- <el-table-column type="selection" width="55" align="center"></el-table-column> -->
  13. <el-table-column v-for="(col, i) in cols" :key="i" :prop="col.prop" :label="col.label"
  14. :sortable="col.sortable" :width="col.width" :show-overflow-tooltip="col.isTooltip" align="center"> </el-table-column>
  15. <el-table-column label="操作" v-if="operateConfig.operate">
  16. <template slot-scope="{row}">
  17. <el-dropdown v-if="operateConfig.passWay" trigger="click" @command="getPasswayComputeMethod">
  18. <el-button size="mini" @click="handleGetRow(row)">轨道计算<i class="el-icon-arrow-down"></i></el-button>
  19. <el-dropdown-menu slot="dropdown">
  20. <el-dropdown-item v-if="operateConfig.eph" command="eph">卫星星历计算</el-dropdown-item>
  21. <el-dropdown-item v-if="operateConfig.subsp" command="subsp">卫星星下点计算</el-dropdown-item>
  22. </el-dropdown-menu>
  23. </el-dropdown>
  24. <el-dropdown v-if="operateConfig.forecastStation" trigger="click" @command="getCurveComputeMethod">
  25. <el-button class="operate-bnt" size="mini" @click="handleGetRow(row)">测站预报<i
  26. class="el-icon-arrow-down"></i></el-button>
  27. <el-dropdown-menu slot="dropdown">
  28. <el-dropdown-item v-if="operateConfig.station" command="dmz">地面站</el-dropdown-item>
  29. <el-dropdown-item v-if="operateConfig.midsatellite" command="zjwx">中继卫星</el-dropdown-item>
  30. </el-dropdown-menu>
  31. </el-dropdown>
  32. </template>
  33. </el-table-column>
  34. </el-table>
  35. </div>
  36. </div>
  37. <el-dialog title="请选择轨道计算时间" :visible.sync="passwayDialogVisible" width="450px"
  38. :before-close="passwayCancel">
  39. <div class="passwayDatePicker">
  40. <el-date-picker v-model="passwayDatetimeRange" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
  41. start-placeholder="开始时间" end-placeholder="结束时间" :default-time="['12:00:00', '12:00:00']">
  42. </el-date-picker>
  43. </div>
  44. <div slot="footer">
  45. <el-button @click="passwayCancel">取 消</el-button>
  46. <el-button type="primary" @click="passwayCompute">确 定</el-button>
  47. </div>
  48. </el-dialog>
  49. <el-dialog title="" :visible.sync="curveDialogVisible" width="450px" :before-close="curveCancel">
  50. <div class="curveDateGather">
  51. <div class="curveDialogSelectStation" v-show="curveComputeMethod === 'dmz'">
  52. <div class="curveDialogFont">请选择地面站</div>
  53. <el-select v-model="selStations" placeholder="请选择" multiple collapse-tags>
  54. <el-option v-for="item in stationOptions" :key="item.value" :label="item.label" :value="item.value">
  55. </el-option>
  56. </el-select>
  57. </div>
  58. <div class="curveDialogSelectMidStation" v-show="curveComputeMethod === 'zjwx'">
  59. <div class="curveDialogFont">请选择中继卫星</div>
  60. <el-select v-model="selMidStations" placeholder="请选择" multiple collapse-tags>
  61. <el-option v-for="item in midStationOptions" :key="item.value" :label="item.label" :value="item.value">
  62. </el-option>
  63. </el-select>
  64. </div>
  65. <div style="width:50px;height:10px"></div>
  66. <div class="curveDialogFont">请选择测站预报计算时间</div>
  67. <el-date-picker v-model="curveDateTimeRange" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
  68. start-placeholder="开始时间" end-placeholder="结束时间" :default-time="['12:00:00', '12:00:00']">
  69. </el-date-picker>
  70. </div>
  71. <div slot="footer">
  72. <el-button @click="curveCancel">取 消</el-button>
  73. <el-button type="primary" @click="curveConfirm">确 定</el-button>
  74. </div>
  75. </el-dialog>
  76. </div>
  77. </div>
  78. </div>
  79. </template>
  80. <script>
  81. import { getNewestInstance, postJcfwXLcompute, postJcfwXXDcompute, getZJWXtype, postJcfwCZYBdmzCompute, postJcfwMidSatelliteCompute } from '@/api/jcfwApi.js';
  82. import { mapState } from 'vuex';
  83. export default {
  84. name: "satelliteCompute",
  85. components: {},
  86. data() {
  87. return {
  88. operateConfig: {
  89. operate: true,
  90. passWay: true,
  91. forecastStation: true,
  92. eph: true,
  93. subsp: true,
  94. station: true,
  95. midsatellite: true,
  96. },
  97. cols: [
  98. {
  99. prop: 'satelliteCode',
  100. label: '卫星代号',
  101. sortable: true,
  102. width: 100
  103. },
  104. {
  105. prop: 'orbitNum',
  106. label: '圈号',
  107. sortable: false,
  108. width: 90
  109. },
  110. {
  111. prop: 'epochTime',
  112. label: '历元时刻',
  113. sortable: false,
  114. width: 120,
  115. isTooltip: true,
  116. },
  117. {
  118. prop: 'semiMajorAxis',
  119. label: "半长轴\n(m)",
  120. sortable: false,
  121. width: 100
  122. },
  123. {
  124. prop: 'inclination',
  125. label: '轨道倾角\n(°)',
  126. sortable: false,
  127. width: 100
  128. },
  129. {
  130. prop: 'eccentricityUse',
  131. label: '偏心率\n(%)',
  132. sortable: false,
  133. width: 90
  134. },
  135. {
  136. prop: 'raan',
  137. label: "升交点赤经(°)",
  138. sortable: false,
  139. width: 110,
  140. isTooltip: true,
  141. },
  142. {
  143. prop: 'argumentOfPerigee',
  144. label: "近地点辐角(°)",
  145. sortable: false,
  146. width: 110,
  147. isTooltip: true,
  148. },
  149. {
  150. prop: 'meanAnoMaly',
  151. label: "平近点角(°)",
  152. sortable: false,
  153. width: 100,
  154. isTooltip: true,
  155. },
  156. ],
  157. tableData: [],
  158. selRow: {},
  159. passwayComputeMethod: '',
  160. curveComputeMethod: '',
  161. passwayDialogVisible: false,
  162. passwayDatetimeRange: '',
  163. passwayLoading: null,
  164. stationOptions: [],
  165. curveDialogVisible: false,
  166. selStations: [],
  167. midStationOptions: [],
  168. selMidStations: [],
  169. curveDateTimeRange: '',
  170. CZYBLoading: null,
  171. };
  172. },
  173. computed: {
  174. // ...mapState('jcfw', ['stationNames']),
  175. },
  176. watch: {
  177. },
  178. methods: {
  179. handleGetRow(row) {
  180. this.selRow = row;
  181. },
  182. getPasswayComputeMethod(command) {
  183. this.passwayComputeMethod = command;
  184. this.passwayDialogVisible = true;
  185. },
  186. getCurveComputeMethod(command) {
  187. this.curveComputeMethod = command;
  188. this.curveDialogVisible = true;
  189. },
  190. passwayCancel() {
  191. this.passwayDatetimeRange = '';
  192. this.passwayDialogVisible = false;
  193. },
  194. passwayCompute() {
  195. this.passwayLoading = this.$loading({
  196. lock: true,
  197. text: "卫星轨道计算努力计算中",
  198. spinner: 'el-icon-loading',
  199. background: 'rgba(0,0,0,0.8)'
  200. });
  201. let data = {
  202. satelliteCodes: [this.selRow.satelliteCode],
  203. startTime: this.passwayDatetimeRange[0],
  204. endTime: this.passwayDatetimeRange[1],
  205. }
  206. if (this.passwayComputeMethod === 'eph') {
  207. postJcfwXLcompute(data).then(res => {
  208. this.passwayLoading.close();
  209. this.$message.success(res.resp);
  210. })
  211. }
  212. if (this.passwayComputeMethod === 'subsp') {
  213. postJcfwXXDcompute(data).then(res => {
  214. this.passwayLoading.close();
  215. this.$message.success(res.resp);
  216. })
  217. }
  218. // const loading = this.$loading({
  219. // lock: true,
  220. // text: "卫星轨道计算努力计算中",
  221. // spinner: 'el-icon-loading',
  222. // background: 'rgba(0,0,0,0.8)'
  223. // })
  224. // setTimeout(() => {
  225. // loading.close()
  226. // }, 2000)
  227. this.passwayCancel();
  228. },
  229. curveCancel() {
  230. this.selMidStations = [];
  231. this.curveDateTimeRange = '';
  232. this.selStations = [];
  233. this.curveDialogVisible = false;
  234. },
  235. curveConfirm() {
  236. if (this.curveComputeMethod === 'dmz' && this.selStations.length === 0) {
  237. this.$message.warning('请选择地面站!');
  238. return;
  239. }
  240. if (this.curveComputeMethod === 'zjwx' && this.selMidStations.length === 0) {
  241. this.$message.warning('请选择中继星!');
  242. return;
  243. }
  244. if (!this.curveDateTimeRange) {
  245. this.$message.warning('请选择时间!');
  246. return;
  247. }
  248. this.curveDialogVisible = false;
  249. this.CZYBLoading = this.$loading({
  250. lock: true,
  251. text: "测站预报努力计算中",
  252. spinner: 'el-icon-loading',
  253. background: 'rgba(0,0,0,0.8)'
  254. });
  255. let data = {};
  256. switch (this.curveComputeMethod) {
  257. case 'dmz':
  258. data = {
  259. satelliteCodes: [this.selRow.satelliteCode],
  260. stationIds: this.selStations,
  261. startTime: this.curveDateTimeRange[0],
  262. endTime: this.curveDateTimeRange[1],
  263. };
  264. postJcfwCZYBdmzCompute(data).then(res => {
  265. if (res.code === 200) {
  266. this.$message.success(res.resp);
  267. this.CZYBLoading.close();
  268. this.curveCancel();
  269. }
  270. });
  271. break;
  272. case 'zjwx':
  273. data = {
  274. satelliteCodes: [this.selRow.satelliteCode],
  275. stationIds: this.selMidStations,
  276. startTime: this.curveDateTimeRange[0],
  277. endTime: this.curveDateTimeRange[1],
  278. };
  279. postJcfwMidSatelliteCompute(data).then(res => {
  280. if (res.code === 200) {
  281. this.$message.success(res.resp ? res.resp : '计算成功');
  282. this.CZYBLoading.close();
  283. this.curveCancel();
  284. }
  285. });
  286. break;
  287. default:
  288. break;
  289. }
  290. // console.log("测站预报收集到的用户数据:", data);
  291. // const loading = this.$loading({
  292. // lock: true,
  293. // text: "测站预报努力计算中",
  294. // spinner: 'el-icon-loading',
  295. // background: 'rgba(0,0,0,0.8)'
  296. // })
  297. // setTimeout(() => {
  298. // loading.close()
  299. // }, 2000)
  300. },
  301. //查询地面站和中继卫星列表,用于测站预报选择
  302. getSatelliteTypes(){
  303. getZJWXtype({resourceType:0}).then(res => {
  304. if (res.code === 200) {
  305. this.stationOptions = [];
  306. res.resp.forEach(element => {
  307. this.stationOptions.push(
  308. {
  309. value: element.id,
  310. label: element.stationName,
  311. }
  312. );
  313. });
  314. }
  315. });
  316. getZJWXtype({resourceType:1}).then(res => {
  317. if (res.code === 200) {
  318. this.midStationOptions = [];
  319. res.resp.forEach(element => {
  320. this.midStationOptions.push(
  321. {
  322. value: element.id,
  323. label: element.stationName,
  324. }
  325. );
  326. });
  327. }
  328. });
  329. },
  330. initOperateConfig() {
  331. this.operateConfig.operate = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 1009).available || this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 1010).available;
  332. this.operateConfig.passWay = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 1009).available;
  333. this.operateConfig.forecastStation = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 1010).available;
  334. this.operateConfig.eph = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 10001).available;
  335. this.operateConfig.subsp = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 10002).available;
  336. this.operateConfig.station = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 10003).available;
  337. this.operateConfig.midsatellite = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 10004).available;
  338. },
  339. getList() {
  340. getNewestInstance().then(res => {
  341. if (res.code === 200 && res.resp) {
  342. this.tableData = res.resp;
  343. this.tableData.forEach(item => {
  344. item.eccentricityUse = (parseFloat(item.eccentricity) * 100).toFixed(5);
  345. });
  346. } else {
  347. this.$message.warning(res.message);
  348. }
  349. })
  350. }
  351. },
  352. mounted() {
  353. this.getList();
  354. this.initOperateConfig();
  355. this.getSatelliteTypes();
  356. }
  357. };
  358. </script>
  359. <style lang='scss' scoped>
  360. .table2-satelliteBasicCalculate {
  361. width: 52%;
  362. margin: 0 auto;
  363. padding-top: 20px;
  364. .rt-content {
  365. position: absolute;
  366. bottom: 0;
  367. }
  368. }
  369. .title3-pic {
  370. width: 100%;
  371. height: 36px;
  372. background: url("@/assets/ClipImage/biaoti/weixingjichujisuan.png") no-repeat;
  373. background-size: 100% 100%;
  374. display: flex;
  375. flex-direction: row-reverse;
  376. align-items: center;
  377. .el-icon-close {
  378. cursor: pointer;
  379. }
  380. }
  381. .table3-area {
  382. width: 100%;
  383. height: calc(100% - 36px);
  384. margin-top: 10px;
  385. background: url("@/assets/ClipImage/dikuang/weixingjichujisuan.png") no-repeat;
  386. background-size: 100% 100%;
  387. /deep/ .curveDateGather {
  388. /deep/ .el-dialog__body {
  389. padding: 4px 20px 30px;
  390. }
  391. .curveDialogFont {
  392. font-size: 16px;
  393. color: #000;
  394. margin: 10px 0;
  395. }
  396. .curveDialogSelectStation,
  397. .curveDialogSelectMidStation {
  398. /deep/ .el-input__inner {
  399. border-radius: 2px;
  400. background-color: transparent;
  401. color: rgb(40, 40, 40);
  402. border: 1px solid rgb(140, 140, 140);
  403. height: 36px;
  404. width: 400px;
  405. }
  406. }
  407. }
  408. .change-tip {
  409. width: 980px;
  410. height: 44px;
  411. // background: url("@/assets/ClipImage/tubiao/guidaojisuan.png") no-repeat;
  412. // background-size: 100% 100%;
  413. padding-top: 10px;
  414. margin: 0px auto;
  415. .satellite-passway {
  416. margin-left: 90px;
  417. font-family: SourceHanSansCN-Bold;
  418. font-size: 16;
  419. }
  420. .inout-curve {
  421. margin-left: 114px;
  422. font-family: SourceHanSansCN-Bold;
  423. font-size: 16;
  424. }
  425. }
  426. .table3-passway {
  427. width: 1080px;
  428. height: 370px;
  429. margin: 0 auto;
  430. .table3-buttons {
  431. height: 40px;
  432. line-height: 40px;
  433. margin-bottom: 10px;
  434. .passway-computemethod {
  435. width: 150px;
  436. margin-right: 20px;
  437. .el-icon--right {
  438. float: right;
  439. margin-right: 6px;
  440. }
  441. }
  442. }
  443. .table3-passway-info {
  444. width: 1080px;
  445. height: 370px;
  446. }
  447. .passwayDatePicker {
  448. /deep/ .el-dialog {
  449. margin-top: 35vh;
  450. }
  451. /deep/ .el-input__inner,
  452. .el-date-editor--datetimerange {
  453. height: 40px;
  454. }
  455. /deep/ .el-date-editor .el-range__icon {
  456. color: white;
  457. line-height: 24px;
  458. }
  459. /deep/ .el-date-editor .el-range-separator {
  460. height: 24px;
  461. line-height: 24px;
  462. }
  463. /deep/ .el-date-editor .el-range__close-icon {
  464. color: white;
  465. height: 32px;
  466. }
  467. }
  468. }
  469. .table3-curve {
  470. width: 980px;
  471. height: 380px;
  472. margin: 0 auto;
  473. .table3-buttons {
  474. height: 40px;
  475. line-height: 40px;
  476. margin-bottom: 10px;
  477. /deep/ .curveEarthBase-dropdown {
  478. // width: 110px;
  479. width: 150px;
  480. height: 32px;
  481. margin-right: 20px;
  482. .el-icon--right {
  483. float: right;
  484. margin-right: 6px;
  485. }
  486. }
  487. /deep/ .curveMidSatellite-dropdown {
  488. width: 110px;
  489. height: 32px;
  490. margin-right: 10px;
  491. .el-icon--right {
  492. float: right;
  493. margin-right: 6px;
  494. }
  495. }
  496. .curveMidSatellite-dropdownMenu {
  497. z-index: 1;
  498. width: 110px;
  499. // height: 310px;
  500. height: 224px;
  501. background-color: #557388;
  502. border-radius: 2px;
  503. border: solid 1px #ffffff;
  504. position: relative;
  505. // margin-left:130px;
  506. margin-left: 170px;
  507. padding-left: 6px;
  508. box-sizing: border-box;
  509. /deep/ .el-checkbox {
  510. font-family: 'SourceHanSansCN-Regular';
  511. font-size: 12px;
  512. color: #fff;
  513. }
  514. }
  515. }
  516. .table3-curve-info {
  517. width: 980px;
  518. height: 330px;
  519. }
  520. }
  521. }
  522. </style>