Compare commits
10 Commits
91c4869a75
...
f6ae181668
| Author | SHA1 | Date |
|---|---|---|
|
|
f6ae181668 | 1 year ago |
|
|
82a37e0d12 | 1 year ago |
|
|
15cbe835dd | 2 years ago |
|
|
d2fa2a223c | 2 years ago |
|
|
2cc1b38e5a | 2 years ago |
|
|
ea2eafde27 | 2 years ago |
|
|
661e0a98bf | 2 years ago |
|
|
f93e575bbf | 2 years ago |
|
|
f5691a90e5 | 2 years ago |
|
|
a6f96ab463 | 2 years ago |
@ -0,0 +1,34 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function index(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/book/index',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function save(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/book/save',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function show(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/book/show',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function destroy(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/book/destroy',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function index(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/cultural-relic2/index',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function store(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/cultural-relic2/store',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function save(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/cultural-relic2/save',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function show(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/cultural-relic2/show',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function destroy(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/cultural-relic2/destroy',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,123 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding: 0 20px">
|
||||||
|
<div ref="lxHeader">
|
||||||
|
<lx-header icon="md-apps" text="党史书籍" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||||
|
<slot>
|
||||||
|
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
||||||
|
<Input v-model="select.name" style="width: 200px;margin-right: 10px;" placeholder="关键字搜索" />
|
||||||
|
<Button type="primary" @click="getBook">查询</Button>
|
||||||
|
<Button icon="ios-add" type="primary" style="margin-left: 10px;" @click="$refs['addBook'].isShow = true,$refs['addBook'].type = 'add'">添加</Button>
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</lx-header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<xy-table
|
||||||
|
:list="list"
|
||||||
|
:total="total"
|
||||||
|
@pageSizeChange="e => select.pageSize = e"
|
||||||
|
@pageIndexChange="pageChange"
|
||||||
|
:table-item="table">
|
||||||
|
<template v-slot:btns>
|
||||||
|
<el-table-column fixed="right" label="操作" width="260" header-align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<Button type="primary" size="small" @click="editorBook(scope.row.id,'editor')">编辑</Button>
|
||||||
|
<Poptip
|
||||||
|
transfer
|
||||||
|
confirm
|
||||||
|
title="确认要删除吗?"
|
||||||
|
@on-ok="deleteActivity(scope.row)">
|
||||||
|
<Button type="primary" style="margin-left: 10px;" size="small" ghost>删除</Button>
|
||||||
|
</Poptip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</xy-table>
|
||||||
|
|
||||||
|
<addBook ref="addBook" @refresh="getBook"></addBook>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {index,destroy} from "@/api/book"
|
||||||
|
|
||||||
|
import addBook from '@/views/book/component/addBook'
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
export default {
|
||||||
|
components:{
|
||||||
|
addBook
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
select:{
|
||||||
|
pageSize:10,
|
||||||
|
pageIndex:1,
|
||||||
|
name:""
|
||||||
|
},
|
||||||
|
total:0,
|
||||||
|
list:[],
|
||||||
|
table:[
|
||||||
|
{
|
||||||
|
label:"名称",
|
||||||
|
prop:'name',
|
||||||
|
align:'left',
|
||||||
|
// width:240,
|
||||||
|
fixed:'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"来源",
|
||||||
|
prop:'from',
|
||||||
|
align:'center',
|
||||||
|
width:100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"发布时间",
|
||||||
|
prop:'datetime',
|
||||||
|
align:'center',
|
||||||
|
width:180,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getBook()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getBook(){
|
||||||
|
const res = await index({
|
||||||
|
page_size:this.select.pageSize,
|
||||||
|
page:this.select.pageIndex,
|
||||||
|
name:this.select.name,
|
||||||
|
sort_name:'datetime',
|
||||||
|
sort_type:"ASC",
|
||||||
|
})
|
||||||
|
this.list = res.data
|
||||||
|
this.total = res.total
|
||||||
|
},
|
||||||
|
|
||||||
|
pageChange(e){
|
||||||
|
this.select.pageIndex = e
|
||||||
|
this.getBook()
|
||||||
|
},
|
||||||
|
deleteActivity(row){
|
||||||
|
destroy({id:row.id}).then(res => {
|
||||||
|
Message({
|
||||||
|
type:'success',
|
||||||
|
message:'删除书籍成功'
|
||||||
|
})
|
||||||
|
this.getBook()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editorBook(id,type){
|
||||||
|
this.$refs['addBook'].id = id
|
||||||
|
this.$refs['addBook'].type = type
|
||||||
|
this.$refs['addBook'].isShow = true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
@ -0,0 +1,142 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding: 0 20px">
|
||||||
|
<div ref="lxHeader">
|
||||||
|
<lx-header icon="md-apps" text="文物馆藏2" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||||
|
<slot>
|
||||||
|
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
||||||
|
<Input v-model="select.name" style="width: 200px;margin-right: 10px;" placeholder="关键字搜索" />
|
||||||
|
<Button type="primary" @click="getRelic">查询</Button>
|
||||||
|
<Button icon="ios-add" type="primary" style="margin-left: 10px;" @click="$refs['addRelic'].isShow = true,$refs['addRelic'].type = 'add'">添加</Button>
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</lx-header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<xy-table
|
||||||
|
:list="list"
|
||||||
|
:total="total"
|
||||||
|
@pageSizeChange="e => select.pageSize = e"
|
||||||
|
@pageIndexChange="pageChange"
|
||||||
|
:table-item="table">
|
||||||
|
<template v-slot:btns>
|
||||||
|
<el-table-column fixed="right" label="操作" width="260" header-align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<Button type="primary" size="small" @click="editorActivity(scope.row.id,'editor')">编辑</Button>
|
||||||
|
<Poptip
|
||||||
|
transfer
|
||||||
|
confirm
|
||||||
|
title="确认要删除吗?"
|
||||||
|
@on-ok="deleteActivity(scope.row)">
|
||||||
|
<Button type="primary" style="margin-left: 10px;" size="small" ghost>删除</Button>
|
||||||
|
</Poptip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</xy-table>
|
||||||
|
|
||||||
|
<addRelic ref="addRelic" @refresh="getRelic"></addRelic>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {index,destroy} from "@/api/relic2"
|
||||||
|
|
||||||
|
import addRelic from '@/views/relic2/component/addRelic'
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
export default {
|
||||||
|
components:{
|
||||||
|
addRelic
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
select:{
|
||||||
|
pageSize:10,
|
||||||
|
pageIndex:1,
|
||||||
|
name:""
|
||||||
|
},
|
||||||
|
total:0,
|
||||||
|
list:[],
|
||||||
|
table:[
|
||||||
|
{
|
||||||
|
label:"名称",
|
||||||
|
prop:'name',
|
||||||
|
align:'left',
|
||||||
|
// width:240,
|
||||||
|
fixed:'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"列表显示",
|
||||||
|
prop:'show_list',
|
||||||
|
align:'center',
|
||||||
|
width:100,
|
||||||
|
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// label:"文物等级",
|
||||||
|
// prop:'grade',
|
||||||
|
// align:'center',
|
||||||
|
// width:100,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label:"文物组成",
|
||||||
|
// prop:'contain',
|
||||||
|
// align:'center',
|
||||||
|
// width:240,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label:"文物年限",
|
||||||
|
// prop:'history_time',
|
||||||
|
// align:'center',
|
||||||
|
// width:120,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
label:"发布时间",
|
||||||
|
prop:'release_time',
|
||||||
|
align:'center',
|
||||||
|
width:180,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getRelic()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getRelic(){
|
||||||
|
const res = await index({
|
||||||
|
page_size:this.select.pageSize,
|
||||||
|
page:this.select.pageIndex,
|
||||||
|
name:this.select.name,
|
||||||
|
sort_name:'release_time',
|
||||||
|
sort_type:"DESC",
|
||||||
|
})
|
||||||
|
this.list = res.data
|
||||||
|
this.total = res.total
|
||||||
|
},
|
||||||
|
|
||||||
|
pageChange(e){
|
||||||
|
this.select.pageIndex = e
|
||||||
|
this.getRelic()
|
||||||
|
},
|
||||||
|
deleteActivity(row){
|
||||||
|
destroy({id:row.id}).then(res => {
|
||||||
|
Message({
|
||||||
|
type:'success',
|
||||||
|
message:'删除文物成功'
|
||||||
|
})
|
||||||
|
this.getRelic()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editorActivity(id,type){
|
||||||
|
this.$refs['addRelic'].id = id
|
||||||
|
this.$refs['addRelic'].type = type
|
||||||
|
this.$refs['addRelic'].isShow = true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
Loading…
Reference in new issue