فهرست منبع

td组件bug、增加季节图切换

jwyu 11 ماه پیش
والد
کامیت
6127e9f333
3فایلهای تغییر یافته به همراه37 افزوده شده و 12 حذف شده
  1. 3 0
      src/hooks/chart/config.js
  2. 20 5
      src/views/etaChart/components/ChartWrap.vue
  3. 14 7
      src/views/etaChart/components/ClassifyWrap.vue

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

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

+ 20 - 5
src/views/etaChart/components/ChartWrap.vue

@@ -18,10 +18,10 @@ const props = defineProps({
 watch(
   () => props.chartInfoId,
   (n) => {
-    if(!n){
-      tableData.value=[]
-      intro.value=''
-      chartInfo.value=null
+    if (!n) {
+      tableData.value = []
+      intro.value = ''
+      chartInfo.value = null
       return
     }
     getChartDetail()
@@ -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 || []
@@ -110,6 +112,19 @@ 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="

+ 14 - 7
src/views/etaChart/components/ClassifyWrap.vue

@@ -21,10 +21,18 @@ async function getCompanyUserData() {
   }
 }
 getCompanyUserData()
-function handleUserChange() {
-  emits('filter')
-  getClassify()
-}
+watch(
+  ()=>userVal.value,
+  (n)=>{
+    emits('filter')
+    getClassify()
+  }
+)
+// 2024-4-26 目前组件库change事件有bug会触发多次
+// function handleUserChange(value,context) {
+//   emits('filter')
+//   getClassify()
+// }
 
 const searchSelectKeys = {
   value: 'ChartInfoId',
@@ -99,7 +107,8 @@ async function classifyLoad(node) {
   return new Promise(async (resolve) => {
     let nodes = []
     const res = await apiETAChart.classifyList({
-      ParentId: node.data.ChartClassifyId
+      ParentId: node.data.ChartClassifyId,
+      SysUserIds: userVal.value?.join(',')
     })
     if (res.Ret === 200) {
       const arr = res.Data.AllNodes || []
@@ -116,7 +125,6 @@ async function classifyLoad(node) {
 }
 //点击目录树
 function handleClassifyActiveChange({ node }) {
-  console.log(node.data);
   classifyActived.value = [node.data.ChartClassifyId]
   if (node.data.ChartInfoId) {//选择的是图表
     emits('change', node.data)
@@ -141,7 +149,6 @@ function handleClassifyActiveChange({ node }) {
         filterable
         :showAllLevels="false"
         placeholder="创建人"
-        @change="handleUserChange"
       />
     </div>
     <t-select