From 885aaba80bce1201fc2a9df76f6837b0495bd963 Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期四, 06 四月 2023 15:59:36 +0800 Subject: [PATCH] 修改家大事记 --- ruoyi-ui/src/views/bignote/index.vue | 162 +++++++++++++++++++++++++++++++++++------------------- 1 files changed, 105 insertions(+), 57 deletions(-) diff --git a/ruoyi-ui/src/views/bignote/index.vue b/ruoyi-ui/src/views/bignote/index.vue index 444c419..ac674b5 100644 --- a/ruoyi-ui/src/views/bignote/index.vue +++ b/ruoyi-ui/src/views/bignote/index.vue @@ -1,23 +1,35 @@ <template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> + <div class="app-container" style="opacity: 1;"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" > <el-form-item label="澶т簨鏍囬" prop="title"> <el-input + v-model="queryParams.title" placeholder="璇疯緭鍏ユ爣棰�" clearable - style="width: 240px" + style=" + width: 197px; + height: 30px; + background: #FFFFFF; + border-radius: 14px 14px 14px 14px; + opacity: 0.5; + border: 1px solid rgba(0,0,0,0.25);" @keyup.enter.native="handleQuery" /> </el-form-item> - + <el-form-item label="浜虹墿" prop="people"> <el-input v-model="queryParams.people" placeholder="璇疯緭鍏ヤ汉鐗�" clearable - style="width: 240px" + style="width: 197px; + height: 30px; +background: #FFFFFF; +border-radius: 14px 14px 14px 14px; +opacity: 0.5; +border: 1px solid rgba(0,0,0,0.25);" @keyup.enter.native="handleQuery" /> </el-form-item> @@ -26,15 +38,25 @@ v-model="queryParams.address" placeholder="璇疯緭鍏ュ湴鐐�" clearable - style="width: 240px" + style="width: width: 197px; +height: 30px; +background: #FFFFFF; +border-radius: 14px 14px 14px 14px; +opacity: 0.5; +border: 1px solid rgba(0,0,0,0.25);" @keyup.enter.native="handleQuery" /> - + </el-form-item> <el-form-item label="鏃堕棿"> <el-date-picker v-model="dateRange" - style="width: 240px" + style="width: width: 197px; +height: 30px; +background: #FFFFFF; +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" type="daterange" range-separator="-" @@ -47,7 +69,15 @@ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> </el-form-item> </el-form> - + + <div style="width: 72px; +height: 24px; +font-size: 18px; +font-family: Microsoft YaHei-Regular, Microsoft YaHei; +font-weight: 400; +color: #000000; +line-height: 21px; +">瀹跺ぇ浜嬭</div> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button @@ -59,7 +89,7 @@ v-hasPermi="['system:role:add']" >鏂板</el-button> </el-col> - + <el-col :span="1.5"> <el-button type="danger" @@ -70,6 +100,7 @@ @click="handleDelete" v-hasPermi="['system:role:remove']" >鍒犻櫎</el-button> + </el-col> <el-col :span="1.5"> <el-button @@ -85,7 +116,7 @@ </el-row> <!-- 搴忓彿銆佹椂闂淬�佷汉鐗┿�佸湴鐐广�佸ぇ浜嬫爣棰樸�佺數瀛愭枃浠躲�佸娉� --> <!-- 杩欓噷鏈変釜familyList鏁扮粍 鏄湪data()涓畾涔夌殑 --> - <el-table v-loading="loading" :data="familyList" @selection-change="handleSelectionChange"> + <el-table v-loading="loading" :data="familyList" @selection-change="handleSelectionChange" > <el-table-column type="selection" width="55" align="center" /> <el-table-column label="搴忓彿" prop="id" sortable width="120" /> @@ -97,7 +128,7 @@ <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-colum label="鐢靛瓙鏂囦欢" prop="fujian" sortable width="100"/> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> @@ -117,13 +148,13 @@ v-hasPermi="['system:role:remove']" >鍒犻櫎</el-button> <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']"> - <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button> - + <el-button size="mini" type="text" icon="el-icon-d-arrow-right" @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button> + </el-dropdown> </template> </el-table-column> </el-table> - + <pagination v-show="total>0" :total="total" @@ -131,18 +162,18 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - + <!-- 娣诲姞鎴栦慨鏀硅祫浜т俊鎭厤缃璇濇 --> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px"> - - + + <el-form-item label="澶т簨鏍囬" prop="title"> <el-input v-model="formDat.title" placeholder="璇疯緭鍏ュぇ浜嬫爣棰�" clearable :style="{width: '100%'}" ></el-input> </el-form-item> - + <el-form-item label="浜虹墿" prop="people"> - <el-input v-model="formDat.holder" placeholder="璇疯緭鍏ヤ汉鐗�" clearable :style="{width: '100%'}" > + <el-input v-model="formDat.people" placeholder="璇疯緭鍏ヤ汉鐗�" clearable :style="{width: '100%'}" > </el-input> </el-form-item> <el-form-item label="鍦扮偣" prop="address"> @@ -152,7 +183,7 @@ <el-form-item label="澶囨敞" prop="remark"> <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input> </el-form-item> - + <h4 class="form-header">鐩稿叧鍥剧墖 </h4> <el-upload action="#" @@ -178,7 +209,7 @@ > <i class="el-icon-zoom-in"></i> </span> - + <span v-if="!disabled" class="el-upload-list__item-delete" @@ -187,8 +218,8 @@ <i class="el-icon-delete"></i> </span> </span> - - + + </div> </el-upload> <h4 class="form-header">鍏朵粬闄勪欢 </h4> @@ -197,7 +228,7 @@ :file-list="fileListOther" class="upload-demo" multiple - + :on-remove="handleRemove" :http-request="requestUpload" :show-file-list="true" @@ -208,30 +239,32 @@ </div> </template> </el-upload> - + </el-form> <h4 class="form-header"> </h4> - + <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitDataScope">纭� 瀹�</el-button> <el-button @click="cancelData">鍙� 娑�</el-button> </div> </el-dialog> - + <!-- 鍒嗛厤瑙掕壊鏁版嵁鏉冮檺瀵硅瘽妗� --> <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body> - + </el-dialog> - + </div> </template> + + <script> import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; - - - + + + //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁� --鎺ュソ浜� import {listFamilyevent , getFamilyeventInfo , delFamilyevent , addFamilyevent , uploadPic} from "@/api/bignote/index"; export default { @@ -241,7 +274,7 @@ return { // 閬僵灞� disabled: false, - + loading: true, formData:[], // 閫変腑鏁扮粍 @@ -273,7 +306,7 @@ fileList:[ ], fileListOther:[ - + ], dsb:true, btn:false, @@ -312,7 +345,7 @@ message: '璇疯緭鍏ュぇ浜嬫爣棰�', trigger: 'blur' }], - + people: [{ required: true, message: '璇疯緭鍏ヤ汉鐗�', @@ -323,11 +356,11 @@ message: '璇疯緭鍏ュ湴鐐�', trigger: 'blur' }], - remark: [{ - required: true, - message: '璇疯緭鍏ュ娉�', - trigger: 'blur' - }], + // remark: [{ + // required: true, + // message: '璇疯緭鍏ュ娉�', + // trigger: 'blur' + // }], createTime: [{ required: true, message: '璇烽�夋嫨鏃ユ湡閫夋嫨', @@ -340,7 +373,7 @@ created() { this.getList(); // this.getCateInfor() - + }, methods: { // 鍙栨秷鎸夐挳 @@ -349,7 +382,21 @@ this.reset(); }, - /** 鏌ヨ瑙掕壊鍒楄〃 */ + //闅旇鍙樿壊 + + methods: { + tableRowClassName({row, rowIndex}) { + if (rowIndex === 1) //=>杩欓噷鍙互鏀规垚 rowIndex%2=== 1锛屽悗闈㈢洿鎺lse鍗冲彲杈惧埌闅旇鍙樿壊鏁堟灉銆� + { + return 'warning-row'; + } else if (rowIndex === 3) { + return 'success-row'; + } + return ''; + } + }, + + /** 鏌ヨ瑙掕壊鍒楄〃 */ //鍒楄〃鏄剧ず瀹跺ぇ浜嬭 getList() { @@ -360,7 +407,7 @@ // alert(123) // console.log(response.data) this.familyList = response.data.data; - + this.total = response.data.total; this.loading = false; } @@ -418,7 +465,7 @@ this.single = selection.length!=1 this.multiple = !selection.length }, - + /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { this.reset(); @@ -436,7 +483,7 @@ handleUpdate(row) { const id = row.id; let jd = true - + this.$router.push({ path:"/family1/bignote/familyeventInfo/" + id, query:{ @@ -444,15 +491,15 @@ } }); }, - - + + handlePictureCardPreview(file) { this.dialogImageUrl = file.url; this.dialogVisible = true; }, /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */ submitDataScope: function() { - + let ul = this.fileList.map(function (elem){ return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") }).join(",") @@ -462,7 +509,7 @@ this.formDat.url = ul+","+uls this.$refs["elForm"].validate(valid => { if (valid) { - + addFamilyevent(this.formDat).then(response => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; @@ -477,22 +524,22 @@ var formData = new FormData(); formData.append('uploadFile', file); let _this = this - + uploadPic(formData).then(response => { let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) - + if(_this.fot.includes(pth) === true) { _this.fileList.push({name:response.data.fileName, "url":response.data.url}) - + } - + else{ _this.fileListOther.push({name:response.data.fileName, url:response.data.url}) - + } }) - + }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { @@ -500,7 +547,7 @@ this.$modal.confirm('鏄惁纭鍒犻櫎搴忓彿涓�"' + Ids + '"鐨勬暟鎹」锛�').then(function() { return delFamilyevent(Ids); }).then(() => { - this.getList1(); + this.getList(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); }).catch(() => {}); }, @@ -513,3 +560,4 @@ } }; </script> + -- Gitblit v1.9.1