|
@@ -15,7 +15,6 @@ const { width } = useWindowSize()
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
|
const queryData = ref({})
|
|
|
-const link = ref(publicSettingStore.publicSetting.ChartViewUrl);
|
|
|
//显示更多操作栏
|
|
|
let showMoreAction = ref(false)
|
|
|
let showPicker = ref(false)
|
|
@@ -44,6 +43,9 @@ const downExcelFileUrl = computed(() => {
|
|
|
}/datamanage/excel_info/table/download?${localStorage.getItem("token")}`;
|
|
|
return url;
|
|
|
})
|
|
|
+const link = computed(() => {
|
|
|
+ return publicSettingStore.publicSetting.ChartViewUrl;
|
|
|
+})
|
|
|
|
|
|
onMounted(() => {
|
|
|
getVersionList()
|
|
@@ -214,13 +216,6 @@ function Base64() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const columns = [
|
|
|
- { text: '杭州', value: 'Hangzhou' },
|
|
|
- { text: '宁波', value: 'Ningbo' },
|
|
|
- { text: '温州', value: 'Wenzhou' },
|
|
|
- { text: '绍兴', value: 'Shaoxing' },
|
|
|
- { text: '湖州', value: 'Huzhou' },
|
|
|
-];
|
|
|
const versionOpts = ref([])
|
|
|
const childTableOpts = ref([])
|
|
|
const fieldValue = ref('表格名');
|
|
@@ -232,18 +227,22 @@ function getVersionList(){
|
|
|
if(res.Ret === 200){
|
|
|
const arr = res.Data.List || []
|
|
|
versionOpts.value = arr
|
|
|
+ fieldValueVersion.value = arr[0].VersionName
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
// 平衡表获取子表列表
|
|
|
-function getChildTable(){
|
|
|
- apiSheet.getBalanceChildTable({ParentId: route.query.id,}).then(res=>{
|
|
|
+function getChildTable(ParentId = route.query.id){
|
|
|
+ apiSheet.getBalanceChildTable({ParentId}).then(res=>{
|
|
|
if(res.Ret === 200){
|
|
|
const arr = res.Data.List || []
|
|
|
- childTableOpts.value = arr
|
|
|
- getExcelDetail( 'load', arr[0] ? arr[0].ExcelInfoId : route.query.id)
|
|
|
- getChartList(arr[0] ? arr[0].ExcelInfoId : route.query.id)
|
|
|
+ if(arr.length === 0) return; // 修正逻辑错误
|
|
|
+ childTableOpts.value = arr;
|
|
|
+ const firstItemId = arr[0]?.ExcelInfoId || route.query.id; // 使用可选链操作符简化逻辑
|
|
|
+ getExcelDetail('load', firstItemId);
|
|
|
+ getChartList(firstItemId);
|
|
|
+ fieldValue.value = arr[0]?.ExcelName || '默认表格名';
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -259,7 +258,8 @@ const onConfirm = ({ selectedOptions }) => {
|
|
|
const onConfirmVersion = ({ selectedOptions }) => {
|
|
|
showVersionPicker.value = false;
|
|
|
fieldValueVersion.value = selectedOptions[0].VersionName;
|
|
|
- getExcelDetail( 'load', selectedOptions[0].ExcelInfoId)
|
|
|
+ // getExcelDetail( 'load', selectedOptions[0].ExcelInfoId)
|
|
|
+ getChildTable(selectedOptions[0].ExcelInfoId);
|
|
|
};
|
|
|
|
|
|
// 关联图表页
|
|
@@ -473,10 +473,12 @@ function goChart () {
|
|
|
}
|
|
|
@media screen and (min-width: 650px) {
|
|
|
.filter-box {
|
|
|
+ padding-top: 5px;
|
|
|
+ background-color: #fff;
|
|
|
width: 50%;
|
|
|
font-size: 16px;
|
|
|
- height: 30px;
|
|
|
- position: absolute;
|
|
|
+ height: 35px;
|
|
|
+ position: fixed;
|
|
|
left: 12px;
|
|
|
bottom: 18px;
|
|
|
.filter-item {
|
|
@@ -532,11 +534,12 @@ function goChart () {
|
|
|
height: calc(100% - 135px);
|
|
|
}
|
|
|
.bottom {
|
|
|
- width: 30%;
|
|
|
+ width: 49%;
|
|
|
// position: absolute;
|
|
|
// right: 12px;
|
|
|
// bottom: 12px;
|
|
|
position: fixed;
|
|
|
+ background-color: #fff;
|
|
|
bottom: 12px;
|
|
|
right: 12px;
|
|
|
z-index: 99;
|