diff --git a/src/components/ExtractionText/index.vue b/src/components/ExtractionText/index.vue index 937cbab..2a7ef55 100644 --- a/src/components/ExtractionText/index.vue +++ b/src/components/ExtractionText/index.vue @@ -29,7 +29,7 @@
上传文件提取文本内容(支持 .png, .jpg )
{{ files.name || '未选择文件' }}
@@ -102,7 +102,7 @@ watch(()=>props.modelValue,val=>{ const initDemo = () =>{ - if(hasLoadingJS.value == null || hasLoadingJS.value == 2) initPage(); + if(hasLoadingJS.value == null) initPage(); nextTick(() => { const fileInput = document.getElementById("file-input"); const fileInfo = document.getElementById("file-info"); @@ -242,6 +242,10 @@ const initPage = async () => { loading.value = false; hasLoadingJS.value = 2; } +} +const frashJs = () =>{ + if(hasLoadingJS.value == 1) return; + initPage() } /** *@Descripttion:图片上传事件 @@ -272,9 +276,7 @@ const getRecognize = async () => { // 切换标签 const changeRadio = (val) =>{ - if(val == '图片解析') { - if(hasLoadingJS.value == 2) initPage(); - } + if(val == '图片解析') if(hasLoadingJS.value == 2) initPage(); const resultDiv = document.getElementById("result"); resultDiv.textContent = "请先上传文件..."; const fileInfo = document.getElementById("file-info"); diff --git a/src/components/MyComponents/Department/index.vue b/src/components/MyComponents/Department/index.vue index 58ddbe2..17ce5eb 100644 --- a/src/components/MyComponents/Department/index.vue +++ b/src/components/MyComponents/Department/index.vue @@ -20,6 +20,7 @@ import { COMPONENT_WIDTH } from "@/constant"; import { qcckPost, qcckGet, qcckFlvGet } from "@/api/qcckApi.js"; import { ref, defineProps, defineEmits, defineExpose, computed, onMounted, watch } from "vue"; import { selectDeptPage } from "@/api/user-manage"; +import { tr } from "element-plus/es/locale.mjs"; const props = defineProps({ //获取组件传值 placeholder: { @@ -41,9 +42,13 @@ const props = defineProps({ width: { default: COMPONENT_WIDTH, type: String + }, + isAll:{ + default: false, + type: Boolean } }); -const modelShow = ref(false); +const firstLoad = ref(true) const oldmodelValue = ref([]); const listQuery = ref({ deptname: "", @@ -61,7 +66,12 @@ const endProps = { lazy: true, lazyLoad(node, resolve) { listQuery.value.parentid = node.data.id; - selectDeptPage(listQuery.value).then((res) => { + let params = { ...listQuery.value }; + if(props.isAll && firstLoad.value) { + params.parentid = 1; + firstLoad.value = false; + } + selectDeptPage(params).then((res) => { depList.value = depList.value.concat(res) //处理部门是否包含下级 for (let i = 0; i < res.length; i++) { @@ -73,7 +83,11 @@ const endProps = { }; const tableData = ref([]); const getSysMenuTree = async () => { - const res = await selectDeptPage(listQuery.value); + let params = { ...listQuery.value } + if(props.isAll) params.parentid = 1; + console.log('初始化-----'); + + const res = await selectDeptPage(params); tableData.value = res; depList.value = res }; diff --git a/src/components/aboutTable/FormMessage.vue b/src/components/aboutTable/FormMessage.vue index a622fe0..f1a6ac2 100644 --- a/src/components/aboutTable/FormMessage.vue +++ b/src/components/aboutTable/FormMessage.vue @@ -67,6 +67,7 @@