Browse Source

创建申请

licailing 5 years ago
parent
commit
010dd487dd

+ 12 - 0
src/main/java/com/izouma/wenlvju/domain/Organization.java

@@ -1,5 +1,6 @@
 package com.izouma.wenlvju.domain;
 package com.izouma.wenlvju.domain;
 
 
+import com.izouma.wenlvju.converter.StringArrayConverter;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
@@ -8,7 +9,9 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 import org.hibernate.annotations.Where;
 import org.hibernate.annotations.Where;
 
 
+import javax.persistence.Convert;
 import javax.persistence.Entity;
 import javax.persistence.Entity;
+import java.util.List;
 
 
 @Data
 @Data
 @AllArgsConstructor
 @AllArgsConstructor
@@ -28,12 +31,21 @@ public class Organization extends BaseEntity {
 
 
     private String district;
     private String district;
 
 
+    @Convert(converter = StringArrayConverter.class)
+    private List<String> district1;
+
+    private String address;
+
     @ApiModelProperty(value = "营业执照")
     @ApiModelProperty(value = "营业执照")
     private String businessLicense;
     private String businessLicense;
 
 
     @ApiModelProperty(value = "负责人")
     @ApiModelProperty(value = "负责人")
     private String owner;
     private String owner;
 
 
+    private String ownerPhone;
+
+    private String ownerEmail;
+
     @ApiModelProperty(value = "法人姓名")
     @ApiModelProperty(value = "法人姓名")
     private String privacyPolicy;
     private String privacyPolicy;
 
 

+ 23 - 11
src/main/java/com/izouma/wenlvju/domain/Rate.java

@@ -5,10 +5,7 @@ import com.izouma.wenlvju.converter.StringArrayConverter;
 import com.izouma.wenlvju.enums.RateStatus;
 import com.izouma.wenlvju.enums.RateStatus;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
+import lombok.*;
 import org.hibernate.annotations.Where;
 import org.hibernate.annotations.Where;
 
 
 import javax.persistence.*;
 import javax.persistence.*;
@@ -23,6 +20,23 @@ import java.util.List;
 @Where(clause = "del = 0")
 @Where(clause = "del = 0")
 @ApiModel(value = "等级评定")
 @ApiModel(value = "等级评定")
 public class Rate extends BaseEntity {
 public class Rate extends BaseEntity {
+    @ApiModelProperty(value = "承办单位名称")
+    private String name;
+
+    @NonNull
+    @ApiModelProperty(value = "负责人")
+    private String owner;
+
+    @NonNull
+    private String ownerPhone;
+
+    @NonNull
+    private String ownerEmail;
+
+    @Convert(converter = StringArrayConverter.class)
+    private List<String> district1;
+
+    @NonNull
     @ApiModelProperty(value = "是否承办考级活动")
     @ApiModelProperty(value = "是否承办考级活动")
     private boolean undertakeExamination;
     private boolean undertakeExamination;
 
 
@@ -30,17 +44,15 @@ public class Rate extends BaseEntity {
     @ApiModelProperty(value = "承办过的考级活动名称")
     @ApiModelProperty(value = "承办过的考级活动名称")
     private List<String> examination;
     private List<String> examination;
 
 
+    @NonNull
     @ApiModelProperty(value = "单位概况")
     @ApiModelProperty(value = "单位概况")
     private String introduction;
     private String introduction;
 
 
-    @Convert(converter = StringArrayConverter.class)
-    private List<String> img;
+//    @Convert(converter = StringArrayConverter.class)
+//    private List<String> img;
 
 
-//    @ApiModelProperty(value = "申请人")
-//    private Long userId;
-
-    @ApiModelProperty(value = "承办单位名称")
-//    private String organizer;
+    @NonNull
+    @ApiModelProperty(value = "承办单位")
     private Long organizationId;
     private Long organizationId;
 
 
     @ApiModelProperty(value = "年度")
     @ApiModelProperty(value = "年度")

+ 4 - 0
src/main/java/com/izouma/wenlvju/dto/OrganizationRegDTO.java

@@ -6,6 +6,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.util.List;
+
 
 
 @Data
 @Data
 @AllArgsConstructor
 @AllArgsConstructor
@@ -28,4 +30,6 @@ public class OrganizationRegDTO {
 
 
     private String businessLicense;
     private String businessLicense;
 
 
+    private List<String> district1;
+
 }
 }

+ 24 - 0
src/main/java/com/izouma/wenlvju/service/OrganizationService.java

@@ -1,7 +1,10 @@
 package com.izouma.wenlvju.service;
 package com.izouma.wenlvju.service;
 
 
+import cn.hutool.core.util.StrUtil;
 import com.izouma.wenlvju.domain.Organization;
 import com.izouma.wenlvju.domain.Organization;
+import com.izouma.wenlvju.domain.Rate;
 import com.izouma.wenlvju.dto.PageQuery;
 import com.izouma.wenlvju.dto.PageQuery;
+import com.izouma.wenlvju.exception.BusinessException;
 import com.izouma.wenlvju.repo.OrganizationRepo;
 import com.izouma.wenlvju.repo.OrganizationRepo;
 import com.izouma.wenlvju.utils.JpaUtils;
 import com.izouma.wenlvju.utils.JpaUtils;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
@@ -17,4 +20,25 @@ public class OrganizationService {
     public Page<Organization> all(PageQuery pageQuery) {
     public Page<Organization> all(PageQuery pageQuery) {
         return organizationRepo.findAll(JpaUtils.toSpecification(pageQuery, Organization.class), JpaUtils.toPageRequest(pageQuery));
         return organizationRepo.findAll(JpaUtils.toSpecification(pageQuery, Organization.class), JpaUtils.toPageRequest(pageQuery));
     }
     }
+
+    public void saveRate(Rate rate) {
+        Organization organization = organizationRepo.findById(rate.getOrganizationId())
+                .orElseThrow(new BusinessException("无承办单位"));
+        boolean flag = false;
+        if (StrUtil.isBlank(organization.getOwner())) {
+            organization.setOwner(rate.getOwner());
+            flag = true;
+        }
+        if (StrUtil.isBlank(organization.getOwnerEmail())) {
+            organization.setOwnerEmail(rate.getOwnerEmail());
+            flag = true;
+        }
+        if (StrUtil.isBlank(organization.getOwnerPhone())) {
+            organization.setOwnerPhone(rate.getOwnerPhone());
+            flag = true;
+        }
+        if (flag) {
+            organizationRepo.save(organization);
+        }
+    }
 }
 }

+ 1 - 0
src/main/java/com/izouma/wenlvju/service/UserService.java

@@ -227,6 +227,7 @@ public class UserService {
                         .businessLicense(dto.getBusinessLicense())
                         .businessLicense(dto.getBusinessLicense())
                         .userId(save.getId())
                         .userId(save.getId())
                         .name(dto.getOrganizationName())
                         .name(dto.getOrganizationName())
+                        .district1(dto.getDistrict1())
                         .build());
                         .build());
 
 
         return user;
         return user;

+ 6 - 3
src/main/java/com/izouma/wenlvju/web/RateController.java

@@ -7,6 +7,7 @@ import com.izouma.wenlvju.enums.RateStatus;
 import com.izouma.wenlvju.exception.BusinessException;
 import com.izouma.wenlvju.exception.BusinessException;
 import com.izouma.wenlvju.repo.OrganizationRepo;
 import com.izouma.wenlvju.repo.OrganizationRepo;
 import com.izouma.wenlvju.repo.RateRepo;
 import com.izouma.wenlvju.repo.RateRepo;
+import com.izouma.wenlvju.service.OrganizationService;
 import com.izouma.wenlvju.service.RateService;
 import com.izouma.wenlvju.service.RateService;
 import com.izouma.wenlvju.utils.ObjUtils;
 import com.izouma.wenlvju.utils.ObjUtils;
 import com.izouma.wenlvju.utils.excel.ExcelUtils;
 import com.izouma.wenlvju.utils.excel.ExcelUtils;
@@ -25,9 +26,10 @@ import java.util.stream.Collectors;
 @RequestMapping("/rate")
 @RequestMapping("/rate")
 @AllArgsConstructor
 @AllArgsConstructor
 public class RateController extends BaseController {
 public class RateController extends BaseController {
-    private RateService      rateService;
-    private RateRepo         rateRepo;
-    private OrganizationRepo organizationRepo;
+    private RateService         rateService;
+    private RateRepo            rateRepo;
+    private OrganizationRepo    organizationRepo;
+    private OrganizationService organizationService;
 
 
     //@PreAuthorize("hasRole('ADMIN')")
     //@PreAuthorize("hasRole('ADMIN')")
     @PostMapping("/save")
     @PostMapping("/save")
@@ -38,6 +40,7 @@ public class RateController extends BaseController {
             return rateRepo.save(orig);
             return rateRepo.save(orig);
         }
         }
         record.setYear(String.valueOf(LocalDate.now().getYear()));
         record.setYear(String.valueOf(LocalDate.now().getYear()));
+        organizationService.saveRate(record);
         return rateRepo.save(record);
         return rateRepo.save(record);
     }
     }
 
 

+ 1 - 1
src/main/java/com/izouma/wenlvju/web/UserController.java

@@ -61,7 +61,7 @@ public class UserController extends BaseController {
         return userService.create(userRegister);
         return userService.create(userRegister);
     }
     }
 
 
-    @PreAuthorize("hasRole('ADMIN')")
+    @PreAuthorize("hasAnyRole('ADMIN,ORGANIZER')")
     @PostMapping("/save")
     @PostMapping("/save")
     public User save(@RequestBody User user) {
     public User save(@RequestBody User user) {
         if (user.getId() != null) {
         if (user.getId() != null) {

+ 87 - 0
src/main/vue/src/components/DistrictChoose copy.vue

@@ -0,0 +1,87 @@
+<template>
+    <div style="display:inline-block">
+        <el-cascader
+            :props="props"
+            filterable
+            v-model="chooseValue"
+            v-if="show"
+            @change="onChange"
+            ref="cascader"
+        ></el-cascader>
+    </div>
+</template>
+<script>
+export default {
+    props: {
+        value: {
+            type: Array
+        },
+        checkStrictly: {
+            type: Boolean,
+            default: false
+        },
+        maxLevel: {}
+    },
+    data() {
+        return {
+            show: true,
+            chooseValue: [],
+            props: {
+                lazy: true,
+                lazyLoad: (node, resolve) => {
+                    const { level } = node;
+                    let params = { size: 10000, query: { level: level } };
+                    if (level === 0) {
+                        params.level = 'PROVINCE';
+                    } else {
+                        params.parent = node.data.id;
+                    }
+                    if (this.maxLevel) {
+                        params.maxLevel = this.maxLevel.toUpperCase();
+                    }
+                    this.$http.get('/district', params).then(res => {
+                        console.log(res.length);
+                        if (res.length === 0) {
+                            this.$set(node, 'isLeaf', true);
+                            node.hasChildren = false;
+                            resolve(null);
+                            return;
+                        }
+                        resolve(res);
+                    });
+                },
+                value: 'id',
+                label: 'name',
+                leaf: 'leaf',
+                checkStrictly: this.checkStrictly
+            },
+            emiting: false
+        };
+    },
+    created() {
+        if (this.value) {
+            this.chooseValue = this.value;
+        }
+    },
+    methods: {
+        onChange(e) {
+            this.emiting = true;
+            this.$emit('input', [...e]);
+            this.$emit('select', this.$refs.cascader.getCheckedNodes());
+            this.$nextTick(() => {
+                this.emiting = false;
+            });
+        }
+    },
+    watch: {
+        value(val) {
+            if (this.emiting) return;
+            this.show = false;
+            this.$nextTick(() => {
+                this.chooseValue = val;
+                this.show = true;
+            });
+        }
+    }
+};
+</script>

+ 8 - 2
src/main/vue/src/components/DistrictChoose.vue

@@ -7,6 +7,7 @@
             v-if="show"
             v-if="show"
             @change="onChange"
             @change="onChange"
             ref="cascader"
             ref="cascader"
+            placeholder="请选择地址"
         ></el-cascader>
         ></el-cascader>
     </div>
     </div>
 </template>
 </template>
@@ -40,7 +41,7 @@ export default {
                         params.maxLevel = this.maxLevel.toUpperCase();
                         params.maxLevel = this.maxLevel.toUpperCase();
                     }
                     }
                     this.$http.get('/district', params).then(res => {
                     this.$http.get('/district', params).then(res => {
-                        console.log(res.length);
+                        // console.log(res.length);
                         if (res.length === 0) {
                         if (res.length === 0) {
                             this.$set(node, 'isLeaf', true);
                             this.$set(node, 'isLeaf', true);
                             node.hasChildren = false;
                             node.hasChildren = false;
@@ -50,7 +51,7 @@ export default {
                         resolve(res);
                         resolve(res);
                     });
                     });
                 },
                 },
-                value: 'id',
+                value: 'name',
                 label: 'name',
                 label: 'name',
                 leaf: 'leaf',
                 leaf: 'leaf',
                 checkStrictly: this.checkStrictly
                 checkStrictly: this.checkStrictly
@@ -85,3 +86,8 @@ export default {
     }
     }
 };
 };
 </script>
 </script>
+<style>
+.el-cascader {
+    width: 100%;
+}
+</style>

+ 19 - 3
src/main/vue/src/router.js

@@ -245,7 +245,7 @@ const router = new Router({
                 {
                 {
                     path: '/rateEdit',
                     path: '/rateEdit',
                     name: 'RateEdit',
                     name: 'RateEdit',
-                    component: () => import(/* webpackChunkName: "rateEdit" */ '@/views/RateEdit.vue'),
+                    component: () => import(/* webpackChunkName: "rateEdit" */ '@/views/organization/RateEdit.vue'),
                     meta: {
                     meta: {
                         title: '评星定级编辑'
                         title: '评星定级编辑'
                     }
                     }
@@ -277,7 +277,8 @@ const router = new Router({
                 {
                 {
                     path: '/organizationInfo',
                     path: '/organizationInfo',
                     name: 'OrganizationInfo',
                     name: 'OrganizationInfo',
-                    component: () => import(/* webpackChunkName: "organizationInfo" */ '@/views/OrganizationInfo.vue'),
+                    component: () =>
+                        import(/* webpackChunkName: "organizationInfo" */ '@/views/organization/OrganizationInfo.vue'),
                     meta: {
                     meta: {
                         title: '基本信息'
                         title: '基本信息'
                     }
                     }
@@ -285,7 +286,8 @@ const router = new Router({
                 {
                 {
                     path: '/organizationEdit',
                     path: '/organizationEdit',
                     name: 'OrganizationEdit',
                     name: 'OrganizationEdit',
-                    component: () => import(/* webpackChunkName: "organizationEdit" */ '@/views/OrganizationEdit.vue'),
+                    component: () =>
+                        import(/* webpackChunkName: "organizationEdit" */ '@/views/organization/OrganizationEdit.vue'),
                     meta: {
                     meta: {
                         title: '承办单位编辑'
                         title: '承办单位编辑'
                     }
                     }
@@ -367,6 +369,20 @@ router.beforeEach((to, from, next) => {
             .get('/user/my')
             .get('/user/my')
             .then(res => {
             .then(res => {
                 store.commit('updateUserInfo', res.data);
                 store.commit('updateUserInfo', res.data);
+                let flag = res.data.authorities.find(item => {
+                    return item.name == 'ROLE_ORGANIZER';
+                });
+                console.log(flag);
+                if (flag) {
+                    http.axios
+                        .get('/organization/getByUserId/' + res.data.id)
+                        .then(index => {
+                            store.commit('updateOrganization', index.data);
+                        })
+                        .catch(() => {
+                            console.log(index.error);
+                        });
+                }
                 next();
                 next();
                 return;
                 return;
             })
             })

+ 5 - 1
src/main/vue/src/store.js

@@ -7,7 +7,8 @@ export default new Vuex.Store({
     state: {
     state: {
         tableHeight: 0,
         tableHeight: 0,
         fetchingData: false,
         fetchingData: false,
-        userInfo: null
+        userInfo: null,
+        organization: null
     },
     },
     mutations: {
     mutations: {
         updateTableHeight(state, height) {
         updateTableHeight(state, height) {
@@ -18,6 +19,9 @@ export default new Vuex.Store({
         },
         },
         updateUserInfo(state, userInfo) {
         updateUserInfo(state, userInfo) {
             state.userInfo = userInfo;
             state.userInfo = userInfo;
+        },
+        updateOrganization(state, organization) {
+            state.organization = organization;
         }
         }
     },
     },
     actions: {}
     actions: {}

+ 4 - 3
src/main/vue/src/views/Login.vue

@@ -29,12 +29,12 @@
                     >
                     >
                         <el-input v-model="registerInfo.organizationName" placeholder="机构名称"> </el-input>
                         <el-input v-model="registerInfo.organizationName" placeholder="机构名称"> </el-input>
                     </el-form-item>
                     </el-form-item>
-                    <!-- <el-form-item
+                    <el-form-item
                         prop="district"
                         prop="district"
                         :rules="{ required: true, message: '请选择注册地址', trigger: 'blur' }"
                         :rules="{ required: true, message: '请选择注册地址', trigger: 'blur' }"
                     >
                     >
                         <district-choose v-model="registerInfo.district"></district-choose>
                         <district-choose v-model="registerInfo.district"></district-choose>
-                    </el-form-item> -->
+                    </el-form-item>
                     <!-- <el-form-item
                     <!-- <el-form-item
                         prop="businessLicense"
                         prop="businessLicense"
                         :rules="{ required: true, message: '请上传营业执照', trigger: 'blur' }"
                         :rules="{ required: true, message: '请上传营业执照', trigger: 'blur' }"
@@ -148,7 +148,8 @@ export default {
             register: false,
             register: false,
             registerInfo: {
             registerInfo: {
                 username: '',
                 username: '',
-                password: ''
+                password: '',
+                businessLicense: ''
             },
             },
             activeName: 'first',
             activeName: 'first',
             time: 0,
             time: 0,

+ 342 - 18
src/main/vue/src/views/Organization.vue

@@ -1,35 +1,359 @@
 <template>
 <template>
     <div class="edit-view">
     <div class="edit-view">
-        <el-tabs v-model="active">
-            <el-tab-pane label="基本信息" name="first"><OrganizationEdit ref="page1" @next="goNext"/></el-tab-pane>
-            <el-tab-pane label="申请信息" name="second"><RateEdit ref="page2"/></el-tab-pane>
-        </el-tabs>
+        <el-form
+            :model="formData"
+            :rules="rules"
+            ref="form"
+            label-width="50px"
+            label-position="right"
+            size="small"
+            style="max-width: 600px;"
+        >
+            <div class="info-content">
+                <div class="info-item">
+                    <div class="name">机构名称</div>
+                    <div class="val">
+                        <el-input v-model="formData.name" placeholder="请输入机构名称"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">负责人</div>
+                    <div class="val">
+                        <el-input v-model="formData.owner" placeholder="请输入负责人"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">负责人邮箱</div>
+                    <div class="val">
+                        <el-input v-model="formData.ownerEmail" placeholder="请输入负责人邮箱"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">负责人电话</div>
+                    <div class="val">
+                        <el-input v-model="formData.ownerPhone" placeholder="请输入负责人电话"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">地址</div>
+                    <div class="val">
+                        <district-choose v-model="formData.district1"></district-choose>
+                    </div>
+                </div>
+
+                <div class="info-item address">
+                    <div class="name">单位概况</div>
+                    <div class="val">
+                        <el-input
+                            type="textarea"
+                            :autosize="{ minRows: 4, maxRows: 6 }"
+                            placeholder="请输入单位概况"
+                            v-model="formData.introduction"
+                        ></el-input>
+                    </div>
+                </div>
+                <div class="info-item address">
+                    <div class="name">考级活动</div>
+                    <div class="val">
+                        <el-radio-group v-model="formData.undertakeExamination" size="small">
+                            <el-radio class="name" :label="true">承办过</el-radio>
+                            <el-radio class="name" :label="false">未承办过</el-radio>
+                        </el-radio-group>
+                    </div>
+                </div>
+                <div class="info-item address" v-if="formData.undertakeExamination">
+                    <div class="name"></div>
+                    <div class="val">
+                        <el-tag
+                            :key="tag"
+                            v-for="tag in formData.examination"
+                            closable
+                            :disable-transitions="false"
+                            @close="handleClose(tag)"
+                            size="medium"
+                            class="el-tag-height"
+                        >
+                            {{ tag }}
+                        </el-tag>
+                        <div>
+                            <el-input
+                                class="input-new-tag"
+                                v-if="inputVisible"
+                                v-model="inputValue"
+                                ref="saveTagInput"
+                                size="small"
+                                @keyup.enter.native="handleInputConfirm"
+                                @blur="handleInputConfirm"
+                            >
+                            </el-input>
+                            <el-button v-else class="button-new-tag" size="small" @click="showInput"
+                                >添加考级活动名称</el-button
+                            >
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="info-content">
+                <div class="info-item address">
+                    <div class="name">法人资格</div>
+                    <div class="val">
+                        <file-upload v-model="formData.privacyPolicy"></file-upload>
+                        <!-- <single-upload v-model="formData.privacyPolicy"></single-upload> -->
+                    </div>
+                </div>
+                <div class="info-item address">
+                    <div class="name">业务内容</div>
+                    <div class="val">
+                        <file-upload v-model="formData.business"></file-upload>
+                    </div>
+                </div>
+                <div class="info-item address">
+                    <div class="name">社会信誉</div>
+                    <div class="val">
+                        <file-upload v-model="formData.credits"></file-upload>
+                    </div>
+                </div>
+            </div>
+            <div class="info-content">
+                <div class="info-item address">
+                    <div class="name">消防卫生</div>
+                    <div class="val">
+                        <file-upload v-model="formData.fire"></file-upload>
+                    </div>
+                </div>
+                <div class="info-item address">
+                    <div class="name">财务报表</div>
+                    <div class="val">
+                        <file-upload v-model="formData.finance"></file-upload>
+                    </div>
+                </div>
+                <div class="info-item address">
+                    <div class="name">房产证明</div>
+                    <div class="val">
+                        <file-upload v-model="formData.property"></file-upload>
+                    </div>
+                </div>
+            </div>
+            <el-form-item>
+                <div style="margin-top: 10px">
+                    <el-button @click="readonly = false" :loading="saving" type="success">提交</el-button>
+                    <el-button @click="onSave" :loading="saving" type="primary">保存</el-button>
+                    <el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id"
+                        >取消申请
+                    </el-button>
+                    <el-button @click="$router.go(-1)">返回</el-button>
+                </div>
+            </el-form-item>
+        </el-form>
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
-import OrganizationEdit from './OrganizationEdit.vue';
-import RateEdit from './RateEdit.vue';
+import { mapState } from 'vuex';
 export default {
 export default {
     name: 'Organization',
     name: 'Organization',
-    created() {},
+    computed: {
+        ...mapState(['organization'])
+    },
+    created() {
+        if (this.$route.query.rateId) {
+            this.$http
+                .get('rate/get/' + this.$route.query.rateId)
+                .then(res => {
+                    this.formData = res;
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$message.error(e.error);
+                });
+        } else if (this.organization != null) {
+            this.formData.name = this.organization.name;
+            this.formData.owner = this.organization.owner;
+            this.formData.ownerEmail = this.organization.ownerEmail;
+            this.formData.ownerPhone = this.organization.ownerPhone;
+            this.formData.district1 = this.organization.district1;
+            this.formData.privacyPolicy.push(this.organization.businessLicense);
+            this.formData.organizationId = this.organization.id;
+        }
+    },
     data() {
     data() {
         return {
         return {
-            active: 'first'
+            formData: {
+                examination: []
+            },
+            inputVisible: false,
+            inputValue: '',
+            saving: false,
+            rules: {
+                name: [{ required: true, message: '请输入机构名称', trigger: 'blur' }],
+                owner: [{ required: true, message: '请输入负责人', trigger: 'blur' }],
+                ownerEmail: [{ required: true, message: '请输入邮箱', trigger: 'blur' }],
+                ownerPhone: [
+                    {
+                        required: true,
+                        pattern: /^1[3-9]\d{9}$/,
+                        message: '请输入手机号',
+                        trigger: 'blur'
+                    }
+                ],
+                introduction: [{ required: true, message: '请输入单位概况', trigger: 'blur' }],
+                undertakeExamination: [{ required: true, message: '请选择是否承办过考级活动', trigger: 'blur' }],
+                privacyPolicy: [
+                    {
+                        required: true,
+                        regexp: /^[_.@A-Za-z0-9-]*$/,
+                        message: '请上传法人资格',
+                        trigger: 'blur'
+                    }
+                ],
+                business: [
+                    {
+                        required: true,
+                        regexp: /^[_.@A-Za-z0-9-]*$/,
+                        message: '请上传业务内容',
+                        trigger: 'blur'
+                    }
+                ],
+                credits: [
+                    {
+                        required: true,
+                        regexp: /^[_.@A-Za-z0-9-]*$/,
+                        message: '请上传社会信誉',
+                        trigger: 'blur'
+                    }
+                ],
+                fire: [
+                    {
+                        required: true,
+                        regexp: /^[_.@A-Za-z0-9-]*$/,
+                        message: '请上传消防卫生',
+                        trigger: 'blur'
+                    }
+                ],
+                finance: [
+                    {
+                        required: true,
+                        regexp: /^[_.@A-Za-z0-9-]*$/,
+                        message: '请上传财务报表',
+                        trigger: 'blur'
+                    }
+                ],
+                property: [
+                    {
+                        required: true,
+                        regexp: /^[_.@A-Za-z0-9-]*$/,
+                        message: '请上传房产证明',
+                        trigger: 'blur'
+                    }
+                ]
+            }
         };
         };
     },
     },
     methods: {
     methods: {
-        goNext(page) {
-            // this.active = page;
-            // this.$refs.page2.init();
-            this.$nextTick(() => {
-                this.activeName = 'second';
+        handleClose(tag) {
+            this.formData.examination.splice(this.formData.examination.indexOf(tag), 1);
+        },
+        showInput() {
+            this.inputVisible = true;
+            this.$nextTick(_ => {
+                this.$refs.saveTagInput.$refs.input.focus();
             });
             });
+        },
+        handleInputConfirm() {
+            let inputValue = this.inputValue;
+            if (inputValue) {
+                this.formData.examination.push(inputValue);
+            }
+            this.inputVisible = false;
+            this.inputValue = '';
+        },
+        onSave(status) {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.submit(status);
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit(status) {
+            let data = { ...this.formData };
+            data.status = status;
+            data.organizationId = this.organizationId;
+            this.saving = true;
+            this.$http
+                .post('/rate/save', data, { body: 'json' })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                    // this.$router.go(-1);
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.$message.error(e.error);
+                });
         }
         }
-    },
-    components: {
-        OrganizationEdit,
-        RateEdit
     }
     }
 };
 };
 </script>
 </script>
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.info-content {
+    background: #f5f7fa;
+    padding: 30px 25px 25px;
+    margin: 2px auto;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+
+    .info-item {
+        width: 50%;
+        display: flex;
+        align-items: center;
+        margin-bottom: 10px;
+
+        &.address {
+            width: 100%;
+            align-items: flex-start;
+            .val {
+                width: 465px;
+            }
+        }
+
+        .name {
+            font-size: 13px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #565b66;
+            line-height: 22px;
+            min-width: 65px;
+            margin-right: 10px;
+            text-align: right;
+        }
+
+        .val {
+            width: 190px;
+        }
+    }
+}
+.el-tag + .el-tag {
+    margin-left: 10px;
+    // margin-bottom: 10px;
+}
+.el-tag-height {
+    line-height: 30px;
+    height: 32px !important;
+    margin-bottom: 10px;
+}
+.button-new-tag {
+    // margin-left: 10px;
+    height: 32px;
+    line-height: 30px;
+    padding-top: 0;
+    padding-bottom: 0;
+}
+.input-new-tag {
+    width: 200px;
+    // margin-left: 10px;
+    vertical-align: bottom;
+}
+</style>

+ 0 - 146
src/main/vue/src/views/OrganizationInfo.vue

@@ -1,146 +0,0 @@
-<template>
-    <div class="edit-view">
-        <el-form
-            :model="formData"
-            :rules="rules"
-            ref="form"
-            label-width="128px"
-            label-position="right"
-            size="small"
-            style="max-width: 500px;"
-        >
-            <el-form-item prop="name" label="名称">
-                <el-input v-model="formData.name" class="size-color"></el-input>
-            </el-form-item>
-            <el-form-item prop="district" label="地址">
-                <el-select v-model="formData.district" clearable filterable placeholder="请选择">
-                    <el-option
-                        v-for="item in districtOptions"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value"
-                    >
-                    </el-option>
-                </el-select>
-            </el-form-item>
-            <el-form-item prop="uscc" label="统一社会信用代码">
-                <el-input v-model="formData.uscc"></el-input>
-            </el-form-item>
-            <el-form-item prop="businessLicense" label="营业执照">
-                <single-upload v-model="formData.businessLicense"></single-upload>
-            </el-form-item>
-            <el-form-item prop="owner" label="负责人">
-                <el-input v-model="formData.owner"></el-input>
-            </el-form-item>
-            <el-form-item prop="privacyPolicy" label="法人姓名">
-                <el-input v-model="formData.privacyPolicy"></el-input>
-            </el-form-item>
-            <el-form-item prop="IDNo" label="证件号码">
-                <el-input v-model="formData.IDNo"></el-input>
-            </el-form-item>
-            <el-form-item>
-                <!-- <el-button @click="readonly = false" :loading="saving" type="success">编辑</el-button> -->
-                <el-button @click="onSave" :loading="saving" type="primary">保存</el-button>
-                <!-- <el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id">删除 </el-button> -->
-                <!-- <el-button @click="$router.go(-1)">取消</el-button> -->
-            </el-form-item>
-        </el-form>
-    </div>
-</template>
-<script>
-import { mapState } from 'vuex';
-export default {
-    name: 'OrganizationInfo',
-    created() {
-        this.$http
-            .get('organization/getByUserId/' + this.userInfo.id)
-            .then(res => {
-                this.formData = res;
-            })
-            .catch(e => {
-                console.log(e);
-                this.$message.error(e.error);
-            });
-
-        this.$http
-            .get('/district/NJ', { size: 1000, query: { del: false } })
-            .then(res => {
-                if (res.length > 0) {
-                    res.forEach(item => {
-                        this.districtOptions.push({
-                            label: item.name,
-                            value: item.name
-                        });
-                    });
-                }
-            })
-            .catch(e => {
-                console.log(e);
-                this.$message.error(e.error);
-            });
-    },
-    data() {
-        return {
-            saving: false,
-            formData: {},
-            rules: {},
-            districtOptions: [],
-            readonly: true
-        };
-    },
-    computed: {
-        ...mapState(['userInfo'])
-    },
-    methods: {
-        onSave() {
-            this.$refs.form.validate(valid => {
-                if (valid) {
-                    this.submit();
-                } else {
-                    return false;
-                }
-            });
-        },
-        submit() {
-            let data = { ...this.formData };
-
-            this.saving = true;
-            this.$http
-                .post('/organization/save', data, { body: 'json' })
-                .then(res => {
-                    this.saving = false;
-                    this.$message.success('成功');
-                    // this.$router.go(-1);
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.saving = false;
-                    this.readonly = true;
-                    this.$message.error(e.error);
-                });
-        },
-        onDelete() {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
-                .then(() => {
-                    return this.$http.post(`/organization/del/${this.formData.id}`);
-                })
-                .then(() => {
-                    this.$message.success('删除成功');
-                    this.$router.go(-1);
-                })
-                .catch(e => {
-                    if (e !== 'cancel') {
-                        console.log(e);
-                        this.$message.error((e || {}).error || '删除失败');
-                    }
-                });
-        }
-    }
-};
-</script>
-<style lang="less" scoped>
-.size-color {
-    color: #606266 !important;
-    background-color: #ffffff;
-}
-</style>

+ 2 - 2
src/main/vue/src/views/RateOrganizerList.vue

@@ -84,7 +84,7 @@ export default {
         selection() {
         selection() {
             return this.$refs.table.selection.map(i => i.id);
             return this.$refs.table.selection.map(i => i.id);
         },
         },
-        ...mapState(['userInfo'])
+        ...mapState(['organization'])
     },
     },
     methods: {
     methods: {
         statusFormatter(row, column, cellValue, index) {
         statusFormatter(row, column, cellValue, index) {
@@ -99,7 +99,7 @@ export default {
                 search: this.search,
                 search: this.search,
                 sort: 'createdAt,desc',
                 sort: 'createdAt,desc',
                 query: {
                 query: {
-                    userId: this.userInfo.id
+                    // organizationId: this.organization.id
                 }
                 }
             };
             };
         },
         },

+ 35 - 0
src/main/vue/src/views/organization/Organization copy.vue

@@ -0,0 +1,35 @@
+<template>
+    <div class="edit-view">
+        <el-tabs v-model="active">
+            <el-tab-pane label="基本信息" name="first"><OrganizationEdit ref="page1" @next="goNext"/></el-tab-pane>
+            <el-tab-pane label="申请信息" name="second"><RateEdit ref="page2"/></el-tab-pane>
+        </el-tabs>
+    </div>
+</template>
+<script>
+import OrganizationEdit from './OrganizationEdit.vue';
+import RateEdit from './RateEdit.vue';
+export default {
+    name: 'Organization',
+    created() {},
+    data() {
+        return {
+            active: 'first'
+        };
+    },
+    methods: {
+        goNext(page) {
+            // this.active = page;
+            // this.$refs.page2.init();
+            this.$nextTick(() => {
+                this.activeName = 'second';
+            });
+        }
+    },
+    components: {
+        OrganizationEdit,
+        RateEdit
+    }
+};
+</script>
+<style lang="less" scoped></style>

+ 76 - 14
src/main/vue/src/views/OrganizationEdit.vue → src/main/vue/src/views/organization/OrganizationEdit.vue

@@ -7,16 +7,19 @@
             label-width="128px"
             label-width="128px"
             label-position="right"
             label-position="right"
             size="small"
             size="small"
-            style="max-width: 500px;"
+            style="max-width: 550px;"
         >
         >
+            <el-form-item prop="businessLicense" label="营业执照">
+                <single-upload v-model="formData.businessLicense"></single-upload>
+            </el-form-item>
             <el-form-item prop="name" label="承办单位名称">
             <el-form-item prop="name" label="承办单位名称">
-                <el-input v-model="formData.name"></el-input>
+                <el-input v-model="formData.name" placeholder="请输入机构名称"></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item prop="uscc" label="统一社会信用代码">
             <el-form-item prop="uscc" label="统一社会信用代码">
-                <el-input v-model="formData.uscc"></el-input>
+                <el-input v-model="formData.uscc" placeholder="请输入统一社会信用代码"></el-input>
             </el-form-item>
             </el-form-item>
-            <el-form-item prop="district" label="">
-                <el-select v-model="formData.district" clearable filterable placeholder="请选择">
+            <el-form-item prop="district" label="地址">
+                <!-- <el-select v-model="formData.district" clearable filterable placeholder="请选择">
                     <el-option
                     <el-option
                         v-for="item in districtOptions"
                         v-for="item in districtOptions"
                         :key="item.value"
                         :key="item.value"
@@ -24,19 +27,24 @@
                         :value="item.value"
                         :value="item.value"
                     >
                     >
                     </el-option>
                     </el-option>
-                </el-select>
-            </el-form-item>
-            <el-form-item prop="businessLicense" label="营业执照">
-                <single-upload v-model="formData.businessLicense"></single-upload>
+                </el-select> -->
+                <district-choose v-model="formData.district1"></district-choose>
+                <el-input
+                    type="textarea"
+                    :autosize="{ minRows: 3, maxRows: 4 }"
+                    style="margin-top: 14px"
+                    placeholder="请输入详细地址"
+                    v-model="formData.address"
+                ></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item prop="owner" label="负责人">
             <el-form-item prop="owner" label="负责人">
-                <el-input v-model="formData.owner"></el-input>
+                <el-input v-model="formData.owner" placeholder="请输入负责人"></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item prop="privacyPolicy" label="法人姓名">
             <el-form-item prop="privacyPolicy" label="法人姓名">
-                <el-input v-model="formData.privacyPolicy"></el-input>
+                <el-input v-model="formData.privacyPolicy" placeholder="请输入法人姓名"></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item prop="IDNo" label="证件号码">
             <el-form-item prop="IDNo" label="证件号码">
-                <el-input v-model="formData.IDNo"></el-input>
+                <el-input v-model="formData.IDNo" placeholder="请输入证件号码"></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item>
             <el-form-item>
                 <el-button @click="onSave" :loading="saving" type="primary" v-if="this.$route.query.organId"
                 <el-button @click="onSave" :loading="saving" type="primary" v-if="this.$route.query.organId"
@@ -50,6 +58,7 @@
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
+import { mapState } from 'vuex';
 export default {
 export default {
     name: 'OrganizationEdit',
     name: 'OrganizationEdit',
     created() {
     created() {
@@ -64,6 +73,9 @@ export default {
                     this.$message.error(e.error);
                     this.$message.error(e.error);
                 });
                 });
         }
         }
+        if (this.organization != null) {
+            this.formData = this.organization;
+        }
         this.$http
         this.$http
             .get('/district/NJ', { size: 1000, query: { del: false } })
             .get('/district/NJ', { size: 1000, query: { del: false } })
             .then(res => {
             .then(res => {
@@ -84,11 +96,22 @@ export default {
     data() {
     data() {
         return {
         return {
             saving: false,
             saving: false,
-            formData: {},
+            formData: {
+                businessLicense: '',
+                name: '',
+                uscc: '',
+                address: '',
+                owner: '',
+                privacyPolicy: '',
+                IDNo: ''
+            },
             rules: {},
             rules: {},
             districtOptions: []
             districtOptions: []
         };
         };
     },
     },
+    computed: {
+        ...mapState(['organization'])
+    },
     methods: {
     methods: {
         onSave() {
         onSave() {
             this.$refs.form.validate(valid => {
             this.$refs.form.validate(valid => {
@@ -165,4 +188,43 @@ export default {
     }
     }
 };
 };
 </script>
 </script>
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.info-content {
+    background: #f5f7fa;
+    padding: 39px 25px 25px;
+    margin: 5px auto;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+
+    .info-item {
+        width: 50%;
+        display: flex;
+        align-items: center;
+        margin-bottom: 10px;
+
+        &.address {
+            width: 100%;
+            align-items: flex-start;
+            .val {
+                width: 465px;
+            }
+        }
+
+        .name {
+            font-size: 13px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #565b66;
+            line-height: 22px;
+            min-width: 60px;
+            margin-right: 10px;
+            text-align: right;
+        }
+
+        .val {
+            width: 190px;
+        }
+    }
+}
+</style>

+ 266 - 0
src/main/vue/src/views/organization/OrganizationInfo.vue

@@ -0,0 +1,266 @@
+<template>
+    <div class="edit-view">
+        <el-form
+            :model="formData"
+            :rules="rules"
+            ref="form"
+            label-width="50px"
+            label-position="right"
+            size="small"
+            style="max-width: 600px;"
+        >
+            <div class="info-content">
+                <div class="info-item">
+                    <div class="name">登陆账号</div>
+                    <div class="val">
+                        <el-input v-model="userInfo.username" placeholder="请输入登陆账号"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">昵称</div>
+                    <div class="val">
+                        <el-input v-model="userInfo.nickname" placeholder="请输入昵称"></el-input>
+                    </div>
+                </div>
+
+                <div class="info-item">
+                    <div class="name">邮箱</div>
+                    <div class="val">
+                        <el-input v-model="userInfo.email" placeholder="请输入邮箱"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">电话</div>
+                    <div class="val">
+                        <el-input v-model="userInfo.phone" placeholder="请输入电话"></el-input>
+                    </div>
+                </div>
+            </div>
+
+            <div class="info-content">
+                <div class="info-item">
+                    <div class="name">机构名称</div>
+                    <div class="val">
+                        <el-input v-model="formData.name" placeholder="请输入机构名称"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">负责人</div>
+                    <div class="val">
+                        <el-input v-model="formData.owner" placeholder="请输入负责人"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">负责人邮箱</div>
+                    <div class="val">
+                        <el-input v-model="formData.ownerEmail" placeholder="请输入负责人邮箱"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">负责人电话</div>
+                    <div class="val">
+                        <el-input v-model="formData.ownerPhone" placeholder="请输入负责人电话"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">法人姓名</div>
+                    <div class="val">
+                        <el-input v-model="formData.privacyPolicy" placeholder="请输入法人姓名"></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">证件号码</div>
+                    <div class="val">
+                        <el-input v-model="formData.IDNo" placeholder="请输入证件号码"></el-input>
+                    </div>
+                </div>
+                <div class="info-item address">
+                    <div class="name">信用代码</div>
+                    <div class="val">
+                        <el-input v-model="formData.uscc" placeholder="请输入统一社会信用代码"></el-input>
+                    </div>
+                </div>
+                <div class="info-item address">
+                    <div class="name">地址</div>
+                    <div class="val">
+                        <district-choose v-model="formData.district1"></district-choose>
+                        <el-input
+                            type="textarea"
+                            :autosize="{ minRows: 3, maxRows: 4 }"
+                            style="margin-top: 14px"
+                            placeholder="请输入详细地址"
+                            v-model="formData.address"
+                        ></el-input>
+                    </div>
+                </div>
+                <div class="info-item">
+                    <div class="name">营业执照</div>
+                    <div class="val">
+                        <single-upload v-model="formData.businessLicense"></single-upload>
+                    </div>
+                </div>
+            </div>
+            <el-form-item>
+                <!-- <el-button @click="readonly = false" :loading="saving" type="success">编辑</el-button> -->
+                <el-button @click="onSave" :loading="saving" type="primary">保存</el-button>
+                <!-- <el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id">删除 </el-button> -->
+                <!-- <el-button @click="$router.go(-1)">取消</el-button> -->
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+export default {
+    name: 'OrganizationInfo',
+    computed: {
+        ...mapState(['userInfo', 'organization'])
+    },
+    created() {
+        // this.$http
+        //     .get('organization/getByUserId/' + this.userInfo.id)
+        //     .then(res => {
+        //         this.formData = res;
+        //     })
+        //     .catch(e => {
+        //         console.log(e);
+        //         this.$message.error(e.error);
+        //     });
+        this.formData = this.organization;
+        this.$http
+            .get('/district/NJ', { size: 1000, query: { del: false } })
+            .then(res => {
+                if (res.length > 0) {
+                    res.forEach(item => {
+                        this.districtOptions.push({
+                            label: item.name,
+                            value: item.name
+                        });
+                    });
+                }
+            })
+            .catch(e => {
+                console.log(e);
+                this.$message.error(e.error);
+            });
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {},
+            districtOptions: [],
+            readonly: true,
+            district: []
+        };
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    this.submit();
+                    this.submitUser();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            let data = { ...this.formData };
+            this.saving = true;
+            this.$http
+                .post('/organization/save', data, { body: 'json' })
+                .then(res => {
+                    this.saving = false;
+                    // this.$message.success('成功');
+                    // this.$router.go(-1);
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.readonly = true;
+                    this.$message.error(e.error);
+                });
+        },
+        submitUser() {
+            let data = { ...this.userInfo };
+            this.saving = true;
+            this.$http
+                .post('/user/save', data, { body: 'json' })
+                .then(res => {
+                    this.saving = false;
+                    this.$message.success('成功');
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.saving = false;
+                    this.readonly = true;
+                    this.$message.error(e.error);
+                });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+                .then(() => {
+                    return this.$http.post(`/organization/del/${this.formData.id}`);
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                })
+                .catch(e => {
+                    if (e !== 'cancel') {
+                        console.log(e);
+                        this.$message.error((e || {}).error || '删除失败');
+                    }
+                });
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+.size-color {
+    color: #606266 !important;
+    background-color: #ffffff;
+}
+.district-width {
+    width: 600px !important;
+}
+.info-content {
+    background: #f5f7fa;
+    padding: 39px 25px 25px;
+    margin: 5px auto;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+
+    .info-item {
+        width: 50%;
+        display: flex;
+        align-items: center;
+        margin-bottom: 10px;
+
+        &.address {
+            width: 100%;
+            align-items: flex-start;
+            .val {
+                width: 465px;
+            }
+        }
+
+        .name {
+            font-size: 13px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #565b66;
+            line-height: 22px;
+            min-width: 65px;
+            margin-right: 10px;
+            text-align: right;
+        }
+
+        .val {
+            width: 190px;
+        }
+    }
+}
+</style>

+ 10 - 3
src/main/vue/src/views/RateEdit.vue → src/main/vue/src/views/organization/RateEdit.vue

@@ -109,6 +109,12 @@ export default {
                     this.$message.error(e.error);
                     this.$message.error(e.error);
                 });
                 });
         }
         }
+        if (this.$route.query.organId) {
+            this.organizationId = Number(this.$route.query.organId);
+        }
+        if (typeof this.organization !== undefined) {
+            this.formData = this.organization;
+        }
     },
     },
     data() {
     data() {
         return {
         return {
@@ -125,11 +131,12 @@ export default {
             ],
             ],
             inputVisible: false,
             inputVisible: false,
             // dynamicTags: [],
             // dynamicTags: [],
-            inputValue: ''
+            inputValue: '',
+            organizationId: ''
         };
         };
     },
     },
     computed: {
     computed: {
-        ...mapState(['userInfo'])
+        ...mapState(['organization'])
     },
     },
     methods: {
     methods: {
         onSave(status) {
         onSave(status) {
@@ -147,7 +154,7 @@ export default {
             // data.organizer = this.userInfo.nickname;
             // data.organizer = this.userInfo.nickname;
             data.status = status;
             data.status = status;
             console.log(status);
             console.log(status);
-            data.organizationId = Number(this.$route.query.organId);
+            data.organizationId = this.organizationId;
             this.saving = true;
             this.saving = true;
             this.$http
             this.$http
                 .post('/rate/save', data, { body: 'json' })
                 .post('/rate/save', data, { body: 'json' })