Browse Source

1、添加支付宝二维码标题;
2、访客列表添加区域

hjs 1 year ago
parent
commit
93222f5daa

+ 1 - 0
.gitignore

@@ -8,6 +8,7 @@ yarn-error.log*
 package-lock.json
 tests/**/coverage/
 back.zip
+back.rar
 
 # Editor directories and files
 .idea

BIN
back.rar


BIN
back.zip


+ 1 - 1
public/config.js

@@ -1,5 +1,5 @@
 window.g = {
   ApiUrl: 'https://tx.hz-hanghui.com:8088/yx-fyzd', //塘栖
-  // ApiUrl: 'http://192.168.11.17:9100/yx-fyzd', //塘栖本地
+  // ApiUrl: 'http://192.168.11.3:9100/yx-fyzd', //塘栖本地
 
 }

+ 11 - 0
src/api/visitee.js

@@ -24,3 +24,14 @@ export function deleteByIds(ids) {
     data: ids
   })
 }
+
+// 删除删选区域
+export function deletes(data) {
+  return request({
+    url: '/admin/fkj/visitee/batch/del',
+    method: 'post',
+    data: {
+      data
+    }
+  })
+}

+ 149 - 99
src/views/QRCode/index.vue

@@ -1,99 +1,145 @@
 <template>
   <div class="bg">
     <div class="container" v-if="placeType === 2 && role == 5">
-      <div class="app-container">
-        <div class="title">{{ qrcodeTitle }}-微信</div>
-        <div class="flex-center">
-          <img
-            class="qrcode"
-            src="../../assets/buildingCode.png"
-            alt="加载失败"
-          />
-        </div>
-      </div>
-      <div class="app-container">
-        <div class="title">{{ qrcodeTitle }}-支付宝</div>
-        <div class="flex-center">
-          <img
-            class="qrcode"
-            src="../../assets/zfbBuildingCode.jpg"
-            alt="加载失败"
-          />
-        </div>
-      </div>
+      <el-row :gutter="210">
+        <el-col :span="8">
+          <div class="app-container">
+            <div class="title">{{ qrcodeTitle }}-微信</div>
+            <div class="flex-center">
+              <el-image
+                class="qrcode"
+                src="../../assets/buildingCode.png"
+                alt="加载失败"
+              />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container">
+            <div class="title">{{ qrcodeTitle }}-支付宝</div>
+            <div class="flex-center">
+              <el-image
+                class="qrcode"
+                src="../../assets/zfbBuildingCode.jpg"
+                alt="加载失败"
+              />
+            </div>
+          </div>
+        </el-col>
+      </el-row>
     </div>
 
     <!-- 普通场景 -->
     <div class="container" v-if="genericCode || regularCode || zfbGenericCode || zfbRegularCode">
-      <div class="app-container" v-if="genericCode">
-        <div class="title">{{ qrcodeTitle }} - 微信通用码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="genericCode" alt="加载失败" />
-        </div>
-      </div>
-      <div class="app-container" v-if="regularCode">
-        <div class="title">{{ qrcodeTitle }} - 微信员工码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="regularCode" alt="加载失败" />
-        </div>
-      </div>
-      <div class="app-container" v-if="zfbGenericCode">
-        <div class="title">{{ qrcodeTitle }} - 支付宝通用码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="zfbGenericCode" alt="加载失败"/>
-        </div>
-      </div>
-      <div class="app-container" v-if="zfbRegularCode">
-        <div class="title">{{ qrcodeTitle }} - 支付宝员工码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="zfbRegularCode" alt="加载失败"/>
-        </div>
-      </div>
+      <el-row :gutter="210">
+        <el-col :span="8">
+          <div class="app-container" v-if="genericCode">
+            <div class="title">{{ qrcodeTitle }} - 微信通用码</div>
+            <div class="flex-center">
+              <el-image :src="genericCode" alt="加载失败" class="qrcode" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container" v-if="regularCode">
+            <div class="title">{{ qrcodeTitle }} - 微信员工码</div>
+            <div class="flex-center">
+              <el-image :src="regularCode" class="qrcode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container" v-if="zfbFkjCode">
+            <div class="title">{{ qrcodeTitle }} - 访客机开门二维码</div>
+            <div class="flex-center">
+              <el-image :src="zfbFkjCode" class="qrcode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container" v-if="zfbGenericCode">
+            <div class="title">{{ qrcodeTitle }} - 支付宝通用码</div>
+            <div class="flex-center">
+              <el-image :src="zfbGenericCode" class="qrcode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container" v-if="zfbRegularCode">
+            <div class="title">{{ qrcodeTitle }} - 支付宝员工码</div>
+            <div class="flex-center">
+              <el-image :src="zfbRegularCode" class="qrcode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+      </el-row>
     </div>
     <!-- 预约场景 -->
     <div class="container" v-if="reservationCode">
-      <div class="app-container">
-        <div class="title">{{ qrcodeTitle }} - 内宾码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="reservationCode" alt="加载失败" />
-        </div>
-      </div>
-
-      <div class="app-container">
-        <div class="title">{{ qrcodeTitlePinYin }} - Foreign guests code</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="reservationEnCode" alt="加载失败" />
-        </div>
-      </div>
+      <el-row :gutter="210">
+        <el-col :span="8">
+          <div class="app-container">
+            <div class="title">{{ qrcodeTitle }} - 内宾码</div>
+            <div class="flex-center">
+              <el-image class="qrcode" :src="reservationCode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container">
+            <div class="title">{{ qrcodeTitlePinYin }} - Foreign guests code</div>
+            <div class="flex-center">
+              <el-image class="qrcode" :src="reservationEnCode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+      </el-row>
     </div>
     <!-- 楼宇场景 -->
     <div class="container" v-if="buildingCode || buildingRegularCode">
-      <div class="app-container" v-if="buildingCode">
-        <div class="title">{{ qrcodeTitle }} - 微信通用码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="buildingCode" alt="加载失败" />
-        </div>
-      </div>
-      <div class="app-container" v-if="ZFBbuildingCode">
-        <div class="title">{{ qrcodeTitle }} - 支付宝通用码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="ZFBbuildingCode" alt="加载失败" />
-        </div>
-      </div>
-      <div class="app-container" v-if="buildingRegularCode">
-        <div class="title">{{ qrcodeTitle }} - 微信员工码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="buildingRegularCode" alt="加载失败" />
-        </div>
-      </div>
-      <div class="app-container" v-if="ZFBbuildingRegularCode">
-        <div class="title">{{ qrcodeTitle }} - 支付宝员工码</div>
-        <div class="flex-center">
-          <img class="qrcode" :src="ZFBbuildingRegularCode" alt="加载失败" />
-        </div>
-      </div>
+      <el-row :gutter="210">
+        <el-col :span="8">
+          <div class="app-container" v-if="buildingCode">
+            <div class="title">{{ qrcodeTitle }} - 微信通用码</div>
+            <div class="flex-center">
+              <el-image class="qrcode" :src="buildingCode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container" v-if="ZFBbuildingCode">
+            <div class="title">{{ qrcodeTitle }} - 支付宝通用码</div>
+            <div class="flex-center">
+              <el-image class="qrcode" :src="ZFBbuildingCode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container" v-if="zfbFkjCode">
+            <div class="title">{{ qrcodeTitle }} - 访客机开门二维码</div>
+            <div class="flex-center">
+              <el-image :src="zfbFkjCode" class="qrcode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container" v-if="buildingRegularCode">
+            <div class="title">{{ qrcodeTitle }} - 微信员工码</div>
+            <div class="flex-center">
+              <el-image class="qrcode" :src="buildingRegularCode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="app-container" v-if="ZFBbuildingRegularCode">
+            <div class="title">{{ qrcodeTitle }} - 支付宝员工码</div>
+            <div class="flex-center">
+              <el-image class="qrcode" :src="ZFBbuildingRegularCode" alt="加载失败" />
+            </div>
+          </div>
+        </el-col>
+      </el-row>
     </div>
-    <!-- </div> -->
   </div>
 </template>
 
@@ -113,6 +159,7 @@ export default {
       regularCode: "",
       zfbGenericCode: null,
       zfbRegularCode: "",
+      zfbFkjCode: null,
       reservationCode: "",
       reservationEnCode: "",
       buildingCode: "",
@@ -146,6 +193,7 @@ export default {
         }
         this.zfbGenericCode = data.adminDetail ? data.adminDetail.zfbGenericCode : null
         this.zfbRegularCode = data.adminDetail ? data.adminDetail.zfbRegularCode : null
+        this.zfbFkjCode = data.adminDetail ? data.adminDetail.zfbFkjCode : null
         if (data.adminDetail.reservationStatus) {
           this.reservationCode = data.adminDetail.reservationCode;
           this.reservationEnCode = data.adminDetail.reservationEnCode;
@@ -173,14 +221,13 @@ export default {
   background-repeat: no-repeat;
 }
 .container {
-  width: 100%;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  height: calc(100vh - 80px);
-  overflow: hidden;
+  padding: 0 120px;
+  height: calc(100vh - 60px);
 }
 .app-container {
+  flex: none;
+  width: 313px;
+  padding: 28px 20px;
   display: flex;
   justify-content: center;
   align-items: center;
@@ -191,17 +238,25 @@ export default {
   box-shadow: 0px 14px 23px rgba(12, 31, 128, 0.15);
   border-radius: 10px;
 }
+.el-col {
+  padding-top: 60px;
+}
+.el-col:nth-of-type(n+4){
+  padding-top: 30px;
+}
 .title {
-  font-size: 40px;
-  font-weight: 700;
-  margin-top: 50px;
+  color: #000000;
+  font-size: 27px;
+  font-weight: 500;
+  text-align: center;
+  line-height: 40px;
 }
 .flex-center {
-  margin-top: 30px;
+  margin-top: 24px;
 }
 .qrcode {
-  width: 350px;
-  height: 350px;
+  width: 220px;
+  height: 220px;
 }
 .btn-area {
   padding: 50px 0;
@@ -209,10 +264,5 @@ export default {
   justify-content: space-around;
   align-items: center;
 }
-.title {
-  width: 370px;
-  word-break: break-all;
-  text-align: center;
-}
 </style>
 

+ 56 - 5
src/views/basic_setup/index.vue

@@ -285,6 +285,39 @@
           <el-button icon="el-icon-plus" size="small" circle style="align-self: flex-start;margin:4px 0 0 6px;" @click.prevent="addCheckWayInterfaceAddress" />
         </div>
       </div>
+      <!-- 支付宝小程序显示配置 -->
+      <div class="title">
+        <div class="line"></div>
+        <span>支付宝小程序显示配置</span>
+      </div>
+      <div class="display-config-layout">
+        <el-form-item
+          label=" 二维码1标题文字"
+          prop="zfbMiniEthTitle"
+          class="form-item-style"
+          label-width="134px"
+        >
+          <el-input
+            v-model="user_form.zfbMiniEthTitle"
+            placeholder="请输入支付宝小程序单机二维码标题"
+            maxlength="20"
+            show-word-limit
+          />
+        </el-form-item>
+        <el-form-item
+          label-width="134px"
+          label="二维码2标题文字"
+          class="form-item-style"
+          prop="zfbMiniVguangTitle"
+        >
+          <el-input
+            v-model="user_form.zfbMiniVguangTitle"
+            placeholder="请输入支付宝小程序联机二维码标题"
+            maxlength="20"
+            show-word-limit
+          />
+        </el-form-item>
+      </div>
       <!-- 设备显示配置 -->
       <div v-if="user_form.type === 5">
         <div class="title">
@@ -663,11 +696,15 @@ export default {
         subLineLeft: null,
         mainLineRight: null,
         subLineRight: null,
-        examDeviceList: [], //考试设备列表
-        qrcodeText: null, //二维码码值
-        showQrcode: false, //二维码是否显示
-        advertise: null, //广告图片
-        homeImgUrl: null //首页图片配置
+        examDeviceList: [], // 考试设备列表
+        qrcodeText: null, // 二维码码值
+        showQrcode: false, // 二维码是否显示
+        advertise: null, // 广告图片
+        homeImgUrl: null, // 首页图片配置
+        // 支付宝小程序单机二维码标题
+        zfbMiniEthTitle: null,
+        // 支付宝小程序联机二维码标题
+        zfbMiniVguangTitle: null
       },
 
       // 验证规则
@@ -700,6 +737,20 @@ export default {
             message: '请选择UI使用版本',
             trigger: 'blur'
           }
+        ],
+        zfbMiniEthTitle: [
+          {
+            required: true,
+            message: '请输入',
+            trigger: 'blur'
+          }
+        ],
+        zfbMiniVguangTitle: [
+          {
+            required: true,
+            message: '请输入',
+            trigger: 'blur'
+          }
         ]
       },
       user_basic: [

+ 44 - 1
src/views/user_manage/index.vue

@@ -1211,6 +1211,39 @@
             </div>
           </div>
         </div>
+        <!-- 支付宝小程序显示配置 -->
+        <div class="title">
+          <div class="line"></div>
+          <span>支付宝小程序显示配置</span>
+        </div>
+        <div class="display-config-layout">
+          <el-form-item
+            label=" 二维码1标题文字"
+            prop="zfbMiniEthTitle"
+            class="form-item-style"
+            label-width="134px"
+          >
+            <el-input
+              v-model="user_form.zfbMiniEthTitle"
+              placeholder="请输入支付宝小程序单机二维码标题"
+              maxlength="20"
+              show-word-limit
+            />
+          </el-form-item>
+          <el-form-item
+            label-width="134px"
+            label="二维码2标题文字"
+            class="form-item-style"
+            prop="zfbMiniVguangTitle"
+          >
+            <el-input
+              v-model="user_form.zfbMiniVguangTitle"
+              placeholder="请输入支付宝小程序联机二维码标题"
+              maxlength="20"
+              show-word-limit
+            />
+          </el-form-item>
+        </div>
         <!-- 进出记录配置 -->
         <div class="title">
           <div class="line"></div>
@@ -2034,7 +2067,11 @@ export default {
         visitorAppPhoto: true,
         visitorAppPhone: true,
         visitorAppLoginList: [1, 2],
-        buildingCheckType:1,
+        buildingCheckType: 1,
+        // 支付宝小程序单机二维码标题
+        zfbMiniEthTitle: null,
+        // 支付宝小程序联机二维码标题
+        zfbMiniVguangTitle: null
       },
       user_form_copy: {},
       scene_list: [
@@ -2311,6 +2348,12 @@ export default {
         buildingCheckType: [
           { required: true, message: "请选择", trigger: "blur" },
         ],
+        zfbMiniEthTitle: [
+          { required: true, message: "请选择", trigger: "blur" },
+        ],
+        zfbMiniVguangTitle: [
+          { required: true, message: "请选择", trigger: "blur" },
+        ]
       },
       // 批量导入结果返回
       resultVisible: false,

+ 78 - 5
src/views/visitee_list/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <addModal ref="addModel" :user-list="user_list" :floor-list="floorList" @success="modalSuccess" />
-    <uploadModal ref="uploadModal" :user-list="user_list" @finish="modalSuccess(false)" />
+    <addModal ref="addModel" :user-list="user_list" :area-list="areaList" :floor-list="floorList" @success="modalSuccess" />
+    <uploadModal ref="uploadModal" :user-list="user_list" :area-list="areaList" @finish="modalSuccess(false)" />
     <!--搜索区-->
     <el-select
       v-if="checkRole([1])"
@@ -31,6 +31,14 @@
     <el-input v-model="form.idNumber" placeholder="请输入身份证号" class="margin-left input" />
     <el-input v-model="form.showTitle" placeholder="请输入显示标题" class="margin-left input" />
     <el-input v-model="form.unitName" placeholder="请输入部门" class="margin-left input" />
+    <el-select v-model="form.zoneId" filterable clearable placeholder="请选择区域" class="margin-left input" no-data-text="“选择区域”为空">
+      <el-option
+        v-for="(item, index) in areaList"
+        :key="index"
+        :label="item.name"
+        :value="item.id"
+      />
+    </el-select>
     <br>
     <el-button type="primary" icon="el-icon-search" style="margin-top: 10px;" @click="query">搜索</el-button>
     <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-plus" @click="handleCreate">
@@ -38,6 +46,7 @@
     </el-button>
     <el-button type="primary" icon="el-icon-download" style="margin-left: 10px;" @click="download">下载模板</el-button>
     <el-button type="primary" style="margin-left: 10px;" plain @click="addOrUpdate">批量导入</el-button>
+    <el-button type="primary" style="margin-left: 10px;" plain @click="deletes">批量删除</el-button>
     <!--主表格-->
     <el-table
       v-loading="tableLoading"
@@ -99,6 +108,11 @@
           {{ scope.row.showTitle | matchNull }}
         </template>
       </el-table-column>
+      <el-table-column label="区域" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.zoneNames || '全部' }}
+        </template>
+      </el-table-column>
       <el-table-column label="创建时间" align="center" :width="180">
         <template slot-scope="scope">
           {{ scope.row.createTime }}
@@ -130,7 +144,8 @@
 <script>
 import { getAdminListNew } from '@/api/user_manage'
 import { checkRole } from '@/utils/checkRole'
-import { getVisiteePageList, deleteByIds } from '@/api/visitee'
+import { getVisiteePageList, deleteByIds, deletes } from '@/api/visitee'
+import { getAreaList } from '@/api/area'
 import tableMixins from '@/mixins/tableMixins'
 import Pagination from '@/components/Pagination'
 import AddModal from './modal/AddModal.vue'
@@ -151,6 +166,7 @@ export default {
   data() {
     return {
       user_list: null,
+      areaList: null,
       form: {
         adminId: null,
         company: null,
@@ -160,7 +176,8 @@ export default {
         idNumber: null,
         room: null,
         showTitle: null,
-        unitName: null
+        unitName: null,
+        zoneId: null
       }
     }
   },
@@ -189,6 +206,21 @@ export default {
     initData() {
       this.getTableList()
       this.getAdminListNew(1, 1, 1)
+      this.getAreaList()
+    },
+    // 返回所有的区域列表概览
+    async getAreaList() {
+      try {
+        const result = await getAreaList({ adminId: this.$store.getters.adminId })
+        this.areaList = result.data
+      } catch (e) {
+        console.log(e)
+        this.areaList = []
+      }
+      this.areaList.unshift({
+        id: 0,
+        name: '全部'
+      })
     },
     // 获取账号列表数据
     getAdminListNew(isNeedDistrict, isNeedEnterprise, isNeedPrivateArea) {
@@ -220,7 +252,11 @@ export default {
     },
     // 增加筛选条件
     transformFilterForm() {
-      return this.form
+      let zoneId = this.form.zoneId
+      if (!this.form.zoneId) {
+        zoneId = null
+      }
+      return { ...this.form, zoneId }
     },
     modalSuccess(isEdit) {
       if (!isEdit) {
@@ -270,6 +306,43 @@ export default {
           }
         }
       }).then(() => {}).catch(() => {})
+    },
+    deletes() {
+      const that = this
+      this.$confirm('确定要删除筛选的记录吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        showClose: false,
+        type: 'warning',
+        beforeClose: async(action, instance, done) => {
+          if (action === 'confirm') {
+            instance.confirmButtonLoading = true
+            instance.cancelButtonLoading = true
+            instance.confirmButtonText = '提交中...'
+            try {
+              await deletes(this.form)
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              })
+              that.getTableList()
+            } catch (e) {
+              // this.$message({
+              //   type: 'error',
+              //   message: '删除失败!'
+              // })
+            } finally {
+              done()
+              setTimeout(() => {
+                instance.confirmButtonLoading = false
+                instance.cancelButtonLoading = false
+              }, 300)
+            }
+          } else {
+            done()
+          }
+        }
+      }).then(() => {}).catch(() => {})
     }
   }
 }

+ 44 - 2
src/views/visitee_list/modal/AddModal.vue

@@ -45,6 +45,11 @@
       <el-form-item label="显示标题" prop="showTitle" required>
         <el-input v-model="form.showTitle" placeholder="请输入显示标题" maxlength="20" show-word-limit />
       </el-form-item>
+      <el-form-item label="区域" prop="selectAreaList" required>
+        <el-select v-model="form.selectAreaList" class="filter-item" placeholder="请选择区域" @change="areaChange" clearable multiple filterable>
+          <el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id" />
+        </el-select>
+      </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
       <el-button @click="visible = false">
@@ -70,6 +75,10 @@ export default {
     userList: {
       type: Array,
       default: () => []
+    },
+    areaList: {
+      type: Array,
+      default: () => []
     }
   },
   data() {
@@ -87,7 +96,8 @@ export default {
         unitName: null,
         floor: null,
         room: null,
-        showTitle: null
+        showTitle: null,
+        selectAreaList: []
       },
       rules: {
         adminId: [
@@ -119,6 +129,9 @@ export default {
         ],
         showTitle: [
           { required: true, whitespace: true, message: '不能为空!', trigger: ['change', 'blur'] }
+        ],
+        selectAreaList: [
+          { required: true, type: 'array', message: '不能为空!', trigger: ['change', 'blur'] }
         ]
       },
       visible: false,
@@ -128,13 +141,25 @@ export default {
   },
   methods: {
     checkRole,
+    areaChange(e) {
+      this.$forceUpdate()
+    },
     open(obj) {
       this.visible = true
       this.submitLoading = false
       this.$nextTick(() => {
         this.$refs.form.resetFields()
         if (obj && Object.keys(obj).length > 0) {
+          const areas = obj.zoneIds
+          delete obj.zoneIds
+          delete obj.zoneNames
           this.form = obj
+          if (areas) {
+            this.form.selectAreaList = JSON.parse(areas)
+          } else {
+            this.form.selectAreaList = []
+          }
+          // console.info('form-->', this.form)
           this.isEdit = true
           if (obj.name) {
             this.nameReadOnly = true
@@ -150,6 +175,7 @@ export default {
           this.nameReadOnly = false
           this.phoneReadOnly = false
           this.idNumberReadOnly = false
+          this.form.selectAreaList = []
         }
       })
     },
@@ -167,9 +193,25 @@ export default {
         // }
         delete this.form.createTime
         this.submitLoading = true
+        let zoneIds = null
+        let zoneNames = null
+        if (this.form.selectAreaList && this.form.selectAreaList.length > 0) {
+          if (this.form.selectAreaList.indexOf(0) > -1) {
+            // 全部
+            zoneIds = null
+            zoneNames = null
+          } else {
+            const selectAreaList = this.areaList.filter(item => {
+              return this.form.selectAreaList.findIndex(items => items && items === item.id) > -1
+            })
+            zoneIds = selectAreaList.map(item => item.id)
+            zoneNames = selectAreaList.map(item => item.name)
+          }
+        }
         try {
-          await addOrUpdate({ ...this.form })
+          await addOrUpdate({ ...this.form, selectAreaList: null, zoneIds: zoneIds ? `[${zoneIds.join(',')}]` : null, zoneNames: zoneNames ? zoneNames.join(',') : null })
           this.visible = false
+          this.form.selectAreaList = []
           this.$emit('success', this.isEdit)
         } catch (e) {
           this.$refs.form.resetFields()

+ 4 - 2
src/views/visitee_list/modal/UploadModal.vue

@@ -185,7 +185,7 @@ export default {
     async doSubmitUrl(correctList, index) {
       if (index <= correctList.correct.length - 1) {
         const item = correctList.correct[index]
-        if (item['楼层'] && item['显示标题']) {
+        if (item['楼层'] && item['显示标题'] && item['区域']) {
           // 组装数据上传
           const data = JSON.parse(JSON.stringify(this.form))
           data.name = item['姓名'] || null
@@ -196,6 +196,7 @@ export default {
           data.floor = item['楼层']
           data.room = item['房间号'] || null
           data.showTitle = item['显示标题']
+          data.zoneNames = item['区域'] || null
           delete data.correctList
 
           let hasValidate = true
@@ -254,7 +255,8 @@ export default {
             floor: item['楼层'] || '',
             room: item['房间号'] || '',
             showTitle: item['显示标题'] || '',
-            err: '不包含 "楼层" 或 "显示标题" 字段'
+            zoneNames: item['区域'] || '',
+            err: '不包含 "楼层" 或 "显示标题" 或 "区域" 字段'
           })
         }
         this.hasDealNumber += 1