新增维修进度查看

This commit is contained in:
xiaofajia 2024-11-05 17:10:50 +08:00
parent 04881395b4
commit 320b51067d
3 changed files with 74 additions and 9 deletions

View File

@ -43,3 +43,11 @@ export function removeItemById(id){
method: 'delete' method: 'delete'
}) })
} }
// 查某工单维修项目进度
export function getProjList(ticketId){
return request({
url: preUrl + "/getProjList?ticketId=" + ticketId,
method: 'get'
})
}

View File

@ -89,15 +89,15 @@
申请配件 申请配件
</el-dropdown-item> </el-dropdown-item>
<!-- 维修工才有 --> <!-- 维修工才有 -->
<el-dropdown-item command="handleRecordOne" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'"> <el-dropdown-item command="handleRecordOne" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '01'">
开始施工 开始施工
</el-dropdown-item> </el-dropdown-item>
<!-- 维修工才有 --> <!-- 维修工才有 -->
<el-dropdown-item command="handleRecordTwo" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'"> <el-dropdown-item command="handleRecordTwo" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '01'">
过程记录 过程记录
</el-dropdown-item> </el-dropdown-item>
<!-- 维修工才有 --> <!-- 维修工才有 -->
<el-dropdown-item command="handleRecordThree" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'"> <el-dropdown-item command="handleRecordThree" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '01'">
施工完成 施工完成
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
@ -170,6 +170,8 @@
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<TicketProgress ref="ticketProgress" />
</div> </div>
</template> </template>
@ -185,10 +187,11 @@ import UpdateRecord from "@/views/repair/tickets/form/UpdateRecord.vue";
import {getUserProfile} from "@/api/system/user"; import {getUserProfile} from "@/api/system/user";
import RecordSetting from "@/views/repair/tickets/form/RecordSetting.vue"; import RecordSetting from "@/views/repair/tickets/form/RecordSetting.vue";
import EditTickets from "@/views/repair/tickets/form/EditTickets.vue"; import EditTickets from "@/views/repair/tickets/form/EditTickets.vue";
import TicketProgress from "@/views/repair/tickets/Components/TicketProgress.vue";
export default { export default {
name: "TicketManagerItem", name: "TicketManagerItem",
components: {EditTickets, RecordSetting, UpdateRecord, TWOperate, UpdateRepair, TicketsShow}, components: {TicketProgress, EditTickets, RecordSetting, UpdateRecord, TWOperate, UpdateRepair, TicketsShow},
props: { props: {
userRole: { userRole: {
type: String, type: String,
@ -363,6 +366,9 @@ export default {
case 'handleRecordThree': case 'handleRecordThree':
this.handleRecord(row, 'sgwczj') this.handleRecord(row, 'sgwczj')
break break
case 'handleProgress':
this.handleProgress(row)
break
default: default:
break break
} }
@ -490,6 +496,9 @@ export default {
} catch { } catch {
} }
}, },
handleProgress(row){
this.$refs.ticketProgress.open(row.id)
}
} }
} }
</script> </script>

View File

@ -1,19 +1,67 @@
<template> <template>
<div> <div>
<el-dialog title="维修项目进度" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body>
<el-table :data="list" v-loading="tableLoading" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="序号" align="center">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="维修项目" align="center" prop="itemName" />
<el-table-column label="维修状态" align="center">
<el-table-column label="待维修" align="center">
<template slot-scope="scope">
<span style="font-size: 20px">{{scope.row.itemStatus === "01" ? getStatus(scope.row.itemStatus) : ""}}</span>
</template>
</el-table-column>
<el-table-column label="维修中" align="center">
<template slot-scope="scope">
<span style="font-size: 20px;color: #ffd51c">{{scope.row.itemStatus === "02" ? getStatus(scope.row.itemStatus) : ""}}</span>
</template>
</el-table-column>
<el-table-column label="已完成" align="center">
<template slot-scope="scope">
<span style="font-size: 20px;color: #3aff70">{{scope.row.itemStatus === "03" ? getStatus(scope.row.itemStatus) : ""}}</span>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getProjectList} from "@/api/repair/tickets/TicketsItem";
export default { export default {
name: "TicketProgress", name: "TicketProgress",
data() { data() {
return { return {
dialogVisible: false,
list: [],
tableLoading: false
} }
}, },
methods: { methods: {
async open(id) { async open(id) {
try {
this.dialogVisible = true
this.tableLoading = true
const res = await getProjectList(id)
this.list = res.data
} finally {
this.tableLoading = false
}
},
getStatus(data){
switch (data){
case '01':
return '-'
case '02':
return '°'
case '03':
return '√'
}
} }
} }