Merge pull request #118 from veops/dev_ui

Dev UI
This commit is contained in:
pycook 2023-07-14 18:06:02 +08:00 committed by GitHub
commit a9db4285ab
14 changed files with 405 additions and 366 deletions

View File

@ -1,14 +1,13 @@
const appConfig = { const appConfig = {
buildModules: ['cmdb'], // 需要编译的模块 buildModules: ['cmdb'], // 需要编译的模块
useMessageNotice: false, // 是否启用消息通知 useMessageNotice: false, // 是否启用消息通知
useTodoNotice: false, // 是否启用ticket通知 useTodoNotice: false, // 是否启用ticket通知
useClaimNotice: false, // 是否启动ticket claim 通知 useClaimNotice: false, // 是否启动ticket claim 通知
useDagReviewNotice: false, // 是否启用dag审核通知 useDagReviewNotice: false, // 是否启用dag审核通知
redirectTo: '/cmdb', // 首页的重定向路径 redirectTo: '/cmdb', // 首页的重定向路径
buildAclToModules: true, // 是否在各个应用下 内联权限管理 buildAclToModules: true, // 是否在各个应用下 内联权限管理
ssoLogoutURL: '/api/sso/logout', ssoLogoutURL: '/api/sso/logout',
useDFC: false, showDocs: false,
showDocs: false,
} }
export default appConfig export default appConfig

View File

@ -2,7 +2,7 @@ import { axios } from '@/utils/request'
const urlPrefix = '/v1/acl' const urlPrefix = '/v1/acl'
export function searchResource (params) { export function searchResource(params) {
return axios({ return axios({
url: urlPrefix + `/resources`, url: urlPrefix + `/resources`,
method: 'GET', method: 'GET',
@ -10,7 +10,7 @@ export function searchResource (params) {
}) })
} }
export function addResource (params) { export function addResource(params) {
return axios({ return axios({
url: urlPrefix + '/resources', url: urlPrefix + '/resources',
method: 'POST', method: 'POST',
@ -18,7 +18,7 @@ export function addResource (params) {
}) })
} }
export function updateResourceById (id, params) { export function updateResourceById(id, params) {
return axios({ return axios({
url: urlPrefix + `/resources/${id}`, url: urlPrefix + `/resources/${id}`,
method: 'PUT', method: 'PUT',
@ -26,14 +26,15 @@ export function updateResourceById (id, params) {
}) })
} }
export function deleteResourceById (id) { export function deleteResourceById(id, params) {
return axios({ return axios({
url: urlPrefix + `/resources/${id}`, url: urlPrefix + `/resources/${id}`,
method: 'DELETE' method: 'DELETE',
params
}) })
} }
export function searchResourceType (params) { export function searchResourceType(params) {
return axios({ return axios({
url: urlPrefix + `/resource_types`, url: urlPrefix + `/resource_types`,
method: 'GET', method: 'GET',
@ -41,7 +42,7 @@ export function searchResourceType (params) {
}) })
} }
export function addResourceType (params) { export function addResourceType(params) {
return axios({ return axios({
url: urlPrefix + '/resource_types', url: urlPrefix + '/resource_types',
method: 'POST', method: 'POST',
@ -49,7 +50,7 @@ export function addResourceType (params) {
}) })
} }
export function updateResourceTypeById (id, params) { export function updateResourceTypeById(id, params) {
return axios({ return axios({
url: urlPrefix + `/resource_types/${id}`, url: urlPrefix + `/resource_types/${id}`,
method: 'PUT', method: 'PUT',
@ -57,7 +58,7 @@ export function updateResourceTypeById (id, params) {
}) })
} }
export function deleteResourceTypeById (id) { export function deleteResourceTypeById(id) {
return axios({ return axios({
url: urlPrefix + `/resource_types/${id}`, url: urlPrefix + `/resource_types/${id}`,
method: 'DELETE' method: 'DELETE'
@ -65,7 +66,7 @@ export function deleteResourceTypeById (id) {
} }
// add resource group // add resource group
export function getResourceGroups (params) { export function getResourceGroups(params) {
return axios({ return axios({
url: `${urlPrefix}/resource_groups`, url: `${urlPrefix}/resource_groups`,
method: 'GET', method: 'GET',
@ -73,7 +74,7 @@ export function getResourceGroups (params) {
}) })
} }
export function addResourceGroup (data) { export function addResourceGroup(data) {
return axios({ return axios({
url: `${urlPrefix}/resource_groups`, url: `${urlPrefix}/resource_groups`,
method: 'POST', method: 'POST',
@ -81,7 +82,7 @@ export function addResourceGroup (data) {
}) })
} }
export function updateResourceGroup (_id, data) { export function updateResourceGroup(_id, data) {
return axios({ return axios({
url: `${urlPrefix}/resource_groups/${_id}`, url: `${urlPrefix}/resource_groups/${_id}`,
method: 'PUT', method: 'PUT',
@ -89,14 +90,14 @@ export function updateResourceGroup (_id, data) {
}) })
} }
export function deleteResourceGroup (_id) { export function deleteResourceGroup(_id) {
return axios({ return axios({
url: `${urlPrefix}/resource_groups/${_id}`, url: `${urlPrefix}/resource_groups/${_id}`,
method: 'DELETE' method: 'DELETE'
}) })
} }
export function getResourceGroupItems (_id) { export function getResourceGroupItems(_id) {
return axios({ return axios({
url: `${urlPrefix}/resource_groups/${_id}/items`, url: `${urlPrefix}/resource_groups/${_id}/items`,
method: 'GET' method: 'GET'

View File

@ -24,8 +24,12 @@
<a-form-item label="是否组"> <a-form-item label="是否组">
<a-radio-group v-model="isGroup"> <a-radio-group v-model="isGroup">
<a-radio :value="true"> </a-radio> <a-radio :value="true">
<a-radio :value="false"> </a-radio>
</a-radio>
<a-radio :value="false">
</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
@ -40,11 +44,12 @@
</template> </template>
<script> <script>
import { addResource, searchResourceType, addResourceGroup } from '@/modules/acl/api/resource' /* eslint-disable */
import { addResource, searchResourceType } from '@/modules/acl/api/resource'
import { addResourceGroup } from '@/modules/acl/api/resource'
export default { export default {
name: 'ResourceForm', name: 'ResourceForm',
components: {},
data() { data() {
return { return {
drawerTitle: '新增资源', drawerTitle: '新增资源',
@ -119,7 +124,7 @@ export default {
// }, // },
}, },
watch: { watch: {
'$route.name': function (newValue, oldValue) { '$route.name': function(newValue, oldValue) {
this.getAllResourceTypes() this.getAllResourceTypes()
}, },
}, },

View File

@ -7,7 +7,14 @@
@close="() => (drawerVisible = false)" @close="() => (drawerVisible = false)"
:hasFooter="false" :hasFooter="false"
> >
<vxe-table :max-height="`${windowHeight - 150}px`" :data="resPerms" ref="rTable"> <vxe-table
stripe
size="mini"
class="ops-stripe-table"
:max-height="`${windowHeight - 150}px`"
:data="resPerms"
ref="rTable"
>
<vxe-column <vxe-column
field="name" field="name"
title="角色名" title="角色名"
@ -57,6 +64,10 @@
</a-button> </a-button>
</template> </template>
</vxe-column> </vxe-column>
<template slot="empty">
<img :src="require(`@/assets/data_empty.png`)" />
<p style="font-size: 14px; line-height: 17px; color: rgba(0, 0, 0, 0.6)">暂无数据</p>
</template>
</vxe-table> </vxe-table>
<!-- <a-table <!-- <a-table
:columns="columns" :columns="columns"

View File

@ -103,7 +103,7 @@ export default {
}) })
}, },
updateResourceType(id, data) { updateResourceType(id, data) {
updateResourceTypeById(id, data).then(res => { updateResourceTypeById(id, data).then((res) => {
this.$message.success(`更新成功`) this.$message.success(`更新成功`)
this.handleOk() this.handleOk()
this.onClose() this.onClose()
@ -112,7 +112,7 @@ export default {
}, },
createResourceType(data) { createResourceType(data) {
addResourceType(data).then(res => { addResourceType(data).then((res) => {
this.$message.success(`添加成功`) this.$message.success(`添加成功`)
this.handleOk() this.handleOk()
this.onClose() this.onClose()

View File

@ -12,7 +12,14 @@
<a-select-option v-for="type in resourceTypes" :value="type.id" :key="type.id">{{ type.name }}</a-select-option> <a-select-option v-for="type in resourceTypes" :value="type.id" :key="type.id">{{ type.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<vxe-table :max-height="`${windowHeight - 180}px`" :data="records" ref="rTable"> <vxe-table
size="mini"
stripe
class="ops-stripe-table"
:max-height="`${windowHeight - 180}px`"
:data="records"
ref="rTable"
>
<vxe-column <vxe-column
field="name" field="name"
title="资源名" title="资源名"
@ -46,6 +53,10 @@
<a-tag color="cyan" v-for="(r, index) in row.permissions" :key="index">{{ r }}</a-tag> <a-tag color="cyan" v-for="(r, index) in row.permissions" :key="index">{{ r }}</a-tag>
</template> </template>
</vxe-column> </vxe-column>
<template slot="empty">
<img :src="require(`@/assets/data_empty.png`)" />
<p style="font-size: 14px; line-height: 17px; color: rgba(0, 0, 0, 0.6)">暂无数据</p>
</template>
</vxe-table> </vxe-table>
<!-- <a-table <!-- <a-table
:columns="columns" :columns="columns"

View File

@ -10,7 +10,12 @@
} }
" "
> >
<vxe-table :data="tableData" :max-height="`${windowHeight - 110}px`"> <vxe-table
size="mini"
stripe
class="ops-stripe-table"
:data="tableData"
:max-height="`${windowHeight - 110}px`">
<vxe-table-column field="name" title="资源名"></vxe-table-column> <vxe-table-column field="name" title="资源名"></vxe-table-column>
<vxe-table-column field="uid" title="创建人"> <vxe-table-column field="uid" title="创建人">
<template #default="{row}"> <template #default="{row}">
@ -18,6 +23,10 @@
</template> </template>
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="created_at" title="创建时间"></vxe-table-column> <vxe-table-column field="created_at" title="创建时间"></vxe-table-column>
<template slot="empty">
<img :src="require(`@/assets/data_empty.png`)" />
<p style="font-size: 14px; line-height: 17px; color: rgba(0, 0, 0, 0.6)">暂无数据</p>
</template>
</vxe-table> </vxe-table>
</CustomDrawer> </CustomDrawer>
</template> </template>

View File

@ -1,8 +1,9 @@
<template> <template>
<div :style="{ backgroundColor: '#fff', padding: '24px' }"> <div :style="{ backgroundColor: '#fff', padding: '24px' }">
<div class="resource-types-action-btn"> <div class="resource-types-action-btn">
<a-button @click="handleCreate" type="primary" style="margin-right: 0.3rem;">{{ btnName }}</a-button> <a-button @click="handleCreate" type="primary" style="margin-right: 0.3rem">{{ btnName }}</a-button>
<a-input-search <a-input-search
class="ops-input"
:style="{ display: 'inline', marginLeft: '10px', width: '200px' }" :style="{ display: 'inline', marginLeft: '10px', width: '200px' }"
placeholder="搜索 | 资源类型名" placeholder="搜索 | 资源类型名"
v-model="searchName" v-model="searchName"
@ -15,31 +16,60 @@
" "
></a-input-search> ></a-input-search>
</div> </div>
<a-spin <a-spin :spinning="loading">
:spinning="loading" <vxe-table
><vxe-grid :columns="tableColumns" :data="groups" :max-height="`${windowHeight - 185}px`" highlight-hover-row> stripe
<template #id_default="{row}"> size="mini"
<a-tag color="cyan" v-for="perm in id2perms[row.id]" :key="perm.id">{{ perm.name }}</a-tag> class="ops-stripe-table"
</template> :data="groups"
<template #action_default="{row}"> :max-height="`${windowHeight - 185}px`"
<a @click="handleEdit(row)"><a-icon type="edit"/></a> highlight-hover-row
<a-divider type="vertical" /> >
<a-popconfirm title="确认删除?" @confirm="handleDelete(row)" okText="是" cancelText="否"> <!-- 1 -->
<a style="color: red"><a-icon type="delete"/></a> <vxe-table-column
</a-popconfirm> field="name"
</template> title="资源类型名"
<template #pager> :min-width="175"
<vxe-pager fixed="left"
:layouts="['Total', 'PrevPage', 'JumpNumber', 'NextPage', 'Sizes']" show-overflow
:current-page.sync="tablePage.currentPage" ></vxe-table-column>
:page-size.sync="tablePage.pageSize"
:total="tablePage.total" <!-- 2 -->
:page-sizes="pageSizeOptions" <vxe-table-column field="description" title="描述" :min-width="175"></vxe-table-column>
@page-change="handlePageChange"
> <!-- 3 -->
</vxe-pager> <vxe-table-column field="id" title="权限" :min-width="300">
</template> </vxe-grid <template #default="{ row }">
></a-spin> <a-tag color="cyan" v-for="perm in id2perms[row.id]" :key="perm.id">{{ perm.name }}</a-tag>
</template>
</vxe-table-column>
<!-- 4 -->
<vxe-table-column field="action" title="操作" :min-width="175" fixed="right">
<template #default="{ row }">
<a @click="handleEdit(row)"><a-icon type="edit" /></a>
<a-divider type="vertical" />
<a-popconfirm title="确认删除?" @confirm="handleDelete(row)" okText="是" cancelText="否">
<a style="color: red"><a-icon type="delete" /></a>
</a-popconfirm>
</template>
</vxe-table-column>
<template slot="empty">
<img :src="require(`@/assets/data_empty.png`)" />
<p style="font-size: 14px; line-height: 17px; color: rgba(0, 0, 0, 0.6)">暂无数据</p>
</template>
</vxe-table>
<vxe-pager
size="mini"
:layouts="['Total', 'PrevPage', 'JumpNumber', 'NextPage', 'Sizes']"
:current-page.sync="tablePage.currentPage"
:page-size.sync="tablePage.pageSize"
:total="tablePage.total"
:page-sizes="pageSizeOptions"
@page-change="handlePageChange"
>
</vxe-pager>
</a-spin>
<resourceTypeForm ref="resourceTypeForm" :handleOk="handleOk"> </resourceTypeForm> <resourceTypeForm ref="resourceTypeForm" :handleOk="handleOk"> </resourceTypeForm>
</div> </div>
@ -110,7 +140,7 @@ export default {
}), }),
}, },
watch: { watch: {
'$route.name': function(newName, oldName) { '$route.name': function (newName, oldName) {
this.tablePage = { this.tablePage = {
total: 0, total: 0,
currentPage: 1, currentPage: 1,
@ -141,7 +171,11 @@ export default {
q: this.searchName, q: this.searchName,
} }
searchResourceType(param).then((res) => { searchResourceType(param).then((res) => {
this.tablePage = { ...this.tablePage, total: res.numfound, currentPage: res.page } this.tablePage = {
...this.tablePage,
total: res.numfound,
currentPage: res.page,
}
this.groups = res.groups this.groups = res.groups
this.id2perms = res.id2perms this.id2perms = res.id2perms
this.loading = false this.loading = false

View File

@ -8,6 +8,7 @@
<a-space> <a-space>
<a-button @click="handleCreate" type="primary">{{ btnName }}</a-button> <a-button @click="handleCreate" type="primary">{{ btnName }}</a-button>
<a-input-search <a-input-search
class="ops-input"
placeholder="搜索 | 资源名" placeholder="搜索 | 资源名"
v-model="searchName" v-model="searchName"
@search=" @search="
@ -65,56 +66,88 @@
></a-switch> ></a-switch>
</a-space> </a-space>
</div> </div>
<a-spin <a-spin :spinning="loading">
:spinning="loading" <vxe-table
><vxe-grid size="mini"
:columns="tableColumns" stripe
:data="tableData" class="ops-stripe-table"
highlight-hover-row :data="tableData"
:max-height="`${windowHeight - 245}px`" highlight-hover-row
:checkbox-config="{ reserve: true }" :height="`${windowHeight - 280}px`"
@checkbox-change="changeCheckbox" :checkbox-config="{ reserve: true }"
@checkbox-all="changeCheckbox" @checkbox-change="changeCheckbox"
ref="xTable" @checkbox-all="changeCheckbox"
row-id="id" ref="xTable"
show-overflow row-id="id"
> show-overflow
<template #name_header> >
{{ isGroup ? '资源组名' : '资源名' }} <!-- 1 -->
</template> <vxe-table-column type="checkbox" fixed="left"></vxe-table-column>
<template #action_default="{row}">
<span v-show="isGroup"> <!-- 2 -->
<a @click="handleDisplayMember(row)">成员</a>
<a-divider type="vertical" /> <vxe-table-column field="name" title="资源名" :min-widh="150" fixed="left" show-overflow>
<a @click="handleGroupEdit(row)">编辑</a> <template #title="{row}">
<a-divider type="vertical" /> {{ row.isGroup ? '资源组名' : '资源名' }}
</span> </template>
<a-tooltip title="查看授权"> </vxe-table-column>
<a @click="handlePerm(row)"><a-icon type="eye"/></a>
</a-tooltip> <!-- 3 -->
<a-divider type="vertical" /> <vxe-table-column field="user" title="创建者" :min-widh="100"> </vxe-table-column>
<a-tooltip title="授权">
<a :style="{ color: '#4bbb13' }" @click="handlePermManage(row)"> <!-- 4 -->
<a-icon type="usergroup-add" /> <vxe-table-column field="created_at" title="创建时间" :min-widh="220" align="center"> </vxe-table-column>
</a>
</a-tooltip> <!-- 5 -->
<a-divider type="vertical" /> <vxe-table-column field="updated_at" title="最后修改时间" :min-widh="220" fixed="center"> </vxe-table-column>
<a-popconfirm title="确认删除?" @confirm="handleDelete(row)" @cancel="cancel" okText="是" cancelText="否">
<a style="color: red"><a-icon type="delete"/></a> <!-- 6 -->
</a-popconfirm>
</template> <vxe-table-column
<template #pager> field="action"
<vxe-pager title="操作"
:layouts="['Total', 'PrevPage', 'JumpNumber', 'NextPage', 'Sizes']" :min-widh="200"
:current-page.sync="tablePage.currentPage" fixed="right"
:page-size.sync="tablePage.pageSize" align="center"
:total="tablePage.total" show-overflow>
:page-sizes="pageSizeOptions" <template #default="{row}">
@page-change="handlePageChange" <span v-show="row.isGroup">
> <a @click="handleDisplayMember(row)">成员</a>
</vxe-pager> <a-divider type="vertical" />
</template> </vxe-grid <a @click="handleGroupEdit(row)">编辑</a>
></a-spin> <a-divider type="vertical" />
</span>
<a-tooltip title="查看授权">
<a @click="handlePerm(row)"><a-icon type="eye"/></a>
</a-tooltip>
<a-divider type="vertical" />
<a-tooltip title="授权">
<a :style="{ color: '#4bbb13' }" @click="handlePermManage(row)">
<a-icon type="usergroup-add" />
</a>
</a-tooltip>
<a-divider type="vertical" />
<a-popconfirm title="确认删除?" @confirm="handleDelete(row)" @cancel="cancel" okText="是" cancelText="否">
<a style="color: red"><a-icon type="delete"/></a>
</a-popconfirm>
</template>
</vxe-table-column>
<template slot="empty">
<img :src="require(`@/assets/data_empty.png`)" />
<p style="font-size: 14px; line-height: 17px; color: rgba(0, 0, 0, 0.6)">暂无数据</p>
</template>
</vxe-table>
<vxe-pager
size="mini"
:layouts="['Total', 'PrevPage', 'JumpNumber', 'NextPage', 'Sizes']"
:current-page.sync="tablePage.currentPage"
:page-size.sync="tablePage.pageSize"
:total="tablePage.total"
:page-sizes="pageSizeOptions"
@page-change="handlePageChange"
>
</vxe-pager>
</a-spin>
</div> </div>
<div v-else style="text-align: center"> <div v-else style="text-align: center">
<a-icon style="font-size:50px; margin-bottom: 20px; color: orange" type="info-circle" /> <a-icon style="font-size:50px; margin-bottom: 20px; color: orange" type="info-circle" />
@ -304,7 +337,7 @@ export default {
}, },
deleteResource(id) { deleteResource(id) {
if (!this.isGroup) { if (!this.isGroup) {
deleteResourceById(id).then((res) => { deleteResourceById(id, { app_id: this.$route.name.split('_')[0] }).then((res) => {
this.$message.success(`删除成功`) this.$message.success(`删除成功`)
this.handleOk() this.handleOk()
}) })

View File

@ -3,6 +3,7 @@
<div class="roles-action-btn"> <div class="roles-action-btn">
<a-button @click="handleCreate" type="primary">{{ btnName }}</a-button> <a-button @click="handleCreate" type="primary">{{ btnName }}</a-button>
<a-input-search <a-input-search
class="ops-input"
allowClear allowClear
:style="{ display: 'inline', marginLeft: '10px', width: '200px' }" :style="{ display: 'inline', marginLeft: '10px', width: '200px' }"
placeholder="搜索 | 角色名" placeholder="搜索 | 角色名"
@ -17,8 +18,11 @@
<a-checkbox :checked="is_all" @click="handleClickBoxChange">所有角色</a-checkbox> <a-checkbox :checked="is_all" @click="handleClickBoxChange">所有角色</a-checkbox>
</div> </div>
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<vxe-grid <vxe-table
:columns="tableColumns" stripe
class="ops-stripe-table"
size="mini"
resizable
:data="tableData" :data="tableData"
:max-height="`${windowHeight - 185}px`" :max-height="`${windowHeight - 185}px`"
highlight-hover-row highlight-hover-row
@ -26,54 +30,94 @@
:filter-config="{ remote: true }" :filter-config="{ remote: true }"
@filter-change="filterTableMethod" @filter-change="filterTableMethod"
> >
<template #is_app_admin_default="{row}">
<a-icon type="check" v-if="row.is_app_admin" /> <vxe-table-column
</template> field="name"
<template #inherit_default="{row}"> title="角色名"
<a-tag color="cyan" v-for="role in id2parents[row.id]" :key="role.id">{{ role.name }}</a-tag> :min-width="150"
</template> align="left"
<template #isVisualRole_default="{row}"> fixed="left"
{{ row.uid ? '否' : '是' }} sortable
</template> show-overflow>
<template #action_default="{row}"> </vxe-table-column>
<div style="width:300px">
<span> <!-- 2 -->
<a-tooltip title="资源列表"> <vxe-table-column field="is_app_admin" title="管理员" :min-width="100" align="center">
<a <template #default="{row}">
v-if="$route.name !== 'acl_roles'" <a-icon type="check" v-if="row.is_app_admin" />
@click="handleDisplayUserResource(row)" </template>
><a-icon </vxe-table-column>
type="file-search"
/></a> <vxe-table-column field="id" title="继承自" :min-width="150">
</a-tooltip> <template #default="{row}">
<a-divider type="vertical" /> <a-tag color="cyan" v-for="role in id2parents[row.id]" :key="role.id">{{ role.name }}</a-tag>
<div v-if="!row.uid" style="display: inline-block"> </template>
<a-tooltip </vxe-table-column>
title="用户列表"
><a @click="handleDisplayUserUnderRole(row)"><a-icon type="team"/></a <vxe-table-column
></a-tooltip> field="uid"
title="虚拟角色"
:min-width="100"
align="center"
:filters="[
{ label: '是', value: 1 },
{ label: '否', value: 0 },
]"
:filterMultiple="false"
:filter-method="({ value, row }) => {
return value === !row.uid
}">
<template #default="{row}">
{{ row.uid ? '否' : '是' }}
</template>
</vxe-table-column>
<vxe-table-column field="action" title="操作" :min-width="150" fixed="right">
<template #default="{row}">
<div style="width:300px">
<span>
<a-tooltip title="资源列表">
<a
v-if="$route.name !== 'acl_roles'"
@click="handleDisplayUserResource(row)"
><a-icon
type="file-search"
/></a>
</a-tooltip>
<a-divider type="vertical" /> <a-divider type="vertical" />
</div> <div v-if="!row.uid" style="display: inline-block">
<a @click="handleEdit(row)"><a-icon type="edit"/></a> <a-tooltip
<a-divider type="vertical" /> title="用户列表"
<a-popconfirm title="确认删除?" @confirm="handleDelete(row)" @cancel="cancel" okText="是" cancelText="否"> ><a @click="handleDisplayUserUnderRole(row)"><a-icon type="team"/></a
<a style="color: red"><a-icon type="delete"/></a> ></a-tooltip>
</a-popconfirm> <a-divider type="vertical" />
</span> </div>
</div> <a @click="handleEdit(row)"><a-icon type="edit"/></a>
<a-divider type="vertical" />
<a-popconfirm title="确认删除?" @confirm="handleDelete(row)" @cancel="cancel" okText="是" cancelText="否">
<a style="color: red"><a-icon type="delete"/></a>
</a-popconfirm>
</span>
</div>
</template>
</vxe-table-column>
<template slot="empty">
<img :src="require(`@/assets/data_empty.png`)" />
<p style="font-size: 14px; line-height: 17px; color: rgba(0, 0, 0, 0.6)">暂无数据</p>
</template> </template>
<template #pager> </vxe-table>
<vxe-pager <vxe-pager
:layouts="['Total', 'PrevPage', 'JumpNumber', 'NextPage', 'Sizes']" size="mini"
:current-page.sync="tablePage.currentPage" :layouts="['Total', 'PrevPage', 'JumpNumber', 'NextPage', 'Sizes']"
:page-size.sync="tablePage.pageSize" :current-page.sync="tablePage.currentPage"
:total="tablePage.total" :page-size.sync="tablePage.pageSize"
:page-sizes="pageSizeOptions" :total="tablePage.total"
@page-change="handlePageChange" :page-sizes="pageSizeOptions"
> @page-change="handlePageChange"
</vxe-pager> >
</template> </vxe-pager>
</vxe-grid>
</a-spin> </a-spin>
<roleForm ref="roleForm" :allRoles="allRoles" :id2parents="id2parents" :handleOk="handleOk"></roleForm> <roleForm ref="roleForm" :allRoles="allRoles" :id2parents="id2parents" :handleOk="handleOk"></roleForm>

View File

@ -3,6 +3,7 @@
<div class="trigger-action-btn"> <div class="trigger-action-btn">
<a-button type="primary" @click="handleCreateTrigger">新增触发器</a-button> <a-button type="primary" @click="handleCreateTrigger">新增触发器</a-button>
<a-input-search <a-input-search
class="ops-input"
:style="{ display: 'inline', marginLeft: '10px', width: '200px' }" :style="{ display: 'inline', marginLeft: '10px', width: '200px' }"
placeholder="搜索 | 名称" placeholder="搜索 | 名称"
v-model="searchName" v-model="searchName"
@ -12,6 +13,9 @@
</div> </div>
<vxe-grid <vxe-grid
stripe
size="mini"
class="ops-stripe-table"
:columns="tableColumns" :columns="tableColumns"
:data="filterTriggers" :data="filterTriggers"
:max-height="`${windowHeight - 185}px`" :max-height="`${windowHeight - 185}px`"
@ -60,6 +64,10 @@
<a @click="handleDeleteTrigger(row)" :style="{ color: 'red' }"><a-icon type="delete"/></a> <a @click="handleDeleteTrigger(row)" :style="{ color: 'red' }"><a-icon type="delete"/></a>
</a-space> </a-space>
</template> </template>
<template slot="empty">
<img :src="require(`@/assets/data_empty.png`)" />
<p style="font-size: 14px; line-height: 17px; color: rgba(0, 0, 0, 0.6)">暂无数据</p>
</template>
</vxe-grid> </vxe-grid>
<trigger-form <trigger-form
ref="triggerForm" ref="triggerForm"

View File

@ -46,15 +46,13 @@
:column-config="{ resizable: true }" :column-config="{ resizable: true }"
> >
<vxe-column field="email" title="邮箱" min-width="120" fixed="left"></vxe-column> <vxe-column field="email" title="邮箱" min-width="120" fixed="left"></vxe-column>
<vxe-column field="username" title="用户名" min-width="80" ></vxe-column> <vxe-column field="username" title="用户名" min-width="80"></vxe-column>
<vxe-column field="nickname" title="姓名" min-width="80"></vxe-column> <vxe-column field="nickname" title="姓名" min-width="80"></vxe-column>
<vxe-column field="password" title="密码" min-width="80"></vxe-column> <vxe-column field="password" title="密码" min-width="80"></vxe-column>
<vxe-column field="sex" title="性别" min-width="60"></vxe-column> <vxe-column field="sex" title="性别" min-width="60"></vxe-column>
<vxe-column field="mobile" title="手机号" min-width="80"></vxe-column> <vxe-column field="mobile" title="手机号" min-width="80"></vxe-column>
<vxe-column field="position_name" title="岗位" min-width="80"></vxe-column> <vxe-column field="position_name" title="岗位" min-width="80"></vxe-column>
<vxe-column field="department_name" title="部门" min-width="80"></vxe-column> <vxe-column field="department_name" title="部门" min-width="80"></vxe-column>
<vxe-column field="current_company" v-if="useDFC" title="目前所属主体" min-width="120"></vxe-column>
<vxe-column field="dfc_entry_date" v-if="useDFC" title="初始入职日期" min-width="120"></vxe-column>
<vxe-column field="entry_date" title="目前主体入职日期" min-width="120"></vxe-column> <vxe-column field="entry_date" title="目前主体入职日期" min-width="120"></vxe-column>
<vxe-column field="is_internship" title="正式/实习生" min-width="120"></vxe-column> <vxe-column field="is_internship" title="正式/实习生" min-width="120"></vxe-column>
<vxe-column field="leave_date" title="离职日期" min-width="120"></vxe-column> <vxe-column field="leave_date" title="离职日期" min-width="120"></vxe-column>
@ -94,7 +92,6 @@
<script> <script>
import { downloadExcel, excel2Array } from '@/utils/download' import { downloadExcel, excel2Array } from '@/utils/download'
import { importEmployee } from '@/api/employee' import { importEmployee } from '@/api/employee'
import appConfig from '@/config/app'
export default { export default {
name: 'BatchUpload', name: 'BatchUpload',
data() { data() {
@ -189,7 +186,6 @@ export default {
has_error: false, has_error: false,
allCount: 0, allCount: 0,
errorCount: 0, errorCount: 0,
useDFC: appConfig.useDFC,
} }
}, },
methods: { methods: {
@ -215,12 +211,14 @@ export default {
rest[key] = rest[key] + '' rest[key] = rest[key] + ''
} }
}) })
rest.educational_experience = [{ rest.educational_experience = [
'school': rest.school, {
'major': rest.major, school: rest.school,
'education': rest.education, major: rest.major,
'graduation_year': rest.graduation_year education: rest.education,
}] graduation_year: rest.graduation_year,
},
]
delete rest.school delete rest.school
delete rest.major delete rest.major
delete rest.education delete rest.education
@ -254,8 +252,7 @@ export default {
const data = [ const data = [
[ [
{ {
v: v: '1、表头标“*”的红色字体为必填项\n2、邮箱、用户名不允许重复\n3、登录密码密码由6-20位字母、数字组成\n4、部门上下级部门间用"/"隔开,且从最上级部门开始,例如“深圳分公司/IT部/IT二部”。如出现相同的部门则默认导入组织架构中顺序靠前的部门',
'1、表头标“*”的红色字体为必填项\n2、邮箱、用户名不允许重复\n3、登录密码密码由6-20位字母、数字组成\n4、部门上下级部门间用"/"隔开,且从最上级部门开始,例如“深圳分公司/IT部/IT二部”。如出现相同的部门则默认导入组织架构中顺序靠前的部门',
t: 's', t: 's',
s: { s: {
alignment: { alignment: {
@ -420,13 +417,9 @@ export default {
}, },
], ],
] ]
if (this.useDFC) { data[1] = data[1].filter((item) => item['v'] !== '目前所属主体')
downloadExcel(data, '员工导入模板') data[1] = data[1].filter((item) => item['v'] !== '初始入职日期')
} else { downloadExcel(data, '员工导入模板')
data[1] = data[1].filter(item => item['v'] !== '目前所属主体')
data[1] = data[1].filter(item => item['v'] !== '初始入职日期')
downloadExcel(data, '员工导入模板')
}
}, },
customRequest(data) { customRequest(data) {
this.fileList = [data.file] this.fileList = [data.file]
@ -435,22 +428,12 @@ export default {
this.importData = res.slice(2).map((item) => { this.importData = res.slice(2).map((item) => {
const obj = {} const obj = {}
// //
if (this.useDFC) { item[8] = this.formatDate(item[8]) //
item[9] = this.formatDate(item[9]) // item[10] = this.formatDate(item[10]) //
item[10] = this.formatDate(item[10]) // item[28] = this.formatDate(item[28]) //
item[12] = this.formatDate(item[12]) //
item[30] = this.formatDate(item[30]) //
item.forEach((ele, index) => {
obj[this.dfc_importParamsList[index]] = ele
})
} else {
item[8] = this.formatDate(item[8]) //
item[10] = this.formatDate(item[10]) //
item[28] = this.formatDate(item[28]) //
item.forEach((ele, index) => { item.forEach((ele, index) => {
obj[this.common_importParamsList[index]] = ele obj[this.common_importParamsList[index]] = ele
}) })
}
return obj return obj
}) })
this.currentStep = 2 this.currentStep = 2
@ -474,17 +457,17 @@ export default {
month = month > 9 ? month : `0${month}` month = month > 9 ? month : `0${month}`
day = day > 9 ? day : `0${day}` day = day > 9 ? day : `0${day}`
const hash = { const hash = {
'Y': year, Y: year,
'm': month, m: month,
'd': day, d: day,
} }
return format.replace(/\w/g, o => { return format.replace(/\w/g, (o) => {
return hash[o] return hash[o]
}) })
} else { } else {
return null return null
} }
} },
}, },
} }
</script> </script>

View File

@ -137,29 +137,6 @@
:formatter="(value) => `${value} 天`" :formatter="(value) => `${value} 天`"
/> />
</a-form-model-item> </a-form-model-item>
<a-form-model-item
v-if="useDFC && attributes.findIndex((v) => v == 'current_company') !== -1"
ref="current_company"
label="目前所属主体"
prop="current_company"
:style="formModalItemStyle"
>
<a-input v-model="employeeFormData.current_company" placeholder="请输入目前所属主体" />
</a-form-model-item>
<a-form-model-item
v-if="useDFC && attributes.findIndex((v) => v == 'dfc_entry_date') !== -1"
ref="dfc_entry_date"
label="初始入职日期"
prop="dfc_entry_date"
:style="formModalItemStyle"
>
<a-date-picker
placeholder="请选择初始入职日期"
v-model="employeeFormData.dfc_entry_date"
:style="{ width: '100%' }"
@change="onChange($event, 'dfc_entry_date')"
></a-date-picker>
</a-form-model-item>
<a-form-model-item <a-form-model-item
ref="entry_date" ref="entry_date"
label="目前主体入职日期" label="目前主体入职日期"
@ -405,9 +382,9 @@
:style="{ display: 'inline-block', width: '98%', margin: '0 7px 24px' }" :style="{ display: 'inline-block', width: '98%', margin: '0 7px 24px' }"
v-if=" v-if="
attributes.findIndex((v) => v == 'bank_card_number') !== -1 || attributes.findIndex((v) => v == 'bank_card_number') !== -1 ||
attributes.findIndex((v) => v == 'bank_card_name') !== -1 || attributes.findIndex((v) => v == 'bank_card_name') !== -1 ||
attributes.findIndex((v) => v == 'opening_bank') !== -1 || attributes.findIndex((v) => v == 'opening_bank') !== -1 ||
attributes.findIndex((v) => v == 'account_opening_location') !== -1 attributes.findIndex((v) => v == 'account_opening_location') !== -1
" "
> >
<a-row :gutter="[8, { xs: 8 }]"> <a-row :gutter="[8, { xs: 8 }]">
@ -439,7 +416,6 @@ import { postEmployee, putEmployee } from '@/api/employee'
import Bus from './eventBus/bus' import Bus from './eventBus/bus'
import EmployeeTreeSelect from '../components/employeeTreeSelect.vue' import EmployeeTreeSelect from '../components/employeeTreeSelect.vue'
import DepartmentTreeSelect from '../components/departmentTreeSelect.vue' import DepartmentTreeSelect from '../components/departmentTreeSelect.vue'
import appConfig from '@/config/app'
import moment from 'moment' import moment from 'moment'
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
export default { export default {
@ -477,7 +453,6 @@ export default {
], ],
}, },
type: 'add', type: 'add',
useDFC: appConfig.useDFC,
educational_experience: [], educational_experience: [],
children_information: [], children_information: [],
file_is_show: true, file_is_show: true,

View File

@ -179,7 +179,7 @@
sortable sortable
v-if=" v-if="
checkedCols.findIndex((v) => v == 'department_name') !== -1 && checkedCols.findIndex((v) => v == 'department_name') !== -1 &&
attributes.findIndex((v) => v == 'department_name') !== -1 attributes.findIndex((v) => v == 'department_name') !== -1
" "
key="department_name" key="department_name"
> >
@ -217,7 +217,7 @@
sortable sortable
v-if=" v-if="
checkedCols.findIndex((v) => v == 'position_name') !== -1 && checkedCols.findIndex((v) => v == 'position_name') !== -1 &&
attributes.findIndex((v) => v == 'position_name') !== -1 attributes.findIndex((v) => v == 'position_name') !== -1
" "
key="position_name" key="position_name"
> >
@ -251,7 +251,7 @@
sortable sortable
v-if=" v-if="
checkedCols.findIndex((v) => v == 'direct_supervisor_id') !== -1 && checkedCols.findIndex((v) => v == 'direct_supervisor_id') !== -1 &&
attributes.findIndex((v) => v == 'direct_supervisor_id') !== -1 attributes.findIndex((v) => v == 'direct_supervisor_id') !== -1
" "
key="direct_supervisor_id" key="direct_supervisor_id"
> >
@ -290,8 +290,8 @@
min-width="80" min-width="80"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'annual_leave') !== -1 && checkedCols.findIndex((v) => v == 'annual_leave') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'annual_leave') !== -1 attributes.findIndex((v) => v == 'annual_leave') !== -1
" "
key="annual_leave" key="annual_leave"
> >
@ -325,8 +325,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'virtual_annual_leave') !== -1 && checkedCols.findIndex((v) => v == 'virtual_annual_leave') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'virtual_annual_leave') !== -1 attributes.findIndex((v) => v == 'virtual_annual_leave') !== -1
" "
key="virtual_annual_leave" key="virtual_annual_leave"
> >
@ -360,8 +360,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'parenting_leave') !== -1 && checkedCols.findIndex((v) => v == 'parenting_leave') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'parenting_leave') !== -1 attributes.findIndex((v) => v == 'parenting_leave') !== -1
" "
key="parenting_leave" key="parenting_leave"
> >
@ -388,78 +388,6 @@
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column
field="current_company"
title="目前所属主体"
sortable
min-width="120"
v-if="
useDFC &&
checkedCols.findIndex((v) => v == 'current_company') !== -1 &&
tableType == 'structure' &&
attributes.findIndex((v) => v == 'current_company') !== -1
"
key="current_company"
>
<template #header>
<span class="vxe-handle">
<svg
t="1662694543392"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="2689"
width="17"
height="17"
style="display: none; position: absolute; left: -3px; top: 12px"
>
<path
d="M469.333333 256a85.333333 85.333333 0 1 1-85.333333-85.333333 85.333333 85.333333 0 0 1 85.333333 85.333333z m-85.333333 170.666667a85.333333 85.333333 0 1 0 85.333333 85.333333 85.333333 85.333333 0 0 0-85.333333-85.333333z m0 256a85.333333 85.333333 0 1 0 85.333333 85.333333 85.333333 85.333333 0 0 0-85.333333-85.333333z m256-341.333334a85.333333 85.333333 0 1 0-85.333333-85.333333 85.333333 85.333333 0 0 0 85.333333 85.333333z m0 85.333334a85.333333 85.333333 0 1 0 85.333333 85.333333 85.333333 85.333333 0 0 0-85.333333-85.333333z m0 256a85.333333 85.333333 0 1 0 85.333333 85.333333 85.333333 85.333333 0 0 0-85.333333-85.333333z"
p-id="2690"
fill="#8a8a8a"
></path>
</svg>
<span>目前所属主体</span>
</span>
</template>
</vxe-column>
<vxe-column
field="dfc_entry_date"
title="初始入职日期"
sortable
min-width="120"
v-if="
useDFC &&
checkedCols.findIndex((v) => v == 'dfc_entry_date') !== -1 &&
tableType == 'structure' &&
attributes.findIndex((v) => v == 'dfc_entry_date') !== -1
"
key="dfc_entry_date"
>
<template #header>
<span class="vxe-handle">
<svg
t="1662694543392"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="2689"
width="17"
height="17"
style="display: none; position: absolute; left: -3px; top: 12px"
>
<path
d="M469.333333 256a85.333333 85.333333 0 1 1-85.333333-85.333333 85.333333 85.333333 0 0 1 85.333333 85.333333z m-85.333333 170.666667a85.333333 85.333333 0 1 0 85.333333 85.333333 85.333333 85.333333 0 0 0-85.333333-85.333333z m0 256a85.333333 85.333333 0 1 0 85.333333 85.333333 85.333333 85.333333 0 0 0-85.333333-85.333333z m256-341.333334a85.333333 85.333333 0 1 0-85.333333-85.333333 85.333333 85.333333 0 0 0 85.333333 85.333333z m0 85.333334a85.333333 85.333333 0 1 0 85.333333 85.333333 85.333333 85.333333 0 0 0-85.333333-85.333333z m0 256a85.333333 85.333333 0 1 0 85.333333 85.333333 85.333333 85.333333 0 0 0-85.333333-85.333333z"
p-id="2690"
fill="#8a8a8a"
></path>
</svg>
<span>初始入职日期</span>
</span>
</template>
</vxe-column>
<vxe-column <vxe-column
field="entry_date" field="entry_date"
title="目前主体入职日期" title="目前主体入职日期"
@ -467,8 +395,8 @@
min-width="150" min-width="150"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'entry_date') !== -1 && checkedCols.findIndex((v) => v == 'entry_date') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'entry_date') !== -1 attributes.findIndex((v) => v == 'entry_date') !== -1
" "
key="entry_date" key="entry_date"
> >
@ -503,8 +431,8 @@
v-bind="tableType === 'structure' ? { filters: internOptions, 'filter-multiple': false } : {}" v-bind="tableType === 'structure' ? { filters: internOptions, 'filter-multiple': false } : {}"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'is_internship') !== -1 && checkedCols.findIndex((v) => v == 'is_internship') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'is_internship') !== -1 attributes.findIndex((v) => v == 'is_internship') !== -1
" "
key="is_internship" key="is_internship"
> >
@ -541,8 +469,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'leave_date') !== -1 && checkedCols.findIndex((v) => v == 'leave_date') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'leave_date') !== -1 attributes.findIndex((v) => v == 'leave_date') !== -1
" "
key="leave_date" key="leave_date"
> >
@ -576,8 +504,8 @@
min-width="120" min-width="120"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'id_card') !== -1 && checkedCols.findIndex((v) => v == 'id_card') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'id_card') !== -1 attributes.findIndex((v) => v == 'id_card') !== -1
" "
key="id_card" key="id_card"
> >
@ -611,8 +539,8 @@
min-width="80" min-width="80"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'nation') !== -1 && checkedCols.findIndex((v) => v == 'nation') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'nation') !== -1 attributes.findIndex((v) => v == 'nation') !== -1
" "
key="nation" key="nation"
> >
@ -646,8 +574,8 @@
min-width="120" min-width="120"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'id_place') !== -1 && checkedCols.findIndex((v) => v == 'id_place') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'id_place') !== -1 attributes.findIndex((v) => v == 'id_place') !== -1
" "
key="id_place" key="id_place"
> >
@ -681,8 +609,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'party') !== -1 && checkedCols.findIndex((v) => v == 'party') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'party') !== -1 attributes.findIndex((v) => v == 'party') !== -1
" "
key="party" key="party"
> >
@ -716,8 +644,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'household_registration_type') !== -1 && checkedCols.findIndex((v) => v == 'household_registration_type') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'household_registration_type') !== -1 attributes.findIndex((v) => v == 'household_registration_type') !== -1
" "
key="household_registration_type" key="household_registration_type"
> >
@ -751,8 +679,8 @@
min-width="120" min-width="120"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'hometown') !== -1 && checkedCols.findIndex((v) => v == 'hometown') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'hometown') !== -1 attributes.findIndex((v) => v == 'hometown') !== -1
" "
key="hometown" key="hometown"
> >
@ -786,8 +714,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'marry') !== -1 && checkedCols.findIndex((v) => v == 'marry') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'marry') !== -1 attributes.findIndex((v) => v == 'marry') !== -1
" "
key="marry" key="marry"
> >
@ -821,8 +749,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'max_degree') !== -1 && checkedCols.findIndex((v) => v == 'max_degree') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'max_degree') !== -1 attributes.findIndex((v) => v == 'max_degree') !== -1
" "
key="max_degree" key="max_degree"
> >
@ -856,8 +784,8 @@
min-width="110" min-width="110"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'emergency_person') !== -1 && checkedCols.findIndex((v) => v == 'emergency_person') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'emergency_person') !== -1 attributes.findIndex((v) => v == 'emergency_person') !== -1
" "
key="emergency_person" key="emergency_person"
> >
@ -891,8 +819,8 @@
min-width="120" min-width="120"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'emergency_phone') !== -1 && checkedCols.findIndex((v) => v == 'emergency_phone') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'emergency_phone') !== -1 attributes.findIndex((v) => v == 'emergency_phone') !== -1
" "
key="emergency_phone" key="emergency_phone"
> >
@ -926,8 +854,8 @@
min-width="120" min-width="120"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'bank_card_number') !== -1 && checkedCols.findIndex((v) => v == 'bank_card_number') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'bank_card_number') !== -1 attributes.findIndex((v) => v == 'bank_card_number') !== -1
" "
key="bank_card_number" key="bank_card_number"
> >
@ -961,8 +889,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'bank_card_name') !== -1 && checkedCols.findIndex((v) => v == 'bank_card_name') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'bank_card_name') !== -1 attributes.findIndex((v) => v == 'bank_card_name') !== -1
" "
key="bank_card_name" key="bank_card_name"
> >
@ -996,8 +924,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'opening_bank') !== -1 && checkedCols.findIndex((v) => v == 'opening_bank') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'opening_bank') !== -1 attributes.findIndex((v) => v == 'opening_bank') !== -1
" "
key="opening_bank" key="opening_bank"
> >
@ -1031,8 +959,8 @@
min-width="120" min-width="120"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'account_opening_location') !== -1 && checkedCols.findIndex((v) => v == 'account_opening_location') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'account_opening_location') !== -1 attributes.findIndex((v) => v == 'account_opening_location') !== -1
" "
key="account_opening_location" key="account_opening_location"
> >
@ -1065,8 +993,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'school') !== -1 && checkedCols.findIndex((v) => v == 'school') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'school') !== -1 attributes.findIndex((v) => v == 'school') !== -1
" "
key="school" key="school"
> >
@ -1099,8 +1027,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'major') !== -1 && checkedCols.findIndex((v) => v == 'major') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'major') !== -1 attributes.findIndex((v) => v == 'major') !== -1
" "
key="major" key="major"
> >
@ -1133,8 +1061,8 @@
min-width="80" min-width="80"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'education') !== -1 && checkedCols.findIndex((v) => v == 'education') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'education') !== -1 attributes.findIndex((v) => v == 'education') !== -1
" "
key="education" key="education"
> >
@ -1167,8 +1095,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'graduation_year') !== -1 && checkedCols.findIndex((v) => v == 'graduation_year') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'graduation_year') !== -1 attributes.findIndex((v) => v == 'graduation_year') !== -1
" "
key="graduation_year" key="graduation_year"
> >
@ -1201,8 +1129,8 @@
min-width="80" min-width="80"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'name') !== -1 && checkedCols.findIndex((v) => v == 'name') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'name') !== -1 attributes.findIndex((v) => v == 'name') !== -1
" "
key="name" key="name"
> >
@ -1235,8 +1163,8 @@
min-width="80" min-width="80"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'gender') !== -1 && checkedCols.findIndex((v) => v == 'gender') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'gender') !== -1 attributes.findIndex((v) => v == 'gender') !== -1
" "
key="gender" key="gender"
> >
@ -1269,8 +1197,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'birthday') !== -1 && checkedCols.findIndex((v) => v == 'birthday') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'birthday') !== -1 attributes.findIndex((v) => v == 'birthday') !== -1
" "
key="birthday" key="birthday"
> >
@ -1303,8 +1231,8 @@
min-width="100" min-width="100"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'parental_leave_left') !== -1 && checkedCols.findIndex((v) => v == 'parental_leave_left') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'parental_leave_left') !== -1 attributes.findIndex((v) => v == 'parental_leave_left') !== -1
" "
key="parental_leave_left" key="parental_leave_left"
> >
@ -1339,8 +1267,8 @@
:formatter="formatDate" :formatter="formatDate"
v-if=" v-if="
checkedCols.findIndex((v) => v == 'last_login') !== -1 && checkedCols.findIndex((v) => v == 'last_login') !== -1 &&
tableType == 'structure' && tableType == 'structure' &&
attributes.findIndex((v) => v == 'last_login') !== -1 attributes.findIndex((v) => v == 'last_login') !== -1
" "
key="last_login" key="last_login"
> >
@ -1568,7 +1496,6 @@ export default {
checkedCols, checkedCols,
unsbmitCheckedCols: [], unsbmitCheckedCols: [],
visible: false, visible: false,
useDFC: appConfig.useDFC,
tableDragClassName: [], // tableDragClassName: [], //
attributes: [], attributes: [],
internMap: [ internMap: [
@ -1603,11 +1530,10 @@ export default {
Bus.$on('reqExportSelectEvent', () => { Bus.$on('reqExportSelectEvent', () => {
this.exportExcel() this.exportExcel()
}) })
if (!this.useDFC) { this.options = this.options
this.options = this.options .filter((item) => item.label !== '目前所属主体')
.filter((item) => item.label !== '目前所属主体') .filter((item) => item.label !== '初始入职日期')
.filter((item) => item.label !== '初始入职日期')
}
this.unsbmitCheckedCols = this.checkedCols this.unsbmitCheckedCols = this.checkedCols
}, },
beforeDestroy() { beforeDestroy() {