查看规则详情及修改规则状态的接口调试
This commit is contained in:
		
							parent
							
								
									1363296e95
								
							
						
					
					
						commit
						a9ac8b8bbb
					
				|  | @ -116,9 +116,9 @@ | |||
|               <div class="monitor-list-item-footer-actions"> | ||||
|                 <span title="Edit" class="actions-edit" @click="editItem(item.id)"></span> | ||||
|                 <span title="Delete" class="actions-delete" @click="deleteItem(item.id)"></span> | ||||
|                 <span v-if="1==1" title="Enable" class="actions-enable" @click="changeItemStatus(item.id,item.enabled)"> | ||||
|                 <span v-if="item.enabled==1" title="Enable" class="actions-enable" @click="changeItemStatus(item.id,item.enabled)"> | ||||
|                 </span> | ||||
|                 <span v-if="1==0" title="Disabled" class="actions-disable" @click="changeItemStatus(item.id,item.enabled)"> | ||||
|                 <span v-if="item.enabled==0" title="Disabled" class="actions-disable" @click="changeItemStatus(item.id,item.enabled)"> | ||||
|                 </span> | ||||
|               </div> | ||||
|             </div> | ||||
|  | @ -283,8 +283,7 @@ | |||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import { ajaxGetDictItems } from '@/api/api' | ||||
| import { getAction, postAction, httpAction, deleteAction } from '@/api/manage' | ||||
| import { getAction, postAction, httpAction, deleteAction, putAction } from '@/api/manage' | ||||
| import DicSelect from '../../components/dicSelect.vue'; | ||||
| export default { | ||||
|   components: { | ||||
|  | @ -330,11 +329,11 @@ export default { | |||
|       contactGroupOptions: [], | ||||
|       formVal: { | ||||
|         name: "", | ||||
|         source: [], | ||||
|         station: [], | ||||
|         nuclide: [], | ||||
|         qualifier: [], | ||||
|         condition: [], | ||||
|         source: null, | ||||
|         station: undefined, | ||||
|         nuclide: undefined, | ||||
|         qualifier: null, | ||||
|         condition: null, | ||||
|         contactGroup: undefined, | ||||
|         desc: "" | ||||
|       }, | ||||
|  | @ -409,6 +408,27 @@ export default { | |||
|     }, | ||||
|     editItem(id) {  | ||||
|       this.currId = id | ||||
|       getAction("/alarmAnalysisRule/finInfo", { id }).then( res => { | ||||
|         if (res.success) {  | ||||
|           console.log(res.result.sourceChecked.join(',')); | ||||
|           this.isAdd = false | ||||
|           this.visible = true | ||||
|           this.$nextTick(() => { | ||||
|             this.form.setFieldsValue({ | ||||
|               name: res.result.name, | ||||
|               source: res.result.sourceChecked.join(','), | ||||
|               station: res.result.stationChecked, | ||||
|               nuclide: res.result.nuclidesChecked, | ||||
|               qualifier: res.result.qualifierChecked.join(','), | ||||
|               condition: res.result.conditionChecked.join(','), | ||||
|               contactGroup: res.result.contactGroup, | ||||
|               desc: res.result.remark | ||||
|             }); | ||||
|           }) | ||||
|         } else { | ||||
|           this.$message.warning("This operation fails. Contact your system administrator") | ||||
|         } | ||||
|       }) | ||||
|      }, | ||||
|     deleteItem(id) {  | ||||
|       let _this = this | ||||
|  | @ -429,7 +449,16 @@ export default { | |||
|         }, | ||||
|       }); | ||||
|      }, | ||||
|     changeItemStatus(id, isEnabled) { }, | ||||
|      changeItemStatus(id, isEnabled) { | ||||
|       putAction(`/alarmAnalysisRule/updateStatus?id=${id}&enabled=${isEnabled==1?0:1}`).then(res => { | ||||
|         if (res.success) { | ||||
|           this.$message.success("success") | ||||
|           this.getAlarmRulesPage() | ||||
|         } else { | ||||
|           this.$message.warning("This operation fails. Contact your system administrator") | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handlePageChange(page, pageSize) { | ||||
|       this.ipagination.current = page | ||||
|       this.ipagination.pageSize = pageSize | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user