From 336eb77c1a07ca3e3ead4482b51f848fa16ab3b7 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期日, 12 十一月 2023 20:15:38 +0800
Subject: [PATCH] 自定义流水相关开发

---
 Source/UBCS-WEB/src/views/integration/integrationTransfer.vue |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 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..e070be9 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,24 @@
             pinyin.setOptions({ checkPolyphone: false, charCase: 1 });
             let name = this.props.label
             let key = this.props.key
-            let objs = this.data.map(item => {
+           if(this.data){
+             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
+           }
+            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 +118,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 +141,4 @@
     padding: 10px 0;
     color: #F56C6C;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3