From ae5807029edabde0b1e1488c090bd830fccf75a7 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 18 九月 2023 16:13:07 +0800
Subject: [PATCH] 代码提交

---
 Source/UBCS-WEB/src/views/integration/integrationTransfer.vue |   31 ++++++++++++++++++++++---------
 1 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
index 6b311ce..4bd65f3 100644
--- a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
+++ b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
@@ -1,5 +1,5 @@
 <template>
-    <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" destroy-on-close width="30%"
+    <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" destroy-on-close width="35%"
         @close="handelClose">
         <el-form :model="form">
             <el-form-item label="鏌ヨ鏉′欢" label-width="70px" size="small">
@@ -22,13 +22,14 @@
     components: {
         transfer
     },
-    name: 'Integration',
+    name: 'IntegrationTransfer',
     props: {
         // 鏄惁鎵撳紑
         visible: {
             typeof: Boolean,
             default: false
         },
+        // 寮圭獥鏍囬
         title: {
             typeof: String,
             default: '缂栫爜灞炴��'
@@ -48,6 +49,11 @@
                     disabled: 'disabled'
                 };
             }
+        },
+        // 濡傛灉鏈夌壒娈婃搷浣滐紝涓�鏉℃暟鎹彧鑳界敤涓�娆$殑鎿嶄綔锛屽氨闇�瑕佹妸绂佺敤鐨勬暟鎹瓧娈电敤lebel瀵瑰簲鐨勫�间紶閫掕繃鏉�
+        disabledData: {
+            typeof: Array,
+            default: () => []
         },
         // 鏌ヨ鏂囨湰妗嗙殑placeholder
         filterPlaceholder: {
@@ -75,14 +81,21 @@
             pinyin.setOptions({ checkPolyphone: false, charCase: 1 });
             let name = this.props.label
             let key = this.props.key
-            let objs = this.data.map(item => {
+            let data = this.data.map(item => {
+                let objitem = { disabled: false, ...item }
+                if (this.disabledData.length !== 0) {
+                    this.disabledData.forEach(element => {
+                        if (objitem[name] === element)  objitem.disabled = true
+                    });
+                }
+                return objitem
+            })
+            return data.map(item => {
                 let pinYin = pinyin.getFullChars(item[this.props.label])
                 let renPing = pinyin.getCamelChars(item[this.props.label])
-                const obj = { pinyins: pinYin, renPing: renPing, disabled: false, [name]: item[this.props.label], [key]: item[this.props.key] }
+                const obj = { pinyins: pinYin, renPing: renPing, [name]: item[this.props.label], [key]: item[this.props.key], disabled: item.disabled }
                 return obj
             })
-            console.log(objs)
-            return objs
         }
     },
     methods: {
@@ -102,8 +115,8 @@
         },
         // 纭畾鎸夐挳锛岃繑鍥炲綋鍓嶆暟鎹拰淇敼鍚庣殑鏁版嵁
         handelTransferSave() {
-            let that =this
-            let datas= that.newdata
+            let that = this
+            let datas = that.newdata
             const findtra = datas.findIndex(item => item.oid === that.transferValue[0].oid)
             datas[findtra].disabled = true
             const obj = {
@@ -125,4 +138,4 @@
     padding: 10px 0;
     color: #F56C6C;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3