代码更新

This commit is contained in:
GaoHao
2025-02-26 19:46:20 +08:00
parent 7519ffced3
commit b4a0393d2d
413 changed files with 7483 additions and 60762 deletions

View File

@@ -3,7 +3,7 @@
<div class="w-full" v-for="item in pageData.list " :key="item.id">
<printer-item :data="item" @init='init'></printer-item>
</div>
<view v-if="!pageData.list.length&&pageData.hasAjax">
<view v-if="!pageData.list.length">
<my-img-empty ></my-img-empty>
</view>
<view style="height: 100rpx;"></view>
@@ -20,41 +20,39 @@
<script setup>
import go from '@/commons/utils/go.js'
import {
onShow,
} from '@dcloudio/uni-app'
import {
onMounted,
reactive
} from 'vue';
import { onShow } from '@dcloudio/uni-app'
import { reactive } from 'vue';
import printerItem from './components/printer-item.vue';
import * as Api from '@/http/yskApi/devices.js'
import { getPrinter } from '@/api/printer.js'
const pageData = reactive({
list: [],
hasAjax:false,
query: {
sort: '',
name: '',
contentType: ''
connectionType: ''
}
})
onShow(()=>{
init()
})
/**
* 获取打印机列表
*/
async function init() {
const res = await getPrinter(pageData.query)
pageData.list = res.records
}
/**
* 添加打印机
*/
function toAdd(){
go.to('PAGES_PRINTER_ADD',{
a:1
})
}
async function init() {
const res =await Api.tbPrintMachineGet(pageData.query)
pageData.hasAjax=true
pageData.list = res
// pageData.list = res.filter(v=>v.address)
}
onShow(()=>{
init()
})
// onMounted(() => {
// init()
// })
</script>
<style lang="scss" scoped>