sunxiao 2 месяцев назад
Родитель
Сommit
99e6d2b448

+ 19 - 5
src/layout/components/HeaderGroup/TelCallBoard.vue

@@ -21,11 +21,12 @@ const boardNums = [1, 2, 3, 4, 5, 6, 7, 8, 9,'*', 0, '#']
 const phoneIcon = computed(() => isPlay.value ? iconCallOff : iconCallOn);
 
 const isValidPhoneNumber = phone => {
-  const regex = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
-  if ( phone.startsWith(0) ) {
-    return regex.test(phone.slice(1));
-  }
-  return regex.test(phone);
+  // const regex = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
+  // if ( phone.startsWith(0) ) {
+  //   return regex.test(phone.slice(1));
+  // }
+  // return regex.test(phone);
+  return true;
 }
 
 const handleMakingCall = () => {
@@ -33,6 +34,10 @@ const handleMakingCall = () => {
     return proxy.$modal['msgWarning']('请输入正确的外呼电话号码');
   }
 
+  if ( !popoverNums.value && popoverNums.value !=0) {
+    return proxy.$modal['msgWarning']('请输入外呼电话号码');
+  }
+
   isPlay.value = !isPlay.value;
   popoverVisible.value = false;
 
@@ -45,6 +50,10 @@ const handleInpMakingCall = () => {
   if (!isValidPhoneNumber(inputNums.value)) {
     return proxy.$modal['msgWarning']('请输入正确的外呼电话号码');
   }
+  
+  if ( !inputNums.value && inputNums.value !=0) {
+    return proxy.$modal['msgWarning']('请输入外呼电话号码');
+  }
   voiceStore.onMakingCall(inputNums.value);
   inputNums.value = '';
 }
@@ -64,6 +73,10 @@ const handleInput = (value) => {
   inputNums.value = value.replace(/[^\d]/g, '');
 }
 
+const onAfterLeave = () => {
+  popoverNums.value = null;
+}
+
 </script>
 
 <template>
@@ -91,6 +104,7 @@ const handleInput = (value) => {
           borderRadius: '16px',
           padding: '22px 46px 26px 46px'
         }"
+        @after-leave="onAfterLeave"
       >
         <template #reference>
           <div :class="['pointer',{ forbid: callAnswered }]">

+ 1 - 1
src/views/login.vue

@@ -281,7 +281,7 @@ getCookie();
   height: 40px;
   line-height: 40px;
   position: fixed;
-  bottom: 60px;
+  bottom: 20px;
   width: 100%;
   text-align: center;
   color: #989EA7;

+ 0 - 4
src/views/voice/analyse/index.vue

@@ -12,10 +12,6 @@ const formatNum = num => {
 
 const getSummaries= (param) => {
   const { columns, data } = param;
-
-  console.log( columns );
-  console.log(data);
-  console.log('-----');
   const sums = []
   columns.forEach((column, index) => {
     if (index === 0) {

+ 1 - 0
src/views/voice/notice/index.vue

@@ -31,6 +31,7 @@ const statusEnum = {
 const onConfirm = async ({ id }) => {
   await noticeApi.delWater(id);
   ElMessage.success('删除停水公告成功');
+  getList();
 }
 
 const getList = async () => {

+ 20 - 7
src/views/voice/services/index.vue

@@ -23,6 +23,9 @@ const housingActiveIndex = ref(0);
 const stationVisible = ref(false);
 const checkList = ref([]);
 const stationList = ref([]);
+const searchVal = ref('');
+const pumpingStationId = ref('');
+const pumpLoading = ref(false);
 
 const housingFormData = ref({
   name: '',  
@@ -65,7 +68,7 @@ const housingRules = reactive({
 });
 
 const floorList = computed(() => {
-  return dialogDataSource.value[housingActiveIndex.value]?.neighbourhoodNumberAndAddFlags;
+  return dialogDataSource.value[housingActiveIndex.value]?.neighbourhoodNumberAndAddFlags || [];
 })
 
 // 关联数据
@@ -265,20 +268,28 @@ const onPumpDialogConfirm = () => {
   })
 }
 
+const test = () => {
+  openRelationDialog();
+}
+
 // 显示 关联小区 - dialog
 const handleRelation = ({ id }) => {
   relationVisible.value = true;
+  pumpingStationId.value = id;
   openRelationDialog(id);  
 }
 
 // dialog - 关联小区 - 打开
-const openRelationDialog = (pumpingStationId) => {
-  servicesApi.getSimpleNeighbourhoodList({ pumpingStationId }).then(({ data }) => {
+const openRelationDialog = () => {
+  pumpLoading.value = true;
+  servicesApi.getSimpleNeighbourhoodList({ pumpingStationId: pumpingStationId.value, name: searchVal.value }).then(({ data }) => {
     dialogDataSource.value = data.map(item => {
       item.checkList = item.neighbourhoodNumberAndAddFlags.filter(item => item.addStatus == 2)
       return item;
     });
+    console.log( "floorList", floorList );
     checkList.value = floorList.value.filter(item => item.addStatus == 2).map(item => item.buildingId);
+    pumpLoading.value = false;
   })
 }
 
@@ -332,6 +343,7 @@ const onRelationCancel = () => {
   relationVisible.value = false;
   checkList.value = [];
   dialogDataSource.value = [];
+  searchVal.value = '';
 }
 
 // table数据
@@ -612,12 +624,12 @@ onMounted(() => {
         </div>
       </template>
 
-      <div class="relation-dialog-body space-x-[16px]">
+      <div class="relation-dialog-body space-x-[16px]" >
         <div class="dialog-inner_left">
           <div class="header">
-            <el-input :suffix-icon="Search"></el-input>
+            <el-input :suffix-icon="Search" v-model="searchVal" @change="test"></el-input>
           </div>
-          <div class="body">
+          <div class="body" v-loading="pumpLoading">
             <div class="body-inner_left">
               <el-scrollbar style="height: 100%;">
                 <ul class="housing-list">
@@ -636,6 +648,7 @@ onMounted(() => {
                     </el-tooltip>
                   </li>
                 </ul>
+                <div class="flex items-center justify-center pt-[40px]" v-show="dialogDataSource.length == 0">暂无数据</div>
               </el-scrollbar>
             </div>
             <div class="body-inner_right">
@@ -656,7 +669,7 @@ onMounted(() => {
           <div class="header">
             已选小区
           </div>
-          <div class="body">
+          <div class="body" v-loading="pumpLoading">
             <el-scrollbar style="height: 100%;">
               <ul class="body_inner space-y-[10px]">
                 <li v-for="item, index in contactCheckData" :key="index">