Commit b01abe06 authored by sixiaofeng's avatar sixiaofeng

合并

parents 1927ce7a dd7d41fa
This diff is collapsed.
...@@ -38,6 +38,14 @@ const routes: Array<RouteConfig> = [ ...@@ -38,6 +38,14 @@ const routes: Array<RouteConfig> = [
} }
}, },
{ {
path: '/file',
name: 'File',
component: () => import('@/views/file.vue'),
meta: {
title: '添加成员'
}
},
{
path: '/team/:id', path: '/team/:id',
name: 'TeamDetail', name: 'TeamDetail',
component: () => import('@/views/team-detail.vue'), component: () => import('@/views/team-detail.vue'),
......
...@@ -21,16 +21,16 @@ export class Service { ...@@ -21,16 +21,16 @@ export class Service {
return ret.data; return ret.data;
} }
return ret return ret
}else { }/*else {
// if(ret.code === 401){ if(ret.code === 401){
// await logoutUser().then(()=>{ await logoutUser().then(()=>{
// router.push({name:'Login'}) router.push({name:'Login'})
// }) })
// }
// Toast.fail(typeof ret.data === "string" ? ret.data : ret.message)
// throw new Error(ret.message)
} }
Toast.fail(typeof ret.data === "string" ? ret.data : ret.message)
throw new Error(ret.message)
}*/
} }
this.service.get = (...res) => get(...res).then(ret => resolveData(ret.data)).catch(err => { this.service.get = (...res) => get(...res).then(ret => resolveData(ret.data)).catch(err => {
resolveData(err.response.data) resolveData(err.response.data)
......
import validator from 'validator' import validator from 'validator'
// import cliboard from "./cliboard" /*import cliboard from "./cliboard"
import cliboard from 'clipboard'
export default { export default {
install(Vue: any) { install(Vue: any) {
...@@ -11,6 +10,6 @@ export default { ...@@ -11,6 +10,6 @@ export default {
cliboard, cliboard,
} }
} }
} }*/
<template>
<div class="team-frame">
<main-page
left-arrow
@click-left="handleClickLeft"
>
<!-- <template slot="right">
<app-icon
type="png"
class-name="w-6.5 h-6.5"
:path="require('@/assets/icons/search.png')"
/>
</template> -->
<div class="px-4">
<!-- 输入任意文本 -->
<van-cell-group>
<van-field label="真实姓名" :required="true" disabled ></van-field>
<input type="text" maxlength="10">
</van-cell-group>
<br>
<van-cell-group>
<van-field label="职位" disabled />
<input type="text">
</van-cell-group>
<br>
<van-cell-group >
<!-- 输入手机号,调起手机号键盘 -->
<van-field dot label="手机号" v-model="tel" type="tel" input-align="right" />
<!-- 允许输入整数,调起数字键盘 -->
<van-field label="员工编号" v-model="digit" type="digit" input-align="right" />
<van-field label="入职时间" v-model="date" :value="date" input-align="right" @click="show = true" right-icon="ellipsis"></van-field>
<van-calendar v-model="show" :round="false" @confirm="onConfirm" :show-confirm="false" right-icon="ellipsis" :style="{ height: '100% '}" />
</van-cell-group>
<br>
<van-cell-group>
<van-field label="所属部门" right-icon="ellipsis" disabled />
<van-field/>
<van-field/>
</van-cell-group>
<br><br><br><br>
<c-button
round
buttonBg="bg-color-primary"
class="mt-16"
>
生成邀请二维码
</c-button>
</div>
</main-page>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
import { Field, Toast } from 'vant';
import { Calendar } from 'vant';
import { Popup } from 'vant';
import { Cell, CellGroup } from 'vant';
import { NavBar } from 'vant';
import { Icon } from 'vant';
import { RadioGroup, Radio } from 'vant';
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(Icon);
Vue.use(NavBar);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Popup);
Vue.use(Calendar);
Vue.use(Field);
export default Vue.extend({
name: 'TeamFrame',
components: {
'main-page': () => import('@/layout/main-page.vue'),
'c-button': () => import('./components/c-button.vue'),
},
created() {
// console.log(Mock, 'mock')
},
data() {
return {
realname: '',
job:'',
tel: '',
digit: '',
//入职时间
date: '',
show:false,
}
},
methods: {
handleClickLeft() {
this.$router.go(-1)
},
formatDate(date:Date) {
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
},
onConfirm(date:Date) {
this.show = false;
this.date = this.formatDate(date);
},
}
})
</script>
<style lang="less">
</style>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
</div> </div>
<c-cell dot title="团队架构" @click-cell="$router.push('/team-frame')" /> <c-cell dot title="团队架构" @click-cell="$router.push('/team-frame')" />
<c-cell dot title="添加成员" /> <c-cell dot title="添加成员" @click-cell="$router.push('/file')" />
<c-cell dot title="添加部门" /> <c-cell dot title="添加部门" />
<div class="mt-4"> <div class="mt-4">
<c-cell dot title="团队管理权限" content="共3人" /> <c-cell dot title="团队管理权限" content="共3人" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment