From 57568a3a7cc9aa3ef19138c05ffbf8151d146d40 Mon Sep 17 00:00:00 2001 From: WX0lxh <2062408239@qq.com> Date: Wed, 25 Feb 2026 15:13:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 9 ++++ packageB/components/unieditor.vue | 8 ++- .../evaluateAnnouncement/evaluateEdit.vue | 47 ++++++++++++++--- .../evaluateAnnouncement/evaluateList.vue | 11 ++-- .../trainingAnnouncement/postedEdit.vue | 51 ++++++++++++++++--- .../trainingAnnouncement/postedList.vue | 11 ++-- pages/mine/company-mine.vue | 40 ++++++++++++++- 7 files changed, 151 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86115a4..980fadd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,9 @@ "dayjs": "^1.11.19", "mp-html": "^2.5.2", "sm-crypto": "^0.3.13" + }, + "devDependencies": { + "crypto-js": "^4.2.0" } }, "node_modules/@dcloudio/uni-ui": { @@ -16,6 +19,12 @@ "resolved": "https://registry.npmjs.org/@dcloudio/uni-ui/-/uni-ui-1.5.11.tgz", "integrity": "sha512-DBtk046ofmeFd82zRI7d89SoEwrAxYzUN3WVPm1DIBkpLPG5F5QDNkHMnZGu2wNrMEmGBjBpUh3vqEY1L3jaMw==" }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "dev": true + }, "node_modules/dayjs": { "version": "1.11.19", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", diff --git a/packageB/components/unieditor.vue b/packageB/components/unieditor.vue index da61326..6bf6c42 100644 --- a/packageB/components/unieditor.vue +++ b/packageB/components/unieditor.vue @@ -391,6 +391,12 @@ computed, getCurrentInstance } from 'vue' + const props = defineProps({ + content: { + type: String, + }, + + }) const emit = defineEmits(['init-data']) // 页面元素 const { @@ -441,7 +447,7 @@ editorCtx.value = res.context // 初始化HTML内容 editorCtx.value.setContents({//赋值 - html: editorContent.html + html: props.content?props.content:editorContent.html }) }).exec() // #endif diff --git a/packageB/notice/evaluateAnnouncement/evaluateEdit.vue b/packageB/notice/evaluateAnnouncement/evaluateEdit.vue index 3e95cb1..196cf89 100644 --- a/packageB/notice/evaluateAnnouncement/evaluateEdit.vue +++ b/packageB/notice/evaluateAnnouncement/evaluateEdit.vue @@ -6,9 +6,9 @@ - *联系人 + *内容 - + 备注 @@ -47,13 +47,20 @@ let fromValue = reactive({ status:'0', }); let type=ref('add') -onLoad((options = {}) => { - +let id=ref('') +let shows=ref(false) +onLoad((options) => { + id.value=options.id + if(options.id){ + type.value='edit' + getDetail() + }else{ + getInfo() + } }); // 监听页面显示,接收从技能查询页面返回的数据 onShow(() => { - getDetail() // 通过事件总线接收技能选择结果 // uni.$on('skillSelected', handleSkillSelected); }); @@ -65,10 +72,14 @@ onShow(() => { // 监听字典数据加载完成,自动更新学历显示 const receiveInitData = (initData) => { - fromValue.content=initData.value; + if(initData.value=="


"){ + + }else{ + fromValue.content=initData.value; + } console.log('子组件初始化数据:', initData) } -function getDetail(){ +function getInfo(){ // if(userInfo.userId){ $api.myRequest("/train/public/train/organ/getTrainByUnifiedSocialCreditCode", { tags: "913700001630477270", @@ -80,13 +91,32 @@ function getDetail(){ fromValue.entProvince = res.data.organProvince; fromValue.entCounty = res.data.organCounty; fromValue.entCity = res.data.organCity; + shows.value=true; } }) // }else{ // $api.msg('请先登录'); // } } - +function getDetail(){ + $api.myRequest("/train/public/announcement/selectById", { + id: id.value, + }, "GET", 9100, { + Authorization: `Bearer ${uni.getStorageSync('token')}`, + 'Content-Type': "application/x-www-form-urlencoded" + }).then((res) => { + if (res.code === 200) { + fromValue.id = res.data.id; + fromValue.title = res.data.title; + fromValue.content= res.data.content; + fromValue.remark= res.data.remark; + fromValue.entProvince = res.data.entProvince; + fromValue.entCounty = res.data.entCounty; + fromValue.entCity = res.data.entCity; + shows.value=true; + } + }) +} const confirm = () => { if (!fromValue.title) { @@ -98,6 +128,7 @@ const confirm = () => { const params = { ...fromValue, }; + debugger if(type.value=='add'){ $api.myRequest('/train/public/announcement/add', { ...fromValue, diff --git a/packageB/notice/evaluateAnnouncement/evaluateList.vue b/packageB/notice/evaluateAnnouncement/evaluateList.vue index 2f3977d..0686d1f 100644 --- a/packageB/notice/evaluateAnnouncement/evaluateList.vue +++ b/packageB/notice/evaluateAnnouncement/evaluateList.vue @@ -46,8 +46,8 @@
发布
取消发布
-
查看
-
编辑
+ +
编辑
删除
@@ -166,8 +166,11 @@ function handleDeleteClick(row) { }); } function handleOperation(row) { - navTo(`/packageB/notice/evaluateAnnouncement/evaluateEdit`); - // navTo(`/packageB/institution/trainingInstitutionDetail?organId=${row.organId}`); + if(row){ + navTo(`/packageB/notice/evaluateAnnouncement/evaluateEdit?id=${row.id}`); + }else{ + navTo(`/packageB/notice/evaluateAnnouncement/evaluateEdit`); + } } diff --git a/packageB/notice/trainingAnnouncement/postedEdit.vue b/packageB/notice/trainingAnnouncement/postedEdit.vue index 6007e35..53ad229 100644 --- a/packageB/notice/trainingAnnouncement/postedEdit.vue +++ b/packageB/notice/trainingAnnouncement/postedEdit.vue @@ -6,9 +6,9 @@
- *联系人 + *内容 - + 备注 @@ -38,6 +38,7 @@ const dictStore = useDictStore(); const { dictLabel, oneDictData, complete: dictComplete, getDictSelectOption } = dictStore; let fromValue = reactive({ + id:'', title: '', content:'', remark:'', @@ -47,13 +48,20 @@ let fromValue = reactive({ status:'0', }); let type=ref('add') -onLoad((options = {}) => { - +let id=ref('') +let shows=ref(false) +onLoad((options) => { + id.value=options.id + if(options.id){ + type.value='edit' + getDetail() + }else{ + getInfo() + } }); // 监听页面显示,接收从技能查询页面返回的数据 onShow(() => { - getDetail() // 通过事件总线接收技能选择结果 // uni.$on('skillSelected', handleSkillSelected); }); @@ -65,10 +73,14 @@ onShow(() => { // 监听字典数据加载完成,自动更新学历显示 const receiveInitData = (initData) => { - fromValue.content=initData.value; + if(initData.value=="


"){ + + }else{ + fromValue.content=initData.value; + } console.log('子组件初始化数据:', initData) } -function getDetail(){ +function getInfo(){ // if(userInfo.userId){ $api.myRequest("/train/public/train/organ/getTrainByUnifiedSocialCreditCode", { tags: "913700001630477270", @@ -80,13 +92,36 @@ function getDetail(){ fromValue.entProvince = res.data.organProvince; fromValue.entCounty = res.data.organCounty; fromValue.entCity = res.data.organCity; + shows.value=true; } }) // }else{ // $api.msg('请先登录'); // } } - +function getDetail(){ + $api.myRequest("/train/public/announcement/selectById", { + id: id.value, + }, "GET", 9100, { + Authorization: `Bearer ${uni.getStorageSync('token')}`, + 'Content-Type': "application/x-www-form-urlencoded" + }).then((res) => { + if (res.code === 200) { + fromValue.id = res.data.id; + fromValue.title = res.data.title; + fromValue.content= res.data.content; + fromValue.remark= res.data.remark; + fromValue.entProvince = res.data.entProvince; + fromValue.entCounty = res.data.entCounty; + fromValue.entCity = res.data.entCity; + // fromValue = { + // ...fromValue, + // ...res.data, + // }; + shows.value=true; + } + }) +} const confirm = () => { if (!fromValue.title) { diff --git a/packageB/notice/trainingAnnouncement/postedList.vue b/packageB/notice/trainingAnnouncement/postedList.vue index ea154ac..f9292c3 100644 --- a/packageB/notice/trainingAnnouncement/postedList.vue +++ b/packageB/notice/trainingAnnouncement/postedList.vue @@ -46,8 +46,8 @@
发布
取消发布
-
查看
-
编辑
+ +
编辑
删除
@@ -166,8 +166,11 @@ function handleDeleteClick(row) { }); } function handleOperation(row) { - navTo(`/packageB/notice/trainingAnnouncement/postedEdit`); - // navTo(`/packageB/institution/trainingInstitutionDetail?organId=${row.organId}`); + if(row){ + navTo(`/packageB/notice/trainingAnnouncement/postedEdit?id=${row.id}`); + }else{ + navTo(`/packageB/notice/trainingAnnouncement/postedEdit`); + } } diff --git a/pages/mine/company-mine.vue b/pages/mine/company-mine.vue index 5794734..19719c0 100644 --- a/pages/mine/company-mine.vue +++ b/pages/mine/company-mine.vue @@ -50,6 +50,34 @@
已开启 + + + + 培训机构维护 + + 修改 + + + + + 评价机构维护 + + 修改 + + + + + 培训公告发布 + + 发布 + + + + + 评价公告发布 + + 发布 + @@ -91,7 +119,17 @@ const companyInfo = reactive({ function goToCompanyInfo() { navTo('/pages/mine/company-info'); } - +function handleInstitutionClick(i){ + if(i==1){ + navTo('/packageB/institution/trainingInstitutionMaintenance'); + }else if(i==2){ + navTo('/packageB/institution/evaluationAgencyMaintenance'); + }else if(i==3){ + navTo('/packageB/notice/trainingAnnouncement/postedList'); + }else if(i==4){ + navTo('/packageB/notice/evaluateAnnouncement/evaluateList'); + } +} // 跳转到消息页面 function goToMessage() { navTo('/pages/msglog/msglog');