提交 2fa4c1cf authored 作者: 翟畅's avatar 翟畅

zc测试地址调试新需求

上级 bc50a405
......@@ -3,8 +3,8 @@ ENV = 'development'
# base api
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'https://www.class.com.cn'
# VUE_APP_BASE_API = 'http://test24.zhongdianyun.com:8096'
# VUE_APP_BASE_API = 'https://www.class.com.cn'
VUE_APP_BASE_API = 'http://test23.zhongdianyun.com:8196'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
......
......@@ -3,6 +3,6 @@ ENV = 'production'
# base api
# VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = 'https://www.class.com.cn'
# VUE_APP_BASE_API = 'http://test24.zhongdianyun.com:8096'
# VUE_APP_BASE_API = 'https://www.class.com.cn'
VUE_APP_BASE_API = 'http://test23.zhongdianyun.com:8196'
......@@ -9,6 +9,14 @@ export function newExchangeAPI(data) { //批量创建防伪码
})
}
export function batchDeleteCodeAPI(data) { //批量删除
return request({
url: `${requestPath.resource}/physical-conversion-code/update/cancel`,
method: 'post',
data
})
}
export function abandonExchangeAPI(data) { //批量废弃/激活防伪码
return request({
url: `${requestPath.resource}/physical-conversion-code/update/put`,
......@@ -17,7 +25,6 @@ export function abandonExchangeAPI(data) { //批量废弃/激活防伪码
})
}
export function getExchangeAPI(params) { //分页查询
return request({
url: `${requestPath.resource}/physical-conversion-code/page`,
......@@ -25,6 +32,7 @@ export function getExchangeAPI(params) { //分页查询
params
})
}
export function exportExchangeAPI(params) { //导出防伪码
return request({
url: `${requestPath.resource}/physical-conversion-code/export`,
......@@ -32,10 +40,27 @@ export function exportExchangeAPI(params) { //导出防伪码
params
})
}
export function ipExchangeAPI(params) { //查看防伪码绑定IP
return request({
url: `${requestPath.resource}/physical-conversion-code/get/ip`,
method: 'get',
params
})
}
export function codeRelationBookAPI(data) { //明码关联图书
return request({
url: `${requestPath.resource}/physical-conversion-code/codeRelationBook`,
method: 'post',
data
})
}
export function cancelRelationBookAPI(data) { //批量取消关联图书
return request({
url: `${requestPath.resource}/physical-conversion-code/update/cancel`,
method: 'post',
data
})
}
\ No newline at end of file
<template>
<div>
<el-dialog :title="dia_title" class="fixHeight" :visible.sync="openDialog" width="60%" :before-close="cancel" @close="emptyResource" :close-on-click-modal="false">
<el-form inline :model="listQuery">
<el-form-item v-for="item in searchBox" :key="item.name">
<el-input v-model="listQuery[item.name]" @keyup.enter.native="getList(1)"
:placeholder="item.placeholder" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList(1)" icon="el-icon-search">检索</el-button>
</el-form-item>
</el-form>
<div style="height:400px;overflow:auto;">
<el-table ref="multipleTable" class="single-select-table" :data="dataList" highlight-current-row tooltip-effect="dark" @select="selectionChange">
<el-table-column type="selection" ref="selectionCheckbox"></el-table-column>
<el-table-column prop="name" label="资源名称" min-width="17%" show-overflow-tooltip></el-table-column>
<el-table-column prop="isbn" min-width="10%" label="isbn" align="center"></el-table-column>
</el-table>
</div>
<!-- 分页以及底部按钮-->
<div class="box_pagination">
<el-pagination
@size-change="sizeChange"
@current-change="currentChange"
:current-page="listQuery.pageNum"
:page-sizes="[30, 50, 100, 200]"
:page-size="listQuery.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
<div class="dialog_footer">
<el-button @click="cancel">取消</el-button>
<el-button @click="dataSubmit" type="primary" :disabled="sending" :loading="sending">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { authorSaveRecAPI } from '@/api/resource/author'
import { getBookRelationListAPI, } from '@/api/common'
import { getSelectionIds } from '@/filters/getIds'
export default {
data() {
return {
dia_title:'关联图书',
dataList: [],
chooiceList: [],
searchBox:[{name:'name',placeholder:'请输入资源名称'}],
listQuery:{
pageSize: 50,
pageNum:1,
},
openDialog:false,
total: null,
sending: false,
}
},
props:['showDialog'],
watch:{
showDialog(val){
this.openDialog = val
this.getList(1)
}
},
methods: {
emptyResource(){
this.listQuery={
pageNum: 1,
pageSize: 50,
}
},
getList(num) {
this.listQuery.pageNum = num ? num : this.listQuery.pageNum
this.chooiceList = ""
getBookRelationListAPI(this.listQuery).then(res =>{//列表
if (res.data.code === 0) {
this.dataList = res.data.data?res.data.data.list:[]
this.total = res.data.data?res.data.data.total:0
} else {
this.$message.error('数据加载失败');
}
})
},
selectionChange(val,row) {//勾选table
// this.chooiceList = val
if (val.length > 1) {
this.$refs.multipleTable.clearSelection()
this.$refs.multipleTable.toggleRowSelection(row,true)
this.chooiceList = [val.pop()]
}else{
this.chooiceList = val
}
},
dataSubmit() { //添加按钮
this.sending = true
if(this.chooiceList&&this.chooiceList.length){//至少选中一条
this.$emit('saveContent',this.chooiceList)
this.$emit('close')
} else {
this.$message.warning('至少选择一条数据进行操作');
this.sending = false
}
},
sizeChange(val){
this.listQuery.pageSize = val
this.getList()
},
currentChange(val) {
this.listQuery.pageNum = val
this.getList()
},
cancel(){
this.$emit('close')
}
},
}
</script>
<style scoped lang="scss">
.dialog_footer{
width: 200px;
margin: 20px auto;
display: flex;
justify-content: space-between;
}
.bottom_check{
float: left;
height: 28px;
line-height: 28px;
padding: 2px 5px;
font-size: 13px;
}
.box_pagination{
min-height: 52px;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
}
/deep/ .single-select-table .el-table__header-wrapper .el-table-column--selection .cell{
display: none;
}
</style>
\ No newline at end of file
......@@ -43,6 +43,7 @@ import marketManageRouter from './modules/marketingManage'
import platformRouter from './modules/platform'
import memberRouter from './modules/member'
import qrcodeRouter from './modules/qrcode'
import securityCodeRouter from './modules/securityCode'
/**
* Note: sub-menu only appear when route children.length >= 1
......@@ -119,6 +120,8 @@ export const constantRoutes = [
memberRouter,
//二维码管理
qrcodeRouter,
//防伪码管理
securityCodeRouter,
// 数据
{
path: '/datas',
......
import Layout from '@/layout'
const securityCodeRouter = {
path: '/security_code_manage',
component: Layout,
redirect: '/security_code_manage/security_code',
name: 'security_code',
meta: {
title: '防伪码管理',
icon: 'folder'
},
children: [
{
path: 'security_code',
component: () => import('@/views/security_code_manage/security_code/index'),
name: 'security_code',
meta: {
title: '防伪码管理',
},
}
]
}
export default securityCodeRouter
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论