员工信息-服务指令改版:员工标签改为分类标签
This commit is contained in:
parent
c474c4ef63
commit
a2f4c291db
|
|
@ -32,6 +32,8 @@ enum Api {
|
|||
frozenBatch = '/sys/user/frozenBatch',
|
||||
|
||||
forceLogoutByUsername = '/sys/online/forceLogoutByUsername',
|
||||
|
||||
flbqList = '/services/instructionTag/list',
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -50,6 +52,7 @@ export const getImportUrl = Api.importExcel;
|
|||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
export const flbqList = (params) => defHttp.get({ url: Api.flbqList, params });
|
||||
export const qyList = (params) => defHttp.get({ url: Api.qyList, params });
|
||||
export const getEmployeesServiceTags = (params) => defHttp.get({ url: Api.getEmployeesServiceTags, params });
|
||||
export const getEmployeesList = (params) => defHttp.get({ url: Api.getEmployeesList, params });
|
||||
|
|
|
|||
|
|
@ -264,18 +264,22 @@ export const superQuerySchema = {
|
|||
};
|
||||
|
||||
//列表数据
|
||||
export const serviceTagcolumns: BasicColumn[] = [
|
||||
export const flbqColums: BasicColumn[] = [
|
||||
{
|
||||
title: '指令标签名称',
|
||||
title: '分类标签',
|
||||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
width: '50%',
|
||||
dataIndex: 'instructionName',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
title: '是否启用',
|
||||
align: 'center',
|
||||
dataIndex: 'description',
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
},
|
||||
// {
|
||||
// title: '备注',
|
||||
// align: 'center',
|
||||
// dataIndex: 'description',
|
||||
// },
|
||||
];
|
||||
|
||||
//列表数据
|
||||
|
|
@ -295,7 +299,7 @@ export const employeesTagcolumns: BasicColumn[] = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: '标签/指令名称',
|
||||
title: '分类标签/指令名称',
|
||||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<div
|
||||
style="height: 100%; display: flex; flex-direction: column; border-radius: 14px; background-color: white; overflow: hidden; padding: 14px;">
|
||||
<a-tabs v-model:activeKey="activeTabKey" style="height: 100%;">
|
||||
<a-tab-pane key="ygbq" tab="员工标签" style="height: 100%;">
|
||||
<a-tab-pane key="flbq" tab="分类标签" style="height: 100%;">
|
||||
<div style="height: 100%; display: flex; flex-direction: column;">
|
||||
<BasicTable @register="registerTable" :scroll="{ y: '59vh' }">
|
||||
<template #action="{ record }">
|
||||
|
|
@ -120,8 +120,8 @@ import { ref, reactive, nextTick } from 'vue';
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import { serviceTagcolumns, employeesTagcolumns, fwzlColumns } from '../BizEmployeesInfo.data';
|
||||
import { getEmployeesList, queryTagsById, checkTags, removeTags, getEmployeesServiceTags, fwzlList, addBatch, fwzlQueryById } from '../BizEmployeesInfo.api';
|
||||
import { flbqColums, employeesTagcolumns, fwzlColumns } from '../BizEmployeesInfo.data';
|
||||
import { getEmployeesList, flbqList, queryTagsById, checkTags, removeTags, getEmployeesServiceTags, fwzlList, addBatch, fwzlQueryById } from '../BizEmployeesInfo.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import EmpServiceTagDetailForm from './EmpServiceTagDetailForm.vue'
|
||||
|
|
@ -138,8 +138,7 @@ const fuzlQueryParam = reactive<any>({});
|
|||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const userStore = useUserStore();
|
||||
|
||||
// 控制当前激活的 tab
|
||||
const activeTabKey = ref('ygbq'); // 默认员工标签
|
||||
const activeTabKey = ref('flbq'); // 默认分类标签
|
||||
|
||||
const rowA = ref<number>(24);
|
||||
const rowB = ref<number>(0);
|
||||
|
|
@ -157,9 +156,9 @@ const [registerModal, { openModal }] = useModal();
|
|||
//注册table数据 - 员工标签表格
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '员工配置的指令标签',
|
||||
api: getEmployeesList,
|
||||
columns: serviceTagcolumns,
|
||||
title: '',
|
||||
api: flbqList,
|
||||
columns: flbqColums,
|
||||
canResize: false,
|
||||
immediate: false,
|
||||
showIndexColumn: true,
|
||||
|
|
@ -210,7 +209,7 @@ const [fwzlRegisterTable, { reload: fwzlReload }] = fwzlTableContext
|
|||
* 选择
|
||||
*/
|
||||
async function handleXuanze(record) {
|
||||
employeesDataSource.value.unshift({ employeesId: employeesInfo.value.id, employeesTagsId: record.id, type: 'bq', tagName: record.tagName })
|
||||
employeesDataSource.value.unshift({ employeesId: employeesInfo.value.id, employeesTagsId: record.id, type: 'bq', tagName: record.instructionName })
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -231,13 +230,14 @@ async function handleYichu(record) {
|
|||
* 员工选择指令标签后的详情
|
||||
*/
|
||||
function handleEmlDetail(record) {
|
||||
console.log("🌊 ~ handleEmlDetail ~ record:", record)
|
||||
showTagDetail.value = true
|
||||
rowA.value = 18;
|
||||
rowB.value = 6;
|
||||
tagsDetailData.value = []
|
||||
visible.value = true
|
||||
queryTagsById({ id: record.employeesTagsId }).then(item => {
|
||||
tagsDetailData.value = item.directives;
|
||||
fwzlList({ instructionTagId: record.employeesTagsId, pageSize: -1 }).then(item => {
|
||||
tagsDetailData.value = item.records;
|
||||
nextTick(() => {
|
||||
registerForm.value.showDetail(tagsDetailData.value)
|
||||
});
|
||||
|
|
@ -253,8 +253,8 @@ function handleDetail(record) {
|
|||
rowB.value = 6;
|
||||
tagsDetailData.value = []
|
||||
visible.value = true
|
||||
queryTagsById({ id: record.id }).then(item => {
|
||||
tagsDetailData.value = item.directives;
|
||||
fwzlList({ instructionTagId: record.id, pageSize: -1 }).then(item => {
|
||||
tagsDetailData.value = item.records;
|
||||
nextTick(() => {
|
||||
registerForm.value.showDetail(tagsDetailData.value)
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue