Merge branch 'zcwy-teacher-manage' of https://codeup.aliyun.com/648097ddb583fece2f059e59/vue/fe-manage into zcwy-teacher-manage

This commit is contained in:
wangxuemei
2024-11-13 14:46:56 +08:00
16 changed files with 374 additions and 102 deletions

View File

@@ -8,7 +8,11 @@
<bread-crumb/>
<main>
<a-config-provider :locale="zhCN">
<router-view/>
<router-view v-slot="{ Component }">
<keep-alive :include="isInclude">
<component :is="Component"/>
</keep-alive>
</router-view>
</a-config-provider>
</main>
</div>
@@ -19,7 +23,7 @@
</div>
</template>
<script setup>
import {ref, onMounted} from "vue";
import {ref, onMounted,computed} from "vue";
import {useStore, createStore} from "vuex";
import NavLeft from "@/components/NavLeft";
import NavTop from "@/components/NavTop";
@@ -33,7 +37,7 @@ import {USER_PERMISSION, VALIDATE_TOKEN} from "@/api/apis";
const store = useStore();
const isLogin = ref(false);
const isInclude = computed(()=>store.state.isInclude)
console.log("版本3.3.2------------");

View File

@@ -63,6 +63,8 @@ export const getAffiliationCode = () => http.get('/admin/affiliation/getAffiliat
export const getAffiliationById = (id) => http.get(`/admin/affiliation/queryById?id=${id}`)
//删除培训发生组织
export const affiliationDelById = (id)=>http.post(`/admin/affiliation/delById?id=${id}`)
//撤回培训发生组织
export const affiliatIsConfirm = (id) => http.post(`/admin/affiliation/isConfirm?id=${id}`)
//讲师费统计详情
export const expenseSummaryById = (obj) => http.get( `/admin/expenseSummary/queryById?id=${obj.id}&name=${obj.name}&trainOrgId=${obj.trainOrgId}`)
//查看月度讲师费详情

View File

@@ -103,10 +103,16 @@ import * as lecturerApi from "@/api/Lecturer.js";
checkedKeys.value = []
}else{
console.log(props.AddContentList,'xixiixix')
getNot()
treeAddData.value = props?.AddContentList
checkedKeys.value = props?.AddContentList?.map(item=>item.orgId)
}
});
const getNot = () => {
lecturerApi.getUnSelectOrg().then(res=>{
console.log(res,'ressss')
})
}
const onCheck = (checkedKeys, {checked: bool, checkedNodes, node, event}) => {
// "965356037047586816"
let length = treeAddData.value.length

View File

@@ -201,7 +201,7 @@ const searchMember = (keyword) => {
tSystemName:item.tSystemName,
sLevelName:item.sLevelName,
payrollPlaceCode: item.payrollPlaceCode,
payrollPlaceName:item.payrollPlaceName
payrollPlaceName:item.payrollPlaceName,
}
})
}else{
@@ -230,10 +230,13 @@ const searchMember = (keyword) => {
orgId: item.departId,
tSystemName:item.tsystemName,
sLevelName:item.sLevelName,
payrollPlaceCode: item.payrollPlaceCode,
payrollPlaceName:item.payrollPlaceName,
payrollPlaceCode: item.salaryId,
payrollPlaceName:item.salaryName,
tlevelName: item.tlevelName, //讲师级别
tlevelId: item.tlevelId, //讲师级别id
// salaryName: item.salaryName, //发薪地
// salaryId: item.salaryId,
levelPay: item.levelPay
}
})
}

View File

@@ -25,10 +25,13 @@
</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 :labelStyle="{ width: '165px' }" label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
<a-descriptions-item :labelStyle="{ width: '165px' }" 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 v-if="formData?.isParent==1" label="一级审批人">{{formData?.one||'-'}}</a-descriptions-item>
<a-descriptions-item v-if="formData?.isParent==1" label="二级审批人">{{formData?.two||'-'}}</a-descriptions-item>
<a-descriptions-item v-if="formData?.isParent==1" label="三级审批人">{{formData?.three||'-'}}</a-descriptions-item>
<a-descriptions-item label="状态">
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
</a-descriptions-item>
@@ -38,10 +41,10 @@
<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" />
<a-table :columns="columns" :data-source="formData?.tableData" :pagination="false"/>
</div>
<div style="margin-bottom: 100px">
<a-descriptions :column="2" bordered>
<!-- <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>
@@ -52,12 +55,21 @@
<a-descriptions-item label="状态">
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
</a-descriptions-item>
</a-descriptions>
</a-descriptions> -->
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="审批记录" force-render>
<div>
<a-table :columns="columnsTwo" :data-source="formData?.tableDataTwo" />
<div style="margin-bottom: 20px">
<a-table :columns="columnsThree" :data-source="formData?.tableDataTwo" :pagination="false">
<template #action="{ record }">
<div class="action">
<div style="color: #1890ff;cursor: pointer;" class="btn" @click="lookList(record)">查看</div>
</div>
</template>
</a-table>
</div>
<div style="margin-bottom: 100px">
<a-table v-if="threeList" :columns="columnsTwo" :data-source="formData?.tableDataTwo" :pagination="false"/>
</div>
</a-tab-pane>
</a-tabs>
@@ -90,16 +102,19 @@ const columns = [
title: '组织的名称',
dataIndex: 'orgName',
key: 'orgName',
align: 'center',
},
{
title: '类型',
dataIndex: 'age',
key: 'age',
align: 'center',
},
{
title: '状态',
dataIndex: 'address',
key: 'address',
align: 'center',
},
];
const formData = ref({})
@@ -108,32 +123,70 @@ const columnsTwo = [
title: '层级审批人',
dataIndex: 'name',
key: 'name',
align: 'center',
},
{
title: '操作',
dataIndex: 'age',
key: 'age',
align: 'center',
},
{
title: '审批人',
dataIndex: 'address',
key: 'age',
align: 'center',
},
{
title: '审批时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
},
{
title: '审批建议',
dataIndex: 'address',
key: 'age',
align: 'center',
},
]
const columnsThree = ref([
{
title: '审批提交时间',
dataIndex: 'name',
key: 'name',
align: 'center',
},
{
title: '审批状态',
dataIndex: 'age',
key: 'age',
align: 'center',
},
{
title: '审批人',
dataIndex: 'address',
key: 'age',
align: 'center',
},
{
title: '操作',
dataIndex: 'address',
key:'age',
align: 'center',
slots: { customRender: "action" },
}
])
const threeList = ref(false)
const lookList = (record) => {
console.log(record,'resssssss')
threeList.value = true
}
const visible = ref(false);
watch(visible, (val)=>{
console.log(val,'val',props.id)
if(val){
threeList.value = false
api.getAffiliationById(props.id).then(res=>{
console.log(res,'resssss')
formData.value = res.data.data

View File

@@ -28,10 +28,14 @@ export default createStore({
memberInitInfo: [],//学员默认
sysType: [],//学员默认
menus: [],
sysTypeMap:null
sysTypeMap:null,
isInclude: [],
},
getters: {},
mutations: {
setShouInclude(state, value) {
state.isInclude = value;
},
chengeOpenpages(state, list) {
// console.log('list', list)
state.openpages = list;

View File

@@ -250,9 +250,9 @@
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref,watch ,computed} from "vue";
import { reactive, toRefs, ref,watch ,computed,onMounted} from "vue";
import Editor from "@/components/project/Editor";
import { useRouter } from "vue-router";
import { useRouter,useRoute } from "vue-router";
import { message } from "ant-design-vue";
import {
UploadOutlined,
@@ -275,6 +275,14 @@ export default {
UploadOutlined,//图标--导出
},
setup() {
onMounted(() => {
const search = sessionStorage.getItem('searchExter')
if(route.query.activeKey == 2){
state.searchParam = JSON.parse(search)
}
searchSubmit()
})
const route = useRoute();
const formRef = ref();
const router = useRouter();
const userInfo = computed(() => store.state.userInfo);
@@ -432,6 +440,7 @@ export default {
])
// 搜索
const searchSubmit = () => {
state.searchParam.pageNo = 1
getTableDate();
};
//重置
@@ -462,7 +471,7 @@ export default {
message.error(err.data.msg)
})
};
getTableDate()
// getTableDate()
// // 翻页
const changePagination = (page,pageSize) => {
state.searchParam.pageNo = page;
@@ -650,6 +659,7 @@ export default {
// }
//表格内查看数据操作
const handleLook = (record) => {
sessionStorage.setItem('searchExter', JSON.stringify(state.searchParam))
let id = record.id
router.push({ path: '/LookExternalLecturer', query: { id } })
}

View File

@@ -89,12 +89,12 @@
<a-space>
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<a-button v-if="record.status == '1'" type="link"
<a-button v-if="record.isPermission" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<a-button v-if="record.status == '1'&&record.isPermission" type="link"
@click="() => handleOperate(record, String(record.courseform))">停用</a-button>
<a-button v-if="record.status == '2'" type="link"
<a-button v-if="record.status == '2'&&record.isPermission" type="link"
@click="() => handleOperate(record, String(record.courseform))">启用</a-button>
<a-button v-if="lecturerAdmin('lecturer-admin')" type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
<a-button v-if="record.isSuperPermission" type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))"
 v-if="lecturerAdmin('Lecturer-admin')">删除</a-button> -->
</a-space>
@@ -360,7 +360,7 @@
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref, watch,computed } from "vue";
import { reactive, toRefs, ref, watch,computed,onMounted } from "vue";
import { useStore } from "vuex";
import {
RightOutlined,
@@ -372,7 +372,7 @@ import Editor from "@/components/project/Editor";
import ProjectManager from "@/components/project/ProjectManagerNew";
import SearchTeacher from "@/components/project/SearchTeacher";
import { message } from "ant-design-vue";
import { useRouter } from "vue-router";
import { useRouter,useRoute } from "vue-router";
import { getTeacherSystemList, getTeacherList, getPayRollPlace, getLevel, insertTeacher, deleteInTeacher, updateInTeacher, getTeacherById, updateTeacherState } from "../../api/Lecturer";
import { fileUp } from "../../api/indexEval";
import { teacherUpload } from "../../api/Teaching";
@@ -395,7 +395,16 @@ export default {
FolderAddOutlined,//图标--新增
UploadDragger,
},
setup() {
setup( ) {
onMounted(() => {
const search = sessionStorage.getItem('searchLecturer')
if(route.query.activeKey == 1){
state.moreid = 2
state.searchParam = JSON.parse(search)
}
searchSubmit()
})
const route = useRoute()
const formRef = ref();
const store = useStore();
const router = useRouter();
@@ -822,7 +831,7 @@ export default {
])
// 搜索
const searchSubmit = () => {
// store.commit("setShouInclude", ['lecturerlist']);
state.searchParam.pageNo = 1
getTableDate();
};
//重置
@@ -870,7 +879,7 @@ export default {
message.error(err.data.msg)
})
};
getTableDate()
// getTableDate()
// // 翻页
const changePagination = (page, pageSize) => {
state.searchParam.pageNo = page;
@@ -1131,7 +1140,7 @@ export default {
// }
// //表格内查看数据操作
const handleLook = (record) => {
sessionStorage.setItem('searchLecturer', JSON.stringify(state.searchParam))
let id = record.id
router.push({ path: '/LookInsideLecturer', query: { id } })
}

View File

@@ -599,7 +599,7 @@ export default {
scopedSlots: { customRender: "teacherOrg" },
},
{
title: '讲师发薪地 ',
title: '讲师体系',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
@@ -607,7 +607,39 @@ export default {
width: 200,
},
{
title: '授课时长(系统 ) ',
title: '讲师等级',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
align: "center",
width: 200,
},
{
title: '发薪地',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
align: "center",
width: 200,
},
{
title: '课程类型',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
align: "center",
width: 200,
},
{
title: '课程名称',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
align: "center",
width: 200,
},
{
title: '授课/开发课程日期',
dataIndex: 'teachingSystem',
key: 'teachingSystem',
elipsis: true,
@@ -615,13 +647,37 @@ export default {
width: 200,
},
{
title: '授课时长(录入) ',
title: '授课/开发课程时长 ',
dataIndex: 'teachingEnter',
key: 'teachingEnter',
elipsis: true,
align: "center",
width: 200,
},
{
title: '参训人数 ',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
align: "center",
width: 200,
},
{
title: '评分 ',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
align: "center",
width: 200,
},
{
title: '课程基准 ',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
align: "center",
width: 200,
},
{
title: '计划费用 ',
dataIndex: 'expense',

View File

@@ -117,7 +117,8 @@
<template v-if="column.key === 'operation'">
<a-space >
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
<a-button type="link" :disabled="record.createFrom==1 ?false :true" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<!-- :disabled="record.createFrom==1 ?false :true" -->
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<!-- <a-button :disabled="record.status==='A20' || record.status==='A30'||record.status==='S20' ?true :false" type="link" @click="() => handleOperate(record, String(record.courseform))">提交</a-button>
<a-button :disabled="record.status==='A10' && record.status!=='A20' || record.status==='A30'||record.status==='S20' ||record.status==='E10' ?true :false" type="link" @click="() => handleOperate(record, String(record.courseform))">撤回</a-button> -->
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
@@ -281,7 +282,7 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="课酬基准" name="levelPay">
<a-input v-model:value="formParam.levelPay" placeholder="可手动更改"
<a-input v-model:value="formParam.levelPay" placeholder="自动键入"
@blur="clearlevelPayNumber"
allowClear showSearch class="draitem">
</a-input>
@@ -363,23 +364,24 @@
@closa="cancelTeachingDialog" :maskClosable="true" width="60%" title="查看讲师费用">
<span class="line"></span>
<span>讲师费用详情</span>
<a-descriptions style="padding-bottom: 35px;" bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions style="padding-bottom: 35px;" bordered :column="2" :contentStyle="rowCenter" :labelStyle="{width:'160px'}">
<a-descriptions-item label="讲师名称">{{formParam.name}}</a-descriptions-item>
<a-descriptions-item label="讲师工号">{{formParam.userNo}}</a-descriptions-item>
<a-descriptions-item label="讲师组织" :span="2">{{formParam.orgName}}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{formParam.tsystemName}}</a-descriptions-item>
<a-descriptions-item label="讲师级别">{{formParam.tlevelName }}</a-descriptions-item>
<a-descriptions-item label="发薪地">{{formParam?.payrollPlace || '-'}}</a-descriptions-item>
<a-descriptions-item label="费用类型">"差字段"</a-descriptions-item>
<a-descriptions-item label="费用类型">{{{1:'在线',2:'面授',3:'课程'}[formParam?.courseType]}}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{formParam.courseType==1?'项目开课' :formParam.courseType==2 ?'路径开课':formParam.courseType==3 ?'面授开课':'-'}}</a-descriptions-item>
<a-descriptions-item label="课程名称">{{formParam.courseName || '-'}}</a-descriptions-item>
<a-descriptions-item label="授课时长 ">{{formParam.teachingDate || '-'}}</a-descriptions-item>
<a-descriptions-item label="授课时长 ">{{formParam.teachingTime || '-'}}</a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{formParam.teachingDate || '-'}}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{formParam.studys || '-'}}</a-descriptions-item>
<a-descriptions-item label="评分 ">{{formParam.score || '-'}}</a-descriptions-item>
<a-descriptions-item label="课酬基准 ">{{formParam.levelPay || '-'}}</a-descriptions-item>
<a-descriptions-item label="计划费用 ">{{formParam.expense || '-'}}</a-descriptions-item>
<a-descriptions-item label="应发费用 ">{{formParam.payableExpense || '-'}}</a-descriptions-item>
<a-descriptions-item label="费用发放时间">{{formParam.payableExpenseTime || '-'}}</a-descriptions-item>
<a-descriptions-item label="状态">{{formParam.status=="0"?'待确认' :formParam.status=="1"?'待提交':formParam.status== "2" ?'审核中':formParam.status== "3"?'审核通过':'-'}}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{formParam.remark || '-'}}</a-descriptions-item>
</a-descriptions>
@@ -1340,6 +1342,9 @@ const column = ref([
const tlevelChange = (e) => {
state.formParam.tlevelName = e?.tlevelName
state.formParam.tlevelId = e?.tlevelId
// state.formParam.payrollPlace = e?.salaryName
// state.formParam.payrollPlaceId = e?.salaryId
state.formParam.levelPay = e?.levelPay
}
//导出功能
const handleExport = ()=>{

View File

@@ -173,6 +173,7 @@
import { reactive, toRefs, ref, watch } from "vue";
import { message } from "ant-design-vue";
import dayjs from "dayjs";
import { useStore } from "vuex";
import { useRouter } from "vue-router";
import { getOrganization } from "../../api/Teaching";
import { queryTeacherFeeMonthly, getTeacherFeeDetailListByTeacherNo, getTeacherFeeListByTeacherNo,TeacherFeeTotalList,createMonthSummary} from "../../api/lecturerFeeStatistics"
@@ -184,6 +185,7 @@ export default {
components: {
},
setup() {
const store = useStore();
const router = useRouter();
const state = reactive({
summaryDate: null,
@@ -282,6 +284,7 @@ export default {
])
// 搜索
const searchSubmit = () => {
state.searchParam.pageNo = 1
getTableDate();
};
//修改时间
@@ -349,7 +352,7 @@ export default {
//讲师信息弹窗
const handleModify = (record) => {
state.teacherdialog = true;
state.teacherdialogtitle = '讲师费月度统计详情'
state.teacherdialogtitle = '月度统计详情'
TeacherSystem()
}
const TrainOrglist = ref([
@@ -357,10 +360,11 @@ export default {
//获取培训发生组织
const TrainOrglista = () => {
getTrainOrg().then((res) => {
console.log(res,'ressss')
if (res.data.code === 200) {
let arr = res.data.data.records;
let array = [];
arr.map((value) => {
arr?.map((value) => {
let obj = {
value: value.id,
label: value.affiliationName,
@@ -382,12 +386,12 @@ export default {
// console.log('getOrganizationList')
getOrganization().then((res) => {
if (res.data.code === 200) {
let arr = res.data.data;
let arr = res.data.data.records;
let array = [];
arr.map((value) => {
arr?.map((value) => {
let obj = {
value: value.departId,
label: value.orgName,
value: value.affiliationCode,
label: value.affiliationName,
};
array.push(obj);
});

View File

@@ -14,9 +14,11 @@
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref, watch } from "vue";
import { reactive, toRefs, ref, watch,onMounted } from "vue";
import InsideLecturer from "../lecturer/InsideLecturer.vue"
import ExternalLecturer from "../lecturer/ExternalLecturer.vue"
import { useRoute } from 'vue-router'
import { useStore } from 'vuex'
export default {
name: "LecturerList",
components: {
@@ -24,14 +26,20 @@
ExternalLecturer
},
setup() {
const route = useRoute()
const store = useStore()
const state = reactive({
activeKey:'1'
})
watch(
)
onMounted(() => {
if(route.query.activeKey){
state.activeKey = route.query.activeKey
}
})
return {
...toRefs(state),
}
},
};

View File

@@ -5,9 +5,9 @@ ExternalLecturer
<div class="LookExternalLecturer">
<a-layout-header style="background: white;color: black; font-size: 20px ;">
<span>查看讲师</span>
<router-link to="/lecturerList" class="goback">
<router-link :to="{ path: '/lecturerList', query: { activeKey: '2', } }" class="goback">
<span class="return"></span>
<router-link class="returntext" to="/lecturerList" style="line-height:47px ">
<router-link class="returntext" :to="{ path: '/lecturerList', query: { activeKey: '2', } }" style="line-height:47px ">
返回
</router-link>
</router-link>

View File

@@ -3,12 +3,12 @@
<div class="LookInsideLecturer">
<a-layout-header style="background: white;color: black; font-size: 20px ;">
<span>查看讲师</span>
<router-link to="/lecturerList" class="goback">
<router-link :to="{ path: '/lecturerList', query: { activeKey: '1', } }" class="goback">
<span class="return"></span>
<!-- <router-link class="returntext" to="/lecturerList" style="line-height:47px ">
返回
</router-link> -->
<div class="returntext" to="/goback" style="line-height:47px " @click="goback">
<div class="returntext" to="/goback" style="line-height:47px ">
返回
</div>
</router-link>

View File

@@ -26,7 +26,7 @@
v-on:keydown.enter="enterPressHadlerSearch"/>
</a-form-item>
<a-form-item class="select " >
<a-tree-select style="width: 230px"
<!-- <a-tree-select style="width: 230px"
:fieldNames="{
children: 'children',
label: 'name',
@@ -41,7 +41,10 @@
tree-default-expand-all
:tree-data="sysTypeOptions"
v-on:keydown.enter="enterPressHadlerSearch">
</a-tree-select>
</a-tree-select> -->
<a-select style="width: 230px" placeholder="请选择所属组织" v-model:value="searchParam.courseTypeId"
:options="getOrganizationList">
</a-select>
</a-form-item>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
@@ -183,7 +186,7 @@ export default {
payrollPlaceId: null,
departId: null,
summaryDate:null,
id: '2',
id: route.query.id,
trainOrgId: '',
},
name:null,
@@ -228,7 +231,7 @@ export default {
scopedSlots: { customRender: "teacherOrg" },
},
{
title: '讲师发薪地 ',
title: '发薪地',
dataIndex: 'trainOrgName',
key: 'trainOrgName',
elipsis: true,
@@ -253,8 +256,8 @@ export default {
},
{
title: '开发课程时长 ',
dataIndex: 'teachingTime',
key: 'teachingTime',
dataIndex: 'expense',
key: 'expense',
elipsis: true,
align: "center",
width: 200,
@@ -298,6 +301,7 @@ export default {
//获取讲师发薪地列表
const PlaceOfPayLista = () => {
getPayRollPlace().then((res) => {
if (res.data.code === 200) {
let arr = res.data.data;
let array = [];
@@ -336,12 +340,12 @@ export default {
// console.log('getOrganizationList')
getOrganization().then((res) => {
if (res.data.code === 200) {
let arr = res.data.data;
let arr = res.data.data.records;
let array = [];
arr.map((value) => {
arr?.map((value) => {
let obj = {
value: value.departId,
label: value.orgName,
value: value.affiliationCode,
label: value.affiliationName,
};
array.push(obj);
});
@@ -349,7 +353,7 @@ export default {
}
})
}
// getOrganizationLista()
getOrganizationLista()
//表格内查看数据操作
const handleLook = (record) => {
state.drawer={
@@ -386,11 +390,13 @@ export default {
const searchReset = () => {
state.searchParam = {
pageNo: "1",
pageSize: "10",
name : null,
payrollPlaceId: null,
departId: null,
summaryDate:null,
pageSize: "10",
id: route.query.id,
name : '',
payrollPlaceId: null,
departId: '',
summaryDate:'',
trainOrgId: '',
};
getTableDate();
};

View File

@@ -5,7 +5,7 @@
<a-form layout="inline">
<a-form-item class="select">
<div>
<a-input style="width: 276px; height: 40px; border-radius: 8px" v-model:value="searchParam.name" placeholder="请输入号/讲师姓名进行索"
<a-input style="width: 276px; height: 40px; border-radius: 8px" v-model:value="searchParam.name" placeholder="请输入号/名进行索"
v-on:keydown.enter="enterPressHadlerSearch" />
</div>
</a-form-item>
@@ -21,6 +21,14 @@
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 130px;">
<FolderAddOutlined /> 新增归属组织
</a-button>
<div
class="btnn btn2"
@click="downOpen"
style="margin-right: 14px"
>
<div class="daochu"></div>
<div class="btnText">导出</div>
</div>
</div>
<a-table style="border: 1px solid #f2f6fe" :columns="columns" :data-source="tableData" :loading="tableLoading"
@expand="expandTable" :pagination="false">
@@ -28,9 +36,10 @@
<template v-if="column.key === 'operation'">
<a-space >
<lockLecturer :id="record.id" :title="'培训发生组织详情'">
<div style="color: #1890ff;">查看</div>
<div style="color: #1890ff;cursor: pointer;">查看</div>
</lockLecturer>
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<a-button v-if="record.status!=2" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<a-button v-if="record.status==2" type="link" @click="() => updateModal(record)">撤回</a-button>
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
</a-space>
</template>
@@ -79,8 +88,15 @@
</a-modal>
</div>
<!-- 抽屉 -->
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
width="60%" :title="teacherdialogtitle">
<a-drawer v-model:visible="teacherdialog" :closable="false" :title="false" placement="right" width="60%" :maskClosable="false" >
<div class="headers">
<div class="headerTitle">{{ teacherdialogtitle }}</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="@/assets/images/basicinfo/close.png"
@click="cancelTeacherDialog"
/>
</div>
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
<a-row :gutter="16">
<a-col :span="24">
@@ -97,7 +113,7 @@
</a-col>
<a-col :span="12">
<a-form-item label="培训发生组织名称:" name="affiliationName">
<a-input v-model:value="formParam.affiliationName" class="draitem"
<a-input :maxlength="30" show-count v-model:value="formParam.affiliationName" class="draitem"
placeholder="请输入讲师体系名称" allowClear showSearch>
</a-input>
</a-form-item>
@@ -111,7 +127,7 @@
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
<a-select v-model:value="formParam.code" placeholder="请选择根节点"
<a-select v-model:value="formParam.code" :placeholder="!formParam.isParent?'请选择审批层级':'请选择根节点'"
:options="!formParam.isParent?PlaceOfPayList:PlaceOfPayListTwo" allowClear showSearch/>
</div>
</a-form-item>
@@ -204,8 +220,8 @@
} "
>
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog(0)" :loading="buttonLoading">保存</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog(1)" :loading="buttonLoading">提交</a-button>
</div>
</a-drawer>
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
@@ -267,9 +283,9 @@ export default{
},
})
const PlaceOfPayList = ref([
{ value: '1', label: "一级审批" },
{ value: '2', label: "二级审批" },
{ value: '3', label: "三级审批" },
{ value: '1', label: "一级审批" },
{ value: '2', label: "二级审批" },
{ value: '3', label: "三级审批" },
])
const placeData = () => {
lecturer.parentList().then(res=>{
@@ -333,8 +349,8 @@ export default{
},
{
title: '状态',
dataIndex: 'type',
key: 'type',
dataIndex: 'status',
key: 'status',
ellipsis: true, align: "center",
width: 160,
customRender: ({text})=>{
@@ -344,9 +360,11 @@ export default{
case '2':
return <span>审核中</span>;
case '3':
return <span>已完成</span>;
return <span>审核通过</span>;
case '4':
return <span style={{ color: "red" }}>审核失败</span>;
return <span>拒绝</span>;
case '5':
return <span>撤回</span>;
default:
return <span>-</span>;
}
@@ -416,10 +434,11 @@ const getTableDate = (obj) => {
})
};
getTableDate()
// 搜索
const searchSubmit = () => {
getTableDate();
};
// 搜索
const searchSubmit = () => {
state.searchParam.pageNo = 1;
getTableDate();
};
//重置
const searchReset = () => {
state.searchParam = {
@@ -436,6 +455,21 @@ const getTableDate = (obj) => {
state.searchParam.pageSize = pageSize;
getTableDate();
};
const updateModal = (record) => {
dialog({
content: '是否确认撤回 ?',
ok: () => {
lecturer.affiliatIsConfirm(record.id).then(res=>{
console.log(res,'res')
message.success("撤回成功")
searchSubmit();
}).catch(err=>{
console.log(err,'errr')
message.error(err.msg)
})
}
})
}
//删除弹窗
const deleteModal = (record) => {
dialog({
@@ -443,8 +477,12 @@ const getTableDate = (obj) => {
ok: () => {
lecturer.affiliationDelById(record.id).then(res=>{
console.log(res,'res')
if(typeof (res.data.data) != 'object'){
message.error(res.data.data)
return
}
message.success("删除成功")
getTableDate();
searchSubmit();
}).catch(err=>{
console.log(err,'errr')
message.error(err.msg)
@@ -459,7 +497,7 @@ const getTableDate = (obj) => {
if (res.data.code == 200) {
// message.success("删除成功");
state.deleteInTeacherdialog = false
getTableDate();
searchSubmit();
}
})
}
@@ -475,14 +513,17 @@ const getTableDate = (obj) => {
state.editTeacher = false
};
const addTeacher=()=>{
state.teacherdialog=true ,
state.teacherdialogtitle="新增归属组织"
state.vf = true
lecturer.getAffiliationCode().then(res=>{
state.formParam.affiliationCode = res.data.data
}).catch(()=>{
message.error('获取归属组织编号失败')
})
state.teacherdialog=true ,
state.teacherdialogtitle="新增归属组织"
state.vf = true
lecturer.getAffiliationCode().then(res=>{
state.formParam.affiliationCode = res.data.data
}).catch(()=>{
message.error('获取归属组织编号失败')
})
}
const downOpen = () => {
alert('没有接口')
}
const addContentData = () => {
state.showContent = true
@@ -533,7 +574,7 @@ const getTableDate = (obj) => {
});
state.formParam.leveThreeValue = state.formParam.leveThreeArray.map(item => item.label).join(',');
state.teacherdialog = true;
state.teacherdialogtitle = '修改归属组织'
state.teacherdialogtitle = '编辑归属组织'
state.vf = false
})
// TeacherSystem(record)
@@ -587,7 +628,7 @@ const getTableDate = (obj) => {
}
}
//保存
const createTeacherDialog = async () => {
const createTeacherDialog = async (val) => {
console.log(state.formParam,'state.formParam')
state.formParam.affiliationUserList = [...state.formParam?.actArray,...state.formParam?.leveOneArray,...state.formParam?.leveTwoArray,...state.formParam?.leveThreeArray]
const formItemNames = Object.keys(rules);
@@ -597,22 +638,38 @@ const getTableDate = (obj) => {
return message.error(rules[formItemNames[i]][0].log)
}
}
state.formParam.remark = state.formParam?.remark?.trim()
state.formParam.submitStatus = val
dialog({
content: '是否确认提交一旦提交将进入BPM系统审核流程',
content: val?'是否确认提交一旦提交将进入BPM系统审核流程':'是否确认保存',
ok: () => {
if (state.vf == false) {
updateTrainOrg(state.formParam).then(response => {
message.success("修改成功");
updateTrainOrg(state.formParam).then(res => {
if(res.data.code == 200){
message.success("修改成功");
cancel()
searchSubmit();
}else{
message.error(res.data.msg)
}
state.teacherdialog = false;
}).catch(err=>{
message.destroy();
message.error(err.data.msg)
state.teacherdialog = false;
cancel()
getTableDate();
});
})
}else {
addReviewer(state.formParam).then((res) => {
message.success("保存成功");
state.teacherdialog = false;
cancel()
getTableDate();
searchSubmit();
}).catch(err=>{
message.destroy();
message.error(err.data.msg)
state.teacherdialog = false;
cancel()
})
}
}
@@ -651,8 +708,10 @@ const getTableDate = (obj) => {
placeData,
searchReset,
deleteModal,
updateModal,
cancelTeacherDialog,
addTeacher,
downOpen,
addContentData,
handleModify,
closeDeleteTeacher,
@@ -667,6 +726,23 @@ const getTableDate = (obj) => {
</script>
<style lang="scss" scoped>
.headers {
height: 73px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
// background-color: red;
margin-bottom: 20px;
.headerTitle {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
// margin-left: 24px;
}
}
.tableBox {
padding-bottom: 20px;
margin: 20px 38px 30px;
@@ -945,6 +1021,32 @@ position: relative;
flex-shrink: 0;
cursor: pointer;
}
.btnn {
padding: 0px 26px 0px 26px;
height: 40px;
background: #1890ff;
border-radius: 8px;
border: 1px solid #1890ff;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
color: #fff;
line-height: 36px;
margin-left: 5px;
}
.daochu {
width: 16px;
height: 18px;
background-image: url("../../assets/images/coursewareManage/export1.png");
}
}
//展开收起样式
.moreidbtn {