feat: Add HR department synchronization and employee management extensions

- Implemented HR_DeptSync.jsx for department synchronization functionality.
- Created HR_DingTalkEmployees.jsx for managing DingTalk employee information.
- Developed HR_YSEmployees.jsx for handling YS employee data.
- Added HR_DeptManager.vue and associated options for managing department data.
- Introduced HR_DeptShip.vue for cross-system department associations.
- Established options.js files for each component to define table structure and form fields.
- Enhanced UI components with grid and form functionalities for better user interaction.
- Included necessary methods for data handling and event management in each extension.
This commit is contained in:
Ling 2025-09-26 11:14:55 +08:00
parent 95d8ebd029
commit 3819c78582
17 changed files with 1058 additions and 1 deletions

View File

@ -0,0 +1,75 @@
/*****************************************************************************************
** Author:jxx
** QQ:283591387
** 框架文档 http://v3.volcore.xyz/
*****************************************************************************************/
//js[.vue]
let extension = {
components: {
//
gridHeader: '',
gridBody: '',
gridFooter: '',
//
modelHeader: '',
modelBody: '',
modelRight: '',
modelFooter: ''
},
tableAction: '', //(,)
buttons: { view: [], box: [], detail: [] }, //
methods: {
//
onInit() { //
//
// this.buttons.unshift({ //pushsplicebuttons
// name: '', //
// icon: 'el-icon-document', //https://element.eleme.cn/#/zh-CN/component/icon
// type: 'primary', //:https://element-plus.gitee.io/zh-CN/component/button.html
// //color:"#eee",//
// onClick: function () {
// this.$Message.success('');
// }
// });
//
// this.boxOptions.labelWidth = 150;
},
onInited() {
//
//,
//this.detailOptions.columns.forEach(column=>{ });
},
searchBefore(param) {
//,param.wheres
//false
return true;
},
searchAfter(result) {
//result,
return true;
},
addBefore(formData) {
//formDataformData
return true;
},
updateBefore(formData) {
//formDataId
return true;
},
rowClick({ row, column, event }) {
//
// this.$refs.table.$refs.table.toggleRowSelection(row); //;
},
modelOpenAfter(row) {
//
//(1) this.currentAction=='Add';
//(2)
//(3)this.editFormFields.='xxx';
//this.editFormOptionsdatakey
//console.log(this.editFormOptions)
}
}
};
export default extension;

View File

@ -0,0 +1,75 @@
/*****************************************************************************************
** Author:jxx
** QQ:283591387
** 框架文档 http://v3.volcore.xyz/
*****************************************************************************************/
//js[.vue]
let extension = {
components: {
//
gridHeader: '',
gridBody: '',
gridFooter: '',
//
modelHeader: '',
modelBody: '',
modelRight: '',
modelFooter: ''
},
tableAction: '', //(,)
buttons: { view: [], box: [], detail: [] }, //
methods: {
//
onInit() { //
//
// this.buttons.unshift({ //pushsplicebuttons
// name: '', //
// icon: 'el-icon-document', //https://element.eleme.cn/#/zh-CN/component/icon
// type: 'primary', //:https://element-plus.gitee.io/zh-CN/component/button.html
// //color:"#eee",//
// onClick: function () {
// this.$Message.success('');
// }
// });
//
// this.boxOptions.labelWidth = 150;
},
onInited() {
//
//,
//this.detailOptions.columns.forEach(column=>{ });
},
searchBefore(param) {
//,param.wheres
//false
return true;
},
searchAfter(result) {
//result,
return true;
},
addBefore(formData) {
//formDataformData
return true;
},
updateBefore(formData) {
//formDataId
return true;
},
rowClick({ row, column, event }) {
//
// this.$refs.table.$refs.table.toggleRowSelection(row); //;
},
modelOpenAfter(row) {
//
//(1) this.currentAction=='Add';
//(2)
//(3)this.editFormFields.='xxx';
//this.editFormOptionsdatakey
//console.log(this.editFormOptions)
}
}
};
export default extension;

View File

@ -0,0 +1,76 @@
/*****************************************************************************************
** Author:jxx
** QQ:283591387
** 框架文档 http://v3.volcore.xyz/
*****************************************************************************************/
//js[.vue]
let extension = {
components: {
//
gridHeader: '',
gridBody: '',
gridFooter: '',
//
modelHeader: '',
modelBody: '',
modelRight: '',
modelFooter: ''
},
tableAction: '', //(,)
buttons: { view: [], box: [], detail: [] }, //
methods: {
//
onInit() { //
//
this.buttons.unshift({ //pushsplicebuttons
name: '为避免接口被限制,刷新数据时间为十分钟', //
icon: 'el-icon-refresh', //https://element.eleme.cn/#/zh-CN/component/icon
type: 'primary', //:https://element-plus.gitee.io/zh-CN/component/button.html
disabled: false, //
//color:"#eee",//
onClick: function () {
this.$Message.warning('为避免接口被限制,刷新数据时间为十分钟');
}
});
//
// this.boxOptions.labelWidth = 150;
},
onInited() {
//
//,
//this.detailOptions.columns.forEach(column=>{ });
},
searchBefore(param) {
//,param.wheres
//false
return true;
},
searchAfter(result) {
//result,
return true;
},
addBefore(formData) {
//formDataformData
return true;
},
updateBefore(formData) {
//formDataId
return true;
},
rowClick({ row, column, event }) {
//
// this.$refs.table.$refs.table.toggleRowSelection(row); //;
},
modelOpenAfter(row) {
//
//(1) this.currentAction=='Add';
//(2)
//(3)this.editFormFields.='xxx';
//this.editFormOptionsdatakey
//console.log(this.editFormOptions)
}
}
};
export default extension;

View File

@ -0,0 +1,76 @@
/*****************************************************************************************
** Author:jxx
** QQ:283591387
** 框架文档 http://v3.volcore.xyz/
*****************************************************************************************/
//js[.vue]
let extension = {
components: {
//
gridHeader: '',
gridBody: '',
gridFooter: '',
//
modelHeader: '',
modelBody: '',
modelRight: '',
modelFooter: ''
},
tableAction: '', //(,)
buttons: { view: [], box: [], detail: [] }, //
methods: {
//
onInit() { //
//
this.buttons.unshift({ //pushsplicebuttons
name: '为避免接口被限制,刷新数据时间为十分钟', //
icon: 'el-icon-refresh', //https://element.eleme.cn/#/zh-CN/component/icon
type: 'primary', //:https://element-plus.gitee.io/zh-CN/component/button.html
disabled: false, //
//color:"#eee",//
onClick: function () {
this.$Message.warning('为避免接口被限制,刷新数据时间为十分钟');
}
});
//
// this.boxOptions.labelWidth = 150;
},
onInited() {
//
//,
//this.detailOptions.columns.forEach(column=>{ });
},
searchBefore(param) {
//,param.wheres
//false
return true;
},
searchAfter(result) {
//result,
return true;
},
addBefore(formData) {
//formDataformData
return true;
},
updateBefore(formData) {
//formDataId
return true;
},
rowClick({ row, column, event }) {
//
// this.$refs.table.$refs.table.toggleRowSelection(row); //;
},
modelOpenAfter(row) {
//
//(1) this.currentAction=='Add';
//(2)
//(3)this.editFormFields.='xxx';
//this.editFormOptionsdatakey
//console.log(this.editFormOptions)
}
}
};
export default extension;

View File

@ -88,10 +88,30 @@ let viewgird = [
path: '/Sys_Region',
name: 'Sys_Region',
component: () => import('@/views/sys/system/Sys_Region.vue')
} ,{
path: '/HR_YSDepartments',
name: 'HR_YSDepartments',
component: () => import('@/views/hr/deptmanager/HR_DeptManager.vue')
} ,{
path: '/HR_YSEmployees',
name: 'HR_YSEmployees',
component: () => import('@/views/hr/ysemployees/HR_YSEmployees.vue')
} ,{
path: '/HR_DingTalkEmployees',
name: 'HR_DingTalkEmployees',
component: () => import('@/views/hr/dingtalkemployees/HR_DingTalkEmployees.vue')
} ,{
path: '/HR_EmployeeSync',
name: 'HR_EmployeeSync',
component: () => import('@/views/hr/employeesync/HR_EmployeeSync.vue')
} ,{
path: '/HR_DeptShip',
name: 'HR_DeptShip',
component: () => import('@/views/hr/deptship/HR_DeptShip.vue')
} ,{
path: '/HR_DeptSync',
name: 'HR_DeptSync',
component: () => import('@/views/hr/deptsync/HR_DeptSync.vue')
}]
//上面的demo、MES开头的都是示例菜单可以任意删除

View File

@ -0,0 +1,90 @@
<!--
*Authorjxx
*Contact283591387@qq.com
*业务请在@/extension/hr/deptship/HR_DeptShip.jsx或HR_DeptShip.vue文件编写
*新版本支持vue或.jsx]文件编写业务,文档见:https://v3.volcore.xyz/docs/view-gridhttps://v3.volcore.xyz/docs/web
-->
<template>
<view-grid ref="grid"
:columns="columns"
:detail="detail"
:details="details"
:editFormFields="editFormFields"
:editFormOptions="editFormOptions"
:searchFormFields="searchFormFields"
:searchFormOptions="searchFormOptions"
:table="table"
:extend="extend"
:onInit="onInit"
:onInited="onInited"
:searchBefore="searchBefore"
:searchAfter="searchAfter"
:addBefore="addBefore"
:updateBefore="updateBefore"
:rowClick="rowClick"
:modelOpenBefore="modelOpenBefore"
:modelOpenAfter="modelOpenAfter">
<!-- 自定义组件数据槽扩展更多数据槽slot见文档 -->
<template #gridHeader>
</template>
</view-grid>
</template>
<script setup lang="jsx">
import extend from "@/extension/hr/deptmanager/HR_YSDepartments.jsx";
import viewOptions from './HR_DeptManager/options.js'
import { ref, reactive, getCurrentInstance, watch, onMounted } from "vue";
const grid = ref(null);
const { proxy } = getCurrentInstance()
//httpproxy.http.post/get
const { table, editFormFields, editFormOptions, searchFormFields, searchFormOptions, columns, detail, details } = reactive(viewOptions())
let gridRef;//[.jsx]this.使
//
const onInit = async ($vm) => {
gridRef = $vm;
gridRef.paginationHide=true;
gridRef.lazy = false;
gridRef.rowKey = 'id';
gridRef.rowParentField = "parentid";
gridRef.defaultExpandAll=true;
//jsxthis.xx使this.xxgridRef.xx
//https://v3.volcore.xyz/docs/view-grid
}
//,
const onInited = async () => {
}
const searchBefore = async (param) => {
//,param.wheres
//false
return true;
}
const searchAfter = async (rows, result) => {
return true;
}
const addBefore = async (formData) => {
//formDataformData
return true;
}
const updateBefore = async (formData) => {
//formDataId
return true;
}
const rowClick = ({ row, column, event }) => {
//
// grid.value.toggleRowSelection(row); //;
}
const modelOpenBefore = async (row) => {//
return true;//false
}
const modelOpenAfter = (row) => {
//,,
}
//
//watch(() => editFormFields.,(newValue, oldValue) => { })
//
defineExpose({})
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,95 @@
// *Authorjxx
// *Contact283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
/*
{
"orgtype": 1,
"code": "LVH",
"sysid": "diwork",
"displayorder": 3,
"parentid": "",
"dr": 0,
"parentCode": null,
"parentorgid": null,
"enable": 1,
"is_biz_unit": 1,
"tenantid": "a5c83lrd",
"name": "LASERVALL CO., LIMITED",
"id": "1986541363558088707",
"pubts": "2025-05-23 23:44:19"
},
{
"orgtype": 2,
"code": "OIC2020401",
"sysid": "diwork",
"displayorder": 121,
"parentid": "2209177478763642895",
"dr": 0,
"parentCode": "OIC20204",
"parentorgid": "1986541449457434632",
"enable": 1,
"is_biz_unit": 0,
"tenantid": "a5c83lrd",
"name": "LVC 苏州机械设计部",
"id": "2209177530291191823",
"pubts": "2025-08-27 23:05:41"
},
*/
export default function(){
const table = {
key: 'code',
footer: "Foots",
cnName: 'YSERP部门信息',
name: 'HR_YSDepartments',
url: "/HR_YSDepartments/",
sortName: "displayorder"
};
const tableName = table.name;
const tableCNName = table.cnName;
const newTabEdit = false;
const key = table.key;
const editFormFields = {
"code": "",
"name": "",
"orgtype": "",
"is_biz_unit": "",
"enable": "",
"displayorder": "",
"pubts": ""
};
const editFormOptions = [
[{ "title": "部门编码", "field": "code", "disabled": true, "type": "text" }],
[{ "title": "部门名称", "field": "name", "disabled": true, "type": "text" }],
[{ "title": "是否启用", "field": "enable", "disabled": true, "type": "switch" }],
[{ "title": "显示顺序", "field": "displayorder", "disabled": true, "type": "number" }],
[{ "title": "修改时间", "field": "pubts", "disabled": true, "type": "datetime" }]
];
const searchFormFields = {};
const searchFormOptions = [];
const columns = [
{field:'code',title:'部门编码',type:'string',link:true,width:120,readonly:true,require:true,align:'left',sort:true},
{field:'name',title:'部门名称',type:'string',width:200,readonly:true,require:true,align:'left'},
{field:'enable',title:'是否启用',type:'switch',width:120,readonly:true,align:'left'},
{field:'displayorder',title:'显示顺序',type:'int',width:120,readonly:true,align:'left',sort:true},
{field:'pubts',title:'修改时间',type:'datetime',width:180,readonly:true,align:'left'}
];
const detail ={columns:[]};
const details = [];
return {
table,
key,
tableName,
tableCNName,
newTabEdit,
editFormFields,
editFormOptions,
searchFormFields,
searchFormOptions,
columns,
detail,
details
};
}

View File

@ -0,0 +1,83 @@
<!--
*Authorjxx
*Contact283591387@qq.com
*业务请在@/extension/hr/deptship/HR_DeptShip.jsx或HR_DeptShip.vue文件编写
*新版本支持vue或.jsx]文件编写业务,文档见:https://v3.volcore.xyz/docs/view-gridhttps://v3.volcore.xyz/docs/web
-->
<template>
<view-grid ref="grid"
:columns="columns"
:detail="detail"
:details="details"
:editFormFields="editFormFields"
:editFormOptions="editFormOptions"
:searchFormFields="searchFormFields"
:searchFormOptions="searchFormOptions"
:table="table"
:extend="extend"
:onInit="onInit"
:onInited="onInited"
:searchBefore="searchBefore"
:searchAfter="searchAfter"
:addBefore="addBefore"
:updateBefore="updateBefore"
:rowClick="rowClick"
:modelOpenBefore="modelOpenBefore"
:modelOpenAfter="modelOpenAfter">
<!-- 自定义组件数据槽扩展更多数据槽slot见文档 -->
<template #gridHeader>
</template>
</view-grid>
</template>
<script setup lang="jsx">
import extend from "@/extension/hr/deptship/HR_DeptShip.jsx";
import viewOptions from './HR_DeptShip/options.js'
import { ref, reactive, getCurrentInstance, watch, onMounted } from "vue";
const grid = ref(null);
const { proxy } = getCurrentInstance()
//httpproxy.http.post/get
const { table, editFormFields, editFormOptions, searchFormFields, searchFormOptions, columns, detail, details } = reactive(viewOptions())
let gridRef;//[.jsx]this.使
//
const onInit = async ($vm) => {
gridRef = $vm;
//jsxthis.xx使this.xxgridRef.xx
//https://v3.volcore.xyz/docs/view-grid
}
//,
const onInited = async () => {
}
const searchBefore = async (param) => {
//,param.wheres
//false
return true;
}
const searchAfter = async (rows, result) => {
return true;
}
const addBefore = async (formData) => {
//formDataformData
return true;
}
const updateBefore = async (formData) => {
//formDataId
return true;
}
const rowClick = ({ row, column, event }) => {
//
// grid.value.toggleRowSelection(row); //;
}
const modelOpenBefore = async (row) => {//
return true;//false
}
const modelOpenAfter = (row) => {
//,,
}
//
//watch(() => editFormFields.,(newValue, oldValue) => { })
//
defineExpose({})
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,46 @@
// *Authorjxx
// *Contact283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
const table = {
key: 'ShipId',
footer: "Foots",
cnName: '跨系统部门关联',
name: 'HR_DeptShip',
url: "/HR_DeptShip/",
sortName: "ShipId"
};
const tableName = table.name;
const tableCNName = table.cnName;
const newTabEdit = false;
const key = table.key;
const editFormFields = {"YSDeptId":"","YSDeptName":"","DingTalkDeptId":"","DingTalkDeptName":""};
const editFormOptions = [[{"title":"YSERP部门ID","required":true,"field":"YSDeptId","type":"text"},
{"title":"YS部门名称","required":true,"field":"YSDeptName","type":"text"}],
[{"title":"钉钉部门ID","required":true,"field":"DingTalkDeptId","type":"text"},
{"title":"钉钉部门名称","required":true,"field":"DingTalkDeptName","type":"text"}]];
const searchFormFields = {};
const searchFormOptions = [];
const columns = [{field:'ShipId',title:'关联关系ID',type:'int',link:true,width:110,hidden:true,readonly:true,require:true,align:'left'},
{field:'YSDeptId',title:'YSERP部门ID',type:'string',width:60,require:true,align:'left',sort:true},
{field:'YSDeptName',title:'YS部门名称',type:'string',width:60,require:true,align:'left'},
{field:'DingTalkDeptId',title:'钉钉部门ID',type:'string',width:60,require:true,align:'left'},
{field:'DingTalkDeptName',title:'钉钉部门名称',type:'string',width:60,require:true,align:'left'}];
const detail ={columns:[]};
const details = [];
return {
table,
key,
tableName,
tableCNName,
newTabEdit,
editFormFields,
editFormOptions,
searchFormFields,
searchFormOptions,
columns,
detail,
details
};
}

View File

@ -0,0 +1,83 @@
<!--
*Authorjxx
*Contact283591387@qq.com
*业务请在@/extension/hr/deptsync/HR_DeptSync.jsx或HR_DeptSync.vue文件编写
*新版本支持vue或.jsx]文件编写业务,文档见:https://v3.volcore.xyz/docs/view-gridhttps://v3.volcore.xyz/docs/web
-->
<template>
<view-grid ref="grid"
:columns="columns"
:detail="detail"
:details="details"
:editFormFields="editFormFields"
:editFormOptions="editFormOptions"
:searchFormFields="searchFormFields"
:searchFormOptions="searchFormOptions"
:table="table"
:extend="extend"
:onInit="onInit"
:onInited="onInited"
:searchBefore="searchBefore"
:searchAfter="searchAfter"
:addBefore="addBefore"
:updateBefore="updateBefore"
:rowClick="rowClick"
:modelOpenBefore="modelOpenBefore"
:modelOpenAfter="modelOpenAfter">
<!-- 自定义组件数据槽扩展更多数据槽slot见文档 -->
<template #gridHeader>
</template>
</view-grid>
</template>
<script setup lang="jsx">
import extend from "@/extension/hr/deptsync/HR_DeptSync.jsx";
import viewOptions from './HR_DeptSync/options.js'
import { ref, reactive, getCurrentInstance, watch, onMounted } from "vue";
const grid = ref(null);
const { proxy } = getCurrentInstance()
//httpproxy.http.post/get
const { table, editFormFields, editFormOptions, searchFormFields, searchFormOptions, columns, detail, details } = reactive(viewOptions())
let gridRef;//[.jsx]this.使
//
const onInit = async ($vm) => {
gridRef = $vm;
//jsxthis.xx使this.xxgridRef.xx
//https://v3.volcore.xyz/docs/view-grid
}
//,
const onInited = async () => {
}
const searchBefore = async (param) => {
//,param.wheres
//false
return true;
}
const searchAfter = async (rows, result) => {
return true;
}
const addBefore = async (formData) => {
//formDataformData
return true;
}
const updateBefore = async (formData) => {
//formDataId
return true;
}
const rowClick = ({ row, column, event }) => {
//
// grid.value.toggleRowSelection(row); //;
}
const modelOpenBefore = async (row) => {//
return true;//false
}
const modelOpenAfter = (row) => {
//,,
}
//
//watch(() => editFormFields.,(newValue, oldValue) => { })
//
defineExpose({})
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,43 @@
// *Authorjxx
// *Contact283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
const table = {
key: 'DeptSyncId',
footer: "Foots",
cnName: '部门信息同步',
name: 'HR_DeptSync',
url: "/HR_DeptSync/",
sortName: "DeptSyncId"
};
const tableName = table.name;
const tableCNName = table.cnName;
const newTabEdit = false;
const key = table.key;
const editFormFields = {};
const editFormOptions = [];
const searchFormFields = {};
const searchFormOptions = [];
const columns = [{field:'DeptSyncId',title:'同步ID',type:'int',link:true,sort:true,width:120,hidden:true,readonly:true,require:true,align:'left'},
{field:'YSDeptId',title:'YS部门ID',type:'string',width:120,align:'left',sort:true},
{field:'YSDeptName',title:'YS部门名称',type:'string',width:120,align:'left'},
{field:'DingTalkDeptId',title:'钉钉部门ID',type:'string',width:120,align:'left'},
{field:'DingTalkDeptName',title:'钉钉部门名称',type:'string',width:120,align:'left'}];
const detail ={columns:[]};
const details = [];
return {
table,
key,
tableName,
tableCNName,
newTabEdit,
editFormFields,
editFormOptions,
searchFormFields,
searchFormOptions,
columns,
detail,
details
};
}

View File

@ -0,0 +1,85 @@
<!--
*Authorjxx
*Contact283591387@qq.com
*业务请在@/extension/hr/employeesync/HR_EmployeeSync.jsx或HR_EmployeeSync.vue文件编写
*新版本支持vue或.jsx]文件编写业务,文档见:https://v3.volcore.xyz/docs/view-gridhttps://v3.volcore.xyz/docs/web
-->
<template>
<view-grid ref="grid"
:columns="columns"
:detail="detail"
:details="details"
:editFormFields="editFormFields"
:editFormOptions="editFormOptions"
:searchFormFields="searchFormFields"
:searchFormOptions="searchFormOptions"
:table="table"
:extend="extend"
:onInit="onInit"
:onInited="onInited"
:searchBefore="searchBefore"
:searchAfter="searchAfter"
:addBefore="addBefore"
:updateBefore="updateBefore"
:rowClick="rowClick"
:modelOpenBefore="modelOpenBefore"
:modelOpenAfter="modelOpenAfter">
<!-- 自定义组件数据槽扩展更多数据槽slot见文档 -->
<template #gridHeader>
</template>
</view-grid>
</template>
<script setup lang="jsx">
import extend from "@/extension/hr/dingtalkemployees/HR_DingTalkEmployees.jsx";
import viewOptions from './HR_DingTalkEmployees/options.js'
import { ref, reactive, getCurrentInstance, watch, onMounted } from "vue";
const grid = ref(null);
const { proxy } = getCurrentInstance()
//httpproxy.http.post/get
const { table, editFormFields, editFormOptions, searchFormFields, searchFormOptions, columns, detail, details } = reactive(viewOptions())
let gridRef;//[.jsx]this.使
//
const onInit = async ($vm) => {
gridRef = $vm;
gridRef.paginationHide=true;
//jsxthis.xx使this.xxgridRef.xx
//https://v3.volcore.xyz/docs/view-grid
}
//,
const onInited = async () => {
}
const searchBefore = async (param) => {
//,param.wheres
//false
return true;
}
const searchAfter = async (rows, result) => {
return true;
}
const addBefore = async (formData) => {
//formDataformData
return true;
}
const updateBefore = async (formData) => {
//formDataId
return true;
}
const rowClick = ({ row, column, event }) => {
//
// grid.value.toggleRowSelection(row); //;
}
const modelOpenBefore = async (row) => {//
return true;//false
}
const modelOpenAfter = (row) => {
//,,
}
//
//watch(() => editFormFields.,(newValue, oldValue) => { })
//
defineExpose({})
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,65 @@
// *Authorjxx
// *Contact283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function () {
const table = {
key: 'mobile',
footer: "Foots",
cnName: '钉钉员工信息',
name: 'HR_DingTalkEmployees',
url: "/HR_DingTalkEmployees/",
sortName: "mobile"
};
const tableName = table.name;
const tableCNName = table.cnName;
const newTabEdit = false;
const key = table.key;
const editFormFields = {
"jobnumber": "",
"name": "",
"position": "",
"reportManager": "",
"mobile": "",
"email": "",
"dept": "",
};
const editFormOptions = [
[{ "title": "员工工号", "field": "jobNumber", "disabled": true, "type": "text" }],
[{ "title": "所属部门", "field": "dept", "disabled": true, "type": "text" }],
// [{ "title": "所属公司", "field": "org_id_name", "disabled": true, "type": "text" }],
[{ "title": "手机号", "field": "mobile", "disabled": true, "type": "text" }],
[{ "title": "员工姓名", "field": "name", "disabled": true, "type": "text" }],
[{ "title": "邮箱", "field": "email", "disabled": true, "type": "text" }],
[{ "title": "直系主管", "field": "reportManager", "disabled": true, "type": "text" }],
[{ "title": "职位", "field": "position", "disabled": true, "type": "text" }],
];
const searchFormFields = {};
const searchFormOptions = [];
const columns = [
{ field: 'jobNumber', title: '员工工号', type: 'string', width: 120, readonly: true, align: 'left', sort: true },
{ field: 'dept', title: '所属部门', type: 'string', width: 120, readonly: true, align: 'left' },
// { field: 'org_id_name', title: '所属公司', type: 'string', width: 120, readonly: true, align: 'left' },
{ field: 'mobile', title: '手机号', type: 'string', link: true, width: 120, readonly: true, align: 'left' },
{ field: 'name', title: '员工姓名', type: 'string', width: 120, readonly: true, align: 'left' },
{ field: 'email', title: '邮箱', type: 'string', width: 120, readonly: true, align: 'left' },
{ field: 'position', title: '职位', type: 'string', width: 120, readonly: true, align: 'left' },
{ field: 'reportManager', title: '直系主管', type: 'string', width: 120, readonly: true, align: 'left' },
];
const detail = { columns: [] };
const details = [];
return {
table,
key,
tableName,
tableCNName,
newTabEdit,
editFormFields,
editFormOptions,
searchFormFields,
searchFormOptions,
columns,
detail,
details
};
}

View File

@ -0,0 +1,85 @@
<!--
*Authorjxx
*Contact283591387@qq.com
*业务请在@/extension/hr/employeesync/HR_EmployeeSync.jsx或HR_EmployeeSync.vue文件编写
*新版本支持vue或.jsx]文件编写业务,文档见:https://v3.volcore.xyz/docs/view-gridhttps://v3.volcore.xyz/docs/web
-->
<template>
<view-grid ref="grid"
:columns="columns"
:detail="detail"
:details="details"
:editFormFields="editFormFields"
:editFormOptions="editFormOptions"
:searchFormFields="searchFormFields"
:searchFormOptions="searchFormOptions"
:table="table"
:extend="extend"
:onInit="onInit"
:onInited="onInited"
:searchBefore="searchBefore"
:searchAfter="searchAfter"
:addBefore="addBefore"
:updateBefore="updateBefore"
:rowClick="rowClick"
:modelOpenBefore="modelOpenBefore"
:modelOpenAfter="modelOpenAfter">
<!-- 自定义组件数据槽扩展更多数据槽slot见文档 -->
<template #gridHeader>
</template>
</view-grid>
</template>
<script setup lang="jsx">
import extend from "@/extension/hr/ysemployees/HR_YSEmployees.jsx";
import viewOptions from './HR_YSEmployees/options.js'
import { ref, reactive, getCurrentInstance, watch, onMounted } from "vue";
const grid = ref(null);
const { proxy } = getCurrentInstance()
//httpproxy.http.post/get
const { table, editFormFields, editFormOptions, searchFormFields, searchFormOptions, columns, detail, details } = reactive(viewOptions())
let gridRef;//[.jsx]this.使
//
const onInit = async ($vm) => {
gridRef = $vm;
gridRef.paginationHide=true;
//jsxthis.xx使this.xxgridRef.xx
//https://v3.volcore.xyz/docs/view-grid
}
//,
const onInited = async () => {
}
const searchBefore = async (param) => {
//,param.wheres
//false
return true;
}
const searchAfter = async (rows, result) => {
return true;
}
const addBefore = async (formData) => {
//formDataformData
return true;
}
const updateBefore = async (formData) => {
//formDataId
return true;
}
const rowClick = ({ row, column, event }) => {
//
// grid.value.toggleRowSelection(row); //;
}
const modelOpenBefore = async (row) => {//
return true;//false
}
const modelOpenAfter = (row) => {
//,,
}
//
//watch(() => editFormFields.,(newValue, oldValue) => { })
//
defineExpose({})
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,59 @@
// *Authorjxx
// *Contact283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function () {
const table = {
key: 'code',
footer: "Foots",
cnName: 'YS员工信息',
name: 'HR_YSEmployees',
url: "/HR_YSEmployees/",
sortName: "code"
};
const tableName = table.name;
const tableCNName = table.cnName;
const newTabEdit = false;
const key = table.key;
const editFormFields = {
"code": "",
"dept_id_name": "",
"org_id_name": "",
"mobile": "",
"name": "",
"email": "",
};
const editFormOptions = [
[{ "title": "员工工号", "field": "code", "disabled": true, "type": "text" }],
[{ "title": "所属部门", "field": "dept_id_name", "disabled": true, "type": "text" }],
[{ "title": "所属公司", "field": "org_id_name", "disabled": true, "type": "text" }],
[{ "title": "手机号", "field": "mobile", "disabled": true, "type": "text" }],
[{ "title": "员工姓名", "field": "name", "disabled": true, "type": "text" }],
[{ "title": "邮箱", "field": "email", "disabled": true, "type": "text" }]
];
const searchFormFields = {};
const searchFormOptions = [];
const columns = [
{ field: 'code', title: '员工工号', type: 'string', link: true, width: 120, readonly: true, align: 'left', sort: true },
{ field: 'dept_id_name', title: '所属部门', type: 'string', width: 120, readonly: true, align: 'left' },
{ field: 'org_id_name', title: '所属公司', type: 'string', width: 120, readonly: true, align: 'left' },
{ field: 'mobile', title: '手机号', type: 'string', width: 120, readonly: true, align: 'left' },
{ field: 'name', title: '员工姓名', type: 'string', width: 120, readonly: true, align: 'left' },
{ field: 'email', title: '邮箱', type: 'string', width: 120, readonly: true, align: 'left' }];
const detail = { columns: [] };
const details = [];
return {
table,
key,
tableName,
tableCNName,
newTabEdit,
editFormFields,
editFormOptions,
searchFormFields,
searchFormOptions,
columns,
detail,
details
};
}

View File

@ -76,6 +76,7 @@ export default defineConfig({
},
server: {
port: 9990,
timeout: 1000 * 60 * 10,
//配置代理
// proxy: {//http.js里设置为空axios.defaults.baseURL = "";
// '/api': {