|
@@ -9,7 +9,34 @@
|
|
|
@close="closeDia"
|
|
|
>
|
|
|
<div class="dialog-wrap">
|
|
|
- <div style="margin-bottom: 20px;">
|
|
|
+ <div class="filter-wrap">
|
|
|
+ <div>
|
|
|
+ <el-cascader
|
|
|
+ @change="filterChange"
|
|
|
+ :options="classifyOptions"
|
|
|
+ v-model="filterForm.classifyIds"
|
|
|
+ :props="{
|
|
|
+ value: 'Id',
|
|
|
+ label: 'ClassifyName',
|
|
|
+ children: 'Child',
|
|
|
+ }"
|
|
|
+ :show-all-levels="false"
|
|
|
+ :disabled="defaultClassify.length>0"
|
|
|
+ clearable
|
|
|
+ :placeholder="$t('ReportManage.smart_type_filtering')"
|
|
|
+ style="width:160px;"
|
|
|
+ ></el-cascader>
|
|
|
+ <el-select
|
|
|
+ v-model.number="filterForm.state"
|
|
|
+ :placeholder="$t('ReportManage.smart_status_filtering')"
|
|
|
+ size="medium"
|
|
|
+ clearable
|
|
|
+ style="width:160px;"
|
|
|
+ @change="filterChange"
|
|
|
+ >
|
|
|
+ <el-option :label="stateMap.get(item)" :value="item" v-for="item in stateOption" :key="item"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
<el-input
|
|
|
@input="filterChange"
|
|
|
:placeholder="$t('ReportManage.ReportList.ph_report_tit')"
|
|
@@ -66,6 +93,10 @@
|
|
|
<span v-if="row.ClassifyNameThird">/ {{ row.ClassifyNameThird }}</span>
|
|
|
</span>
|
|
|
|
|
|
+ <span v-else-if="item.key==='State'">
|
|
|
+ {{ stateMap.get(row.State) }}
|
|
|
+ </span>
|
|
|
+
|
|
|
<span v-else-if="item.key==='CreateTime'">
|
|
|
{{ $moment(row.CreateTime).format('YYYY-MM-DD') }}
|
|
|
</span>
|
|
@@ -108,6 +139,12 @@ export default {
|
|
|
id: {
|
|
|
type: Number,
|
|
|
default: 0
|
|
|
+ },
|
|
|
+ defaultClassify: {
|
|
|
+ type: Array
|
|
|
+ },
|
|
|
+ classifyOptions: {
|
|
|
+ type: Array
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -115,23 +152,43 @@ export default {
|
|
|
return [
|
|
|
{ label: this.$t('ReportManage.smart_report_title'),key: 'Title' },
|
|
|
{ label: this.$t('ReportManage.smart_report_type'),key: 'Classify' },
|
|
|
+ { label: this.$t('ReportManage.smart_status_table'),key: 'State' },
|
|
|
{ label: '创建时间',key: 'CreateTime' },
|
|
|
]
|
|
|
+ },
|
|
|
+
|
|
|
+ stateMap() {
|
|
|
+ return new Map([
|
|
|
+ [1,this.$t('ReportManage.smart_unpublished')],
|
|
|
+ [2,this.$t('ReportManage.smart_published')],
|
|
|
+ [3,this.$t('ReportManage.smart_pending')],
|
|
|
+ [4,this.$t('ReportManage.smart_awaiting_approval')],
|
|
|
+ [5,this.$t('ReportManage.smart_rejected')],
|
|
|
+ [6,this.$t('ReportManage.smart_approved')],
|
|
|
+ ])
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ stateOption: [1,2,3,4,5,6],
|
|
|
reportList: [],
|
|
|
pageNo: 1,
|
|
|
pageSize: 5,
|
|
|
total: 0,
|
|
|
searchTxt: '',
|
|
|
- checkList: []
|
|
|
+ checkList: [],
|
|
|
+
|
|
|
+ filterForm: {
|
|
|
+ classifyIds:[],
|
|
|
+ state:'',
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
isShow(nval) {
|
|
|
if(!nval) return
|
|
|
+
|
|
|
+ this.filterForm.classifyIds = this.defaultClassify;
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
@@ -142,6 +199,10 @@ export default {
|
|
|
this.searchTxt = '';
|
|
|
this.checkList = [];
|
|
|
|
|
|
+ this.filterForm = {
|
|
|
+ classifyIds:[],
|
|
|
+ state:'',
|
|
|
+ }
|
|
|
this.$emit('update:isShow',false)
|
|
|
},
|
|
|
|
|
@@ -170,7 +231,21 @@ export default {
|
|
|
reportV2Interface.getAuthReportList({
|
|
|
CurrentIndex: this.pageNo,
|
|
|
PageSize:this.pageSize,
|
|
|
- Keyword:this.searchTxt
|
|
|
+ Keyword:this.searchTxt,
|
|
|
+ State: String(this.filterForm.state),
|
|
|
+ ClassifyIdFirst: this.filterForm.classifyIds
|
|
|
+ ? this.filterForm.classifyIds[0]
|
|
|
+ : 0,
|
|
|
+ ClassifyIdSecond:
|
|
|
+ this.filterForm.classifyIds &&
|
|
|
+ this.filterForm.classifyIds.length > 1
|
|
|
+ ? this.filterForm.classifyIds[1]
|
|
|
+ : 0,
|
|
|
+ ClassifyIdThird:
|
|
|
+ this.filterForm.classifyIds &&
|
|
|
+ this.filterForm.classifyIds.length > 2
|
|
|
+ ? this.filterForm.classifyIds[2]
|
|
|
+ : 0,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.Ret !== 200) return;
|
|
@@ -184,7 +259,11 @@ export default {
|
|
|
</script>
|
|
|
<style scoped lang='scss'>
|
|
|
.dialog-wrap {
|
|
|
-
|
|
|
+ .filter-wrap {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
}
|
|
|
.dialog-btn{
|
|
|
margin:40px 0;
|