|
@@ -1,97 +1,225 @@
|
|
|
-import React, { useCallback, useEffect } from 'react'
|
|
|
|
|
|
|
+import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
import styles from './index.module.scss'
|
|
|
import { Select } from 'antd'
|
|
import { Select } from 'antd'
|
|
|
import { iconUrl } from '@/utils/http'
|
|
import { iconUrl } from '@/utils/http'
|
|
|
import * as echarts from 'echarts'
|
|
import * as echarts from 'echarts'
|
|
|
|
|
+import {
|
|
|
|
|
+ A1_APIworkCount,
|
|
|
|
|
+ A1_APIgetDictById,
|
|
|
|
|
+ A1_APIgetDataTextureByTagId,
|
|
|
|
|
+ A1_APIgetDataTagByTagId,
|
|
|
|
|
+ A1_APIgetTotal,
|
|
|
|
|
+ A1_APIgetDataTagLevel
|
|
|
|
|
+} from '@/store/action/Abench/A1'
|
|
|
|
|
|
|
|
-const chartData1 = [
|
|
|
|
|
- { name: '啤酒产品类', value: 2500 },
|
|
|
|
|
- { name: '饮用器皿类', value: 1800 },
|
|
|
|
|
- { name: '品牌文化与节庆类', value: 1200 },
|
|
|
|
|
- { name: '企业文化与档案类', value: 800 },
|
|
|
|
|
- { name: '艺术与礼品类', value: 1000 },
|
|
|
|
|
- { name: '工具与设备类', value: 900 },
|
|
|
|
|
- { name: '其他综合类', value: 2500 }
|
|
|
|
|
-]
|
|
|
|
|
-
|
|
|
|
|
-const chartData2 = [
|
|
|
|
|
- { name: '酒类实物', value: 2500 },
|
|
|
|
|
- { name: '包装与标识', value: 1800 },
|
|
|
|
|
- { name: '杯子', value: 1200 },
|
|
|
|
|
- { name: '品牌节庆活动', value: 1300 },
|
|
|
|
|
- { name: '品牌视觉传播', value: 1600 },
|
|
|
|
|
- { name: '文书档案', value: 1700 },
|
|
|
|
|
- { name: '影像资料', value: 2200 },
|
|
|
|
|
- { name: '荣誉与表彰', value: 1800 },
|
|
|
|
|
- { name: '企业藏品', value: 1800 },
|
|
|
|
|
- { name: '其他', value: 1900 }
|
|
|
|
|
-]
|
|
|
|
|
|
|
+// 生成年度选项:2025 到今年
|
|
|
|
|
+const currentYear = new Date().getFullYear()
|
|
|
|
|
+const yearOptions = Array.from({ length: currentYear - 2025 + 1 }, (_, i) => {
|
|
|
|
|
+ const year = 2025 + i
|
|
|
|
|
+ return { value: year, label: `${year}年度` }
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
const DEFAULT_COLORS = ['#c11b2d', '#243220', '#24664b', '#8acfb2', '#806e4c', '#988364', '#972d00']
|
|
const DEFAULT_COLORS = ['#c11b2d', '#243220', '#24664b', '#8acfb2', '#806e4c', '#988364', '#972d00']
|
|
|
|
|
|
|
|
-const binData1 = [
|
|
|
|
|
- {
|
|
|
|
|
- name: '啤酒产品类',
|
|
|
|
|
- value: 2500
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '饮用器皿类',
|
|
|
|
|
- value: 1800
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '品牌文化与节庆类',
|
|
|
|
|
- value: 1200
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '企业历史与档案类',
|
|
|
|
|
- value: 800
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '艺术与礼品类',
|
|
|
|
|
- value: 1000
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '工具与设备类',
|
|
|
|
|
- value: 900
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '其他综合类',
|
|
|
|
|
- value: 600
|
|
|
|
|
- }
|
|
|
|
|
-]
|
|
|
|
|
-
|
|
|
|
|
-const binData2 = [
|
|
|
|
|
- {
|
|
|
|
|
- name: '酒起',
|
|
|
|
|
- value: 400
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '杯子',
|
|
|
|
|
- value: 100
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '护肤品',
|
|
|
|
|
- value: 100
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '冰箱贴',
|
|
|
|
|
- value: 100
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- name: '衣服',
|
|
|
|
|
- value: 100
|
|
|
|
|
- }
|
|
|
|
|
-]
|
|
|
|
|
-
|
|
|
|
|
// 先写一些静态的
|
|
// 先写一些静态的
|
|
|
|
|
+type DictItem = { name: string; id: number }
|
|
|
|
|
+type TextureItem = { name: string; id: number; count: number }
|
|
|
|
|
+type TotalItem = { pcs: number | null; level: string | null }
|
|
|
|
|
+
|
|
|
function A1statistics() {
|
|
function A1statistics() {
|
|
|
|
|
+ const [yearCountYear, setYearCountYear] = useState(currentYear)
|
|
|
|
|
+ const [yearCount, setYearCount] = useState<number | null>(null)
|
|
|
|
|
+
|
|
|
|
|
+ // 藏品总数、藏品总数量、定级文物数量
|
|
|
|
|
+ const [totalList, setTotalList] = useState<TotalItem[] | null>(null)
|
|
|
|
|
+
|
|
|
|
|
+ // 材质统计
|
|
|
|
|
+ const [textureOptions, setTextureOptions] = useState<DictItem[]>([])
|
|
|
|
|
+ const [textureTagId, setTextureTagId] = useState<number | null>(null)
|
|
|
|
|
+ const [textureData, setTextureData] = useState<{ name: string; value: number }[]>([])
|
|
|
|
|
+
|
|
|
|
|
+ // 品类统计
|
|
|
|
|
+ const [categoryOptions, setCategoryOptions] = useState<DictItem[]>([])
|
|
|
|
|
+ const [categoryTagId, setCategoryTagId] = useState<number | null>(null)
|
|
|
|
|
+ const [categoryData, setCategoryData] = useState<{ name: string; value: number }[]>([])
|
|
|
|
|
+
|
|
|
|
|
+ // 一级/二级分类
|
|
|
|
|
+ const [level1Data, setLevel1Data] = useState<{ name: string; value: number }[]>([])
|
|
|
|
|
+ const [level2Data, setLevel2Data] = useState<{ name: string; value: number }[]>([])
|
|
|
|
|
+
|
|
|
|
|
+ const textureInitialized = useRef(false)
|
|
|
|
|
+ const categoryInitialized = useRef(false)
|
|
|
|
|
+
|
|
|
|
|
+ // 获取一级/二级分类数据
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ const fetchTagLevel = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await A1_APIgetDataTagLevel()
|
|
|
|
|
+ if (res?.code === 0 && res.data) {
|
|
|
|
|
+ const list1 = (res.data.level_1 || []).map((it: { name: string; count: number }) => ({
|
|
|
|
|
+ name: it.name,
|
|
|
|
|
+ value: it.count
|
|
|
|
|
+ }))
|
|
|
|
|
+ const list2 = (res.data.level_2 || []).map((it: { name: string; count: number }) => ({
|
|
|
|
|
+ name: it.name,
|
|
|
|
|
+ value: it.count
|
|
|
|
|
+ }))
|
|
|
|
|
+ setLevel1Data(list1)
|
|
|
|
|
+ setLevel2Data(list2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ setLevel1Data([])
|
|
|
|
|
+ setLevel2Data([])
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ setLevel1Data([])
|
|
|
|
|
+ setLevel2Data([])
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ fetchTagLevel()
|
|
|
|
|
+ }, [])
|
|
|
|
|
+
|
|
|
|
|
+ // 获取藏品总数统计
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ const fetchTotal = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await A1_APIgetTotal()
|
|
|
|
|
+ if (res?.code === 0 && Array.isArray(res.data)) {
|
|
|
|
|
+ setTotalList(res.data as TotalItem[])
|
|
|
|
|
+ } else {
|
|
|
|
|
+ setTotalList(null)
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ setTotalList(null)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ fetchTotal()
|
|
|
|
|
+ }, [])
|
|
|
|
|
+
|
|
|
|
|
+ // 藏品总数、藏品总数量、定级文物按级别统计
|
|
|
|
|
+ const totalStats = totalList
|
|
|
|
|
+ ? (() => {
|
|
|
|
|
+ const totalCount = totalList.length
|
|
|
|
|
+ const totalPcs = totalList.reduce((sum, it) => sum + (it.pcs ?? 0), 0)
|
|
|
|
|
+ const withLevel = totalList.filter(it => it.level != null && String(it.level).trim() !== '')
|
|
|
|
|
+ const level1 = totalList.filter(it => it.level === '一级').length
|
|
|
|
|
+ const level2 = totalList.filter(it => it.level === '二级').length
|
|
|
|
|
+ const level3 = totalList.filter(it => it.level === '三级').length
|
|
|
|
|
+ const level4 = totalList.filter(it => it.level === '一般').length
|
|
|
|
|
+ return {
|
|
|
|
|
+ totalCount,
|
|
|
|
|
+ totalPcs,
|
|
|
|
|
+ leveledCount: withLevel.length,
|
|
|
|
|
+ level1,
|
|
|
|
|
+ level2,
|
|
|
|
|
+ level3,
|
|
|
|
|
+ level4
|
|
|
|
|
+ }
|
|
|
|
|
+ })()
|
|
|
|
|
+ : null
|
|
|
|
|
+
|
|
|
|
|
+ // 获取筛选字典(材质+品类)
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ const fetchDict = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await A1_APIgetDictById()
|
|
|
|
|
+ if (res?.code === 0 && res.data) {
|
|
|
|
|
+ const list3 = res.data.texture || []
|
|
|
|
|
+ const list4 = res.data.category || []
|
|
|
|
|
+ setTextureOptions(list3)
|
|
|
|
|
+ setCategoryOptions(list4)
|
|
|
|
|
+ if (list3.length > 0 && !textureInitialized.current) {
|
|
|
|
|
+ textureInitialized.current = true
|
|
|
|
|
+ setTextureTagId(list3[0].id)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (list4.length > 0 && !categoryInitialized.current) {
|
|
|
|
|
+ categoryInitialized.current = true
|
|
|
|
|
+ setCategoryTagId(list4[0].id)
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ setTextureOptions([])
|
|
|
|
|
+ setCategoryOptions([])
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ setTextureOptions([])
|
|
|
|
|
+ setCategoryOptions([])
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ fetchDict()
|
|
|
|
|
+ }, [])
|
|
|
|
|
+
|
|
|
|
|
+ // 材质 tagId 变化时获取数据
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ if (textureTagId == null) {
|
|
|
|
|
+ setTextureData([])
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ const fetch = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await A1_APIgetDataTextureByTagId(textureTagId)
|
|
|
|
|
+ if (res?.code === 0 && Array.isArray(res.data)) {
|
|
|
|
|
+ setTextureData(
|
|
|
|
|
+ (res.data as TextureItem[]).map(({ name, count }) => ({ name, value: count }))
|
|
|
|
|
+ )
|
|
|
|
|
+ } else {
|
|
|
|
|
+ setTextureData([])
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ setTextureData([])
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ fetch()
|
|
|
|
|
+ }, [textureTagId])
|
|
|
|
|
+
|
|
|
|
|
+ // 品类 tagId 变化时获取数据
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ if (categoryTagId == null) {
|
|
|
|
|
+ setCategoryData([])
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ const fetch = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await A1_APIgetDataTagByTagId(categoryTagId)
|
|
|
|
|
+ if (res?.code === 0 && Array.isArray(res.data)) {
|
|
|
|
|
+ setCategoryData(
|
|
|
|
|
+ (res.data as TextureItem[]).map(({ name, count }) => ({ name, value: count }))
|
|
|
|
|
+ )
|
|
|
|
|
+ } else {
|
|
|
|
|
+ setCategoryData([])
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ setCategoryData([])
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ fetch()
|
|
|
|
|
+ }, [categoryTagId])
|
|
|
|
|
+
|
|
|
|
|
+ // 获取年度新增产品数量
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ const fetchYearCount = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await A1_APIworkCount(yearCountYear)
|
|
|
|
|
+ if (res?.code === 0) {
|
|
|
|
|
+ const count = typeof res.data === 'number' ? res.data : (res.data?.count ?? 0)
|
|
|
|
|
+ setYearCount(count)
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ setYearCount(null)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ fetchYearCount()
|
|
|
|
|
+ }, [yearCountYear])
|
|
|
|
|
+
|
|
|
// 生成柱状图
|
|
// 生成柱状图
|
|
|
const initEchFu = useCallback((data: any[], dom: any) => {
|
|
const initEchFu = useCallback((data: any[], dom: any) => {
|
|
|
if (!dom) return
|
|
if (!dom) return
|
|
|
|
|
|
|
|
|
|
+ const myChart = echarts.getInstanceByDom(dom) || echarts.init(dom)
|
|
|
|
|
+
|
|
|
// 计算总数用于百分比
|
|
// 计算总数用于百分比
|
|
|
const total = data.reduce((sum, item) => sum + item.value, 0)
|
|
const total = data.reduce((sum, item) => sum + item.value, 0)
|
|
|
- const myChart = echarts.getInstanceByDom(dom) || echarts.init(dom)
|
|
|
|
|
|
|
+ const dataMax = Math.max(...data.map(d => d.value))
|
|
|
|
|
+ const yMax = Math.max(5, dataMax)
|
|
|
|
|
+ const yInterval = Math.max(1, Math.ceil(yMax / 5))
|
|
|
|
|
|
|
|
const option: echarts.EChartsOption = {
|
|
const option: echarts.EChartsOption = {
|
|
|
tooltip: {
|
|
tooltip: {
|
|
@@ -129,6 +257,9 @@ function A1statistics() {
|
|
|
rotate: 30,
|
|
rotate: 30,
|
|
|
fontSize: 12,
|
|
fontSize: 12,
|
|
|
color: '#000',
|
|
color: '#000',
|
|
|
|
|
+ formatter: (value: string) => {
|
|
|
|
|
+ return value.length > 4 ? value.slice(0, 5) + '...' : value
|
|
|
|
|
+ },
|
|
|
margin: 15 // 调整标签与柱子的距离
|
|
margin: 15 // 调整标签与柱子的距离
|
|
|
},
|
|
},
|
|
|
axisLine: {
|
|
axisLine: {
|
|
@@ -168,11 +299,9 @@ function A1statistics() {
|
|
|
color: '#e0e0e0'
|
|
color: '#e0e0e0'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // 设置Y轴最大值
|
|
|
|
|
- max: 3000,
|
|
|
|
|
|
|
+ max: yMax,
|
|
|
min: 0,
|
|
min: 0,
|
|
|
- // 调整Y轴刻度
|
|
|
|
|
- interval: 500
|
|
|
|
|
|
|
+ interval: yInterval
|
|
|
},
|
|
},
|
|
|
series: [
|
|
series: [
|
|
|
{
|
|
{
|
|
@@ -234,10 +363,25 @@ function A1statistics() {
|
|
|
const binInitFu = useCallback((data: any[], dom: any) => {
|
|
const binInitFu = useCallback((data: any[], dom: any) => {
|
|
|
if (!dom) return
|
|
if (!dom) return
|
|
|
|
|
|
|
|
|
|
+ const myChart = echarts.getInstanceByDom(dom) || echarts.init(dom)
|
|
|
|
|
+ if (!data || data.length === 0) {
|
|
|
|
|
+ myChart.clear()
|
|
|
|
|
+ myChart.setOption({
|
|
|
|
|
+ graphic: [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'text',
|
|
|
|
|
+ left: 'center',
|
|
|
|
|
+ top: 'center',
|
|
|
|
|
+ style: { text: '暂无数据', fontSize: 14, fill: '#999', textAlign: 'center' }
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 计算总数用于百分比
|
|
// 计算总数用于百分比
|
|
|
const total = data.reduce((sum, item) => sum + item.value, 0)
|
|
const total = data.reduce((sum, item) => sum + item.value, 0)
|
|
|
|
|
|
|
|
- const myChart = echarts.getInstanceByDom(dom) || echarts.init(dom)
|
|
|
|
|
const option = {
|
|
const option = {
|
|
|
color: DEFAULT_COLORS, // 设置颜色方案
|
|
color: DEFAULT_COLORS, // 设置颜色方案
|
|
|
tooltip: {
|
|
tooltip: {
|
|
@@ -298,12 +442,20 @@ function A1statistics() {
|
|
|
}, [])
|
|
}, [])
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
- initEchFu(chartData1, document.querySelector('#echBox1'))
|
|
|
|
|
- initEchFu(chartData2, document.querySelector('#echBox2'))
|
|
|
|
|
|
|
+ initEchFu(level1Data, document.querySelector('#echBox1'))
|
|
|
|
|
+ }, [initEchFu, level1Data])
|
|
|
|
|
|
|
|
- binInitFu(binData1, document.querySelector('#echBox3'))
|
|
|
|
|
- binInitFu(binData2, document.querySelector('#echBox4'))
|
|
|
|
|
- }, [binInitFu, initEchFu])
|
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ initEchFu(level2Data, document.querySelector('#echBox2'))
|
|
|
|
|
+ }, [initEchFu, level2Data])
|
|
|
|
|
+
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ binInitFu(textureData, document.querySelector('#echBox3'))
|
|
|
|
|
+ }, [binInitFu, textureData])
|
|
|
|
|
+
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ binInitFu(categoryData, document.querySelector('#echBox4'))
|
|
|
|
|
+ }, [binInitFu, categoryData])
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<div className={styles.A1statistics}>
|
|
<div className={styles.A1statistics}>
|
|
@@ -316,7 +468,7 @@ function A1statistics() {
|
|
|
<h3>藏品总数</h3>
|
|
<h3>藏品总数</h3>
|
|
|
</div>
|
|
</div>
|
|
|
<p>
|
|
<p>
|
|
|
- <span>3741</span>(件/套)
|
|
|
|
|
|
|
+ <span>{totalStats?.totalCount ?? 'empty'}</span>(件/套)
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
@@ -325,7 +477,7 @@ function A1statistics() {
|
|
|
<h3>藏品总数量</h3>
|
|
<h3>藏品总数量</h3>
|
|
|
</div>
|
|
</div>
|
|
|
<p>
|
|
<p>
|
|
|
- <span>5834</span>(个)
|
|
|
|
|
|
|
+ <span>{totalStats?.totalPcs ?? 'empty'}</span>(个)
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -335,18 +487,18 @@ function A1statistics() {
|
|
|
<h3>定级文物数量</h3>
|
|
<h3>定级文物数量</h3>
|
|
|
</div>
|
|
</div>
|
|
|
<p>
|
|
<p>
|
|
|
- <span>120</span>(件/套)
|
|
|
|
|
|
|
+ <span>{totalStats?.leveledCount ?? 'empty'}</span>(件/套)
|
|
|
<i>
|
|
<i>
|
|
|
- 一级<i>20</i>
|
|
|
|
|
|
|
+ 一级<i>{totalStats?.level1 ?? 0}</i>
|
|
|
</i>
|
|
</i>
|
|
|
<i>
|
|
<i>
|
|
|
- 二级<i>30</i>
|
|
|
|
|
|
|
+ 二级<i>{totalStats?.level2 ?? 0}</i>
|
|
|
</i>
|
|
</i>
|
|
|
<i>
|
|
<i>
|
|
|
- 三级<i>40</i>
|
|
|
|
|
|
|
+ 三级<i>{totalStats?.level3 ?? 0}</i>
|
|
|
</i>
|
|
</i>
|
|
|
<i>
|
|
<i>
|
|
|
- 一般<i>30</i>
|
|
|
|
|
|
|
+ 一般<i>{totalStats?.level4 ?? 0}</i>
|
|
|
</i>
|
|
</i>
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
@@ -356,18 +508,11 @@ function A1statistics() {
|
|
|
<img src={iconUrl + '/a44.png'} alt='' />
|
|
<img src={iconUrl + '/a44.png'} alt='' />
|
|
|
<h3>年度新增产品数量</h3>
|
|
<h3>年度新增产品数量</h3>
|
|
|
<div className='A1_1_4_1'>
|
|
<div className='A1_1_4_1'>
|
|
|
- <Select
|
|
|
|
|
- defaultValue={2026}
|
|
|
|
|
- options={[
|
|
|
|
|
- { value: 2026, label: '2026年度' },
|
|
|
|
|
- { value: 2025, label: '2025年度' },
|
|
|
|
|
- { value: 2024, label: '2024年度' }
|
|
|
|
|
- ]}
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <Select value={yearCountYear} onChange={setYearCountYear} options={yearOptions} />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<p>
|
|
<p>
|
|
|
- <span>123</span>(件/套)
|
|
|
|
|
|
|
+ <span>{yearCount ?? 'empty'}</span>(件/套)
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -387,7 +532,14 @@ function A1statistics() {
|
|
|
<div className='A1_3row'>
|
|
<div className='A1_3row'>
|
|
|
<div className='A1tit2'>
|
|
<div className='A1tit2'>
|
|
|
<div>材质统计</div>
|
|
<div>材质统计</div>
|
|
|
- <Select defaultValue={'杯子'} options={[{ value: '杯子', label: '杯子' }]} />
|
|
|
|
|
|
|
+ <Select
|
|
|
|
|
+ value={textureTagId ?? undefined}
|
|
|
|
|
+ onChange={v => setTextureTagId(v ?? null)}
|
|
|
|
|
+ options={textureOptions.map(({ id, name }) => ({ value: id, label: name }))}
|
|
|
|
|
+ placeholder='请选择'
|
|
|
|
|
+ allowClear
|
|
|
|
|
+ style={{ width: 200 }}
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<div className='A1_3ech' id='echBox3'></div>
|
|
<div className='A1_3ech' id='echBox3'></div>
|
|
|
</div>
|
|
</div>
|
|
@@ -396,8 +548,12 @@ function A1statistics() {
|
|
|
<div className='A1tit2'>
|
|
<div className='A1tit2'>
|
|
|
<div>品类统计</div>
|
|
<div>品类统计</div>
|
|
|
<Select
|
|
<Select
|
|
|
- defaultValue={'文创产品'}
|
|
|
|
|
- options={[{ value: '文创产品', label: '文创产品' }]}
|
|
|
|
|
|
|
+ value={categoryTagId ?? undefined}
|
|
|
|
|
+ onChange={v => setCategoryTagId(v ?? null)}
|
|
|
|
|
+ options={categoryOptions.map(({ id, name }) => ({ value: id, label: name }))}
|
|
|
|
|
+ placeholder='请选择'
|
|
|
|
|
+ allowClear
|
|
|
|
|
+ style={{ width: 200 }}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div className='A1_3ech' id='echBox4'></div>
|
|
<div className='A1_3ech' id='echBox4'></div>
|