| | |
| | | components: { |
| | | transfer |
| | | }, |
| | | name: 'Integration', |
| | | name: 'IntegrationTransfer', |
| | | props: { |
| | | // 是否打开 |
| | | visible: { |
| | | typeof: Boolean, |
| | | default: false |
| | | }, |
| | | // 弹窗标题 |
| | | title: { |
| | | typeof: String, |
| | | default: '编码属性' |
| | |
| | | disabled: 'disabled' |
| | | }; |
| | | } |
| | | }, |
| | | // 如果有特殊操作,一条数据只能用一次的操作,就需要把禁用的数据字段用lebel对应的值传递过来 |
| | | disabledData: { |
| | | typeof: Array, |
| | | default: () => [] |
| | | }, |
| | | // 查询文本框的placeholder |
| | | filterPlaceholder: { |
| | |
| | | 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: { |
| | |
| | | }, |
| | | // 确定按钮,返回当前数据和修改后的数据 |
| | | 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 = { |