|
@ -3,26 +3,11 @@ |
|
|
<el-row :gutter="15"> |
|
|
<el-row :gutter="15"> |
|
|
<el-col> |
|
|
<el-col> |
|
|
<!-- v-loading="crud.loading" --> |
|
|
<!-- v-loading="crud.loading" --> |
|
|
<el-table |
|
|
|
|
|
ref="table" |
|
|
|
|
|
:data="urgentMessage" |
|
|
|
|
|
:header-cell-style="{ background: '#3a8aeb', color: '#fff' }" |
|
|
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
<el-table ref="table" :data="urgentMessage" :header-cell-style="{ background: '#3a8aeb', color: '#fff' }" @selection-change="handleSelectionChange"> |
|
|
<el-table-column type="selection" width="55" /> |
|
|
<el-table-column type="selection" width="55" /> |
|
|
<!-- prop="name" --> |
|
|
<!-- prop="name" --> |
|
|
<el-table-column |
|
|
|
|
|
label="序号" |
|
|
|
|
|
type="index" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="50" |
|
|
|
|
|
/> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
label="发布内容" |
|
|
|
|
|
align="center" |
|
|
|
|
|
prop="context" |
|
|
|
|
|
width="400" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
<el-table-column label="序号" type="index" align="center" width="50" /> |
|
|
|
|
|
<el-table-column label="发布内容" align="center" prop="context" width="400"> |
|
|
<template slot-scope="{ row }"> |
|
|
<template slot-scope="{ row }"> |
|
|
<div>{{ row.context }}</div> |
|
|
<div>{{ row.context }}</div> |
|
|
</template> |
|
|
</template> |
|
@ -41,194 +26,73 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
|
|
|
label="操作" |
|
|
|
|
|
width="120px" |
|
|
|
|
|
align="center" |
|
|
|
|
|
fixed="right" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
<el-table-column label="操作" width="120px" align="center" fixed="right"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
class="edit_btn" |
|
|
|
|
|
@click="editFormData(scope.row)" |
|
|
|
|
|
>编辑</el-button> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
:class="['start_btn', { stop_btn: scope.row.is_state == 1 }]" |
|
|
|
|
|
@click="isStopHandle(scope.$index, scope.row)" |
|
|
|
|
|
>{{ scope.row.is_state == 1 ? "停止" : "恢复" }}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" class="edit_btn" @click="editFormData(scope.row)">编辑</el-button> |
|
|
|
|
|
<el-button type="primary" :class="['start_btn', { stop_btn: scope.row.is_state == 1 }]" @click="isStopHandle(scope.$index, scope.row)">{{ scope.row.is_state == 1 ? "停止" : "恢复" }}</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<!-- 分页器 --> |
|
|
<!-- 分页器 --> |
|
|
<el-pagination |
|
|
|
|
|
style="margin-top: 20px; text-align: center" |
|
|
|
|
|
:current-page="queryInfo.page" |
|
|
|
|
|
:total="total" |
|
|
|
|
|
:page-size="queryInfo.size" |
|
|
|
|
|
:pager-count="5" |
|
|
|
|
|
:page-sizes="[3, 5, 10]" |
|
|
|
|
|
layout="prev, pager, next, jumper,->,sizes,total" |
|
|
|
|
|
@current-change="getUrgentMessage" |
|
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<el-pagination style="margin-top: 20px; text-align: center" :current-page="queryInfo.page" :total="total" :page-size="queryInfo.size" :pager-count="5" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getUrgentMessage" @size-change="handleSizeChange" /> |
|
|
|
|
|
|
|
|
<!-- 编辑紧急通知 --> |
|
|
<!-- 编辑紧急通知 --> |
|
|
<div class="publish_layer"> |
|
|
<div class="publish_layer"> |
|
|
<el-dialog |
|
|
|
|
|
title="紧急发布" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
:show-close="false" |
|
|
|
|
|
:visible.sync="messageVisible" |
|
|
|
|
|
width="872px" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
<el-dialog :title="form.notice_id==null? '紧急发布':'编辑'" :close-on-click-modal="false" :show-close="false" :visible.sync="messageVisible" width="872px"> |
|
|
<el-form ref="form" :model="form" size="small" label-width="100px"> |
|
|
<el-form ref="form" :model="form" size="small" label-width="100px"> |
|
|
<el-form-item |
|
|
|
|
|
label="文本颜色" |
|
|
|
|
|
prop="context_color" |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
|
|
|
<el-form-item label="文本颜色" prop="context_color" :rules="[ |
|
|
{ required: true, message: '请选择文本颜色', trigger: '' }, |
|
|
{ required: true, message: '请选择文本颜色', trigger: '' }, |
|
|
]" |
|
|
|
|
|
> |
|
|
|
|
|
<colorPicker |
|
|
|
|
|
v-model="form.context_color" |
|
|
|
|
|
class="txt_color" |
|
|
|
|
|
@change="headleChangeColor" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
]"> |
|
|
|
|
|
<colorPicker v-model="form.context_color" class="txt_color" @change="headleChangeColor" /> |
|
|
<el-input v-show="false" v-model="form.context_color" /> |
|
|
<el-input v-show="false" v-model="form.context_color" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
|
|
|
label="文本内容" |
|
|
|
|
|
prop="context" |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
|
|
|
<el-form-item label="文本内容" prop="context" :rules="[ |
|
|
{ required: true, message: '请输入文本内容', trigger: 'blur' }, |
|
|
{ required: true, message: '请输入文本内容', trigger: 'blur' }, |
|
|
]" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="form.context" |
|
|
|
|
|
type="textarea" |
|
|
|
|
|
rows="6" |
|
|
|
|
|
style="width: 674px" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
]"> |
|
|
|
|
|
<el-input v-model="form.context" type="textarea" rows="6" style="width: 674px" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
|
|
|
label="文本大小" |
|
|
|
|
|
prop="context_size_name" |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
|
|
|
<el-form-item label="文本大小" prop="context_size_name" :rules="[ |
|
|
{ required: true, message: '请选择文本大小', trigger: 'change' }, |
|
|
{ required: true, message: '请选择文本大小', trigger: 'change' }, |
|
|
]" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="form.context_size_name" |
|
|
|
|
|
size="small" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
@change="selectSize" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in sizeData" |
|
|
|
|
|
:key="item.key" |
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
:value="item" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
]"> |
|
|
|
|
|
<el-select v-model="form.context_size_name" size="small" class="filter-item" @change="selectSize"> |
|
|
|
|
|
<el-option v-for="item in sizeData" :key="item.key" :label="item.name" :value="item" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
|
|
|
label="文本位置" |
|
|
|
|
|
prop="context_position_name" |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
|
|
|
<el-form-item label="文本位置" prop="context_position_name" :rules="[ |
|
|
{ required: true, message: '请选择文本位置', trigger: 'change' }, |
|
|
{ required: true, message: '请选择文本位置', trigger: 'change' }, |
|
|
]" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="form.context_position_name" |
|
|
|
|
|
size="small" |
|
|
|
|
|
value-key="name" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
@change="selectPosition" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in positionData" |
|
|
|
|
|
:key="item.key" |
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
:value="item" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
]"> |
|
|
|
|
|
<el-select v-model="form.context_position_name" size="small" value-key="name" class="filter-item" @change="selectPosition"> |
|
|
|
|
|
<el-option v-for="item in positionData" :key="item.key" :label="item.name" :value="item" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
|
|
|
label="滚动速度" |
|
|
|
|
|
prop="context_speed_name" |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
|
|
|
<el-form-item label="滚动速度" prop="context_speed_name" :rules="[ |
|
|
{ required: true, message: '请选择滚动速度', trigger: 'change' }, |
|
|
{ required: true, message: '请选择滚动速度', trigger: 'change' }, |
|
|
]" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="form.context_speed_name" |
|
|
|
|
|
size="small" |
|
|
|
|
|
class="filter-item" |
|
|
|
|
|
@change="selectSpeed" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in speedData" |
|
|
|
|
|
:key="item.key" |
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
:value="item" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
]"> |
|
|
|
|
|
<el-select v-model="form.context_speed_name" size="small" class="filter-item" @change="selectSpeed"> |
|
|
|
|
|
<el-option v-for="item in speedData" :key="item.key" :label="item.name" :value="item" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item |
|
|
|
|
|
label="选择设备" |
|
|
|
|
|
prop="notice_device" |
|
|
|
|
|
:rules="[ |
|
|
|
|
|
|
|
|
<el-form-item label="选择设备" prop="notice_device" :rules="[ |
|
|
{ required: true, message: '请选择设备', trigger: 'change' }, |
|
|
{ required: true, message: '请选择设备', trigger: 'change' }, |
|
|
]" |
|
|
|
|
|
> |
|
|
|
|
|
<el-radio-group |
|
|
|
|
|
v-model="form.notice_device" |
|
|
|
|
|
@change="clearCheckbox()" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
]"> |
|
|
|
|
|
<el-radio-group v-model="form.notice_device" @change="clearCheckbox()"> |
|
|
<el-radio :label="1" value="all">所有设备</el-radio> |
|
|
<el-radio :label="1" value="all">所有设备</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 :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"> |
|
|
<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 |
|
|
|
|
|
v-for="tag in deviceTags" |
|
|
|
|
|
:key="tag.device_id" |
|
|
|
|
|
closable |
|
|
|
|
|
:disable-transitions="true" |
|
|
|
|
|
:hit="false" |
|
|
|
|
|
context_color="#cbe3ff" |
|
|
|
|
|
@close="handleClose(tag)" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
<el-tag v-for="tag in deviceTags" :key="tag.device_id" closable :disable-transitions="true" :hit="false" context_color="#cbe3ff" @close="handleClose(tag)"> |
|
|
{{ tag.device_name }} |
|
|
{{ tag.device_name }} |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
</div> |
|
|
</div> |
|
@ -242,23 +106,9 @@ |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 添加发布的设备 --> |
|
|
<!-- 添加发布的设备 --> |
|
|
<!-- 添加发布的设备 --> |
|
|
|
|
|
<div class="add_device_layer"> |
|
|
<div class="add_device_layer"> |
|
|
<el-dialog |
|
|
|
|
|
title="请选择设备" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
:visible.sync="selectDeviceVisible" |
|
|
|
|
|
width="400px" |
|
|
|
|
|
> |
|
|
|
|
|
<el-tag |
|
|
|
|
|
v-for="tag in deviceList" |
|
|
|
|
|
:key="tag.device_id" |
|
|
|
|
|
:disable-transitions="true" |
|
|
|
|
|
:hit="false" |
|
|
|
|
|
color="#cbe3ff" |
|
|
|
|
|
class="all_tags" |
|
|
|
|
|
@click="tagHandle(tag)" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
<el-dialog title="请选择设备" :close-on-click-modal="false" :visible.sync="selectDeviceVisible" width="400px"> |
|
|
|
|
|
<el-tag v-for="tag in deviceList" :key="tag.device_id" :disable-transitions="true" :hit="false" color="#cbe3ff" class="all_tags" @click="tagHandle(tag)"> |
|
|
{{ tag.device_name }} |
|
|
{{ tag.device_name }} |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
@ -278,11 +128,11 @@ import { |
|
|
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: { |
|
@ -334,13 +184,13 @@ export default { |
|
|
urgentMessage: [] |
|
|
urgentMessage: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
|
|
|
|
|
|
mounted () { |
|
|
this.getUrgentMessage() |
|
|
this.getUrgentMessage() |
|
|
this.getDevice() |
|
|
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) => { |
|
@ -352,7 +202,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 获取设备列表的信息 |
|
|
// 获取设备列表的信息 |
|
|
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) { |
|
@ -364,7 +214,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 紧急通知的状态 is_state为1 发布中 2 停止 |
|
|
// 紧急通知的状态 is_state为1 发布中 2 停止 |
|
|
// row.is_state == 1 ? "停止" : "恢复" |
|
|
// row.is_state == 1 ? "停止" : "恢复" |
|
|
isStopHandle(index, row) { |
|
|
|
|
|
|
|
|
isStopHandle (index, row) { |
|
|
console.log(row) |
|
|
console.log(row) |
|
|
// console.log(index) |
|
|
// console.log(index) |
|
|
if (row.is_state == 1) { |
|
|
if (row.is_state == 1) { |
|
@ -396,7 +246,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 编辑 |
|
|
// 编辑 |
|
|
editFormData(row) { |
|
|
|
|
|
|
|
|
editFormData (row) { |
|
|
this.messageVisible = true |
|
|
this.messageVisible = true |
|
|
// 根据id查询返回的紧急通知的数据 |
|
|
// 根据id查询返回的紧急通知的数据 |
|
|
const params = { |
|
|
const params = { |
|
@ -440,14 +290,14 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 新增 |
|
|
// 新增 |
|
|
addFormData() { |
|
|
|
|
|
|
|
|
addFormData () { |
|
|
this.messageVisible = true |
|
|
this.messageVisible = true |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.form.notice_id = null |
|
|
this.form.notice_id = null |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 提交 |
|
|
// 提交 |
|
|
submit() { |
|
|
|
|
|
|
|
|
submit () { |
|
|
this.$refs.form.validate((valid) => { |
|
|
this.$refs.form.validate((valid) => { |
|
|
// 修改 |
|
|
// 修改 |
|
|
if (valid) { |
|
|
if (valid) { |
|
@ -478,13 +328,13 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 所有设备和部分设备的切换数据处理 |
|
|
// 所有设备和部分设备的切换数据处理 |
|
|
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; |
|
@ -493,30 +343,31 @@ export default { |
|
|
// } |
|
|
// } |
|
|
}, |
|
|
}, |
|
|
// 改变文字的颜色 |
|
|
// 改变文字的颜色 |
|
|
headleChangeColor() { |
|
|
|
|
|
|
|
|
headleChangeColor () { |
|
|
this.form.context_size |
|
|
this.form.context_size |
|
|
}, |
|
|
}, |
|
|
// 改变文字的大小 |
|
|
// 改变文字的大小 |
|
|
selectSize(selVal) { |
|
|
|
|
|
|
|
|
selectSize (selVal) { |
|
|
this.form.context_size = selVal.key |
|
|
this.form.context_size = selVal.key |
|
|
this.form.context_size_name = selVal.name |
|
|
this.form.context_size_name = selVal.name |
|
|
}, |
|
|
}, |
|
|
// 改变文字的位置 |
|
|
// 改变文字的位置 |
|
|
selectPosition(selVal) { |
|
|
|
|
|
|
|
|
selectPosition (selVal) { |
|
|
|
|
|
console.log(selVal) |
|
|
this.form.context_position = selVal.key |
|
|
this.form.context_position = selVal.key |
|
|
this.form.context_position_name = selVal.name |
|
|
this.form.context_position_name = selVal.name |
|
|
}, |
|
|
}, |
|
|
// 速度 |
|
|
// 速度 |
|
|
selectSpeed(selVal) { |
|
|
|
|
|
|
|
|
selectSpeed (selVal) { |
|
|
this.form.context_speed = selVal.key |
|
|
this.form.context_speed = selVal.key |
|
|
this.form.context_speed_name = selVal.name |
|
|
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 }) |
|
@ -534,8 +385,8 @@ export default { |
|
|
this.deviceTags.push(tag) |
|
|
this.deviceTags.push(tag) |
|
|
} else { |
|
|
} else { |
|
|
const current = |
|
|
const current = |
|
|
this.deviceTags && |
|
|
|
|
|
this.deviceTags.some((item) => item.device_name == tag.device_name) |
|
|
|
|
|
|
|
|
this.deviceTags && |
|
|
|
|
|
this.deviceTags.some((item) => item.device_name == tag.device_name) |
|
|
if (!current) { |
|
|
if (!current) { |
|
|
this.deviceTags.push(tag) |
|
|
this.deviceTags.push(tag) |
|
|
} else { |
|
|
} else { |
|
@ -546,20 +397,20 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 单独删除某一个设备 |
|
|
// 单独删除某一个设备 |
|
|
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.messageVisible = false |
|
|
this.$refs.form.resetFields() |
|
|
this.$refs.form.resetFields() |
|
|
}, |
|
|
}, |
|
|
// 每条显示数据改变时的事件 |
|
|
// 每条显示数据改变时的事件 |
|
|
handleSizeChange(size) { |
|
|
|
|
|
|
|
|
handleSizeChange (size) { |
|
|
// 整理参数 |
|
|
// 整理参数 |
|
|
this.queryInfo.size = size |
|
|
this.queryInfo.size = size |
|
|
this.getUrgentMessage() |
|
|
this.getUrgentMessage() |
|
@ -569,84 +420,84 @@ export default { |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
.list_warp { |
|
|
|
|
|
padding: 0 24px; |
|
|
|
|
|
.stop_txt { |
|
|
|
|
|
color: #3a8aeb; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.txt_color { |
|
|
|
|
|
margin-top: 12px; |
|
|
|
|
|
} |
|
|
|
|
|
::v-deep .el-radio-group { |
|
|
|
|
|
display: block; |
|
|
|
|
|
.el-radio { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
line-height: 40px; |
|
|
|
|
|
.radio_tip { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
right: -45px; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
display: block; |
|
|
|
|
|
width: 42px; |
|
|
|
|
|
height: 21px; |
|
|
|
|
|
line-height: 21px; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
background: url(~@/assets/images/an-tj.png) no-repeat; |
|
|
|
|
|
background-size: 42px 21px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.select_all_tip { |
|
|
|
|
|
width: 336px; |
|
|
|
|
|
height: 32px; |
|
|
|
|
|
line-height: 32px; |
|
|
|
|
|
margin: -20px 0 0 100px; |
|
|
|
|
|
padding: 0 14px; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
color: #999; |
|
|
|
|
|
background: #fff; |
|
|
|
|
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.14); |
|
|
|
|
|
} |
|
|
|
|
|
.select_other { |
|
|
|
|
|
width: 600px; |
|
|
|
|
|
margin: -20px 0 0 100px; |
|
|
|
|
|
padding: 18px 23px; |
|
|
|
|
|
background: #f8f8f8; |
|
|
|
|
|
border: 1px solid #dcdde3; |
|
|
|
|
|
border-radius: 4px; |
|
|
|
|
|
.other_tip { |
|
|
|
|
|
line-height: 24px; |
|
|
|
|
|
span { |
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
margin-left: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.el-button { |
|
|
|
|
|
padding: 5px 8px; |
|
|
|
|
|
border: none !important; |
|
|
|
|
|
} |
|
|
|
|
|
.delt_btn { |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
background-color: #ee5747 !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.el-tag--small { |
|
|
|
|
|
height: 28px; |
|
|
|
|
|
line-height: 26px; |
|
|
|
|
|
padding: 0 24px; |
|
|
|
|
|
margin: 18px 16px 0 0; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
// color: #3a8aeb; |
|
|
|
|
|
::v-deep .el-icon-close { |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.add_device_layer { |
|
|
|
|
|
::v-deep .el-dialog__body { |
|
|
|
|
|
padding: 0 20px 30px 20px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.list_warp { |
|
|
|
|
|
padding: 0 24px; |
|
|
|
|
|
.stop_txt { |
|
|
|
|
|
color: #3a8aeb; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.txt_color { |
|
|
|
|
|
margin-top: 12px; |
|
|
|
|
|
} |
|
|
|
|
|
::v-deep .el-radio-group { |
|
|
|
|
|
display: block; |
|
|
|
|
|
.el-radio { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
line-height: 40px; |
|
|
|
|
|
.radio_tip { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
right: -45px; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
display: block; |
|
|
|
|
|
width: 42px; |
|
|
|
|
|
height: 21px; |
|
|
|
|
|
line-height: 21px; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
background: url(~@/assets/images/an-tj.png) no-repeat; |
|
|
|
|
|
background-size: 42px 21px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.select_all_tip { |
|
|
|
|
|
width: 336px; |
|
|
|
|
|
height: 32px; |
|
|
|
|
|
line-height: 32px; |
|
|
|
|
|
margin: -20px 0 0 100px; |
|
|
|
|
|
padding: 0 14px; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
color: #999; |
|
|
|
|
|
background: #fff; |
|
|
|
|
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.14); |
|
|
|
|
|
} |
|
|
|
|
|
.select_other { |
|
|
|
|
|
width: 600px; |
|
|
|
|
|
margin: -20px 0 0 100px; |
|
|
|
|
|
padding: 18px 23px; |
|
|
|
|
|
background: #f8f8f8; |
|
|
|
|
|
border: 1px solid #dcdde3; |
|
|
|
|
|
border-radius: 4px; |
|
|
|
|
|
.other_tip { |
|
|
|
|
|
line-height: 24px; |
|
|
|
|
|
span { |
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
margin-left: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.el-button { |
|
|
|
|
|
padding: 5px 8px; |
|
|
|
|
|
border: none !important; |
|
|
|
|
|
} |
|
|
|
|
|
.delt_btn { |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
background-color: #ee5747 !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.el-tag--small { |
|
|
|
|
|
height: 28px; |
|
|
|
|
|
line-height: 26px; |
|
|
|
|
|
padding: 0 24px; |
|
|
|
|
|
margin: 18px 16px 0 0; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
// color: #3a8aeb; |
|
|
|
|
|
::v-deep .el-icon-close { |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.add_device_layer { |
|
|
|
|
|
::v-deep .el-dialog__body { |
|
|
|
|
|
padding: 0 20px 30px 20px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |