From 36c7ff87bec2f261b28859bfb9cb7c1692e3d0ed Mon Sep 17 00:00:00 2001 From: fujunling <2984387807@qq.com> Date: 星期四, 08 六月 2023 15:26:30 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS-WEB/src/views/integration/integrationTransfer.vue | 27 ++++++++++++++++++++------- 1 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue index 6b311ce..892bd7a 100644 --- a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue +++ b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue @@ -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 = { -- Gitblit v1.9.3