V1.2.0需求完成测试版

This commit is contained in:
2025-08-01 16:33:33 +08:00
parent 4e764d2d17
commit bc0cd959f0
75 changed files with 2191 additions and 1973 deletions

View File

@@ -2,17 +2,17 @@ import { findDataInfo } from "../../../api/documentManagement"
export default{
data(){
return{
typeArray:[],
}
},
mounted(){
// this.fetchDataInfo()
if (this.$route.query.id) {
this.fetchDataInfo({id:this.$route.query.id})
}
// if (this.$route.query.id) {
// this.fetchDataInfo({id:this.$route.query.id})
// }
},
methods:{
@@ -20,13 +20,49 @@ export default{
const res = await findDataInfo(params)
if (res && res.code === 200) {
this.modifyData = res.data
this.addParams.content = this.modifyData.content
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
// 强制用接口数据刷新编辑器内容
if (this.editor && this.addParams.content) {
this.editor.txt.html(this.addParams.content)
this.html = this.addParams.content
}
}
},
/**
* 币种选择变更处理
* @param {string} scope - 选择的币种
*/
changeScreen(scope) {
let brand = scope
for (let index in this.currencyList) {
let aa = this.currencyList[index];
let value = aa.value;
if (brand === value) {
this.$refs.screen.$el.children[0].children[0].setAttribute('style', "background:url(" + aa.imgUrl + ") no-repeat 10PX;background-size: 20PX 20PX;color:#333;padding-left: 33PX;");
}
}
// 保存用户选择的币种到localStorage
localStorage.setItem('userManagement_selectedCurrency', scope);
},
handleClearScreen(){
// 清除币种图片样式
if (this.$refs.screen && this.$refs.screen.$el) {
this.$refs.screen.$el.children[0].children[0].style.background = '';
this.$refs.screen.$el.children[0].children[0].style.paddingLeft = '';
}
// 也可以清除 localStorage 里的币种选择
localStorage.removeItem('userManagement_selectedCurrency');
}
}
}