mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
Compare commits
No commits in common. "c54a6f92fb4f2eeb90587e1ce2dbea2cef8cfbf3" and "57c370b2dd54a8c4f65a04ebdf96221c047fe6e8" have entirely different histories.
c54a6f92fb
...
57c370b2dd
@ -3,167 +3,102 @@ import { getCommunityId } from '@/api/community/communityApi'
|
||||
|
||||
// 获取字典数据
|
||||
export function getDict(dictType, state) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/dict.listDict',
|
||||
method: 'get',
|
||||
params: { dictType, state }
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/dict.listDict',
|
||||
method: 'get',
|
||||
params: { dictType, state }
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 查询巡检计划列表
|
||||
export function listInspectionPlans(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/inspectionPlan.listInspectionPlans',
|
||||
method: 'get',
|
||||
params: {
|
||||
...params,
|
||||
communityId: getCommunityId()
|
||||
}
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/inspectionPlan.listInspectionPlans',
|
||||
method: 'get',
|
||||
params: {
|
||||
communityId: getCommunityId(),
|
||||
...params
|
||||
}
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 更新巡检计划状态
|
||||
export function updateInspectionPlanState(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/inspectionPlan.updateInspectionPlanState',
|
||||
method: 'post',
|
||||
data: {
|
||||
...data,
|
||||
communityId: getCommunityId()
|
||||
}
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/inspectionPlan.updateInspectionPlanState',
|
||||
method: 'post',
|
||||
data: {
|
||||
communityId: getCommunityId(),
|
||||
...data
|
||||
}
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 删除巡检计划
|
||||
export function deleteInspectionPlan(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/inspectionPlan.deleteInspectionPlan',
|
||||
method: 'post',
|
||||
data: {
|
||||
...data,
|
||||
communityId: getCommunityId()
|
||||
}
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/inspectionPlan.deleteInspectionPlan',
|
||||
method: 'post',
|
||||
data: {
|
||||
communityId: getCommunityId(),
|
||||
...data
|
||||
}
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 更新巡检计划
|
||||
export function updateInspectionPlan(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/inspectionPlan.updateInspectionPlan',
|
||||
method: 'post',
|
||||
data: {
|
||||
...data,
|
||||
communityId: getCommunityId()
|
||||
}
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/inspectionPlan.updateInspectionPlan',
|
||||
method: 'post',
|
||||
data: {
|
||||
communityId: getCommunityId(),
|
||||
...data
|
||||
}
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 查询巡检路线列表
|
||||
export function listInspectionRoutes(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/inspectionRoute.listInspectionRoutes',
|
||||
method: 'get',
|
||||
params: {
|
||||
...params,
|
||||
communityId: getCommunityId()
|
||||
}
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/inspectionRoute.listInspectionRoutes',
|
||||
method: 'get',
|
||||
params: {
|
||||
communityId: getCommunityId(),
|
||||
...params
|
||||
}
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 查询巡检计划员工
|
||||
export function listInspectionPlanStaffs(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/inspection.listInspectionPlanStaffs',
|
||||
method: 'get',
|
||||
params: {
|
||||
...params,
|
||||
communityId: getCommunityId()
|
||||
}
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/inspection.listInspectionPlanStaffs',
|
||||
method: 'get',
|
||||
params: {
|
||||
communityId: getCommunityId(),
|
||||
...params
|
||||
}
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 查询组织树
|
||||
export function listOrgTree() {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/org.listOrgTree',
|
||||
method: 'get',
|
||||
params: {
|
||||
communityId: getCommunityId()
|
||||
}
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/org.listOrgTree',
|
||||
method: 'get',
|
||||
params: { communityId: getCommunityId() }
|
||||
}).then(res => res.data)
|
||||
}
|
||||
|
||||
// 根据组织ID查询员工
|
||||
export function listStaffsByOrgId(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: '/query.staff.infos',
|
||||
method: 'get',
|
||||
params: {
|
||||
...params,
|
||||
communityId: getCommunityId()
|
||||
}
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
return request({
|
||||
url: '/query.staff.infos',
|
||||
method: 'get',
|
||||
params: {
|
||||
communityId: getCommunityId(),
|
||||
...params
|
||||
}
|
||||
}).then(res => res.data)
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="$t('common.delete')"
|
||||
:title="$t('common.confirmOperation')"
|
||||
:visible.sync="visible"
|
||||
width="30%"
|
||||
@close="handleClose"
|
||||
|
||||
@ -132,7 +132,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.inspection-route-point-container {
|
||||
padding: 10px;
|
||||
padding: 20px;
|
||||
|
||||
.margin-bottom {
|
||||
margin-bottom: 20px;
|
||||
|
||||
@ -109,6 +109,7 @@ export default {
|
||||
li {
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid #eee;
|
||||
transition: all 0.3s;
|
||||
|
||||
&:hover {
|
||||
@ -121,6 +122,7 @@ export default {
|
||||
}
|
||||
|
||||
.task-user {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.task-time {
|
||||
|
||||
@ -33,16 +33,12 @@ export default {
|
||||
|
||||
async confirmDelete() {
|
||||
try {
|
||||
const {code,msg} = await deleteInspectionPlan({ inspectionPlanId: this.currentPlanId })
|
||||
if(code != 0){
|
||||
this.$message.error(msg)
|
||||
return
|
||||
}
|
||||
await deleteInspectionPlan({ inspectionPlanId: this.currentPlanId })
|
||||
this.$message.success(this.$t('common.operationSuccess'))
|
||||
this.visible = false
|
||||
this.$emit('success')
|
||||
} catch (error) {
|
||||
this.$message.error(error)
|
||||
this.$message.error(this.$t('inspectionPlan.deleteError'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,6 +230,6 @@ export default {
|
||||
}
|
||||
|
||||
.card-content {
|
||||
padding: 0px;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
@ -175,7 +175,7 @@ export default {
|
||||
this.$refs.deleteInspectionRoute.open(route)
|
||||
},
|
||||
_queryInspectionRouteMethod() {
|
||||
this._listInspectionRoutes(1, 100)
|
||||
this._listInspectionRoutes(1, 10)
|
||||
},
|
||||
_switchInspectionRoute(route) {
|
||||
this.inspectionRouteInfo.route = route
|
||||
@ -190,7 +190,7 @@ export default {
|
||||
}, 500)
|
||||
},
|
||||
handleSuccess() {
|
||||
this._listInspectionRoutes(1, 100)
|
||||
this._listInspectionRoutes(1, 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<el-input :placeholder="$t('staff.phoneNumber')" v-model="searchConditions.tel" clearable />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" @click="searchStaff">
|
||||
<el-button type="primary" @click="queryStaff">
|
||||
{{ $t('staff.search') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -67,7 +67,7 @@
|
||||
|
||||
<el-row class="margin-top">
|
||||
<el-col :span="16">
|
||||
<div class="tip-text"></div>
|
||||
<div class="tip-text">{{ $t('staff.tip') }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8" class="text-right">
|
||||
<el-pagination :current-page="pagination.current" :page-sizes="[10, 20, 30, 50]" :page-size="pagination.size"
|
||||
@ -128,10 +128,6 @@ export default {
|
||||
console.error('获取字典数据失败:', error)
|
||||
}
|
||||
},
|
||||
searchStaff() {
|
||||
this.pagination.current = 1
|
||||
this.queryStaff()
|
||||
},
|
||||
async queryStaff() {
|
||||
try {
|
||||
const params = {
|
||||
@ -150,7 +146,7 @@ export default {
|
||||
relCdName: relCdItem ? relCdItem.name : ''
|
||||
}
|
||||
})
|
||||
this.pagination.total = res.total
|
||||
this.pagination.total = res.data.total
|
||||
|
||||
} catch (error) {
|
||||
console.error('查询员工信息失败:', error)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user