|
|
|
|
@ -107,7 +107,7 @@ |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
<template slot="menuRight"> |
|
|
|
|
<el-button class="search" style="width: 120px" @click="handleAdd" |
|
|
|
|
<el-button class="search" style="width: 120px" @click="handleAdd" v-show="permission.oiling_task_add" |
|
|
|
|
>新建</el-button |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
@ -122,10 +122,10 @@ |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{ row, index }" slot="menu"> |
|
|
|
|
<el-button @click="handleView(row, index)" class="look">查看</el-button> |
|
|
|
|
<el-button @click="handleEdit(row, index)" class="look">编辑</el-button> |
|
|
|
|
<el-button v-show="row.status != 3 && row.status != 2" @click="handleCancel(row, index)" class="look">取消</el-button> |
|
|
|
|
<el-button @click="handleRepair(row, index)" class="look" v-show="row.status != 3 && row.status != 2">保养</el-button> |
|
|
|
|
<el-button @click="handleComplete(row, index)" class="look" v-show="row.status != 3 && row.status != 2">完成</el-button |
|
|
|
|
<el-button @click="handleEdit(row, index)" class="look" v-show="permission.oiling_task_edit">编辑</el-button> |
|
|
|
|
<el-button v-show="row.status != 3 && row.status != 2 && permission.oiling_task_cancel" @click="handleCancel(row, index)" class="look" >取消</el-button> |
|
|
|
|
<el-button @click="handleRepair(row, index)" class="look" v-show="row.status != 3 && row.status != 2 && permission.oiling_task_save">保养</el-button> |
|
|
|
|
<el-button @click="handleComplete(row, index)" class="look" v-show="row.status != 3 && row.status != 2 && permission.oiling_task_finish">完成</el-button |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
@ -937,7 +937,7 @@ |
|
|
|
|
:before-close="handleClose" |
|
|
|
|
:cell-style="tableCellStyle" |
|
|
|
|
:visible.sync="showRepairDialog" |
|
|
|
|
title="编辑" |
|
|
|
|
title="保养" |
|
|
|
|
width="70%" |
|
|
|
|
:append-to-body="true" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
@ -974,12 +974,13 @@ |
|
|
|
|
style="width: 98%" |
|
|
|
|
v-model="repairForm.name" |
|
|
|
|
placeholder="请输入名称" |
|
|
|
|
readonly |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6" style="width: 31%; margin-left: 1%"> |
|
|
|
|
<el-form-item label="执行班组" prop="groupId"> |
|
|
|
|
<el-select |
|
|
|
|
<!-- <el-select |
|
|
|
|
v-model="repairForm.groupId" |
|
|
|
|
placeholder="请选择执行班组" |
|
|
|
|
style="width: 98%" |
|
|
|
|
@ -990,17 +991,18 @@ |
|
|
|
|
:label="item.fullName" |
|
|
|
|
:value="item.id" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-select> --> |
|
|
|
|
<el-input v-if="userInfo.role_name == '保养人员'" v-model="userInfo.dept_name" readonly></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6" style="width: 31%; margin-left: 1%"> |
|
|
|
|
<el-form-item label="预计工时(时)" prop="time"> |
|
|
|
|
<el-form-item label="预计工时(时)" prop="totalCost"> |
|
|
|
|
<!-- <el-input |
|
|
|
|
style="width: 98%" |
|
|
|
|
v-model="repairForm.time" |
|
|
|
|
placeholder="请输入预计工时" |
|
|
|
|
></el-input> --> |
|
|
|
|
<el-input-number style="width: 98%" controls-position="right" v-model="addForm.totalCost" :min="0" :precision="1" :step="1"></el-input-number> |
|
|
|
|
<el-input-number disabled style="width: 98%" controls-position="right" v-model="repairForm.totalCost" :min="0" :precision="1" :step="1"></el-input-number> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
@ -1028,6 +1030,7 @@ |
|
|
|
|
v-model="repairForm.assetId" |
|
|
|
|
placeholder="请选择设备" |
|
|
|
|
style="width: 98%" |
|
|
|
|
disabled |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in deviceList" |
|
|
|
|
@ -1298,6 +1301,7 @@ import { getGroup, getDeviceList } from "@/api/oiling/plan"; |
|
|
|
|
import { getTypeList,getProList } from "@/api/oiling/project"; |
|
|
|
|
import {getStatus} from "@/api/lims/instrument"; |
|
|
|
|
import { userList } from "@/api/plugin/workflow/process"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
let that = this; |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
@ -1491,8 +1495,7 @@ export default { |
|
|
|
|
userList(1,200).then(res =>{ |
|
|
|
|
this.userData = res.data.data.records |
|
|
|
|
}) |
|
|
|
|
// let json = {"lat":"31.375299094542086", "lng":"31.375299094542086","mac":"YYBJLXDIANXIN001", "type":"2","floorNo":"2","buildingNo": "1"} |
|
|
|
|
// console.log('json ==========>',(json.mac)) |
|
|
|
|
console.log('userIn ====>',this.userInfo) |
|
|
|
|
this.onLoad(); |
|
|
|
|
}, |
|
|
|
|
filters: { |
|
|
|
|
@ -1537,6 +1540,9 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
computed:{ |
|
|
|
|
...mapGetters(["userInfo", "permission"]), |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 分页 |
|
|
|
|
currentChange(currentPage) { |
|
|
|
|
@ -1636,7 +1642,6 @@ export default { |
|
|
|
|
handleUpdate(){ |
|
|
|
|
this.$refs['addForm'].validate((valid) => { |
|
|
|
|
if(valid){ |
|
|
|
|
console.log('addForm ===========>',this.addForm) |
|
|
|
|
if(this.addForm.orderList.length == 0){ |
|
|
|
|
this.$message.warning('请至少选择一个保养项目') |
|
|
|
|
}else{ |
|
|
|
|
@ -1648,7 +1653,6 @@ export default { |
|
|
|
|
this.addForm.projectList.push({id:item.id}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log('projectList ===========>',this.addForm.projectList) |
|
|
|
|
let params = { |
|
|
|
|
name:this.addForm.name, |
|
|
|
|
totalCost:this.addForm.totalCost, |
|
|
|
|
@ -1666,7 +1670,8 @@ export default { |
|
|
|
|
assetName:this.addForm.assetName, |
|
|
|
|
assetStatus:this.addForm.assetStatus, |
|
|
|
|
projectList:this.addForm.projectList, |
|
|
|
|
notes:this.addForm.notes |
|
|
|
|
notes:this.addForm.notes, |
|
|
|
|
id:this.addForm.id |
|
|
|
|
} |
|
|
|
|
saveTask(params).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
@ -1896,9 +1901,10 @@ export default { |
|
|
|
|
color: #333333; |
|
|
|
|
} |
|
|
|
|
/deep/ .avue-crud__pagination { |
|
|
|
|
height: 30px; |
|
|
|
|
padding-top: 30px; |
|
|
|
|
padding-bottom: 30px; |
|
|
|
|
height: 20px; |
|
|
|
|
padding: 10px; |
|
|
|
|
// padding-top: 30px; |
|
|
|
|
// padding-bottom: 30px; |
|
|
|
|
} |
|
|
|
|
.search-input { |
|
|
|
|
width: 255px; |
|
|
|
|
|