diff --git a/src/style/search.scss b/src/style/search.scss index 8509eea..570e6a9 100644 --- a/src/style/search.scss +++ b/src/style/search.scss @@ -2,13 +2,13 @@ border-radius: 8px; width: 560px; .el-input-group__append{ - background: var(--el-color-primary); + background: var(--el-color-white); padding: 0; box-shadow: none; - border-radius: 0 7px 7px 0; - border-top: 2px solid var(--el-color-primary); - border-bottom: 2px solid var(--el-color-primary); - border-right: 2px solid var(--el-color-primary); + border-radius:0 8px 8px 0; + //border-top: 2px solid var(--el-color-primary); + //border-bottom: 2px solid var(--el-color-primary); + //border-right: 2px solid var(--el-color-primary); } .el-input-group__prepend{ background: var(--el-color-white); @@ -16,15 +16,15 @@ box-shadow: none; border-radius: 8px 0 0 8px; border: 0; - border-top: 2px solid #c4c7ce; - border-bottom: 2px solid #c4c7ce; - border-left: 2px solid #c4c7ce; + //border-top: 2px solid #c4c7ce; + //border-bottom: 2px solid #c4c7ce; + //border-left: 2px solid #c4c7ce; } .el-input__wrapper{ box-shadow: none; - border-top: 2px solid #c4c7ce; - border-bottom: 2px solid #c4c7ce; + //border-top: 2px solid #c4c7ce; + //border-bottom: 2px solid #c4c7ce; } .searchDrop{ height: 100%; @@ -43,11 +43,12 @@ } .searchBtn{ color: var(--el-color-white); + background: var(--el-color-primary); width: 86px; display: flex; align-items: center; justify-content: center; - border-radius: 0 7px 7px 0; + border-radius: 8px; cursor: pointer; .name{ margin-right: 5px; diff --git a/src/views/login/userRegister.vue b/src/views/login/userRegister.vue index d553a65..32e76e7 100644 --- a/src/views/login/userRegister.vue +++ b/src/views/login/userRegister.vue @@ -1,26 +1,30 @@ @@ -84,10 +85,10 @@ export default { exportShow:false, searchShow:false, searchList:[ - {name:'创建日期',type:'date',code:'activation_date',show:true}, + {name:'创建日期',type:'date',code:'created_at',show:true}, {name:'维修单号',type:'text',code:'repair_order_no', data:[], placeholder:"请输入维修单号",show:true}, - {name:'故障类型',type:'select',code:'fault_type', data:[], placeholder:"请选择故障类型",show:true}, - {name:'状态',type:'select',code:'repair_status', data:[], placeholder:"请选择状态",isOpen:true,show:false}, + {name:'故障类型',type:'select',code:['fault_type'], data:[], placeholder:"请选择故障类型",show:true}, + {name:'状态',type:'select',code:['repair_status'], data:[], placeholder:"请选择状态",isOpen:true,show:false}, {name:'故障描述',type:'text',code:['fault_description'],placeholder:"请输故障描述",isOpen:true,show:false}, {name:'关键字',type:'text',code:['fault_description','device_sn'],keyword:true,show:true}, ], @@ -128,29 +129,30 @@ export default { } }) }, - getSelectData(item){ - let {data,params} = item; + async getSelectData(item) { + let {data, params} = item; this.params = params; - if(data.code == "id"){ - this.getCompanyList(data,params) - }else if(data.code == "active_status"){ - this.getStatusList(data,params); + let searchParams = this.$TOOL.objCopy(params); + searchParams.field = "" + if (typeof data.code === 'string') { + searchParams.field = data.code; + } else { + searchParams.field = data.code[0]; } - }, - - async getCompanyList(data,params) { - const res = await this.$API.system.company.select.post(params); - if(res.data && res.data.length>0){ - res.data.forEach(item=>{ - item.label = item.full_name; - }) - } - if(res.code == 200){ - this.searchList.forEach(item=>{ - if(item.code == data.code){ - item.data = res.data; + if (data.type == 'select') { + const res = await this.$API.orders.order.maintenance.field.post(searchParams); + if (res.code == 200) { + if (res.data && res.data.length > 0) { + res.data.forEach(item => { + item.label = item[data.code]; + }) } - }) + this.searchList.forEach(item => { + if (item.code == data.code) { + item.data = res.data; + } + }) + } } }, @@ -162,16 +164,20 @@ export default { }) }, //查看 - // table_show(row){ - // eventBus.$emit('tagClose','/order/order-info',{id:row.id}); - // }, + table_show(row){ + eventBus.$emit('tagClose','/order/order-info',{id:row.id}); + }, //编辑 table_edit(row){ this.dialog.save = true this.$nextTick(() => { - this.$refs.saveDialog.open('edit').setData(row) + this.$refs.saveDialog.open('edit').setData(row); }) }, + // 工单日志 + table_logs(row){ + eventBus.$emit('tagClose','/order/order-logs',{id:row.id,type:2}); + }, // 删除 async table_del(row){ this.$confirm(`确定删除 ${row.name} 吗?`, '提示', {