Browse Source

'修改账号管理'

hjs 1 year ago
parent
commit
0216825d36
2 changed files with 524 additions and 208 deletions
  1. 270 109
      src/views/basic_setup/index.vue
  2. 254 99
      src/views/user_manage/index.vue

+ 270 - 109
src/views/basic_setup/index.vue

@@ -25,6 +25,7 @@
     <el-form
       :model="user_form"
       ref="user_form"
+      :rules="rules"
       label-width="200px"
       label-position="left"
     >
@@ -243,39 +244,52 @@
           </el-select>
         </el-form-item>
       </div>
-      <div v-if="user_form.clockWayType === '1'" class="flex">
-        <el-form-item
-          label-width="200px"
-          style="margin-left:0;"
-          label="打卡方式-通用推送地址"
-          class="form-item-style"
-        >
-          <el-input
-            v-model="user_form.clockWayPushUrl"
-            placeholder="请输入"
-          />
-        </el-form-item>
-      </div>
-      <!-- 设备显示配置 -->
-      <div v-if="user_form.type === 5">
-        <div class="title">
-          <div class="line" />
-          <span>设备显示配置</span>
-        </div>
-        <div class="flex">
+      <div v-if="user_form.clockWayType === '1'" class="interfaceAddress-layout" style="margin-top: 6px;">
+        <div v-for="(clockWayItem, index) in user_form.clockWayPushInterfaceAddresses" :key="index" style="width:100%;display: flex;align-items: center;">
           <el-form-item
-            label-width="120px"
-            label="顶部标题"
+            label-width="140px"
+            :label="`打卡-通用推送地址${index+1}`"
             class="form-item-style"
-            prop="topTitle"
+            style="width: 540px;flex:none;"
+            :prop="`clockWayPushInterfaceAddresses.${index}.interfAddr`"
           >
             <el-input
-              v-model="user_form.topTitle"
-              placeholder="请输入顶部标题"
-              maxlength="8"
-              show-word-limit
+              v-model="clockWayItem.interfAddr"
+              placeholder="请输入推送地址"
             />
           </el-form-item>
+          <el-form-item
+            label-width="120px"
+            :label="`地址${index+1}-绑定区域`"
+            class="form-item-style"
+            style="margin-left:60px;width:450px;flex:none;"
+            :prop="`clockWayPushInterfaceAddresses.${index}.zoneId`"
+          >
+            <el-select
+              v-model="clockWayItem.zoneId"
+              filterable
+              style="width:100%;"
+              placeholder="请绑定区域"
+              @change="e => checkWayOfAreaSelectChange(e, index)"
+            >
+              <el-option
+                v-for="item in platformAreaList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+                :disabled="checkWayOfSelectedPlatformAreaList && checkWayOfSelectedPlatformAreaList.length > 0 && checkWayOfSelectedPlatformAreaList.includes(item.id)"
+              />
+            </el-select>
+          </el-form-item>
+          <el-button v-if="user_form.clockWayPushInterfaceAddresses && user_form.clockWayPushInterfaceAddresses.length > 1" icon="el-icon-close" size="small" circle style="align-self: flex-start;margin:4px 0 0 6px;margin:4px 0 0 6px;border:none;" @click.prevent="removeCheckWayInterfaceAddress(index, clockWayItem.zoneId)" />
+          <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 v-if="user_form.type === 5">
+        <div class="title">
+          <div class="line" />
+          <span>设备显示配置</span>
         </div>
         <div v-if="user_form.openThirdLinkPlatform" class="interfaceAddress-layout">
           <div v-for="(interfaceAddressItem, index) in user_form.interfaceAddresses" :key="index" style="width:100%;display: flex;align-items: center;">
@@ -318,11 +332,51 @@
             <el-button icon="el-icon-plus" size="small" circle style="align-self: flex-start;margin:4px 0 0 6px;" @click.prevent="addInterfaceAddress" />
           </div>
         </div>
-        <div class="flex">
+        <div class="display-config-layout">
           <el-form-item
+            label="UI使用版本"
+            prop="latestResultPage"
+            class="form-item-style"
             label-width="120px"
-            label="成功通行结果"
+          >
+            <el-radio-group v-model="user_form.latestResultPage">
+              <el-radio :label="false">
+                <img src="../../assets/ui-theme1.jpg" width="60px" height="96px" alt="旧版">
+              </el-radio>
+              <el-radio :label="true">
+                <img src="../../assets/ui-theme2.jpg" width="60px" height="96px" alt="新版">
+              </el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item
+            label-width="120px"
+            label="顶部标题"
             class="form-item-style"
+            prop="topTitle"
+          >
+            <el-input
+              v-model="user_form.topTitle"
+              placeholder="请输入顶部标题"
+              maxlength="8"
+              show-word-limit
+            />
+          </el-form-item>
+          <el-form-item
+            v-if="false && !user_form.latestResultPage"
+            label-width="120px"
+            label="地址"
+            class="form-item-style special"
+            :prop="user_form.openThirdLinkPlatform?'interfaceAddress':''"
+          >
+            <el-input
+              v-model="user_form.interfaceAddress"
+              placeholder="请输入地址"
+            />
+          </el-form-item>
+          <el-form-item
+            label-width="120px"
+            label="成功通行结果"
+            class="form-item-style special"
             prop="subLineSuccess"
           >
             <el-input
@@ -333,7 +387,7 @@
           <el-form-item
             label-width="120px"
             label="失败通行结果"
-            class="form-item-style"
+            class="form-item-style special"
             prop="subLineFail"
           >
             <el-input
@@ -341,12 +395,33 @@
               placeholder="请输入失败通行结果"
             />
           </el-form-item>
-        </div>
-        <div class="flex">
           <el-form-item
+            label-width="120px"
+            label="成功语音播报"
+            class="form-item-style special"
+            prop="openVoiceMsgSuccess"
+          >
+            <el-input
+              v-model="user_form.openVoiceMsgSuccess"
+              placeholder="请输入成功语音播报"
+            />
+          </el-form-item>
+          <el-form-item
+            label-width="120px"
+            label="失败语音播报"
+            class="form-item-style special"
+            prop="openVoiceMsgFail"
+          >
+            <el-input
+              v-model="user_form.openVoiceMsgFail"
+              placeholder="请输入失败语音播报"
+            />
+          </el-form-item>
+          <el-form-item
+            v-if="!user_form.latestResultPage"
             label-width="120px"
             label="左副框上层"
-            class="form-item-style"
+            class="form-item-style special"
             prop="mainLineLeft"
           >
             <el-input
@@ -355,9 +430,10 @@
             />
           </el-form-item>
           <el-form-item
+            v-if="!user_form.latestResultPage"
             label-width="120px"
             label="左副框下层"
-            class="form-item-style"
+            class="form-item-style special"
             prop="subLineLeft"
           >
             <el-input
@@ -365,12 +441,11 @@
               placeholder="请输入左副框下层"
             />
           </el-form-item>
-        </div>
-        <div class="flex">
           <el-form-item
+            v-if="!user_form.latestResultPage"
             label-width="120px"
             label="右副框上层"
-            class="form-item-style"
+            class="form-item-style special"
             prop="mainLineRight"
           >
             <el-input
@@ -379,9 +454,10 @@
             />
           </el-form-item>
           <el-form-item
+            v-if="!user_form.latestResultPage"
             label-width="120px"
             label="右副框下层"
-            class="form-item-style"
+            class="form-item-style special"
             prop="subLineRight"
           >
             <el-input
@@ -389,20 +465,23 @@
               placeholder="请输入右副框下层"
             />
           </el-form-item>
-        </div>
-        <div class="flex">
           <el-form-item
+            v-if="!user_form.latestResultPage"
             label-width="120px"
             label="二维码是否显示"
-            class="el-form-item form-item-style"
+            class="el-form-item form-item-style special"
             prop="showQrcode"
           >
-            <el-radio-group v-model="user_form.showQrcode" style="width: 100%">
+            <el-radio-group
+              v-model="user_form.showQrcode"
+              style="width: 100%"
+            >
               <el-radio :label="false">否</el-radio>
               <el-radio :label="true">是</el-radio>
             </el-radio-group>
           </el-form-item>
           <el-form-item
+            v-if="!user_form.latestResultPage"
             label-width="120px"
             label="二维码码值"
             class="form-item-style special"
@@ -413,34 +492,8 @@
               placeholder="二维码码值"
             />
           </el-form-item>
-        </div>
-        <div class="flex">
-          <el-form-item
-            label-width="120px"
-            label="成功语音播报"
-            class="form-item-style"
-            prop="openVoiceMsgSuccess"
-          >
-            <el-input
-              v-model="user_form.openVoiceMsgSuccess"
-              placeholder="请输入成功语音播报"
-            />
-          </el-form-item>
-          <el-form-item
-            label-width="120px"
-            label="失败语音播报"
-            class="form-item-style"
-            prop="openVoiceMsgFail"
-          >
-            <el-input
-              v-model="user_form.openVoiceMsgFail"
-              placeholder="请输入失败语音播报"
-            />
-          </el-form-item>
-        </div>
-
-        <div class="flex">
           <el-form-item
+            v-if="!user_form.latestResultPage"
             label-width="120px"
             :label="
               user_form.showQrcode
@@ -488,10 +541,10 @@
             </el-upload>
           </el-form-item>
           <el-form-item
-            label-width="120px"
             label="首页图片配置"
             class="form-item-style item-margin-bottom special"
             prop="homeImgUrl"
+            label-width="120px"
           >
             <el-upload
               ref="upload"
@@ -510,16 +563,18 @@
             >
               <img
                 v-if="!user_form.homeImgUrl"
-                src="../../assets/default-img-home.jpg"
                 class="upload-img3"
+                src="../../assets/default-img-home.jpg"
+                alt=""
               >
-              <div v-else class="upload-img3">
+              <div class="upload-img3" v-else>
                 <img :src="user_form.homeImgUrl">
-                <span @click.stop="handleRemove('homeImgUrl')" class="del-img">x</span>
+                <span class="del-img" @click.stop="handleRemove('homeImgUrl')">x</span>
               </div>
             </el-upload>
           </el-form-item>
         </div>
+        <!--
         <div v-if="false" class="flex">
           <el-form-item
             label-width="120px"
@@ -538,26 +593,24 @@
               accept="image/png,image/gif,image/jpg,image/jpeg"
             >
               <img
+                v-if="user_form.screenShowPhotos.length < 1"
                 src="../../assets/default-img.png"
                 alt=""
-                v-if="user_form.screenShowPhotos.length < 1"
                 class="upload-img"
-              />
+              >
 
               <div v-else class="upload-img">
-                <img :src="user_form.screenShowPhotos[0].url" alt="" />
-                <span @click.stop="handleRemove('')" class="del-img">x</span>
+                <img :src="user_form.screenShowPhotos[0].url" alt="">
+                <span class="del-img" @click.stop="handleRemove('')">x</span>
               </div>
             </el-upload>
           </el-form-item>
-        </div>
+        </div> -->
       </div>
     </el-form>
     <div class="sure">
-      <el-button plain type="primary" @click="getInfo(1)" class="reset"
-        >重置</el-button
-      >
-      <el-button type="primary" @click="updateAdmin">更改配置</el-button>
+      <el-button class="reset" type="primary" plain @click="getInfo(1)">重置</el-button>
+      <el-button type="primary" :loading="submitLoading" @click="updateAdmin">更改配置</el-button>
     </div>
   </div>
 </template>
@@ -585,6 +638,11 @@ export default {
         cardPhysics: 2,
         clockWayPushUrl: null,
         clockWayType: '0',
+        // 打卡方式-通用 [{"interfAddr":"三方接口地址","punchReportFields":"打卡上报字段, 多个逗号分割","zoneId":"所在区域ID"}]
+        clockWayPushInterfaceAddresses: [{
+          interfAddr: null,
+          zoneId: null
+        }],
         openThirdLinkPlatform: false,
         whiteVisitorType: ["1", "2"],
         nucleicExpirationTime: null,
@@ -594,6 +652,7 @@ export default {
         notAllowAgeStart: 0,
         screenShowPhotos: [],
         topTitle: null,
+        latestResultPage: false, // 设备结果页类型 false:老版 true:新版
         interfaceAddresses: [{
           interfAddr: null,
           zoneId: null
@@ -617,23 +676,31 @@ export default {
           {
             required: true,
             message: "请输入单位名称",
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
         unitAddress: [
           {
             required: true,
             message: "请输入详细地址",
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
         topTitle: [
           {
             required: true,
             message: "请输入",
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
+        latestResultPage: [
+          {
+            required: true,
+            type: 'boolean',
+            message: '请选择UI使用版本',
+            trigger: 'blur'
+          }
+        ]
       },
       user_basic: [
         {
@@ -686,7 +753,11 @@ export default {
       // 弹框区域列表
       platformAreaList: [],
       // 选中的区域列表
-      selectedPlatformAreaList: []
+      selectedPlatformAreaList: [],
+      // 打卡方式-通用 的区域选中列表
+      checkWayOfSelectedPlatformAreaList: [],
+      // 提交状态
+      submitLoading: false
     }
   },
   mounted() {
@@ -708,6 +779,20 @@ export default {
             this.selectedPlatformAreaList = []
             this.getPlatformList(this.$store.getters.adminId)
           }
+          if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
+            this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.map(item => {
+              return {
+                interfAddr: item.interfAddr,
+                zoneId: item.zoneId
+              }
+            })
+          } else {
+            this.user_form.clockWayPushInterfaceAddresses = []
+            this.user_form.clockWayPushInterfaceAddresses.push({
+              interfAddr: null,
+              zoneId: null
+            })
+          }
           if (!this.user_form.interfaceAddresses || this.user_form.interfaceAddresses.length <= 0) {
             this.user_form.interfaceAddresses = []
             this.user_form.interfaceAddresses.push({
@@ -726,6 +811,13 @@ export default {
           id: 0,
           name: '全部'
         })
+        if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
+          for (let i = 0; i < this.user_form.clockWayPushInterfaceAddresses.length; i++) {
+            if (this.user_form.clockWayPushInterfaceAddresses[i].zoneId !== null) {
+              this.checkWayOfSelectedPlatformAreaList.push(this.user_form.clockWayPushInterfaceAddresses[i].zoneId)
+            }
+          }
+        }
         if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
           for (let i = 0; i < this.user_form.interfaceAddresses.length; i++) {
             if (this.user_form.interfaceAddresses[i].zoneId !== null) {
@@ -742,42 +834,94 @@ export default {
         this.selectedPlatformAreaList.push(value)
       }
     },
+    checkWayOfAreaSelectChange(value, index) {
+      if (this.checkWayOfSelectedPlatformAreaList[index] !== null) {
+        this.checkWayOfSelectedPlatformAreaList[index] = value
+      } else {
+        this.checkWayOfSelectedPlatformAreaList.push(value)
+      }
+    },
     removeInterfaceAddress(index, value) {
       this.user_form.interfaceAddresses.splice(index, 1)
       this.selectedPlatformAreaList = this.selectedPlatformAreaList.filter(function(item) {
         return item !== value
       })
     },
+    removeCheckWayInterfaceAddress(index, value) {
+      this.user_form.clockWayPushInterfaceAddresses.splice(index, 1)
+      this.checkWayOfSelectedPlatformAreaList = this.checkWayOfSelectedPlatformAreaList.filter(function(item) {
+        return item !== value
+      })
+    },
     addInterfaceAddress() {
       this.user_form.interfaceAddresses.push({
         interfAddr: null,
         zoneId: null
       })
     },
+    addCheckWayInterfaceAddress() {
+      this.user_form.clockWayPushInterfaceAddresses.push({
+        interfAddr: null,
+        zoneId: null
+      })
+    },
     // 修改
     updateAdmin() {
-      if (!this.user_form.homeImgUrl) {
-        this.user_form.homeImgUrl =
-          "https://tx.hz-hanghui.com:8088/yx-fyzd/file/icon/face.jpg"
-      }
-      if (!this.user_form.openThirdLinkPlatform) {
-        this.user_form.interfaceAddresses = null
+      if (this.submitLoading) {
+        return
       }
-      if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
-        this.user_form.interfaceAddresses = this.user_form.interfaceAddresses.filter(item => {
-          return item.interfAddr !== null && item.zoneId !== null
-        })
-        if (this.user_form.interfaceAddresses.length <= 0) {
-          this.user_form.interfaceAddresses = null
+      this.$refs['user_form'].validate((valid) => {
+        if (valid) {
+          this.submitLoading = true
+          if (!this.user_form.homeImgUrl) {
+            this.user_form.homeImgUrl =
+              "https://tx.hz-hanghui.com:8088/yx-fyzd/file/icon/face.jpg"
+          }
+          if (!this.user_form.openThirdLinkPlatform) {
+            this.user_form.interfaceAddresses = null
+          }
+          if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
+            this.user_form.interfaceAddresses = this.user_form.interfaceAddresses.filter(item => {
+              return item.interfAddr !== null && item.zoneId !== null
+            })
+            if (this.user_form.interfaceAddresses.length <= 0) {
+              this.user_form.interfaceAddresses = null
+            }
+          }
+          if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
+            this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.filter(item => {
+              return item.interfAddr !== null && item.zoneId !== null
+            })
+            if (this.user_form.clockWayPushInterfaceAddresses.length <= 0) {
+              this.user_form.clockWayPushInterfaceAddresses = null
+            } else {
+              this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.map(item => {
+                return {
+                  interfAddr: item.interfAddr,
+                  zoneId: item.zoneId
+                }
+              })
+            }
+          }
+          if (this.user_form.latestResultPage) {
+            this.user_form.mainLineLeft = null
+            this.user_form.subLineLeft = null
+            this.user_form.mainLineRight = null
+            this.user_form.subLineRight = null
+            this.user_form.showQrcode = false
+            this.user_form.qrcodeText = null
+            this.user_form.advertise = null
+          }
+          doEditSelf(this.user_form).then((res) => {
+            this.submitLoading = false
+            this.$message({
+              type: "success",
+              message: "修改成功!"
+            })
+            this.getInfo()
+          })
         }
-      }
-      doEditSelf(this.user_form).then((res) => {
-        this.$message({
-          type: "success",
-          message: "修改成功!",
-        });
-        this.getInfo();
-      });
+      })
     },
     handleRemove(type) {
       if (type) {
@@ -855,6 +999,23 @@ export default {
     margin-right: 60px;
   }
 }
+.display-config-layout {
+  display: flex;
+  flex-wrap: wrap;
+  padding: 0 5px;
+  & > div {
+    width: calc(50% - 30px);
+    flex: none;
+    margin-left: 0;
+    margin-right: 0;
+  }
+  & > div:nth-child(odd) {
+    margin-right: 60px;
+  }
+  ::v-deep .el-radio__input {
+    vertical-align: top;
+  }
+}
 .sure {
   margin-left: 520px;
   margin-top: 37px;

+ 254 - 99
src/views/user_manage/index.vue

@@ -1109,7 +1109,7 @@
             </el-tooltip>
           </el-form-item>
         </div>
-        <div class="custom-css" v-if="user_form.placeType != 1">
+        <div v-if="user_form.placeType != 1" class="custom-css">
           <el-form-item
             label="打卡方式"
             class="form-item-style item-margin-bottom"
@@ -1137,42 +1137,75 @@
               <el-radio label="2">钉钉</el-radio>
             </el-radio-group>
           </el-form-item>
-          <div class="flex" v-if="user_form.clockWayType == 1">
-            <el-form-item
-              label="推送地址"
-              class="form-item-style special"
-              prop="clockWayPushUrl"
-            >
-              <el-input
-                v-model.trim="user_form.clockWayPushUrl"
-                placeholder="请选择推送地址"
-              />
-            </el-form-item>
-            <el-form-item
-              label="推送字段"
-              class="form-item-style special"
-              prop="punchReportFieldsConfig"
-            >
-              <el-select
-                filterable
-                clearable
-                multiple
-                collapse-tags
-                v-model="user_form.punchReportFieldsConfig"
-                placeholder="请选择推送字段"
-                style="width: 100%"
+
+          <div v-if="user_form.clockWayType == 1">
+            <div v-for="(clockWayItem, index) in user_form.clockWayPushInterfaceAddresses" :key="index" style="width:100%;display: flex;align-items: center;">
+              <el-form-item
+                label-width="78px"
+                :label="`推送地址${index+1}`"
+                class="form-item-style"
+                style="width: 400px;flex:none;"
+                :prop="`clockWayPushInterfaceAddresses.${index}.interfAddr`"
               >
-                <el-option
-                  v-for="item in pushField"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+                <el-input
+                  v-model="clockWayItem.interfAddr"
+                  placeholder="请选择推送地址"
+                />
+              </el-form-item>
+              <el-form-item
+                label-width="78px"
+                label-position="right"
+                label="推送字段"
+                class="form-item-style"
+                :prop="`clockWayPushInterfaceAddresses.${index}.punchReportFields`"
+                :rules="{ required: true, type: 'array', message: '推送字段不能为空', trigger: ['change', 'blur'], validator: clockWayRule }"
+                style="margin-left:13px;width: 309px;flex:none;"
+              >
+                <el-select
+                  v-model="clockWayItem.punchReportFields"
+                  filterable
+                  clearable
+                  multiple
+                  collapse-tags
+                  placeholder="请选择推送字段"
+                  style="width: 100%"
                 >
-                </el-option>
-              </el-select>
-            </el-form-item>
+                  <el-option
+                    v-for="item in pushField"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item
+                label-width="78px"
+                class="form-item-style"
+                style="margin-left:10px;width:309px;flex:none;"
+                :prop="`clockWayPushInterfaceAddresses.${index}.zoneId`"
+              >
+                <div slot="label" style="text-align: right;">绑定区域</div>
+                <el-select
+                  v-model="clockWayItem.zoneId"
+                  filterable
+                  style="width:100%;"
+                  placeholder="请绑定区域"
+                  @change="e => checkWayOfAreaSelectChange(e, index)"
+                >
+                  <el-option
+                    v-for="item in platformAreaList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                    :disabled="checkWayOfSelectedPlatformAreaList && checkWayOfSelectedPlatformAreaList.length > 0 && checkWayOfSelectedPlatformAreaList.includes(item.id)"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-button v-if="user_form.clockWayPushInterfaceAddresses && user_form.clockWayPushInterfaceAddresses.length > 1" icon="el-icon-close" size="small" circle style="align-self: flex-start;margin:4px 0 0 6px;border:none;" @click.prevent="removeCheckWayInterfaceAddress(index, clockWayItem.zoneId)" />
+              <el-button type="info" icon="el-icon-plus" size="small" circle style="align-self: flex-start;margin:4px 0 0 6px;" @click.prevent="addCheckWayInterfaceAddress" />
+            </div>
           </div>
-          <div class="flex" v-if="user_form.clockWayType == 2">
+          <div v-if="user_form.clockWayType == 2" class="flex">
             <el-form-item
               label="AppKey"
               class="form-item-style special"
@@ -1542,6 +1575,7 @@
         <el-button @click="dialogVisible = false"> 取消 </el-button>
         <el-button
           type="primary"
+          :loading="submitLoading"
           @click="dialogType === 'add' ? add() : doUpdate()"
         >
           确定
@@ -1738,6 +1772,8 @@ export default {
       area_list_search: [],
       // 是否显示对话框
       dialogVisible: false,
+      // 提交状态
+      submitLoading: false,
       // 对话框标题
       dialogTitle: {
         add: "添加账号",
@@ -1774,8 +1810,14 @@ export default {
         isPush: 0,
         addCustomList: [], //自定义字段
         clockWayType: "0", //打卡方式
-        clockWayPushUrl: null, //推送地址
-        punchReportFieldsConfig: [], //推送字段
+        // clockWayPushUrl: null, //推送地址
+        // punchReportFieldsConfig: [], //推送字段
+        // 打卡方式-通用 [{"interfAddr":"三方接口地址","punchReportFields":"打卡上报字段, 多个逗号分割","zoneId":"所在区域ID"}]
+        clockWayPushInterfaceAddresses: [{
+          interfAddr: null,
+          punchReportFields: null,
+          zoneId: null
+        }],
         dingtalkAppKey: null,
         dingtalkAppSecret: null,
         placeType: 0, //场所类型
@@ -1814,7 +1856,7 @@ export default {
         openThirdLinkPlatform: false,
         interfaceAddress: null,
         interfaceAddresses: [{
-            interfAddr: null,
+          interfAddr: null,
           zoneId: null
         }],
         subLineSuccess: null,
@@ -1830,23 +1872,23 @@ export default {
       scene_list: [
         {
           name: "通用场景",
-          id: 0,
+          id: 0
         },
         {
           name: "楼宇场景",
-          id: 2,
+          id: 2
         },
         {
           name: "预约场景",
-          id: 1,
-        },
+          id: 1
+        }
       ],
       // 账号级别
       type_list: [
         { id: 2, name: "省级超管员", disabled: false },
         { id: 3, name: "省级管理员", disabled: false },
         { id: 4, name: "市级管理员" },
-        { id: 5, name: "区级管理员" },
+        { id: 5, name: "区级管理员" }
       ],
       // 账号类别
       tag_list: [],
@@ -1858,8 +1900,8 @@ export default {
             min: 2,
             max: 20,
             message: "长度在 2 到 20 个字符",
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
         type: [
           { required: true, message: "请选择账号级别", trigger: "change" },
@@ -1869,7 +1911,7 @@ export default {
             required: true,
             message: "请选择是否导出记录功能",
             trigger: "change",
-          },
+          }
         ],
         isHideImportant: [
           { required: true, message: "请选择是否脱敏", trigger: "change" },
@@ -1879,14 +1921,14 @@ export default {
             required: true,
             message: "请选择是否为布控账号",
             trigger: "change",
-          },
+          }
         ],
         openInOutStatistics: [
           {
             required: true,
             message: "请选择是否开启进出记录统计",
             trigger: "change",
-          },
+          }
         ],
         tagId: [
           { required: false, message: "请选择账号类别", trigger: "change" },
@@ -1898,7 +1940,7 @@ export default {
             max: 20,
             message: "长度在 2 到 20 个字符",
             trigger: "blur",
-          },
+          }
         ],
         phone: [
           { required: true, message: "请输入管理员手机号", trigger: "change" },
@@ -1921,7 +1963,7 @@ export default {
             required: true,
             message: "请选择是否开启员工身份证认证",
             trigger: "blur",
-          },
+          }
         ],
         password: [
           { required: true, message: "请输入密码", trigger: "blur" },
@@ -1930,98 +1972,98 @@ export default {
               /^(((?=.*\d)(?=.*[a-z])(?=.*[A-Z]))|((?=.*\d)(?=.*[a-z])(?=.*[~!@#$%^&*]))|((?=.*\d)(?=.*[A-Z])(?=.*[~!@#$%^&*]))|((?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*]))|((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*]))).{10,32}$/,
             message:
               "必须大小写字母、数字、特殊字符,4种组合中至少满足3种,且密码长度在10-32位之间",
-          },
+          }
         ],
         customName: [
           {
             required: true,
             message: "请输入名称",
             trigger: "blur",
-          },
+          }
         ],
         customType: [
           {
             required: true,
             message: "请选择字段类型",
             trigger: "blur",
-          },
+          }
         ],
         configurationOptions: [
           {
             required: true,
             message: "请输入选项配置",
             trigger: "blur",
-          },
+          }
         ],
         addressCode: [
           {
             required: true,
             message: "请输入场所码Code",
             trigger: "blur",
-          },
+          }
         ],
         unitName: [
           {
             required: true,
             message: "请输入单位名称",
             trigger: "blur",
-          },
+          }
         ],
         unitAddress: [
           {
             required: true,
             message: "请输入详细地址",
             trigger: "blur",
-          },
+          }
         ],
         placeAreaCode: [
           {
             required: true,
             message: "请选择",
             trigger: "blur",
-          },
+          }
         ],
         isShowCustomWord: [
           {
             required: true,
             message: "请选择",
             trigger: "blur",
-          },
+          }
         ],
         codeType: [
           {
             required: true,
             message: "请选择",
             trigger: "blur",
-          },
+          }
         ],
         placeType: [
           {
             required: true,
             message: "请选择",
             trigger: "blur",
-          },
+          }
         ],
         userWhitelistEffectiveTime: [
           {
             required: true,
             message: "请填写",
             trigger: "blur",
-          },
+          }
         ],
         userVisiterEffectiveTime: [
           {
             required: true,
             message: "请填写",
             trigger: "blur",
-          },
+          }
         ],
         cardPhysics: [
           {
             required: true,
             message: "请填写",
             trigger: "blur",
-          },
+          }
         ],
         faceLogHoldDays: [
           {
@@ -2032,35 +2074,32 @@ export default {
         ],
         clockWayType: [{ required: true, message: "请选择", trigger: "blur" }],
         dingtalkAppKey: [
-          { required: true, message: "请输入钉钉唯一标识key", trigger: "blur" },
+          { required: true, message: "请输入钉钉唯一标识key", trigger: "blur" }
         ],
         dingtalkAppSecret: [
-          { required: true, message: "请输入钉钉密钥", trigger: "blur" },
-        ],
-        clockWayPushUrl: [
-          { required: false, message: "请输入推送地址", trigger: "blur" },
+          { required: true, message: "请输入钉钉密钥", trigger: "blur" }
         ],
         disinfectFlag: [{ required: true, message: "请选择", trigger: "blur" }],
         problemReportFlag: [
-          { required: true, message: "请选择", trigger: "blur" },
+          { required: true, message: "请选择", trigger: "blur" }
         ],
         wxLoginType: [{ required: true, message: "请选择", trigger: "blur" }],
         isNeedRealAuthentication: [
-          { required: true, message: "请选择", trigger: "blur" },
+          { required: true, message: "请选择", trigger: "blur" }
         ],
         mobileAutoInputFlag: [
-          { required: true, message: "请选择", trigger: "blur" },
+          { required: true, message: "请选择", trigger: "blur" }
         ],
         isOpenExam: [{ required: true, message: "请选择", trigger: "blur" }],
         isOpenVisitorClear: [
-          { required: true, message: "请选择", trigger: "blur" },
+          { required: true, message: "请选择", trigger: "blur" }
         ],
         topTitle: [
           {
             required: true,
             message: "请输入",
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
         latestResultPage: [
           {
@@ -2085,6 +2124,8 @@ export default {
       platformAreaList: [],
       // 选中的区域列表
       selectedPlatformAreaList: [],
+      // 打卡方式-通用 的区域选中列表
+      checkWayOfSelectedPlatformAreaList: [],
       // 字段类型
       customType_list: [
         { id: 1, name: "文本" },
@@ -2093,14 +2134,14 @@ export default {
         { id: 4, name: "省市区街道" },
         { id: 5, name: "日期" },
         { id: 6, name: "时间" },
-        { id: 7, name: "图片" },
+        { id: 7, name: "图片" }
       ],
       // 推送字段
       pushField: [],
       doUpload: "",
       placeAreaCode_list: [], //场所码所属区域
-      row: {},
-    };
+      row: {}
+    }
   },
   created() {
     this.fetchData()
@@ -2150,8 +2191,13 @@ export default {
         this.user_form.dingtalkAppSecret = ''
       }
       if (n !== '1') {
-        this.user_form.clockWayPushUrl = null
-        this.user_form.punchReportFieldsConfig = []
+        // this.user_form.clockWayPushUrl = null
+        // this.user_form.punchReportFieldsConfig = []
+        this.user_form.clockWayPushInterfaceAddresses = [{
+          interfAddr: null,
+          punchReportFields: null,
+          zoneId: null
+        }]
       }
     }
   },
@@ -2161,6 +2207,12 @@ export default {
     isdisabled(e) {
       return e === 0
     },
+    clockWayRule(rule, value, callback) {
+      if (value && value.length > 0) {
+        return callback()
+      }
+      return callback('推送字段不能为空!')
+    },
     // 获取区域列表
     getPlatformList(adminId) {
       getAreaList({ adminId }).then((res) => {
@@ -2169,6 +2221,13 @@ export default {
           id: 0,
           name: '全部'
         })
+        if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
+          for (let i = 0; i < this.user_form.clockWayPushInterfaceAddresses.length; i++) {
+            if (this.user_form.clockWayPushInterfaceAddresses[i].zoneId !== null) {
+              this.checkWayOfSelectedPlatformAreaList.push(this.user_form.clockWayPushInterfaceAddresses[i].zoneId)
+            }
+          }
+        }
         if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
           for (let i = 0; i < this.user_form.interfaceAddresses.length; i++) {
             if (this.user_form.interfaceAddresses[i].zoneId !== null) {
@@ -2185,18 +2244,38 @@ export default {
         this.selectedPlatformAreaList.push(value)
       }
     },
+    checkWayOfAreaSelectChange(value, index) {
+      if (this.checkWayOfSelectedPlatformAreaList[index] !== null) {
+        this.checkWayOfSelectedPlatformAreaList[index] = value
+      } else {
+        this.checkWayOfSelectedPlatformAreaList.push(value)
+      }
+    },
     removeInterfaceAddress(index, value) {
       this.user_form.interfaceAddresses.splice(index, 1)
       this.selectedPlatformAreaList = this.selectedPlatformAreaList.filter(function(item) {
         return item !== value
       })
     },
+    removeCheckWayInterfaceAddress(index, value) {
+      this.user_form.clockWayPushInterfaceAddresses.splice(index, 1)
+      this.checkWayOfSelectedPlatformAreaList = this.checkWayOfSelectedPlatformAreaList.filter(function(item) {
+        return item !== value
+      })
+    },
     addInterfaceAddress() {
       this.user_form.interfaceAddresses.push({
         interfAddr: null,
         zoneId: null
       })
     },
+    addCheckWayInterfaceAddress() {
+      this.user_form.clockWayPushInterfaceAddresses.push({
+        interfAddr: null,
+        punchReportFields: null,
+        zoneId: null
+      })
+    },
     // 添加自定义
     addCustom(index) {
       this.user_form.addCustomList.splice(index + 1, 0, {
@@ -2365,9 +2444,13 @@ export default {
     },
     // 确定添加
     add() {
-      this.$refs["user_form"].validate((valid) => {
+      if (this.submitLoading) {
+        return
+      }
+      this.$refs['user_form'].validate((valid) => {
         if (valid) {
-          if(!this.user_form.openThirdLinkPlatform) {
+          this.submitLoading = true
+          if (!this.user_form.openThirdLinkPlatform) {
             this.user_form.interfaceAddresses = null
           }
           if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
@@ -2378,6 +2461,22 @@ export default {
               this.user_form.interfaceAddresses = null
             }
           }
+          if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
+            this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.filter(item => {
+              return item.interfAddr !== null && (item.punchReportFields !== null && item.punchReportFields.length > 0) && item.zoneId !== null
+            })
+            if (this.user_form.clockWayPushInterfaceAddresses.length <= 0) {
+              this.user_form.clockWayPushInterfaceAddresses = null
+            } else {
+              this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.map(item => {
+                return {
+                  interfAddr: item.interfAddr,
+                  zoneId: item.zoneId,
+                  punchReportFields: (item.punchReportFields && item.punchReportFields > 0) ? item.punchReportFields.join(',') : null
+                }
+              })
+            }
+          }
           if (this.user_form.latestResultPage) {
             this.user_form.mainLineLeft = null
             this.user_form.subLineLeft = null
@@ -2388,11 +2487,12 @@ export default {
             this.user_form.advertise = null
           }
           doEditAdmin(this.user_form).then((res) => {
+            this.submitLoading = false
             this.dialogVisible = false
             this.fetchData()
             this.$message({
-              type: "success",
-              message: "添加成功!"
+              type: 'success',
+              message: '添加成功!'
             })
           })
         }
@@ -2404,19 +2504,20 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       }).then(() => {
         doDeleteAdmin(id).then((res) => {
-          this.fetchData();
+          this.fetchData()
           this.$message({
             type: "success",
-            message: "删除成功!",
-          });
-        });
-      });
+            message: "删除成功!"
+          })
+        })
+      })
     },
     // 打开编辑
     update(row) {
+      this.checkWayOfSelectedPlatformAreaList = []
       this.selectedPlatformAreaList = []
       this.user_form = Object.assign(this.user_form, row)
       this.row = row
@@ -2426,13 +2527,14 @@ export default {
       if (this.user_form.realAuthenticationAgeEnd == null) {
         this.user_form.realAuthenticationAgeEnd = 200
       }
-      this.user_form.password = ""
+      this.user_form.password = ''
       this.getAddressList(2, this.user_form.provinceId)
       this.getTagList(this.user_form.provinceId)
       this.getAddressList(3, this.user_form.cityId)
       this.getAddressList(4, this.user_form.areaId)
       this.dialogType = "update"
       this.dialogVisible = true
+
       this.$nextTick(() => {
         this.$refs["user_form"].clearValidate()
       })
@@ -2442,7 +2544,30 @@ export default {
         this.user_form.isShowCustomWord =
           this.user_form.addCustomList.length > 0
       })
-      if(!this.user_form.interfaceAddresses || this.user_form.interfaceAddresses.length <= 0) {
+      if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
+        this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.map(item => {
+          let punchReportFields = null
+          if (typeof item.punchReportFields === 'string') {
+            punchReportFields = item.punchReportFields ? item.punchReportFields.split(',') : null
+          } else {
+            punchReportFields = item.punchReportFields
+          }
+          return {
+            interfAddr: item.interfAddr,
+            zoneId: item.zoneId,
+            punchReportFields
+          }
+        })
+      } else {
+        this.user_form.clockWayPushInterfaceAddresses = []
+        this.user_form.clockWayPushInterfaceAddresses.push({
+          interfAddr: null,
+          zoneId: null,
+          punchReportFields: null
+        })
+      }
+
+      if (!this.user_form.interfaceAddresses || this.user_form.interfaceAddresses.length <= 0) {
         this.user_form.interfaceAddresses = []
         this.user_form.interfaceAddresses.push({
           interfAddr: null,
@@ -2466,16 +2591,20 @@ export default {
     },
     // 确定编辑
     doUpdate() {
+      if (this.submitLoading) {
+        return
+      }
       this.$refs["user_form"].validate((valid) => {
         if (valid) {
+          this.submitLoading = true
           if (!this.user_form.homeImgUrl) {
             this.user_form.homeImgUrl =
               "https://tx.hz-hanghui.com:8088/yx-fyzd/file/icon/face.jpg";
           }
-          if(!this.user_form.openThirdLinkPlatform) {
+          if (!this.user_form.openThirdLinkPlatform) {
             this.user_form.interfaceAddresses = null
           }
-          if(this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
+          if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
             this.user_form.interfaceAddresses = this.user_form.interfaceAddresses.filter(item => {
               return item.interfAddr !== null && item.zoneId !== null
             })
@@ -2483,16 +2612,42 @@ export default {
               this.user_form.interfaceAddresses = null
             }
           }
+          if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
+            this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.filter(item => {
+              return item.interfAddr !== null && (item.punchReportFields !== null && item.punchReportFields.length > 0) && item.zoneId !== null
+            })
+            if (this.user_form.clockWayPushInterfaceAddresses.length <= 0) {
+              this.user_form.clockWayPushInterfaceAddresses = null
+            } else {
+              this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.map(item => {
+                return {
+                  interfAddr: item.interfAddr,
+                  zoneId: item.zoneId,
+                  punchReportFields: (item.punchReportFields && item.punchReportFields.length > 0) ? item.punchReportFields.join(',') : null
+                }
+              })
+            }
+          }
+          if (this.user_form.latestResultPage) {
+            this.user_form.mainLineLeft = null
+            this.user_form.subLineLeft = null
+            this.user_form.mainLineRight = null
+            this.user_form.subLineRight = null
+            this.user_form.showQrcode = false
+            this.user_form.qrcodeText = null
+            this.user_form.advertise = null
+          }
           doEditAdmin(this.user_form).then((res) => {
-            this.dialogVisible = false;
-            this.fetchData();
+            this.dialogVisible = false
+            this.submitLoading = false
+            this.fetchData()
             this.$message({
               type: "success",
-              message: "编辑成功!",
-            });
-          });
+              message: "编辑成功!"
+            })
+          })
         }
-      });
+      })
     },
     // 下载模板
     download() {