master
271556543@qq.com 4 years ago
parent 214f7956e4
commit b1de6e8a94

@ -0,0 +1,33 @@
import request from '@/utils/request'
export function index(params){
return request({
method:'get',
url:'/api/admin/strategy/index',
params
})
}
export function store(data){
return request({
method:'post',
url:'/api/admin/strategy/store',
data
})
}
export function save(data){
return request({
method:'post',
url:'/api/admin/strategy/save',
data
})
}
export function destroy(data){
return request({
method:'post',
url:'/api/admin/strategy/destroy',
data
})
}

@ -0,0 +1,33 @@
import request from '@/utils/request'
export function index(params){
return request({
method:'get',
url:'/api/admin/strategy-type/index',
params
})
}
export function store(data){
return request({
method:'post',
url:'/api/admin/strategy-type/store',
data
})
}
export function save(data){
return request({
method:'post',
url:'/api/admin/strategy-type/save',
data
})
}
export function destroy(data){
return request({
method:'post',
url:'/api/admin/strategy-type/destroy',
data
})
}

@ -142,6 +142,7 @@ export default {
powerpaste_word_import: 'clean',
code_dialog_height: 450,
code_dialog_width: 1000,
fontsize_formats: "8px 10px 12px 14px 16px 18px 24px 28px 36px",
advlist_bullet_styles: 'square',
advlist_number_styles: 'default',
imagetools_cors_hosts: ['www.tinymce.com', 'codepen.io'],

@ -1,6 +1,6 @@
// Here is a list of the toolbar
// Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen']
const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen fontsizeselect fontselect']
export default toolbar

@ -0,0 +1,24 @@
<template>
<div style="width: 100%;height: 100%">
<transition name="fade-transform" mode="out-in">
<router-view :key="key" />
</transition>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {
key() {
return this.$route.path
}
}
}
</script>
<style scoped lang="scss">
</style>

@ -1,3 +1,4 @@
import Vue from 'vue'
import {
asyncRoutes,
constantRoutes
@ -60,14 +61,32 @@ const state = {
* 后台查询的菜单数据拼装成路由格式的数据
* @param routes
*/
const pathHandler = (path,id) => {
if(path.includes('#') || path == ''){
return id + '_key'
}
return path
}
const componentHandler = (path) => {
//return path === '#'|| path == '' ? Layout : loadView(path)
if(path === '#' || path === ''){
return Layout
}
if(path.includes('#') && path != '#'){
return ()=>import('@/layout/noLayout')
}
return loadView(path)
}
export function generaMenu(routes, data) {
data.forEach(item => {
if (item.url === "/") {
} else {
const menu = {
path: (item.path === '#'||item.path == '' ? item.id + '_key' : item.path),
component: (item.path === '#'||item.path == '' ? Layout : loadView(item.path)),
path: pathHandler(item.path,item.id),
//(item.path === '#'||item.path == '' ? item.id + '_key' : item.path),
component: componentHandler(item.path),
//(item.path === '#'||item.path == '' ? Layout : loadView(item.path)),
// hidden: true,
children: [],
name: 'menu_' + item.id,

@ -173,6 +173,10 @@ top: 41px !important;
bottom: -11.5px;
}
.el-menu-item.is-active{
color: $primaryColor !important;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
@ -187,3 +191,7 @@ top: 41px !important;
background: #EFF2F9;
}
#nprogress .bar{
background: $primaryColor !important;
}

@ -9,7 +9,7 @@
</div>
<div class="xy-table-item-content">
<el-select clearable placeholder="请选择所属商家" v-model="form.belongsMerchant" style="width: 300px;">
<el-option v-for="item in merchants" :key="item.value" :value="item.value" :label="item.label"></el-option>
<el-option v-for="item in merchants" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</div>
</div>
@ -93,30 +93,32 @@
</div>
</div>
</template>
<template v-slot:extraFormBottom>
<template v-slot:state>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否启用
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.state"></el-switch>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {index as merchantIndex} from '@/api/merchant'
import {show,save,store} from '@/api/shop'
import { Message } from 'element-ui'
export default {
data() {
return {
merchants:[
{
value:1,
label:'测试商户1'
},
{
value:2,
label:'测试商户2'
},
],
//
merchants:[],
merchantSelect:{
pageIndex:1,
pageSize:10
},
type:'add',
id:null,
@ -128,6 +130,7 @@ export default {
password:'',
contact:'',
contactNumber:'',
state:true,
address:'',
lng:'',//
lat:'',//
@ -180,6 +183,13 @@ export default {
}
},
methods: {
async getMerchants(){
const res = await merchantIndex({
page_size:99999
})
this.merchants = res.data
},
submit(){
if(this.type === 'add'){
store({
@ -214,7 +224,7 @@ export default {
phone:this.form.contactNumber,
longitude:this.form.lng,
latitude:this.form.lat,
state:1
state:this.form.state ? 1 : 0
}).then(res => {
Message({
type:'success',
@ -237,6 +247,7 @@ export default {
},
async isShow(newVal){
if(newVal){
await this.getMerchants()
if(this.type === 'editor'){
const res = await show({id:this.id})
this.form.address = res.address
@ -247,6 +258,7 @@ export default {
this.form.belongsMerchant = res.merchant_id
this.form.lat = res.latitude
this.form.lng = res.longitude
this.form.state = res.state == 1 ? true : false
}
}else{
this.$refs['dialog'].reset()

@ -71,17 +71,24 @@ export default {
{
prop:'state',
label:'状态',
width: 120
width: 120,
customFn:(row)=>{
if(row.state == 1 || row.state == 'active'){
return (<div style={{'color':'green'}}>启用</div>)
}else{
return (<div style={{'color':'red'}}>禁用</div>)
}
}
},
{
label:'是否为主营门店',
prop:'is_default',
width: 150,
formatter:(row, column, cellValue)=>{
if(cellValue){
return '是'
customFn:(row)=>{
if(row.is_default == 1){
return (<div style={{'color':'green'}}></div>)
}else{
return '否'
return (<div style={{'color':'red'}}></div>)
}
}
}

@ -1,7 +1,25 @@
<template>
<div>
<xy-dialog :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增政策' : '编辑政策'" :form="form" :rules="rules">
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '新增政策' : '编辑政策'" :form="form" :rules="rules">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" placeholder="请输入名称" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:items>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>政策
</div>
<div class="xy-table-item-content">
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
@ -16,14 +34,27 @@ export default {
form:{
name:'',
items:[]
},
rules:{
}
}
},
methods: {}
methods: {
},
watch:{
isShow(newVal){
if(newVal){
}else{
this.id = ''
this.type = ''
this.$refs['dialog'].reset()
}
}
}
}
</script>

@ -0,0 +1,242 @@
<template>
<div>
<xy-dialog :width="70" ref="dialog" type="form" :is-show.sync="isShow" :title="type === 'add' ? '新增攻略' : '编辑攻略'" :form="form" :rules="rules" @submit="submit">
<template v-slot:title>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>标题
</div>
<div class="xy-table-item-content">
<el-input v-model="form.title" placeholder="请填写标题" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:subheading>
<div class="xy-table-item">
<div class="xy-table-item-label">
副标题
</div>
<div class="xy-table-item-content">
<el-input v-model="form.subheading" placeholder="请填写副标题" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:strategyTypeId>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>栏目
</div>
<div class="xy-table-item-content">
<el-select v-model="form.strategyTypeId" placeholder="请选择栏目">
<el-option v-for="item in strategyTypes" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:state>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否启用
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.state"></el-switch>
</div>
</div>
</template>
<template v-slot:content>
<div class="xy-table-item">
<div class="xy-table-item-label">
内容
</div>
<div class="xy-table-item-content">
<tinymce ref="tinymce" :height="200" v-model="form.content" id='tinymce'></tinymce>
</div>
</div>
</template>
<template v-slot:coverPicture>
<div class="xy-table-item">
<div class="xy-table-item-label">
封面图
</div>
<div class="xy-table-item-content">
<div v-if="form.coverPicture" style="position: relative;">
<img :src="form.coverPicture" class="avatar">
<Button
shape="circle"
icon="md-close"
type="error"
size="small"
class="img__delete"
@click="form.coverPicture = ''"></Button>
</div>
<el-upload
v-else
accept="picture"
:limit="1"
class="avatar-uploader"
list-type="picture-card"
:action="action"
:show-file-list="true"
:on-error="uploadFail"
:on-success="uploadSuccess"
:before-upload="uploadBefore">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
</div>
</template>
<template v-slot:sortNumber>
<div class="xy-table-item">
<div class="xy-table-item-label">
排序
</div>
<div class="xy-table-item-content">
<el-input-number :controls="false" :min="0" :precision="0" v-model="form.sortNumber" placeholder="请填写排序" clearable style="width: 300px;"></el-input-number>
</div>
</div>
</template>
<template v-slot:label>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>标签
</div>
<div class="xy-table-item-content">
<el-select multiple v-model="form.label" placeholder="请选择标签">
<el-option v-for="item in labels" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {index as typeIndex} from "@/api/strategyType"
import {getparameter} from '@/api/system/dictionary'
import tinymce from "@/components/Tinymce"
import { Message } from 'element-ui'
export default {
components:{
tinymce
},
data() {
return {
isShow:false,
type:'',
id:'',
action:`${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
labels:[],
strategyTypes:[],
form:{
title:'',
subheading:'',
strategyTypeId:'',
state:true,
content:'',
coverPicture:'',
sortNumber:0,
label:''
},
rules:{
title:[
{required:true,message:'请填写标题'}
],
strategyTypeId:[
{required:true,message:'请选择类型'}
]
}
}
},
methods: {
//
uploadFail(err){
console.log(err)
},
uploadSuccess(response){
console.log(response)
this.form.coverPicture = response.url
},
uploadBefore(file){
if((file.size/1000) > 2024){
Message({
type:'warning',
message:'上传图片大小超过2M'
})
return false
}
},
async getLabel(){
const res = await getparameter({number:'strategyLabel'})
this.labels = res.detail
},
async getStrategyTypes(){
const res = await typeIndex()
this.strategyTypes = res.rows
console.log(this.strategyTypes)
},
submit(){
if(this.type === 'add'){
console.log(this.form)
}
}
},
watch:{
isShow(newVal){
if(newVal){
this.getStrategyTypes()
this.getLabel()
}else{
this.id = ''
this.type = ''
this.$refs['tinymce'].setContent(' ')
this.$refs['dialog'].reset()
}
}
}
}
</script>
<style scoped lang="scss">
</style>
<style>
.avatar-uploader .el-upload {
width: 120px;
height: 120px;
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
}
.avatar-uploader .el-upload:hover {
border-color: #BF617C;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 120px;
height: 120px;
line-height: 120px;
text-align: center;
}
.avatar {
width: 120px;
display: block;
border-radius: 6px;
}
.img__delete{
transform: scale(0.7,0.7);
position: absolute;
top: 1px;
left: 4%;
}
</style>

@ -0,0 +1,195 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" :title="type === 'add' ? '新增攻略分类' : '编辑攻略分类'" type="form" :form="form" :rules="rules" @submit="submit">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>分类名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" placeholder="请填写分类名称" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:icon>
<div class="xy-table-item">
<div class="xy-table-item-label">
图标
</div>
<div class="xy-table-item-content">
<div v-if="form.icon" style="position: relative;">
<img :src="form.icon" class="avatar">
<Button
shape="circle"
icon="md-close"
type="error"
size="small"
class="img__delete"
@click="form.icon = ''"></Button>
</div>
<el-upload
v-else
accept="picture"
:limit="1"
class="avatar-uploader"
list-type="picture-card"
:action="action"
:show-file-list="true"
:on-error="uploadFail"
:on-success="uploadSuccess"
:before-upload="uploadBefore">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
</div>
</template>
<template v-slot:state>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否启用
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.state"></el-switch>
</div>
</div>
</template>
<template v-slot:sortNumber>
<div class="xy-table-item">
<div class="xy-table-item-label">
排序
</div>
<div class="xy-table-item-content">
<el-input-number placeholder="请输入排序" v-model="form.sortNumber" :controls="false" :precision="0" :min="0" style="width: 100px;"></el-input-number>
</div>
</div>
</template>
<template v-slot:remark>
<div class="xy-table-item">
<div class="xy-table-item-label">
备注
</div>
<div class="xy-table-item-content">
<el-input placeholder="请输入备注" v-model="form.remark" :autosize="{'minRows':2}" style="width: 300px;"></el-input>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {store} from '@/api/strategyType'
import { Message } from 'element-ui'
export default {
data() {
return {
isShow:false,
type:'',
action:`${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
form:{
name:'',
icon:'',
state:true,
sortNumber:0,
remark:''
},
rules:{
name:[
{required:true,message:'请填写分类名称'}
]
}
}
},
methods: {
//
uploadFail(err){
console.log(err)
},
uploadSuccess(response){
console.log(response)
this.form.icon = response.url
},
uploadBefore(file){
if((file.size/1000) > 2024){
Message({
type:'warning',
message:'上传图片大小超过2M'
})
return false
}
},
submit(){
if(this.type === 'add'){
store({
name:this.form.name,
icon:this.form.icon,
state:this.form.state ? 1 : 0,
sort_number:this.form.sortNumber
}).then(res => {
Message({
type:'success',
message:'添加分类成功'
})
this.isShow = false
this.$emit('refresh')
})
}
}
},
watch:{
isShow(newVal){
if(newVal){
}else{
this.id = ''
this.type = ''
this.$refs['dialog'].reset()
}
}
}
}
</script>
<style scoped lang="scss">
</style>
<style>
.avatar-uploader .el-upload {
width: 110px;
height: 110px;
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
}
.avatar-uploader .el-upload:hover {
border-color: #BF617C;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 110px;
height: 110px;
line-height: 110px;
text-align: center;
}
.avatar {
width: 110px;
display: block;
border-radius: 6px;
}
.img__delete{
transform: scale(0.7,0.7);
position: absolute;
top: 1px;
left: 4%;
}
</style>

@ -1,6 +1,6 @@
<template>
<div>
<Modal loading title="产品组合" :value.sync="isShow" @on-visible-change="$emit('update:isShow',$event)" @on-ok="submit" @on-cancel="reset">
<Modal :width="62" loading title="产品组合" :value.sync="isShow" @on-visible-change="$emit('update:isShow',$event)" @on-ok="submit" @on-cancel="reset">
<Form :model="form" ref="form">
<FormItem
prop="products"
@ -8,19 +8,22 @@
:key="index"
:label="'产品'+item.index">
<Row>
<Col span="7" offset="1">
<Col span="6" offset="1">
<Select type="text" v-model="item.value" placeholder="选择产品">
<Option v-for="pro in products" :key="pro.id" :value="pro.id">{{pro.name}}</Option>
</Select>
</Col>
<Col span="5" offset="1">
<InputNumber :min="0" v-model="item.num"></InputNumber>
<Col span="3" offset="1">
<InputNumber :min="0" v-model="item.num" placeholder="数量"></InputNumber>
</Col>
<Col span="4">
<Col span="3" offset="1" >
<Input type="text" v-model="item.unit" placeholder="单位"></Input>
</Col>
<Col span="4" offset="1">
<Button icon="md-remove" type="primary" @click="removeProduct(item.index)"></Button>
<Col span="3" offset="1">
<InputNumber :precision="2" type="text" v-model="item.price" placeholder="价格"></InputNumber>
</Col>
<Col span="3" offset="1">
<Button icon="md-remove" type="primary" @click="removeProduct(item.index,item.id)"></Button>
</Col>
</Row>
</FormItem>
@ -33,7 +36,8 @@
</template>
<script>
import {getItems,getProductTypes,saveItems} from "@/api/package"
import {getItems,getProductTypes,saveItems,deleteItems} from "@/api/package"
import { Message } from 'element-ui'
export default {
props:{
isShow:{
@ -52,19 +56,37 @@ export default {
}
},
methods: {
removeProduct(index){
this.form.products.map((item,index1)=>{
if(index == item.index){
this.form.products.splice(index1,1)
}
})
removeProduct(index,id){
console.log(index,id)
if(id){
deleteItems({
deleting_ids:[{id}]
}).then(res => {
Message({
type:'success',
message:'移除产品成功'
})
this.form.products.map((item,index1)=>{
if(index == item.index){
this.form.products.splice(index1,1)
}
})
})
}else{
this.form.products.map((item,index1)=>{
if(index == item.index){
this.form.products.splice(index1,1)
}
})
}
},
addProduct(){
this.form.products.push({
value:"",
index:++this.productIndex,
num:0,
unit:""
num:null,
unit:"",
price:null
})
},
reset(){
@ -78,17 +100,32 @@ export default {
const res = await getProductTypes()
this.products = res
},
async getItems(){
const res = await getItems({id:this.id})
console.log(res)
this.form.products = []
const res = await getItems({package_id:this.id})
this.form.products.push(...(res.map(item => {
return {
value:item.product_type_id,
index:++this.productIndex,
num:item.num,
unit:item.unit,
price:Number(item.price)
}
})))
},
submit(){
console.log(this.form)
saveItems({
save_rows:this.form.products.map(item => {
return `${this.id},${item.unit},${item.num},${item.value}`
}).toString()
return {package_id:this.id,unit:item.unit,num:item.num,product_type_id:item.value,price:item.price}
})
}).then(res => {
Message({
type:'success',
message:'产品组合更改完成'
})
this.$emit('update:isShow',false)
})
}
},

@ -13,14 +13,21 @@
</lx-header>
</div>
<xy-table :total="total" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange" :list="list" :table-item="table"></xy-table>
<xy-table
:total="total"
@pageSizeChange="e => select.pageSize = e"
@pageIndexChange="pageChange"
:list="list"
:table-item="table"
@editor="editor"
@delete="deletePolicy"></xy-table>
<addPolicy ref="addPolicy"></addPolicy>
</div>
</template>
<script>
import {index} from "@/api/policy"
import {index,destroy} from "@/api/policy"
import addPolicy from "./components/addPolicy"
export default {
@ -84,6 +91,15 @@ export default {
pageChange(e){
this.select.page = e
this.getPolicies()
},
editor(row){
this.$refs['addPolicy'].type = 'editor'
this.$refs['addPolicy'].id = row.id
this.$refs['addPolicy'].isShow = true
},
deletePolicy(row){
}
},
mounted() {

@ -0,0 +1,72 @@
<template>
<div style="padding: 0 20px;">
<div ref="lxHeader">
<lx-header icon="md-apps" text="攻略信息管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model="select.keywords" placeholder="关键字搜索" />
<Button type="primary">查询</Button>
<Button type="primary" style="margin-left: 10px" @click="$refs['addStrategy'].type = 'add',$refs['addStrategy'].isShow = true">新增</Button>
</div>
</slot>
</lx-header>
</div>
<xy-table
:total="total"
:list="list"
:table-item="table"
@pageSizeChange="e => select.pageSize = e"
@pageIndexChange="pageChange"></xy-table>
<addStrategy ref="addStrategy"></addStrategy>
</div>
</template>
<script>
import {index} from '@/api/strategy'
import addStrategy from './components/addStrategy'
export default {
components:{
addStrategy
},
data() {
return {
select:{
pageIndex:1,
pageSize:10,
keywords:'',
},
total:0,
list:[],
table:[
]
}
},
methods: {
async getStrategies(){
const res = await index({
page:this.select.pageIndex,
page_size:this.select.pageSize,
keyword:this.select.keywords
})
console.log(res)
},
pageChange(e){
this.select.pageIndex = e
}
},
mounted() {
this.getStrategies()
}
}
</script>
<style scoped lang="scss">
</style>

@ -0,0 +1,71 @@
<template>
<div style="padding: 0 20px;">
<div ref="lxHeader">
<lx-header icon="md-apps" text="攻略分类管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model="select.keywords" placeholder="关键字搜索" />
<Button type="primary">查询</Button>
<Button type="primary" style="margin-left: 10px" @click="$refs['addStrategyType'].type = 'add',$refs['addStrategyType'].isShow = true">新增</Button>
</div>
</slot>
</lx-header>
</div>
<xy-table
:total="total"
:list="list"
:table-item="table"
@pageIndexChange="pageChange"
@pageSizeChange="e => select.pageSize = e"></xy-table>
<addStrategyType ref="addStrategyType" @refresh="getTypes"></addStrategyType>
</div>
</template>
<script>
import {index} from "@/api/strategyType"
import addStrategyType from '@/views/productService/components/addStrategyType'
export default {
components:{
addStrategyType
},
data() {
return {
select:{
pageIndex:1,
pageSize:10,
name:''
},
total:0,
list:[],
table:[],
}
},
methods: {
async getTypes(){
const res = await index({
page:this.select.pageIndex,
page_size:this.select.pageSize,
name:this.select.name
})
console.log(res)
},
pageChange(e){
this.select.pageSize = e
this.getTypes()
}
},
mounted() {
this.getTypes()
}
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save