From 1e8ce541e79740c514b0892af8f67c26b98ce6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E6=99=B6=E5=9C=9F=E8=B1=86?= <水晶土豆@devide> Date: Mon, 20 Nov 2023 20:11:00 +0800 Subject: [PATCH] Mon Nov 20 20:11:00 CST 2023 inscode --- src/api/api.ts | 6 ++-- src/api/path.ts | 4 ++- src/component/humanResources/jobTitle.vue | 44 ++++++++++------------- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/api/api.ts b/src/api/api.ts index 893cd92..48cfc61 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 c6ead52..8457c22 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 ef6a262..403b154 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 }) => { - + - + -- GitLab