mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 22:06: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 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"
|
||||
: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>
|
||||
</div>
|
||||
@@ -104,7 +104,7 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
}else{
|
||||
console.log(props.AddContentList,'xixiixix')
|
||||
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}) => {
|
||||
@@ -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;
|
||||
console.log(treeAddData.value,'checkedNodes')
|
||||
}
|
||||
const clearTree = () => {
|
||||
treeAddData.value = [];
|
||||
checkedKeys.value = [];
|
||||
}
|
||||
const deleteTree = (item) => {
|
||||
treeAddData.value = treeAddData.value.filter(node => node.id !== item.id);
|
||||
checkedKeys.value = treeAddData.value.map(item=>item.id)
|
||||
treeAddData.value = treeAddData.value.filter(node => node.orgId !== item.orgId);
|
||||
checkedKeys.value = treeAddData.value.map(item=>item.orgId)
|
||||
}
|
||||
const closeCodeModal = () => {
|
||||
emit("update:showContent", false);
|
||||
|
||||
@@ -57,6 +57,9 @@ onMounted(()=>{
|
||||
managerArray.value = props.arrayList
|
||||
options.value = props.arrayList
|
||||
})
|
||||
watch(()=>props.arrayList, ()=>{
|
||||
managerArray.value = props.arrayList
|
||||
})
|
||||
const options = ref([])
|
||||
const getList = () => {
|
||||
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>
|
||||
</div>
|
||||
<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 v-if="column.key === 'operation'">
|
||||
<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="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||
</a-space>
|
||||
@@ -86,15 +88,15 @@
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="培训发生组织编号:" name="trainOrgId">
|
||||
<a-input disabled v-model:value="formParam.trainOrgId" class="draitem"
|
||||
<a-form-item label="培训发生组织编号:" name="affiliationCode">
|
||||
<a-input disabled v-model:value="formParam.affiliationCode" class="draitem"
|
||||
placeholder="请输入讲师体系编号" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="培训发生组织名称:" name="trainOrgName">
|
||||
<a-input v-model:value="formParam.trainOrgName" class="draitem"
|
||||
<a-form-item label="培训发生组织名称:" name="affiliationName">
|
||||
<a-input v-model:value="formParam.affiliationName" class="draitem"
|
||||
placeholder="请输入讲师体系名称" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -126,14 +128,14 @@
|
||||
<a-form-item label="一级审批人" name="leveOneValue">
|
||||
<!-- <a-select v-model:value="formParam.yjspr" placeholder="请选择一级审批人"
|
||||
: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-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="二级审批人">
|
||||
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择二级审批人"
|
||||
: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-col>
|
||||
</a-row>
|
||||
@@ -142,7 +144,7 @@
|
||||
<a-form-item label="三级审批人" >
|
||||
<!-- <a-select v-model:value="formParam.sjspr" placeholder="请选择三级审批人"
|
||||
: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-col>
|
||||
<a-col :span="12">
|
||||
@@ -194,7 +196,6 @@
|
||||
</div>
|
||||
</a-drawer>
|
||||
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
@@ -208,12 +209,14 @@ import ProjectManager from "@/components/project/ProjectManagerLecturer";
|
||||
import { queryTrainOrg,deleteTrainOrg,addReviewer,updateTrainOrg} from "../../api/organization";
|
||||
import AddOrgContent from "../../components/project/AddOrgContent.vue"
|
||||
import * as lecturer from "../../api/Lecturer.js";
|
||||
import lockLecturer from "@/components/project/lockLecturer"
|
||||
export default{
|
||||
name:"organization",
|
||||
components: {
|
||||
ProjectManager,
|
||||
FolderAddOutlined,//图标--新增
|
||||
AddOrgContent
|
||||
AddOrgContent,
|
||||
lockLecturer
|
||||
|
||||
},
|
||||
setup() {
|
||||
@@ -232,12 +235,10 @@ export default{
|
||||
pageSize: "10"
|
||||
},
|
||||
formParam:{
|
||||
trainOrgId:null,
|
||||
trainOrgName:null,
|
||||
affiliationCode:null,
|
||||
affiliationName:null,
|
||||
isParent: 1,
|
||||
remark:null,
|
||||
orgName: null,
|
||||
orgId: null,
|
||||
actValue: null,
|
||||
actArray: [],
|
||||
leveOneValue: null,
|
||||
@@ -267,68 +268,82 @@ export default{
|
||||
const columns = ref([
|
||||
{
|
||||
title: '培训发生组织编号 ',
|
||||
dataIndex: 'trainOrgId',
|
||||
key: 'trainOrgId',
|
||||
elipsis: true,
|
||||
dataIndex: 'affiliationCode',
|
||||
key: 'affiliationCode',
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '培训发生组织名称 ',
|
||||
dataIndex: 'trainOrgName',
|
||||
key: 'trainOrgName',
|
||||
elipsis: true, align: "center",
|
||||
width: 600,
|
||||
dataIndex: 'affiliationName',
|
||||
key: 'affiliationName',
|
||||
ellipsis: true, align: "center",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '是否为根节点(未命名) ',
|
||||
dataIndex: 'remark',
|
||||
key: 'remark',
|
||||
elipsis: true, align: "center",
|
||||
width: 800,
|
||||
dataIndex: 'isParent',
|
||||
key: 'isParent',
|
||||
ellipsis: true, align: "center",
|
||||
width: 200,
|
||||
customRender: ({text})=>{
|
||||
return (
|
||||
text != 1 ? "是" : "否"
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '担当(未命名) ',
|
||||
dataIndex: 'remark',
|
||||
key: 'remark',
|
||||
elipsis: true, align: "center",
|
||||
width: 800,
|
||||
dataIndex: 'leaderName',
|
||||
key: 'leaderName',
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '状态(未命名) ',
|
||||
dataIndex: 'remark',
|
||||
key: 'remark',
|
||||
elipsis: true, align: "center",
|
||||
width: 800,
|
||||
}, {
|
||||
title: '备注 ',
|
||||
dataIndex: 'remark',
|
||||
key: 'remark',
|
||||
elipsis: true, align: "center",
|
||||
width: 800,
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
ellipsis: true, align: "center",
|
||||
width: 160,
|
||||
customRender: ({text})=>{
|
||||
switch (text) {
|
||||
case '1':
|
||||
return <span>待审核</span>;
|
||||
case '2':
|
||||
return <span>审核中</span>;
|
||||
case '3':
|
||||
return <span>已完成</span>;
|
||||
case '4':
|
||||
return <span style={{ color: "red" }}>审核失败</span>;
|
||||
default:
|
||||
return <span>-</span>;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '备注 ',
|
||||
dataIndex: 'remark',
|
||||
key: 'remark',
|
||||
elipsis: true, align: "center",
|
||||
width: 800,
|
||||
ellipsis: true, align: "center",
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: '操作 ',
|
||||
dataIndex: 'operation',
|
||||
key: 'operation',
|
||||
elipsis: true,
|
||||
width: 400,
|
||||
align: "right",
|
||||
width: 200,
|
||||
align: "center",
|
||||
fixed: 'right',
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
])
|
||||
const orgColumns = ref([
|
||||
{
|
||||
title: '组织名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
dataIndex: 'orgName',
|
||||
key: 'orgName',
|
||||
},
|
||||
{
|
||||
title: '是否被培训发生组织选择',
|
||||
@@ -390,8 +405,19 @@ const getTableDate = (obj) => {
|
||||
};
|
||||
//删除弹窗
|
||||
const deleteModal = (record) => {
|
||||
state.deleteInTeacherdialog = true
|
||||
state.delId = record.kid
|
||||
dialog({
|
||||
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 = () => {
|
||||
@@ -410,8 +436,8 @@ const getTableDate = (obj) => {
|
||||
formRef.value.resetFields();
|
||||
state.teacherdialog = false
|
||||
|
||||
cancel()
|
||||
}
|
||||
cancel()
|
||||
state.deleteInTeacherdialog = false
|
||||
state.editTeacher = false
|
||||
};
|
||||
@@ -420,7 +446,7 @@ const getTableDate = (obj) => {
|
||||
state.teacherdialogtitle="新增归属组织"
|
||||
state.vf = true
|
||||
lecturer.getAffiliationCode().then(res=>{
|
||||
state.formParam.trainOrgId = res.data.data
|
||||
state.formParam.affiliationCode = res.data.data
|
||||
}).catch(()=>{
|
||||
message.error('获取归属组织编号失败')
|
||||
})
|
||||
@@ -430,25 +456,60 @@ const getTableDate = (obj) => {
|
||||
}
|
||||
//修改信息弹窗
|
||||
const handleModify = (record) => {
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '修改归属组织'
|
||||
state.formParam.kid= record.kid
|
||||
state.vf = false
|
||||
TeacherSystem(record)
|
||||
lecturer.getAffiliationById(record.id).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
state.formParam = res.data.data
|
||||
const actArray = res.data.data.affiliationUserList.filter(item=>item.type == 0)
|
||||
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)=>{
|
||||
state.formParam.trainOrgId=record.trainOrgId
|
||||
state.formParam.trainOrgName=record.trainOrgName
|
||||
state.formParam.affiliationCode=record.affiliationCode
|
||||
state.formParam.affiliationName=record.affiliationName
|
||||
state.formParam.remark=record.remark
|
||||
}
|
||||
const cancel=()=>{
|
||||
state.formParam={
|
||||
trainOrgId:null,
|
||||
trainOrgName:null,
|
||||
isParent: 0,
|
||||
affiliationCode:null,
|
||||
affiliationName:null,
|
||||
isParent: 1,
|
||||
remark:null,
|
||||
orgName: null,
|
||||
orgId: null,
|
||||
actValue: null,
|
||||
actArray: [],
|
||||
leveOneValue: null,
|
||||
@@ -456,7 +517,7 @@ const getTableDate = (obj) => {
|
||||
leveTwoArray: [],
|
||||
leveThreeArray: [],
|
||||
code: null,
|
||||
affiliationOrgList: []
|
||||
affiliationOrgList: [],
|
||||
}
|
||||
}
|
||||
async function validateField(name) {
|
||||
@@ -503,8 +564,8 @@ const getTableDate = (obj) => {
|
||||
})
|
||||
};
|
||||
const rules = {
|
||||
trainOrgId: [{ required: true, message: '',log:'培训发生组织编号不能为空' }],
|
||||
trainOrgName: [{ required: true, message: '',log:'培训发生组织名称不能为空' }],
|
||||
affiliationCode: [{ required: true, message: '',log:'培训发生组织编号不能为空' }],
|
||||
affiliationName: [{ required: true, message: '',log:'培训发生组织名称不能为空' }],
|
||||
code: [{ required: true, message: '',log:'根节点不能为空' }],
|
||||
actValue: [{ required: true, message: '',log:'组织担当不能为空' }],
|
||||
leveOneValue: [{ required: true, message: '"',log:'一级审批人不能为空' }],
|
||||
|
||||
Reference in New Issue
Block a user