| | |
| | | {{ labelModelInfo.title }}
|
| | | </view>
|
| | |
|
| | | <u-radio-group class="mt-40" v-model="labelValue" placement="row">
|
| | | <u-radio-group v-model="" class="mt-40" v-model="labelValue" placement="row">
|
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in labelList" :key="index"
|
| | | :label="item.name" :labelColor="item.color" :name="item.name" :activeColor="item.color" @change="radioChange(item)">
|
| | | </u-radio>
|
| | |
| | | title: '',
|
| | | selectedColor: ''
|
| | | },
|
| | | labelValue: '',
|
| | | labelValue: "",
|
| | | remark: '',
|
| | | // 标记
|
| | | number: 0
|
| | | number: 0 |
| | | |
| | | }
|
| | | },
|
| | | created() {
|
| | |
| | | this.labelModelInfo.title = item.name
|
| | | this.currentLabelInfo = item
|
| | | // 遍历标签集合
|
| | | this.labelList.forEach(e => {
|
| | | this.labelList.forEach(e => { |
| | | console.log(e.color,item.color);
|
| | | if (e.color == item.color) {
|
| | | this.labelValue = e.name
|
| | | this.labelValue = e.name |
| | | console.log(e);
|
| | | this.remark = item.remark
|
| | | this.number = 1
|
| | | }
|
| | |
| | | <view class="l flex">
|
| | | <u-icon name="/static/icon/selected.png" size="16"></u-icon>
|
| | | <!-- u-icon name="photo"></u-icon> -->
|
| | | <view class="owner-img-box">主</view>
|
| | | <view class="owner-img-box" v-if="item.relationship == 1">主</view>
|
| | | </view>
|
| | | <view class="r">
|
| | | <u-icon name="/static/icon/delete.png" size="16" @click="removeHouseholdSub(item)"></u-icon>
|
| | |
| | | // this.getLocation()
|
| | | },
|
| | | methods: {
|
| | | getLocation() {
|
| | | uni.chooseLocation({
|
| | | success: (res) => {
|
| | | console.log(res);
|
| | | }
|
| | | })
|
| | | },
|
| | | // getLocation() {
|
| | | // uni.chooseLocation({
|
| | | // success: (res) => {
|
| | | // console.log(res);
|
| | | // }
|
| | | // })
|
| | | // },
|
| | | getCsDetails() {
|
| | | getPlaceDetail({
|
| | | placeId: this.curSelectSite.id
|
| | |
| | | Object.keys(this.form).forEach(key => {
|
| | | this.form[key] = data[key]
|
| | | if (key === 'imageUrls' || key === 'planImageUrls') {
|
| | | this.form[key] = [] |
| | | !!data[key] && this.form[key].push(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]) |
| | | }
|
| | | }
|
| | | })
|
| | | }) |
| | | |
| | | console.log(this.form);
|
| | | this.personNum = placePractitioner.length
|
| | | this.$nextTick(() => {
|
| | | console.log(placePractitioner);
|
| | |
| | | })
|
| | | })
|
| | | })
|
| | | }, |
| | | updatePlaceExt(data) { |
| | | data['imageUrls'] = data['imageUrls'].join('、') |
| | | data['planImageUrls'] = data['planImageUrls'].join('、') |
| | | updatePlaceExtData({ |
| | | ...data |
| | | }).then(res => { |
| | | const { |
| | | code |
| | | } = res |
| | | if (code !== 200) { |
| | | uni.showToast({ |
| | | title: '提交失败', |
| | | icon: 'error' |
| | | }) |
| | | return |
| | | } |
| | | uni.showToast({ |
| | | title: '提交成功', |
| | | icon: 'success', |
| | | complete() { |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 1500) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | addPerson() { |
| | | this.personNum++ |
| | | }, |
| | | submit() { |
| | | const placePractitioner = [] |
| | | this.$refs.formItemRef.forEach(item => { |
| | | item.form.placeId = this.form.placeId |
| | | placePractitioner.push(item.form) |
| | | }) |
| | | this.form.placePractitioner = placePractitioner |
| | | this.updatePlaceExt(this.form) |
| | | }, |
| | | pushPage() { |
| | | this.$u.func.globalNavigator('/subPackage/workbench/views/cshw') |
| | | }
|
| | | },
|
| | | updatePlaceExt(data) {
|
| | | data['imageUrls'] = JSON.stringify(data['imageUrls'])
|
| | | data['planImageUrls'] = JSON.stringify(data['planImageUrls'])
|
| | | updatePlaceExtData({
|
| | | ...data
|
| | | }).then(res => {
|
| | | const {
|
| | | code
|
| | | } = res
|
| | | if (code !== 200) {
|
| | | uni.showToast({
|
| | | title: '提交失败',
|
| | | icon: 'error'
|
| | | })
|
| | | return
|
| | | }
|
| | | uni.showToast({
|
| | | title: '提交成功',
|
| | | icon: 'success',
|
| | | complete() {
|
| | | setTimeout(() => {
|
| | | uni.navigateBack()
|
| | | }, 1500)
|
| | | }
|
| | | })
|
| | | })
|
| | | },
|
| | | addPerson() {
|
| | | this.personNum++
|
| | | },
|
| | | submit() {
|
| | | const placePractitioner = []
|
| | | this.$refs.formItemRef.forEach(item => {
|
| | | item.form.placeId = this.form.placeId
|
| | | placePractitioner.push(item.form)
|
| | | })
|
| | | this.form.placePractitioner = placePractitioner
|
| | | this.updatePlaceExt(this.form)
|
| | | },
|
| | | pushPage() {
|
| | | this.$u.func.globalNavigator('/subPackage/workbench/views/cshw')
|
| | | }
|
| | | }
|
| | | </script>
|