diff --git a/src/api/api.ts b/src/api/api.ts index 893cd92d3dee12e8138ac8ab768890b8c87a3c97..48cfc6136151928146c5b6a0f855cc1bd502f6d8 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,6 +1,6 @@ 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>{ return request.get(HUMAN_RESOURCES_DEPARTMENT, {}); } -// export function \ No newline at end of file +export function getJobTiTle() : Promise>{ + return request.get(JOB_TITLE,{}); +} \ No newline at end of file diff --git a/src/api/path.ts b/src/api/path.ts index c6ead521d251cbfc62be89d362c35326150d4769..8457c227b0f36ca461b9897afe0088be3afb7c49 100644 --- a/src/api/path.ts +++ b/src/api/path.ts @@ -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 diff --git a/src/component/humanResources/jobTitle.vue b/src/component/humanResources/jobTitle.vue index ef6a2629fffe1ed87146fa09d9aace4b5e7d6da2..403b15471fe56602fc819b8c92567f9a389488b6 100644 --- a/src/component/humanResources/jobTitle.vue +++ b/src/component/humanResources/jobTitle.vue @@ -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 }) => { - + - +