123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564 |
- <template>
- <div class="table2-satelliteBasicCalculate ch-box satelliteCompute"
- v-if="commonFunction.getUserConfig($store.state.userOwnMenus, 102).available">
- <div v-show="$store.state.jcfwSatelliteComputeVisible" class="rt-content">
- <div class="title3-pic">
- <i class="el-icon-close" @click="$store.state.jcfwSatelliteComputeVisible = false"></i>
- </div>
- <div class="table3-area">
- <div class="table3-passway">
- <div class="table3-passway-info">
- <el-table ref="tableRef" :data="tableData" tooltip-effect="light" style="width: 100%" height="350">
- <!-- <el-table-column type="selection" width="55" align="center"></el-table-column> -->
- <el-table-column v-for="(col, i) in cols" :key="i" :prop="col.prop" :label="col.label"
- :sortable="col.sortable" :width="col.width" :show-overflow-tooltip="col.isTooltip" align="center"> </el-table-column>
- <el-table-column label="操作" v-if="operateConfig.operate">
- <template slot-scope="{row}">
- <el-dropdown v-if="operateConfig.passWay" trigger="click" @command="getPasswayComputeMethod">
- <el-button size="mini" @click="handleGetRow(row)">轨道计算<i class="el-icon-arrow-down"></i></el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item v-if="operateConfig.eph" command="eph">卫星星历计算</el-dropdown-item>
- <el-dropdown-item v-if="operateConfig.subsp" command="subsp">卫星星下点计算</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <el-dropdown v-if="operateConfig.forecastStation" trigger="click" @command="getCurveComputeMethod">
- <el-button class="operate-bnt" size="mini" @click="handleGetRow(row)">测站预报<i
- class="el-icon-arrow-down"></i></el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item v-if="operateConfig.station" command="dmz">地面站</el-dropdown-item>
- <el-dropdown-item v-if="operateConfig.midsatellite" command="zjwx">中继卫星</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <el-dialog title="请选择轨道计算时间" :visible.sync="passwayDialogVisible" width="450px"
- :before-close="passwayCancel">
- <div class="passwayDatePicker">
- <el-date-picker v-model="passwayDatetimeRange" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
- start-placeholder="开始时间" end-placeholder="结束时间" :default-time="['12:00:00', '12:00:00']">
- </el-date-picker>
- </div>
- <div slot="footer">
- <el-button @click="passwayCancel">取 消</el-button>
- <el-button type="primary" @click="passwayCompute">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog title="" :visible.sync="curveDialogVisible" width="450px" :before-close="curveCancel">
- <div class="curveDateGather">
- <div class="curveDialogSelectStation" v-show="curveComputeMethod === 'dmz'">
- <div class="curveDialogFont">请选择地面站</div>
- <el-select v-model="selStations" placeholder="请选择" multiple collapse-tags>
- <el-option v-for="item in stationOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="curveDialogSelectMidStation" v-show="curveComputeMethod === 'zjwx'">
- <div class="curveDialogFont">请选择中继卫星</div>
- <el-select v-model="selMidStations" placeholder="请选择" multiple collapse-tags>
- <el-option v-for="item in midStationOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div style="width:50px;height:10px"></div>
- <div class="curveDialogFont">请选择测站预报计算时间</div>
- <el-date-picker v-model="curveDateTimeRange" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
- start-placeholder="开始时间" end-placeholder="结束时间" :default-time="['12:00:00', '12:00:00']">
- </el-date-picker>
- </div>
- <div slot="footer">
- <el-button @click="curveCancel">取 消</el-button>
- <el-button type="primary" @click="curveConfirm">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { getNewestInstance, postJcfwXLcompute, postJcfwXXDcompute, getZJWXtype, postJcfwCZYBdmzCompute, postJcfwMidSatelliteCompute } from '@/api/jcfwApi.js';
- import { mapState } from 'vuex';
- export default {
- name: "satelliteCompute",
- components: {},
- data() {
- return {
- operateConfig: {
- operate: true,
- passWay: true,
- forecastStation: true,
- eph: true,
- subsp: true,
- station: true,
- midsatellite: true,
- },
- cols: [
- {
- prop: 'satelliteCode',
- label: '卫星代号',
- sortable: true,
- width: 100
- },
- {
- prop: 'orbitNum',
- label: '圈号',
- sortable: false,
- width: 90
- },
- {
- prop: 'epochTime',
- label: '历元时刻',
- sortable: false,
- width: 120,
- isTooltip: true,
- },
- {
- prop: 'semiMajorAxis',
- label: "半长轴\n(m)",
- sortable: false,
- width: 100
- },
- {
- prop: 'inclination',
- label: '轨道倾角\n(°)',
- sortable: false,
- width: 100
- },
- {
- prop: 'eccentricityUse',
- label: '偏心率\n(%)',
- sortable: false,
- width: 90
- },
- {
- prop: 'raan',
- label: "升交点赤经(°)",
- sortable: false,
- width: 110,
- isTooltip: true,
- },
- {
- prop: 'argumentOfPerigee',
- label: "近地点辐角(°)",
- sortable: false,
- width: 110,
- isTooltip: true,
- },
- {
- prop: 'meanAnoMaly',
- label: "平近点角(°)",
- sortable: false,
- width: 100,
- isTooltip: true,
- },
- ],
- tableData: [],
- selRow: {},
- passwayComputeMethod: '',
- curveComputeMethod: '',
- passwayDialogVisible: false,
- passwayDatetimeRange: '',
- passwayLoading: null,
- stationOptions: [],
- curveDialogVisible: false,
- selStations: [],
- midStationOptions: [],
- selMidStations: [],
- curveDateTimeRange: '',
- CZYBLoading: null,
- };
- },
- computed: {
- // ...mapState('jcfw', ['stationNames']),
- },
- watch: {
- },
- methods: {
- handleGetRow(row) {
- this.selRow = row;
- },
- getPasswayComputeMethod(command) {
- this.passwayComputeMethod = command;
- this.passwayDialogVisible = true;
- },
- getCurveComputeMethod(command) {
- this.curveComputeMethod = command;
- this.curveDialogVisible = true;
- },
- passwayCancel() {
- this.passwayDatetimeRange = '';
- this.passwayDialogVisible = false;
- },
- passwayCompute() {
- this.passwayLoading = this.$loading({
- lock: true,
- text: "卫星轨道计算努力计算中",
- spinner: 'el-icon-loading',
- background: 'rgba(0,0,0,0.8)'
- });
- let data = {
- satelliteCodes: [this.selRow.satelliteCode],
- startTime: this.passwayDatetimeRange[0],
- endTime: this.passwayDatetimeRange[1],
- }
- if (this.passwayComputeMethod === 'eph') {
- postJcfwXLcompute(data).then(res => {
- this.passwayLoading.close();
- this.$message.success(res.resp);
- })
- }
- if (this.passwayComputeMethod === 'subsp') {
- postJcfwXXDcompute(data).then(res => {
- this.passwayLoading.close();
- this.$message.success(res.resp);
- })
- }
- // const loading = this.$loading({
- // lock: true,
- // text: "卫星轨道计算努力计算中",
- // spinner: 'el-icon-loading',
- // background: 'rgba(0,0,0,0.8)'
- // })
- // setTimeout(() => {
- // loading.close()
- // }, 2000)
- this.passwayCancel();
- },
- curveCancel() {
- this.selMidStations = [];
- this.curveDateTimeRange = '';
- this.selStations = [];
- this.curveDialogVisible = false;
- },
- curveConfirm() {
- if (this.curveComputeMethod === 'dmz' && this.selStations.length === 0) {
- this.$message.warning('请选择地面站!');
- return;
- }
- if (this.curveComputeMethod === 'zjwx' && this.selMidStations.length === 0) {
- this.$message.warning('请选择中继星!');
- return;
- }
- if (!this.curveDateTimeRange) {
- this.$message.warning('请选择时间!');
- return;
- }
- this.curveDialogVisible = false;
- this.CZYBLoading = this.$loading({
- lock: true,
- text: "测站预报努力计算中",
- spinner: 'el-icon-loading',
- background: 'rgba(0,0,0,0.8)'
- });
- let data = {};
- switch (this.curveComputeMethod) {
- case 'dmz':
- data = {
- satelliteCodes: [this.selRow.satelliteCode],
- stationIds: this.selStations,
- startTime: this.curveDateTimeRange[0],
- endTime: this.curveDateTimeRange[1],
- };
- postJcfwCZYBdmzCompute(data).then(res => {
- if (res.code === 200) {
- this.$message.success(res.resp);
- this.CZYBLoading.close();
- this.curveCancel();
- }
- });
- break;
- case 'zjwx':
- data = {
- satelliteCodes: [this.selRow.satelliteCode],
- stationIds: this.selMidStations,
- startTime: this.curveDateTimeRange[0],
- endTime: this.curveDateTimeRange[1],
- };
- postJcfwMidSatelliteCompute(data).then(res => {
- if (res.code === 200) {
- this.$message.success(res.resp ? res.resp : '计算成功');
- this.CZYBLoading.close();
- this.curveCancel();
- }
- });
- break;
- default:
- break;
- }
- // console.log("测站预报收集到的用户数据:", data);
- // const loading = this.$loading({
- // lock: true,
- // text: "测站预报努力计算中",
- // spinner: 'el-icon-loading',
- // background: 'rgba(0,0,0,0.8)'
- // })
- // setTimeout(() => {
- // loading.close()
- // }, 2000)
- },
- //查询地面站和中继卫星列表,用于测站预报选择
- getSatelliteTypes(){
- getZJWXtype({resourceType:0}).then(res => {
- if (res.code === 200) {
- this.stationOptions = [];
- res.resp.forEach(element => {
- this.stationOptions.push(
- {
- value: element.id,
- label: element.stationName,
- }
- );
- });
- }
- });
- getZJWXtype({resourceType:1}).then(res => {
- if (res.code === 200) {
- this.midStationOptions = [];
- res.resp.forEach(element => {
- this.midStationOptions.push(
- {
- value: element.id,
- label: element.stationName,
- }
- );
- });
- }
- });
- },
- initOperateConfig() {
- this.operateConfig.operate = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 1009).available || this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 1010).available;
- this.operateConfig.passWay = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 1009).available;
- this.operateConfig.forecastStation = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 1010).available;
- this.operateConfig.eph = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 10001).available;
- this.operateConfig.subsp = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 10002).available;
- this.operateConfig.station = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 10003).available;
- this.operateConfig.midsatellite = this.commonFunction.getUserConfig(this.$store.state.userOwnMenus, 10004).available;
- },
- getList() {
- getNewestInstance().then(res => {
- if (res.code === 200 && res.resp) {
- this.tableData = res.resp;
- this.tableData.forEach(item => {
- item.eccentricityUse = (parseFloat(item.eccentricity) * 100).toFixed(5);
- });
- } else {
- this.$message.warning(res.message);
- }
- })
- }
- },
- mounted() {
- this.getList();
- this.initOperateConfig();
- this.getSatelliteTypes();
- }
- };
- </script>
- <style lang='scss' scoped>
- .table2-satelliteBasicCalculate {
- width: 52%;
- margin: 0 auto;
- padding-top: 20px;
- .rt-content {
- position: absolute;
- bottom: 0;
- }
- }
- .title3-pic {
- width: 100%;
- height: 36px;
- background: url("@/assets/ClipImage/biaoti/weixingjichujisuan.png") no-repeat;
- background-size: 100% 100%;
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- .el-icon-close {
- cursor: pointer;
- }
- }
- .table3-area {
- width: 100%;
- height: calc(100% - 36px);
- margin-top: 10px;
- background: url("@/assets/ClipImage/dikuang/weixingjichujisuan.png") no-repeat;
- background-size: 100% 100%;
- /deep/ .curveDateGather {
- /deep/ .el-dialog__body {
- padding: 4px 20px 30px;
- }
- .curveDialogFont {
- font-size: 16px;
- color: #000;
- margin: 10px 0;
- }
- .curveDialogSelectStation,
- .curveDialogSelectMidStation {
- /deep/ .el-input__inner {
- border-radius: 2px;
- background-color: transparent;
- color: rgb(40, 40, 40);
- border: 1px solid rgb(140, 140, 140);
- height: 36px;
- width: 400px;
- }
- }
- }
- .change-tip {
- width: 980px;
- height: 44px;
- // background: url("@/assets/ClipImage/tubiao/guidaojisuan.png") no-repeat;
- // background-size: 100% 100%;
- padding-top: 10px;
- margin: 0px auto;
- .satellite-passway {
- margin-left: 90px;
- font-family: SourceHanSansCN-Bold;
- font-size: 16;
- }
- .inout-curve {
- margin-left: 114px;
- font-family: SourceHanSansCN-Bold;
- font-size: 16;
- }
- }
- .table3-passway {
- width: 1080px;
- height: 370px;
- margin: 0 auto;
- .table3-buttons {
- height: 40px;
- line-height: 40px;
- margin-bottom: 10px;
- .passway-computemethod {
- width: 150px;
- margin-right: 20px;
- .el-icon--right {
- float: right;
- margin-right: 6px;
- }
- }
- }
- .table3-passway-info {
- width: 1080px;
- height: 370px;
- }
- .passwayDatePicker {
- /deep/ .el-dialog {
- margin-top: 35vh;
- }
- /deep/ .el-input__inner,
- .el-date-editor--datetimerange {
- height: 40px;
- }
- /deep/ .el-date-editor .el-range__icon {
- color: white;
- line-height: 24px;
- }
- /deep/ .el-date-editor .el-range-separator {
- height: 24px;
- line-height: 24px;
- }
- /deep/ .el-date-editor .el-range__close-icon {
- color: white;
- height: 32px;
- }
- }
- }
- .table3-curve {
- width: 980px;
- height: 380px;
- margin: 0 auto;
- .table3-buttons {
- height: 40px;
- line-height: 40px;
- margin-bottom: 10px;
- /deep/ .curveEarthBase-dropdown {
- // width: 110px;
- width: 150px;
- height: 32px;
- margin-right: 20px;
- .el-icon--right {
- float: right;
- margin-right: 6px;
- }
- }
- /deep/ .curveMidSatellite-dropdown {
- width: 110px;
- height: 32px;
- margin-right: 10px;
- .el-icon--right {
- float: right;
- margin-right: 6px;
- }
- }
- .curveMidSatellite-dropdownMenu {
- z-index: 1;
- width: 110px;
- // height: 310px;
- height: 224px;
- background-color: #557388;
- border-radius: 2px;
- border: solid 1px #ffffff;
- position: relative;
- // margin-left:130px;
- margin-left: 170px;
- padding-left: 6px;
- box-sizing: border-box;
- /deep/ .el-checkbox {
- font-family: 'SourceHanSansCN-Regular';
- font-size: 12px;
- color: #fff;
- }
- }
- }
- .table3-curve-info {
- width: 980px;
- height: 330px;
- }
- }
- }
- </style>
|