|
@@ -15,6 +15,7 @@ const { width } = useWindowSize()
|
|
|
|
|
|
const {
|
|
const {
|
|
optArrChart,//图表操作列表
|
|
optArrChart,//图表操作列表
|
|
|
|
+ currentLang,//中英文标识
|
|
catalogNodes,//目录列表
|
|
catalogNodes,//目录列表
|
|
getCatalogList,//获取图库目录
|
|
getCatalogList,//获取图库目录
|
|
} = useCatalogList()
|
|
} = useCatalogList()
|
|
@@ -34,6 +35,17 @@ const IsShowCatalog = ref(false)
|
|
function showCatalog(){
|
|
function showCatalog(){
|
|
IsShowCatalog.value = true
|
|
IsShowCatalog.value = true
|
|
}
|
|
}
|
|
|
|
+//切换中英文
|
|
|
|
+async function changeLang(){
|
|
|
|
+ const res = await apiChart.setUserLang({
|
|
|
|
+ ConfigCode:'chart_language',
|
|
|
|
+ ConfigValue:currentLang.value==='EN'?'CN':'EN'
|
|
|
|
+ })
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+ showToast({message:`切换${currentLang.value==='EN'?'中文':'英文'}成功`,type:'success'})
|
|
|
|
+ currentLang.value = currentLang.value==='EN'?'CN':'EN'
|
|
|
|
+ localStorage.setItem('chartETALange',currentLang.value)
|
|
|
|
+}
|
|
//激活的目录路径
|
|
//激活的目录路径
|
|
const catalogMenu = ref('')
|
|
const catalogMenu = ref('')
|
|
//目录被点击 type:['node'一级目录,'item'二级目录]
|
|
//目录被点击 type:['node'一级目录,'item'二级目录]
|
|
@@ -45,8 +57,11 @@ function catalogItemClick({item,type='node',parent}){
|
|
getChartList()
|
|
getChartList()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//是否展示操作栏
|
|
const showOptPopup = ref(false)
|
|
const showOptPopup = ref(false)
|
|
|
|
+//操作项
|
|
const currentOptArr = ref([])
|
|
const currentOptArr = ref([])
|
|
|
|
+//操作的节点
|
|
const currentNode = ref({})
|
|
const currentNode = ref({})
|
|
//展示操作栏
|
|
//展示操作栏
|
|
function showFileOpt({node,optArr}){
|
|
function showFileOpt({node,optArr}){
|
|
@@ -210,7 +225,7 @@ function openAddChartDialog(node){
|
|
addChartState.chartInfo = node
|
|
addChartState.chartInfo = node
|
|
addChartState.isShowDialog = true
|
|
addChartState.isShowDialog = true
|
|
}
|
|
}
|
|
-//移动参数
|
|
|
|
|
|
+//移动图表参数
|
|
const moveChartState = reactive({
|
|
const moveChartState = reactive({
|
|
isShowDialog:false,
|
|
isShowDialog:false,
|
|
popTitle:'移动至',
|
|
popTitle:'移动至',
|
|
@@ -221,6 +236,7 @@ function openMoveChartDialog(node){
|
|
moveChartState.chartInfo = node
|
|
moveChartState.chartInfo = node
|
|
moveChartState.isShowDialog = true
|
|
moveChartState.isShowDialog = true
|
|
}
|
|
}
|
|
|
|
+
|
|
async function MoveChart(moveId){
|
|
async function MoveChart(moveId){
|
|
const res = await apiChart.moveChart({
|
|
const res = await apiChart.moveChart({
|
|
ChartClassifyId:moveId,
|
|
ChartClassifyId:moveId,
|
|
@@ -299,7 +315,7 @@ getChartList()
|
|
style="flex:1;padding-left:0"
|
|
style="flex:1;padding-left:0"
|
|
@click-input="goSearch"
|
|
@click-input="goSearch"
|
|
/>
|
|
/>
|
|
- <div class="lang-icon icon">
|
|
|
|
|
|
+ <div class="lang-icon icon" @click="changeLang">
|
|
<img src="@/assets/imgs/chartETA/lang-icon.png" alt="">
|
|
<img src="@/assets/imgs/chartETA/lang-icon.png" alt="">
|
|
</div>
|
|
</div>
|
|
<div class="list-icon icon" @click="showCatalog">
|
|
<div class="list-icon icon" @click="showCatalog">
|
|
@@ -329,7 +345,7 @@ getChartList()
|
|
:key="item.ChartInfoId"
|
|
:key="item.ChartInfoId"
|
|
@click="goChartDetail(item)"
|
|
@click="goChartDetail(item)"
|
|
>
|
|
>
|
|
- <div class="title">{{item.ChartName}}</div>
|
|
|
|
|
|
+ <div class="title">{{currentLang==='EN'?(item.ChartNameEn||item.ChartName):item.ChartName}}</div>
|
|
<img class="img" :src="item.ChartImage" alt="">
|
|
<img class="img" :src="item.ChartImage" alt="">
|
|
<div class="time">
|
|
<div class="time">
|
|
<span>创建时间:{{item.CreateTime.slice(0,10)}}</span>
|
|
<span>创建时间:{{item.CreateTime.slice(0,10)}}</span>
|