Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop

This commit is contained in:
Yjhon 2022-05-19 14:31:03 +08:00
commit 6dd1374860
9 changed files with 99 additions and 21 deletions

9
public/static/lib/axios.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
public/static/lib/vue-router.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
public/static/lib/vue.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
public/static/lib/vuex.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -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
})
}

View File

@ -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 })
},

View File

@ -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)
})
},
/**
* 添加证书
*/

View File

@ -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 {

View File

@ -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: {