feat(oa): 新增项目进度和进度步骤跟踪的API接口
添加项目进度管理和进度步骤跟踪的相关API接口,包括列表查询、详情获取、新增、修改、删除等功能
This commit is contained in:
@@ -8,8 +8,13 @@
|
||||
|
||||
<!-- 公告列表 -->
|
||||
<div class="notice-list" v-else>
|
||||
<div class="notice-item" v-for="(notice, index) in notices" :key="index" @click="toDetail(notice.noticeId)">
|
||||
<div class="notice-title">{{ notice.noticeTitle }}</div>
|
||||
<div class="notice-item" v-for="(notice, index) in notices" :key="index" @click="toDetail(notice)">
|
||||
<div class="notice-title">
|
||||
<text>{{ notice.title }}</text>
|
||||
<view class="dot" v-if="notice.state == 0">
|
||||
|
||||
</view>
|
||||
</div>
|
||||
<div class="notice-meta">
|
||||
<span class="create-by">{{ notice.createBy || '未知发布人' }}</span>
|
||||
<span class="create-time">{{ notice.createTime || '未知时间' }}</span>
|
||||
@@ -20,7 +25,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listNotice } from '@/api/oa/notice.js'
|
||||
import { listFeedback, toRead } from '@/api/oa/feedback.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -29,7 +34,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
listNotice({ pageSize: 999, pageNum: 1 }).then(res => {
|
||||
listFeedback({ pageSize: 999, pageNum: 1, type: 'notice' }).then(res => {
|
||||
// 确保res.rows存在,避免空数据报错
|
||||
this.notices = res?.rows || [];
|
||||
}).catch(err => {
|
||||
@@ -38,10 +43,16 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
toDetail(id) {
|
||||
toDetail(notice) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/workbench/article/article?type=notice&id=' + id
|
||||
url: '/pages/workbench/article/article?type=notice&id=' + notice.feedbackId
|
||||
})
|
||||
if (notice.state == 0) {
|
||||
// 标记为已读
|
||||
toRead(notice);
|
||||
notice.state = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,11 +83,21 @@ export default {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis; // 标题过长省略
|
||||
}
|
||||
|
||||
.dot {
|
||||
display: block;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background-color: red;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.notice-meta {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user