fix:打印机名称设置放到导航栏
This commit is contained in:
parent
c869c1b8fd
commit
135b950432
|
|
@ -1,5 +1,10 @@
|
|||
<template>
|
||||
<div class="user-bar">
|
||||
<div class="screen panel-item" @click="printerSetting">
|
||||
<el-icon>
|
||||
<el-icon-printer :size="26"/>
|
||||
</el-icon>
|
||||
</div>
|
||||
<scan-dialog ref="scanDialog" :type="'info'" @closed="scanClose"> </scan-dialog>
|
||||
<div class="screen panel-item hidden-sm-and-down" @click="screen">
|
||||
<el-icon>
|
||||
|
|
@ -84,7 +89,16 @@
|
|||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
<el-dialog title="打印机设置" v-model="setNameVisible" width="600px">
|
||||
<el-form label-width="100px">
|
||||
<el-form-item label="打印机名称">
|
||||
<el-input v-model="printer_name"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer>
|
||||
<el-button type="primary" @click="savePrinter">保存</el-button>
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-model="searchVisible"
|
||||
:width="700"
|
||||
|
|
@ -111,6 +125,7 @@ export default {
|
|||
userName: "",
|
||||
userNameF: "",
|
||||
visible:false,
|
||||
setNameVisible:false,
|
||||
searchVisible: false,
|
||||
msg: false,
|
||||
msgList: {},
|
||||
|
|
@ -122,6 +137,7 @@ export default {
|
|||
params:{},
|
||||
scanId:'',
|
||||
scanType:'',
|
||||
printer_name:'',
|
||||
scanVisible:false,
|
||||
};
|
||||
},
|
||||
|
|
@ -140,6 +156,7 @@ export default {
|
|||
var userInfo = this.$TOOL.data.get("USER_INFO");
|
||||
this.userName = userInfo.username;
|
||||
this.userNameF = this.userName.substring(0, 1);
|
||||
this.printer_name = localStorage.getItem("printer_name") || "";
|
||||
},
|
||||
methods: {
|
||||
openBook() {
|
||||
|
|
@ -229,6 +246,12 @@ export default {
|
|||
var element = document.documentElement;
|
||||
this.$TOOL.screen(element);
|
||||
},
|
||||
printerSetting(){
|
||||
this.setNameVisible=true;
|
||||
},
|
||||
savePrinter(){
|
||||
this.$TOOL.setPrint(this.printer_name);
|
||||
},
|
||||
//显示短消息
|
||||
showMsg() {
|
||||
this.msg = true;
|
||||
|
|
@ -284,7 +307,7 @@ export default {
|
|||
}
|
||||
|
||||
.user-bar .panel-item i {
|
||||
font-size: 16px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.user-bar .panel-item:hover {
|
||||
|
|
|
|||
|
|
@ -139,7 +139,9 @@ tool.screen = function (element) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
tool.setPrint = function (val) {
|
||||
localStorage.setItem('printer_name', val)
|
||||
}
|
||||
/* 复制对象 */
|
||||
tool.objCopy = function (obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export default {
|
|||
height: 58px;
|
||||
padding: 0 10px;
|
||||
font-size: 19px;
|
||||
color: rgb(145,149,162);
|
||||
color: #efefef;
|
||||
&:hover{
|
||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue