From 10026b9e467afa79b746a307d581173da54ebf26 Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期二, 16 五月 2023 01:47:48 +0800 Subject: [PATCH] 修改家大事记bug --- ruoyi-ui/src/views/bignote/index.vue | 101 ++++++++++++++++++++++++++------------------------ 1 files changed, 53 insertions(+), 48 deletions(-) diff --git a/ruoyi-ui/src/views/bignote/index.vue b/ruoyi-ui/src/views/bignote/index.vue index 7c75fde..7705a6e 100644 --- a/ruoyi-ui/src/views/bignote/index.vue +++ b/ruoyi-ui/src/views/bignote/index.vue @@ -57,7 +57,7 @@ border-radius: 14px 14px 14px 14px; opacity: 0.5; border: 1px solid rgba(0,0,0,0.25);" - value-format="yyyy-MM-dd HH-MM" + value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" @@ -134,8 +134,8 @@ :http-request="handleEnport" > <el-button size="mini" type="primary" - plain - icon="el-icon-plus" >瀵煎叆</el-button> + plain + icon="el-icon-plus" >瀵煎叆</el-button> </el-upload> </el-col> @@ -147,39 +147,39 @@ <el-table v-loading="loading" :data="familyList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> - <el-table-column label="鍙戠敓鏃堕棿" align="center" sortable prop="happenTime" width="180"> - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.happenTime) }}</span> - </template> + <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> + <el-table-column label="鍙戠敓鏃堕棿" prop="happenTime" sortable width="100" align="center"> + <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '鈥斺�斺�斺��'}}</template> </el-table-column> <el-table-column label="浜虹墿" prop="people" sortable width="100" /> <el-table-column label="鍦扮偣" prop="address" sortable width="100" /> <el-table-column label="澶т簨鏍囬" prop="title" sortable :show-overflow-tooltip="true" width="150" /> - <el-table-column label="澶囨敞" prop="remark" sortable width="100" /> + <el-table-column label="澶囨敞" prop="remark" sortable width="100" > + <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template> + </el-table-column> - <el-table-column label="瀹跺涵鍙�" prop="familyId" sortable width="100" /> + <!-- <el-table-column label="瀹跺涵鍙�" prop="familyId" sortable width="100" /> --> <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" > - <template slot-scope="scope" > - <img - class="el-upload-list__item-thumbnail" - src="../../assets/images/deviceLis.png" - alt="" - style="width: 35px; height: 35px;" - fit="cover" - v-if="scope.row.url !== null" - > - <img - class="el-upload-list__item-thumbnail" - src="../../assets/images/deviceA.png" - alt="" - style="width: 35px; height: 35px;" - fit="cover" - v-if="scope.row.url === null" - > - </template> - </el-table-column> + <template slot-scope="scope" > + <img + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceLis.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + v-if="scope.row.url !== null" + > + <img + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceA.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + v-if="scope.row.url === null" + > + </template> + </el-table-column> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope" v-if="scope.row.roleId !== 1"> <el-button @@ -230,9 +230,13 @@ <el-input v-model="formDat.address" placeholder="璇疯緭鍏ュ湴鐐�" clearable :style="{width: '100%'}" > </el-input> </el-form-item> - <el-form-item label="瀹跺涵鍙�" prop="familyId"> - <el-input v-model="formDat.familyId" placeholder="璇疯緭鍏ュ搴彿" clearable :style="{width: '100%'}" > - </el-input> + + <el-form-item label="鍙戠敓鏃堕棿" prop="happenTime"> + <el-date-picker + v-model='formDat.happenTime' + type='date' + placeholder='閫夋嫨鏃ユ湡' + ></el-date-picker> </el-form-item> <el-form-item label="澶囨敞" prop="remark"> <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input> @@ -321,7 +325,7 @@ import { Notification, MessageBox, Message, Loading } from 'element-ui' //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁� --鎺ュソ浜� -import {listFamilyevent,enload, getFamilyeventInfo , delFamilyevent , addFamilyevent , uploadPic} from "@/api/bignote/index"; +import {listFamilyevent,enload, delFamilyevent , addFamilyevent , uploadPic} from "@/api/bignote/index"; export default { name: "Role", dicts: ['sys_normal_disable'], @@ -373,6 +377,7 @@ address: undefined, remark: undefined, familyId:undefined, + happenTime:undefined, url: undefined, }, // 鑿滃崟鍒楄〃 @@ -418,7 +423,7 @@ message: '璇疯緭鍏ュ搴彿', trigger: 'blur' }], - createTime: [{ + happenTime: [{ required: true, message: '璇烽�夋嫨鏃ユ湡閫夋嫨', trigger: 'change' @@ -457,12 +462,12 @@ console.log(this.queryParams) this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0] this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] - + // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { listFamilyevent(this.queryParams).then(response => { // alert(123) // console.log(response.data.data) - // alert(response.data.data[1].url) + // alert(response.data.data[1].url) this.familyList = response.data.data; this.total = response.data.total; @@ -601,7 +606,7 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const Ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎搴忓彿涓�"' + Ids + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫変腑鏁版嵁椤癸紵').then(function() { return delFamilyevent(Ids); }).then(() => { this.getList(); @@ -616,18 +621,18 @@ }, /** 瀵煎叆鎿嶄綔*/ handleEnport(params){ - var file = params.file; - var formData = new FormData(); - formData.append('excelImport', file); - let _this = this - enload(formData).then(response => { - _this.getList(); - Message({ message: "瀵煎叆鎴愬姛", type: 'warning' }) + var file = params.file; + var formData = new FormData(); + formData.append('excelImport', file); + let _this = this + enload(formData).then(response => { + _this.getList(); + Message({ message: "瀵煎叆鎴愬姛", type: 'warning' }) - }).catch(err) - { - Message({ message: "瀵煎叆澶辫触", type: 'error' }) - } + }).catch(err) + { + Message({ message: "瀵煎叆澶辫触", type: 'error' }) + } } } -- Gitblit v1.9.1