update code
parent
b14234d128
commit
2e0f16cb72
|
@ -112,6 +112,9 @@ table{
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
background: url("../images/head_select.png") no-repeat center/100% 100%;
|
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{
|
.head-select input{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
|
@ -54,8 +54,8 @@
|
||||||
<div :class="nav == 7 ? 'head-nav active' : 'head-nav'" @click="pageJump(7, '#/engin')">工程管理</div>
|
<div :class="nav == 7 ? 'head-nav active' : 'head-nav'" @click="pageJump(7, '#/engin')">工程管理</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="!isTypeBuser">
|
<template v-if="!isTypeBuser">
|
||||||
<div class="head-title-select" @mouseleave="hideScreenUlSel1" v-if="localStorage1">
|
<div class="head-title-select title-select1" @mouseleave="hideScreenUlSel1" v-if="localStorage1">
|
||||||
<div class="head-select">
|
<div class="head-select head-select-150">
|
||||||
<input type="text" :value="dept1" @click="showScreenUlSel1" placeholder="请选择公司" readonly>
|
<input type="text" :value="dept1" @click="showScreenUlSel1" placeholder="请选择公司" readonly>
|
||||||
</div>
|
</div>
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
|
@ -65,7 +65,17 @@
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="head-title-select" @mouseleave="hideScreenUlSel2" v-if="localStorage2">
|
<div class="head-title-select title-select1" @mouseleave="hideScreenUlSel3" >
|
||||||
|
<div class="head-select head-select-150">
|
||||||
|
<input type="text" :value="proType" @click="showScreenUlSel3" placeholder="项目类型" readonly>
|
||||||
|
</div>
|
||||||
|
<el-collapse-transition>
|
||||||
|
<ul class="header-screen-ul" v-show="showSel3">
|
||||||
|
<li v-for="item in proTypeList" @click="setScreenLiSel3(item)" :title="item.text">{{ item.text }}</li>
|
||||||
|
</ul>
|
||||||
|
</el-collapse-transition>
|
||||||
|
</div>
|
||||||
|
<div class="head-title-select title-select3" @mouseleave="hideScreenUlSel2" v-if="localStorage2">
|
||||||
<div class="head-select">
|
<div class="head-select">
|
||||||
<input type="text" :value="dept2" @click="showScreenUlSel2" placeholder="请选择项目" readonly>
|
<input type="text" :value="dept2" @click="showScreenUlSel2" placeholder="请选择项目" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
@ -80,11 +90,13 @@
|
||||||
<div class="head-title-date-con">{{ date }}</div>
|
<div class="head-title-date-con">{{ date }}</div>
|
||||||
<div class="head-title-time-con">{{ time }}</div>
|
<div class="head-title-time-con">{{ time }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<div class="head-title-weather">
|
<div class="head-title-weather">
|
||||||
<img :src="condCode">
|
<img :src="condCode">
|
||||||
<span>{{ condTxt }}</span>
|
<span>{{ condTxt }}</span>
|
||||||
<span>{{ temperature }}℃</span>
|
<span>{{ temperature }}℃</span>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="header-title-user" style="margin-left:12px;">
|
<div class="header-title-user" style="margin-left:12px;">
|
||||||
{{ getName() }}
|
{{ getName() }}
|
||||||
<i @click="doLogout" title="退出" style="margin-left:12px;cursor: pointer;">
|
<i @click="doLogout" title="退出" style="margin-left:12px;cursor: pointer;">
|
||||||
|
@ -121,6 +133,7 @@
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
import {routes} from '../router/index'
|
import {routes} from '../router/index'
|
||||||
|
import { tryToJson } from "../utils/tools";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
red: {
|
red: {
|
||||||
|
@ -138,6 +151,7 @@ export default {
|
||||||
dept2: '',
|
dept2: '',
|
||||||
showSel1: false,
|
showSel1: false,
|
||||||
showSel2: false,
|
showSel2: false,
|
||||||
|
showSel3: false,
|
||||||
data: [],
|
data: [],
|
||||||
depts: [],
|
depts: [],
|
||||||
timerID: undefined,
|
timerID: undefined,
|
||||||
|
@ -151,8 +165,30 @@ export default {
|
||||||
temperature: 20,
|
temperature: 20,
|
||||||
condTxt: '',
|
condTxt: '',
|
||||||
condCode: '',
|
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() {
|
async mounted() {
|
||||||
window.headerApp = this
|
window.headerApp = this
|
||||||
await this.initMe();
|
await this.initMe();
|
||||||
|
@ -324,22 +360,31 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
showScreenUlSel1() {
|
showScreenUlSel1() {
|
||||||
this.showSel1 = true
|
this.showSel1 = true
|
||||||
|
|
||||||
},
|
},
|
||||||
showScreenUlSel2() {
|
showScreenUlSel2() {
|
||||||
this.showSel2 = true
|
this.showSel2 = true
|
||||||
|
|
||||||
},
|
},
|
||||||
|
showScreenUlSel3() {
|
||||||
|
this.showSel3 = true
|
||||||
|
},
|
||||||
hideScreenUlSel1() {
|
hideScreenUlSel1() {
|
||||||
this.showSel1 = false
|
this.showSel1 = false
|
||||||
},
|
},
|
||||||
hideScreenUlSel2() {
|
hideScreenUlSel2() {
|
||||||
this.showSel2 = false
|
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) {
|
setScreenLiSel1(item) {
|
||||||
localStorage.setItem("data1", JSON.stringify(item))
|
localStorage.setItem("data1", JSON.stringify(item))
|
||||||
this.localStorage1 = JSON.parse(localStorage.getItem("data1"))
|
this.localStorage1 = JSON.parse(localStorage.getItem("data1"))
|
||||||
|
@ -440,4 +485,10 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.title-select1{
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
.title-select3{
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
}</style>
|
}</style>
|
|
@ -28,6 +28,7 @@ service.interceptors.request.use(config => {
|
||||||
if (getToken() && !isToken) {
|
if (getToken() && !isToken) {
|
||||||
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
}
|
}
|
||||||
|
config.headers["proType"]=localStorage.getItem("proType")||"0";
|
||||||
// get请求映射params参数
|
// get请求映射params参数
|
||||||
if (config.method === 'get' && config.params) {
|
if (config.method === 'get' && config.params) {
|
||||||
let url = config.url + '?' + tansParams(config.params);
|
let url = config.url + '?' + tansParams(config.params);
|
||||||
|
|
Loading…
Reference in New Issue