Commit 911b5549950c1735829de32d9ac201352164c40d
1 parent
e94f0676
修改平凉客户 反馈的bug 修复
Showing
8 changed files
with
94 additions
and
125 deletions
src/components/account/prestoreAccount.vue
| 1 | 1 | <template> |
| 2 | 2 | <el-dialog :title="$t('prestoreAccount.title')" :visible.sync="visible" width="800px" @close="handleClose"> |
| 3 | - <el-form ref="form" :model="formData" label-width="120px"> | |
| 3 | + <el-form ref="form" :model="formData" :rules="rules" label-width="120px"> | |
| 4 | 4 | <el-form-item :label="$t('prestoreAccount.accountType')" prop="acctType" required> |
| 5 | 5 | <el-select v-model="formData.acctType" class="w-full" :placeholder="$t('prestoreAccount.accountType')"> |
| 6 | 6 | <el-option v-for="(type, index) in acctTypes" :key="index" :label="type.name" :value="type.statusCd" /> |
| ... | ... | @@ -8,8 +8,7 @@ |
| 8 | 8 | </el-form-item> |
| 9 | 9 | |
| 10 | 10 | <el-form-item :label="$t('prestoreAccount.ownerPhone')" prop="tel" required> |
| 11 | - <el-input v-model="formData.tel" :placeholder="$t('prestoreAccount.ownerPhone')" | |
| 12 | - @blur="handleTelChange" /> | |
| 11 | + <el-input v-model="formData.tel" :placeholder="$t('prestoreAccount.ownerPhone')" @blur="handleTelChange" /> | |
| 13 | 12 | </el-form-item> |
| 14 | 13 | |
| 15 | 14 | <el-form-item :label="$t('prestoreAccount.ownerName')" prop="ownerId" required> |
| ... | ... | @@ -40,8 +39,7 @@ |
| 40 | 39 | </el-form-item> |
| 41 | 40 | |
| 42 | 41 | <el-form-item :label="$t('prestoreAccount.remark')" prop="remark"> |
| 43 | - <el-input v-model="formData.remark" type="textarea" :placeholder="$t('prestoreAccount.remark')" | |
| 44 | - :rows="3" /> | |
| 42 | + <el-input v-model="formData.remark" type="textarea" :placeholder="$t('prestoreAccount.remark')" :rows="3" /> | |
| 45 | 43 | </el-form-item> |
| 46 | 44 | </el-form> |
| 47 | 45 | |
| ... | ... | @@ -72,7 +70,15 @@ export default { |
| 72 | 70 | acctTypes: [], |
| 73 | 71 | primeRates: [], |
| 74 | 72 | owners: [], |
| 75 | - rooms: [] | |
| 73 | + rooms: [], | |
| 74 | + rules: { | |
| 75 | + acctType: [{ required: true, message: this.$t('prestoreAccount.accountType'), trigger: 'change' }], | |
| 76 | + tel: [{ required: true, message: this.$t('prestoreAccount.ownerPhone'), trigger: 'blur' }], | |
| 77 | + ownerId: [{ required: true, message: this.$t('prestoreAccount.ownerName'), trigger: 'change' }], | |
| 78 | + roomId: [{ required: true, message: this.$t('prestoreAccount.deductionRoom'), trigger: 'change' }], | |
| 79 | + amount: [{ required: true, message: this.$t('prestoreAccount.prestoreAmount'), trigger: 'blur' }], | |
| 80 | + primeRate: [{ required: true, message: this.$t('prestoreAccount.paymentMethod'), trigger: 'change' }] | |
| 81 | + } | |
| 76 | 82 | } |
| 77 | 83 | }, |
| 78 | 84 | methods: { |
| ... | ... | @@ -154,31 +160,16 @@ export default { |
| 154 | 160 | }, |
| 155 | 161 | |
| 156 | 162 | validateForm() { |
| 157 | - const requiredFields = [ | |
| 158 | - 'ownerId', 'amount', 'acctType', 'primeRate' | |
| 159 | - ] | |
| 160 | - | |
| 161 | - if (this.formData.acctType === '2004' || this.formData.acctType === '2005') { | |
| 162 | - requiredFields.push('roomId') | |
| 163 | - } | |
| 164 | - | |
| 165 | - for (const field of requiredFields) { | |
| 166 | - if (!this.formData[field]) { | |
| 167 | - this.$message.warning(this.$t('prestoreAccount.placeholder' + field.charAt(0).toUpperCase() + field.slice(1))) | |
| 168 | - return false | |
| 169 | - } | |
| 170 | - } | |
| 171 | - | |
| 172 | - if (!this.formData.amount) { | |
| 173 | - this.$message.warning(this.$t('prestoreAccount.placeholderAmount')) | |
| 174 | - return false | |
| 175 | - } | |
| 176 | - | |
| 177 | - return true | |
| 163 | + return new Promise((resolve) => { | |
| 164 | + this.$refs.form.validate((valid) => { | |
| 165 | + resolve(valid) | |
| 166 | + }) | |
| 167 | + }) | |
| 178 | 168 | }, |
| 179 | 169 | |
| 180 | 170 | async handleSave() { |
| 181 | - if (!this.validateForm()) return | |
| 171 | + const valid = await this.validateForm() | |
| 172 | + if (!valid) return | |
| 182 | 173 | |
| 183 | 174 | try { |
| 184 | 175 | await ownerPrestoreAccount(this.formData) | ... | ... |
src/components/fee/prestoreAccount.vue
| ... | ... | @@ -4,8 +4,8 @@ |
| 4 | 4 | :visible.sync="dialogVisible" |
| 5 | 5 | width="50%" |
| 6 | 6 | > |
| 7 | - <el-form :model="prestoreAccountInfo" label-width="120px"> | |
| 8 | - <el-form-item :label="$t('prestoreAccount.accountType')" required> | |
| 7 | + <el-form :model="prestoreAccountInfo" :rules="rules" ref="form" label-width="120px"> | |
| 8 | + <el-form-item :label="$t('prestoreAccount.accountType')" prop="acctType" required> | |
| 9 | 9 | <el-select |
| 10 | 10 | v-model="prestoreAccountInfo.acctType" |
| 11 | 11 | style="width: 100%" |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | </el-select> |
| 25 | 25 | </el-form-item> |
| 26 | 26 | |
| 27 | - <el-form-item :label="$t('prestoreAccount.ownerPhone')" required> | |
| 27 | + <el-form-item :label="$t('prestoreAccount.ownerPhone')" prop="tel" required> | |
| 28 | 28 | <el-input |
| 29 | 29 | v-model="prestoreAccountInfo.tel" |
| 30 | 30 | :placeholder="$t('prestoreAccount.ownerPhonePlaceholder')" |
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | ></el-input> |
| 33 | 33 | </el-form-item> |
| 34 | 34 | |
| 35 | - <el-form-item :label="$t('prestoreAccount.ownerName')" required> | |
| 35 | + <el-form-item :label="$t('prestoreAccount.ownerName')" prop="ownerId" required> | |
| 36 | 36 | <el-select |
| 37 | 37 | v-model="prestoreAccountInfo.ownerId" |
| 38 | 38 | style="width: 100%" |
| ... | ... | @@ -55,6 +55,7 @@ |
| 55 | 55 | <el-form-item |
| 56 | 56 | v-if="prestoreAccountInfo.acctType == '2004' || prestoreAccountInfo.acctType == '2005'" |
| 57 | 57 | :label="$t('prestoreAccount.deductionRoom')" |
| 58 | + prop="roomId" | |
| 58 | 59 | required |
| 59 | 60 | > |
| 60 | 61 | <el-select v-model="prestoreAccountInfo.roomId" style="width: 100%"> |
| ... | ... | @@ -72,14 +73,14 @@ |
| 72 | 73 | </el-select> |
| 73 | 74 | </el-form-item> |
| 74 | 75 | |
| 75 | - <el-form-item :label="$t('prestoreAccount.prestoreAmount')" required> | |
| 76 | + <el-form-item :label="$t('prestoreAccount.prestoreAmount')" prop="amount" required> | |
| 76 | 77 | <el-input |
| 77 | 78 | v-model="prestoreAccountInfo.amount" |
| 78 | 79 | :placeholder="$t('prestoreAccount.prestoreAmountPlaceholder')" |
| 79 | 80 | ></el-input> |
| 80 | 81 | </el-form-item> |
| 81 | 82 | |
| 82 | - <el-form-item :label="$t('prestoreAccount.paymentMethod')" required> | |
| 83 | + <el-form-item :label="$t('prestoreAccount.paymentMethod')" prop="primeRate" required> | |
| 83 | 84 | <el-select v-model="prestoreAccountInfo.primeRate" style="width: 100%"> |
| 84 | 85 | <el-option |
| 85 | 86 | :label="$t('prestoreAccount.selectPaymentMethod')" |
| ... | ... | @@ -96,7 +97,7 @@ |
| 96 | 97 | </el-select> |
| 97 | 98 | </el-form-item> |
| 98 | 99 | |
| 99 | - <el-form-item :label="$t('prestoreAccount.remark')"> | |
| 100 | + <el-form-item :label="$t('prestoreAccount.remark')" prop="remark"> | |
| 100 | 101 | <el-input |
| 101 | 102 | type="textarea" |
| 102 | 103 | :rows="3" |
| ... | ... | @@ -136,7 +137,16 @@ export default { |
| 136 | 137 | rooms: [], |
| 137 | 138 | roomId: '', |
| 138 | 139 | }, |
| 139 | - communityId: '' | |
| 140 | + communityId: '', | |
| 141 | + rules: { | |
| 142 | + acctType: [{ required: true, message: this.$t('prestoreAccount.selectAccountType'), trigger: 'change' }], | |
| 143 | + tel: [{ required: true, message: this.$t('prestoreAccount.ownerPhonePlaceholder'), trigger: 'blur' }], | |
| 144 | + ownerId: [{ required: true, message: this.$t('prestoreAccount.selectOwner'), trigger: 'change' }], | |
| 145 | + roomId: [{ required: true, message: this.$t('prestoreAccount.selectRoom'), trigger: 'change' }], | |
| 146 | + amount: [{ required: true, message: this.$t('prestoreAccount.prestoreAmountPlaceholder'), trigger: 'blur' }], | |
| 147 | + primeRate: [{ required: true, message: this.$t('prestoreAccount.selectPaymentMethod'), trigger: 'change' }], | |
| 148 | + remark: [{ max: 200, message: this.$t('prestoreAccount.validateRemark'), trigger: 'blur' }] | |
| 149 | + } | |
| 140 | 150 | } |
| 141 | 151 | }, |
| 142 | 152 | created() { |
| ... | ... | @@ -171,44 +181,34 @@ export default { |
| 171 | 181 | }) |
| 172 | 182 | }, |
| 173 | 183 | prestoreAccountValidate() { |
| 174 | - if (!this.prestoreAccountInfo.ownerId) { | |
| 175 | - this.$message.error(this.$t('prestoreAccount.validateOwner')) | |
| 176 | - return false | |
| 177 | - } | |
| 178 | - if (!this.prestoreAccountInfo.amount) { | |
| 179 | - this.$message.error(this.$t('prestoreAccount.validateAmount')) | |
| 180 | - return false | |
| 181 | - } | |
| 182 | - if (!this.prestoreAccountInfo.acctType) { | |
| 183 | - this.$message.error(this.$t('prestoreAccount.validateAccountType')) | |
| 184 | - return false | |
| 185 | - } | |
| 186 | - if (this.prestoreAccountInfo.remark && this.prestoreAccountInfo.remark.length > 200) { | |
| 187 | - this.$message.error(this.$t('prestoreAccount.validateRemark')) | |
| 188 | - return false | |
| 189 | - } | |
| 190 | - return true | |
| 184 | + return new Promise((resolve) => { | |
| 185 | + this.$refs.form.validate((valid) => { | |
| 186 | + resolve(valid) | |
| 187 | + }) | |
| 188 | + }) | |
| 191 | 189 | }, |
| 192 | 190 | savePrestoreAccountInfo() { |
| 193 | - if (!this.prestoreAccountValidate()) return | |
| 191 | + this.prestoreAccountValidate().then(valid => { | |
| 192 | + if (valid) { | |
| 193 | + const params = { | |
| 194 | + ...this.prestoreAccountInfo, | |
| 195 | + communityId: this.communityId | |
| 196 | + } | |
| 194 | 197 | |
| 195 | - const params = { | |
| 196 | - ...this.prestoreAccountInfo, | |
| 197 | - communityId: this.communityId | |
| 198 | - } | |
| 199 | - | |
| 200 | - ownerPrestoreAccount(params).then(response => { | |
| 201 | - if (response.code === 0) { | |
| 202 | - this.$message.success(this.$t('prestoreAccount.saveSuccess')) | |
| 203 | - this.dialogVisible = false | |
| 204 | - this.clearPrestoreAccountInfo() | |
| 205 | - this.$emit('save-success') | |
| 206 | - } else { | |
| 207 | - this.$message.error(response.msg) | |
| 198 | + ownerPrestoreAccount(params).then(response => { | |
| 199 | + if (response.code === 0) { | |
| 200 | + this.$message.success(this.$t('prestoreAccount.saveSuccess')) | |
| 201 | + this.dialogVisible = false | |
| 202 | + this.clearPrestoreAccountInfo() | |
| 203 | + this.$emit('save-success') | |
| 204 | + } else { | |
| 205 | + this.$message.error(response.msg) | |
| 206 | + } | |
| 207 | + }).catch(error => { | |
| 208 | + console.error('请求失败:', error) | |
| 209 | + this.$message.error(this.$t('prestoreAccount.saveFailed')) | |
| 210 | + }) | |
| 208 | 211 | } |
| 209 | - }).catch(error => { | |
| 210 | - console.error('请求失败:', error) | |
| 211 | - this.$message.error(this.$t('prestoreAccount.saveFailed')) | |
| 212 | 212 | }) |
| 213 | 213 | }, |
| 214 | 214 | clearPrestoreAccountInfo() { |
| ... | ... | @@ -226,6 +226,8 @@ export default { |
| 226 | 226 | rooms: [], |
| 227 | 227 | roomId: '', |
| 228 | 228 | } |
| 229 | + // 重置表单验证状态 | |
| 230 | + this.$refs.form && this.$refs.form.resetFields() | |
| 229 | 231 | }, |
| 230 | 232 | _changeTel() { |
| 231 | 233 | if (!this.prestoreAccountInfo.tel) return | ... | ... |
src/components/owner/addOwner.vue
| ... | ... | @@ -152,8 +152,7 @@ export default { |
| 152 | 152 | ], |
| 153 | 153 | rules: { |
| 154 | 154 | name: [ |
| 155 | - { required: true, message: this.$t('listOwner.rules.nameRequired'), trigger: 'blur' }, | |
| 156 | - { min: 2, max: 64, message: this.$t('listOwner.rules.nameLength'), trigger: 'blur' } | |
| 155 | + { required: true, message: this.$t('listOwner.placeholders.name'), trigger: 'blur' }, | |
| 157 | 156 | ], |
| 158 | 157 | personType: [ |
| 159 | 158 | { required: true, message: this.$t('listOwner.rules.typeRequired'), trigger: 'change' } |
| ... | ... | @@ -162,8 +161,7 @@ export default { |
| 162 | 161 | { required: true, message: this.$t('listOwner.rules.roleRequired'), trigger: 'change' } |
| 163 | 162 | ], |
| 164 | 163 | link: [ |
| 165 | - { required: true, message: this.$t('listOwner.rules.phoneRequired'), trigger: 'blur' }, | |
| 166 | - { pattern: /^1[3-9]\d{9}$/, message: this.$t('listOwner.rules.phoneFormat'), trigger: 'blur' } | |
| 164 | + { required: true, message: this.$t('listOwner.placeholders.name'), trigger: 'blur' }, | |
| 167 | 165 | ], |
| 168 | 166 | sex: [ |
| 169 | 167 | { required: true, message: this.$t('listOwner.rules.genderRequired'), trigger: 'change' } | ... | ... |
src/components/owner/editOwner.vue
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | <el-col :span="12"> |
| 6 | 6 | <el-form-item :label="$t('listOwner.columns.type')" prop="personType"> |
| 7 | 7 | <el-select v-model="form.personType" style="width:100%"> |
| 8 | - <el-option v-for="(type,index) in personTypes" :key="index" :label="type.label" :value="type.value" /> | |
| 8 | + <el-option v-for="(type, index) in personTypes" :key="index" :label="type.label" :value="type.value" /> | |
| 9 | 9 | </el-select> |
| 10 | 10 | </el-form-item> |
| 11 | 11 | |
| ... | ... | @@ -153,21 +153,19 @@ export default { |
| 153 | 153 | ], |
| 154 | 154 | rules: { |
| 155 | 155 | name: [ |
| 156 | - { required: true, message: this.$t('listOwner.rules.nameRequired'), trigger: 'blur' }, | |
| 157 | - { min: 2, max: 64, message: this.$t('listOwner.rules.nameLength'), trigger: 'blur' } | |
| 156 | + { required: true, message: this.$t('listOwner.placeholders.name'), trigger: 'blur' }, | |
| 158 | 157 | ], |
| 159 | 158 | personType: [ |
| 160 | - { required: true, message: this.$t('listOwner.rules.typeRequired'), trigger: 'change' } | |
| 159 | + { required: true, message: this.$t('listOwner.placeholders.typeRequired'), trigger: 'change' } | |
| 161 | 160 | ], |
| 162 | 161 | personRole: [ |
| 163 | - { required: true, message: this.$t('listOwner.rules.roleRequired'), trigger: 'change' } | |
| 162 | + { required: true, message: this.$t('listOwner.placeholders.roleRequired'), trigger: 'change' } | |
| 164 | 163 | ], |
| 165 | 164 | link: [ |
| 166 | - { required: true, message: this.$t('listOwner.rules.phoneRequired'), trigger: 'blur' }, | |
| 167 | - { pattern: /^1[3-9]\d{9}$/, message: this.$t('listOwner.rules.phoneFormat'), trigger: 'blur' } | |
| 165 | + { required: true, message: this.$t('listOwner.placeholders.phoneRequired'), trigger: 'blur' }, | |
| 168 | 166 | ], |
| 169 | 167 | sex: [ |
| 170 | - { required: true, message: this.$t('listOwner.rules.genderRequired'), trigger: 'change' } | |
| 168 | + { required: true, message: this.$t('listOwner.placeholders.genderRequired'), trigger: 'change' } | |
| 171 | 169 | ] |
| 172 | 170 | } |
| 173 | 171 | } |
| ... | ... | @@ -181,7 +179,7 @@ export default { |
| 181 | 179 | |
| 182 | 180 | async loadAttributes() { |
| 183 | 181 | try { |
| 184 | - const data = await getAttrSpecList({ page: 1, row: 100, tableName: 'building_owner_attr'}) | |
| 182 | + const data = await getAttrSpecList({ page: 1, row: 100, tableName: 'building_owner_attr' }) | |
| 185 | 183 | this.attrs = data.filter(item => item.specShow === 'Y') |
| 186 | 184 | |
| 187 | 185 | for (const attr of this.attrs) { | ... | ... |
src/i18n/commonLang.js
| ... | ... | @@ -11,6 +11,7 @@ export const messages = { |
| 11 | 11 | delete: 'Delete', |
| 12 | 12 | confirm: 'Confirm', |
| 13 | 13 | cancel: 'Cancel', |
| 14 | + none: 'None', | |
| 14 | 15 | close: 'Close', |
| 15 | 16 | back: 'Back', |
| 16 | 17 | warning: 'Warning', |
| ... | ... | @@ -74,6 +75,7 @@ export const messages = { |
| 74 | 75 | delete: '删除', |
| 75 | 76 | confirm: '确定', |
| 76 | 77 | cancel: '取消', |
| 78 | + none: '无', | |
| 77 | 79 | close: '关闭', |
| 78 | 80 | back: '返回', |
| 79 | 81 | warning: '警告', | ... | ... |
src/views/community/addCommunityPublicityLang.js
| ... | ... | @@ -10,7 +10,8 @@ export const messages = { |
| 10 | 10 | submit: 'Submit', |
| 11 | 11 | requiredTitle: 'Required, please fill in the publicity title', |
| 12 | 12 | requiredType: 'Required, please select publicity type', |
| 13 | - requiredContent: 'Required, please enter announcement content' | |
| 13 | + requiredContent: 'Required, please enter announcement content', | |
| 14 | + requiredHeaderPhoto: 'Required, please upload header photo' | |
| 14 | 15 | } |
| 15 | 16 | }, |
| 16 | 17 | zh: { |
| ... | ... | @@ -24,7 +25,8 @@ export const messages = { |
| 24 | 25 | submit: '提交', |
| 25 | 26 | requiredTitle: '必填,请填写公示标题', |
| 26 | 27 | requiredType: '必填,请选择公示类型', |
| 27 | - requiredContent: '必填,请输入公告内容' | |
| 28 | + requiredContent: '必填,请输入公告内容', | |
| 29 | + requiredHeaderPhoto: '必填,请上传头部照片' | |
| 28 | 30 | } |
| 29 | 31 | } |
| 30 | 32 | } |
| 31 | 33 | \ No newline at end of file | ... | ... |
src/views/community/addCommunityPublicityList.vue
| ... | ... | @@ -2,10 +2,7 @@ |
| 2 | 2 | <el-card class="add-publicity-container"> |
| 3 | 3 | <div slot="header" class="flex justify-between"> |
| 4 | 4 | <span>{{ $t('addCommunityPublicity.title') }}</span> |
| 5 | - <el-button | |
| 6 | - style="float: right; padding: 3px 0" | |
| 7 | - type="text" | |
| 8 | - @click="goBack"> | |
| 5 | + <el-button style="float: right; padding: 3px 0" type="text" @click="goBack"> | |
| 9 | 6 | <i class="el-icon-close"></i>{{ $t('addCommunityPublicity.back') }} |
| 10 | 7 | </el-button> |
| 11 | 8 | </div> |
| ... | ... | @@ -13,55 +10,33 @@ |
| 13 | 10 | <el-form ref="form" :model="formData" label-width="120px"> |
| 14 | 11 | <el-row :gutter="20"> |
| 15 | 12 | <el-col :span="12"> |
| 16 | - <el-form-item | |
| 17 | - :label="$t('addCommunityPublicity.pubTitle')" | |
| 18 | - prop="title" | |
| 13 | + <el-form-item :label="$t('addCommunityPublicity.pubTitle')" prop="title" | |
| 19 | 14 | :rules="[{ required: true, message: $t('addCommunityPublicity.requiredTitle'), trigger: 'blur' }]"> |
| 20 | - <el-input | |
| 21 | - v-model="formData.title" | |
| 22 | - :placeholder="$t('addCommunityPublicity.requiredTitle')" | |
| 23 | - clearable> | |
| 15 | + <el-input v-model="formData.title" :placeholder="$t('addCommunityPublicity.requiredTitle')" clearable> | |
| 24 | 16 | </el-input> |
| 25 | 17 | </el-form-item> |
| 26 | 18 | </el-col> |
| 27 | 19 | <el-col :span="12"> |
| 28 | - <el-form-item | |
| 29 | - :label="$t('addCommunityPublicity.pubType')" | |
| 30 | - prop="pubType" | |
| 20 | + <el-form-item :label="$t('addCommunityPublicity.pubType')" prop="pubType" | |
| 31 | 21 | :rules="[{ required: true, message: $t('addCommunityPublicity.requiredType'), trigger: 'change' }]"> |
| 32 | - <el-select | |
| 33 | - v-model="formData.pubType" | |
| 34 | - :placeholder="$t('addCommunityPublicity.requiredType')" | |
| 22 | + <el-select v-model="formData.pubType" :placeholder="$t('addCommunityPublicity.requiredType')" | |
| 35 | 23 | style="width: 100%"> |
| 36 | - <el-option | |
| 37 | - v-for="item in pubTypes" | |
| 38 | - :key="item.statusCd" | |
| 39 | - :label="item.name" | |
| 40 | - :value="item.statusCd"> | |
| 24 | + <el-option v-for="item in pubTypes" :key="item.statusCd" :label="item.name" :value="item.statusCd"> | |
| 41 | 25 | </el-option> |
| 42 | 26 | </el-select> |
| 43 | 27 | </el-form-item> |
| 44 | 28 | </el-col> |
| 45 | 29 | </el-row> |
| 46 | 30 | |
| 47 | - <el-form-item | |
| 48 | - :label="$t('addCommunityPublicity.headerPhoto')" | |
| 49 | - prop="headerImg" | |
| 31 | + <el-form-item :label="$t('addCommunityPublicity.headerPhoto')" prop="headerImg" | |
| 50 | 32 | :rules="[{ required: true, message: $t('addCommunityPublicity.requiredHeaderPhoto'), trigger: 'change' }]"> |
| 51 | - <upload-image-url | |
| 52 | - ref="uploadImage" | |
| 53 | - :image-count="1" | |
| 54 | - @notifyUploadCoverImage="handleImageUpload"> | |
| 33 | + <upload-image-url ref="uploadImage" :image-count="1" @notifyUploadCoverImage="handleImageUpload"> | |
| 55 | 34 | </upload-image-url> |
| 56 | 35 | </el-form-item> |
| 57 | 36 | |
| 58 | - <el-form-item | |
| 59 | - :label="$t('addCommunityPublicity.activityContent')" | |
| 60 | - prop="context" | |
| 37 | + <el-form-item :label="$t('addCommunityPublicity.activityContent')" prop="context" | |
| 61 | 38 | :rules="[{ required: true, message: $t('addCommunityPublicity.requiredContent'), trigger: 'blur' }]"> |
| 62 | - <rich-text-editor | |
| 63 | - v-model="formData.context" | |
| 64 | - :height="300" | |
| 39 | + <rich-text-editor v-model="formData.context" :height="300" | |
| 65 | 40 | :placeholder="$t('addCommunityPublicity.requiredContent')"> |
| 66 | 41 | </rich-text-editor> |
| 67 | 42 | </el-form-item> |
| ... | ... | @@ -76,8 +51,8 @@ |
| 76 | 51 | |
| 77 | 52 | <script> |
| 78 | 53 | import UploadImageUrl from '@/components/upload/UploadImageUrl' |
| 79 | -import { saveCommunityPublicity } from '@/api/community/addCommunityPublicityApi' | |
| 80 | -import { getCommunityId ,getDict} from '@/api/community/communityApi' | |
| 54 | +import { saveCommunityPublicity } from '@/api/community/addCommunityPublicityApi' | |
| 55 | +import { getCommunityId, getDict } from '@/api/community/communityApi' | |
| 81 | 56 | import richTextEditor from '@/components/editor/RichTextEditor' |
| 82 | 57 | |
| 83 | 58 | export default { |
| ... | ... | @@ -112,7 +87,7 @@ export default { |
| 112 | 87 | }, |
| 113 | 88 | handleImageUpload(images) { |
| 114 | 89 | if (images.length > 0) { |
| 115 | - this.formData.headerImg = images[0]|| images[0] | |
| 90 | + this.formData.headerImg = images[0] || images[0] | |
| 116 | 91 | } else { |
| 117 | 92 | this.formData.headerImg = '' |
| 118 | 93 | } |
| ... | ... | @@ -152,6 +127,7 @@ export default { |
| 152 | 127 | .add-publicity-container { |
| 153 | 128 | margin: 20px; |
| 154 | 129 | } |
| 130 | + | |
| 155 | 131 | .text-right { |
| 156 | 132 | text-align: right; |
| 157 | 133 | } | ... | ... |
src/views/owner/listOwnerLang.js
| ... | ... | @@ -14,7 +14,7 @@ export const messages = { |
| 14 | 14 | personal: 'Personal', |
| 15 | 15 | company: 'Company' |
| 16 | 16 | }, |
| 17 | - personTypeName:'Person Type', | |
| 17 | + personTypeName: 'Person Type', | |
| 18 | 18 | gender: { |
| 19 | 19 | male: 'Male', |
| 20 | 20 | female: 'Female' |
| ... | ... | @@ -77,7 +77,7 @@ export const messages = { |
| 77 | 77 | personal: '个人', |
| 78 | 78 | company: '公司' |
| 79 | 79 | }, |
| 80 | - personTypeName:'人员类型', | |
| 80 | + personTypeName: '人员类型', | |
| 81 | 81 | gender: { |
| 82 | 82 | male: '男', |
| 83 | 83 | female: '女' | ... | ... |