刘翔宇-旅管家 3 years ago
parent 1db595ef45
commit 893dfbe7d5

@ -1,8 +1,7 @@
NODE_ENV = production
# just a flag
ENV = 'staging'
ENV = 'production'
# base api
VUE_APP_BASE_API = '/stage-api'
VUE_APP_BASE_API = http://book.com
VUE_APP_UPLOAD_API =http://book.com/api/admin/upload-file
VUE_APP_PUBLIC='/admin/'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@ -21,7 +21,8 @@
</lx-header>
<xy-table :list="list" :table-item="table" :total="total">
<xy-table :list="list" :table-item="table" :total="total" @pageSizeChange="pageSizeChange"
@pageIndexChange="pageChange">
<template v-slot:btns>
<el-table-column fixed="right" header-align="center" align="center" label="操作" width="300">
<template slot-scope="scope">
@ -92,7 +93,8 @@
}
} > < img src = {
row.small_cover?.url
} style='width:120px;height:120px'> </img></div> )
}
style = 'width:120px;height:120px' > < /img></div > )
}
}, {
@ -147,6 +149,10 @@
add() {
this.$refs['addBook'].isShow = true
},
pageChange(e) {
this.select.page = e
this.load();
},
pageSizeChange(e) {
this.select.page_size = e;
this.select.page = 1;
@ -182,8 +188,7 @@
mounted() {
this.load()
},
created() {
}
created() {}
}
</script>

@ -25,7 +25,7 @@
</el-table-column>
<el-table-column prop="name" label="条形码" align="center" width="180">
<template slot-scope="scope">
<img :src="scope.row.barcode" />
<img :src="scope.row.barcode" style="width: 120px;height: 90px;" />
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
@ -38,6 +38,7 @@
<el-table-column prop="opt" label="操作">
<template slot-scope="scope">
<el-button @click="toPrint(scope.row)"></el-button>
<el-button @click="toDelete(scope.row)" type='danger' style='margin-left: 10px;'>删除</el-button>
</template>
</el-table-column>
</el-table>
@ -51,7 +52,9 @@
show
} from "@/api/bookStore/bookIndex";
import {
del as delStore
} from "@/api/bookStore/storeList";
export default {
@ -91,20 +94,31 @@
}
},
methods: {
toDelete(row) {
delStore({
id: row.id
}).then(res => {
this.getDetail();
this.$Message.success("操作成功");
})
},
toPrint(row) {
this.window.width = screen.availWidth * 0.95
this.window.height = screen.availHeight * 0.95
this.window.top = (window.screen.height - 30 - this.window.height) / 2
this.window.left = (window.screen.width - 10 - this.window.width) / 2
let obj = {
id: row.id,
barcode: row.barcode
}
let url = `${process.env.VUE_APP_PUBLIC}print.html?json=${JSON.stringify(obj)}`
window.open(url, 'toPrint',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
// this.window.width = screen.availWidth * 0.95
// this.window.height = screen.availHeight * 0.95
// this.window.top = (window.screen.height - 30 - this.window.height) / 2
// this.window.left = (window.screen.width - 10 - this.window.width) / 2
// let obj = {
// id: row.id,
// barcode: row.barcode
// }
// let url = `${process.env.VUE_APP_PUBLIC}print.html?json=${JSON.stringify(obj)}`
// window.open(url, 'toPrint',
// `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
// )
let baseUrl = process.env.VUE_APP_BASE_API + "/print?id=" + row.id;
window.open(baseUrl)
},
async getDetail() {
let res = await show({

@ -15,15 +15,14 @@
<Button style="margin-left: 10px" type="primary" @click="select={page:1,keyword:''}">
</Button>
<Button style="margin-left: 10px" type="primary" @click="doSearch"></Button>
<Button style="margin-left: 10px" type="primary" @click="doPrint"></Button>
</div>
</slot>
</lx-header>
<xy-table :list="list" :table-item="table" :total="total">
<template v-slot:btns>
</template>
<xy-table :list="list" :table-item="table" :total="total" @pageSizeChange="pageSizeChange"
@pageIndexChange="pageChange" @delete="deleteitem" >
</xy-table>
</div>
@ -128,6 +127,14 @@
this.select.page = 1;
this.load();
},
doPrint(){
let baseUrl = process.env.VUE_APP_BASE_API+"/print";
window.open(baseUrl)
},
pageChange(e) {
this.select.page = e
this.load();
},
pageSizeChange(e) {
this.select.page_size = e;
@ -146,12 +153,7 @@
this.load();
this.$Message.success("操作成功");
})
},
pageChange(e) {
this.select.page = e
this.load()
},
}
},
mounted() {
this.load()

@ -56,7 +56,7 @@
class="content_box_body_search_no"></el-input>
</div>
<div class="content_box_body_table">
<el-table :data="tableData" style="width: 100%;" height="300px">
<el-table :data="tableData" style="width: 100%;" height="40vh">
<el-table-column type="index" label="序号" align="center" width="80">
</el-table-column>
<el-table-column prop="name" label="书名" align="center">
@ -385,8 +385,8 @@
margin-top: 29px;
background: rgba(250, 167, 1, 0.12);
border-radius: 10px;
max-height: 400px;
min-height: 400px;
max-height: 60vh;
min-height: 60vh;
overflow-y: auto;
overflow-x: hidden;
width: 100%;
@ -442,6 +442,8 @@
margin-left: 6px;
margin-bottom: 10px;
cursor: pointer;
font-weight: 400;
font-size: 1.125rem;
}
.content_box_body_select_box_item_on {
@ -452,6 +454,7 @@
border-radius: 19px;
font-family: PingFang SC;
font-weight: 400;
font-size: 1.125rem;
color: #FFFFFF;
}
}

@ -29,7 +29,6 @@
</template>
<script>
export default {
data() {
return {}
@ -64,6 +63,7 @@
display: flex;
align-items: center;
flex-direction: column;
.content_box_header_text {
font-size: 36px;
font-family: MicrosoftYaHei;
@ -84,7 +84,8 @@
position: relative;
z-index: 99;
justify-content: space-between;
margin-top: 100px;
margin-top: 10%;
padding: 0 5%;
.content_box_body_btn {

@ -20,7 +20,7 @@
class="content_box_body_search_no"></el-input>
</div>
<div class="content_box_body_table">
<el-table :data="tableData" style="width: 100%;" height="300px">
<el-table :data="tableData" style="width: 100%;" height="47vh">
<el-table-column type="index" label="序号" align="center" width="80">
</el-table-column>
<el-table-column prop="name" label="书名" align="center">

Loading…
Cancel
Save