Explorar o código

ptw 改为 ptwTime

yanghao hai 1 mes
pai
achega
bae9ea2af9

+ 11 - 7
src/views/pms/constructionDailyReport/index.vue

@@ -71,13 +71,17 @@ const formRef = ref<InstanceType<typeof ConstructionDailyReportDrawer>>()
 function syncQueryFromRoute() {
   if (route.name !== pageRouteName) return
 
-  const nextQuery = createDefaultQuery()
-  query.value = {
-    ...query.value,
-    deptId: nextQuery.deptId,
-    projectDeptId: nextQuery.projectDeptId,
-    teamId: nextQuery.teamId,
-    createTime: nextQuery.createTime
+  if (route.query.deptId !== undefined) {
+    query.value.deptId = parseQueryNumber(route.query.deptId)
+  }
+  if (route.query.projectDeptId !== undefined) {
+    query.value.projectDeptId = parseQueryNumber(route.query.projectDeptId)
+  }
+  if (route.query.teamId !== undefined) {
+    query.value.teamId = parseQueryNumber(route.query.teamId)
+  }
+  if (route.query.createTime !== undefined) {
+    query.value.createTime = resolveCreateTimeFromRoute() ?? getDefaultCreateTime()
   }
 }
 

+ 30 - 56
src/views/pms/device/allotlog/DeviceAllot.vue

@@ -30,7 +30,7 @@ const deptId = useUserStore().getUser.deptId || rootDeptId
 const initQuery: QueryParams = {
   pageNo: 1,
   pageSize: 10,
-  deptId: undefined,
+  deptId,
   deviceCode: undefined,
   deviceName: undefined,
   brand: undefined,
@@ -146,26 +146,22 @@ onMounted(() => {
 
 <template>
   <div
-    class="device-allot-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
-  >
+    class="device-allot-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
     <DeptTreeSelect
       :top-id="rootDeptId"
       :deptId="deptId"
       v-model="queryParams.deptId"
-      :init-select="false"
       :show-title="false"
       request-api="getSimpleDeptList"
       class="device-allot-tree row-span-2"
-      @node-click="handleDeptNodeClick"
-    />
+      @node-click="handleDeptNodeClick" />
 
     <el-form
       ref="queryFormRef"
       :model="queryParams"
       size="default"
       label-width="68px"
-      class="device-allot-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0"
-    >
+      class="device-allot-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0">
       <div class="query-row">
         <el-form-item :label="t('devicePerson.deviceCode')" prop="deviceCode">
           <el-input
@@ -173,8 +169,7 @@ onMounted(() => {
             :placeholder="t('devicePerson.codeHolder')"
             clearable
             class="query-control"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item :label="t('devicePerson.deviceName')" prop="deviceName">
           <el-input
@@ -182,22 +177,19 @@ onMounted(() => {
             :placeholder="t('devicePerson.nameHolder')"
             clearable
             class="query-control"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item :label="t('deviceStatus.transfer')" prop="setFlag" label-width="90px">
           <el-select
             v-model="queryParams.setFlag"
             :placeholder="t('deviceStatus.choose')"
             clearable
-            class="query-control query-control--small"
-          >
+            class="query-control query-control--small">
             <el-option
               v-for="dict in resultOptions"
               :key="dict.value"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
         </el-form-item>
         <el-form-item label="创建时间" prop="createTime">
@@ -209,27 +201,23 @@ onMounted(() => {
             end-placeholder="结束日期"
             :shortcuts="rangeShortcuts"
             :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
-            class="query-control query-control--date"
-          />
+            class="query-control query-control--date" />
         </el-form-item>
         <el-form-item
           v-show="ifShow"
           :label="t('devicePerson.status')"
           prop="deviceStatus"
-          label-width="85px"
-        >
+          label-width="85px">
           <el-select
             v-model="queryParams.deviceStatus"
             :placeholder="t('devicePerson.status')"
             clearable
-            class="query-control query-control--small"
-          >
+            class="query-control query-control--small">
             <el-option
               v-for="dict in getStrDictOptions(DICT_TYPE.PMS_DEVICE_STATUS)"
               :key="dict.value"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
         </el-form-item>
         <el-form-item v-show="ifShow" :label="t('devicePerson.assets')" prop="assetProperty">
@@ -237,14 +225,12 @@ onMounted(() => {
             v-model="queryParams.assetProperty"
             :placeholder="t('devicePerson.assets')"
             clearable
-            class="query-control query-control--small"
-          >
+            class="query-control query-control--small">
             <el-option
               v-for="dict in getStrDictOptions(DICT_TYPE.PMS_ASSET_PROPERTY)"
               :key="dict.value"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
         </el-form-item>
         <el-form-item v-show="ifShow" :label="t('devicePerson.brand')" prop="brand">
@@ -253,8 +239,7 @@ onMounted(() => {
             :placeholder="t('devicePerson.brandHolder')"
             clearable
             class="query-control"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
       </div>
 
@@ -275,8 +260,7 @@ onMounted(() => {
           type="primary"
           plain
           @click="openForm"
-          v-hasPermi="['pms:iot-device-allot-log:create']"
-        >
+          v-hasPermi="['pms:iot-device-allot-log:create']">
           <Icon icon="ep:plus" class="mr-5px" />{{ t('deviceAllot.setUp') }}
         </el-button>
         <el-button
@@ -284,8 +268,7 @@ onMounted(() => {
           plain
           :loading="exportLoading"
           @click="handleExport"
-          v-hasPermi="['rq:iot-device:export']"
-        >
+          v-hasPermi="['rq:iot-device:export']">
           <Icon icon="ep:download" class="mr-5px" />导出
         </el-button>
       </el-form-item>
@@ -301,15 +284,13 @@ onMounted(() => {
               :width="width"
               :height="height"
               :max-height="height"
-              show-border
-            >
+              show-border>
               <ZmTableColumn
                 type="index"
                 :label="t('monitor.serial')"
                 :width="70"
                 fixed="left"
-                hide-in-column-settings
-              />
+                hide-in-column-settings />
               <ZmTableColumn prop="deviceCode" :label="t('monitor.deviceCode')" fixed="left" />
               <ZmTableColumn prop="deviceName" :label="t('monitor.deviceName')" fixed="left">
                 <template #default="{ row }">
@@ -330,8 +311,7 @@ onMounted(() => {
                     link
                     type="primary"
                     @click="handleView(row.id)"
-                    v-hasPermi="['rq:iot-device:query']"
-                  >
+                    v-hasPermi="['rq:iot-device:query']">
                     {{ t('deviceAllot.adjustmentRecords') }}
                   </el-button>
                 </template>
@@ -352,8 +332,7 @@ onMounted(() => {
           :total="total"
           layout="total, sizes, prev, pager, next, jumper"
           @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
+          @current-change="handleCurrentChange" />
       </div>
     </div>
   </div>
@@ -362,16 +341,14 @@ onMounted(() => {
     ref="showDrawer"
     :model-value="drawerVisible"
     :device-id="currentDeviceId"
-    @update:model-value="(val) => (drawerVisible = val)"
-  />
+    @update:model-value="(val) => (drawerVisible = val)" />
 </template>
 
 <style scoped>
 .device-allot-query {
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-  justify-content: space-between;
+  display: grid;
+  grid-template-columns: minmax(0, 1fr) max-content;
+  align-items: start;
   gap: 12px 24px;
 }
 
@@ -385,7 +362,7 @@ onMounted(() => {
 }
 
 .query-actions {
-  flex: 0 0 auto;
+  align-self: start;
 }
 
 .query-actions :deep(.el-form-item__content) {
@@ -414,13 +391,6 @@ onMounted(() => {
   margin-bottom: 0;
 }
 
-@media (width >= 2200px) {
-  .device-allot-query,
-  .query-row {
-    flex-wrap: nowrap;
-  }
-}
-
 @media (width <= 1500px) {
   .device-allot-query {
     gap: 12px 18px;
@@ -463,6 +433,10 @@ onMounted(() => {
   .query-actions {
     width: 100%;
   }
+
+  .device-allot-query {
+    grid-template-columns: minmax(0, 1fr);
+  }
 }
 
 @media (width <= 768px) {

+ 2 - 2
src/views/pms/device/index.vue

@@ -7,7 +7,6 @@
       :top-id="rootDeptId"
       :deptId="deptId"
       v-model="queryParams.deptId"
-      :init-select="false"
       :show-title="false"
       request-api="getSimpleDeptList"
       @node-click="handleDeptNodeClick" />
@@ -830,7 +829,7 @@ const queryParams = reactive<any>({
   brand: undefined,
   brandName: undefined,
   model: undefined,
-  deptId: undefined,
+  deptId,
   deviceStatus: undefined,
   assetProperty: undefined,
   picUrl: undefined,
@@ -1032,6 +1031,7 @@ const handleExport = async () => {
 
 /** 初始化 **/
 onMounted(async () => {
+  console.log('useUserStore().getUser.deptId :>> ', useUserStore().getUser.deptId)
   syncRouteCodeQuery()
   productClassifyList.value = handleTree(
     await ProductClassifyApi.IotProductClassifyApi.getSimpleProductClassifyList()

+ 17 - 34
src/views/pms/device/personlog/DevicePerson.vue

@@ -31,7 +31,7 @@ const deptId = useUserStore().getUser.deptId || rootDeptId
 const initQuery: QueryParams = {
   pageNo: 1,
   pageSize: 10,
-  deptId: undefined,
+  deptId,
   deviceCode: undefined,
   deviceName: undefined,
   setFlag: '',
@@ -141,26 +141,22 @@ onMounted(() => {
 
 <template>
   <div
-    class="grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
-  >
+    class="grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
     <DeptTreeSelect
       :top-id="rootDeptId"
       :deptId="deptId"
       v-model="queryParams.deptId"
-      :init-select="false"
       :show-title="false"
       request-api="getSimpleDeptList"
       @node-click="handleDeptNodeClick"
-      class="row-span-2"
-    />
+      class="row-span-2" />
 
     <el-form
       ref="queryFormRef"
       :model="queryParams"
       size="default"
       label-width="68px"
-      class="bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-8 py-3 gap-6 flex items-center justify-between flex-wrap min-w-0"
-    >
+      class="bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-8 py-3 gap-6 flex items-center justify-between flex-wrap min-w-0">
       <div class="flex items-center gap-6 flex-wrap">
         <el-form-item :label="t('devicePerson.deviceCode')" prop="deviceCode">
           <el-input
@@ -168,8 +164,7 @@ onMounted(() => {
             :placeholder="t('devicePerson.codeHolder')"
             clearable
             class="!w-180px"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item :label="t('devicePerson.deviceName')" prop="deviceName">
           <el-input
@@ -177,26 +172,22 @@ onMounted(() => {
             :placeholder="t('devicePerson.nameHolder')"
             clearable
             class="!w-180px"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item
           :label="t('devicePerson.responsiblePerson')"
           prop="setFlag"
-          label-width="120px"
-        >
+          label-width="120px">
           <el-select
             v-model="queryParams.setFlag"
             :placeholder="t('devicePerson.choose')"
             clearable
-            class="!w-140px"
-          >
+            class="!w-140px">
             <el-option
               v-for="dict in resultOptions"
               :key="dict.value"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
         </el-form-item>
         <el-form-item :label="t('devicePerson.rp')" prop="nickname">
@@ -205,8 +196,7 @@ onMounted(() => {
             :placeholder="t('devicePerson.nicknameHolder')"
             clearable
             class="!w-180px"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item label="创建时间" prop="createTime">
           <el-date-picker
@@ -217,8 +207,7 @@ onMounted(() => {
             end-placeholder="结束日期"
             :shortcuts="rangeShortcuts"
             :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
-            class="!w-220px"
-          />
+            class="!w-220px" />
         </el-form-item>
       </div>
 
@@ -233,8 +222,7 @@ onMounted(() => {
           type="primary"
           plain
           @click="openForm"
-          v-hasPermi="['pms:iot-device-person-log:create']"
-        >
+          v-hasPermi="['pms:iot-device-person-log:create']">
           <Icon icon="ep:plus" class="mr-5px" />{{ t('devicePerson.setUp') }}
         </el-button>
         <el-button type="success" plain :loading="exportLoading" @click="handleExport">
@@ -253,15 +241,13 @@ onMounted(() => {
               :width="width"
               :height="height"
               :max-height="height"
-              show-border
-            >
+              show-border>
               <ZmTableColumn
                 type="index"
                 :label="t('monitor.serial')"
                 :width="70"
                 fixed="left"
-                hide-in-column-settings
-              />
+                hide-in-column-settings />
               <ZmTableColumn prop="deviceCode" :label="t('monitor.deviceCode')" fixed="left" />
               <ZmTableColumn prop="deviceName" :label="t('monitor.deviceName')" fixed="left">
                 <template #default="{ row }">
@@ -278,8 +264,7 @@ onMounted(() => {
                     link
                     type="primary"
                     @click="handleView(row.id)"
-                    v-hasPermi="['rq:iot-device:query']"
-                  >
+                    v-hasPermi="['rq:iot-device:query']">
                     {{ t('devicePerson.adjustmentRecords') }}
                   </el-button>
                 </template>
@@ -300,8 +285,7 @@ onMounted(() => {
           :total="total"
           layout="total, sizes, prev, pager, next, jumper"
           @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
+          @current-change="handleCurrentChange" />
       </div>
     </div>
   </div>
@@ -310,8 +294,7 @@ onMounted(() => {
     ref="showDrawer"
     :model-value="drawerVisible"
     :device-id="currentDeviceId"
-    @update:model-value="(val) => (drawerVisible = val)"
-  />
+    @update:model-value="(val) => (drawerVisible = val)" />
 </template>
 
 <style scoped>

+ 29 - 54
src/views/pms/device/statuslog/DeviceStatus.vue

@@ -30,7 +30,7 @@ const deptId = useUserStore().getUser.deptId || rootDeptId
 const initQuery: QueryParams = {
   pageNo: 1,
   pageSize: 10,
-  deptId: undefined,
+  deptId,
   deviceCode: undefined,
   deviceName: undefined,
   brand: undefined,
@@ -146,26 +146,22 @@ onMounted(() => {
 
 <template>
   <div
-    class="device-status-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
-  >
+    class="device-status-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
     <DeptTreeSelect
       :top-id="rootDeptId"
       :deptId="deptId"
       v-model="queryParams.deptId"
-      :init-select="false"
       :show-title="false"
       request-api="getSimpleDeptList"
       class="device-status-tree row-span-2"
-      @node-click="handleDeptNodeClick"
-    />
+      @node-click="handleDeptNodeClick" />
 
     <el-form
       ref="queryFormRef"
       :model="queryParams"
       size="default"
       label-width="68px"
-      class="device-status-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0"
-    >
+      class="device-status-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0">
       <div class="query-row">
         <el-form-item :label="t('devicePerson.deviceCode')" prop="deviceCode">
           <el-input
@@ -173,8 +169,7 @@ onMounted(() => {
             :placeholder="t('devicePerson.codeHolder')"
             clearable
             class="query-control"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item :label="t('devicePerson.deviceName')" prop="deviceName">
           <el-input
@@ -182,22 +177,19 @@ onMounted(() => {
             :placeholder="t('devicePerson.nameHolder')"
             clearable
             class="query-control"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
         <el-form-item :label="t('deviceStatus.statusAdjust')" prop="setFlag" label-width="100px">
           <el-select
             v-model="queryParams.setFlag"
             :placeholder="t('deviceStatus.choose')"
             clearable
-            class="query-control query-control--small"
-          >
+            class="query-control query-control--small">
             <el-option
               v-for="dict in resultOptions"
               :key="dict.value"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
         </el-form-item>
         <el-form-item label="创建时间" prop="createTime">
@@ -209,27 +201,23 @@ onMounted(() => {
             end-placeholder="结束日期"
             :shortcuts="rangeShortcuts"
             :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
-            class="query-control query-control--date"
-          />
+            class="query-control query-control--date" />
         </el-form-item>
         <el-form-item
           v-show="ifShow"
           :label="t('devicePerson.status')"
           prop="deviceStatus"
-          label-width="85px"
-        >
+          label-width="85px">
           <el-select
             v-model="queryParams.deviceStatus"
             :placeholder="t('devicePerson.status')"
             clearable
-            class="query-control query-control--small"
-          >
+            class="query-control query-control--small">
             <el-option
               v-for="dict in getStrDictOptions(DICT_TYPE.PMS_DEVICE_STATUS)"
               :key="dict.value"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
         </el-form-item>
         <el-form-item v-show="ifShow" :label="t('devicePerson.assets')" prop="assetProperty">
@@ -237,14 +225,12 @@ onMounted(() => {
             v-model="queryParams.assetProperty"
             :placeholder="t('devicePerson.assetsHolder')"
             clearable
-            class="query-control query-control--small"
-          >
+            class="query-control query-control--small">
             <el-option
               v-for="dict in getStrDictOptions(DICT_TYPE.PMS_ASSET_PROPERTY)"
               :key="dict.value"
               :label="dict.label"
-              :value="dict.value"
-            />
+              :value="dict.value" />
           </el-select>
         </el-form-item>
         <el-form-item v-show="ifShow" :label="t('devicePerson.brand')" prop="brand">
@@ -253,8 +239,7 @@ onMounted(() => {
             :placeholder="t('devicePerson.brandHolder')"
             clearable
             class="query-control"
-            @keyup.enter="handleQuery"
-          />
+            @keyup.enter="handleQuery" />
         </el-form-item>
       </div>
 
@@ -275,8 +260,7 @@ onMounted(() => {
           type="primary"
           plain
           @click="openForm"
-          v-hasPermi="['pms:iot-device-status-log:create']"
-        >
+          v-hasPermi="['pms:iot-device-status-log:create']">
           <Icon icon="ep:plus" class="mr-5px" />{{ t('deviceStatus.setUp') }}
         </el-button>
         <el-button type="success" plain :loading="exportLoading" @click="handleExport">
@@ -295,15 +279,13 @@ onMounted(() => {
               :width="width"
               :height="height"
               :max-height="height"
-              show-border
-            >
+              show-border>
               <ZmTableColumn
                 type="index"
                 :label="t('monitor.serial')"
                 :width="70"
                 fixed="left"
-                hide-in-column-settings
-              />
+                hide-in-column-settings />
               <ZmTableColumn prop="deviceCode" :label="t('monitor.deviceCode')" fixed="left" />
               <ZmTableColumn prop="deviceName" :label="t('monitor.deviceName')" fixed="left">
                 <template #default="{ row }">
@@ -324,8 +306,7 @@ onMounted(() => {
                     link
                     type="primary"
                     @click="handleView(row.id)"
-                    v-hasPermi="['rq:iot-device:query']"
-                  >
+                    v-hasPermi="['rq:iot-device:query']">
                     {{ t('deviceStatus.adjustmentRecords') }}
                   </el-button>
                 </template>
@@ -346,8 +327,7 @@ onMounted(() => {
           :total="total"
           layout="total, sizes, prev, pager, next, jumper"
           @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
+          @current-change="handleCurrentChange" />
       </div>
     </div>
   </div>
@@ -356,16 +336,14 @@ onMounted(() => {
     ref="showDrawer"
     :model-value="drawerVisible"
     :device-id="currentDeviceId"
-    @update:model-value="(val) => (drawerVisible = val)"
-  />
+    @update:model-value="(val) => (drawerVisible = val)" />
 </template>
 
 <style scoped>
 .device-status-query {
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-  justify-content: space-between;
+  display: grid;
+  grid-template-columns: minmax(0, 1fr) max-content;
+  align-items: start;
   gap: 12px 24px;
 }
 
@@ -379,7 +357,7 @@ onMounted(() => {
 }
 
 .query-actions {
-  flex: 0 0 auto;
+  align-self: start;
 }
 
 .query-actions :deep(.el-form-item__content) {
@@ -408,13 +386,6 @@ onMounted(() => {
   margin-bottom: 0;
 }
 
-@media (width >= 2200px) {
-  .device-status-query,
-  .query-row {
-    flex-wrap: nowrap;
-  }
-}
-
 @media (width <= 1500px) {
   .device-status-query {
     gap: 12px 18px;
@@ -457,6 +428,10 @@ onMounted(() => {
   .query-actions {
     width: 100%;
   }
+
+  .device-status-query {
+    grid-template-columns: minmax(0, 1fr);
+  }
 }
 
 @media (width <= 768px) {

+ 9 - 14
src/views/pms/failure/index.vue

@@ -5,7 +5,6 @@
       :top-id="rootDeptId"
       :dept-id="deptId"
       v-model="queryParams.deptId"
-      :init-select="false"
       :show-title="false"
       request-api="getSimpleDeptList"
       class="failure-tree row-span-2"
@@ -296,7 +295,7 @@ const queryParams = reactive({
   solution: undefined,
   remark: undefined,
   createTime: [],
-  deptId: undefined
+  deptId
 })
 const queryFormRef = ref() // 搜索的表单
 const exportLoading = ref(false) // 导出的加载中
@@ -385,10 +384,9 @@ onMounted(() => {
 
 <style scoped>
 .failure-query {
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-  justify-content: space-between;
+  display: grid;
+  grid-template-columns: minmax(0, 1fr) max-content;
+  align-items: start;
   gap: 12px 24px;
 }
 
@@ -402,7 +400,7 @@ onMounted(() => {
 }
 
 .query-actions {
-  flex: 0 0 auto;
+  align-self: start;
 }
 
 .query-actions :deep(.el-form-item__content) {
@@ -431,13 +429,6 @@ onMounted(() => {
   margin-bottom: 0;
 }
 
-@media (width >= 2200px) {
-  .failure-query,
-  .query-row {
-    flex-wrap: nowrap;
-  }
-}
-
 @media (width <= 1500px) {
   .failure-query {
     gap: 12px 18px;
@@ -480,6 +471,10 @@ onMounted(() => {
   .query-actions {
     width: 100%;
   }
+
+  .failure-query {
+    grid-template-columns: minmax(0, 1fr);
+  }
 }
 
 @media (width <= 768px) {

+ 12 - 4
src/views/pms/iotrddailyreport/index.vue

@@ -202,10 +202,18 @@ watch(
   () => {
     if (route.name !== pageRouteName) return
 
-    query.value.deptId = route.query.deptId ? Number(route.query.deptId) : id
-    query.value.createTime = getRouteCreateTime()
-    query.value.taskName = getRouteTaskName()
-    query.value.rdStatus = getRouteRdStatus()
+    if (route.query.deptId !== undefined) {
+      query.value.deptId = Number(route.query.deptId)
+    }
+    if (route.query.createTime !== undefined) {
+      query.value.createTime = getRouteCreateTime()
+    }
+    if (route.query.taskName !== undefined) {
+      query.value.taskName = getRouteTaskName()
+    }
+    if (route.query.nptName !== undefined) {
+      query.value.rdStatus = getRouteRdStatus()
+    }
   }
 )
 

+ 6 - 2
src/views/pms/iotrhdailyreport/index.vue

@@ -64,8 +64,12 @@ const getRouteCreateTime = () => {
 const syncQueryFromRoute = () => {
   if (route.name !== pageRouteName) return
 
-  query.value.deptId = route.query.deptId ? Number(route.query.deptId) : id
-  query.value.createTime = getRouteCreateTime()
+  if (route.query.deptId !== undefined) {
+    query.value.deptId = Number(route.query.deptId)
+  }
+  if (route.query.createTime !== undefined) {
+    query.value.createTime = getRouteCreateTime()
+  }
 }
 
 const totalWorkKeys: [string, string, string, string, number][] = [

+ 9 - 5
src/views/pms/iotrydailyreport/index.vue

@@ -62,11 +62,15 @@ const getRouteCreateTime = () => {
 const syncQueryFromRoute = () => {
   if (route.name !== pageRouteName) return
 
-  query.value.deptId = route.query.deptId ? Number(route.query.deptId) : id
-  query.value.createTime = getRouteCreateTime()
-  query.value.projectClassification = route.query.projectClassification
-    ? String(route.query.projectClassification)
-    : '1'
+  if (route.query.deptId !== undefined) {
+    query.value.deptId = Number(route.query.deptId)
+  }
+  if (route.query.createTime !== undefined) {
+    query.value.createTime = getRouteCreateTime()
+  }
+  if (route.query.projectClassification !== undefined) {
+    query.value.projectClassification = String(route.query.projectClassification)
+  }
 }
 
 const list = ref<any[]>([])

+ 9 - 5
src/views/pms/iotrydailyreport/xjindex.vue

@@ -62,11 +62,15 @@ const getRouteCreateTime = () => {
 const syncQueryFromRoute = () => {
   if (route.name !== pageRouteName) return
 
-  query.value.deptId = route.query.deptId ? Number(route.query.deptId) : id
-  query.value.createTime = getRouteCreateTime()
-  query.value.projectClassification = route.query.projectClassification
-    ? String(route.query.projectClassification)
-    : '2'
+  if (route.query.deptId !== undefined) {
+    query.value.deptId = Number(route.query.deptId)
+  }
+  if (route.query.createTime !== undefined) {
+    query.value.createTime = getRouteCreateTime()
+  }
+  if (route.query.projectClassification !== undefined) {
+    query.value.projectClassification = String(route.query.projectClassification)
+  }
 }
 
 const list = ref<any[]>([])