From 3db1df80349d2bb3e279026a8647790576578f0a Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期日, 01 十二月 2024 21:38:37 +0800 Subject: [PATCH] 修改了bug --- ruoyi-ui/src/views/calendar/index.vue | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ruoyi-ui/vue.config.js | 2 2 files changed, 215 insertions(+), 1 deletions(-) diff --git a/ruoyi-ui/src/views/calendar/index.vue b/ruoyi-ui/src/views/calendar/index.vue new file mode 100644 index 0000000..10fd80b --- /dev/null +++ b/ruoyi-ui/src/views/calendar/index.vue @@ -0,0 +1,214 @@ +<template> + <div class="app-container" style="opacity: 1;" > + <el-date-picker + v-model="calenderDate" + type="date" + clearable="false" + @change="clearChange" + + placeholder="閫夋嫨鏃ユ湡"> + </el-date-picker> + <el-calendar + v-model="calenderDate"> + + <div slot="dateCell" slot-scope="{data}"> + <div :class="data.isSelected ? 'is-selected' : ''"> + <div class="day"> + {{ data.day.split('-').slice(1).join('-') }} + {{ data.isSelected ? '鉁旓笍' : '' }} + </div> + </div> + </div> + + </el-calendar> + + + + + <el-dialog :visible.sync="open" width="900px"> + <div class="table-container"> + <div style="padding-top:15px;padding-left:30px;padding-bottom:-20px"><span class="text">淇敼璁板綍</span></div> + <el-divider/> + <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> + <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" style="width: 20%" align="center"/> + + <el-table-column label="琚慨鏀规ā鍧�" prop="module" sortable style="width: 25%" align="center"> + </el-table-column> + <el-table-column label="淇敼鏃堕棿" prop="updateTime" sortable style="width: 25%" align="center"/> + <el-table-column label="淇敼浜�" prop="updater" sortable style="width: 25%" align="center"/> + </el-table> + + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + style="background: #FEF7FC;" + /> + </div> + </el-dialog> + </div> +</template> + +<script> + import {getShouye} from "@/api/shouye"; + + export default { + name: "calendar", + + data() { + return { + open: false, + total: 0, + // 琛ㄦ牸鏁版嵁 + infoList: [], + calenderDate:new Date(), + productDate: '', + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + + }, + } + }, + + watch:{ + calenderDate(newVal, oldVal) { + // 鏍煎紡鍖� 鍥犱负缁戝畾鐨勬暟缁勪笉鏄垜浠兂鐢ㄧ殑锛岃繖閲屼互2022-22-22杩欑鏍煎紡浣滀负婕旂ず + this.calenderDate = this.formatDate(newVal) + // 杩欓噷灏辨槸鎴戜滑澶勭悊鏁版嵁锛岃皟鐢ㄦ帴鍙g殑浣嶇疆 + this.allcalendar() + } + }, + created() { + this.getList() + }, + + methods: { + clearChange(value) { + if (!value) { + this.$nextTick(() => { + this.calenderDate = new Date() + }) + } + + }, + handleVisibleChange(visible) { + alert(visible) + if (!visible) { + // 褰撴棩鏈熼�夋嫨鍣ㄥ叧闂椂璁剧疆鏃堕棿涓哄綋澶╃殑00:00:00 + this.date = this.setTimeToStartOfDay(new Date()); + } + }, + setTimeToStartOfDay(date) { + return new Date(date.getFullYear(), date.getMonth(), date.getDate()); + }, + //闅旇鍙樿壊 + tableRowClassName({ row, rowIndex }) { + if (rowIndex % 2 == 0) { + return "statistics-warning-row1"; + } else { + return "statistics-warning-row"; + } + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + console.log(this.ids) + this.single = selection.length!=1 + this.multiple = !selection.length + }, + + /** 鏌ヨ瑙掕壊鍒楄〃 */ + getList() { + this.loading = true; + // console.log(this.queryParams) + // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { + // console.log("111") + if(this.productDate!="") + this.queryParams.module = this.productDate + // alert(this.queryParams.module) + // console.log(this.queryParams) + getShouye(this.queryParams).then(response => { + // alert(123) + // console.log("222") + this.infoList = response.data.data; + // console.log(this.infoList) + this.total = response.data.total; + + this.loading = false; + } + ); + }, + async allcalendar() { + this.productDate = this.calenderDate + const loading = this.$loading({ + lock: true, //鍔犱笂杩欎釜 椤甸潰鐐瑰嚮鏃ュ巻鐨勬椂鍊欎細鑾悕鍏跺鎶栧姩涓�涓� 鍥犱负鎴戠晫闈笂鏈夋粴鍔ㄦ潯锛屾墍浠ユ垜娉ㄩ噴浜� + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + try { + + this.open = true; + this.getList() + // 杩欓噷璋冪敤鎺ュ彛鑲畾鏄渶瑕佺偣鍑荤殑鏃ユ湡鐨勶紝涔﹀啓鑷繁鐨勫鐞嗛�昏緫鍗冲彲 + // await this.haveDateInfo() + } catch (error) { + console.log(error) + } + loading.close() + }, + // 鏍煎紡鍖栨棩鏈熷嚱鏁� + formatDate(date) { + const value = new Date(date) + const year = value.getFullYear() + const month = (value.getMonth() + 1).toString().padStart(2, '0') + const day = value.getDate().toString().padStart(2, '0') + return `${year}-${month}-${day}` + } + + + } + } + +</script> +<style scoped=""> +.app-container{ + background-color: #FEF7FC; +} +.el-table__row.statistics-warning-row { + background: #E0EEFE; + +} +.el-table__row.statistics-warning-row1 { + background: #FFEFF2; + +} +.text{ + font-size: 16px; + line-height: 24px; + text-align: center; +} +.bkg_image img{ + width: 100%; + height: 100%; + object-fit: cover; + margin: -5px; +} +.bkg_image { + position: relative; /* 璁剧疆鐩稿瀹氫綅 */ +} +.overlay { + position: absolute; /* 璁剧疆缁濆瀹氫綅 */ + top: 10px; + left: 10px; + width: 100%; + height: 90%; + background-color: rgba(255, 255, 255, 0.5); /* 鍗婇�忔槑棰滆壊锛屽彲鏍规嵁闇�姹傝皟鏁撮�忔槑搴� */ + z-index: 1; /* 灏嗚〃鏍肩疆浜庡浘鐗囦笂鏂� */ +} + +</style> diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index e7c426e..13484d0 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -37,7 +37,7 @@ // detail: https://cli.vuewww.bendudu.comjs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { // target: `https://10.39.18.174:8080/`, - // target: `https://192.168.1.5:8080/`, + // target: `https://192.168.1.5:8080/`, target: 'https://www.bendudu.com:8080/', changeOrigin: true, pathRewrite: { -- Gitblit v1.9.1