2025-07-18 08:22:28 +00:00
|
|
|
|
import { findDataInfo } from "../../../api/documentManagement"
|
|
|
|
|
export default{
|
|
|
|
|
data(){
|
|
|
|
|
return{
|
2025-07-25 08:39:37 +00:00
|
|
|
|
typeArray:[],
|
2025-07-18 08:22:28 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
// this.fetchDataInfo()
|
2025-07-25 08:39:37 +00:00
|
|
|
|
|
2025-07-18 08:22:28 +00:00
|
|
|
|
|
|
|
|
|
if (this.$route.query.id) {
|
|
|
|
|
this.fetchDataInfo({id:this.$route.query.id})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
async fetchDataInfo(params){
|
|
|
|
|
const res = await findDataInfo(params)
|
|
|
|
|
if (res && res.code === 200) {
|
|
|
|
|
this.modifyData = res.data
|
2025-07-25 08:39:37 +00:00
|
|
|
|
this.addParams = this.modifyData
|
|
|
|
|
// 确保type字段为字符串类型,以便与TypeList中的value匹配
|
|
|
|
|
this.addParams.type = String(this.addParams.type)
|
|
|
|
|
this.addParams.childType = String(this.addParams.childType)
|
|
|
|
|
this.typeArray = [this.addParams.type]
|
|
|
|
|
// 标记已从后台获取数据,避免被本地存储覆盖
|
|
|
|
|
this.hasBackendData = true
|
2025-07-29 07:53:40 +00:00
|
|
|
|
// 删除 editor.setHtml 的调用,内容初始化交由 onCreated 统一处理
|
2025-07-18 08:22:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|