Quellcode durchsuchen

接口配置调整

fujunwen vor 4 Jahren
Ursprung
Commit
023165d642

+ 6 - 2
src/api/coreDeviceReport.js

@@ -2,8 +2,12 @@
 import httputils from "@/api/httputils";
 
 // 系统列表
-export function queryEquipmentList() {
-  return httputils.getJson(`/data/data/v_glsms_systemcfg/querySmsxt`);
+export function querySystemList() {
+  return httputils.getJson(`/data/v_glsms_systemcfg/querySmsxt`);
+}
+// 系统下的设备
+export function queryEquipmentList(url, getParams) {
+  return  httputils.getJson(url, getParams);
 }
 // 表数据
 export function queryTableData(url, postParams) {

+ 10 - 10
src/api/equipmentList.js

@@ -2,49 +2,49 @@ import httputils from "@/api/httputils"
 
 // 设备设施-主要设备清单
 export function queryEquipmentList({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/glsms_asset/queryStatistics`, data, postParams)
+    return httputils.fetchJson(`/data/glsms_asset/queryStatistics`, data, postParams)
 }
 
 // 设备设施-主要设备清单详情
 export function queryAsset({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/glsms_asset/query`, data, postParams)
+    return httputils.fetchJson(`/data/glsms_asset/query`, data, postParams)
 }
 // 设备设施-主要材料清单
 export function queryMaterialList({ getParams }) {
-    return httputils.getJson(`/data/data/gcglsms_material/query`, getParams)
+    return httputils.getJson(`/data/gcglsms_material/query`, getParams)
 }
 
 // 设备设施-维保事项
 export function queryWbsms({ data, getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_wbsms/query`, data, getParams)
+    return httputils.getJson(`/data/v_glsms_wbsms/query`, data, getParams)
 }
 
 // 设备设施-维修事项
 export function queryWx({ data, getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_wx/query`, data, getParams)
+    return httputils.getJson(`/data/v_glsms_wx/query`, data, getParams)
 }
 
 // 设备设施-专维
 export function queryZw({ data, getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_zw/query`, data, getParams)
+    return httputils.getJson(`/data/v_glsms_zw/query`, data, getParams)
 }
 
 // 设备设施-其他事项
 export function queryQtsx({ data, getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_qtsx/query`, data, getParams)
+    return httputils.getJson(`/data/v_glsms_qtsx/query`, data, getParams)
 }
 
 // 设备设施-记录事项
 export function queryRecord({ getParams }) {
-    return httputils.getJson(`/data/data/v_gcglsms_wxwbsxline/query`, getParams)
+    return httputils.getJson(`/data/v_gcglsms_wxwbsxline/query`, getParams)
 }
 
 // 设备设施=查看图纸
 export function queryxxx({ getParams }) {
-    return httputils.getJson(`/data/data/xxX`, getParams)
+    return httputils.getJson(`/data/xxX`, getParams)
 }
 
 // 设备设施-楼层电井口(间)控制商铺范围清单
 export function queryShops({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_shops/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_shops/query`, getParams)
 }

+ 6 - 0
src/api/httputils.js

@@ -27,6 +27,12 @@ axiosservice.interceptors.request.use(
                 'isPreview': false //默认false,当预览开启的时候是true
             }
         }
+        // if (config.url.indexOf('/data') > -1 && config.url !== '/data/auth/check') {
+        if (config.url.indexOf('/data') > -1) {
+            config.headers = {
+                'sso-token': 'admin:lengqiang',
+            }
+        }
         return config
     },
     (error) => {

+ 1 - 1
src/api/legendLibrary.js

@@ -104,7 +104,7 @@ export function graphElementUpdate({
 export function queryDeviceAndPOsition({
     postParams
 }) {
-    return httputils.postJson(`/data/data/t_system_wzfl/query`, postParams)
+    return httputils.postJson(`/data/t_system_wzfl/query`, postParams)
 }
 
 //图形查询

+ 2 - 2
src/api/login.js

@@ -2,11 +2,11 @@
 import httputils from "@/api/httputils"
 
 export function login(params) {
-    return httputils.getJson(`/data/data/auth/check`, params)
+    return httputils.getJson(`/data/auth/check`, params)
 }
 // 查询楼层清单
 export function queryFloor(params) {
-    return httputils.getJson(`/data/data/plaza/floor`, params)
+    return httputils.getJson(`/data/plaza/floor`, params)
 }
 export function queryfmapID(params) {
     return httputils.getJson(`http://mapapp.wanda.cn/sgmap/mapversion`, params)

+ 5 - 5
src/api/other.js

@@ -1,23 +1,23 @@
 import httputils from '@/api/httputils'
 // 综合事项记录
 export function queryGlams({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_zhsxjl/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_zhsxjl/query`, getParams)
 }
 // 第三方检测事项
 export function queryDsfrw({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_dsfrw/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_dsfrw/query`, getParams)
 }
 //综合事项管理-综合记录事项弹框
 export function queryZhsxjl({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_zhsxjl/queryWindown`, getParams)
+    return httputils.getJson(`/data/v_glsms_zhsxjl/queryWindown`, getParams)
 }
 
 // 辅助用房管理-广场辅助用房汇总统计报
 export function querygcfzyfhz({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_gcfzyfhz/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_gcfzyfhz/query`, getParams)
 }
 
 // 辅助用房管理-广场辅助用房调改变更记录
 export function queryfzyfchange({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_fzyfchange/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_fzyfchange/query`, getParams)
 }

+ 1 - 1
src/api/overview.js

@@ -1,5 +1,5 @@
 import httputils from "@/api/httputils"
 // 查询广场概况
 export function queryFact({ getParams }) {
-    return httputils.getJson(`/data/data/plaza/fact`, getParams)
+    return httputils.getJson(`/data/plaza/fact`, getParams)
 }

+ 4 - 4
src/api/public.js

@@ -1,17 +1,17 @@
 import httputils from '@/api/httputils'
 // 查询图片
 export function queryPic({ getParams }) {
-    return httputils.getJson(`/data/data/glsms_proimgup/query`, getParams)
+    return httputils.getJson(`/data/glsms_proimgup/query`, getParams)
 }
 
 // 查询下拉框
 export function querySelect({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/base/queryOptions`, data, postParams)
+    return httputils.fetchJson(`/data/base/queryOptions`, data, postParams)
 }
 
 // 查询Tab数据统计数量
 export function queryTab({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/base/queryTabStatistics`, data, postParams)
+    return httputils.fetchJson(`/data/base/queryTabStatistics`, data, postParams)
 }
 
 // 查询图例统计信息
@@ -47,5 +47,5 @@ export function queryDraftNum(data) {
 }
 // 查询铺位名称
 export function queryBrand({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/tb_brand_intentiondetail/query`, data, postParams)
+    return httputils.fetchJson(`/data/tb_brand_intentiondetail/query`, data, postParams)
 }

+ 7 - 7
src/api/room.js

@@ -2,34 +2,34 @@ import httputils from '@/api/httputils'
 
 // 机房-机房布置图
 export function xx({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_zhsxjl/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_zhsxjl/query`, getParams)
 }
 
 // 机房-配电室低压柜及出线明细表
 export function queryDygjcxline({ getParams }) {
-    return httputils.getJson(`/data/data/glsms_dygjcxline/query`, getParams)
+    return httputils.getJson(`/data/glsms_dygjcxline/query`, getParams)
 }
 
 // 机房-机房内核心设备
 export function queryHxsb({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/glsms_asset/queryStatistics`, data, postParams)
+    return httputils.fetchJson(`/data/glsms_asset/queryStatistics`, data, postParams)
 }
 
 // 机房-机房内核心设备钻取表
 export function queryHxsbDetail({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/glsms_asset/query`, data, postParams)
+    return httputils.fetchJson(`/data/glsms_asset/query`, data, postParams)
 }
 
 // 机房-维修记录
 export function queryWxjf({ getParams }) {
-    return httputils.getJson(`/data/data/v_glsms_wx/query`, getParams)
+    return httputils.getJson(`/data/v_glsms_wx/query`, getParams)
 }
 
 // 机房-维保记录
 export function queryWb({ data, postParams }) {
-    return httputils.fetchJson(`/data/data/v_glsms_wbzy/query`, data, postParams)
+    return httputils.fetchJson(`/data/v_glsms_wbzy/query`, data, postParams)
 }
 // 查询位置属于哪个系统
 export function querySystem({ getParams }) {
-    return httputils.getJson(`/data/data/t_system_wzfl/querySystem`, getParams)
+    return httputils.getJson(`/data/t_system_wzfl/querySystem`, getParams)
 }

+ 22 - 8
src/views/analysis/CoreDeviceReport.vue

@@ -9,7 +9,7 @@
         tipPlace="top" 
         caption="系统名称:"
         @change="changeCurSystem" 
-        v-model="systemName" 
+        v-model="systemId" 
         :selectdata="systemList"
         :placeholder="'请选择'"
       />
@@ -37,7 +37,7 @@
         <el-table-column prop="is_exception" label="状态">
           <template slot-scope="scope">
             <span style="display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;" :style="{'background': !scope.row.is_exception?'#0091FF' : '#F54E45'}"></span>
-            <span style="margin-left: 10px">{{ !scope.row.status?'正常' : '异常' }}</span>
+            <span style="margin-left: 10px">{{ !scope.row.is_exception?'正常' : '异常' }}</span>
           </template>
         </el-table-column>
         <el-table-column prop="photos_num" label="照片">
@@ -99,12 +99,12 @@
 
 <script>
 import { Select, Input } from 'meri-design';
-import { queryEquipmentList, queryTableData } from '../../api/coreDeviceReport';
+import { querySystemList, queryEquipmentList, queryTableData } from '../../api/coreDeviceReport';
 import _ from 'lodash';
 export default {
   data () {
     return {
-      systemName: '', // 系统名称
+      systemId: '', // 当前系统Id
       systemList: [], // 系统
       systemContentData: [
         {id: 1, name: '高压配电柜', isMaintenance: true, num: 95, statusNum: 0, abnormal: false, isActive: true},
@@ -136,6 +136,7 @@ export default {
 
   mounted() {
     this.getSystemList();
+    this.getEquipmentOfSystem();
     this.getTableData();
   },
 
@@ -144,7 +145,7 @@ export default {
      * 获取系统列表数据
      */
     getSystemList() {
-      queryEquipmentList().then((res) => {
+      querySystemList().then((res) => {
         if (res.result === 'success') {
           let data = res.data;
           let newData = [];
@@ -167,6 +168,21 @@ export default {
       console.log('val', val)
     },
     /**
+     * 获取系统下的设备
+     */
+    getEquipmentOfSystem() {
+      let param = {
+        plazaId: 1000423,
+        ccode: 1002347,
+      }
+      if (this.systemId !== '') {
+        param.smsxt = this.systemId;
+      }
+      queryEquipmentList('/data/home/querySystemCard', param).then((res) => {
+        console.log('res', res)
+      })
+    },
+    /**
      * 切换系统下的设备
      */
     changeEquipment(id) {
@@ -179,8 +195,7 @@ export default {
       let query = {
         category_code: 'gdc'
       }
-      queryTableData(`/data/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`, query).then((res) => {
-        console.log('res', res)
+      queryTableData(`/data/glsms_asset/query?plazaId=1000423&page=${this.curPage}&size=${this.pageSize}`, query).then((res) => {
         const { result, count, data } = res;
         if (result === 'success') {
           this.tatol = count;
@@ -205,7 +220,6 @@ export default {
      * 显示设备实例的维保、专维等状态
      */
     showEquipmentStatus(row, column, e) {
-      console.log('row', row)
       this.dialogTableVisible = true;
     },
   }

+ 10 - 2
src/views/analysis/SpecificationUpdateRecord.vue

@@ -33,7 +33,8 @@
         layout="prev, pager, next"
         :current-page="curPage"
         :page-size="pageSize"
-        :total="tatol">
+        :total="tatol"
+        @current-change="changeTablePage">
       </el-pagination>
     </div>
   </div>
@@ -81,7 +82,7 @@ export default {
         changeDateStartDate: 20171027000000,
         changeDateEndDate: 20171028000000,
       }
-      getSpecificaltionData('/data/data/rpt_change_record/query', param).then((res) => {
+      getSpecificaltionData('/data/rpt_change_record/query', param).then((res) => {
         console.log('res', res)
         const { result, data, count } = res;
         if (result === 'success') {
@@ -94,6 +95,13 @@ export default {
         }
       })
     },
+    /**
+     * 切换页码
+     */
+    changeTablePage(page) {
+      this.curPage = page;
+      this.getTableData();
+    },
     testClick() {
 
     }

+ 1 - 1
vue.config.js

@@ -8,7 +8,7 @@ module.exports = {
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {
-                    '^/data': '/data',
+                    '^/data': '/data/data',
                 },
             },
             // // 工程信息化服务