This commit is contained in:
lcw
2026-01-23 19:57:10 +08:00
parent 5b62d707ff
commit c12bda629a
43 changed files with 6721 additions and 223 deletions

View File

@ -3,7 +3,7 @@
<div class="head_box">
<span class="title">报告{{ title }} </span>
<div>
<el-button type="primary" size="small" :loading="loading" @click="submit">保存</el-button>
<el-button type="primary" size="small" :loading="loading" @click="submit" v-if="title!='详情'">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
@ -49,8 +49,7 @@ import "@wangeditor/editor/dist/css/style.css";
// import Consultation from './consultation.vue'
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, shallowRef, onBeforeUnmount, watch } from "vue";
import { gsxtYpbgAddEntity, gsxtYpbgEditEntity } from "@/api/huiShangyp/tacticalApi.js"
import { gsxtYpbgAddEntity, gsxtYpbgEditEntity, gsxtYpbgId } from "@/api/huiShangyp/strategicApi.js"
const emit = defineEmits(["updateDate", 'ok']);
const props = defineProps({
dic: Object,
@ -108,11 +107,19 @@ const rules = reactive({
{ required: true, message: "请输入经验内容", trigger: "blur" }
]
});
const formData = ref([
const formData = ref();
watch(() =>props.dic.D_BZ_YPLX, (newVal) => {
if(newVal){
formData.value=[
{ label: "报告名称", prop: "bgmc", type: "input", width: "100%", blur: setEditorTextContent },
{
label: "报告类型", prop: "bglx", type: "select", width: "100%", options: props.dic.D_BZ_YPLX
},
{ label: "报告内容", prop: "bgnr", type: "slot", width: "100%", blur: setEditorTextContent },
// { label: "附件内容", prop: "fj", type: "slot", width: "100%" },
]);
]
}
})
const listQuery = ref({
bgmc: "",
bgnr: "",
@ -132,11 +139,11 @@ const init = (type, reportData, row) => {
bgmc: reportData.bgmc,
bgnr: reportData.bgnr,
id: reportData.id,
// fj: reportData.fj
bglx: reportData.bglx,
}
outRow.value = { ...row }
dialogForm.value = true;
title.value = type == "add" ? "新增" : "编辑";
title.value = type == "add" ? "新增" :type == "edit"? "编辑" : "详情";
setEditorTextContent()
};
const getText = (val, row = {}) => {