后台上架-计费单位
This commit is contained in:
parent
2e2287f1cf
commit
3acee93e23
|
@ -36,13 +36,32 @@
|
||||||
<div class="add">添加更多{{ configure.name }}</div>
|
<div class="add">添加更多{{ configure.name }}</div>
|
||||||
<div class="form" v-for="(val, index) in configure.list" :key="'key3' + val.name + index">
|
<div class="form" v-for="(val, index) in configure.list" :key="'key3' + val.name + index">
|
||||||
<span>{{ val.name }}</span>
|
<span>{{ val.name }}</span>
|
||||||
<a-input v-model:value="val.note1" :maxlength="24" :placeholder="'请填写' + val.name + ',不超过24个字符'"
|
<!-- <a-input v-model:value="val.note1" ::maxlength="24" placeholder="'请填写' + val.name + ',不超过24个字符'"
|
||||||
v-if="val.type == 'input'"/>
|
v-if="val.type == 'input'"/> -->
|
||||||
|
<template v-if="val.type == 'input2'">
|
||||||
|
<a-input
|
||||||
|
v-model:value="val.note1"
|
||||||
|
:placeholder="'请填写' + val.name"
|
||||||
|
/>
|
||||||
|
<span style="width: 2.5rem; padding-left: 0.1rem">
|
||||||
|
{{
|
||||||
|
numType == '一次性买断'
|
||||||
|
? '元'
|
||||||
|
: numType == '按调用次数'
|
||||||
|
? '元/次'
|
||||||
|
: numType == '按并发路数'
|
||||||
|
? '元/路'
|
||||||
|
: numType == '按年计费'
|
||||||
|
? '元/年'
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<a-textarea v-model:value="val.note1" :showCount="true" :maxlength="200" :placeholder="'请填写' + val.name"
|
<a-textarea v-model:value="val.note1" :showCount="true" :maxlength="200" :placeholder="'请填写' + val.name"
|
||||||
v-else-if="val.type == 'textArea'"/>
|
v-else-if="val.type == 'textArea'"/>
|
||||||
<a-input-number v-model:value="val.note1" :min="0" :max="9999" :step="0.01" string-mode
|
<a-input-number v-model:value="val.note1" :min="0" :max="9999" :step="0.01" string-mode
|
||||||
:placeholder="'请填写' + val.name" v-else-if="val.type == 'number'" />
|
:placeholder="'请填写' + val.name" v-else-if="val.type == 'number'" />
|
||||||
<a-radio-group v-model:value="val.note1" :options="val.options" v-else-if="val.type == 'radio'" />
|
<a-radio-group v-model:value="val.note1" :options="val.options" v-else-if="val.type == 'radio'" @change="radioChange"/>
|
||||||
<!-- <upload :key="showKey" type="图片" btnName="上传图片" :maxCount="1" :data="val" :list="[]" tip="支持图片类型,大小不超过100M"
|
<!-- <upload :key="showKey" type="图片" btnName="上传图片" :maxCount="1" :data="val" :list="[]" tip="支持图片类型,大小不超过100M"
|
||||||
v-else-if="val.type == 'image'"></upload> -->
|
v-else-if="val.type == 'image'"></upload> -->
|
||||||
<upload :key="showKey" :child='val' limit='1' accept='.jpg,.png' v-else-if="val.type == 'image'"></upload>
|
<upload :key="showKey" :child='val' limit='1' accept='.jpg,.png' v-else-if="val.type == 'image'"></upload>
|
||||||
|
@ -68,7 +87,8 @@ export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
data: [],
|
data: [],
|
||||||
showKey: 0
|
showKey: 0,
|
||||||
|
numType: '一次性买断'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -85,7 +105,21 @@ export default {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
const obj = {}
|
const obj = {}
|
||||||
list.forEach((item) => {
|
list.forEach((item) => {
|
||||||
|
if (item.type === 'input2') {
|
||||||
|
obj[item.field] =
|
||||||
|
item.note1 +
|
||||||
|
(this.numType === '一次性买断'
|
||||||
|
? '元'
|
||||||
|
: this.numType === '按调用次数'
|
||||||
|
? '元/次'
|
||||||
|
: this.numType === '按并发路数'
|
||||||
|
? '元/路'
|
||||||
|
: this.numType === '按年计费'
|
||||||
|
? '元/年'
|
||||||
|
: '')
|
||||||
|
} else {
|
||||||
obj[item.field] = item.note1
|
obj[item.field] = item.note1
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.data.push(obj)
|
this.data.push(obj)
|
||||||
this.$emit('changeInfoList', {
|
this.$emit('changeInfoList', {
|
||||||
|
@ -108,6 +142,10 @@ export default {
|
||||||
attrValue: JSON.stringify(this.data),
|
attrValue: JSON.stringify(this.data),
|
||||||
delFlag: 0
|
delFlag: 0
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
radioChange (e) {
|
||||||
|
console.log(e, 'wewewe')
|
||||||
|
this.numType = e.target.value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
|
|
@ -106,13 +106,13 @@ export default {
|
||||||
field: 'type',
|
field: 'type',
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
options: ['一次性买断', '按调用次数', '按并发路数', '按年计费'],
|
options: ['一次性买断', '按调用次数', '按并发路数', '按年计费'],
|
||||||
note1: ''
|
note1: '一次性买断'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '计费标准',
|
name: '计费标准',
|
||||||
field: 'price',
|
field: 'price',
|
||||||
type: 'input',
|
type: 'input2',
|
||||||
company: '元',
|
// company: '元',
|
||||||
note1: ''
|
note1: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue