修改增员功能可编辑相关功能

This commit is contained in:
史旭文
2020-03-16 18:04:42 +08:00
parent dbcfdcc485
commit 0e64db5065
4 changed files with 13 additions and 15 deletions

View File

@@ -1,11 +1,11 @@
<template>
<div>
<van-cell-group>
<van-cell :title="ActivityLogInfo.name" title-class="ml10" :is-link="isEdit" value-class="text-left">
<van-cell :title="ActivityLogInfo.name" title-class="ml10" :is-link="isEdit" value-class="text-left" @click="toEdit">
<van-icon slot="icon" :name="ActivityLogInfo.avatarUrl || defaultAcatarUrl" style="line-height: inherit;" size="22" />
<span class="mr20">{{ ActivityLogInfo.age }}</span>
<span>{{ ActivityLogInfo.type == 0 ? '同业' : '白板' }}</span>
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" :color="isEdit ? '#1989fa' : 'transparent'" size="24" @click="toEdit" />
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" :color="isEdit ? '#1989fa' : 'transparent'" size="24" />
</van-cell>
</van-cell-group>
</div>
@@ -43,22 +43,18 @@ export default {
},
methods: {
toEdit() {
if (!this.isEdit) {
return false
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/manpower/ActivityLog/Edit?code=${this.ActivityLogInfo.recordCode}`,
url: location.origin + `/#/manpower/ActivityLog/Edit?code=${this.ActivityLogInfo.recordCode}&isEdit=${this.isEdit ? '0' : '1'}`,
forbidSwipeBack: '1'
},
routerInfo: { path: `/manpower/ActivityLog/Edit?code=${this.ActivityLogInfo.recordCode}` }
routerInfo: { path: `/manpower/ActivityLog/Edit?code=${this.ActivityLogInfo.recordCode}&isEdit=${this.isEdit ? '0' : '1'}` }
})
}
},
computed: {
isEdit() {
console.log(this.ActivityLogInfo.recordDate)
if (this.ActivityLogInfo.recordDate === formatDate.formatDate().split(' ')[0]) {
return true
} else {

View File

@@ -122,7 +122,7 @@ export default {
.then(res => {
console.log(res)
if (res.result == 0) {
this.personnelsList = res.content.personnels
this.personnelsList = res.content.personnels.slice(0, 5)
} else {
this.$toast(res.resultMessage)
}
@@ -140,7 +140,7 @@ export default {
.then(res => {
console.log(res)
if (res.result == 0) {
this.recordList = res.content.records
this.recordList = res.content.records.slice(0, 5)
} else {
this.$toast(res.resultMessage)
}
@@ -163,10 +163,10 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/manpower/ActivityLog/Edit`,
url: location.origin + `/#/manpower/ActivityLog/Edit?isEdit=1`,
forbidSwipeBack: '1'
},
routerInfo: { path: '/manpower/ActivityLog/Edit' }
routerInfo: { path: '/manpower/ActivityLog/Edit?isEdit=1' }
})
}
}

View File

@@ -54,7 +54,7 @@
data-vv-name="过往职业"
/>
</van-cell-group>
<van-button color="#1989fa" type="primary" class="bottom-btn" size="large" @click="subInfo">保存</van-button>
<van-button color="#1989fa" type="primary" class="bottom-btn" size="large" v-no-more-click="1000" v-if="isEdit == 0" @click="subInfo">保存</van-button>
<van-popup v-model="showResultArr" position="bottom" :style="{ height: '30%' }">
<van-picker show-toolbar :columns="resultArr" @cancel="showResultArr = false" @confirm="selectResult" />
</van-popup>
@@ -89,6 +89,7 @@ export default {
pastOccu: '' // 过往职业
},
recordCode: '',
isEdit: '',
// 面试结果
showResultArr: false,
// 职业选择
@@ -112,6 +113,7 @@ export default {
},
mounted() {
this.recordCode = this.$route.query.code || ''
this.isEdit = this.$route.query.isEdit
this.queryRecordDetail()
},
computed: {

View File

@@ -72,10 +72,10 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/manpower/ActivityLog/Edit`,
url: location.origin + `/#/manpower/ActivityLog/Edit?isEdit=1`,
forbidSwipeBack: '1'
},
routerInfo: { path: '/manpower/ActivityLog/Edit' }
routerInfo: { path: '/manpower/ActivityLog/Edit?isEdit=1' }
})
},
openCalendar() {