|
@@ -10,12 +10,28 @@
|
|
|
<el-tabs v-model="activeTab" @tab-click="handleClick">
|
|
|
<el-tab-pane :label="$t('AprrovalPage.be_processed_tab')" name="pending"></el-tab-pane>
|
|
|
<el-tab-pane :label="$t('AprrovalPage.processed_tab')" name="processed"></el-tab-pane>
|
|
|
- <el-tab-pane :label="$t('AprrovalPage.i_initiated_tab')" name="originate"></el-tab-pane>
|
|
|
+ <el-tab-pane :label="$t('AprrovalPage.i_initiated_tab')" name="originate" v-if="activeMainTab==='bi'"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
<div class="approve-list">
|
|
|
<div class="select-box">
|
|
|
- <el-cascader v-model="classify"
|
|
|
+ <!-- -->
|
|
|
+ <cascader
|
|
|
+ v-if="['edb','chart'].includes(activeMainTab)"
|
|
|
+ v-model="classify"
|
|
|
+ :options="classifyOptions"
|
|
|
+ clearable
|
|
|
+ collapse-tags
|
|
|
+ placeholder="选择分类"
|
|
|
+ cascaderWidth="width: 240px"
|
|
|
+ @changeVal="handleFilter"
|
|
|
+ :config="{ multiple: true, emitPath: false }"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- bi分类 -->
|
|
|
+ <el-cascader
|
|
|
+ v-else-if="activeMainTab==='bi'"
|
|
|
+ v-model="classify"
|
|
|
:placeholder="activeMainTab == 'report' ? $t('AprrovalPage.associated_report_ipt') : $t('AprrovalPage.select_associated_Kanban_tip')" clearable
|
|
|
:options="activeMainTab == 'report' ? classifyTree : biClassifyTree"
|
|
|
:props="activeMainTab == 'report' ? {value:'ClassifyId',label:'ClassifyName',children:'Children'} : {value:'BiDashboardClassifyId',label:'BiDashboardClassifyName',children:'Children'}"
|
|
@@ -56,7 +72,7 @@
|
|
|
</el-select>
|
|
|
|
|
|
<el-input v-model="keyword" prefix-icon="el-icon-search" clearable @input="handleCurrentChange(1)"
|
|
|
- :placeholder="activeMainTab == 'report'?$t('AprrovalPage.report_title_ipt'):$t('AprrovalPage.enter_Kanban_name_tip')" style="width:260px;margin-left: auto;"></el-input>
|
|
|
+ :placeholder="searchPhLabel" style="width:260px;margin-left: auto;"></el-input>
|
|
|
</div>
|
|
|
<div class="list-box">
|
|
|
<el-table
|
|
@@ -161,9 +177,36 @@ const tabMap = {
|
|
|
}
|
|
|
export default {
|
|
|
mixins:[approveMixins,reportApproveConfig],
|
|
|
+ computed:{
|
|
|
+ edbTableColumns() {
|
|
|
+ const columns = [
|
|
|
+ { label: '审批名称',key:'ApproveName',show: true },
|
|
|
+ { label: '提交人',key:'ApplyUserName',show: true },
|
|
|
+ { label: '提交时间',key:'CreateTime',show: true },
|
|
|
+ { label: '审批状态',key:'RecordState',show: this.activeTab==='pending' },
|
|
|
+ { label: '处理时间',key:'HandleTime',show: this.activeTab==='processed' },
|
|
|
+ { label: '处理状态',key:'RecordState',show: this.activeTab==='processed' },
|
|
|
+ ]
|
|
|
+
|
|
|
+ let resultCols = columns.filter(_ => _.show);
|
|
|
+ return resultCols;
|
|
|
+ },
|
|
|
+
|
|
|
+ searchPhLabel() {
|
|
|
+ const phLabel = {
|
|
|
+ 'edb': '指标Id/名称',
|
|
|
+ 'chart': '图表名称',
|
|
|
+ 'bi': this.$t('AprrovalPage.enter_Kanban_name_tip')
|
|
|
+ }
|
|
|
+ return phLabel[this.activeMainTab] && phLabel[this.activeMainTab];
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- mainTabs:[],
|
|
|
+ mainTabs:[
|
|
|
+ { label:'指标审批',name:'edb' },
|
|
|
+ { label:'图表审批',name:'chart' },
|
|
|
+ ],
|
|
|
activeMainTab:'',
|
|
|
activeTab: 'pending',
|
|
|
/* 筛选项 */
|
|
@@ -177,11 +220,8 @@ export default {
|
|
|
SortField:0,
|
|
|
|
|
|
tableLoading:false,
|
|
|
- tableData: [
|
|
|
- { label:'指标审批',name:'edb' },
|
|
|
- { label:'图表审批',name:'chart' },
|
|
|
- ],
|
|
|
- tableColumns: approve_pending_columns,
|
|
|
+ tableData: [],
|
|
|
+ tableColumns: this.edbTableColumns,
|
|
|
page: 1,
|
|
|
pageSize: 10,
|
|
|
total: 0,
|
|
@@ -213,7 +253,7 @@ export default {
|
|
|
|
|
|
return ids
|
|
|
},
|
|
|
- getTableData(){
|
|
|
+ async getTableData(){
|
|
|
this.tableLoading = true
|
|
|
this.tableData=[]
|
|
|
const baseParams = {
|
|
@@ -222,22 +262,6 @@ export default {
|
|
|
CurrentIndex:this.page,
|
|
|
Keyword:this.keyword,
|
|
|
}
|
|
|
- const selectParams = {
|
|
|
- //关联报告
|
|
|
- ReportType:this.classify[0]||0,
|
|
|
- ClassifyFirstId:this.handleReportClassifyId().ClassifyFirstId||0,
|
|
|
- ClassifySecondId:this.handleReportClassifyId().ClassifySecondId||0,
|
|
|
- ClassifyThirdld:this.handleReportClassifyId().ClassifyThirdld||0,
|
|
|
- //时间
|
|
|
- TimeType:this.timeType,
|
|
|
- StartTime:this.timeDate?this.timeDate[0]||'':'',
|
|
|
- EndTime:this.timeDate?this.timeDate[1]||'':'',
|
|
|
- //排序
|
|
|
- SortRule:this.SortRule,
|
|
|
- SortField:this.SortField,
|
|
|
- //处理状态
|
|
|
- ApproveState:this.ApproveState,
|
|
|
- }
|
|
|
const biApproveParams = {
|
|
|
ClassifyId:this.classify[0] || 0,
|
|
|
TimeType:this.timeType,
|
|
@@ -247,30 +271,22 @@ export default {
|
|
|
SortField:this.SortField,
|
|
|
ApproveState:this.ApproveState,
|
|
|
}
|
|
|
-
|
|
|
- if(this.activeMainTab == 'report'){
|
|
|
- approveInterence.getApproveList({
|
|
|
- ...baseParams,
|
|
|
- ...selectParams
|
|
|
- }).then(res=>{
|
|
|
- this.tableLoading=false
|
|
|
- if(res.Ret!==200) return
|
|
|
- const {List=[],Paging={}} = res.Data||{}
|
|
|
- this.tableData = List||[]
|
|
|
- this.total = Paging.Totals||0
|
|
|
- }).catch(err=>{this.tableLoading=false})
|
|
|
- } else {
|
|
|
- approveInterence.getBiApproveList({
|
|
|
+ let res = null;
|
|
|
+ if(this.activeMainTab === 'bi'){
|
|
|
+ res = await approveInterence.getBiApproveList({
|
|
|
...baseParams,
|
|
|
...biApproveParams,
|
|
|
- }).then(res=>{
|
|
|
- this.tableLoading=false
|
|
|
- if(res.Ret!==200) return
|
|
|
- const {List=[],Paging={}} = res.Data||{}
|
|
|
- this.tableData = List||[]
|
|
|
- this.total = Paging.Totals||0
|
|
|
- }).catch(err=>{this.tableLoading=false})
|
|
|
+ })
|
|
|
+
|
|
|
+ }else {
|
|
|
+ res = null
|
|
|
}
|
|
|
+
|
|
|
+ this.tableLoading=false
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ const {List=[],Paging={}} = res.Data||{}
|
|
|
+ this.tableData = List||[]
|
|
|
+ this.total = Paging.Totals||0
|
|
|
|
|
|
},
|
|
|
handleCurrentChange(page) {
|
|
@@ -294,7 +310,7 @@ export default {
|
|
|
this.classify = '';
|
|
|
this.keyword = '';
|
|
|
this.activeTab = 'pending';
|
|
|
- tabName == 'report' ? this.getClassifyTree() : this.getBIClassifyTree();
|
|
|
+ ['edb','chart'].includes(tabName) ? this.getClassifyOptions() : this.getBIClassifyTree();
|
|
|
this.handleClick()
|
|
|
},
|
|
|
handleClick() {
|
|
@@ -303,7 +319,7 @@ export default {
|
|
|
this.SortRule=0
|
|
|
this.SortField=0
|
|
|
this.ApproveState = '';
|
|
|
- this.tableColumns = columnsMap[`${this.activeTab}_${this.activeMainTab}`];
|
|
|
+ this.tableColumns = ['edb','chart'].includes(this.activeMainTab) ? this.edbTableColumns : columnsMap[`${this.activeTab}_${this.activeMainTab}`];
|
|
|
this.$refs.reftable&&this.$refs.reftable.clearSort()
|
|
|
this.handleCurrentChange(1)
|
|
|
},
|
|
@@ -332,23 +348,23 @@ export default {
|
|
|
},
|
|
|
// 语言切换
|
|
|
getContentMenuOptText(e){
|
|
|
- if(e==='报告标题') return this.$t('AprrovalPage.report_title_lable')
|
|
|
- if(e==='关联报告') return this.$t('AprrovalPage.associated_report_lable')
|
|
|
- if(e==='提交人') return this.$t('AprrovalPage.submitter_lable')
|
|
|
- if(e==='提交时间') return this.$t('AprrovalPage.submission_time_lable')
|
|
|
- if(e==='审批状态') return this.$t('AprrovalPage.approval_status_lable')
|
|
|
- if(e==='处理时间') return this.$t('AprrovalPage.processing_time_lable')
|
|
|
- if(e==='处理结果') return this.$t('AprrovalPage.processing_result_lable')
|
|
|
- if(e==='审批时间') return this.$t('AprrovalPage.approval_time')
|
|
|
- if(e==='BI看板名称') return this.$t('AprrovalPage.kanban_name')
|
|
|
- if(e==='关联分类') return this.$t('AprrovalPage.associative_classification')
|
|
|
- if(e==='关联看板') return this.$t('AprrovalPage.association_kanban')
|
|
|
- if(e==='处理状态') return this.$t('AprrovalPage.processing_state')
|
|
|
- if(e==='已通过') return this.$t('AprrovalPage.approved_option')
|
|
|
- if(e==='已驳回') return this.$t('AprrovalPage.rejected_option')
|
|
|
- if(e==='已撤销') return this.$t('AprrovalPage.revoked_option')
|
|
|
- if(e==='待审批') return this.$t('AprrovalPage.awaiting_approval_option')
|
|
|
- if(e==='已同意') return this.$t('AprrovalPage.agreed_option')
|
|
|
+ // if(e==='报告标题') return this.$t('AprrovalPage.report_title_lable')
|
|
|
+ // if(e==='关联报告') return this.$t('AprrovalPage.associated_report_lable')
|
|
|
+ // if(e==='提交人') return this.$t('AprrovalPage.submitter_lable')
|
|
|
+ // if(e==='提交时间') return this.$t('AprrovalPage.submission_time_lable')
|
|
|
+ // if(e==='审批状态') return this.$t('AprrovalPage.approval_status_lable')
|
|
|
+ // if(e==='处理时间') return this.$t('AprrovalPage.processing_time_lable')
|
|
|
+ // if(e==='处理结果') return this.$t('AprrovalPage.processing_result_lable')
|
|
|
+ // if(e==='审批时间') return this.$t('AprrovalPage.approval_time')
|
|
|
+ // if(e==='BI看板名称') return this.$t('AprrovalPage.kanban_name')
|
|
|
+ // if(e==='关联分类') return this.$t('AprrovalPage.associative_classification')
|
|
|
+ // if(e==='关联看板') return this.$t('AprrovalPage.association_kanban')
|
|
|
+ // if(e==='处理状态') return this.$t('AprrovalPage.processing_state')
|
|
|
+ // if(e==='已通过') return this.$t('AprrovalPage.approved_option')
|
|
|
+ // if(e==='已驳回') return this.$t('AprrovalPage.rejected_option')
|
|
|
+ // if(e==='已撤销') return this.$t('AprrovalPage.revoked_option')
|
|
|
+ // if(e==='待审批') return this.$t('AprrovalPage.awaiting_approval_option')
|
|
|
+ // if(e==='已同意') return this.$t('AprrovalPage.agreed_option')
|
|
|
return e
|
|
|
},
|
|
|
downloadPdfImg(row,type){
|
|
@@ -385,13 +401,12 @@ export default {
|
|
|
'myself':'originate'
|
|
|
}
|
|
|
this.activeTab = formTypeMap[formType]||'pending'
|
|
|
- this.tableColumns = columnsMap[`${this.activeTab}_${this.activeMainTab}`] || approve_pending_columns;
|
|
|
+ this.tableColumns = ['edb','chart'].includes(this.activeMainTab) ? this.edbTableColumns : columnsMap[`${this.activeTab}_${this.activeMainTab}`];
|
|
|
this.getTableData()
|
|
|
},
|
|
|
},
|
|
|
mounted(){
|
|
|
- // this.getClassifyTree();
|
|
|
- this.getBIClassifyTree();
|
|
|
+ this.getClassifyOptions()
|
|
|
},
|
|
|
components: { RejectDialog }
|
|
|
};
|