From 19ec0269a9ce3a57ccfcd1d36585bb1c31977b60 Mon Sep 17 00:00:00 2001
From: ludc <ludc@vci-tech.com>
Date: 星期五, 10 一月 2025 10:25:22 +0800
Subject: [PATCH] ui定义为树或树表时默认设置orientation为positive
---
Source/plt-web/plt-web-ui/src/views/system/password/index.vue | 73 +++++++++++++++++++++++++-----------
1 files changed, 50 insertions(+), 23 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/system/password/index.vue b/Source/plt-web/plt-web-ui/src/views/system/password/index.vue
index df6103c..4e52112 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/password/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/password/index.vue
@@ -14,21 +14,30 @@
@row-save="rowSaveHandler"
@row-update="rowUpdateHandler"
>
+ <template slot="menuLeft" slot-scope="{ row, index }">
+ <el-button v-if="permissionList.addBtn" class="button-custom-icon" size="small"
+ type="primary" @click="$refs.passWordCrud.rowAdd()">
+ <icon-show :name="permissionList.addBtn.source"></icon-show>
+ 鏂� 澧�
+ </el-button>
+ </template>
<template slot="menu" slot-scope="{ row, index }">
<el-button
- icon="el-icon-edit"
+ v-if="permissionList.editBtn"
size="small"
type="text"
@click="handleEdit(row, index)"
>
+ <icon-show :name="permissionList.editBtn.source"></icon-show>
缂栬緫
</el-button>
<el-button
- icon="el-icon-delete"
+ v-if="permissionList.delBtn"
size="small"
type="text"
@click="handleDel(row, index)"
>
+ <icon-show :name="permissionList.delBtn.source"></icon-show>
鍒犻櫎
</el-button>
</template>
@@ -49,6 +58,7 @@
<script>
import {refDataGrid, deleteDep, addDept, updatePasswordStrateg} from "@/api/system/password/api"
import basicOption from "@/util/basic-option";
+import {mapGetters} from "vuex";
export default {
name: "index",
@@ -56,13 +66,42 @@
return {
form: {},
tableData: [],
- option: {
+ page: {
+ currentPage: 1,
+ pageSize: 10,
+ total: 0,
+ pageSizes: [10, 30, 50, 100],
+ },
+ tableLoading: false,
+ checkboxlength: "", // 娣诲姞瀛樻斁澶氶�夌殑鍙橀噺,鐢ㄤ簬涓嬫媺鑿滃崟鐨勭鐢ㄦ晥鏋滃拰蹇呭~绉嶇被鏄惁澶т簬缁勫悎鏂瑰紡鐒跺悗鎻愮ず鐢ㄦ埛閲嶆柊閫夋嫨
+ selectlength: 0, // 涓嬫媺鑿滃崟鐨勬暟鎹彉閲�
+ checkboxlist: "", // 鐢ㄤ簬闃叉change鏃堕棿鍐掓场,鍑虹幇涓ゆ寮圭獥瀹氫箟鐨勫彉閲�
+ checkboxNumber: "", // 鐢ㄤ簬棣栨鐐瑰嚮缂栬緫锛屽垽鏂粍鍚堟柟寮忔槸鍚﹀皬浜庡繀濉绫荤殑鍙橀噺
+ selectNumber: "", // 瀛樻斁澶氶�夌殑鍙橀噺,鏁堟灉涓�鏍�,鍙槸鐢ㄤ綔鍦ㄧ紪杈戞ā鍧�
+ checkboxedit: "", // 鐢ㄤ簬鍒ゆ柇鏄惁鏄紪杈�
+ editFlag: false,
+ minValue: "", // 鏈�灏忛暱搴alue
+ maxValue: "" // 鏈�澶ч暱搴alue
+ }
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
+ editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
+ delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
+ };
+ },
+ option() {
+ return {
...basicOption,
+ addBtn: false,
selection: false,
- calcHeight: -60,
menuWidth: 150,
editBtn: false,
delBtn: false,
+ calcHeight: -60,
column: [
{
label: '绛栫暐鍚嶇О',
@@ -298,28 +337,13 @@
}]
},
]
- },
- page: {
- currentPage: 1,
- pageSize: 10,
- total: 0,
- pageSizes: [10, 30, 50, 100],
- },
- tableLoading: false,
- checkboxlength: "", // 娣诲姞瀛樻斁澶氶�夌殑鍙橀噺,鐢ㄤ簬涓嬫媺鑿滃崟鐨勭鐢ㄦ晥鏋滃拰蹇呭~绉嶇被鏄惁澶т簬缁勫悎鏂瑰紡鐒跺悗鎻愮ず鐢ㄦ埛閲嶆柊閫夋嫨
- selectlength: 0, // 涓嬫媺鑿滃崟鐨勬暟鎹彉閲�
- checkboxlist: "", // 鐢ㄤ簬闃叉change鏃堕棿鍐掓场,鍑虹幇涓ゆ寮圭獥瀹氫箟鐨勫彉閲�
- checkboxNumber: "", // 鐢ㄤ簬棣栨鐐瑰嚮缂栬緫锛屽垽鏂粍鍚堟柟寮忔槸鍚﹀皬浜庡繀濉绫荤殑鍙橀噺
- selectNumber: "", // 瀛樻斁澶氶�夌殑鍙橀噺,鏁堟灉涓�鏍�,鍙槸鐢ㄤ綔鍦ㄧ紪杈戞ā鍧�
- checkboxedit: "", // 鐢ㄤ簬鍒ゆ柇鏄惁鏄紪杈�
- editFlag: false,
- minValue: "", // 鏈�灏忛暱搴alue
- maxValue: "" // 鏈�澶ч暱搴alue
+ }
}
},
methods: {
// 琛ㄦ牸鍒濆鍖栬姹�
getTableList() {
+ console.log(this.$route)
this.tableLoading = true;
refDataGrid(this.page.currentPage, this.page.pageSize).then(res => {
this.tableData = res.data.data;
@@ -368,7 +392,7 @@
},
// 淇敼
- rowUpdateHandler(row, index, done,loading) {
+ rowUpdateHandler(row, index, done, loading) {
row.combinations = row.requireCharType;
delete row.requireCharType;
updatePasswordStrateg(row).then(res => {
@@ -419,7 +443,8 @@
this.checkboxlength = val.value;
this.checkboxedit = this.checkboxlength.toString().split(",");
- if (val.value !== undefined && val.value !== null) {
+ if (val.value !== undefined && val.value !== null && val.value.length > 0) {
+ this.form.requireCharCount = 1;
if (this.checkboxlist === val.value) {
return;
} else {
@@ -432,6 +457,8 @@
this.form.requireCharCount = "";
}
}
+ } else {
+ this.form.requireCharCount = "";
}
// 澶勭悊 蹇呭~绉嶇被閫夐」绂佺敤
--
Gitblit v1.10.0