mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
培训发生组织基本联调完毕
This commit is contained in:
@@ -57,3 +57,7 @@ export const getSelectOrg = (id) => http.get(`/admin/affiliation/getSelectOrg?id
|
|||||||
export const getUnSelectOrg = () => http.get(`/admin/affiliation/getUnSelectOrg`)
|
export const getUnSelectOrg = () => http.get(`/admin/affiliation/getUnSelectOrg`)
|
||||||
//获取培训发生组织编号
|
//获取培训发生组织编号
|
||||||
export const getAffiliationCode = () => http.get('/admin/affiliation/getAffiliationCode')
|
export const getAffiliationCode = () => http.get('/admin/affiliation/getAffiliationCode')
|
||||||
|
//查看或编辑回显培训发生组织
|
||||||
|
export const getAffiliationById = (id) => http.get(`/admin/affiliation/queryById?id=${id}`)
|
||||||
|
//删除培训发生组织
|
||||||
|
export const affiliationDelById = (id)=>http.post(`/admin/affiliation/delById?id=${id}`)
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
v-for="(item, index) in treeAddData"
|
v-for="(item, index) in treeAddData"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div class="tag_text" :title="`${item?.name} - (原:${item?.orgName || '-'})`">{{ item?.name }} - (原:{{ item?.orgName || '-' }})</div>
|
<div class="tag_text" :title="`${item?.orgName} - (原:${item?.updateName || '-'})`">{{ item?.orgName }} - (原:{{ item?.updateName || '-' }})</div>
|
||||||
<div @click="deleteTree(item)" class="tag_delete">+</div>
|
<div @click="deleteTree(item)" class="tag_delete">+</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -104,7 +104,7 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
|||||||
}else{
|
}else{
|
||||||
console.log(props.AddContentList,'xixiixix')
|
console.log(props.AddContentList,'xixiixix')
|
||||||
treeAddData.value = props?.AddContentList
|
treeAddData.value = props?.AddContentList
|
||||||
checkedKeys.value = props?.AddContentList?.map(item=>item.id)
|
checkedKeys.value = props?.AddContentList?.map(item=>item.orgId)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const onCheck = (checkedKeys, {checked: bool, checkedNodes, node, event}) => {
|
const onCheck = (checkedKeys, {checked: bool, checkedNodes, node, event}) => {
|
||||||
@@ -119,15 +119,24 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
checkedNodes = checkedNodes.map(item=>{
|
||||||
|
return {
|
||||||
|
orgId: item.id,
|
||||||
|
orgName: item.name,
|
||||||
|
affiliationId: item.id,
|
||||||
|
...item
|
||||||
|
}
|
||||||
|
})
|
||||||
treeAddData.value = checkedNodes;
|
treeAddData.value = checkedNodes;
|
||||||
|
console.log(treeAddData.value,'checkedNodes')
|
||||||
}
|
}
|
||||||
const clearTree = () => {
|
const clearTree = () => {
|
||||||
treeAddData.value = [];
|
treeAddData.value = [];
|
||||||
checkedKeys.value = [];
|
checkedKeys.value = [];
|
||||||
}
|
}
|
||||||
const deleteTree = (item) => {
|
const deleteTree = (item) => {
|
||||||
treeAddData.value = treeAddData.value.filter(node => node.id !== item.id);
|
treeAddData.value = treeAddData.value.filter(node => node.orgId !== item.orgId);
|
||||||
checkedKeys.value = treeAddData.value.map(item=>item.id)
|
checkedKeys.value = treeAddData.value.map(item=>item.orgId)
|
||||||
}
|
}
|
||||||
const closeCodeModal = () => {
|
const closeCodeModal = () => {
|
||||||
emit("update:showContent", false);
|
emit("update:showContent", false);
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ onMounted(()=>{
|
|||||||
managerArray.value = props.arrayList
|
managerArray.value = props.arrayList
|
||||||
options.value = props.arrayList
|
options.value = props.arrayList
|
||||||
})
|
})
|
||||||
|
watch(()=>props.arrayList, ()=>{
|
||||||
|
managerArray.value = props.arrayList
|
||||||
|
})
|
||||||
const options = ref([])
|
const options = ref([])
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
getUserList(keyword.value).then(res=>{
|
getUserList(keyword.value).then(res=>{
|
||||||
|
|||||||
251
src/components/project/lockLecturer.vue
Normal file
251
src/components/project/lockLecturer.vue
Normal file
@@ -0,0 +1,251 @@
|
|||||||
|
<template>
|
||||||
|
<div @click="openDrawer">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
<a-drawer
|
||||||
|
:visible="visible"
|
||||||
|
class="drawerStyle impotergroupleader"
|
||||||
|
placement="right"
|
||||||
|
width="80%"
|
||||||
|
>
|
||||||
|
<div class="drawerMain">
|
||||||
|
<div class="header">
|
||||||
|
<div class="headerTitle">{{ title }}</div>
|
||||||
|
<!-- <img
|
||||||
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
|
src="../../assets/images/basicinfo/close.png"
|
||||||
|
@click="closeDrawer"
|
||||||
|
/> -->
|
||||||
|
<a-button @click="closeDrawer" style="margin-right: 10px;" type="primary" class="btn1">返回</a-button>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="title">
|
||||||
|
<div class="line"></div>
|
||||||
|
<div class="text">培训发生组织基本信息</div>
|
||||||
|
</div>
|
||||||
|
<div class="desc">
|
||||||
|
<a-descriptions :column="2" bordered>
|
||||||
|
<a-descriptions-item label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="是否为根节点">{{formData?.isParent==1?'否':'是'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="组织担当">{{formData?.act||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="状态">
|
||||||
|
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
|
||||||
|
</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
</div>
|
||||||
|
<div class="tabs">
|
||||||
|
<a-tabs @change="change" v-model:activeKey="activeKey">
|
||||||
|
<a-tab-pane key="1" tab="管理组织列表">
|
||||||
|
<div style="margin-bottom: 30px">
|
||||||
|
<a-table :columns="columns" :data-source="formData?.tableData" />
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 100px">
|
||||||
|
<a-descriptions :column="2" bordered>
|
||||||
|
<a-descriptions-item label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="是否为根节点">{{formData?.isParent==1?'否':'是'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="组织担当">{{formData?.act||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="一级审批人">{{formData?.one||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="二级审批人">{{formData?.two||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="三级审批人">{{formData?.three||'-'}}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="状态">
|
||||||
|
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
|
||||||
|
</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
</div>
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="2" tab="审批记录" force-render>
|
||||||
|
<div>
|
||||||
|
<a-table :columns="columnsTwo" :data-source="formData?.tableDataTwo" />
|
||||||
|
</div>
|
||||||
|
</a-tab-pane>
|
||||||
|
</a-tabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="btnn">
|
||||||
|
<button class="btn2" @click="closeDrawer">取消</button>
|
||||||
|
<button class="btn2" @click="closeDrawer">确定</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineEmits, defineProps, ref,watch} from "vue";
|
||||||
|
import * as api from '@/api/Lecturer'
|
||||||
|
const props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
defalut: ""
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const emit = defineEmits({});
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: '组织的名称',
|
||||||
|
dataIndex: 'orgName',
|
||||||
|
key: 'orgName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
dataIndex: 'age',
|
||||||
|
key: 'age',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'address',
|
||||||
|
key: 'address',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const formData = ref({})
|
||||||
|
const columnsTwo = [
|
||||||
|
{
|
||||||
|
title: '层级审批人',
|
||||||
|
dataIndex: 'name',
|
||||||
|
key: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'age',
|
||||||
|
key: 'age',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '审批人',
|
||||||
|
dataIndex: 'address',
|
||||||
|
key: 'age',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '审批时间',
|
||||||
|
dataIndex: 'updateTime',
|
||||||
|
key: 'updateTime',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '审批建议',
|
||||||
|
dataIndex: 'address',
|
||||||
|
key: 'age',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const visible = ref(false);
|
||||||
|
watch(visible, (val)=>{
|
||||||
|
console.log(val,'val',props.id)
|
||||||
|
if(val){
|
||||||
|
api.getAffiliationById(props.id).then(res=>{
|
||||||
|
console.log(res,'resssss')
|
||||||
|
formData.value = res.data.data
|
||||||
|
formData.value.act = filterList(formData.value.affiliationUserList,0)
|
||||||
|
formData.value.one = filterList(formData.value.affiliationUserList,1)
|
||||||
|
formData.value.two = filterList(formData.value.affiliationUserList,2)
|
||||||
|
formData.value.three = filterList(formData.value.affiliationUserList,3)
|
||||||
|
formData.value.tableData = res.data.data.affiliationOrgList
|
||||||
|
formData.value.tableDataTwo = res.data.data.affiliationOrgList
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const filterList = (val,index) => {
|
||||||
|
return val?.filter(item=>item.type==index).map(item=>item.userName).join(',')
|
||||||
|
}
|
||||||
|
const closeDrawer = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const activeKey = ref("1");
|
||||||
|
const change = (val)=>{
|
||||||
|
console.log(val,'val')
|
||||||
|
}
|
||||||
|
function openDrawer() {
|
||||||
|
visible.value = true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.impotergroupleader > .ant-drawer-content-wrapper {
|
||||||
|
min-width: 800px !important;
|
||||||
|
width: 800px !important;
|
||||||
|
}
|
||||||
|
.impotergroupleader {
|
||||||
|
.drawerMain {
|
||||||
|
min-width: 600px;
|
||||||
|
margin: 0px 32px 0px 32px;
|
||||||
|
overflow-x: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
height: 73px;
|
||||||
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
// background-color: red;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
.headerTitle {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 25px;
|
||||||
|
// margin-left: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
padding-right: 20px;
|
||||||
|
.title{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.line{
|
||||||
|
width: 5px;
|
||||||
|
height: 15px;
|
||||||
|
background: #4ea6ff;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.desc{
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnn {
|
||||||
|
height: 72px;
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
background-color: #fff;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||||
|
|
||||||
|
.btn1 {
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid #4ea6ff;
|
||||||
|
border-radius: 8px;
|
||||||
|
color: #4ea6ff;
|
||||||
|
background-color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn2 {
|
||||||
|
cursor: pointer;
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
background: #4ea6ff;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 0;
|
||||||
|
margin-left: 15px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -22,11 +22,13 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<a-table style="border: 1px solid #f2f6fe" :columns="columns" :data-source="tableData" :loading="tableLoading"
|
<a-table style="border: 1px solid #f2f6fe" :columns="columns" :data-source="tableData" :loading="tableLoading"
|
||||||
@expand="expandTable" :pagination="false">
|
@expand="expandTable" :pagination="false">
|
||||||
<template #bodyCell="{ record, column }">
|
<template #bodyCell="{ record, column }">
|
||||||
<template v-if="column.key === 'operation'">
|
<template v-if="column.key === 'operation'">
|
||||||
<a-space >
|
<a-space >
|
||||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">查看</a-button>
|
<lockLecturer :id="record.id" :title="'培训发生组织详情'">
|
||||||
|
<div style="color: #1890ff;">查看</div>
|
||||||
|
</lockLecturer>
|
||||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||||
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
@@ -86,15 +88,15 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="培训发生组织编号:" name="trainOrgId">
|
<a-form-item label="培训发生组织编号:" name="affiliationCode">
|
||||||
<a-input disabled v-model:value="formParam.trainOrgId" class="draitem"
|
<a-input disabled v-model:value="formParam.affiliationCode" class="draitem"
|
||||||
placeholder="请输入讲师体系编号" allowClear showSearch>
|
placeholder="请输入讲师体系编号" allowClear showSearch>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="培训发生组织名称:" name="trainOrgName">
|
<a-form-item label="培训发生组织名称:" name="affiliationName">
|
||||||
<a-input v-model:value="formParam.trainOrgName" class="draitem"
|
<a-input v-model:value="formParam.affiliationName" class="draitem"
|
||||||
placeholder="请输入讲师体系名称" allowClear showSearch>
|
placeholder="请输入讲师体系名称" allowClear showSearch>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -126,14 +128,14 @@
|
|||||||
<a-form-item label="一级审批人" name="leveOneValue">
|
<a-form-item label="一级审批人" name="leveOneValue">
|
||||||
<!-- <a-select v-model:value="formParam.yjspr" placeholder="请选择一级审批人"
|
<!-- <a-select v-model:value="formParam.yjspr" placeholder="请选择一级审批人"
|
||||||
:options="PlaceOfPayList" allowClear showSearch/> -->
|
:options="PlaceOfPayList" allowClear showSearch/> -->
|
||||||
<ProjectManager :type="1" v-model:value="formParam.leveOneValue" :placeholder="'请选择担当'" v-model:arrayList="formParam.leveOneArray" ></ProjectManager>
|
<ProjectManager :type="1" v-model:value="formParam.leveOneValue" :placeholder="'请选择一级审批人'" v-model:arrayList="formParam.leveOneArray" ></ProjectManager>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="二级审批人">
|
<a-form-item label="二级审批人">
|
||||||
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择二级审批人"
|
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择二级审批人"
|
||||||
:options="PlaceOfPayList" allowClear showSearch/> -->
|
:options="PlaceOfPayList" allowClear showSearch/> -->
|
||||||
<ProjectManager :type="1" :placeholder="'请选择担当'" v-model:arrayList="formParam.leveTwoArray" ></ProjectManager>
|
<ProjectManager :type="1" :placeholder="'请选择二级审批人'" v-model:arrayList="formParam.leveTwoArray" ></ProjectManager>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -142,7 +144,7 @@
|
|||||||
<a-form-item label="三级审批人" >
|
<a-form-item label="三级审批人" >
|
||||||
<!-- <a-select v-model:value="formParam.sjspr" placeholder="请选择三级审批人"
|
<!-- <a-select v-model:value="formParam.sjspr" placeholder="请选择三级审批人"
|
||||||
:options="PlaceOfPayList" allowClear showSearch/> -->
|
:options="PlaceOfPayList" allowClear showSearch/> -->
|
||||||
<ProjectManager :type="1" :placeholder="'请选择担当'" v-model:arrayList="formParam.leveThreeArray" ></ProjectManager>
|
<ProjectManager :type="1" :placeholder="'请选择三级审批人'" v-model:arrayList="formParam.leveThreeArray" ></ProjectManager>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -194,7 +196,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
|
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
@@ -208,12 +209,14 @@ import ProjectManager from "@/components/project/ProjectManagerLecturer";
|
|||||||
import { queryTrainOrg,deleteTrainOrg,addReviewer,updateTrainOrg} from "../../api/organization";
|
import { queryTrainOrg,deleteTrainOrg,addReviewer,updateTrainOrg} from "../../api/organization";
|
||||||
import AddOrgContent from "../../components/project/AddOrgContent.vue"
|
import AddOrgContent from "../../components/project/AddOrgContent.vue"
|
||||||
import * as lecturer from "../../api/Lecturer.js";
|
import * as lecturer from "../../api/Lecturer.js";
|
||||||
|
import lockLecturer from "@/components/project/lockLecturer"
|
||||||
export default{
|
export default{
|
||||||
name:"organization",
|
name:"organization",
|
||||||
components: {
|
components: {
|
||||||
ProjectManager,
|
ProjectManager,
|
||||||
FolderAddOutlined,//图标--新增
|
FolderAddOutlined,//图标--新增
|
||||||
AddOrgContent
|
AddOrgContent,
|
||||||
|
lockLecturer
|
||||||
|
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
@@ -232,12 +235,10 @@ export default{
|
|||||||
pageSize: "10"
|
pageSize: "10"
|
||||||
},
|
},
|
||||||
formParam:{
|
formParam:{
|
||||||
trainOrgId:null,
|
affiliationCode:null,
|
||||||
trainOrgName:null,
|
affiliationName:null,
|
||||||
isParent: 1,
|
isParent: 1,
|
||||||
remark:null,
|
remark:null,
|
||||||
orgName: null,
|
|
||||||
orgId: null,
|
|
||||||
actValue: null,
|
actValue: null,
|
||||||
actArray: [],
|
actArray: [],
|
||||||
leveOneValue: null,
|
leveOneValue: null,
|
||||||
@@ -267,68 +268,82 @@ export default{
|
|||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
title: '培训发生组织编号 ',
|
title: '培训发生组织编号 ',
|
||||||
dataIndex: 'trainOrgId',
|
dataIndex: 'affiliationCode',
|
||||||
key: 'trainOrgId',
|
key: 'affiliationCode',
|
||||||
elipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '培训发生组织名称 ',
|
title: '培训发生组织名称 ',
|
||||||
dataIndex: 'trainOrgName',
|
dataIndex: 'affiliationName',
|
||||||
key: 'trainOrgName',
|
key: 'affiliationName',
|
||||||
elipsis: true, align: "center",
|
ellipsis: true, align: "center",
|
||||||
width: 600,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '是否为根节点(未命名) ',
|
title: '是否为根节点(未命名) ',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'isParent',
|
||||||
key: 'remark',
|
key: 'isParent',
|
||||||
elipsis: true, align: "center",
|
ellipsis: true, align: "center",
|
||||||
width: 800,
|
width: 200,
|
||||||
|
customRender: ({text})=>{
|
||||||
|
return (
|
||||||
|
text != 1 ? "是" : "否"
|
||||||
|
)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '担当(未命名) ',
|
title: '担当(未命名) ',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'leaderName',
|
||||||
key: 'remark',
|
key: 'leaderName',
|
||||||
elipsis: true, align: "center",
|
ellipsis: true,
|
||||||
width: 800,
|
align: "center",
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态(未命名) ',
|
title: '状态(未命名) ',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'type',
|
||||||
key: 'remark',
|
key: 'type',
|
||||||
elipsis: true, align: "center",
|
ellipsis: true, align: "center",
|
||||||
width: 800,
|
width: 160,
|
||||||
}, {
|
customRender: ({text})=>{
|
||||||
title: '备注 ',
|
switch (text) {
|
||||||
dataIndex: 'remark',
|
case '1':
|
||||||
key: 'remark',
|
return <span>待审核</span>;
|
||||||
elipsis: true, align: "center",
|
case '2':
|
||||||
width: 800,
|
return <span>审核中</span>;
|
||||||
|
case '3':
|
||||||
|
return <span>已完成</span>;
|
||||||
|
case '4':
|
||||||
|
return <span style={{ color: "red" }}>审核失败</span>;
|
||||||
|
default:
|
||||||
|
return <span>-</span>;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '备注 ',
|
title: '备注 ',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
key: 'remark',
|
key: 'remark',
|
||||||
elipsis: true, align: "center",
|
ellipsis: true, align: "center",
|
||||||
width: 800,
|
width: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作 ',
|
title: '操作 ',
|
||||||
dataIndex: 'operation',
|
dataIndex: 'operation',
|
||||||
key: 'operation',
|
key: 'operation',
|
||||||
elipsis: true,
|
width: 200,
|
||||||
width: 400,
|
align: "center",
|
||||||
align: "right",
|
fixed: 'right',
|
||||||
scopedSlots: { customRender: "action" },
|
scopedSlots: { customRender: "action" },
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
const orgColumns = ref([
|
const orgColumns = ref([
|
||||||
{
|
{
|
||||||
title: '组织名称',
|
title: '组织名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'orgName',
|
||||||
key: 'name',
|
key: 'orgName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '是否被培训发生组织选择',
|
title: '是否被培训发生组织选择',
|
||||||
@@ -390,8 +405,19 @@ const getTableDate = (obj) => {
|
|||||||
};
|
};
|
||||||
//删除弹窗
|
//删除弹窗
|
||||||
const deleteModal = (record) => {
|
const deleteModal = (record) => {
|
||||||
state.deleteInTeacherdialog = true
|
dialog({
|
||||||
state.delId = record.kid
|
content: '是否确认进行删除 ?',
|
||||||
|
ok: () => {
|
||||||
|
lecturer.affiliationDelById(record.id).then(res=>{
|
||||||
|
console.log(res,'res')
|
||||||
|
message.success("删除成功")
|
||||||
|
getTableDate();
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err,'errr')
|
||||||
|
message.error(err.msg)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
};
|
};
|
||||||
//确认删除
|
//确认删除
|
||||||
const closeDeleteTeacher = () => {
|
const closeDeleteTeacher = () => {
|
||||||
@@ -410,8 +436,8 @@ const getTableDate = (obj) => {
|
|||||||
formRef.value.resetFields();
|
formRef.value.resetFields();
|
||||||
state.teacherdialog = false
|
state.teacherdialog = false
|
||||||
|
|
||||||
cancel()
|
|
||||||
}
|
}
|
||||||
|
cancel()
|
||||||
state.deleteInTeacherdialog = false
|
state.deleteInTeacherdialog = false
|
||||||
state.editTeacher = false
|
state.editTeacher = false
|
||||||
};
|
};
|
||||||
@@ -420,7 +446,7 @@ const getTableDate = (obj) => {
|
|||||||
state.teacherdialogtitle="新增归属组织"
|
state.teacherdialogtitle="新增归属组织"
|
||||||
state.vf = true
|
state.vf = true
|
||||||
lecturer.getAffiliationCode().then(res=>{
|
lecturer.getAffiliationCode().then(res=>{
|
||||||
state.formParam.trainOrgId = res.data.data
|
state.formParam.affiliationCode = res.data.data
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
message.error('获取归属组织编号失败')
|
message.error('获取归属组织编号失败')
|
||||||
})
|
})
|
||||||
@@ -430,25 +456,60 @@ const getTableDate = (obj) => {
|
|||||||
}
|
}
|
||||||
//修改信息弹窗
|
//修改信息弹窗
|
||||||
const handleModify = (record) => {
|
const handleModify = (record) => {
|
||||||
state.teacherdialog = true;
|
lecturer.getAffiliationById(record.id).then(res=>{
|
||||||
state.teacherdialogtitle = '修改归属组织'
|
console.log(res,'resssss')
|
||||||
state.formParam.kid= record.kid
|
state.formParam = res.data.data
|
||||||
state.vf = false
|
const actArray = res.data.data.affiliationUserList.filter(item=>item.type == 0)
|
||||||
TeacherSystem(record)
|
const leveOneArray = res.data.data.affiliationUserList.filter(item=>item.type == 1)
|
||||||
|
const leveTwoArray = res.data.data.affiliationUserList.filter(item=>item.type == 2)
|
||||||
|
const leveThreeArray = res.data.data.affiliationUserList.filter(item=>item.type == 3)
|
||||||
|
state.formParam.actArray = actArray.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.userName + item.userNo,
|
||||||
|
value: item.userId,
|
||||||
|
...item
|
||||||
|
};
|
||||||
|
});
|
||||||
|
state.formParam.actValue = state.formParam.actArray.map(item => item.label).join(',');
|
||||||
|
state.formParam.leveOneArray = leveOneArray.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.userName + item.userNo,
|
||||||
|
value: item.userId,
|
||||||
|
...item
|
||||||
|
};
|
||||||
|
});
|
||||||
|
state.formParam.leveOneValue = state.formParam.leveOneArray.map(item => item.label).join(',');
|
||||||
|
state.formParam.leveTwoArray = leveTwoArray.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.userName + item.userNo,
|
||||||
|
value: item.userId,
|
||||||
|
...item
|
||||||
|
};
|
||||||
|
});
|
||||||
|
state.formParam.leveThreeArray = leveThreeArray.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.userName + item.userNo,
|
||||||
|
value: item.userId,
|
||||||
|
...item
|
||||||
|
};
|
||||||
|
});
|
||||||
|
state.teacherdialog = true;
|
||||||
|
state.teacherdialogtitle = '修改归属组织'
|
||||||
|
state.vf = false
|
||||||
|
})
|
||||||
|
// TeacherSystem(record)
|
||||||
}
|
}
|
||||||
const TeacherSystem =(record)=>{
|
const TeacherSystem =(record)=>{
|
||||||
state.formParam.trainOrgId=record.trainOrgId
|
state.formParam.affiliationCode=record.affiliationCode
|
||||||
state.formParam.trainOrgName=record.trainOrgName
|
state.formParam.affiliationName=record.affiliationName
|
||||||
state.formParam.remark=record.remark
|
state.formParam.remark=record.remark
|
||||||
}
|
}
|
||||||
const cancel=()=>{
|
const cancel=()=>{
|
||||||
state.formParam={
|
state.formParam={
|
||||||
trainOrgId:null,
|
affiliationCode:null,
|
||||||
trainOrgName:null,
|
affiliationName:null,
|
||||||
isParent: 0,
|
isParent: 1,
|
||||||
remark:null,
|
remark:null,
|
||||||
orgName: null,
|
|
||||||
orgId: null,
|
|
||||||
actValue: null,
|
actValue: null,
|
||||||
actArray: [],
|
actArray: [],
|
||||||
leveOneValue: null,
|
leveOneValue: null,
|
||||||
@@ -456,7 +517,7 @@ const getTableDate = (obj) => {
|
|||||||
leveTwoArray: [],
|
leveTwoArray: [],
|
||||||
leveThreeArray: [],
|
leveThreeArray: [],
|
||||||
code: null,
|
code: null,
|
||||||
affiliationOrgList: []
|
affiliationOrgList: [],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function validateField(name) {
|
async function validateField(name) {
|
||||||
@@ -503,8 +564,8 @@ const getTableDate = (obj) => {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
const rules = {
|
const rules = {
|
||||||
trainOrgId: [{ required: true, message: '',log:'培训发生组织编号不能为空' }],
|
affiliationCode: [{ required: true, message: '',log:'培训发生组织编号不能为空' }],
|
||||||
trainOrgName: [{ required: true, message: '',log:'培训发生组织名称不能为空' }],
|
affiliationName: [{ required: true, message: '',log:'培训发生组织名称不能为空' }],
|
||||||
code: [{ required: true, message: '',log:'根节点不能为空' }],
|
code: [{ required: true, message: '',log:'根节点不能为空' }],
|
||||||
actValue: [{ required: true, message: '',log:'组织担当不能为空' }],
|
actValue: [{ required: true, message: '',log:'组织担当不能为空' }],
|
||||||
leveOneValue: [{ required: true, message: '"',log:'一级审批人不能为空' }],
|
leveOneValue: [{ required: true, message: '"',log:'一级审批人不能为空' }],
|
||||||
|
|||||||
Reference in New Issue
Block a user