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"> <div class="my-step-body" v-if="inspectionPlanStep==1">
<el-row> <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 <el-button
type="primary" type="primary"
plain plain
@ -663,6 +681,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable'], dicts: ['device_loop_type', 'sys_normal_disable'],
data() { data() {
return { return {
equipmentItemSearch: '',//
equipmentItemList:[],
// 线 // 线
groupLineList:[], groupLineList:[],
// //
@ -801,9 +821,20 @@ export default {
this.getList(); this.getList();
}, },
methods: { 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() { changeCenter() {
}, },
// //
changeArray(e) { changeArray(e) {
@ -1007,6 +1038,7 @@ export default {
if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) { if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
this.form.equipmentItem.splice(i, 1); 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++) { for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]); this.form.equipmentItem.push(response.data[i]);
} }
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
this.selectEqu = false; this.selectEqu = false;
}) })
@ -1252,6 +1284,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.form.equipmentItem = this.equipmentItemList;//
if (this.selectPersonList.length == 0) { if (this.selectPersonList.length == 0) {
this.$message({ this.$message({
message: "请请选择人员!", message: "请请选择人员!",

@ -461,7 +461,25 @@
<!-- 选择设备点检项目 --> <!-- 选择设备点检项目 -->
<div class="my-step-body" v-if="spotCheckStep==1"> <div class="my-step-body" v-if="spotCheckStep==1">
<el-row> <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 <el-button
type="primary" type="primary"
plain plain
@ -697,6 +715,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable','device_yes_no'], dicts: ['device_loop_type', 'sys_normal_disable','device_yes_no'],
data() { data() {
return { return {
equipmentItemSearch: '',//
equipmentItemList:[],
// 线 // 线
groupLineList:[], groupLineList:[],
// //
@ -840,6 +860,18 @@ export default {
this.setWorkCenter(); this.setWorkCenter();
}, },
methods: { 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() { setWorkCenter() {
getWorkCenter().then(response => { getWorkCenter().then(response => {
@ -1052,6 +1084,7 @@ export default {
if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) { if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
this.form.equipmentItem.splice(i, 1); 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++) { for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]); this.form.equipmentItem.push(response.data[i]);
} }
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
this.selectEqu = false; this.selectEqu = false;
}) })

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

@ -498,7 +498,25 @@
<!-- 选择设备保养项 --> <!-- 选择设备保养项 -->
<div class="my-step-body" v-if="this.upkeepSteps==1"> <div class="my-step-body" v-if="this.upkeepSteps==1">
<el-row> <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 <el-button
type="primary" type="primary"
plain plain
@ -905,6 +923,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable','device_upkeep_type'], dicts: ['device_loop_type', 'sys_normal_disable','device_upkeep_type'],
data() { data() {
return { return {
equipmentItemSearch: '',//
equipmentItemList:[],
// 线 // 线
groupLineList:[], groupLineList:[],
// list // list
@ -1071,6 +1091,18 @@ export default {
this.setWorkCenter(); this.setWorkCenter();
}, },
methods: { 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 // btn
choseSpareBtn(){ choseSpareBtn(){
// //
@ -1395,6 +1427,7 @@ export default {
if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) { if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
this.form.equipmentItem.splice(i, 1); 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++) { for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]); this.form.equipmentItem.push(response.data[i]);
} }
this.equipmentItemList = this.form.equipmentItem;//equipmentItemList
this.selectEqu = false; this.selectEqu = false;
}) })
}else { }else {

Loading…
Cancel
Save