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 ++++++++--------
ruoyi-ui/src/views/bignote/familyeventInfo.vue | 215 +++++++++++++++--------------------
2 files changed, 146 insertions(+), 170 deletions(-)
diff --git a/ruoyi-ui/src/views/bignote/familyeventInfo.vue b/ruoyi-ui/src/views/bignote/familyeventInfo.vue
index 70e548e..b53783b 100644
--- a/ruoyi-ui/src/views/bignote/familyeventInfo.vue
+++ b/ruoyi-ui/src/views/bignote/familyeventInfo.vue
@@ -1,28 +1,16 @@
<template>
<div class="app-container">
<div class="form-header mt">
- <h4 class="dt h4">瀹跺涵澶т簨璁拌鎯� </h4>
- <el-button type="primary" class="pt" icon="el-icon-edit" @click="handleEdit()" :disabled="btn">缂栬緫</el-button>
+ <h4 class="dt h4">瀹跺ぇ浜嬭璇︾粏淇℃伅 </h4>
+
</div>
- <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px" >
- <!-- <el-form-item label="id" prop="id">
- <el-input v-model="formData.id" placeholder="璇疯緭鍏d" :maxlength="11" show-word-limit :disabled="true"
- clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>
- </el-form-item> -->
- <!-- <el-form-item label="绫诲埆" prop="type">
- <el-select v-model="formData.type" placeholder="璇烽�夋嫨绫诲埆" clearable :style="{width: '100%'}" :disabled="dsb" >
- <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
- :disabled="item.disabled"></el-option>
- </el-select>
- </el-form-item> -->
+ <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
+
<el-form-item label="鏍囬" prop="title">
<el-input v-model="formData.title" placeholder="璇疯緭鍏ユ爣棰�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
</el-form-item>
- <!-- <el-form-item label="瀛樺偍鍦板潃" prop="location">
- <el-input v-model="formData.location" placeholder="璇疯緭鍏ュ瓨鍌ㄥ湴鍧�" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
- </el-form-item> -->
+
<el-form-item label="浜虹墿" prop="people">
<el-input v-model="formData.people" placeholder="璇疯緭鍏ヤ汉鐗�" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
@@ -31,16 +19,16 @@
<el-input v-model="formData.address" placeholder="璇疯緭鍏ュ湴鐐�" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
- <el-form-item label="瀹跺涵鍙�" prop="familyId">
- <el-input v-model="formData.familyId" placeholder="璇疯緭鍏ュ搴彿" :maxlength="11" show-word-limit :disabled="true"
- clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>
+ <el-form-item label="鍙戠敓鏃堕棿" prop="happenTime">
+ <el-input v-model="formData.happenTime" placeholder="璇疯緭鍏ュ彂鐢熸椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">
+ </el-input>
</el-form-item>
+
<el-form-item label="澶囨敞" prop="remark">
<el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
</el-form-item>
-
- <h4 class="form-header">鐩稿叧鍥剧墖 </h4>
+ <h4 class="form-header">鐢靛瓙鏂囦欢 </h4>
<el-upload
action="#"
list-type="picture-card"
@@ -59,27 +47,28 @@
:preview-src-list="[file.url]"
>
<span class="el-upload-list__item-actions">
- <span
- class="el-upload-list__item-preview"
- @click="handlePictureCardPreview(file)"
- >
- <i class="el-icon-zoom-in"></i>
- </span>
- <span
- v-if="!disabled"
- class="el-upload-list__item-delete"
- @click="handleDownload(file.url)"
- >
- <i class="el-icon-download"></i>
- </span>
- <span
- v-if="!disabled"
- class="el-upload-list__item-delete"
- @click="handleRemove(file)"
- >
- <i class="el-icon-delete"></i>
- </span>
+ <span
+ v-if="isShow"
+ class="el-upload-list__item-preview"
+ @click="handlePictureCardPreview(file)"
+ >
+ <i class="el-icon-zoom-in"></i>
</span>
+ <span
+ v-if="isShow"
+ class="el-upload-list__item-delete"
+ @click="handleDownload(file.url)"
+ >
+ <i class="el-icon-download"></i>
+ </span>
+ <span
+ v-if="isShow"
+ class="el-upload-list__item-delete"
+ @click="handleRemove(file)"
+ >
+ <i class="el-icon-delete"></i>
+ </span>
+ </span>
</div>
@@ -98,67 +87,63 @@
:show-file-list="true"
>
- <i slot="default" class="el-icon-plus"></i>
- <div slot="file" slot-scope="{file}">
- <img
- class="el-upload-list__item-thumbnail"
- src="../../assets/401_images/401.gif"
- alt=""
- style="width: 147px; height: 147px"
- fit="cover"
- >
- <span class="el-upload-list__item-actions">
- <span
- class="el-upload-list__item-preview"
- @click="handleFileCardPreview(file)"
- >
- <i class="el-icon-zoom-in"></i>
- </span>
- <span
-v-if="!disabled"
- @click="handleRemove(file)"
- class="el-upload-list__item-delete"
+ <i slot="default" class="el-icon-plus"></i>
+ <div slot="file" slot-scope="{file}">
+ <img
+ class="el-upload-list__item-thumbnail"
+ src="../../assets/401_images/401.gif"
+ alt=""
+ style="width: 147px; height: 147px"
+ fit="cover"
+ >
+ <span class="el-upload-list__item-actions">
+ <span
+ v-if="isShow"
+ class="el-upload-list__item-preview"
+ @click="handleFileCardPreview(file)"
+ >
+ <i class="el-icon-zoom-in"></i>
+ </span>
+ <span
+ v-if="isShow"
+ @click="handleRemove(file)"
+ class="el-upload-list__item-delete"
- >
- <i class="el-icon-download"></i>
- </span>
- <span
- v-if="!disabled"
- class="el-upload-list__item-delete"
- @click="handleRemove(file)"
- >
- <i class="el-icon-delete"></i>
- </span>
- </span>
+ >
+ <i class="el-icon-download"></i>
+ </span>
+ <span
+ v-if="isShow"
+ class="el-upload-list__item-delete"
+ @click="handleRemoveFile(file)"
+ >
+ <i class="el-icon-delete"></i>
+ </span>
+ </span>
- </div>
+ </div>
</el-upload>
<el-form-item size="large">
- <el-button type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button>
+ <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button>
</el-form-item>
</el-form>
<el-dialog :visible.sync="dialogVisible">
<img w-full :src="dialogImageUrl" alt="Preview Image" />
</el-dialog>
-
- <el-dialog :visible.sync="dialogFileVisible">
- <a :href="desurl">鏄剧ず</a>
- <iframe :src="desurl"</iframe>
- </el-dialog>
</div>
</template>
<script>
-import {getFamilyeventInfo, updateFamilyevent, uploadPic, download} from "@/api/bignote/index";
import {addRole, updateRole} from "@/api/system/role";
import {blobValidate} from "@/utils/ruoyi";
import errorCode from "@/utils/errorCode";
import {Message} from "element-ui";
+import { getFamilyeventInfo, updateFamilyevent, uploadPic, download} from "@/api/bignote/index";
export default {
components: {},
@@ -167,7 +152,7 @@
return {
cdi:"瀹跺涵澶т簨璁颁俊鎭�",
udi:"瀹跺涵澶т簨璁颁慨鏀�",
- fot:[".jpg",".jif",".png"],
+ fot:[".jpg",".jif","png"],
fileList:[
],
fileListOther:[
@@ -175,33 +160,22 @@
],
dsb:true,
btn:false,
+ isShow:true,
+
+ doctorList: [],
+
formData: {
id: undefined,
- // type: undefined,
title: undefined,
- // location: undefined,
people: undefined,
address: undefined,
remark: undefined,
url: undefined,
},
- desurl:'',
dialogImageUrl: '',
- dialogFileUrl: '',
- dialogFileVisible:false,
dialogVisible: false,
disabled: false,
rules: {
- id: [{
- required: true,
- message: '璇疯緭鍏d',
- trigger: 'blur'
- }],
- // type: [{
- // required: true,
- // message: '璇烽�夋嫨绫诲埆',
- // trigger: 'change'
- // }],
title: [{
required: true,
message: '璇疯緭鍏ュぇ浜嬫爣棰�',
@@ -223,7 +197,7 @@
trigger: 'blur'
}],
remark: [{
- required: true,
+ // required: true,
message: '璇疯緭鍏ュ娉�',
trigger: 'blur'
}],
@@ -232,7 +206,6 @@
typeOptions: [],
}
},
- //鍦╟reated锛堬級涓皟鐢ㄦ帴鍙o紝鎷垮埌鏁版嵁
computed: {},
watch: {},
created() {
@@ -243,21 +216,20 @@
jd = this.$route.query.detail
this.btn= jd
this.dsb = !jd
- document.title = "淇敼瀹跺ぇ浜嬭璇︾粏淇℃伅";
- this.$route.meta.title = "淇敼瀹跺ぇ浜嬭璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
+ this.isShow=true
+ document.title = "淇敼澶т簨璁拌缁嗕俊鎭�";
+ this.$route.meta.title = "淇敼澶т簨璁拌缁嗕俊鎭�";//鍒楄〃鐨勫悕绉�
}
else{
- document.title = "鏌ョ湅瀹跺ぇ浜嬭璇︾粏淇℃伅";
- this.$route.meta.title = "鏌ョ湅瀹跺ぇ浜嬭璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
+ document.title = "鏌ョ湅澶т簨璁拌缁嗕俊鎭�";
+ this.$route.meta.title = "鏌ョ湅澶т簨璁拌缁嗕俊鎭�";//鍒楄〃鐨勫悕绉�
+ this.isShow=false
}
let _this = this
-
if (id) {
-
this.loading = true;
getFamilyeventInfo(id).then((response) => {
-
this.formData = response.data;
let paths = response.data.url.split(",");
for(let i = 0; i < paths.length; i++)
@@ -278,23 +250,13 @@
}
this.loading = false;
});
- // this.getCateInfor()
+ this.getCateInfor()
}
},
mounted() {},
methods: {
- /** 鏌ヨ绫诲埆淇℃伅 */
- // getCateInfor()
- // {
- // let _this = this
- // getCategory().then(response=>{
- // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
- // _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
- // })
- // })
- // },
submitForm() {
let ul = this.fileList.map(function (elem){
return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
@@ -361,7 +323,6 @@
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
- //鐐瑰嚮涓嬭浇鍑芥暟
handleDownload(url) {
var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")};
@@ -378,7 +339,8 @@
handleEdit()
{
this.dsb = false
- this.btn = true
+ // this.btn = true
+ this.isShow=false
},
requestUpload(params)
{
@@ -402,13 +364,24 @@
}
})
+ },
+
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.download('/zfEvent/export', {
+ ...this.queryParams
+ }, `zfEvent_${new Date().getTime()}.xlsx`)
}
}
}
</script>
-<style>
+
+<style scoped>
+.app-container{
+ background-color: #FEF7FC;
+}
.mt
{
position: relative;
@@ -417,8 +390,6 @@
display: block;
}
-
-
.pt{
right: 10px;
top:-3px;
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