123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <template>
- <div class="law-related" v-if="lawPopupShow" v-drag>
- <LawDetailsPopup
- ref="lawDetailsRef"
- class="law-details-popup"
- @lawDetailsClose="lawDetailsClose"
- >
- <FilePreView style="width: 100%; height: 100%" ref="lawFileRef" />
- </LawDetailsPopup>
- <div class="title">
- <div class="title-text">XXXX疑点相关的法律法规</div>
- <div class="title-close-btn" @click="closeEvent"></div>
- </div>
- <div class="option">
- <div class="option-left">
- <el-input
- class="search-input"
- placeholder="请输入关键字"
- v-model="searchInput"
- clearable
- >
- <div class="search-icon" @click="getTableData(1)" slot="append">
- <i class="el-icon-search"></i>
- </div>
- </el-input>
- </div>
- <div class="option-right">
- <NewSelect class="option-right-item" :placeholder="'排序方式'" />
- <NewSelect class="option-right-item" :placeholder="'搜索范围'" />
- <NewSelect class="option-right-item" :placeholder="'时间范围'" />
- </div>
- </div>
- <div class="table">
- <el-table
- ref="singleTable"
- highlight-current-row
- style="width: 100%"
- max-height="300"
- :data="tableData"
- @current-change="handleRowChange"
- >
- <el-table-column prop="title" label="名称" align="center">
- </el-table-column>
- <el-table-column prop="date" label="日期" align="center">
- </el-table-column>
- </el-table>
- </div>
- <div class="footer">
- <Pagination :paginationData="paginationData" />
- </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";
- /**
- * XXXX 疑点相关的法律法规
- * @author: Gao Lu
- * @Date: 2022.11.25
- */
- export default {
- name: "LawPopup",
- components: { NewSelect, Pagination, LawDetailsPopup, FilePreView },
- data() {
- return {
- lawBaseUrl: "/dms",
- searchInput: "",
- // lawDetailsPopupShow: false,
- sortSelectVal: "土地资源",
- sortOptions: [
- {
- value: "土地资源",
- label: "土地资源",
- },
- ],
- scopeSelectVal: "浦东新区",
- scopeOptions: [
- {
- value: "浦东新区",
- label: "浦东新区",
- },
- ],
- timeSelectVal: "",
- timeOptions: [],
- tableData: [],
- paginationData: {
- pageSize: 10,
- pagerCount: 5,
- currentPage: 1,
- pageSizes: [5, 10, 20, 50],
- total: 200,
- currentChange: (val) => {
- this.getTableData(val);
- },
- handleSizeChange: (val) => {
- this.handleSizeChange(val);
- },
- },
- currentRow: null,
- };
- },
- computed: {
- lawPopupShow() {
- return this.$store.state.lawPopupShow;
- },
- },
- created() {
- this.timeOptions = [];
- // 时间选择
- for (let i = 1980; i < 2023; i++) {
- this.timeOptions.unshift({
- value: i,
- label: i,
- });
- }
- this.getTableData(1);
- },
- methods: {
- queryEvent() {
- console.log("查询");
- },
- resetEvent() {
- console.log("重置");
- },
- // 切换页
- getTableData(val) {
- // console.log(`当前页: ${val}`);
- this.tableData = [];
- let searchParam = [];
- if (this.searchInput) {
- let paramSearch = {
- field: "c_name",
- // 模糊查询
- searchType: "2",
- content: {
- value: this.searchInput,
- },
- };
- searchParam.push(paramSearch);
- }
- let params = new FormData();
- params = {
- columnId: 23,
- states: 3,
- pageSize: this.currentPageSize,
- page: val - 1,
- search: JSON.stringify(searchParam),
- };
- this.$Post(this.urlsCollection.selectContentList, params).then(
- (res) => {
- // console.log(res, "当前的法律法规");
- if (res.code === 200 && res.content.data.length > 0) {
- // console.log(res.content, "查询到的法律法规相关的数据");
- this.paginationData.currentPage = val;
- this.paginationData.total = res.content.count;
- this.tableData = res.content.data.map((v) => {
- return {
- id: v.id || "",
- title: v.c_name || "--",
- date: v.c_new_date || "--",
- // date: v.c_date || "--",
- address: v.c_pdf || "",
- };
- });
- }
- },
- (error) => {
- console.log(error);
- }
- );
- },
- // 切换条数
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- },
- closeEvent() {
- this.$store.state.lawPopupShow = false;
- },
- lawDetailsClose() {
- if (this.$refs.lawFileRef) {
- this.$refs.lawFileRef.cancel();
- }
- },
- // 选中当前行
- handleRowChange(val) {
- console.log(val, "currentRow");
- this.currentRow = val;
- this.$refs.lawDetailsRef.title = val.title;
- this.$refs.lawDetailsRef.time = val.date;
- this.$refs.lawDetailsRef.lawDetailsPopupShow = true;
- this.$nextTick(() => {
- if (this.$refs.lawFileRef) {
- this.$refs.lawFileRef.showView(this.lawBaseUrl + val.address);
- }
- });
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .law-related {
- width: 700px;
- height: 500px;
- background: rgba(0, 39, 77, 0.95);
- border: 1px solid #2fb8ff;
- pointer-events: auto;
- // 单击每一行后弹出法律相关的详细内容
- .law-details-popup {
- position: absolute;
- width: 100%;
- height: 100%;
- z-index: 99;
- }
- .title {
- margin: 0 auto;
- width: 99%;
- height: 8%;
- position: relative;
- border-bottom: 1px solid;
- border-image: -webkit-linear-gradient(
- -90deg,
- rgba(255, 255, 255, 0) 0%,
- rgba(47, 184, 255, 1) 50%,
- rgba(255, 255, 255, 0) 99%
- )
- 2 2 2 2;
- border-image: -moz-linear-gradient(
- 90deg,
- rgba(255, 255, 255, 0) 0%,
- rgba(47, 184, 255, 1) 50%,
- rgba(255, 255, 255, 0) 99%
- )
- 2 2 2 2;
- border-image: linear-gradient(
- 90deg,
- rgba(255, 255, 255, 0) 0%,
- rgba(47, 184, 255, 1) 50%,
- rgba(255, 255, 255, 0) 99%
- )
- 2 2 2 2;
- &-text {
- position: absolute;
- left: 10px;
- top: 7px;
- color: #fff;
- word-spacing: 2px;
- letter-spacing: 2px;
- font-size: 18px;
- font-family: PingFang SC;
- font-weight: 300;
- }
- &-close-btn {
- width: 30px;
- height: 30px;
- position: absolute;
- top: 1px;
- right: 1px;
- background: url("../../assets/image/close.png") no-repeat center;
- cursor: pointer;
- }
- }
- .option {
- width: 100%;
- height: 11%;
- position: relative;
- &-left {
- position: absolute;
- left: 0;
- width: 35%;
- .search-input {
- position: absolute;
- top: 7px;
- left: 5px;
- width: 225px;
- }
- /deep/.el-input-group__append,
- .el-input-group__prepend {
- background: transparent;
- // background-color: #00aaff54;
- color: #fff;
- border-left: none;
- // border: none;
- // border-radius: 1px;
- }
- /deep/.el-input-group--append .el-input__inner,
- .el-input-group__prepend {
- border-right: none;
- }
- /deep/.el-input__inner {
- height: 35px;
- border-right: none;
- }
- /deep/ .el-input__inner {
- border-color: #fff !important;
- color: #fff;
- }
- .search-icon {
- position: absolute;
- top: 10px;
- right: 16px;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- &-right {
- display: flex;
- align-items: center;
- justify-content: space-around;
- position: absolute;
- right: 0;
- width: 65%;
- &-item {
- width: 120px;
- height: 40px;
- line-height: 50px;
- }
- }
- }
- .table {
- width: 100%;
- height: 70%;
- /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;
- }
- td {
- cursor: pointer;
- }
- }
- }
- .footer {
- margin: 0 auto;
- width: 100%;
- height: 10%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- </style>
|