修改
This commit is contained in:
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
|
@ -96,12 +96,8 @@
|
||||
<el-link size="small" type="danger" @click="delDictItem(row.id)"
|
||||
>删除</el-link
|
||||
>
|
||||
<el-link
|
||||
size="small"
|
||||
type="warning"
|
||||
@click="transferClue(row)"
|
||||
v-if="row.xsZt == '01'"
|
||||
>采纳</el-link
|
||||
<el-link size="small" type="warning" @click="relevancyClue(row)"
|
||||
>解除关联</el-link
|
||||
>
|
||||
</template>
|
||||
</MyTable>
|
||||
@ -260,6 +256,16 @@ const getDataById = (id) => {
|
||||
tableDate.xsList = listQuery.value.xsList;
|
||||
});
|
||||
};
|
||||
//解除关联
|
||||
const relevancyClue = (row) => {
|
||||
qcckPut({ id: row.id }, "/mosty-gsxt/tbGsxtRlqbRwdd/cancelXsGl/{id}").then(
|
||||
(res) => {
|
||||
tableDate.xsList = tableDate.xsList.filter((item) => item.id !== row.id);
|
||||
listQuery.value.xsList = tableDate.xsList.map((item) => item.id);
|
||||
proxy.$message({ type: "success", message: "解除关联成功" });
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
// 获取部门列表
|
||||
const getdepartmentList = () => {
|
||||
@ -323,7 +329,6 @@ const close = () => {
|
||||
};
|
||||
// 删除
|
||||
const delDictItem = (id) => {
|
||||
console.log(id, "删除", tableDate.xsList);
|
||||
tableDate.xsList = tableDate.xsList.filter((item) => item.id !== id);
|
||||
listQuery.value.xsList = tableDate.xsList.map((item) => item.id);
|
||||
};
|
||||
|
@ -26,7 +26,7 @@
|
||||
<template #ssbmdm>
|
||||
<el-select
|
||||
v-model="listQuery.ssbmdm"
|
||||
placeholder="请选择上报单位代码"
|
||||
placeholder="请选择所属单位"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
@ -96,7 +96,7 @@
|
||||
</div>
|
||||
<!-- 新增编辑 -->
|
||||
<DetailForm ref="detailDiloag" @updateDate="getList()" />
|
||||
<!-- 新增编辑 -->
|
||||
<!--详情 -->
|
||||
<InfoForm ref="infoDiloag" />
|
||||
</div>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user