jwyu 10 月之前
父节点
当前提交
3023065224
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 1 0
      src/views/etaChart/components/ClassifyWrap.vue
  2. 4 4
      src/views/etaChart/components/MoveClassify.vue

+ 1 - 0
src/views/etaChart/components/ClassifyWrap.vue

@@ -373,6 +373,7 @@ const showBatchMove = ref(false)
         @node-collapse="handleNodeCollapse"
         :draggable="canDragSort"
         check-on-click-node
+        :expand-on-click-node="false"
         node-key="ChartClassifyId"
         check-strictly
         highlight-current

+ 4 - 4
src/views/etaChart/components/MoveClassify.vue

@@ -80,7 +80,7 @@ const tableColumns = [
 ]
 const tableData = ref([])
 async function getChartList() {
-  const cArr=Array.from(new Set(filterState.classify.flat())).join(',')
+  const cArr=filterState.classify?Array.from(new Set(filterState.classify.flat())).join(','):''
   const res = await apiETAChart.chartListFilter({
     ChartClassifyIds: cArr|| '',
     PageSize: pagination.value.defaultPageSize,
@@ -147,11 +147,11 @@ function handleConfirmClassify() {
     MessagePlugin.warning('请选择要移动的图表')
     return
   }
-  if(!filterState.targetClassify){
+  if(!filterState.targetClassify&&filterState.targetClassify!==0){
     MessagePlugin.warning('请选择要移动至的分类')
     return
   }
-  const cArr=Array.from(new Set(filterState.classify.flat())).join(',')
+  const cArr=filterState.classify?Array.from(new Set(filterState.classify.flat())).join(','):''
   const params={
     SelectAll: filterState.checkAll,
     ChartClassifyIds: cArr|| '', //多个分类id用英文逗号拼接
@@ -164,7 +164,7 @@ function handleConfirmClassify() {
   apiETAChart.moveChartBatch(params).then(res=>{
     if(res.Ret===200){
       MessagePlugin.success('操作成功')
-      filterState.classify=''
+      filterState.classify=[]
       filterState.user=''
       filterState.searchVal=''
       filterState.checkAll=false