Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop
This commit is contained in:
commit
6dd1374860
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,8 @@ import request from '@/utils/request'
|
|||
|
||||
const personOrgApi = {
|
||||
listByOrgId: 'person/org/listByOrgId',
|
||||
addPersonOrg: 'person/org/addPersonOrg'
|
||||
addPersonOrg: 'person/org/addPersonOrg',
|
||||
removePersonOrg: 'person/org/removePersonOrg'
|
||||
}
|
||||
|
||||
export function listPersonByOrgId(params) {
|
||||
|
@ -19,3 +20,10 @@ export function addPersonOrg(params) {
|
|||
data: params
|
||||
})
|
||||
}
|
||||
export function removePersonOrg(params) {
|
||||
return request({
|
||||
url: personOrgApi.removePersonOrg,
|
||||
method: 'post',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -178,6 +178,20 @@
|
|||
</a-form>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form :form="form">
|
||||
<a-form-item
|
||||
label="所在项目组"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
has-feedback
|
||||
>
|
||||
<a-input readOnly v-decorator="['projectTeam']" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-divider orientation="left">身份证信息</a-divider>
|
||||
<a-row :gutter="24">
|
||||
|
@ -309,12 +323,14 @@
|
|||
const data = res.data
|
||||
|
||||
// 默认选中的多选框
|
||||
if (data.type) {
|
||||
const type = data.type.split(',')
|
||||
const typeIntArr = []// 保存转换后的整型字符串
|
||||
type.forEach(item => {
|
||||
typeIntArr.push(+item)
|
||||
})
|
||||
this.form.getFieldDecorator('type', { valuePropName: 'checked', initialValue: typeIntArr })
|
||||
}
|
||||
|
||||
this.idPhotoFace = this.getImgPath(data.idPhotoFace)
|
||||
this.idPhotoBack = this.getImgPath(data.idPhotoBack)
|
||||
|
@ -330,11 +346,12 @@
|
|||
// age: data.age,
|
||||
// sex: data.sex,
|
||||
phone: data.phone,
|
||||
jobs: parseInt(data.jobs),
|
||||
workType: parseInt(data.workType),
|
||||
jobs: data.jobs ? parseInt(data.jobs) : null,
|
||||
workType: data.workType ? parseInt(data.workType) : null,
|
||||
degreeId: data.degreeId,
|
||||
orgId: data.orgId,
|
||||
orgName: data.orgName
|
||||
orgName: data.orgName,
|
||||
projectTeam: data.projectTeam
|
||||
}
|
||||
)
|
||||
// 动态赋值年龄和性别
|
||||
|
@ -408,7 +425,6 @@
|
|||
if (monthNow < monthBirth || (monthNow === monthBirth && dayNow < dayBirth)) {
|
||||
age--
|
||||
}
|
||||
console.log(age)
|
||||
// 得到年龄
|
||||
this.form.setFieldsValue({ age })
|
||||
},
|
||||
|
|
|
@ -79,6 +79,8 @@
|
|||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="hasPerm('person:get')" @click="$refs.personDetail.detail(record)">详情</a>
|
||||
<a-divider type="vertical" v-if="hasPerm('person:get')" />
|
||||
|
||||
<template v-if="orgType === 1">
|
||||
<a-dropdown v-if="hasPerm('person:edit') || hasPerm('person:resetPwd') || hasPerm('person:del')">
|
||||
<a class="ant-dropdown-link">
|
||||
更多
|
||||
|
@ -103,6 +105,13 @@
|
|||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
|
||||
<template v-if="orgType === 2">
|
||||
<a-popconfirm placement="topRight" title="确认移除?" @confirm="() => personRemove(record)">
|
||||
<a>移除</a>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</span>
|
||||
</s-table>
|
||||
|
||||
|
@ -122,6 +131,7 @@ import { orgList } from '@/api/org/org'
|
|||
import { listToTree } from '@/utils/util'
|
||||
import { personPage, personDel, personQuit, personTransferOrg, personSetAdmin, personResetPwd,
|
||||
personExport, personImport } from '@/api/person/person'
|
||||
import { removePersonOrg } from '@/api/person/personOrg'
|
||||
import PersonForm from './PersonForm'
|
||||
import PersonDetail from './PersonDetail'
|
||||
import OrgTree from '../org/OrgTree'
|
||||
|
@ -283,6 +293,21 @@ export default {
|
|||
this.$message.error('删除错误:' + err.msg)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 移除项目
|
||||
*/
|
||||
personRemove (record) {
|
||||
removePersonOrg({ personId: record.id, orgId: this.orgId }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('移除成功')
|
||||
this.$refs.table.refresh()
|
||||
} else {
|
||||
this.$message.error('移除失败:' + res.msg)
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.$message.error('移除错误:' + err.msg)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 添加证书
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
<div class="table-page-search-wrapper">
|
||||
<h3>单位邀请码:{{ invitationCode }}</h3>
|
||||
<h3>邀请链接: www.anquanpeixun.com</h3>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
|
@ -27,11 +26,14 @@
|
|||
</template>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="$refs.personForm.registerEdit(record)">编辑</a>
|
||||
<!-- 2022-05-12 改为注册自动审核通过 -->
|
||||
<!-- <a @click="$refs.personForm.registerEdit(record)">编辑</a> -->
|
||||
<a v-if="hasPerm('person:get')" @click="$refs.personDetail.detail(record)">详情</a>
|
||||
</span>
|
||||
</s-table>
|
||||
|
||||
<person-form ref="personForm" @ok="handleOk" />
|
||||
<!-- <person-form ref="personForm" @ok="handleOk" /> -->
|
||||
<person-detail ref="personDetail" @ok="handleOk" />
|
||||
|
||||
</a-card>
|
||||
</div>
|
||||
|
@ -39,12 +41,12 @@
|
|||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { personRegisterPage } from '@/api/person/personRegister'
|
||||
import PersonForm from './PersonForm'
|
||||
import PersonDetail from './PersonDetail'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
STable,
|
||||
PersonForm
|
||||
PersonDetail
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
|
|
@ -22,10 +22,10 @@ const assetsCDN = {
|
|||
css: [],
|
||||
// https://unpkg.com/browse/vue@2.6.10/
|
||||
js: [
|
||||
'//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js',
|
||||
'//cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js',
|
||||
'//cdn.jsdelivr.net/npm/vuex@3.1.1/dist/vuex.min.js',
|
||||
'//cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js'
|
||||
'static/lib/vue.min.js',
|
||||
'static/lib/vue-router.min.js',
|
||||
'static/lib/vuex.min.js',
|
||||
'static/lib/axios.min.js'
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ const vueConfig = {
|
|||
proxy: {
|
||||
'/dawa': { // 捕获API的标志,如果API中有这个字符串,那么就开始匹配代理
|
||||
target: 'http://a.3a6.cn/dawa', // 地址可以是域名,也可以是IP地址。比如API请求/api/getList, 会被代理到请求http://www.baidu.com/api/getList 。
|
||||
// target: 'http://192.168.2.140:8080', // 地址可以是域名,也可以是IP地址。比如API请求/api/getList, 会被代理到请求http://www.baidu.com/api/getList 。
|
||||
// target: 'http://192.168.2.115:8000/dawa', // 地址可以是域名,也可以是IP地址。比如API请求/api/getList, 会被代理到请求http://www.baidu.com/api/getList 。
|
||||
ws: false,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
|
Loading…
Reference in New Issue