|
@@ -38,6 +38,12 @@ import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
import { getQuery } from '../reportManager.api'
|
|
|
|
|
|
const props = defineProps({
|
|
|
+ moduleList:{
|
|
|
+ type:Array,
|
|
|
+ default:()=>{
|
|
|
+ return []
|
|
|
+ }
|
|
|
+ },
|
|
|
searchParam: {
|
|
|
type: Object,
|
|
|
default: () => {
|
|
@@ -92,7 +98,7 @@ const record = reactive({});
|
|
|
const columnList = getTableHeaderColumns('');
|
|
|
let visibleUp = ref(0)
|
|
|
let resetTable = ref(0)
|
|
|
-let optionLists = reactive<any[]>([])
|
|
|
+let optionLists = ref<any[]>([])
|
|
|
//列表查询参数
|
|
|
let searchParams = reactive({
|
|
|
busKind: '',
|
|
@@ -146,20 +152,6 @@ function resetUpload() {
|
|
|
resetTable.value = new Date().getTime()
|
|
|
}
|
|
|
|
|
|
-//获取模板报表列表数据
|
|
|
-async function getQueryList() {
|
|
|
- let res = await getQuery()
|
|
|
- console.log(res, '报表模板---------')
|
|
|
- if (res.length != 0) {
|
|
|
- optionLists.length = 0
|
|
|
- res[0].children.forEach(el => {
|
|
|
- if(el.itemValue!='needQ' && el.itemValue!='majorpath' ){
|
|
|
- optionLists.push({ label: el.itemText, value: el.itemValue })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* 新增事件
|
|
|
*/
|
|
@@ -168,7 +160,6 @@ function handleAdd() {
|
|
|
for (let key in record) {
|
|
|
delete record[key];
|
|
|
}
|
|
|
- getQueryList()
|
|
|
openModal(true);
|
|
|
}
|
|
|
|
|
@@ -249,6 +240,10 @@ watch(() => props.searchParam, (newS, oldS) => {
|
|
|
searchParams.reportType = newS.reportType
|
|
|
}, { immediate: true, deep: true })
|
|
|
|
|
|
+watch(()=>props.moduleList,(newV,oldV)=>{
|
|
|
+ optionLists.value=newV
|
|
|
+},{immediate:true,deep:true})
|
|
|
+
|
|
|
defineExpose({
|
|
|
doRequest, onExportXls, onImportXls, reload, getForm
|
|
|
});
|