| | |
| | |
|
| | | //表单提交
|
| | | submit() {
|
| | | const that = this
|
| | | this.$refs.form.validate().then(valid => {
|
| | | if (valid) {
|
| | | if (this.form?.images?.length > 0) {
|
| | | let urls = []
|
| | | this.form.images.forEach(e => {
|
| | | urls.push(e.name)
|
| | | })
|
| | | this.form.imageUrls = urls.join(",")
|
| | | if (!this.form.placeName) {
|
| | | this.$showTips("请输入场所名称")
|
| | | return
|
| | | }
|
| | |
|
| | | if (!this.form.label) {
|
| | | this.$showTips("请选择标签")
|
| | | return
|
| | | }
|
| | |
|
| | |
|
| | | // this.$refs.form.validate().then(valid => {
|
| | | // if (valid) {
|
| | | if (this.form?.images?.length > 0) {
|
| | | let urls = []
|
| | | this.form.images.forEach(e => {
|
| | | urls.push(e.name)
|
| | | })
|
| | | this.form.imageUrls = urls.join(",")
|
| | | }
|
| | |
|
| | | this.form.roleName = uni.getStorageSync("activeRole").roleName;
|
| | | if (this.form.isNine == 2 && this.form.nineType) {
|
| | | this.form.nineType = "";
|
| | | }
|
| | | if (this.form.isFront == 2 && this.form.frontType) {
|
| | | this.form.frontType = "";
|
| | | }
|
| | |
|
| | | if (this.form.isNine == 1 && !this.form.nineType) {
|
| | | this.$showTips("请选择九小场所类型")
|
| | | return
|
| | | }
|
| | |
|
| | | if (this.form.isFront == 1 && !this.form.frontType) {
|
| | | this.$showTips("请选择阵地类型")
|
| | | return
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | delete this.form.images;
|
| | |
|
| | | add(this.form).then(res => {
|
| | | uni.showToast({
|
| | | icon: 'success',
|
| | | title: '提交成功',
|
| | | success() {
|
| | | setTimeout(() => {
|
| | | uni.$emit("refresh")
|
| | | uni.navigateBack()
|
| | | // that.$u.func.globalNavigator(
|
| | | // "/pages/home/index", "switchTab")
|
| | | }, 300)
|
| | | }
|
| | |
|
| | | this.form.roleName = uni.getStorageSync("activeRole").roleName;
|
| | | if (this.form.isNine == 2 && this.form.nineType) {
|
| | | this.form.nineType = "";
|
| | | }
|
| | | if (this.form.isFront == 2 && this.form.frontType) {
|
| | | this.form.frontType = "";
|
| | | }
|
| | |
|
| | | if (this.form.isNine == 1 && !this.form.nineType) {
|
| | | this.$showTips("请选择九小场所类型")
|
| | | return
|
| | | }
|
| | |
|
| | | if (this.form.isFront == 1 && !this.form.frontType) {
|
| | | this.$showTips("请选择阵地类型")
|
| | | return
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | delete this.form.images;
|
| | |
|
| | | add(this.form).then(res => {
|
| | | uni.showToast({
|
| | | icon: 'success',
|
| | | title: '提交成功',
|
| | | success() {
|
| | | setTimeout(() => {
|
| | | uni.$emit("refresh")
|
| | | uni.navigateBack()
|
| | | // that.$u.func.globalNavigator(
|
| | | // "/pages/home/index", "switchTab")
|
| | | }, 300)
|
| | | }
|
| | | })
|
| | | })
|
| | | }
|
| | | })
|
| | | })
|
| | | // }
|
| | | // })
|
| | | },
|
| | |
|
| | | async buildColumn() {
|