设备列表新加搜索条件

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

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

Loading…
Cancel
Save