billisme 4 yıl önce
ebeveyn
işleme
e7cdcaf869

+ 9 - 0
src/api/party/member.js

@@ -48,3 +48,12 @@ export const update = (row) => {
   })
 }
 
+export const audit = (row) => {
+  return request({
+    url: '/api/cyzh-smart-party/member/audit',
+    method: 'post',
+    data: row
+  })
+}
+
+

+ 30 - 21
src/views/device/elevatoralarm.vue

@@ -104,26 +104,26 @@ export default {
             // searchSpan: 4,
 
           },
-          {
-            label: "小区",
-            prop: "residentialId",
-            type: "select",
-            hide: true,
-            search: true,
-            searchSpan: 4,
-            searchFilterable: true,
-            // remote: true,
-            //回显的时候有问题,如果所选不在前十条内,下拉框只会显示id
-            dicUrl: "/api/cyzh-community/residential/list?size=1000&name={{key}}",
-            // dicUrl: "/api/community/elevator/elevator/getListWithYtelevatorXq",
-            props:{
-              label: "name",
-              value: "id"
-            },
-            dicFormatter: (res)=>{
-              return res.data.records;
-            },
-          },
+          // {
+          //   label: "小区",
+          //   prop: "residentialId",
+          //   type: "select",
+          //   hide: true,
+          //   search: true,
+          //   searchSpan: 4,
+          //   searchFilterable: true,
+          //   // remote: true,
+          //   //回显的时候有问题,如果所选不在前十条内,下拉框只会显示id
+          //   dicUrl: "/api/cyzh-community/residential/list?size=1000&name={{key}}",
+          //   // dicUrl: "/api/community/elevator/elevator/getListWithYtelevatorXq",
+          //   props:{
+          //     label: "name",
+          //     value: "id"
+          //   },
+          //   dicFormatter: (res)=>{
+          //     return res.data.records;
+          //   },
+          // },
           {
             label: "告警大类",
             prop: "standardType",
@@ -236,6 +236,16 @@ export default {
     }
   },
   props:["registerCode"],
+  created(){
+    const tenantType = localStorage.getItem("tenantType");
+    if (tenantType == 0){
+      let residentialNameProp = this.findObject(this.option.column, "residentialName");
+      residentialNameProp.label = "所属小区"
+    }else if (tenantType == 1){
+      let residentialNameProp = this.findObject(this.option.column, "residentialName");
+      residentialNameProp.label = "所属区域"
+    }
+  },
   methods: {
     videoClose(){
       stopPlay(this.player);
@@ -250,7 +260,6 @@ export default {
           this.videoDetail(videoUrl);
         }
       });
-
     },
     videoDetail(videoUrl){
       let elementId = 'videoAlarm';

+ 37 - 0
src/views/estate/car.vue

@@ -32,6 +32,17 @@
       <!--&lt;!&ndash;        <el-tag type="primary" @click="personClick(scope.row)">{{scope.row.$personId}}</el-tag>&ndash;&gt;-->
       <!--        <el-tag type="primary">{{scope.row.$personId}}</el-tag>-->
       <!--      </template>-->
+      <template slot="auditStatus" scope="{row}">
+        <el-tag v-if="row.auditStatus == 1" type="success">
+          审核通过
+        </el-tag>
+        <el-tag v-else-if="row.auditStatus == -1" type="info">
+          审核不通过
+        </el-tag>
+        <el-tag v-else type="danger">
+          待审核
+        </el-tag>
+      </template>
     </avue-crud>
     <el-dialog title="人员画像" :visible.sync="dialogOpen" :fullscreen="true" :modal-append-to-body="false" center>
       <cy-person-file :personId="personId"></cy-person-file>
@@ -305,6 +316,32 @@
               action: "/api/blade-resource/oss/endpoint/put-file",
               tip: "只能上传jpg/png图片,且不超过500kb"
             },
+            {
+              label: "审核状态",
+              prop: "auditStatus",
+              type: "select",
+              slot: true,
+              dicData:[
+                {
+                  label: "审核通过",
+                  value: 1
+                },
+                {
+                  label: "审核不通过",
+                  value: -1
+                },
+                {
+                  label: "待审核",
+                  value: 0
+                }
+              ],
+              rules: [{
+                required: true,
+                message: "请选择审核状态",
+                trigger: "blur"
+              }],
+              addDisplay: false
+            },
           ]
         },
         data: []

+ 46 - 1
src/views/party/activity.vue

@@ -79,6 +79,9 @@
     props: {
       branchId: {
         type: String
+      },
+      branchName: {
+        type: String
       }
     },
     data() {
@@ -117,6 +120,36 @@
           dialogClickModal: false,
           labelWidth: 120,
           column: [
+            {
+              label: "所属支部",
+              prop: "branchName",
+              editDisplay: false,
+              addDisplay: false,
+              row: true,
+            },
+            {
+              label: "所属支部",
+              prop: "branchId",
+              editDisplay: !this.branchId,
+              addDisplay: !this.branchId,
+              type: "select",
+              hide: true,
+              viewDisplay: false,
+              row: true,
+              dicUrl: "/api/cyzh-smart-party/branch/list?&size=100",
+              dicFormatter: (res)=>{
+                return res.data.records;
+              },
+              props: {
+                label: "branchName",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属支部",
+                trigger: "blur"
+              }]
+            },
             {
               label: "活动名称",
               prop: "name",
@@ -317,7 +350,14 @@
       }
       ,
       rowSave(row, done, loading) {
-        row.branchId = this.branchId;
+        if(!row.branchId){
+          row.branchId = this.branchId;
+        }
+        if(this.branchName){
+          row.branchName = this.branchName;
+        }else{
+          row.branchName = row.$branchId;
+        }
         row.content = btoa(unescape(encodeURIComponent(row.content)));
         row.remainingCount = row.peopleCount;
         add(row).then(() => {
@@ -333,6 +373,11 @@
         });
       },
       rowUpdate(row, index, done, loading) {
+        if(this.branchName){
+          row.branchName = this.branchName;
+        }else{
+          row.branchName = row.$branchId;
+        }
         row.content = btoa(unescape(encodeURIComponent(row.content)));
         update(row).then(() => {
           this.onLoad(this.page);

+ 21 - 18
src/views/party/branch.vue

@@ -27,26 +27,26 @@
                    @click="handleDelete">删 除
         </el-button>
       </template>
-<!--      <template slot="menu" slot-scope="scope">
-        <el-button type="text" size="small" icon="el-icon-setting">
-          <el-dropdown @command="tip">
-            <span class="el-dropdown-link">
-              操作<i class="el-icon-arrow-down el-icon&#45;&#45;right"> </i>
-            </span>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item divided @click.native="detail(scope.row)" icon="el-icon-office-building">详情
-              </el-dropdown-item>
-              <el-dropdown-item divided @click.native="edit(scope.row)" icon="el-icon-school">编辑</el-dropdown-item>
-              <el-dropdown-item divided @click.native="manage(scope.row)" icon="el-icon-s-order">管理</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </el-button>
-      </template>-->
+<!--      <template slot="menu" slot-scope="scope">-->
+<!--        <el-button type="text" size="small" icon="el-icon-setting">-->
+<!--          <el-dropdown @command="tip">-->
+<!--            <span class="el-dropdown-link">-->
+<!--              操作<i class="el-icon-arrow-down el-icon&#45;&#45;right"> </i>-->
+<!--            </span>-->
+<!--            <el-dropdown-menu slot="dropdown">-->
+<!--              <el-dropdown-item divided @click.native="detail(scope.row)" icon="el-icon-office-building">详情-->
+<!--              </el-dropdown-item>-->
+<!--              <el-dropdown-item divided @click.native="edit(scope.row)" icon="el-icon-school">编辑</el-dropdown-item>-->
+<!--              <el-dropdown-item divided @click.native="manage(scope.row)" icon="el-icon-s-order">管理</el-dropdown-item>-->
+<!--            </el-dropdown-menu>-->
+<!--          </el-dropdown>-->
+<!--        </el-button>-->
+<!--      </template>-->
       <template slot="activities" slot-scope="{row}">
         <el-button size="mini" @click="show(row,1)">查看党内活动</el-button>
       </template>
       <template slot="news" slot-scope="{row}">
-        <el-button size="mini" @click="show(row,2)">查看党内咨询</el-button>
+        <el-button size="mini" @click="show(row,2)">查看党内资讯</el-button>
       </template>
       <template slot="meetings" slot-scope="{row}">
         <el-button size="mini" @click="show(row,3)">查看三会一课</el-button>
@@ -54,10 +54,10 @@
     </avue-crud>
 
     <el-drawer :visible.sync="showActivities" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
-      <activity ref="activity" :branch-id="branchId"></activity>
+      <activity ref="activity" :branch-id="branchId" :branch-name="branchName"></activity>
     </el-drawer>
     <el-drawer :visible.sync="showNews" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
-      <newslist ref="newslist" :branch-id="branchId"></newslist>
+      <newslist ref="newslist" :branch-id="branchId" ></newslist>
     </el-drawer>
     <el-drawer :visible.sync="showMeetings" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
       <meetinglist ref="meetinglist" :branch-id="branchId"></meetinglist>
@@ -81,6 +81,7 @@
     data() {
       return {
         branchId: '',
+        branchName: '',
         showActivities: false,
         showNews: false,
         showMeetings: false,
@@ -292,7 +293,9 @@
     },
     methods: {
       show(row, type) {
+        debugger
         this.branchId = row.id;
+        this.branchName = row.branchName;
         this.showParty = true;
         switch (type) {
           case 1:

+ 66 - 30
src/views/party/member.vue

@@ -27,13 +27,25 @@
                    @click="handleDelete">删 除
         </el-button>
       </template>
+      <template slot="auditStatus" scope="{row}">
+        <el-tag v-if="row.auditStatus == 1" type="success">
+          审核通过
+        </el-tag>
+        <el-tag v-else-if="row.auditStatus == -1" type="info">
+          审核不通过
+        </el-tag>
+        <el-tag v-else type="danger">
+          待审核
+        </el-tag>
+      </template>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
-  import {getList, getDetail, add, update, remove} from "@/api/party/member";
+  import {getList, getDetail, add, update, remove, audit} from "@/api/party/member";
   import {mapGetters} from "vuex";
+  import {validatePhone} from "../../util/validator";
 
   export default {
     data() {
@@ -48,6 +60,7 @@
         },
         selectionList: [],
         option: {
+          menuWidth: 300,
           height:'auto',
           calcHeight: 30,
           tip: false,
@@ -90,7 +103,8 @@
               rules: [{
                 required: true,
                 message: "请输入联系方式",
-                trigger: "blur"
+                trigger: "blur",
+                validator: validatePhone
               }]
             },
             {
@@ -147,7 +161,7 @@
                 required: true,
                 message: "请选择党员状态",
                 trigger: "blur"
-              }]
+              }],
             },
             {
               label: "入党时间",
@@ -161,24 +175,6 @@
                 trigger: "blur"
               }]
             },
-            {
-              label: "党员证件",
-              prop: "memberPic",
-              type: "upload",
-              hide: true,
-              listType: "picture-img",
-              action: "/api/blade-resource/oss/endpoint/put-file",
-              propsHttp: {
-                url: "link",
-                res: "data"
-              },
-              type: "upload",
-              rules: [{
-                required: false,
-                message: "请上传党员证件图像",
-                trigger: "blur"
-              }]
-            },
             {
               label: "优秀党员",
               prop: "isExcellent",
@@ -196,16 +192,39 @@
                 }
               ],
               rules: [{
-                required: true,
+                required: false,
                 message: "请选择是否为优秀党员",
                 trigger: "blur"
               }]
             },
+            {
+              label: "党员证件",
+              prop: "memberPic",
+              type: "upload",
+              hide: true,
+              listType: "picture-img",
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              propsHttp: {
+                url: "link",
+                res: "data"
+              },
+              type: "upload",
+              rules: [{
+                required: true,
+                message: "请上传党员证件图像",
+                trigger: "blur"
+              }]
+            },
             {
               label: "审核状态",
               prop: "auditStatus",
               type: "select",
-              dicData: [
+              slot: true,
+              dicData:[
+                {
+                  label: "审核通过",
+                  value: 1
+                },
                 {
                   label: "审核不通过",
                   value: -1
@@ -214,16 +233,13 @@
                   label: "待审核",
                   value: 0
                 },
-                {
-                  label: "审核通过",
-                  value: 1
-                }
               ],
               rules: [{
                 required: true,
                 message: "请选择审核状态",
                 trigger: "blur"
-              }]
+              }],
+              addDisplay: false
             },
             {
               label: "审核意见",
@@ -231,10 +247,11 @@
               hide: true,
               type: "textarea",
               rules: [{
-                required: true,
+                required: false,
                 message: "请输入审核意见",
                 trigger: "blur"
-              }]
+              }],
+              addDisplay: false
             },
           ]
         },
@@ -259,7 +276,26 @@
         return ids.join(",");
       }
     },
+    watch:{
+      "form.auditStatus"(value){
+        let auditOpinionProp = this.findObject(this.option.column, "auditOpinion");
+        if(value == -1){
+          auditOpinionProp.rules[0].required = true;
+        }else{
+          auditOpinionProp.rules[0].required = false;
+        }
+      }
+    },
     methods: {
+      handleAudit(row){
+        audit(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "审核成功!"
+          });
+        });
+      },
       rowSave(row, done, loading) {
         add(row).then(() => {
           this.onLoad(this.page);

+ 8 - 2
src/views/person/basicinfo.vue

@@ -230,7 +230,7 @@
                 required: true,
                 message: "请选择住户类型",
                 trigger: "blur"
-              }]
+              }],
             },
             {
               label: "照片",
@@ -652,7 +652,13 @@
       };
     },
     watch:{
-
+      'form.type'(value){
+        if(value == 0){
+          this.findObject(this.option.column, "idCard").rules[0].required = true;
+        }else{
+          this.findObject(this.option.column, "idCard").rules[0].required = false;
+        }
+      }
     },
 
     computed: {