@@ -139,6 +140,7 @@
import { useDictStore } from "@/stores/modules";
import Form from "./components/form.vue";
import userForm from "./components/userForm.vue";
+ import moveForm from "./components/moveForm.vue";
import { FormOptEnum, SysDictEnum, MenuTypeDictEnum } from "@/enums";
// import './aliyun-rts-sdk.js'
import './ali.js'
@@ -291,29 +293,13 @@ const remove = (node: Node, data: Tree) => {
await useHandleData(monitorLIVEApi.delete, { ids }, msg);
RefreshTable();
}
- async function move(ids: string[], msg: string) {
- return new Promise((resolve, reject) => {
- ElMessageBox.confirm(`是否${msg}?`, "温馨提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: 'warning',
- draggable: true
- })
- .then(async () => {
- // const res = await api(params);
- // if (!res) return reject(false);
- // ElMessage({
- // type: "success",
- // message: `${message}成功!`
- // });
- resolve(true);
- })
- .catch(() => {
- //啥也不干
- });
- })
- }
+
+
+ const moveFormRef = ref
| null>(null);
+ function omMove(opt: FormOptEnum, record: {} | SysOrg.SysOrgInfo = {}) {
+ moveFormRef.value?.omMove({ opt: opt, record: record, successful: RefreshTable });
+}
/**
* 刷新表格
*/
diff --git a/SafeCampus.WEB/src/views/warn/zjrq/index.vue b/SafeCampus.WEB/src/views/warn/zjrq/index.vue
index 5acb962..be69a3d 100644
--- a/SafeCampus.WEB/src/views/warn/zjrq/index.vue
+++ b/SafeCampus.WEB/src/views/warn/zjrq/index.vue
@@ -110,7 +110,28 @@ import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
import { useDictStore } from "@/stores/modules";
import { FormOptEnum, SysDictEnum, MenuTypeDictEnum } from "@/enums";
const visible = ref(false); //是否显示表单
-
+onMounted(() => {
+ getWarnTypeList();
+});
+let warnOptions = ref([]);
+function getWarnTypeList() {
+ setTimeout(async ()=> {
+ await warnZJRQApi.warnType({}).then(res => {
+ let { code, data } = res;
+
+ if (code == 200) {
+ warnOptions.value = data.map(item => {
+ return {
+ label: item.name,
+ value: item.code
+ };
+ })
+
+ }
+ });
+ })
+
+}
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTable = ref();
const dictStore = useDictStore();
@@ -118,7 +139,7 @@ const dictStore = useDictStore();
// 表格配置项
const columns: ColumnProps[] = [
{ type: "selection", fixed: "left", width: 80 },
- { prop: "searchKey", label: "关键字", search: { el: "input" }, isShow: false },
+ // { prop: "searchKey", label: "关键字", search: { el: "input" }, isShow: false },
// { prop: "cameraId", label: "所属摄像头", search: { el: "input" }, isShow: false },
// { prop: "alarmTypeDesc", label: "告警类型", search: { el: "input" }, isShow: false },
{
@@ -151,21 +172,75 @@ const columns: ColumnProps[] = [
}
},
{
- prop: "alarmTypeDesc",
- label: "告警类型"
+ prop: "alarmType",
+ label: "告警类型",
+ enum: warnOptions,
+ search: {
+ el: "tree-select",
+ // span: 1
+ }
},
{
prop: "warnHand",
label: "处理状态",
+ enum: [
+ {
+ label: "已处理",
+ value: 1
+ },
+ {
+ label: "未处理",
+ value: 0
+ }
+ ],
render: scope => {
if (scope.row.warnHand === 1) {
return "已处理";
} else {
return "未处理";
}
- }
+ },
+ search: {
+ el: "tree-select",
+ // span: 1
+ }
},
- { prop: "tick", label: "预警时间" },
+ {
+ prop: "tick",
+ label: "预警时间",
+ search: {
+ // 自定义 search 组件
+ span: 1,
+ render: ({ searchParam }) => {
+ return (
+
+
+ -
+
+
+ );
+ }
+ }
+
+ },
{ prop: "operation", label: "操作", width: 250, fixed: "right" }
];