Commit b550a0c64b51cb8b7931ade7a8115408c075772a
1 parent
96aa66de
优化房产导入,错误不提示的bug
Showing
7 changed files
with
55 additions
and
51 deletions
src/api/org/orgApi.js
| @@ -103,7 +103,7 @@ export function deleteOrg(data) { | @@ -103,7 +103,7 @@ export function deleteOrg(data) { | ||
| 103 | if (res.code == 0) { | 103 | if (res.code == 0) { |
| 104 | resolve(res) | 104 | resolve(res) |
| 105 | } else { | 105 | } else { |
| 106 | - reject(new Error(res.msg || '删除组织失败')) | 106 | + reject(res.msg) |
| 107 | } | 107 | } |
| 108 | }).catch(error => { | 108 | }).catch(error => { |
| 109 | reject(error) | 109 | reject(error) |
| @@ -180,7 +180,7 @@ export function deleteOrgRelStaff(data) { | @@ -180,7 +180,7 @@ export function deleteOrgRelStaff(data) { | ||
| 180 | if (res.code == 0) { | 180 | if (res.code == 0) { |
| 181 | resolve(res) | 181 | resolve(res) |
| 182 | } else { | 182 | } else { |
| 183 | - reject(new Error(res.msg || '删除员工与组织关系失败')) | 183 | + reject(res.msg) |
| 184 | } | 184 | } |
| 185 | }).catch(error => { | 185 | }).catch(error => { |
| 186 | reject(error) | 186 | reject(error) |
src/api/room/importOwnerRoomApi.js
| @@ -12,7 +12,7 @@ export function importOwnerRoom(formData) { | @@ -12,7 +12,7 @@ export function importOwnerRoom(formData) { | ||
| 12 | }).then(response => { | 12 | }).then(response => { |
| 13 | resolve(response) | 13 | resolve(response) |
| 14 | }).catch(error => { | 14 | }).catch(error => { |
| 15 | - reject(error) | 15 | + reject(error.response.data) |
| 16 | }) | 16 | }) |
| 17 | }) | 17 | }) |
| 18 | } | 18 | } |
| 19 | \ No newline at end of file | 19 | \ No newline at end of file |
src/components/org/DeleteOrg.vue
| @@ -36,6 +36,9 @@ | @@ -36,6 +36,9 @@ | ||
| 36 | this.$message.success(this.$t('org.deleteSuccess')) | 36 | this.$message.success(this.$t('org.deleteSuccess')) |
| 37 | this.visible = false | 37 | this.visible = false |
| 38 | this.$emit('refresh') | 38 | this.$emit('refresh') |
| 39 | + },error => { | ||
| 40 | + console.log(error) | ||
| 41 | + this.$message.error(error) | ||
| 39 | }) | 42 | }) |
| 40 | } | 43 | } |
| 41 | } | 44 | } |
src/components/org/DeleteOrgRelStaff.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-dialog | ||
| 3 | - :title="$t('org.confirmOperation')" | ||
| 4 | - :visible.sync="visible" | ||
| 5 | - width="30%" | ||
| 6 | - > | ||
| 7 | - <span>{{ $t('org.confirmDeleteRelStaff') }}</span> | ||
| 8 | - <span slot="footer" class="dialog-footer"> | ||
| 9 | - <el-button @click="visible = false">{{ $t('org.cancelDelete') }}</el-button> | ||
| 10 | - <el-button type="primary" @click="handleConfirm">{{ $t('org.confirm') }}</el-button> | ||
| 11 | - </span> | ||
| 12 | - </el-dialog> | ||
| 13 | - </template> | ||
| 14 | - | ||
| 15 | - <script> | ||
| 16 | - import { deleteOrgRelStaff } from '@/api/org/orgApi' | ||
| 17 | - | ||
| 18 | - export default { | ||
| 19 | - name: 'DeleteOrgRelStaff', | ||
| 20 | - data() { | ||
| 21 | - return { | ||
| 22 | - visible: false, | ||
| 23 | - currentStaff: null | ||
| 24 | - } | 2 | + <el-dialog :title="$t('common.confirm')" :visible.sync="visible" width="30%"> |
| 3 | + <span>{{ $t('org.confirmDelete') }}</span> | ||
| 4 | + <span slot="footer" class="dialog-footer"> | ||
| 5 | + <el-button @click="visible = false">{{ $t('common.cancel') }}</el-button> | ||
| 6 | + <el-button type="primary" @click="handleConfirm">{{ $t('common.confirm') }}</el-button> | ||
| 7 | + </span> | ||
| 8 | + </el-dialog> | ||
| 9 | +</template> | ||
| 10 | + | ||
| 11 | +<script> | ||
| 12 | +import { deleteOrgRelStaff } from '@/api/org/orgApi' | ||
| 13 | + | ||
| 14 | +export default { | ||
| 15 | + name: 'DeleteOrgRelStaff', | ||
| 16 | + data() { | ||
| 17 | + return { | ||
| 18 | + visible: false, | ||
| 19 | + currentStaff: null | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + methods: { | ||
| 23 | + show(staff) { | ||
| 24 | + this.currentStaff = staff | ||
| 25 | + this.visible = true | ||
| 25 | }, | 26 | }, |
| 26 | - methods: { | ||
| 27 | - show(staff) { | ||
| 28 | - this.currentStaff = staff | ||
| 29 | - this.visible = true | ||
| 30 | - }, | ||
| 31 | - handleConfirm() { | ||
| 32 | - deleteOrgRelStaff({ | ||
| 33 | - staffId: this.currentStaff.userId, | ||
| 34 | - orgId: this.currentStaff.orgId | ||
| 35 | - }).then(response => { | ||
| 36 | - console.log(response) | ||
| 37 | - this.$message.success(this.$t('org.deleteSuccess')) | ||
| 38 | - this.visible = false | ||
| 39 | - this.$emit('refresh') | ||
| 40 | - }) | ||
| 41 | - } | 27 | + handleConfirm() { |
| 28 | + deleteOrgRelStaff({ | ||
| 29 | + staffId: this.currentStaff.userId, | ||
| 30 | + orgId: this.currentStaff.orgId | ||
| 31 | + }).then(response => { | ||
| 32 | + console.log(response) | ||
| 33 | + this.$message.success(this.$t('org.deleteSuccess')) | ||
| 34 | + this.visible = false | ||
| 35 | + this.$emit('refresh') | ||
| 36 | + },error => { | ||
| 37 | + console.log(error) | ||
| 38 | + this.$message.error(error) | ||
| 39 | + }) | ||
| 42 | } | 40 | } |
| 43 | } | 41 | } |
| 44 | - </script> | ||
| 45 | \ No newline at end of file | 42 | \ No newline at end of file |
| 43 | +} | ||
| 44 | +</script> | ||
| 46 | \ No newline at end of file | 45 | \ No newline at end of file |
src/components/room/importOwnerRoom.vue
src/views/machine/addEquipmentAccountList.vue
| @@ -37,8 +37,8 @@ | @@ -37,8 +37,8 @@ | ||
| 37 | <el-form-item :label="$t('addEquipmentAccount.state')" prop="state" required> | 37 | <el-form-item :label="$t('addEquipmentAccount.state')" prop="state" required> |
| 38 | <el-select v-model="addEquipmentAccountInfo.state" | 38 | <el-select v-model="addEquipmentAccountInfo.state" |
| 39 | :placeholder="$t('addEquipmentAccount.statePlaceholder')" style="width:100%"> | 39 | :placeholder="$t('addEquipmentAccount.statePlaceholder')" style="width:100%"> |
| 40 | - <el-option v-for="(item, index) in addEquipmentAccountInfo.useStatus" :key="index" :label="item.name" | ||
| 41 | - :value="item.statusCd" /> | 40 | + <el-option v-for="(item, index) in addEquipmentAccountInfo.useStatus" :key="index" |
| 41 | + :label="item.name" :value="item.statusCd" /> | ||
| 42 | </el-select> | 42 | </el-select> |
| 43 | </el-form-item> | 43 | </el-form-item> |
| 44 | </el-col> | 44 | </el-col> |
| @@ -77,14 +77,16 @@ | @@ -77,14 +77,16 @@ | ||
| 77 | <el-row :gutter="20"> | 77 | <el-row :gutter="20"> |
| 78 | <el-col :span="12"> | 78 | <el-col :span="12"> |
| 79 | <el-form-item :label="$t('addEquipmentAccount.firstEnableTime')"> | 79 | <el-form-item :label="$t('addEquipmentAccount.firstEnableTime')"> |
| 80 | - <el-date-picker v-model="addEquipmentAccountInfo.firstEnableTime" type="date" value-format="yyyy-MM-dd" | ||
| 81 | - :placeholder="$t('addEquipmentAccount.firstEnableTimePlaceholder')" style="width:100%" /> | 80 | + <el-date-picker v-model="addEquipmentAccountInfo.firstEnableTime" type="date" |
| 81 | + value-format="yyyy-MM-dd" :placeholder="$t('addEquipmentAccount.firstEnableTimePlaceholder')" | ||
| 82 | + style="width:100%" /> | ||
| 82 | </el-form-item> | 83 | </el-form-item> |
| 83 | </el-col> | 84 | </el-col> |
| 84 | <el-col :span="12"> | 85 | <el-col :span="12"> |
| 85 | <el-form-item :label="$t('addEquipmentAccount.warrantyDeadline')"> | 86 | <el-form-item :label="$t('addEquipmentAccount.warrantyDeadline')"> |
| 86 | - <el-date-picker v-model="addEquipmentAccountInfo.warrantyDeadline" type="date" value-format="yyyy-MM-dd" | ||
| 87 | - :placeholder="$t('addEquipmentAccount.warrantyDeadlinePlaceholder')" style="width:100%" /> | 87 | + <el-date-picker v-model="addEquipmentAccountInfo.warrantyDeadline" type="date" |
| 88 | + value-format="yyyy-MM-dd" :placeholder="$t('addEquipmentAccount.warrantyDeadlinePlaceholder')" | ||
| 89 | + style="width:100%" /> | ||
| 88 | </el-form-item> | 90 | </el-form-item> |
| 89 | </el-col> | 91 | </el-col> |
| 90 | </el-row> | 92 | </el-row> |
src/views/org/orgList.vue
| @@ -119,7 +119,7 @@ export default { | @@ -119,7 +119,7 @@ export default { | ||
| 119 | this.$refs.orgRelStaff.show(this.orgId); | 119 | this.$refs.orgRelStaff.show(this.orgId); |
| 120 | }, | 120 | }, |
| 121 | openDeleteOrgRelStaff(staff) { | 121 | openDeleteOrgRelStaff(staff) { |
| 122 | - this.$refs.deleteOrgRelStaff.open(staff); | 122 | + this.$refs.deleteOrgRelStaff.show(staff); |
| 123 | }, | 123 | }, |
| 124 | toStaffDetail(staff) { | 124 | toStaffDetail(staff) { |
| 125 | this.$router.push(`/views/staff/staffDetail?staffId=${staff.userId}`) | 125 | this.$router.push(`/views/staff/staffDetail?staffId=${staff.userId}`) |