From 70c99f641570099251ed86ca78fa91b3b4622429 Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期三, 05 六月 2024 14:09:48 +0800
Subject: [PATCH] 1
---
src/views/master/person/main/personPost.vue | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/src/views/master/person/main/personPost.vue b/src/views/master/person/main/personPost.vue
index fd8cf6c..98dad44 100644
--- a/src/views/master/person/main/personPost.vue
+++ b/src/views/master/person/main/personPost.vue
@@ -12,15 +12,22 @@
<div class="right-top">
<div class="right-bottom">
<el-button type="primary" @click="addPerson">+ 娣诲姞宀椾綅</el-button>
+ <!-- 瀵煎叆 -->
+ <import-table class="exportBtn" :exportUrl="exportUrl" :uploadUrl="uploadUrl"></import-table>
+ <!-- 瀵煎嚭 -->
+ <el-button type="primary" @click="getExport">瀵煎嚭</el-button>
<el-button type="danger" plain @click="delPerson">鍒犻櫎</el-button>
</div>
<div>
<el-select v-model="postSearchData.status" placeholder="鐘舵��" class="searchStatus">
- <el-option v-for="item in statusList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" size="small"/>
+ <el-option key="1" label="鍚敤" value="1" size="small"/>
+ <el-option key="0" label="鍋滅敤" value="0" size="small"/>
</el-select>
<el-input v-model="postSearchData.keywords" style="width: 200px" size="small" placeholder="璇疯緭鍏ュ叧閿瓧杩涜杩囨护">
<template #append>
- <el-button :icon="searchIcon" @click="searchPerson" />
+ <el-button @click="getPost">
+ <i class="el-icon"><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704z"></path></svg></i>
+ </el-button>
</template>
</el-input>
</div>
@@ -65,13 +72,15 @@
</el-dialog>
</template>
<script>
+ import importTable from '@/layout/components/importTable.vue'
import saveDialog from './post'
export default {
name: "bakalaka",
data(){
return {
+ uploadUrl: "/api/blade-system/post/import-post",
+ exportUrl: "/api/blade-system/post/export-template",
totle: "0",
- statusList: [],
postSearchData: {
current: 1,
size: 15,
@@ -92,13 +101,19 @@
},
mounted(){
- this.getStatus();
this.getPost();
},
components: {
- saveDialog
+ saveDialog,importTable
},
methods: {
+ getExport() {
+ this.$HTTP.get(`/api/blade-system/post/export-post?`+this.$TOOL.qsStringify(this.postSearchData)).then(res=> {
+ if(res.code == 200) {
+ window.open(res.data.link);
+ }
+ })
+ },
delData(type) {
this.$HTTP.post(`/api/blade-system/post/remove?ids=${this.selectId}&type=${type}`).then(res=> {
if(res.code == 200) {
@@ -111,13 +126,6 @@
},
postHandleSuccess() {
this.getPost();
- },
- getStatus() { //鑾峰彇鍏ㄩ儴璐﹀彿
- this.$HTTP.get(`/api/blade-system/dict/dictionary?code=employee_status`).then(res=> {
- if(res.code == 200) {
- this.statusList = res.data;
- }
- })
},
getPost() { //宀椾綅
this.$HTTP.get(`/api/blade-system/post/page?`+this.$TOOL.qsStringify(this.postSearchData)).then(res=> {
@@ -226,7 +234,7 @@
border-left: 0px;
}
.person-left-active {
- background-color: #3b8e8e;
+ background-color: #409eff;
color: #fff;
}
.person-left-search {
@@ -306,4 +314,8 @@
line-height: 20px;
margin-right: 6px;
}
+ .exportBtn {
+ margin-left:8px;
+ margin-right:8px;
+ }
</style>
--
Gitblit v1.9.3