更新
This commit is contained in:
@ -25,7 +25,6 @@
|
||||
<!-- 编辑器 -->
|
||||
<Editor :style="`height: 480px; overflow-y: hidden`" :model-value="textContent" :defaultConfig="editorConfig"
|
||||
:mode="mode" @onCreated="handleCreated" @onChange="handChange" />
|
||||
|
||||
</div>
|
||||
<div v-if="outRow.id" style="display: flex; justify-content: center;">
|
||||
<!-- <el-button style="display: block;" type="primary" @click="ConsultationShow = true">网上会商</el-button> -->
|
||||
@ -51,6 +50,8 @@ import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
||||
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, shallowRef, onBeforeUnmount, watch } from "vue";
|
||||
import { gsxtYpbgAddEntity, gsxtYpbgEditEntity, gsxtYpbgId } from "@/api/huiShangyp/strategicApi.js"
|
||||
const emit = defineEmits(["updateDate", 'ok']);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_YPLX } = proxy.$dict("D_BZ_YPLX")
|
||||
const props = defineProps({
|
||||
dic: Object,
|
||||
});
|
||||
@ -59,7 +60,6 @@ const props = defineProps({
|
||||
const ConsultationShow = ref(false)
|
||||
const showText = ref(false);
|
||||
const textContent = ref()
|
||||
const { proxy } = getCurrentInstance();
|
||||
const editorRef = shallowRef();
|
||||
const dialogForm = ref(false); //弹窗
|
||||
const mode = "default";
|
||||
@ -107,18 +107,13 @@ const rules = reactive({
|
||||
{ required: true, message: "请输入经验内容", trigger: "blur" }
|
||||
]
|
||||
});
|
||||
const formData = ref();
|
||||
watch(() =>props.dic.D_BZ_YPLX, (newVal) => {
|
||||
if(newVal){
|
||||
formData.value=[
|
||||
const formData = ref([
|
||||
{ label: "报告名称", prop: "bgmc", type: "input", width: "100%", blur: setEditorTextContent },
|
||||
{
|
||||
label: "报告类型", prop: "bglx", type: "select", width: "100%", options: props.dic.D_BZ_YPLX
|
||||
label: "报告类型", prop: "bglx", type: "select", width: "100%", options: D_BZ_YPLX
|
||||
},
|
||||
{ label: "报告内容", prop: "bgnr", type: "slot", width: "100%", blur: setEditorTextContent },
|
||||
]
|
||||
}
|
||||
})
|
||||
]);
|
||||
|
||||
const listQuery = ref({
|
||||
bgmc: "",
|
||||
@ -133,15 +128,16 @@ const outRow = ref({})
|
||||
|
||||
|
||||
// 初始化数据
|
||||
const init = (type, reportData, row) => {
|
||||
|
||||
const init = (type, row) => {
|
||||
if(row){
|
||||
listQuery.value = {
|
||||
bgmc: reportData.bgmc,
|
||||
bgnr: reportData.bgnr,
|
||||
id: reportData.id,
|
||||
bglx: reportData.bglx,
|
||||
bgmc: row.bgmc,
|
||||
bgnr: row.bgnr,
|
||||
id: row.id,
|
||||
bglx: row.bglx,
|
||||
}
|
||||
outRow.value = { ...row }
|
||||
}
|
||||
dialogForm.value = true;
|
||||
title.value = type == "add" ? "新增" :type == "edit"? "编辑" : "详情";
|
||||
setEditorTextContent()
|
||||
@ -153,9 +149,7 @@ const getText = (val, row = {}) => {
|
||||
|
||||
function setEditorTextContent() {
|
||||
let html = dataBt.value;
|
||||
|
||||
|
||||
html += `<p style="text-align: center;"><span style="font-size: 22px;">${listQuery.value.bgmc || ''}</span></p>`
|
||||
html += `<p style="text-align: center;"><span style="font-size: 22px;">${listQuery.value.bgnr || ''}</span></p>`
|
||||
html += `<p>${listQuery.value.fj || ''}</p>`
|
||||
textContent.value = html
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<el-icon style="vertical-align: middle">
|
||||
<CirclePlus />
|
||||
</el-icon>
|
||||
<span style="vertical-align: middle">自建研判</span>
|
||||
<span style="vertical-align: middle">创建报告</span>
|
||||
</el-button>
|
||||
</template>
|
||||
</PageTitle>
|
||||
@ -193,7 +193,6 @@ const selfCreateResearch = (type = 'add') => {
|
||||
}
|
||||
/** 创建报告 */
|
||||
const createReport = (type,row) => {
|
||||
console.log(row);
|
||||
reportTc.value.init(type, row)
|
||||
// currRow.value = { ...row }
|
||||
// isShowReport.value = true
|
||||
|
||||
Reference in New Issue
Block a user