技术监督新增查看功能
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- 案例库 -->
|
||||
<TableHeader ref="TableHeaderRef" >
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable
|
||||
placeholder="请输入搜索名称" />
|
||||
</el-form-item>
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</template>
|
||||
@@ -50,6 +49,8 @@ import { ElMessage } from 'element-plus'
|
||||
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import katex from "katex";
|
||||
import "katex/dist/katex.css";
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'database/case'
|
||||
@@ -101,6 +102,22 @@ const tableStore = new TableStore({
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
summary.value = row.summary
|
||||
setTimeout(() => {
|
||||
|
||||
const spans = document.querySelectorAll('span[data-value]');
|
||||
// 遍历每个 span 标签
|
||||
spans.forEach(function (span) {
|
||||
|
||||
let val = katex.renderToString(span.getAttribute('data-value'), {
|
||||
throwOnError: false,
|
||||
})
|
||||
var newDiv = span;
|
||||
newDiv.innerHTML = val;
|
||||
|
||||
span.parentNode.replaceChild(newDiv, span);
|
||||
});
|
||||
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -170,7 +187,7 @@ const tableStore = new TableStore({
|
||||
],
|
||||
loadCallback: () => { }
|
||||
})
|
||||
tableStore.table.params.searchValue=''
|
||||
tableStore.table.params.searchValue = ''
|
||||
// 弹框
|
||||
const addUser = () => {
|
||||
popupEditRef.value.open('新增案例')
|
||||
|
||||
Reference in New Issue
Block a user