Procházet zdrojové kódy

添加字段20181206

suochencheng před 7 roky
rodič
revize
f5501d7967

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/AreaShowPointMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.AreaShowPoint;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.AreaShowPointMapper")
+public interface AreaShowPointMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(AreaShowPoint record);
+
+    AreaShowPoint selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(AreaShowPoint record);
+
+    List<AreaShowPoint> queryAllAreaShowPoint(AreaShowPoint record);
+
+    List<AreaShowPoint> queryAreaShowPointByPage(Map<String, Object> parameter);
+
+    int delete(AreaShowPoint record);
+
+    AreaShowPoint queryAreaShowPoint(AreaShowPoint record);
+
+    List<AreaShowPoint> query(AreaShowPoint record);
+}
+

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 544 - 0
src/main/java/com/izouma/awesomeadmin/dao/AreaShowPointMapper.xml


+ 188 - 0
src/main/java/com/izouma/awesomeadmin/model/AreaShowPoint.java

@@ -0,0 +1,188 @@
+package com.izouma.awesomeadmin.model;
+
+import java.util.*;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AreaShowPoint{
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private String power;
+    private String cityId;
+    private String landmarkId;
+    private String areaId;
+    private String pointName;
+    private String doorFlag;
+    private String remark;
+    private String mapX;
+    private String mapY;
+    private String mapIndex;
+
+private String idStr;
+
+private String searchKey;
+
+/**
+* and,test_name,like,value;or,remark,=,123
+*/
+private String advancedQuery;
+
+/**
+* column_name_,desc_;column_name_,asc
+*/
+private String orderByStr;
+
+    public Integer getId(){
+        return this.id;
+    }
+
+    public void setId(Integer id){
+        this.id = id;
+    }
+    public String getDelFlag(){
+        return this.delFlag;
+    }
+
+    public void setDelFlag(String delFlag){
+        this.delFlag = delFlag;
+    }
+    public Date getUpdateTime(){
+        return this.updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime){
+        this.updateTime = updateTime;
+    }
+    public String getUpdateUser(){
+        return this.updateUser;
+    }
+
+    public void setUpdateUser(String updateUser){
+        this.updateUser = updateUser;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+    public String getCreateUser(){
+        return this.createUser;
+    }
+
+    public void setCreateUser(String createUser){
+        this.createUser = createUser;
+    }
+    public String getPower(){
+        return this.power;
+    }
+
+    public void setPower(String power){
+        this.power = power;
+    }
+    public String getCityId(){
+        return this.cityId;
+    }
+
+    public void setCityId(String cityId){
+        this.cityId = cityId;
+    }
+    public String getLandmarkId(){
+        return this.landmarkId;
+    }
+
+    public void setLandmarkId(String landmarkId){
+        this.landmarkId = landmarkId;
+    }
+    public String getAreaId(){
+        return this.areaId;
+    }
+
+    public void setAreaId(String areaId){
+        this.areaId = areaId;
+    }
+    public String getPointName(){
+        return this.pointName;
+    }
+
+    public void setPointName(String pointName){
+        this.pointName = pointName;
+    }
+    public String getDoorFlag(){
+        return this.doorFlag;
+    }
+
+    public void setDoorFlag(String doorFlag){
+        this.doorFlag = doorFlag;
+    }
+    public String getRemark(){
+        return this.remark;
+    }
+
+    public void setRemark(String remark){
+        this.remark = remark;
+    }
+    public String getMapX(){
+        return this.mapX;
+    }
+
+    public void setMapX(String mapX){
+        this.mapX = mapX;
+    }
+    public String getMapY(){
+        return this.mapY;
+    }
+
+    public void setMapY(String mapY){
+        this.mapY = mapY;
+    }
+    public String getMapIndex(){
+        return this.mapIndex;
+    }
+
+    public void setMapIndex(String mapIndex){
+        this.mapIndex = mapIndex;
+    }
+
+public String getSearchKey() {
+    return searchKey;
+}
+
+public void setSearchKey(String searchKey) {
+    this.searchKey = searchKey;
+}
+
+public String getAdvancedQuery() {
+    return advancedQuery;
+}
+
+public void setAdvancedQuery(String advancedQuery) {
+    this.advancedQuery = advancedQuery;
+}
+
+public String getOrderByStr() {
+    return orderByStr;
+}
+
+public void setOrderByStr(String orderByStr) {
+    this.orderByStr = orderByStr;
+}
+
+public String getIdStr() {
+    return idStr;
+}
+
+public void setIdStr(String idStr) {
+    this.idStr = idStr;
+}
+
+}
+

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/service/AreaShowPointService.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.AreaShowPoint;
+
+
+/**
+*  service接口类
+*/
+public interface AreaShowPointService{
+
+    List<AreaShowPoint> getAreaShowPointList(AreaShowPoint record);
+
+    List<AreaShowPoint> getAreaShowPointByPage(Page page, AreaShowPoint record);
+
+    AreaShowPoint getAreaShowPointById(String id);
+
+    AreaShowPoint getAreaShowPoint(AreaShowPoint record);
+
+    boolean createAreaShowPoint(AreaShowPoint record);
+
+    boolean deleteAreaShowPoint(AreaShowPoint record);
+
+    boolean updateAreaShowPoint(AreaShowPoint record);
+}
+

+ 137 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/AreaShowPointServiceImpl.java

@@ -0,0 +1,137 @@
+package com.izouma.awesomeadmin.service.impl;
+
+import java.util.*;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.AreaShowPoint;
+import com.izouma.awesomeadmin.service.AreaShowPointService;
+import com.izouma.awesomeadmin.dao.AreaShowPointMapper;
+
+/**
+*  service接口实现类
+*/
+@Service
+public class AreaShowPointServiceImpl implements AreaShowPointService{
+
+    private static Logger logger = Logger.getLogger(AreaShowPointServiceImpl.class);
+
+    @Autowired
+    private AreaShowPointMapper areaShowPointMapper;
+
+    @Override
+    public List<AreaShowPoint> getAreaShowPointList(AreaShowPoint record) {
+
+        logger.info("getAreaShowPointList");
+        try {
+
+        return areaShowPointMapper.queryAllAreaShowPoint(record);
+        } catch (Exception e) {
+        logger.error("getAreaShowPointList", e);
+        }
+
+        return null;
+    }
+    @Override
+    public List<AreaShowPoint> getAreaShowPointByPage(Page page, AreaShowPoint record) {
+
+        logger.info("getAreaShowPointByPage");
+        try {
+
+        Map<String, Object> parameter = new HashMap<String, Object>();
+        parameter.put("record", record);
+        parameter.put(AppConstant.PAGE, page);
+
+        return areaShowPointMapper.queryAreaShowPointByPage(parameter);
+        } catch (Exception e) {
+        logger.error("getAreaShowPointByPage", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public AreaShowPoint getAreaShowPointById(String id) {
+
+        logger.info("getAreaShowPointyId");
+        try {
+
+            return areaShowPointMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+        logger.error("getAreaShowPointById", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public AreaShowPoint getAreaShowPoint(AreaShowPoint record) {
+
+        logger.info("getAreaShowPoint");
+        try {
+
+            return areaShowPointMapper.queryAreaShowPoint(record);
+        } catch (Exception e) {
+        logger.error("getAreaShowPoint", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public boolean createAreaShowPoint(AreaShowPoint record) {
+
+        logger.info("createAreaShowPoint");
+        try {
+
+            int updates = areaShowPointMapper.insertSelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+            logger.error("createAreaShowPoint", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean deleteAreaShowPoint(AreaShowPoint record) {
+
+        logger.info("deleteAreaShowPoint");
+        try {
+
+             int updates = areaShowPointMapper.delete(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("deleteAreaShowPoint", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean updateAreaShowPoint(AreaShowPoint record) {
+
+        logger.info("updateAreaShowPoint");
+        try {
+
+            int updates = areaShowPointMapper.updateByPrimaryKeySelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("updateAreaShowPoint", e);
+        }
+
+        return false;
+    }
+}
+

+ 167 - 0
src/main/java/com/izouma/awesomeadmin/web/AreaShowPointController.java

@@ -0,0 +1,167 @@
+package com.izouma.awesomeadmin.web;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.util.ExportExcelUtil;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.AreaShowPoint;
+import com.izouma.awesomeadmin.service.AreaShowPointService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+*  controller类
+*/
+@Controller
+@RequestMapping("/areaShowPoint")
+public class AreaShowPointController {
+
+    @Autowired
+    private AreaShowPointService areaShowPointService;
+
+    /**
+    * <p>获取全部记录。</p>
+    */
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(AreaShowPoint record) {
+        List<AreaShowPoint> pp = areaShowPointService.getAreaShowPointList(record);
+        return new Result(true, pp);
+    }
+
+    /**
+    * <p>根据Id。</p>
+    */
+    @RequestMapping(value = "/getAreaShowPoint", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getAreaShowPoint(@RequestParam(required = false, value = "id") String id) {
+        AreaShowPoint data = areaShowPointService.getAreaShowPointById(id);
+        return new Result(true, data);
+    }
+
+    /**
+    * <p>根据条件获取。</p>
+    */
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(AreaShowPoint record) {
+        AreaShowPoint data = areaShowPointService.getAreaShowPoint(record);
+        return new Result(true, data);
+    }
+
+
+    /**
+    * <p>分页查询。</p>
+    */
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, AreaShowPoint record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<AreaShowPoint> pp =areaShowPointService.getAreaShowPointByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+
+    /**
+    * <p>保存。</p>
+    */
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(AreaShowPoint record) {
+        boolean num = areaShowPointService.createAreaShowPoint(record);
+        if (num) {
+        return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    /**
+    * <p>更新信息。</p>
+    */
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updateAreaShowPoint(AreaShowPoint record) {
+        boolean num = areaShowPointService.updateAreaShowPoint(record);
+        if (num) {
+        return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    /**
+    * <p>删除。</p>
+    */
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deleteAreaShowPoint(AreaShowPoint record) {
+
+        boolean num = areaShowPointService.deleteAreaShowPoint(record);
+        if (num) {
+        return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    /**
+    * 导出Excel
+    * @param request
+    * @param response
+    * @param record
+    * @throws Exception
+    */
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, AreaShowPoint record) throws Exception {
+
+    List<AreaShowPoint> areaShowPoints = areaShowPointService.getAreaShowPointList(record);
+
+
+        String sheetName = "area_show_point";
+        String titleName = "显示点数据表";
+        String fileName = "显示点表";
+        int columnNumber = 16;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "ID" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "权限" ,   "城市ID" ,   "地标ID" ,   "区域ID" ,   "名称" ,   "门" ,   "备注" ,   "X" ,   "Y" ,   "index"  };
+        String[][] dataList = new String[areaShowPoints.size()][16];
+
+        for (int i = 0; i < areaShowPoints.size(); i++) {
+
+                        dataList[i][0] = String.valueOf(areaShowPoints.get(i).getId());
+                        dataList[i][1] = String.valueOf(areaShowPoints.get(i).getDelFlag());
+                        dataList[i][2] = String.valueOf(areaShowPoints.get(i).getUpdateTime());
+                        dataList[i][3] = String.valueOf(areaShowPoints.get(i).getUpdateUser());
+                        dataList[i][4] = String.valueOf(areaShowPoints.get(i).getCreateTime());
+                        dataList[i][5] = String.valueOf(areaShowPoints.get(i).getCreateUser());
+                        dataList[i][6] = String.valueOf(areaShowPoints.get(i).getPower());
+                        dataList[i][7] = String.valueOf(areaShowPoints.get(i).getCityId());
+                        dataList[i][8] = String.valueOf(areaShowPoints.get(i).getLandmarkId());
+                        dataList[i][9] = String.valueOf(areaShowPoints.get(i).getAreaId());
+                        dataList[i][10] = String.valueOf(areaShowPoints.get(i).getPointName());
+                        dataList[i][11] = String.valueOf(areaShowPoints.get(i).getDoorFlag());
+                        dataList[i][12] = String.valueOf(areaShowPoints.get(i).getRemark());
+                        dataList[i][13] = String.valueOf(areaShowPoints.get(i).getMapX());
+                        dataList[i][14] = String.valueOf(areaShowPoints.get(i).getMapY());
+                        dataList[i][15] = String.valueOf(areaShowPoints.get(i).getMapIndex());
+                    }
+
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+        columnNumber, columnWidth, columnName, dataList, response);
+
+
+        }
+    }
+

+ 183 - 178
src/main/vue/src/pages/AimGroupInfo.vue

@@ -1,77 +1,56 @@
 <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="cityId" label="城市ID">
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <el-form-item prop="cityId" label="城市ID">
                 <template>
-                    <el-select v-model="formData.cityId" clearable  placeholder="请选择" :disabled="'cityId'==subColumn">
-                        <el-option
-                                v-for="item in cityIdOptions"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value">
+                    <el-select v-model="formData.cityId" clearable placeholder="请选择" :disabled="checkSubColumn('cityId')">
+                        <el-option v-for="item in cityIdOptions" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </template>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="landmarkId" label="地标ID">
+            <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-select v-model="formData.landmarkId" clearable placeholder="请选择" :disabled="checkSubColumn('landmarkId')">
+                        <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="areaId" label="区域ID">
+            <el-form-item prop="areaId" label="区域ID">
                 <template>
-                    <el-select v-model="formData.areaId" clearable  placeholder="请选择" :disabled="'areaId'==subColumn">
-                        <el-option
-                                v-for="item in areaIdOptions"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value">
+                    <el-select v-model="formData.areaId" clearable placeholder="请选择" :disabled="checkSubColumn('areaId')">
+                        <el-option v-for="item in areaIdOptions" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </template>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="thingId" label="事物ID">
+            <el-form-item prop="thingId" label="事物ID">
                 <template>
-                    <el-select v-model="formData.thingId" clearable  placeholder="请选择" :disabled="'thingId'==subColumn">
-                        <el-option
-                                v-for="item in thingIdOptions"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value">
+                    <el-select v-model="formData.thingId" clearable placeholder="请选择" :disabled="checkSubColumn('thingId')">
+                        <el-option v-for="item in thingIdOptions" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </template>
             </el-form-item>
-                                                                                                                                                                                                                        <el-form-item prop="groupName" label="点标组名称">
-                <el-input v-model="formData.groupName" :disabled="'groupName'==subColumn"></el-input>
+            <el-form-item prop="groupName" label="点标组名称">
+                <el-input v-model="formData.groupName" :disabled="checkSubColumn('groupName')"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                                                                                <el-form-item prop="aimTemplateId" label="点标模板">
+            <el-form-item prop="aimTemplateId" label="点标模板">
                 <template>
-                    <el-select v-model="formData.aimTemplateId" clearable  placeholder="请选择" :disabled="'aimTemplateId'==subColumn">
-                        <el-option
-                                v-for="item in aimTemplateIdOptions"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value">
+                    <el-select v-model="formData.aimTemplateId" clearable placeholder="请选择" :disabled="checkSubColumn('aimTemplateId')">
+                        <el-option v-for="item in aimTemplateIdOptions" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </template>
             </el-form-item>
-                                                                                                                                                                                                                        <el-form-item prop="userArea" label="区域">
-                <el-input v-model="formData.userArea" :disabled="'userArea'==subColumn"></el-input>
+            <el-form-item prop="userArea" label="区域">
+                <el-input v-model="formData.userArea" :disabled="checkSubColumn('userArea')"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="remark" label="备注">
-                <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
+            <el-form-item prop="remark" label="备注">
+                <el-input v-model="formData.remark" :disabled="checkSubColumn('remark')"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                        <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>
@@ -80,172 +59,198 @@
     </div>
 </template>
 <script>
-    import formValidator from '../formValidator'
+import formValidator from '../formValidator'
 
-    export default {
-        created() {
-            if (this.$route.query.column) {
-                this.subColumn = this.$route.query.column.split(',')[1];
-                this.subValue = this.$route.query.column.split(',')[0];
-            }
+export default {
+    created() {
 
-            if (this.$route.query.id) {
-                this.$http.get({
-                    url: '/aimGroupInfo/getOne',
-                    data: {
-                        id: this.$route.query.id
-                    }
-                }).then(res => {
-                    if (res.success) {
+        if (this.$route.query.column) {
+
+            var columnList = this.$route.query.column.split(';')
+            columnList.forEach(item => {
+                var tempColumn = item;
+                this.subColumnList.push(tempColumn.split(',')[1]);
+            })
+
+        }
+
+        if (this.$route.query.id) {
+            this.$http.get({
+                url: '/aimGroupInfo/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
-                        this.formData = res.data;
+
+                    this.formData = res.data;
 
                     if (this.$route.query.column) {
-                        this.formData[this.subColumn] = this.subValue;
-                    }
+                        var columnList = this.$route.query.column.split(';')
+                        columnList.forEach(item => {
+                            var tempColumn = item;
+                            this.formData[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+                        })
+
                     }
+                }
+            })
+        } else {
+            if (this.$route.query.column) {
+                var columnList = this.$route.query.column.split(';')
+                columnList.forEach(item => {
+                    var tempColumn = item;
+                    this.formData[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
                 })
-            }else {
-                if (this.$route.query.column) {
-                    this.formData[this.subColumn] = this.subValue;
+
+            }
+        }
+
+
+
+
+        this.$http.get({
+            url: '/cityInfo/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.cityIdOptions.push({ label: item.cityName, value: String(item.id) });
+                    })
                 }
             }
+        });
 
-                                                                                                                                                                                                                                                    
 
 
-                        this.$http.get({
-                        url:'/cityInfo/all'
-                        }).then(res => {
-                        if (res.success) {
+        this.$http.get({
+            url: '/landMark/all'
+        }).then(res => {
+            if (res.success) {
 
-                        if (res.data.length > 0) {
-                        res.data.forEach(item => {
-                        this.cityIdOptions.push({label: item.cityName, value:item.id});
-                        })
-                        }
-                        }
-                        });
-                                                                                    
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.landmarkIdOptions.push({ label: item.mapName, value: String(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});
-                        })
-                        }
-                        }
-                        });
-                                                                                    
+        this.$http.get({
+            url: '/areaInfo/all'
+        }).then(res => {
+            if (res.success) {
 
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.areaIdOptions.push({ label: item.areaName, value: String(item.id) });
+                    })
+                }
+            }
+        });
 
-                        this.$http.get({
-                        url:'/areaInfo/all'
-                        }).then(res => {
-                        if (res.success) {
 
-                        if (res.data.length > 0) {
-                        res.data.forEach(item => {
-                        this.areaIdOptions.push({label: item.areaName, value:item.id});
-                        })
-                        }
-                        }
-                        });
-                                                                                    
 
+        this.$http.get({
+            url: '/thingInfo/all'
+        }).then(res => {
+            if (res.success) {
 
-                        this.$http.get({
-                        url:'/thingInfo/all'
-                        }).then(res => {
-                        if (res.success) {
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.thingIdOptions.push({ label: item.thingName, value: String(item.id) });
+                    })
+                }
+            }
+        });
 
-                        if (res.data.length > 0) {
-                        res.data.forEach(item => {
-                        this.thingIdOptions.push({label: item.thingName, value:item.id});
-                        })
-                        }
-                        }
-                        });
-                                                                                                                
 
 
-                        this.$http.get({
-                        url:'/aimTemplate/all'
-                        }).then(res => {
-                        if (res.success) {
+        this.$http.get({
+            url: '/aimTemplate/all'
+        }).then(res => {
+            if (res.success) {
 
-                        if (res.data.length > 0) {
-                        res.data.forEach(item => {
-                        this.aimTemplateIdOptions.push({label: item.templateName, value:item.id});
-                        })
-                        }
-                        }
-                        });
-                                                                                                                },
-        data() {
-            return {
-                saving: false,
-                formData: {},
-                rules: {
-                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
-                                                                                cityIdOptions:[],
-                                            landmarkIdOptions:[],
-                                            areaIdOptions:[],
-                                            thingIdOptions:[],
-                                                    aimTemplateIdOptions:[],
-                                                subColumn: '',
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.aimTemplateIdOptions.push({ label: item.templateName + '(适用于' + item.applyTo + ')', value: String(item.id) });
+                    })
+                }
+            }
+        });
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {
+            },
+            cityIdOptions: [],
+            landmarkIdOptions: [],
+            areaIdOptions: [],
+            thingIdOptions: [],
+            aimTemplateIdOptions: [],
+            subColumn: '',
             subValue: '',
+            subColumnList: [],
         }
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
         },
-        methods: {
-            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 ? '/aimGroupInfo/update' : '/aimGroupInfo/save',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.$message.success('成功');
-                        this.$router.go(-1);
-                    } else {
-                        this.$message.warning('失败')
-                    }
-                });
-            },
-            onDelete() {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                    return this.$http.post({
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+            this.$http.post({
+                url: this.formData.id ? '/aimGroupInfo/update' : '/aimGroupInfo/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
                     url: '/aimGroupInfo/del',
                     data: { id: this.formData.id }
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.$router.go(-1);
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
                 })
-            },
-        }
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$router.go(-1);
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+        checkSubColumn(value) {
+            if (this.$route.query.column) {
+                if (this.subColumnList.indexOf(value) >= 0) {
+                    return true;
+                }
+
+            }
+            return false;
+        },
     }
+}
 </script>
 <style lang="less" scoped>
 </style>

+ 314 - 377
src/main/vue/src/pages/AimGroupInfos.vue

@@ -1,25 +1,22 @@
 <template>
     <div>
         <div class="filters-container">
-        
+
             <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
             <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
             </el-button>
-            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
-                       icon="el-icon-search" class="filter-item">高级查询
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small" icon="el-icon-search" class="filter-item">高级查询
             </el-button>
-            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
-                       icon="el-icon-sort" class="filter-item">排序
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
             </el-button>
-            <el-button @click="$router.push({path:'/aimGroupInfo',query:{column:$route.query.column}})" type="primary"
-                       size="small" icon="el-icon-edit"
-                       class="filter-item">添加
+            <el-button @click="$router.push({path:'/aimGroupInfo',query:{column:$route.query.column}})" 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>
             <el-dropdown trigger="click" size="medium" class="table-column-filter">
                 <span>
-                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                    筛选数据
+                    <i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
                     <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
@@ -27,93 +24,41 @@
                 </el-dropdown-menu>
             </el-dropdown>
         </div>
-        <el-table
-                :data="tableData"
-                :height="tableHeight"
-                row-key="id"
-                ref="table">
-            <el-table-column
-                    v-if="multipleMode"
-                    align="center"
-                    type="selection"
-                    width="50">
+        <el-table :data="tableData" :height="tableHeight" 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">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('id')" prop="id" label="ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('cityId')" prop="cityId" label="城市ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('landmarkId')" prop="landmarkId" label="地标ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('areaId')" prop="areaId" label="区域ID" min-width="100">
             </el-table-column>
-            <el-table-column
-                    type="index"
-                    min-width="50"
-                    align="center">
+
+            <el-table-column v-if="isColumnShow('thingId')" prop="thingId" label="事物ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('groupName')" prop="groupName" label="点标组名称" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('aimTemplateId')" prop="aimTemplateId" label="点标模板" min-width="100">
             </el-table-column>
-                            
-                                            <el-table-column
-                                v-if="isColumnShow('id')"
-                                prop="id"
-                                label="ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                                                                                                                                                                                        
-                                            <el-table-column
-                                v-if="isColumnShow('cityId')"
-                                prop="cityId"
-                                label="城市ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('landmarkId')"
-                                prop="landmarkId"
-                                label="地标ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('areaId')"
-                                prop="areaId"
-                                label="区域ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('thingId')"
-                                prop="thingId"
-                                label="事物ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('groupName')"
-                                prop="groupName"
-                                label="点标组名称"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('aimTemplateId')"
-                                prop="aimTemplateId"
-                                label="点标模板"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('userArea')"
-                                prop="userArea"
-                                label="区域"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('remark')"
-                                prop="remark"
-                                label="备注"
-                                min-width="100">
-                        </el-table-column>
-                                                            <el-table-column
-                    label="操作"
-                    align="center"
-                    fixed="right"
-                    min-width="150"
-            >
+
+            <el-table-column v-if="isColumnShow('userArea')" prop="userArea" label="区域" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('remark')" prop="remark" label="备注" min-width="100">
+            </el-table-column>
+            <el-table-column label="操作" align="center" fixed="right" min-width="150">
                 <template slot-scope="scope">
-                            <el-button @click="editRow(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>
@@ -127,15 +72,7 @@
                     <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
                 </el-button-group>
             </div>
-            <el-pagination
-                    background
-                    @size-change="pageSizeChange"
-                    @current-change="currentPageChange"
-                    :current-page="currentPage"
-                    :page-sizes="[10, 20, 30, 40, 50]"
-                    :page-size="pageSize"
-                    layout="total, sizes, prev, pager, next, jumper"
-                    :total="totalNumber">
+            <el-pagination background @size-change="pageSizeChange" @current-change="currentPageChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalNumber">
             </el-pagination>
         </div>
         <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
@@ -156,16 +93,14 @@
                     <template slot-scope="{row}">
                         <el-select v-model="row.name">
 
-                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
-                                       :key="item.value"></el-option>
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
                 <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
                     <template slot-scope="{row}">
                         <el-select v-model="row.searchMethod">
-                            <el-option v-for="item in searchMethods" :label="item" :value="item"
-                                       :key="item"></el-option>
+                            <el-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -195,8 +130,7 @@
                     <template slot-scope="{row}">
                         <el-select v-model="row.name">
 
-                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
-                                       :key="item.value"></el-option>
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -230,306 +164,309 @@
     </div>
 </template>
 <script>
-    import {mapState} from 'vuex'
-    import {format} from 'date-fns'
-    import zh from 'date-fns/locale/zh_cn'
-
-    export default {
-        created() {
+import { mapState } from 'vuex'
+import { format } from 'date-fns'
+import zh from 'date-fns/locale/zh_cn'
+
+export default {
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: 'ID',
+                    value: 'id',
+                    show: true
+                },
+                {
+                    label: '城市ID',
+                    value: 'cityId',
+                    show: true
+                },
+                {
+                    label: '地标ID',
+                    value: 'landmarkId',
+                    show: true
+                },
+                {
+                    label: '区域ID',
+                    value: 'areaId',
+                    show: true
+                },
+                {
+                    label: '事物ID',
+                    value: 'thingId',
+                    show: true
+                },
+                {
+                    label: '点标组名称',
+                    value: 'groupName',
+                    show: true
+                },
+                {
+                    label: '点标模板',
+                    value: 'aimTemplateId',
+                    show: true
+                },
+                {
+                    label: '区域',
+                    value: 'userArea',
+                    show: true
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                    show: true
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: 'ID',
+                    value: 'id'
+                },
+                {
+                    label: '城市ID',
+                    value: 'city_id'
+                },
+                {
+                    label: '地标ID',
+                    value: 'landmark_id'
+                },
+                {
+                    label: '区域ID',
+                    value: 'area_id'
+                },
+                {
+                    label: '事物ID',
+                    value: 'thing_id'
+                },
+                {
+                    label: '点标组名称',
+                    value: 'group_name'
+                },
+                {
+                    label: '点标模板',
+                    value: 'aim_template_id'
+                },
+                {
+                    label: '区域',
+                    value: 'user_area'
+                },
+                {
+                    label: '备注',
+                    value: 'remark'
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        }
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        }
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
             this.getData();
         },
-        data() {
-            return {
-                totalNumber: 0,
-                totalPage: 10,
-                currentPage: 1,
-                pageSize: 20,
-                tableData: [],
-                filter1: '',
-                filter2: '',
-                tableColumns: [
-                                                                        {
-                                label: 'ID',
-                                value: 'id',
-                                show: true
-                            },
-                                                                                                                                                                                                                                                                                                                                                                        {
-                                label: '城市ID',
-                                value: 'cityId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '地标ID',
-                                value: 'landmarkId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '区域ID',
-                                value: 'areaId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '事物ID',
-                                value: 'thingId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '点标组名称',
-                                value: 'groupName',
-                                show: true
-                            },
-                                                                                                {
-                                label: '点标模板',
-                                value: 'aimTemplateId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '区域',
-                                value: 'userArea',
-                                show: true
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark',
-                                show: true
-                            },
-                                                            ],
-                multipleMode: false,
-                showAdvancedQueryDialog: false,
-                advancedQueryFields: [],
-                showTableSortDialog: false,
-                tableSortFields: [],
-                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
-                advancedQueryColumns: [
-                                                                        {
-                                label: 'ID',
-                                value: 'id'
-                            },
-                                                                                                                                                                                                                                                                                                                                                                        {
-                                label: '城市ID',
-                                value: 'city_id'
-                            },
-                                                                                                {
-                                label: '地标ID',
-                                value: 'landmark_id'
-                            },
-                                                                                                {
-                                label: '区域ID',
-                                value: 'area_id'
-                            },
-                                                                                                {
-                                label: '事物ID',
-                                value: 'thing_id'
-                            },
-                                                                                                {
-                                label: '点标组名称',
-                                value: 'group_name'
-                            },
-                                                                                                {
-                                label: '点标模板',
-                                value: 'aim_template_id'
-                            },
-                                                                                                {
-                                label: '区域',
-                                value: 'user_area'
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark'
-                            },
-                                                            ],
-                advancedQuerySearchKey: '',
-                orderByStr: '',
-                imgSrc: '',
-                imageDialogVisible: false,
-            }
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
         },
-        computed: {
-            ...mapState(['tableHeight']),
-            selection() {
-                return this.$refs.table.selection.map(i => i.id);
+        getData() {
+
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
             }
-        },
-        methods: {
-            pageSizeChange(size) {
-                this.currentPage = 1;
-                this.pageSize = size;
-                this.getData();
-            },
-            currentPageChange(page) {
-                this.currentPage = page;
-                this.getData();
-            },
-            getData() {
-
-                var data = {
-                    currentPage: this.currentPage,
-                    pageNumber: this.pageSize,
-                    searchKey: this.filter1,
-                    advancedQuery: this.advancedQuerySearchKey,
-                    orderByStr: this.orderByStr,
-                }
 
-                if (this.$route.query.column) {
-                    var tempColumn = this.$route.query.column;
+            if (this.$route.query.column) {
+                var columnList = this.$route.query.column.split(';')
+                columnList.forEach(item => {
+                    var tempColumn = item;
                     data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
-                }
-
-                this.$http.get({
-                    url: '/aimGroupInfo/page',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.totalNumber = res.data.page.totalNumber;
-                        this.tableData = res.data.pp;
-                    }
                 })
-            },
-            isColumnShow(column) {
-                var row = this.tableColumns.find(i => i.value === column);
-                return row ? row.show : false;
-            },
-            toggleMultipleMode(multipleMode) {
-                this.multipleMode = multipleMode;
-                if (!multipleMode) {
-                    this.$refs.table.clearSelection();
+
+            }
+
+            this.$http.get({
+                url: '/aimGroupInfo/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.tableData = res.data.pp;
                 }
-            },
-            editRow(row) {
-                this.$router.push({
-                    path: '/aimGroupInfo',
-                    query: {
-                        id: row.id,
-                        column: this.$route.query.column,
-                    }
-                })
-            },
-            operation1() {
-                this.$notify({
-                    title: '提示',
-                    message: this.selection
-                });
-            },
-            operation2() {
-                this.$message('操作2');
-            },
-            addField() {
-                this.advancedQueryFields.push({
-                    link: 'AND',
-                    name: '',
-                    searchMethod: '=',
-                    value: '',
-                });
-            },
-            removeField(i) {
-                if (this.advancedQueryFields.length > 0) {
-                    this.advancedQueryFields.splice(i, 1);
+            })
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/aimGroupInfo',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
                 }
-            },
-            advancedQuery() {
+            })
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
 
-                this.advancedQuerySearchKey = '';
+            this.advancedQuerySearchKey = '';
 
-                if (this.advancedQueryFields.length > 0) {
+            if (this.advancedQueryFields.length > 0) {
 
-                    var templist = [];
+                var templist = [];
 
-                    this.advancedQueryFields.forEach(item => {
-                        if (item.link && item.name && item.searchMethod && item.value) {
-                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
-                            templist.push(tempItem);
-                        }
-                    })
+                this.advancedQueryFields.forEach(item => {
+                    if (item.link && item.name && item.searchMethod && item.value) {
+                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                        templist.push(tempItem);
+                    }
+                })
 
-                    if (templist.length > 0) {
+                if (templist.length > 0) {
 
-                        this.advancedQuerySearchKey = templist.join('_;');
-                    }
+                    this.advancedQuerySearchKey = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showAdvancedQueryDialog = false;
-            },
-            addSortField() {
-                this.tableSortFields.push({
-                    name: '',
-                    order: 'asc',
-                });
-            },
-            removeSortField(i) {
-                if (this.tableSortFields.length > 0) {
-                    this.tableSortFields.splice(i, 1);
-                }
-            },
-            tableSortQuery() {
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
 
-                this.orderByStr = '';
+            this.orderByStr = '';
 
-                if (this.tableSortFields.length > 0) {
+            if (this.tableSortFields.length > 0) {
 
-                    var templist = [];
+                var templist = [];
 
-                    this.tableSortFields.forEach(item => {
-                        if (item.name && item.order) {
-                            var tempItem = item.name + '_,' + item.order;
-                            templist.push(tempItem);
-                        }
-                    })
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                })
 
-                    if (templist.length > 0) {
+                if (templist.length > 0) {
 
-                        this.orderByStr = templist.join('_;');
-                    }
+                    this.orderByStr = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showTableSortDialog = false;
-            },
-            exportExcel() {
-                window.location.href = this.$baseUrl + "/aimGroupInfo/exportExcel?searchKey="
-                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
-            },
-            searchData() {
-                this.currentPage = 1;
-                this.getData();
-            },
-            deleteRow(row) {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
-                    return this.$http.post({
-                        url: '/aimGroupInfo/del',
-                        data: {id: row.id}
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.getData();
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href = this.$baseUrl + "/aimGroupInfo/exportExcel?searchKey="
+                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/aimGroupInfo/del',
+                    data: { id: row.id }
                 })
-            },
-            DateTimeFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.getData();
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
                 }
+            })
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+            }
 
-            },
-            DateFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
-                }
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+            }
 
-            },
-            showImg(img) {
-                this.imgSrc = img;
-                this.imageDialogVisible = true;
-            },
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
 
-        }
     }
+}
 </script>
 <style lang="less" scoped>
-
 </style>

+ 77 - 78
src/main/vue/src/pages/AimTemplate.vue

@@ -1,17 +1,16 @@
 <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="templateName" label="模板名称">
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <el-form-item prop="templateName" label="模板名称">
                 <el-input v-model="formData.templateName" :disabled="'templateName'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="applyTo" label="适用于">
+            <el-form-item prop="applyTo" label="适用于">
                 <el-input v-model="formData.applyTo" :disabled="'applyTo'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="remark" label="备注">
+            <el-form-item prop="remark" label="备注">
                 <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                    <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>
@@ -20,96 +19,96 @@
     </div>
 </template>
 <script>
-    import formValidator from '../formValidator'
+import formValidator from '../formValidator'
 
-    export default {
-        created() {
-            if (this.$route.query.column) {
-                this.subColumn = this.$route.query.column.split(',')[1];
-                this.subValue = this.$route.query.column.split(',')[0];
-            }
+export default {
+    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: '/aimTemplate/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
 
-            if (this.$route.query.id) {
-                this.$http.get({
-                    url: '/aimTemplate/getOne',
-                    data: {
-                        id: this.$route.query.id
-                    }
-                }).then(res => {
-                    if (res.success) {
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
-                        this.formData = res.data;
+                    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;
                 }
+            })
+        } else {
+            if (this.$route.query.column) {
+                this.formData[this.subColumn] = this.subValue;
             }
+        }
 
-                                                                                                                                                                                                                                                                                                            },
-        data() {
-            return {
-                saving: false,
-                formData: {},
-                rules: {
-                                                                                                                                                                                                                        templateName:
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {
+                templateName:
                     [
-                                                {required: true, message: '请输入 模板名称', trigger: 'blur'},
-                                                                    ],
-                                                                                                                        },
-                                                                                            subColumn: '',
+                        { required: true, message: '请输入 模板名称', trigger: 'blur' },
+                    ],
+            },
+            subColumn: '',
             subValue: '',
         }
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
         },
-        methods: {
-            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 ? '/aimTemplate/update' : '/aimTemplate/save',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.$message.success('成功');
-                        this.$router.go(-1);
-                    } else {
-                        this.$message.warning('失败')
-                    }
-                });
-            },
-            onDelete() {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                    return this.$http.post({
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+            this.$http.post({
+                url: this.formData.id ? '/aimTemplate/update' : '/aimTemplate/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
                     url: '/aimTemplate/del',
                     data: { id: this.formData.id }
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.$router.go(-1);
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
                 })
-            },
-        }
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$router.go(-1);
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
     }
+}
 </script>
 <style lang="less" scoped>
 </style>

+ 323 - 394
src/main/vue/src/pages/AlipayTemps.vue

@@ -1,25 +1,22 @@
 <template>
     <div>
         <div class="filters-container">
-        
+
             <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
             <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
             </el-button>
-            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
-                       icon="el-icon-search" class="filter-item">高级查询
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small" icon="el-icon-search" class="filter-item">高级查询
             </el-button>
-            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
-                       icon="el-icon-sort" class="filter-item">排序
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
             </el-button>
-            <el-button @click="$router.push({path:'/alipayTemp',query:{column:$route.query.column}})" type="primary"
-                       size="small" icon="el-icon-edit"
-                       class="filter-item">添加
+            <el-button @click="$router.push({path:'/alipayTemp',query:{column:$route.query.column}})" 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>
             <el-dropdown trigger="click" size="medium" class="table-column-filter">
                 <span>
-                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                    筛选数据
+                    <i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
                     <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
@@ -27,100 +24,44 @@
                 </el-dropdown-menu>
             </el-dropdown>
         </div>
-        <el-table
-                :data="tableData"
-                :height="tableHeight"
-                row-key="id"
-                ref="table">
-            <el-table-column
-                    v-if="multipleMode"
-                    align="center"
-                    type="selection"
-                    width="50">
+        <el-table :data="tableData" :height="tableHeight" 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">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('orderId')" prop="orderId" label="订单" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('tradeStatus')" prop="tradeStatus" label="状态" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('totalAmount')" prop="totalAmount" label="金额" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('outTradeNo')" prop="outTradeNo" label="订单码" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('refundNo')" prop="refundNo" label="退款码" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('refundAmount')" prop="refundAmount" label="退款数" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('typeFlag')" prop="typeFlag" label="类型" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('coin')" prop="coin" label="余额" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('point')" prop="point" label="积分" min-width="100">
             </el-table-column>
-            <el-table-column
-                    type="index"
-                    min-width="50"
-                    align="center">
+
+            <el-table-column v-if="isColumnShow('cash')" prop="cash" label="现金" min-width="100">
             </el-table-column>
-                                                                                                                                                                                                    
-                                            <el-table-column
-                                v-if="isColumnShow('orderId')"
-                                prop="orderId"
-                                label="订单"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('tradeStatus')"
-                                prop="tradeStatus"
-                                label="状态"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('totalAmount')"
-                                prop="totalAmount"
-                                label="金额"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('outTradeNo')"
-                                prop="outTradeNo"
-                                label="订单码"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('refundNo')"
-                                prop="refundNo"
-                                label="退款码"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('refundAmount')"
-                                prop="refundAmount"
-                                label="退款数"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('typeFlag')"
-                                prop="typeFlag"
-                                label="类型"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('coin')"
-                                prop="coin"
-                                label="余额"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('point')"
-                                prop="point"
-                                label="积分"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('cash')"
-                                prop="cash"
-                                label="现金"
-                                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="150">
                 <template slot-scope="scope">
-                            <el-button @click="editRow(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>
@@ -134,15 +75,7 @@
                     <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
                 </el-button-group>
             </div>
-            <el-pagination
-                    background
-                    @size-change="pageSizeChange"
-                    @current-change="currentPageChange"
-                    :current-page="currentPage"
-                    :page-sizes="[10, 20, 30, 40, 50]"
-                    :page-size="pageSize"
-                    layout="total, sizes, prev, pager, next, jumper"
-                    :total="totalNumber">
+            <el-pagination background @size-change="pageSizeChange" @current-change="currentPageChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalNumber">
             </el-pagination>
         </div>
         <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
@@ -163,16 +96,14 @@
                     <template slot-scope="{row}">
                         <el-select v-model="row.name">
 
-                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
-                                       :key="item.value"></el-option>
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
                 <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
                     <template slot-scope="{row}">
                         <el-select v-model="row.searchMethod">
-                            <el-option v-for="item in searchMethods" :label="item" :value="item"
-                                       :key="item"></el-option>
+                            <el-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -202,8 +133,7 @@
                     <template slot-scope="{row}">
                         <el-select v-model="row.name">
 
-                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
-                                       :key="item.value"></el-option>
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -237,315 +167,314 @@
     </div>
 </template>
 <script>
-    import {mapState} from 'vuex'
-    import {format} from 'date-fns'
-    import zh from 'date-fns/locale/zh_cn'
-
-    export default {
-        created() {
+import { mapState } from 'vuex'
+import { format } from 'date-fns'
+import zh from 'date-fns/locale/zh_cn'
+
+export default {
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: '订单',
+                    value: 'orderId',
+                    show: true
+                },
+                {
+                    label: '状态',
+                    value: 'tradeStatus',
+                    show: true
+                },
+                {
+                    label: '金额',
+                    value: 'totalAmount',
+                    show: true
+                },
+                {
+                    label: '订单码',
+                    value: 'outTradeNo',
+                    show: true
+                },
+                {
+                    label: '退款码',
+                    value: 'refundNo',
+                    show: true
+                },
+                {
+                    label: '退款数',
+                    value: 'refundAmount',
+                    show: true
+                },
+                {
+                    label: '类型',
+                    value: 'typeFlag',
+                    show: true
+                },
+                {
+                    label: '余额',
+                    value: 'coin',
+                    show: true
+                },
+                {
+                    label: '积分',
+                    value: 'point',
+                    show: true
+                },
+                {
+                    label: '现金',
+                    value: 'cash',
+                    show: true
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: '订单',
+                    value: 'order_id'
+                },
+                {
+                    label: '状态',
+                    value: 'trade_status'
+                },
+                {
+                    label: '金额',
+                    value: 'total_amount'
+                },
+                {
+                    label: '订单码',
+                    value: 'out_trade_no'
+                },
+                {
+                    label: '退款码',
+                    value: 'refund_no'
+                },
+                {
+                    label: '退款数',
+                    value: 'refund_amount'
+                },
+                {
+                    label: '类型',
+                    value: 'type_flag'
+                },
+                {
+                    label: '余额',
+                    value: 'coin'
+                },
+                {
+                    label: '积分',
+                    value: 'point'
+                },
+                {
+                    label: '现金',
+                    value: 'cash'
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        }
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        }
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
             this.getData();
         },
-        data() {
-            return {
-                totalNumber: 0,
-                totalPage: 10,
-                currentPage: 1,
-                pageSize: 20,
-                tableData: [],
-                filter1: '',
-                filter2: '',
-                tableColumns: [
-                                                                                                                                                                                                                                                                                                                                                {
-                                label: '订单',
-                                value: 'orderId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '状态',
-                                value: 'tradeStatus',
-                                show: true
-                            },
-                                                                                                {
-                                label: '金额',
-                                value: 'totalAmount',
-                                show: true
-                            },
-                                                                                                {
-                                label: '订单码',
-                                value: 'outTradeNo',
-                                show: true
-                            },
-                                                                                                {
-                                label: '退款码',
-                                value: 'refundNo',
-                                show: true
-                            },
-                                                                                                {
-                                label: '退款数',
-                                value: 'refundAmount',
-                                show: true
-                            },
-                                                                                                {
-                                label: '类型',
-                                value: 'typeFlag',
-                                show: true
-                            },
-                                                                                                {
-                                label: '余额',
-                                value: 'coin',
-                                show: true
-                            },
-                                                                                                {
-                                label: '积分',
-                                value: 'point',
-                                show: true
-                            },
-                                                                                                {
-                                label: '现金',
-                                value: 'cash',
-                                show: true
-                            },
-                                                            ],
-                multipleMode: false,
-                showAdvancedQueryDialog: false,
-                advancedQueryFields: [],
-                showTableSortDialog: false,
-                tableSortFields: [],
-                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
-                advancedQueryColumns: [
-                                                                                                                                                                                                                                                                                                                                                {
-                                label: '订单',
-                                value: 'order_id'
-                            },
-                                                                                                {
-                                label: '状态',
-                                value: 'trade_status'
-                            },
-                                                                                                {
-                                label: '金额',
-                                value: 'total_amount'
-                            },
-                                                                                                {
-                                label: '订单码',
-                                value: 'out_trade_no'
-                            },
-                                                                                                {
-                                label: '退款码',
-                                value: 'refund_no'
-                            },
-                                                                                                {
-                                label: '退款数',
-                                value: 'refund_amount'
-                            },
-                                                                                                {
-                                label: '类型',
-                                value: 'type_flag'
-                            },
-                                                                                                {
-                                label: '余额',
-                                value: 'coin'
-                            },
-                                                                                                {
-                                label: '积分',
-                                value: 'point'
-                            },
-                                                                                                {
-                                label: '现金',
-                                value: 'cash'
-                            },
-                                                            ],
-                advancedQuerySearchKey: '',
-                orderByStr: '',
-                imgSrc: '',
-                imageDialogVisible: false,
-            }
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
         },
-        computed: {
-            ...mapState(['tableHeight']),
-            selection() {
-                return this.$refs.table.selection.map(i => i.id);
+        getData() {
+
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
             }
-        },
-        methods: {
-            pageSizeChange(size) {
-                this.currentPage = 1;
-                this.pageSize = size;
-                this.getData();
-            },
-            currentPageChange(page) {
-                this.currentPage = page;
-                this.getData();
-            },
-            getData() {
-
-                var data = {
-                    currentPage: this.currentPage,
-                    pageNumber: this.pageSize,
-                    searchKey: this.filter1,
-                    advancedQuery: this.advancedQuerySearchKey,
-                    orderByStr: this.orderByStr,
-                }
 
-                if (this.$route.query.column) {
-                    var tempColumn = this.$route.query.column;
-                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
-                }
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+            }
 
-                this.$http.get({
-                    url: '/alipayTemp/page',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.totalNumber = res.data.page.totalNumber;
-                        this.tableData = res.data.pp;
-                    }
-                })
-            },
-            isColumnShow(column) {
-                var row = this.tableColumns.find(i => i.value === column);
-                return row ? row.show : false;
-            },
-            toggleMultipleMode(multipleMode) {
-                this.multipleMode = multipleMode;
-                if (!multipleMode) {
-                    this.$refs.table.clearSelection();
+            this.$http.get({
+                url: '/alipayTemp/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.tableData = res.data.pp;
                 }
-            },
-            editRow(row) {
-                this.$router.push({
-                    path: '/alipayTemp',
-                    query: {
-                        id: row.id,
-                        column: this.$route.query.column,
-                    }
-                })
-            },
-            operation1() {
-                this.$notify({
-                    title: '提示',
-                    message: this.selection
-                });
-            },
-            operation2() {
-                this.$message('操作2');
-            },
-            addField() {
-                this.advancedQueryFields.push({
-                    link: 'AND',
-                    name: '',
-                    searchMethod: '=',
-                    value: '',
-                });
-            },
-            removeField(i) {
-                if (this.advancedQueryFields.length > 0) {
-                    this.advancedQueryFields.splice(i, 1);
+            })
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/alipayTemp',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
                 }
-            },
-            advancedQuery() {
+            })
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
 
-                this.advancedQuerySearchKey = '';
+            this.advancedQuerySearchKey = '';
 
-                if (this.advancedQueryFields.length > 0) {
+            if (this.advancedQueryFields.length > 0) {
 
-                    var templist = [];
+                var templist = [];
 
-                    this.advancedQueryFields.forEach(item => {
-                        if (item.link && item.name && item.searchMethod && item.value) {
-                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
-                            templist.push(tempItem);
-                        }
-                    })
+                this.advancedQueryFields.forEach(item => {
+                    if (item.link && item.name && item.searchMethod && item.value) {
+                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                        templist.push(tempItem);
+                    }
+                })
 
-                    if (templist.length > 0) {
+                if (templist.length > 0) {
 
-                        this.advancedQuerySearchKey = templist.join('_;');
-                    }
+                    this.advancedQuerySearchKey = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showAdvancedQueryDialog = false;
-            },
-            addSortField() {
-                this.tableSortFields.push({
-                    name: '',
-                    order: 'asc',
-                });
-            },
-            removeSortField(i) {
-                if (this.tableSortFields.length > 0) {
-                    this.tableSortFields.splice(i, 1);
-                }
-            },
-            tableSortQuery() {
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
 
-                this.orderByStr = '';
+            this.orderByStr = '';
 
-                if (this.tableSortFields.length > 0) {
+            if (this.tableSortFields.length > 0) {
 
-                    var templist = [];
+                var templist = [];
 
-                    this.tableSortFields.forEach(item => {
-                        if (item.name && item.order) {
-                            var tempItem = item.name + '_,' + item.order;
-                            templist.push(tempItem);
-                        }
-                    })
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                })
 
-                    if (templist.length > 0) {
+                if (templist.length > 0) {
 
-                        this.orderByStr = templist.join('_;');
-                    }
+                    this.orderByStr = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showTableSortDialog = false;
-            },
-            exportExcel() {
-                window.location.href = this.$baseUrl + "/alipayTemp/exportExcel?searchKey="
-                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
-            },
-            searchData() {
-                this.currentPage = 1;
-                this.getData();
-            },
-            deleteRow(row) {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
-                    return this.$http.post({
-                        url: '/alipayTemp/del',
-                        data: {id: row.id}
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.getData();
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href = this.$baseUrl + "/alipayTemp/exportExcel?searchKey="
+                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/alipayTemp/del',
+                    data: { id: row.id }
                 })
-            },
-            DateTimeFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.getData();
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
                 }
+            })
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+            }
 
-            },
-            DateFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
-                }
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+            }
 
-            },
-            showImg(img) {
-                this.imgSrc = img;
-                this.imageDialogVisible = true;
-            },
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
 
-        }
     }
+}
 </script>
 <style lang="less" scoped>
-
 </style>

+ 206 - 191
src/main/vue/src/pages/AreaInfo.vue

@@ -1,113 +1,99 @@
 <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="cityId" label="城市ID">
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <el-form-item prop="cityId" label="城市ID">
                 <template>
-                    <el-select v-model="formData.cityId" clearable  placeholder="请选择" :disabled="'cityId'==subColumn">
-                        <el-option
-                                v-for="item in cityIdOptions"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value">
+                    <el-select v-model="formData.cityId" clearable placeholder="请选择" :disabled="'cityId'==subColumn">
+                        <el-option v-for="item in cityIdOptions" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </template>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="landmarkId" label="地标ID">
+            <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-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="areaName" label="区域名称">
+            <el-form-item prop="areaName" label="区域名称">
                 <el-input v-model="formData.areaName" :disabled="'areaName'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                    <el-form-item prop="rankLevel" label="优先级">
+            <el-form-item prop="areaType" label="区域类型">
+                <template>
+                    <el-select v-model="formData.areaType" clearable placeholder="请选择" :disabled="'areaType'==subColumn">
+                        <el-option v-for="item in areaTypeOptions" :key="item.value" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item>
+            <el-form-item prop="rankLevel" label="优先级">
                 <el-input type="number" v-model="formData.rankLevel" :disabled="'rankLevel'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <el-form-item prop="allowEdit" label="允许编辑">
-                <el-switch
-                        v-model="formData.allowEdit"
-                        active-color="#13ce66"
-                        inactive-color="#ff4949"
-                        :disabled="'allowEdit'==subColumn">
+            <el-form-item prop="allowEdit" label="允许编辑">
+                <el-switch v-model="formData.allowEdit" active-color="#13ce66" inactive-color="#ff4949" :disabled="'allowEdit'==subColumn">
                 </el-switch>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="allowNavigate" label="允许导航">
-                <el-switch
-                        v-model="formData.allowNavigate"
-                        active-color="#13ce66"
-                        inactive-color="#ff4949"
-                        :disabled="'allowNavigate'==subColumn">
+            <el-form-item prop="allowNavigate" label="允许导航">
+                <el-switch v-model="formData.allowNavigate" active-color="#13ce66" inactive-color="#ff4949" :disabled="'allowNavigate'==subColumn">
                 </el-switch>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="publicArea" label="公共区域">
-                <el-switch
-                        v-model="formData.publicArea"
-                        active-color="#13ce66"
-                        inactive-color="#ff4949"
-                        :disabled="'publicArea'==subColumn">
+            <el-form-item prop="publicArea" label="公共区域">
+                <el-switch v-model="formData.publicArea" active-color="#13ce66" inactive-color="#ff4949" :disabled="'publicArea'==subColumn">
                 </el-switch>
             </el-form-item>
-                                                                                                <el-form-item prop="remark" label="备注">
+            <el-form-item prop="remark" label="备注">
                 <el-input v-model="formData.remark" :disabled="'remark'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                         <el-form-item prop="icon" label="ICON">
-                 <single-upload v-model="formData.icon" :disabled="'icon'==subColumn"></single-upload>
-             </el-form-item>
-                                                                                                                                                                                <el-form-item prop="keyword" label="关键字">
-                <el-input v-model="formData.keyword" :disabled="'keyword'==subColumn"></el-input>
+            <el-form-item prop="icon" label="ICON">
+                <single-upload v-model="formData.icon" :disabled="'icon'==subColumn"></single-upload>
+                图片格式为png,分辨率64*64
+            </el-form-item>
+            <el-form-item prop="icon" label="ICON">
+                <el-input v-model="formData.icon" :disabled="'icon'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="keyword" label="关键词">
+                <template>
+                    <div v-for="(item,index) in formData.keyword" style="margin-bottom:10px">
+                        <el-input v-model="formData.keyword[index]" style="width:180px"></el-input>
+                        <el-button @click="onDeleteKeyword(index)" type="danger">删除</el-button>
+                    </div>
+                    <el-button @click="addKeyword" type="primary">添加</el-button>
+                </template>
+            </el-form-item>
+            <el-form-item prop="video" label="视频">
+                <single-upload v-model="formData.video" :disabled="'video'==subColumn"></single-upload>
+                图片格式为png,分辨率512*512;视频格式为MP4,分辨率为1024*768
+            </el-form-item>
+            <el-form-item prop="video" label="视频">
+                <el-input v-model="formData.video" :disabled="'video'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                         <el-form-item prop="video" label="视频">
-                 <single-upload v-model="formData.video" :disabled="'video'==subColumn"></single-upload>
-             </el-form-item>
-                                                                                                                                                                                                    <el-form-item prop="textIntroduction" label="文字介绍">
+            <el-form-item prop="textIntroduction" label="文字介绍">
                 <el-input type="textarea" v-model="formData.textIntroduction" :disabled="'textIntroduction'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                        <el-form-item prop="url" label="官网">
+            <el-form-item prop="url" label="官网">
                 <el-input v-model="formData.url" :disabled="'url'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                    <el-form-item prop="showDistance" label="显示距离">
+            <el-form-item prop="showDistance" label="显示距离">
                 <el-input type="number" v-model="formData.showDistance" :disabled="'showDistance'==subColumn"></el-input>
+                M(最大不可超过10m)
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                                        <el-form-item prop="templateId" label="模板ID">
+            <el-form-item prop="templateId" label="点标组ID">
                 <template>
-                    <el-select v-model="formData.templateId" clearable  placeholder="请选择" :disabled="'templateId'==subColumn">
-                        <el-option
-                                v-for="item in templateIdOptions"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value">
+                    <el-select v-model="formData.templateId" clearable placeholder="请选择" :disabled="'templateId'==subColumn">
+                        <el-option v-for="item in templateIdOptions" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </template>
             </el-form-item>
-                                                                                                                                                                                                                        <el-form-item prop="frontLevelId" label="上级ID">
+            <el-form-item prop="frontLevelId" label="上级ID">
                 <el-input v-model="formData.frontLevelId" :disabled="'frontLevelId'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="blockId" label="地块ID">
+            <el-form-item prop="blockId" label="地块ID">
                 <el-input v-model="formData.blockId" :disabled="'blockId'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                                                                                                                                <el-form-item prop="areaType" label="区域类型">
-                <template>
-                    <el-select v-model="formData.areaType" clearable  placeholder="请选择" :disabled="'areaType'==subColumn">
-                        <el-option
-                                v-for="item in areaTypeOptions"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value">
-                        </el-option>
-                    </el-select>
-                </template>
-            </el-form-item>
-                                                                                                                                                                                    <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>
@@ -116,156 +102,185 @@
     </div>
 </template>
 <script>
-    import formValidator from '../formValidator'
+import formValidator from '../formValidator'
 
-    export default {
-        created() {
-            if (this.$route.query.column) {
-                this.subColumn = this.$route.query.column.split(',')[1];
-                this.subValue = this.$route.query.column.split(',')[0];
-            }
+export default {
+    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: '/areaInfo/getOne',
-                    data: {
-                        id: this.$route.query.id
-                    }
-                }).then(res => {
-                    if (res.success) {
+        if (this.$route.query.id) {
+            this.$http.get({
+                url: '/areaInfo/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
-                        this.formData = res.data;
+
+                    this.formData = res.data;
+
+                    if (res.data.keyword) {
+                        res.data.keyword = res.data.keyword.split(',')
+                    }
 
                     if (this.$route.query.column) {
                         this.formData[this.subColumn] = this.subValue;
                     }
-                    }
-                })
-            }else {
-                if (this.$route.query.column) {
-                    this.formData[this.subColumn] = this.subValue;
+
+                    this.formData.allowEdit = this.formData.allowEdit == 'Y' ? true : false;
+                    this.formData.allowNavigate = this.formData.allowNavigate == 'Y' ? true : false;
+                    this.formData.publicArea = this.formData.publicArea == 'Y' ? true : false;
+
                 }
+            })
+        } else {
+            if (this.$route.query.column) {
+                this.formData[this.subColumn] = this.subValue;
             }
+        }
 
-                                                                                                                                                                                                                                                    
 
 
-                        this.$http.get({
-                        url:'/cityInfo/all'
-                        }).then(res => {
-                        if (res.success) {
 
-                        if (res.data.length > 0) {
-                        res.data.forEach(item => {
-                        this.cityIdOptions.push({label: item.cityName, value:item.id});
-                        })
-                        }
-                        }
-                        });
-                                                                                    
+        this.$http.get({
+            url: '/cityInfo/all'
+        }).then(res => {
+            if (res.success) {
 
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.cityIdOptions.push({ label: item.cityName, value: String(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});
-                        })
-                        }
-                        }
-                        });
-                                                                                                                                                                                                                                                                                                                                                                                                                                    
 
+        this.$http.get({
+            url: '/landMark/all'
+        }).then(res => {
+            if (res.success) {
 
-                        this.$http.get({
-                        url:'/aimTemplate/all'
-                        }).then(res => {
-                        if (res.success) {
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.landmarkIdOptions.push({ label: item.mapName, value: String(item.id) });
+                    })
+                }
+            }
+        });
+
+
+
+        this.$http.get({
+            url: '/aimGroupInfos/all',
+            data: {
+                areaId: this.formData.id,
+            }
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.templateIdOptions.push({ label: item.groupName, value: String(item.id) });
+                    })
+                }
+            }
+        });
 
-                        if (res.data.length > 0) {
-                        res.data.forEach(item => {
-                        this.templateIdOptions.push({label: item.templateName, value:item.id});
-                        })
-                        }
-                        }
-                        });
-                                                                                                                                            
 
 
-                        this.$http.get({
-                        url:'/landmarkType/all?typeFlag=2'
-                        }).then(res => {
-                        if (res.success) {
+        this.$http.get({
+            url: '/landmarkType/all?typeFlag=2'
+        }).then(res => {
+            if (res.success) {
 
-                        if (res.data.length > 0) {
-                        res.data.forEach(item => {
-                        this.areaTypeOptions.push({label: item.typeName, value:item.id});
-                        })
-                        }
-                        }
-                        });
-                                                        },
-        data() {
-            return {
-                saving: false,
-                formData: {},
-                rules: {
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                },
-                                                                                cityIdOptions:[],
-                                            landmarkIdOptions:[],
-                                                                                                                                            templateIdOptions:[],
-                                                            areaTypeOptions:[],
-                                subColumn: '',
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.areaTypeOptions.push({ label: item.typeName, value: String(item.id) });
+                    })
+                }
+            }
+        });
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                keyword: [],
+            },
+            rules: {
+            },
+            cityIdOptions: [],
+            landmarkIdOptions: [],
+            templateIdOptions: [],
+            areaTypeOptions: [],
+            subColumn: '',
             subValue: '',
         }
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
         },
-        methods: {
-            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 ? '/areaInfo/update' : '/areaInfo/save',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.$message.success('成功');
-                        this.$router.go(-1);
-                    } else {
-                        this.$message.warning('失败')
-                    }
-                });
-            },
-            onDelete() {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                    return this.$http.post({
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+
+            data.keyword = data.keyword.join();
+
+            data.allowEdit = this.formData.allowEdit ? 'Y' : 'N';
+            data.allowNavigate = this.formData.allowNavigate ? 'Y' : 'N';
+            data.publicArea = this.formData.publicArea ? 'Y' : 'N';
+
+            this.$http.post({
+                url: this.formData.id ? '/areaInfo/update' : '/areaInfo/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
                     url: '/areaInfo/del',
                     data: { id: this.formData.id }
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.$router.go(-1);
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
                 })
-            },
-        }
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$router.go(-1);
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+        onDeleteKeyword(index) {
+            console.log("111")
+            this.formData.keyword.splice(index, 1)
+        },
+        addKeyword() {
+            this.formData.keyword.push('')
+            console.log("222")
+        },
     }
+}
 </script>
 <style lang="less" scoped>
 </style>

+ 443 - 546
src/main/vue/src/pages/AreaInfos.vue

@@ -1,25 +1,22 @@
 <template>
     <div>
         <div class="filters-container">
-        
+
             <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
             <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
             </el-button>
-            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
-                       icon="el-icon-search" class="filter-item">高级查询
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small" icon="el-icon-search" class="filter-item">高级查询
             </el-button>
-            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
-                       icon="el-icon-sort" class="filter-item">排序
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
             </el-button>
-            <el-button @click="$router.push({path:'/areaInfo',query:{column:$route.query.column}})" type="primary"
-                       size="small" icon="el-icon-edit"
-                       class="filter-item">添加
+            <el-button @click="$router.push({path:'/areaInfo',query:{column:$route.query.column}})" 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>
             <el-dropdown trigger="click" size="medium" class="table-column-filter">
                 <span>
-                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                    筛选数据
+                    <i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
                     <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
@@ -27,171 +24,83 @@
                 </el-dropdown-menu>
             </el-dropdown>
         </div>
-        <el-table
-                :data="tableData"
-                :height="tableHeight"
-                row-key="id"
-                ref="table">
-            <el-table-column
-                    v-if="multipleMode"
-                    align="center"
-                    type="selection"
-                    width="50">
+        <el-table :data="tableData" :height="tableHeight" 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">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('id')" prop="id" label="" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('cityId')" prop="cityId" label="城市ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('landmarkId')" prop="landmarkId" label="地标ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('areaName')" prop="areaName" label="区域名称" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('rankLevel')" prop="rankLevel" label="优先级" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('allowEdit')" prop="allowEdit" label="允许编辑" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('allowNavigate')" prop="allowNavigate" label="允许导航" min-width="100">
             </el-table-column>
-            <el-table-column
-                    type="index"
-                    min-width="50"
-                    align="center">
+
+            <el-table-column v-if="isColumnShow('publicArea')" prop="publicArea" label="公共区域" min-width="100">
             </el-table-column>
-                            
-                                            <el-table-column
-                                v-if="isColumnShow('id')"
-                                prop="id"
-                                label=""
-                                min-width="100">
-                        </el-table-column>
-                                                                                                                                                                                                                                        
-                                            <el-table-column
-                                v-if="isColumnShow('cityId')"
-                                prop="cityId"
-                                label="城市ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('landmarkId')"
-                                prop="landmarkId"
-                                label="地标ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('areaName')"
-                                prop="areaName"
-                                label="区域名称"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('rankLevel')"
-                                prop="rankLevel"
-                                label="优先级"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('allowEdit')"
-                                prop="allowEdit"
-                                label="允许编辑"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('allowNavigate')"
-                                prop="allowNavigate"
-                                label="允许导航"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('publicArea')"
-                                prop="publicArea"
-                                label="公共区域"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('remark')"
-                                prop="remark"
-                                label="备注"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('icon')"
-                                prop="icon"
-                                label="ICON"
-                                min-width="100">
-                            <template slot-scope="{row}">
-                                <img :src="row.icon" @click="showImg(row.icon)" style="width: 100px;height: 100px;vertical-align: middle;" />
-                            </template>
-
-                        </el-table-column>
-                                                                    
-                                            <el-table-column
-                                v-if="isColumnShow('keyword')"
-                                prop="keyword"
-                                label="关键字"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('video')"
-                                prop="video"
-                                label="视频"
-                                min-width="100">
-                            <template slot-scope="{row}">
-                                <img :src="row.video" @click="showImg(row.video)" style="width: 100px;height: 100px;vertical-align: middle;" />
-                            </template>
-
-                        </el-table-column>
-                                                                    
-                                            <el-table-column
-                                v-if="isColumnShow('textIntroduction')"
-                                prop="textIntroduction"
-                                label="文字介绍"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('url')"
-                                prop="url"
-                                label="官网"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('showDistance')"
-                                prop="showDistance"
-                                label="显示距离"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('templateId')"
-                                prop="templateId"
-                                label="模板ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('frontLevelId')"
-                                prop="frontLevelId"
-                                label="上级ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('blockId')"
-                                prop="blockId"
-                                label="地块ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('areaType')"
-                                prop="areaType"
-                                label="区域类型"
-                                min-width="100">
-                        </el-table-column>
-                                                            <el-table-column
-                    label="操作"
-                    align="center"
-                    fixed="right"
-                    min-width="150"
-            >
+
+            <el-table-column v-if="isColumnShow('remark')" prop="remark" label="备注" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('icon')" prop="icon" label="ICON" min-width="100">
+                <template slot-scope="{row}">
+                    <img :src="row.icon" @click="showImg(row.icon)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                </template>
+
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('keyword')" prop="keyword" label="关键字" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('video')" prop="video" label="视频" min-width="100">
+                <template slot-scope="{row}">
+                    <img :src="row.video" @click="showImg(row.video)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                </template>
+
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('textIntroduction')" prop="textIntroduction" label="文字介绍" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('url')" prop="url" label="官网" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('showDistance')" prop="showDistance" label="显示距离" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('templateId')" prop="templateId" label="模板ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('frontLevelId')" prop="frontLevelId" label="上级ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('blockId')" prop="blockId" label="地块ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('areaType')" prop="areaType" label="区域类型" min-width="100">
+            </el-table-column>
+            <el-table-column label="操作" align="center" fixed="right" min-width="230">
                 <template slot-scope="scope">
-                            <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="$router.push({path:'/areaShowPoints',query:{column:scope.row.id+',areaId'+';'+scope.row.cityId+',cityId'+';'+scope.row.landmarkId+',landmarkId'}})" type="primary" size="small" plain>显示点
+                    </el-button>
+                    <el-button @click="$router.push({path:'/aimGroupInfos',query:{column:scope.row.id+',areaId'+';'+scope.row.cityId+',cityId'+';'+scope.row.landmarkId+',landmarkId'}})" type="primary" size="small" 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>
@@ -205,15 +114,7 @@
                     <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
                 </el-button-group>
             </div>
-            <el-pagination
-                    background
-                    @size-change="pageSizeChange"
-                    @current-change="currentPageChange"
-                    :current-page="currentPage"
-                    :page-sizes="[10, 20, 30, 40, 50]"
-                    :page-size="pageSize"
-                    layout="total, sizes, prev, pager, next, jumper"
-                    :total="totalNumber">
+            <el-pagination background @size-change="pageSizeChange" @current-change="currentPageChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalNumber">
             </el-pagination>
         </div>
         <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
@@ -234,16 +135,14 @@
                     <template slot-scope="{row}">
                         <el-select v-model="row.name">
 
-                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
-                                       :key="item.value"></el-option>
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
                 <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
                     <template slot-scope="{row}">
                         <el-select v-model="row.searchMethod">
-                            <el-option v-for="item in searchMethods" :label="item" :value="item"
-                                       :key="item"></el-option>
+                            <el-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -273,8 +172,7 @@
                     <template slot-scope="{row}">
                         <el-select v-model="row.name">
 
-                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
-                                       :key="item.value"></el-option>
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
                         </el-select>
                     </template>
                 </el-table-column>
@@ -308,396 +206,395 @@
     </div>
 </template>
 <script>
-    import {mapState} from 'vuex'
-    import {format} from 'date-fns'
-    import zh from 'date-fns/locale/zh_cn'
-
-    export default {
-        created() {
+import { mapState } from 'vuex'
+import { format } from 'date-fns'
+import zh from 'date-fns/locale/zh_cn'
+
+export default {
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: '',
+                    value: 'id',
+                    show: true
+                },
+                {
+                    label: '城市ID',
+                    value: 'cityId',
+                    show: true
+                },
+                {
+                    label: '地标ID',
+                    value: 'landmarkId',
+                    show: true
+                },
+                {
+                    label: '区域名称',
+                    value: 'areaName',
+                    show: true
+                },
+                {
+                    label: '优先级',
+                    value: 'rankLevel',
+                    show: true
+                },
+                {
+                    label: '允许编辑',
+                    value: 'allowEdit',
+                    show: true
+                },
+                {
+                    label: '允许导航',
+                    value: 'allowNavigate',
+                    show: true
+                },
+                {
+                    label: '公共区域',
+                    value: 'publicArea',
+                    show: true
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                    show: true
+                },
+                {
+                    label: 'ICON',
+                    value: 'icon',
+                    show: true
+                },
+                {
+                    label: '关键字',
+                    value: 'keyword',
+                    show: true
+                },
+                {
+                    label: '视频',
+                    value: 'video',
+                    show: true
+                },
+                {
+                    label: '文字介绍',
+                    value: 'textIntroduction',
+                    show: true
+                },
+                {
+                    label: '官网',
+                    value: 'url',
+                    show: true
+                },
+                {
+                    label: '显示距离',
+                    value: 'showDistance',
+                    show: true
+                },
+                {
+                    label: '模板ID',
+                    value: 'templateId',
+                    show: true
+                },
+                {
+                    label: '上级ID',
+                    value: 'frontLevelId',
+                    show: true
+                },
+                {
+                    label: '地块ID',
+                    value: 'blockId',
+                    show: true
+                },
+                {
+                    label: '区域类型',
+                    value: 'areaType',
+                    show: true
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: '',
+                    value: 'id'
+                },
+                {
+                    label: '城市ID',
+                    value: 'city_id'
+                },
+                {
+                    label: '地标ID',
+                    value: 'landmark_id'
+                },
+                {
+                    label: '区域名称',
+                    value: 'area_name'
+                },
+                {
+                    label: '优先级',
+                    value: 'rank_level'
+                },
+                {
+                    label: '允许编辑',
+                    value: 'allow_edit'
+                },
+                {
+                    label: '允许导航',
+                    value: 'allow_navigate'
+                },
+                {
+                    label: '公共区域',
+                    value: 'public_area'
+                },
+                {
+                    label: '备注',
+                    value: 'remark'
+                },
+                {
+                    label: 'ICON',
+                    value: 'icon'
+                },
+                {
+                    label: '关键字',
+                    value: 'keyword'
+                },
+                {
+                    label: '视频',
+                    value: 'video'
+                },
+                {
+                    label: '文字介绍',
+                    value: 'text_introduction'
+                },
+                {
+                    label: '官网',
+                    value: 'url'
+                },
+                {
+                    label: '显示距离',
+                    value: 'show_distance'
+                },
+                {
+                    label: '模板ID',
+                    value: 'template_id'
+                },
+                {
+                    label: '上级ID',
+                    value: 'front_level_id'
+                },
+                {
+                    label: '地块ID',
+                    value: 'block_id'
+                },
+                {
+                    label: '区域类型',
+                    value: 'area_type'
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        }
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        }
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
             this.getData();
         },
-        data() {
-            return {
-                totalNumber: 0,
-                totalPage: 10,
-                currentPage: 1,
-                pageSize: 20,
-                tableData: [],
-                filter1: '',
-                filter2: '',
-                tableColumns: [
-                                                                        {
-                                label: '',
-                                value: 'id',
-                                show: true
-                            },
-                                                                                                                                                                                                                                                                                                                                                                        {
-                                label: '城市ID',
-                                value: 'cityId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '地标ID',
-                                value: 'landmarkId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '区域名称',
-                                value: 'areaName',
-                                show: true
-                            },
-                                                                                                {
-                                label: '优先级',
-                                value: 'rankLevel',
-                                show: true
-                            },
-                                                                                                {
-                                label: '允许编辑',
-                                value: 'allowEdit',
-                                show: true
-                            },
-                                                                                                {
-                                label: '允许导航',
-                                value: 'allowNavigate',
-                                show: true
-                            },
-                                                                                                {
-                                label: '公共区域',
-                                value: 'publicArea',
-                                show: true
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark',
-                                show: true
-                            },
-                                                                                                {
-                                label: 'ICON',
-                                value: 'icon',
-                                show: true
-                            },
-                                                                                                {
-                                label: '关键字',
-                                value: 'keyword',
-                                show: true
-                            },
-                                                                                                {
-                                label: '视频',
-                                value: 'video',
-                                show: true
-                            },
-                                                                                                {
-                                label: '文字介绍',
-                                value: 'textIntroduction',
-                                show: true
-                            },
-                                                                                                {
-                                label: '官网',
-                                value: 'url',
-                                show: true
-                            },
-                                                                                                {
-                                label: '显示距离',
-                                value: 'showDistance',
-                                show: true
-                            },
-                                                                                                {
-                                label: '模板ID',
-                                value: 'templateId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '上级ID',
-                                value: 'frontLevelId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '地块ID',
-                                value: 'blockId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '区域类型',
-                                value: 'areaType',
-                                show: true
-                            },
-                                                            ],
-                multipleMode: false,
-                showAdvancedQueryDialog: false,
-                advancedQueryFields: [],
-                showTableSortDialog: false,
-                tableSortFields: [],
-                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
-                advancedQueryColumns: [
-                                                                        {
-                                label: '',
-                                value: 'id'
-                            },
-                                                                                                                                                                                                                                                                                                                                                                        {
-                                label: '城市ID',
-                                value: 'city_id'
-                            },
-                                                                                                {
-                                label: '地标ID',
-                                value: 'landmark_id'
-                            },
-                                                                                                {
-                                label: '区域名称',
-                                value: 'area_name'
-                            },
-                                                                                                {
-                                label: '优先级',
-                                value: 'rank_level'
-                            },
-                                                                                                {
-                                label: '允许编辑',
-                                value: 'allow_edit'
-                            },
-                                                                                                {
-                                label: '允许导航',
-                                value: 'allow_navigate'
-                            },
-                                                                                                {
-                                label: '公共区域',
-                                value: 'public_area'
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark'
-                            },
-                                                                                                {
-                                label: 'ICON',
-                                value: 'icon'
-                            },
-                                                                                                {
-                                label: '关键字',
-                                value: 'keyword'
-                            },
-                                                                                                {
-                                label: '视频',
-                                value: 'video'
-                            },
-                                                                                                {
-                                label: '文字介绍',
-                                value: 'text_introduction'
-                            },
-                                                                                                {
-                                label: '官网',
-                                value: 'url'
-                            },
-                                                                                                {
-                                label: '显示距离',
-                                value: 'show_distance'
-                            },
-                                                                                                {
-                                label: '模板ID',
-                                value: 'template_id'
-                            },
-                                                                                                {
-                                label: '上级ID',
-                                value: 'front_level_id'
-                            },
-                                                                                                {
-                                label: '地块ID',
-                                value: 'block_id'
-                            },
-                                                                                                {
-                                label: '区域类型',
-                                value: 'area_type'
-                            },
-                                                            ],
-                advancedQuerySearchKey: '',
-                orderByStr: '',
-                imgSrc: '',
-                imageDialogVisible: false,
-            }
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
         },
-        computed: {
-            ...mapState(['tableHeight']),
-            selection() {
-                return this.$refs.table.selection.map(i => i.id);
+        getData() {
+
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
             }
-        },
-        methods: {
-            pageSizeChange(size) {
-                this.currentPage = 1;
-                this.pageSize = size;
-                this.getData();
-            },
-            currentPageChange(page) {
-                this.currentPage = page;
-                this.getData();
-            },
-            getData() {
-
-                var data = {
-                    currentPage: this.currentPage,
-                    pageNumber: this.pageSize,
-                    searchKey: this.filter1,
-                    advancedQuery: this.advancedQuerySearchKey,
-                    orderByStr: this.orderByStr,
-                }
 
-                if (this.$route.query.column) {
-                    var tempColumn = this.$route.query.column;
-                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
-                }
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+            }
 
-                this.$http.get({
-                    url: '/areaInfo/page',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.totalNumber = res.data.page.totalNumber;
-                        this.tableData = res.data.pp;
-                    }
-                })
-            },
-            isColumnShow(column) {
-                var row = this.tableColumns.find(i => i.value === column);
-                return row ? row.show : false;
-            },
-            toggleMultipleMode(multipleMode) {
-                this.multipleMode = multipleMode;
-                if (!multipleMode) {
-                    this.$refs.table.clearSelection();
+            this.$http.get({
+                url: '/areaInfo/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.tableData = res.data.pp;
                 }
-            },
-            editRow(row) {
-                this.$router.push({
-                    path: '/areaInfo',
-                    query: {
-                        id: row.id,
-                        column: this.$route.query.column,
-                    }
-                })
-            },
-            operation1() {
-                this.$notify({
-                    title: '提示',
-                    message: this.selection
-                });
-            },
-            operation2() {
-                this.$message('操作2');
-            },
-            addField() {
-                this.advancedQueryFields.push({
-                    link: 'AND',
-                    name: '',
-                    searchMethod: '=',
-                    value: '',
-                });
-            },
-            removeField(i) {
-                if (this.advancedQueryFields.length > 0) {
-                    this.advancedQueryFields.splice(i, 1);
+            })
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/areaInfo',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
                 }
-            },
-            advancedQuery() {
+            })
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
 
-                this.advancedQuerySearchKey = '';
+            this.advancedQuerySearchKey = '';
 
-                if (this.advancedQueryFields.length > 0) {
+            if (this.advancedQueryFields.length > 0) {
 
-                    var templist = [];
+                var templist = [];
 
-                    this.advancedQueryFields.forEach(item => {
-                        if (item.link && item.name && item.searchMethod && item.value) {
-                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
-                            templist.push(tempItem);
-                        }
-                    })
+                this.advancedQueryFields.forEach(item => {
+                    if (item.link && item.name && item.searchMethod && item.value) {
+                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                        templist.push(tempItem);
+                    }
+                })
 
-                    if (templist.length > 0) {
+                if (templist.length > 0) {
 
-                        this.advancedQuerySearchKey = templist.join('_;');
-                    }
+                    this.advancedQuerySearchKey = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showAdvancedQueryDialog = false;
-            },
-            addSortField() {
-                this.tableSortFields.push({
-                    name: '',
-                    order: 'asc',
-                });
-            },
-            removeSortField(i) {
-                if (this.tableSortFields.length > 0) {
-                    this.tableSortFields.splice(i, 1);
-                }
-            },
-            tableSortQuery() {
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
 
-                this.orderByStr = '';
+            this.orderByStr = '';
 
-                if (this.tableSortFields.length > 0) {
+            if (this.tableSortFields.length > 0) {
 
-                    var templist = [];
+                var templist = [];
 
-                    this.tableSortFields.forEach(item => {
-                        if (item.name && item.order) {
-                            var tempItem = item.name + '_,' + item.order;
-                            templist.push(tempItem);
-                        }
-                    })
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                })
 
-                    if (templist.length > 0) {
+                if (templist.length > 0) {
 
-                        this.orderByStr = templist.join('_;');
-                    }
+                    this.orderByStr = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showTableSortDialog = false;
-            },
-            exportExcel() {
-                window.location.href = this.$baseUrl + "/areaInfo/exportExcel?searchKey="
-                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
-            },
-            searchData() {
-                this.currentPage = 1;
-                this.getData();
-            },
-            deleteRow(row) {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
-                    return this.$http.post({
-                        url: '/areaInfo/del',
-                        data: {id: row.id}
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.getData();
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href = this.$baseUrl + "/areaInfo/exportExcel?searchKey="
+                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/areaInfo/del',
+                    data: { id: row.id }
                 })
-            },
-            DateTimeFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.getData();
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
                 }
+            })
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+            }
 
-            },
-            DateFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
-                }
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+            }
 
-            },
-            showImg(img) {
-                this.imgSrc = img;
-                this.imageDialogVisible = true;
-            },
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
 
-        }
     }
+}
 </script>
 <style lang="less" scoped>
-
 </style>

+ 232 - 0
src/main/vue/src/pages/AreaShowPoint.vue

@@ -0,0 +1,232 @@
+<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="cityId" label="城市ID">
+                <template>
+                    <el-select v-model="formData.cityId" clearable placeholder="请选择" :disabled="checkSubColumn('cityId')">
+                        <el-option v-for="item in cityIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item>
+            <el-form-item prop="landmarkId" label="地标ID">
+                <template>
+                    <el-select v-model="formData.landmarkId" clearable placeholder="请选择" :disabled="checkSubColumn('landmarkId')">
+                        <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="areaId" label="区域ID">
+                <template>
+                    <el-select v-model="formData.areaId" clearable placeholder="请选择" :disabled="checkSubColumn('areaId')">
+                        <el-option v-for="item in areaIdOptions" :key="item.value" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item>
+            <el-form-item prop="pointName" label="名称">
+                <el-input v-model="formData.pointName" :disabled="checkSubColumn('pointName')"></el-input>
+            </el-form-item>
+            <el-form-item prop="doorFlag" label="门">
+                <el-switch v-model="formData.doorFlag" active-color="#13ce66" inactive-color="#ff4949" :disabled="checkSubColumn('doorFlag')">
+                </el-switch>
+            </el-form-item>
+            <el-form-item prop="remark" label="备注">
+                <el-input v-model="formData.remark" :disabled="checkSubColumn('remark')"></el-input>
+            </el-form-item>
+            <el-form-item prop="mapX" label="X">
+                <el-input v-model="formData.mapX" :disabled="checkSubColumn('mapX')"></el-input>
+            </el-form-item>
+            <el-form-item prop="mapY" label="Y">
+                <el-input v-model="formData.mapY" :disabled="checkSubColumn('mapY')"></el-input>
+            </el-form-item>
+            <el-form-item prop="mapIndex" label="index">
+                <el-input v-model="formData.mapIndex" :disabled="checkSubColumn('mapIndex')"></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="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import formValidator from '../formValidator'
+
+export default {
+    created() {
+
+        if (this.$route.query.column) {
+
+            var columnList = this.$route.query.column.split(';')
+            columnList.forEach(item => {
+                var tempColumn = item;
+                this.subColumnList.push(tempColumn.split(',')[1]);
+            })
+
+        }
+
+
+        if (this.$route.query.id) {
+            this.$http.get({
+                url: '/areaShowPoint/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
+
+
+                    this.formData = res.data;
+
+
+
+
+                    if (this.$route.query.column) {
+                        var columnList = this.$route.query.column.split(';')
+                        columnList.forEach(item => {
+                            var tempColumn = item;
+                            this.formData[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+                        })
+
+                    }
+
+
+                    this.formData.doorFlag = this.formData.doorFlag == 'Y' ? true : false;
+                }
+            })
+        } else {
+            if (this.$route.query.column) {
+                var columnList = this.$route.query.column.split(';')
+                columnList.forEach(item => {
+                    var tempColumn = item;
+                    this.formData[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+                })
+
+            }
+        }
+
+
+
+
+        this.$http.get({
+            url: '/cityInfo/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.cityIdOptions.push({ label: item.cityName, value: String(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: String(item.id) });
+                    })
+                }
+            }
+        });
+
+
+
+        this.$http.get({
+            url: '/areaInfo/all'
+        }).then(res => {
+            if (res.success) {
+
+                if (res.data.length > 0) {
+                    res.data.forEach(item => {
+                        this.areaIdOptions.push({ label: item.areaName, value: String(item.id) });
+                    })
+                }
+            }
+        });
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {
+                pointName:
+                    [
+                        { required: true, message: '请输入 名称', trigger: 'blur' },
+                    ],
+            },
+            cityIdOptions: [],
+            landmarkIdOptions: [],
+            areaIdOptions: [],
+            subColumn: '',
+            subValue: '',
+            subColumnList: [],
+        }
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+
+            data.doorFlag = this.formData.doorFlag ? 'Y' : 'N';
+
+            this.$http.post({
+                url: this.formData.id ? '/areaShowPoint/update' : '/areaShowPoint/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/areaShowPoint/del',
+                    data: { id: this.formData.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$router.go(-1);
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+        checkSubColumn(value) {
+            if (this.$route.query.column) {
+                if (this.subColumnList.indexOf(value) >= 0) {
+                    return true;
+                }
+
+            }
+            return false;
+        },
+    }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 484 - 0
src/main/vue/src/pages/AreaShowPoints.vue

@@ -0,0 +1,484 @@
+<template>
+    <div>
+        <div class="filters-container">
+
+            <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
+            <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
+            </el-button>
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small" icon="el-icon-search" class="filter-item">高级查询
+            </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:'/areaShowPoint',query:{column:$route.query.column}})" 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>
+            <el-dropdown trigger="click" size="medium" class="table-column-filter">
+                <span>
+                    筛选数据
+                    <i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
+                    <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
+                    </el-checkbox>
+                </el-dropdown-menu>
+            </el-dropdown>
+        </div>
+        <el-table :data="tableData" :height="tableHeight" 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">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('id')" prop="id" label="ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('cityId')" prop="cityId" label="城市ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('landmarkId')" prop="landmarkId" label="地标ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('areaId')" prop="areaId" label="区域ID" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('pointName')" prop="pointName" label="名称" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('doorFlag')" prop="doorFlag" label="门" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('remark')" prop="remark" label="备注" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('mapX')" prop="mapX" label="X" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('mapY')" prop="mapY" label="Y" min-width="100">
+            </el-table-column>
+
+            <el-table-column v-if="isColumnShow('mapIndex')" prop="mapIndex" label="index" min-width="100">
+            </el-table-column>
+            <el-table-column label="操作" align="center" fixed="right" min-width="150">
+                <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>
+        <div class="pagination-wrapper">
+            <div class="multiple-mode-wrapper" v-if="0">
+                <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button size="small" @click="operation1">批量操作1</el-button>
+                    <el-button size="small" @click="operation2">批量操作2</el-button>
+                    <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div>
+            <el-pagination background @size-change="pageSizeChange" @current-change="currentPageChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalNumber">
+            </el-pagination>
+        </div>
+        <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
+            <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="advancedQueryFields">
+
+                <el-table-column prop="link" label="链接符" align="center">
+                    <template slot-scope="{row}">
+                        <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
+                            <el-option label="AND" value="AND">
+                            </el-option>
+                            <el-option label="OR" value="OR">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.searchMethod">
+                            <el-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="value" label="参数" align="center">
+                    <template slot-scope="{row}">
+                        <el-input v-model="row.value"></el-input>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="排序" :visible.sync="showTableSortDialog">
+            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="tableSortFields">
+
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="order" label="排序" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.order">
+                            <el-option label="降序" value="desc">
+                            </el-option>
+                            <el-option label="升序" value="asc">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
+            <img width="100%" :src="imgSrc" alt="">
+        </el-dialog>
+
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex'
+import { format } from 'date-fns'
+import zh from 'date-fns/locale/zh_cn'
+
+export default {
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: 'ID',
+                    value: 'id',
+                    show: true
+                },
+                {
+                    label: '城市ID',
+                    value: 'cityId',
+                    show: true
+                },
+                {
+                    label: '地标ID',
+                    value: 'landmarkId',
+                    show: true
+                },
+                {
+                    label: '区域ID',
+                    value: 'areaId',
+                    show: true
+                },
+                {
+                    label: '名称',
+                    value: 'pointName',
+                    show: true
+                },
+                {
+                    label: '门',
+                    value: 'doorFlag',
+                    show: true
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                    show: true
+                },
+                {
+                    label: 'X',
+                    value: 'mapX',
+                    show: true
+                },
+                {
+                    label: 'Y',
+                    value: 'mapY',
+                    show: true
+                },
+                {
+                    label: 'index',
+                    value: 'mapIndex',
+                    show: true
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: 'ID',
+                    value: 'id'
+                },
+                {
+                    label: '城市ID',
+                    value: 'city_id'
+                },
+                {
+                    label: '地标ID',
+                    value: 'landmark_id'
+                },
+                {
+                    label: '区域ID',
+                    value: 'area_id'
+                },
+                {
+                    label: '名称',
+                    value: 'point_name'
+                },
+                {
+                    label: '门',
+                    value: 'door_flag'
+                },
+                {
+                    label: '备注',
+                    value: 'remark'
+                },
+                {
+                    label: 'X',
+                    value: 'map_x'
+                },
+                {
+                    label: 'Y',
+                    value: 'map_y'
+                },
+                {
+                    label: 'index',
+                    value: 'map_index'
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        }
+    },
+    computed: {
+        ...mapState(['tableHeight']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        }
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
+            this.getData();
+        },
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
+        },
+        getData() {
+
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+            }
+
+            if (this.$route.query.column) {
+                var columnList = this.$route.query.column.split(';')
+                columnList.forEach(item => {
+                    var tempColumn = item;
+                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+                })
+
+            }
+
+            this.$http.get({
+                url: '/areaShowPoint/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.tableData = res.data.pp;
+                }
+            })
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/areaShowPoint',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                }
+            })
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (item.link && item.name && item.searchMethod && item.value) {
+                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                        templist.push(tempItem);
+                    }
+                })
+
+                if (templist.length > 0) {
+
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+
+            this.orderByStr = '';
+
+            if (this.tableSortFields.length > 0) {
+
+                var templist = [];
+
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                })
+
+                if (templist.length > 0) {
+
+                    this.orderByStr = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href = this.$baseUrl + "/areaShowPoint/exportExcel?searchKey="
+                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/areaShowPoint/del',
+                    data: { id: row.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.getData();
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+            }
+
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+            }
+
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+
+    }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 10 - 0
src/main/vue/src/router/index.js

@@ -503,6 +503,16 @@ const router = new Router({
                     path: '/aimGroupInfos',
                     name: 'AimGroupInfos',
                     component: () => import('../pages/AimGroupInfos')
+                },
+                {
+                    path: '/areaShowPoint',
+                    name: 'AreaShowPoint',
+                    component: () => import('../pages/AreaShowPoint')
+                },
+                {
+                    path: '/areaShowPoints',
+                    name: 'AreaShowPoints',
+                    component: () => import('../pages/AreaShowPoints')
                 }
                 /**INSERT_LOCATION**/
             ]

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů