|
@@ -35,7 +35,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<!-- 展开 -->
|
|
|
<div v-if="item.type === 'expand'">
|
|
|
-<!-- <div @click="showItem(item, scope)">item</div>-->
|
|
|
+ <!-- <div @click="showItem(item, scope)">item</div>-->
|
|
|
<TableExpandRowList
|
|
|
v-if="scope.row.analyticFeedbackList"
|
|
|
:columns="columns"
|
|
@@ -87,7 +87,7 @@
|
|
|
</el-dropdown>
|
|
|
</span>
|
|
|
<!--链接-->
|
|
|
- <span v-else-if="btnItem.value === '链接' && isShowButton(scope.row, item)" @click.stop>
|
|
|
+ <span v-else-if="btnItem.value === '链接' && isShowButton(scope.row, item) && pageType.search(/edit/) > -1" @click.stop>
|
|
|
<el-popover v-if="scope.row.operationTarget" placement="bottom-start" trigger="hover">
|
|
|
<el-button-group>
|
|
|
<el-button
|
|
@@ -261,7 +261,7 @@
|
|
|
</span>
|
|
|
|
|
|
<div class="plus-table-data" :style="{ marginBottom: plusTableDataBottom }" @click.stop>
|
|
|
- <el-button v-if="pageDate && pageDate.status < 20" type="text" @click.stop="addTableData">
|
|
|
+ <el-button v-if="pageDate && pageDate.status < 20 && !isHistory" type="text" @click.stop="addTableData">
|
|
|
<svg-icon icon-class="data-plus" class="icon" />
|
|
|
新增
|
|
|
</el-button>
|
|
@@ -295,7 +295,7 @@ import _ from 'lodash'
|
|
|
import { uuid10 } from '@/utils'
|
|
|
import Analysis from './Analysis'
|
|
|
import LinkEdit from './LinkEdit'
|
|
|
-import Cascader from '../Cascader'
|
|
|
+import Cascader from '@/components/select/selectCascader'
|
|
|
import CascaderInfo from '../CascaderInfo'
|
|
|
import TextInfo from '../TextInfo'
|
|
|
import MultiplePeopleInfo from '../MultiplePeopleInfo'
|
|
@@ -305,7 +305,7 @@ import markingIssues from '../markingIssues'
|
|
|
import CascaderSingle from '../CascaderSingle'
|
|
|
import CascaderSingleInfo from '../CascaderSingleInfo'
|
|
|
import searchPeople from '@/components/select/searchPeople' // 人员select
|
|
|
-import { updateAnalyticFeedback, getDeptCharge } from '@/api/qualityMonthlyReport/edit'
|
|
|
+import { updateAnalyticFeedback, getDeptCharge, getAnalyticFeedback } from '@/api/qualityMonthlyReport/edit'
|
|
|
import { reportDataBack } from '@/store/modules/monthlyReport/utils'
|
|
|
// import { getDeptByKeyWord } from '@/api/qualityMonthlyReport'
|
|
|
|
|
@@ -421,6 +421,12 @@ export default {
|
|
|
},
|
|
|
isLoading() {
|
|
|
return this.$store.state.monthlyReportEdit.isLoading
|
|
|
+ },
|
|
|
+ version() {
|
|
|
+ return this.$store.state.monthlyReportEdit.version
|
|
|
+ },
|
|
|
+ isHistory() {
|
|
|
+ return this.$store.state.monthlyReportEdit.isHistory
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -441,12 +447,12 @@ export default {
|
|
|
// },
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
- this.setExpandRowKeys()
|
|
|
+ this.setAnalyticFeedbackTitle()
|
|
|
this.init()
|
|
|
})
|
|
|
setTimeout(() => {
|
|
|
if (!this.analyticFeedback) {
|
|
|
- this.setAnalyticFeedback()
|
|
|
+ this.setAnalyticFeedbackTitle()
|
|
|
}
|
|
|
}, 3000)
|
|
|
},
|
|
@@ -651,8 +657,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
// if (this.pageDate.status > 10 && this.tabsActive.indexOf('本月重点问题') < 0) {
|
|
|
+ const { isHistory } = this.$route.query
|
|
|
// 非编辑状态,并且不是·本月重点问题·,删除操作按钮
|
|
|
- if (this.pageDate && this.pageDate.status > 10 && !this.isExpand) {
|
|
|
+ if (this.pageDate && this.pageDate.status > 10 && !this.isExpand || isHistory) {
|
|
|
newColumns.splice(newColumns.length - 1, 1)
|
|
|
}
|
|
|
return newColumns
|
|
@@ -668,6 +675,70 @@ export default {
|
|
|
return [0, 0]
|
|
|
}
|
|
|
},
|
|
|
+ getTableObjAndVersion() {
|
|
|
+ const tabPageData = reportDataBack(_.cloneDeep(this.tabPageData))
|
|
|
+ let version = ''
|
|
|
+ let obj = null
|
|
|
+ const run = (arr) => {
|
|
|
+ arr.forEach((elm) => {
|
|
|
+ if (elm.domKey === this.domKey) {
|
|
|
+ console.log(elm, 686)
|
|
|
+ if (!version) {
|
|
|
+ version = elm.version
|
|
|
+ }
|
|
|
+ obj = _.cloneDeep(elm)
|
|
|
+ }
|
|
|
+ if (elm.content.length) {
|
|
|
+ elm.content.forEach((item) => {
|
|
|
+ if (item.domKey === this.domKey) {
|
|
|
+ // console.log(elm)
|
|
|
+ obj = _.cloneDeep(elm)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (elm.children.length) {
|
|
|
+ run(elm.children)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ run(tabPageData.children)
|
|
|
+ return { obj, version }
|
|
|
+ },
|
|
|
+ // 更新分析反馈信息title
|
|
|
+ async setAnalyticFeedbackTitle() {
|
|
|
+ if (this.analyticFeedback) return
|
|
|
+ const { obj } = this.getTableObjAndVersion()
|
|
|
+ let subReportId = ''
|
|
|
+
|
|
|
+ if (this.$route.query.pageType === 'readAll') {
|
|
|
+ // 根据找到的业务线名称查询业务线ID
|
|
|
+ this.subReportInfo && this.subReportInfo.length && this.subReportInfo.forEach(elm => {
|
|
|
+ if (elm.reportName === obj.title) {
|
|
|
+ subReportId = elm.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ subReportId = this.$route.query.subReportId
|
|
|
+ }
|
|
|
+ const res = await getAnalyticFeedback({
|
|
|
+ subReportId
|
|
|
+ })
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.analyticFeedback = res.data
|
|
|
+ if (this.analyticFeedback.search(/yellow/) > -1) {
|
|
|
+ this.analyticFeedback = this.analyticFeedback.replace(
|
|
|
+ /yellow/g,
|
|
|
+ '#FAAD14'
|
|
|
+ )
|
|
|
+ }
|
|
|
+ if (this.analyticFeedback.search(/green/) > -1) {
|
|
|
+ this.analyticFeedback = this.analyticFeedback.replace(
|
|
|
+ /green/g,
|
|
|
+ '#7ED321'
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查看页面数据分析
|
|
|
setAnalyticFeedback(key = '', feedbackCharge = '') {
|
|
|
if (
|
|
@@ -676,28 +747,7 @@ export default {
|
|
|
// this.tabsActive.indexOf('本月重点问题') > -1
|
|
|
this.isExpand
|
|
|
) {
|
|
|
- const tabPageData = reportDataBack(_.cloneDeep(this.tabPageData))
|
|
|
- let obj = null
|
|
|
- const run = (arr) => {
|
|
|
- arr.forEach((elm) => {
|
|
|
- if (elm.domKey === this.domKey) {
|
|
|
- // console.log(elm)
|
|
|
- obj = _.cloneDeep(elm)
|
|
|
- }
|
|
|
- if (elm.content.length) {
|
|
|
- elm.content.forEach((item) => {
|
|
|
- if (item.domKey === this.domKey) {
|
|
|
- // console.log(elm)
|
|
|
- obj = _.cloneDeep(elm)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (elm.children.length) {
|
|
|
- run(elm.children)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- run(tabPageData.children)
|
|
|
+ const { obj } = this.getTableObjAndVersion()
|
|
|
const params = {
|
|
|
reportId: this.$route.query.reportId,
|
|
|
subReportName: this.subReportName,
|
|
@@ -708,8 +758,12 @@ export default {
|
|
|
}
|
|
|
if (this.$route.query.pageType === 'readAll' && obj) {
|
|
|
params.subReportName = `${obj.title}`
|
|
|
+ // 获取查看完整月报状态下的子月报ID的version
|
|
|
+ params.version = obj.version || 0
|
|
|
+ } else {
|
|
|
+ // 获取查看单个子月报状态下的子月报ID的version
|
|
|
+ params.version = this.version || 0
|
|
|
}
|
|
|
- // console.log(params)
|
|
|
// 提交数据
|
|
|
if (obj && obj.content[0].tableRows.length) {
|
|
|
if (key && key === 'feedbackType') {
|
|
@@ -755,6 +809,7 @@ export default {
|
|
|
) {
|
|
|
return true
|
|
|
}
|
|
|
+
|
|
|
if (row.analyticFeedback && row.analyticFeedback.isCommitted) {
|
|
|
return false
|
|
|
}
|