mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化房产导入,错误不提示的bug
This commit is contained in:
parent
96aa66defb
commit
b550a0c64b
@ -103,7 +103,7 @@ export function deleteOrg(data) {
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
} else {
|
} else {
|
||||||
reject(new Error(res.msg || '删除组织失败'))
|
reject(res.msg)
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
@ -180,7 +180,7 @@ export function deleteOrgRelStaff(data) {
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
} else {
|
} else {
|
||||||
reject(new Error(res.msg || '删除员工与组织关系失败'))
|
reject(res.msg)
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export function importOwnerRoom(formData) {
|
|||||||
}).then(response => {
|
}).then(response => {
|
||||||
resolve(response)
|
resolve(response)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error.response.data)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -36,6 +36,9 @@
|
|||||||
this.$message.success(this.$t('org.deleteSuccess'))
|
this.$message.success(this.$t('org.deleteSuccess'))
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('refresh')
|
this.$emit('refresh')
|
||||||
|
},error => {
|
||||||
|
console.log(error)
|
||||||
|
this.$message.error(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,44 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="$t('common.confirm')" :visible.sync="visible" width="30%">
|
||||||
:title="$t('org.confirmOperation')"
|
<span>{{ $t('org.confirmDelete') }}</span>
|
||||||
:visible.sync="visible"
|
<span slot="footer" class="dialog-footer">
|
||||||
width="30%"
|
<el-button @click="visible = false">{{ $t('common.cancel') }}</el-button>
|
||||||
>
|
<el-button type="primary" @click="handleConfirm">{{ $t('common.confirm') }}</el-button>
|
||||||
<span>{{ $t('org.confirmDeleteRelStaff') }}</span>
|
</span>
|
||||||
<span slot="footer" class="dialog-footer">
|
</el-dialog>
|
||||||
<el-button @click="visible = false">{{ $t('org.cancelDelete') }}</el-button>
|
</template>
|
||||||
<el-button type="primary" @click="handleConfirm">{{ $t('org.confirm') }}</el-button>
|
|
||||||
</span>
|
<script>
|
||||||
</el-dialog>
|
import { deleteOrgRelStaff } from '@/api/org/orgApi'
|
||||||
</template>
|
|
||||||
|
export default {
|
||||||
<script>
|
name: 'DeleteOrgRelStaff',
|
||||||
import { deleteOrgRelStaff } from '@/api/org/orgApi'
|
data() {
|
||||||
|
return {
|
||||||
export default {
|
visible: false,
|
||||||
name: 'DeleteOrgRelStaff',
|
currentStaff: null
|
||||||
data() {
|
}
|
||||||
return {
|
},
|
||||||
visible: false,
|
methods: {
|
||||||
currentStaff: null
|
show(staff) {
|
||||||
}
|
this.currentStaff = staff
|
||||||
|
this.visible = true
|
||||||
},
|
},
|
||||||
methods: {
|
handleConfirm() {
|
||||||
show(staff) {
|
deleteOrgRelStaff({
|
||||||
this.currentStaff = staff
|
staffId: this.currentStaff.userId,
|
||||||
this.visible = true
|
orgId: this.currentStaff.orgId
|
||||||
},
|
}).then(response => {
|
||||||
handleConfirm() {
|
console.log(response)
|
||||||
deleteOrgRelStaff({
|
this.$message.success(this.$t('org.deleteSuccess'))
|
||||||
staffId: this.currentStaff.userId,
|
this.visible = false
|
||||||
orgId: this.currentStaff.orgId
|
this.$emit('refresh')
|
||||||
}).then(response => {
|
},error => {
|
||||||
console.log(response)
|
console.log(error)
|
||||||
this.$message.success(this.$t('org.deleteSuccess'))
|
this.$message.error(error)
|
||||||
this.visible = false
|
})
|
||||||
this.$emit('refresh')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
|
</script>
|
||||||
@ -102,7 +102,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error(this.$t('room.importOwnerRoom.importError'))
|
this.$message.error(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,8 +37,8 @@
|
|||||||
<el-form-item :label="$t('addEquipmentAccount.state')" prop="state" required>
|
<el-form-item :label="$t('addEquipmentAccount.state')" prop="state" required>
|
||||||
<el-select v-model="addEquipmentAccountInfo.state"
|
<el-select v-model="addEquipmentAccountInfo.state"
|
||||||
:placeholder="$t('addEquipmentAccount.statePlaceholder')" style="width:100%">
|
:placeholder="$t('addEquipmentAccount.statePlaceholder')" style="width:100%">
|
||||||
<el-option v-for="(item, index) in addEquipmentAccountInfo.useStatus" :key="index" :label="item.name"
|
<el-option v-for="(item, index) in addEquipmentAccountInfo.useStatus" :key="index"
|
||||||
:value="item.statusCd" />
|
:label="item.name" :value="item.statusCd" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -77,14 +77,16 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('addEquipmentAccount.firstEnableTime')">
|
<el-form-item :label="$t('addEquipmentAccount.firstEnableTime')">
|
||||||
<el-date-picker v-model="addEquipmentAccountInfo.firstEnableTime" type="date" value-format="yyyy-MM-dd"
|
<el-date-picker v-model="addEquipmentAccountInfo.firstEnableTime" type="date"
|
||||||
:placeholder="$t('addEquipmentAccount.firstEnableTimePlaceholder')" style="width:100%" />
|
value-format="yyyy-MM-dd" :placeholder="$t('addEquipmentAccount.firstEnableTimePlaceholder')"
|
||||||
|
style="width:100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('addEquipmentAccount.warrantyDeadline')">
|
<el-form-item :label="$t('addEquipmentAccount.warrantyDeadline')">
|
||||||
<el-date-picker v-model="addEquipmentAccountInfo.warrantyDeadline" type="date" value-format="yyyy-MM-dd"
|
<el-date-picker v-model="addEquipmentAccountInfo.warrantyDeadline" type="date"
|
||||||
:placeholder="$t('addEquipmentAccount.warrantyDeadlinePlaceholder')" style="width:100%" />
|
value-format="yyyy-MM-dd" :placeholder="$t('addEquipmentAccount.warrantyDeadlinePlaceholder')"
|
||||||
|
style="width:100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@ -119,7 +119,7 @@ export default {
|
|||||||
this.$refs.orgRelStaff.show(this.orgId);
|
this.$refs.orgRelStaff.show(this.orgId);
|
||||||
},
|
},
|
||||||
openDeleteOrgRelStaff(staff) {
|
openDeleteOrgRelStaff(staff) {
|
||||||
this.$refs.deleteOrgRelStaff.open(staff);
|
this.$refs.deleteOrgRelStaff.show(staff);
|
||||||
},
|
},
|
||||||
toStaffDetail(staff) {
|
toStaffDetail(staff) {
|
||||||
this.$router.push(`/views/staff/staffDetail?staffId=${staff.userId}`)
|
this.$router.push(`/views/staff/staffDetail?staffId=${staff.userId}`)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user