|
@@ -89,7 +89,9 @@ export default {
|
|
|
state.selectEnum = [...params.dependence.deptArch.children]
|
|
|
setDeptArch(state.selectEnum)
|
|
|
// 设置端数据
|
|
|
- state.clientTypeList = [...params.dependence.clientType]
|
|
|
+ if (params.dependence.clientType) {
|
|
|
+ state.clientTypeList = [...params.dependence.clientType]
|
|
|
+ }
|
|
|
setDeptArch(state.clientTypeList)
|
|
|
if (subReports.length) {
|
|
|
state.tabsList = []
|
|
@@ -515,6 +517,30 @@ export default {
|
|
|
SET_CLIENT_TYPE_LIST(state, list) {
|
|
|
state.clientTypeList = list
|
|
|
setDeptArch(state.clientTypeList)
|
|
|
+ },
|
|
|
+ // 数据另存为
|
|
|
+ SAVE_AS(state, { tableHeaders, tableRows, subReportName }) {
|
|
|
+ // setTableHeader(data.tableHeaders)
|
|
|
+ const rowData = arrToObj(
|
|
|
+ [tableRows],
|
|
|
+ tableHeaders
|
|
|
+ )
|
|
|
+ const find = (arr) => {
|
|
|
+ arr.forEach(elm => {
|
|
|
+ if (elm.title === '线上问题') {
|
|
|
+ elm.content[0].tableRows.push(rowData)
|
|
|
+ }
|
|
|
+ if (elm.children && elm.children.length) {
|
|
|
+ find(elm.children)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ for (let i = state.reportData.length - 1; i >= 0; i--) {
|
|
|
+ const elm = state.reportData[i]
|
|
|
+ if (elm.reportName === subReportName) {
|
|
|
+ find(elm.reportCatalog.children)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
actions: {
|
|
@@ -789,7 +815,7 @@ export default {
|
|
|
* 线上问题、
|
|
|
*/
|
|
|
const res = await pullDataAgain(params)
|
|
|
- if (title !== '上月问题跟进' && title !== '线下缺陷') {
|
|
|
+ if (title !== '上月问题跟进' && title !== '线下缺陷' && title !== '线上问题') {
|
|
|
if (res.data.type.search(/Table|TableAndRichText/) > -1) {
|
|
|
setTableHeader(res.data.tableHeaders)
|
|
|
res.data.tableRows = arrToObj(
|
|
@@ -798,7 +824,7 @@ export default {
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
- if (title.search(/上月问题跟进|发布&回滚/) > -1) {
|
|
|
+ if (title.search(/上月问题跟进|发布&回滚|线上问题/) > -1) {
|
|
|
setTableHeader(res.data.content[0].tableHeaders)
|
|
|
res.data.content[0].tableRows = arrToObj(
|
|
|
res.data.content[0].tableRows,
|
|
@@ -811,7 +837,7 @@ export default {
|
|
|
arr.forEach((elm) => {
|
|
|
if (elm.domKey === domKey) {
|
|
|
// console.log(elm, res.data)
|
|
|
- if (title.search(/上月问题跟进|发布&回滚/) > -1) {
|
|
|
+ if (title.search(/上月问题跟进|发布&回滚|线上问题|线上问题/) > -1) {
|
|
|
elm.content = [{ ...res.data.content[0] }]
|
|
|
} else if (title.search(/线下缺陷/) > -1) {
|
|
|
elm.content = [{ ...res.data.content[0] }]
|
|
@@ -822,7 +848,7 @@ export default {
|
|
|
}
|
|
|
if (elm.content && elm.content.length) {
|
|
|
elm.content.forEach((item) => {
|
|
|
- if (title.search(/上月问题跟进|发布&回滚/) > -1) {
|
|
|
+ if (title.search(/上月问题跟进|发布&回滚|线上问题/) > -1) {
|
|
|
item.content = [{ ...res.data.content[0] }]
|
|
|
} else {
|
|
|
item.content = [{ ...res.data }]
|