Commit bfbee6b0 by wangzhihui

```

feat(salary): 优化薪资页面附件显示逻辑并修复样式问题

- 添加附件为空时的占位符显示
- 使用v-if条件渲染替代直接遍历,避免空数据异常
- 移除调试用的console.log语句
- 修复CSS样式缩进问题
- 注释掉VConsole初始化代码以禁用移动端调试面板
- 更新文件最后编辑时间戳
```
1 parent 4dd754e1
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-01-29 14:49:09 * @LastEditTime: 2026-02-05 16:30:58
*/ */
// 兼容 IE // 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill // https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
...@@ -45,7 +45,7 @@ fetchConfig(!isMock).then(res => { ...@@ -45,7 +45,7 @@ fetchConfig(!isMock).then(res => {
// 设置 js中可以访问 $cdn // 设置 js中可以访问 $cdn
Vue.use(cfg) Vue.use(cfg)
window.$fetchConfig = res window.$fetchConfig = res
if (res.vconsole) new VConsole() // if (res.vconsole) new VConsole()
/**登录过期 重新登录 */ /**登录过期 重新登录 */
window.reLogin = () => { window.reLogin = () => {
util.removeLocalStorage('ww_userInfo') util.removeLocalStorage('ww_userInfo')
......
...@@ -22,13 +22,17 @@ ...@@ -22,13 +22,17 @@
<!-- 附图 --> <!-- 附图 -->
<div class="row"> <div class="row">
<div class="label">附件</div> <div class="label">附件</div>
<div class="value" v-if="!(imageUrls &&imageUrls.length)">-</div>
</div> </div>
<div class="row"> <div class="row">
<template v-if="imageUrls && imageUrls.length">
<div class="value images"> <div class="value images">
<div v-for="(u, idx) in imageUrls" :key="'img_' + idx" class="image-wrap" @click="openImagePreview(idx)"> <div v-for="(u, idx) in imageUrls" :key="'img_' + idx" class="image-wrap" @click="openImagePreview(idx)">
<img :src="u" alt="" /> <img :src="u" alt="" />
</div> </div>
</div> </div>
</template>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="item" v-for="p in approvers" :key="p.id"> <div class="item" v-for="p in approvers" :key="p.id">
...@@ -79,16 +83,14 @@ export default { ...@@ -79,16 +83,14 @@ export default {
submitting: false, submitting: false,
approveOpinion: '', approveOpinion: '',
approveDetail: { approveDetail: {
approvePermission:'', approvePermission: '',
performanceConfigApproveOperationRecordList:[], performanceConfigApproveOperationRecordList: [],
attachmentImgs:'' attachmentImgs: ''
} }
} }
}, },
computed: { computed: {
isApproverPermission() { isApproverPermission() {
console.log('isApproverPermission', this.approveDetail?.approvePermission)
const v = this.approveDetail?.approvePermission const v = this.approveDetail?.approvePermission
return Number(v) == 2 return Number(v) == 2
}, },
...@@ -123,7 +125,7 @@ export default { ...@@ -123,7 +125,7 @@ export default {
id: this.id id: this.id
}) })
if (res) { if (res) {
this.approveDetail = Object.assign(this.approveDetail,res) this.approveDetail = Object.assign(this.approveDetail, res)
} }
} catch (e) { } catch (e) {
console.warn('getStaffConfig failed, use fallback data.', e) console.warn('getStaffConfig failed, use fallback data.', e)
...@@ -143,7 +145,7 @@ export default { ...@@ -143,7 +145,7 @@ export default {
await salaryApi.handleApprove({ await salaryApi.handleApprove({
performanceConfigApproveId: this.id, performanceConfigApproveId: this.id,
status, // 2通过 / 3驳回 status, // 2通过 / 3驳回
mobile: this.phone , mobile: this.phone,
approveOpinion: this.approveOpinion approveOpinion: this.approveOpinion
}) })
Toast.success('已提交') Toast.success('已提交')
...@@ -281,7 +283,7 @@ export default { ...@@ -281,7 +283,7 @@ export default {
width: calc((100% - 24px) / 3); width: calc((100% - 24px) / 3);
margin-right: 8px; margin-right: 8px;
height: 98px; height: 98px;
border-radius: 8px; border-radius: 8px;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!