去掉参数参数类型
parent
697e4820a4
commit
d927eaadf7
|
@ -244,6 +244,7 @@ export default {
|
||||||
//弹出品牌关联框
|
//弹出品牌关联框
|
||||||
brandOperation(v) {
|
brandOperation(v) {
|
||||||
getCategoryBrandListData(v.id).then((res) => {
|
getCategoryBrandListData(v.id).then((res) => {
|
||||||
|
console.warn(res)
|
||||||
this.categoryId = v.id;
|
this.categoryId = v.id;
|
||||||
this.modalBrandTitle = "品牌关联";
|
this.modalBrandTitle = "品牌关联";
|
||||||
this.brandForm.categoryBrands = res.result.map((item) => item.id);
|
this.brandForm.categoryBrands = res.result.map((item) => item.id);
|
||||||
|
|
|
@ -31,9 +31,7 @@
|
||||||
</p>
|
</p>
|
||||||
<template v-if="group.params && group.params.length > 0">
|
<template v-if="group.params && group.params.length > 0">
|
||||||
<div v-for="param in group.params" :key="param.param_id" class="params">
|
<div v-for="param in group.params" :key="param.param_id" class="params">
|
||||||
<span>{{ param.paramName }} 【{{
|
<span>{{ param.paramName }}</span>
|
||||||
param.paramType | paramTypeFilter
|
|
||||||
}}】</span>
|
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
<i-button type="text" @click="handleEditParams(group, param)">编辑</i-button>
|
<i-button type="text" @click="handleEditParams(group, param)">编辑</i-button>
|
||||||
|
@ -56,19 +54,30 @@
|
||||||
<FormItem label="参数名称" prop="paramName">
|
<FormItem label="参数名称" prop="paramName">
|
||||||
<Input v-model="paramForm.paramName" style="width: 100%" />
|
<Input v-model="paramForm.paramName" style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="参数类型" prop="paramType">
|
<FormItem label="可选值" prop="options">
|
||||||
<Select :loading="userLoading" v-model="paramForm.paramType">
|
<Select
|
||||||
<Option :value="1" :key="1">输入项</Option>
|
v-model="paramForm.options"
|
||||||
<Option :value="2" :key="2">选择项</Option>
|
placeholder="输入后回车添加"
|
||||||
|
multiple
|
||||||
|
filterable
|
||||||
|
allow-create
|
||||||
|
:popper-append-to-body="false"
|
||||||
|
popper-class="spec-values-popper"
|
||||||
|
style="width: 100%; text-align: left; margin-right: 10px"
|
||||||
|
>
|
||||||
|
<Option
|
||||||
|
v-for="item in ops"
|
||||||
|
:value="item"
|
||||||
|
:key="item"
|
||||||
|
:label="item"
|
||||||
|
>
|
||||||
|
{{item}}
|
||||||
|
</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="可选值" prop="options">
|
|
||||||
<i-input v-model="paramForm.options" type="textarea" :rows="3" placeholder="请输入可选值,选择项实用逗号分隔"></i-input>
|
|
||||||
</FormItem>
|
|
||||||
|
|
||||||
<FormItem label="选项" prop="specName3">
|
<FormItem label="选项" prop="specName3">
|
||||||
<Checkbox :value="Number" v-model="paramForm.required">必填</Checkbox>
|
<Checkbox :value="Number" v-model="paramForm.required == 1">必填</Checkbox>
|
||||||
<Checkbox v-model="paramForm.isIndex">可索引</Checkbox>
|
<Checkbox v-model="paramForm.isIndex == 1">可索引</Checkbox>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
@ -127,6 +136,10 @@ export default {
|
||||||
paramId: "",
|
paramId: "",
|
||||||
//参数表单
|
//参数表单
|
||||||
paramForm: {},
|
paramForm: {},
|
||||||
|
/** 参数值 **/
|
||||||
|
ops:{
|
||||||
|
options: []
|
||||||
|
},
|
||||||
paramGroupForm: {},
|
paramGroupForm: {},
|
||||||
/** 添加、编辑参数 规格 */
|
/** 添加、编辑参数 规格 */
|
||||||
formValidate: {
|
formValidate: {
|
||||||
|
@ -170,14 +183,16 @@ export default {
|
||||||
handleEditParams(group, param) {
|
handleEditParams(group, param) {
|
||||||
this.paramForm = {
|
this.paramForm = {
|
||||||
paramName: param.paramName,
|
paramName: param.paramName,
|
||||||
paramType: param.paramType,
|
options: param.options,
|
||||||
options: param.options,
|
|
||||||
required: param.required,
|
required: param.required,
|
||||||
isIndex: param.isIndex,
|
isIndex: param.isIndex,
|
||||||
groupId: group.groupId,
|
groupId: group.groupId,
|
||||||
categoryId: this.categoryId,
|
categoryId: this.categoryId,
|
||||||
id: param.id,
|
id: param.id,
|
||||||
};
|
};
|
||||||
|
console.warn(this.paramForm.isIndex)
|
||||||
|
this.options = this.paramForm.options.split(",")
|
||||||
|
this.ops = this.paramForm.options.split(",")
|
||||||
this.modalType = 1;
|
this.modalType = 1;
|
||||||
this.modalTitle = "修改参数";
|
this.modalTitle = "修改参数";
|
||||||
this.dialogParamsVisible = true;
|
this.dialogParamsVisible = true;
|
||||||
|
@ -194,7 +209,14 @@ export default {
|
||||||
this.dialogParamsGroupVisible = true;
|
this.dialogParamsGroupVisible = true;
|
||||||
},
|
},
|
||||||
handleAddParamsGroup() {
|
handleAddParamsGroup() {
|
||||||
|
this.paramGroupForm = {
|
||||||
|
|
||||||
|
};
|
||||||
|
this.ops = {
|
||||||
|
|
||||||
|
};
|
||||||
(this.paramGroupForm.categoryId = this.categoryId), (this.modalType = 0);
|
(this.paramGroupForm.categoryId = this.categoryId), (this.modalType = 0);
|
||||||
|
|
||||||
this.modalTitle = "添加参数组";
|
this.modalTitle = "添加参数组";
|
||||||
this.dialogParamsGroupVisible = true;
|
this.dialogParamsGroupVisible = true;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue