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