feat:设备添加一个cate的筛选条件

This commit is contained in:
shijing 2026-05-25 15:33:19 +08:00
parent 4b50bd786e
commit cde4151783
1 changed files with 14 additions and 3 deletions

View File

@ -7,8 +7,11 @@
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-cascader v-model="query.belong_dept" :options="group" :props="groupsProps" clearable placeholder="所在车间" <el-cascader v-model="query.belong_dept" :options="group" :props="groupsProps" clearable placeholder="所在车间"
:show-all-levels="false" @change="handleQuery"> :show-all-levels="false" @change="handleQuery" style="width:180px">
</el-cascader> </el-cascader>
<el-select v-model="query.cate" placeholder="设备分类" clearable style="width:180px">
<el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input> <el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div> </div>
@ -38,7 +41,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="购置日期" prop="buy_date"> <el-table-column label="购置日期" prop="buy_date" width="90">
</el-table-column> </el-table-column>
<el-table-column label="运行规则" prop="indicate_mgroup_running" width="100"> <el-table-column label="运行规则" prop="indicate_mgroup_running" width="100">
</el-table-column> </el-table-column>
@ -195,6 +198,7 @@ export default {
data() { data() {
return { return {
runningStateEnum, runningStateEnum,
cateOptions:[],
deptOptions: [], deptOptions: [],
dialog: { dialog: {
save: false, save: false,
@ -247,9 +251,16 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getDept() this.getDept();
this.getCateOptions();
}, },
methods: { methods: {
getCateOptions() {
let that = this;
that.$API.em.ecate.list.req({page:0,type:10}).then(res => {
that.cateOptions = res;
})
},
// //
selectionChange(selection) { selectionChange(selection) {
this.selectiones = selection; this.selectiones = selection;