|
|
@@ -191,6 +191,39 @@
|
|
|
</el-timeline>
|
|
|
<div class="timelineEmpty">暂无日程</div>
|
|
|
</el-card> -->
|
|
|
+ <el-card v-if="roleKeys.includes('GeneralManager') || roleKeys.includes('SalesDirector')" class="notice">
|
|
|
+ <div slot="header" class="card-title">
|
|
|
+ <span>评论回复</span>
|
|
|
+ <div class="buttons">
|
|
|
+ <el-button size="mini" @click="handleFollow">
|
|
|
+ 更多
|
|
|
+ <i class="el-icon-arrow-right el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table border :data="commentList" height="100%" style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="项目/客户/渠道名称"
|
|
|
+ prop="targetName"
|
|
|
+ show-overflow-tooltip
|
|
|
+ width="160" />
|
|
|
+ <el-table-column align="center" label="评论人" prop="createdName" width="120" />
|
|
|
+ <el-table-column align="center" label="评论内容" prop="content" show-overflow-tooltip width="220" />
|
|
|
+ <el-table-column align="center" label="评论时间" prop="createdTime" width="160" />
|
|
|
+ <el-table-column align="center" label="回复人" width="120">
|
|
|
+ <template #default="{ row }">{{ row.replyComments ? row.replyComments[0].createdName : '-' }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="回复内容" show-overflow-tooltip width="220">
|
|
|
+ <template #default="{ row }">{{ row.replyComments ? row.replyComments[0].content : '-' }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="回复时间" width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.replyComments ? parseTime(row.replyComments[0].createdTime, '{y}-{m}-{d} {h}:{i}') : '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-card>
|
|
|
<el-card class="notice">
|
|
|
<div slot="header" class="card-title">
|
|
|
<span>督办管理</span>
|
|
|
@@ -220,7 +253,7 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</el-card>
|
|
|
- <el-card class="notice">
|
|
|
+ <el-card v-if="!roleKeys.includes('GeneralManager') && !roleKeys.includes('SalesDirector')" class="notice">
|
|
|
<div slot="header" class="card-title">
|
|
|
<span>公告</span>
|
|
|
<div class="buttons">
|
|
|
@@ -289,6 +322,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { mapGetters } from 'vuex'
|
|
|
import NoticeDetails from '@/views/system/notice/details.vue'
|
|
|
import * as echarts from 'echarts'
|
|
|
import VueDragger from 'vuedraggable'
|
|
|
@@ -297,6 +331,8 @@
|
|
|
import indexApi from '@/api/index'
|
|
|
import messageApi from '@/api/system/message'
|
|
|
import taskApi from '@/api/plat/task'
|
|
|
+ import followApi from '@/api/customer/follow'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'Index',
|
|
|
components: {
|
|
|
@@ -401,9 +437,19 @@
|
|
|
statisticsForm: {
|
|
|
toDoNumber: 0,
|
|
|
},
|
|
|
+ commentList: [], //评论列表
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ roleKeys: 'user/roleKeys',
|
|
|
+ }),
|
|
|
+ },
|
|
|
mounted() {
|
|
|
+ // GeneralManager 总经理
|
|
|
+ // SalesDirector 销售总监
|
|
|
+ console.log('roleKeys', this.roleKeys)
|
|
|
+ this.getCommentList()
|
|
|
this.init()
|
|
|
this.getDateList()
|
|
|
this.getOptions()
|
|
|
@@ -420,6 +466,13 @@
|
|
|
window.removeEventListener('resize', this.handleResize)
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取首页评论信息
|
|
|
+ async getCommentList() {
|
|
|
+ if (!this.roleKeys.includes('GeneralManager') && !this.roleKeys.includes('SalesDirector')) return
|
|
|
+ const [err, res] = await to(followApi.getHomeCommentList({}))
|
|
|
+ if (err) return
|
|
|
+ this.commentList = res.data.list
|
|
|
+ },
|
|
|
async getHomeNumReportData() {
|
|
|
let ids = this.privateBoard.map((item) => {
|
|
|
return item.id
|
|
|
@@ -1039,6 +1092,11 @@
|
|
|
name: 'NoticeHistory',
|
|
|
})
|
|
|
},
|
|
|
+ handleFollow() {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'CustomerFollow',
|
|
|
+ })
|
|
|
+ },
|
|
|
handleSupervision() {
|
|
|
this.$router.push({
|
|
|
name: 'Task',
|