设备列表新加搜索条件

master
zhangdi 1 year ago
parent 21c92f7c4b
commit a474c2eba7
  1. 46
      src/views/device/deviceSystem.vue

@ -106,6 +106,10 @@
<el-input style="width: 98%;" :disabled="viewType == 'view'" placeholder="请输入供应商"
v-model="addForm.supplier"></el-input>
</el-form-item>
<el-form-item label="品牌" prop="supplier">
<el-input style="width: 98%;" :disabled="viewType == 'view'" placeholder="请输入品牌"
v-model="addForm.brand"></el-input>
</el-form-item>
<el-form-item label="生产时间" prop="produceTime">
<el-date-picker :disabled="viewType == 'view'" style="width:98%;" v-model="addForm.produceTime"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" placeholder="请选择生产时间">
@ -115,6 +119,9 @@
<el-cascader :props="labProps" style="width:98%;" v-model="addForm.lab"
:disabled="viewType == 'view'"></el-cascader>
</el-form-item>
<el-form-item label="" prop="lab" v-if="role_id=='1839536982874193922'">
<el-checkbox v-model="addForm.isMaintain" :disabled="viewType == 'view'"> 是否在保</el-checkbox>
</el-form-item>
</div>
<div>
<div style="
@ -234,6 +241,9 @@ export default {
requestSub,
SelectTree
},
computed: {
...mapGetters(["userInfo", "permission"]),
},
data() {
return {
qrcodeUrl: '',
@ -314,6 +324,14 @@ export default {
labelWidth: 120,
prop: "supplier",
overHidden: true,
search: true,
},
{
label: "品牌",
labelWidth: 120,
prop: "brand",
overHidden: true,
search: true,
},
{
label: "生产时间",
@ -334,6 +352,22 @@ export default {
prop: "runStatus",
slot: true,
formslot: true,
search: true,
type: "select",
dicData:[
{
label: "运行中",
value: "1",
},
{
label: "关机",
value: "0",
},
{
label: "报警中",
value: "2",
}
]
},
{
label: "附件",
@ -425,13 +459,15 @@ export default {
span: 24,
}
]
}
},
role_id:'',//id
}
},
computed: {
...mapGetters(["userInfo", "permission"]),
},
mounted() {
this.role_id = this.userInfo.role_id
getChildList(1, 100, '1846792623628001282').then(res => {
this.treeOptions = res.data.data
})
@ -624,6 +660,7 @@ export default {
this.addForm.startTime = this.tableData.length > 0 ? this.tableData.find(item => item.startTime).startTime : ''
this.dialogTitle = '设备查看'
this.dialogVisible = true
this.addForm.isMaintain = res.data.data.isMaintain//
})
},
handleImport() {
@ -759,6 +796,7 @@ export default {
limsId: this.addForm.lab[0], //id
floorId: this.addForm.lab[1], //id
roomId: this.addForm.lab[2], //id
brand:this.addForm.brand,//
}
if (this.viewType == 'add') {
addDevice(query).then(res => {
@ -794,11 +832,15 @@ export default {
})
},
onLoad(page, params = {}) {
console.log(1111111111,this.searchForm)
let query = {
name: this.searchForm.name ? this.searchForm.name : '',
position: this.searchForm.position ? this.searchForm.position : '',
type: this.searchForm.type ? this.searchForm.type : '',
current: this.page.currentPage,
runStatus:this.searchForm.runStatus?this.searchForm.runStatus:'',//
supplier:this.searchForm.supplier?this.searchForm.supplier:'',//
brand:this.searchForm.brand?this.searchForm.brand:'',//
size: this.page.pageSize,
}
getDeviceList(query).then(res => {
@ -823,4 +865,4 @@ export default {
font-size: 20px;
}
}
</style>
</style>

Loading…
Cancel
Save