From 182c5162e81be62781fd1f4791ff2a984f1deb52 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期三, 03 五月 2023 17:49:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-ui/src/views/collection/index.vue | 78 +++++++++++++++++++++++++++++++++-----
1 files changed, 67 insertions(+), 11 deletions(-)
diff --git a/ruoyi-ui/src/views/collection/index.vue b/ruoyi-ui/src/views/collection/index.vue
index 4a1c8c7..9040293 100644
--- a/ruoyi-ui/src/views/collection/index.vue
+++ b/ruoyi-ui/src/views/collection/index.vue
@@ -151,12 +151,37 @@
v-hasPermi="['family:note:export']"
>瀵煎嚭</el-button>
</el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="mini"
+ @click="handleExport"
+ v-hasPermi="['family:note:export']"
+ >瀵煎叆妯℃澘涓嬭浇</el-button>
+ </el-col>
+ <el-col :span="1.2">
+
+ <el-upload
+ action=""
+
+ class="upload-demo"
+ :show-file-list="false"
+ :http-request="handleEnport"
+ >
+ <el-button size="mini" type="primary"
+ plain
+ icon="el-icon-plus" >瀵煎叆</el-button>
+
+ </el-upload>
+ </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</div>
<el-table v-loading="loading" :data="collectionList" @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;">
<el-table-column type="selection" width="25" align="center" />
-<!-- <el-table-column label="搴忓彿" prop="id" sortable width="80" />-->
+ <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/>
<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>
@@ -178,10 +203,24 @@
<el-table-column label="瀛樻斁浣嶇疆" prop="location" sortable width="130" align="center">
<template slot-scope="scope">{{scope.row.location? scope.row.location: '鈥斺�斺�斺��'}}</template>
</el-table-column>
- <el-table-column label="鐢靛瓙鏂囦欢" prop="url" align="center" sortable width="110" >
- <template slot-scope="scope">
- <span v-if= "scope.row.url == ','" ><img src="../../assets/images/鏂囦欢澶�-0.png" /></span>
- <span v-else><img src="../../assets/images/鏂囦欢澶�-1.png" /></span>
+ <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="80" >
+ <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 !== ','"
+ >
+ <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 === ','"
+ >
</template>
</el-table-column>
@@ -208,12 +247,12 @@
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>
@@ -225,6 +264,7 @@
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
+ style="background: #FEF7FC;"
@pagination="getList"
/>
@@ -344,6 +384,8 @@
//瀵煎叆鎺ュ彛鍑芥暟
import {listCollection, getCollection, addCollection,updateCollection, delCollection,uploadPic} from "@/api/collection/index";
+import {enload} from "@/api/doctor";
+import {Message} from "element-ui";
export default {
@@ -674,6 +716,20 @@
this.download('zfCollection/export', {
...this.queryParams
}, `zfCollection_${new Date().getTime()}.xlsx`)
+ },
+ /** 瀵煎叆鎿嶄綔*/
+ 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' })
+
+ }).catch(() => { Message({ message: "瀵煎叆澶辫触", type: 'error' })});
+
}
}
};
--
Gitblit v1.9.1