|
@@ -9,7 +9,34 @@
|
|
@close="closeDia"
|
|
@close="closeDia"
|
|
>
|
|
>
|
|
<div class="dialog-wrap">
|
|
<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
|
|
<el-input
|
|
@input="filterChange"
|
|
@input="filterChange"
|
|
:placeholder="$t('ReportManage.ReportList.ph_report_tit')"
|
|
:placeholder="$t('ReportManage.ReportList.ph_report_tit')"
|
|
@@ -66,6 +93,10 @@
|
|
<span v-if="row.ClassifyNameThird">/ {{ row.ClassifyNameThird }}</span>
|
|
<span v-if="row.ClassifyNameThird">/ {{ row.ClassifyNameThird }}</span>
|
|
</span>
|
|
</span>
|
|
|
|
|
|
|
|
+ <span v-else-if="item.key==='State'">
|
|
|
|
+ {{ stateMap.get(row.State) }}
|
|
|
|
+ </span>
|
|
|
|
+
|
|
<span v-else-if="item.key==='CreateTime'">
|
|
<span v-else-if="item.key==='CreateTime'">
|
|
{{ $moment(row.CreateTime).format('YYYY-MM-DD') }}
|
|
{{ $moment(row.CreateTime).format('YYYY-MM-DD') }}
|
|
</span>
|
|
</span>
|
|
@@ -108,6 +139,12 @@ export default {
|
|
id: {
|
|
id: {
|
|
type: Number,
|
|
type: Number,
|
|
default: 0
|
|
default: 0
|
|
|
|
+ },
|
|
|
|
+ defaultClassify: {
|
|
|
|
+ type: Array
|
|
|
|
+ },
|
|
|
|
+ classifyOptions: {
|
|
|
|
+ type: Array
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -115,23 +152,43 @@ export default {
|
|
return [
|
|
return [
|
|
{ label: this.$t('ReportManage.smart_report_title'),key: 'Title' },
|
|
{ label: this.$t('ReportManage.smart_report_title'),key: 'Title' },
|
|
{ label: this.$t('ReportManage.smart_report_type'),key: 'Classify' },
|
|
{ label: this.$t('ReportManage.smart_report_type'),key: 'Classify' },
|
|
|
|
+ { label: this.$t('ReportManage.smart_status_table'),key: 'State' },
|
|
{ label: '创建时间',key: 'CreateTime' },
|
|
{ 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() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ stateOption: [1,2,3,4,5,6],
|
|
reportList: [],
|
|
reportList: [],
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 5,
|
|
pageSize: 5,
|
|
total: 0,
|
|
total: 0,
|
|
searchTxt: '',
|
|
searchTxt: '',
|
|
- checkList: []
|
|
|
|
|
|
+ checkList: [],
|
|
|
|
+
|
|
|
|
+ filterForm: {
|
|
|
|
+ classifyIds:[],
|
|
|
|
+ state:'',
|
|
|
|
+ },
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
isShow(nval) {
|
|
isShow(nval) {
|
|
if(!nval) return
|
|
if(!nval) return
|
|
|
|
+
|
|
|
|
+ this.filterForm.classifyIds = this.defaultClassify;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
@@ -142,6 +199,10 @@ export default {
|
|
this.searchTxt = '';
|
|
this.searchTxt = '';
|
|
this.checkList = [];
|
|
this.checkList = [];
|
|
|
|
|
|
|
|
+ this.filterForm = {
|
|
|
|
+ classifyIds:[],
|
|
|
|
+ state:'',
|
|
|
|
+ }
|
|
this.$emit('update:isShow',false)
|
|
this.$emit('update:isShow',false)
|
|
},
|
|
},
|
|
|
|
|
|
@@ -170,7 +231,21 @@ export default {
|
|
reportV2Interface.getAuthReportList({
|
|
reportV2Interface.getAuthReportList({
|
|
CurrentIndex: this.pageNo,
|
|
CurrentIndex: this.pageNo,
|
|
PageSize:this.pageSize,
|
|
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) => {
|
|
.then((res) => {
|
|
if (res.Ret !== 200) return;
|
|
if (res.Ret !== 200) return;
|
|
@@ -184,7 +259,11 @@ export default {
|
|
</script>
|
|
</script>
|
|
<style scoped lang='scss'>
|
|
<style scoped lang='scss'>
|
|
.dialog-wrap {
|
|
.dialog-wrap {
|
|
-
|
|
|
|
|
|
+ .filter-wrap {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.dialog-btn{
|
|
.dialog-btn{
|
|
margin:40px 0;
|
|
margin:40px 0;
|