|
@@ -50,7 +50,14 @@
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
<el-row style="margin: 20px 20px 0 20px" :gutter="30">
|
|
<el-row style="margin: 20px 20px 0 20px" :gutter="30">
|
|
- <el-col :span="8">
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-table :data="functionTable" border stripe style="width: 100%">
|
|
|
|
+ <el-table-column prop="item" label="小组件"/>
|
|
|
|
+ <el-table-column prop="value" label="统计次数"/>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="12">
|
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (asideHeight)+'px'}" >
|
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (asideHeight)+'px'}" >
|
|
<div style="padding: 10px">
|
|
<div style="padding: 10px">
|
|
<el-timeline v-if="this.nfcInteractionList.length > 0" style="margin: 10px">
|
|
<el-timeline v-if="this.nfcInteractionList.length > 0" style="margin: 10px">
|
|
@@ -76,21 +83,6 @@
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</el-col>
|
|
</el-col>
|
|
-
|
|
|
|
- <el-col :span="16">
|
|
|
|
- <el-collapse v-model="activeName" style="margin: 10px">
|
|
|
|
- <el-collapse-item v-for="(item, index) in functions" :index="index+''" :key="index" :title="titleStr(item)" :name="item.function_code">
|
|
|
|
- <span style="margin: 10px"> {{ nfcInteractionList.length }} </span>
|
|
|
|
- </el-collapse-item>
|
|
|
|
- </el-collapse>
|
|
|
|
- </el-col>
|
|
|
|
-<!-- <div class="table-wrapper" style="margin: 15px">-->
|
|
|
|
-<!-- <el-table :data="tableData" :default-sort = "{prop: 'count', order: 'descending'}" stripe border style="width: 100%">-->
|
|
|
|
-<!-- <el-table-column type="index" width="100" :label="this.$t('action.index')" align="center" />-->
|
|
|
|
-<!-- <el-table-column prop="name" :label="this.$t('interaction.actionType')" min-width="130" align="center" />-->
|
|
|
|
-<!-- <el-table-column prop="count" :label="this.$t('interaction.actionTime')" min-width="130" align="center" sortable />-->
|
|
|
|
-<!-- </el-table>-->
|
|
|
|
-<!-- </div>-->
|
|
|
|
</el-row>
|
|
</el-row>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -156,7 +148,8 @@ export default {
|
|
clerkList: [],
|
|
clerkList: [],
|
|
currentClerk: {},
|
|
currentClerk: {},
|
|
functions: [],
|
|
functions: [],
|
|
- activeName: ''
|
|
|
|
|
|
+ activeName: '',
|
|
|
|
+ functionTable: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -190,6 +183,7 @@ export default {
|
|
this.clerkList = {...res}
|
|
this.clerkList = {...res}
|
|
this.currentClerk = {...this.clerkList[Object.keys(this.clerkList)[0]][0]}
|
|
this.currentClerk = {...this.clerkList[Object.keys(this.clerkList)[0]][0]}
|
|
this.param.clerk_id = this.currentClerk.clerk_id
|
|
this.param.clerk_id = this.currentClerk.clerk_id
|
|
|
|
+ this.getNfcInteraction()
|
|
// this.calendarOnClick(this.value)
|
|
// this.calendarOnClick(this.value)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -200,12 +194,10 @@ export default {
|
|
// 获取选择月的nfc数据
|
|
// 获取选择月的nfc数据
|
|
getNfcInteraction() {
|
|
getNfcInteraction() {
|
|
this.loading = true
|
|
this.loading = true
|
|
- console.log(this.param.clerk_id)
|
|
|
|
- console.log(this.param)
|
|
|
|
API_nfcInteraction.get_list_by_clerk_id(this.param).then(r => {
|
|
API_nfcInteraction.get_list_by_clerk_id(this.param).then(r => {
|
|
this.nfcInteractionList = r.filter(i => i.components_type !== FUNCTION_TYPE.MANAGE_BED);
|
|
this.nfcInteractionList = r.filter(i => i.components_type !== FUNCTION_TYPE.MANAGE_BED);
|
|
- console.log(this.nfcInteractionList)
|
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
|
+ this.getFunctionTable();
|
|
})
|
|
})
|
|
},
|
|
},
|
|
/** 年月份发生变化 */
|
|
/** 年月份发生变化 */
|
|
@@ -224,7 +216,7 @@ export default {
|
|
else if (date.type === 'DATE') {
|
|
else if (date.type === 'DATE') {
|
|
this.value = date.date_val
|
|
this.value = date.date_val
|
|
|
|
|
|
- this.param.type = 'MONTH'
|
|
|
|
|
|
+ this.param.type = 'DATE'
|
|
this.param.year = this.value.getFullYear()
|
|
this.param.year = this.value.getFullYear()
|
|
this.param.month = this.checkTime(this.value.getMonth() + 1)
|
|
this.param.month = this.checkTime(this.value.getMonth() + 1)
|
|
this.param.day = this.checkTime(this.value.getDate())
|
|
this.param.day = this.checkTime(this.value.getDate())
|
|
@@ -273,6 +265,21 @@ export default {
|
|
getFunctionString(param) {
|
|
getFunctionString(param) {
|
|
return FUNCTION_TYPE.getDescFromValue(param)
|
|
return FUNCTION_TYPE.getDescFromValue(param)
|
|
},
|
|
},
|
|
|
|
+ getLengthByFunction(functionType) {
|
|
|
|
+ return this.nfcInteractionList.filter(p =>
|
|
|
|
+ p.components_type === functionType
|
|
|
|
+ ).length
|
|
|
|
+ },
|
|
|
|
+ // 组建一个表格数据
|
|
|
|
+ getFunctionTable(){
|
|
|
|
+ this.functionTable = []
|
|
|
|
+ for (let i = 0; i < this.functions.length; i++) {
|
|
|
|
+ this.functionTable.push({
|
|
|
|
+ "item" : FUNCTION_TYPE.getDescFromValue(this.functions[i].function_code),
|
|
|
|
+ "value" : this.getLengthByFunction(this.functions[i].function_code)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|