组桶打印
This commit is contained in:
@@ -4,12 +4,20 @@
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="setup-item">
|
||||
<view class="setup-label">服务器地址</view>
|
||||
<view class="filter_label">服务器</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model.trim="addrip">
|
||||
</view>
|
||||
<view class="setup-item">
|
||||
<view class="setup-label">打印地址</view>
|
||||
<!-- <view class="setup-item">
|
||||
<view class="setup-label">打印机</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入打印地址" v-model.trim="printip">
|
||||
</view> -->
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">打印机</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="setup-item">
|
||||
<view class="setup-label">刷新时间(s)</view>
|
||||
@@ -25,19 +33,43 @@
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import {getPrint} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: [],
|
||||
index: '',
|
||||
addrip: this.$store.getters.baseUrl,
|
||||
acsip: this.$store.getters.acsUrl,
|
||||
printip: this.$store.getters.printUrl,
|
||||
printip: '',
|
||||
setTime: this.$store.getters.setTime / 1000
|
||||
};
|
||||
},
|
||||
created () {
|
||||
// this.options.push({text:this.$store.getters.printUrl, value: this.$store.getters.printUrl})
|
||||
// this.index = this.printip
|
||||
this._getPrint()
|
||||
},
|
||||
methods: {
|
||||
async _getPrint () {
|
||||
try {
|
||||
let res = await getPrint()
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
this.printip = e
|
||||
},
|
||||
goIn () {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
@@ -51,13 +83,13 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.printip === '') {
|
||||
uni.showToast({
|
||||
title: '请填写打印地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// if (this.printip === '') {
|
||||
// uni.showToast({
|
||||
// title: '请填写打印地址',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// if (this.setTime === '') {
|
||||
// uni.showToast({
|
||||
// title: '请填写刷新时间',
|
||||
|
||||
Reference in New Issue
Block a user