|
|
@@ -1,45 +1,48 @@
|
|
|
<template>
|
|
|
- <header class="header">
|
|
|
- <h1 class="brand" style="text-align:center;margin-left:10px;margin-right:1px;">
|
|
|
+ <header class="header" style="background-color:#004EA2;">
|
|
|
+ <!-- <h1 class="brand" style="text-align:center;margin-left:10px;margin-right:1px;">
|
|
|
<router-link to="/">
|
|
|
<img src="~/assets/img/logo.png" style="height:32px;">
|
|
|
</router-link>
|
|
|
- </h1>
|
|
|
- <!-- <h1 class="brand" style="text-align:center;margin-left:10px;margin-right:1px;margin-top:10px;">
|
|
|
- <router-link to="/indexlims">
|
|
|
- <img src="/img/logo_dagang.png" style="height:26px;">
|
|
|
- </router-link>
|
|
|
</h1> -->
|
|
|
- <nav class="toolbar">
|
|
|
+ <div v-if="!isMenuHidden" class="brand" style="background-color:#004EA2;padding-top:7px;padding-left:20px;width:180px;">
|
|
|
+ <router-link to="/">
|
|
|
+ <img src="../assets/img/logo_dagang2.png" style="height:35px;" />
|
|
|
+ </router-link>
|
|
|
+ </div>
|
|
|
+ <div v-if="isMenuHidden" class="brand" style="background-color:#EAEDF1;padding-top:7px;padding-left:20px;width:36px;">
|
|
|
+ <router-link to="/">
|
|
|
+ <img src="../assets/img/title.png" style="height:35px;" />
|
|
|
+ </router-link>
|
|
|
+ </div>
|
|
|
+ <nav class="toolbar" style="margin-top: 3px;background-color:#004EA2;">
|
|
|
+ <img src="../assets/img/title_biobank.png" style="height:35px;padding-top:5px;" />
|
|
|
<div style="margin: 10px 0px 0px 20px;"></div>
|
|
|
- <!--<menu-list :items="header.menus"/>
|
|
|
- <input type="text" class="headerseach" @keydown="show($event)" v-model="sampcode" placeholder="样本搜索" >
|
|
|
- <span class="headerseachclose" :class="{ headerclosehavetxt: sampcode != ''}" onclick="headclearsearch()">x</span>-->
|
|
|
- <input type="text" class="headerseach" @keydown="show($event)" v-model="sampcode" placeholder="样本搜索">
|
|
|
- <span class="headerseachclose" :class="{ headerclosehavetxt: sampcode != ''}" @click="headclearsearch()"></span>
|
|
|
- <ul class="list">
|
|
|
- <li class="item">
|
|
|
- <a style="font-size: 90%" href="#" v-if="authUser">
|
|
|
+ <el-tag type="text" size="mini" style="margin-top:12px">{{department}}</el-tag>
|
|
|
+
|
|
|
+ <ul class="list" style="background: #004EA2;color: blue">
|
|
|
+ <li class="item" style="background: #004EA2">
|
|
|
+ <a style="font-size: 90%;background: #004EA2;color: white; font-weight: bold" href="#" v-if="authUser">
|
|
|
<span style="margin-right: 20px;">
|
|
|
<el-button type="text" icon="icon icon-shrink" v-if="fullscreen" @click="handleFullScreen"></el-button>
|
|
|
<el-button type="text" icon="icon icon-enlarge" v-if="!fullscreen" @click="handleFullScreen"></el-button>
|
|
|
</span>
|
|
|
- 您好, {{department}}{{ authUser.Profile.Realname }}
|
|
|
- <img v-if="authUser.Profile.Photo" :src="'http://'+authUser.Profile.Host+authUser.Profile.Photo"
|
|
|
- class="avatar">
|
|
|
- <img v-else class="avatar" src="~/assets/img/avatar.svg" :alt="authUser.name">
|
|
|
+ 您好, {{ authUser.Profile.Realname }}
|
|
|
+ <img v-if="authUser.Profile.Photo" style="background: #FFF; border: hidden" :src="'http://'+authUser.Profile.Host+authUser.Profile.Photo" class="avatar">
|
|
|
+ <img v-else class="avatar" style="background: white; border: hidden" src="~/assets/img/avatar.svg" :alt="authUser.name">
|
|
|
</a>
|
|
|
- <ul class="list" style="text-align: center;">
|
|
|
+ <ul class="list" style="text-align: center;background: #004EA2;">
|
|
|
<li class="item">
|
|
|
- <router-link to="/system/usersetting">账户设置</router-link>
|
|
|
+ <router-link to="/system/usersetting" style="color: white; font-weight: bold">账户设置</router-link>
|
|
|
</li>
|
|
|
- <li class="divider"></li>
|
|
|
+ <li class="divider" style="color: ActiveBorder;"></li>
|
|
|
<li class="item">
|
|
|
- <a href="#" @click.prevent="logout">注销登录</a>
|
|
|
+ <a href="#" style="color: white; font-weight: bold" @click.prevent="logout">注销登录</a>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
</ul>
|
|
|
+
|
|
|
</nav>
|
|
|
</header>
|
|
|
</template>
|
|
|
@@ -59,103 +62,73 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
fullscreen: false,
|
|
|
sampcode: '',
|
|
|
department: ''
|
|
|
}
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created () {
|
|
|
+ this.getdepartment()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- show: function (ev) {
|
|
|
- let _this = this
|
|
|
- if (process.env.appclient == 'lims') {
|
|
|
- if (ev.keyCode === 13) {
|
|
|
- if (_this.sampcode !== '') {
|
|
|
- _this.$axios.get('testsample/judgesampleexist/' + _this.sampcode, {})
|
|
|
- .then(res => {
|
|
|
- if (res.data.items === true) {
|
|
|
- _this.$router.push({
|
|
|
- path: `/positivereport/detectionresult?SampleCode=${_this.sampcode}`,
|
|
|
- })
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '该样本编码不存在!'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(_ => {
|
|
|
- // handle error
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '查询故障!请检查网络是否正常!'
|
|
|
- })
|
|
|
- })
|
|
|
+ handleFullScreen(){
|
|
|
+ let element = document.documentElement;
|
|
|
+ if (this.fullscreen) {
|
|
|
+ if (document.exitFullscreen) {
|
|
|
+ document.exitFullscreen();
|
|
|
+ } else if (document.webkitCancelFullScreen) {
|
|
|
+ document.webkitCancelFullScreen();
|
|
|
+ } else if (document.mozCancelFullScreen) {
|
|
|
+ document.mozCancelFullScreen();
|
|
|
+ } else if (document.msExitFullscreen) {
|
|
|
+ document.msExitFullscreen();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (element.requestFullscreen) {
|
|
|
+ element.requestFullscreen();
|
|
|
+ } else if (element.webkitRequestFullScreen) {
|
|
|
+ element.webkitRequestFullScreen();
|
|
|
+ } else if (element.mozRequestFullScreen) {
|
|
|
+ element.mozRequestFullScreen();
|
|
|
+ } else if (element.msRequestFullscreen) {
|
|
|
+ // IE11
|
|
|
+ element.msRequestFullscreen();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.fullscreen = !this.fullscreen;
|
|
|
+ },
|
|
|
+ getdepartment(){
|
|
|
+ this.department = '欢迎使用'
|
|
|
+ /*if (this.authUser.Profile.DepartmentId == "100000054") {
|
|
|
+ this.department = '欢迎使用'
|
|
|
+ } else{
|
|
|
+ this.$axios.get('/limsentrust/getshow')
|
|
|
+ .then(res => {
|
|
|
+ if(res.data.items === ''){
|
|
|
+ this.department = '欢迎使用'
|
|
|
+ } else if (res.data.items === 'yx') {
|
|
|
+ this.department = '宇信公司'
|
|
|
+ } else if (res.data.items === 'tjz') {
|
|
|
+ this.department = '特检站'
|
|
|
+ } else if (res.data.items === 'jlny') {
|
|
|
+ this.department = '计量能源站'
|
|
|
+ }else if (res.data.items === 'gcjd') {
|
|
|
+ this.department = '工程监督中心'
|
|
|
+ }else if (res.data.items === 'zj') {
|
|
|
+ this.department = '质检中心'
|
|
|
+ }else if (res.data.items === 'zj') {
|
|
|
+ this.department = '物资商品检验所'
|
|
|
}
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (ev.keyCode === 13) {
|
|
|
- if (_this.sampcode !== '') {
|
|
|
- _this.$axios.get('sampleoperation/getstationbycode?code=' + _this.sampcode, {})
|
|
|
- .then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- let val = res.data.item
|
|
|
- let stationstr =
|
|
|
- `${val.ShelfX};${val.ShelfY};${val.BoxX};${val.BoxY};${val.Position};${val.Id}`
|
|
|
- _this.$router.push({
|
|
|
- path: `/equipment/${val.EquipmentId}/manage`,
|
|
|
- query: {
|
|
|
- station: stationstr
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(_ => {
|
|
|
- // handle error
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '查询故障!请检查网络是否正常!'
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ }*/
|
|
|
+ },
|
|
|
headclearsearch() {
|
|
|
this.sampcode = ''
|
|
|
- },
|
|
|
-
|
|
|
- handleFullScreen() {
|
|
|
- let element = document.documentElement;
|
|
|
- if (this.fullscreen) {
|
|
|
- if (document.exitFullscreen) {
|
|
|
- document.exitFullscreen();
|
|
|
- } else if (document.webkitCancelFullScreen) {
|
|
|
- document.webkitCancelFullScreen();
|
|
|
- } else if (document.mozCancelFullScreen) {
|
|
|
- document.mozCancelFullScreen();
|
|
|
- } else if (document.msExitFullscreen) {
|
|
|
- document.msExitFullscreen();
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (element.requestFullscreen) {
|
|
|
- element.requestFullscreen();
|
|
|
- } else if (element.webkitRequestFullScreen) {
|
|
|
- element.webkitRequestFullScreen();
|
|
|
- } else if (element.mozRequestFullScreen) {
|
|
|
- element.mozRequestFullScreen();
|
|
|
- } else if (element.msRequestFullscreen) {
|
|
|
- // IE11
|
|
|
- element.msRequestFullscreen();
|
|
|
- }
|
|
|
- }
|
|
|
- this.fullscreen = !this.fullscreen;
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
export default class Headbar extends Vue {
|