zhulizhen1111 4 rokov pred
rodič
commit
00e613b8e2

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2554 - 2263
package-lock.json


+ 9 - 3
package.json

@@ -10,9 +10,9 @@
     "dependencies": {
         "@saga-web/base": "^2.1.9",
         "@saga-web/big": "^1.0.17",
-        "@saga-web/draw": "^2.1.80",
+        "@saga-web/draw": "^2.1.84",
         "@saga-web/feng-map": "^1.0.7",
-        "@saga-web/graphy": "^2.1.52",
+        "@saga-web/graph": "^2.1.66",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "core-js": "^3.4.4",
@@ -25,22 +25,28 @@
         "vuex": "^3.4.0"
     },
     "devDependencies": {
+        "@typescript-eslint/eslint-plugin": "^2.26.0",
+        "@typescript-eslint/parser": "^2.26.0",
         "@vue/cli-plugin-babel": "^4.1.0",
         "@vue/cli-plugin-eslint": "^4.1.0",
         "@vue/cli-plugin-router": "^4.1.0",
         "@vue/cli-plugin-vuex": "^4.1.0",
+        "@vue/cli-plugin-typescript": "^4.3.0",
         "@vue/cli-service": "^4.1.0",
+        "@vue/eslint-config-typescript": "^5.0.2",
         "babel-eslint": "^10.0.3",
         "babel-plugin-component": "^1.1.1",
         "eslint": "^5.16.0",
         "eslint-plugin-vue": "^5.0.0",
-        "vue-svg-loader": "^0.15.0",
         "fengmap": "^2.5.3",
         "less": "^3.0.4",
         "less-loader": "^5.0.0",
         "polybooljs": "^1.2.0",
         "stylus": "^0.54.7",
         "stylus-loader": "^3.0.2",
+        "typescript": "~3.8.3",
+        "vue-property-decorator": "^8.4.2",
+        "vue-svg-loader": "^0.15.0",
         "vue-template-compiler": "^2.6.10"
     }
 }

+ 4 - 2
src/components/floorList.vue

@@ -13,7 +13,7 @@
                     <div
                         class='floor-item'
                         :class='item==floorId?"isActive":""'
-                        @click='tabFloor(item)'
+                        @click='tabFloor(item,index)'
                         v-for='(item,index) in floorsArr'
                         :key='index'
                     >{{item}}</div>
@@ -43,11 +43,13 @@ export default {
         ...mapGetters(['floorsArr'])
     },
     methods: {
-        tabFloor(item) {
+        tabFloor(item, index) {
             this.showT = true
             this.showB = true
             this.$cookie.set('floorNow', item, 3)
             this.floorId = this.$cookie.get('floorNow') || item
+            console.log(index)
+            this.$emit('emitFloor', index + 1)
         },
         removeTop() {
             var inner = document.querySelectorAll('.floor-item')

+ 20 - 9
src/components/floorMap/floorBase.vue

@@ -5,12 +5,15 @@
         <div class='canvas-container' ref='graphy'>
             <canvas id='canvas' :width='canvasWidth' :height='canvasHeight' tabindex='0'></canvas>
         </div>
+        <computerTable ref='computerTable'></computerTable>
     </div>
 </template>
 <script>
 import { SFengParser } from '@saga-web/feng-map'
 import { SFloorParser } from '@saga-web/big'
-import { SGraphyView, SGraphyScene } from '@saga-web/graphy/lib'
+import { FloorView } from '@/lib/FloorView'
+import { FloorScene } from '@/lib/FloorScene'
+import computerTable from '../../views/equipment/table/computerTable'
 export default {
     data() {
         return {
@@ -24,19 +27,21 @@ export default {
             fParser: null
         }
     },
+    components: { computerTable },
     methods: {
-        init() {
+        init(floorid) {
             this.clearGraphy()
-            this.scene = new SGraphyScene()
+            this.scene = new FloorScene()
+            this.scene.selectContainer.connect('listChange', this, this.listChange)
             this.fmap = new SFengParser('fengMap', this.mapServerURL, this.key, this.appName, null)
-            console.log(this.fmap)
-            this.fmap.parseData('1001724_29', 1, res => {
-                console.log(res)
+            // console.log(this.fmap)
+            this.fmap.parseData('1001724_29', Number(floorid), res => {
+                // console.log(res)
                 this.fParser = new SFloorParser(null)
-                console.log(this.fParser)
+                // console.log(this.fParser)
                 this.fParser.parseData(res)
                 this.fParser.spaceList.forEach(t => {
-                    t.connect('click', this, this.spaceClick)
+                    t.selectable = true
                     this.scene.addItem(t)
                 })
                 this.fParser.wallList.forEach(t => this.scene.addItem(t))
@@ -53,7 +58,13 @@ export default {
                 this.view.scene = null
                 return
             }
-            this.view = new SGraphyView('canvas')
+            this.view = new FloorView('canvas')
+        },
+        listChange(item, ev) {
+            let name = ev[0][0].data.Name
+            if (name.slice(name.length - 2, name.length) == '机房') {
+                this.$refs.computerTable.open(name)
+            }
         }
     },
     mounted() {

+ 15 - 15
src/components/floorMap/index.vue

@@ -1,20 +1,20 @@
 <template>
-  <div id="floor_map">
-    <floorBase ref="floorBase"></floorBase>
-  </div>
+    <div id='floor_map'>
+        <floorBase ref='floorBase'></floorBase>
+    </div>
 </template>
 <script>
-import floorBase from "./floorBase"
+import floorBase from './floorBase'
 export default {
-  components:{floorBase},
-  data() {
-    return {};
-  },
-  methods: {
-    init(){
-      this.$refs.floorBase.init();
-    }
-  },
-  mounted() {}
-};
+    components: { floorBase },
+    data() {
+        return {}
+    },
+    methods: {
+        init(floorid) {
+            this.$refs.floorBase.init(floorid)
+        }
+    },
+    mounted() {}
+}
 </script>

+ 46 - 0
src/lib/FloorScene.js

@@ -0,0 +1,46 @@
+var __extends = (this && this.__extends) || (function () {
+    var extendStatics = function (d, b) {
+        extendStatics = Object.setPrototypeOf ||
+            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+        return extendStatics(d, b);
+    };
+    return function (d, b) {
+        extendStatics(d, b);
+        function __() { this.constructor = d; }
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+    };
+})();
+import { SGraphScene } from "@saga-web/graph/lib";
+import { SPoint } from "@saga-web/draw/lib";
+import { SPolylineItem } from "@saga-web/big";
+var FloorScene = /** @class */ (function (_super) {
+    __extends(FloorScene, _super);
+    function FloorScene() {
+        var _this = _super.call(this) || this;
+        _this.isLining = false;
+        return _this;
+        // this.selectContainer.connect("listChange", this, this.listChange)
+    }
+    // listChange(item, list) {
+    // console.log(arguments)
+    // }
+    FloorScene.prototype.onMouseDown = function (event) {
+        if (this.isLining) {
+            if (this.grabItem instanceof SPolylineItem) {
+                return _super.prototype.onMouseDown.call(this, event);
+            }
+            else {
+                var item = new SPolylineItem(null, new SPoint(event.x, event.y));
+                this.addItem(item);
+                this.grabItem = item;
+                return true;
+            }
+        }
+        else {
+            return _super.prototype.onMouseDown.call(this, event);
+        }
+    };
+    return FloorScene;
+}(SGraphScene));
+export { FloorScene };

+ 32 - 0
src/lib/FloorScene.ts

@@ -0,0 +1,32 @@
+import { SGraphScene } from "@saga-web/graph/lib"
+import { SMouseEvent } from "@saga-web/base/lib"
+import { SPoint } from "@saga-web/draw/lib"
+import { SFloorParser, SImageItem, STextItem, SLineItem, SPolylineItem } from "@saga-web/big"
+
+export class FloorScene extends SGraphScene {
+    isLining: boolean = false
+
+    constructor() {
+        super()
+        // this.selectContainer.connect("listChange", this, this.listChange)
+    }
+
+    // listChange(item, list) {
+    // console.log(arguments)
+    // }
+
+    onMouseDown(event: SMouseEvent): boolean {
+        if (this.isLining) {
+            if (this.grabItem instanceof SPolylineItem) {
+                return super.onMouseDown(event)
+            } else {
+                const item = new SPolylineItem(null, new SPoint(event.x, event.y))
+                this.addItem(item)
+                this.grabItem = item
+                return true
+            }
+        } else {
+            return super.onMouseDown(event)
+        }
+    }
+}

+ 118 - 0
src/lib/FloorView.js

@@ -0,0 +1,118 @@
+var __extends = (this && this.__extends) || (function () {
+    var extendStatics = function (d, b) {
+        extendStatics = Object.setPrototypeOf ||
+            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+        return extendStatics(d, b);
+    };
+    return function (d, b) {
+        extendStatics(d, b);
+        function __() { this.constructor = d; }
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+    };
+})();
+import { SGraphView } from "@saga-web/graph/lib";
+import { SMouseButton, SMouseEvent, SNetUtil } from "@saga-web/base/lib";
+import { SPoint } from "@saga-web/draw/lib";
+/**
+ * 楼层场景
+ *
+ * @author  郝建龙
+ */
+var FloorView = /** @class */ (function (_super) {
+    __extends(FloorView, _super);
+    function FloorView() {
+        var _this = _super !== null && _super.apply(this, arguments) || this;
+        /** 鼠标左键键按下时位置 */
+        _this._leftKeyPos = new SPoint();
+        /** 空格是否被按下 */
+        _this.spaceKey = false;
+        return _this;
+    }
+    /**
+     * 保存底图json
+     *
+     * @param   name    文件名
+     */
+    FloorView.prototype.saveFloorJson = function (name) {
+        // @ts-ignore
+        if (!this.scene || !this.scene.json)
+            return;
+        // @ts-ignore
+        var url = URL.createObjectURL(new Blob([this.scene.json]));
+        SNetUtil.downLoad(name, url);
+    }; // Function saveSceneSvg()
+    /**
+     * 按键按下事件
+     *
+     * @param   event       事件参数
+     */
+    FloorView.prototype.onKeyDown = function (event) {
+        var keyCode = event.keyCode;
+        this.spaceKey = false;
+        switch (keyCode) {
+            case 32:
+                this.spaceKey = true;
+                break;
+            case 87:
+                this.origin.y -= 10;
+                break;
+            case 83:
+                this.origin.y += 10;
+                break;
+            case 68:
+                this.origin.x += 10;
+                break;
+            case 65:
+                this.origin.x -= 10;
+                break;
+            default:
+                _super.prototype.onKeyDown.call(this, event);
+                break;
+        }
+        this.update();
+    }; // Function onKeyDown()
+    /**
+     * 按键松开事件
+     *
+     * @param   event       事件参数
+     */
+    FloorView.prototype.onKeyUp = function (event) {
+        this.spaceKey = false;
+        _super.prototype.onKeyUp.call(this, event);
+    }; // Function onKeyUp()
+    /**
+     * 鼠标按下事件
+     *
+     * @param   event       事件参数
+     */
+    FloorView.prototype.onMouseDown = function (event) {
+        var se = new SMouseEvent(event);
+        if (se.buttons & SMouseButton.LeftButton) {
+            this._leftKeyPos.x = se.x;
+            this._leftKeyPos.y = se.y;
+        }
+        _super.prototype.onMouseDown.call(this, event);
+    }; // Function onMouseDown()
+    /**
+     * 鼠标移动事件
+     *
+     * @param   event       事件参数
+     */
+    FloorView.prototype.onMouseMove = function (event) {
+        // 按左键移动
+        var se = new SMouseEvent(event);
+        if (se.buttons & SMouseButton.LeftButton) {
+            if (this.spaceKey) {
+                this.origin.x += se.x - this._leftKeyPos.x;
+                this.origin.y += se.y - this._leftKeyPos.y;
+            }
+            this._leftKeyPos.x = se.x;
+            this._leftKeyPos.y = se.y;
+            this.update();
+        }
+        _super.prototype.onMouseMove.call(this, event);
+    }; // Function onMouseMove()
+    return FloorView;
+}(SGraphView)); // Class FloorScene
+export { FloorView };

+ 103 - 0
src/lib/FloorView.ts

@@ -0,0 +1,103 @@
+import { SGraphItem, SGraphView } from "@saga-web/graph/lib"
+import { SMouseButton, SMouseEvent, SNetUtil } from "@saga-web/base/lib"
+import { SPoint } from "@saga-web/draw/lib"
+
+/**
+ * 楼层场景
+ *
+ * @author  郝建龙
+ */
+export class FloorView extends SGraphView {
+    /** 鼠标左键键按下时位置 */
+    private _leftKeyPos = new SPoint()
+    /** 空格是否被按下 */
+    private spaceKey: boolean = false
+
+    /**
+     * 保存底图json
+     *
+     * @param   name    文件名
+     */
+    saveFloorJson(name: string): void {
+        // @ts-ignore
+        if (!this.scene || !this.scene.json) return
+        // @ts-ignore
+        let url = URL.createObjectURL(new Blob([this.scene.json]))
+        SNetUtil.downLoad(name, url)
+    } // Function saveSceneSvg()
+
+    /**
+     * 按键按下事件
+     *
+     * @param   event       事件参数
+     */
+    protected onKeyDown(event: KeyboardEvent): void {
+        let keyCode = event.keyCode
+        this.spaceKey = false
+        switch (keyCode) {
+            case 32:
+                this.spaceKey = true
+                break
+            case 87:
+                this.origin.y -= 10
+                break
+            case 83:
+                this.origin.y += 10
+                break
+            case 68:
+                this.origin.x += 10
+                break
+            case 65:
+                this.origin.x -= 10
+                break
+            default:
+                super.onKeyDown(event)
+                break
+        }
+        this.update()
+    } // Function onKeyDown()
+
+    /**
+     * 按键松开事件
+     *
+     * @param   event       事件参数
+     */
+    protected onKeyUp(event: KeyboardEvent): void {
+        this.spaceKey = false
+        super.onKeyUp(event)
+    } // Function onKeyUp()
+
+    /**
+     * 鼠标按下事件
+     *
+     * @param   event       事件参数
+     */
+    protected onMouseDown(event: MouseEvent): void {
+        let se = new SMouseEvent(event)
+        if (se.buttons & SMouseButton.LeftButton) {
+            this._leftKeyPos.x = se.x
+            this._leftKeyPos.y = se.y
+        }
+        super.onMouseDown(event)
+    } // Function onMouseDown()
+
+    /**
+     * 鼠标移动事件
+     *
+     * @param   event       事件参数
+     */
+    protected onMouseMove(event: MouseEvent): void {
+        // 按左键移动
+        let se = new SMouseEvent(event)
+        if (se.buttons & SMouseButton.LeftButton) {
+            if (this.spaceKey) {
+                this.origin.x += se.x - this._leftKeyPos.x
+                this.origin.y += se.y - this._leftKeyPos.y
+            }
+            this._leftKeyPos.x = se.x
+            this._leftKeyPos.y = se.y
+            this.update()
+        }
+        super.onMouseMove(event)
+    } // Function onMouseMove()
+} // Class FloorScene

+ 85 - 40
src/main.js

@@ -1,44 +1,89 @@
-import Vue from 'vue'
-import App from './App.vue'
-import router from './router'
-import store from './store'
-Vue.config.productionTip = false
-
-import design from 'ant-design-vue'
-import 'ant-design-vue/dist/antd.css'
-Vue.use(design)
-import ElementUI from 'element-ui'
-import 'element-ui/lib/theme-chalk/index.css'
-Vue.use(ElementUI)
-import VueQuillEditor from 'vue-quill-editor'
-import 'quill/dist/quill.core.css'
-import 'quill/dist/quill.snow.css'
-import 'quill/dist/quill.bubble.css'
-Vue.use(VueQuillEditor)
-import WdEditor from '@/components/Editor'
-Vue.use(WdEditor)
-import Rotation from '@/components/Rotation'
-Vue.use(Rotation)
-import PicLarge from '@/components/PicLarge'
-Vue.use(PicLarge)
-import Legend from '@/components/Legend'
-Vue.use(Legend)
-import cookies from 'vue-cookie'
-Vue.use(cookies)
-
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+    return new (P || (P = Promise))(function (resolve, reject) {
+        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+        step((generator = generator.apply(thisArg, _arguments || [])).next());
+    });
+};
+var __generator = (this && this.__generator) || function (thisArg, body) {
+    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+    function verb(n) { return function (v) { return step([n, v]); }; }
+    function step(op) {
+        if (f) throw new TypeError("Generator is already executing.");
+        while (_) try {
+            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+            if (y = 0, t) op = [op[0] & 2, t.value];
+            switch (op[0]) {
+                case 0: case 1: t = op; break;
+                case 4: _.label++; return { value: op[1], done: false };
+                case 5: _.label++; y = op[1]; op = [0]; continue;
+                case 7: op = _.ops.pop(); _.trys.pop(); continue;
+                default:
+                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+                    if (t[2]) _.ops.pop();
+                    _.trys.pop(); continue;
+            }
+            op = body.call(thisArg, _);
+        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+    }
+};
+import Vue from 'vue';
+import App from './App.vue';
+import router from './router';
+import store from './store';
+Vue.config.productionTip = false;
+import design from 'ant-design-vue';
+import 'ant-design-vue/dist/antd.css';
+Vue.use(design);
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+Vue.use(ElementUI);
+import VueQuillEditor from 'vue-quill-editor';
+import 'quill/dist/quill.core.css';
+import 'quill/dist/quill.snow.css';
+import 'quill/dist/quill.bubble.css';
+Vue.use(VueQuillEditor);
+import WdEditor from '@/components/Editor';
+Vue.use(WdEditor);
+import Rotation from '@/components/Rotation';
+Vue.use(Rotation);
+import PicLarge from '@/components/PicLarge';
+Vue.use(PicLarge);
+import Legend from '@/components/Legend';
+Vue.use(Legend);
+import cookies from 'vue-cookie';
+Vue.use(cookies);
 //////////模拟传入参数
-const username = 'aiyu6'
+var username = 'aiyu6';
 /////////////////
 // 在跳入路由之前要请求获取权限信息
-router.beforeEach(async (to, from, next) => {
-    if (!store.state.isrequestAuth) {
-        await store.dispatch('getUserInfo', username)
-        await store.dispatch('getFloors')
-    }
-    next()
-})
+router.beforeEach(function (to, from, next) { return __awaiter(void 0, void 0, void 0, function () {
+    return __generator(this, function (_a) {
+        switch (_a.label) {
+            case 0:
+                if (!!store.state.isrequestAuth) return [3 /*break*/, 3];
+                return [4 /*yield*/, store.dispatch('getUserInfo', username)];
+            case 1:
+                _a.sent();
+                return [4 /*yield*/, store.dispatch('getFloors')];
+            case 2:
+                _a.sent();
+                _a.label = 3;
+            case 3:
+                next();
+                return [2 /*return*/];
+        }
+    });
+}); });
 new Vue({
-    router,
-    store,
-    render: (h) => h(App),
-}).$mount('#app')
+    router: router,
+    store: store,
+    render: function (h) { return h(App); },
+}).$mount('#app');

+ 44 - 0
src/main.ts

@@ -0,0 +1,44 @@
+import Vue from 'vue'
+import App from './App.vue'
+import router from './router'
+import store from './store'
+Vue.config.productionTip = false
+
+import design from 'ant-design-vue'
+import 'ant-design-vue/dist/antd.css'
+Vue.use(design)
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css'
+Vue.use(ElementUI)
+import VueQuillEditor from 'vue-quill-editor'
+import 'quill/dist/quill.core.css'
+import 'quill/dist/quill.snow.css'
+import 'quill/dist/quill.bubble.css'
+Vue.use(VueQuillEditor)
+import WdEditor from '@/components/Editor'
+Vue.use(WdEditor)
+import Rotation from '@/components/Rotation'
+Vue.use(Rotation)
+import PicLarge from '@/components/PicLarge'
+Vue.use(PicLarge)
+import Legend from '@/components/Legend'
+Vue.use(Legend)
+import cookies from 'vue-cookie'
+Vue.use(cookies)
+
+//////////模拟传入参数
+const username = 'aiyu6'
+/////////////////
+// 在跳入路由之前要请求获取权限信息
+router.beforeEach(async (to, from, next) => {
+    if (!store.state.isrequestAuth) {
+        await store.dispatch('getUserInfo', username)
+        await store.dispatch('getFloors')
+    }
+    next()
+})
+new Vue({
+    router,
+    store,
+    render: (h) => h(App),
+}).$mount('#app')

+ 13 - 0
src/shims-tsx.d.ts

@@ -0,0 +1,13 @@
+import Vue, { VNode } from 'vue'
+
+declare global {
+  namespace JSX {
+    // tslint:disable no-empty-interface
+    interface Element extends VNode {}
+    // tslint:disable no-empty-interface
+    interface ElementClass extends Vue {}
+    interface IntrinsicElements {
+      [elem: string]: any;
+    }
+  }
+}

+ 4 - 0
src/shims-vue.d.ts

@@ -0,0 +1,4 @@
+declare module '*.vue' {
+  import Vue from 'vue'
+  export default Vue
+}

+ 5 - 8
src/views/equipment/index.vue

@@ -58,7 +58,7 @@ export default {
             systemName: '供电系统',
             floorInfo: {
                 floorName: 'F1',
-                floorId: 'f1'
+                floorId: '1'
             },
             dialogInfo: {},
             brand: [], //品牌
@@ -82,7 +82,6 @@ export default {
                 major: '弱电',
                 plazaId: '1001145'
             }
-
             querySelect({ data, postParams }).then(res => {
                 this.brand = res.data.data.glsms_asset.brand
                 this.manufacturer = res.data.data.glsms_asset.manufacturer
@@ -112,8 +111,8 @@ export default {
             this.systemName = item.name
         },
         emitFloor(item) {
-            this.floorInfo = item
-            this.$refs.floorMap.init()
+            this.floorInfo.floorId = item
+            this.$refs.floorMap.init(item)
         },
         dialogVisible(eve) {
             console.log(eve)
@@ -125,12 +124,10 @@ export default {
         this.query()
         this.tabFind()
         this.everySystem = this.system[0].children
-        // this.$refs.floorMap.init()
+        this.$refs.floorMap.init(1)
         // getFloorList({ plazaId: '964' }).then(res => {
         //     console.log('12313', res)
         // })
-        // this.$refs.dialog.init()
-        // this.$refs.floorMap.init()
     }
 }
 </script>
@@ -173,7 +170,7 @@ export default {
             color: #646c73;
             font-size: 14px;
             height: 100%;
-            // background: rgba(242, 245, 247, 1);
+            background: rgba(242, 245, 247, 1);
         }
         .li-style {
             padding: 0 0 18px 35px;

+ 47 - 32
src/views/equipment/table/computerTable.vue

@@ -1,30 +1,32 @@
 <!-- 设备清单的有select的表格 -->
 <template>
     <div class='compute-list'>
-        <div class='eq-list-top'>
-            <a-input-search placeholder style='width: 192px;margin-bottom:12px;height:32px;' @search='onSearch' />
-        </div>
-        <el-table :data='tableData' style='width: 100%'>
-            <el-table-column type='index' label='序号' width='80'></el-table-column>
-            <el-table-column prop='lb' label='抽屉编码' width='160'></el-table-column>
-            <el-table-column prop='sl' label='出现规格'></el-table-column>
-            <el-table-column prop='unit' label='楼层'></el-table-column>
-            <el-table-column prop='brand' label='电井编码'></el-table-column>
-            <el-table-column prop='brand' label='电箱编码'></el-table-column>
-            <el-table-column prop='brand' label='供电容量(KW)'></el-table-column>
-            <el-table-column prop='brand' label='控制回路'></el-table-column>
-        </el-table>
-        <div class='foot'>
-            <el-pagination
-                background
-                layout='prev, pager, next'
-                :total='total/pageSize'
-                :page-size='size'
-                @prev-click='pageChanged'
-                @next-click='pageChanged'
-                @current-change='pageChanged'
-            ></el-pagination>
-        </div>
+        <el-dialog :title='`${systemName}`' :visible.sync='visible' :fullscreen='true'>
+            <div class='eq-list-top'>
+                <a-input-search v-model='keyword' placeholder style='width: 192px;margin-bottom:12px;height:32px;' @search='getList' />
+            </div>
+            <el-table :data='tableData' style='width: 100%'>
+                <el-table-column type='index' label='序号' width='80'></el-table-column>
+                <el-table-column prop='lb' label='抽屉编码' width='160'></el-table-column>
+                <el-table-column prop='sl' label='出现规格'></el-table-column>
+                <el-table-column prop='unit' label='楼层'></el-table-column>
+                <el-table-column prop='brand' label='电井编码'></el-table-column>
+                <el-table-column prop='brand' label='电箱编码'></el-table-column>
+                <el-table-column prop='brand' label='供电容量(KW)'></el-table-column>
+                <el-table-column prop='brand' label='控制回路'></el-table-column>
+            </el-table>
+            <div class='foot'>
+                <el-pagination
+                    background
+                    layout='prev, pager, next'
+                    :total='total/pageSize'
+                    :page-size='size'
+                    @prev-click='pageChanged'
+                    @next-click='pageChanged'
+                    @current-change='pageChanged'
+                ></el-pagination>
+            </div>
+        </el-dialog>
     </div>
 </template>
 <script>
@@ -36,12 +38,18 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
-            size: 10
+            size: 10,
+            visible: false,
+            keyword: '',
+            systemName: ''
         }
     },
-    props: ['major'],
+
     methods: {
-        onSearch() {},
+        open(name) {
+            this.visible = true
+            this.systemName = name
+        },
         pageChanged(page, size) {
             this.currentPage = page
             this.size = size
@@ -52,8 +60,8 @@ export default {
             let data = {
                 page: this.currentPage,
                 size: this.size,
-                plazaId: this.$store.state.plazaId,
-                major: this.major
+                plazaId: this.$store.state.plazaId
+                // major: this.major
             }
             queryEquipmentList({ data, postParams }).then(res => {
                 console.log(res)
@@ -61,10 +69,10 @@ export default {
                 this.total = res.data.count
             })
         }
-    },
-    mounted() {
-        this.getList()
     }
+    // mounted() {
+    //     this.getList()
+    // }
 }
 </script>
 <style lang="less" scoped>
@@ -83,4 +91,11 @@ export default {
         white-space: nowrap;
     }
 }
+</style>
+<style lang="less">
+.compute-list {
+    .el-dialog {
+        padding-left: 20px;
+    }
+}
 </style>

+ 2 - 8
src/views/equipment/table/eqListTable.vue

@@ -34,7 +34,7 @@
 import Select from '@/components/Select/Select.vue'
 import { queryEquipmentList } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
-import { querySelect } from '@/api/public.js'
+
 export default {
     components: { Select },
     data() {
@@ -63,12 +63,7 @@ export default {
             this.size = size
             this.getList()
         },
-        getSelect() {
-            let postParams = {}
-            querySelect({ postParams }).then(res => {
-                console.log(res)
-            })
-        },
+
         init() {
             this.floorSelect = []
             if (this.floorsArr.length > 0) {
@@ -108,7 +103,6 @@ export default {
     mounted() {
         this.init()
         this.getList()
-        this.getSelect()
     }
 }
 </script>

+ 2 - 2
src/views/legendRules/addList.vue

@@ -39,9 +39,9 @@ export default {
                     })
                 })
             })
-            this.querySelect()
+            this.querySelectTab()
         },
-        querySelect() {
+        querySelectTab() {
             let postParams = {
                 GraphCategoryId: this.GraphCategoryId
             }

+ 13 - 0
tsconfig.json

@@ -0,0 +1,13 @@
+{
+    "compilerOptions": {
+        "target": "es5",
+        "module": "es2015",
+        "moduleResolution": "node",
+        "allowSyntheticDefaultImports": true,
+        "experimentalDecorators": true,
+        "lib": ["dom", "es5", "es2015", "es2015.promise"],
+        "strict": true
+    },
+    "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"],
+    "exclude": ["node_modules"]
+}