From 6a415a072a98d64d2f95d16eef73b6d7270b8d56 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 30 五月 2026 15:14:25 +0800
Subject: [PATCH] 新疆马铃薯 1.首页问题:挪新系统ui,需要确认一下页面数据完整。 2.协同办公:挪新系统 3.营销管理:客户往来取消回款金额字段,改为点击左侧客户时显示与该客户的所有订单信息,以及发货情况。销售可以选好对应的采购订单方便质量追溯。 4.采购管理:供应商往来同上逻辑,显示是否收货,也加上采购退货和采购报表功能。 5.采购加上设备备件选项,设备备件入库到备件库存。设备,仓储不足时做采购提醒。 6.仓储物流:得区分成品库和原料库(不存在半成品,成品只有一个产品,很好确认),原材料需要有批号,采集原料库需要做好仓库字段,让他们可以区分哪个仓库,然后把数采设备信息做一个实时的显示。总库存显示好当前存在的批次信息。 7.质量:只有不通过才需要填写对应的数据信息。在外侧做好选择通过不通过。过程,出厂检验无法对应到生产订单,那就对应到销售订单。 8.决策分析:基础数据分析和进销存分析,质量数据分析需要重新设计

---
 src/views/reportAnalysis/dataDashboard/components/basic/center-bottom.vue |  198 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 198 insertions(+), 0 deletions(-)

diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/center-bottom.vue b/src/views/reportAnalysis/dataDashboard/components/basic/center-bottom.vue
new file mode 100644
index 0000000..c28c2fa
--- /dev/null
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/center-bottom.vue
@@ -0,0 +1,198 @@
+<template>
+  <div>
+    <PanelHeader title="浜哄憳鍒嗗竷" />
+    <div class="main-panel panel-item-customers">
+      <div class="pie-chart-wrapper">
+        <div class="pie-background" :style="{ backgroundImage: `url(${roseBorderImg})` }"></div>
+        <Echarts
+          ref="echartsRef"
+          :chartStyle="chartStyle"
+          :legend="pieLegend"
+          :series="pieSeries"
+          :tooltip="pieTooltip"
+          :color="pieColors"
+          :options="pieOptions"
+          style="height: 320px"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted, computed, inject, watch } from 'vue'
+import { deptStaffDistribution } from '@/api/viewIndex.js'
+import PanelHeader from '../PanelHeader.vue'
+import Echarts from '@/components/Echarts/echarts.vue'
+import roseBorderImg from '@/assets/BI/鐜懓鍥捐竟妗�.png'
+
+/**
+ * @introduction 鎶婃暟缁勪腑key鍊肩浉鍚岀殑閭d竴椤规彁鍙栧嚭鏉ワ紝缁勬垚涓�涓璞�
+ * @param {鍙傛暟绫诲瀷} array 浼犲叆鐨勬暟缁� [{a:"1",b:"2"},{a:"2",b:"3"}]
+ * @param {鍙傛暟绫诲瀷} key  灞炴�у悕 a
+ * @return {杩斿洖绫诲瀷璇存槑}
+ */
+function array2obj(array, key) {
+  const resObj = {}
+  for (let i = 0; i < array.length; i++) {
+    resObj[array[i][key]] = array[i]
+  }
+  return resObj
+}
+
+const chartStyle = {
+  width: '100%',
+  height: '100%',
+}
+
+const echartsRef = ref(null)
+const pieDatas = ref([])
+const pieColors = ['#D1E4F5', '#5782F7', '#2F67EF', '#82BAFF', '#43e8fc', '#27EBE7']
+
+const pieObjData = computed(() => array2obj(pieDatas.value, 'name'))
+
+const pieLegend = computed(() => {
+  const data = pieDatas.value.map((d, idx) => ({
+    name: d.name,
+    icon: 'circle',
+    textStyle: {
+      fontSize: 18,
+      color: pieColors[idx % pieColors.length],
+    },
+  }))
+
+  return {
+    orient: 'vertical',
+    top: 'center',
+    left: '50%',
+    itemGap: 30,
+    data: data,
+    formatter: function (name) {
+      const item = pieObjData.value[name]
+      if (!item) return name
+      return `{title|${name}}{value|${item.value}}{unit|浜簘{percent|${item.rate}}{unit|%}`
+    },
+    textStyle: {
+      rich: {
+        value: {
+          color: '#43e8fc',
+          fontSize: 18,
+          fontWeight: 600,
+          padding: [0, 10, 0, 30],
+        },
+        unit: {
+          color: '#82baff',
+          fontSize: 14,
+          fontWeight: 600,
+          padding: [0, 50, 0, 0],
+        },
+        percent: {
+          color: '#43e8fc',
+          fontSize: 18,
+          fontWeight: 600,
+          padding: [0, 10, 0, 0],
+        },
+        title: {
+          fontSize: 18,
+          padding: [0, 0, 0, 0],
+        },
+      },
+    },
+  }
+})
+
+const pieTooltip = {
+  trigger: 'item',
+  formatter: '{a} <br/>{b} : {c} ({d}%)',
+}
+
+const pieSeries = computed(() => [
+  {
+    name: '浜哄憳鍒嗗竷',
+    type: 'pie',
+    radius: '70%',
+    center: ['20%', '50%'],
+    itemStyle: {
+      borderColor: '#0a1c3a',
+      borderWidth:5,
+    },
+    label: {
+      show: false
+    },
+    minAngle: 15,
+    data: pieDatas.value,
+    animationType: 'scale',
+    animationEasing: 'elasticOut',
+    animationDelay: function () {
+      return Math.random() * 200
+    },
+  },
+])
+
+const pieOptions = {
+  backgroundColor: 'transparent',
+  textStyle: { color: '#B8C8E0' },
+}
+
+const getDeptStaffDistribution = () => {
+  deptStaffDistribution().then(res => {
+    if (res.code === 200) {
+      pieDatas.value = res.data.items.map(item => ({
+        name: item.name,
+        value: parseInt(item.value),
+        rate: item.rate
+      }))
+    }
+  }).catch(err => {
+    console.error('鑾峰彇閮ㄩ棬浜哄憳鍒嗗竷鏁版嵁澶辫触:', err)
+  })
+}
+
+const dataDashboardRefreshTick = inject('dataDashboardRefreshTick', null)
+if (dataDashboardRefreshTick) {
+  watch(dataDashboardRefreshTick, () => {
+    getDeptStaffDistribution()
+  })
+}
+
+onMounted(() => {
+  getDeptStaffDistribution()
+})
+</script>
+
+<style scoped>
+.main-panel {
+  display: flex;
+  flex-direction: column;
+  gap: 20px;
+}
+
+.panel-item-customers {
+  border: 1px solid #1a58b0;
+  padding: 18px;
+  width: 100%;
+  height: 370px;
+}
+
+.pie-chart-wrapper {
+  position: relative;
+  width: 100%;
+  height: 320px;
+  background: transparent;
+}
+
+
+.pie-background {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate(-113%, -50%);
+  width: 360px;
+  height: 360px;
+  background-size: contain;
+  background-position: center;
+  background-repeat: no-repeat;
+  z-index: 1;
+  pointer-events: none;
+}
+</style>

--
Gitblit v1.9.3