办公室配套
This commit is contained in:
@@ -146,13 +146,9 @@
|
||||
<text class="title">办公室配套</text>
|
||||
</view>
|
||||
<view class="form-wrapper">
|
||||
<view class="house-label" v-if="dict">
|
||||
<view class="u-page__tag-item" v-for="(item, index) in dict.supporting[0]" :key="index">
|
||||
<u-tag :text="`${item}`" type="info" :plain="inArr(item)" :name="index"
|
||||
:bgColor="inArr(item) ? '' : '#fd8008'" :borderColor="inArr(item) ? '' : '#fd8008'"
|
||||
@click="onHouseLabel(item)">
|
||||
</u-tag>
|
||||
</view>
|
||||
<view class="textarea">
|
||||
<u--textarea v-model="form.supporting" placeholder="请输入办公室配套"
|
||||
:customStyle="{backgroundColor: '#f3f3f3'}" maxlength="200"></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
@@ -353,6 +349,7 @@
|
||||
DictApi.listDictionary().then(res => {
|
||||
this.dict = res.data;
|
||||
})
|
||||
|
||||
},
|
||||
getHouse(id){
|
||||
const app = this
|
||||
@@ -362,6 +359,8 @@
|
||||
app.form = res.data
|
||||
app.houseLabel = JSON.parse(app.form.houseLabel) || []
|
||||
app.fileList1 = JSON.parse(app.form.files) || []
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
onChangeTab(e) {
|
||||
@@ -478,11 +477,13 @@
|
||||
const app = this
|
||||
if (app.disabled === true) return
|
||||
console.log("app.tempFile: ", app.tempFile);
|
||||
const supporting = this.supportingData.filter(item=>item.checked)
|
||||
this.$refs.uForm.validate().then(() => {
|
||||
app.disabled = true
|
||||
app.form.houseLabel = JSON.stringify(app.houseLabel)
|
||||
app.form.files = JSON.stringify(app.fileList1)
|
||||
app.form.videoUrl = app.fileList2[0]?app.fileList2[0].url: null
|
||||
app.form.supporting = JSON.stringify(supporting)
|
||||
const saveOrUpdate = app.selectId > 0 ? updateHouseInfo : addHouseInfo;
|
||||
saveOrUpdate(app.form).then(result => {
|
||||
app.$toast('保存成功')
|
||||
@@ -553,6 +554,9 @@
|
||||
app.houseLabel.push(text)
|
||||
}
|
||||
},
|
||||
onSupportingLabel(item) {
|
||||
item.checked = !item.checked
|
||||
},
|
||||
inArr(text) {
|
||||
const {
|
||||
houseLabel
|
||||
|
||||
Reference in New Issue
Block a user