Bläddra i källkod

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

5 år sedan
förälder
incheckning
ebf4cfb912

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldEquipmentServiceImpl.java

@@ -45,7 +45,7 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
             if (mouldEquipment.getId() == null) {
                 //添加设备
                 //查询当前设备编号的模具是否存在
-                Integer count = mouldMapper.selectCount(new QueryWrapper<Mould>().eq("equipment_no", mouldEquipment.getEquipmentNo()));
+                Integer count = mouldEquipmentMapper.selectCount(new QueryWrapper<MouldEquipment>().eq("equipment_no", mouldEquipment.getEquipmentNo()));
                 if (count > 0) {
                     msg.setError("当前设备编号已存在,请重新输入其他模具编号");
                 } else {

BIN
ys_vue/src/assets/image/login_logo.png


+ 2 - 2
ys_vue/src/main.js

@@ -56,10 +56,10 @@ router.beforeEach((to, from, next) => {
                 if(routes[i].name == "项目管理" && user.parentId > 1){
                     var children = routes[i].children;
                     for(var j in children){
-                        if(children[j].name == "人员管理" && user.isManager == 1){
+                        if(children[j].name == "人员管理" && user.isManager == 0){
                             children[j].hidden = true
                         }
-                        if(children[j].name == "权限管理" && user.isManager == 1){
+                        if(children[j].name == "权限管理" && user.isManager == 0){
                             children[j].hidden = true
                         }
                     }

+ 3 - 3
ys_vue/src/routes.js

@@ -76,7 +76,7 @@ let routes = [
         children: [
             { path: '/moldList', component: moldList, name: '模具列表' },
             { path: '/moldList/:id', component: moldDetail, name: '模具详情', hidden: true },
-            { path: '/moldFile', component: moldFile, name: '文档审批' },
+            // { path: '/moldFile', component: moldFile, name: '文档审批' },
             { path: '/moldDownload', component: moldDownload, name: '文档下载' }
         ]
     },
@@ -88,8 +88,8 @@ let routes = [
         iconCls: 'iconfont icon-setting-fill',
         children: [
             // { path: '/role', component: role, name: '角色管理' },
-            { path: '/comp', component: comp, name: '公司管理' },
-            { path: '/factory', component: factory, name: '工厂管理' },
+            { path: '/comp', component: comp, name: '资产方管理' },
+            { path: '/factory', component: factory, name: '生产方管理' },
             { path: '/allocation', component: allocation, name: '云模盒管理' }
         ]
     },

+ 1 - 1
ys_vue/src/views/Login.vue

@@ -2,7 +2,7 @@
     <div class="login-par">
         <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" label-width="0px" class="demo-ruleForm login-container">
             <div class="login-logo">
-                <img src="../assets/image/login_logo.png" />
+                <img src="../assets/image/login_logo.png" style="width:80px;"/>
             </div>
             <h3 class="title">云塑网后台管理系统</h3>
             <el-form-item class="login-input" prop="account">

+ 29 - 28
ys_vue/src/views/base/comp.vue

@@ -4,7 +4,7 @@
 		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
 			<el-form :inline="true" :model="filters">
                 <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入公司名称进行搜索" clearable></el-input>
+                    <el-input v-model="filters.keyName" placeholder="请输入资产方名称进行搜索" clearable></el-input>
                 </el-form-item>
 				<el-form-item>
 					<el-button type="primary" @click.native="getComp">查询</el-button>
@@ -18,13 +18,13 @@
 		<!--列表-->
 		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
             <el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="companyName" label="公司名称" width="300" sortable></el-table-column>
-            <el-table-column prop="companyType" label="公司类型" width="200" sortable>
+			<el-table-column prop="companyName" label="资产方名称" width="300" sortable></el-table-column>
+            <!-- <el-table-column prop="companyType" label="资产方类型" width="200" sortable>
                 <template slot-scope="scope">
                     {{ scope.row.companyType == 0?"资产方":"生产方" }}
                 </template>
-            </el-table-column>
-            <el-table-column prop="companyAddress" label="公司地址" sortable></el-table-column>
+            </el-table-column> -->
+            <el-table-column prop="companyAddress" label="资产方地址" sortable></el-table-column>
 			<el-table-column label="操作" width="150">
 				<template slot-scope="scope">
 					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">编辑</el-button>
@@ -47,19 +47,19 @@
 		</el-col>
 
         <!--新增界面-->
-		<el-dialog title="新增公司" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+		<el-dialog title="新增资产方" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
 			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm">
-				<el-form-item label="公司名称" prop="companyName">
-					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入公司地址"></el-input>
+				<el-form-item label="资产方名称" prop="companyName">
+					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入资产方地址"></el-input>
 				</el-form-item>
-                <el-form-item label="公司类型" prop="companyType">
+                <!-- <el-form-item label="公司类型" prop="companyType">
                     <el-select v-model="addForm.companyType" clearable filterable placeholder="请选择公司类型" style="width:533px">
                         <el-option v-for="item in team" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
-				</el-form-item>
-                <el-form-item label="公司地址" prop="companyAddress">
-					<el-input v-model="addForm.companyAddress" autocomplete="off" placeholder="请输入公司地址"></el-input>
+				</el-form-item> -->
+                <el-form-item label="资产方地址" prop="companyAddress">
+					<el-input v-model="addForm.companyAddress" autocomplete="off" placeholder="请输入资产方地址"></el-input>
 				</el-form-item>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
@@ -69,19 +69,19 @@
 		</el-dialog>
 
 		<!--编辑界面-->
-		<el-dialog title="编辑公司" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+		<el-dialog title="编辑资产方" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
 			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm">
-				<el-form-item label="公司名称" prop="companyName">
-					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入公司地址"></el-input>
+				<el-form-item label="资产方名称" prop="companyName">
+					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入资产方地址"></el-input>
 				</el-form-item>
-                <el-form-item label="公司名称" prop="companyType">
+                <!-- <el-form-item label="公司名称" prop="companyType">
                     <el-select v-model="editForm.companyType" clearable filterable placeholder="请选择公司类型" style="width:533px">
                         <el-option v-for="item in team" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
-				</el-form-item>
-                <el-form-item label="公司地址" prop="companyAddress">
-					<el-input v-model="editForm.companyAddress" autocomplete="off" placeholder="请输入公司地址"></el-input>
+				</el-form-item> -->
+                <el-form-item label="资产方地址" prop="companyAddress">
+					<el-input v-model="editForm.companyAddress" autocomplete="off" placeholder="请输入资产方地址"></el-input>
 				</el-form-item>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
@@ -110,13 +110,13 @@
                 
                 formRules: {
 					companyName: [
-						{ required: true, message: '请输入公司名称', trigger: 'blur' }
+						{ required: true, message: '请输入资产方名称', trigger: 'blur' }
                     ],
                     companyType: [
-                        { required: true, message:'请选择公司类型', trigger: ['blur', 'change'] }
+                        { required: true, message:'请选择资产方类型', trigger: ['blur', 'change'] }
                     ],
                     companyAddress: [
-                        { required: true, message: '请输入公司地址', trigger: 'blur' }
+                        { required: true, message: '请输入资产方地址', trigger: 'blur' }
                     ]
                 },
 
@@ -126,7 +126,7 @@
 				addLoading: false,
 				addForm: {
                     companyName: '',
-                    companyType: '',
+                    companyType: 0,
                     companyAddress: '',
                     flag: 0
 				},
@@ -137,7 +137,7 @@
 				editForm: {
 					id: 0,
                     companyName: '',
-                    companyType: '',
+                    companyType: 0,
                     companyAddress: '',
                     flag: 1
 				}
@@ -161,7 +161,8 @@
                 this.http.post(this.port.base.companyList, {
                     keyName: this.filters.keyName,
                     pageNum: this.page,
-                    pageSize: this.size
+                    pageSize: this.size,
+                    companyType: 0
                 }, res => {
                     this.listLoading = false;
                     if (res.code == "ok") {
@@ -187,7 +188,7 @@
                 this.addFormVisible = true;
 				this.addForm = {
                     companyName: '',
-                    companyType: '',
+                    companyType: 0,
                     companyAddress: '',
                     flag: 0
 				};
@@ -227,7 +228,7 @@
             
 			//删除
 			handleDel(index, row) {
-				this.$confirm('确认删除该公司吗?', '提示', {
+				this.$confirm('确认删除该资产方吗?', '提示', {
 					type: 'warning'
 				}).then(() => {
                     this.http.post(this.port.base.delCompany, {
@@ -260,7 +261,7 @@
                 this.editForm = {
                     id: row.id,
                     companyName: row.companyName,
-                    companyType: row.companyType==0?'资产方':'生产方',
+                    companyType: 0,
                     companyAddress: row.companyAddress,
                     flag: 1
 				};

+ 160 - 115
ys_vue/src/views/base/factory.vue

@@ -4,7 +4,7 @@
 		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
 			<el-form :inline="true" :model="filters">
                 <el-form-item>
-                    <el-input v-model="filters.keyName" placeholder="请输入工厂名称进行搜索" clearable></el-input>
+                    <el-input v-model="filters.keyName" placeholder="请输入生产方名称进行搜索" clearable></el-input>
                 </el-form-item>
 				<el-form-item>
 					<el-button type="primary" @click.native="getFactory">查询</el-button>
@@ -18,8 +18,8 @@
 		<!--列表-->
 		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
             <el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="factoryName" label="工厂名称" width="300" sortable></el-table-column>
-            <el-table-column prop="factoryArea" label="工厂地址" sortable></el-table-column>
+			<el-table-column prop="companyName" label="生产方名称" width="300" sortable></el-table-column>
+            <el-table-column prop="companyAddress" label="生产方地址" sortable></el-table-column>
 			<el-table-column label="操作" width="150">
 				<template slot-scope="scope">
 					<el-button size="small" @click.native="handleEdit(scope.$index, scope.row)">编辑</el-button>
@@ -42,15 +42,15 @@
 		</el-col>
 
         <!--新增界面-->
-		<el-dialog title="新增工厂" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm" :inline="true" class="demo-form-inline">
-				<el-form-item label="工厂名称" prop="factoryName">
-					<el-input v-model="addForm.factoryName" autocomplete="off" placeholder="请输入工厂名称"></el-input>
+		<el-dialog title="新增生产方" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="addForm" label-width="100px" :rules="formRules" ref="addForm">
+				<el-form-item label="生产方名称" prop="factoryName">
+					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
 				</el-form-item>
-                <el-form-item label="工厂地址" prop="factoryArea">
-					<el-input v-model="addForm.factoryArea" autocomplete="off" :change="changeFactoryArea('addContainer')" placeholder="请输入工厂地址"></el-input>
+                <el-form-item label="生产方地址" prop="factoryArea">
+					<el-input v-model="addForm.companyAddress" autocomplete="off" :change="changeFactoryArea('addContainer')" placeholder="请输入生产方地址"></el-input>
 				</el-form-item>
-                <div id="addContainer" class="formMap" v-if="addForm.factoryArea != ''"></div>
+                <div id="addContainer" class="formMap"></div>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
 				<el-button @click.native="addFormVisible = false">取消</el-button>
@@ -59,15 +59,15 @@
 		</el-dialog>
 
 		<!--编辑界面-->
-		<el-dialog title="编辑工厂" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
-			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm" :inline="true" class="demo-form-inline">
-				<el-form-item label="工厂名称" prop="factoryName">
-					<el-input v-model="editForm.factoryName" autocomplete="off" placeholder="请输入工厂名称"></el-input>
+		<el-dialog title="编辑生产方" v-if="editFormVisible" :visible.sync="editFormVisible" :close-on-click-modal="false" customClass='customWidth'>
+			<el-form :model="editForm" label-width="100px" :rules="formRules" ref="editForm">
+				<el-form-item label="生产方名称" prop="factoryName">
+					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
 				</el-form-item>
-                <el-form-item label="工厂地址" prop="factoryArea">
-					<el-input v-model="editForm.factoryArea" autocomplete="off" :change="changeFactoryArea('editContainer')" placeholder="请输入工厂地址"></el-input>
+                <el-form-item label="生产方地址" prop="factoryArea">
+					<el-input v-model="editForm.companyAddress" autocomplete="off" :change="changeFactoryArea('editContainer')" placeholder="请输入生产方地址"></el-input>
 				</el-form-item>
-                <div id="editContainer" class="formMap" v-if="editForm.factoryArea != ''"></div>
+                <div id="editContainer" class="formMap"></div>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
 				<el-button @click.native="editFormVisible = false">取消</el-button>
@@ -78,6 +78,7 @@
 </template>
 
 <script>
+    import Vue from 'vue';
 	import util from '../../common/js/util'
 
 	export default {
@@ -93,22 +94,26 @@
                 listLoading: false,
                 tableHeight: 0,
                 
-                noSub: false,
                 formRules: {
-					factoryName: [
-						{ required: true, message: '请输入公司名称', trigger: 'blur' }
+					companyName: [
+						{ required: true, message: '请输入生产方名称', trigger: 'blur' }
                     ],
-                    factoryArea: [
-                        { required: true, message: '请输入公司地址', trigger: 'blur' }
+                    companyAddress: [
+                        { required: true, message: '请输入生产方地址', trigger: 'blur' }
                     ]
                 },
 
+                // 地图
+                map: '',
+                marker: '',
+
                 // 新增界面
 				addFormVisible: false,
 				addLoading: false,
 				addForm: {
-                    factoryName: '',
-                    factoryArea: '',
+                    companyName: '',
+                    companyType: 1,
+                    companyAddress: '',
                     yLng: 0,
                     xLat: 0,
                     flag: 0
@@ -119,8 +124,9 @@
 				editLoading: false,
 				editForm: {
 					id: 0,
-					factoryName: '',
-                    factoryArea: '',
+					companyName: '',
+                    companyType: 1,
+                    companyAddress: '',
                     yLng: 0,
                     xLat: 0,
                     flag: 1
@@ -139,13 +145,14 @@
 				this.getFactory();
             },
 
-			//获取用户列表
+			//获取列表
 			getFactory() {
 				this.listLoading = true;
-                this.http.post(this.port.base.factoryList, {
+                this.http.post(this.port.base.companyList, {
                     keyName: this.filters.keyName,
                     pageNum: this.page,
-                    pageSize: this.size
+                    pageSize: this.size,
+                    companyType: 1
                 }, res => {
                     this.listLoading = false;
                     if (res.code == "ok") {
@@ -169,9 +176,9 @@
             //地址输入切换
             changeFactoryArea(mapId) {
                 if(mapId == "addContainer"){
-                    this.markLocation(this.addForm.factoryArea, mapId);
+                    this.markLocation(this.addForm.companyAddress, mapId);
                 } else {
-                    this.markLocation(this.editForm.factoryArea, mapId);
+                    this.markLocation(this.editForm.companyAddress, mapId);
                 }
                 
             },
@@ -179,61 +186,54 @@
             //显示新增界面
 			handleAdd() {
                 this.addFormVisible = true;
-                this.noSub = false;
 				this.addForm = {
-                    factoryName: '',
-                    factoryArea: '',
-                    yLng: 0,
-                    xLat: 0,
+                    companyName: '',
+                    companyType: 1,
+                    companyAddress: '',
+                    yLng: 116.397511,
+                    xLat: 39.907545,
                     flag: 0
-				};
+                };
             },
 
             //新增
 			addSubmit() {
 				this.$refs.addForm.validate((valid) => {
 					if (valid) {
-                        if(this.noSub){
-                            this.$message({
-                                message: '定位失败!',
-                                type: 'error'
-                            });
-                        } else {
-                            this.addLoading = true;
-                            this.http.post(this.port.base.addFactory, this.addForm , res => {
-                                this.addLoading = false;
-                                this.addFormVisible = false;
-                                if (res.code == "ok") {
-                                    this.$message({
-                                        message: '创建成功',
-                                        type: 'success'
-                                    });
-                                    this.getFactory();
-                                } else {
-                                    this.$message({
-                                        message: res.msg,
-                                        type: 'error'
-                                    });
-                                }
-                            }, error => {
-                                this.addLoading = false;
-                                this.addFormVisible = false;
+                        this.addLoading = true;
+                        this.http.post(this.port.base.addCompany, this.addForm , res => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            if (res.code == "ok") {
+                                this.$message({
+                                    message: '创建成功',
+                                    type: 'success'
+                                });
+                                this.getFactory();
+                            } else {
                                 this.$message({
-                                    message: error,
+                                    message: res.msg,
                                     type: 'error'
                                 });
-                            })
-                        }
+                            }
+                        }, error => {
+                            this.addLoading = false;
+                            this.addFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
 					}
 				});
             },
             
 			//删除
 			handleDel(index, row) {
-				this.$confirm('确认删除该工厂吗?', '提示', {
+				this.$confirm('确认删除该生产方吗?', '提示', {
 					type: 'warning'
 				}).then(() => {
-                    this.http.post(this.port.base.delFactory, {
+                    this.http.post(this.port.base.delCompany, {
                         id: row.id
                     }, res => {
                         if (res.code == "ok") {
@@ -258,60 +258,98 @@
             },
             
 			//显示编辑界面
-			handleEdit: function (index, row) {
+			handleEdit(index, row) {
                 this.editFormVisible = true;
-                this.noSub = false;
                 this.editForm = {
                     id: row.id,
-                    factoryName: row.factoryName,
-                    factoryArea: row.factoryArea,
-                    yLng: row.yLng,
-                    xLat: row.xLat,
+                    companyName: row.companyName,
+                    companyType: 1,
+                    companyAddress: row.companyAddress,
+                    yLng: row.ylng,
+                    xLat: row.xlat,
                     flag: 1
 				};
             },
             
 			//编辑
-			editSubmit: function () {
+			editSubmit() {
 				this.$refs.editForm.validate((valid) => {
 					if (valid) {
-                        if(this.noSub){
-                            this.$message({
-                                message: '定位失败!',
-                                type: 'error'
-                            });
-                        } else {
-                            this.editLoading = true;
-                            this.http.post(this.port.base.addFactory, this.editForm , res => {
-                                this.editLoading = false;
-                                this.editFormVisible = false;
-                                if (res.code == "ok") {
-                                    this.$message({
-                                        message: '修改成功',
-                                        type: 'success'
-                                    });
-                                    this.getFactory();
-                                } else {
-                                    this.$message({
-                                        message: res.msg,
-                                        type: 'error'
-                                    });
-                                }
-                            }, error => {
-                                this.editLoading = false;
-                                this.editFormVisible = false;
+                        this.editLoading = true;
+                        this.http.post(this.port.base.addCompany, this.editForm , res => {
+                            this.editLoading = false;
+                            this.editFormVisible = false;
+                            if (res.code == "ok") {
                                 this.$message({
-                                    message: error,
+                                    message: '修改成功',
+                                    type: 'success'
+                                });
+                                this.getFactory();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
                                     type: 'error'
                                 });
-                            })
-                        }
+                            }
+                        }, error => {
+                            this.editLoading = false;
+                            this.editFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: 'error'
+                            });
+                        })
 					}
 				});
             },
 
+            //获取地图
+            setMap(mapId) {
+                if(mapId == 'addContainer') {
+                    this.map = new AMap.Map('addContainer', {
+                        resizeEnable: true, // 允许缩放
+                        center:[118.784333,32.041546],
+                        zoom:10
+                    })
+
+                    this.marker = new AMap.Marker({
+                        map: this.map,
+                        position: new AMap.LngLat(118.784333,32.041546),   // 经纬度
+                    });
+                } else {
+                    this.map = new AMap.Map('editContainer', {
+                        resizeEnable: true, // 允许缩放
+                        center:[this.editForm.yLng , this.editForm.xLat],
+                        zoom:10
+                    })
+
+                    this.marker = new AMap.Marker({
+                        map: this.map,
+                        position: new AMap.LngLat(this.editForm.yLng , this.editForm.xLat),   // 经纬度
+                    });
+                }
+                
+                var _this = this;
+                this.map.on('click', function(e) {
+                    _this.map.remove(_this.marker);
+                    var Lng = e.lnglat.getLng(),
+                    Lat = e.lnglat.getLat();
+                    if(mapId == 'addContainer') {
+                        _this.addForm.yLng = Lng;
+                        _this.addForm.xLat = Lat;
+                    } else {
+                        _this.editForm.yLng = Lng;
+                        _this.editForm.xLat = Lat;
+                    }
+                    _this.marker = new AMap.Marker({
+                        map: _this.map,
+                        position: new AMap.LngLat(Lng , Lat),   // 经纬度
+                    });
+                });
+            },
+
             // 获取经纬度
-            markLocation: function(address,mapId) {
+            markLocation(address,mapId) {
                 var _this = this;
                 AMap.plugin('AMap.Geocoder', function() {
                     var geocoder = new AMap.Geocoder();            
@@ -329,29 +367,23 @@
                                 _this.editForm.yLng = lng;
                                 _this.editForm.xLat = lat;
                             }
-        
-                            // 地图实例
-                            var map = new AMap.Map(mapId, {
-                                resizeEnable: true, // 允许缩放
-                                center: [lng, lat], // 设置地图的中心点
-                                zoom: 15        // 设置地图的缩放级别,0 - 20
-                            });
                             
                             // 添加标记
-                            var marker = new AMap.Marker({
-                                map: map,
+                            _this.map.remove(_this.marker);
+                            _this.map.setZoomAndCenter(10, [lng, lat]);
+                            _this.marker = new AMap.Marker({
+                                map: _this.map,
                                 position: new AMap.LngLat(lng, lat),   // 经纬度
                             });
                             
+
                         } else {
-                            _this.noSub = true;
                             //console.log('定位失败!');
                         }
                     });
                 });
             }
         },
-
         created() {
             let height = window.innerHeight;
             this.tableHeight = height - 210;
@@ -360,7 +392,20 @@
                 that.tableHeight = window.innerHeight - 210;    
             };
         },
-
+        watch: {
+            addFormVisible(val) {
+                if(val){
+                    var _this = this
+                    setTimeout(function(){ _this.setMap('addContainer'); }, 300);
+                }
+            },
+            editFormVisible(val) {
+                if(val){
+                    var _this = this
+                    setTimeout(function(){ _this.setMap('editContainer'); }, 300);
+                }
+            }
+        },
 		mounted() {
 			this.getFactory();
         }