设备台账详情展示优化
This commit is contained in:
parent
b34ee99fee
commit
d36908e546
@ -935,12 +935,6 @@
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="upkeepClick"
|
||||
>设备维保详情</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="设备型号"
|
||||
@ -1174,6 +1168,30 @@
|
||||
<span class="pop-span">{{ this.detailsForm.remark ? this.detailsForm.remark : "无"}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="维修次数">
|
||||
<a
|
||||
style="color:rgb(42, 116, 255);"
|
||||
@click="upkeepClick('maint')"
|
||||
>{{ this.maintTotal}}</a>
|
||||
</el-form-item>
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
@click="upkeepClick"
|
||||
>设备维保详情</el-button> -->
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="保养次数">
|
||||
<a
|
||||
style="color:rgb(42, 116, 255);"
|
||||
@click="upkeepClick('upkeep')"
|
||||
>{{ this.upkeepTotal}}</a>
|
||||
</el-form-item>
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
@click="upkeepClick"
|
||||
>设备维保详情</el-button> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
@ -1185,22 +1203,22 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 设备维保弹出框 -->
|
||||
<!-- 设备维保弹出框 :close-on-click-modal="false"
|
||||
-->
|
||||
<el-dialog
|
||||
:title="upkeepTitle"
|
||||
:visible.sync="upkeepOpen"
|
||||
width="1200px"
|
||||
:close-on-click-modal="false"
|
||||
class="card-detail-class"
|
||||
:before-close="upkeepCancel"
|
||||
>
|
||||
<el-card>
|
||||
<div
|
||||
slot="header"
|
||||
class="clearfix"
|
||||
>
|
||||
<span>维修信息</span>
|
||||
</div>
|
||||
<el-card v-if="type=='maint'">
|
||||
<!-- <div
|
||||
slot="header"
|
||||
class="clearfix"
|
||||
>
|
||||
<span>维修信息</span>
|
||||
</div> -->
|
||||
<el-table
|
||||
v-loading="maintLoading"
|
||||
:data="maintList"
|
||||
@ -1258,13 +1276,13 @@
|
||||
@pagination="getMaintList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div
|
||||
slot="header"
|
||||
class="clearfix"
|
||||
>
|
||||
<span>保养信息</span>
|
||||
</div>
|
||||
<el-card v-if="type=='upkeep'">
|
||||
<!-- <div
|
||||
slot="header"
|
||||
class="clearfix"
|
||||
>
|
||||
<span>保养信息</span>
|
||||
</div> -->
|
||||
<el-table
|
||||
v-loading="upkeepLoading"
|
||||
:data="upkeepList"
|
||||
@ -1552,7 +1570,7 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {
|
||||
listInfo,
|
||||
@ -1860,6 +1878,8 @@ export default {
|
||||
//设备维保
|
||||
upkeepTitle: "设备维保信息",
|
||||
upkeepOpen: false,
|
||||
// 类型 maint:维修,upkeep:保养
|
||||
type: null,
|
||||
//维修信息
|
||||
maintLoading: false,
|
||||
maintList: [],
|
||||
@ -2045,14 +2065,6 @@ export default {
|
||||
},
|
||||
upkeepCancel() {
|
||||
this.upkeepOpen = false;
|
||||
this.maintList = [];
|
||||
this.maintTotal = 0;
|
||||
this.upkeepList = [];
|
||||
this.upkeepTotal = 0;
|
||||
this.queryParamsMaint = this.queryParamsUpkeep = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
},
|
||||
//维修信息
|
||||
getUpkeepList() {
|
||||
@ -2074,15 +2086,32 @@ export default {
|
||||
this.maintLoading = false;
|
||||
});
|
||||
},
|
||||
//设备维保详情
|
||||
upkeepClick() {
|
||||
//获取维修保养信息
|
||||
this.getMaintList();
|
||||
this.getUpkeepList();
|
||||
this.upkeepOpen = true;
|
||||
},
|
||||
//设备维保详情
|
||||
upkeepClick(type) {
|
||||
this.type = type;
|
||||
if (this.type == "maint") {
|
||||
this.upkeepTitle = "设备维修信息";
|
||||
}
|
||||
if (this.type == "upkeep") {
|
||||
this.upkeepTitle = "设备保养信息";
|
||||
}
|
||||
//获取维修保养信息
|
||||
// this.getMaintList();
|
||||
// this.getUpkeepList();
|
||||
this.upkeepOpen = true;
|
||||
},
|
||||
/**详情按钮 */
|
||||
handleDetails(row) {
|
||||
this.maintList = [];
|
||||
this.maintTotal = 0;
|
||||
this.upkeepList = [];
|
||||
this.upkeepTotal = 0;
|
||||
this.queryParamsUpkeep = this.queryParamsUpkeep={
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.getMaintList();
|
||||
this.getUpkeepList();
|
||||
this.selectedEquipId = row.id;
|
||||
this.detailsForm = {};
|
||||
getInfo(row.id).then((response) => {
|
||||
|
Loading…
Reference in New Issue
Block a user