Browse Source

人员类别分析

shibei_master
jiangyy 4 years ago
parent
commit
9bf32e0a0b
  1. 6
      src/assets/scss/modules/visual/personCategory.scss
  2. 38
      src/views/modules/visual/basicinfo/personCategory/index.vue
  3. 33
      src/views/modules/visual/basicinfo/personCategory/recordList.vue

6
src/assets/scss/modules/visual/personCategory.scss

@ -14,7 +14,8 @@
display: flex; display: flex;
// justify-content: space-around; // justify-content: space-around;
justify-content: flex-start; justify-content: flex-start;
flex-wrap: wrap; flex-wrap: nowrap;
// overflow-y: auto;
min-height: 190px; min-height: 190px;
.top-item-active { .top-item-active {
@ -22,8 +23,9 @@
} }
.top-item { .top-item {
flex: 0 0 280px;
box-sizing: border-box; box-sizing: border-box;
width: 280px; // width: 280px;
height: 190px; height: 190px;
padding: 10px 22px 14px 21px; padding: 10px 22px 14px 21px;
// background: rgba(255, 255, 255, 0); // background: rgba(255, 255, 255, 0);

38
src/views/modules/visual/basicinfo/personCategory/index.vue

@ -23,6 +23,7 @@
type="date" type="date"
:clearable="false" :clearable="false"
@change="handleChangeDate" @change="handleChangeDate"
:picker-options="pickerOptions"
prefix-icon="el-icon-caret-bottom" prefix-icon="el-icon-caret-bottom"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd"> value-format="yyyy-MM-dd">
@ -30,11 +31,10 @@
</div> </div>
</div> </div>
<el-scrollbar style="width: 100%">
<div class="warning-box-top"> <div class="warning-box-top">
<div class="top-item" <div class="top-item"
:class="{ :class="{'top-item-active': activeIndex == index}"
'top-item-active': activeIndex == index ,
}"
@click="onClickList(item,index)" @click="onClickList(item,index)"
v-for="(item, index) in categoryList" v-for="(item, index) in categoryList"
:key="index"> :key="index">
@ -62,6 +62,9 @@
</div> </div>
</div> </div>
</div> </div>
</el-scrollbar>
<div class="warning-box-bottom"> <div class="warning-box-bottom">
<screen-table ref="ref_recordlist"></screen-table> <screen-table ref="ref_recordlist"></screen-table>
<div class="pagination"> <div class="pagination">
@ -108,11 +111,15 @@ export default {
checkStrictly: true checkStrictly: true
}, },
pickerOptions: { //
disabledDate (time) {
return time.getTime() > (Date.now() - (24 * 60 * 60 * 1000))
}
},
dateIdShow: '', dateIdShow: '',
agencyId: '', agencyId: '',
level: '', level: '',
dateId: '',//yyyyMMdd dateId: '',//yyyyMMdd
monthId: '',//yyyyMM
categoryKey: '', categoryKey: '',
agencyInfo: {}, agencyInfo: {},
@ -141,10 +148,7 @@ export default {
async getApiData () { async getApiData () {
// //
await this.getCategoryData() await this.getCategoryData()
this.loadRecordList()
this.$refs.ref_recordlist.getRecordlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
}, },
initData () { initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000; var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
@ -188,13 +192,19 @@ export default {
this.pageNo = 1; this.pageNo = 1;
this.categoryKey = item.categoryKey this.categoryKey = item.categoryKey
this.$refs.ref_recordlist.getRecordlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize) this.loadRecordList()
},
loadRecordList () {
this.$refs.ref_recordlist.getRecordlist(this.dateId, this.categoryKey, this.pageNo, this.pageSize, this.agencyId, this.level)
}, },
// //
async getCategoryData () { async getCategoryData () {
// const url = "/data/aggregator/icuser/category-data"; const url = "/data/aggregator/icuser/category-data";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/icuser/category-data"; // const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/icuser/category-data";
let params = { let params = {
orgType: this.level, orgType: this.level,
orgId: this.agencyId, orgId: this.agencyId,
@ -226,18 +236,18 @@ export default {
pageSizeChangeHandleNew (val) { pageSizeChangeHandleNew (val) {
this.pageNo = 1; this.pageNo = 1;
this.pageSize = val; this.pageSize = val;
this.$refs.ref_recordlist.getRecordlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize) this.loadRecordList()
}, },
pageCurrentChangeHandleNew (val) { pageCurrentChangeHandleNew (val) {
this.pageNo = val; this.pageNo = val;
this.$refs.ref_recordlist.getRecordlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize) this.loadRecordList()
}, },
}, },
watch: { watch: {
dateIdShow () { dateIdShow () {
let dataArray = this.dateIdShow.split('-') let dataArray = this.dateIdShow.split('-')
this.dateId = dataArray.join('') this.dateId = dataArray.join('')
this.monthId = this.dateId.substring(0, 6)
}, },
}, },

33
src/views/modules/visual/basicinfo/personCategory/recordList.vue

@ -104,9 +104,9 @@ export default {
label: '新增' label: '新增'
}, },
], ],
typeShow: '类别', typeShow: '全部',
selType: '', selType: '',
monthId: '', dateId: '',
categoryKey: '', categoryKey: '',
pageNo: '', pageNo: '',
pageSize: '', pageSize: '',
@ -139,7 +139,18 @@ export default {
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
this.typeList = data this.typeList = []
this.typeList.push(
{
label: '全部',
value: ''
}
)
data.forEach(element => {
this.typeList.push(element)
});
} else { } else {
this.$message.error(msg) this.$message.error(msg)
@ -149,23 +160,27 @@ export default {
}, },
// //
async getRecordlist (monthId, categoryKey, pageNo, pageSize) { async getRecordlist (dateId, categoryKey, pageNo, pageSize, orgId, orgType) {
this.visibleLoading = true this.visibleLoading = true
if (monthId) { if (dateId) {
this.monthId = monthId this.dateId = dateId
this.categoryKey = categoryKey this.categoryKey = categoryKey
this.pageNo = pageNo this.pageNo = pageNo
this.pageSize = pageSize this.pageSize = pageSize
this.orgId = orgId
this.orgType = orgType
} }
let tableData = []; let tableData = [];
// const url = "/temp/record-list"; const url = "/epmetuser/icuserchangerecord/category-analysis-list";
const url = "http://yapi.elinkservice.cn/mock/245/temp/record-list"; // const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icuserchangerecord/category-analysis-list";
let params = { let params = {
categoryKey: this.categoryKey, categoryKey: this.categoryKey,
monthId: this.monthId, dateId: this.dateId,
type: this.selType, type: this.selType,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
orgId: this.orgId,
orgType: this.orgType
}; };
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {

Loading…
Cancel
Save