panhui 7 лет назад
Родитель
Сommit
6a5bdd06ee

+ 206 - 0
src/main/vue/src/components/AimPlaceContent.vue

@@ -0,0 +1,206 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="100px" label-position="right" size="small" style="max-width: 500px;">
+            <div style="height:50vh;overflow:auto;padding:0 10px">
+                <el-form-item prop="name" label="名称">
+                    <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="type" label="类别">
+                    <el-input v-model="formData.type" :disabled="'type'==subColumn"></el-input>
+                </el-form-item>
+                <!-- <el-form-item prop="ownedLandMarkId" label="所属地标ID">
+                    <template>
+                        <el-select v-model="formData.ownedLandMarkId" clearable placeholder="请选择" disabled="true">
+                            <el-option v-for="item in ownedLandMarkIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-form-item> -->
+                <el-form-item prop="arContentGroupId" label="AR内容组ID">
+                    <el-input v-model="formData.arContentGroupId" :disabled="'arContentGroupId'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="arKitPosX" label="ArKit坐标X">
+                    <el-input v-model="formData.arKitPosX" :disabled="'arKitPosX'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="arKitPosY" label="ArKit坐标Y">
+                    <el-input v-model="formData.arKitPosY" :disabled="'arKitPosY'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="arKitPosZ" label="ArKit坐标Z">
+                    <el-input v-model="formData.arKitPosZ" :disabled="'arKitPosZ'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="arKitScale" label="ArKit缩放">
+                    <el-input v-model="formData.arKitScale" :disabled="'arKitScale'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="arKitAngle" label="ArKit角度">
+                    <el-input v-model="formData.arKitAngle" :disabled="'arKitAngle'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="arKitShowLenth" label="ArKit一定距离显示">
+                    <el-input v-model="formData.arKitShowLenth" :disabled="'arKitShowLenth'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="gyroPosX" label="Gyro坐标X">
+                    <el-input v-model="formData.gyroPosX" :disabled="'gyroPosX'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="gyroPosY" label="Gyro坐标Y">
+                    <el-input v-model="formData.gyroPosY" :disabled="'gyroPosY'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="gyroPosZ" label="Gyro坐标Z">
+                    <el-input v-model="formData.gyroPosZ" :disabled="'gyroPosZ'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="gyroPosScale" label="Gyro缩放">
+                    <el-input v-model="formData.gyroPosScale" :disabled="'gyroPosScale'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="gyroPosAngle" label="Gyro角度">
+                    <el-input v-model="formData.gyroPosAngle" :disabled="'gyroPosAngle'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="gyroPosShowLenth" label="Gyro一定距离显示">
+                    <el-input v-model="formData.gyroPosShowLenth" :disabled="'gyroPosShowLenth'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="vuforiaImageInfoAreaMarking" label="Gyro绑定识别图区域标记编号">
+                    <el-input v-model="formData.vuforiaImageInfoAreaMarking" :disabled="'vuforiaImageInfoAreaMarking'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark1" label="备注1">
+                    <el-input v-model="formData.remark1" :disabled="'remark1'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark2" label="备注2">
+                    <el-input v-model="formData.remark2" :disabled="'remark2'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark3" label="备注3">
+                    <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark4" label="备注4">
+                    <el-input v-model="formData.remark4" :disabled="'remark4'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark5" label="备注5">
+                    <el-input v-model="formData.remark5" :disabled="'remark5'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark6" label="备注6">
+                    <el-input v-model="formData.remark6" :disabled="'remark6'==subColumn"></el-input>
+                </el-form-item>
+            </div>
+            <el-form-item style="margin-top:10px">
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="cancel">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import formValidator from '../formValidator'
+
+export default {
+    name: 'AimPlaceContent',
+    props: {
+        formData: {
+            type: Object,
+            default: () => {
+                return {}
+            }
+        }
+    },
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
+
+        // if (this.$route.query.id) {
+        //     this.$http.get({
+        //         url: '/aimPlaceContent/getOne',
+        //         data: {
+        //             id: this.$route.query.id
+        //         }
+        //     }).then(res => {
+        //         if (res.success) {
+
+
+        //             this.formData = res.data;
+
+        //             if (this.$route.query.column) {
+        //                 this.formData[this.subColumn] = this.subValue;
+        //             }
+        //         }
+        //     })
+        // } else {
+        //     if (this.$route.query.column) {
+        //         this.formData[this.subColumn] = this.subValue;
+        //     }
+        // }
+
+
+
+
+        this.$http.get({
+            url: '/landMark/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.ownedLandMarkIdOptions.push({ label: item.mapName, value: item.id });
+                    })
+                }
+            }
+        });
+    },
+    data() {
+        return {
+            saving: false,
+            rules: {
+            },
+            ownedLandMarkIdOptions: [],
+            subColumn: '',
+            subValue: '',
+        }
+    },
+    methods: {
+        cancel() {
+            this.$emit('hide')
+        },
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+            this.$http.post({
+                url: this.formData.id ? '/aimPlaceContent/update' : '/aimPlaceContent/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$emit('hide')
+                    this.$emit('update')
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/aimPlaceContent/del',
+                    data: { id: this.formData.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$emit('hide')
+                this.$emit('update')
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+    }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 159 - 0
src/main/vue/src/components/AimPlaceContentChild.vue

@@ -0,0 +1,159 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <!-- <el-form-item prop="aimPlaceContentId" label="目标点内容ID">
+                <template>
+                    <el-select v-model="formData.aimPlaceContentId" clearable placeholder="请选择" :disabled="'aimPlaceContentId'==subColumn">
+                        <el-option v-for="item in aimPlaceContentIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item> -->
+            <el-form-item prop="type" label="类别">
+                <el-input v-model="formData.type" :disabled="'type'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="itemName" label="名称">
+                <el-input v-model="formData.itemName" :disabled="'itemName'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="itemMess" label="描述">
+                <el-input type="textarea" v-model="formData.itemMess" :disabled="'itemMess'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="itemDes" label="详细">
+                <el-input type="textarea" v-model="formData.itemDes" :disabled="'itemDes'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="remark1" label="备注1">
+                <el-input v-model="formData.remark1" :disabled="'remark1'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="remark2" label="备注2">
+                <el-input v-model="formData.remark2" :disabled="'remark2'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="remark3" label="备注3">
+                <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="cancel">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import formValidator from '../formValidator'
+
+export default {
+    props: {
+        formData: {
+            type: Object,
+            default: () => {
+                return {}
+            }
+        }
+    },
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
+
+        // if (this.$route.query.id) {
+        //     this.$http.get({
+        //         url: '/aimPlaceContentChild/getOne',
+        //         data: {
+        //             id: this.$route.query.id
+        //         }
+        //     }).then(res => {
+        //         if (res.success) {
+
+
+        //             this.formData = res.data;
+
+        //             if (this.$route.query.column) {
+        //                 this.formData[this.subColumn] = this.subValue;
+        //             }
+        //         }
+        //     })
+        // } else {
+        //     if (this.$route.query.column) {
+        //         this.formData[this.subColumn] = this.subValue;
+        //     }
+        // }
+
+
+
+
+        // this.$http.get({
+        //     url: '/aimPlaceContent/all'
+        // }).then(res => {
+        //     if (res.success) {
+
+        //         if (res.data.length > 0) {
+        //             res.data.forEach(item => {
+        //                 this.aimPlaceContentIdOptions.push({ label: item.name, value: item.id });
+        //             })
+        //         }
+        //     }
+        // });
+    },
+    data() {
+        return {
+            saving: false,
+            // formData: {},
+            rules: {
+            },
+            aimPlaceContentIdOptions: [],
+            subColumn: '',
+            subValue: '',
+        }
+    },
+    methods: {
+        cancel() {
+            this.$emit('hide')
+        },
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+            this.$http.post({
+                url: this.formData.id ? '/aimPlaceContentChild/update' : '/aimPlaceContentChild/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$emit('hide')
+                    this.$emit('update')
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/aimPlaceContentChild/del',
+                    data: { id: this.formData.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$emit('hide')
+                this.$emit('update')
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+    }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 50 - 24
src/main/vue/src/components/AimPlaceContents.vue

@@ -9,7 +9,7 @@
             </el-button>
             <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
             </el-button>
-            <el-button @click="$router.push({path:'/aimPlaceContent',query:{column:$route.query.column}})" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
+            <el-button @click="addEdit" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
             </el-button>
             <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
             </el-button>
@@ -24,16 +24,11 @@
                 </el-dropdown-menu>
             </el-dropdown>
         </div>
-        <el-table :data="tableData" :height="tableHeight" row-key="id" ref="table">
+        <el-table :data="tableData" :height="tableHeight-80" row-key="id" ref="table">
             <el-table-column type="expand">
                 <template scope="props">
                     <el-table :data="props.row.aimPlaceContentChildList" border stripe v-if="props.row.aimPlaceContentChildList" size="mini">
-                        <el-table-column label="操作" align="center" min-width="80">
-                            <template slot-scope="scope">
-                                <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
-                                <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
-                            </template>
-                        </el-table-column>
+
                         <el-table-column prop="id" label="ID" min-width="100">
                         </el-table-column>
 
@@ -60,6 +55,12 @@
 
                         <el-table-column prop="remark3" label="备注3" min-width="100">
                         </el-table-column>
+                        <el-table-column label="操作" align="center" width="150">
+                            <template slot-scope="scope">
+                                <el-button @click="editChildRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                                <!-- <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button> -->
+                            </template>
+                        </el-table-column>
 
                     </el-table>
                 </template>
@@ -141,12 +142,11 @@
 
             <el-table-column v-if="isColumnShow('remark6')" prop="remark6" label="备注6" min-width="100">
             </el-table-column>
-            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+            <el-table-column label="操作" align="center" fixed="right" min-width="200">
                 <template slot-scope="scope">
-                    <el-button @click="$router.push({path:'/AimPlaceContentChilds',query:{column:scope.row.id+',aimPlaceContentId'}})" type="primary" size="small" plain>内容子集
+                    <el-button @click="addChild(scope.row)" type="primary" size="mini" plain>添加子集
                     </el-button>
                     <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
-                    <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
                 </template>
             </el-table-column>
         </el-table>
@@ -248,26 +248,38 @@
             <img width="100%" :src="imgSrc" alt="">
         </el-dialog>
 
+        <el-dialog title="目标点内容编辑" :visible.sync="AimPlaceContentShow" width="450px">
+            <div>
+                <AimPlaceContent :formData='editAimPlaceContent' @hide='AimPlaceContentShow=false' @update='getData'></AimPlaceContent>
+            </div>
+        </el-dialog>
+
+        <el-dialog title="子集编辑" :visible.sync="AimPlaceContentChildShow" width="450px">
+            <div>
+                <AimPlaceContentChild :formData='editAimPlaceContentChild' @hide='AimPlaceContentChildShow=false' @update='getData'></AimPlaceContentChild>
+            </div>
+        </el-dialog>
+
     </div>
 </template>
 <script>
 import { mapState } from 'vuex'
 import { format } from 'date-fns'
 import zh from 'date-fns/locale/zh_cn'
+import AimPlaceContent from '../components/AimPlaceContent';
+import AimPlaceContentChild from '../components/AimPlaceContentChild';
 
 export default {
     name: 'AimPlaceContents',
-    // props:{
-    //     ownedLandMarkId(){
-    //         type:Number,
-
-    //     }
-    // },
     created() {
         this.getData();
     },
     data() {
         return {
+            AimPlaceContentChildShow: false,
+            editAimPlaceContentChild: {},
+            AimPlaceContentShow: false,
+            editAimPlaceContent: {},
             totalNumber: 0,
             totalPage: 10,
             currentPage: 1,
@@ -514,6 +526,10 @@ export default {
         }
     },
     methods: {
+        editChildRow(row) {
+            this.editAimPlaceContentChild = { ...row }
+            this.AimPlaceContentChildShow = true
+        },
         pageSizeChange(size) {
             this.currentPage = 1;
             this.pageSize = size;
@@ -559,14 +575,21 @@ export default {
                 this.$refs.table.clearSelection();
             }
         },
+        addEdit() {
+            this.editAimPlaceContent = {
+                ownedLandMarkId: this.$route.query.id
+            }
+            this.AimPlaceContentShow = true
+        },
+        addChild(row) {
+            this.editAimPlaceContentChild = {
+                aimPlaceContentId: row.id
+            }
+            this.AimPlaceContentChildShow = true
+        },
         editRow(row) {
-            this.$router.push({
-                path: '/aimPlaceContent',
-                query: {
-                    id: row.id,
-                    column: this.$route.query.column,
-                }
-            })
+            this.editAimPlaceContent = { ...row }
+            this.AimPlaceContentShow = true
         },
         operation1() {
             this.$notify({
@@ -691,6 +714,9 @@ export default {
             this.imageDialogVisible = true;
         },
 
+    },
+    components: {
+        AimPlaceContent, AimPlaceContentChild
     }
 }
 </script>

+ 193 - 0
src/main/vue/src/components/AimPlacePosition.vue

@@ -0,0 +1,193 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <div style="height:50vh;overflow:auto;padding:0 10px">
+                <el-form-item prop="name" label="名称">
+                    <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="type" label="类别">
+                    <el-input v-model="formData.type" :disabled="'type'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="posX" label="坐标X">
+                    <el-input v-model="formData.posX" :disabled="'posX'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="posY" label="坐标Y">
+                    <el-input v-model="formData.posY" :disabled="'posY'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="posZ" label="坐标Z">
+                    <el-input v-model="formData.posZ" :disabled="'posZ'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark1" label="备注1">
+                    <el-input v-model="formData.remark1" :disabled="'remark1'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark2" label="备注2">
+                    <el-input v-model="formData.remark2" :disabled="'remark2'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark3" label="备注3">
+                    <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="frontLevelId" label="上级ID">
+                    <template>
+                        <el-select v-model="formData.frontLevelId" clearable placeholder="请选择" :disabled="'frontLevelId'==subColumn">
+                            <el-option v-for="item in frontLevelIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-form-item>
+                <!-- <el-form-item prop="ownedLandMarkId" label="所属地标ID">
+                <template>
+                    <el-select v-model="formData.ownedLandMarkId" clearable placeholder="请选择" :disabled="'ownedLandMarkId'==subColumn">
+                        <el-option v-for="item in ownedLandMarkIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item> -->
+            </div>
+            <el-form-item style="margin-top:10px">
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="cancel">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import formValidator from '../formValidator'
+
+export default {
+    name: 'AimPlacePosition',
+    props: {
+        formData: {
+            type: Object,
+            default: () => {
+                return {}
+            }
+        }
+    },
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
+
+        // if (this.$route.query.id) {
+        //     this.$http.get({
+        //         url: '/aimPlacePosition/getOne',
+        //         data: {
+        //             id: this.$route.query.id
+        //         }
+        //     }).then(res => {
+        //         if (res.success) {
+
+
+        //             this.formData = res.data;
+
+        //             if (this.$route.query.column) {
+        //                 this.formData[this.subColumn] = this.subValue;
+        //             }
+        //         }
+        //     })
+        // } else {
+        //     if (this.$route.query.column) {
+        //         this.formData[this.subColumn] = this.subValue;
+        //     }
+        // }
+
+
+
+
+        this.$http.get({
+            url: '/aimPlacePosition/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.frontLevelIdOptions.push({ label: item.name, value: item.id });
+                    })
+                }
+            }
+        });
+
+
+
+        this.$http.get({
+            url: '/landMark/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.ownedLandMarkIdOptions.push({ label: item.mapName, value: item.id });
+                    })
+                }
+            }
+        });
+    },
+    data() {
+        return {
+            saving: false,
+            // formData: {},
+            rules: {
+                name:
+                    [
+                        { required: true, message: '请输入 名称', trigger: 'blur' },
+                    ],
+            },
+            frontLevelIdOptions: [],
+            ownedLandMarkIdOptions: [],
+            subColumn: '',
+            subValue: '',
+        }
+    },
+    methods: {
+        cancel() {
+            this.$emit('hide')
+        },
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+            this.$http.post({
+                url: this.formData.id ? '/aimPlacePosition/update' : '/aimPlacePosition/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$emit('hide')
+                    this.$emit('update')
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/aimPlacePosition/del',
+                    data: { id: this.formData.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$emit('hide')
+                this.$emit('update')
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+    }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 31 - 9
src/main/vue/src/components/AimPlacePositions.vue

@@ -9,7 +9,7 @@
             </el-button>
             <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
             </el-button>
-            <el-button @click="$router.push({path:'/aimPlacePosition',query:{column:$route.query.column}})" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
+            <el-button @click="addEdit" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
             </el-button>
             <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
             </el-button>
@@ -24,7 +24,7 @@
                 </el-dropdown-menu>
             </el-dropdown>
         </div>
-        <el-table :data="tableData" :height="tableHeight" row-key="id" ref="table">
+        <el-table :data="tableData" :height="tableHeight-170" row-key="id" ref="table">
             <el-table-column v-if="multipleMode" align="center" type="selection" width="50">
             </el-table-column>
             <el-table-column type="index" min-width="50" align="center">
@@ -167,12 +167,19 @@
             <img width="100%" :src="imgSrc" alt="">
         </el-dialog>
 
+        <el-dialog title="子集编辑" :visible.sync="AimPlacePositionShow" width="450px">
+            <div>
+                <AimPlacePosition :formData='AimPlacePositionEdit' @hide='AimPlacePositionShow=false' @update='getData'></AimPlacePosition>
+            </div>
+        </el-dialog>
+
     </div>
 </template>
 <script>
 import { mapState } from 'vuex'
 import { format } from 'date-fns'
 import zh from 'date-fns/locale/zh_cn'
+import AimPlacePosition from '../components/AimPlacePosition';
 
 export default {
     name: 'AimPlacePositions',
@@ -181,6 +188,8 @@ export default {
     },
     data() {
         return {
+            AimPlacePositionShow: false,
+            AimPlacePositionEdit: {},
             totalNumber: 0,
             totalPage: 10,
             currentPage: 1,
@@ -355,14 +364,24 @@ export default {
                 this.$refs.table.clearSelection();
             }
         },
+        addEdit(){
+          this.AimPlacePositionEdit={
+ownedLandMarkId:this.$route.query.id
+          }
+           this.AimPlacePositionShow=true
+        },
         editRow(row) {
-            this.$router.push({
-                path: '/aimPlacePosition',
-                query: {
-                    id: row.id,
-                    column: this.$route.query.column,
-                }
-            })
+            // this.$router.push({
+            //     path: '/aimPlacePosition',
+            //     query: {
+            //         id: row.id,
+            //         column: this.$route.query.column,
+            //     }
+            // })
+            this.AimPlacePositionEdit={...row}
+
+            this.AimPlacePositionShow=true
+
         },
         operation1() {
             this.$notify({
@@ -487,6 +506,9 @@ export default {
             this.imageDialogVisible = true;
         },
 
+    },
+    components: {
+        AimPlacePosition
     }
 }
 </script>

+ 225 - 0
src/main/vue/src/components/VuforiaImageInfo.vue

@@ -0,0 +1,225 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="100px" label-position="right" size="small" style="max-width: 500px;">
+            <div style="height:50vh;overflow:auto;padding:0 10px">
+                <el-form-item prop="vuforiaImageGroupId" label="所属图集ID">
+                    <template>
+                        <el-select v-model="formData.vuforiaImageGroupId" clearable placeholder="请选择" :disabled="'vuforiaImageGroupId'==subColumn">
+                            <el-option v-for="item in vuforiaImageGroupIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-form-item>
+                <el-form-item prop="name" label="识别图名称">
+                    <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="vuforiaImageTypeId" label="识别图类型ID">
+                    <template>
+                        <el-select v-model="formData.vuforiaImageTypeId" clearable placeholder="请选择" :disabled="'vuforiaImageTypeId'==subColumn">
+                            <el-option v-for="item in vuforiaImageTypeIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-form-item>
+                <el-form-item prop="areaMarking" label="区域标记编号">
+                    <el-input v-model="formData.areaMarking" :disabled="'areaMarking'==subColumn"></el-input>
+                </el-form-item>
+                <!-- <el-form-item prop="landMarkId" label="所属地标ID">
+                    <template>
+                        <el-select v-model="formData.landMarkId" clearable placeholder="请选择" :disabled="'landMarkId'==subColumn">
+                            <el-option v-for="item in landMarkIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-form-item> -->
+                <el-form-item prop="arContentGroupId" label="AR内容组ID">
+                    <el-input v-model="formData.arContentGroupId" :disabled="'arContentGroupId'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="posX" label="坐标X">
+                    <el-input v-model="formData.posX" :disabled="'posX'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="posY" label="坐标Y">
+                    <el-input v-model="formData.posY" :disabled="'posY'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="posZ" label="坐标Z">
+                    <el-input v-model="formData.posZ" :disabled="'posZ'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="angle" label="角度">
+                    <el-input v-model="formData.angle" :disabled="'angle'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark1" label="备注1">
+                    <el-input v-model="formData.remark1" :disabled="'remark1'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark2" label="备注2">
+                    <el-input v-model="formData.remark2" :disabled="'remark2'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="remark3" label="备注3">
+                    <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
+                </el-form-item>
+                <el-form-item prop="vuforiaImage" label="识别图">
+                    <single-upload v-model="formData.vuforiaImage" :disabled="'vuforiaImage'==subColumn"></single-upload>
+                </el-form-item>
+                <el-form-item prop="vuforiaImage" label="识别图URL">
+                    <el-input v-model="formData.vuforiaImage" :disabled="'vuforiaImage'==subColumn"></el-input>
+                </el-form-item>
+            </div>
+            <el-form-item style="margin-top:10px;">
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="cancel">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import formValidator from '../formValidator'
+
+export default {
+    props: {
+        formData: {
+            type: Object,
+            default: () => {
+                return {
+                    vuforiaImageGroupId:0
+                }
+            }
+        }
+    },
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
+
+        // if (this.$route.query.id) {
+        //     this.$http.get({
+        //         url: '/vuforiaImageInfo/getOne',
+        //         data: {
+        //             id: this.$route.query.id
+        //         }
+        //     }).then(res => {
+        //         if (res.success) {
+
+
+        //             this.formData = res.data;
+
+        //             if (this.$route.query.column) {
+        //                 this.formData[this.subColumn] = this.subValue;
+        //             }
+        //         }
+        //     })
+        // } else {
+        //     if (this.$route.query.column) {
+        //         this.formData[this.subColumn] = this.subValue;
+        //     }
+        // }
+
+
+
+
+        this.$http.get({
+            url: '/vuforiaImageGroup/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.vuforiaImageGroupIdOptions.push({ label: item.vuforiaName, value: item.id });
+                    })
+                }
+            }
+        });
+
+
+
+        this.$http.get({
+            url: '/vuforiaImageType/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.vuforiaImageTypeIdOptions.push({ label: item.typeName, value: item.id });
+                    })
+                }
+            }
+        });
+
+
+
+        // this.$http.get({
+        //     url: '/landMark/all'
+        // }).then(res => {
+        //     if (res.success) {
+
+        //         if (res.data.length > 0) {
+        //             res.data.forEach(item => {
+        //                 this.landMarkIdOptions.push({ label: item.mapName, value: item.id });
+        //             })
+        //         }
+        //     }
+        // });
+    },
+    data() {
+        return {
+            saving: false,
+            rules: {
+            },
+            vuforiaImageGroupIdOptions: [],
+            vuforiaImageTypeIdOptions: [],
+            landMarkIdOptions: [],
+            subColumn: '',
+            subValue: '',
+        }
+    },
+    methods: {
+        cancel() {
+            this.$emit('hide')
+        },
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+            this.$http.post({
+                url: this.formData.id ? '/vuforiaImageInfo/update' : '/vuforiaImageInfo/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$emit('hide')
+                    this.$emit('update')
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/vuforiaImageInfo/del',
+                    data: { id: this.formData.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$emit('hide')
+                this.$emit('update')
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+    }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 29 - 10
src/main/vue/src/components/VuforiaImageInfos.vue

@@ -9,7 +9,7 @@
             </el-button>
             <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
             </el-button>
-            <el-button @click="$router.push({path:'/vuforiaImageInfo',query:{column:$route.query.column}})" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
+            <el-button @click="addEdit" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
             </el-button>
             <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
             </el-button>
@@ -24,7 +24,7 @@
                 </el-dropdown-menu>
             </el-dropdown>
         </div>
-        <el-table :data="tableData" :height="tableHeight" row-key="id" ref="table">
+        <el-table :data="tableData" :height="tableHeight-170" row-key="id" ref="table">
             <el-table-column v-if="multipleMode" align="center" type="selection" width="50">
             </el-table-column>
             <el-table-column type="index" min-width="50" align="center">
@@ -182,6 +182,11 @@
         <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
             <img width="100%" :src="imgSrc" alt="">
         </el-dialog>
+        <el-dialog title="目标点编辑" :visible.sync="VuforiaImageInfoShow" width="450px">
+            <div>
+                <VuforiaImageInfo :formData='editVuforiaImageInfo' @hide='VuforiaImageInfoShow=false' @update='getData'></VuforiaImageInfo>
+            </div>
+        </el-dialog>
 
     </div>
 </template>
@@ -189,14 +194,17 @@
 import { mapState } from 'vuex'
 import { format } from 'date-fns'
 import zh from 'date-fns/locale/zh_cn'
+import VuforiaImageInfo from '../components/VuforiaImageInfo';
 
 export default {
-     name: 'VuforiaImageInfos',
+    name: 'VuforiaImageInfos',
     created() {
         this.getData();
     },
     data() {
         return {
+            VuforiaImageInfoShow: false,
+            editVuforiaImageInfo: {},
             totalNumber: 0,
             totalPage: 10,
             currentPage: 1,
@@ -371,6 +379,12 @@ export default {
             this.currentPage = page;
             this.getData();
         },
+        addEdit() {
+            this.editVuforiaImageInfo = {
+                landMarkId: this.$route.query.id
+            }
+            this.VuforiaImageInfoShow = true
+        },
         getData() {
 
             var data = {
@@ -408,13 +422,15 @@ export default {
             }
         },
         editRow(row) {
-            this.$router.push({
-                path: '/vuforiaImageInfo',
-                query: {
-                    id: row.id,
-                    column: this.$route.query.column,
-                }
-            })
+            // this.$router.push({
+            //     path: '/vuforiaImageInfo',
+            //     query: {
+            //         id: row.id,
+            //         column: this.$route.query.column,
+            //     }
+            // })
+            this.editVuforiaImageInfo = { ...row }
+            this.VuforiaImageInfoShow = true
         },
         operation1() {
             this.$notify({
@@ -539,6 +555,9 @@ export default {
             this.imageDialogVisible = true;
         },
 
+    },
+    components: {
+        VuforiaImageInfo
     }
 }
 </script>

+ 1 - 1
src/main/vue/src/entries/admin.js

@@ -164,10 +164,10 @@ Vue.mixin({
 const updateTableHeight = () => {
     try {
         const total = document.getElementsByTagName('main')[0].clientHeight;
+        store.commit('updateTotalHeight', total);
         const filter = document.getElementsByClassName('filters-container')[0].clientHeight;
         const page = document.getElementsByClassName('pagination-wrapper')[0].clientHeight;
         store.commit('updateTableHeight', total - filter - page - 44);
-        store.commit('updateTotalHeight', total);
     } catch (e) {
         // console.error(e)
     }

+ 110 - 98
src/main/vue/src/pages/LandMark.vue

@@ -1,103 +1,106 @@
 <template>
-    <div >
+    <div>
 
-        <el-tabs :value="tabVal" type="border-card" >
+        <el-tabs :value="tabVal" type="border-card">
             <el-tab-pane label="地标信息" name="1">
-                <el-form  :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
-                    <el-form-item prop="mapName" label="地标名称">
-                        <el-input v-model="formData.mapName" :disabled="'mapName'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="ownedCityId" label="所属城市Id">
-                        <template>
-                            <el-select v-model="formData.ownedCityId" clearable placeholder="请选择" :disabled="'ownedCityId'==subColumn">
-                                <el-option v-for="item in ownedCityIdOptions" :key="item.value" :label="item.label" :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </template>
-                    </el-form-item>
-                    <el-form-item prop="mapSprite" label="缩略图">
-                        <single-upload v-model="formData.mapSprite" :disabled="'mapSprite'==subColumn"></single-upload>
-                    </el-form-item>
-                    <el-form-item prop="mapSprite" label="缩略图URL">
-                        <el-input v-model="formData.mapSprite" :disabled="'mapSprite'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="logeSprite" label="地点Loge图">
-                        <single-upload v-model="formData.logeSprite" :disabled="'logeSprite'==subColumn"></single-upload>
-                    </el-form-item>
-                    <el-form-item prop="logeSprite" label="地点Loge图URL">
-                        <el-input v-model="formData.logeSprite" :disabled="'logeSprite'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="openDescribe" label="营业/开放情况">
-                        <el-input v-model="formData.openDescribe" :disabled="'openDescribe'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="markDescribe" label="地标简介">
-                        <el-input type="textarea" v-model="formData.markDescribe" :disabled="'markDescribe'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="anchorImageGroupName" label="识别图组名称">
-                        <el-input v-model="formData.anchorImageGroupName" :disabled="'anchorImageGroupName'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="defaultMode" label="模式">
-                        <el-input v-model="formData.defaultMode" :disabled="'defaultMode'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="vuforiaImageGroupId" label="识别图集ID">
-                        <el-input v-model="formData.vuforiaImageGroupId" :disabled="'vuforiaImageGroupId'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="vuforiaDataName" label="识别图集数据名称">
-                        <el-input v-model="formData.vuforiaDataName" :disabled="'vuforiaDataName'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="mapInfo" label="地图信息">
-                        <el-input type="textarea" v-model="formData.mapInfo" :disabled="'mapInfo'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="mapWidth" label="地图宽">
-                        <el-input v-model="formData.mapWidth" :disabled="'mapWidth'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="mapHeight" label="地图高">
-                        <el-input v-model="formData.mapHeight" :disabled="'mapHeight'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="mapRate" label="比率">
-                        <el-input v-model="formData.mapRate" :disabled="'mapRate'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="showInPanel" label="是否显示">
-                        <el-input v-model="formData.showInPanel" :disabled="'showInPanel'==subColumn"></el-input>
-                    </el-form-item>
+                <div :style="{height:totalHeight-120+'px'}" style="overflow:auto">
+                    <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+                        <el-form-item prop="mapName" label="地标名称">
+                            <el-input v-model="formData.mapName" :disabled="'mapName'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="ownedCityId" label="所属城市Id">
+                            <template>
+                                <el-select v-model="formData.ownedCityId" clearable placeholder="请选择" :disabled="'ownedCityId'==subColumn">
+                                    <el-option v-for="item in ownedCityIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </template>
+                        </el-form-item>
+                        <el-form-item prop="mapSprite" label="缩略图">
+                            <single-upload v-model="formData.mapSprite" :disabled="'mapSprite'==subColumn"></single-upload>
+                        </el-form-item>
+                        <el-form-item prop="mapSprite" label="缩略图URL">
+                            <el-input v-model="formData.mapSprite" :disabled="'mapSprite'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="logeSprite" label="地点Loge图">
+                            <single-upload v-model="formData.logeSprite" :disabled="'logeSprite'==subColumn"></single-upload>
+                        </el-form-item>
+                        <el-form-item prop="logeSprite" label="地点Loge图URL">
+                            <el-input v-model="formData.logeSprite" :disabled="'logeSprite'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="openDescribe" label="营业/开放情况">
+                            <el-input v-model="formData.openDescribe" :disabled="'openDescribe'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="markDescribe" label="地标简介">
+                            <el-input type="textarea" v-model="formData.markDescribe" :disabled="'markDescribe'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="anchorImageGroupName" label="识别图组名称">
+                            <el-input v-model="formData.anchorImageGroupName" :disabled="'anchorImageGroupName'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="defaultMode" label="模式">
+                            <el-input v-model="formData.defaultMode" :disabled="'defaultMode'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="vuforiaImageGroupId" label="识别图集ID">
+                            <el-input v-model="formData.vuforiaImageGroupId" :disabled="'vuforiaImageGroupId'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="vuforiaDataName" label="识别图集数据名称">
+                            <el-input v-model="formData.vuforiaDataName" :disabled="'vuforiaDataName'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="mapInfo" label="地图信息">
+                            <el-input type="textarea" v-model="formData.mapInfo" :disabled="'mapInfo'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="mapWidth" label="地图宽">
+                            <el-input v-model="formData.mapWidth" :disabled="'mapWidth'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="mapHeight" label="地图高">
+                            <el-input v-model="formData.mapHeight" :disabled="'mapHeight'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="mapRate" label="比率">
+                            <el-input v-model="formData.mapRate" :disabled="'mapRate'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="showInPanel" label="是否显示">
+                            <el-input v-model="formData.showInPanel" :disabled="'showInPanel'==subColumn"></el-input>
+                        </el-form-item>
 
-                    <el-form-item>
-                        <el-button type="text" @click="mapDialogVisible = !mapDialogVisible">点击打开地图选择地址</el-button>
+                        <el-form-item>
+                            <el-button type="text" @click="mapDialogVisible = !mapDialogVisible">点击打开地图选择地址</el-button>
 
-                        <div class="amap-page-container" v-if="mapDialogVisible">
-                            <coordinate-select :value="[formData.longitude||118.79647,formData.latitude||32.05838]" @selected="coordinateSelected" v-if="mapDialogVisible"></coordinate-select>
-                        </div>
-                    </el-form-item>
+                            <div class="amap-page-container" v-if="mapDialogVisible">
+                                <coordinate-select :value="[formData.longitude||118.79647,formData.latitude||32.05838]" @selected="coordinateSelected" v-if="mapDialogVisible"></coordinate-select>
+                            </div>
+                        </el-form-item>
+
+                        <el-form-item prop="longitude" label="经度">
+                            <el-input v-model="formData.longitude" :disabled="'longitude'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="latitude" label="纬度">
+                            <el-input v-model="formData.latitude" :disabled="'latitude'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="remark1" label="备注1">
+                            <el-input v-model="formData.remark1" :disabled="'remark1'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="remark2" label="备注2">
+                            <el-input v-model="formData.remark2" :disabled="'remark2'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="remark3" label="备注3">
+                            <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="frontLevelId" label="上级地标ID">
+                            <template>
+                                <el-select v-model="formData.frontLevelId" clearable placeholder="请选择" :disabled="'frontLevelId'==subColumn">
+                                    <el-option v-for="item in frontLevelIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </template>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                            <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                            <el-button @click="$router.go(-1)">取消</el-button>
+                        </el-form-item>
+                    </el-form>
+                </div>
 
-                    <el-form-item prop="longitude" label="经度">
-                        <el-input v-model="formData.longitude" :disabled="'longitude'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="latitude" label="纬度">
-                        <el-input v-model="formData.latitude" :disabled="'latitude'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="remark1" label="备注1">
-                        <el-input v-model="formData.remark1" :disabled="'remark1'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="remark2" label="备注2">
-                        <el-input v-model="formData.remark2" :disabled="'remark2'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="remark3" label="备注3">
-                        <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
-                    </el-form-item>
-                    <el-form-item prop="frontLevelId" label="上级地标ID">
-                        <template>
-                            <el-select v-model="formData.frontLevelId" clearable placeholder="请选择" :disabled="'frontLevelId'==subColumn">
-                                <el-option v-for="item in frontLevelIdOptions" :key="item.value" :label="item.label" :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </template>
-                    </el-form-item>
-                    <el-form-item>
-                        <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
-                        <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
-                        <el-button @click="$router.go(-1)">取消</el-button>
-                    </el-form-item>
-                </el-form>
             </el-tab-pane>
             <el-tab-pane label="目标点内容" name="2" v-if="this.$route.query.id">
                 <AimPlaceContents></AimPlaceContents>
@@ -106,7 +109,7 @@
                 <AimPlacePositions></AimPlacePositions>
             </el-tab-pane>
             <el-tab-pane label="识别图" name="4" v-if="this.$route.query.id">
-               <VuforiaImageInfos></VuforiaImageInfos>
+                <VuforiaImageInfos></VuforiaImageInfos>
             </el-tab-pane>
         </el-tabs>
 
@@ -188,6 +191,7 @@ export default {
     },
     data() {
         return {
+
             saving: false,
             formData: {
                 latitude: 32.05838,
@@ -200,7 +204,7 @@ export default {
             subColumn: '',
             subValue: '',
             mapDialogVisible: false,
-            tabVal:"2",
+            tabVal: "1",
         }
     },
     computed: {
@@ -224,7 +228,15 @@ export default {
             }).then(res => {
                 if (res.success) {
                     this.$message.success('成功');
-                    this.$router.go(-1);
+                    if (!this.formData.id) {
+                        this.$router.replace({
+                            name: '',
+                            query: {
+                                id: res.data
+                            }
+                        });
+                    }
+
                 } else {
                     this.$message.warning('失败')
                 }
@@ -254,7 +266,7 @@ export default {
         },
     },
     components: {
-        CoordinateSelect,AimPlaceContents,AimPlacePositions,VuforiaImageInfos
+        CoordinateSelect, AimPlaceContents, AimPlacePositions, VuforiaImageInfos
     }
 }
 </script>