Browse Source

看板调整

yanghao 1 week ago
parent
commit
e2d5e6e52c
3 changed files with 40 additions and 50 deletions
  1. 1 1
      .env.local
  2. 34 48
      src/views/pms/device/monitor/index.vue
  3. 5 1
      src/views/pms/qhse/kanban/index.vue

+ 1 - 1
.env.local

@@ -4,7 +4,7 @@ NODE_ENV=development
 VITE_DEV=true
 
 # 请求路径  http://192.168.188.79:48080  https://iot.deepoil.cc  http://172.26.0.56:48080
-VITE_BASE_URL='https://iot.deepoil.cc'
+VITE_BASE_URL='http://172.26.0.56:48080'
 
 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
 VITE_UPLOAD_TYPE=server

+ 34 - 48
src/views/pms/device/monitor/index.vue

@@ -6,25 +6,17 @@
       <ContentWrap v-loading="loading" style="border: none">
         <div style="border: none" class="px-2 py-3 rounded-sm bg-white">
           <!-- 搜索工作栏 -->
-          <el-form
-            class="-mb-15px"
-            :model="queryParams"
-            ref="queryFormRef"
-            :inline="true"
-            label-width="68px"
-          >
+          <el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true">
             <el-form-item
               :label="t('monitor.deviceName')"
               prop="deviceName"
-              style="margin-left: 20px"
-            >
+              style="margin-left: 20px">
               <el-input
                 v-model="queryParams.deviceName"
                 :placeholder="t('monitor.nameHolder')"
                 clearable
                 @keyup.enter="handleQuery"
-                class="!w-240px"
-              />
+                class="!w-240px" />
             </el-form-item>
             <el-form-item :label="t('monitor.deviceCode')" prop="deviceCode">
               <el-input
@@ -32,36 +24,42 @@
                 :placeholder="t('monitor.codeHolder')"
                 clearable
                 @keyup.enter="handleQuery"
-                class="!w-240px"
-              />
+                class="!w-240px" />
             </el-form-item>
             <el-form-item :label="t('monitor.ifInline')" prop="ifInline">
               <el-select
                 v-model="queryParams.ifInline"
                 :placeholder="t('monitor.ifInlineHolder')"
                 clearable
-                class="!w-240px"
-              >
+                class="!w-240px">
                 <el-option
                   v-for="dict in getStrDictOptions(DICT_TYPE.IOT_DEVICE_STATUS)"
                   :key="dict.value"
                   :label="dict.label"
-                  :value="dict.value"
-                />
+                  :value="dict.value" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="数采查询" prop="source">
+              <el-select
+                v-model="queryParams.source"
+                placeholder="请选择数采来源"
+                clearable
+                class="!w-240px">
+                <el-option label="全部" value="all" />
+                <el-option label="网关设备" value="gateway" />
+                <el-option label="中行北斗" value="zhbd" />
               </el-select>
             </el-form-item>
             <el-form-item class="float-right !mr-0 !mb-0">
               <el-button-group>
                 <el-button
                   :type="viewMode === 'card' ? 'primary' : 'default'"
-                  @click="viewMode = 'card'"
-                >
+                  @click="viewMode = 'card'">
                   <Icon icon="ep:grid" />
                 </el-button>
                 <el-button
                   :type="viewMode === 'list' ? 'primary' : 'default'"
-                  @click="viewMode = 'list'"
-                >
+                  @click="viewMode = 'list'">
                   <Icon icon="ep:list" />
                 </el-button>
               </el-button-group>
@@ -80,8 +78,7 @@
                 plain
                 @click="handleExport"
                 :loading="exportLoading"
-                v-hasPermi="['iot:device:export']"
-              >
+                v-hasPermi="['iot:device:export']">
                 <Icon icon="ep:download" class="mr-5px" /> 导出
               </el-button>
             </el-form-item>
@@ -99,12 +96,10 @@
                 :sm="12"
                 :md="12"
                 :lg="6"
-                class="mb-4"
-              >
+                class="mb-4">
                 <el-card
                   class="h-full transition-colors relative overflow-hidden custom-card"
-                  :body-style="{ padding: '0' }"
-                >
+                  :body-style="{ padding: '0' }">
                   <!-- 添加渐变背景层 -->
                   <div
                     class="absolute top-0 left-0 right-0 h-[50px] pointer-events-none"
@@ -112,8 +107,7 @@
                       item.ifInline === 3
                         ? 'bg-gradient-to-b from-[#eefaff] to-transparent'
                         : 'bg-gradient-to-b from-[#fff1f1] to-transparent'
-                    ]"
-                  >
+                    ]">
                   </div>
                   <div class="p-4 relative">
                     <!-- 标题区域 -->
@@ -132,13 +126,11 @@
                             item.ifInline === 3
                               ? 'bg-[var(--el-color-success)]'
                               : 'bg-[var(--el-color-danger)]'
-                          "
-                        >
+                          ">
                         </div>
                         <el-text
                           class="!text-xs font-bold"
-                          :type="item.ifInline === 3 ? 'success' : 'danger'"
-                        >
+                          :type="item.ifInline === 3 ? 'success' : 'danger'">
                           {{ getDictLabel(DICT_TYPE.IOT_DEVICE_STATUS, item.ifInline) }}
                         </el-text>
                       </div>
@@ -172,8 +164,7 @@
                         <img
                           v-if="!item.carId"
                           src="@/assets/imgs/iot/device.png"
-                          class="w-full h-full"
-                        />
+                          class="w-full h-full" />
                         <img v-if="item.carId" src="@/assets/imgs/iot/car.png" class="mt-4 ml-4" />
                       </div>
                     </div>
@@ -198,8 +189,7 @@
                             item.vehicleName,
                             item.carOnline ?? ''
                           )
-                        "
-                      >
+                        ">
                         <Icon icon="ep:view" class="mr-1" />
                         {{ t('monitor.details') }}
                       </el-button>
@@ -218,8 +208,7 @@
             :data="list"
             :stripe="true"
             height="60vh"
-            :show-overflow-tooltip="true"
-          >
+            :show-overflow-tooltip="true">
             <zm-table-column :label="t('monitor.serial')" width="60" align="center">
               <template #default="scope">
                 {{ scope.$index + 1 }}
@@ -248,14 +237,12 @@
               align="center"
               prop="lastInlineTime"
               :formatter="dateFormatter"
-              width="180px"
-            />
+              width="180px" />
             <zm-table-column
               :label="t('monitor.operation')"
               align="center"
               min-width="120px"
-              action
-            >
+              action>
               <template #default="scope">
                 <el-button
                   link
@@ -271,8 +258,7 @@
                       scope.row.vehicleName,
                       scope.row.carOnline ?? ''
                     )
-                  "
-                >
+                  ">
                   {{ t('monitor.check') }}
                 </el-button>
               </template>
@@ -284,8 +270,7 @@
             :total="total"
             v-model:page="queryParams.pageNo"
             v-model:limit="queryParams.pageSize"
-            @pagination="getList"
-          />
+            @pagination="getList" />
         </ContentWrap>
       </ContentWrap>
     </el-col>
@@ -340,7 +325,8 @@ const queryParams = reactive({
   infoUrl: undefined,
   templateJson: undefined,
   creator: undefined,
-  ifInline: undefined
+  ifInline: undefined,
+  source: undefined
 })
 const queryFormRef = ref() // 搜索的表单
 const exportLoading = ref(false) // 导出加载状态

+ 5 - 1
src/views/pms/qhse/kanban/index.vue

@@ -1008,7 +1008,7 @@ onUnmounted(() => {
                 v-model="timeVal"
                 :teleport="true"
                 :type="type === 'day' ? 'date' : type === 'month' ? 'month' : 'year'"
-                class="summary-toolbar__picker"
+                class="summary-toolbar__picker el-date-picker"
                 popper-class="summary-toolbar__picker-popper"
                 value-format="YYYY-MM-DD"
                 range-separator="~"
@@ -1848,6 +1848,10 @@ onUnmounted(() => {
   font-size: 14px !important;
 }
 
+:deep(.el-date-editor.is-active) {
+  border-color: #ff6a00 !important;
+}
+
 .certificate-pagination {
   padding-top: 14px;
 }