mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-07 09:56:44 +08:00
Merge branch 'zcwy-0511-out' of https://codeup.aliyun.com/648097ddb583fece2f059e59/vue/fe-manage into zcwy-0511-out
This commit is contained in:
908
src/views/gratefulteacher/CommonTeacher.vue
Normal file
908
src/views/gratefulteacher/CommonTeacher.vue
Normal file
@@ -0,0 +1,908 @@
|
||||
<!-- eslint-disable vue/no-parsing-error -->
|
||||
<!-- eslint-disable vue/require-v-for-key -->
|
||||
<template>
|
||||
<div class="CommonStudent">
|
||||
<a-drawer :visible="visiable" class="drawerStyle ProjCheckship CommonStudent" placement="right" width="60%">
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }}
|
||||
</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"/>
|
||||
</div>
|
||||
<div style="display: flex; overflow-x: auto; overflow-y: auto">
|
||||
<div class="tabs" style="min-width: 800px">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane v-if="infoType" :key="4" tab="项目内学员">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div>
|
||||
<a-form-item label="姓名:">
|
||||
<a-input v-model:value="projectParams.studentName"
|
||||
style="width: 260px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"/>
|
||||
<a-button type="primary" @click="getProjectStu" style="margin-left: 20px; border-radius: 4px">
|
||||
<template #icon>
|
||||
<SearchOutlined/>
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button type="primary" @click="resetProjectStu" style="margin-left: 20px; border-radius: 4px">重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="tableBox tabb">
|
||||
<BaseTable ref="projectStuTableRef" :columns="projectStuColumns" :url="STUDENT_LIST"
|
||||
v-model:params="projectParams" v-model:selectedRows="projectSelectRows"
|
||||
type="checkbox"></BaseTable>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane :key="1" tab="快速选人">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab1">
|
||||
<a-form-item label="姓名">
|
||||
<a-input v-model:value="nameSearch.keyword" style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"/>
|
||||
<a-button type="primary" @click="onSearchStu" style="margin-left: 20px; border-radius: 4px">
|
||||
<template #icon>
|
||||
<SearchOutlined/>
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button type="primary" @click="resetStu" style="margin-left: 20px; border-radius: 4px">重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="chooseLeft" style="display: grid; grid-template-columns: 250px auto">
|
||||
<div :style="{
|
||||
height: screenHeight - 180 + 'px',
|
||||
overflowY: 'auto',
|
||||
}" style="border: 1px solid #f0f0f0">
|
||||
<div class="tree" style="margin: 10px 4px 220px 10px">
|
||||
<a-tree allow-clear tree-default-expand-all :tree-data="treeData" :loading="orgLoading"
|
||||
:load-data="onLoadData" v-model:selectedKeys="stuTreeSelectKeys"
|
||||
v-model:expandedKeys="stuTreeExpandedKeys" :fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}" @select="stuStuOrgSelect">
|
||||
</a-tree>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableBox tabb" style="
|
||||
margin: 0px 4px 120px 10px;
|
||||
border: 1px solid #f0f0f0;
|
||||
">
|
||||
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="pageNo"
|
||||
v-model:params="nameSearch" :request="useNewRowsPageNoInit"
|
||||
v-model:selectedRows="stuSelectRows" type="checkbox"></BaseTable>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane v-if="!selectStu" :key="2" tab="添加组织">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab2">
|
||||
<a-form-item label="组织:">
|
||||
<a-input v-model:value="searchOrgName.keyword"
|
||||
style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织"
|
||||
@click="orgValue"/>
|
||||
<a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px">
|
||||
<template #icon>
|
||||
<SearchOutlined/>
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button type="primary" @click="resetOrg" style="margin-left: 20px; border-radius: 4px">重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="boeTree">
|
||||
<a-tree v-model:selectedKeys="selectedOrgKeys"
|
||||
:tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
|
||||
:loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}" row-key="id" :row-selection="orgRowSelection" multiple>
|
||||
</a-tree>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane v-if="!selectStu" :key="3" tab="受众关联">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div>
|
||||
<a-form-item label="受众名称:">
|
||||
<a-input v-model:value="audienceName.keyword"
|
||||
style="width: 260px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入受众名称"/>
|
||||
<a-button type="primary" @click="searchAudi" style="margin-left: 20px; border-radius: 4px">
|
||||
<template #icon>
|
||||
<SearchOutlined/>
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button type="primary" @click="resetAudienceInfo" style="margin-left: 20px; border-radius: 4px">
|
||||
重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="tableBox tabb">
|
||||
<BaseTable ref="auditTableRef" :columns="audiColums" :url="AUDIENCE_LIST" page-key="pageNo"
|
||||
v-model:params="audienceName" :request="useTotalPage"
|
||||
v-model:selectedRows="auditSelectRows" v-model:selectedRowKeys="auditSelectRowKeys"
|
||||
type="checkbox"></BaseTable>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
<div class="right1" style="min-width: 200px">
|
||||
<div class="onerow">
|
||||
<div class="onleft">
|
||||
<div class="already">已选</div>
|
||||
</div>
|
||||
</div>
|
||||
<div :style="{ 'max-height': screenHeight - 235 + 'px' }" style="overflow-y: auto">
|
||||
<div class="selecteds" v-if="infoType">
|
||||
<div class="person">项目内学员</div>
|
||||
<div v-for="(item, i) in projectSelectRows" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose">
|
||||
{{ item.studentName }}
|
||||
<div class="ch" @click="auditTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="person">
|
||||
<div class="chose">
|
||||
{{ item.studentName }}
|
||||
<div class="ch" @click="auditTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!member && projectSelectRows?.length > 10" class="ifsw">
|
||||
<div @click="member = !member" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="member && projectSelectRows?.length > 10" class="ifsw">
|
||||
<div @click="member = !member" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="selecteds">
|
||||
<div class="person">快速选人</div>
|
||||
<div v-for="(item, i) in stuSelectRows" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose">
|
||||
{{ item.realName }}
|
||||
<div class="ch" @click="stuTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="person">
|
||||
<div class="chose">
|
||||
{{ item.realName }}
|
||||
<div class="ch" @click="stuTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!person && stuSelectRows.length > 10" class="ifsw">
|
||||
<div @click="person = !person" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="person && stuSelectRows.length > 10" class="ifsw">
|
||||
<div @click="person = !person" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!selectStu" class="selecteds">
|
||||
<div class="dept">添加组织</div>
|
||||
<div v-for="(item, i) in deptList" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose1">
|
||||
<div class="span">{{ item.name }}</div>
|
||||
<div class="ch1" @click="orgDel(i)" style="cursor: pointer;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="dept">
|
||||
<div class="chose1">
|
||||
<div class="span">{{ item.name }}</div>
|
||||
<div class="ch1" @click="orgDel(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!dept && deptList.length > 10" class="ifsw">
|
||||
<div @click="dept = !dept" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="dept && deptList.length > 10" class="ifsw">
|
||||
<div @click="dept = !dept" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--受众-->
|
||||
<div v-if="!selectStu" class="selecteds">
|
||||
<div class="group">受众关联</div>
|
||||
<div v-for="(item, i) in auditSelectRows" :key="i">
|
||||
<div v-if="i < 11">
|
||||
<div class="chose2">
|
||||
<div class="span">{{ item.audienceName }}</div>
|
||||
<div class="ch2" @click="auditTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="group">
|
||||
<div class="chose2">
|
||||
<div class="span">{{ item.audienceName }}</div>
|
||||
<div class="ch2" @click="auditTableRef.remove(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!group && auditSelectRows.length > 10" class="ifsw">
|
||||
<div @click="group = !group" class="“sw”">查看更多></div>
|
||||
</div>
|
||||
<div v-if="group && auditSelectRows.length > 10" class="ifsw">
|
||||
<div @click="group = !group" class="sw">收起<</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn" style="display: flex;justify-content: center;">
|
||||
<button style=" cursor: pointer;border: none; margin-right: 15px;height: 38px; width: 100px;background: #4ea6ff; line-height: 38px;text-align: center;border-radius: 8px;color: #ffffff;" class="btn2" @click="closeDrawer">取消</button>
|
||||
<button style=" cursor: pointer;border: none; margin-right: 15px;height: 38px; width: 100px;background: #4ea6ff; line-height: 38px;text-align: center;border-radius: 8px;color: #ffffff;" class="btn2" @click="submitAuth">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<a-button @click="openDrawer" type="link">
|
||||
<slot></slot>
|
||||
</a-button>
|
||||
</div>
|
||||
<a-modal :style="{ padding: 0, position:'relative', right: '-20%' }" :closable="true" :visible="stageVisible"
|
||||
:footer="null" centered="true" @ok="handleStageOk" wrapClassName="changeModal">
|
||||
<div class="con">
|
||||
<div class="header">
|
||||
<div class="inhe">
|
||||
<div class="tz">{{ type === 1 ? "选择阶段" : "添加学员到关卡" }}</div>
|
||||
<div class="mg" @click="closeChangeModal"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mid">
|
||||
<div class="inher">
|
||||
<div class="select">
|
||||
<a-select style="width: 400px" :placeholder="type === 1 ? '选择阶段' : '选择关卡'" v-model:value="stageId"
|
||||
className="cus-select">
|
||||
<a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id">{{ item.name || "默认" }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<span style="color: #999999; margin-left: 10px"><minus-circle-outlined/>已在其他关卡的学员,不会被添加到该关卡</span>
|
||||
<div class="btn" style="margin-top: 50px">
|
||||
<button class="sameb btn1" @click="closeChangeModal" style="cursor: pointer">
|
||||
取消
|
||||
</button>
|
||||
<button class="sameb btn2" @click="handleDialogOk" style="cursor: pointer">
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import {message} from "ant-design-vue";
|
||||
import {computed, defineEmits, defineProps, ref, watch} from "vue";
|
||||
import {useNewRowsPageNoInit, request, useRequest, useTotalPage} from "@/api/request";
|
||||
import {
|
||||
saveStu,
|
||||
} from "@/api/index1";
|
||||
import dialog from "@/utils/dialog";
|
||||
import BaseTable from "@/components/common/BaseTable";
|
||||
import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, STUDENT_LIST, USER_LIST_PAGE} from "@/api/apis";
|
||||
|
||||
const emit = defineEmits({});
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
infoType: Number,
|
||||
infoId: Number,
|
||||
id: String,
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
clear: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
selectStu: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
selectOne: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
stage: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
isGroup: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
groupId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
groupName: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
groupMemberCount: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
groupMemberNumber: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
activeKey1: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
const projectSelectKeys = ref([]);
|
||||
const projectSelectRows = ref([]);
|
||||
const stuSelectRows = ref([]);
|
||||
const auditSelectRows = ref([]);
|
||||
const auditSelectRowKeys = ref([]);
|
||||
const deptList = ref([]);
|
||||
const member = ref(false);
|
||||
const dept = ref(false);
|
||||
const projectStuTableRef = ref();
|
||||
const stuTableRef = ref();
|
||||
const projectParams = ref({ pid: props.infoId, type: props.infoType, studentName: "" });
|
||||
|
||||
const getProjectStu = () => projectStuTableRef.value.fetch();
|
||||
const resetProjectStu = () => {
|
||||
projectParams.value.studentName = "";
|
||||
projectStuTableRef.value.reset();
|
||||
};
|
||||
|
||||
const person = ref(false);
|
||||
const group = ref(false);
|
||||
const visiable = ref(false);
|
||||
const activeKey = ref(props.infoType ? 4 : 1);
|
||||
const stageVisible = ref(false);
|
||||
const stageId = ref();
|
||||
|
||||
const nameSearch = ref({
|
||||
keyword: "",
|
||||
departId: '',
|
||||
});
|
||||
const stuTreeSelectKeys = ref([]);
|
||||
const stuTreeExpandedKeys = ref([]);
|
||||
const audienceName = ref({
|
||||
keyword: "",
|
||||
});
|
||||
const searchOrgName = ref({
|
||||
keyword: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const stageIds = computed(() => props.stage);
|
||||
|
||||
const { data: orgData, fetchData: searchOrg } = useRequest(
|
||||
ORG_LIST,
|
||||
searchOrgName.value,
|
||||
);
|
||||
const { data: treeData, loading: orgLoading } = useRequest(
|
||||
ORG_LIST,
|
||||
{ keyword: "" },
|
||||
);
|
||||
const { data: treeOrgData, loading: orgOrgLoading } = useRequest(
|
||||
ORG_LIST,
|
||||
{ keyword: "" },
|
||||
);
|
||||
|
||||
const projectStuColumns = ref([
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "studentOrgName",
|
||||
key: "studentOrgName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
const stuColumns = ref([
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "realName",
|
||||
key: "realName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "userNo",
|
||||
key: "userNo",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "orgName",
|
||||
key: "orgName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departName",
|
||||
key: "departName",
|
||||
width: 80,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
const audiColums = ref([
|
||||
{
|
||||
title: "受众名称",
|
||||
dataIndex: "audienceName",
|
||||
key: "audienceName",
|
||||
width: 30,
|
||||
align: "left",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "人数",
|
||||
dataIndex: "totalMember",
|
||||
key: "totalMember",
|
||||
width: 30,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
]);
|
||||
const orgSelectKeys = ref([]);
|
||||
const auditTableRef = ref();
|
||||
const screenHeight = ref(document.body.clientHeight);
|
||||
|
||||
const orgRowSelection = computed(() => ({
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: orgSelectKeys.value,
|
||||
onChange: onOrgSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
}));
|
||||
|
||||
const closeDrawer = () => {
|
||||
deleteDepSelect();
|
||||
visiable.value = false;
|
||||
nameSearch.value.keyword = "";
|
||||
selectedOrgKeys.value = [];
|
||||
};
|
||||
|
||||
function searchAudi() {
|
||||
auditTableRef.value.reset(audienceName.value);
|
||||
}
|
||||
|
||||
function onLoadData(treeNode) {
|
||||
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
|
||||
(r) => {
|
||||
treeNode.dataRef.treeChildList = r.data;
|
||||
treeData.value = [...treeData.value];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function onLoadOrgData(treeNode) {
|
||||
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
|
||||
(r) => {
|
||||
treeNode.dataRef.treeChildList = r.data;
|
||||
treeOrgData.value = [...treeOrgData.value];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const closeChangeModal = () => {
|
||||
stageVisible.value = false;
|
||||
};
|
||||
const openDrawer = () => {
|
||||
visiable.value = true;
|
||||
};
|
||||
|
||||
function onSearchStu() {
|
||||
stuTableRef.value.reset(nameSearch.value);
|
||||
}
|
||||
|
||||
function stuStuOrgSelect(e) {
|
||||
nameSearch.value.departId = e.join("");
|
||||
stuTableRef.value.fetch();
|
||||
}
|
||||
|
||||
const selectedOrgKeys = ref([]);
|
||||
|
||||
watch(selectedOrgKeys, () => {
|
||||
console.log("selectedKeys", selectedOrgKeys);
|
||||
});
|
||||
|
||||
function orgDel(i) {
|
||||
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== deptList.value[i].id);
|
||||
selectedOrgKeys.value.splice(i, 1);
|
||||
deptList.value.splice(i, 1);
|
||||
}
|
||||
|
||||
function onOrgSelectChange(e, l) {
|
||||
orgRowSelection.value = e;
|
||||
deptList.value = l.selectedNodes;
|
||||
}
|
||||
|
||||
const resetStu = () => {
|
||||
nameSearch.value.keyword = "";
|
||||
stuTableRef.value.reset({ keyword: "", departId: '' });
|
||||
};
|
||||
//清空选择部门信息
|
||||
const deleteDepSelect = () => {
|
||||
stuSelectRows.value = [];
|
||||
selectedOrgKeys.value = [];
|
||||
projectSelectKeys.value = [];
|
||||
};
|
||||
//重置组织
|
||||
const resetOrg = () => {
|
||||
searchOrgName.value = { keyword: "" };
|
||||
};
|
||||
//重置受众
|
||||
const resetAudienceInfo = () => {
|
||||
audienceName.value.keyword = "";
|
||||
auditTableRef.value.reset({ keyword: "" });
|
||||
};
|
||||
|
||||
//确定添加授权
|
||||
const submitAuth = () => {
|
||||
if (props.type === 2) {
|
||||
stageVisible.value = true;
|
||||
} else {
|
||||
handleDialogOk();
|
||||
}
|
||||
};
|
||||
|
||||
function handleDialogOk() {
|
||||
if (auditSelectRowKeys.value.length || deptList.value.length) {
|
||||
dialog({ content: "您选择了组织或受众,此添加为异步添加,请稍后手动刷新学员!", ok: handleStageOk });
|
||||
return;
|
||||
}
|
||||
handleStageOk();
|
||||
}
|
||||
|
||||
function handleStageOk() {
|
||||
if (props.type === 1 && props.groupId && (props.groupMemberCount < (props.groupMemberNumber * 1 + projectSelectRows.value.length + stuSelectRows.value.length))) {
|
||||
return message.warning("添加小组学员超过最大值");
|
||||
}
|
||||
stageVisible.value = false;
|
||||
visiable.value = false;
|
||||
emit("finash", false);
|
||||
nameSearch.value.keyword = "";
|
||||
saveStu({
|
||||
targetId: props.id,
|
||||
type: props.type,
|
||||
clear: props.clear,
|
||||
deptIds: deptList.value?.map((e) => e.id),
|
||||
stageId: stageId.value,
|
||||
groupIds: auditSelectRows.value?.map((e) => e.id),
|
||||
studentList: stuSelectRows.value,
|
||||
projectList: projectSelectRows.value,
|
||||
groupName: props.groupName,
|
||||
groupId: props.groupId,
|
||||
}).then(() => {
|
||||
deleteDepSelect();
|
||||
emit("finash", true);
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索受众值发生变化
|
||||
function orgValue(value) {
|
||||
console.log("", value.target.value);
|
||||
searchOrgName.value.keyword = value.target.value;
|
||||
}
|
||||
|
||||
watch(visiable, () => {
|
||||
orgSelectKeys.value = [];
|
||||
deptList.value = [];
|
||||
audienceName.value.keyword = "";
|
||||
nameSearch.value.departId = '';
|
||||
stuTreeExpandedKeys.value = [];
|
||||
stuTreeSelectKeys.value = [];
|
||||
activeKey.value = props.isGroup ? 4 : 1;
|
||||
|
||||
projectParams.value.studentName = "";
|
||||
nameSearch.value.keyword = "";
|
||||
searchOrgName.value.keyword = "";
|
||||
audienceName.value.keyword = "";
|
||||
|
||||
if (!visiable.value) {
|
||||
auditTableRef.value && auditTableRef.value.clear();
|
||||
auditTableRef.value && auditTableRef.value.reset({ keyword: "" });
|
||||
stuTableRef.value && stuTableRef.value.clear();
|
||||
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: '' });
|
||||
projectStuTableRef.value && projectStuTableRef.value.clear();
|
||||
projectStuTableRef.value && projectStuTableRef.value.reset({ pid: props.infoId, type: props.infoType, studentName: "" });
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.CommonStudent > .ant-drawer-content-wrapper {
|
||||
min-width: 1200px !important;
|
||||
width: 1200px !important;
|
||||
}
|
||||
|
||||
.CommonStudent {
|
||||
.ant-btn-primary {
|
||||
background-color: #4ea6ff !important;
|
||||
}
|
||||
|
||||
.cus-select {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.tableBox .ant-table-row .ant-table-cell {
|
||||
height: 48px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4f5156;
|
||||
line-height: 29px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.tableBox .ant-table-thead tr th {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.ant-tabs-tabpane {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ant-tabs {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.right1 {
|
||||
border-left: 1px solid #f2f6fe;
|
||||
margin-left: 20px;
|
||||
|
||||
.onerow {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-right: 40px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
width: 100%;
|
||||
|
||||
.onleft {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
|
||||
.already {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
margin-left: 32px;
|
||||
white-space: nowrap;
|
||||
// margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.count {
|
||||
color: #4ea6ff;
|
||||
font-size: 16px;
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.peo {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.clbox {
|
||||
margin-right: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
width: 104px;
|
||||
height: 32px;
|
||||
border-radius: 4px;
|
||||
background: #4ea6ff;
|
||||
|
||||
.colose {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
// border-radius: 8px;
|
||||
// background: #ffffff;
|
||||
// position: relative;
|
||||
background-image: url(../../assets/images/basicinfo/ch.png);
|
||||
background-size: 100%;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.allclear {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.selecteds {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: 32px;
|
||||
|
||||
.person {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
border-top: 1px solid #f2f6fe;
|
||||
}
|
||||
|
||||
.chose {
|
||||
width: 64px;
|
||||
height: 24px;
|
||||
margin-top: 25px;
|
||||
margin-right: 25px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgba(56, 139, 225, 1);
|
||||
color: rgba(56, 139, 225, 1);
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
|
||||
.ch {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/basicinfo/ch.png);
|
||||
right: -8px;
|
||||
top: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
.ifsw {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
justify-content: center;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.sw {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: justify;
|
||||
color: #4ea6ff;
|
||||
margin-top: 23px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.dept {
|
||||
width: 100%;
|
||||
margin-top: 30px;
|
||||
border-top: 1px solid #f2f6fe;
|
||||
}
|
||||
|
||||
.chose1 {
|
||||
//width: 90px;
|
||||
height: 24px;
|
||||
margin-top: 25px;
|
||||
margin-right: 25px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgba(56, 139, 225, 1);
|
||||
color: rgba(56, 139, 225, 1);
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
|
||||
.span {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ch1 {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/basicinfo/ch.png);
|
||||
right: -8px;
|
||||
top: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
.group {
|
||||
width: 100%;
|
||||
margin-top: 30px;
|
||||
border-top: 1px solid #f2f6fe;
|
||||
}
|
||||
|
||||
.chose2 {
|
||||
//width: 120px;
|
||||
height: 24px;
|
||||
margin-top: 25px;
|
||||
margin-right: 25px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgba(56, 139, 225, 1);
|
||||
color: rgba(56, 139, 225, 1);
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
|
||||
.span {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ch2 {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/basicinfo/ch.png);
|
||||
right: -8px;
|
||||
top: -8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,7 @@ import {getexamineList,CreateAuthentication,delExamine,getOnlineLearningList,del
|
||||
import dialog from "@/utils/dialog";
|
||||
import DropDown from "@/components/common/DropDown";
|
||||
import OwnerTableModelStudent from "./tablemodel";
|
||||
import CommonStudent from "@/components/student/CommonStudent";
|
||||
import CommonStudent from "./CommonTeacher";
|
||||
import CreateOnline from "@/components/drawers/CreateOnline.vue";
|
||||
import { message } from "ant-design-vue";
|
||||
const route = useRoute()
|
||||
@@ -390,14 +390,15 @@ function handleOper(record, type, status = "") {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="Administrator===0" @click="OnlineLearning" style="height: 38px; width: 150px;background: #4ea6ff;line-height: 40px;text-align: center;border-radius: 8px;color: #ffffff;">线上学习课程设置</div>
|
||||
<div style="display: flex;justify-content: space-between;align-self: end;">
|
||||
<div v-if="Administrator===0" @click="OnlineLearning" style=" cursor: pointer;margin-right: 15px;height: 38px; width: 150px;background: #4ea6ff; line-height: 40px;text-align: center;border-radius: 8px;color: #ffffff;">线上学习课程设置</div>
|
||||
<div class="btns" @click="centerDialogVisible=true">
|
||||
<div class="btn btn3">
|
||||
<div style="margin-right: 0;" class="btn btn3">
|
||||
<div class="search"></div>
|
||||
<div class="btnText" @click="createData">创建认证</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup >
|
||||
import { ref,reactive,onMounted,computed } from 'vue'
|
||||
import { ref,reactive,onMounted,computed,watch } from 'vue'
|
||||
import { message } from 'ant-design-vue';
|
||||
import AddInstructor from './AddInstructor.vue'
|
||||
import LeadInstructor from './LeadInstructor.vue'
|
||||
@@ -55,12 +55,18 @@ const InitReview = () => {
|
||||
const teacherid = ref(null)
|
||||
//发起评审
|
||||
const startReviewSave = async () => {
|
||||
console.log(formState.reviewname, formState.time, teacherid.value, 333333);
|
||||
if (formState.reviewname === '' && formState.time === '') {
|
||||
if (formState.time==="") {
|
||||
return message.info('请填写评审名称和评审时间');
|
||||
|
||||
}
|
||||
|
||||
if (formState.reviewname==="" ) {
|
||||
|
||||
return message.info('请填写评审名称和评审时间');
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!rwname.value) {
|
||||
reviewSave({
|
||||
"examineId": route.query.id,
|
||||
@@ -99,25 +105,26 @@ const startReviewSave = async () => {
|
||||
if (res) {
|
||||
getReviewList()
|
||||
message.info('编辑成功');
|
||||
InitiateReviewShow.value = false
|
||||
|
||||
formState = {
|
||||
reviewname: '',
|
||||
time: '',
|
||||
};
|
||||
rwname.value = null
|
||||
InitiateReviewShow.value = false
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
// .catch(err=>{
|
||||
// console.log(err);
|
||||
// if (err) {
|
||||
// InitiateReviewShow.value = false
|
||||
.catch(err=>{
|
||||
console.log(err);
|
||||
if (err) {
|
||||
InitiateReviewShow.value = false
|
||||
|
||||
// message.info('编辑失败');
|
||||
message.info('编辑失败');
|
||||
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -291,6 +298,7 @@ const ReviewPageNo = ref(1)
|
||||
//发起评审列表
|
||||
const getReviewList = async () => {
|
||||
const res = await getReview({
|
||||
examineId:route.query.id,
|
||||
pageNo: ReviewPageNo.value,
|
||||
pageSize: 8,
|
||||
reviewName: ""
|
||||
@@ -329,7 +337,6 @@ const getreviewdetail = async (object) => {
|
||||
console.log(res, 'cscs成熟市场');
|
||||
ViewReList.value = res.data
|
||||
remould()
|
||||
|
||||
}
|
||||
//删除评审
|
||||
function handleOperReview(record) {
|
||||
@@ -662,20 +669,9 @@ const teacherRowSelection = {
|
||||
onChange: async (selectedRowKeys, selectedRows) => {
|
||||
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
||||
teacherid.value = selectedRowKeys
|
||||
console.log(selectedRows[0].teacherName,'老师名字');
|
||||
let arr = ref([])
|
||||
selectedRows.forEach((item,index)=>{
|
||||
arr.value.push(item.teacherName)
|
||||
})
|
||||
// 使用Set数据结构进行数组去重
|
||||
let uniqueArr = [...new Set(arr.value)];
|
||||
console.log(uniqueArr); // 去重后的数组
|
||||
teacherNames.value = selectedRows
|
||||
|
||||
selectedRows.forEach((item, index) => {
|
||||
teacherNames.value.push(item.teacherName)
|
||||
})
|
||||
|
||||
// teacherNames.value = selectedRows.teacherName
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
@@ -1210,7 +1206,7 @@ const vwtext = ref(null)
|
||||
<div >
|
||||
<div v-for="(item,i) in teacherNames" :key="i">
|
||||
<div class="chose">
|
||||
{{item}}
|
||||
{{item.teacherName}}
|
||||
<div class="ch" ></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
:visible="visiable"
|
||||
class="drawerStyle ProjCheckship"
|
||||
placement="right"
|
||||
width="40%"
|
||||
width="50%"
|
||||
>
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="header" style="margin-bottom: 10px;">
|
||||
<div class="headerTitle">权限名单</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
@@ -89,9 +89,9 @@
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
<div class="btn" style="display: flex;justify-content: center;margin-top: 200px">
|
||||
<button class="btn2" @click="closeDrawer" style=" cursor: pointer;border: none; margin-right: 15px;height: 38px; width: 100px;background: #4ea6ff; line-height: 38px;text-align: center;border-radius: 8px;color: #ffffff;">取消</button>
|
||||
<button class="btn2" @click="closeDrawer" style=" cursor: pointer;border: none;height: 38px; width: 100px;background: #4ea6ff; line-height: 38px;text-align: center;border-radius: 8px;color: #ffffff;">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }}
|
||||
添加讲师
|
||||
</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"/>
|
||||
|
||||
Reference in New Issue
Block a user