yanghao 1 неделя назад
Родитель
Сommit
dcf00b9b22

+ 27 - 0
src/locales/en.ts

@@ -9859,5 +9859,32 @@ export default {
     'device-report8': 'Project',
     'device-report9': 'Details‌',
     'device-report10': 'Outlier'
+  },
+  rdkb: {
+    week: 'Week',
+    month: 'Six Month',
+    'device-rate': 'Utilization rate',
+    yesterday: 'Yesterday',
+    'this-month': 'Month',
+    'this-year': 'This Year',
+    'this-jidu': 'This Quarter',
+    'yunwei-cost': 'Cost',
+    times: 'Times',
+    cunhuo: 'Inventory Distribution',
+    trend: 'Trend',
+    detail: 'Detail',
+    kucun: 'Total Inventory',
+    jiya: 'Total Backlog',
+    'jiya-qushi': 'Backlog Trend',
+    'jiya-detail': 'Backlog Detail',
+    'cunhuo-fenbu': 'Inventory Distribution',
+    'jiya-fenbu': 'Backlog Distribution',
+    wanyuan: 'ten thousand yuan',
+    yuan: 'yuan',
+    no: 'No Workload',
+    xcdm: 'Wellsite On Standby',
+    wxz: 'Equipment Maintenance',
+    wz: 'Material Impact',
+    yc: 'Abnormal/Complex'
   }
 }

+ 27 - 0
src/locales/zh-CN.ts

@@ -9734,5 +9734,32 @@ export default {
     year: '年',
     month: '月',
     day: '日'
+  },
+  rdkb: {
+    week: '近一周',
+    month: '近六个月',
+    'device-rate': '设备利用率',
+    yesterday: '昨日',
+    'this-month': '本月',
+    'this-year': '全年',
+    'this-jidu': '本季',
+    'yunwei-cost': '运维成本',
+    times: '次数',
+    cunhuo: '存货分布',
+    trend: '趋势',
+    detail: '明细',
+    kucun: '总库存',
+    jiya: '总积压',
+    'jiya-qushi': '积压趋势',
+    'jiya-detail': '积压明细',
+    'cunhuo-fenbu': '各单位存货占比分布',
+    'jiya-fenbu': '各单位积压占比分布',
+    wanyuan: '万元',
+    yuan: '元',
+    no: '无工作量',
+    xcdm: '井场待命',
+    wxz: '维修设备',
+    wz: '物资影响',
+    yc: '异常/复杂'
   }
 }

+ 19 - 13
src/views/pms/stat/rdkb/rd-Inventory-safety.vue

@@ -8,7 +8,7 @@ import {
   FONT_FAMILY,
   THEME
 } from '@/utils/kb'
-
+const { t } = useI18n()
 import { IotStatApi } from '@/api/pms/stat'
 import dayjs from 'dayjs'
 
@@ -64,16 +64,22 @@ let distributionResizeObserver: ResizeObserver | null = null
 let trendResizeObserver: ResizeObserver | null = null
 let trendResizeFrame: number | null = null
 
-const panelOptions: Array<{ label: string; value: ActivePanel }> = [
-  { label: '存货分布', value: 'distribution' },
-  { label: '趋势', value: 'trend' },
-  { label: '明细', value: 'detail' }
-]
+// const panelOptions: Array<{ label: string; value: ActivePanel }> = [
+//   { label: '存货分布', value: 'distribution' },
+//   { label: '趋势', value: 'trend' },
+//   { label: '明细', value: 'detail' }
+// ]
+
+const panelOptions = computed(() => [
+  { label: t('rdkb.cunhuo'), value: 'distribution' },
+  { label: t('rdkb.trend'), value: 'trend' },
+  { label: t('rdkb.detail'), value: 'detail' }
+])
 
 const activeTitle = computed(() => {
-  if (activePanel.value === 'trend') return '积压趋势'
-  if (activePanel.value === 'detail') return '积压明细'
-  return '存货分布'
+  if (activePanel.value === 'trend') return t('rdkb.jiya-qushi')
+  if (activePanel.value === 'detail') return t('rdkb.jiya-detail')
+  return t('rdkb.cunhuo')
 })
 
 const yuanToWan = (value: number) => Number((value / 10000).toFixed(2))
@@ -201,7 +207,7 @@ function getDistributionOption(
     }),
     title: [
       {
-        text: '各单位存货占比分布',
+        text: t('rdkb.cunhuo-fenbu'),
         left: '20.5%',
         top: 4,
         textAlign: 'center',
@@ -214,7 +220,7 @@ function getDistributionOption(
         }
       },
       {
-        text: '各单位积压占比分布',
+        text: t('rdkb.jiya-fenbu'),
         left: '69.5%',
         top: 4,
         textAlign: 'center',
@@ -301,7 +307,7 @@ function getDistributionOption(
         label: {
           show: true,
           position: 'center',
-          formatter: `总库存\n${formatAmount(inventoryTotal)}万元`,
+          formatter: `${t('rdkb.kucun')}\n${formatAmount(inventoryTotal)}万元`,
           color: THEME.text.strong,
           fontSize: layout.compact ? 8 : 10,
           fontWeight: 700,
@@ -379,7 +385,7 @@ function getDistributionOption(
         label: {
           show: true,
           position: 'center',
-          formatter: `总积压\n${formatAmount(backlogTotal)}万元`,
+          formatter: `${t('rdkb.jiya')}\n${formatAmount(backlogTotal)}万元`,
           color: THEME.text.strong,
           fontSize: layout.compact ? 8 : 10,
           fontWeight: 700,

+ 10 - 6
src/views/pms/stat/rdkb/rd-cost.vue

@@ -19,10 +19,11 @@ type CostRange = 'week' | 'sixMonth'
 const chartData = ref<ChartItem[]>([])
 const activeRange = ref<CostRange>('week')
 const loading = ref(false)
-const rangeOptions: Array<{ label: string; value: CostRange }> = [
-  { label: '近一周', value: 'week' },
-  { label: '近六个月', value: 'sixMonth' }
-]
+
+const rangeOptions = computed(() => [
+  { label: t('rdkb.week'), value: 'week' },
+  { label: t('rdkb.month'), value: 'sixMonth' }
+])
 
 const router = useRouter()
 const chartRef = ref<HTMLDivElement>()
@@ -70,7 +71,10 @@ function getChartOption(data: ChartItem[]): echarts.EChartsOption {
     },
     yAxis: {
       type: 'value',
-      name: activeRange.value === 'sixMonth' ? '运维成本(万元)' : '运维成本(元)',
+      name:
+        activeRange.value === 'sixMonth'
+          ? `${t('rdkb.yunwei-cost')}(${t('rdkb.wanyuan')})`
+          : `${t('rdkb.yunwei-cost')}(${t('rdkb.yuan')})`,
       nameTextStyle: {
         color: THEME.text.regular,
         fontSize: 13,
@@ -97,7 +101,7 @@ function getChartOption(data: ChartItem[]): echarts.EChartsOption {
     },
     series: [
       {
-        name: '运维成本',
+        name: t('rdkb.yunwei-cost'),
         type: 'bar',
         data: values,
         barWidth: 22,

+ 4 - 3
src/views/pms/stat/rdkb/rd-device-category.vue

@@ -101,7 +101,7 @@ function getChartOption(): echarts.EChartsOption {
     }),
     xAxis: {
       type: 'value',
-      name: '台',
+      name: t('stat.rdkb1vue290085-36'),
       max: xAxisMax,
       axisLine: {
         show: false
@@ -277,8 +277,9 @@ onUnmounted(() => {
     <div class="panel-title">
       <div class="icon-decorator">
         <span></span>
-        <span></span>
-      </div>{{ t('stat.rddeviceca201693-0') }}</div>
+        <span></span> </div
+      >{{ t('stat.rddeviceca201693-0') }}</div
+    >
     <div
       v-loading="loading"
       element-loading-text="加载中..."

+ 24 - 19
src/views/pms/stat/rdkb/rd-exception-prompt.vue

@@ -20,20 +20,20 @@ const activeTimeRange = ref<TimeRange>('day')
 const loading = ref(false)
 const productionList = ref<NptCountItem[]>([])
 
-const timeOptions: Array<{ label: string; value: TimeRange }> = [
-  { label: '昨日', value: 'day' },
-  { label: '本月', value: 'month' },
-  { label: '本季', value: 'quarter' },
-  { label: '全年', value: 'year' }
-]
-
-const nptNameMap: Record<string, string> = {
-  no: '无工作量',
-  xcdm: '井场待命',
-  wxz: '维修设备',
-  wz: '物资影响',
-  yc: '异常/复杂'
-}
+const timeOptions = computed(() => [
+  { label: t('rdkb.yesterday'), value: 'day' },
+  { label: t('rdkb.this-month'), value: 'month' },
+  { label: t('rdkb.this-jidu'), value: 'quarter' },
+  { label: t('rdkb.this-year'), value: 'year' }
+])
+
+const nptNameMap = computed(() => ({
+  no: t('rdkb.no'),
+  xcdm: t('rdkb.xcdm'),
+  wxz: t('rdkb.wxz'),
+  wz: t('rdkb.wz'),
+  yc: t('rdkb.yc')
+})).value
 
 const productionTopList = computed(() => productionList.value.slice(0, 9))
 const deviceExceptionCount = ref(0)
@@ -99,8 +99,9 @@ onMounted(() => {
       <div class="kb-panel-title-text flex items-center">
         <div class="icon-decorator">
           <span></span>
-          <span></span>
-        </div>{{ t('stat.rdexceptio920906-0') }}</div>
+          <span></span> </div
+        >{{ t('stat.rdexceptio920906-0') }}</div
+      >
       <el-segmented
         v-model="activeTimeRange"
         :options="timeOptions"
@@ -111,7 +112,8 @@ onMounted(() => {
     <div v-loading="loading" class="exception-body">
       <section class="exception-section exception-section--production">
         <div class="exception-section__title">
-          <span class="exception-section__marker"></span>{{ t('stat.rdexceptio920906-1') }}<span class="exception-section__hint">TOP 9</span>
+          <span class="exception-section__marker"></span>{{ t('stat.rdexceptio920906-1')
+          }}<span class="exception-section__hint">TOP 9</span>
         </div>
         <div class="production-grid">
           <div
@@ -129,13 +131,16 @@ onMounted(() => {
               <span class="production-item__unit">{{ t('stat.rdexceptio920906-2') }}</span>
             </span>
           </div>
-          <div v-if="!productionTopList.length && !loading" class="exception-empty">{{ t('stat.rdexceptio920906-3') }}</div>
+          <div v-if="!productionTopList.length && !loading" class="exception-empty">{{
+            t('stat.rdexceptio920906-3')
+          }}</div>
         </div>
       </section>
 
       <section class="exception-section exception-section--device">
         <div class="exception-section__title">
-          <span class="exception-section__marker"></span>{{ t('stat.rdexceptio920906-4') }}</div>
+          <span class="exception-section__marker"></span>{{ t('stat.rdexceptio920906-4') }}</div
+        >
         <div class="device-exception-card">
           <span class="device-exception-card__label">{{ t('stat.rdexceptio920906-5') }}</span>
           <span class="device-exception-card__value">{{ deviceExceptionCount }}</span>

+ 1 - 1
src/views/pms/stat/rdkb/rd-maintenance-times.vue

@@ -95,7 +95,7 @@ function getChartOption(data: ChartData): echarts.EChartsOption {
     },
     yAxis: {
       type: 'value',
-      name: '次数',
+      name: t('rdkb.times'),
       splitNumber: 4,
       nameTextStyle: {
         color: THEME.text.regular,

+ 9 - 5
src/views/pms/stat/rdkb/rd-rate.vue

@@ -25,10 +25,14 @@ const chartData = ref<ChartData>({
 const chartRef = ref<HTMLDivElement>()
 const activeRange = ref<RateRange>('week')
 const loading = ref(false)
-const rangeOptions: Array<{ label: string; value: RateRange }> = [
-  { label: '近一周', value: 'week' },
-  { label: '近六个月', value: 'sixMonth' }
-]
+// const rangeOptions: Array<{ label: string; value: RateRange }> = [
+//   { label: '近一周', value: 'week' },
+//   { label: '近六个月', value: 'sixMonth' }
+// ]
+const rangeOptions = computed(() => [
+  { label: t('rdkb.week'), value: 'week' },
+  { label: t('rdkb.month'), value: 'sixMonth' }
+])
 let chart: echarts.ECharts | null = null
 const router = useRouter()
 let chartClickBound = false
@@ -75,7 +79,7 @@ function getChartOption(data: ChartData): echarts.EChartsOption {
     },
     yAxis: {
       type: 'value',
-      name: '设备利用率(%)',
+      name: `${t('rdkb.device-rate')} %`,
       min: 0,
       max: 100,
       splitNumber: 4,