Browse Source

利用登记统计 部门选择

master
xuhuajiao 2 weeks ago
parent
commit
23bc62ca35
  1. 12
      src/api/system/dept.js
  2. 2
      src/views/archivesStatistics/usageCountStatistics/index.vue
  3. 39
      src/views/archivesStatistics/utilizeRegistrationStatistics/index.vue

12
src/api/system/dept.js

@ -1,5 +1,5 @@
import request from '@/utils/request' import request from '@/utils/request'
import qs from 'qs'
export function getDepts(params) { export function getDepts(params) {
return request({ return request({
url: 'api/depts/initDeptsList', url: 'api/depts/initDeptsList',
@ -56,5 +56,13 @@ export function FetchSonDepts(params) {
params params
}) })
} }
// 根据全宗集合获取全部部门
// http://192.168.99.63:11200/api/depts/initDeptsAllByFondsId?fondsIds=2&fondsIds=3
export function FetchInitDeptsAllByFondsId(params) {
return request({
url: 'api/depts/initDeptsAllByFondsId' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
})
}
export default { add, edit, del, getDepts, getDeptSuperior, FetchUpdateDeptsStatus, FetchSonDepts }
export default { add, edit, del, getDepts, getDeptSuperior, FetchUpdateDeptsStatus, FetchSonDepts, FetchInitDeptsAllByFondsId }

2
src/views/archivesStatistics/usageCountStatistics/index.vue

@ -30,7 +30,7 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
<el-input v-model="search" clearable size="small" placeholder="请输入关键字段进行检索" prefix-icon="el-icon-search" style="width: 220px;" class="filter-item" @keyup.enter.native="getBorrowdCountStatisticsList" @clear="getBorrowdCountStatisticsList" />
<el-input v-model="search" clearable size="small" placeholder="请输入关键" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="getBorrowdCountStatisticsList" @clear="getBorrowdCountStatisticsList" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getBorrowdCountStatisticsList">查询</el-button> <el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getBorrowdCountStatisticsList">查询</el-button>
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button> <el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
</div> </div>

39
src/views/archivesStatistics/utilizeRegistrationStatistics/index.vue

@ -8,6 +8,7 @@
collapse-tags collapse-tags
placeholder="请选择所属全宗" placeholder="请选择所属全宗"
style="width: 320px;" style="width: 320px;"
@change="handleFondsChange"
> >
<el-option <el-option
v-for="item in fondsOptions" v-for="item in fondsOptions"
@ -16,13 +17,25 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
<el-select
v-model="deptId"
placeholder="请选择所属部门"
style="width: 180px;"
>
<el-option
v-for="item in deptOptions"
:key="item.deptsId"
:label="item.deptsName"
:value="item.deptsId"
/>
</el-select>
<date-range-picker v-model="blurryTime" class="date-item" style="width: 240px !important; margin-right: 10px;" /> <date-range-picker v-model="blurryTime" class="date-item" style="width: 240px !important; margin-right: 10px;" />
<el-input <el-input
v-model="typeValue" v-model="typeValue"
size="small" size="small"
clearable clearable
placeholder="请输入关键词" placeholder="请输入关键词"
style="width: 300px;"
style="width: 260px;"
class="input-prepend filter-item" class="input-prepend filter-item"
@clear="getBorrowdRegisterStatisticsList" @clear="getBorrowdRegisterStatisticsList"
@keyup.enter.native="getBorrowdRegisterStatisticsList" @keyup.enter.native="getBorrowdRegisterStatisticsList"
@ -77,6 +90,7 @@
<script> <script>
import { FetchFondsAll } from '@/api/system/fonds' import { FetchFondsAll } from '@/api/system/fonds'
import { FetchBorrowdRegisterStatisticsList } from '@/api/statistics/statistics' import { FetchBorrowdRegisterStatisticsList } from '@/api/statistics/statistics'
import { FetchInitDeptsAllByFondsId } from '@/api/system/dept'
import DateRangePicker from '@/components/DateRangePicker' import DateRangePicker from '@/components/DateRangePicker'
import qs from 'qs' import qs from 'qs'
import { exportFile } from '@/utils/index' import { exportFile } from '@/utils/index'
@ -105,7 +119,9 @@ export default {
{ value: 'borrowReason', label: '借阅目的' } { value: 'borrowReason', label: '借阅目的' }
], ],
inputSelect: '', inputSelect: '',
query: {}
query: {},
deptOptions: [],
deptId: ''
} }
}, },
computed: { computed: {
@ -157,6 +173,8 @@ export default {
this.blurryTime = [] this.blurryTime = []
this.inputSelect = this.options[0].value this.inputSelect = this.options[0].value
this.query = {} this.query = {}
this.deptId = null
this.deptOptions = []
this.page.page = 0 this.page.page = 0
this.getBorrowdRegisterStatisticsList() this.getBorrowdRegisterStatisticsList()
}, },
@ -165,6 +183,20 @@ export default {
this.fondsOptions = res this.fondsOptions = res
}) })
}, },
handleFondsChange(val) {
this.deptId = null
this.deptOptions = []
if (val && val.length > 0) {
this.getDeptDatas()
}
},
getDeptDatas() {
FetchInitDeptsAllByFondsId({
fondsIds: this.fondsIds
}).then(res => {
this.deptOptions = res
})
},
getBorrowdRegisterStatisticsList() { getBorrowdRegisterStatisticsList() {
this.loading = true this.loading = true
FetchBorrowdRegisterStatisticsList({ FetchBorrowdRegisterStatisticsList({
@ -174,7 +206,8 @@ export default {
pageNo: this.page.page, pageNo: this.page.page,
pageSize: this.page.size, pageSize: this.page.size,
search: this.query.search || null, search: this.query.search || null,
borrowReason: this.query.borrowReason || null
borrowReason: this.query.borrowReason || null,
deptId: this.deptId || null
}).then(res => { }).then(res => {
this.allData = res.records this.allData = res.records
this.page.total = res.total this.page.total = res.total

Loading…
Cancel
Save