| | |
| | | <view class="title">人员信息-#{{ i }}</view>
|
| | | <formItem ref="formItemRef"></formItem>
|
| | | </view>
|
| | | |
| | |
|
| | | <view class="add-person">
|
| | | <u-button type="success" plain @click="addPerson">在加一人</u-button>
|
| | | </view>
|
| | |
| | | // }
|
| | | // })
|
| | | // },
|
| | | getCsDetails() {
|
| | | getCsDetails() { |
| | | const that = this
|
| | | getPlaceDetail({
|
| | | placeId: this.curSelectSite.id
|
| | | }).then(detailRes => {
|
| | |
| | | })
|
| | | return
|
| | | }
|
| | | const placePractitioner = data?.placePractitioner || [] |
| | | const placePractitioner = data?.placePractitioner || []
|
| | | console.log(data);
|
| | | Object.keys(this.form).forEach(key => {
|
| | | this.form[key] = data[key]
|
| | | if (key === 'imageUrls' || key === 'planImageUrls') { |
| | | if (key === 'imageUrls' || key === 'planImageUrls') {
|
| | | data[key] = data[key] || ''
|
| | | this.form[key] = []
|
| | | if (!!data[key]) {
|
| | | data[key] = JSON.parse(data[key])
|
| | | if (Array.isArray(data[key])) {
|
| | | this.form[key] = data[key]
|
| | | } else { |
| | | this.form[key].push(data[key]) |
| | | } else {
|
| | | this.form[key].push(data[key])
|
| | | }
|
| | | }
|
| | | }
|
| | | })
|
| | |
|
| | | console.log(this.form);
|
| | | this.personNum = placePractitioner.length
|
| | | this.$nextTick(() => {
|
| | | that.personNum = placePractitioner.length
|
| | | // that.$nextTick(() => {
|
| | | console.log(placePractitioner);
|
| | | this.$refs.formItemRef.forEach((item, index) => {
|
| | | item.form = placePractitioner[index]
|
| | | })
|
| | | })
|
| | | setTimeout(() => { |
| | | const componetns = this.$refs.formItemRef || [] |
| | | componetns.forEach((item, index) => { |
| | | item.form = placePractitioner[index] |
| | | }) |
| | | }, 0)
|
| | | // })
|
| | | })
|
| | | },
|
| | | updatePlaceExt(data) {
|