123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- <template>
- <div class="law-container">
- <div class="law-container-inner">
- <LawDetailsPopup
- ref="lawRef"
- class="law-container-inner-details"
- @lawDetailsClose="lawDetailsClose"
- ><FilePreview ref="lawFilePreview"
- /></LawDetailsPopup>
- <div class="header">
- <div class="header-title">法律法规</div>
- <div class="header-select">
- <div>
- <div class="text">类型 :</div>
- <NewSelect
- :placeholder="'请选择审计法律类别'"
- class="select-input"
- v-model="typeSelectVal"
- :options="typeOptions"
- :value="typeSelectVal"
- />
- </div>
- <div>
- <div class="text">年份 :</div>
- <NewSelect
- :placeholder="'请选择年份'"
- class="select-input"
- v-model="timeSelectVal"
- :options="timeOptions"
- :value="timeSelectVal"
- />
- </div>
- <div style="position: relative">
- <el-button
- size="big"
- type="text"
- icon="el-icon-search"
- style="
- position: absolute;
- bottom: 4px;
- right: 10px;
- z-index: 99;
- color: #fff;
- "
- ></el-button>
- <el-input class="search-input" v-model="searchInput"> </el-input>
- </div>
- </div>
- <div class="reset-btn" @click="resetEvent">重置</div>
- <div class="query-btn" @click="queryEvent">查询</div>
- </div>
- <div class="center">
- <el-table
- :data="tableData"
- style="width: 100%"
- max-height="600"
- @current-change="handleClick"
- >
- <el-table-column type="index" width="150" label="序号" align="center">
- </el-table-column>
- <el-table-column prop="type" label="类别" align="center">
- </el-table-column>
- <el-table-column
- prop="title"
- label="文件名称"
- align="center"
- width="250"
- >
- </el-table-column>
- <el-table-column prop="class" label="等级" align="center">
- </el-table-column>
- <el-table-column prop="date" label="日期" align="center">
- </el-table-column>
- </el-table>
- </div>
- <div class="footer">
- <Pagination class="pagination-style" :paginationData="paginationData" />
- </div>
- </div>
- </div>
- </template>
- <script>
- import NewSelect from "@/components/common/NewSelect.vue";
- import Pagination from "@/components/common/Pagination.vue";
- // 法律法规细节文档弹窗
- import LawDetailsPopup from "@/components/popup/LawDetailsPopup.vue";
- import FilePreview from "@/components/common/FilePreView.vue";
- import { lawType } from "@/config/common";
- /**
- * 法律法规 页面 -- 智能辅助,疑点相关的法律法规
- * @author: Gao Lu
- * @Date: 2022.11.24
- */
- export default {
- name: "LawView",
- components: { NewSelect, Pagination, LawDetailsPopup, FilePreview },
- data() {
- return {
- searchInput: "",
- sortSelectVal: "",
- sortOptions: [],
- typeSelectVal: "",
- typeOptions: [],
- timeSelectVal: "",
- timeOptions: [],
- tableData: [],
- currentPageSize: 5,
- currentPage: 1,
- lawBaseUrl: "/dms",
- paginationData: {
- pageSize: 0,
- pagerCount: 5,
- currentPage: 1,
- pageSizes: [5, 10, 20, 30],
- total: 30,
- currentChange: (val) => {
- this.getTableData(val);
- },
- handleSizeChange: (val) => {
- this.handleSizeChange(val);
- },
- },
- };
- },
- created() {
- this.timeOptions = [];
- this.typeOptions = [];
- // 时间选择
- for (let i = 1980; i < 2023; i++) {
- this.timeOptions.unshift({
- value: i,
- label: i,
- });
- }
- for (let key in lawType) {
- this.typeOptions.unshift({
- value: key,
- label: key,
- });
- }
- this.getTableData(1);
- },
- methods: {
- queryEvent() {
- console.log("查询");
- },
- resetEvent() {
- console.log("重置");
- },
- // 切换页
- getTableData(val) {
- console.log(`当前页: ${val}`);
- this.tableData = [];
- let params = new FormData();
- params = {
- columnId: 58,
- states: 1,
- pageSize: this.currentPageSize,
- page: val - 1,
- };
- this.$Post(this.urlsCollection.selectContentListInfo, params).then(
- (res) => {
- console.log(res, "当前的法律法规");
- if (res.code === 200 && res.content.length > 0) {
- console.log(res.content, "查询到的法律法规相关的数据");
- this.paginationData.currentPage = val;
- this.tableData = res.content.map((v) => {
- return {
- id: v.id || "",
- title: v.c_name || "--",
- type: v.type || "--",
- class: v.class || "--",
- date: v.c_date || "--",
- address: v.c_pdf || "",
- };
- });
- }
- },
- (error) => {
- console.log(error);
- }
- );
- },
- // 切换条数
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- this.currentPageSize = val;
- this.getTableData(this.currentPage);
- },
- // 开启弹窗
- handleClick(row) {
- console.log(row.address, "--address");
- this.$refs.lawRef.title = row.title;
- this.$refs.lawRef.time = row.date;
- this.$refs.lawRef.lawDetailsPopupShow = true;
- this.$nextTick(() => {
- if (this.$refs.lawFilePreview) {
- this.$refs.lawFilePreview.showView(this.lawBaseUrl + row.address);
- }
- });
- },
- // 关闭弹窗
- lawDetailsClose() {
- if (this.$refs.lawFilePreview) {
- this.$refs.lawFilePreview.cancel();
- }
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .law-container {
- display: flex;
- align-items: center;
- justify-content: center;
- &-inner {
- width: 98%;
- height: 97%;
- background: rgba(0, 39, 77, 0.5);
- position: relative;
- &-details {
- width: 100%;
- height: 100%;
- position: absolute;
- z-index: 9999;
- }
- .header {
- height: 120px;
- width: 100%;
- position: absolute;
- &-title {
- width: 84px;
- height: 20px;
- font-size: 20px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #4dc3ff;
- line-height: 30px;
- position: absolute;
- top: 1px;
- left: 10px;
- }
- &-select {
- position: absolute;
- left: 10px;
- bottom: 5px;
- width: 950px;
- height: 40px;
- color: #e6e6e6;
- display: flex;
- justify-content: space-between;
- & > div {
- // position: absolute;
- display: flex;
- justify-content: flex-start;
- width: 280px;
- .text {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 80px;
- height: 28px;
- }
- .select-input {
- width: 190px;
- }
- .search-input {
- position: absolute;
- // right: -50px;
- bottom: 5px;
- width: 280px;
- }
- }
- }
- .reset-btn,
- .query-btn {
- width: 60px;
- height: 30px;
- border-radius: 3px;
- border: none;
- color: #fff;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- position: absolute;
- top: 15px;
- }
- .reset-btn {
- right: 110px;
- background: rgba(129, 140, 164, 1);
- }
- .query-btn {
- right: 30px;
- background-image: linear-gradient(
- to top,
- rgba(79, 172, 254, 1),
- rgba(0, 242, 254, 1)
- );
- }
- }
- .center {
- height: calc(90% - 120px);
- width: 100%;
- position: absolute;
- overflow: auto;
- top: 130px;
- // background: red;
- /deep/.el-table {
- background: rgba(0, 39, 77, 0.6);
- // font-size: 0.95rem;
- font-family: PingFang SC;
- font-weight: 500;
- thead {
- color: #4dc3ff;
- font-size: 15px;
- }
- }
- }
- .footer {
- position: absolute;
- right: 50px;
- bottom: 30px;
- }
- }
- }
- </style>
|