瀏覽代碼

Merge branch 'master' of http://43.143.235.246:9080/xyh/fireManage

wuxiang 2 年之前
父節點
當前提交
b626e7c558
共有 3 個文件被更改,包括 294 次插入222 次删除
  1. 17 0
      src/api/fireController.js
  2. 143 156
      src/views/onlineForm/formRender/onlineFormMixins.js
  3. 134 66
      src/views/situation/index.vue

+ 17 - 0
src/api/fireController.js

@@ -0,0 +1,17 @@
+export default class fireController {
+  static center (sender, params, axiosOption, httpOption) {
+    return sender.doUrl('/admin/online/onlineOperation/listByDatasourceId/center', 'post', params, axiosOption, httpOption);
+  }
+  
+  static unit (sender, params, axiosOption, httpOption) {
+    return sender.doUrl('/admin/online/onlineOperation/listByDatasourceId/mainUnit', 'post', params, axiosOption, httpOption);
+  }
+  
+  static satellite (sender, params, axiosOption, httpOption) {
+    return sender.doUrl('/admin/online/onlineOperation/listByDatasourceId/satellite', 'post', params, axiosOption, httpOption);
+  }
+  
+  static situation (sender, params, axiosOption, httpOption) {
+    return sender.doUrl('/admin/online/onlineOperation/listByDatasourceId/main', 'post', params, axiosOption, httpOption);
+  }
+}

+ 143 - 156
src/views/onlineForm/formRender/onlineFormMixins.js

@@ -28,14 +28,14 @@ const OnlineFormMixins = {
     }
   },
   mixins: [uploadMixin],
-  data() {
+  data () {
     return {
       isLoading: true,
       formData: {},
       rules: {},
       components_json: {},
-      blueunit:[],
-      redunit:[],
+      blueunit: [],
+      redunit: [],
       component_movementjson: {},
       formConfig: {
         formType: undefined,
@@ -62,13 +62,13 @@ const OnlineFormMixins = {
     }
   },
   methods: {
-    getFormData() {
+    getFormData () {
       return this.formData;
     },
-    getPermCode(widget, operation) {
+    getPermCode (widget, operation) {
       return getOperationPermCode(widget, operation);
     },
-    loadOnlineFormData() {
+    loadOnlineFormData () {
       return new Promise((resolve, reject) => {
         OnlineFormController.render(this, {
           formId: this.formId
@@ -178,7 +178,7 @@ const OnlineFormMixins = {
         });
       });
     },
-    initWidget(widget, formConfig) {
+    initWidget (widget, formConfig) {
       if (widget != null) {
         if (widget.datasourceId) widget.datasource = this.datasourceMap.get(widget.datasourceId);
         if (widget.relationId) {
@@ -339,7 +339,7 @@ const OnlineFormMixins = {
         }
       }
     },
-    initFormWidgetList(formConfig) {
+    initFormWidgetList (formConfig) {
       this.errorMessage = [];
       if (Array.isArray(formConfig.formWidgetList)) {
         formConfig.formWidgetList.forEach(widget => {
@@ -353,7 +353,7 @@ const OnlineFormMixins = {
         console.error(this.errorMessage);
       }
     },
-    buildRuleItem(widget, rule) {
+    buildRuleItem (widget, rule) {
       if (rule.propDataJson) rule.data = JSON.parse(rule.propDataJson);
       if (widget != null && rule != null) {
         switch (rule.onlineRule.ruleType) {
@@ -378,7 +378,7 @@ const OnlineFormMixins = {
         }
       }
     },
-    buildWidgetRule(widget, rules) {
+    buildWidgetRule (widget, rules) {
       if (widget != null && widget.column != null) {
         let widgetRuleKey = (widget.relation ? widget.relation.variableName + '__' : '') + widget.column.columnName;
         // 必填字段以及设置了验证规则的字段
@@ -400,7 +400,7 @@ const OnlineFormMixins = {
         }
       }
     },
-    initWidgetRule(formConfig) {
+    initWidgetRule (formConfig) {
       if (Array.isArray(formConfig.formWidgetList)) {
         let rules = {};
         formConfig.formWidgetList.forEach(widget => {
@@ -412,9 +412,9 @@ const OnlineFormMixins = {
         });
       }
     },
-    initFormDatasourceData(formConfig) {
+    initFormDatasourceData (formConfig) {
       let that = this;
-      function addFormDataByColumn(retObj, column, relation) {
+      function addFormDataByColumn (retObj, column, relation) {
         let fieldName = (relation ? relation.variableName + '__' : '') + column.columnName;
         if (retObj == null) retObj = {};
         if (formConfig.formType === that.SysOnlineFormType.QUERY) {
@@ -455,7 +455,7 @@ const OnlineFormMixins = {
       }
       this.$set(this, 'formData', datasourceFormData);
     },
-    initWidgetLinkage(formConfig) {
+    initWidgetLinkage (formConfig) {
       this.linkageMap.forEach((widgetList, key) => {
         let column = this.columnMap.get(key);
         let watchKey = null;
@@ -479,7 +479,7 @@ const OnlineFormMixins = {
         });
       });
     },
-    initFormData(formConfig) {
+    initFormData (formConfig) {
       this.masterTable = this.tableMap.get(formConfig.masterTableId);
       // 初始化表单数据
       this.initFormDatasourceData(formConfig);
@@ -489,32 +489,32 @@ const OnlineFormMixins = {
       // 初始化校验信息
       this.initWidgetRule(formConfig);
     },
-    getParamValue(valueType, valueData) {
+    getParamValue (valueType, valueData) {
       switch (valueType) {
         case this.SysOnlineParamValueType.FORM_PARAM:
           return this.params ? this.params[valueData] : undefined;
         case this.SysOnlineParamValueType.TABLE_COLUMN:
-          {
-            let column = this.columnMap.get(valueData);
-            let columnValue = null;
-            if (this.formConfig.formType === this.SysOnlineFormType.QUERY) {
-              columnValue = this.formData.formFilterCopy[column.columnName];
-            } else {
-              columnValue = this.formData[column.columnName];
-            }
-            if (column == null || columnValue == null || columnValue === '') {
-              return null;
-            } else {
-              return columnValue;
-            }
+        {
+          let column = this.columnMap.get(valueData);
+          let columnValue = null;
+          if (this.formConfig.formType === this.SysOnlineFormType.QUERY) {
+            columnValue = this.formData.formFilterCopy[column.columnName];
+          } else {
+            columnValue = this.formData[column.columnName];
           }
+          if (column == null || columnValue == null || columnValue === '') {
+            return null;
+          } else {
+            return columnValue;
+          }
+        }
         case this.SysOnlineParamValueType.STATIC_DICT:
           return Array.isArray(valueData) ? valueData[1] : undefined;
         case this.SysOnlineParamValueType.INPUT_VALUE:
           return valueData;
       }
     },
-    getParamValueObj(paramName, valueType, valueData, retObj) {
+    getParamValueObj (paramName, valueType, valueData, retObj) {
       try {
         if (retObj == null) retObj = {};
         retObj[paramName] = this.getParamValue(valueType, valueData);
@@ -524,14 +524,14 @@ const OnlineFormMixins = {
         console.log(e);
       }
     },
-    clean() {
+    clean () {
       this.datasourceMap = null;
       this.relationMap = null;
       this.tableMap = null;
       this.columnMap = null;
       this.dictMap = null;
     },
-    loadAllDropdownData() {
+    loadAllDropdownData () {
       if (Array.isArray(this.dropdownWidgetList)) {
         this.dropdownWidgetList.forEach(dropdownWidget => {
           let dropdownWidgetImpl = this.$refs[dropdownWidget.variableName][0];
@@ -541,12 +541,11 @@ const OnlineFormMixins = {
         });
       }
     },
-    reload() {
+    reload () {
       this.loadOnlineFormData().then(res => {
         this.isLoading = false;
         if (this.formConfig.formType === this.SysOnlineFormType.FORM) {
           if (Number.parseInt(this.operationType) === this.SysCustomWidgetOperationType.EDIT && this.saveOnClose === '1') {
-
             // 编辑操作页面,初始化页面数据
             let httpCall = null;
             if (this.saveOnClose === '0') {
@@ -604,8 +603,8 @@ const OnlineFormMixins = {
         console.log(e);
       });
     },
-    onResume() { },
-    getPrimaryKeyColumnParam(table, row) {
+    onResume () { },
+    getPrimaryKeyColumnParam (table, row) {
       if (table && Array.isArray(table.columnList)) {
         return table.columnList.reduce((retObj, column) => {
           let fieldName = (table.relation ? table.relation.variableName + '__' : '') + column.columnName;
@@ -618,7 +617,7 @@ const OnlineFormMixins = {
 
       return null;
     },
-    buildSubFormParams(operation, subFormInfo, row) {
+    buildSubFormParams (operation, subFormInfo, row) {
       let subFormMasterTable = this.tableMap.get(subFormInfo.masterTableId);
       if (subFormMasterTable == null) return null;
       if (subFormMasterTable.relation == null) {
@@ -653,7 +652,7 @@ const OnlineFormMixins = {
         }
       }
     },
-    async handlerOperation(operation, row, widget) {
+    async handlerOperation (operation, row, widget) {
       if (this.preview()) return;
       if (operation.formId != null) {
         OnlineFormController.view(this, {
@@ -779,41 +778,44 @@ const OnlineFormMixins = {
             }
           }).catch(e => { });
         } else if (operation.type === this.SysCustomWidgetOperationType.EXPORT) {
+          console.log('this.formId :>> ', this.formId);
           if (this.formId == 1657932361767063552) {
-
             let fileInfoStr = row.component_movementjson;
-            let fileInfoArr = JSON.parse(fileInfoStr);
-            let fileInfo = fileInfoArr[0]; // 假设只有一个文件
-            await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/mainUnit', {
-              params: {
-                datasourceId: '1657931215497334784',
-                fieldName: 'component_movementjson',
-                asImage: false,
-                dataId: row.id,
-                filename: fileInfo.filename,
-                Authorization: getToken(),
-                MenuId: '1657932967709773824'
-              }
-            })
-              .then(response => {
-                // 处理成功的响应
-                this.component_movementjson = response.data;
+            console.log('fileInfoStr :>> ', fileInfoStr);
+            if (fileInfoStr != undefined) {
+              let fileInfoArr = JSON.parse(fileInfoStr);
+              let fileInfo = fileInfoArr[0]; // 假设只有一个文件
+              await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/mainUnit', {
+                params: {
+                  datasourceId: '1657931215497334784',
+                  fieldName: 'component_movementjson',
+                  asImage: false,
+                  dataId: row.id,
+                  filename: fileInfo.filename,
+                  Authorization: getToken(),
+                  MenuId: '1657932967709773824'
+                }
               })
-              .catch(error => {
-                // 处理错误
-                console.error(error);
-              });
+                .then(response => {
+                  // 处理成功的响应
+                  this.component_movementjson = response.data;
+                })
+                .catch(error => {
+                  // 处理错误
+                  console.error(error);
+                });
+            }
 
             fileInfoStr = row.components_json;
-            fileInfoArr = JSON.parse(fileInfoStr);
-            fileInfo = fileInfoArr[0]; // 假设只有一个文件
+            let fileInfoArr1 = JSON.parse(fileInfoStr);
+            let fileInfo1 = fileInfoArr1[0]; // 假设只有一个文件
             await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/mainUnit', {
               params: {
                 datasourceId: '1657931215497334784',
                 fieldName: 'components_json',
                 asImage: false,
                 dataId: row.id,
-                filename: fileInfo.filename,
+                filename: fileInfo1.filename,
                 Authorization: getToken(),
                 MenuId: '1657932967709773824'
               }
@@ -837,7 +839,7 @@ const OnlineFormMixins = {
               target: row.target,
               team: row.team,
               task: row.task,
-              pos:{
+              pos: {
                 lat: row.lat,
                 lon: row.lon,
                 height: row.height
@@ -858,19 +860,18 @@ const OnlineFormMixins = {
             document.body.appendChild(link);
             link.click();
             document.body.removeChild(link);
-          }
-          else if(this.formId == 1675055217952952320){
+          } else if (this.formId == 1675055217952952320) {
             console.log('row :>> ', row);
             let number = row.number
             const data = {};
             data[number] = {
               type: row.type,
-              properties:{
+              properties: {
                 id: row.id,
                 lon: row.lon,
                 lat: row.lat,
                 h: row.h,
-                picture: row.picture,
+                picture: row.picture
               }
             }
             const jsonData = JSON.stringify(data);
@@ -883,28 +884,27 @@ const OnlineFormMixins = {
             document.body.appendChild(link);
             link.click();
             document.body.removeChild(link);
-          }
-          else if(this.formId == 1675055674104483840){
+          } else if (this.formId == 1675055674104483840) {
             console.log('row :>> ', row);
             let name = row.name
             const data = {};
             data[name] = {
-                id:row.id,
-                name: row.name,
-                BW: row.BW,
-                PW: row.PW,
-                fc: row.fc,
-                fs: row.fs,
-                h: row.h,
-                lat: row.lat,
-                lon: row.lon,
-                modulation: row.modulation,
-                prf: row.prf,
-                prf_mode: row.prf_mode,
-                type: row.type,
-                style: row.style,
-                url: row.url,
-                picture: row.picture,
+              id: row.id,
+              name: row.name,
+              BW: row.BW,
+              PW: row.PW,
+              fc: row.fc,
+              fs: row.fs,
+              h: row.h,
+              lat: row.lat,
+              lon: row.lon,
+              modulation: row.modulation,
+              prf: row.prf,
+              prf_mode: row.prf_mode,
+              type: row.type,
+              style: row.style,
+              url: row.url,
+              picture: row.picture
             }
             const jsonData = JSON.stringify(data);
             const blob = new Blob([jsonData], { type: 'application/json' });
@@ -916,13 +916,12 @@ const OnlineFormMixins = {
             document.body.appendChild(link);
             link.click();
             document.body.removeChild(link);
-          }
-          else if(this.formId == 1675056214280507392){
+          } else if (this.formId == 1675056214280507392) {
             let number = row.number
             const data = {};
             data[number] = {
               type: row.type,
-              properties:{
+              properties: {
                 id: row.id,
                 CSV_starttime: row.CSV_starttime,
                 CSV_endtime: row.CSV_endtime,
@@ -937,7 +936,7 @@ const OnlineFormMixins = {
                 common_trueanomaly: row.common_trueanomaly,
                 config_type: row.config_type,
                 mark: row.mark,
-                picture: row.picture,
+                picture: row.picture
               }
             }
             const jsonData = JSON.stringify(data);
@@ -950,15 +949,13 @@ const OnlineFormMixins = {
             document.body.appendChild(link);
             link.click();
             document.body.removeChild(link);
-          }
-          else if(this.formId == 1675048581024714752)
-          {
+          } else if (this.formId == 1675048581024714752) {
             console.log('row :>> ', row);
             let number = row.number
             const data = {};
             data[number] = {
               type: row.type,
-              properties:{
+              properties: {
                 id: row.id,
                 launch_lon: row.launch_lon,
                 launch_lat: row.launch_lat,
@@ -982,14 +979,12 @@ const OnlineFormMixins = {
             document.body.appendChild(link);
             link.click();
             document.body.removeChild(link);
-          }
-          else if(this.formId == 1674960384441716736){
-           
+          } else if (this.formId == 1674960384441716736) {
             let number = row.number
             const data = {};
             data[number] = {
               type: row.type,
-              properties:{
+              properties: {
                 id: row.id,
                 N: row.N,
                 f0: row.fo,
@@ -998,7 +993,7 @@ const OnlineFormMixins = {
                 tr: row.tr,
                 ts: row.ts,
                 url: row.url,
-                method: row.method,
+                method: row.method
               }
             }
             const jsonData = JSON.stringify(data);
@@ -1011,15 +1006,14 @@ const OnlineFormMixins = {
             document.body.appendChild(link);
             link.click();
             document.body.removeChild(link);
-          }
-          else if(this.formId == 1674971627114205184){
+          } else if (this.formId == 1674971627114205184) {
             console.log('row :>> ', row);
             let number = row.number
             const data = {};
             data[number] = {
               type: row.type,
               creator: row.creator,
-              properties:{
+              properties: {
                 id: row.id,
                 f0: row.fo,
                 number: row.number,
@@ -1030,7 +1024,7 @@ const OnlineFormMixins = {
                 t_r: row.t_r,
                 ts: row.ts,
                 url: row.url,
-                method: row.method,
+                method: row.method
               }
             }
             const jsonData = JSON.stringify(data);
@@ -1043,60 +1037,59 @@ const OnlineFormMixins = {
             document.body.appendChild(link);
             link.click();
             document.body.removeChild(link);
-          }
-          else {
-            //todo 场景想定json导出
+          } else {
+            // todo 场景想定json导出
         
             let fileInfoStr = row.blueunit;
             let fileInfoArr = JSON.parse(fileInfoStr);
    
             let fileInfo = fileInfoArr[0]; // 假设只有一个文件
-            for(let i = 0;i<fileInfoArr.length;i++){
-            await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/main', {
-              params: {
-                datasourceId: '1656243335922192384',
-                fieldName: 'blueunit',
-                asImage: false,
-                dataId: row.id,
-                filename: fileInfoArr[i].filename,
-                Authorization: getToken(),
-                MenuId: '1656244747347431424'
-              }
-            })
-              .then(response => {
-                // 处理成功的响应
-                this.blueunit.push(response.data) ;
+            for (let i = 0; i < fileInfoArr.length; i++) {
+              await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/main', {
+                params: {
+                  datasourceId: '1656243335922192384',
+                  fieldName: 'blueunit',
+                  asImage: false,
+                  dataId: row.id,
+                  filename: fileInfoArr[i].filename,
+                  Authorization: getToken(),
+                  MenuId: '1656244747347431424'
+                }
               })
-              .catch(error => {
+                .then(response => {
+                // 处理成功的响应
+                  this.blueunit.push(response.data);
+                })
+                .catch(error => {
                 // 处理错误
-                console.error(error);
-              });
+                  console.error(error);
+                });
             }
             console.log('this.blueunit :>> ', this.blueunit);
-             fileInfoStr = row.redunit;
-             fileInfoArr = JSON.parse(fileInfoStr);
+            fileInfoStr = row.redunit;
+            fileInfoArr = JSON.parse(fileInfoStr);
             console.log('fileInfoArr :>> ', fileInfoArr);
     
-            for(let i = 0;i<fileInfoArr.length;i++){
-            await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/main', {
-              params: {
-                datasourceId: '1656243335922192384',
-                fieldName: 'redunit',
-                asImage: false,
-                dataId: row.id,
-                filename: fileInfoArr[i].filename,
-                Authorization: getToken(),
-                MenuId: '1656244747347431424'
-              }
-            })
-              .then(response => {
-                // 处理成功的响应
-                this.redunit.push(response.data) ;
+            for (let i = 0; i < fileInfoArr.length; i++) {
+              await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/main', {
+                params: {
+                  datasourceId: '1656243335922192384',
+                  fieldName: 'redunit',
+                  asImage: false,
+                  dataId: row.id,
+                  filename: fileInfoArr[i].filename,
+                  Authorization: getToken(),
+                  MenuId: '1656244747347431424'
+                }
               })
-              .catch(error => {
+                .then(response => {
+                // 处理成功的响应
+                  this.redunit.push(response.data);
+                })
+                .catch(error => {
                 // 处理错误
-                console.error(error);
-              });
+                  console.error(error);
+                });
             }
             const data = {
               id: row.id,
@@ -1108,9 +1101,9 @@ const OnlineFormMixins = {
               bluecnt: row.bluecnt,
               target: row.target,
               starttime: row.starttime,
-              steptime: row.steptime              ,
+              steptime: row.steptime,
               blueunit: this.blueunit,
-              redunit: this.redunit,
+              redunit: this.redunit
             };
             const jsonData = JSON.stringify(data);
             const blob = new Blob([jsonData], { type: 'application/json' });
@@ -1122,12 +1115,7 @@ const OnlineFormMixins = {
             document.body.appendChild(link);
             link.click();
             document.body.removeChild(link);
-          
           }
-         
-
-
-
         }
 
         httpCall.then(res => {
@@ -1139,7 +1127,7 @@ const OnlineFormMixins = {
       }
     },
 
-    getRelationTableData(tableWidget) {
+    getRelationTableData (tableWidget) {
       if (tableWidget.widgetType === this.SysCustomWidgetType.Table) {
         let table = tableWidget.table;
         let temp = this.$refs[tableWidget.variableName];
@@ -1156,7 +1144,7 @@ const OnlineFormMixins = {
       }
       return null;
     },
-    getWidgetPrimaryColumnId(widget) {
+    getWidgetPrimaryColumnId (widget) {
       let columnList = null;
       if (widget.relationId == null) {
         columnList = widget.datasource.masterTable.columnList;
@@ -1177,16 +1165,15 @@ const OnlineFormMixins = {
     },
     ...mapMutations(['addOnlineFormCache'])
   },
-  created() {
+  created () {
     this.reload();
-
   },
-  destoryed() {
+  destoryed () {
     this.clean();
   },
   watch: {
     formId: {
-      handler(newValue) {
+      handler (newValue) {
         this.reload();
       }
     }

+ 134 - 66
src/views/situation/index.vue

@@ -21,16 +21,16 @@
         <el-tabs type="border-card" v-model="activeName" tab-position="left" class="menu" :stretch="true" @tab-click="legendClick">
         <el-tab-pane name="first">
           <span slot="label">
-          <el-tooltip class="item" effect="dark" content="标绘" placement="left">
-            <i class="el-icon-wind-power"></i>
-          </el-tooltip>
+            <el-tooltip class="item" effect="dark" content="标绘" placement="left">
+              <i class="el-icon-wind-power"></i>
+            </el-tooltip>
           </span>
         </el-tab-pane>
         <el-tab-pane name="second">
           <span slot="label">
-          <el-tooltip class="item" effect="dark" content="模型" placement="left">
-            <i class="el-icon-receiving"></i>
-          </el-tooltip>
+            <el-tooltip class="item" effect="dark" content="模型" placement="left">
+              <i class="el-icon-receiving"></i>
+            </el-tooltip>
           </span>
           <el-radio-group v-model="whosmodel" style="margin: 0 auto;" size="mini">
             <el-radio-button label="red">红方</el-radio-button>
@@ -102,28 +102,33 @@
           </el-tooltip>
           </span>
         </el-tab-pane>
-        </el-tabs>
-        <div class="buttons">
-          <el-button icon="el-icon-full-screen" circle @click="ismax()"></el-button>
-          <el-button icon="el-icon-coin" circle></el-button>
-          <el-button icon="el-icon-bangzhu" @click="Fly()" circle></el-button>
-          <el-button icon="el-icon-house" circle @click="home()"></el-button>
-          <el-button icon="el-icon-plus" circle  @click="big()"></el-button>
-          <el-button icon="el-icon-minus" circle  @click="small()"></el-button>
-        </div>
-      </el-row>
-      
-    </div>
-  </template>
+      </el-tabs>
+      <div class="buttons">
+        <el-button icon="el-icon-full-screen" circle @click="ismax()"></el-button>
+        <el-button icon="el-icon-coin" circle></el-button>
+        <el-button icon="el-icon-bangzhu" @click="Fly()" circle></el-button>
+        <el-button icon="el-icon-house" circle @click="home()"></el-button>
+        <el-button icon="el-icon-plus" circle @click="big()"></el-button>
+        <el-button icon="el-icon-minus" circle @click="small()"></el-button>
+      </div>
+    </el-row>
+
+  </div>
+</template>
 <script>
 import screenfull from 'screenfull';
+import fireController from '../../api/fireController';
 export default ({
   computed: {
-  
+
   },
-    
-  data () {
+
+  data() {
     return {
+      situation: [],
+      unit: [],
+      satellite: [],
+      center: [],
       viewer2D: null,
       viewer3D: null,
       dimension: 3,
@@ -141,13 +146,76 @@ export default ({
   
     }
   },
-  mounted () {
+  mounted() {
     this.cesiumInit();
+    this.getData();
   },
-  
+
   methods: {
-      
-    cesiumInit () {
+    //获取所有数据
+    getData(){
+      this.getCenter();
+      this.getSatellite();
+      this.getUnit();
+      this.getSituation();
+    },
+    //获取场景想定数据
+    getSituation() {
+      let params = {
+        datasourceId: "1656243335922192384",
+        filterDtoList: [],
+        pageParam: {
+          pageNum: 1,
+          pageSize: 10
+        }
+      }
+      fireController.situation(this, params).then(res => {
+        this.situation = res.data.dataList
+      })
+    },
+    //获取作战单元数据
+    getUnit() {
+      let params = {
+        datasourceId: "1657931215497334784",
+        filterDtoList: [],
+        pageParam: {
+          pageNum: 1,
+          pageSize: 10
+        }
+      }
+      fireController.unit(this, params).then(res => {
+        this.unit = res.data.dataList
+      })
+    },
+    //获取指挥中心数据
+    getCenter() {
+      let params = {
+        datasourceId: "1654421731512684544",
+        filterDtoList: [],
+        pageParam: {
+          pageNum: 1,
+          pageSize: 10
+        }
+      }
+      fireController.center(this, params).then(res => {
+        this.center = res.data.dataList
+      })
+    },
+    //获取预警卫星数据
+    getSatellite() {
+      let params = {
+        datasourceId: "1654424480958648320",
+        filterDtoList: [],
+        pageParam: {
+          pageNum: 1,
+          pageSize: 10
+        }
+      }
+      fireController.satellite(this, params).then(res => {
+        this.satellite = res.data.dataList
+      })
+    },
+    cesiumInit() {
       this.viewer2D = new this.Cesium.Viewer('2DcesiumContainer', {
         sceneMode: this.Cesium.SceneMode.SCENE2D,
         animation: false, // 是否显示时间轴动画
@@ -167,9 +235,9 @@ export default ({
           tileMatrixSetID: 'GoogleMapsCompatible',
           show: false
         })
-      
+
       });
-  
+
       this.viewer3D = new this.Cesium.Viewer('3DcesiumContainer', {
         animation: false, // 是否显示时间轴动画
         baseLayerPicker: false,
@@ -190,26 +258,26 @@ export default ({
         //         transparent: true
         //     }
         // }),
-  
+
         imageryProvider:
-        // new this.Cesium.WebMapTileServiceImageryProvider({
-        //     url: "http://10.170.16.95:8080/geoserver/gwc/service/wmts/rest/map:map/{style}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png",
-        //     layer: 'map:map',
-        //     style: 'raster',
-        //     format: 'image/png',
-        //     tileMatrixSetID: 'EPSG:900913',      //一般使用EPSG:3857坐标系
-          
-        //   }),
-        new this.Cesium.UrlTemplateImageryProvider({
-          url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
-          layer: 'tdtVecBasicLayer',
-          style: 'default',
-          format: 'image/png',
-          tileMatrixSetID: 'GoogleMapsCompatible',
-          show: false
-        })
+          // new this.Cesium.WebMapTileServiceImageryProvider({
+          //     url: "http://10.170.16.95:8080/geoserver/gwc/service/wmts/rest/map:map/{style}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png",
+          //     layer: 'map:map',
+          //     style: 'raster',
+          //     format: 'image/png',
+          //     tileMatrixSetID: 'EPSG:900913',      //一般使用EPSG:3857坐标系
+
+          //   }),
+          new this.Cesium.UrlTemplateImageryProvider({
+            url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
+            layer: 'tdtVecBasicLayer',
+            style: 'default',
+            format: 'image/png',
+            tileMatrixSetID: 'GoogleMapsCompatible',
+            show: false
+          })
       });
-  
+
       this.viewer3D._cesiumWidget._creditContainer.style.display = 'none';
       this.viewer2D._cesiumWidget._creditContainer.style.display = 'none';
       this.viewer3D.camera.setView({
@@ -234,17 +302,17 @@ export default ({
       this.viewer3D.camera.percentageChanged = 0.01;
       this.viewer3D.camera.changed.addEventListener(this.sync);
     },
-    removeAllModel () {
+    removeAllModel() {
       this.viewer.entities.removeAll(); // 移除全部模型
     },
-    sync () {
+    sync() {
       if (this.mousevalue == '3D') {
         // 三维地图中心点
         let center = new this.Cesium.Cartesian2(
           Math.floor(this.viewer3D.canvas.clientWidth / 2),
           Math.floor(this.viewer3D.canvas.clientHeight / 2)
         );
-  
+
         // 转为世界坐标系
         let position = this.viewer3D.scene.camera.pickEllipsoid(center);
         console.log(position);
@@ -276,7 +344,7 @@ export default ({
         if (this.Cesium.defined(position)) {
           // 获取三维地图中心点与相机之间的距离
           let distance = this.viewer2D.scene.camera.positionCartographic.height;
-  
+
           position = this.convertWorldToCartographic(position)
           // 更新三维地图
           this.viewer3D.scene.camera.setView({
@@ -287,7 +355,7 @@ export default ({
       }
     },
     // 将世界坐标系转换为经纬度坐标系
-    convertWorldToCartographic (worldPosition) {
+    convertWorldToCartographic(worldPosition) {
       const ellipsoid = this.viewer2D.scene.globe.ellipsoid;
       const cartographic = ellipsoid.cartesianToCartographic(worldPosition);
       const longitude = this.Cesium.Math.toDegrees(cartographic.longitude);
@@ -296,11 +364,11 @@ export default ({
       return { longitude, latitude, height };
     },
     // 监听地图变化
-    changeActive (value) {
+    changeActive(value) {
       this.mousevalue = value
       console.log(value)
     },
-    dimensionswitch (value) {
+    dimensionswitch(value) {
       this.dimension = value
       if (value == 3) {
         this.leftwidth = 24;
@@ -311,7 +379,7 @@ export default ({
       }
     },
     // 全屏缩小
-    ismax () {
+    ismax() {
       if (screenfull.isEnabled && screenfull.isFullscreen) {
         screenfull.exit();
       } else {
@@ -319,7 +387,7 @@ export default ({
       }
     },
     /* 获取camera中心点坐标 */
-    getCenterPosition () {
+    getCenterPosition() {
       var result = this.viewer2D.camera.pickEllipsoid(new this.Cesium.Cartesian2(this.viewer2D.canvas.clientWidth / 2, this.viewer2D.canvas
         .clientHeight / 2))
       var curPosition = this.Cesium.Ellipsoid.WGS84.cartesianToCartographic(result)
@@ -332,9 +400,9 @@ export default ({
         height: height
       }
     },
-  
+
     /* 地图放大 */
-    big () {
+    big() {
       // 镜头拉进
       this.viewer2D.camera.flyTo({
         destination: this.Cesium.Cartesian3.fromDegrees(this.getCenterPosition().lon, this.getCenterPosition().lat, this.getCenterPosition().height / 1.8),
@@ -342,19 +410,19 @@ export default ({
       })
     },
     /* 地图缩小 */
-    small () {
+    small() {
       // 镜头远离
       this.viewer2D.camera.flyTo({
         destination: this.Cesium.Cartesian3.fromDegrees(this.getCenterPosition().lon, this.getCenterPosition().lat, this.getCenterPosition().height * 1.2),
         duration: 1.0
       })
     },
-    home () {
+    home() {
       this.viewer2D.camera.flyTo({
         destination: this.Cesium.Cartesian3.fromDegrees(117.918977, 25.0, 1500000)
       });
     },
-    Fly () {
+    Fly() {
       this.shouldAnimate = !this.shouldAnimate
       this.viewer2D.clock.shouldAnimate = true
       this.viewer3D.clock.shouldAnimate = true
@@ -364,7 +432,7 @@ export default ({
         this.stopRun()
       }
     },
-    startRun (option = { multiplier: 1 }) {
+    startRun(option = { multiplier: 1 }) {
       // 监听每次渲染前执行矩阵求解
       this.viewer3D.scene.postUpdate.addEventListener(this.rotateSetting)
       // 根据option修改一些参数
@@ -375,12 +443,12 @@ export default ({
         }
       }
     },
-    stopRun () {
+    stopRun() {
       let viewer = this.viewer3D
       viewer.clock.multiplier = 1
       viewer.scene.postUpdate.removeEventListener(this.rotateSetting)
     },
-    rotateSetting () {
+    rotateSetting() {
       let Cesium = this.Cesium
       let viewer = this.viewer3D
       if (!viewer || viewer.scene.mode !== Cesium.SceneMode.SCENE3D) {
@@ -398,7 +466,7 @@ export default ({
       }
     },
     /// / tabs 切换点击
-    legendClick (tab, event) {
+    legendClick(tab, event) {
       var tab_content = document.querySelectorAll('.menu .el-tabs__content');
       if (this.currentLab.index == tab.index) {
         tab_content[0].style.display == 'none' || '' ? tab_content[0].style.display = 'block' : tab_content[0].style.display = 'none';
@@ -418,9 +486,9 @@ export default ({
         
 
     }
-  
+
   }
-  
+
 })
 </script>
   <style scoped>