|
|
|
|
@ -49,22 +49,22 @@
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:is_sample>
|
|
|
|
|
<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>Sample:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-radio-group v-model="form.is_sample">
|
|
|
|
|
<el-radio :label="1">Yes</el-radio>
|
|
|
|
|
<el-radio :label="0">No</el-radio>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:is_sample>
|
|
|
|
|
<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>Sample:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-radio-group v-model="form.is_sample">
|
|
|
|
|
<el-radio :label="1">Yes</el-radio>
|
|
|
|
|
<el-radio :label="0">No</el-radio>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:picture_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
@ -91,49 +91,36 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:application_note_desc>
|
|
|
|
|
<template v-slot:product_category_phase>
|
|
|
|
|
<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>Application Note Description:
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sub Phase:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<!-- <el-input type="textarea" :rows="5" v-model="form.application_note_desc"></el-input> -->
|
|
|
|
|
<my-tinymce v-if="showWang" :id="'application_note_desc'"
|
|
|
|
|
@input="(e)=>{changeEditor(e,'application_note_desc')}" :value="form.application_note_desc"></my-tinymce>
|
|
|
|
|
<el-button type="primary" style="margin-bottom:10px" size="small" @click="addSubPhase">Add</el-button>
|
|
|
|
|
<xy-table key="1" style="width:850px" :list="form.product_category_phase" :isPage="false" :height="350"
|
|
|
|
|
:table-item="sub_detail_item">
|
|
|
|
|
<template v-slot:value>
|
|
|
|
|
<el-table-column align='left' label="value" width="680">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input placeholder="Please Input" style="width:100%" v-model="scope.row.value"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column align='center' label="operate" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px"
|
|
|
|
|
@confirm="delSubPhase(scope.row.id,scope.$index)" 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>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:product_category_phase>
|
|
|
|
|
<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>Sub Phase:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-button type="primary" style="margin-bottom:10px" size="small" @click="addSubPhase">Add</el-button>
|
|
|
|
|
<xy-table key="1" style="width:850px" :list="form.product_category_phase" :isPage="false" :height="350"
|
|
|
|
|
:table-item="sub_detail_item">
|
|
|
|
|
<template v-slot:value>
|
|
|
|
|
<el-table-column align='left' label="value" width="680">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input placeholder="Please Input" style="width:100%" v-model="scope.row.value"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column align='center' label="operate" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-popconfirm confirm-button-text="confirm" cancel-button-text="cancel" style="margin:0 10px"
|
|
|
|
|
@confirm="delSubPhase(scope.row.id,scope.$index)" 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>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:product_category_details>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -183,16 +170,39 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:packing>
|
|
|
|
|
<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>Tech Specification:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<my-tinymce :id="'packing'" v-if="showPacking" @input="(e)=>{changeEditor(e,'packing')}"
|
|
|
|
|
:value="form.packing"></my-tinymce>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:character>
|
|
|
|
|
<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>Characteristics:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<!-- <wangEditor :isShow="isShow" v-show="showWang" :value="form.character"
|
|
|
|
|
@change="(e)=>{changeEditor(e,'character')}"></wangEditor> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<my-tinymce v-if="showWang" :id="'character'" @input="(e)=>{changeEditor(e,'character')}"
|
|
|
|
|
:value="form.character"></my-tinymce>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:product_category_applications>
|
|
|
|
|
<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>Application:
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Characteristics Notes:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-button type="primary" style="margin-bottom:10px" size="small" @click="addAppRow('','add')">Add
|
|
|
|
|
Application</el-button>
|
|
|
|
|
Notes</el-button>
|
|
|
|
|
<xy-table ref="applications" row-key="id" key="2" style="width:850px" :list="applicationsList"
|
|
|
|
|
:isPage="false" :height="350" :table-item="application_detail_item">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
@ -210,6 +220,23 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:application_note_desc>
|
|
|
|
|
<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>Application Note Description:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<!-- <el-input type="textarea" :rows="5" v-model="form.application_note_desc"></el-input> -->
|
|
|
|
|
<my-tinymce v-if="showWang" :id="'application_note_desc'"
|
|
|
|
|
@input="(e)=>{changeEditor(e,'application_note_desc')}" :value="form.application_note_desc"></my-tinymce>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <template v-slot:download_ids>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
@ -225,31 +252,7 @@
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:character>
|
|
|
|
|
<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>Characteristics:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<!-- <wangEditor :isShow="isShow" v-show="showWang" :value="form.character"
|
|
|
|
|
@change="(e)=>{changeEditor(e,'character')}"></wangEditor> -->
|
|
|
|
|
|
|
|
|
|
<my-tinymce v-if="showWang" :id="'character'" @input="(e)=>{changeEditor(e,'character')}"
|
|
|
|
|
:value="form.character"></my-tinymce>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:packing>
|
|
|
|
|
<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>Packing:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<my-tinymce :id="'packing'" v-if="showPacking" @input="(e)=>{changeEditor(e,'packing')}"
|
|
|
|
|
:value="form.packing"></my-tinymce>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -263,7 +266,7 @@
|
|
|
|
|
import {
|
|
|
|
|
save,
|
|
|
|
|
show,
|
|
|
|
|
index,
|
|
|
|
|
index,
|
|
|
|
|
phaseDel
|
|
|
|
|
} from "@/api/product/category.js"
|
|
|
|
|
import {
|
|
|
|
|
@ -308,15 +311,15 @@
|
|
|
|
|
label: 'Title',
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 620
|
|
|
|
|
}],
|
|
|
|
|
sub_detail_item: [{
|
|
|
|
|
type: 'index',
|
|
|
|
|
width: 50,
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'value',
|
|
|
|
|
label: 'Name',
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 680
|
|
|
|
|
}],
|
|
|
|
|
sub_detail_item: [{
|
|
|
|
|
type: 'index',
|
|
|
|
|
width: 50,
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'value',
|
|
|
|
|
label: 'Name',
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 680
|
|
|
|
|
}],
|
|
|
|
|
detail_item: [{
|
|
|
|
|
type: 'index',
|
|
|
|
|
@ -336,17 +339,19 @@
|
|
|
|
|
product_category_links_by_sub: [],
|
|
|
|
|
name: '',
|
|
|
|
|
sort: 0,
|
|
|
|
|
is_recommend: 0,
|
|
|
|
|
is_sample:0,
|
|
|
|
|
is_recommend: 0,
|
|
|
|
|
is_sample: 0,
|
|
|
|
|
picture_id: '',
|
|
|
|
|
description: '',
|
|
|
|
|
application_note_desc: '',
|
|
|
|
|
product_category_phase:[],
|
|
|
|
|
|
|
|
|
|
product_category_phase: [],
|
|
|
|
|
product_category_details: [],
|
|
|
|
|
product_category_applications: [],
|
|
|
|
|
download_ids: [],
|
|
|
|
|
character: '',
|
|
|
|
|
|
|
|
|
|
// download_ids: [],
|
|
|
|
|
packing: '',
|
|
|
|
|
character: '',
|
|
|
|
|
product_category_applications: [],
|
|
|
|
|
application_note_desc: '',
|
|
|
|
|
pid: 0,
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
@ -421,24 +426,24 @@
|
|
|
|
|
row.type = this.productDetailsKeyList[e].type
|
|
|
|
|
row.list = this.productDetailsKeyList[e].list
|
|
|
|
|
row.value = row.type == 'select' ? [] : ''
|
|
|
|
|
},
|
|
|
|
|
// sub phase
|
|
|
|
|
addSubPhase() {
|
|
|
|
|
this.form.product_category_phase.push({
|
|
|
|
|
value: '',
|
|
|
|
|
sort:0
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
delSubPhase(id,index) {
|
|
|
|
|
if(id){
|
|
|
|
|
phaseDel({
|
|
|
|
|
id:id
|
|
|
|
|
}).then(res=>{
|
|
|
|
|
this.form.product_category_phase.splice(index, 1)
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.form.product_category_phase.splice(index, 1)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// sub phase
|
|
|
|
|
addSubPhase() {
|
|
|
|
|
this.form.product_category_phase.push({
|
|
|
|
|
value: '',
|
|
|
|
|
sort: 0
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
delSubPhase(id, index) {
|
|
|
|
|
if (id) {
|
|
|
|
|
phaseDel({
|
|
|
|
|
id: id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.form.product_category_phase.splice(index, 1)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.form.product_category_phase.splice(index, 1)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// addApplication
|
|
|
|
|
addAppRow(id, type) {
|
|
|
|
|
@ -644,12 +649,12 @@
|
|
|
|
|
this.form = this.base.requestToForm(res, this.form)
|
|
|
|
|
this.form.description = res.description ? res.description : ''
|
|
|
|
|
this.form.application_note_desc = res.application_note_desc ? res.application_note_desc : ''
|
|
|
|
|
this.form.product_category_phase = res.phase?res.phase:[]
|
|
|
|
|
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_recommend = res.is_recommend ? res.is_recommend : 0
|
|
|
|
|
this.form.is_sample = res.is_sample ? res.is_sample : 0
|
|
|
|
|
|
|
|
|
|
this.showWang = true
|
|
|
|
|
this.showPacking = true
|
|
|
|
|
@ -731,18 +736,17 @@
|
|
|
|
|
product_category_links_by_sub: [],
|
|
|
|
|
name: '',
|
|
|
|
|
sort: 0,
|
|
|
|
|
is_recommend: 0,
|
|
|
|
|
is_sample:0,
|
|
|
|
|
is_recommend: 0,
|
|
|
|
|
is_sample: 0,
|
|
|
|
|
picture_id: '',
|
|
|
|
|
description: '',
|
|
|
|
|
application_note_desc: '',
|
|
|
|
|
product_category_phase:[],
|
|
|
|
|
product_category_phase: [],
|
|
|
|
|
product_category_details: [],
|
|
|
|
|
product_category_applications: [],
|
|
|
|
|
download_ids: [],
|
|
|
|
|
|
|
|
|
|
character: '',
|
|
|
|
|
packing: '',
|
|
|
|
|
character: '',
|
|
|
|
|
product_category_applications: [],
|
|
|
|
|
application_note_desc: '',
|
|
|
|
|
pid: 0,
|
|
|
|
|
}
|
|
|
|
|
this.$refs['dialog'].reset()
|
|
|
|
|
@ -766,9 +770,13 @@
|
|
|
|
|
{
|
|
|
|
|
flex-basis: 100%;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .sort,::v-deep .is_recommend,::v-deep .is_sample{
|
|
|
|
|
flex-basis: 33%;
|
|
|
|
|
|
|
|
|
|
::v-deep .sort,
|
|
|
|
|
::v-deep .is_recommend,
|
|
|
|
|
::v-deep .is_sample {
|
|
|
|
|
flex-basis: 33%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-checkbox__input .el-checkbox__inner {
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
}
|
|
|
|
|
|