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

Mon Nov 20 20:11:00 CST 2023 inscode

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