Browse Source

预警问题

main
kami 1 year ago
parent
commit
4837cac701
  1. 142
      src/views/work/Alarm.vue

142
src/views/work/Alarm.vue

@ -4,7 +4,7 @@
<el-form :label-width="120"> <el-form :label-width="120">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="预警类型"> <el-form-item label="提醒类型">
<div class="flex gap"> <div class="flex gap">
<el-select <el-select
v-model="query.alarmTypeId" v-model="query.alarmTypeId"
@ -18,7 +18,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="预警时间"> <el-form-item label="提醒时间">
<date-time-range-picker-ext <date-time-range-picker-ext
v-model="query.discoveryTime" v-model="query.discoveryTime"
/> />
@ -59,7 +59,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="预警内容"> <el-form-item label="提醒内容">
<el-input <el-input
placeholder="请输入" placeholder="请输入"
v-model="query.alarmContent" v-model="query.alarmContent"
@ -89,12 +89,12 @@
<div class="table-container" v-loading="loading"> <div class="table-container" v-loading="loading">
<el-table :data="list" ref="tableRef"> <el-table :data="list" ref="tableRef">
<el-table-column <el-table-column
label="预警时间" label="提醒时间"
prop="alarmTime" prop="alarmTime"
width="150" width="150"
/> />
<el-table-column <el-table-column
label="预警类型" label="提醒类型"
prop="alarmType" prop="alarmType"
width="90" width="90"
/> />
@ -104,7 +104,7 @@
width="150" width="150"
/> />
<el-table-column <el-table-column
label="预警内容" label="提醒内容"
prop="alarmContent" prop="alarmContent"
/> />
<el-table-column label="回复情况" width="110"> <el-table-column label="回复情况" width="110">
@ -118,7 +118,7 @@
<el-button <el-button
type="primary" type="primary"
link link
@click="handleAction(row)" @click="showDetail(row)"
>查看详情 >查看详情
</el-button> </el-button>
<el-button <el-button
@ -148,9 +148,46 @@
</main> </main>
<el-dialog v-model="editShow" title="回复问题" width="900px"> <el-dialog v-model="editShow" title="回复问题" width="900px">
<el-form label-width="148" :model="formData" ref="formRef"> <el-form label-width="148" :model="formData" ref="formRef">
<el-form-item
label="提醒类型"
>
<el-input
v-model="formData.alarmType"
style="width: 280px"
disabled
/>
</el-form-item>
<el-form-item
label="提醒时间"
>
<el-input
v-model="formData.alarmTime"
disabled
style="width: 280px"
/>
</el-form-item>
<el-form-item
label="被通知单位"
>
<el-input
v-model="formData.notificationDepartName"
disabled
style="width: 280px"
/>
</el-form-item>
<el-form-item
label="提醒内容"
>
<el-input
type="textarea"
v-model="formData.alarmContent"
:autosize="{ minRows: 6 }"
disabled
style="width: 280px"
/>
</el-form-item>
<el-form-item <el-form-item
label="回复问题" label="回复问题"
prop="thingDesc"
:rules="{ :rules="{
required: true, required: true,
message: '请输入回复内容', message: '请输入回复内容',
@ -160,18 +197,82 @@
<el-input <el-input
type="textarea" type="textarea"
placeholder="请输入回复内容" placeholder="请输入回复内容"
v-model="formData.thingDesc" v-model="formData.replyResultContent"
:autosize="{ minRows: 4 }" :autosize="{ minRows: 6 }"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
<footer class="flex end"> <footer class="flex end">
<el-button @click="editShow = false" size="large">取消</el-button> <el-button @click="editShow = false" size="large">取消</el-button>
<el-button type="primary" @click="handleSumbit" size="large" <el-button type="primary" @click="handleSumbit" size="large"
>确定</el-button >确定
</el-button
> >
</footer> </footer>
</el-dialog> </el-dialog>
<el-dialog
title="查看详情"
v-model="dialogShow"
width="600"
>
<el-form :model="showData" :label-width="120" ref="fomrRef">
<el-form-item
label="提醒类型"
>
<el-input
v-model="showData.alarmType"
style="width: 280px"
disabled
/>
</el-form-item>
<el-form-item
label="提醒时间"
>
<el-input
v-model="showData.alarmTime"
disabled
style="width: 280px"
/>
</el-form-item>
<el-form-item
label="被通知单位"
>
<el-input
v-model="showData.notificationDepartName"
disabled
style="width: 280px"
/>
</el-form-item>
<el-form-item
label="提醒内容"
>
<el-input
type="textarea"
v-model="showData.alarmContent"
:autosize="{ minRows: 6 }"
disabled
style="width: 280px"
/>
</el-form-item>
<el-form-item
v-if="showData.replyState == 1"
label="回复内容"
>
<el-input
type="textarea"
v-model="showData.replyResultContent"
disabled
:autosize="{ minRows: 4 }"
style="width: 280px"
/>
</el-form-item>
</el-form>
<footer class="flex end">
<el-button @click="dialogShow = false">关闭</el-button>
</footer>
</el-dialog>
</div> </div>
</template> </template>
@ -198,8 +299,16 @@ const query = ref({
const list = ref([]); const list = ref([]);
const total = ref(0); const total = ref(0);
let showData = ref({})
let dialogShow = ref(false)
const loading = ref(true); const loading = ref(true);
const showDetail = (data) => {
showData.value = data;
dialogShow.value = true;
}
function getList() { function getList() {
let param = { let param = {
current: query.value.current, current: query.value.current,
@ -229,17 +338,6 @@ function getList() {
}); });
} }
function handleTableSort(orderObj) {
if (orderObj.order) {
query.value.order = orderObj.order
query.value.orderProp = orderObj.prop
} else {
query.value.order = ''
query.value.orderProp = ''
}
getList()
}
const tableRef = ref() const tableRef = ref()
function reset() { function reset() {

Loading…
Cancel
Save