From a6ed5667ab8e17bd7a20dc54def9fd0b9f4dc6b9 Mon Sep 17 00:00:00 2001
From: oo0oo <1148059382@qq.com>
Date: 星期二, 01 二月 2022 10:24:49 +0800
Subject: [PATCH] update .gitignore. 添加JRebel工具rebel.xml文件规则至gitignore
---
ruoyi-ui/src/views/system/post/index.vue | 65 +++++++++++---------------------
1 files changed, 22 insertions(+), 43 deletions(-)
diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue
index 2784756..02698da 100644
--- a/ruoyi-ui/src/views/system/post/index.vue
+++ b/ruoyi-ui/src/views/system/post/index.vue
@@ -22,10 +22,10 @@
<el-form-item label="鐘舵��" prop="status">
<el-select v-model="queryParams.status" placeholder="宀椾綅鐘舵��" clearable size="small">
<el-option
- v-for="dict in statusOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
+ v-for="dict in dict.type.sys_normal_disable"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
/>
</el-select>
</el-form-item>
@@ -74,7 +74,6 @@
plain
icon="el-icon-download"
size="mini"
- :loading="exportLoading"
@click="handleExport"
v-hasPermi="['system:post:export']"
>瀵煎嚭</el-button>
@@ -90,7 +89,7 @@
<el-table-column label="宀椾綅鎺掑簭" align="center" prop="postSort" />
<el-table-column label="鐘舵��" align="center" prop="status">
<template slot-scope="scope">
- <dict-tag :options="statusOptions" :value="scope.row.status"/>
+ <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180">
@@ -141,10 +140,10 @@
<el-form-item label="宀椾綅鐘舵��" prop="status">
<el-radio-group v-model="form.status">
<el-radio
- v-for="dict in statusOptions"
- :key="dict.dictValue"
- :label="dict.dictValue"
- >{{dict.dictLabel}}</el-radio>
+ v-for="dict in dict.type.sys_normal_disable"
+ :key="dict.value"
+ :label="dict.value"
+ >{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="澶囨敞" prop="remark">
@@ -160,16 +159,15 @@
</template>
<script>
-import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post";
+import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post";
export default {
name: "Post",
+ dicts: ['sys_normal_disable'],
data() {
return {
// 閬僵灞�
loading: true,
- // 瀵煎嚭閬僵灞�
- exportLoading: false,
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
@@ -186,13 +184,10 @@
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
- // 鐘舵�佹暟鎹瓧鍏�
- statusOptions: [],
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
pageSize: 10,
- reasonable: true,
postCode: undefined,
postName: undefined,
status: undefined
@@ -215,9 +210,6 @@
},
created() {
this.getList();
- this.getDicts("sys_normal_disable").then(response => {
- this.statusOptions = response.data;
- });
},
methods: {
/** 鏌ヨ宀椾綅鍒楄〃 */
@@ -284,13 +276,13 @@
if (valid) {
if (this.form.postId != undefined) {
updatePost(this.form).then(response => {
- this.msgSuccess("淇敼鎴愬姛");
+ this.$modal.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
});
} else {
addPost(this.form).then(response => {
- this.msgSuccess("鏂板鎴愬姛");
+ this.$modal.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
});
@@ -301,31 +293,18 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const postIds = row.postId || this.ids;
- this.$confirm('鏄惁纭鍒犻櫎宀椾綅缂栧彿涓�"' + postIds + '"鐨勬暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(function() {
- return delPost(postIds);
- }).then(() => {
- this.getList();
- this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.$modal.confirm('鏄惁纭鍒犻櫎宀椾綅缂栧彿涓�"' + postIds + '"鐨勬暟鎹」锛�').then(function() {
+ return delPost(postIds);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => {});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
- const queryParams = this.queryParams;
- this.$confirm('鏄惁纭瀵煎嚭鎵�鏈夊矖浣嶆暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
- this.exportLoading = true;
- return exportPost(queryParams);
- }).then(response => {
- this.download(response.msg);
- this.exportLoading = false;
- }).catch(() => {});
+ this.download('system/post/export', {
+ ...this.queryParams
+ }, `post_${new Date().getTime()}.xlsx`)
}
}
};
--
Gitblit v1.9.3