调用任务
This commit is contained in:
		| @@ -113,6 +113,20 @@ | ||||
|                     </div> | ||||
|                   </ai-user-selecter> | ||||
|                 </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> | ||||
|             </template> | ||||
|           </ai-card> | ||||
| @@ -425,7 +439,8 @@ export default { | ||||
|           label: '23点到24点', | ||||
|           value: 0 | ||||
|         } | ||||
|       ] | ||||
|       ], | ||||
|       areaList: [], | ||||
|     } | ||||
|   }, | ||||
|  | ||||
| @@ -444,6 +459,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 +759,7 @@ export default { | ||||
|                 examineUserName: v.name | ||||
|               } | ||||
|             }) : [], | ||||
|             questionConfig: this.areaList | ||||
|           }).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('提交成功') | ||||
| @@ -809,6 +833,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 +1120,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; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user