|
@@ -32,7 +32,10 @@
|
|
|
<template slot-scope="scope">
|
|
|
<!-- 展开 -->
|
|
|
<div v-if="item.type === 'expand'">
|
|
|
- <TableExpandRow :analytic-feedback="scope.row.analyticFeedback" @upAnalyticFeedback="setAnalyticFeedback" />
|
|
|
+ <TableExpandRow
|
|
|
+ :analytic-feedback="scope.row.analyticFeedback"
|
|
|
+ @upAnalyticFeedback="setAnalyticFeedback"
|
|
|
+ />
|
|
|
</div>
|
|
|
<!-- 操作列 -->
|
|
|
<div v-else-if="item.name === '操作'">
|
|
@@ -41,10 +44,7 @@
|
|
|
:key="btnIndex"
|
|
|
>
|
|
|
<el-button
|
|
|
- v-if="
|
|
|
- scope.row.analyticFeedback &&
|
|
|
- !scope.row.analyticFeedback.isCommitted
|
|
|
- "
|
|
|
+ v-if="isShowButton(scope.row)"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@click="btnFun(btnItem, scope)"
|
|
@@ -109,8 +109,8 @@
|
|
|
:key="optionItem"
|
|
|
:label="optionItem"
|
|
|
:value="optionItem"
|
|
|
- >{{ optionItem }}</el-option
|
|
|
- >
|
|
|
+ >{{ optionItem }}
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<el-input
|
|
@@ -199,6 +199,7 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<slot name="fixedText" />
|
|
|
+ <markingIssues ref="markingIssues" />
|
|
|
<Analysis ref="Analysis" @upData="upDataAnalysis" />
|
|
|
</div>
|
|
|
</template>
|
|
@@ -210,6 +211,7 @@ import Analysis from './Analysis'
|
|
|
import CascaderInfo from './CascaderInfo'
|
|
|
import MultiplePeopleInfo from './MultiplePeopleInfo'
|
|
|
import TableExpandRow from './TableExpandRow'
|
|
|
+import markingIssues from './markingIssues'
|
|
|
import searchPeople from '@/components/select/searchPeople' // 人员select
|
|
|
import { updateAnalyticFeedback } from '@/api/qualityMonthlyReport/edit'
|
|
|
import { reportDataBack } from '@/store/modules/monthlyReport/edit/utils.js'
|
|
@@ -221,7 +223,8 @@ export default {
|
|
|
CascaderInfo,
|
|
|
searchPeople,
|
|
|
MultiplePeopleInfo,
|
|
|
- TableExpandRow
|
|
|
+ TableExpandRow,
|
|
|
+ markingIssues
|
|
|
},
|
|
|
props: {
|
|
|
plusTableDataBottom: {
|
|
@@ -313,7 +316,14 @@ export default {
|
|
|
this.tableData.splice(scope.$index, 1)
|
|
|
}
|
|
|
if (btnItem.value === '标记') {
|
|
|
- this.tableData.splice(scope.$index, 1)
|
|
|
+ this.$refs.markingIssues.modalShow = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.markingIssues.openModal({
|
|
|
+ title: '标记为重点问题',
|
|
|
+ scope,
|
|
|
+ columns: this.columns
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
if (btnItem.value === '分析反馈') {
|
|
|
console.log(293, btnItem, scope)
|
|
@@ -322,9 +332,13 @@ export default {
|
|
|
},
|
|
|
// 分析反馈问题更新
|
|
|
upDataAnalysis({ rowIndex, analyticFeedback }) {
|
|
|
- console.log(rowIndex, analyticFeedback)
|
|
|
- this.tableData[rowIndex].analyticFeedback = _.cloneDeep(analyticFeedback)
|
|
|
- this.setAnalyticFeedback()
|
|
|
+ if (this.pageType !== 'edit') {
|
|
|
+ console.log(rowIndex, analyticFeedback)
|
|
|
+ this.tableData[rowIndex].analyticFeedback = _.cloneDeep(
|
|
|
+ analyticFeedback
|
|
|
+ )
|
|
|
+ this.setAnalyticFeedback()
|
|
|
+ }
|
|
|
},
|
|
|
addTableData() {
|
|
|
const item = {
|
|
@@ -391,36 +405,45 @@ export default {
|
|
|
},
|
|
|
// 查看页面数据分析
|
|
|
setAnalyticFeedback() {
|
|
|
- // this.$refs.Analysis.open()
|
|
|
- console.log(this.domKey)
|
|
|
- const tabPageData = reportDataBack(_.cloneDeep(this.tabPageData))
|
|
|
- let obj = null
|
|
|
- const run = (arr) => {
|
|
|
- arr.forEach((elm) => {
|
|
|
- if (elm.content.length) {
|
|
|
- elm.content.forEach((item) => {
|
|
|
- if (item.domKey === this.domKey) {
|
|
|
- console.log(elm)
|
|
|
- obj = _.cloneDeep(elm)
|
|
|
- }
|
|
|
- })
|
|
|
+ if (this.pageType !== 'edit') {
|
|
|
+ // this.$refs.Analysis.open()
|
|
|
+ console.log(this.domKey)
|
|
|
+ const tabPageData = reportDataBack(_.cloneDeep(this.tabPageData))
|
|
|
+ let obj = null
|
|
|
+ const run = (arr) => {
|
|
|
+ arr.forEach((elm) => {
|
|
|
+ if (elm.content.length) {
|
|
|
+ elm.content.forEach((item) => {
|
|
|
+ if (item.domKey === this.domKey) {
|
|
|
+ console.log(elm)
|
|
|
+ obj = _.cloneDeep(elm)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ run(tabPageData.children)
|
|
|
+ console.log(obj)
|
|
|
+ // 提交数据
|
|
|
+ updateAnalyticFeedback({
|
|
|
+ reportId: this.$route.query.reportId,
|
|
|
+ reportCatalog: obj
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ console.log(res.data)
|
|
|
}
|
|
|
})
|
|
|
+ // console.log(this.domKey)
|
|
|
+ // console.log(this.title)
|
|
|
}
|
|
|
- run(tabPageData.children)
|
|
|
- console.log(obj)
|
|
|
- // 提交数据
|
|
|
- updateAnalyticFeedback({
|
|
|
- reportId: this.$route.query.reportId,
|
|
|
- reportCatalog: obj
|
|
|
-
|
|
|
- }).then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- console.log(res.data)
|
|
|
- }
|
|
|
- })
|
|
|
- // console.log(this.domKey)
|
|
|
- // console.log(this.title)
|
|
|
+ },
|
|
|
+ // 操作按钮是否显示隐藏
|
|
|
+ isShowButton(row) {
|
|
|
+ if (this.pageType === 'edit') return true
|
|
|
+ if (row.analyticFeedback && row.analyticFeedback.isCommitted) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -437,14 +460,17 @@ export default {
|
|
|
.plus-table-data {
|
|
|
margin-top: 2px;
|
|
|
}
|
|
|
-/deep/.el-table__expand-column {
|
|
|
+
|
|
|
+/deep/ .el-table__expand-column {
|
|
|
border-right: 0;
|
|
|
+
|
|
|
.el-icon-arrow-right:before {
|
|
|
// 这是展开图标
|
|
|
border: 1px solid rgba(0, 0, 0, 0.14901960784313725);
|
|
|
}
|
|
|
}
|
|
|
-/deep/.el-table__expand-column .cell {
|
|
|
+
|
|
|
+/deep/ .el-table__expand-column .cell {
|
|
|
.el-table__expand-icon {
|
|
|
.el-icon-arrow-right:before {
|
|
|
// 这是展开图标
|
|
@@ -452,10 +478,12 @@ export default {
|
|
|
//content: "\e6d8";
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.el-table__expand-icon--expanded {
|
|
|
// 这是点击后的旋转角度
|
|
|
//transform: rotate(180deg);
|
|
|
transform: rotate(0deg);
|
|
|
+
|
|
|
.el-icon-arrow-right:before {
|
|
|
// 这是展开图标
|
|
|
//content: "\e6d9";
|
|
@@ -463,9 +491,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.red {
|
|
|
color: red;
|
|
|
}
|
|
|
+
|
|
|
.yellow {
|
|
|
color: yellow;
|
|
|
}
|