master
lion 6 months ago
parent 7d2cc2cd36
commit aa341e69e7

@ -0,0 +1,61 @@
import request from "@/utils/request";
function customParamsSerializer(params) {
let result = '';
for (let key in params) {
if (params.hasOwnProperty(key)) {
if (Array.isArray(params[key])) {
params[key].forEach((item,index) => {
if(item.key){
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
}else{
result +=`${key}[${index}]=${item}&`
}
});
} else {
result += `${key}=${params[key]}&`;
}
}
}
return result.slice(0, -1);
}
export function index(params,isLoading = false) {
return request({
method: "get",
url: "/api/admin/family/index",
params,
paramsSerializer: customParamsSerializer,
isLoading
})
}
export function show(params, isLoading = true) {
return request({
method: "get",
url: "/api/admin/family/show",
params,
isLoading
})
}
export function save(data) {
return request({
method: "post",
url: "/api/admin/family/save",
data
})
}
export function destroy(params) {
return request({
method: "get",
url: "/api/admin/family/destroy",
params
})
}

@ -8,6 +8,13 @@
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="Name"></el-input>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index"
:label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -24,13 +31,14 @@
</lx-header>
</div>
</div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item">
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="Operate" width="180" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editCategory('editor',scope.row.id)">edit</el-button>
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="Are you sure to delete it?">
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px"
@confirm="deleteList(scope.row.id)" title="Are you sure to delete it?">
<el-button type="danger" size="small" slot="reference">delete</el-button>
</el-popconfirm>
</template>
@ -43,9 +51,9 @@
<script>
import addCategory from './components/addCategory.vue';
import {
index,
destroy
import {
index,
destroy
} from "@/api/application/category.js"
export default {
components: {
@ -54,29 +62,39 @@
data() {
return {
select: {
name: '',
name: '',
is_visible:'',
page: 1,
page_size: 10,
sort_name:'sort',
sort_type:'ASC'
page_size: 10,
sort_name: 'sort',
sort_type: 'ASC'
},
total: 0,
list: [],
table_item: [{
type: 'index',
width: 50,
fixed: 'left'
}, {
prop: 'name',
label: 'Name',
align: 'left',
}, {
prop: 'sort',
label: 'Sort',
align: 'left',
width: 100,
type: 'index',
width: 50,
fixed: 'left'
}, {
prop: 'name',
label: 'Name',
align: 'left',
}, {
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text: true,
text_prop: 'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
]
}, {
prop: 'sort',
label: 'Sort',
align: 'left',
width: 100,
}]
}
},
@ -87,7 +105,7 @@
editCategory(type, id) {
if (type == 'editor') {
this.$refs.addCategory.id = id
}
}
this.$refs.addCategory.type = type
this.$refs.addCategory.isShow = true
},
@ -102,25 +120,30 @@
},
resetSearch() {
this.select.page = 1
this.select.name = ''
this.select.name = ''
this.select.is_visible = ''
this.getList()
},
async getList() {
const res = await index({
...this.select,
filter:[{
key:'name',
op:'like',
value:this.select.name
}]
async getList() {
const res = await index({
...this.select,
filter: [{
key: 'name',
op: 'like',
value: this.select.name
},{
key: 'is_visible',
op: 'eq',
value: this.select.is_visible
}]
})
this.list = res.data
this.total = res.total
},
deleteList(id) {
var that = this;
destroy({
id:id
destroy({
id: id
}).then(response => {
this.$Message.success('Success');
this.getList()

@ -48,7 +48,7 @@
</div>
</div>
</template>
<!-- <template v-slot:is_top>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
@ -61,11 +61,23 @@
</el-select>
</div>
</div>
</template> -->
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in visibelList" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:time>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.time" style="width:100%" format="yyyy-MM-dd HH:mm:ss"
@ -252,13 +264,21 @@
prop: 'value',
label: 'value',
width: 340
}],
visibelList: [{
id: 1,
value: 'Yes'
}, {
id: 0,
value: 'No'
}],
form: {
application_type_id: [],
category_id: [],
number: '',
title: "",
// is_top:0,
is_top:0,
is_visible:1,
time:'',
keywords:'',
separation: [],
@ -374,6 +394,8 @@
this.form.separation = res.separation?res.separation:[]
this.form.branch = res.branch?res.branch:[]
this.form.topic = res.topic?res.topic:[]
this.form.is_visible = res.is_visible?res.is_visible:0
this.form.is_top = res.is_top?res.is_top:0
this.form.equipment = res.equipment?res.equipment:[],
this.form.time = res.time ? res.time : this.$moment().format('YYYY-MM-DD HH:mm:ss')
if (res.files && res.files.length > 0) {
@ -407,7 +429,9 @@
category_id: [],
number: '',
title: "",
// is_top:0,
is_visible:1,
time:'',
is_top:0,
keywords:'',
separation: [],
branch: [],

@ -8,9 +8,23 @@
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.title" placeholder="Title"></el-input>
</div>
<div>
<el-input v-model="select.number" placeholder="Application Id"></el-input>
</div>
<div>
<el-input v-model="select.number" placeholder="Application Id"></el-input>
<el-select style="width:100%" clearable v-model="select.is_top" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index"
:label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index"
:label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -27,13 +41,14 @@
</lx-header>
</div>
</div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item">
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="Operate" width="180" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editNote('editor',scope.row.id)">edit</el-button>
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="Are you sure to delete it?">
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px"
@confirm="deleteList(scope.row.id)" title="Are you sure to delete it?">
<el-button type="danger" size="small" slot="reference">delete</el-button>
</el-popconfirm>
</template>
@ -46,12 +61,12 @@
<script>
import addNotes from './components/addNotes.vue';
import {
index,
destroy
} from "@/api/application/index.js"
import {
index as getCategory
import {
index,
destroy
} from "@/api/application/index.js"
import {
index as getCategory
} from "@/api/application/category.js"
export default {
components: {
@ -60,38 +75,59 @@
data() {
return {
select: {
title: '',
number:'',
title: '',
number: '',
is_top:'',
is_visible: '',
page: 1,
page_size: 10,
},
appCategoryList:[],
},
appCategoryList: [],
total: 0,
list: [],
table_item: [{
type: 'index',
width: 50,
fixed: 'left'
}, {
prop: 'number',
label: 'Application Id',
align: 'left',
width:360
}, {
prop: 'title',
label: 'Title',
align: 'left',
},{
prop: 'time',
label: 'Release Time',
align: 'center',
width: 180,
type: 'index',
width: 50,
fixed: 'left'
}, {
prop: 'number',
label: 'Application Id',
align: 'left',
width: 360
}, {
prop: 'title',
label: 'Title',
align: 'left',
}, {
prop: 'is_top',
label: 'Top',
align: 'center',
width: 120,
is_text: true,
text_prop: 'is_top_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text: true,
text_prop: 'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
]
}, {
prop: 'time',
label: 'Sort Time',
align: 'center',
width: 180,
}]
}
},
created() {
created() {
this.getCategoryList()
this.getList()
},
@ -99,8 +135,8 @@
editNote(type, id) {
if (type == 'editor') {
this.$refs.addNotes.id = id
}
this.$refs.addNotes.appCategoryList = this.appCategoryList
}
this.$refs.addNotes.appCategoryList = this.appCategoryList
this.$refs.addNotes.type = type
this.$refs.addNotes.isShow = true
},
@ -115,37 +151,50 @@
},
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.title = ''
this.select.number = ''
this.select.is_visible = ''
this.select.is_top = ''
this.getList()
},
async getList() {
const res = await index({
...this.select,
sort_name:'time',
sort_type:'desc',
filter:[{
key:'title',
op:'like',
value:this.select.title
},{
key:'number',
op:'like',
value:this.select.number
}]
async getList() {
const res = await index({
...this.select,
sort_name: 'time',
sort_type: 'desc',
filter: [{
key: 'title',
op: 'like',
value: this.select.title
}, {
key: 'number',
op: 'like',
value: this.select.number
}, {
key: 'is_visible',
op: 'eq',
value: this.select.is_visible
}, {
key: 'is_top',
op: 'eq',
value: this.select.is_top
}]
})
this.list = res.data
this.total = res.total
},
async getCategoryList(){
const res = await getCategory({page:1,page_size:999})
this.appCategoryList = res.data
},
async getCategoryList() {
const res = await getCategory({
page: 1,
page_size: 999
})
this.appCategoryList = res.data
},
deleteList(id) {
var that = this;
destroy({
id:id
destroy({
id: id
}).then(response => {
this.$Message.success('Success');
this.getList()

@ -155,7 +155,27 @@
'Subtotal':'[subtotal]',
'Tax':'[tax]',
'Total':'[total]'
}
},
'contact_tech_support_email':{
'Customer Name':'[name]',
'Customer Email':'[email]',
'Customer Message':'[question]'
},
'contact_service_email':{
'Name':'[name]',
'Email':'[email]',
'Message':'[question]'
},
'contact_other_email':{
'Name':'[name]',
'Email':'[email]',
'Message':'[question]'
},
'contact_quote_email':{
'Name':'[name]',
'Email':'[email]',
'Message':'[question]'
},
},
showWang: false,

@ -9,6 +9,13 @@
<div>
<el-input v-model="select.name" placeholder="Name"></el-input>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index"
:label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
</div>
@ -60,6 +67,7 @@
return {
select: {
name: '',
is_visible: '',
type: 1,
page: 1,
page_size: 10,
@ -75,8 +83,18 @@
label: 'Name',
align: 'left',
}, {
prop: 'time',
label: 'Release Time',
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text: true,
text_prop: 'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'sort',
label: 'Sort',
align: 'center',
width: 180,
}]
@ -109,16 +127,18 @@
page_size: this.select.page_size,
page: this.select.page,
type: this.select.type,
sort_name:'time',
sort_type:'desc',
name: this.select.name
sort_name: 'sort',
sort_type: 'asc',
name: this.select.name,
is_visible:this.select.is_visible
})
this.list = res.data
this.total = res.total
},
resetSearch() {
this.select.page = 1
this.select.name = ''
this.select.name = ''
this.select.is_visible = ''
this.select.type = 1
this.getList()
},

@ -12,7 +12,7 @@
</div>
</div>
</template>
<!-- <template v-slot:sort>
<template v-slot:sort>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort
@ -22,11 +22,24 @@
style="width: 100%;"></el-input>
</div>
</div>
</template> -->
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.is_visible">
<el-radio :label="1">Yes</el-radio>
<el-radio :label="0">No</el-radio>
</el-radio-group>
</div>
</div>
</template>
<template v-slot:is_jump>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Direct jump or not
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Jump to phase
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_jump"
@ -54,10 +67,10 @@
</div>
</template>
<template v-slot:time>
<!-- <template v-slot:time>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.time" style="width:100%" format="yyyy-MM-dd HH:mm:ss"
@ -65,7 +78,7 @@
</el-date-picker>
</div>
</div>
</template>
</template> -->
<template v-slot:description>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -192,6 +205,7 @@
form: {
name: '',
sort: 0,
is_visible:1,
is_jump:0,
link_phase_id:'',
time: '',
@ -218,8 +232,8 @@
page_size: 999,
page: 1,
type:2,
sort_type: 'desc',
sort_name: 'time',
sort_type: 'asc',
sort_name: 'sort',
})
this.phaseList = res.data
},
@ -315,7 +329,9 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.description = res.description ? res.description : ''
this.form.is_jump = res.is_jump?res.is_jump:0
this.form.is_jump = res.is_jump?res.is_jump:0
this.form.is_visible = res.is_visible?res.is_visible:0
this.form.type = 1
this.form.time = res.time ? res.time : this.$moment().format('YYYY-MM-DD HH:mm:ss')
res.product_category_details.map(item => {
@ -365,6 +381,7 @@
this.form = {
name: '',
sort: 0,
is_visible:1,
is_jump:0,
link_phase_id:'',
time:'',
@ -383,7 +400,6 @@
<style scoped lang="scss">
::v-deep .name,
::v-deep .sort,
::v-deep .product_category_details,
::v-deep .description {
flex-basis: 100%;

@ -0,0 +1,208 @@
<template>
<div>
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title" :form="form"
:rules='rules' @submit="submit">
<template v-slot:title>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Title
</div>
<div class="xy-table-item-content">
<el-input v-model="form.title" placeholder="Please Input" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:sort>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort
</div>
<div class="xy-table-item-content">
<el-input v-model="form.sort" placeholder="Please Input" type="number" clearable
style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.is_visible">
<el-radio :label="1">Yes</el-radio>
<el-radio :label="0">No</el-radio>
</el-radio-group>
</div>
</div>
</template>
<template v-slot:description>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Description
</div>
<div class="xy-table-item-content">
<el-input type="textarea" :rows="5" v-model="form.description"></el-input>
</div>
</div>
</template>
<template v-slot:file_ids>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Poster
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' list-type="picture-card"
accept=".PNG,.jpg,.jpeg,.bmp,.svg" :file-list="pictureList" ref="pictureUpload" :auto-upload="true"
:on-success="handlesuccessP" :on-remove="handleRemoveP">
<i class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
save,
show
} from "@/api/family"
import {
getToken
} from '@/utils/auth'
export default {
components: {
},
data() {
return {
isShow: false,
type: 'add',
id: '',
uploadOther: {
token: ""
},
showWang: false,
action: `${process.env.VUE_APP_UPLOAD_API}`,
pictureList: [],
form: {
title: '',
sort: 0,
is_visible:1,
description: '',
file_ids:[]
},
rules: {
title: [{
required: true,
message: 'Please Input'
}]
}
}
},
created() {
this.uploadOther.token = getToken();
},
methods: {
handleRemoveP(file, fileList) {
this.pictureList = fileList
},
handlesuccessP(response, file, fileList) {
if (response && response.hasOwnProperty('errcode')) {
this.$Message.warning(response.errmsg || '')
this.pictureList = []
return
}
this.pictureList = fileList
},
submit() {
if (this.id) {
this.form.id = this.id
}
if (this.type == 'add') {
this.form.id = ''
}
let p_files = []
if (this.pictureList.length > 0) {
for (var h of this.pictureList) {
if (h.response) {
p_files.push(h.response.id)
} else {
p_files.push(h.id)
}
}
this.form.file_ids = p_files
} else {
this.form.file_ids = []
}
// return
save({
...this.form
}).then(res => {
this.$message({
type: 'success',
message: 'Success'
})
this.isShow = false
this.$emit('refresh')
})
},
getDetail() {
show({
id: this.id,
// show_relation: ['picture'],
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.description = res.description ? res.description : ''
this.form.is_visible = res.is_visible?res.is_visible:0
this.form.sort = res.sort?res.sort:0
if (res.files) {
let _arr = []
res.files.map(item=>{
_arr.push({
name: item.original_name,
id: item.id,
url: item.url
})
})
this.pictureList = _arr
}
})
}
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
}
} else {
this.id = ''
this.type = "add"
this.pictureList = []
this.form = {
title: '',
sort: 0,
is_visible:1,
description: '',
file_ids: '',
}
this.$refs['dialog'].reset()
}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .title,
::v-deep .file_ids,
::v-deep .description {
flex-basis: 100%;
}
</style>

@ -1,7 +1,20 @@
<template>
<div>
<xy-dialog ref="dialog" :width="60" :is-show.sync="isShow" :type="'form'" :title="$route.meta.title" :form="form"
:rules='rules' @submit="submit">
:rules='rules' @submit="submit">
<template v-slot:family_ids>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Family
</div>
<div class="xy-table-item-content">
<el-select multiple style="width:100%" filterable v-model="form.family_ids" placeholder="Please Select">
<el-option v-for="(item,index) in familyList" :key="index" :label="item.title" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:product_category_links_by_sub>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -25,7 +38,7 @@
</div>
</div>
</template>
<!-- <template v-slot:sort>
<template v-slot:sort>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort
@ -35,11 +48,24 @@
style="width: 100%;"></el-input>
</div>
</div>
</template> -->
<template v-slot:time>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.is_visible">
<el-radio :label="1">Yes</el-radio>
<el-radio :label="0">No</el-radio>
</el-radio-group>
</div>
</div>
</template>
<!-- <template v-slot:time>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.time" style="width:100%" format="yyyy-MM-dd HH:mm:ss"
@ -47,7 +73,7 @@
</el-date-picker>
</div>
</div>
</template>
</template> -->
<template v-slot:is_recommend>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -141,7 +167,16 @@
</div>
</div>
</template> -->
<template v-slot:introduction>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Family introduction
</div>
<div class="xy-table-item-content">
<el-input type="textarea" :rows="5" v-model="form.introduction"></el-input>
</div>
</div>
</template>
<template v-slot:description>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -369,7 +404,8 @@
videoPosterList:[],
videoList:[],
downloadsList: [],
applicationsList: [],
applicationsList: [],
familyList:[],
selectList: [],
application_detail_item: [{
type: 'index',
@ -403,17 +439,20 @@
align: 'left',
width: 340
}],
form: {
form: {
family_ids:[],
product_category_links_by_sub: [],
name: '',
time:'',
sort: 0,
sort: 0,
is_visible:1,
is_recommend: 0,
is_sample: 0,
picture_id: '',
picture_id_2:'',
video_image_id:'',
video_id:'',
video_id:'',
introduction:'',
description: '',
product_category_phase: [],
@ -794,15 +833,20 @@
id: this.id,
show_relation: ['productCategoryApplications', 'picture'],
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.description = res.description ? res.description : ''
this.form = this.base.requestToForm(res, this.form)
this.form.family_ids = res.family_ids?res.family_ids:[]
this.form.description = res.description ? res.description : ''
this.form.introduction = res.introduction ? res.introduction : ''
this.form.application_note_desc = res.application_note_desc ? res.application_note_desc : ''
this.form.product_category_phase = res.phase ? res.phase : []
this.form.character = res.character ? res.character : ''
this.form.packing = res.packing ? res.packing : ''
// this.applicationsList = res.product_category_applications
this.form.is_recommend = res.is_recommend ? res.is_recommend : 0
this.form.is_sample = res.is_sample ? res.is_sample : 0
this.form.is_sample = res.is_sample ? res.is_sample : 0
this.form.is_visible = res.is_visible ? res.is_visible : 0
this.form.time = res.time ? res.time : this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.showWang = true
this.showPacking = true
@ -906,19 +950,23 @@
this.applicationsList = []
this.selectList = []
this.pcSubList = []
this.familyList = []
this.showProgress = false
this.uploadProgress = 0
this.form = {
this.form = {
family_ids:[],
product_category_links_by_sub: [],
name: '',
time:'',
sort: 0,
sort: 0,
is_visible:1,
is_recommend: 0,
is_sample: 0,
picture_id: '',
picture_id_2:'',
video_image_id:'',
video_id:'',
video_id:'',
introduction:'',
description: '',
product_category_phase: [],
product_category_details: [],
@ -942,11 +990,13 @@
::v-deep .name,
// ::v-deep .sort,
::v-deep .product_category_applications,
::v-deep .download_ids,
::v-deep .download_ids,
::v-deep .introduction,
::v-deep .description,
::v-deep .application_note_desc,
::v-deep .packing,
::v-deep .character,
::v-deep .character,
::v-deep .family_ids
{
flex-basis: 100%;
}
@ -956,10 +1006,10 @@
flex-basis: 50%;
}
::v-deep .sort,
::v-deep .time,
::v-deep .is_visible,
::v-deep .is_recommend,
::v-deep .is_sample {
flex-basis: 33%;
flex-basis: 50%;
}
::v-deep .el-checkbox__input .el-checkbox__inner {

@ -51,7 +51,7 @@
<template v-slot:time>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.time" style="width:100%" format="yyyy-MM-dd HH:mm:ss"
@ -73,7 +73,7 @@
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top(Whether it is displayed at the very front)
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.is_top">
@ -86,7 +86,7 @@
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Product Visible
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible(Can it be displayed on the website)
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.is_visible">
@ -99,7 +99,7 @@
<template v-slot:is_sell>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Active
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Active(Is it on sale)
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.is_sell">
@ -112,7 +112,7 @@
<template v-slot:show_price>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Price Visible
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Price Visible(Can the price be seen)
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.show_price" @change="changeWeb">

@ -0,0 +1,180 @@
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.title" placeholder="title"></el-input>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index"
:label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="resetSearch">reset</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="editFamily('add')">add</el-button>
</div>
</div>
</div>
</lx-header>
</div>
</div>
<div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' label="Operate" width="180" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editFamily('editor',scope.row.id)">edit</el-button>
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px"
@confirm="deleteList(scope.row.id)" title="Are you sure to delete it?">
<el-button type="danger" size="small" slot="reference">delete</el-button>
</el-popconfirm>
</template>
</el-table-column>
</template>
</xy-table>
</div>
<addFamily ref="addFamily" @refresh="getList"></addFamily>
</div>
</template>
<script>
import addFamily from './components/addFamily.vue';
import {
index,
destroy
} from "@/api/family"
export default {
components: {
addFamily
},
data() {
return {
select: {
title: '',
is_visible: '',
page: 1,
page_size: 10,
},
list: [],
total: 0,
table_item: [{
type: 'index',
align: 'center',
width: 50
}, {
prop: 'title',
label: 'Name',
align: 'left',
}, {
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text: true,
text_prop: 'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'sort',
label: 'Sort',
align: 'center',
width: 180,
}]
}
},
created() {
this.getList()
},
methods: {
editFamily(type, id, pName) {
if (type == 'editor') {
this.$refs.addFamily.id = id
}
this.$refs.addFamily.type = type
this.$refs.addFamily.isShow = true
},
pageIndexChange(e) {
this.select.page = e
this.getList()
},
pageSizeChange(e) {
this.select.page_size = e
this.select.page = 1
this.getList()
},
async getList() {
const res = await index({
page_size: this.select.page_size,
page: this.select.page,
sort_name: 'sort',
sort_type: 'asc',
filter:[{
key:'title',
op:'like',
value:this.select.title
},{
key:'is_visible',
op:'eq',
value:this.select.is_visible
}]
})
this.list = res.data
this.total = res.total
},
resetSearch() {
this.select.page = 1
this.select.is_visible = ''
this.select.title = ''
this.getList()
},
deleteList(id) {
var that = this;
destroy({
id: id
}).then(response => {
this.$Message.success('Success');
this.getList()
}).catch(error => {
console.log(error)
reject(error)
})
},
}
}
</script>
<style lang="scss" scoped>
.searchwrap {
display: flex;
align-items: center;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
span {
min-width: 70px;
}
}
}
</style>

@ -31,7 +31,7 @@
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.show_price" placeholder="Web Visibility">
<el-select style="width:100%" clearable v-model="select.show_price" placeholder="Price Visible">
<el-option v-for="(item,index) in webList" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
@ -225,7 +225,7 @@
},
{
prop: 'time',
label: 'Release Time',
label: 'Sort Time',
align: 'center',
width: 180,
}
@ -360,8 +360,8 @@
page: 1,
page_size: 999,
type: 2,
sort_name: 'time',
sort_type: 'desc'
sort_name: 'sort',
sort_type: 'asc'
})
this.categoryList = res.data
},

@ -9,6 +9,12 @@
<div>
<el-input v-model="select.name" placeholder="Name"></el-input>
</div>
<div>
<el-select clearable style="width:100%" v-model="select.family_id" placeholder="Product Family">
<el-option v-for="item in familyList" :key="item.id" :label="item.title" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select clearable style="width:100%" v-model="select.is_recommend" placeholder="Recommend">
<el-option :key="1" label="Yes" :value="1">
@ -16,6 +22,13 @@
<el-option :key="0" label="No" :value="0">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index"
:label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -36,6 +49,16 @@
<div>
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item">
<template v-slot:family_ids>
<el-table-column align='left' label="Product Family" width="160" header-align="left">
<template slot-scope="scope">
<div v-if="scope.row.family.length>0">
<el-tag style="margin:5px" v-for="item in scope.row.family">{{item.title?item.title:''}}</el-tag>
</div>
<div v-else></div>
</template>
</el-table-column>
</template>
<template v-slot:product_category_links_by_sub>
<el-table-column align='left' label="Product Category" width="360" header-align="left">
<template slot-scope="scope">
@ -69,7 +92,10 @@
import {
index,
destroy
} from "@/api/product/category.js"
} from "@/api/product/category.js"
import {
index as getFamily
} from "@/api/family"
export default {
components: {
addPhase
@ -78,17 +104,25 @@
return {
select: {
name: '',
family_id:'',
is_recommend:'',
is_visible:'',
type:2,
page: 1,
page_size: 10,
},
},
familyList:[],
list: [],
total: 0,
table_item: [{
type: 'index',
align: 'center',
width: 50
}, {
prop: 'family_ids',
label: 'Product Family',
align: 'left',
width:120,
}, {
prop: 'product_category_links_by_sub',
label: 'Product Category',
@ -99,23 +133,53 @@
label: 'Name',
align: 'left',
}, {
prop: 'time',
label: 'Release Time',
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text: true,
text_prop: 'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'is_recommend',
label: 'Recommend',
align: 'center',
width: 120,
is_text: true,
text_prop: 'is_recommend_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'sort',
label: 'Sort',
align: 'center',
width: 180
}]
}
},
created() {
created() {
this.getFamilyList()
this.getList()
},
methods: {
async getFamilyList(){
const res = await getFamily({
page:1,
page_size:999,
sort_name:'sort',
sort_type:'asc'
})
this.familyList = res.data
},
editCategory(type, id, pName) {
if (type == 'editor') {
this.$refs.addPhase.id = id
}
}
this.$refs.addPhase.familyList = this.familyList
this.$refs.addPhase.type = type
this.$refs.addPhase.isShow = true
},
@ -133,11 +197,12 @@
page_size: this.select.page_size,
page: this.select.page,
type:this.select.type,
sort_type: 'desc',
sort_name: 'time',
sort_type: 'asc',
sort_name: 'sort',
name:this.select.name,
is_recommend:this.select.is_recommend
is_recommend:this.select.is_recommend,
is_visible:this.select.is_visible,
family_id:this.select.family_id
})
this.list = res.data
this.total = res.total
@ -146,6 +211,8 @@
this.select.page = 1
this.select.name = ''
this.select.is_recommend = ''
this.select.is_visible=''
this.select.family_id = ''
this.select.type = 2
this.getList()
},

@ -15,6 +15,18 @@
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_top" placeholder="Top">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -69,12 +81,14 @@
category_ids:'',
page: 1,
page_size: 10,
is_top:'',
is_visible:'',
sort_name:"is_top",
sort_type:"DESC",
sort_name2:"date",
sort_type2:"DESC",
},
categoryList: [],
categoryList: [],
total: 0,
list: [],
table_item: [{
@ -94,13 +108,23 @@
prop: 'is_top',
label: 'Top',
align: 'left',
width:180,
width:120,
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text:true,
text_prop:'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'date',
label: 'Release Time',
label: 'Sort Time',
align: 'left',
width:180
},{
@ -148,7 +172,9 @@
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.category_ids = ''
this.select.category_ids = ''
this.select.is_top=''
this.select.is_visible=''
this.getList()
},
async getList() {
@ -163,6 +189,14 @@
key: 'category_ids',
op: 'json_contains',
value: this.select.category_ids
}, {
key: 'is_top',
op: 'eq',
value: this.select.is_top
}, {
key: 'is_visible',
op: 'eq',
value: this.select.is_visible
}]
})
this.list = res.data

@ -24,31 +24,44 @@
<el-input placeholder="Please Input" style="width:100%" v-model="form.title"></el-input>
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_top" placeholder="Please Select">
<el-option v-for="(item,index) in [{name:'No',id:0},{name:'Yes',id:1}]" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Release Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.date" style="width:100%" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" placeholder="Please Select">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_top" placeholder="Please Select">
<el-option v-for="(item,index) in [{name:'No',id:0},{name:'Yes',id:1}]" :key="index" :label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.date" style="width:100%" format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="Please Select">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:type>
<div class="xy-table-item">
@ -71,11 +84,12 @@
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' :limit="1" :file-list="filesList" ref="pictureUpload"
:auto-upload="true" :data="uploadOther" :on-progress="handleProgress" :on-success="handlesuccess" :on-remove="handleRemove">
:auto-upload="true" :data="uploadOther" :on-progress="handleProgress" :on-success="handlesuccess"
:on-remove="handleRemove">
<el-button size="small" type="primary">upload</el-button>
</el-upload>
<el-progress v-if="showProgress" :percentage="uploadProgress"></el-progress>
</el-upload>
<el-progress v-if="showProgress" :percentage="uploadProgress"></el-progress>
</div>
</div>
@ -105,17 +119,18 @@
type: 'add',
uploadOther: {
token: ""
},
showProgress:false,
uploadProgress:0,
},
showProgress: false,
uploadProgress: 0,
action: `${process.env.VUE_APP_UPLOAD_API}`,
filesList: [],
categoryList: [],
form: {
category_ids: '',
title: "",
is_top:0,
date:'',
title: "",
is_top: 0,
is_visible: 1,
date: '',
type: '',
files: []
},
@ -145,10 +160,10 @@
return
}
this.filesList = fileList
},
handleProgress(event, file, fileList) {
this.showProgress = true;
this.uploadProgress = event.percent;
},
handleProgress(event, file, fileList) {
this.showProgress = true;
this.uploadProgress = event.percent;
},
submit() {
@ -156,9 +171,9 @@
this.form.id = this.id
} else {
this.form.id = ''
}
if(this.form.type_parameter_details_id_relation){
delete this.form.type_parameter_details_id_relation
}
if (this.form.type_parameter_details_id_relation) {
delete this.form.type_parameter_details_id_relation
}
let _files = []
if (this.filesList.length > 0) {
@ -194,10 +209,12 @@
table_name: this.table_name,
id: this.id
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.category_ids = res.category_ids?res.category_ids:[]
this.form.is_top = res.is_top?res.is_top:0
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date ? res.date : this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.category_ids = res.category_ids ? res.category_ids : []
this.form.is_top = res.is_top ? res.is_top : 0
this.form.is_visible = res.is_visible ? res.is_visible : 0
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
res.files_details.map(item => {
@ -216,20 +233,21 @@
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
}else{
this.form.date = this.$moment().format('YYYY-MM-DD HH:mm:ss')
} else {
this.form.date = this.$moment().format('YYYY-MM-DD HH:mm:ss')
}
} else {
this.id = ''
this.filesList = []
this.showProgress = false;
this.filesList = []
this.showProgress = false;
this.uploadProgress = 0;
this.form = {
category_ids: '',
title: "",
is_top:0,
date:'',
title: "",
is_top: 0,
is_visible: 1,
date: '',
type: '',
files: []
}
@ -243,10 +261,11 @@
<style scoped lang="scss">
::v-deep .category_ids,
::v-deep .title,
::v-deep .is_top,
::v-deep .type,
::v-deep .date,
::v-deep .title,
::v-deep .is_top,
::v-deep .is_visible,
::v-deep .type,
::v-deep .date,
::v-deep .files {
flex-basis: 100%;
}

@ -25,10 +25,22 @@
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.date" style="width:100%" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -96,6 +108,7 @@
form: {
title: "",
is_top:0,
is_visible:1,
date:'',
files: [],
content: ''
@ -177,7 +190,9 @@
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.content = res.content ? res.content : ''
this.form.is_top = res.is_top?res.is_top:0
this.form.is_top = res.is_top?res.is_top:0
this.form.is_visible = res.is_visible?res.is_visible:0
this.showWang = true
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
@ -210,6 +225,7 @@
this.form = {
title: "",
is_top:0,
is_visible:1,
date:'',
files: [],
content: ''
@ -226,6 +242,7 @@
::v-deep .title,
::v-deep .files,
::v-deep .is_top,
::v-deep .is_visible,
::v-deep .date,
::v-deep .content {
flex-basis: 100%;

@ -51,10 +51,22 @@
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.date" style="width:100%" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -137,7 +149,8 @@
category_ids: [],
application_type_ids:[],
title: "",
is_top:0,
is_top:0,
is_visible:1,
date: '',
link:'',
files: [],
@ -229,7 +242,9 @@
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.is_top = res.is_top?res.is_top:0
this.form.is_top = res.is_top?res.is_top:0
this.form.is_visible = res.is_visible?res.is_visible:0
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
res.files_details.map(item => {
@ -267,7 +282,8 @@
category_ids: [],
application_type_ids:[],
title: "",
is_top:0,
is_top:0,
is_visible:1,
date: '',
files: [],
content: ''
@ -283,7 +299,8 @@
<style scoped lang="scss">
::v-deep .category_ids,
::v-deep .application_type_ids,
::v-deep .is_top,
::v-deep .is_top,
::v-deep .is_visible,
::v-deep .date,
::v-deep .link,
::v-deep .title,

@ -47,12 +47,35 @@
<el-input placeholder="Please Input" style="width:100%" v-model="form.source"></el-input>
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Top
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_top" placeholder="Please Select">
<el-option v-for="item in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.date" style="width:100%" format="yyyy-MM-dd HH:mm:ss"
@ -189,7 +212,9 @@
application_ids: [],
year: "",
title: "",
source: '',
source: '',
is_top:0,
is_visible:1,
date: '',
link: '',
files: [],
@ -318,8 +343,10 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date ? res.date : this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.category_ids = res.category_ids ? res.category_ids : [],
this.form.is_visible = res.is_visible ? res.is_visible : 0
this.form.is_top = res.is_top ? res.is_top : 0
this.form.category_ids = res.category_ids ? res.category_ids : []
this.form.product_numbers = res.product_numbers ? res.product_numbers : []
this.form.separation_mode = res.separation_mode ? res.separation_mode : []
this.form.broad_sample_type = res.broad_sample_type ? res.broad_sample_type : []
@ -356,7 +383,9 @@
application_ids: [],
year: "",
title: "",
source: '',
source: '',
is_top:0,
is_visible:1,
date: '',
link: '',
files: [],

@ -25,6 +25,7 @@
</div>
</div>
</template>
<template v-slot:is_top>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -38,10 +39,22 @@
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.date" style="width:100%" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -99,6 +112,7 @@
category_ids: [],
name: "",
is_top:0,
is_visible:1,
date:'',
// product_ids:[],
files: []
@ -175,6 +189,8 @@
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.is_top = res.is_top?res.is_top:0
this.form.is_visible = res.is_visible?res.is_visible:0
this.form.category_ids = res.category_ids?res.category_ids:[]
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
@ -207,6 +223,7 @@
category_ids: [],
name: "",
is_top:0,
is_visible:1,
date:'',
// product_ids: [],
files: []
@ -222,7 +239,8 @@
<style scoped lang="scss">
::v-deep .name,
::v-deep .date,
::v-deep .is_top,
::v-deep .is_top,
::v-deep .is_visible,
::v-deep .category_ids,
::v-deep .files {
flex-basis: 100%;

@ -25,10 +25,22 @@
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Release Time
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sort Time
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.date" style="width:100%" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -93,6 +105,16 @@
</div>
</div>
</template>
<template v-slot:link>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Link
</div>
<div class="xy-table-item-content">
<el-input placeholder="Please Input" style="width:100%" v-model="form.link"></el-input>
</div>
</div>
</template>
<template v-slot:introduction>
<div class="xy-table-item">
@ -151,10 +173,12 @@
form: {
title: "",
is_top:0,
is_visible:1,
date:'',
picture: [],
video_pics:[],
videos:[],
videos:[],
link:'',
introduction: "",
content: ''
},
@ -286,7 +310,9 @@
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.date = res.date?res.date:this.$moment().format('YYYY-MM-DD HH:mm:ss')
this.form.is_top = res.is_top?res.is_top:0
this.form.is_top = res.is_top?res.is_top:0
this.form.is_visible = res.is_visible?res.is_visible:0
this.form.content = res.content ? res.content : ''
this.showWang = true
if (res.picture_details && res.picture_details.length > 0) {
@ -343,10 +369,12 @@
this.form = {
title: "",
is_top:0,
is_visible:1,
date:'',
picture: [],
video_pics:[],
videos:[],
videos:[],
link:'',
introduction: "",
content: ''
}
@ -364,7 +392,8 @@
::v-deep .picture,
::v-deep .videos,
::v-deep .is_top,
::v-deep .video_pics,
::v-deep .is_visible,
::v-deep .video_pics,
::v-deep .introduction,
::v-deep .content {
flex-basis: 100%;

@ -8,6 +8,18 @@
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.title" placeholder="Title"></el-input>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_top" placeholder="Top">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -58,6 +70,8 @@
table_name:'faqs',
page: 1,
page_size: 10,
is_top:'',
is_visible:'',
sort_name:"is_top",
sort_type:"DESC",
sort_name2:"date",
@ -81,9 +95,19 @@
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text:true,
text_prop:'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'date',
label: 'Release Time',
label: 'Sort Time',
align: 'left',
width:180
},{
@ -118,7 +142,9 @@
},
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.title = ''
this.select.is_top=''
this.select.is_visible=''
this.getList()
},
async getList() {
@ -128,6 +154,14 @@
key:'title',
op:'like',
value:this.select.title
}, {
key: 'is_top',
op: 'eq',
value: this.select.is_top
}, {
key: 'is_visible',
op: 'eq',
value: this.select.is_visible
}]
})
this.list = res.data

@ -22,6 +22,18 @@
<el-option v-for="(item,index) in applicationTypeList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_top" placeholder="Top">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -41,7 +53,7 @@
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item">
<!-- <template v-slot:created_at>
<el-table-column align='left' label="Release Time" width="180" header-align="center">
<el-table-column align='left' label="Sort Time" width="180" header-align="center">
<template slot-scope="scope">
<div v-if="select.table_name==='technical_newsletters'">
{{scope.row.date?scope.row.date:''}}
@ -96,7 +108,9 @@
title: '',
table_name:'product_selections',
category_ids:'',
application_type_ids:'',
application_type_ids:'',
is_top:'',
is_visible:'',
page: 1,
page_size: 10,
categoryList:'',
@ -125,9 +139,19 @@
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text:true,
text_prop:'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'date',
label: 'Release Time',
label: 'Sort Time',
align: 'left',
width:180
},{
@ -193,7 +217,9 @@
this.select.page = 1
this.select.title = ''
this.select.category_ids = ''
this.select.application_type_ids = ''
this.select.application_type_ids = ''
this.select.is_top=''
this.select.is_visible=''
this.getList()
},
async getList() {
@ -211,6 +237,14 @@
key: 'application_type_ids',
op: 'json_contains',
value: this.select.application_type_ids
}, {
key: 'is_top',
op: 'eq',
value: this.select.is_top
}, {
key: 'is_visible',
op: 'eq',
value: this.select.is_visible
}]
})
this.list = res.data

@ -15,6 +15,18 @@
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_top" placeholder="Top">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -67,7 +79,9 @@
select: {
title: '',
table_name: 'literature_references',
category_ids: '',
category_ids: '',
is_top:'',
is_visible:'',
page: 1,
page_size: 10,
sort_name: "is_top",
@ -104,19 +118,29 @@
prop: 'is_top',
label: 'Top',
align: 'left',
width: 180,
width: 120,
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text:true,
text_prop:'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'date',
label: 'Release Time',
label: 'Sort Time',
align: 'left',
width: 180
},
// {
// prop: 'date',
// label: 'Release Time',
// label: 'Sort Time',
// align: 'left',
// width:180
// },
@ -165,7 +189,9 @@
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.category_ids = ''
this.select.category_ids = ''
this.select.is_top=''
this.select.is_visible=''
this.getList()
},
async getList() {
@ -179,6 +205,14 @@
key: 'category_ids',
op: 'json_contains',
value: this.select.category_ids
}, {
key: 'is_top',
op: 'eq',
value: this.select.is_top
}, {
key: 'is_visible',
op: 'eq',
value: this.select.is_visible
}]
})
this.list = res.data

@ -15,6 +15,18 @@
<el-option v-for="(item,index) in categoryList" :key="index" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_top" placeholder="Top">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -67,7 +79,9 @@
select: {
name: '',
table_name: 'user_manuals',
category_ids: '',
category_ids: '',
is_top:'',
is_visible:'',
page: 1,
page_size: 10,
sort_name: "is_top",
@ -94,9 +108,19 @@
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text: true,
text_prop: 'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
}, {
prop: 'date',
label: 'Release Time',
label: 'Sort Time',
align: 'left',
width: 180
}, {
@ -142,8 +166,10 @@
},
resetSearch() {
this.select.page = 1
this.select.name = ''
this.select.category_ids = ''
this.select.name = ''
this.select.category_ids = ''
this.select.is_top=''
this.select.is_visible=''
this.getList()
},
async getList() {
@ -157,6 +183,14 @@
key: 'category_ids',
op: 'json_contains',
value: this.select.category_ids
}, {
key: 'is_top',
op: 'eq',
value: this.select.is_top
}, {
key: 'is_visible',
op: 'eq',
value: this.select.is_visible
}]
})
this.list = res.data

@ -8,6 +8,18 @@
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.title" placeholder="Title"></el-input>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_top" placeholder="Top">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select style="width:100%" clearable v-model="select.is_visible" placeholder="Visible">
<el-option v-for="(item,index) in [{id: 1,value: 'Yes'}, {id: 0,value: 'No'}]" :key="index" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()">search</el-button>
@ -55,7 +67,9 @@
return {
select: {
title: '',
table_name:'webinars',
table_name:'webinars',
is_top:'',
is_visible:'',
page: 1,
page_size: 10,
sort_name:"is_top",
@ -81,9 +95,19 @@
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'is_visible',
label: 'Visible',
align: 'center',
width: 120,
is_text:true,
text_prop:'is_visible_text',
formatter: (cell, data, value) => {
return value == 1 ? 'Yes' : 'No'
}
},{
prop: 'date',
label: 'Release Time',
label: 'Sort Time',
align: 'left',
width:180
},{
@ -119,7 +143,9 @@
resetSearch() {
this.select.page = 1
this.select.title = ''
this.select.category_ids = ''
this.select.category_ids = ''
this.select.is_top=''
this.select.is_visible=''
this.getList()
},
async getList() {
@ -129,6 +155,14 @@
key:'title',
op:'like',
value:this.select.title
}, {
key: 'is_top',
op: 'eq',
value: this.select.is_top
}, {
key: 'is_visible',
op: 'eq',
value: this.select.is_visible
}]
})
this.list = res.data

Loading…
Cancel
Save