|  | @ -52,14 +52,12 @@ | 
		
	
		
			
				|  |  |                 type="primary" |  |  |                 type="primary" | 
		
	
		
			
				|  |  |                 class="edit_btn" |  |  |                 class="edit_btn" | 
		
	
		
			
				|  |  |                 @click="editFormData(scope.row)" |  |  |                 @click="editFormData(scope.row)" | 
		
	
		
			
				|  |  | 								>编辑</el-button |  |  |  | 
		
	
		
			
				|  |  | 							> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |               >编辑</el-button> | 
		
	
		
			
				|  |  |               <el-button |  |  |               <el-button | 
		
	
		
			
				|  |  |                 type="primary" |  |  |                 type="primary" | 
		
	
		
			
				|  |  |                 :class="['start_btn', { stop_btn: scope.row.is_state == 1 }]" |  |  |                 :class="['start_btn', { stop_btn: scope.row.is_state == 1 }]" | 
		
	
		
			
				|  |  |                 @click="isStopHandle(scope.$index, scope.row)" |  |  |                 @click="isStopHandle(scope.$index, scope.row)" | 
		
	
		
			
				|  |  | 								>{{ scope.row.is_state == 1 ? "停止" : "恢复" }}</el-button |  |  |  | 
		
	
		
			
				|  |  | 							> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |               >{{ scope.row.is_state == 1 ? "停止" : "恢复" }}</el-button> | 
		
	
		
			
				|  |  |             </template> |  |  |             </template> | 
		
	
		
			
				|  |  |           </el-table-column> |  |  |           </el-table-column> | 
		
	
		
			
				|  |  |         </el-table> |  |  |         </el-table> | 
		
	
	
		
			
				|  | @ -73,11 +71,10 @@ | 
		
	
		
			
				|  |  |       :page-size="queryInfo.size" |  |  |       :page-size="queryInfo.size" | 
		
	
		
			
				|  |  |       :pager-count="5" |  |  |       :pager-count="5" | 
		
	
		
			
				|  |  |       :page-sizes="[3, 5, 10]" |  |  |       :page-sizes="[3, 5, 10]" | 
		
	
		
			
				|  |  |  |  |  |       layout="prev, pager, next, jumper,->,sizes,total" | 
		
	
		
			
				|  |  |       @current-change="getUrgentMessage" |  |  |       @current-change="getUrgentMessage" | 
		
	
		
			
				|  |  |       @size-change="handleSizeChange" |  |  |       @size-change="handleSizeChange" | 
		
	
		
			
				|  |  | 			layout="prev, pager, next, jumper,->,sizes,total" |  |  |  | 
		
	
		
			
				|  |  | 		> |  |  |  | 
		
	
		
			
				|  |  | 		</el-pagination> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     /> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |     <!-- 编辑紧急通知 --> |  |  |     <!-- 编辑紧急通知 --> | 
		
	
		
			
				|  |  |     <div class="publish_layer"> |  |  |     <div class="publish_layer"> | 
		
	
	
		
			
				|  | @ -193,14 +190,14 @@ | 
		
	
		
			
				|  |  |               @change="clearCheckbox()" |  |  |               @change="clearCheckbox()" | 
		
	
		
			
				|  |  |             > |  |  |             > | 
		
	
		
			
				|  |  |               <el-radio :label="1" value="all">所有设备</el-radio> |  |  |               <el-radio :label="1" value="all">所有设备</el-radio> | 
		
	
		
			
				|  |  | 							<el-radio :label="2" value="other" |  |  |  | 
		
	
		
			
				|  |  |  |  |  |               <el-radio | 
		
	
		
			
				|  |  |  |  |  |                 :label="2" | 
		
	
		
			
				|  |  |  |  |  |                 value="other" | 
		
	
		
			
				|  |  |               >部分设备<i |  |  |               >部分设备<i | 
		
	
		
			
				|  |  |                 v-if="form.notice_device === 2" |  |  |                 v-if="form.notice_device === 2" | 
		
	
		
			
				|  |  |                 class="radio_tip" |  |  |                 class="radio_tip" | 
		
	
		
			
				|  |  |                 @click="addDeviceTag()" |  |  |                 @click="addDeviceTag()" | 
		
	
		
			
				|  |  | 									>添加</i |  |  |  | 
		
	
		
			
				|  |  | 								></el-radio |  |  |  | 
		
	
		
			
				|  |  | 							> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |               >添加</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"> | 
		
	
	
		
			
				|  | @ -211,15 +208,16 @@ | 
		
	
		
			
				|  |  |             class="select_other" |  |  |             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"> | 
		
	
		
			
				|  |  | 								<el-button round class="delt_btn" @click="clearDevice()" |  |  |  | 
		
	
		
			
				|  |  | 									>清空</el-button |  |  |  | 
		
	
		
			
				|  |  | 								> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |                 <el-button | 
		
	
		
			
				|  |  |  |  |  |                   round | 
		
	
		
			
				|  |  |  |  |  |                   class="delt_btn" | 
		
	
		
			
				|  |  |  |  |  |                   @click="clearDevice()" | 
		
	
		
			
				|  |  |  |  |  |                 >清空</el-button> | 
		
	
		
			
				|  |  |               </el-col> |  |  |               </el-col> | 
		
	
		
			
				|  |  |             </el-row> |  |  |             </el-row> | 
		
	
		
			
				|  |  |             <el-tag |  |  |             <el-tag | 
		
	
	
		
			
				|  | @ -269,27 +267,27 @@ | 
		
	
		
			
				|  |  | </template> |  |  | </template> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | <script> |  |  | <script> | 
		
	
		
			
				|  |  | 	import { parseTime } from "@/utils/index.js"; |  |  |  | 
		
	
		
			
				|  |  | 	import { ReqDeviceList } from "@/api/device/deviceList.js"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  | import { parseTime } from '@/utils/index.js' | 
		
	
		
			
				|  |  |  |  |  | import { ReqDeviceList } from '@/api/device/deviceList.js' | 
		
	
		
			
				|  |  | import { |  |  | import { | 
		
	
		
			
				|  |  |   reqUrgentMessage, |  |  |   reqUrgentMessage, | 
		
	
		
			
				|  |  |   reqQueryMessage, |  |  |   reqQueryMessage, | 
		
	
		
			
				|  |  |   reqEditMessage, |  |  |   reqEditMessage, | 
		
	
		
			
				|  |  |   reqChangeMessage |  |  |   reqChangeMessage | 
		
	
		
			
				|  |  | 	} from "@/api/publish/urgentMessage"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  | } from '@/api/publish/urgentMessage' | 
		
	
		
			
				|  |  | export default { |  |  | export default { | 
		
	
		
			
				|  |  | 		name: "UrgentMessage", |  |  |  | 
		
	
		
			
				|  |  |  |  |  |   name: 'UrgentMessage', | 
		
	
		
			
				|  |  |   filters: { |  |  |   filters: { | 
		
	
		
			
				|  |  |     parseTime(time, cFormat) { |  |  |     parseTime(time, cFormat) { | 
		
	
		
			
				|  |  | 				return parseTime(time, cFormat); |  |  |  | 
		
	
		
			
				|  |  | 			}, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       return parseTime(time, cFormat) | 
		
	
		
			
				|  |  |  |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   data() { |  |  |   data() { | 
		
	
		
			
				|  |  |     return { |  |  |     return { | 
		
	
		
			
				|  |  |       isAddEdit: false, |  |  |       isAddEdit: false, | 
		
	
		
			
				|  |  |       form: { |  |  |       form: { | 
		
	
		
			
				|  |  | 					context_color: "#ff0000", //文本的颜色 |  |  |  | 
		
	
		
			
				|  |  | 					context: "", //文本的内容 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         context_color: '#ff0000', // 文本的颜色 | 
		
	
		
			
				|  |  |  |  |  |         context: '', // 文本的内容 | 
		
	
		
			
				|  |  |         context_position: null, // 文本的位置 |  |  |         context_position: null, // 文本的位置 | 
		
	
		
			
				|  |  |         context_position_name: null, |  |  |         context_position_name: null, | 
		
	
		
			
				|  |  |         context_speed_name: null, |  |  |         context_speed_name: null, | 
		
	
	
		
			
				|  | @ -299,14 +297,14 @@ | 
		
	
		
			
				|  |  |         // create_by:'', //发布人 |  |  |         // create_by:'', //发布人 | 
		
	
		
			
				|  |  |         notice_device: null, |  |  |         notice_device: null, | 
		
	
		
			
				|  |  |         notice_devices: [], |  |  |         notice_devices: [], | 
		
	
		
			
				|  |  | 					notice_id: "", //紧急通知的id |  |  |  | 
		
	
		
			
				|  |  | 					orga_id: "133221333123111", |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         notice_id: '', // 紧急通知的id | 
		
	
		
			
				|  |  |  |  |  |         orga_id: '133221333123111' | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
		
			
				|  |  |       queryInfo: { |  |  |       queryInfo: { | 
		
	
		
			
				|  |  | 					notice_name: "", |  |  |  | 
		
	
		
			
				|  |  | 					orga_id: "133221333123111", |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         notice_name: '', | 
		
	
		
			
				|  |  |  |  |  |         orga_id: '133221333123111', | 
		
	
		
			
				|  |  |         page: 1, |  |  |         page: 1, | 
		
	
		
			
				|  |  | 					size: 3, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         size: 3 | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
		
			
				|  |  |       total: 0, |  |  |       total: 0, | 
		
	
		
			
				|  |  |       messageVisible: false, |  |  |       messageVisible: false, | 
		
	
	
		
			
				|  | @ -315,17 +313,17 @@ | 
		
	
		
			
				|  |  |         { key: 0, name: 16 }, |  |  |         { key: 0, name: 16 }, | 
		
	
		
			
				|  |  |         { key: 1, name: 22 }, |  |  |         { key: 1, name: 22 }, | 
		
	
		
			
				|  |  |         { key: 2, name: 24 }, |  |  |         { key: 2, name: 24 }, | 
		
	
		
			
				|  |  | 					{ key: 3, name: 30 }, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         { key: 3, name: 30 } | 
		
	
		
			
				|  |  |       ], |  |  |       ], | 
		
	
		
			
				|  |  |       positionData: [ |  |  |       positionData: [ | 
		
	
		
			
				|  |  | 					{ key: 1, name: "顶部" }, |  |  |  | 
		
	
		
			
				|  |  | 					{ key: 2, name: "中间" }, |  |  |  | 
		
	
		
			
				|  |  | 					{ key: 3, name: "底部" }, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         { key: 1, name: '顶部' }, | 
		
	
		
			
				|  |  |  |  |  |         { key: 2, name: '中间' }, | 
		
	
		
			
				|  |  |  |  |  |         { key: 3, name: '底部' } | 
		
	
		
			
				|  |  |       ], |  |  |       ], | 
		
	
		
			
				|  |  |       speedData: [ |  |  |       speedData: [ | 
		
	
		
			
				|  |  | 					{ key: 0, name: "1s" }, |  |  |  | 
		
	
		
			
				|  |  | 					{ key: 1, name: "2s" }, |  |  |  | 
		
	
		
			
				|  |  | 					{ key: 2, name: "3s" }, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         { key: 0, name: '1s' }, | 
		
	
		
			
				|  |  |  |  |  |         { key: 1, name: '2s' }, | 
		
	
		
			
				|  |  |  |  |  |         { key: 2, name: '3s' } | 
		
	
		
			
				|  |  |       ], |  |  |       ], | 
		
	
		
			
				|  |  |       selectedList: [], |  |  |       selectedList: [], | 
		
	
		
			
				|  |  |       // 部分设备列表的数据 |  |  |       // 部分设备列表的数据 | 
		
	
	
		
			
				|  | @ -333,36 +331,36 @@ | 
		
	
		
			
				|  |  |       // newArr:[], |  |  |       // newArr:[], | 
		
	
		
			
				|  |  |       deviceTags: [], |  |  |       deviceTags: [], | 
		
	
		
			
				|  |  |       // 紧急通知列表 |  |  |       // 紧急通知列表 | 
		
	
		
			
				|  |  | 				urgentMessage: [], |  |  |  | 
		
	
		
			
				|  |  | 			}; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       urgentMessage: [] | 
		
	
		
			
				|  |  |  |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   mounted() { |  |  |   mounted() { | 
		
	
		
			
				|  |  | 			this.getUrgentMessage(); |  |  |  | 
		
	
		
			
				|  |  | 			this.getDevice(); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     this.getUrgentMessage() | 
		
	
		
			
				|  |  |  |  |  |     this.getDevice() | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   methods: { |  |  |   methods: { | 
		
	
		
			
				|  |  |     // 获取紧急通知的列表 |  |  |     // 获取紧急通知的列表 | 
		
	
		
			
				|  |  |     getUrgentMessage(pager = 1) { |  |  |     getUrgentMessage(pager = 1) { | 
		
	
		
			
				|  |  |       this.queryInfo.page = pager |  |  |       this.queryInfo.page = pager | 
		
	
		
			
				|  |  | 				const params = this.queryInfo; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       const params = this.queryInfo | 
		
	
		
			
				|  |  |       reqUrgentMessage(params).then((res) => { |  |  |       reqUrgentMessage(params).then((res) => { | 
		
	
		
			
				|  |  |         if (res.code == 200) { |  |  |         if (res.code == 200) { | 
		
	
		
			
				|  |  | 						this.urgentMessage = res.data.content; |  |  |  | 
		
	
		
			
				|  |  | 						this.total = res.data.totalElements; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.urgentMessage = res.data.content | 
		
	
		
			
				|  |  |  |  |  |           this.total = res.data.totalElements | 
		
	
		
			
				|  |  |           // console.log(this.urgentMessage); |  |  |           // console.log(this.urgentMessage); | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  | 				}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 获取设备列表的信息 |  |  |     // 获取设备列表的信息 | 
		
	
		
			
				|  |  |     getDevice() { |  |  |     getDevice() { | 
		
	
		
			
				|  |  | 				const params = this.queryInfo; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       const params = this.queryInfo | 
		
	
		
			
				|  |  |       ReqDeviceList(params).then((res) => { |  |  |       ReqDeviceList(params).then((res) => { | 
		
	
		
			
				|  |  |         if (res.code == 200) { |  |  |         if (res.code == 200) { | 
		
	
		
			
				|  |  | 						this.deviceList = res.data.content; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.deviceList = res.data.content | 
		
	
		
			
				|  |  |         } else { |  |  |         } else { | 
		
	
		
			
				|  |  | 						return this.$message.error("获取设备列表失败!"); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           return this.$message.error('获取设备列表失败!') | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  | 				}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 紧急通知的状态  is_state为1 发布中 2 停止 |  |  |     // 紧急通知的状态  is_state为1 发布中 2 停止 | 
		
	
		
			
				|  |  |     // row.is_state == 1 ? "停止" : "恢复" |  |  |     // row.is_state == 1 ? "停止" : "恢复" | 
		
	
	
		
			
				|  | @ -370,9 +368,9 @@ | 
		
	
		
			
				|  |  |       console.log(row) |  |  |       console.log(row) | 
		
	
		
			
				|  |  |       // console.log(index) |  |  |       // console.log(index) | 
		
	
		
			
				|  |  |       if (row.is_state == 1) { |  |  |       if (row.is_state == 1) { | 
		
	
		
			
				|  |  | 					row.is_state = 2;        |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         row.is_state = 2 | 
		
	
		
			
				|  |  |       } else { |  |  |       } else { | 
		
	
		
			
				|  |  | 					row.is_state = 1; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         row.is_state = 1 | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |       const params = { |  |  |       const params = { | 
		
	
		
			
				|  |  |         id: row.notice_id, |  |  |         id: row.notice_id, | 
		
	
	
		
			
				|  | @ -383,44 +381,42 @@ | 
		
	
		
			
				|  |  |         if (res.code == 200) { |  |  |         if (res.code == 200) { | 
		
	
		
			
				|  |  |           if (params.state == 1) { |  |  |           if (params.state == 1) { | 
		
	
		
			
				|  |  |             this.$message({ |  |  |             this.$message({ | 
		
	
		
			
				|  |  | 									type: "success", |  |  |  | 
		
	
		
			
				|  |  |  |  |  |               type: 'success', | 
		
	
		
			
				|  |  |               message: '已发布成功!' |  |  |               message: '已发布成功!' | 
		
	
		
			
				|  |  | 								}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             }) | 
		
	
		
			
				|  |  |           } else { |  |  |           } else { | 
		
	
		
			
				|  |  |             this.$message({ |  |  |             this.$message({ | 
		
	
		
			
				|  |  | 									type: "success", |  |  |  | 
		
	
		
			
				|  |  |  |  |  |               type: 'success', | 
		
	
		
			
				|  |  |               message: '已停止!' |  |  |               message: '已停止!' | 
		
	
		
			
				|  |  | 								}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             }) | 
		
	
		
			
				|  |  |           } |  |  |           } | 
		
	
		
			
				|  |  |         } else { |  |  |         } else { | 
		
	
		
			
				|  |  |             	return this.$message.error("失败了~~~~"); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           return this.$message.error('失败了~~~~') | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |         |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  |     // 编辑 |  |  |     // 编辑 | 
		
	
		
			
				|  |  |     editFormData(row) { |  |  |     editFormData(row) { | 
		
	
		
			
				|  |  | 				this.messageVisible = true; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.messageVisible = true | 
		
	
		
			
				|  |  |       // 根据id查询返回的紧急通知的数据 |  |  |       // 根据id查询返回的紧急通知的数据 | 
		
	
		
			
				|  |  |       const params = { |  |  |       const params = { | 
		
	
		
			
				|  |  | 					notice_id: row.notice_id, |  |  |  | 
		
	
		
			
				|  |  | 				}; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         notice_id: row.notice_id | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |       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.context_color = res.data.notice.contextColor; |  |  |  | 
		
	
		
			
				|  |  | 						this.form.context = res.data.notice.context; |  |  |  | 
		
	
		
			
				|  |  | 						this.form.context_position = res.data.notice.contextPosition; |  |  |  | 
		
	
		
			
				|  |  | 						this.form.context_size = res.data.notice.contextSize; |  |  |  | 
		
	
		
			
				|  |  | 						this.form.notice_id = row.notice_id; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.form.notice_device = res.data.notice.noticeDevice | 
		
	
		
			
				|  |  |  |  |  |           this.form.context_color = res.data.notice.contextColor | 
		
	
		
			
				|  |  |  |  |  |           this.form.context = res.data.notice.context | 
		
	
		
			
				|  |  |  |  |  |           this.form.context_position = res.data.notice.contextPosition | 
		
	
		
			
				|  |  |  |  |  |           this.form.context_size = res.data.notice.contextSize | 
		
	
		
			
				|  |  |  |  |  |           this.form.notice_id = row.notice_id | 
		
	
		
			
				|  |  |           //  判断文字位置 |  |  |           //  判断文字位置 | 
		
	
		
			
				|  |  |           if (this.form.context_position == 1) { |  |  |           if (this.form.context_position == 1) { | 
		
	
		
			
				|  |  | 							this.form.context_position_name = "顶部"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             this.form.context_position_name = '顶部' | 
		
	
		
			
				|  |  |           } else if (this.form.context_position == 2) { |  |  |           } else if (this.form.context_position == 2) { | 
		
	
		
			
				|  |  | 							this.form.context_position_name = "中部"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             this.form.context_position_name = '中部' | 
		
	
		
			
				|  |  |           } else { |  |  |           } else { | 
		
	
		
			
				|  |  | 							this.form.context_position_name = "底部"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             this.form.context_position_name = '底部' | 
		
	
		
			
				|  |  |           } |  |  |           } | 
		
	
		
			
				|  |  |           // 判断速度 |  |  |           // 判断速度 | 
		
	
		
			
				|  |  |           //   if(context_speed_name == 0){ |  |  |           //   if(context_speed_name == 0){ | 
		
	
	
		
			
				|  | @ -432,23 +428,23 @@ | 
		
	
		
			
				|  |  |           // } |  |  |           // } | 
		
	
		
			
				|  |  |           // 判断文字大小 |  |  |           // 判断文字大小 | 
		
	
		
			
				|  |  |           if (this.form.context_size == 0) { |  |  |           if (this.form.context_size == 0) { | 
		
	
		
			
				|  |  | 							this.form.context_size_name = "16"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             this.form.context_size_name = '16' | 
		
	
		
			
				|  |  |           } else if (this.form.context_size == 1) { |  |  |           } else if (this.form.context_size == 1) { | 
		
	
		
			
				|  |  | 							this.form.context_size_name = "22"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             this.form.context_size_name = '22' | 
		
	
		
			
				|  |  |           } else if (this.form.context_size == 2) { |  |  |           } else if (this.form.context_size == 2) { | 
		
	
		
			
				|  |  | 							this.form.context_size_name = "24"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             this.form.context_size_name = '24' | 
		
	
		
			
				|  |  |           } else { |  |  |           } else { | 
		
	
		
			
				|  |  | 							this.form.context_size_name = "30"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             this.form.context_size_name = '30' | 
		
	
		
			
				|  |  |           } |  |  |           } | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  | 				}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 新增 |  |  |     // 新增 | 
		
	
		
			
				|  |  |     addFormData() { |  |  |     addFormData() { | 
		
	
		
			
				|  |  | 				this.messageVisible = true; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.messageVisible = true | 
		
	
		
			
				|  |  |       this.$nextTick(() => { |  |  |       this.$nextTick(() => { | 
		
	
		
			
				|  |  | 					this.form.notice_id = null; |  |  |  | 
		
	
		
			
				|  |  | 				}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         this.form.notice_id = null | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 提交 |  |  |     // 提交 | 
		
	
		
			
				|  |  |     submit() { |  |  |     submit() { | 
		
	
	
		
			
				|  | @ -464,32 +460,32 @@ | 
		
	
		
			
				|  |  |             notice_device: this.form.notice_device, |  |  |             notice_device: this.form.notice_device, | 
		
	
		
			
				|  |  |             notice_devices: this.form.notice_devices, |  |  |             notice_devices: this.form.notice_devices, | 
		
	
		
			
				|  |  |             notice_id: this.form.notice_id, |  |  |             notice_id: this.form.notice_id, | 
		
	
		
			
				|  |  | 							orga_id: "133221333123111", |  |  |  | 
		
	
		
			
				|  |  | 						}; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             orga_id: '133221333123111' | 
		
	
		
			
				|  |  |  |  |  |           } | 
		
	
		
			
				|  |  |           reqEditMessage(params).then((res) => { |  |  |           reqEditMessage(params).then((res) => { | 
		
	
		
			
				|  |  |             if (res.code == 200) { |  |  |             if (res.code == 200) { | 
		
	
		
			
				|  |  |               this.$message({ |  |  |               this.$message({ | 
		
	
		
			
				|  |  | 									type: "success", |  |  |  | 
		
	
		
			
				|  |  |  |  |  |                 type: 'success', | 
		
	
		
			
				|  |  |                 message: this.form.notice_id |  |  |                 message: this.form.notice_id | 
		
	
		
			
				|  |  | 										? "修改紧急通知成功" |  |  |  | 
		
	
		
			
				|  |  | 										: "添加紧急通知成功", |  |  |  | 
		
	
		
			
				|  |  | 								}); |  |  |  | 
		
	
		
			
				|  |  | 								this.messageVisible = false; |  |  |  | 
		
	
		
			
				|  |  | 								this.getUrgentMessage(this.form.notice_id? this.queryInfo:1); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |                   ? '修改紧急通知成功' | 
		
	
		
			
				|  |  |  |  |  |                   : '添加紧急通知成功' | 
		
	
		
			
				|  |  |  |  |  |               }) | 
		
	
		
			
				|  |  |  |  |  |               this.messageVisible = false | 
		
	
		
			
				|  |  |  |  |  |               this.getUrgentMessage(this.form.notice_id ? this.queryInfo : 1) | 
		
	
		
			
				|  |  |             } |  |  |             } | 
		
	
		
			
				|  |  | 						}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           }) | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  | 				}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 所有设备和部分设备的切换数据处理 |  |  |     // 所有设备和部分设备的切换数据处理 | 
		
	
		
			
				|  |  |     clearCheckbox() { |  |  |     clearCheckbox() { | 
		
	
		
			
				|  |  |       if (this.form.notice_device == 1) { |  |  |       if (this.form.notice_device == 1) { | 
		
	
		
			
				|  |  | 					this.form.notice_devices = []; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         this.form.notice_devices = [] | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 多选框 |  |  |     // 多选框 | 
		
	
		
			
				|  |  |     handleSelectionChange(val) { |  |  |     handleSelectionChange(val) { | 
		
	
		
			
				|  |  | 				this.selectedList = val; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.selectedList = val | 
		
	
		
			
				|  |  |       // if (val.length > 0) { |  |  |       // if (val.length > 0) { | 
		
	
		
			
				|  |  |       // 	this.clearBtnDisabled = false; |  |  |       // 	this.clearBtnDisabled = false; | 
		
	
		
			
				|  |  |       // } else { |  |  |       // } else { | 
		
	
	
		
			
				|  | @ -498,52 +494,52 @@ | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 改变文字的颜色 |  |  |     // 改变文字的颜色 | 
		
	
		
			
				|  |  |     headleChangeColor() { |  |  |     headleChangeColor() { | 
		
	
		
			
				|  |  | 				this.form.context_size; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.form.context_size | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 改变文字的大小 |  |  |     // 改变文字的大小 | 
		
	
		
			
				|  |  |     selectSize(selVal) { |  |  |     selectSize(selVal) { | 
		
	
		
			
				|  |  | 				this.form.context_size = selVal.key; |  |  |  | 
		
	
		
			
				|  |  | 				this.form.context_size_name = selVal.name; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.form.context_size = selVal.key | 
		
	
		
			
				|  |  |  |  |  |       this.form.context_size_name = selVal.name | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 改变文字的位置 |  |  |     // 改变文字的位置 | 
		
	
		
			
				|  |  |     selectPosition(selVal) { |  |  |     selectPosition(selVal) { | 
		
	
		
			
				|  |  | 				this.form.context_position = selVal.key; |  |  |  | 
		
	
		
			
				|  |  | 				this.form.context_position_name = selVal.name; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.form.context_position = selVal.key | 
		
	
		
			
				|  |  |  |  |  |       this.form.context_position_name = selVal.name | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 速度 |  |  |     // 速度 | 
		
	
		
			
				|  |  |     selectSpeed(selVal) { |  |  |     selectSpeed(selVal) { | 
		
	
		
			
				|  |  | 				this.form.context_speed = selVal.key; |  |  |  | 
		
	
		
			
				|  |  | 				this.form.context_speed_name = selVal.name; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.form.context_speed = selVal.key | 
		
	
		
			
				|  |  |  |  |  |       this.form.context_speed_name = selVal.name | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 添加设备的对话框 |  |  |     // 添加设备的对话框 | 
		
	
		
			
				|  |  |     addDeviceTag() { |  |  |     addDeviceTag() { | 
		
	
		
			
				|  |  | 				this.selectDeviceVisible = true; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.selectDeviceVisible = true | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 添加设备 |  |  |     // 添加设备 | 
		
	
		
			
				|  |  |     tagHandle(tag) { |  |  |     tagHandle(tag) { | 
		
	
		
			
				|  |  |       // 收集参数 部分设备的列表 |  |  |       // 收集参数 部分设备的列表 | 
		
	
		
			
				|  |  |       if (this.form.notice_devices.length == 0) { |  |  |       if (this.form.notice_devices.length == 0) { | 
		
	
		
			
				|  |  | 					this.form.notice_devices.push({ deviceId: tag.device_id }); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         this.form.notice_devices.push({ deviceId: tag.device_id }) | 
		
	
		
			
				|  |  |       } else { |  |  |       } else { | 
		
	
		
			
				|  |  |         const result = this.form.notice_devices.some((item) => { |  |  |         const result = this.form.notice_devices.some((item) => { | 
		
	
		
			
				|  |  | 						return item.deviceId == tag.device_id; |  |  |  | 
		
	
		
			
				|  |  | 					}); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           return item.deviceId == tag.device_id | 
		
	
		
			
				|  |  |  |  |  |         }) | 
		
	
		
			
				|  |  |         if (!result) { |  |  |         if (!result) { | 
		
	
		
			
				|  |  | 						this.form.notice_devices.push({ deviceId: tag.device_id }); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.form.notice_devices.push({ deviceId: tag.device_id }) | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |       // 添加设备不能重复 不重复才添加 |  |  |       // 添加设备不能重复 不重复才添加 | 
		
	
		
			
				|  |  |       if (this.deviceTags.length == 0) { |  |  |       if (this.deviceTags.length == 0) { | 
		
	
		
			
				|  |  | 					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_name == tag.device_name) | 
		
	
		
			
				|  |  |         if (!current) { |  |  |         if (!current) { | 
		
	
		
			
				|  |  | 						this.deviceTags.push(tag); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.deviceTags.push(tag) | 
		
	
		
			
				|  |  |         } else { |  |  |         } else { | 
		
	
		
			
				|  |  | 						this.$message("请勿添加重复的设备!"); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.$message('请勿添加重复的设备!') | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |         // !this.deviceTags.some(item => item.device_name === tag.device_name) |  |  |         // !this.deviceTags.some(item => item.device_name === tag.device_name) | 
		
	
		
			
				|  |  |         //  && this.deviceTags.push(tag) |  |  |         //  && this.deviceTags.push(tag) | 
		
	
	
		
			
				|  | @ -551,25 +547,25 @@ | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 单独删除某一个设备 |  |  |     // 单独删除某一个设备 | 
		
	
		
			
				|  |  |     handleClose(tag) { |  |  |     handleClose(tag) { | 
		
	
		
			
				|  |  | 				this.deviceTags.splice(this.deviceTags.indexOf(tag), 1); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.deviceTags.splice(this.deviceTags.indexOf(tag), 1) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 清空设备 |  |  |     // 清空设备 | 
		
	
		
			
				|  |  |     clearDevice() { |  |  |     clearDevice() { | 
		
	
		
			
				|  |  | 				this.deviceTags = []; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.deviceTags = [] | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 关闭重置表单 |  |  |     // 关闭重置表单 | 
		
	
		
			
				|  |  |     closeDialog() { |  |  |     closeDialog() { | 
		
	
		
			
				|  |  | 				this.messageVisible = false; |  |  |  | 
		
	
		
			
				|  |  | 				this.$refs.form.resetFields(); |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.messageVisible = false | 
		
	
		
			
				|  |  |  |  |  |       this.$refs.form.resetFields() | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 每条显示数据改变时的事件 |  |  |     // 每条显示数据改变时的事件 | 
		
	
		
			
				|  |  |     handleSizeChange(size) { |  |  |     handleSizeChange(size) { | 
		
	
		
			
				|  |  |       // 整理参数 |  |  |       // 整理参数 | 
		
	
		
			
				|  |  |       this.queryInfo.size = size |  |  |       this.queryInfo.size = size | 
		
	
		
			
				|  |  |       this.getUrgentMessage(); |  |  |  | 
		
	
		
			
				|  |  |     }, |  |  |  | 
		
	
		
			
				|  |  | 		}, |  |  |  | 
		
	
		
			
				|  |  | 	}; |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.getUrgentMessage() | 
		
	
		
			
				|  |  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  |  | } | 
		
	
		
			
				|  |  | </script> |  |  | </script> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | <style lang="scss" scoped> |  |  | <style lang="scss" scoped> | 
		
	
	
		
			
				|  | 
 |