This commit is contained in:
NiSen
2023-06-21 15:44:17 +08:00
parent 0eae5e8bac
commit f0e57ef8d3
2 changed files with 10 additions and 16 deletions

View File

@@ -30,6 +30,7 @@
<div class="btnText">已选择 <span style="color:#4ea6ff ;">{{ state.selectedRowKeys.length }}</span> 条案例</div> <div class="btnText">已选择 <span style="color:#4ea6ff ;">{{ state.selectedRowKeys.length }}</span> 条案例</div>
</div> </div>
</div> </div>
<!-- 表格 -->
<div style="display: flex; overflow-x: auto; overflow-y: auto;justify-content: space-between;"> <div style="display: flex; overflow-x: auto; overflow-y: auto;justify-content: space-between;">
<div class="tableBox" style="margin-top: 30px;min-height: 800px;overflow: hidden;"> <div class="tableBox" style="margin-top: 30px;min-height: 800px;overflow: hidden;">
<a-table style="border: 1px solid #f2f6fe;" :columns="state.columns" :data-source="state.dataSource" <a-table style="border: 1px solid #f2f6fe;" :columns="state.columns" :data-source="state.dataSource"
@@ -75,6 +76,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 底部按钮和下一步的弹窗 -->
<div class="btnn"> <div class="btnn">
<button class="btn2" @click="closeDrawer">取消</button> <button class="btn2" @click="closeDrawer">取消</button>
<CommonRecommend :type="state.type" :id="state.selectedRowKeys" @finash="submitCall" :stage="state.stage"> <CommonRecommend :type="state.type" :id="state.selectedRowKeys" @finash="submitCall" :stage="state.stage">
@@ -132,14 +134,14 @@
<!-- 下一步添加学员 --> <!-- 下一步添加学员 -->
</template> </template>
<script setup> <script setup>
import { reactive, onMounted, ref, watch, computed, nextTick } from 'vue'; import { reactive, ref, watch, computed, nextTick } from 'vue';
import { Form, message } from "ant-design-vue"; import { Form, message } from "ant-design-vue";
import axios from "axios"; import axios from "axios";
import Cookies from "vue-cookies"; import Cookies from "vue-cookies";
import { downloadErrorData } from '@/api/case' import { downloadErrorData } from '@/api/case'
import useDownload from '@/hooks/useDownload' import useDownload from '@/hooks/useDownload'
import CommonRecommend from "@/components/CaseManage/CommonRecommend"; import CommonRecommend from "@/components/CaseManage/CommonRecommend";
const props = defineProps({ defineProps({
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false
@@ -158,7 +160,7 @@ const state = reactive({
selectedRowKeys: [],//案例标题的id selectedRowKeys: [],//案例标题的id
selectedRow: [],//选择的每一行数据 selectedRow: [],//选择的每一行数据
dataSource: [],//表格的数据 dataSource: [],//表格的数据
AMvisible: false, AMvisible: false,//导入modal框显示隐藏
imptProgress: false, imptProgress: false,
uploadpercent: -1,//导入进度 uploadpercent: -1,//导入进度
uploadErr: false, //上传失败 uploadErr: false, //上传失败
@@ -224,6 +226,7 @@ const pagination = computed(() => ({
})); }));
const changePagination = (e) => { const changePagination = (e) => {
console.log(e); console.log(e);
loading.value = false
searchDataInfo.pageIndex = e searchDataInfo.pageIndex = e
nextTick(getTopList); nextTick(getTopList);
}; };
@@ -235,15 +238,12 @@ const rowSelection = computed(() => {
preserveSelectedRowKeys: true, preserveSelectedRowKeys: true,
} }
}); });
const onSelectChange = (selectedRowKeys, selectedRow) => { const onSelectChange = (selectedRowKeys, selectedRow) => {
console.log("selectedRowKeys", selectedRowKeys); console.log("selectedRowKeys", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys state.selectedRowKeys = selectedRowKeys
state.selectedRow = selectedRow state.selectedRow = selectedRow
}; };
// 请求列表数据是formdata类型的 // 请求列表数据是formdata类型的
const getTopList = () => { const getTopList = () => {
console.log(state.selectedRowKeys); console.log(state.selectedRowKeys);
@@ -272,12 +272,6 @@ const getTopList = () => {
}) })
} }
getTopList() getTopList()
onMounted(() => {
// console.log(window.location.protocol);
})
// 搜索 // 搜索
const handleSearch = (num) => { const handleSearch = (num) => {
@@ -320,7 +314,6 @@ const hideModal = () => {
console.log('确定'); console.log('确定');
state.AMvisible = false state.AMvisible = false
} }
//改变
//上传文件 //上传文件
const handleChange = (info) => { const handleChange = (info) => {
console.log("info", info); console.log("info", info);

View File

@@ -51,8 +51,8 @@
</a-table> </a-table>
</div> </div>
<div class="pa"> <div class="pa">
<a-pagination :pageSize="searchData.pageSize" :current="searchData.pageIndex" <a-pagination :pageSize="searchData.pageSize" :current="searchData.pageIndex" :total="state.total"
:total="state.total" class="pagination" @change="handelChangePage" show-size-changer/> class="pagination" @change="handelChangePage" show-size-changer />
</div> </div>
<InitiateRecommend v-model:visible="newNext" :title="添加案例"></InitiateRecommend> <InitiateRecommend v-model:visible="newNext" :title="添加案例"></InitiateRecommend>
</div> </div>
@@ -184,7 +184,7 @@ const recommendTimeList = ref([]);
const loading = ref(false) const loading = ref(false)
const getList = (num) => { const getList = (num) => {
if (num === 1) searchData.value.pageIndex = 1; if (num === 1) searchData.value.pageIndex = 1;
boeRequest( boeRequest(
RECOMMEND_PAGE, RECOMMEND_PAGE,
searchData.value searchData.value
@@ -251,6 +251,7 @@ function handleOper(record, type) {
const handelChangePage = (page, pageSize) => { const handelChangePage = (page, pageSize) => {
loading.value = false
searchData.value.pageSize = pageSize searchData.value.pageSize = pageSize
searchData.value.pageIndex = page; searchData.value.pageIndex = page;
getList(); getList();