添加活动量管理页面也功能

This commit is contained in:
史旭文
2020-03-13 18:16:29 +08:00
parent 712e3aee08
commit a9f74d2ad8
11 changed files with 389 additions and 34 deletions

View File

@@ -1,13 +1,14 @@
<template>
<div>
<van-cell :title="ActivityLogInfo.name" is-link :icon="ActivityLogInfo.avatarUrl" value-class="text-left">
<van-cell :title="ActivityLogInfo.name" :is-link="isEdit" :icon="ActivityLogInfo.avatarUrl" value-class="text-left">
<span class="mr20">{{ ActivityLogInfo.age }}</span>
<span>{{ ActivityLogInfo.flag }}</span>
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" color="#1989fa" size="24" />
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" :color="isEdit ? '#1989fa' : 'transparent'" size="24" @click="toEdit" />
</van-cell>
</div>
</template>
<script>
import formatDate from '@/assets/js/utils/date-utils'
import { Cell, CellGroup, Image } from 'vant'
export default {
@@ -25,13 +26,44 @@ export default {
name: '王辉',
avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
age: '35岁',
flag: '同业'
flag: '同业',
currentTime: ''
}
}
}
},
data() {
return {}
return {
isEdit: true
}
},
methods: {
toEdit() {
if (!this.isEdit) {
return false
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/manpower/ActivityLog/Edit`
},
routerInfo: { path: '/manpower/ActivityLog/Edit' }
})
}
},
computed: {
currentTime() {
return this.ActivityLogInfo.currentTime
}
},
watch: {
currentTime(newVal) {
if (newVal === formatDate.formatDate().split(' ')[0]) {
this.isEdit = true
} else {
this.isEdit = false
}
}
}
}
</script>

View File

@@ -37,7 +37,7 @@ export default {
methods: {
rout(config) {
if (!config.share) {
let url = config.path.split("/").pop()
let url = config.path.split('/').pop()
let path = config.path
this.$jump({
flag: 'h5',