提交 1e8ce541 编写于 作者: 水晶土豆

Mon Nov 20 20:11:00 CST 2023 inscode

上级 4190a3e0
import request from "./index";
import type { IParams } from './index';
import { CONTRACT_CATEGORY, CONTRACT_LIST, CONTRACT_LIST_Type, DEPT_MENU, HUMAN_RESOURCES_DEPARTMENT, LOGIN, TABLE_ANNOUNCEMENT } from "./path";
import { CONTRACT_CATEGORY, CONTRACT_LIST, CONTRACT_LIST_Type, DEPT_MENU, HUMAN_RESOURCES_DEPARTMENT, JOB_TITLE, LOGIN, TABLE_ANNOUNCEMENT } from "./path";
import type { AxiosResponse } from "axios";
......@@ -51,4 +51,6 @@ export function getHumanResourcesDepartment(): Promise<AxiosResponse<any>>{
return request.get(HUMAN_RESOURCES_DEPARTMENT, {});
}
// export function
\ No newline at end of file
export function getJobTiTle() : Promise<AxiosResponse<any>>{
return request.get(JOB_TITLE,{});
}
\ No newline at end of file
......@@ -11,4 +11,6 @@ export const CONTRACT_CATEGORY = baseURL + "/contract/category";
export const CONTRACT_LIST = baseURL + "/contract/list";
export const CONTRACT_LIST_Type = CONTRACT_LIST + '/Type';
export const HUMAN_RESOURCES_DEPARTMENT = baseURL + '/humanResources/department';
\ No newline at end of file
export const HUMAN_RESOURCES_DEPARTMENT = baseURL + '/humanResources/department';
export const JOB_TITLE = baseURL + '/job/title';
\ No newline at end of file
......@@ -6,7 +6,7 @@ import buttoner from '@/component/main/header/add_download/button.vue';
import downloadItem from '@/component/main/header/add_download/downloadItem.vue';
import ejectDialog from '@/component/main/ejectDialog.vue';
import { ref, provide, onMounted } from 'vue';
import { getHumanResourcesDepartment } from '@/api/api';
import { getJobTiTle } from '@/api/api';
import { FlatToTree } from '@/util/toTree';
import { deepClone } from '@/util/deepCode';
import { computed } from '@vue/reactivity';
......@@ -15,9 +15,9 @@ let tableData = ref([
])
let respData = ref();
const getData = () => {
getHumanResourcesDepartment().then((res)=>{
getJobTiTle().then((res)=>{
respData.value = res.data.data.data;
tableData.value = FlatToTree(deepClone(res.data.data.data)).tree;
tableData.value = respData.value;
})
}
onMounted(async () => {
......@@ -33,37 +33,30 @@ let tableType = ref([
align: "center"
},
{
name: '上级ID',
type: "parentID",
width: "80px",
name: '岗位名称',
type: "jobTitle",
width: "150px",
isSort: false,
align: "left"
align: "center"
},
{
name: '部门名称',
type: "departmentName",
name: '权限角色',
type: "permissionRole",
width: "auto",
isSort: false,
align: "center"
},
{
name: "排序",
type: "sort",
width: "100px",
isSort: true,
align: "center"
},
{
name: '部门负责人',
type: "departmentHead",
width: "100px",
name: "备注",
type: "remarks",
width: "300px",
isSort: false,
align: "center"
align: "left"
},
{
name: '部门电话',
type: "departmentPhone",
width: "200px",
name: '岗位工时单价(元)',
type: "hourlyUnitPrice",
width: "150px",
isSort: false,
align: "center"
},
......@@ -71,6 +64,7 @@ let tableType = ref([
name: '状态',
type: 'state',
width: '120px',
isReadOnly:true
}
]
);
......@@ -148,11 +142,11 @@ provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
<downloadItem></downloadItem>
</addDownload>
</headers>
<ejectDialog v-model:openDialog="addDialog">
<ejectDialog v-model:openDialog="addDialog" >
<template #header>添加岗位</template>
<el-input v-model="addDept"></el-input>
</ejectDialog>
<ejectDialog v-model:openDialog="addSubcategoriesDialog">
<ejectDialog v-model:openDialog="detailsDialog">
<template #header>详情</template>
<el-input v-model="addSubDept"></el-input>
</ejectDialog>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册