From 037c79142510f864f16931117ab308c9adbefa77 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期五, 02 八月 2024 15:43:41 +0800
Subject: [PATCH] 查询模板的列表查询,保存查询模板功能
---
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue | 82 ++++++++++++++++++++++------------------
1 files changed, 45 insertions(+), 37 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
index 8afee4f..ca65a9c 100644
--- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
@@ -1,62 +1,61 @@
<template>
- <el-dialog
- v-dialogDrag
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :title="title"
- :visible.sync="visible"
- append-to-body="true"
- class="avue-dialog"
- style="text-align: center"
- width="40%"
- @close="dialogClose">
- <el-transfer
- v-model="rightRoleData"
- v-loading="loading"
- :data="data"
- :filter-method="filterMethod"
- :render-content="renderFunc"
- :titles="['鐜版湁瑙掕壊', '鎷ユ湁瑙掕壊']"
- filter-placeholder="瑙掕壊鍚嶇О鎼滅储"
- filterable
- style="text-align: left; display: inline-block;">
- </el-transfer>
- <span slot="footer" class="dialog-footer">
- <el-button @click="visible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="sendHandler">纭� 瀹�</el-button>
- </span>
- </el-dialog>
+ <el-dialog
+ v-dialogDrag
+ :close-on-click-modal="false"
+ :title="title"
+ :visible.sync="visible"
+ append-to-body="true"
+ class="avue-dialog"
+ style="text-align: center"
+ width="50%"
+ @close="dialogClose">
+ <el-transfer
+ v-model="rightRoleData"
+ v-loading="loading"
+ :data="data"
+ :filter-method="filterMethod"
+ :render-content="renderFunc"
+ :titles="transferTitle"
+ filter-placeholder="鍏抽敭璇嶆悳绱�"
+ filterable
+ style="text-align: left; display: inline-block;">
+ </el-transfer>
+ <div slot="footer" class="dialog-footer">
+ <div class="valueInfo" v-if="bottomValue">宸茶缃殑鍊间负锛歔{{bottomValue}}]</div>
+ <el-button @click="visible = false" size="small">鍙� 娑�</el-button>
+ <el-button type="primary" @click="sendHandler" size="small">纭� 瀹�</el-button>
+ </div>
+ </el-dialog>
</template>
<script>
export default {
name: "transfer",
- props: ['title', 'leftRoleData', 'rightRoleData'],
+ props: ['title', 'leftRoleData', 'rightRoleData', 'transferTitle' , 'bottomValue'],
data() {
return {
visible: false, // 閫氳繃 this.$refs.transfer.visible = true; 寮�鍚瓙缁勪欢瀵硅瘽妗�
data: [],
- value: [],
loading: false,
filterMethod(query, item) {
return item.label.indexOf(query) > -1;
},
renderFunc(h, option) {
- return <span><i class="el-icon-s-custom"></i> { option.label }</span>;
+ return <span><i class="el-icon-s-custom"></i> {option.label}</span>;
}
}
},
watch: {
//娓叉煋绌挎妗�
leftRoleData: {
- handler(newval, oldval) {
+ handler(newval) {
if (newval) {
// 娓呯┖data鏁扮粍
this.data = [];
- newval.forEach((city, index) => {
+ newval.forEach((item) => {
this.data.push({
- label: city.name,
- key: city.oid,
+ label: item.name,
+ key: item.oid,
});
});
this.loading = false;
@@ -82,11 +81,20 @@
</script>
<style lang="scss" scoped>
-/deep/ .el-transfer-panel{ /* 宸﹀彸涓や釜绌挎妗嗙殑楂樺害鍜屽搴� */
- height: 450px;
+/deep/ .el-transfer-panel {
+ height: 450px; /* 宸﹀彸涓や釜绌挎妗嗙殑楂樺害鍜屽搴� */
+ width: 300px;
}
+
/deep/ .el-transfer-panel__list.is-filterable {
height: 323px; /* 绌挎妗嗗垪琛ㄩ珮搴� */
}
-
+.valueInfo{
+ float: left;
+ border: 1px solid #E9E7E7;
+ display: inline-block;
+ vertical-align: middle;
+ padding: 6px 12px;
+ line-height: 1;
+}
</style>
--
Gitblit v1.9.3