|
@@ -6,6 +6,7 @@ import { useWindowSize } from '@vueuse/core'
|
|
|
import CatalogTree from './components/CatalogTree.vue';
|
|
|
import OptionPopup from './components/OptionPopup.vue';
|
|
|
import AddChartToMyETA from './components/AddChartToMyETA.vue';
|
|
|
+import TreeSelectPop from './components/TreeSelectPop.vue';
|
|
|
import apiChart from '@/api/chart'
|
|
|
|
|
|
import {useCatalogList} from './hooks/useCatalogList';
|
|
@@ -209,7 +210,34 @@ function openAddChartDialog(node){
|
|
|
addChartState.chartInfo = node
|
|
|
addChartState.isShowDialog = true
|
|
|
}
|
|
|
-function openMoveChartDialog(){}
|
|
|
+//移动参数
|
|
|
+const moveChartState = reactive({
|
|
|
+ isShowDialog:false,
|
|
|
+ popTitle:'移动至',
|
|
|
+ catalogNodes:catalogNodes,
|
|
|
+ chartInfo:{}
|
|
|
+})
|
|
|
+function openMoveChartDialog(node){
|
|
|
+ moveChartState.chartInfo = node
|
|
|
+ moveChartState.isShowDialog = true
|
|
|
+}
|
|
|
+async function MoveChart(moveId){
|
|
|
+ const res = await apiChart.moveChart({
|
|
|
+ ChartClassifyId:moveId,
|
|
|
+ ChartInfoId:moveChartState.chartInfo.ChartInfoId,
|
|
|
+ PrevChartInfoId:0,
|
|
|
+ NextChartInfoId:0
|
|
|
+ })
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ showToast({message:'移动图表成功',type:'success'})
|
|
|
+ //手动修改移动的图表
|
|
|
+ listState.list.find(item=>{
|
|
|
+ if(item.ChartInfoId===moveChartState.chartInfo.ChartInfoId){
|
|
|
+ item.ChartClassifyId = moveId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ moveChartState.isShowDialog = false
|
|
|
+}
|
|
|
|
|
|
//图表列表
|
|
|
const listState = reactive({
|
|
@@ -360,7 +388,15 @@ getChartList()
|
|
|
:chartInfo="addChartState.chartInfo"
|
|
|
@close="addChartState.isShowDialog=false"
|
|
|
/>
|
|
|
- <!-- 移动图表弹窗 -->
|
|
|
+ <!-- 移动/另存为图表 弹窗 -->
|
|
|
+ <TreeSelectPop
|
|
|
+ :isShowDialog="moveChartState.isShowDialog"
|
|
|
+ :popTitle="moveChartState.popTitle"
|
|
|
+ :catalogNodes="moveChartState.catalogNodes"
|
|
|
+ :chartInfo="moveChartState.chartInfo"
|
|
|
+ @close="moveChartState.isShowDialog=false"
|
|
|
+ @confirmMove="MoveChart"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<style lang="scss">
|