From 3ae5ec92a530e5f14720a8b7d490959430399b11 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期一, 01 十一月 2021 13:29:27 +0800
Subject: [PATCH] 登录/验证码请求headers不设置token
---
ruoyi-ui/src/views/system/dict/data.vue | 67 ++++++++++++---------------------
1 files changed, 25 insertions(+), 42 deletions(-)
diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue
index 543a9e0..36eb6af 100644
--- a/ruoyi-ui/src/views/system/dict/data.vue
+++ b/ruoyi-ui/src/views/system/dict/data.vue
@@ -23,10 +23,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>
@@ -96,7 +96,7 @@
<el-table-column label="瀛楀吀鎺掑簭" align="center" prop="dictSort" />
<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="remark" :show-overflow-tooltip="true" />
@@ -164,10 +164,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">
@@ -185,14 +185,10 @@
<script>
import { listData, getData, delData, addData, updateData, exportData } from "@/api/system/dict/data";
import { listType, getType } from "@/api/system/dict/type";
-// 瀛楀吀鏍囩缁勪欢锛堜娇鐢ㄩ绻佸彲鍦ㄥ叏灞�鎸傝浇锛�
-import DictTag from '@/components/DictTag'
export default {
name: "Data",
- components: {
- DictTag
- },
+ dicts: ['sys_normal_disable'],
data() {
return {
// 閬僵灞�
@@ -244,8 +240,6 @@
label: "鍗遍櫓"
}
],
- // 鐘舵�佹暟鎹瓧鍏�
- statusOptions: [],
// 绫诲瀷鏁版嵁瀛楀吀
typeOptions: [],
// 鏌ヨ鍙傛暟
@@ -276,9 +270,6 @@
const dictId = this.$route.params && this.$route.params.dictId;
this.getType(dictId);
this.getTypeList();
- this.getDicts("sys_normal_disable").then(response => {
- this.statusOptions = response.data;
- });
},
methods: {
/** 鏌ヨ瀛楀吀绫诲瀷璇︾粏 */
@@ -363,13 +354,13 @@
if (valid) {
if (this.form.dictCode != undefined) {
updateData(this.form).then(response => {
- this.msgSuccess("淇敼鎴愬姛");
+ this.$modal.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
});
} else {
addData(this.form).then(response => {
- this.msgSuccess("鏂板鎴愬姛");
+ this.$modal.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
});
@@ -380,31 +371,23 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const dictCodes = row.dictCode || this.ids;
- this.$confirm('鏄惁纭鍒犻櫎瀛楀吀缂栫爜涓�"' + dictCodes + '"鐨勬暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(function() {
- return delData(dictCodes);
- }).then(() => {
- this.getList();
- this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.$modal.confirm('鏄惁纭鍒犻櫎瀛楀吀缂栫爜涓�"' + dictCodes + '"鐨勬暟鎹」锛�').then(function() {
+ return delData(dictCodes);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => {});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
const queryParams = this.queryParams;
- this.$confirm('鏄惁纭瀵煎嚭鎵�鏈夋暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
- this.exportLoading = true;
- return exportData(queryParams);
- }).then(response => {
- this.download(response.msg);
- this.exportLoading = false;
- }).catch(() => {});
+ this.$modal.confirm('鏄惁纭瀵煎嚭鎵�鏈夋暟鎹」锛�').then(() => {
+ this.exportLoading = true;
+ return exportData(queryParams);
+ }).then(response => {
+ this.$download.name(response.msg);
+ this.exportLoading = false;
+ }).catch(() => {});
}
}
};
--
Gitblit v1.9.3