Browse Source

房态管理操作加入过渡动画

hzj18279462576@163.com 1 year ago
parent
commit
8b792016ec

+ 8 - 1
src/store/modules/user.js

@@ -761,7 +761,14 @@ const actions = {
           res.data.data.permissionSettingId
         );
         sessionStorage.setItem("username", res.data.data.userName);
-        sessionStorage.setItem("organizations", JSON.stringify(res.data.data.organizations));
+        // console.log(res.data.data.organizations,'部门数据');
+        let organizations=res.data.data.organizations
+        organizations=organizations.filter(i=>{
+          return i!=null
+        })
+        console.log(organizations,'部门数据');
+        
+        sessionStorage.setItem("organizations", JSON.stringify(organizations));
         console.log(res.data.data.userName, "名字账号");
         let datas = {
           permissionSettingId: res.data.data.permissionSettingId,

+ 53 - 4
src/views/account/account.vue

@@ -102,7 +102,10 @@
             width="230"
           >
             <template #default="{ row }">
-              <div class="ul" style="display: flex; flex-wrap: wrap">
+              <div
+                class="ul"
+                style="display: flex; flex-wrap: wrap"
+              >
                 <el-tag
                   v-for="i in row.checkOrg"
                   style="margin: 5px"
@@ -110,7 +113,41 @@
                   >{{ i.name }}</el-tag
                 >
               </div>
-              <!-- <el-tag v-for="i in row.checkOrg" type="primary">{{i.name}}</el-tag> -->
+              <!-- <div
+                class="ul"
+                v-if="row.checkOrg.length <= 5"
+                style="display: flex; flex-wrap: wrap"
+              >
+                <el-tag
+                  v-for="i in row.checkOrg"
+                  style="margin: 5px"
+                  type="primary"
+                  >{{ i.name }}</el-tag
+                >
+              </div>
+              <div class="ul" v-else style="display: flex; flex-wrap: wrap">
+                <el-tag v-for="i in 3" style="margin: 5px" type="primary">{{
+                  row.checkOrg[i].name
+                }}</el-tag>
+                <el-tooltip
+                  class="box-item"
+                  effect="light"
+                  placement="right"
+                  popper-class="tag_title"
+                  trigger="hover"
+                >
+                  <template #content>
+                    <el-tag
+                      v-for="i in row.checkOrg"
+                      style="margin: 5px"
+                      type="primary"
+                      >{{ i.name }}</el-tag
+                    >
+                  </template>
+                  <el-tag style="margin: 5px; cursor: pointer" type="primary"
+                  >...</el-tag>
+                </el-tooltip>
+              </div> -->
             </template>
           </el-table-column>
           <el-table-column align="center" prop="name" label="真实姓名" />
@@ -408,7 +445,7 @@ const ruleForm = reactive({
   department: "",
   icCard: "",
   id: "",
-  usersId:'',
+  usersId: "",
 });
 var checkUserName = (rule, value, callback) => {
   if (!value) {
@@ -548,6 +585,10 @@ const getList = async () => {
         item.adminMenuName = "";
       }
     });
+    res.data.data.records.forEach(i=>{
+      
+    })
+    
     tableData.list = res.data.data.records;
     total.value = res.data.data.total;
     loading.value = false;
@@ -807,7 +848,7 @@ const submitAdd = lodash.debounce(async (formEl) => {
             department: ruleForm.department,
             checkOrg: ruleForm.icCard.join(","),
             id: ruleForm.id,
-            usersId:ruleForm.usersId
+            usersId: ruleForm.usersId,
           },
         };
         let res = await axios({
@@ -1115,6 +1156,7 @@ onUnmounted(() => {
         height: 50px;
         font-size: 15px;
         color: #000;
+        
       }
       :deep(.el-table__row td) {
         padding: 0;
@@ -1148,6 +1190,7 @@ onUnmounted(() => {
           cursor: pointer;
         }
       }
+      
     }
 
     // 添加员工弹窗样式
@@ -1265,4 +1308,10 @@ onUnmounted(() => {
     text-align: center;
   }
 }
+.el-popper.tag_title{
+  width: 450px;
+  height: 75%;
+  overflow: auto;
+  // border: 1px solid #409eff;
+}
 </style>

+ 6 - 4
src/views/process/process.vue

@@ -445,7 +445,9 @@ const store = useStore();
 const api = ref("");
 const router = useRouter();
 
-const organizations=ref();// 部门数据
+const organizations=ref({
+  name:'测试',id:'1'
+});// 部门数据
 
 const flagBtn = ref(); // 按钮权限
 const adminMenuParentId = ref(); // 判断是 T0级 还是 T1级
@@ -753,6 +755,7 @@ onBeforeMount(async () => {
   organizations.value.forEach(i=>{
     searchInput.orgId.push(i.id)
   })
+  
   const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
   adminMenuParentId.value = JSON.parse(
     sessionStorage.getItem("adminMenuParentId")
@@ -783,10 +786,9 @@ onBeforeMount(async () => {
       center: true,
     });
   }
-  console.log(adminMenuParentId.value, "管理员等级 0 T0级 1 T1级");
-  console.log(destinatio.value, "规则 1最上级 2依次审批");
+  // console.log(adminMenuParentId.value, "管理员等级 0 T0级 1 T1级");
+  // console.log(destinatio.value, "规则 1最上级 2依次审批");
 
-  // changeItem(changeIndex.value);
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);

+ 46 - 5
src/views/roomStatus/roomStatus.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="content-box">
+  <div class="content-box" v-loading="roomLoading" element-loading-text="加载中...">
     <div class="left">
       <div class="cameratxt">
         <span class="cameratxt">房态管理</span>
@@ -178,7 +178,7 @@
           >
         </div>
       </div>
-      <div class="footer" v-loading="roomLoading" v-if="switchDayIndex == 1">
+      <div class="footer"  v-if="switchDayIndex == 1">
         <div class="floor" v-for="item in roomList.list">
           <div class="title" v-if="item.roomlength">
             <span class="t1">{{ item.name }}</span
@@ -792,7 +792,7 @@
           </div>
         </div>
       </div>
-      <div class="footers" v-loading="roomLoading" v-if="switchDayIndex == 2">
+      <div class="footers" v-if="switchDayIndex == 2">
         <el-table :data="tableDate" :span-method="arraySpanMethod">
           <el-table-column prop="date" align="center" fixed="left">
             <template #header>
@@ -3372,6 +3372,7 @@ const closeItem = (val) => {
 
 // 批量置净脏房 (--------------------------------------)
 const roomDirtyClose = async (flag) => {
+  roomLoading.value=true // 加载页面
   cleanRoomLiCount.value = [];
   cleanDialogVisible.value = true;
   cleanRoomAllChecked.value = false;
@@ -3399,7 +3400,9 @@ const roomDirtyClose = async (flag) => {
       });
       cleanDatas.value = arr;
       console.log(cleanDatas.value, dataLength.value);
+      roomLoading.value=false // 加载页面
     } else {
+      roomLoading.value=false // 加载页面
       ElMessage({
         type: "error",
         showClose: true,
@@ -3432,7 +3435,9 @@ const roomDirtyClose = async (flag) => {
       });
       cleanDatas.value = arr;
       console.log(cleanDatas.value, dataLength.value);
+      roomLoading.value=false // 加载页面
     } else {
+      roomLoading.value=false // 加载页面
       ElMessage({
         type: "error",
         showClose: true,
@@ -3444,6 +3449,7 @@ const roomDirtyClose = async (flag) => {
 };
 // 批量开/关房
 const roomClose = async (flag) => {
+  roomLoading.value=true // 加载页面
   cleanRoomLiCount.value = [];
   cleanDialogVisible.value = true;
   cleanRoomAllChecked.value = false;
@@ -3471,7 +3477,9 @@ const roomClose = async (flag) => {
       });
       cleanDatas.value = arr;
       console.log(cleanDatas.value, dataLength.value);
+      roomLoading.value=false // 加载页面
     } else {
+      roomLoading.value=false // 加载页面
       ElMessage({
         type: "error",
         showClose: true,
@@ -3504,7 +3512,9 @@ const roomClose = async (flag) => {
       });
       cleanDatas.value = arr;
       console.log(cleanDatas.value, dataLength.value);
+      roomLoading.value=false // 加载页面
     } else {
+      roomLoading.value=false // 加载页面
       ElMessage({
         type: "error",
         showClose: true,
@@ -3516,6 +3526,7 @@ const roomClose = async (flag) => {
 };
 // 批量控制水电
 const clean = async (flag) => {
+  roomLoading.value=true // 加载页面
   cleanRoomLiCount.value = [];
   cleanDialogVisible.value = true;
   cleanRoomAllChecked.value = false;
@@ -3543,7 +3554,9 @@ const clean = async (flag) => {
       });
       cleanDatas.value = arr;
       console.log(cleanDatas.value, dataLength.value);
+      roomLoading.value=false // 加载页面
     } else {
+      roomLoading.value=false // 加载页面
       ElMessage({
         type: "error",
         showClose: true,
@@ -3576,7 +3589,9 @@ const clean = async (flag) => {
       });
       cleanDatas.value = arr;
       console.log(cleanDatas.value, dataLength.value);
+      roomLoading.value=false // 加载页面
     } else {
+      roomLoading.value=false // 加载页面
       ElMessage({
         type: "error",
         showClose: true,
@@ -3649,6 +3664,7 @@ const cancelClean = () => {
 };
 // 确定批量开关房
 const switchBatch = async () => {
+  roomLoading.value=true // 加载页面
   if (cleanRoomLiCount.value.length) {
     if (roomCloseTitle.value == "批量开房") {
       let arr = [];
@@ -3670,6 +3686,7 @@ const switchBatch = async () => {
       });
       console.log(res, "批量开房");
       if (res.data.code == 200) {
+        roomLoading.value=false // 加载页面
         cleanDialogVisible.value = false;
         cleanRoomTree.value.setCheckedNodes([]);
         getList();
@@ -3680,6 +3697,7 @@ const switchBatch = async () => {
           center: true,
         });
       } else {
+        roomLoading.value=false // 加载页面
         ElMessage({
           type: "error",
           showClose: true,
@@ -3707,6 +3725,7 @@ const switchBatch = async () => {
       });
       console.log(res, "批量关房");
       if (res.data.code == 200) {
+        roomLoading.value=false // 加载页面
         cleanDialogVisible.value = false;
         cleanRoomTree.value.setCheckedNodes([]);
         getList();
@@ -3717,6 +3736,7 @@ const switchBatch = async () => {
           center: true,
         });
       } else {
+        roomLoading.value=false // 加载页面
         ElMessage({
           type: "error",
           showClose: true,
@@ -3744,6 +3764,7 @@ const switchBatch = async () => {
       });
       console.log(res, "批量关房");
       if (res.data.code == 200) {
+        roomLoading.value=false // 加载页面
         cleanDialogVisible.value = false;
         cleanRoomTree.value.setCheckedNodes([]);
         getList();
@@ -3754,6 +3775,7 @@ const switchBatch = async () => {
           center: true,
         });
       } else {
+        roomLoading.value=false // 加载页面
         ElMessage({
           type: "error",
           showClose: true,
@@ -3781,6 +3803,7 @@ const switchBatch = async () => {
       });
       console.log(res, "批量置净");
       if (res.data.code == 200) {
+        roomLoading.value=false // 加载页面
         cleanDialogVisible.value = false;
         cleanRoomTree.value.setCheckedNodes([]);
         getList();
@@ -3791,6 +3814,7 @@ const switchBatch = async () => {
           center: true,
         });
       } else {
+        roomLoading.value=false // 加载页面
         ElMessage({
           type: "error",
           showClose: true,
@@ -3818,6 +3842,7 @@ const switchBatch = async () => {
       });
       console.log(res, "批量关电");
       if (res.data.code == 200) {
+        roomLoading.value=false // 加载页面
         cleanDialogVisible.value = false;
         cleanRoomTree.value.setCheckedNodes([]);
         getList();
@@ -3828,6 +3853,7 @@ const switchBatch = async () => {
           center: true,
         });
       } else {
+        roomLoading.value=false // 加载页面
         ElMessage({
           type: "error",
           showClose: true,
@@ -3855,6 +3881,7 @@ const switchBatch = async () => {
       });
       console.log(res, "批量开电");
       if (res.data.code == 200) {
+        roomLoading.value=false // 加载页面
         cleanDialogVisible.value = false;
         cleanRoomTree.value.setCheckedNodes([]);
         getList();
@@ -3865,6 +3892,7 @@ const switchBatch = async () => {
           center: true,
         });
       } else {
+        roomLoading.value=false // 加载页面
         ElMessage({
           type: "error",
           showClose: true,
@@ -4142,6 +4170,7 @@ const searchBtn = lodash.debounce(async (val) => {
 
 // 置净(---------------------------------------)
 const setAside = lodash.debounce(async (val) => {
+  roomLoading.value=true // 加载页面
   console.log(val);
   let data = {
     houseNumberId: val.houseNumberId,
@@ -4157,6 +4186,7 @@ const setAside = lodash.debounce(async (val) => {
     data: data,
   });
   if (res.data.code == 200) {
+    roomLoading.value=false // 加载页面
     getList();
     itemClick(val);
     ElMessage({
@@ -4166,6 +4196,7 @@ const setAside = lodash.debounce(async (val) => {
       center: true,
     });
   } else {
+    roomLoading.value=false // 加载页面
     ElMessage({
       type: "error",
       showClose: true,
@@ -4177,6 +4208,7 @@ const setAside = lodash.debounce(async (val) => {
 
 // 置脏(---------------------------------------)
 const mess = lodash.debounce(async (val) => {
+  roomLoading.value=true // 加载页面
   console.log(val);
   let data = {
     houseNumberId: val.houseNumberId,
@@ -4192,6 +4224,7 @@ const mess = lodash.debounce(async (val) => {
     data: data,
   });
   if (res.data.code == 200) {
+    roomLoading.value=false // 加载页面
     getList();
     itemClick(val);
     ElMessage({
@@ -4201,6 +4234,7 @@ const mess = lodash.debounce(async (val) => {
       center: true,
     });
   } else {
+    roomLoading.value=false // 加载页面
     ElMessage({
       type: "error",
       showClose: true,
@@ -4263,6 +4297,7 @@ const roomCheck = (row) => {
 };
 // 确定换房
 const submitroomChange = async () => {
+  roomLoading.value=true // 加载页面
   let data = {
     initialHouseNumberId: roomChangeRuleForm.houseNumberId, // 初始的房间id
     houseNumberId: roomChangeRuleForm.houseNumberIdNow, // 勾选的房间id
@@ -4282,6 +4317,7 @@ const submitroomChange = async () => {
   });
   console.log(res, "确定换房");
   if (res.data.code == 200) {
+    roomLoading.value=false // 加载页面
     getList();
     roomChangeVisible.value = false;
     ElMessage({
@@ -4291,6 +4327,7 @@ const submitroomChange = async () => {
       center: true,
     });
   } else {
+    roomLoading.value=false // 加载页面
     ElMessage({
       type: "error",
       showClose: true,
@@ -6489,14 +6526,15 @@ onUnmounted(() => {
   .footer::-webkit-scrollbar {
     background-color: #0888f8;
     height: 3px;
-    width: 4px;
+    width: 6px;
   }
 
   .footer::-webkit-scrollbar-thumb {
     background: #57b2ff;
     border-radius: 4px;
     height: 3px;
-    width: 4px;
+    width: 6px;
+    cursor: pointer;
   }
 
   .pageSize {
@@ -7867,4 +7905,7 @@ onUnmounted(() => {
     background: rgba(0, 0, 0, 0.8) !important;
   }
 }
+.el-loading-mask{
+  z-index: 9999999;
+}
 </style>

+ 49 - 2
src/views/roomType/roomType.vue

@@ -105,7 +105,7 @@
           </el-table-column>
           <el-table-column
             align="center"
-            prop="roomId"
+            prop="roomList"
             label="房号"
             width="220"
           >
@@ -118,6 +118,45 @@
                   >{{ i }}</el-tag
                 >
               </div>
+              <!-- <div class="ul" v-if="row.roomList && row.roomList.length<=5" style="display: flex; flex-wrap: wrap">
+                <el-tag
+                  v-for="i in row.roomList"
+                  style="margin: 5px"
+                  type="primary"
+                  >{{ i }}</el-tag
+                >
+              </div>
+              <div class="ul" v-else-if="row.roomList" style="display: flex; flex-wrap: wrap">
+                <el-tag
+                  style="margin: 5px"
+                  type="primary"
+                  >{{ row.roomList[0] }}</el-tag
+                >
+                <el-tag
+                  v-for="i in 2"
+                  style="margin: 5px"
+                  type="primary"
+                  >{{ row.roomList[i] }}</el-tag
+                >
+                <el-tooltip
+                  class="box-item"
+                  effect="light"
+                  placement="top"
+                  popper-class="account_tag_title"
+                  trigger="click"
+                >
+                  <template #content>
+                    <el-tag
+                      v-for="i in row.roomList"
+                      style="margin: 5px"
+                      type="primary"
+                      >{{ i }}</el-tag
+                    >
+                  </template>
+                  <el-tag style="margin: 5px; cursor: pointer" type="primary"
+                  >...</el-tag>
+                </el-tooltip>
+              </div> -->
             </template>
           </el-table-column>
           <el-table-column align="center" prop="roomLength" label="数量" />
@@ -312,7 +351,7 @@
                       :inactive-value="2"
                     />
                   </el-form-item>
-                  <span style="color: #f81313;display:inline-block;transform: translateY(-7px)">开启则在小程序上显示</span>
+                  <span style="color: #f81313;display:inline-block;transform: translateY(-7px)">开启则在小程序上显示</span>
                 </div>
               </div>
               <div class="form_item">
@@ -1868,3 +1907,11 @@ onUnmounted(() => {
   width: 192px;
 }
 </style>
+<style lang="scss">
+  .el-popper.account_tag_title{
+  // width: 450px;
+  // height: 75%;
+  // overflow: auto;
+  // border: 1px solid #409eff;
+}
+</style>

+ 4 - 4
src/views/user/user.vue

@@ -622,8 +622,8 @@ const confirmEdit = (formEl) => {
             userName: editRuleForm.userName,
             phone: editRuleForm.userPhone,
             userMenuId: editRuleForm.userRoles,
-            idCard: editRuleForm.schoolCard,
-            cardNumber: editRuleForm.idNumber,
+            cardNumber: editRuleForm.schoolCard,
+            // cardNumber: editRuleForm.idNumber,
             fingerprint: editRuleForm.fingerprint,
           },
         };
@@ -661,8 +661,8 @@ const confirmEdit = (formEl) => {
           department: editRuleForm.userDepartment,
           userName: editRuleForm.userName,
           phone: editRuleForm.userPhone,
-          idCard: editRuleForm.schoolCard,
-          cardNumber: editRuleForm.idNumber,
+          cardNumber: editRuleForm.schoolCard,
+          // cardNumber: editRuleForm.idNumber,
           fingerprint: editRuleForm.fingerprint,
         };
         let res = await axios({