调用任务

This commit is contained in:
liuye
2024-06-21 17:56:29 +08:00
parent 4dd5d85607
commit 777411294c

View File

@@ -113,6 +113,20 @@
</div> </div>
</ai-user-selecter> </ai-user-selecter>
</el-form-item> </el-form-item>
<el-form-item label="地区分布" style="width: 100%;" prop="taskEndTime">
<div class="area-flex" v-for="(item, index) in areaList" :key="index">
<span class="area-label">{{item.areaName}}</span>
<el-input placeholder="请输入" size="small" style="width:100px" v-model="item.proportion" @change="areaNumChange(index)" maxlength="3"></el-input>
</div>
<div class="area-flex">
<span class="area-label">111</span>
<el-input placeholder="请输入内容" size="small" style="width:100px"></el-input>
</div>
<div class="area-flex">
<span class="area-label">111</span>
<el-input placeholder="请输入内容" size="small" style="width:100px"></el-input>
</div>
</el-form-item>
</div> </div>
</template> </template>
</ai-card> </ai-card>
@@ -425,7 +439,8 @@ export default {
label: '23点到24点', label: '23点到24点',
value: 0 value: 0
} }
] ],
areaList: [],
} }
}, },
@@ -444,6 +459,14 @@ export default {
}, },
created() { 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) { if (this.params && this.params.id) {
this.id = this.params.id this.id = this.params.id
this.getInfo(this.params.id) this.getInfo(this.params.id)
@@ -736,6 +759,7 @@ export default {
examineUserName: v.name examineUserName: v.name
} }
}) : [], }) : [],
questionConfig: this.areaList
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$message.success('提交成功') this.$message.success('提交成功')
@@ -809,6 +833,13 @@ export default {
this.isShowDay = false 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) { cancel(isRefresh) {
this.$emit('change', { this.$emit('change', {
type: 'TaskList', type: 'TaskList',
@@ -1089,5 +1120,15 @@ export default {
color: #999; color: #999;
cursor: pointer; cursor: pointer;
} }
.area-flex {
display: inline-block;
margin-right: 32px;
.area-label {
display: inline-block;
font-size: 14px;
color: #666;
margin-right: 8px;
}
}
} }
</style> </style>