|
@@ -8,6 +8,7 @@
|
|
|
:row-selection="options.rowSelection"
|
|
|
:loading="loading"
|
|
|
bordered
|
|
|
+ @resizeColumn="handleResizeColumn"
|
|
|
>
|
|
|
<template #operator>
|
|
|
<!-- 搜索区域 -->
|
|
@@ -40,28 +41,6 @@
|
|
|
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入关键字" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <!-- <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
|
|
|
- <a-form-item label="排序字段" name="sortField">
|
|
|
- <a-input
|
|
|
- v-model:value="searchFormState.sortField"
|
|
|
- placeholder="请输入排序字段(驼峰名称。如:userName)"
|
|
|
- allowClear
|
|
|
- />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
|
|
|
- <a-form-item label="排序方式" name="sortOrder">
|
|
|
- <a-select
|
|
|
- v-model:value="searchFormState.sortOrder"
|
|
|
- placeholder="请选择排序方式"
|
|
|
- style="width: 100%"
|
|
|
- allowClear
|
|
|
- >
|
|
|
- <a-select-option value="ASCEND">升序</a-select-option>
|
|
|
- <a-select-option value="DESCEND">降序</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col> -->
|
|
|
</a-form>
|
|
|
</a-row>
|
|
|
</div>
|
|
@@ -79,7 +58,7 @@
|
|
|
</a-button>
|
|
|
</div>
|
|
|
|
|
|
- <div class="btn-right">
|
|
|
+ <!-- <div class="btn-right">
|
|
|
<a-button class="xn-mg08" @click="handle">
|
|
|
<template #icon><logout-outlined /></template>处理
|
|
|
</a-button>
|
|
@@ -92,13 +71,22 @@
|
|
|
<a-button>
|
|
|
<template #icon><download-outlined /></template>导出
|
|
|
</a-button>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<template #bodyCell="{ column, record, index }">
|
|
|
<!-- 序号 -->
|
|
|
<template v-if="column.dataIndex === 'index'">{{ index + 1 }} </template>
|
|
|
+ <template v-if="column.dataIndex === 'alarmUsers'">
|
|
|
+ <span v-for="(e, i) in record.alarmUsers" :key="i">{{ e.userName + ',' }} </span></template
|
|
|
+ >
|
|
|
+ <template v-if="column.dataIndex === 'priority'">
|
|
|
+ <a-tag :color="record.priority == '高' ? '#f56c6c' : record.priority == '低' ? '#67c23a' : '#fd0303'">{{
|
|
|
+ record.priority
|
|
|
+ }}</a-tag>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template v-if="column.dataIndex === 'options'">
|
|
|
<a-button type="link" size="small" @click="handlerEdit(record)">编辑</a-button>
|
|
|
<a-popconfirm title="确定要删除吗?" @confirm="handlerDel(record)">
|
|
@@ -116,12 +104,9 @@
|
|
|
<script setup>
|
|
|
import { message } from 'ant-design-vue'
|
|
|
import { debounce, cloneDeep } from 'lodash-es'
|
|
|
-
|
|
|
import Form from './components/form.vue'
|
|
|
import DetailModal from './components/DetailModal.vue'
|
|
|
-
|
|
|
import { getPage, deleteMonitornotice } from '@/api/coldchain/monitornotice'
|
|
|
-
|
|
|
import { initColumns } from './initData'
|
|
|
|
|
|
const loading = ref(false)
|
|
@@ -141,6 +126,11 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 可伸缩列
|
|
|
+ const handleResizeColumn = (w, col) => {
|
|
|
+ col.width = w
|
|
|
+ }
|
|
|
+
|
|
|
const columns = ref(initColumns)
|
|
|
|
|
|
const tableData = ref([]) // 用来存储表格数据
|