This commit is contained in:
parent
81dde0ada4
commit
4a64f0ee5b
|
|
@ -8,7 +8,7 @@
|
||||||
<span style="font-size: 20px; font-weight: 800">维修申请设备</span>
|
<span style="font-size: 20px; font-weight: 800">维修申请设备</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-if="!routerParams.isView" :span="20" style="display: flex; justify-content: flex-end">
|
<el-col v-if="!routerParams.isView" :span="20" style="display: flex; justify-content: flex-end">
|
||||||
<el-button v-if="!routerParams.isSubmit" type="primary" @click="handleNumDialog">添加</el-button>
|
<el-button v-if="!routerParams.isSubmit && !hideAddDelete" type="primary" @click="handleNumDialog">添加</el-button>
|
||||||
<el-button type="primary" @click="submit">确认申请</el-button>
|
<el-button type="primary" @click="submit">确认申请</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -108,10 +108,10 @@
|
||||||
<!-- 操作列 -->
|
<!-- 操作列 -->
|
||||||
<el-table-column label="操作" align="center" width="80px" v-if="!routerParams.isView">
|
<el-table-column label="操作" align="center" width="80px" v-if="!routerParams.isView">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-button v-if="!routerParams.isSubmit" :disabled="scope.row.status && scope.row.status === '通过'"-->
|
<el-button v-if="!routerParams.isSubmit && !hideAddDelete" :disabled="scope.row.status && scope.row.status === '通过'"
|
||||||
<!-- size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" style="color: red">-->
|
size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" style="color: red">
|
||||||
<!-- 删除-->
|
删除
|
||||||
<!-- </el-button>-->
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -263,6 +263,12 @@ export default {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
hideAddDelete() {
|
||||||
|
const source = this.queryParams.source
|
||||||
|
return source === 0 || source === '0' || source === null || source === undefined || source === ''
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.routerParams = this.$route.query
|
this.routerParams = this.$route.query
|
||||||
let title = '新增维修'
|
let title = '新增维修'
|
||||||
|
|
@ -271,6 +277,13 @@ export default {
|
||||||
else if (this.routerParams.isSubmit) title = '维修提交'
|
else if (this.routerParams.isSubmit) title = '维修提交'
|
||||||
|
|
||||||
this.queryParams.id = this.routerParams.applyId || ''
|
this.queryParams.id = this.routerParams.applyId || ''
|
||||||
|
this.queryParams.source =
|
||||||
|
this.routerParams.source === undefined ||
|
||||||
|
this.routerParams.source === null ||
|
||||||
|
this.routerParams.source === ''
|
||||||
|
? 0
|
||||||
|
: this.routerParams.source
|
||||||
|
|
||||||
const obj = Object.assign({}, this.$route, { title })
|
const obj = Object.assign({}, this.$route, { title })
|
||||||
this.$tab.updatePage(obj)
|
this.$tab.updatePage(obj)
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|
|
||||||
|
|
@ -254,9 +254,9 @@ export default {
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
if (row.status=='5'){
|
if (row.status=='5'){
|
||||||
this.$router.push({ path: './addRepair', query: { applyId: row.id, isSubmit: true } })
|
this.$router.push({ path: './addRepair', query: { applyId: row.id, isSubmit: true,source:row.source } })
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({ path: './addRepair', query: { applyId: row.id, isEdit: true } })
|
this.$router.push({ path: './addRepair', query: { applyId: row.id, isEdit: true,source:row.source } })
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue