2024-07-03 设备模块-点检保养巡检-在检查项选择的时候加入模糊查询和重置+保养工单页面优化

yangwl
A0010407 5 months ago
parent 81e5c44cfd
commit 2ce93681fd

@ -442,7 +442,25 @@
<!-- 选择设备巡检项目 -->
<div class="my-step-body" v-if="inspectionPlanStep==1">
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-col class="my-step-mar" :span="24">
<el-input
placeholder="请输入名称并按回车查询"
v-model="equipmentItemSearch"
class="input-with-select"
style="width: 400px"
>
<el-button
slot="append"
icon="el-icon-search"
@click="equipmentItemQuery"
></el-button>
</el-input>
<el-button
type="primary"
plain
size="mini"
@click="equipmentItemReset"
>重置</el-button>
<el-button
type="primary"
plain
@ -663,6 +681,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable'],
data() {
return {
equipmentItemSearch: '',//
equipmentItemList:[],
// 线
groupLineList:[],
//
@ -801,9 +821,20 @@ export default {
this.getList();
},
methods: {
equipmentItemQuery() {
const tableData = this.form.equipmentItem;
this.form.equipmentItem = this.equipmentItemList;//
this.form.equipmentItem = tableData.filter(
(data) => !this.equipmentItemSearch || data.equipmentCode.toLowerCase().includes(this.equipmentItemSearch.toLowerCase())
)
},
equipmentItemReset() {
this.form.equipmentItem = this.equipmentItemList;
this.equipmentItemSearch = '';
},
//
changeCenter() {
},
//
changeArray(e) {
@ -1007,6 +1038,7 @@ export default {
if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
this.form.equipmentItem.splice(i, 1);
}
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
}
},
//
@ -1036,7 +1068,7 @@ export default {
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
}
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
this.selectEqu = false;
})
@ -1252,6 +1284,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.equipmentItem = this.equipmentItemList;//
if (this.selectPersonList.length == 0) {
this.$message({
message: "请请选择人员!",

@ -461,7 +461,25 @@
<!-- 选择设备点检项目 -->
<div class="my-step-body" v-if="spotCheckStep==1">
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-col class="my-step-mar" :span="24">
<el-input
placeholder="请输入名称并按回车查询"
v-model="equipmentItemSearch"
class="input-with-select"
style="width: 400px"
>
<el-button
slot="append"
icon="el-icon-search"
@click="equipmentItemQuery"
></el-button>
</el-input>
<el-button
type="primary"
plain
size="mini"
@click="equipmentItemReset"
>重置</el-button>
<el-button
type="primary"
plain
@ -470,7 +488,7 @@
选择设备
</el-button>
</el-col>
</el-row>
</el-row>
<el-table
border
:data="form.equipmentItem"
@ -697,6 +715,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable','device_yes_no'],
data() {
return {
equipmentItemSearch: '',//
equipmentItemList:[],
// 线
groupLineList:[],
//
@ -840,6 +860,18 @@ export default {
this.setWorkCenter();
},
methods: {
equipmentItemQuery() {
const tableData = this.form.equipmentItem;
this.form.equipmentItem = this.equipmentItemList;//
this.form.equipmentItem = tableData.filter(
(data) => !this.equipmentItemSearch || data.equipmentCode.toLowerCase().includes(this.equipmentItemSearch.toLowerCase())
)
},
equipmentItemReset() {
this.form.equipmentItem = this.equipmentItemList;
this.equipmentItemSearch = '';
},
//
setWorkCenter() {
getWorkCenter().then(response => {
@ -1052,6 +1084,7 @@ export default {
if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
this.form.equipmentItem.splice(i, 1);
}
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
}
},
//
@ -1081,7 +1114,7 @@ export default {
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
}
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
this.selectEqu = false;
})

@ -1265,9 +1265,6 @@
<el-descriptions-item label="是否停机保养">{{
workVO.order.shutDown
}}</el-descriptions-item>
<el-descriptions-item label="保养人工号">{{
workVO.order.planPerson
}}</el-descriptions-item>
<el-descriptions-item label="保养人姓名">{{
workVO.order.planPersonName
}}</el-descriptions-item>

@ -498,7 +498,25 @@
<!-- 选择设备保养项 -->
<div class="my-step-body" v-if="this.upkeepSteps==1">
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-col class="my-step-mar" :span="24">
<el-input
placeholder="请输入名称并按回车查询"
v-model="equipmentItemSearch"
class="input-with-select"
style="width: 400px"
>
<el-button
slot="append"
icon="el-icon-search"
@click="equipmentItemQuery"
></el-button>
</el-input>
<el-button
type="primary"
plain
size="mini"
@click="equipmentItemReset"
>重置</el-button>
<el-button
type="primary"
plain
@ -507,7 +525,7 @@
选择设备
</el-button>
</el-col>
</el-row>
</el-row>
<el-table
border
:data="form.equipmentItem"
@ -905,6 +923,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable','device_upkeep_type'],
data() {
return {
equipmentItemSearch: '',//
equipmentItemList:[],
// 线
groupLineList:[],
// list
@ -1071,6 +1091,18 @@ export default {
this.setWorkCenter();
},
methods: {
equipmentItemQuery() {
const tableData = this.form.equipmentItem;
this.form.equipmentItem = this.equipmentItemList;//
this.form.equipmentItem = tableData.filter(
(data) => !this.equipmentItemSearch || data.equipmentCode.toLowerCase().includes(this.equipmentItemSearch.toLowerCase())
)
},
equipmentItemReset() {
this.form.equipmentItem = this.equipmentItemList;
this.equipmentItemSearch = '';
},
// btn
choseSpareBtn(){
//
@ -1395,6 +1427,7 @@ export default {
if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
this.form.equipmentItem.splice(i, 1);
}
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
}
},
//
@ -1425,7 +1458,7 @@ export default {
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
}
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
this.selectEqu = false;
})
}else {

Loading…
Cancel
Save