Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -30,12 +30,7 @@
|
|||||||
<a-input placeholder="请输入昵称" v-model="form.nickName" />
|
<a-input placeholder="请输入昵称" v-model="form.nickName" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="生日">
|
<a-form-model-item label="生日">
|
||||||
<a-date-picker
|
<a-date-picker @change="(date) => (form.birthday = date ? $moment(date).format('YYYY-MM-DD') : null)" class="w-100-p" placeholder="请选择生日" v-model="form.birthday" />
|
||||||
@change="(date) => form.birthday = date ? $moment(date).format('YYYY-MM-DD') : null"
|
|
||||||
class="w-100-p"
|
|
||||||
placeholder="请选择生日"
|
|
||||||
v-model="form.birthday"
|
|
||||||
/>
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="性别" prop="sex">
|
<a-form-model-item label="性别" prop="sex">
|
||||||
<a-radio-group v-model="form.sex">
|
<a-radio-group v-model="form.sex">
|
||||||
@@ -68,59 +63,29 @@
|
|||||||
<h3 class="h3">员工信息</h3>
|
<h3 class="h3">员工信息</h3>
|
||||||
<div class="yo-form-group">
|
<div class="yo-form-group">
|
||||||
<a-form-model-item label="所属组织机构" prop="sysEmpParam.orgId">
|
<a-form-model-item label="所属组织机构" prop="sysEmpParam.orgId">
|
||||||
<a-tree-select
|
<a-tree-select :dropdown-style="{ maxHeight: '300px', overflow: 'auto' }" :tree-data="orgData" placeholder="请选择所属组织机构" tree-default-expand-all v-model="form.sysEmpParam.orgId" />
|
||||||
:dropdown-style="{ maxHeight: '300px', overflow: 'auto' }"
|
|
||||||
:tree-data="orgData"
|
|
||||||
placeholder="请选择所属组织机构"
|
|
||||||
tree-default-expand-all
|
|
||||||
v-model="form.sysEmpParam.orgId"
|
|
||||||
/>
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="工号">
|
<a-form-model-item label="工号">
|
||||||
<a-input placeholder="请输入工号" v-model="form.sysEmpParam.jobNum" />
|
<a-input placeholder="请输入工号" v-model="form.sysEmpParam.jobNum" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="职位信息" prop="sysEmpParam.posIdList">
|
<a-form-model-item label="职位信息" prop="sysEmpParam.posIdList">
|
||||||
<a-select mode="multiple" placeholder="请选择职位信息" v-model="form.sysEmpParam.posIdList">
|
<a-select mode="multiple" placeholder="请选择职位信息" v-model="form.sysEmpParam.posIdList">
|
||||||
<a-select-option
|
<a-select-option :key="i" :value="item.id" v-for="(item, i) in posData">{{ item.name }}</a-select-option>
|
||||||
:key="i"
|
|
||||||
:value="item.id"
|
|
||||||
v-for="(item, i) in posData"
|
|
||||||
>{{ item.name }}</a-select-option>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="h4">附加信息</h4>
|
<h4 class="h4">附加信息</h4>
|
||||||
<div class="pl-md pr-md">
|
<div class="pl-md pr-md">
|
||||||
<a-table
|
<a-table :columns="extColumns" :data-source="form.sysEmpParam.extIds" :pagination="false" size="small">
|
||||||
:columns="extColumns"
|
|
||||||
:data-source="form.sysEmpParam.extIds"
|
|
||||||
:pagination="false"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<a-button @click="onAddExtData" block icon="plus" type="dashed">新增一项</a-button>
|
<a-button @click="onAddExtData" block icon="plus" type="dashed">新增一项</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template slot="orgId" slot-scope="text, record">
|
<template slot="orgId" slot-scope="text, record">
|
||||||
<a-tree-select
|
<a-tree-select :default-value="text" :dropdown-style="{ maxHeight: '300px', overflow: 'auto' }" :tree-data="orgData" @change="(value) => onChangeExtData(value, record, 'orgId')" placeholder="请选择附加组织机构" tree-default-expand-all />
|
||||||
:default-value="text"
|
|
||||||
:dropdown-style="{ maxHeight: '300px', overflow: 'auto' }"
|
|
||||||
:tree-data="orgData"
|
|
||||||
@change="value => onChangeExtData(value, record, 'orgId')"
|
|
||||||
placeholder="请选择附加组织机构"
|
|
||||||
tree-default-expand-all
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<template slot="posId" slot-scope="text, record">
|
<template slot="posId" slot-scope="text, record">
|
||||||
<a-select
|
<a-select :default-value="text" @change="(value) => onChangeExtData(value, record, 'posId')" placeholder="请选择附加职位信息">
|
||||||
:default-value="text"
|
<a-select-option :key="i" :value="item.id" v-for="(item, i) in posData">{{ item.name }}</a-select-option>
|
||||||
@change="value => onChangeExtData(value, record, 'posId')"
|
|
||||||
placeholder="请选择附加职位信息"
|
|
||||||
>
|
|
||||||
<a-select-option
|
|
||||||
:key="i"
|
|
||||||
:value="item.id"
|
|
||||||
v-for="(item, i) in posData"
|
|
||||||
>{{ item.name }}</a-select-option>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</template>
|
</template>
|
||||||
<template slot="action" slot-scope="text, record">
|
<template slot="action" slot-scope="text, record">
|
||||||
@@ -180,9 +145,7 @@ export default {
|
|||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
email: [
|
email: [{ pattern: /^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,5}){1,2}$/, message: '邮箱格式不正确', trigger: 'blur' }],
|
||||||
{ pattern: /^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,5}){1,2}$/, message: '邮箱格式不正确', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
'sysEmpParam.orgId': [{ required: true, message: '请选择所属组织机构' }],
|
'sysEmpParam.orgId': [{ required: true, message: '请选择所属组织机构' }],
|
||||||
'sysEmpParam.posIdList': [{ required: true, message: '请选择职位信息' }],
|
'sysEmpParam.posIdList': [{ required: true, message: '请选择职位信息' }],
|
||||||
},
|
},
|
||||||
@@ -254,7 +217,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params.orgId) {
|
if (params.orgId) {
|
||||||
form.sysEmpParam.orgId = orgId;
|
form.sysEmpParam.orgId = params.orgId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 将默认数据覆盖到form */
|
/** 将默认数据覆盖到form */
|
||||||
|
|||||||
@@ -5,12 +5,7 @@
|
|||||||
2021-04-30
|
2021-04-30
|
||||||
Lufthafen
|
Lufthafen
|
||||||
-->
|
-->
|
||||||
<yo-tree-layout
|
<yo-tree-layout :load-data="loadTreeData" @select="onSelect" default-expanded-keys ref="tree-layout">
|
||||||
:load-data="loadTreeData"
|
|
||||||
@select="onSelect"
|
|
||||||
default-expanded-keys
|
|
||||||
ref="tree-layout"
|
|
||||||
>
|
|
||||||
<container>
|
<container>
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<Auth auth="sysUser:page">
|
<Auth auth="sysUser:page">
|
||||||
@@ -20,17 +15,8 @@
|
|||||||
<a-input allow-clear placeholder="请输入姓名、账号、手机号" v-model="query.searchValue" />
|
<a-input allow-clear placeholder="请输入姓名、账号、手机号" v-model="query.searchValue" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="状态">
|
<a-form-model-item label="状态">
|
||||||
<a-select
|
<a-select :style="{ width: '170px' }" allow-clear placeholder="请选择状态" v-model="query.searchStatus">
|
||||||
:style="{ width: '170px' }"
|
<a-select-option :key="i" :value="item.code" v-for="(item, i) in codes.common_status">{{ item.value }}</a-select-option>
|
||||||
allow-clear
|
|
||||||
placeholder="请选择状态"
|
|
||||||
v-model="query.searchStatus"
|
|
||||||
>
|
|
||||||
<a-select-option
|
|
||||||
:key="i"
|
|
||||||
:value="item.code"
|
|
||||||
v-for="(item, i) in codes.common_status"
|
|
||||||
>{{ item.value }}</a-select-option>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item>
|
<a-form-model-item>
|
||||||
@@ -79,14 +65,7 @@
|
|||||||
<a-list-item-meta>
|
<a-list-item-meta>
|
||||||
<div slot="title">{{ record.nickName || record.name }}</div>
|
<div slot="title">{{ record.nickName || record.name }}</div>
|
||||||
<div slot="description">{{ record.account }}</div>
|
<div slot="description">{{ record.account }}</div>
|
||||||
<yo-image
|
<yo-image :id="record.avatar" :size="48" icon="user" shape="square" slot="avatar" type="avatar" />
|
||||||
:id="record.avatar"
|
|
||||||
:size="48"
|
|
||||||
icon="user"
|
|
||||||
shape="square"
|
|
||||||
slot="avatar"
|
|
||||||
type="avatar"
|
|
||||||
/>
|
|
||||||
</a-list-item-meta>
|
</a-list-item-meta>
|
||||||
<div class="yo-list-content--h">
|
<div class="yo-list-content--h">
|
||||||
<div class="yo-list-content--h--item">
|
<div class="yo-list-content--h--item">
|
||||||
@@ -103,13 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<Auth auth="sysUser:changeStatus">
|
<Auth auth="sysUser:changeStatus">
|
||||||
<div class="yo-list-content--h--item text-center">
|
<div class="yo-list-content--h--item text-center">
|
||||||
<a-switch
|
<a-switch :checked="!record.status" :checked-children="bindCodeValue(0, 'common_status')" :loading="record.statusChanging" :un-checked-children="bindCodeValue(1, 'common_status')" @change="(checked) => onSetUserStatus(record, checked)" />
|
||||||
:checked="!record.status"
|
|
||||||
:checked-children="bindCodeValue(0, 'common_status')"
|
|
||||||
:loading="record.statusChanging"
|
|
||||||
:un-checked-children="bindCodeValue(1, 'common_status')"
|
|
||||||
@change="(checked) => onSetUserStatus(record, checked)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</Auth>
|
</Auth>
|
||||||
</div>
|
</div>
|
||||||
@@ -119,24 +92,12 @@
|
|||||||
</container>
|
</container>
|
||||||
|
|
||||||
<!-- 新增表单 -->
|
<!-- 新增表单 -->
|
||||||
<yo-modal-form
|
<yo-modal-form :action="$api[api.add]" :title="'新增' + name" :width="1024" @ok="onReloadData" ref="add-form">
|
||||||
:action="$api[api.add]"
|
|
||||||
:title="'新增' + name"
|
|
||||||
:width="1024"
|
|
||||||
@ok="onReloadData"
|
|
||||||
ref="add-form"
|
|
||||||
>
|
|
||||||
<form-body mode="add" />
|
<form-body mode="add" />
|
||||||
</yo-modal-form>
|
</yo-modal-form>
|
||||||
|
|
||||||
<!-- 编辑表单 -->
|
<!-- 编辑表单 -->
|
||||||
<yo-modal-form
|
<yo-modal-form :action="$api[api.edit]" :title="'编辑' + name" :width="1024" @ok="onReloadData" ref="edit-form">
|
||||||
:action="$api[api.edit]"
|
|
||||||
:title="'编辑' + name"
|
|
||||||
:width="1024"
|
|
||||||
@ok="onReloadData"
|
|
||||||
ref="edit-form"
|
|
||||||
>
|
|
||||||
<form-body mode="edit" />
|
<form-body mode="edit" />
|
||||||
</yo-modal-form>
|
</yo-modal-form>
|
||||||
|
|
||||||
@@ -227,7 +188,9 @@ export default {
|
|||||||
onSelect([id]) {
|
onSelect([id]) {
|
||||||
/** 在选择事件中可以对右侧表格添加父节点id的查询条件 */
|
/** 在选择事件中可以对右侧表格添加父节点id的查询条件 */
|
||||||
this.query = {
|
this.query = {
|
||||||
'sysEmpParam.orgId': id,
|
sysEmpParam: {
|
||||||
|
orgId: id,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
this.onQuery();
|
this.onQuery();
|
||||||
},
|
},
|
||||||
@@ -260,7 +223,7 @@ export default {
|
|||||||
onReset() {
|
onReset() {
|
||||||
/* 与普通查询页不同的是,这里的父节点参数不应该在重置后被清空 */
|
/* 与普通查询页不同的是,这里的父节点参数不应该在重置后被清空 */
|
||||||
Object.keys(this.query).forEach((p) => {
|
Object.keys(this.query).forEach((p) => {
|
||||||
if (p !== 'pid') {
|
if (p !== 'sysEmpParam') {
|
||||||
this.query[p] = undefined;
|
this.query[p] = undefined;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -314,7 +277,7 @@ export default {
|
|||||||
onOpen(formName, record) {
|
onOpen(formName, record) {
|
||||||
this.$refs[formName].onOpen({
|
this.$refs[formName].onOpen({
|
||||||
record,
|
record,
|
||||||
orgId: this.query['sysEmpParam.orgId'],
|
orgId: this.query.sysEmpParam.orgId,
|
||||||
/* 按需添加其他参数 */
|
/* 按需添加其他参数 */
|
||||||
/* ... */
|
/* ... */
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user