From c0148efc7aba6c2fa7cf16a548277829f19a0dec Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 26 Feb 2025 13:53:39 +0800 Subject: [PATCH] phase --- src/views/product/components/addPhase.vue | 262 +++++++++++----------- vue.config.js | 2 +- 2 files changed, 136 insertions(+), 128 deletions(-) diff --git a/src/views/product/components/addPhase.vue b/src/views/product/components/addPhase.vue index 850614c..34f1b0d 100644 --- a/src/views/product/components/addPhase.vue +++ b/src/views/product/components/addPhase.vue @@ -49,22 +49,22 @@ - - - - - Sample: - - - - Yes - No - - - - - - + + + + + Sample: + + + + Yes + No + + + + + + @@ -91,49 +91,36 @@ - + - Application Note Description: + Sub Phase: - - {changeEditor(e,'application_note_desc')}" :value="form.application_note_desc"> + Add + + + + + + + + + + + + + delete + + + + + - - - - - - Sub Phase: - - - Add - - - - - - - - - - - - - delete - - - - - - - - + @@ -183,16 +170,39 @@ + + + + Tech Specification: + + + {changeEditor(e,'packing')}" + :value="form.packing"> + + + + + + + Characteristics: + + + - + {changeEditor(e,'character')}" + :value="form.character"> + + + - Application: + Characteristics Notes: Add - Application + Notes @@ -210,6 +220,23 @@ + + + + Application Note Description: + + + + {changeEditor(e,'application_note_desc')}" :value="form.application_note_desc"> + + + + + + + + - - - - Characteristics: - - - - {changeEditor(e,'character')}" - :value="form.character"> - - - - - - - Packing: - - - {changeEditor(e,'packing')}" - :value="form.packing"> - - - @@ -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%; } diff --git a/vue.config.js b/vue.config.js index e1ec061..2e40aa3 100644 --- a/vue.config.js +++ b/vue.config.js @@ -25,7 +25,7 @@ module.exports = { * Detail: https://cli.vuejs.org/config/#publicpath */ 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', css: { loaderOptions: { // 向 CSS 相关的 loader 传递选项