master
lion 10 months ago
parent 35ae0c7414
commit c0148efc7a

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

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin', publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin_test', outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin',
assetsDir: 'static', assetsDir: 'static',
css: { css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项 loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save