|
@@ -91,7 +91,6 @@ export default {
|
|
|
state.tabsActive = state.tabsList[0].name
|
|
|
// table页签
|
|
|
state.reportData = [...subReports]
|
|
|
- // console.log(state.reportData)
|
|
|
}
|
|
|
},
|
|
|
// 设置页面的是否为编辑页面
|
|
@@ -100,7 +99,6 @@ export default {
|
|
|
},
|
|
|
// 单个tab页面数据初始化设置
|
|
|
INIT_TAB_PAGE_DATA(state, tabsActive = '') {
|
|
|
- console.log()
|
|
|
const { pageType } = state
|
|
|
|
|
|
const setKey = (arr, depth) => {
|
|
@@ -131,7 +129,6 @@ export default {
|
|
|
`${elm.id}` === setTabActive('tab_', tabsActive || state.tabsActive)
|
|
|
)
|
|
|
})
|
|
|
- // console.log(tabPageData)
|
|
|
if (tabsActive) {
|
|
|
state.tabsActive = `tab_${tabsActive}`
|
|
|
}
|
|
@@ -183,7 +180,6 @@ export default {
|
|
|
ADD_EDIT_KEYS(state, key) {
|
|
|
state.editKeys.push(key)
|
|
|
// const index = state.editKeys.indexOf(key)
|
|
|
- // console.log(state.editKeys, key, index)
|
|
|
// if (index < 0) {
|
|
|
// state.editKeys.push(key)
|
|
|
// }
|
|
@@ -213,7 +209,6 @@ export default {
|
|
|
// 子页签数据切换
|
|
|
SUB_TABS_ACTIVE(state, { key, oldKey }) {
|
|
|
const index = state.subTabsActive.indexOf(oldKey)
|
|
|
- // console.log(index, key, oldKey)
|
|
|
if (index < 0) {
|
|
|
state.subTabsActive.push(key)
|
|
|
} else {
|
|
@@ -411,13 +406,11 @@ export default {
|
|
|
},
|
|
|
// 设置右侧树的提示内容
|
|
|
SET_HEADER_TITLE(state, { domKey, headerTitle }) {
|
|
|
- // console.log(domKey, headerTitle)
|
|
|
let isAdd = true
|
|
|
const run = (arr) => {
|
|
|
arr.forEach((elm) => {
|
|
|
if (isAdd && elm.domKey === domKey) {
|
|
|
elm.headerTitle = headerTitle
|
|
|
- // console.log(elm)
|
|
|
isAdd = false
|
|
|
}
|
|
|
if (isAdd && elm.content && elm.content.length) {
|
|
@@ -441,15 +434,16 @@ export default {
|
|
|
// state.subTitle = name
|
|
|
// },
|
|
|
SET_SUB_TITLE(state, { id, name }) {
|
|
|
- console.log({ id, name })
|
|
|
// commit('SET_SUB_TITLE', {
|
|
|
// parentId: res.data.parentId,
|
|
|
// name: res.data.reportName
|
|
|
// })
|
|
|
state.reportList && state.reportList.forEach(elm => {
|
|
|
if (`${elm.id}` === id) {
|
|
|
- state.pageDate = {
|
|
|
- status: elm.status
|
|
|
+ if (!name) {
|
|
|
+ state.pageDate = {
|
|
|
+ status: elm.status
|
|
|
+ }
|
|
|
}
|
|
|
// 如果是
|
|
|
if (elm.status === 30) {
|
|
@@ -569,7 +563,6 @@ export default {
|
|
|
return elm
|
|
|
})
|
|
|
// 转换数据结构
|
|
|
- // console.log(params)
|
|
|
const res = await updateMonthlyReport(params)
|
|
|
if (res.code === 200) {
|
|
|
cb()
|
|
@@ -613,9 +606,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 月报确认
|
|
|
- async confirmReport({ state }, cb) {
|
|
|
+ async confirmReport({ state }, {
|
|
|
+ id, cb
|
|
|
+ }) {
|
|
|
const res = await sendSubConfirm({
|
|
|
- subReportId: state.pageDate.id
|
|
|
+ subReportId: id
|
|
|
})
|
|
|
if (res.code === 200) {
|
|
|
cb()
|