diff --git a/packages/xbot/AppTaskAi/components/TaskAdd.vue b/packages/xbot/AppTaskAi/components/TaskAdd.vue index bc060a00..531781b1 100644 --- a/packages/xbot/AppTaskAi/components/TaskAdd.vue +++ b/packages/xbot/AppTaskAi/components/TaskAdd.vue @@ -113,6 +113,12 @@ + @@ -425,7 +431,8 @@ export default { label: '23点到24点', value: 0 } - ] + ], + areaList: [], } }, @@ -444,6 +451,14 @@ export default { }, created() { + this.instance.post(`/app/appmasssendingtaskbaidu/queryAreaList`).then(res => { + if (res.code === 0) { + res.data.map((item) => { + item.proportion = 0 + }) + this.areaList = res.data + } + }) if (this.params && this.params.id) { this.id = this.params.id this.getInfo(this.params.id) @@ -736,6 +751,7 @@ export default { examineUserName: v.name } }) : [], + questionConfig: this.areaList }).then(res => { if (res.code == 0) { this.$message.success('提交成功') @@ -809,6 +825,13 @@ export default { this.isShowDay = false }, + areaNumChange(index) { + if(!/^(?:[0-1]+\.[0-9]*|[0-9]*\.[0-9]+|1\.?0*)$/.test(this.areaList[index].proportion)) { + this.areaList[index].proportion = 0 + return this.$message.error('请输入小于1的数字或小数') + } + }, + cancel(isRefresh) { this.$emit('change', { type: 'TaskList', @@ -1089,5 +1112,15 @@ export default { color: #999; cursor: pointer; } + .area-flex { + display: inline-block; + margin-right: 32px; + .area-label { + display: inline-block; + font-size: 14px; + color: #666; + margin-right: 8px; + } + } }