--fix bug

This commit is contained in:
yuping
2023-04-03 18:12:54 +08:00
parent 25a8b57232
commit 908dd886af
2 changed files with 23 additions and 21 deletions

View File

@@ -102,9 +102,9 @@ const changePagination = (e) => {
nextTick(onFetch); nextTick(onFetch);
}; };
function reset(v = {}) { function reset(v) {
params.reset(); params.reset();
emit("update:params", { ...v }); v && emit("update:params", { ...v });
nextTick(onFetch); nextTick(onFetch);
} }
@@ -115,11 +115,11 @@ function resetSelected() {
emit("update:selectedRows", []); emit("update:selectedRows", []);
} }
function clear(v = {}) { function clear(v) {
rowSelectKeys.value = []; rowSelectKeys.value = [];
selectsData.value = []; selectsData.value = [];
params.reset(); params.reset();
emit("update:params", { ...v }); v && emit("update:params", { ...v });
emit("update:selectedRowKeys", []); emit("update:selectedRowKeys", []);
emit("update:selectedRows", []); emit("update:selectedRows", []);
} }

View File

@@ -47,7 +47,7 @@
<a-button type="primary" @click="onSearchStu" style="margin-left: 20px; border-radius: 4px"> <a-button type="primary" @click="onSearchStu" style="margin-left: 20px; border-radius: 4px">
<template #icon> <template #icon>
<SearchOutlined/> <SearchOutlined/>
</template> </template>
搜索 搜索
</a-button> </a-button>
<a-button type="primary" @click="resetStu" style="margin-left: 20px; border-radius: 4px">重置 <a-button type="primary" @click="resetStu" style="margin-left: 20px; border-radius: 4px">重置
@@ -93,7 +93,7 @@
<template #icon> <template #icon>
<SearchOutlined/> <SearchOutlined/>
</template> </template>
搜索 搜索
</a-button> </a-button>
<a-button type="primary" @click="resetOrg" style="margin-left: 20px; border-radius: 4px">重置 <a-button type="primary" @click="resetOrg" style="margin-left: 20px; border-radius: 4px">重置
</a-button> </a-button>
@@ -122,8 +122,8 @@
<a-button type="primary" @click="searchAudi" style="margin-left: 20px; border-radius: 4px"> <a-button type="primary" @click="searchAudi" style="margin-left: 20px; border-radius: 4px">
<template #icon> <template #icon>
<SearchOutlined/> <SearchOutlined/>
</template> </template>
搜索 搜索
</a-button> </a-button>
<a-button type="primary" @click="resetAudienceInfo" style="margin-left: 20px; border-radius: 4px"> <a-button type="primary" @click="resetAudienceInfo" style="margin-left: 20px; border-radius: 4px">
重置 重置
@@ -273,7 +273,8 @@
<div class="mid"> <div class="mid">
<div class="inher"> <div class="inher">
<div class="select"> <div class="select">
<a-select style="width: 400px" :placeholder="type === 1 ? '选择阶段' : '选择关卡'" v-model:value="stageId" className="cus-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 v-for="(item, i) in stageIds" :key="i" :value="item.id">{{ item.name || "默认" }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@@ -374,12 +375,12 @@ const member = ref(false);
const dept = ref(false); const dept = ref(false);
const projectStuTableRef = ref(); const projectStuTableRef = ref();
const stuTableRef = ref(); const stuTableRef = ref();
const projectParams = ref({ pid: props.infoId, type: props.infoType, studentName:"" }); const projectParams = ref({ pid: props.infoId, type: props.infoType, studentName: "" });
const getProjectStu = () => projectStuTableRef.value.fetch(); const getProjectStu = () => projectStuTableRef.value.fetch();
const resetProjectStu = () => { const resetProjectStu = () => {
projectParams.value.studentName = ""; projectParams.value.studentName = "";
projectStuTableRef.value.reset() projectStuTableRef.value.reset();
}; };
const person = ref(false); const person = ref(false);
@@ -604,7 +605,7 @@ function onOrgSelectChange(e, l) {
const resetStu = () => { const resetStu = () => {
nameSearch.value.keyword = ""; nameSearch.value.keyword = "";
stuTableRef.value.reset({ keyword: "", departId: null }) stuTableRef.value.reset({ keyword: "", departId: null });
}; };
//清空选择部门信息 //清空选择部门信息
const deleteDepSelect = () => { const deleteDepSelect = () => {
@@ -619,7 +620,7 @@ const resetOrg = () => {
//重置受众 //重置受众
const resetAudienceInfo = () => { const resetAudienceInfo = () => {
audienceName.value.keyword = ""; audienceName.value.keyword = "";
auditTableRef.value.reset({ keyword: "" }) auditTableRef.value.reset({ keyword: "" });
}; };
//确定添加授权 //确定添加授权
@@ -680,25 +681,26 @@ watch(visiable, () => {
activeKey.value = props.isGroup ? 4 : 1; activeKey.value = props.isGroup ? 4 : 1;
projectParams.value.studentName = ""; projectParams.value.studentName = "";
nameSearch.value.keyword = ""; nameSearch.value.keyword = "";
searchOrgName.value.keyword = ""; searchOrgName.value.keyword = "";
audienceName.value.keyword = ""; audienceName.value.keyword = "";
if (!visiable.value) { if (!visiable.value) {
auditTableRef.value && auditTableRef.value.resetSelected() && auditTableRef.value.clear(); auditTableRef.value && auditTableRef.value.clear();
auditTableRef.value && auditTableRef.value.reset({ keyword: "" }); auditTableRef.value && auditTableRef.value.reset({ keyword: "" });
stuTableRef.value && stuTableRef.value.resetSelected() && stuTableRef.value.clear(); stuTableRef.value && stuTableRef.value.clear();
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: null }); stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: null });
projectStuTableRef.value && projectStuTableRef.value.resetSelected() && projectStuTableRef.value.clear(); projectStuTableRef.value && projectStuTableRef.value.clear();
projectStuTableRef.value && projectStuTableRef.value.reset(); projectStuTableRef.value && projectStuTableRef.value.reset({ pid: props.infoId, type: props.infoType, studentName: "" });
} }
}); });
</script> </script>
<style lang="scss"> <style lang="scss">
.CommonStudent > .ant-drawer-content-wrapper { .CommonStudent > .ant-drawer-content-wrapper {
min-width: 1200px !important; min-width: 1200px !important;
width: 1200px !important; width: 1200px !important;
} }
.CommonStudent { .CommonStudent {
.ant-btn-primary { .ant-btn-primary {
background-color: #4ea6ff !important; background-color: #4ea6ff !important;