|
|
@@ -1,9 +1,5 @@
|
|
|
<template>
|
|
|
<div class="maintain_config_detail" v-loading="detailsLoading">
|
|
|
-<!-- <div class="detail_title">
|
|
|
- <span>详情</span>
|
|
|
- <el-button size="small" @click="$router.go(-1)">关闭</el-button>
|
|
|
- </div> -->
|
|
|
<div class="main_content">
|
|
|
<!-- 基本信息 -->
|
|
|
<div class="base_info">
|
|
|
@@ -11,15 +7,15 @@
|
|
|
<el-row class="base_info_content">
|
|
|
<el-col :span="6">
|
|
|
<span>计划单号:</span>
|
|
|
- <span>{{ detailsForm.planRuleCode }}</span>
|
|
|
+ <span>{{ detailsForm.code }}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<span>保养名称:</span>
|
|
|
- <span>{{ detailsForm.planRuleName }}</span>
|
|
|
+ <span>{{ detailsForm.name }}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<span>保养部门:</span>
|
|
|
- <span>{{ detailsForm.executorDeptName }}</span>
|
|
|
+ <span>{{ detailsForm.groupName }}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<span>保养人员:</span>
|
|
|
@@ -31,23 +27,27 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<span>设备分类:</span>
|
|
|
- <span>{{ detailsForm.equiTypeName }}</span>
|
|
|
+ <span>{{ detailsForm.categoryName }}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<span>规则名称:</span>
|
|
|
<span>{{ detailsForm.ruleName }}</span>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
+<!-- <el-col :span="6">
|
|
|
<span>创建部门:</span>
|
|
|
<span>{{ detailsForm.createOrgName }}</span>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="6">
|
|
|
<span>创建人:</span>
|
|
|
<span>{{ detailsForm.createUserName }}</span>
|
|
|
</el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <span>创建时间:</span>
|
|
|
+ <span>{{ detailsForm.createTime }}</span>
|
|
|
+ </el-col>
|
|
|
<el-col :span="6">
|
|
|
<span>审核人:</span>
|
|
|
- <span>{{ detailsForm.verifyUserName }}</span>
|
|
|
+ <span>{{ detailsForm.approvalUserName }}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<span>备注:</span>
|
|
|
@@ -61,30 +61,30 @@
|
|
|
<div class="maintain_equipment_info_content">
|
|
|
<div
|
|
|
class="equipment_item"
|
|
|
- v-for="item in detailsForm.planRuleEquiList"
|
|
|
+ v-for="item in detailsForm.deviceInfo"
|
|
|
:key="item.id"
|
|
|
>
|
|
|
<div class="equipment_info">
|
|
|
<div class="item_info">
|
|
|
<span class="item_label">设备编码</span>
|
|
|
- <span class="item_value">{{ item.equiCode }}</span>
|
|
|
+ <span class="item_value">{{ item.substanceCode }}</span>
|
|
|
</div>
|
|
|
<div class="item_info">
|
|
|
<span class="item_label">设备名称</span>
|
|
|
- <span class="item_value">{{ item.equiName }}</span>
|
|
|
+ <span class="item_value">{{ item.substanceName }}</span>
|
|
|
</div>
|
|
|
<div class="item_info">
|
|
|
<span class="item_label">设备型号</span>
|
|
|
- <span class="item_value">{{ item.equiModel }}</span>
|
|
|
+ <span class="item_value">{{ item.mode }}</span>
|
|
|
</div>
|
|
|
<div class="item_info">
|
|
|
<span class="item_label">设备位置</span>
|
|
|
- <span class="item_value">{{ item.equiLocation }}</span>
|
|
|
+ <span class="item_value">{{ item.position }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<p>操作事项</p>
|
|
|
<div class="matter_info">
|
|
|
- <el-table :data="item.itemJson" border>
|
|
|
+ <el-table :data="matterRulesList" border>
|
|
|
<el-table-column label="序号" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.$index + 1 }}</span>
|
|
|
@@ -97,7 +97,7 @@
|
|
|
</div>
|
|
|
<p>备品备件</p>
|
|
|
<div class="matter_info">
|
|
|
- <el-table :data="item.partJson" border>
|
|
|
+ <el-table :data="item.sparePart" border>
|
|
|
<el-table-column label="序号" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.$index + 1 }}</span>
|
|
|
@@ -109,11 +109,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="所需数量" align="center" prop="num">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="单位" align="center" prop="unit">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.unit=='wanyuan'">万元</div>
|
|
|
- <div v-if="scope.row.unit=='yuan'">元</div>
|
|
|
- </template>
|
|
|
+ <el-table-column label="单位" align="center" prop="measuringUnit">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
@@ -125,44 +121,49 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import planRules from '@/api/planRules/patrolConfig'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
+ import { getInfoById } from '@/api/ruleManagement/plan';
|
|
|
+ import { getDetail } from '@/api/ruleManagement/matter';
|
|
|
|
|
|
export default {
|
|
|
name: 'maintainConfigDetail',
|
|
|
data () {
|
|
|
return {
|
|
|
detailsLoading: false,
|
|
|
- detailsForm: {}
|
|
|
+ detailsForm: {},
|
|
|
+ matterRulesList:[]
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['equipmentList', 'ruleNameList'])
|
|
|
+
|
|
|
},
|
|
|
mounted () {
|
|
|
- // this.getDetailsData(this.$route.query.id)
|
|
|
+ this.getDetailsData(this.$route.query.id)
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取详情数据
|
|
|
- getDetailsData (id) {
|
|
|
+ async getDetailsData (id) {
|
|
|
this.detailsLoading = true
|
|
|
- planRules
|
|
|
- .getPlanRulesDetails(id)
|
|
|
+ getInfoById(id)
|
|
|
.then(res => {
|
|
|
- console.log('res.data',res.data)
|
|
|
this.detailsLoading = false
|
|
|
- this.detailsForm = res.data
|
|
|
- this.detailsForm['equiTypeName'] = this.equipmentList.filter(item => item.id == this.detailsForm.bizTypeId)[0].name
|
|
|
- this.detailsForm['ruleName'] = this.ruleNameList.filter(item => item.id == this.detailsForm.ruleId)[0].name
|
|
|
- this.detailsForm.planRuleEquiList =
|
|
|
- this.detailsForm.planRuleEquiList.filter(
|
|
|
- item => item.itemJson != null
|
|
|
- )
|
|
|
+ this.detailsForm = res
|
|
|
+ let arr = []
|
|
|
+ res.execute.map(item=>{
|
|
|
+ arr.push(item.userName)
|
|
|
+ })
|
|
|
+ this.$set(this.detailsForm,'executorName',arr.join(','))
|
|
|
+ this._getMatterRulesDetails(res.ruleId)
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.detailsLoading = false
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 封装 - 获取规则下面的详情数据及事项
|
|
|
+ async _getMatterRulesDetails (val) {
|
|
|
+ const res = await getDetail(val)
|
|
|
+ this.matterRulesList = res.ruleItems
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|