Browse Source

修改添加总卡用户无数据bug

hzj18279462576@163.com 1 year ago
parent
commit
5bcbc79ed2
1 changed files with 30 additions and 13 deletions
  1. 30 13
      src/views/doorLock/doorLock.vue

+ 30 - 13
src/views/doorLock/doorLock.vue

@@ -42,7 +42,7 @@
               type="primary"
               type="primary"
               class="search"
               class="search"
               @click="identityCardClick('总卡', '总卡')"
               @click="identityCardClick('总卡', '总卡')"
-              >总卡</el-button
+              >制作总卡</el-button
             >
             >
             <div class="condition" style="margin-left: 30px">
             <div class="condition" style="margin-left: 30px">
               <span>楼栋单元</span>
               <span>楼栋单元</span>
@@ -56,7 +56,7 @@
                 <el-option
                 <el-option
                   v-for="item in buildData"
                   v-for="item in buildData"
                   :key="item.id"
                   :key="item.id"
-                  :label="`${item.building}${item.element}`"
+                  :label="`${item.building}-${item.element}`"
                   :value="item.id"
                   :value="item.id"
                 />
                 />
               </el-select>
               </el-select>
@@ -1302,7 +1302,7 @@
               <el-option
               <el-option
                 v-for="item in buildData"
                 v-for="item in buildData"
                 :key="item.id"
                 :key="item.id"
-                :label="`${item.building}${item.element}`"
+                :label="`${item.building}-${item.element}`"
                 :value="item.id"
                 :value="item.id"
               />
               />
             </el-select>
             </el-select>
@@ -1497,7 +1497,7 @@
                 <el-option
                 <el-option
                   v-for="item in buildData"
                   v-for="item in buildData"
                   :key="item.id"
                   :key="item.id"
-                  :label="`${item.building}${item.element}`"
+                  :label="`${item.building}-${item.element}`"
                   :value="item.id"
                   :value="item.id"
                 />
                 />
               </el-select>
               </el-select>
@@ -1534,16 +1534,33 @@
                 border: 0,
                 border: 0,
               }"
               }"
             >
             >
-              <el-table-column align="center" prop="roomNumber" label="生效时间">
+              <el-table-column align="center" prop="startTime" label="生效时间">
               </el-table-column>
               </el-table-column>
-              <el-table-column align="center" prop="type" label="失效时间" />
-              <el-table-column align="center" prop="type" label="用户" />
-              <el-table-column align="center" prop="type" label="楼栋单元" />
-              <el-table-column align="center" prop="type" label="卡号" />
-              <el-table-column align="center" prop="type" label="创建时间" />
+              <el-table-column align="center" prop="endTime" label="失效时间" />
+              <el-table-column align="center" prop="employeeUsersName" label="用户" />
+              <el-table-column align="center" label="楼栋单元">
+                <template #default="{row}">
+                  <span>{{ row.building }}-{{ row.element }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" prop="roomCardInformation" label="卡号" />
+              <el-table-column align="center" prop="createTime" label="创建时间" />
               <el-table-column align="center" prop="unlockType" label="操作">
               <el-table-column align="center" prop="unlockType" label="操作">
                 <template #default="{row}">
                 <template #default="{row}">
-                  <span @click=detailDel(row)>删除</span>
+                  <el-popconfirm
+                    width="220"
+                    confirm-button-text="确认"
+                    cancel-button-text="取消"
+                    :icon="InfoFilled"
+                    icon-color="#f89626"
+                    title="是否删除此卡?"
+                    @confirm="detailDel(row)"
+                    @cancel="cancelEvent"
+                  >
+                    <template #reference>
+                      <span style="cursor: pointer;color:#0061ff">删除</span>
+                    </template>
+                  </el-popconfirm>
                 </template>
                 </template>
               </el-table-column>
               </el-table-column>
             </el-table>
             </el-table>
@@ -3255,6 +3272,7 @@ const identityCardClick = (val, card) => {
     } else if (card == "总卡") {
     } else if (card == "总卡") {
       addIdentityCardVisibleTitle.value = "制作总卡";
       addIdentityCardVisibleTitle.value = "制作总卡";
       identityCardRuleForm.buildingId=""
       identityCardRuleForm.buildingId=""
+      staffData(); // 员工筛选数据
     }
     }
   } else {
   } else {
     cardFlag.value = "";
     cardFlag.value = "";
@@ -3433,8 +3451,7 @@ const identityCardConfig = (formEl) => {
       }else if (keypassflag.value == "总卡"){
       }else if (keypassflag.value == "总卡"){
         let data = {
         let data = {
           adminId: sessionStorage.getItem("id"), //管理员id
           adminId: sessionStorage.getItem("id"), //管理员id
-	        // "employeeUsersId": identityCardRuleForm.name, //员工id
-	        "employeeUsersId": 1, //员工id
+	        "employeeUsersId": identityCardRuleForm.name, //员工id
 	        "buildingId": identityCardRuleForm.buildingId, //楼栋单元id   
 	        "buildingId": identityCardRuleForm.buildingId, //楼栋单元id   
 	        "roomCardInformation": identityCardRuleForm.icCard, //房卡特殊编码
 	        "roomCardInformation": identityCardRuleForm.icCard, //房卡特殊编码
 	        "startTime": identityCardRuleForm.effectiveTime, //开始时间
 	        "startTime": identityCardRuleForm.effectiveTime, //开始时间