jwyu 1 年之前
父节点
当前提交
9f06906339

+ 3 - 0
src/hooks/chart/config.js

@@ -3,6 +3,9 @@
 
 // 图默认配置
 export const chartDefaultOpts={
+	accessibility:{
+		enabled:false
+	},
     //图表配置
 	chart: {
 		spacingTop: 30,

+ 16 - 2
src/views/etaChart/components/ChartWrap.vue

@@ -62,10 +62,12 @@ const columns = [
 const tableData = ref([])
 const intro = ref('')
 const chartInfo = ref(null)
+const calendarType = ref('公历')
 async function getChartDetail() {
 
   const res = await apiETAChart.chartDetail({
-    ChartInfoId: props.chartInfoId
+    ChartInfoId: props.chartInfoId,
+    Calendar: calendarType.value,
   })
   if (res.Ret === 200) {
     tableData.value = res.Data.EdbInfoList || []
@@ -77,7 +79,7 @@ async function getChartDetail() {
           ...res.Data,
           ChartInfo: {
             ...res.Data.ChartInfo,
-            Calendar: '公历'
+            Calendar: calendarType.value||'公历'
           },
         },
         renderId: 'chart-box',
@@ -110,6 +112,18 @@ function handleGoEdbSource(data) {
     <template v-if="props.chartInfoId">
       <div class="chart-render-wrap">
         <div class="chart-box" id="chart-box"></div>
+        <div style="text-align: center">
+          <!-- 季节图 公历农历切换 -->
+          <t-radio-group
+            variant="primary-filled"
+            v-model="calendarType"
+            @change="getChartDetail"
+            v-if="chartInfo?.ChartType === 2"
+          >
+            <t-radio-button value="公历">公历</t-radio-button>
+            <t-radio-button value="农历">农历</t-radio-button>
+          </t-radio-group>
+        </div>
         <div class="chart-source" v-if="chartInfo">
           <span
             v-if="

+ 12 - 6
src/views/etaChart/components/ClassifyWrap.vue

@@ -23,6 +23,18 @@ async function getCompanyUserData(){
   }
 }
 getCompanyUserData()
+watch(
+  ()=>userVal.value,
+  (n)=>{
+    emits('filter')
+    getClassify()
+  }
+)
+// 2024-4-26 目前组件库change事件有bug会触发多次
+// function handleUserChange(value,context) {
+//   emits('filter')
+//   getClassify()
+// }
 
 const searchSelectKeys={
   value:'ChartInfoId',
@@ -65,11 +77,6 @@ function handleSelectChart(value,context){
   }
 }
 
-function handleUserChange(){
-  emits('filter')
-  getClassify()
-}
-
 
 
 //分类列表
@@ -314,7 +321,6 @@ function handleDropOver(b, a, i, e) {
         filterable
         :showAllLevels='false'
         placeholder="创建人"
-        @change="handleUserChange"
       />
     </div>
     <t-select