Browse Source

✨ feat: 增加自动乐跑时段检索、修复已知问题

Pchen. 8 months ago
parent
commit
dd8c9b8959

+ 1 - 2
src/components/Map/MapContainer.vue

@@ -37,7 +37,7 @@ onMounted(() => {
         pitch: 50, //地图俯仰角度,有效范围 0 度- 83 度
         viewMode: props.threeD ? '3D' : '2D', //地图模式
         rotateEnable: true, //是否开启地图旋转交互 鼠标右键 + 鼠标画圈移动 或 键盘Ctrl + 鼠标左键画圈移动
-        pitchEnable: true, //是否开启地图倾斜交互 鼠标右键 + 鼠标上下移动或键盘Ctrl + 鼠标左键上下移动
+        pitchEnable: true, //是否开启地图倾斜交互 鼠标右键 + 鼠标上下移动或键盘Ctrl +鼠 标左键上下移动
         zoom: 18, //初始化地图层级
         rotation: -15, //初始地图顺时针旋转的角度
         zooms: [3, 20], //地图显示的缩放级别范围
@@ -83,7 +83,6 @@ onMounted(() => {
       }
 
       if (props.log_list?.length > 0) {
-        console.log(props.log_list)
         props.log_list.forEach((point, index) => {
           const markerLocation = [Number(point.jingwei[1]), Number(point.jingwei[0])]
           const marker = new AMap.Marker({

+ 18 - 7
src/pages/admin/lepaoAccount/accountList.vue

@@ -7,7 +7,6 @@
                 <a-col :flex="1">
                     <a-form :model="queryData" :label-col-props="{ span: 6 }" :wrapper-col-props="{ span: 18 }"
                         label-align="left">
-
                         <a-row :gutter="16">
                             <a-col :span="8">
                                 <a-form-item field="area" label="跑区">
@@ -40,11 +39,21 @@
                                 </a-form-item>
                             </a-col>
                             <a-col :span="8">
-                                <a-form-item field="area" label="账号状态">
+                                <a-form-item field="state" label="账号状态">
                                     <a-select v-model="queryData.state" :options="state" placeholder="请选择账号状态"
                                         :default-value="-1" />
                                 </a-form-item>
                             </a-col>
+                            <a-col :span="8">
+                                <a-form-item field="auto_time" label="乐跑时段">
+                                    <a-select v-model="queryData.auto_time" placeholder="请选择自动乐跑时段" :default-value="-1">
+                                        <a-option :value="-1">所有时段</a-option>
+                                        <a-option v-for="(item, index) in auto_time" :key="index" :value="item.value">
+                                            {{ item.label }}
+                                        </a-option>
+                                    </a-select>
+                                </a-form-item>
+                            </a-col>
                         </a-row>
                     </a-form>
                 </a-col>
@@ -77,15 +86,15 @@
             }" @page-change="handlePageChange" @page-size-change="handlePageSizeChange">
                 <template #create_user="{ record }">
                     <a-avatar :size="30">
-                        <IconUser v-if="!record.avatar" />
-                        <img :alt="record.create_user ?? ''" :src="record.avatar" v-else />
+                        <img :alt="record.create_user ?? ''"
+                            :src="record.avatar || 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
                     </a-avatar>
                     {{ record.create_user }}
                 </template>
                 <template #name="{ record }">
                     <a-avatar :size="30">
                         <img :alt="record.name ?? ''"
-                            :src="record.user_avatar ?? 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
+                            :src="record.user_avatar || 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
                     </a-avatar>
                     {{ record.name }}
                 </template>
@@ -173,7 +182,7 @@
             <a-form-item field="auto_run" label="自动乐跑开关">
                 <a-switch v-model="form.auto_run" :checked-value="1" :unchecked-value="0" />
             </a-form-item>
-            <a-form-item field="area" label="自动乐跑时段">
+            <a-form-item field="auto_time" label="自动乐跑时段">
                 <a-select v-model="form.auto_time" placeholder="请选择每天自动乐跑的时段" :options="auto_time" />
             </a-form-item>
             <a-form-item field="notes" label="备注">
@@ -199,7 +208,8 @@ const queryData = reactive({
     user_uuid: '',
     email: '',
     username: '',
-    state: -1
+    state: -1,
+    auto_time: -1
 })
 
 const pagination = reactive({
@@ -320,6 +330,7 @@ const reset = () => {
     queryData.email = ''
     queryData.username = ''
     queryData.state = -1
+    queryData.auto_time = -1
     getAccounts()
 }
 

+ 10 - 1
src/pages/admin/lepaoRecords/lepaoRecords.vue

@@ -68,6 +68,15 @@
         </template>
 
         <template #columns>
+          <a-table-column title="所属用户" :width="160">
+            <template #cell="{ record }">
+              <a-avatar :size="30">
+                <img :alt="record.username ?? ''"
+                  :src="record.avatar || 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
+              </a-avatar>
+              {{ record.username }}
+            </template>
+          </a-table-column>
           <a-table-column title="学号" :width="120" data-index="lepao_account" ellipsis tooltip :filterable="{
             filter: (value, record) => (record.lepao_account ?? '').includes(value),
             slotName: 'name-filter',
@@ -81,7 +90,7 @@
             <template #cell="{ record }">
               <a-avatar :size="30">
                 <img :alt="record.name ?? ''"
-                  :src="record.user_avatar ?? 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
+                  :src="record.user_avatar || 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
               </a-avatar>
               {{ record.name }}
             </template>

+ 1 - 1
src/pages/lepao/accountList/index.vue

@@ -112,7 +112,7 @@
             <template #cell="{ record }">
               <a-avatar>
                 <img :alt="record.name ?? ''"
-                  :src="record.user_avatar ?? 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
+                  :src="record.user_avatar || 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
               </a-avatar>
             </template>
           </a-table-column>

+ 1 - 1
src/pages/lepao/lepaoRecords/index.vue

@@ -91,7 +91,7 @@
             <template #cell="{ record }">
               <a-avatar :size="30">
                 <img :alt="record.name ?? ''"
-                  :src="record.user_avatar ?? 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
+                  :src="record.user_avatar || 'https://lepao-cloud.xxoo365.top/view.php/25aa126dc406974ff3579a99a2c6501a.png'" />
               </a-avatar>
               {{ record.name }}
             </template>

+ 1 - 1
src/pages/power/accountList.vue

@@ -10,7 +10,7 @@
         添加提醒任务
       </a-button>
 
-      <a-alert style="margin-top: 15px;">电费单价:¥0.54/千瓦时。仅保存最近30天的电费变更记录。电费余额每30分钟更新一次,添加任务后开始记录。</a-alert>
+      <a-alert style="margin-top: 15px;">电费单价:¥0.54/千瓦时。仅保存最近180天的电费变更记录。电费余额每30分钟更新一次,添加任务后开始记录。</a-alert>
 
       <a-table :data="data" :columns="columns" :bordered="false" hoverable class="table" :loading="loading" :scroll="{
         x: 1600