工艺管理接口联调

dev-scheduling
jinna 3 months ago
parent 05e1b31933
commit bb0c8bb0c8
  1. 25
      src/views/processManagement/components/processMainte/processPlanning.vue
  2. 2
      src/views/processManagement/taskProcessing.vue

@ -97,9 +97,10 @@
style="width: 220px; margin-right: 12px" style="width: 220px; margin-right: 12px"
clearable clearable
filterable filterable
:filter-method="handleFilter"
> >
<el-option <el-option
v-for="(item, index) in modelOption" v-for="(item, index) in filteredList"
:key="index" :key="index"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
@ -622,6 +623,7 @@ export default {
tempId: 0, tempId: 0,
projectOptions: [], // projectOptions: [], //
standardList: [], // standardList: [], //
filteredList:[],
}; };
}, },
mounted() { mounted() {
@ -671,10 +673,31 @@ export default {
this.rankList = res.data.data; this.rankList = res.data.data;
}); });
}, },
handleFilter(keyword){
// 1.
if (!keyword) {
this.filteredList = [...this.originList]
return
}
// 2.
const lowerKeyword = keyword.toLowerCase()
// 3. name pinyin
this.filteredList = this.originList.filter(item => {
// 1
const matchName = item.name.toLowerCase().includes(lowerKeyword)
// 2
const matchPinyin = item.modelNameStr.toLowerCase().includes(lowerKeyword)
//
return matchName || matchPinyin
})
},
// //
async getModelList() { async getModelList() {
await getModelList().then(res => { await getModelList().then(res => {
this.modelOption = res.data.data; this.modelOption = res.data.data;
this.filteredList = [...this.modelOption]
}); });
}, },
// //

@ -174,7 +174,7 @@ export default {
editBtnIcon: ' ', editBtnIcon: ' ',
viewBtnText: '详情', viewBtnText: '详情',
labelWidth: 120, labelWidth: 120,
menuWidth: 170, menuWidth: 200,
dialogWidth: 1200, dialogWidth: 1200,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,

Loading…
Cancel
Save