修改我的布控编辑页面
This commit is contained in:
@ -76,6 +76,10 @@ const submit = async () => {
|
||||
await qcckPost(formData, url);
|
||||
ElMessage.success(formData.id ? "编辑成功" : "新增成功");
|
||||
close();
|
||||
// 触发父组件方法
|
||||
if (window.parent.updateList) {
|
||||
window.parent.getList(); // 调用父组件方法
|
||||
}
|
||||
router.push("@/views/backOfficeSystem/IntelligentControl/myControl/index");
|
||||
// qcckPost(formData, "/mosty-gsxt/tbGsxtBk/save").then((res) => {
|
||||
// router.push(
|
||||
|
@ -39,6 +39,17 @@
|
||||
ref="elform"
|
||||
:rules="rules"
|
||||
>
|
||||
<!-- 自定义插槽(人员标签) -->
|
||||
<template #czJsdwdm>
|
||||
<el-select v-model="listQuery.czJsdwdm" placeholder="请选择处置接收单位" style="width: 240px">
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value.toString()"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</FormMessage>
|
||||
|
||||
<!-- 审批流程 -->
|
||||
@ -84,6 +95,8 @@ import DialogList from "@/views/backOfficeSystem/IntelligentControl/myControl/co
|
||||
import { qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import { fa } from "element-plus/es/locale.mjs";
|
||||
import { selectUserDeptPage } from "@/api/user-manage";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_GS_BK_CZJSDWLX, D_GS_BK_TJFS } = proxy.$dict(
|
||||
"D_GS_BK_CZJSDWLX",
|
||||
@ -93,14 +106,19 @@ const listQuery = ref({}); //表单
|
||||
const chooseUserVisible = ref(false); //审批流程
|
||||
const roleIds = ref([]); //角色id
|
||||
let currentSelectedIndex = null;
|
||||
const deptList = ref([]); //部门列表
|
||||
const formData = ref([
|
||||
{
|
||||
label: "处置接收单位",
|
||||
prop: "czJsdwdm",
|
||||
type: "slot"
|
||||
},
|
||||
{
|
||||
label: "处置接收单位类型",
|
||||
prop: "czJsdwlx",
|
||||
type: "select",
|
||||
options: D_GS_BK_CZJSDWLX
|
||||
},
|
||||
|
||||
{
|
||||
label: "提交方式",
|
||||
prop: "bkTjfs",
|
||||
@ -124,6 +142,21 @@ const step = ref([
|
||||
{ fqr: "发起人", fqbm: "发起部门", title: "审批确认", default: false }
|
||||
]);
|
||||
|
||||
onMounted(() => {
|
||||
getdepartmentList();
|
||||
});
|
||||
// 获取部门列表
|
||||
const getdepartmentList = () => {
|
||||
selectUserDeptPage().then((res) => {
|
||||
deptList.value = res?.records.map((item) => ({
|
||||
label: item.deptName,
|
||||
value: item.deptId
|
||||
}));
|
||||
|
||||
console.log(deptList.value, D_GS_BK_CZJSDWLX);
|
||||
// tableData.value = res?.records;
|
||||
});
|
||||
};
|
||||
// 处理选择的人员数据
|
||||
const handleUserSelected = (userData) => {
|
||||
if (currentSelectedIndex !== null) {
|
||||
|
@ -59,7 +59,9 @@
|
||||
<template #czYq="{ row }">
|
||||
<DictTag :tag="false" :value="row.czYq" :options="D_GS_BK_CZYQ" />
|
||||
</template>
|
||||
|
||||
<template #czJsdwdm="{ row }">
|
||||
<div>{{ deptList.find(item => item.id == row.czJsdwdm)?.label || '未知单位' }}</div>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-button size="small" @click="editControl('edit', row)"
|
||||
@ -125,15 +127,24 @@ import DrawerAreaModel from "./components/drawerAreaModel.vue";
|
||||
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
|
||||
import { selectUserDeptPage } from "@/api/user-manage";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_GS_BK_DJ, D_GS_BK_DX, D_GS_BK_ZT, D_GS_BK_SJLX, D_GS_BK_CZYQ } =
|
||||
proxy.$dict(
|
||||
"D_GS_BK_DJ",
|
||||
"D_GS_BK_DX",
|
||||
"D_GS_BK_ZT",
|
||||
"D_GS_BK_SJLX",
|
||||
"D_GS_BK_CZYQ"
|
||||
); //获取字典数据
|
||||
const {
|
||||
D_GS_BK_DJ,
|
||||
D_GS_BK_DX,
|
||||
D_GS_BK_ZT,
|
||||
D_GS_BK_SJLX,
|
||||
D_GS_BK_CZYQ,
|
||||
D_GS_BK_CZJSDWLX
|
||||
} = proxy.$dict(
|
||||
"D_GS_BK_DJ",
|
||||
"D_GS_BK_DX",
|
||||
"D_GS_BK_ZT",
|
||||
"D_GS_BK_SJLX",
|
||||
"D_GS_BK_CZYQ",
|
||||
"D_GS_BK_CZJSDWLX"
|
||||
); //获取字典数据
|
||||
const deptList = ref([]); //部门列表
|
||||
const detailDiloag = ref();
|
||||
const dialogVisible = ref(false);
|
||||
const searchBox = ref(); //搜索框
|
||||
@ -226,25 +237,40 @@ const pageData = reactive({
|
||||
tableColumn: [
|
||||
{ label: "布控级别", prop: "bkDj", showSolt: true },
|
||||
{ label: "布控标题", prop: "bkBt" },
|
||||
{ label: "布控对象", prop: "bkDx", showSolt: true },
|
||||
{ label: "布控对象信息", prop: "bkDxxx" },
|
||||
{ label: "预警标签模型", prop: "yjbqmx" },
|
||||
{ label: "布控范围", prop: "bkfw" },
|
||||
{ label: "预警信息", prop: "yjxx" },
|
||||
{ label: "处置接收单位", prop: "czjsdw" },
|
||||
// { label: "布控对象", prop: "bkDx", showSolt: true },
|
||||
// { label: "布控对象信息", prop: "bkDxxx" },
|
||||
// { label: "预警标签模型", prop: "yjbqmx" },
|
||||
// { label: "布控范围", prop: "bkfw" },
|
||||
// { label: "预警信息", prop: "yjxx" },
|
||||
{ label: "处置接收单位", prop: "czJsdwdm", showSolt: true },
|
||||
{ label: "处置要求", prop: "czYq", showSolt: true },
|
||||
{ label: "开始时间", prop: "bkSjKs" },
|
||||
{ label: "结束时间", prop: "bkSjJs" },
|
||||
{ label: "最近预警时间", prop: "zjyjsj" },
|
||||
// { label: "最近预警时间", prop: "zjyjsj" },
|
||||
{ label: "失效时间", prop: "bkSjSx" },
|
||||
{ label: "布控发起人", prop: "bkfqrXm" },
|
||||
{ label: "布控状态", prop: "bkZt", showSolt: true }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
tabHeightFn();
|
||||
getdepartmentList();
|
||||
|
||||
});
|
||||
|
||||
// 获取部门列表
|
||||
const getdepartmentList = () => {
|
||||
selectUserDeptPage().then((res) => {
|
||||
deptList.value = res?.records.map((item) => ({
|
||||
label: item.deptName,
|
||||
value: item.deptId
|
||||
}));
|
||||
|
||||
});
|
||||
};
|
||||
const openDetail = (row) => {
|
||||
console.log(row);
|
||||
autoId.value = row.id;
|
||||
@ -317,8 +343,6 @@ const editControl = (type, row) => {
|
||||
sendControlRef.value.init(type, row);
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 涉及人数
|
||||
const personNum = () => {
|
||||
personNumRef.value.init();
|
||||
|
Reference in New Issue
Block a user