From 2bea732496b4f5051233ed94e206160992351596 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期三, 15 一月 2025 11:02:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue |  107 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 81 insertions(+), 26 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 68f7a40..da12fef 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
@@ -2,39 +2,66 @@
   <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="50%"
+    width="800px"
     @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 style="height: 42px;line-height: 30px;margin-top: -5px;" v-if="topMethodsObj !== {} && topMethodsObj">
+      <div>
+        <span>瀵煎嚭鏂瑰紡锛�</span>
+        <el-radio-group v-model="radio">
+          <el-radio :label="0" v-if="topMethodsObj.select">閫夋嫨</el-radio>
+          <el-radio :label="1" v-if="topMethodsObj.all">鍏ㄩ儴</el-radio>
+          <el-radio :label="2" v-if="topMethodsObj.page">椤电爜</el-radio>
+        </el-radio-group>
+        <span v-if="radio === 2" style="margin-left: 20px;color: #F56C6C; ">
+          <el-input v-model="pageExport" style="width: 150px" size="mini"></el-input> 锛堣緭鍏ラ〉鐮佹垨鑰呴〉闈㈣寖鍥达紝濡傦細1-10锛�</span>
+      </div>
+    </div>
+    <div style="text-align: center">
+      <el-transfer
+        v-model="rightRoleData"
+        v-loading="loading"
+        :data="data"
+        :filter-method="filterMethod"
+        :render-content="renderFunc"
+        @change="handleChange"
+        :titles="transferTitle"
+        filter-placeholder="鍏抽敭璇嶆悳绱�"
+        filterable
+        style="text-align:left;display: inline-block;">
+      </el-transfer>
+    </div>
+
     <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 v-if="bottomValue" class="valueInfo">宸茶缃殑鍊间负锛歔{{ bottomValue }}]</div>
+      <el-button size="small" type="primary" @click="sendHandler">纭� 瀹�</el-button>
+      <el-button size="small" @click="visible = false">鍙� 娑�</el-button>
     </div>
   </el-dialog>
 </template>
 
 <script>
+import func from "@/util/func";
+
 export default {
   name: "transfer",
-  props: ['title', 'leftRoleData', 'rightRoleData', 'transferTitle' , 'bottomValue'],
+  props: ['title', 'leftRoleData', 'rightRoleData', 'transferTitle', 'bottomValue', 'topMethodsObj', 'selectList'],
+  /**
+   * topMethodsObj:{
+        select:true,
+        all:true,
+        page:false
+      },
+   鎺у埗椤跺眰閫夋嫨椤规槸鍚﹀睍绀猴紝闇�瑕侀厤鍚坰electList浣跨敤
+   * @returns {object}
+   */
   data() {
     return {
+      radio: 0,
+      pageExport: "",
       visible: false, // 閫氳繃 this.$refs.transfer.visible = true; 寮�鍚瓙缁勪欢瀵硅瘽妗�
       data: [],
       loading: false,
@@ -49,14 +76,16 @@
   watch: {
     //娓叉煋绌挎妗�
     leftRoleData: {
+      // 闇�瑕佸湪鎵撳紑绌挎妗嗙粍浠剁殑鏃跺�欏leftRoleData杩涜璧嬪�硷紙鍙互鍙傝�僡ction绠$悊-action鍒楄〃 瀵煎嚭鍔熻兘锛� 濡傛灉鍦╠ata閲岄潰瀹氫箟鐨勬暟鎹紝缁勪欢鍐厀atch浼氱洃鍚笉鍒皀ewVal
       handler(newval) {
         if (newval) {
           // 娓呯┖data鏁扮粍
           this.data = [];
-          newval.forEach((city) => {
+          newval.forEach((item) => {
             this.data.push({
-              label: city.name,
-              key: city.oid,
+              ...item,
+              label: item.name,
+              key: item.oid
             });
           });
           this.loading = false;
@@ -70,13 +99,28 @@
   methods: {
     dialogClose() {
       this.visible = false;
-      this.data = [];
-      this.leftRoleData = [];
+      //this.data = [];
+      //this.rightRoleData = [];
     },
     sendHandler() {
-      this.$emit('transferSend', this.rightRoleData);
+      if (func.isEmptyObject(this.topMethodsObj)) {
+        this.$emit('transferSend', this.rightRoleData);
+      } else {
+        if (this.radio === 0) {
+          if (this.selectList.length <= 0) {
+            this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑妯℃澘')
+            return
+          }
+          this.$emit('transferSend', this.rightRoleData, 0);
+        } else if (this.radio === 1) {
+          this.$emit('transferSend', this.rightRoleData, 1);
+        }
+      }
+
       this.visible = false;
     },
+    handleChange(value, direction, movedKeys) {
+    }
   }
 }
 </script>
@@ -84,13 +128,24 @@
 <style lang="scss" scoped>
 /deep/ .el-transfer-panel {
   height: 450px; /* 宸﹀彸涓や釜绌挎妗嗙殑楂樺害鍜屽搴� */
-  width: 300px;
+  width: 322px;
 }
 
 /deep/ .el-transfer-panel__list.is-filterable {
   height: 323px; /* 绌挎妗嗗垪琛ㄩ珮搴� */
 }
-.valueInfo{
+/deep/ .el-transfer__buttons .el-button{
+  display: block;
+  margin: 30px 0;
+  padding: 8px 15px;
+}
+/deep/ .el-transfer__button:first-child{
+  transform: translateY(200%);
+}
+/deep/ .el-transfer__button:nth-child(2){
+  transform: translateY(-200%);
+}
+.valueInfo {
   float: left;
   border: 1px solid #E9E7E7;
   display: inline-block;

--
Gitblit v1.9.3