diff --git a/public/css/largeScreenStyle.css b/public/css/largeScreenStyle.css index 973a196..005268c 100644 --- a/public/css/largeScreenStyle.css +++ b/public/css/largeScreenStyle.css @@ -112,6 +112,9 @@ table{ padding-right: 30px; background: url("../images/head_select.png") no-repeat center/100% 100%; } +.head-select.head-select-150{ + background: url("../images/head_select-150.png") no-repeat center/100% 100%; +} .head-select input{ height: 100%; width: 100%; diff --git a/public/images/head_select-150.png b/public/images/head_select-150.png new file mode 100644 index 0000000..f749ff6 Binary files /dev/null and b/public/images/head_select-150.png differ diff --git a/src/components/header.vue b/src/components/header.vue index d073902..32dbb6f 100644 --- a/src/components/header.vue +++ b/src/components/header.vue @@ -54,8 +54,8 @@
工程管理
-
+
+
+ +
+ +
    +
  • {{ item.text }}
  • +
+
+
+
@@ -80,11 +90,13 @@
{{ date }}
{{ time }}
+
{{ getName() }} @@ -121,6 +133,7 @@ import { mapGetters } from 'vuex' import Cookies from 'js-cookie' import {routes} from '../router/index' +import { tryToJson } from "../utils/tools"; export default { props: { red: { @@ -138,6 +151,7 @@ export default { dept2: '', showSel1: false, showSel2: false, + showSel3: false, data: [], depts: [], timerID: undefined, @@ -151,8 +165,30 @@ export default { temperature: 20, condTxt: '', condCode: '', + proType:'全部', } }, + beforeCreate(){ + let obj=localStorage.getItem("project_category"); + if(obj &&obj.length>0){ + obj=tryToJson(obj,[]); + if(obj.length>0){ + this.proTypeList=obj; + return; + } + } + this.$api.dict("project_category").then(d=>{ + let tmps=(d||[]).map(it=>{ + return { + value:it.dictValue, + text:it.dictLabel, + } + }); + tmps=[{value:"0",text:"全部"},...tmps]; + this.proTypeList=tmps; + localStorage.setItem("project_category",JSON.stringify(tmps)); + }); + }, async mounted() { window.headerApp = this await this.initMe(); @@ -323,23 +359,32 @@ export default { } - }, - - + }, showScreenUlSel1() { this.showSel1 = true - }, showScreenUlSel2() { this.showSel2 = true }, + showScreenUlSel3() { + this.showSel3 = true + }, hideScreenUlSel1() { this.showSel1 = false }, hideScreenUlSel2() { this.showSel2 = false }, + hideScreenUlSel3() { + this.showSel3 = false + }, + setScreenLiSel3(item){ + localStorage.setItem("proType",item.value); + this.proType=item.text; + this.showSel3=false; + this.loadProject(); + }, setScreenLiSel1(item) { localStorage.setItem("data1", JSON.stringify(item)) this.localStorage1 = JSON.parse(localStorage.getItem("data1")) @@ -440,4 +485,10 @@ export default { } } + .title-select1{ + width: 150px; + } + .title-select3{ + width: 250px; + } } \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index fcafe24..c6b4088 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -28,6 +28,7 @@ service.interceptors.request.use(config => { if (getToken() && !isToken) { config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 } + config.headers["proType"]=localStorage.getItem("proType")||"0"; // get请求映射params参数 if (config.method === 'get' && config.params) { let url = config.url + '?' + tansParams(config.params);