2 changed files with 233 additions and 7 deletions
@ -0,0 +1,191 @@ |
|||
<template> |
|||
<el-dialog |
|||
:visible.sync="visible" |
|||
:title="title" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false"> |
|||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
|||
<el-form-item label="所属机构"> |
|||
<el-cascader v-model="ids" :options="options" :props="{ checkStrictly: true }" clearable filterable> |
|||
</el-cascader> |
|||
</el-form-item> |
|||
<el-form-item label="排序"> |
|||
<el-select v-model="dataForm.sort" placeholder="请选择"> |
|||
<el-option |
|||
v-for="item in sortOptions" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<div class="block"> |
|||
<el-form-item label="时间" |
|||
prop="startTime"> |
|||
<el-date-picker v-model="dataForm.startTime" |
|||
type="date" |
|||
:picker-options="pickerBeginDateBefore" |
|||
value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" |
|||
placeholder="选择日期时间"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="至" |
|||
label-width="25px" |
|||
prop="endTime"> |
|||
<el-date-picker v-model="dataForm.endTime" |
|||
type="date" |
|||
:picker-options="pickerBeginDateAfter" |
|||
value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" |
|||
placeholder="选择日期时间"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
|||
</el-form-item> |
|||
</div> |
|||
</el-form> |
|||
|
|||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|||
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column> |
|||
<el-table-column prop="categoryName" label="分类名称" header-align="center" align="center"></el-table-column> |
|||
<el-table-column prop="categoryNum" label="议题项目总数" header-align="center" align="center"></el-table-column> |
|||
<el-table-column prop="issueNum" label="议题数" header-align="center" align="center"></el-table-column> |
|||
<el-table-column prop="itemNum" label="项目数" header-align="center" align="center"></el-table-column> |
|||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150" v-if="false"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="text" size="small" @click="queryThirdList(scope.row.categoryName)">查看三级目录</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination |
|||
:current-page="page" |
|||
:page-sizes="[10, 20, 50, 100]" |
|||
:page-size="limit" |
|||
:total="total" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
@size-change="pageSizeChangeHandle" |
|||
@current-change="pageCurrentChangeHandle"> |
|||
</el-pagination> |
|||
<!-- 弹窗, 新增 / 修改 --> |
|||
<!-- <issue-classified-statistic-third v-if="thirdVisible" ref="issueClassifiedStatisticThird" @refreshDataList="getDataList"></issue-classified-statistic-third> --> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import mixinViewModule from '@/mixins/view-module' |
|||
// import IssueClassifiedStatisticThird from './issue-classified-statistic-third' |
|||
export default { |
|||
mixins: [mixinViewModule], |
|||
data () { |
|||
return { |
|||
mixinViewModuleOptions: { |
|||
getDataListURL: '/analysis/issue/pageCategoryAnalysis', |
|||
getDataListIsPage: true |
|||
}, |
|||
// thirdVisible: false, |
|||
visible: false, |
|||
title: '', |
|||
dataForm: { |
|||
id: '', |
|||
streetId: '', |
|||
communityId: '', |
|||
gridId: '', |
|||
startTime: '', |
|||
endTime: '', |
|||
sort: 'desc', |
|||
categoryLevel: '', |
|||
categoryName: '' |
|||
}, |
|||
pickerBeginDateBefore: { |
|||
disabledDate: (time) => { |
|||
let beginDateVal = this.dataForm.startTime |
|||
if (beginDateVal) { |
|||
return time.getTime() > new Date(beginDateVal).getTime() |
|||
} |
|||
} |
|||
}, |
|||
pickerBeginDateAfter: { |
|||
disabledDate: (time) => { |
|||
let EndDateVal = this.dataForm.endTime |
|||
if (EndDateVal) { |
|||
return time.getTime() < new Date(EndDateVal).getTime() |
|||
} |
|||
} |
|||
}, |
|||
ids: [], |
|||
options: [], |
|||
sortOptions: [{ |
|||
value: 'desc', |
|||
label: '议题项目总数最多' |
|||
}, { |
|||
value: 'asc', |
|||
label: '议题项目总数最少' |
|||
}] |
|||
|
|||
} |
|||
}, |
|||
components: { |
|||
// IssueClassifiedStatisticThird |
|||
}, |
|||
created: function () { |
|||
this.getOptions() |
|||
}, |
|||
watch: { |
|||
'ids': function (val) { |
|||
if (val.length === 0) { |
|||
this.dataForm.streetId = '' |
|||
this.dataForm.communityId = '' |
|||
this.dataForm.gridId = '' |
|||
} |
|||
if (val.length === 1) { |
|||
this.dataForm.streetId = this.ids[0] |
|||
this.dataForm.communityId = '' |
|||
this.dataForm.gridId = '' |
|||
} |
|||
if (val.length === 2) { |
|||
this.dataForm.streetId = this.ids[0] |
|||
this.dataForm.communityId = this.ids[1] |
|||
this.dataForm.gridId = '' |
|||
} |
|||
if (val.length === 3) { |
|||
this.dataForm.streetId = this.ids[0] |
|||
this.dataForm.communityId = this.ids[1] |
|||
this.dataForm.gridId = this.ids[2] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
init () { |
|||
this.visible = true |
|||
this.$nextTick(() => { |
|||
this.getDataList() |
|||
}) |
|||
}, |
|||
getOptions () { |
|||
this.$http.get(`/sys/user/deptOptions/getByLoginUser`).then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} |
|||
this.options = res.data.options |
|||
}).catch(() => {}) |
|||
} |
|||
// queryThirdList (categoryName) { |
|||
// this.thirdVisible = true |
|||
// this.$nextTick(() => { |
|||
// this.$refs.issueClassifiedStatisticThird.ids = this.ids |
|||
// this.$refs.issueClassifiedStatisticThird.dataForm.categoryName = categoryName |
|||
// this.$refs.issueClassifiedStatisticThird.dataForm.streetId = this.dataForm.streetId |
|||
// this.$refs.issueClassifiedStatisticThird.dataForm.communityId = this.dataForm.communityId |
|||
// this.$refs.issueClassifiedStatisticThird.dataForm.gridId = this.dataForm.gridId |
|||
// this.$refs.issueClassifiedStatisticThird.dataForm.startTime = this.dataForm.startTime |
|||
// this.$refs.issueClassifiedStatisticThird.dataForm.endTime = this.dataForm.endTime |
|||
// this.$refs.issueClassifiedStatisticThird.dataForm.sort = this.dataForm.sort |
|||
// this.$refs.issueClassifiedStatisticThird.dataForm.categoryLevel = '3' |
|||
// this.$refs.issueClassifiedStatisticThird.init() |
|||
// }) |
|||
// } |
|||
} |
|||
} |
|||
</script> |
Loading…
Reference in new issue