|
@@ -1,49 +1,121 @@
|
|
|
<template>
|
|
|
-<div>
|
|
|
- <header class="mui-bar mui-bar-nav">
|
|
|
- <h1 class="mui-title">联系人</h1>
|
|
|
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
|
- </header>
|
|
|
- <div class="mui-content vongi-tell">
|
|
|
- <div class="vongi-center">
|
|
|
- <div class="mui-media-object"><img src="~$project/assets/img/03.jpg" width="50" /></div>
|
|
|
- <h1>赵刚</h1>
|
|
|
- <button type="button" class="mui-btn mui-btn-danger mui-btn-outlined">紧急联系人</button>
|
|
|
- </div>
|
|
|
- <div class='flew-sp mui-h1'>
|
|
|
- 15500001111<span class="iconfont icon-ziyuan1 color55f868"></span>
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ <common @asynCallBack="asynCallBack"></common>
|
|
|
+ <top-header :pageTitle="pageTitle"></top-header>
|
|
|
+
|
|
|
+ <div class="mui-content vongi-tell">
|
|
|
+ <div class="vongi-center">
|
|
|
+ <div class="mui-media-object"><img src="~$project/assets/img/default_face.png" width="50" /></div>
|
|
|
+ <h1 v-text="detail.name"></h1>
|
|
|
+ <button v-if="detail.urgentStatus" type="button" class="mui-btn mui-btn-danger mui-btn-outlined">紧急联系人</button>
|
|
|
</div>
|
|
|
- <div class="fyy-footer">
|
|
|
- <ul class="mui-table-view mui-grid-view mui-grid-9">
|
|
|
- <li class="mui-table-view-cell mui-media mui-col-xs-6">
|
|
|
- <a href="#">
|
|
|
- <span class="mui-icon iconfont icon-xinbaniconshangchuan-"></span>
|
|
|
- <div class="mui-media-body">编辑联系人</div>
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell mui-media mui-col-xs-6">
|
|
|
- <a href="#">
|
|
|
- <span class="mui-icon iconfont icon-guanbi"></span>
|
|
|
- <div class="mui-media-body">删除联系人</div>
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <div class='flew-sp mui-h1'>
|
|
|
+ {{detail.phone}}<a :href="'tel:'+detail.phone" class="iconfont icon-ziyuan1 color55f868"></a>
|
|
|
</div>
|
|
|
-</div>
|
|
|
+ </div>
|
|
|
+ <div class="fyy-footer">
|
|
|
+ <ul class="mui-table-view mui-grid-view mui-grid-9">
|
|
|
+ <li class="mui-table-view-cell mui-media mui-col-xs-6">
|
|
|
+ <router-link :to="{name:'MasterRelativesPhoneSave',query:{'bookId':detail.id}}">
|
|
|
+ <span class="mui-icon iconfont icon-xinbaniconshangchuan-"></span>
|
|
|
+ <div class="mui-media-body">编辑联系人</div>
|
|
|
+ </router-link>
|
|
|
+ </li>
|
|
|
+ <li class="mui-table-view-cell mui-media mui-col-xs-6">
|
|
|
+ <a @click="del">
|
|
|
+ <span class="mui-icon iconfont icon-guanbi"></span>
|
|
|
+ <div class="mui-media-body">删除联系人</div>
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <loading :visible="isLoading"></loading>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-export default {
|
|
|
- name: 'Login',
|
|
|
- components: {},
|
|
|
- mounted() {
|
|
|
- document.body.style.backgroundColor = '#fff';
|
|
|
- },
|
|
|
- destroyed() {
|
|
|
- document.body.style.backgroundColor = '';
|
|
|
- }
|
|
|
- }
|
|
|
+ import * as API_Relatives from '@/apis/Master/relatives'
|
|
|
+ import Common from '$project/components/Common.vue'
|
|
|
+ import Loading from '$project/components/Loading.vue'
|
|
|
+ import TopHeader from '$project/components/TopHeader.vue'
|
|
|
+ import {
|
|
|
+ mapGetters,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex'
|
|
|
+ export default {
|
|
|
+ name: 'MasterRelativesPhoneInfo',
|
|
|
+ components: {
|
|
|
+ Common,
|
|
|
+ Loading,
|
|
|
+ TopHeader,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageTitle: '联系人',
|
|
|
+
|
|
|
+ isLoading: false,
|
|
|
+
|
|
|
+ bookId: this.$route.query.bookId,
|
|
|
+ detail: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //获取详情
|
|
|
+ getInfo() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_Relatives.getPhoneNumberInfo(this.bookId).then(response => {
|
|
|
+ this.isLoading = false;
|
|
|
+
|
|
|
+ this.detail = response.person;
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //删除
|
|
|
+ del() {
|
|
|
+ var _this = this;
|
|
|
+ var btnArray = ['取消', '确定'];
|
|
|
+ mui.confirm('确定删除此联系人吗?', '删除联系人', btnArray, function(e) {
|
|
|
+ if (e.index == 1) {
|
|
|
+ _this.isLoading = true;
|
|
|
+ API_Relatives.delPhoneNumber(_this.bookId).then(response => {
|
|
|
+ _this.isLoading = false;
|
|
|
+
|
|
|
+ mui.toast('处理成功');
|
|
|
+ _this.$router.go(-1);
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ _this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ asynCallBack() {},
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ //获取详情
|
|
|
+ this.getInfo();
|
|
|
+ document.body.style.backgroundColor = '#fff';
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ document.body.style.backgroundColor = '';
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ openId: 'wx_openid',
|
|
|
+ token: 'token',
|
|
|
+ person_data: 'person_data',
|
|
|
+ person_popedom: 'person_popedom',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style scoped src="$project/assets/css/pension.css"></style>
|