From ef3668bccac8e1a3ed171a16deaf456bc62eec6d Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期一, 02 十二月 2024 15:58:55 +0800
Subject: [PATCH] 修改查询条件显示
---
Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue | 74 +++++++++++++++++++++++++------------
1 files changed, 50 insertions(+), 24 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue
index 1a286ff..7cd0fb4 100644
--- a/Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue
@@ -26,6 +26,9 @@
:data="data"
:option="option"
:table-loading="tableLoading"
+ @refresh-change="handleRefresh"
+ @search-change="handleSearch"
+ @search-reset="handleReset"
@selection-change="selectChangeHandler"
@row-click="rowClickHandler">
<template slot="menuLeft">
@@ -33,7 +36,7 @@
<el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">绉婚櫎</el-button>
</template>
</avue-crud>
- <action-dialog ref="actionDialog"></action-dialog>
+ <action-dialog ref="actionDialog" :is-muti="true" @updataAction="actionSaveHandler"></action-dialog>
</basic-container>
</el-main>
@@ -42,16 +45,10 @@
<script>
import basicOption from "@/util/basic-option";
-import {
- cloneUIContextData,
- delUIContextData, expUIContextData,
- getBizTree, getExpContextTree,
- gridUIContextData,
- saveUIContextData,
- updateUIContextData
-} from "@/api/UI/uiDefine";
+import { getBizTree} from "@/api/UI/uiDefine";
+import {getTypeActionByType,savePLTypeAction,delPLTypeActions} from "@/api/authority/ui/typeAction"
import func from "@/util/func";
-import actionDialog from "@/views/modelingMenu/ui/Aciton/dialog"
+import actionDialog from "@/views/modelingMenu/ui/Aciton/components/dialog"
export default {
name: "index",
@@ -71,13 +68,12 @@
},
nodeRow: {},
treeData: [],
- searchParams: {
- },
+ searchParams: {},
tableLoading: false,
selectList: [],
option: {
...basicOption,
- calcHeight: -50,
+ calcHeight: -35,
addBtn: false,
editBtn: false,
delBtn: false,
@@ -101,21 +97,18 @@
{
label: 'C/S绫昏矾寰�',
prop: 'plCSClass',
- search: true,
searchLabelWidth:120,
overHidden: true,
},
{
label: 'B/S閾炬帴鍦板潃',
prop: 'plBSUrl',
- search: true,
searchLabelWidth:120,
overHidden: true,
},
{
label: '绫诲瀷',
prop: 'plTypeType',
- search: true,
type: 'select',
width:100,
dicData: [{
@@ -129,11 +122,11 @@
{
label: '鎻忚堪',
prop: 'plDesc',
- search: true,
overHidden: true,
},
]
},
+ allData: [],
data: [],
}
},
@@ -160,11 +153,11 @@
}
},
getTableList() {
- const params = Object.assign(this.searchParams, {
- 'conditionMap[btmName]': this.nodeRow.attributes.name,
- })
- gridUIContextData(1, 50, params).then(res => {
+ getTypeActionByType({
+ 'typeName': this.nodeRow.attributes.name,
+ }).then(res => {
this.data = res.data.data;
+ this.allData = res.data.data;
this.$refs.crud.clearSelection();
this.tableLoading = false;
})
@@ -187,14 +180,46 @@
}
);
},
+ handleRefresh() {
+ this.getTableList();
+ },
+ // 鎼滅储鏌ヨ
+ handleSearch(params, done) {
+ const data=this.allData.filter(item=>{
+ if(item.plCode.includes(params.plCode ||'') && item.plName.includes(params.plName || '')){
+ return true;
+ }else {
+ return false;
+ }
+ })
+ this.data=data;
+ done();
+ },
+ // 閲嶇疆鎼滅储鏉′欢
+ handleReset() {
+ this.data=this.allData;
+ },
//鍒涘缓
addHandler() {
if (this.nodeRow && this.nodeRow.oid && this.nodeRow.oid!='') {
- this.$refs.actionDialog.openDialog(this.nodeRow);
+ this.$refs.actionDialog.openDialog();
} else {
this.$message.error('璇烽�夋嫨涓氬姟绫诲瀷');
}
+ },
+ // 淇濆瓨action
+ actionSaveHandler(val) {
+ const params = {
+ plTypeName: this.nodeRow.attributes.name,
+ actions:val
+ }
+ savePLTypeAction(params).then(res => {
+ if(res.data.code == 200){
+ this.$message.success(res.data.obj);
+ this.getTableList();
+ }
+ })
},
delHandler() {
if (this.selectList.length <= 0) {
@@ -202,14 +227,15 @@
return;
}
const params = {
- oids: this.selectList.map(item => item.plOId).join(',')
+ typeName: this.nodeRow.attributes.name,
+ typeActionOIds: this.selectList.map(item => item.plOId).join(',')
}
this.$confirm('鏄惁绉婚櫎閫変腑鐨凙ction锛�', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- delUIContextData(params).then(res => {
+ delPLTypeActions(params).then(res => {
if (res.data.code === 200) {
this.$message.success('鍒犻櫎鎴愬姛');
this.getTableList();
--
Gitblit v1.9.3