|
@@ -2,6 +2,7 @@
|
|
|
<div
|
|
|
v-if="indexShow"
|
|
|
ref="pageWrapper"
|
|
|
+ v-loading="loading"
|
|
|
class="page-wrapper"
|
|
|
@click.stop="$store.commit('monthlyReportEdit/INIT_EDIT_KEYS')"
|
|
|
>
|
|
@@ -13,67 +14,106 @@
|
|
|
>
|
|
|
<template v-if="pageDate" slot="content">
|
|
|
<el-button
|
|
|
- v-if="pageDate && pageDate.status < 20 && (roleCode === 100 || roleCode === 50 || roleCode === 0)"
|
|
|
+ v-if="
|
|
|
+ pageDate &&
|
|
|
+ pageDate.status < 20 &&
|
|
|
+ (roleCode === 100 || roleCode === 50 || roleCode === 0)
|
|
|
+ "
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
@click="upDateReport('cb')"
|
|
|
>保存
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="pageDate && pageDate.status === 10 && (roleCode === 100 || roleCode === 50 || roleCode === 0)"
|
|
|
+ v-if="
|
|
|
+ pageDate &&
|
|
|
+ pageDate.status === 10 &&
|
|
|
+ (roleCode === 100 || roleCode === 50 || roleCode === 0)
|
|
|
+ "
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
- @click="confirmReport"
|
|
|
- >月报确认
|
|
|
+ @click="dialogOpen('dialogConfirm')"
|
|
|
+ >月报确认<!-- @click="confirmReport" -->
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="pageDate && pageDate.status < 10 && (roleCode === 100 || roleCode === 0)"
|
|
|
+ v-if="
|
|
|
+ pageDate &&
|
|
|
+ pageDate.status < 10 &&
|
|
|
+ (roleCode === 100 || roleCode === 0)
|
|
|
+ "
|
|
|
plain
|
|
|
size="small"
|
|
|
@click="dialogOpen('dialogSend')"
|
|
|
>发送确认
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="$route.query.type === 'create' && pageDate && pageDate.status < 20 && (roleCode === 100 || roleCode === 0)"
|
|
|
+ v-if="
|
|
|
+ $route.query.type === 'create' &&
|
|
|
+ pageDate &&
|
|
|
+ pageDate.status < 20 &&
|
|
|
+ (roleCode === 100 || roleCode === 0)
|
|
|
+ "
|
|
|
slot="reference"
|
|
|
plain
|
|
|
size="small"
|
|
|
- @click="$store.dispatch('monthlyReportEdit/deleteReport', { isMsg: false, })"
|
|
|
+ @click="dialogOpen('dialogCancel')"
|
|
|
>取消
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="pageType.search(/All/) > -1 && pageDate && pageDate.status === 20 && (roleCode === 100 || roleCode === 0)"
|
|
|
+ v-if="
|
|
|
+ pageType.search(/All/) > -1 &&
|
|
|
+ pageDate &&
|
|
|
+ pageDate.status === 20 &&
|
|
|
+ (roleCode === 100 || roleCode === 0)
|
|
|
+ "
|
|
|
slot="reference"
|
|
|
plain
|
|
|
size="small"
|
|
|
@click="publishAllReport"
|
|
|
>发布
|
|
|
</el-button>
|
|
|
- <span v-if="pageDate.status === 20 && (roleCode === 100 || roleCode === 0)">
|
|
|
- <span v-if="$route.query.pageType === 'read'" class="el-dropdown-link" style="cursor: pointer" @click="returnReport('only')">
|
|
|
- 回退
|
|
|
- </span>
|
|
|
- <el-dropdown
|
|
|
- v-else
|
|
|
- trigger="click"
|
|
|
- @command="returnReport"
|
|
|
- >
|
|
|
- <span class="el-dropdown-link" style="cursor: pointer">
|
|
|
- 回退<i class="el-icon-arrow-down el-icon--right" />
|
|
|
- </span>
|
|
|
+ <span
|
|
|
+ v-if="pageDate.status === 20 && (roleCode === 100 || roleCode === 0)"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="$route.query.pageType === 'read'"
|
|
|
+ slot="reference"
|
|
|
+ plain
|
|
|
+ size="small"
|
|
|
+ @click="returnReport('only')"
|
|
|
+ >回退
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown v-else trigger="click" @command="returnReport">
|
|
|
+ <el-button
|
|
|
+ v-if="$route.query.pageType === 'read'"
|
|
|
+ slot="reference"
|
|
|
+ plain
|
|
|
+ size="small"
|
|
|
+ @click="returnReport('only')"
|
|
|
+ >
|
|
|
+ <span class="el-dropdown-link" style="cursor: pointer">
|
|
|
+ 回退<i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </span>
|
|
|
+ </el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="all">全部</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
v-for="item in subReportInfo"
|
|
|
:key="item.id"
|
|
|
:command="item.id"
|
|
|
- >{{ item.reportName }}
|
|
|
+ >{{ item.reportName }}
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</span>
|
|
|
<el-button
|
|
|
- v-if=" pageType.search(/All/) > -1 && (!$route.query.type || $route.query.type !== 'create') && pageDate && pageDate.status < 20 && (roleCode === 100 || roleCode === 0)"
|
|
|
+ v-if="
|
|
|
+ pageType.search(/All/) > -1 &&
|
|
|
+ (!$route.query.type || $route.query.type !== 'create') &&
|
|
|
+ pageDate &&
|
|
|
+ pageDate.status < 20 &&
|
|
|
+ (roleCode === 100 || roleCode === 0)
|
|
|
+ "
|
|
|
slot="reference"
|
|
|
type="danger"
|
|
|
size="small"
|
|
@@ -117,10 +157,15 @@
|
|
|
v-clickoutside="$refs.menu && $refs.menu.closeMenu"
|
|
|
:listen-time="100"
|
|
|
:offset-top="178"
|
|
|
- :target="() => $refs && $refs.pageWrapper && $refs.pageWrapper.parentNode"
|
|
|
+ :target="
|
|
|
+ () => $refs && $refs.pageWrapper && $refs.pageWrapper.parentNode
|
|
|
+ "
|
|
|
@change="userFun"
|
|
|
>
|
|
|
- <div class="set_scroll" style="max-height: 500px;overflow-y: scroll;">
|
|
|
+ <div
|
|
|
+ class="set_scroll"
|
|
|
+ style="max-height: 500px;overflow-y: scroll;"
|
|
|
+ >
|
|
|
<Anchor
|
|
|
:list="tabPageData && tabPageData.children"
|
|
|
:active="anchorActive"
|
|
@@ -138,8 +183,8 @@
|
|
|
ref="dialogDelete"
|
|
|
is-succes
|
|
|
:show-dialog="false"
|
|
|
- :title="'删除'"
|
|
|
- :width="'35%'"
|
|
|
+ :title="'删除月报'"
|
|
|
+ width="300px"
|
|
|
@succes="deleteReport('删除')"
|
|
|
@cancel="deleteReport('取消')"
|
|
|
>
|
|
@@ -147,13 +192,28 @@
|
|
|
确认删除当前月报 ?
|
|
|
</div>
|
|
|
</normal-dialog>
|
|
|
+ <!-- 月报取消 -->
|
|
|
+ <normal-dialog
|
|
|
+ ref="dialogCancel"
|
|
|
+ is-succes
|
|
|
+ :show-dialog="false"
|
|
|
+ :title="'取消月报'"
|
|
|
+ width="320px"
|
|
|
+ @succes="
|
|
|
+ $store.dispatch('monthlyReportEdit/deleteReport', { isMsg: false })
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div class="report-delete">
|
|
|
+ 取消后填写的数据将不会保存,是否确认 ?
|
|
|
+ </div>
|
|
|
+ </normal-dialog>
|
|
|
<!-- 月报发送确认 -->
|
|
|
<normal-dialog
|
|
|
ref="dialogSend"
|
|
|
is-succes
|
|
|
:show-dialog="false"
|
|
|
:title="'发送确认'"
|
|
|
- :width="'35%'"
|
|
|
+ width="300px"
|
|
|
@succes="sendReport"
|
|
|
@cancel="sendReport('取消')"
|
|
|
>
|
|
@@ -161,6 +221,20 @@
|
|
|
确认发送当前月报 ?
|
|
|
</div>
|
|
|
</normal-dialog>
|
|
|
+ <!-- 月报确认 -->
|
|
|
+ <normal-dialog
|
|
|
+ ref="dialogConfirm"
|
|
|
+ is-succes
|
|
|
+ :show-dialog="false"
|
|
|
+ :title="'确认月报'"
|
|
|
+ width="300px"
|
|
|
+ @succes="confirmReport"
|
|
|
+ @cancel="confirmReport('取消')"
|
|
|
+ >
|
|
|
+ <div class="report-delete">
|
|
|
+ 确认数据已填写无误,进行月报确认吗 ?
|
|
|
+ </div>
|
|
|
+ </normal-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -235,6 +309,9 @@ export default {
|
|
|
},
|
|
|
roleCode() {
|
|
|
return this.$store.state.monthlyReportEdit.roleCode
|
|
|
+ },
|
|
|
+ loading() {
|
|
|
+ return this.$store.state.monthlyReportEdit.loading
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -261,7 +338,10 @@ export default {
|
|
|
)
|
|
|
}
|
|
|
// 获取部门数据;只有查看但业务线时,才需要单独获取部门数据
|
|
|
- if (this.$route.query.pageType === 'readAll' && this.$route.query.reportId) {
|
|
|
+ if (
|
|
|
+ this.$route.query.pageType === 'readAll' &&
|
|
|
+ this.$route.query.reportId
|
|
|
+ ) {
|
|
|
this.$store.dispatch(
|
|
|
'monthlyReportEdit/setSelectEnum',
|
|
|
this.$route.query.reportId
|
|
@@ -367,12 +447,20 @@ export default {
|
|
|
},
|
|
|
// 月报更新
|
|
|
upDateReport(key = 'cb', confirmReportBack) {
|
|
|
- this.$store.dispatch(`monthlyReportEdit/${this.pageType.search(/All/) > -1 ? 'upDateReport' : 'upDateSubReport'}`, () => {
|
|
|
- confirmReportBack && confirmReportBack()
|
|
|
- if (key === 'cb') {
|
|
|
- this.$router.push({ path: '/monthlyReport/index' })
|
|
|
+ this.$store.commit('monthlyReportEdit/SET_LOADING', true)
|
|
|
+ this.$store.dispatch(
|
|
|
+ `monthlyReportEdit/${
|
|
|
+ this.pageType.search(/All/) > -1 ? 'upDateReport' : 'upDateSubReport'
|
|
|
+ }`,
|
|
|
+ () => {
|
|
|
+ this.$store.commit('monthlyReportEdit/SET_LOADING', false)
|
|
|
+ confirmReportBack && confirmReportBack()
|
|
|
+ if (key === 'cb') {
|
|
|
+ this.$message.success('保存成功!')
|
|
|
+ // this.$router.push({ path: '/monthlyReport/index' })
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ )
|
|
|
},
|
|
|
// 月报确认
|
|
|
confirmReport() {
|
|
@@ -417,15 +505,17 @@ export default {
|
|
|
this.$refs[key].visible = true
|
|
|
},
|
|
|
sendReport(key) {
|
|
|
- this.$refs['dialogDelete'].visible = false
|
|
|
+ this.$refs['dialogSend'].visible = false
|
|
|
if (key === '取消') {
|
|
|
// this.$message('发送操作已取消!')
|
|
|
return
|
|
|
}
|
|
|
+ // this.$store.commit('monthlyReportEdit/SET_LOADING', true)
|
|
|
this.upDateReport('nocb', () => {
|
|
|
this.$store.dispatch('monthlyReportEdit/sendReport', {
|
|
|
id: this.$route.query.reportId,
|
|
|
callback: () => {
|
|
|
+ // this.$store.commit('monthlyReportEdit/SET_LOADING', false)
|
|
|
this.$router.push({ path: '/monthlyReport/index' })
|
|
|
}
|
|
|
})
|
|
@@ -465,14 +555,21 @@ export default {
|
|
|
width: 6px;
|
|
|
//height: 8px;
|
|
|
}
|
|
|
+
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
background-color: #c8cbcc;
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
+
|
|
|
&::-webkit-scrollbar-track-piece {
|
|
|
background: #d3d3d3;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.report-delete {
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
.content-wrapper {
|
|
|
/deep/ .el-tabs__nav-wrap::after {
|
|
|
height: 1px;
|
|
@@ -492,8 +589,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
// .right-wrapper {
|
|
|
- //flex: 1 1 0;
|
|
|
- //display: contents;
|
|
|
+ //flex: 1 1 0;
|
|
|
+ //display: contents;
|
|
|
// }
|
|
|
}
|
|
|
}
|