This commit is contained in:
jy
2025-06-17 20:04:43 +08:00
parent a5c65af987
commit 6dcd327ac9
26 changed files with 2723 additions and 1032 deletions

View File

@ -135,6 +135,24 @@
/>
</el-select>
</template>
<!-- 线索内容-->
<template #xsNr>
<div style="border: 1px solid #ccc">
<Toolbar
style="border-bottom: 1px solid #ccc"
:editor="clueRef"
:defaultConfig="clueConfig"
mode="default"
/>
<Editor
style="height: 500px; overflow-y: hidden"
v-model="clueHtml"
:defaultConfig="clueConfig"
mode="default"
@onCreated="clueCreated"
/>
</div>
</template>
<!-- 汇编报刊-->
<template #hbBk>
@ -367,7 +385,7 @@ const updateFormData = () => {
{
label: "线索内容",
prop: "xsNr",
type: "textarea",
type: "slot",
width: "100%",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
}
@ -495,10 +513,15 @@ const updateFormData = () => {
};
// 编辑器实例,必须用 shallowRef
const editorRef = shallowRef();
const clueRef = shallowRef();
// 内容 HTML
const valueHtml = ref("<p>hello</p>");
// 内容 HTML
const clueHtml = ref("<p>hello</p>");
const toolbarConfig = {};
const editorConfig = ref({ placeholder: "请输入内容...", readOnly: false });
const clueConfig = ref({ placeholder: "请输入内容...", readOnly: false });
const listQuery = ref({ sbRyLx: "06", xsLy: "02" }); //表单
const loading = ref(false);
@ -539,6 +562,11 @@ const init = (type, row) => {
editorConfig.readOnly = true; // 禁用
}
if (typeOf == "leadDetails") {
clueRef.value.enable(); // 启用
clueConfig.readOnly = false; // 启用
}
if (row) getDataById(row.id);
if (row.sbRyId) getDataRyId(row.sbRyId);
};
@ -605,7 +633,8 @@ const submit = () => {
submitData = {
...Object.fromEntries(
Object.entries(data).filter(([key]) => !reportFields.includes(key))
)
),
xsNr: clueHtml.value // 强制覆盖线索内容字段
};
}
@ -678,6 +707,9 @@ const close = () => {
const handleCreated = (editor) => {
editorRef.value = editor; // 记录 editor 实例,重要!
};
const clueCreated = (editor) => {
clueRef.value = editor; // 记录 editor 实例,重要!
};
// 组件销毁时,也及时销毁编辑器
onBeforeUnmount(() => {
const editor = editorRef.value;

View File

@ -8,10 +8,10 @@
>
<div>
<el-form :model="listQuery" class="mosty-from-wrap" :inline="true">
<el-form-item label="标签名称">
<el-form-item label="人员姓名">
<el-input
placeholder="请输入标签名称"
v-model="listQuery.bqMc"
placeholder="请输入人员姓名"
v-model="listQuery.ryXm"
clearable
></el-input>
</el-form-item>

View File

@ -315,7 +315,7 @@ const changeSize = (val) => {
// 获取列表
const getList = (val) => {
pageData.tableConfiger.loading = true;
// pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
let url = "/mosty-gsxt/tbGsxtXs/selectPage";
qcckGet(data, url)