@@ -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 {
diff --git a/src/views/product/components/addProduct.vue b/src/views/product/components/addProduct.vue
index bb5b512..8792004 100644
--- a/src/views/product/components/addProduct.vue
+++ b/src/views/product/components/addProduct.vue
@@ -51,7 +51,7 @@
- *Release Time:
+ *Sort Time:
- Top:
+ Top(Whether it is displayed at the very front):
@@ -86,7 +86,7 @@
- Product Visible:
+ Visible(Can it be displayed on the website):
@@ -99,7 +99,7 @@
- Active:
+ Active(Is it on sale):
@@ -112,7 +112,7 @@
- Price Visible:
+ Price Visible(Can the price be seen):
diff --git a/src/views/product/family.vue b/src/views/product/family.vue
new file mode 100644
index 0000000..15aedbc
--- /dev/null
+++ b/src/views/product/family.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ search
+
+
+ reset
+
+
+ add
+
+
+
+
+
+
+
+
+
+
+
+
+
+ edit
+
+ delete
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/product/index.vue b/src/views/product/index.vue
index 202d03c..3d8ba17 100644
--- a/src/views/product/index.vue
+++ b/src/views/product/index.vue
@@ -31,7 +31,7 @@
-
+
@@ -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
},
diff --git a/src/views/product/phase.vue b/src/views/product/phase.vue
index e124367..4609eeb 100644
--- a/src/views/product/phase.vue
+++ b/src/views/product/phase.vue
@@ -9,6 +9,12 @@
+
+
+
+
+
+
@@ -16,6 +22,13 @@
+
+
+
+
+
+
search
@@ -36,6 +49,16 @@
+
+
+
+
+ {{item.title?item.title:''}}
+
+
+
+
+
@@ -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()
},
diff --git a/src/views/resource/catalog.vue b/src/views/resource/catalog.vue
index dc7a88a..8a44b24 100644
--- a/src/views/resource/catalog.vue
+++ b/src/views/resource/catalog.vue
@@ -15,6 +15,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
search
@@ -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
diff --git a/src/views/resource/components/addCatalog.vue b/src/views/resource/components/addCatalog.vue
index fc7ba85..5bc9df8 100644
--- a/src/views/resource/components/addCatalog.vue
+++ b/src/views/resource/components/addCatalog.vue
@@ -24,31 +24,44 @@
-
-
-
-
-
-
-
- Release Time:
-
-
-
-
-
-
+
+
+
+
+
+
+
+ Visible:
+
+
+
+
+
+
+
+
+
+
+
+ Sort Time:
+
+
+
+
+
+
@@ -71,11 +84,12 @@
+ :auto-upload="true" :data="uploadOther" :on-progress="handleProgress" :on-success="handlesuccess"
+ :on-remove="handleRemove">
upload
-
-
-
+
+
+
@@ -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 @@