158 lines
4.9 KiB
Vue
158 lines
4.9 KiB
Vue
<template>
|
|
<div style="background: #fff;height: calc(100vh - 225px);overflow-y: auto;overflow-x: hidden;margin-top:10px;">
|
|
<!--查询区域-->
|
|
<div class="jeecg-basic-table-form-container">
|
|
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
<a-row :gutter="24" style="margin-top: 10px;">
|
|
<a-col :lg="8">
|
|
<a-form-item label="标题">
|
|
<j-input placeholder="请输入标题" v-model:value="queryParam.title"></j-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
|
<a-col :lg="6">
|
|
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
|
</a-col>
|
|
</span>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form>
|
|
</div>
|
|
<a-row>
|
|
<a-col :span="24" v-for="(item,index) in dataSource" style="padding: 5px 10px;">
|
|
<a-collapse expand-icon-position="right" v-model:activeKey="activeKey" class="animateItem" >
|
|
<a-collapse-panel :key="String(index)" forceRender >
|
|
<template #header>
|
|
<sapn style="font-size: 16px; font-weight: bold;">{{index+1}}.{{item.title}}</sapn>
|
|
</template>
|
|
<div v-html="item.content"></div>
|
|
<!-- <setting-outlined /> -->
|
|
<template #extra>
|
|
<sapn>【{{item.createTime}}】</sapn>
|
|
<sapn style="margin-left: 30px;">详情</sapn>
|
|
</template>
|
|
</a-collapse-panel>
|
|
</a-collapse>
|
|
</a-col>
|
|
<a-col :span="24" v-show="dataSource.length>0" style="margin-top:10px;">
|
|
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
|
|
</a-col>
|
|
<a-col :span="24" v-show="dataSource.length==0" style="margin-top:10px;">
|
|
<a-empty/>
|
|
</a-col>
|
|
</a-row>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" name="zyGonggao-zyGonggao" setup>
|
|
import { ref, reactive, unref, onMounted } from 'vue';
|
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
import { useMessage } from "/@/hooks/web/useMessage";
|
|
import { JInput } from '/@/components/Form';
|
|
import { useRouter } from 'vue-router';
|
|
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
|
|
|
|
const { createConfirm } = useMessage();
|
|
|
|
const APagination = Pagination;
|
|
const { currentRoute } = useRouter();
|
|
const { query } = unref(currentRoute);
|
|
const { rwbh,xqxn,teano } = query;//获取传递参数
|
|
const queryParam = ref<any>({ rwbh,xqxn,teano ,ggStatus:'1'});
|
|
const current = ref<number>(0);
|
|
const total = ref<number>(0);
|
|
const pageNo = ref<number>(0);
|
|
const pageSize = ref<number>(10);
|
|
const dataSource = ref([]);
|
|
//注册table数据
|
|
const labelCol = reactive({
|
|
xs: { span: 24 },
|
|
sm: { span: 7 },
|
|
});
|
|
const wrapperCol = reactive({
|
|
xs: { span: 24 },
|
|
sm: { span: 16 },
|
|
});
|
|
let activeKey = ref(['0','1','2','3','4','5','6','7','8','9']);
|
|
|
|
/**
|
|
* 查询
|
|
*/
|
|
function searchQuery() {
|
|
total.value = 1;
|
|
handlePageChange(1);
|
|
}
|
|
|
|
/**
|
|
* 重置
|
|
*/
|
|
function searchReset() {
|
|
queryParam.value = {};
|
|
queryParam.value.rwbh = rwbh;
|
|
queryParam.value.xqxn = xqxn;
|
|
queryParam.value.teano = teano;
|
|
queryParam.value.ggStatus='1';
|
|
total.value = 1;
|
|
handlePageChange(1);
|
|
}
|
|
|
|
//翻页
|
|
function handlePageChange(page: number) {
|
|
current.value = page;
|
|
reload();
|
|
}
|
|
|
|
function reload(){
|
|
queryParam.value.pageNo = current.value;
|
|
queryParam.value.pageSize = pageSize.value;
|
|
queryParam.value.rwbh = rwbh;
|
|
queryParam.value.xqxn = xqxn;
|
|
queryParam.value.teano = teano;
|
|
queryParam.value.column="createTime";
|
|
queryParam.value.order="desc";
|
|
console.log(`🚀 ~ reload ~ queryParam:`, queryParam)
|
|
defHttp.get({ url: '/zyGonggao/zyGonggao/list', params: queryParam.value }).then((res) => {
|
|
console.log(res);
|
|
dataSource.value = res.records;
|
|
for(var i=0;i<dataSource.value.length;i++){
|
|
var key = i+"";
|
|
activeKey.push(...key);
|
|
}
|
|
console.log(`🚀 ~ defHttp.get ~ activeKey:`, activeKey)
|
|
total.value = res.total;
|
|
pageNo.value = res.pages;
|
|
current.value = res.current;
|
|
});
|
|
}
|
|
|
|
//进入就加载
|
|
onMounted(() => {
|
|
searchQuery();
|
|
});
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.jeecg-basic-table-form-container {
|
|
padding: 0;
|
|
width:99%;
|
|
.table-page-search-submitButtons {
|
|
display: block;
|
|
margin-bottom: 24px;
|
|
white-space: nowrap;
|
|
}
|
|
.query-group-cust{
|
|
width: calc(50% - 15px);
|
|
min-width: 100px !important;
|
|
}
|
|
.query-group-split-cust{
|
|
width: 30px;
|
|
display: inline-block;
|
|
text-align: center
|
|
}
|
|
}
|
|
</style>
|