Loading src/views/riskProject/add/addFloor.vue +19 −2 Original line number Original line Diff line number Diff line Loading @@ -45,6 +45,10 @@ export default { props: { props: { buildingId: { buildingId: { type: String, type: String, }, floorList: { type: Array, default: () => [] } } }, }, destroyed() { destroyed() { Loading @@ -62,12 +66,25 @@ export default { this.$emit('close', data) this.$emit('close', data) }, }, onSubmit(values) { onSubmit(values) { console.log(this.buildingId) if (!this.buildingId) { if (!this.buildingId) { return; return; } } this.form.buildingId = this.buildingId this.form.buildingId = this.buildingId this.form.name = this.form.name + '层' const name = this.form.name + '层' /* 检测类型当前楼层是否已存在 */ const typeObj = this.floorList.find(item => item.text === this.form.type); if (typeObj && typeObj.children.find(item => item.text === name)) { this.$toast.fail({ message: "楼层已存在", duration: 2000 }); return; } if (!this.form.name.endsWith('层')) { this.form.name = name } postFun('/risk/plan/floor', this.form) postFun('/risk/plan/floor', this.form) .then(res => { .then(res => { this.$toast.clear(); this.$toast.clear(); Loading src/views/riskProject/add/addInherent.vue +1 −1 Original line number Original line Diff line number Diff line Loading @@ -324,7 +324,7 @@ </div> </div> </van-popup> </van-popup> <div v-if="isFloor"> <div v-if="isFloor"> <addFloor @close="closeFloor" :buildingId="form.buildingIds" /> <addFloor @close="closeFloor" :buildingId="form.buildingIds" :floorList="floorSource" /> </div> </div> <!-- 管控责任人 --> <!-- 管控责任人 --> <van-popup v-model="showTrouble" position="bottom"> <van-popup v-model="showTrouble" position="bottom"> Loading Loading
src/views/riskProject/add/addFloor.vue +19 −2 Original line number Original line Diff line number Diff line Loading @@ -45,6 +45,10 @@ export default { props: { props: { buildingId: { buildingId: { type: String, type: String, }, floorList: { type: Array, default: () => [] } } }, }, destroyed() { destroyed() { Loading @@ -62,12 +66,25 @@ export default { this.$emit('close', data) this.$emit('close', data) }, }, onSubmit(values) { onSubmit(values) { console.log(this.buildingId) if (!this.buildingId) { if (!this.buildingId) { return; return; } } this.form.buildingId = this.buildingId this.form.buildingId = this.buildingId this.form.name = this.form.name + '层' const name = this.form.name + '层' /* 检测类型当前楼层是否已存在 */ const typeObj = this.floorList.find(item => item.text === this.form.type); if (typeObj && typeObj.children.find(item => item.text === name)) { this.$toast.fail({ message: "楼层已存在", duration: 2000 }); return; } if (!this.form.name.endsWith('层')) { this.form.name = name } postFun('/risk/plan/floor', this.form) postFun('/risk/plan/floor', this.form) .then(res => { .then(res => { this.$toast.clear(); this.$toast.clear(); Loading
src/views/riskProject/add/addInherent.vue +1 −1 Original line number Original line Diff line number Diff line Loading @@ -324,7 +324,7 @@ </div> </div> </van-popup> </van-popup> <div v-if="isFloor"> <div v-if="isFloor"> <addFloor @close="closeFloor" :buildingId="form.buildingIds" /> <addFloor @close="closeFloor" :buildingId="form.buildingIds" :floorList="floorSource" /> </div> </div> <!-- 管控责任人 --> <!-- 管控责任人 --> <van-popup v-model="showTrouble" position="bottom"> <van-popup v-model="showTrouble" position="bottom"> Loading