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

View File

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