|
@@ -43,73 +43,79 @@
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-row style="margin: 30px" :gutter="30">
|
|
|
|
|
|
+ <el-row style="margin: 20px 20px 0 20px" :gutter="30">
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
-<!-- <el-card style="margin: 15px 15px 15px 0;height: 700px;overflow: scroll">-->
|
|
|
|
- <el-timeline v-if="this.dayNfcInteractionList.length > 0">
|
|
|
|
- <el-timeline-item
|
|
|
|
- v-for="(dayInteraction, index) in this.dayNfcInteractionList"
|
|
|
|
- :key="index"
|
|
|
|
- :color="getTimelineItemColor(dayInteraction.components_type)"
|
|
|
|
- :timestamp="formatterDate(dayInteraction.create_time)"
|
|
|
|
- placement="top"
|
|
|
|
- >
|
|
|
|
- <el-card>
|
|
|
|
- <h4>{{ getCardString(dayInteraction) }}</h4>
|
|
|
|
- </el-card>
|
|
|
|
- </el-timeline-item>
|
|
|
|
- </el-timeline>
|
|
|
|
- <el-timeline v-else>
|
|
|
|
- <el-timeline-item>
|
|
|
|
- <el-card>
|
|
|
|
- {{ this.$t('functions.notRecords') }}
|
|
|
|
- </el-card>
|
|
|
|
- </el-timeline-item>
|
|
|
|
-
|
|
|
|
- </el-timeline>
|
|
|
|
|
|
+ <el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (asideHeight)+'px'}" >
|
|
|
|
+ <div style="padding: 10px">
|
|
|
|
+ <el-timeline v-if="this.dayNfcInteractionList.length > 0" style="margin: 10px">
|
|
|
|
+ <el-timeline-item
|
|
|
|
+ v-for="(dayInteraction, index) in this.dayNfcInteractionList"
|
|
|
|
+ :key="index"
|
|
|
|
+ :color="getTimelineItemColor(dayInteraction.components_type)"
|
|
|
|
+ :timestamp="formatterDate(dayInteraction.create_time)"
|
|
|
|
+ placement="top"
|
|
|
|
+ >
|
|
|
|
+ <el-card>
|
|
|
|
+ <h4>{{ getCardString(dayInteraction) }}</h4>
|
|
|
|
+ </el-card>
|
|
|
|
+ </el-timeline-item>
|
|
|
|
+ </el-timeline>
|
|
|
|
+ <el-timeline v-else>
|
|
|
|
+ <el-timeline-item>
|
|
|
|
+ <el-card>
|
|
|
|
+ {{ this.$t('functions.notRecords') }}
|
|
|
|
+ </el-card>
|
|
|
|
+ </el-timeline-item>
|
|
|
|
+ </el-timeline>
|
|
|
|
+ </div>
|
|
|
|
+ </el-scrollbar>
|
|
</el-col>
|
|
</el-col>
|
|
<!-- </el-card>-->
|
|
<!-- </el-card>-->
|
|
|
|
|
|
<el-col :span="16">
|
|
<el-col :span="16">
|
|
- <el-card shadow="never">
|
|
|
|
- <el-row style="margin: 15px" :gutter="20">
|
|
|
|
- <el-col :span="12">
|
|
|
|
- <el-card :id="'myFrame' + this.partTree.id" style="text-align: left; margin: 10px">
|
|
|
|
- <span class="text-style" :title=this.partTree.full_name>
|
|
|
|
- <svg-icon icon-class="area"/>
|
|
|
|
- {{ this.partTree.full_name }}
|
|
|
|
- </span>
|
|
|
|
- </el-card>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+ <el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (asideHeight)+'px'}">
|
|
|
|
+ <el-card shadow="never">
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <el-divider>{{ partStr + ' : ' + this.partTree.full_name }}</el-divider>
|
|
|
|
+ <el-col :span="6">
|
|
|
|
+ <el-card :id="'myFrame' + this.partTree.id" style="text-align: left; margin: 0 0 15px 10px">
|
|
|
|
+ <span class="text-style" :title=this.partTree.full_name>
|
|
|
|
+ <svg-icon icon-class="area"/>
|
|
|
|
+ {{ this.partTree.full_name }}
|
|
|
|
+ </span>
|
|
|
|
+ </el-card>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
|
|
- <el-row
|
|
|
|
- style="margin: 15px"
|
|
|
|
- :gutter="20"
|
|
|
|
- v-for="(item, index) in this.partTree.children"
|
|
|
|
- :key="index"
|
|
|
|
- >
|
|
|
|
-<!-- <el-col :span="12" v-for="(item, index) in this.partTree.children" :key="index" :label="item.full_name" :value="item.id">-->
|
|
|
|
- <el-col :span="24" :label="item.full_name" :value="item.id">
|
|
|
|
- <el-card :id="'myFrame' + item.id" style="text-align: left; margin: 10px; width: 46%">
|
|
|
|
- <span class="text-style" :title=item.full_name>
|
|
|
|
- <svg-icon :icon-class="item.type===4?'sickroom':item.type===5?'bed':'area'"/>
|
|
|
|
- {{ item.full_name }}
|
|
|
|
- </span>
|
|
|
|
- </el-card>
|
|
|
|
|
|
|
|
- <el-col :span="6" v-for="(_item, _index) in item.children" :key="_index" :label="_item.full_name" :value="_item.id">
|
|
|
|
- <el-card :id="'myFrame' + _item.id" style="text-align: left; margin: 10px">
|
|
|
|
- <span class="text-style" :title=_item.full_name>
|
|
|
|
|
|
+ <el-row
|
|
|
|
+ :gutter="20"
|
|
|
|
+ v-for="(item, index) in this.partTree.children"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <!-- <el-col :span="12" v-for="(item, index) in this.partTree.children" :key="index" :label="item.full_name" :value="item.id">-->
|
|
|
|
+ <el-divider>{{ roomStr + ' : ' + item.full_name }}</el-divider>
|
|
|
|
+ <el-col :span="24" :label="item.full_name" :value="item.id">
|
|
|
|
+ <el-card :id="'myFrame' + item.id" style="text-align: left; margin: 0 0 15px 10px; width: 22%">
|
|
|
|
+ <span class="text-style" :title=item.full_name>
|
|
<svg-icon :icon-class="item.type===4?'sickroom':item.type===5?'bed':'area'"/>
|
|
<svg-icon :icon-class="item.type===4?'sickroom':item.type===5?'bed':'area'"/>
|
|
- {{ _item.full_name }}
|
|
|
|
|
|
+ {{ item.full_name }}
|
|
</span>
|
|
</span>
|
|
</el-card>
|
|
</el-card>
|
|
- </el-col>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
|
|
|
|
- </el-card>
|
|
|
|
|
|
+
|
|
|
|
+ <el-col :span="6" v-for="(_item, _index) in item.children" :key="_index" :label="_item.full_name" :value="_item.id">
|
|
|
|
+ <el-card :id="'myFrame' + _item.id" style="text-align: left; margin: 0 0 15px 10px">
|
|
|
|
+ <span class="text-style" :title=_item.full_name>
|
|
|
|
+ <svg-icon :icon-class="_item.type===4?'sickroom':_item.type===5?'bed':'area'"/>
|
|
|
|
+ {{ _item.full_name }}
|
|
|
|
+ </span>
|
|
|
|
+ </el-card>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-card>
|
|
|
|
+ </el-scrollbar>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -128,6 +134,11 @@ import {FRAME_TYPE} from "@/utils/enum/FrameTypeEnum";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "nfcPosition",
|
|
name: "nfcPosition",
|
|
|
|
+ computed: {
|
|
|
|
+ asideHeight() {
|
|
|
|
+ return this.mainAreaHeight - 100
|
|
|
|
+ }
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
@@ -160,15 +171,16 @@ export default {
|
|
loading: false,
|
|
loading: false,
|
|
mount: "",
|
|
mount: "",
|
|
param: {
|
|
param: {
|
|
- type: 'MONTH'
|
|
|
|
|
|
+ type: 'DATE'
|
|
},
|
|
},
|
|
value: null,
|
|
value: null,
|
|
- month: "",
|
|
|
|
nfcInteractionList: [],
|
|
nfcInteractionList: [],
|
|
dayNfcInteractionList: [],
|
|
dayNfcInteractionList: [],
|
|
clerkList: [],
|
|
clerkList: [],
|
|
currentClerk: {},
|
|
currentClerk: {},
|
|
- partTree: {}
|
|
|
|
|
|
+ partTree: {},
|
|
|
|
+ partStr: this.$t('frameManage.part'),
|
|
|
|
+ roomStr: this.$t('frameManage.room2')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -225,13 +237,7 @@ export default {
|
|
this.param.year = date.getFullYear()
|
|
this.param.year = date.getFullYear()
|
|
this.param.month = this.checkTime(date.getMonth() + 1)
|
|
this.param.month = this.checkTime(date.getMonth() + 1)
|
|
this.param.day = this.checkTime(date.getDate())
|
|
this.param.day = this.checkTime(date.getDate())
|
|
- if (this.param.month !== this.month) {
|
|
|
|
- this.month = this.param.month
|
|
|
|
- this.getNfcInteraction();
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- this.getNfcInteractionByDay(date)
|
|
|
|
- }
|
|
|
|
|
|
+ this.getNfcInteraction();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 时间处理,如果时间小于10 ,则再前面加一个'0'
|
|
// 时间处理,如果时间小于10 ,则再前面加一个'0'
|
|
@@ -251,16 +257,11 @@ export default {
|
|
},
|
|
},
|
|
// 获取选择日的nfc数据
|
|
// 获取选择日的nfc数据
|
|
getNfcInteractionByDay(date) {
|
|
getNfcInteractionByDay(date) {
|
|
- let startTime = date.getFullYear() + '-' + this.checkTime(date.getMonth() + 1) + '-' + this.checkTime(date.getDate()) + ' 00:00:00'
|
|
|
|
- let endTime = date.getFullYear() + '-' + this.checkTime(date.getMonth() + 1) + '-' + this.checkTime(date.getDate()) + ' 23:59:59'
|
|
|
|
- startTime = new Date(startTime).getTime() / 1000;
|
|
|
|
- endTime = new Date(endTime).getTime() / 1000;
|
|
|
|
-
|
|
|
|
// 每次点击都需要清空 this.dayNfcInteractionList
|
|
// 每次点击都需要清空 this.dayNfcInteractionList
|
|
this.dayNfcInteractionList = []
|
|
this.dayNfcInteractionList = []
|
|
// 再通过循环,将列表里属于选择日的数据放入 this.dayNfcInteractionList
|
|
// 再通过循环,将列表里属于选择日的数据放入 this.dayNfcInteractionList
|
|
for (let i = 0; i < this.nfcInteractionList.length; i++) {
|
|
for (let i = 0; i < this.nfcInteractionList.length; i++) {
|
|
- if (startTime <= this.nfcInteractionList[i].create_time && this.nfcInteractionList[i].create_time <= endTime && this.nfcInteractionList[i].components_type === FUNCTION_TYPE.POSITION_COMPONENT) {
|
|
|
|
|
|
+ if (this.nfcInteractionList[i].components_type === FUNCTION_TYPE.POSITION_COMPONENT) {
|
|
this.dayNfcInteractionList.push(this.nfcInteractionList[i])
|
|
this.dayNfcInteractionList.push(this.nfcInteractionList[i])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -274,7 +275,7 @@ export default {
|
|
},
|
|
},
|
|
// 修改时间线的圆圈颜色,打卡为绿色,其他为蓝色,没有为灰色
|
|
// 修改时间线的圆圈颜色,打卡为绿色,其他为蓝色,没有为灰色
|
|
getTimelineItemColor(param) {
|
|
getTimelineItemColor(param) {
|
|
- if (param === FUNCTION_TYPE.SIGN_IN) {
|
|
|
|
|
|
+ if (param === FUNCTION_TYPE.POSITION_COMPONENT) {
|
|
return '#4abe84'
|
|
return '#4abe84'
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -288,23 +289,29 @@ export default {
|
|
changeStyle(){
|
|
changeStyle(){
|
|
const _this = this
|
|
const _this = this
|
|
let myId = ''
|
|
let myId = ''
|
|
|
|
+ let frameId = 0
|
|
|
|
+ let _partTree = this.partTree
|
|
for (let i = 0; i< _this.dayNfcInteractionList.length; i++) {
|
|
for (let i = 0; i< _this.dayNfcInteractionList.length; i++) {
|
|
- myId = 'myFrame' + _this.dayNfcInteractionList[i].frame_id
|
|
|
|
|
|
+ frameId = _this.dayNfcInteractionList[i].frame_id
|
|
|
|
+ myId = 'myFrame' + frameId
|
|
var elem = document.getElementById(myId)
|
|
var elem = document.getElementById(myId)
|
|
- console.log(myId)
|
|
|
|
- console.log(elem)
|
|
|
|
if (elem !== null) {
|
|
if (elem !== null) {
|
|
- // elem.style = 'text-align: left; margin: 10px 10px 10px 0; background: #d3dce6'
|
|
|
|
- elem.style = 'text-align: left; margin: 10px; background: #409eff'
|
|
|
|
|
|
+ const index = this.partTree.children.findIndex((frame) => frame.id === frameId)
|
|
|
|
+
|
|
|
|
+ // let frame = this.partTree.children.filter((frame) => frame.id === frameId);
|
|
|
|
+ if (index !== -1) {
|
|
|
|
+ elem.style = 'text-align: left; margin: 0 0 15px 10px; width: 22%; background: #4abe84'
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ // elem.style = 'text-align: left; margin: 10px 10px 10px 0; background: #d3dce6'
|
|
|
|
+ elem.style = 'text-align: left; margin: 0 0 15px 10px; background: #4abe84'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getAllFrame(){
|
|
getAllFrame(){
|
|
API_FrameGroup.getframestruct(this.$store.getters.partId, FRAME_TYPE.PART).then(res => {
|
|
API_FrameGroup.getframestruct(this.$store.getters.partId, FRAME_TYPE.PART).then(res => {
|
|
this.partTree = res.frameTree[0]
|
|
this.partTree = res.frameTree[0]
|
|
- console.log(this.partTree)
|
|
|
|
- console.log(this.partTree.children)
|
|
|
|
- console.log(this.partTree.full_name)
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -316,12 +323,14 @@ export default {
|
|
padding: 0;
|
|
padding: 0;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
|
|
}
|
|
}
|
|
|
|
+._el-card {
|
|
|
|
+ box-shadow: 0 0 0 rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
|
|
|
|
+}
|
|
.text-style {
|
|
.text-style {
|
|
width: 90%;
|
|
width: 90%;
|
|
overflow: hidden; /*超出的文本隐藏 */
|
|
overflow: hidden; /*超出的文本隐藏 */
|
|
text-overflow: ellipsis; /* 溢出用省略号 */
|
|
text-overflow: ellipsis; /* 溢出用省略号 */
|
|
white-space: nowrap; /* 溢出不换行 */
|
|
white-space: nowrap; /* 溢出不换行 */
|
|
display: block; /* 将对象作为弹性伸缩盒子模型显示 */
|
|
display: block; /* 将对象作为弹性伸缩盒子模型显示 */
|
|
-
|
|
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|