Jelajahi Sumber

Merge remote-tracking branch 'origin/new_web' into new_web

wangfen 3 tahun lalu
induk
melakukan
86a7cf2506

+ 11 - 4
operationSupport/src/assets/css/main.scss

@@ -447,7 +447,7 @@ a {
     .search-icon {
         float: right;
         i:first-child {
-            margin-right: 20px;
+            margin-right: 0;
         }
     }
     .el-date-editor {
@@ -683,7 +683,7 @@ a {
     -webkit-text-stroke-width: 0.2px;
     -moz-osx-font-smoothing: grayscale;
     cursor: pointer;
-    &.red{
+    &.red {
         color: red;
     }
 }
@@ -709,8 +709,15 @@ a {
         }
     }
 }
-.search .search-icon i.iconfont {
-    @include searchTextBotton;
+.search .search-icon {
+    i.iconfont {
+        margin-right: 20px;
+        @include searchTextBotton;
+    }
+    span.iconfont{
+        margin-right: 20px;
+        @include searchTextBotton;
+    }
 }
 .handle-box,
 .search,

TEMPAT SAMPAH
operationSupport/src/assets/img/btn_bianji.png


TEMPAT SAMPAH
operationSupport/src/assets/img/look_de.png


+ 109 - 0
operationSupport/src/components/common/XKUpload.vue

@@ -0,0 +1,109 @@
+<template>
+  <el-upload
+    class="uploader"
+    action
+    :http-request="formUpload"
+    :show-file-list="false"
+    :before-upload="beforeUpload"
+  >
+    <slot name="content"></slot>
+  </el-upload>
+</template>
+
+<script>
+const fileMatch = {
+  excel: {
+    label: "Excel表格",
+    reg: /\.(xls|xlsx|xlsm)$/,
+    tip: "导入文件只支持.xls、.xlsx或.xlsm格式的Excel"
+  },
+  image: {
+    label: "图片",
+    reg: /\.(png|gif|jpg|jpeg|PNG|GIF|JPG)$/,
+    tip: "导入文件只支持.png、.gif、.jpg或.jpeg格式的图片"
+  }
+};
+export default {
+  name: "xk-upload",
+  props: {
+    actionUrl: {
+      type: String,
+      default() {
+        return "/import/importExcel";
+      }
+    },
+    params: {
+      type: Object,
+      default() {
+        return {};
+      }
+    },
+    fileType: {
+      type: String,
+      default() {
+        return "excel";
+      }
+    },
+    limitSize: {
+      type: Number, // 单位M
+      default() {
+        return 0;
+      }
+    }
+  },
+  methods: {
+    beforeUpload(file) {
+      let currentSize =
+        this.limitSize || this.__CONFIG.upload[`${this.fileType}Size`] || 5;
+      let currentType = fileMatch[this.fileType];
+      const isMatchType = currentType.reg.test(file.name);
+      const isMatchSize = file.size / 1024 / 1024 < currentSize;
+      if (!isMatchType) {
+        this.$message.error(currentType.tip);
+        return false;
+      }
+      if (!isMatchSize) {
+        this.$message.error(
+          `上传${currentType.label}大小不能超过${currentSize}Mb!`
+        );
+        return false;
+      }
+      return isMatchType && isMatchSize;
+    },
+    formUpload(content) {
+      if (!this.actionUrl) {
+        return;
+      }
+      let formData = new FormData();
+      formData.append("file", content.file);
+      _.each(_.keys(this.params), v => {
+        formData.append(v, this.params[v]);
+      });
+      let loading = this.$loading();
+      this.$http
+        .post(this.actionUrl, formData)
+        .then(({ status, msg }) => {
+          loading.close();
+          if (status === 0) {
+            this.$message.success(
+              this.fileType == "excel"
+                ? "上传成功,请稍后在消息查看上传结果"
+                : msg
+            );
+            setTimeout(() => {
+              this.$store.dispatch("getMessageCount");
+              this.$emit("callback");
+            }, 1500);
+          } else {
+            this.$message.error(msg);
+          }
+        })
+        .catch(() => {
+          loading.close();
+        });
+    }
+  }
+};
+</script>
+
+<style></style>

+ 3 - 1
operationSupport/src/components/common/index.js

@@ -16,6 +16,7 @@ import alertModal from './alertModal';
 import organTree from "./organTree";
 import newsearchForm from './newsearch';
 import alramform from './alramform';
+import xkUpload from "./XKUpload";
 // 注册全局组件
 export default {
 	install() {
@@ -29,7 +30,8 @@ export default {
 			MapInit,
 			newsearchForm,
 			alramform,
-			organTree
+			organTree,
+			xkUpload
 	];
 		_.each(components, v => {
 			Vue.component(v.name, v);

+ 9 - 16
operationSupport/src/components/common/organTree.vue

@@ -1,12 +1,5 @@
-<!--
- * @Author: zwy
- * @Date: 2021-01-30 16:17:54
- * @LastEditors: zwy
- * @LastEditTime: 2021-03-11 17:10:40
- * @Descripttion: 
--->
 <template>
-    <div class="organ-tree">
+    <div class="organ-tree aside-box">
         <el-input v-model="filterText" placeholder="请输入机构名称"><i slot="suffix" class="el-icon-search"></i></el-input>
         <div class="tree-style-box">
             <el-scrollbar style="height: 100%">
@@ -36,19 +29,19 @@ export default {
             filterText: '',
             organList: [],
             defaultProps: {
-                children: 'orgs',
-                label: 'orgName'
+                children: 'children',
+                label: 'name'
             }
         };
     },
-    watch:{
+    watch: {
         filterText(val) {
             this.$refs.tree.filter(val);
         }
     },
     methods: {
         getOrgTreeList() {
-            this.$http.postForm('/user-center/org/getOrgUserTree', { orgType: 'company',id:'000'}).then(({ status, data, msg }) => {
+            this.$http.get('/assets/tree/community/find').then(({ status, data, msg }) => {
                 if (status === 0 && data) {
                     this.organList = data;
                     this.$nextTick().then(() => {
@@ -63,8 +56,8 @@ export default {
             return data.orgName.indexOf(value) !== -1;
         },
         treeClick(e) {
-            if (e.id == 0) return;
-            this.$emit('organId',e.id)
+            if (e.value == 0) return;
+            this.$emit('organId', e.value);
         }
     },
     created() {
@@ -74,7 +67,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.organ-tree{
+.organ-tree {
     width: 260px;
     background: #ffffff;
     padding: 20px;
@@ -82,7 +75,7 @@ export default {
     float: left;
     height: 100%;
     .tree-style-box {
-      margin-top: 20px;
+        margin-top: 20px;
     }
 }
 </style>

+ 2 - 1
operationSupport/src/components/common/table.vue

@@ -429,7 +429,8 @@ export default {
             i,
             img {
                 margin-right: 20px;
-
+                width: 14px;
+                height: 14px;
                 &:last-child {
                     margin-right: 0;
                 }

+ 6 - 2
operationSupport/src/router/dynamicMuen.js

@@ -74,8 +74,13 @@ const staticMuen = [
     path: '/ownerManagement/add',
     component: () => import(/* webpackChunkName: "404" */ '@views/ownerManagement/stepPage/add.vue'),
     meta: { title: '编辑住户' }
+  },
+  {
+    path: '/ownerManagement/details',
+    component: () => import(/* webpackChunkName: "404" */ '@views/ownerManagement/details.vue'),
+    meta: { title: '住户详情' }
   }
-
+  
 ]
 //路由格式
 // 自定义路由文件
@@ -98,7 +103,6 @@ const dimension = (arrList, arr) => {
 //添加路由
 const AddRt = (router, dynamicMuenList) => {
   let NEWdynamicMuenList = [...dynamicMuenList, ...staticMuen]
-  debugger;
   if (NEWdynamicMuenList.length !== 0) {
     NEWdynamicMuenList.forEach(item => {
       router.options.routes[0].children.push(item)

+ 56 - 23
operationSupport/src/utils/utils.js

@@ -13,8 +13,8 @@ Vue.prototype.$valid = newValidate;
 //全局混入
 //mix_path为权限前缀
 Vue.mixin({
-  computed:{
-    $add(){
+  computed: {
+    $add() {
       return this.$store.getters["hasPermission"](this.mix_path + ":add")
     },
     $del() {
@@ -24,7 +24,7 @@ Vue.mixin({
       return this.$store.getters["hasPermission"](this.mix_path + ":edit")
     },
     $query() {
-      return this.$store.getters["hasPermission"](this.mix_path +":query")
+      return this.$store.getters["hasPermission"](this.mix_path + ":query")
     },
   }
 })
@@ -37,7 +37,7 @@ Vue.mixin({
  * @return {type}: null
  */
 Vue.prototype.$msgBox = (msg = '', tipMsg = '删除后将无法恢复,是否继续?', type = 'error', params = {}) => new Promise((resolve, reject) => {
- const config = {
+  const config = {
     width: '374px',
     showCancelButton: true,
     confirmButtonText: '确认',
@@ -95,36 +95,69 @@ Vue.prototype.$msgBox = (msg = '', tipMsg = '删除后将无法恢复,是否
    * @param {String} valStr  比对字段
    * @return {Boolean}  返回存在或不存在
    */
- Vue.prototype.__calleArr = function(dataArr,val,valStr){
-  for(let i in dataArr){ 
-      var data=dataArr[i];
-      if(data[valStr]===val){
-        return true;
-      }else{
-          if(data.children){                    
-                this.__calleArr(data.children,val,valStr)
-          }
+Vue.prototype.__calleArr = function (dataArr, val, valStr) {
+  for (let i in dataArr) {
+    var data = dataArr[i];
+    if (data[valStr] === val) {
+      return true;
+    } else {
+      if (data.children) {
+        this.__calleArr(data.children, val, valStr)
       }
+    }
   }
 }
 
 // 确认提示框
-Vue.prototype.__confirm = function(msg = '确认要删除该数据?', title = '提示', settings) {
-	let sets = Object.assign(settings || {}, {
-		cancelButtonClass: 'el-button--medium',
-		confirmButtonClass: 'el-button--medium',
-		dangerouslyUseHTMLString: true,
-	})
+Vue.prototype.__confirm = function (msg = '确认要删除该数据?', title = '提示', settings) {
+  let sets = Object.assign(settings || {}, {
+    cancelButtonClass: 'el-button--medium',
+    confirmButtonClass: 'el-button--medium',
+    dangerouslyUseHTMLString: true,
+  })
   return this.$confirm(`<p class="text_normal bold">${msg}</p>`, title, sets);
 }
 
 /*
 设置弹出组件 datakey 集合下各字段的值,根据params.data
 */
-Vue.prototype.__setValue = function(datakey) {
+Vue.prototype.__setValue = function (datakey) {
   let obj = this[datakey];
-  for(let item in obj) {
+  for (let item in obj) {
     const str = this.params.data[item];
-    obj[item] =  str ? str : _.isNumber(str) ? str : ''
+    obj[item] = str ? str : _.isNumber(str) ? str : ''
+  }
+}
+
+// Excel表格下载
+Vue.prototype.__exportExcel = (
+  url = "Abnormal/getAllAbnormalExcel",
+  params = {},
+  token = localStorage.getItem("SC_token")
+) => {
+  // eslint-disable-next-line no-param-reassign
+  delete params.pageNum;
+  // eslint-disable-next-line no-param-reassign
+  delete params.pageSize;
+  let link;
+  if (document.getElementById("exportATag")) {
+    link = document.getElementById("exportATag");
+  } else {
+    link = document.createElement("a");
+    link.setAttribute("id", "exportATag");
+    link.style.display = "none";
   }
-}
+  const httpReg = /(http|https):\/\/([\w.]+\/?)\S*/;
+  let urlStr = httpReg.test(url) ? `${url}&` : `/sc-community${url}?`;
+  _.mapKeys(params, (val, key) => {
+
+    if (!_.isEmpty(String(val)) && val) {
+      urlStr += `${key}=${val}&`;
+    }
+  });
+
+  link.href = `${urlStr}access_token=${token}`;
+
+  document.body.appendChild(link);
+  link.click();
+};

+ 1 - 1
operationSupport/src/views/alarmManagement/details.vue

@@ -170,7 +170,7 @@ export default {
                 }
                 params = this.mixins_query;
             }
-            this.__exportExcel('/zoniot-water/alarm/details/export', params);       
+            this.__exportExcel('/alarm/details/export', params);       
             // this.$http.get('/alarm/details/export', params).then(({ status, data, msg }) => {
             //     if (status === 0 && data) {
             //         window.location.href = this.envConfig.baseExcelApi + data;

+ 8 - 4
operationSupport/src/views/deviceManagement/index.vue

@@ -24,10 +24,14 @@
                 @selection-change="selectionChange"
             >
                 <template slot-scope="scope" slot="opt">
-                    <i @click="addOrEdit('edit', scope.row)" class="iconfont" style="margin-right: 30px" v-txt-tip data-txt="编辑"
-                        >&#xe645;</i
-                    >
-                    <i @click="deluserbyidFn(scope.row.id)" class="iconfont" style="color: #ff7272" v-txt-tip data-txt="删除">&#xe63a;</i>
+                    <div class="opt">
+                        <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
+                            <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" />
+                        </el-tooltip>
+                        <el-tooltip class="item" effect="light" placement="bottom" content="删除">
+                            <img class="optImg" @click="deluserbyidFn(scope.row.id)" src="@/assets/img/btn_shanchu.png" />
+                        </el-tooltip>
+                    </div>
                 </template>
             </zz-table>
         </div>

+ 10 - 2
operationSupport/src/views/deviceManagement/indexFacilities.vue

@@ -27,10 +27,18 @@
                 @selection-change="selectionChange"
             >
                 <template slot-scope="scope" slot="opt">
-                    <i @click="addOrEdit('edit', scope.row)" class="iconfont" style="margin-right: 30px" v-txt-tip data-txt="编辑"
+                    <!-- <i @click="addOrEdit('edit', scope.row)" class="iconfont" style="margin-right: 30px" v-txt-tip data-txt="编辑"
                         >&#xe645;</i
                     >
-                    <i @click="deluserbyidFn(scope.row.id)" class="iconfont" style="color: #ff7272" v-txt-tip data-txt="删除">&#xe63a;</i>
+                    <i @click="deluserbyidFn(scope.row.id)" class="iconfont" style="color: #ff7272" v-txt-tip data-txt="删除">&#xe63a;</i> -->
+                    <div class="opt">
+                     <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
+                            <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" />
+                        </el-tooltip>
+                        <el-tooltip class="item" effect="light" placement="bottom" content="删除">
+                            <img class="optImg" @click="deluserbyidFn(scope.row.id)" src="@/assets/img/btn_shanchu.png" />
+                        </el-tooltip>
+                    </div>
                 </template>
             </zz-table>
         </div>

+ 12 - 4
operationSupport/src/views/deviceManagement/indexType.vue

@@ -4,14 +4,14 @@
             <el-input placeholder="设施类型" class="search-input" clearable v-model="mixins_query.name"></el-input>
             <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
             <div class="search-icon">
-                <i class="iconfont" @click="deluserbyidsFn" v-txt-tip data-txt="删除">&#xe63b;</i>
+           
                 <i class="iconfont" @click="addOrEdit('add')" v-left-txt-tip data-txt="新增">&#xe641;</i>
             </div>
         </div>
         <div class="roles-wrap">
             <zz-table
                 :cols="cols"
-                :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+                :settings="{ showIndex: true, stripe: true }"
                 :loading="mixins_onQuery"
                 :data="mixins_list"
                 :pageset="mixins_pageset"
@@ -19,10 +19,18 @@
                 @selection-change="selectionChange"
             >
                 <template slot-scope="scope" slot="opt">
-                    <i @click="addOrEdit('edit', scope.row)" class="iconfont" style="margin-right: 30px" v-txt-tip data-txt="编辑"
+                    <!-- <i @click="addOrEdit('edit', scope.row)" class="iconfont" style="margin-right: 30px" v-txt-tip data-txt="编辑"
                         >&#xe645;</i
                     >
-                    <i @click="deluserbyidFn(scope.row.id)" class="iconfont" style="color: #ff7272" v-txt-tip data-txt="删除">&#xe63a;</i>
+                    <i @click="deluserbyidFn(scope.row.id)" class="iconfont" style="color: #ff7272" v-txt-tip data-txt="删除">&#xe63a;</i> -->
+                    <div class="opt">
+                        <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
+                            <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" />
+                        </el-tooltip>
+                        <el-tooltip class="item" effect="light" placement="bottom" content="删除">
+                            <img class="optImg" @click="deluserbyidFn(scope.row.id)" src="@/assets/img/btn_shanchu.png" />
+                        </el-tooltip>
+                    </div>
                 </template>
             </zz-table>
         </div>

+ 260 - 0
operationSupport/src/views/ownerManagement/details.vue

@@ -0,0 +1,260 @@
+<template>
+    <div class="main">
+        <div class="top-title">
+            <h1>{{ detailsData.name }} <span class="titleType">业主</span></h1>
+            <el-button class="right" type="primary" @click="close()">返回</el-button>
+            <div class="text">
+                <span>手机号:{{ detailsData.phone }}</span> <span>身份证号:{{ detailsData.idNumber }}</span>
+            </div>
+        </div>
+        <div class="content">
+            <div class="tages">
+                <div v-for="(item, index) in tabs" :key="index" class="tages-list" :class="tabsIndex === index ? 'active' : ''">
+                    <span @click="toggleTab(index)">{{ item.lable }}</span>
+                </div>
+            </div>
+            <div class="content-item" v-show="tabsIndex === 0">
+                <div class="formContent-item_title">基础信息</div>
+                <div class="widthFlex">
+                    <household-table :tableName="householdTable.left" :tabData="detailsData"></household-table>
+                    <household-table :tableName="householdTable.right" :tabData="detailsData"></household-table>
+                </div>
+            </div>
+            <div class="content-item" v-show="tabsIndex === 1">
+                <div class="widthFlex" v-for="item in 2" :key="item">
+                    <household-table :tableName="houseTable.left" :tabData="detailsData"></household-table>
+                    <household-table :tableName="houseTable.right" :tabData="detailsData"></household-table>
+                </div>
+            </div>
+            <div class="content-item" v-show="tabsIndex === 2">
+                <div class="formContent-item_title">车辆信息</div>
+            </div>
+            <div class="content-item" v-show="tabsIndex === 3">
+                <div class="widthFlex" v-for="item in 3" :key="item">
+                    <household-table :tableName="parkingLotTable.left" :tabData="detailsData"></household-table>
+                    <household-table :tableName="parkingLotTable.right" :tabData="detailsData"></household-table>
+                </div>
+            </div>
+            <div class="content-item" v-show="tabsIndex === 4">
+                <div class="formContent-item_title">人员进出记录</div>
+            </div>
+            <div class="content-item" v-show="tabsIndex === 5">
+                <div class="formContent-item_title">车辆进出记录</div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import householdTable from './stepPage/householdTable.vue';
+export default {
+    components: { householdTable },
+    data() {
+        return {
+            tabsIndex: 0,
+            id: null,
+            detailsData: {},
+            tabs: [
+                {
+                    lable: '住户信息'
+                },
+                {
+                    lable: '房屋信息'
+                },
+                {
+                    lable: '车辆信息'
+                },
+                {
+                    lable: '车位信息'
+                },
+                {
+                    lable: '人员进出记录'
+                },
+                {
+                    lable: '车辆进出记录'
+                }
+            ],
+            householdTable: {
+                left: [
+                    {
+                        lable: '姓名',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '手机号',
+                        prop: 'phone'
+                    },
+                    {
+                        lable: '身份证号',
+                        prop: 'idNumber'
+                    },
+                    {
+                        lable: '出生日期',
+                        prop: 'birthDate'
+                    },
+                    {
+                        lable: '民族',
+                        prop: 'nation'
+                    },
+                    {
+                        lable: '入住时间',
+                        prop: 'checkInDate'
+                    }
+                ],
+                right: [
+                    {
+                        lable: '类型',
+                        prop: 'householdType'
+                    },
+                    {
+                        lable: '人员编号',
+                        prop: 'personnelNumber'
+                    },
+                    {
+                        lable: '性别',
+                        prop: 'sex'
+                    },
+                    {
+                        lable: '国籍',
+                        prop: 'nationality'
+                    },
+                    {
+                        lable: '户籍地址',
+                        prop: 'permanentAddress'
+                    },
+                    {
+                        lable: '现住地址',
+                        prop: ''
+                    }
+                ]
+            },
+            houseTable: {
+                left: [
+                    {
+                        lable: '所属小区',
+                        prop: 'houseId'
+                    },
+                    {
+                        lable: '单元',
+                        prop: 'unitName'
+                    },
+                    {
+                        lable: '房屋号',
+                        prop: 'roomNumber'
+                    },
+                    {
+                        lable: '建筑面积',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '公摊面积',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '装修性质',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '房屋编号',
+                        prop: 'id'
+                    }
+                ],
+                right: [
+                    {
+                        lable: '楼宇名称',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '楼层',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '房屋类型',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '使用面积 ',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '房屋户型',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '房屋朝向',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '',
+                        prop: ''
+                    }
+                ]
+            },
+            parkingLotTable: {
+                left: [
+                    {
+                        lable: '所属小区',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '车库区域',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '车位类型',
+                        prop: 'name'
+                    }
+                ],
+                right: [
+                    {
+                        lable: '车库名称',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '车位编号',
+                        prop: 'name'
+                    },
+                    {
+                        lable: '车位面积',
+                        prop: 'name'
+                    }
+                ]
+            }
+        };
+    },
+    created() {
+        this.id = this.$route.query.id;
+        this.getDetails();
+    },
+    methods: {
+        toggleTab(index) {
+            this.tabsIndex = index;
+        },
+        close() {
+            let activeRout = this.$route;
+            let tagsList = this.$store.getters['getTagsList'];
+            tagsList.forEach((item, index) => {
+                if (item.title == activeRout.meta.title || item.path == activeRout.path) {
+                    tagsList.splice(index, 1);
+                    history.go(-1);
+                    return true;
+                }
+            });
+        },
+        getDetails() {
+            this.$http
+                .get('/scResident/find/' + this.id)
+                .then(({ data, status, msg }) => {
+                    if (0 === status) {
+                        this.detailsData = data;
+                    } else {
+                        this.$message.error(msg);
+                    }
+                })
+                .catch(() => {});
+        }
+    }
+};
+</script>
+<style lang='scss' scoped >
+@import './style.scss';
+</style>

+ 135 - 23
operationSupport/src/views/ownerManagement/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="content main">
-        <organ-tree @organId="currentOrganId"></organ-tree>
-        <div class="content-right">
+        <organ-tree @organId="currentOrganId" v-if="!ownerStatus"></organ-tree>
+        <div class="content-right" v-if="!ownerStatus">
             <div class="search">
                 <el-input
                     clearable
@@ -30,11 +30,35 @@
                     >搜索</el-button
                 >
                 <div class="search-icon">
-                    <i class="iconfont" @click="addOrEdit('add')" v-left-txt-tip data-txt="新增">&#xe641;</i>
+                    <template>
+                        <el-dropdown type="primary" @command="addCommand">
+                            <span class="iconfont">&#xe641;</span>
+                            <el-dropdown-menu slot="dropdown" hide-on-click="false" class="device-search-dropdown">
+                                <el-dropdown-item command="add">单个添加</el-dropdown-item>
+                                <!-- <el-dropdown-item command="batchAdd">
+                                    <xk-upload @callback="mixins_search" :params="{ importType: 7 }">
+                                        <span slot="content">批量添加</span>
+                                    </xk-upload>
+                                </el-dropdown-item> -->
+                                <el-dropdown-item command="template">下载模板</el-dropdown-item>
+                            </el-dropdown-menu>
+                        </el-dropdown>
+                    </template>
+                    <el-tooltip class="item" effect="light" placement="bottom" content="删除">
+                        <i class="iconfont" @click="deluserbyidsFn">&#xe63b;</i>
+                    </el-tooltip>
+                    <el-tooltip class="item" effect="light" placement="bottom" content="导出">
+                        <i class="iconfont" @click="exportExcel">&#xe662;</i>
+                    </el-tooltip>
                 </div>
+                <!-- <div class="search-icon">
+                    <i class="iconfont" @click="deluserbyidsFn" v-txt-tip data-txt="删除">&#xe63b;</i>
+                    <i class="iconfont" @click="addOrEdit('add')" v-left-txt-tip data-txt="新增">&#xe641;</i>
+                    <i class="iconfont" @click="exportExcel" v-txt-tip data-txt="导出">&#xe662;</i>
+                </div> -->
             </div>
             <zz-table
-                :settings="{ showIndex: true }"
+                :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
                 :cols="cols"
                 :loading="mixins_onQuery"
                 :data="mixins_list"
@@ -50,26 +74,36 @@
                 </template>
                 <template slot-scope="scope" slot="opt">
                     <div class="opt">
-                        <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
-                            <span class="zoniot_font" @click="addOrEdit('edit', scope.index)">&#xe689;</span>
+                        <el-tooltip class="item" effect="light" placement="bottom" content="编辑" style="margin-right: 20px">
+                            <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" />
+                        </el-tooltip>
+                        <el-tooltip class="item" effect="light" placement="bottom" content="注销" style="margin-right: 20px">
+                            <img class="optImg" @click="cancellation(scope.row)" src="@/assets/img/btn_baofei.png" />
                         </el-tooltip>
                         <el-tooltip class="item" effect="light" placement="bottom" content="删除">
-                            <span class="zoniot_font red" @click="deleteRow(scope.row)">&#xe673;</span>
+                            <img class="optImg" @click="deleteRow(scope.row)" src="@/assets/img/btn_shanchu.png" />
+                        </el-tooltip>
+                        <el-tooltip class="item" effect="light" placement="bottom" content="查看">
+                            <img class="optImg" @click="lookPage(scope.row)" src="@/assets/img/look_de.png" />
                         </el-tooltip>
                     </div>
                 </template>
             </zz-table>
         </div>
-        
+
+        <add-owner v-else :params="activeData" @clerOwnerStatus="clerOwnerStatus" :isAdd="isAdd"></add-owner>
     </div>
 </template>
 
 <script>
 import list from '@/js/list.js';
+import addOwner from './stepPage/add.vue';
 export default {
     mixins: [list],
+    components: { addOwner },
     data() {
         return {
+            ownerStatus: '',
             statusOptions: [],
             currentId: '',
             cols: [
@@ -79,7 +113,16 @@ export default {
                 },
                 {
                     label: '住户类型',
-                    prop: 'householdType'
+                    prop: 'householdType',
+                    format(val) {
+                        if (val == 1) {
+                            return '业主';
+                        } else if (val == 2) {
+                            return '亲属';
+                        } else if (val == 3) {
+                            return '租客';
+                        }
+                    }
                 },
                 {
                     label: '社区名称',
@@ -100,19 +143,23 @@ export default {
                 {
                     label: '状态',
                     prop: 'residentStatus',
-                    slot: 'residentStatus'
+                    format(val) {
+                        if (val == 1) {
+                            return '在住';
+                        } else {
+                            return '已注销';
+                        }
+                    }
                 },
                 {
                     label: '入住时间',
-                    prop: 'checkInDate',
-
-                    format(val) {
-                        return $numberFormat(val, 2);
-                    }
+                    prop: 'checkInDate'
                 },
                 {
                     label: '操作',
-                    slot: 'id'
+                    prop: 'id',
+                    slot: 'opt',
+                    width: '200'
                 }
             ],
             householdType: [
@@ -138,7 +185,10 @@ export default {
                     status: 1,
                     label: '在住'
                 }
-            ]
+            ],
+            activeData: {},
+            isAdd: true,
+            selectRow: []
         };
     },
     methods: {
@@ -154,18 +204,26 @@ export default {
                 }
             });
         },
-        addOrEdit(todo, index) {
-            this.$router.push({
-                path: '/ownerManagement/add'
-            });
+        clerOwnerStatus() {
+            this.ownerStatus = '';
+            this.activeData = {};
+            this.isAdd = true;
+            this.mixins_search();
+        },
+        addOrEdit(todo, row) {
+            if (todo == 'edit') {
+                this.activeData = row;
+                this.isAdd = false;
+            }
+            this.ownerStatus = todo;
         },
         deleteRow(row) {
             const { name } = row;
-            let title = `您确定要删除支付机构“${name}”`;
+            let title = `您确定要删除住户“${name}”`;
             this.$msgBox(title)
                 .then(() => {
                     this.$http
-                        .putForm('/pay/deletePayPayAgentbranch', { id: row.id })
+                        .postForm('/scResident/delete', { id: row.id })
                         .then(({ status, msg }) => {
                             this.$delete(row, 'onDelete');
                             if (0 === status) {
@@ -181,8 +239,62 @@ export default {
                 })
                 .catch(() => {});
         },
+        lookPage(row) {
+            this.$router.push({
+                path: '/ownerManagement/details',
+                query: {
+                    id: row.id
+                }
+            });
+        },
+        cancellation(row) {
+            const { name } = row;
+            let title = `您确定要注销住户“${name}”`;
+            this.$msgBox(title)
+                .then(() => {
+                    this.$http
+                        .postForm('/scResident/operationResident', { type: 0, id: row.id })
+                        .then(({ status, msg }) => {
+                            if (0 === status) {
+                                this.$message.success(msg);
+                                this.mixins_search('del');
+                            } else {
+                                this.$message.error(msg);
+                            }
+                        })
+                        .catch(() => {});
+                })
+                .catch(() => {});
+        },
         currentOrganId(data) {
             this.currentId = data || '';
+        },
+        selectionChange(val) {
+            this.selectRow = val;
+        },
+        deluserbyidsFn() {
+            //获取选中列表的ids
+            let ids = [];
+            if (!this.selectRow.length) {
+                this.$message.error('您尚未选择要删除的记录,请选择后再操作批量删除');
+                return;
+            }
+            this.selectRow.forEach((v) => {
+                ids.push(v.id);
+            });
+        },
+        addCommand(command) {
+            if (command === 'add') {
+                this.addOrEdit('add');
+                return;
+            }
+            if (command === 'template') {
+                this.__exportExcel('/scResident/downTemplate');
+                return;
+            }
+        },
+        exportExcel() {
+            this.__exportExcel('/scResident/getDataExcel', this.mixins_query);
         }
     },
     watch: {

+ 21 - 24
operationSupport/src/views/ownerManagement/ownerReview/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="main">
-        <div class="search">
+        <div class="search" v-if="!ownerStatus">
             <el-input clearable placeholder="业主姓名" class="search-input" v-trim v-model.trim="mixins_query.name"></el-input>
             <el-select v-model="mixins_query.auditStatus" clearable placeholder="状态">
                 <el-option v-for="(item, index) in auditStatus" :key="index" :label="item.label" :value="item.status">{{
@@ -18,6 +18,7 @@
             >
         </div>
         <zz-table
+            v-if="!ownerStatus"
             :settings="{ showIndex: true }"
             :cols="cols"
             :loading="mixins_onQuery"
@@ -25,12 +26,6 @@
             :pageset="mixins_pageset"
             @page-change="pageChange"
         >
-            <template slot-scope="scope" slot="transactionsNumber">
-                <span v-if="scope.row.transactionsNumber" class="el-link" @click="toTransactionDetails(scope.row)">{{
-                    scope.row.transactionsNumber
-                }}</span>
-                <span v-else>{{ scope.row.transactionsNumber }}</span>
-            </template>
             <template slot-scope="scope" slot="opt">
                 <div class="opt">
                     <el-tooltip class="item" effect="light" placement="bottom" content="审核">
@@ -39,15 +34,21 @@
                 </div>
             </template>
         </zz-table>
+
+        <add-owner v-else :islook="true" :params="activeData" @clerOwnerStatus="clerOwnerStatus"></add-owner>
     </div>
 </template>
 
 <script>
 import list from '@/js/list.js';
+import addOwner from '../stepPage/add.vue';
 export default {
     mixins: [list],
+    components: { addOwner },
     data() {
         return {
+            ownerStatus: false,
+            isAdd: false,
             cols: [
                 {
                     label: '业主姓名',
@@ -75,8 +76,7 @@ export default {
                 },
                 {
                     label: '状态',
-                    prop: 'auditStatus',
-                    slot: 'auditStatus'
+                    prop: 'auditStatus'
                 },
                 {
                     label: '入住时间',
@@ -84,7 +84,8 @@ export default {
                 },
                 {
                     label: '操作',
-                    slot: 'id'
+                    prop: 'id',
+                    slot: 'opt'
                 }
             ],
             auditStatus: [
@@ -100,27 +101,23 @@ export default {
                     status: 2,
                     label: '未通过'
                 }
-            ]
+            ],
+            activeData: {}
         };
     },
     methods: {
-        toTransactionDetails(row) {
-            const { id, type } = row;
-            this.$router.push({
-                name: 'main',
-                query: {
-                    url: '/BillingManage/FinancialManage/ReconciliationManage/TransactionDetails',
-                    agentbranchId: id,
-                    payType: type,
-                    prevName: '支付管理'
-                }
-            });
+        clerOwnerStatus() {
+            this.ownerStatus = '';
+            this.mixins_search();
         },
-        Review(row) {}
+        Review(row) {
+            this.activeData = row;
+            this.ownerStatus = true;
+        }
     },
     created() {
         this.mix_path = ''; // 权限
-        this.mixins_dataUrl = '/scResident/page'; // 分页查询接口
+        this.mixins_dataUrl = '/scResident/audit/page'; // 分页查询接口
         this.mixins_query = {
             questParams: ''
         };

+ 394 - 215
operationSupport/src/views/ownerManagement/stepPage/add.vue

@@ -6,88 +6,84 @@
                 <div class="formContent-item_title">基础信息</div>
                 <div class="formContent-formList">
                     <zz-form :cols="formCols" :data="formData" :rules="formRules" :errors="formErrors" labelWidth="70" ref="form">
-                        <template slot="sex">
-                            <el-radio v-model="formData.sex" :label="0">未知</el-radio>
-                            <el-radio v-model="formData.sex" :label="1">男</el-radio>
-                            <el-radio v-model="formData.sex" :label="2">女</el-radio>
+                        <!-- 查看审核 -->
+                        <template v-if="islooks">
+                            <template slot="name">{{ formData.name }}</template>
+                            <template slot="phone">{{ formData.phone }}</template>
+                            <template slot="personnelNumber">{{ formData.personnelNumber }}</template>
+                            <template slot="sex" v-if="formData.sex === 0">未知</template>
+                            <template slot="sex" v-else>{{ formData.sex === 1 ? '男' : '女' }}</template>
+                            <template slot="remarks">{{ formData.remarks }}</template>
                         </template>
-                        <template slot="remarks">
-                            <el-input type="textarea" v-model="formData.remark" maxlength="50" placeholder="请输入备注"> </el-input>
+                        <!-- 添加编辑 -->
+                        <template v-else>
+                            <template slot="sex">
+                                <el-radio v-model="formData.sex" :label="0">未知</el-radio>
+                                <el-radio v-model="formData.sex" :label="1">男</el-radio>
+                                <el-radio v-model="formData.sex" :label="2">女</el-radio>
+                            </template>
+                            <template slot="remarks">
+                                <el-input type="textarea" v-model="formData.remark" maxlength="50" placeholder="请输入备注"> </el-input>
+                            </template>
                         </template>
                     </zz-form>
-                    <el-upload
-                        :headers="token"
-                        ref="uploaduserlogo"
-                        class="mini-upload"
-                        limit="1"
-                        action="/user-center/user/addUserPhoto"
-                        list-type="picture-card"
-                        :on-success="uploadsuccess"
-                        :auto-upload="true"
-                        name="avatarfile"
-                    >
-                        <i slot="default" class="el-icon-plus"></i>
-                        <div slot="file" slot-scope="{ file }">
-                            <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
-                            <span class="el-upload-list__item-actions">
-                                <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
-                                    <i class="el-icon-delete"></i>
+                    <!-- 查看审核 -->
+                    <template v-if="islooks">图片</template>
+                    <!-- 添加编辑 -->
+                    <template v-else>
+                        <el-upload
+                            :headers="token"
+                            ref="uploaduserlogo"
+                            class="mini-upload"
+                            limit="1"
+                            action="/sc-user-center/user/addMenuImag"
+                            list-type="picture-card"
+                            :on-success="uploadsuccess"
+                            :auto-upload="true"
+                            name="avatarfile"
+                        >
+                            <i slot="default" class="el-icon-plus"></i>
+                            <div slot="file" slot-scope="{ file }">
+                                <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+                                <span class="el-upload-list__item-actions">
+                                    <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+                                        <i class="el-icon-delete"></i>
+                                    </span>
                                 </span>
-                            </span>
-                        </div>
-                    </el-upload>
+                            </div>
+                        </el-upload>
+                    </template>
                 </div>
             </div>
+
             <div class="formContent-item">
                 <div class="formContent-item_title">证件信息</div>
-                <zz-form :cols="formCols2" :data="formData" :rules="formRules" :errors="formErrors" labelWidth="70" ref="form">
-                    <template slot="idType">
-                        <el-select v-model="formData.idType" clearable>
-                            <el-option v-for="(item, index) in idTypeArray" :key="index" :label="item.label" :value="item.status">{{
-                                item.label
-                            }}</el-option>
-                        </el-select>
-                    </template>
-                    <template slot="birthDate">
-                        <el-date-picker
-                            v-model="formData.birthDate"
-                            value-format="yyyy-MM-dd"
-                            type="date"
-                            :picker-options="pickerOptions"
-                            placeholder="选择日期"
-                        >
-                        </el-date-picker>
-                    </template>
-                    <template slot="effectiveDate">
-                        <el-date-picker
-                            v-model="effectiveDate"
-                            value-format="yyyyMMdd"
-                            type="daterange"
-                            range-separator="至"
-                            start-placeholder="选择开始日期"
-                            end-placeholder="选择结束日期"
-                            :picker-options="pickerOptions"
-                            @change="effectiveDateToggle"
-                            :editable="false"
-                        ></el-date-picker>
+                <zz-form :cols="formCols2" :data="formData" :errors="formErrors" labelWidth="70">
+                    <!-- 查看审核 -->
+                    <template v-if="islooks">
+                        <template slot="idType">{{ formData.idType | matchingVal(idTypeArray) }}</template>
+                        <template slot="idNumber">{{ formData.idNumber }}</template>
+                        <template slot="permanentAddress">{{ formData.permanentAddress }}</template>
+                        <template slot="issuingAuthority">{{ formData.issuingAuthority }}</template>
+                        <template slot="effectiveDate">{{ formData.effectiveDateStart + '  ——  ' + formData.effectiveDateStart }}</template>
+                        <template slot="nationality">{{ formData.nationality | matchingVal(nationalityArray) }}</template>
+                        <template slot="nativePlace">{{ formData.nativePlace | matchingVal(nativePlaceArray) }}</template>
+                        <template slot="nation">{{ formData.nation | matchingVal(nationArray) }}</template>
+                        <template slot="birthDate">{{ formData.birthDate }}</template>
                     </template>
-                </zz-form>
-            </div>
-            <div class="formContent-item">
-                <div class="formContent-item_title">绑定房产</div>
-                <div class="formContent-formList" v-for="(item, index) in formData.houseList" :key="index">
-                    <div class="block-title">
-                        <div class="floor list-title">{{ item.houseId }}</div>
-                        <span class="remove list-title" @click="removeHouse(index, 'houseList')">移除</span>
-                        <img class="bg-img" src="@/assets/img/ownerManagement/bg_card@2x.png" alt="" />
-                        <img class="bg-imgIoc" src="@/assets/img/ownerManagement/icon_building@2x.png" alt="" />
-                    </div>
-
-                    <zz-form :cols="formCols3" :data="item" :rules="formRules" :errors="formErrors" labelWidth="70" ref="form">
-                        <template slot="householdType">
-                            <el-select v-model="item.householdType" clearable>
+                    <!-- 添加编辑 -->
+                    <template v-else>
+                        <template slot="idType">
+                            <el-select v-model="formData.idType" clearable>
+                                <el-option v-for="(item, index) in idTypeArray" :key="index" :label="item.label" :value="item.status">{{
+                                    item.label
+                                }}</el-option>
+                            </el-select>
+                        </template>
+                        <template slot="nationality">
+                            <el-select v-model="formData.nationality" clearable>
                                 <el-option
-                                    v-for="(item, index) in householdTypeArray"
+                                    v-for="(item, index) in nationalityArray"
                                     :key="index"
                                     :label="item.label"
                                     :value="item.status"
@@ -95,41 +91,163 @@
                                 >
                             </el-select>
                         </template>
-                        <template slot="checkInDate">
+
+                        <template slot="nativePlace">
+                            <el-select v-model="formData.nativePlace" clearable>
+                                <el-option v-for="(item, index) in nativePlaceArray" :key="index" :label="item.name" :value="item.code">{{
+                                    item.name
+                                }}</el-option>
+                            </el-select>
+                        </template>
+                        <template slot="nation">
+                            <el-select v-model="formData.nation" clearable>
+                                <el-option v-for="(item, index) in nationArray" :key="index" :label="item.name" :value="item.code">{{
+                                    item.name
+                                }}</el-option>
+                            </el-select>
+                        </template>
+
+                        <template slot="birthDate">
                             <el-date-picker
-                                v-model="item.checkInDate"
-                                value-format="yyyy-MM-dd"
+                                v-model="formData.birthDate"
+                                value-format="yyyy-MM-dd HH:mm:ss"
                                 type="date"
                                 :picker-options="pickerOptions"
                                 placeholder="选择日期"
                             >
                             </el-date-picker>
                         </template>
+                        <template slot="effectiveDate">
+                            <el-date-picker
+                                v-model="effectiveDate"
+                                value-format="yyyy-MM-dd HH:mm:ss"
+                                type="daterange"
+                                range-separator="至"
+                                start-placeholder="选择开始日期"
+                                end-placeholder="选择结束日期"
+                                :picker-options="pickerOptions"
+                                @change="effectiveDateToggle"
+                                :editable="false"
+                            ></el-date-picker>
+                        </template>
+                    </template>
+                </zz-form>
+            </div>
+
+            <div class="formContent-item">
+                <div class="formContent-item_title">绑定房产</div>
+                <div class="formContent-formList" v-for="(item, index) in formData.houseList" :key="index">
+                    <div class="block-title">
+                        <div class="floor list-title" v-if="islooks">{{ `${item.buildingName} ${item.unitName}${item.roomNumber}` }}</div>
+                        <div class="floor list-title" v-else>{{ item.name }}</div>
+                        <span class="remove list-title" v-if="!islooks" @click="removeHouse(index, 'houseList')">移除</span>
+                        <img class="bg-img" src="@/assets/img/ownerManagement/bg_card@2x.png" alt="" />
+                        <img class="bg-imgIoc" src="@/assets/img/ownerManagement/icon_building@2x.png" alt="" />
+                    </div>
+
+                    <zz-form :cols="formCols3" :data="item" :rules="formRules" :errors="formErrors" labelWidth="70" ref="form2">
+                        <!-- 查看审核 -->
+                        <template v-if="islooks">
+                            <template slot="householdType">{{ item.householdType | matchingVal(householdTypeArray) }}</template>
+                            <template slot="checkInDate">{{ item.checkInDate }}</template>
+                        </template>
+                        <!-- 添加编辑 -->
+                        <template v-else>
+                            <template slot="householdType">
+                                <el-select v-model="item.householdType" clearable>
+                                    <el-option
+                                        v-for="(item, index) in householdTypeArray"
+                                        :key="index"
+                                        :label="item.label"
+                                        :value="item.status"
+                                        >{{ item.label }}</el-option
+                                    >
+                                </el-select>
+                            </template>
+                            <template slot="checkInDate">
+                                <el-date-picker
+                                    v-model="item.checkInDate"
+                                    value-format="yyyy-MM-dd HH:mm:ss"
+                                    type="date"
+                                    :picker-options="pickerOptions"
+                                    placeholder="选择日期"
+                                >
+                                </el-date-picker> </template
+                        ></template>
                     </zz-form>
                 </div>
 
-                <div class="addHouse add-block" @click="addHouse(1, 'houseList')">
+                <div class="addHouse add-block" v-if="!islooks" @click="addHouse(1, 'houseList')">
                     <img src="@/assets/img/ownerManagement/btn_add@2x.png" />
                 </div>
                 <div class="formContent-item_title">绑定车位</div>
                 <div class="addCat">
                     <div class="block-title" v-for="(item, index) in formData.parkingList" :key="index">
                         <div class="floor list-title">{{ item.parkingId }}</div>
-                        <span class="remove list-title" @click="removeHouse(index, 'parkingList')">移除</span>
+                        <span class="remove list-title" v-show="formData.parkingList.length > 1" @click="removeHouse(index, 'parkingList')"
+                            >移除</span
+                        >
                         <img class="bg-img" src="@/assets/img/ownerManagement/bg_card@2x.png" alt="" />
                         <img class="bg-imgIoc" src="@/assets/img/ownerManagement/icon_car@2x.png" alt="" />
                     </div>
-                    <div class="addHouse add-block" @click="addHouse(2, 'parkingList')">
+                    <div class="addHouse add-block" v-if="!islooks" @click="addHouse(2, 'parkingList')">
                         <img src="@/assets/img/ownerManagement/btn_add@2x.png" />
                     </div>
                 </div>
             </div>
         </div>
+
+        <div class="buttons" v-if="islooks">
+            <el-button @click="closes">取消</el-button>
+            <el-button type="primary" @click="passOK(2)">审核不通过</el-button>
+            <el-button type="primary" @click="passOK(1)">审核通过</el-button>
+        </div>
+        <div class="buttons" v-else>
+            <el-button @click="closes">取消</el-button>
+            <el-button type="primary" @click="addEdit()">保存</el-button>
+        </div>
     </div>
 </template>
 <script>
 export default {
-    props: ['params'],
+    props: {
+        params: {
+            type: Object
+        },
+        islook: {
+            type: Boolean,
+            default: false
+        },
+        isAdd: {
+            type: Boolean,
+            default: true
+        }
+    },
+    computed: {
+        islooks() {
+            if (this.islook) {
+                this.lookFormCols('formCols');
+                this.lookFormCols('formCols2');
+                this.lookFormCols('formCols3');
+            }
+            return this.islook;
+        }
+    },
+    filters: {
+        matchingVal(val, arr) {
+            let v = '';
+            if (!!val) {
+                arr.forEach((item) => {
+                    if (!!item.status && item.status === val) {
+                        v = item.label;
+                    } else if (!!item.code && item.code === val) {
+                        v = item.name;
+                    }
+                });
+            }
+            return v;
+        }
+    },
     data() {
         return {
             token: {
@@ -140,7 +258,7 @@ export default {
                     return +new Date(val) > +new Date();
                 }
             },
-            effectiveDate: '',
+            effectiveDate: [],
             formData: {
                 name: '',
                 phone: '',
@@ -148,34 +266,19 @@ export default {
                 sex: 0,
                 remarks: '',
                 facePictureUrl: '',
-
+                id: 0,
                 idType: '',
                 idNumber: '',
                 permanentAddress: '',
                 issuingAuthority: '',
                 effectiveDateStart: '',
                 effectiveDateEnd: '',
-                nationality: '',
+                nationality: 1,
                 nativePlace: '',
                 nation: '',
                 birthDate: '',
-                houseList: [
-                    {
-                        checkInDate: '',
-                        householdType: '',
-                        houseId: 'sssss'
-                    },
-                    {
-                        checkInDate: '',
-                        householdType: '',
-                        houseId: '9999'
-                    }
-                ],
-                parkingList: [
-                    {
-                        parkingId: 'xxxx'
-                    }
-                ]
+                houseList: [],
+                parkingList: []
             },
             formCols: [
                 [
@@ -242,20 +345,17 @@ export default {
                     {
                         label: '国籍',
                         prop: 'nationality',
-                        slot: 'nationality',
-                        input: true
+                        slot: 'nationality'
                     },
                     {
                         label: '籍贯',
                         prop: 'nativePlace',
-                        slot: 'nativePlace',
-                        input: true
+                        slot: 'nativePlace'
                     },
                     {
                         label: '民族',
                         prop: 'nation',
-                        slot: 'nation',
-                        input: true
+                        slot: 'nation'
                     },
                     {
                         label: '出生日期',
@@ -278,6 +378,18 @@ export default {
                     }
                 ]
             ],
+            nationalityArray: [
+                {
+                    status: 1,
+                    label: '中国'
+                },
+                {
+                    status: 2,
+                    label: '其他'
+                }
+            ],
+            nativePlaceArray: [],
+            nationArray: [],
             idTypeArray: [
                 {
                     status: 1,
@@ -314,10 +426,53 @@ export default {
                 name: [this.$valid.selectRequired('填写姓名')],
                 phone: [this.$valid.selectRequired('填写手机号')],
                 householdType: [this.$valid.selectRequired('填写类型')]
-            }
+            },
+            communityArr: [],
+            garageArr: []
         };
     },
+    created() {
+        if (!!this.params.id) {
+            this.getDetails(this.params.id);
+        }
+        this.getNationArray('nation');
+        this.getNationArray('native');
+        this.getTenantsTree();
+    },
     methods: {
+        getDetails(id) {
+            this.$http
+                .get('/scResident/find/' + id)
+                .then(({ data, status, msg }) => {
+                    if (0 === status) {
+                        const { effectiveDateStart, effectiveDateEnd } = data;
+                        this.effectiveDate = [effectiveDateStart, effectiveDateEnd];
+                        this.formData = data;
+                        console.log(data);
+                    } else {
+                        this.$message.error(msg);
+                    }
+                })
+                .catch(() => {});
+        },
+        getNationArray(type) {
+            this.$http.postForm('/scResident/option', { type: type }).then(({ status, data, msg }) => {
+                if (status === 0 && data) {
+                    if (type == 'nation') {
+                        this.nativePlaceArray = data;
+                    } else if (type == 'native') {
+                        this.nationArray = data;
+                    }
+                }
+            });
+        },
+        lookFormCols(cols) {
+            this[cols][0].forEach((item, index) => {
+                if (!!item.input) {
+                    item.input = false;
+                }
+            });
+        },
         handleRemove(file) {
             this.$refs.uploaduserlogo.clearFiles();
         },
@@ -330,121 +485,145 @@ export default {
             this.formData.effectiveDateStart = va[0];
             this.formData.effectiveDateEnd = va[1];
         },
-        addHouse(num, arr) {
-            let newObj = {};
-            if (num === 1) {
-                newObj = {
-                    checkInDate: '',
-                    householdType: '',
-                    houseId: ''
-                };
-            } else {
-                newObj = {
-                    parkingId: ''
-                };
-            }
-            this.formData[arr].push(newObj);
+        addHouse(num, arr, todo) {
+            new Promise((resolve) => {
+                let title = '',
+                    tenantsTree;
+                if (num === 1) {
+                    title = '选择房产';
+                } else {
+                    title = '选择车位';
+                }
+                if (num === 1) {
+                    tenantsTree = this.communityArr;
+                } else {
+                    debugger;
+                    tenantsTree = this.garageArr;
+                }
+
+                this.$store.dispatch('addPopup', {
+                    url: '/ownerManagement/stepPage/poptreeSelect.vue',
+                    width: '500px',
+                    height: '700px',
+                    props: {
+                        todo,
+                        tenantsTree,
+                        callback: resolve
+                    },
+                    title: title
+                });
+            }).then((res) => {
+                if (res.length > 0) {
+                    res.forEach((item, index) => {
+                        let newObj = {};
+                        if (num === 1) {
+                            newObj = {
+                                checkInDate: '',
+                                householdType: 1,
+                                name: item.name,
+                                houseId: item.value
+                            };
+                        } else {
+                            newObj = {
+                                parkingId: '',
+                                id: ''
+                            };
+                        }
+                        this.formData[arr].push(newObj);
+                    });
+                }
+            });
         },
         removeHouse(index, arr) {
             this.formData[arr].splice(index, 1);
+        },
+        closes() {
+            this.$emit('clerOwnerStatus');
+        },
+        close() {
+            let activeRout = this.$route;
+            let tagsList = this.$store.getters['getTagsList'];
+            tagsList.forEach((item, index) => {
+                if (item.title == activeRout.meta.title || item.path == activeRout.path) {
+                    tagsList.splice(index, 1);
+                    history.go(-1);
+                    return true;
+                }
+            });
+        },
+        addEdit() {
+            let _this = this;
+            new Promise((resolve) => {
+                this.$refs.form.validate();
+                let vali = false;
+                if (
+                    this.$refs.form.$children[0].$children[0].validateState == 'success' &&
+                    this.$refs.form.$children[0].$children[1].validateState == 'success'
+                ) {
+                    vali = true;
+                }
+                this.formData.houseList.forEach((item, index) => {
+                    this.$refs.form2[index].validate();
+                    if (this.$refs.form2[index].$children[0].$children[0].validateState == 'success') {
+                        vali = true;
+                    } else {
+                        vali = false;
+                    }
+                });
+                if (vali) {
+                    resolve();
+                }
+            })
+                .then(() => {
+                    let url = '/scResident/add';
+                    let params = this.formData;
+                    if (!_this.isAdd) {
+                        url = '/scResident/update';
+                    }
+                    this.$http
+                        .post(url, params)
+                        .then(({ status, msg }) => {
+                            if (status == 0) {
+                                this.$message.success(msg);
+                                this.closes();
+                                // this.close();
+                            } else {
+                                this.$message.error(msg);
+                            }
+                        })
+                        .catch(() => {});
+                })
+                .catch(() => {});
+        },
+        passOK(status) {
+            this.$http
+                .get('/scResident/audit', { id: this.params.id, auditStatus: status })
+                .then(({ status, msg }) => {
+                    if (0 === status) {
+                        this.$message.success(msg);
+                        this.closes();
+                        // this.mixins_search('del');
+                    } else {
+                        this.$message.error(msg);
+                    }
+                })
+                .catch(() => {});
+        },
+        getTenantsTree() {
+            this.$http.get('/assets/tree/community/find').then(({ status, data, msg }) => {
+                if (status === 0 && data) {
+                    this.communityArr = data;
+                }
+            });
+            this.$http.get('/assets/tree/garage/find').then(({ status, data, msg }) => {
+                if (status === 0 && data) {
+                    this.garageArr = data;
+                }
+            });
         }
     }
 };
 </script>
 <style lang='scss' scoped >
-@import '@assets/css/public-style.scss';
-.formContent {
-    display: flex;
-    justify-content: space-between;
-    padding: 20px;
-    background: white;
-    .formContent-item {
-        width: calc((100% / 3) - 80px);
-        .formContent-item_title {
-            font-size: 14px;
-            position: relative;
-            margin-left: 14px;
-            margin-bottom: 20px;
-            &::before {
-                position: absolute;
-                left: -14px;
-                top: 4px;
-                width: 4px;
-                height: 12px;
-                border-radius: 2px;
-                display: block;
-                background: $mainBgColor;
-                content: ' ';
-            }
-        }
-        .formContent-formList {
-            display: flex;
-            justify-content: space-between;
-        }
-        .block-title {
-            width: 200px;
-            height: 80px;
-            background: #ffffff;
-            border-radius: 2px;
-            border: 1px solid #e0e1e3;
-            position: relative;
-            .floor {
-                margin: 16px 0 9px 0;
-                font-weight: 600;
-                font-size: 16px;
-            }
-            .remove {
-                color: $mainBgColor;
-                font-size: 12px;
-                cursor: pointer;
-            }
-            .list-title {
-                margin-left: 20px;
-                position: relative;
-                z-index: 2;
-            }
-            img {
-                &.bg-img {
-                    position: absolute;
-                    right: 0;
-                    top: 0;
-                    width: 100px;
-                }
-                &.bg-imgIoc {
-                    position: absolute;
-                    right: 20px;
-                    top: 28px;
-                    width: 24px;
-                }
-            }
-        }
-        .addHouse {
-            margin-bottom: 25px;
-        }
-        .add-block {
-            width: 80px;
-            height: 80px;
-            background: #ffffff;
-            border-radius: 2px;
-            border: 1px solid #e0e1e3;
-            position: relative;
-            cursor: pointer;
-            & > img {
-                width: 16px;
-                height: 16px;
-                position: absolute;
-                top: 50%;
-                left: 50%;
-                transform: translate(-50%, -50%);
-            }
-        }
-        .addCat {
-            & > div {
-                float: left;
-                margin-right: 20px;
-                margin-bottom: 20px;
-            }
-        }
-    }
-}
+@import '../style.scss';
 </style>

+ 36 - 0
operationSupport/src/views/ownerManagement/stepPage/householdTable.vue

@@ -0,0 +1,36 @@
+<template>
+    <div class="item-table">
+        <div class="table-list" v-for="item in tableNames" :key="item">
+            <div class="lable">{{ item.lable }}</div>
+            <div class="text">{{ tabDatas[item.prop] }}</div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    name: 'householdTable',
+    props: {
+        tableName: {
+            type: Array
+        },
+        tabData: {
+            type: Object
+        }
+    },
+    computed: {
+        tableNames() {
+            return this.tableName;
+        },
+        tabDatas() {
+            return this.tabData;
+        }
+    },
+    data() {
+        return {};
+    },
+    created() {}
+};
+</script>
+<style lang='scss' scoped >
+@import '../style.scss';
+</style>

+ 50 - 0
operationSupport/src/views/ownerManagement/stepPage/poptreeSelect.vue

@@ -0,0 +1,50 @@
+<template>
+    <div>
+        <el-scrollbar class="el-scrollbar-byself" style="width: 100%">
+            <el-tree
+                :data="tenantsTree"
+                show-checkbox
+                node-key="value"
+                :current-node-key="currentnodekey"
+                :props="treedefaultProps"
+                ref="tenantstree"
+            >
+            </el-tree>
+        </el-scrollbar>
+    </div>
+</template>
+<script>
+import envConfig from '@/config';
+export default {
+    props: ['params'],
+    data() {
+        return {
+            envConfig: envConfig,
+            token: {
+                [localStorage.getItem('SC_token') && 'Authorization']: 'Bearer ' + localStorage.getItem('SC_token')
+            },
+            // 租户菜单
+            tenantsTree: [],
+            treedefaultProps: {
+                children: 'children',
+                label: 'name'
+            },
+            currentnodekey: [],
+            defaultcheckedkeys: []
+        };
+    },
+    computed: {},
+    mounted() {},
+    methods: {
+        submit() {
+            this.params.callback && this.params.callback(this.$refs.tenantstree.getCheckedNodes());
+            this.$emit('close');
+        }
+    },
+    created() {
+        this.tenantsTree = this.params.tenantsTree;
+        console.log();
+        // this.getAreaList();
+    }
+};
+</script>

+ 184 - 0
operationSupport/src/views/ownerManagement/style.scss

@@ -0,0 +1,184 @@
+@import "@assets/css/public-style.scss";
+.formContent {
+  display: flex;
+  justify-content: space-between;
+  padding: 20px 20px 0 20px;
+  background: white;
+  .formContent-item {
+    width: calc((100% / 3) - 80px);
+    .formContent-formList {
+      display: flex;
+      justify-content: space-between;
+    }
+    .block-title {
+      width: 200px;
+      height: 80px;
+      background: #ffffff;
+      border-radius: 2px;
+      border: 1px solid #e0e1e3;
+      position: relative;
+      .floor {
+        margin: 16px 0 9px 0;
+        font-weight: 600;
+        font-size: 16px;
+      }
+      .remove {
+        color: $mainBgColor;
+        font-size: 12px;
+        cursor: pointer;
+      }
+      .list-title {
+        margin-left: 20px;
+        position: relative;
+        z-index: 2;
+      }
+      img {
+        &.bg-img {
+          position: absolute;
+          right: 0;
+          top: 0;
+          width: 100px;
+        }
+        &.bg-imgIoc {
+          position: absolute;
+          right: 20px;
+          top: 28px;
+          width: 24px;
+        }
+      }
+    }
+    .addHouse {
+      margin-bottom: 25px;
+    }
+    .add-block {
+      width: 80px;
+      height: 80px;
+      background: #ffffff;
+      border-radius: 2px;
+      border: 1px solid #e0e1e3;
+      position: relative;
+      cursor: pointer;
+      & > img {
+        width: 16px;
+        height: 16px;
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+      }
+    }
+    .addCat {
+      & > div {
+        float: left;
+        margin-right: 20px;
+        margin-bottom: 20px;
+      }
+    }
+  }
+}
+.formContent-item_title {
+  font-size: 14px;
+  position: relative;
+  margin-left: 14px;
+  margin-bottom: 20px;
+  &::before {
+    position: absolute;
+    left: -14px;
+    top: 4px;
+    width: 4px;
+    height: 12px;
+    border-radius: 2px;
+    display: block;
+    background: $mainBgColor;
+    content: " ";
+  }
+}
+.buttons {
+  text-align: right;
+  background: white;
+  padding: 0 20px 20px 0;
+}
+.top-title {
+  padding: 20px;
+  background: white;
+  margin-bottom: 20px;
+  position: relative;
+  h1 {
+    font-size: 30px;
+    line-height: 42px;
+  }
+  .right {
+    position: absolute;
+    right: 20px;
+    top: 20px;
+  }
+  .text {
+    margin-top: 10px;
+    font-size: 12px;
+    color: #747d87;
+    span{
+      margin-right: 40px;
+    }
+  }
+}
+
+.content {
+  background: white;
+  .tages {
+    display: flex;
+    padding: 15px 20px;
+    border-bottom: 1px solid #ddd;
+    .tages-list {
+      margin-right: 40px;
+      position: relative;
+      cursor: pointer;
+      &.active {
+        color: $mainTextColor;
+        &::before {
+          position: absolute;
+          left: 0px;
+          bottom: -15px;
+          width: 100%;
+          height: 2px;
+          background: $mainBgColor;
+          content: " ";
+        }
+      }
+    }
+  }
+  .content-item {
+    padding: 30px 20px 20px 20px;
+    .widthFlex {
+      display: flex;
+      margin-bottom: 20px;
+      .item-table {
+        width: 100%;
+        border: 1px solid #e0e1e3;
+        &:first-of-type {
+          border-right: none;
+        }
+        .table-list {
+          display: flex;
+          line-height: 40px;
+
+          border-bottom: 1px solid #e0e1e3;
+          &:last-of-type {
+            border-bottom: none;
+          }
+          .lable {
+            width: 200px;
+            background: #f8fcff;
+            padding-left: 20px;
+            box-sizing: border-box;
+            border-right: 1px solid #e0e1e3;
+          }
+          .text {
+            flex: 1;
+            padding-left: 20px;
+            box-sizing: border-box;
+          }
+        }
+      }
+    }
+  }
+}