diff --git a/src/api/model/orders.js b/src/api/model/orders.js index 58c47b2..c93921f 100644 --- a/src/api/model/orders.js +++ b/src/api/model/orders.js @@ -96,6 +96,13 @@ export default { post: async function (params) { return await http.post(this.url,params); } + }, + search:{ + url: `${config.API_URL}/repair.order.search.list`, + name: "维修工单搜索", + post: async function (params) { + return await http.post(this.url,params); + } } }, maintenance:{ @@ -197,6 +204,13 @@ export default { return await http.post(this.url,params); } }, + search:{ + url: `${config.API_URL}/maintenance.order.search.list`, + name: "维保工单搜索", + post: async function (params) { + return await http.post(this.url,params); + } + } }, plan:{ list:{ diff --git a/src/assets/icons/index.js b/src/assets/icons/index.js index 2f115dd..b7c0645 100644 --- a/src/assets/icons/index.js +++ b/src/assets/icons/index.js @@ -44,6 +44,7 @@ export { default as ClearCache } from './ClearCache.vue' export { default as MsgSetup } from './MsgSetup.vue' export { default as MsgReview } from './MsgReview.vue' export { default as SmallBell } from './SmallBell.vue' +export { default as Right } from './Right.vue' export { default as File7z } from './file/7z.vue' export { default as FileBmp } from './file/Bmp.vue' diff --git a/src/directives/focus.js b/src/directives/focus.js new file mode 100644 index 0000000..7e27dac --- /dev/null +++ b/src/directives/focus.js @@ -0,0 +1,11 @@ +export default { + mounted(el) { + const inputElement = el.querySelector('.el-input__inner'); + inputElement.addEventListener('focus', () => { + el.classList.add('focused'); + }); + inputElement.addEventListener('blur', () => { + el.classList.remove('focused'); + }); + }, +} diff --git a/src/scui.js b/src/scui.js index 7466252..0a43a97 100644 --- a/src/scui.js +++ b/src/scui.js @@ -41,6 +41,7 @@ import role from './directives/role' import time from './directives/time' import copy from './directives/copy' import number from './directives/number' +import focus from './directives/focus' import errorHandler from './utils/errorHandler' import * as elIcons from '@element-plus/icons-vue' @@ -96,6 +97,7 @@ export default { app.directive('time', time) app.directive('copy', copy) app.directive('number', number) + app.directive('focus', focus) //统一注册el-icon图标 for(let icon in elIcons){ diff --git a/src/style/search.scss b/src/style/search.scss index c21b394..e834162 100644 --- a/src/style/search.scss +++ b/src/style/search.scss @@ -1,25 +1,63 @@ .searchInput{ border-radius: 8px; - .el-input-group__append, .el-input-group__prepend{ + width: 560px; + .el-input-group__append{ + background: var(--el-color-primary); + 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); + } + .el-input-group__prepend{ background: var(--el-color-white); padding: 0; - border: none; box-shadow: none; - border-top-right-radius: 8px; - border-top-right-radius: 8px; + border-radius: 8px 0 0 8px; + border: 0; + border-top: 2px solid #c4c7ce; + border-bottom: 2px solid #c4c7ce; + border-left: 2px solid #c4c7ce; } + .el-input__wrapper{ - border: none; box-shadow: none; + border-top: 2px solid #c4c7ce; + border-bottom: 2px solid #c4c7ce; + } + .searchDrop{ + height: 100%; + padding: 0 0 0 10px; + display: flex; + align-items: center; + .dropTitle{ + height: 80%; + display: flex; + align-items: center; + justify-content: center; + border-right: 1px solid #E9E9E9; + padding-right: 15px; + cursor: pointer; + } } .searchBtn{ - background: var(--el-color-primary); color: var(--el-color-white); - width: 110px; + width: 86px; display: flex; align-items: center; justify-content: center; - border-radius: 8px; - border: 0; + border-radius: 0 7px 7px 0; + cursor: pointer; + .name{ + margin-right: 5px; + font-size: 13px; + } } } +.searchInput .is-focus{ + border-color: var(--el-color-primary); +} +.searchInput.focused .el-input-group__prepend{ + border-color: var(--el-color-primary); +} diff --git a/src/views/home/search/index.vue b/src/views/home/search/index.vue index 80a24aa..02793c8 100644 --- a/src/views/home/search/index.vue +++ b/src/views/home/search/index.vue @@ -2,35 +2,34 @@
- - - - @@ -40,14 +39,41 @@ export default { name: "", data(){ return{ - + size:'small', + keyword:"", + params:{ + repair_order_no:{ + operator:"like", + value:"" + }, + component_serial_no:{ + operator:"like", + value:"" + }, + }, + column:[ + {width:"",prop:"",label:""} + ], + rows:[] } }, mounted() { }, methods:{ - + async searchClick() { + let params = this.setObj(); + const res = await this.$API.orders.order.maintenance.search.post(params); + if(res.code == 200){ + this.rows = res.data; + } + }, + setObj(){ + for(let i in this.params){ + this.params[i].value = this.keyword==""?"":'%'+this.keyword+'%' + } + return this.params + }, } } @@ -56,7 +82,7 @@ export default { .searchHeader{ padding: 0; margin: 0; - height: 68px; + height: 70px; background: url(https://dm-auto.oss-cn-shanghai.aliyuncs.com/xw_cloud/image/search_back.png) no-repeat; background-size: cover; position: relative; @@ -67,7 +93,5 @@ export default { background: rgba(231,243,255,0.4); position: absolute;left: 0;top: 0;z-index: 10; display: flex;align-items: center;justify-content: center; - - }