diff --git a/src/views/backOfficeSystem/JudgmentHome/strategicResearch/addReport.vue b/src/views/backOfficeSystem/JudgmentHome/strategicResearch/addReport.vue index c69443f..b1e88f6 100644 --- a/src/views/backOfficeSystem/JudgmentHome/strategicResearch/addReport.vue +++ b/src/views/backOfficeSystem/JudgmentHome/strategicResearch/addReport.vue @@ -9,24 +9,26 @@
${listQuery.value.bgnr || ''}
` html += `${listQuery.value.fj || ''}
` - textContent.value = html + textContent.value = html; } -// watch(() => listQuery.value, (val) => { - -// }, -// { -// deep: true, immediate: true -// }) // 提交 const submit = () => { - elform.value.submit((data) => { - // let url = title.value == "新增" ? "/mosty-gsxt/gsxt/jyfx/add" : "/mosty-gsxt/gsxt/jyfx/edit"; - - let params = { + elform.value.submit( async (data) => { + loading.value = true; + const params = { ...data, - ypid: outRow.value.id, - ypmc: outRow.value.ypyt + bgnr: stripReportHeader(textContent.value) }; - const apiFun = !listQuery.value.id ? gsxtYpbgAddEntity : gsxtYpbgEditEntity - if (!listQuery.value.id) delete params.id - apiFun(params).then(() => { + const apiFun = !listQuery.value.id ? gsxtYpbgAddEntity : gsxtYpbgEditEntity; + if (!listQuery.value.id) delete params.id; + try { + await apiFun(params); loading.value = false; proxy.$message({ type: "success", message: title.value + "成功" }); emit("ok"); close(); - }).catch(() => { + } catch (e) { loading.value = false; - }) + } }); }; //编辑器创建成功 @@ -188,9 +175,8 @@ const handleCreated = (editor) => { }; //内容发生变化 const handChange = (editor) => { + // 判断是否是一个空段落,是空就传空文本 - - }; onBeforeUnmount(() => { const editor = editorRef.value; @@ -200,7 +186,6 @@ onBeforeUnmount(() => { // 关闭 const close = () => { - listQuery.value = {}; loading.value = false; dialogForm.value = false; listQuery.value = {} diff --git a/src/views/backOfficeSystem/JudgmentHome/strategicResearch/index.vue b/src/views/backOfficeSystem/JudgmentHome/strategicResearch/index.vue index e64c015..2409ccc 100644 --- a/src/views/backOfficeSystem/JudgmentHome/strategicResearch/index.vue +++ b/src/views/backOfficeSystem/JudgmentHome/strategicResearch/index.vue @@ -149,7 +149,6 @@ const getList = () => { let data = { ...pageData.pageConfiger, ...queryFrom.value}; gsxtYpbgGetPageList(data).then(res => { console.log(res); - pageData.tableData = res.records || []; pageData.total = res.total; pageData.tableConfiger.loading = false;