|  | @ -106,10 +106,10 @@ | 
		
	
		
			
				|  |  |               <el-radio :label="2" value="other">部分设备<i v-if="form.notice_device === 2" class="radio_tip" @click="addDeviceTag()">添加</i></el-radio> |  |  |               <el-radio :label="2" value="other">部分设备<i v-if="form.notice_device === 2" class="radio_tip" @click="addDeviceTag()">添加</i></el-radio> | 
		
	
		
			
				|  |  |             </el-radio-group> |  |  |             </el-radio-group> | 
		
	
		
			
				|  |  |           </el-form-item> |  |  |           </el-form-item> | 
		
	
		
			
				|  |  |           <div v-if="form.notice_device === 1" class="select_all_tip"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <div v-if="form.notice_device == 1" class="select_all_tip"> | 
		
	
		
			
				|  |  |             所有设备都将被发送 |  |  |             所有设备都将被发送 | 
		
	
		
			
				|  |  |           </div> |  |  |           </div> | 
		
	
		
			
				|  |  |           <div v-if="deviceTags.length > 0 && form.notice_device === 2" class="select_other"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <div v-if="deviceTags.length > 0 && form.notice_device == 2" class="select_other"> | 
		
	
		
			
				|  |  |             <el-row> |  |  |             <el-row> | 
		
	
		
			
				|  |  |               <el-col :span="10" class="other_tip">以下设备都将被发送<span>总计{{ deviceTags.length }}个设备</span></el-col> |  |  |               <el-col :span="10" class="other_tip">以下设备都将被发送<span>总计{{ deviceTags.length }}个设备</span></el-col> | 
		
	
		
			
				|  |  |               <el-col :span="4"> |  |  |               <el-col :span="4"> | 
		
	
	
		
			
				|  | @ -279,8 +279,10 @@ export default { | 
		
	
		
			
				|  |  |       reqQueryMessage(params).then((res) => { |  |  |       reqQueryMessage(params).then((res) => { | 
		
	
		
			
				|  |  |         if (res.code == 200) { |  |  |         if (res.code == 200) { | 
		
	
		
			
				|  |  |           this.form.notice_device = res.data.notice.noticeDevice |  |  |           this.form.notice_device = res.data.notice.noticeDevice | 
		
	
		
			
				|  |  |  |  |  |           this.deviceTags = res.data.noticeDeviceDetailsVO | 
		
	
		
			
				|  |  |           this.form.context_color = res.data.notice.contextColor |  |  |           this.form.context_color = res.data.notice.contextColor | 
		
	
		
			
				|  |  |           this.form.context = res.data.notice.context |  |  |           this.form.context = res.data.notice.context | 
		
	
		
			
				|  |  |  |  |  |           this.form.context_speed = res.data.notice.contextSpeed | 
		
	
		
			
				|  |  |           this.form.context_position = res.data.notice.contextPosition |  |  |           this.form.context_position = res.data.notice.contextPosition | 
		
	
		
			
				|  |  |           this.form.context_size = res.data.notice.contextSize |  |  |           this.form.context_size = res.data.notice.contextSize | 
		
	
		
			
				|  |  |           this.form.notice_id = row.notice_id |  |  |           this.form.notice_id = row.notice_id | 
		
	
	
		
			
				|  | @ -293,7 +295,7 @@ export default { | 
		
	
		
			
				|  |  |             this.form.context_position_name = '底部' |  |  |             this.form.context_position_name = '底部' | 
		
	
		
			
				|  |  |           } |  |  |           } | 
		
	
		
			
				|  |  |           // 判断速度 |  |  |           // 判断速度 | 
		
	
		
			
				|  |  |           if (this.form.context_speed_name == 0) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           if (this.form.context_speed == 0) { | 
		
	
		
			
				|  |  |             this.form.context_speed_name = '1s' |  |  |             this.form.context_speed_name = '1s' | 
		
	
		
			
				|  |  |           } else if (this.form.context_speed == 1) { |  |  |           } else if (this.form.context_speed == 1) { | 
		
	
		
			
				|  |  |             this.form.context_speed_name = '2s' |  |  |             this.form.context_speed_name = '2s' | 
		
	
	
		
			
				|  | @ -323,6 +325,18 @@ export default { | 
		
	
		
			
				|  |  |     // 提交 |  |  |     // 提交 | 
		
	
		
			
				|  |  |     submit() { |  |  |     submit() { | 
		
	
		
			
				|  |  |       this.$refs.form.validate((valid) => { |  |  |       this.$refs.form.validate((valid) => { | 
		
	
		
			
				|  |  |  |  |  |         console.log(this.deviceTags) | 
		
	
		
			
				|  |  |  |  |  |         console.log(this.form.notice_devices) | 
		
	
		
			
				|  |  |  |  |  |         if (this.form.notice_device == 2) { | 
		
	
		
			
				|  |  |  |  |  |           if (this.deviceTags.length != 0) { | 
		
	
		
			
				|  |  |  |  |  |             this.deviceTags.forEach(item => { | 
		
	
		
			
				|  |  |  |  |  |               this.form.notice_devices.push({ deviceId: item.device_id }) | 
		
	
		
			
				|  |  |  |  |  |             }) | 
		
	
		
			
				|  |  |  |  |  |           } else { | 
		
	
		
			
				|  |  |  |  |  |             this.$message.error('请添加设备!') | 
		
	
		
			
				|  |  |  |  |  |             return | 
		
	
		
			
				|  |  |  |  |  |           } | 
		
	
		
			
				|  |  |  |  |  |         } | 
		
	
		
			
				|  |  |         // 修改 |  |  |         // 修改 | 
		
	
		
			
				|  |  |         if (valid) { |  |  |         if (valid) { | 
		
	
		
			
				|  |  |           const params = { |  |  |           const params = { | 
		
	
	
		
			
				|  | @ -336,6 +350,7 @@ export default { | 
		
	
		
			
				|  |  |             notice_id: this.form.notice_id, |  |  |             notice_id: this.form.notice_id, | 
		
	
		
			
				|  |  |             orga_id: '133221333123111' |  |  |             orga_id: '133221333123111' | 
		
	
		
			
				|  |  |           } |  |  |           } | 
		
	
		
			
				|  |  |  |  |  |           console.log(params) | 
		
	
		
			
				|  |  |           reqEditMessage(params).then((res) => { |  |  |           reqEditMessage(params).then((res) => { | 
		
	
		
			
				|  |  |             if (res.code == 200) { |  |  |             if (res.code == 200) { | 
		
	
		
			
				|  |  |               this.$message({ |  |  |               this.$message({ | 
		
	
	
		
			
				|  | @ -345,6 +360,7 @@ export default { | 
		
	
		
			
				|  |  |                   : '添加紧急通知成功' |  |  |                   : '添加紧急通知成功' | 
		
	
		
			
				|  |  |               }) |  |  |               }) | 
		
	
		
			
				|  |  |               this.messageVisible = false |  |  |               this.messageVisible = false | 
		
	
		
			
				|  |  |  |  |  |               this.$refs.form.resetFields() | 
		
	
		
			
				|  |  |               this.getUrgentMessage(this.queryInfo.page) |  |  |               this.getUrgentMessage(this.queryInfo.page) | 
		
	
		
			
				|  |  |             } |  |  |             } | 
		
	
		
			
				|  |  |           }) |  |  |           }) | 
		
	
	
		
			
				|  | @ -393,26 +409,27 @@ export default { | 
		
	
		
			
				|  |  |     // 添加设备 |  |  |     // 添加设备 | 
		
	
		
			
				|  |  |     tagHandle(tag) { |  |  |     tagHandle(tag) { | 
		
	
		
			
				|  |  |       // 收集参数 部分设备的列表 |  |  |       // 收集参数 部分设备的列表 | 
		
	
		
			
				|  |  |       if (this.form.notice_devices.length == 0) { |  |  |  | 
		
	
		
			
				|  |  |         this.form.notice_devices.push({ deviceId: tag.device_id }) |  |  |  | 
		
	
		
			
				|  |  |       } else { |  |  |  | 
		
	
		
			
				|  |  |         const result = this.form.notice_devices.some((item) => { |  |  |  | 
		
	
		
			
				|  |  |           return item.deviceId == tag.device_id |  |  |  | 
		
	
		
			
				|  |  |         }) |  |  |  | 
		
	
		
			
				|  |  |         if (!result) { |  |  |  | 
		
	
		
			
				|  |  |           this.form.notice_devices.push({ deviceId: tag.device_id }) |  |  |  | 
		
	
		
			
				|  |  |         } |  |  |  | 
		
	
		
			
				|  |  |       } |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       // if (this.form.notice_devices.length == 0) { | 
		
	
		
			
				|  |  |  |  |  |       //   this.form.notice_devices.push({ deviceId: tag.device_id }) | 
		
	
		
			
				|  |  |  |  |  |       // } else { | 
		
	
		
			
				|  |  |  |  |  |       //   const result = this.form.notice_devices.some((item) => { | 
		
	
		
			
				|  |  |  |  |  |       //     return item.deviceId == tag.device_id | 
		
	
		
			
				|  |  |  |  |  |       //   }) | 
		
	
		
			
				|  |  |  |  |  |       //   if (!result) { | 
		
	
		
			
				|  |  |  |  |  |       //     this.form.notice_devices.push({ deviceId: tag.device_id }) | 
		
	
		
			
				|  |  |  |  |  |       //   } | 
		
	
		
			
				|  |  |  |  |  |       // } | 
		
	
		
			
				|  |  |       // 添加设备不能重复 不重复才添加 |  |  |       // 添加设备不能重复 不重复才添加 | 
		
	
		
			
				|  |  |       if (this.deviceTags.length == 0) { |  |  |       if (this.deviceTags.length == 0) { | 
		
	
		
			
				|  |  |  |  |  |         // this.form.notice_devices.push({ deviceId: tag.device_id }) | 
		
	
		
			
				|  |  |         this.deviceTags.push(tag) |  |  |         this.deviceTags.push(tag) | 
		
	
		
			
				|  |  |       } else { |  |  |       } else { | 
		
	
		
			
				|  |  |         const current = |  |  |         const current = | 
		
	
		
			
				|  |  |           this.deviceTags && |  |  |           this.deviceTags && | 
		
	
		
			
				|  |  |           this.deviceTags.some((item) => item.device_name == tag.device_name) |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.deviceTags.some((item) => item.device_id == tag.device_id) | 
		
	
		
			
				|  |  |         if (!current) { |  |  |         if (!current) { | 
		
	
		
			
				|  |  |           this.deviceTags.push(tag) |  |  |           this.deviceTags.push(tag) | 
		
	
		
			
				|  |  |  |  |  |           // this.form.notice_devices.push({ deviceId: tag.device_id }) | 
		
	
		
			
				|  |  |         } else { |  |  |         } else { | 
		
	
		
			
				|  |  |           this.$message('请勿添加重复的设备!') |  |  |           this.$message('请勿添加重复的设备!') | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
	
		
			
				|  | @ -427,6 +444,7 @@ export default { | 
		
	
		
			
				|  |  |     // 清空设备 |  |  |     // 清空设备 | 
		
	
		
			
				|  |  |     clearDevice() { |  |  |     clearDevice() { | 
		
	
		
			
				|  |  |       this.deviceTags = [] |  |  |       this.deviceTags = [] | 
		
	
		
			
				|  |  |  |  |  |       this.form.notice_devices = [] | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 关闭重置表单 |  |  |     // 关闭重置表单 | 
		
	
		
			
				|  |  |     closeDialog() { |  |  |     closeDialog() { | 
		
	
	
		
			
				|  | 
 |