瀏覽代碼

调整瑞都看板,和瑞鹰看板

- 瑞都看板主要调整生产日报
Zimo 1 天之前
父節點
當前提交
2802e9eb7d
共有 3 個文件被更改,包括 85 次插入48 次删除
  1. 1 1
      .env.local
  2. 26 21
      src/views/pms/stat/rdkb/rd-value.vue
  3. 58 26
      src/views/pms/stat/rhkb/deviceList.vue

+ 1 - 1
.env.local

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

+ 26 - 21
src/views/pms/stat/rdkb/rd-value.vue

@@ -61,7 +61,6 @@ const chartData: ValueDistributionItem[] = [
 const chartRef = ref<HTMLDivElement>()
 let chart: echarts.ECharts | null = null
 const BAR_WIDTH = 22
-const LABEL_FONT_SIZE = 13
 
 function getBarStyle(color: (typeof THEME.color)[keyof typeof THEME.color]) {
   return {
@@ -178,19 +177,22 @@ function getChartOption(data: ValueDistributionItem[]): echarts.EChartsOption {
         barGap: '18%',
         itemStyle: getBarStyle(THEME.color.blue),
         label: {
-          show: true,
-          position: 'top',
-          distance: 10,
-          color: THEME.color.blue.strong,
-          fontSize: LABEL_FONT_SIZE,
-          fontWeight: 700,
-          fontFamily: FONT_FAMILY,
-          formatter(params: any) {
-            return Number(params.value) ? formatMoney(params.value) : ''
-          }
+          show: false
         },
         emphasis: {
           focus: 'series',
+          label: {
+            show: true,
+            position: 'top',
+            distance: 10,
+            color: THEME.color.blue.strong,
+            fontSize: 13,
+            fontWeight: 700,
+            fontFamily: FONT_FAMILY,
+            formatter(params: any) {
+              return Number(params.value) ? formatMoney(params.value) : ''
+            }
+          },
           itemStyle: {
             ...getBarStyle(THEME.color.blue),
             shadowColor: THEME.color.blue.shadow,
@@ -206,19 +208,22 @@ function getChartOption(data: ValueDistributionItem[]): echarts.EChartsOption {
         barMaxWidth: 28,
         itemStyle: getBarStyle(THEME.color.green),
         label: {
-          show: true,
-          position: 'top',
-          distance: 6,
-          color: THEME.color.green.strong,
-          fontSize: LABEL_FONT_SIZE,
-          fontWeight: 700,
-          fontFamily: FONT_FAMILY,
-          formatter(params: any) {
-            return Number(params.value) ? formatMoney(params.value) : ''
-          }
+          show: false
         },
         emphasis: {
           focus: 'series',
+          label: {
+            show: true,
+            position: 'top',
+            distance: 6,
+            color: THEME.color.green.strong,
+            fontSize: 13,
+            fontWeight: 700,
+            fontFamily: FONT_FAMILY,
+            formatter(params: any) {
+              return Number(params.value) ? formatMoney(params.value) : ''
+            }
+          },
           itemStyle: {
             ...getBarStyle(THEME.color.green),
             shadowColor: THEME.color.green.shadow,

+ 58 - 26
src/views/pms/stat/rhkb/deviceList.vue

@@ -1,6 +1,5 @@
 <script lang="ts" setup>
 import { IotStatApi } from '@/api/pms/stat'
-import { rangeShortcuts } from '@/utils/formatTime'
 import dayjs from 'dayjs'
 import type { Ref } from 'vue'
 
@@ -8,11 +7,16 @@ interface RhDeviceListRow {
   projectDeptId: number
   projectDeptName: string
   teamCount: number
-  cumulativeDays: number
-  constructionDays: number
-  utilizationRate: number
+  sgTeamCount: number
+  zbTeamCount: number
+  dmTeamCount: number
+  hourUtilizationRate: number
+  waterInjection: number
+  yearWaterInjection: number
   gasInjection: number
+  yearGasInjection: number
   sort?: number | null
+  productionSummary: string
 }
 
 interface RhTeamRateRow {
@@ -24,9 +28,7 @@ interface RhTeamRateRow {
 
 const TABLE_HEIGHT = 220
 const TEAM_TABLE_HEIGHT = 500
-const DEFAULT_TIME_RANGE = rangeShortcuts[2]
-  .value()
-  .map((item) => dayjs(item).format('YYYY-MM-DD HH:mm:ss'))
+const DEFAULT_DATE = dayjs().subtract(1, 'day').format('YYYY-MM-DD')
 
 const props = withDefaults(
   defineProps<{
@@ -37,7 +39,7 @@ const props = withDefaults(
   }
 )
 
-const createTime = ref<string[]>(DEFAULT_TIME_RANGE)
+const createDate = ref(DEFAULT_DATE)
 const loading = ref(false)
 const list = ref<RhDeviceListRow[]>([])
 const teamDialogVisible = ref(false)
@@ -47,16 +49,20 @@ const teamList = ref<RhTeamRateRow[]>([])
 const kbScale = inject<Ref<number>>('rhKbScale', ref(1))
 
 const tableData = computed(() => list.value)
+const createTime = computed(() => [
+  dayjs(createDate.value).startOf('day').format('YYYY-MM-DD HH:mm:ss'),
+  dayjs(createDate.value).endOf('day').format('YYYY-MM-DD HH:mm:ss')
+])
 const tableHeight = computed<number | string>(() =>
   props.pageMode === 'full' ? '100%' : Math.round(TABLE_HEIGHT * kbScale.value)
 )
 
 function formatRate(value?: number | null) {
-  return `${(Number(value ?? 0) * 100).toFixed(2)}%`
+  return value === null || value === undefined ? '--' : `${(Number(value) * 100).toFixed(2)}%`
 }
 
-function formatGasInjection(value?: number | null) {
-  return (Number(value ?? 0) / 10000).toFixed(2)
+function formatInjection(value?: number | null) {
+  return value === null || value === undefined ? '--' : value
 }
 
 function handleDateChange() {
@@ -121,14 +127,11 @@ onMounted(() => {
       </div>
       <div class="device-list-panel__picker">
         <el-date-picker
-          v-model="createTime"
-          value-format="YYYY-MM-DD HH:mm:ss"
-          type="daterange"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
+          v-model="createDate"
+          value-format="YYYY-MM-DD"
+          type="date"
+          placeholder="选择日期"
           :clearable="false"
-          :shortcuts="rangeShortcuts"
           class="device-list-panel__picker-input"
           @change="handleDateChange" />
       </div>
@@ -141,18 +144,29 @@ onMounted(() => {
         class="device-list-table"
         :class="{ 'device-list-table--full': props.pageMode === 'full' }"
         @row-click="handleRowClick">
-        <el-table-column prop="projectDeptName" label="项目部" min-width="220" align="center" />
-        <el-table-column prop="teamCount" label="队伍数量" min-width="120" align="center" />
-        <el-table-column prop="cumulativeDays" label="累计天数" min-width="120" align="center" />
-        <el-table-column prop="constructionDays" label="施工天数" min-width="120" align="center" />
-        <el-table-column label="注气量(万方)" min-width="150" align="center">
+        <el-table-column prop="projectDeptName" label="项目部" width="140" align="center" />
+        <el-table-column prop="teamCount" label="队伍总数" width="124" align="center" />
+        <el-table-column prop="dmTeamCount" label="驻地待命" width="124" align="center" />
+        <el-table-column prop="zbTeamCount" label="施工准备" width="124" align="center" />
+        <el-table-column prop="sgTeamCount" label="施工队伍" width="124" align="center" />
+        <el-table-column label="注入量(万方)" width="170" align="center">
           <template #default="{ row }">
-            {{ formatGasInjection(row.gasInjection) }}
+            <div class="device-list-table__multi-value">
+              <span>日注气:{{ formatInjection(row.gasInjection) }}</span>
+              <span>累注气:{{ formatInjection(row.yearGasInjection) }}</span>
+              <span>日注水:{{ formatInjection(row.waterInjection) }}</span>
+              <span>累注水:{{ formatInjection(row.yearWaterInjection) }}</span>
+            </div>
           </template>
         </el-table-column>
-        <el-table-column label="设备利用率" min-width="140" align="center">
+        <el-table-column label="运行时效" width="220" align="center">
           <template #default="{ row }">
-            {{ formatRate(row.utilizationRate) }}
+            当日运行时效:{{ formatRate(row.hourUtilizationRate) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="productionSummary" label="生产动态概述" min-width="220" align="left">
+          <template #default="{ row }">
+            <div class="device-list-table__summary">{{ row.productionSummary || '--' }}</div>
           </template>
         </el-table-column>
 
@@ -204,6 +218,11 @@ onMounted(() => {
   margin-top: 0;
 }
 
+.device-list-panel__picker,
+.device-list-panel__picker-input {
+  width: calc(160px * var(--kb-scale, 1)) !important;
+}
+
 .device-list-table--full {
   :deep(.el-scrollbar__view) {
     display: block;
@@ -218,6 +237,19 @@ onMounted(() => {
     height: 100%;
   }
 }
+
+.device-list-table__multi-value {
+  display: flex;
+  flex-direction: column;
+  gap: calc(4px * var(--kb-scale, 1));
+  line-height: 1.35;
+}
+
+.device-list-table__summary {
+  line-height: 1.5;
+  white-space: pre-wrap;
+  overflow-wrap: anywhere;
+}
 </style>
 
 <style>