解决冲突

This commit is contained in:
2025-06-10 09:32:38 +08:00
63 changed files with 14096 additions and 1495 deletions

View File

@ -3,95 +3,702 @@
<div class="head_box">
<span class="title">情报信息流转{{ title }} </span>
<div>
<el-button type="primary" size="small" :loading="loading" @click="submit" >保存</el-button>
<el-button
type="primary"
size="small"
:loading="loading"
@click="submit"
v-if="typeOf == 'edit' || typeOf == 'add' || typeOf == 'report'"
>保存</el-button
>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage :formList="formData" ref="elform" :rules="rules"></FormMessage>
<FormMessage
v-model="listQuery"
:formList="formData"
ref="elform"
:rules="rules"
>
<!-- 上报人员-->
<template #sbRyId>
<el-button
@click="openDialog('01', 'ry')"
v-if="typeOf == 'edit' || typeOf == 'add'"
>选择</el-button
>
<div class="boxlist">
<MyTable
:tableData="tableDate.ryList"
:tableColumn="tableDate.tableColumnRy"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCountRy"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
>
<template #ryMz="{ row }">
<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link
type="danger"
@click="delDict(row.id)"
v-if="typeOf == 'edit' || typeOf == 'add'"
>删除</el-link
>
</template>
</MyTable>
</div>
</template>
<!-- 人员标签模型-->
<template #bqList>
<el-button
@click="openDialog('01', 'bq')"
v-if="typeOf == 'edit' || typeOf == 'add'"
>选择</el-button
>
<div class="boxlist">
<MyTable
:tableData="tableDate.bqList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
>
<template #bqLb="{ row }">
<DictTag :value="row.bqLb" :tag="false" :options="D_GS_BQ_LB" />
</template>
<template #bqLx="{ row }">
<DictTag :value="row.bqLx" :tag="false" :options="D_GS_BQ_LX" />
</template>
<template #bqZl="{ row }">
<DictTag :value="row.bqZl" :tag="false" :options="D_GS_BQ_ZL" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link
type="danger"
@click="delDictItem(row.bqId)"
v-if="typeOf == 'edit' || typeOf == 'add'"
>删除</el-link
>
</template>
</MyTable>
</div>
</template>
<!-- 上报单位代码 -->
<template #sbDwDm>
<el-select
v-model="listQuery.sbDwDm"
placeholder="请选择上报单位代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 抄送单位代码 -->
<template #csDwDm>
<el-select
v-model="listQuery.csDwDm"
placeholder="请选择抄送单位代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 编制单位代码 -->
<template #bzDwDm>
<el-select
v-model="listQuery.bzDwDm"
placeholder="请选择编制单位代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 汇编报刊-->
<template #hbBk>
<div style="border: 1px solid #ccc">
<Toolbar
style="border-bottom: 1px solid #ccc"
:editor="editorRef"
:defaultConfig="toolbarConfig"
mode="default"
/>
<Editor
style="height: 500px; overflow-y: hidden"
v-model="valueHtml"
:defaultConfig="editorConfig"
mode="default"
@onCreated="handleCreated"
/>
</div>
</template>
</FormMessage>
</div>
<!-- 标签列表弹窗 -->
<TagSelectorDialog
v-model="chooseShow"
ref="tagDialog"
@chooseDate="handleTagSelect"
:dic="{ D_GS_BQ_ZL, D_GS_BQ_LB, D_GS_BQ_LX }"
/>
<!-- 上报人员列表弹窗 -->
<DialogList
v-if="ryDialog"
:Single="true"
:roleIds="roleIds"
@chooseDate="chooseDate"
:titleValue="chooseTitle"
v-model="ryDialog"
bqDl="02"
:dic="{ D_BZ_MZ }"
></DialogList>
</div>
</template>
<script setup>
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import MyTable from "@/components/aboutTable/MyTable.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import * as rule from "@/utils/rules.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
import TagSelectorDialog from "@/components/aboutTable/TagSelectorDialog.vue";
import DialogList from "./dialogList.vue";
import { selectUserDeptPage } from "@/api/user-manage";
import {
ref,
defineExpose,
reactive,
onMounted,
defineEmits,
getCurrentInstance,
nextTick,
shallowRef,
onBeforeUnmount,
watch
} from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
dic: Object
});
const chooseShow = ref(false); //选择弹窗
const { proxy } = getCurrentInstance();
const {
D_GS_BQ_LB,
D_GS_BQ_ZL,
D_GS_BQ_LX,
D_GS_XS_SBRYLX,
D_GS_ZDQT_LB,
D_GS_XS_FXDJ,
D_BZ_MZ,
D_GS_XS_LX,
D_GS_RLQB_BJSB_BSZT,
D_BZ_SF
} = proxy.$dict(
"D_GS_BQ_LB",
"D_GS_BQ_ZL",
"D_GS_BQ_LX",
"D_GS_XS_SBRYLX",
"D_GS_ZDQT_LB",
"D_GS_XS_FXDJ",
"D_BZ_MZ",
"D_GS_XS_LX",
"D_GS_RLQB_BJSB_BSZT",
"D_BZ_SF"
); //获取字典数据
const ryDialog = ref(false); //选择弹窗
const tableDate = reactive({
bqList: [], //表格数据
ryList: [], //上报人员列表
keyCount: 0,
rykeyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
tableHeight: 225,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 90, //操作栏宽度
tableColumn: [
{ label: "标签代码", prop: "bqDm" },
{ label: "标签类别", prop: "bqLb", showSolt: true },
{ label: "标签类型", prop: "bqLx", showSolt: true },
{ label: "标签名称", prop: "bqMc" },
{ label: "标签种类", prop: "bqZl", showSolt: true }
],
tableColumnRy: [
{ label: "姓名", prop: "ryXm" },
{ label: "联系电话", prop: "ryLxdh" },
{ label: "身份证号", prop: "rySfzh" },
{ label: "民族", prop: "ryMz", showSolt: true },
{ label: "居住地址", prop: "jzdDz" }
]
});
const dialogForm = ref(false); //弹窗
const formData = ref([
{ label: "线索标题", prop: "xsbt", type: "input", },
{ label: "线索编号", prop: "xsbh", type: "input" },
{ label: "线索类型", prop: "xslx", type: "select", options: [] },
{ label: "线索来源", prop: "xsly", type: "input" },
{ label: "开始时间", prop: "kssj", type: "datetime"},
{ label: "结束时间", prop: "jssj", type: "datetime"},
{ label: "指向地点", prop: "zxdd", type: "input" },
{ label: "群体名称", prop: "qtmc", type: "input" },
{ label: "群体类型", prop: "qtlx", type: "input" },
{ label: "线索细类", prop: "xslx", type: "input" },
{ label: "风险等级", prop: "fxdj", type: "input" },
{ label: "是否初报", prop: "qtmc", type: "input" },
{ label: "线索内容", prop: "nr", type: "textarea",width: '100%' },
{ label: "报送编号", prop: "bsbh", type: "input",},
{ label: "上报单位", prop: "sbdw", type: "input",},
{ label: "抄送单位", prop: "csdw", type: "input",},
{ label: "承办人", prop: "cbr", type: "input",},
{ label: "审核人", prop: "shr", type: "input",},
{ label: "签发人", prop: "qfr", type: "input",},
]);
const listQuery = ref({
sfbqdj: []
}); //表单
const title = ref(""); //弹窗标题
const typeOf = ref(""); //弹窗类型
const formData = ref([]);
const deptList = ref([]); //部门列表
// 更新 formData 的函数
const updateFormData = () => {
const isReport = typeOf.value === "report";
const isReportDetails = typeOf.value === "reportDetails";
const isLeadDetails = typeOf.value === "leadDetails";
// 判断是否应该全部禁用reportDetails 或 leadDetails
const shouldDisableAll = isReportDetails || isLeadDetails;
const baseFields = isReportDetails
? [] // reportDetails 模式下不显示 baseFields
: [
{
label: "标签列表",
prop: "bqList",
type: "slot",
width: "80%",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "上报人员",
prop: "sbRyId",
type: "slot",
width: "80%",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "上报人员类型",
prop: "sbRyLx",
type: "select",
options: D_GS_XS_SBRYLX,
disabled: true // 原本就禁用的保持不变
},
{
label: "线索标题",
prop: "xsBt",
type: "input",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "线索编号",
prop: "xsBh",
type: "input",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "线索类型",
prop: "xsLx",
type: "select",
options: D_GS_XS_LX,
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "线索开始日期",
prop: "xsRqKs",
type: "date",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "线索截止日期",
prop: "xsRqJs",
type: "date",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "指向地点",
prop: "xsZxdd",
type: "input",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "群体名称",
prop: "xsQtmc",
type: "input",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "群体类型",
prop: "xsQtlx",
type: "select",
options: D_GS_ZDQT_LB,
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "风险等级",
prop: "xsFxdj",
type: "select",
options: D_GS_XS_FXDJ,
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "线索名称",
prop: "xsMc",
type: "input",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
},
{
label: "线索内容",
prop: "xsNr",
type: "textarea",
width: "100%",
disabled: isReport || shouldDisableAll // report 或详情模式时禁用
}
];
const conditionalFields =
isReport || isReportDetails
? [
{
label: "报送编号",
prop: "bsBh",
type: "input",
disabled: isReportDetails
},
{
label: "报送日期",
prop: "bsRq",
type: "date",
disabled: isReportDetails
},
{
label: "是否初报",
prop: "bsSfCb",
type: "radio",
options: D_BZ_SF,
disabled: isReportDetails
},
{
label: "报送状态",
prop: "bsZt",
type: "select",
options: D_GS_RLQB_BJSB_BSZT,
disabled: isReportDetails
},
{
label: "上报单位",
prop: "sbDwMc",
type: "input",
disabled: isReportDetails
},
{
label: "上报单位代码",
prop: "sbDwDm",
type: "slot",
disabled: isReportDetails
},
{
label: "抄送单位",
prop: "csDwMc",
type: "input",
disabled: isReportDetails
},
{
label: "抄送单位代码",
prop: "csDwDm",
type: "slot",
disabled: isReportDetails
},
{
label: "编制单位",
prop: "bzDwMc",
type: "input",
disabled: isReportDetails
},
{
label: "编制单位代码",
prop: "bzDwDm",
type: "slot",
disabled: isReportDetails
},
{
label: "承办人",
prop: "cbrXm",
type: "input",
disabled: isReportDetails
},
{
label: "承办人身份证号",
prop: "cbrSfzh",
type: "input",
disabled: isReportDetails
},
{
label: "审核人",
prop: "shrXm",
type: "input",
disabled: isReportDetails
},
{
label: "审核人身份证号",
prop: "shrSfzh",
type: "input",
disabled: isReportDetails
},
{
label: "签发人",
prop: "qfrXm",
type: "input",
disabled: isReportDetails
},
{
label: "签发人身份证号",
prop: "qfrSfzh",
type: "input",
disabled: isReportDetails
},
{
label: "报送内容",
prop: "bsNr",
type: "textarea",
width: "100%",
disabled: isReportDetails
},
{
label: "汇编报刊",
prop: "hbBk",
type: "slot",
width: "100%",
disabled: isReportDetails
}
]
: [];
// 最终表单数据
formData.value = [...baseFields, ...conditionalFields];
};
// 编辑器实例,必须用 shallowRef
const editorRef = shallowRef();
// 内容 HTML
const valueHtml = ref("<p>hello</p>");
const toolbarConfig = {};
const editorConfig = ref({ placeholder: "请输入内容...", readOnly: false });
const listQuery = ref({ sbRyLx: "06", xsLy: "02" }); //表单
const loading = ref(false);
const elform = ref();
const title = ref("");
const tagDialog = ref();
const TYPE_TO_TITLE = {
add: "新增",
report: "上报",
edit: "编辑",
leadDetails: "详情", // 保持原逻辑
reportDetails: "上报详情" // 保持原逻辑
};
const rules = reactive({
xsbt: [{ required: true, message: "请输入线索标题", trigger: "blur" }]
});
const editpeo = ref();
onMounted(() => {});
onMounted(() => {
getdepartmentList();
});
// 获取部门列表
const getdepartmentList = () => {
selectUserDeptPage().then((res) => {
deptList.value = res?.records.map((item) => ({
label: item.deptName,
value: item.deptId
}));
});
};
// 初始化数据
const init = (type, row,) => {
const init = (type, row) => {
dialogForm.value = true;
title.value = type == 'add' ? "新增" : "编辑";
title.value = TYPE_TO_TITLE[type] || "新增"; // 安全回退
typeOf.value = type;
if (typeOf == "reportDetails") {
editorRef.value.disable(); // 禁用
editorConfig.readOnly = true; // 禁用
}
if (row) getDataById(row.id);
if (row.sbRyId) getDataRyId(row.sbRyId);
};
// 根据id查询详情
const getDataById = (id) => {
// qcckGet({}, '/mosty-gsxt/tbGsxtBqgl/'+id).then((res) => {
// listQuery.value = res;
// });
};
// 提交
const submit = () => {
elform.value.submit((data)=>{
// let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtBqgl/save':'/mosty-gsxt/tbGsxtBqgl/update';
// let params = { ...data }
// qcckPost(params, url).then((res) => {
// proxy.$message({ type: "success", message: title.value + "成功" });
// emit("updateDate");
// close();
// }).catch(() => {});
// 根据 typeOf 的值决定调用哪个接口
const apiUrl =
typeOf.value === "reportDetails"
? "/mosty-gsxt/tbGsxtRlqbBjsb/selectVoByXsId/" + id
: "/mosty-gsxt/tbGsxtXs/selectVoById/" + id;
qcckGet({}, apiUrl).then((res) => {
listQuery.value = res;
tableDate.bqList = listQuery.value.bqList;
});
};
// 根据id查询详情
const getDataRyId = (id) => {
qcckGet({}, "/mosty-gsxt/tbGsxtJwry/" + id).then((res) => {
tableDate.ryList = [res];
listQuery.value.sbRyId = res.id;
});
};
// 提交
const submit = () => {
elform.value.submit((data) => {
// 定义仅在 report 模式下需要的字段
const reportFields = [
"bsBh",
"bsNr",
"bsRq",
"bsSfCb",
"bsZt",
"sbDwDm",
"sbDwMc",
"csDwMc",
"csDwDm",
"bzDwMc",
"bzDwDm",
"cbrXm",
"cbrSfzh",
"shrXm",
"shrSfzh",
"qfrXm",
"qfrSfzh",
"hbBk",
"xsId" // 新增 xsId
];
// 准备最终提交数据
let submitData;
if (typeOf.value === "report") {
// report 模式:只提交 reportFields 里的字段 + hbBk富文本
submitData = {
...Object.fromEntries(
Object.entries(data).filter(([key]) => reportFields.includes(key))
),
hbBk: valueHtml.value, // 强制覆盖富文本字段
xsId: listQuery.value.id // 强制添加 xsId
};
} else {
// 非 report 模式:提交除 reportFields 外的所有字段
submitData = {
...Object.fromEntries(
Object.entries(data).filter(([key]) => !reportFields.includes(key))
)
};
}
// 根据 title 决定请求 URL
let url =
title.value == "新增"
? "/mosty-gsxt/tbGsxtXs/save"
: title.value == "上报"
? "/mosty-gsxt/tbGsxtRlqbBjsb/save"
: "/mosty-gsxt/tbGsxtXs/update";
// 发起请求
qcckPost(submitData, url)
.then((res) => {
proxy.$message({ type: "success", message: title.value + "成功" });
emit("getList");
close();
})
.catch(() => {});
});
};
// 打开弹窗
const openDialog = (type, value) => {
nextTick(() => {
if (value == "ry") {
ryDialog.value = true;
} else if (value == "bq") {
chooseShow.value = true;
tagDialog.value.setValues(listQuery.value.bqList);
}
});
};
// 删除
const delDictItem = (bqId) => {
tableDate.bqList = tableDate.bqList.filter((item) => item.bqId !== bqId);
listQuery.value.bqList = tableDate.bqList;
};
// 删除
const delDict = (id) => {
tableDate.ryList = tableDate.ryList.filter((item) => item.id !== id);
listQuery.value.ryList = tableDate.ryList;
};
// 选择数据
const chooseDate = (data) => {
console.log(data[0].id);
tableDate.ryList = data;
listQuery.value.sbRyId = data[0].id;
};
const handleTagSelect = (selectedTags) => {
tableDate.bqList = selectedTags.map((item) => ({
bqDm: item.bqDm || "",
bqId: item.bqId || "",
bqLb: item.bqLb || "",
bqLx: item.bqLx || "",
bqMc: item.bqMc || "",
bqZl: item.bqZl || ""
}));
listQuery.value.bqList = tableDate.bqList;
// 每个标签包含: bqDm, bqId, bqLb, bqLx, bqMc, bqZl 属性
};
// 关闭
const close = () => {
listQuery.value = {};
tableDate.bqList = [];
tableDate.ryList = [];
dialogForm.value = false;
loading.value = false;
};
const handleCreated = (editor) => {
editorRef.value = editor; // 记录 editor 实例,重要!
};
// 组件销毁时,也及时销毁编辑器
onBeforeUnmount(() => {
const editor = editorRef.value;
if (editor == null) return;
editor.destroy();
});
// 初始化调用一次
updateFormData();
// 监听 title 变化
watch(title, () => {
updateFormData();
});
defineExpose({ init });
</script>
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
.boxlist {
width: 99%;
height: 225px;
margin-top: 10px;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,229 @@
<template>
<el-dialog
:title="titleValue"
width="900px"
:model-value="modelValue"
append-to-body
@close="closed"
>
<div>
<el-form :model="listQuery" class="mosty-from-wrap" :inline="true">
<el-form-item label="标签名称">
<el-input
placeholder="请输入标签名称"
v-model="listQuery.bqMc"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="success" @click="handleFilter">查询</el-button>
<el-button type="info" @click="reset()"> 重置 </el-button>
</el-form-item>
</el-form>
<div
class="tabBox"
:class="props.Single ? 'tabBoxRadio' : ''"
style="margin-top: 0px"
>
<el-table
v-loading="loading"
ref="multipleUserRef"
@selection-change="handleSelectionChange"
:data="tableData"
border
:row-key="keyid"
style="width: 100%"
height="450"
>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
/>
<el-table-column prop="ryXm" align="center" label="姓名" />
<el-table-column prop="ryLxdh" align="center" label="联系电话" />
<el-table-column prop="rySfzh" align="center" label="身份证号">
</el-table-column>
<el-table-column prop="bqYs" align="center" label="民族">
<template #default="{ row }">
<DictTag
:value="row.ryMz"
:tag="false"
:options="props.dic.D_BZ_MZ"
/>
</template>
</el-table-column>
<el-table-column prop="jzdDz" align="center" label="居住地址">
</el-table-column>
</el-table>
</div>
<div class="fenye" :style="{ top: tableHeight + 'px' }">
<el-pagination
class="pagination"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="listQuery.current"
:page-sizes="[10, 20, 50, 100]"
:page-size="listQuery.size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="closed">取消</el-button>
<el-button type="primary" @click="onComfirm">确认</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { defineProps, ref, onMounted } from "vue";
import { qcckGet } from "@/api/qcckApi.js";
const props = defineProps({
modelValue: {
type: Boolean,
required: true
},
dic: {
type: Object,
default: () => {}
},
bqDl: {
type: String,
default: "01"
},
bqLx: {
type: String,
default: "01"
},
titleValue: {
type: String,
default: "选择大类"
},
LeaderType: {
type: String,
default: ""
},
//是否单选
Single: {
type: Boolean,
default: true
},
roleIds: {
type: Array,
default: []
}
});
const total = ref(0);
const listQuery = ref({
current: 1,
size: 20
});
const loading = ref(false);
const tableData = ref([]);
const emits = defineEmits(["update:modelValue", "chooseDate"]);
onMounted(() => {
handleFilter();
});
const closed = () => {
emits("update:modelValue", false);
};
const reset = () => {
listQuery.value = { current: 1, size: 20 };
getDataList();
};
const keyid = (row) => {
return row.id;
};
// 为用户分配角色
const onComfirm = () => {
const userList = multipleSelectionUser.value;
let list = [];
let listId = [];
userList.forEach((val) => {
if (listId.indexOf(val.id) == -1) {
list.push(val);
listId.push(val.id);
}
});
emits("chooseDate", list);
closed();
};
/**
* pageSize 改变触发
*/
const handleSizeChange = (currentSize) => {
listQuery.value.size = currentSize;
getDataList();
};
/**
* 页码改变触发
*/
const handleCurrentChange = (currentPage) => {
listQuery.value.current = currentPage;
getDataList();
};
// 查询标签组合列表
const getDataList = () => {
const data = listQuery.value;
loading.value = true;
qcckGet(data, "/mosty-gsxt/tbGsxtJwry/selectPage").then((res) => {
tableData.value = res?.records;
total.value = Number(res.total);
loading.value = false;
multipleUser();
});
};
//列表回显
function multipleUser() {
tableData.value.forEach((item) => {
if (props.roleIds.some((id) => id == item.id)) {
multipleUserRef.value.toggleRowSelection(item, true);
}
});
}
const handleFilter = () => {
listQuery.value.current = 1;
getDataList();
};
const multipleUserRef = ref(null);
const multipleSelectionUser = ref([]);
const handleSelectionChange = (val) => {
if (props.Single) {
if (val.length > 1) {
let del_row = val.shift();
multipleUserRef.value.toggleRowSelection(del_row, false);
}
multipleSelectionUser.value = val;
} else {
multipleSelectionUser.value = val;
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
@import "@/assets/css/element-plus.scss";
</style>
<style>
.tabBoxRadio .el-checkbox__inner {
border-radius: 50% !important;
}
.tabBoxRadio .el-table__header-wrapper .el-checkbox {
display: none;
}
:deep(.el-dialog) {
background: #fff !important;
border-radius: 8px !important;
/* 其他样式 */
}
</style>

View File

@ -17,7 +17,11 @@
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"/>
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
/>
</div>
<!-- 表格 -->
<div class="tabBox">
@ -28,13 +32,58 @@
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
@chooseData="chooseData"
>
<template #xsLy="{ row }">
<DictTag :tag="false" :value="row.xsLy" :options="D_GS_XS_LY" />
</template>
<template #xsFxdj="{ row }">
<DictTag :tag="false" :value="row.xsFxdj" :options="D_GS_XS_FXDJ" />
</template>
<template #xsQtlx="{ row }">
<DictTag :tag="false" :value="row.xsQtlx" :options="D_GS_ZDQT_LB" />
</template>
<template #xsZtCz="{ row }">
<DictTag :tag="false" :value="row.xsZtCz" :options="D_GS_XS_CZZT" />
</template>
<template #xsZt="{ row }">
<DictTag :tag="false" :value="row.xsZt" :options="D_GS_XS_ZT" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
<el-link size="small" type="primary">处置</el-link>
<el-link size="small" type="danger" @click="deleteRow(row)">删除</el-link>
<el-link size="small" type="warning" @click="transferClue(row)">采纳</el-link>
<el-link size="small" type="success" @click="addEdit('edit', row)"
>编辑</el-link
>
<el-link
size="small"
type="plain"
@click="addEdit('leadDetails', row)"
>线索详情</el-link
>
<el-link
size="small"
type="warning"
@click="addEdit('reportDetails', row)"
v-if="row.sfBjsb == 1"
>上报详情</el-link
>
<el-link
size="small"
type="primary"
@click="addEdit('report', row)"
v-if="row.sfBjsb == 0"
>上报</el-link
>
<el-link size="small" type="danger" @click="deleteRow(row)"
>删除</el-link
>
<el-link
size="small"
type="warning"
@click="transferClue(row)"
v-if="row.xsZt == '01'"
>采纳</el-link
>
</template>
</MyTable>
<Pages
@ -48,7 +97,16 @@
></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" />
<DetailForm ref="detailDiloag" @getList="getList" />
<el-dialog v-model="dialogVisible" title="是否采纳" width="500px">
<span>是否采纳该条数据</span>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitClue"> 确定 </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
@ -61,16 +119,59 @@ import DetailForm from "./components/addForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
const { D_GS_XS_LY, D_GS_XS_FXDJ, D_GS_ZDQT_LB, D_GS_XS_CZZT, D_GS_XS_ZT } =
proxy.$dict(
"D_GS_XS_LY",
"D_GS_XS_FXDJ",
"D_GS_ZDQT_LB",
"D_GS_XS_CZZT",
"D_GS_XS_ZT"
); //获取字典数据
const dialogTitle = ref("新增信息"); //弹窗标题
const detailDiloag = ref();
const searchBox = ref(); //搜索框
const dialogVisible = ref(false);
const transferClueId = ref();
const searchConfiger = ref([
{ label: "线索名称", prop: 'clueTitle', placeholder: "请输入线索名称", showType: "input" },
{ label: "线索内容", prop: 'semanticKeywords', placeholder: "请输入线索内容", showType: "input" },
{ label: "线索大类", prop: 'clueType', placeholder: "请选择线索大型", showType: "select" },
{ label: "线索细类", prop: 'xsxl', placeholder: "请选择线索细类", showType: "select" },
{ label: "线索来源", prop: 'xsly', placeholder: "请选择线索来源", showType: "select" },
{ label: "线索风险等级", prop: 'xsfxdj', placeholder: "请选择线索风险等级", showType: "select" },
{
label: "线索名称",
prop: "xsMc",
placeholder: "请输入线索名称",
showType: "input"
},
{
label: "线索内容",
prop: "xsNr",
placeholder: "请输入线索内容",
showType: "input"
},
{
label: "线索大类",
prop: "xsDl",
placeholder: "请选择线索大型",
showType: "input"
},
{
label: "线索细类",
prop: "xsXl",
placeholder: "请选择线索细类",
showType: "input"
},
{
label: "线索来源",
prop: "xsLy",
placeholder: "请选择线索来源",
showType: "select",
options: D_GS_XS_LY
},
{
label: "线索风险等级",
prop: "xsFxdj",
placeholder: "请选择线索风险等级",
showType: "select",
options: D_GS_XS_FXDJ
}
]);
const pageData = reactive({
@ -90,7 +191,8 @@ const pageData = reactive({
reportUnit: "林芝公安局",
reportTime: "2025/05/05",
involvedCount: 2,
status: "未处置"
status: "未处置",
xsZt: "01"
},
{
clueNo: "GBJD01",
@ -138,32 +240,36 @@ const pageData = reactive({
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 220,
controlsWidth: 350,
tableColumn: [
{ label: "线索编号", prop: "clueNo" },
{ label: "线索名称", prop: "clueTitle" },
{ label: "线索类型", prop: "clueType" },
{ label: "线索来源", prop: "clueSource" },
{ label: "风险等级", prop: "riskLevel" },
{ label: "线索编号", prop: "xsBh" },
{ label: "线索名称", prop: "xsMc" },
// { label: "线索类型", prop: "xsQtlx", options: D_GS_ZDQT_LB },
{ label: "线索来源", prop: "xsLy", showSolt: true },
{ label: "风险等级", prop: "xsFxdj", showSolt: true },
{ label: "开始时间", prop: "startTime" },
{ label: "结束时间", prop: "endTime" },
{ label: "指向地点", prop: "targetLocation" },
{ label: "线索内容", prop: "clueContent", width: 200 },
{ label: "群体类型", prop: "attachmentType" },
{ label: "群名称", prop: "attachmentName" },
{ label: "上报单位", prop: "reportUnit" },
{ label: "上报时间", prop: "reportTime" },
{ label: "涉及人数", prop: "involvedCount" },
{ label: "附件", prop: "involvedCount" },
{ label: "处置状态", prop: "status" },
{ label: "状态", prop: "status" }
{ label: "指向地点", prop: "xsZxdd" },
{ label: "线索内容", prop: "xsNr" },
{ label: "群体类型", prop: "xsQtlx", showSolt: true },
{ label: "群名称", prop: "xsQtmc" },
{ label: "上报单位", prop: "sbDwMc" },
{ label: "上报时间", prop: "sbSj" },
{ label: "涉及人数", prop: "xsSjrs" },
{ label: "附件", prop: "xsFj" },
{
label: "处置状态",
prop: "xsZtCz",
showSolt: true
},
{ label: "状态", prop: "xsZt", showSolt: true }
]
})
});
const queryFrom = ref({});
onMounted(() => {
getList()
getList();
tabHeightFn();
});
@ -171,35 +277,57 @@ onMounted(() => {
const handleType = (val) => {
pageData.keyCount++;
pageData.pageConfiger.pageCurrent = 1;
getList()
}
getList();
};
// 搜索
const onSearch = (val) =>{
queryFrom.value = {...val}
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList()
}
getList();
};
const changeNo = (val) =>{
//采纳
const transferClue = (row) => {
dialogVisible.value = true;
transferClueId.value = row.id;
};
const submitClue = () => {
dialogVisible.value = false;
qcckGet({}, "/mosty-gsxt/tbGsxtXs/adopt/" + transferClueId.value)
.then((res) => {
proxy.$message({ type: "success", message: "采纳成功" });
getList();
transferClueId.value = "";
})
.catch(() => {
transferClueId.value = "";
});
};
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList()
}
const changeSize = (val) =>{
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList()
}
getList();
};
// 获取列表
const getList = (val) =>{
// pageData.tableConfiger.loading = true;
const getList = (val) => {
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
// let url = '/mosty-lzcj/tbDwMbkf/queryList';
// qcckPost(data,url).then(res=>{
// pageData.tableData = res.records || [];
// pageData.total = res.total;
// pageData.tableConfiger.loading = false;
// }).catch(()=>{ pageData.tableConfiger.loading = false; })
}
let url = "/mosty-gsxt/tbGsxtXs/selectPage";
qcckGet(data, url)
.then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
// 详情
const addEdit = (type, row) => {
@ -208,7 +336,8 @@ const addEdit = (type, row) => {
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
@ -220,5 +349,3 @@ const tabHeightFn = () => {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>

View File

@ -3,62 +3,127 @@
<div class="head_box">
<span class="title">社会信息人员建设管理{{ title }} </span>
<div>
<el-button type="primary" size="small" :loading="loading" @click="submit" >保存</el-button>
<el-button
type="primary"
size="small"
:loading="loading"
@click="submit"
>保存</el-button
>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules"></FormMessage>
<FormMessage
v-model="listQuery"
:formList="formData"
ref="elform"
:rules="rules"
></FormMessage>
</div>
</div>
</template>
<script setup>
import { IdCard } from "@/utils/validate.js";
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import * as rule from "@/utils/rules.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
import {
ref,
defineExpose,
reactive,
onMounted,
defineEmits,
getCurrentInstance,
nextTick
} from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
dic: Object,
dic: Object
});
const validateIdentity = () => {
return (rule, value, callback) => {
if (!value) {
return callback(new Error('身份证号不能为空'));
return callback(new Error("身份证号不能为空"));
} else if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
callback(new Error("输入的身份证长度或格式错误"));
}
//身份证城市
var aCity = {11: "北京",12: "天津",13: "河北",14: "山西",15: "内蒙古",21: "辽宁",22: "吉林",23: "黑龙江",31: "上海",32: "江苏",33: "浙江",34: "安徽",35: "福建",36: "江西",37: "山东",41: "河南",42: "湖北",43: "湖南",44: "广东",45: "广西",46: "海南",50: "重庆",51: "四川",52: "贵州",53: "云南",54: "西藏",61: "陕西",62: "甘肃",63: "青海",64: "宁夏",65: "新疆",71: "台湾",81: "香港",82: "澳门",91: "国外"};
if (!aCity[parseInt(value?.substr(0, 2))]) callback(new Error("身份证地区非法"));
var aCity = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
23: "黑龙江",
31: "上海",
32: "江苏",
33: "浙江",
34: "安徽",
35: "福建",
36: "江西",
37: "山东",
41: "河南",
42: "湖北",
43: "湖南",
44: "广东",
45: "广西",
46: "海南",
50: "重庆",
51: "四川",
52: "贵州",
53: "云南",
54: "西藏",
61: "陕西",
62: "甘肃",
63: "青海",
64: "宁夏",
65: "新疆",
71: "台湾",
81: "香港",
82: "澳门",
91: "国外"
};
if (!aCity[parseInt(value?.substr(0, 2))])
callback(new Error("身份证地区非法"));
// 出生日期验证
var sBirthday = ( value.substr(6, 4) + "-" + Number(value.substr(10, 2)) + "-" + Number(value.substr(12, 2))).replace(/-/g, "-"),
d = new Date(sBirthday);
var sBirthday = (
value.substr(6, 4) +
"-" +
Number(value.substr(10, 2)) +
"-" +
Number(value.substr(12, 2))
).replace(/-/g, "-"),
d = new Date(sBirthday);
let yyyy = d.getFullYear();
let mm = d.getMonth() + 1;
let dd = d.getDate();
if (sBirthday !== yyyy + "-" + mm + "-" + dd) {
listQuery.value.ryCsrq= "";
listQuery.value.ryCsrq = "";
callback(new Error("身份证上的出生日期非法"));
} else {
let month = mm < 10 ? "0" + mm : mm;
listQuery.value.ryCsrq= yyyy + "-" + month + "-" + dd;
listQuery.value.ryCsrq = yyyy + "-" + month + "-" + dd;
}
// 身份证号码校验
var sum = 0, weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2], codes = "10X98765432";
var sum = 0,
weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2],
codes = "10X98765432";
for (var i = 0; i < value.length - 1; i++) {
sum += value[i] * weights[i];
}
var last = codes[sum % 11]; //计算出来的最后一位身份证号码
if (value[value.length - 1] !== last) {
listQuery.value.ryXb = ''
listQuery.value.ryXb = "";
callback(new Error("输入的身份证号非法"));
} else {
if(value.length === 18){
listQuery.value.ryCsrq= IdCard(value,1)
listQuery.value.ryXb = parseInt(value.substr(16, 1)) % 2 === 1 ? "1" : "2";
if (value.length === 18) {
listQuery.value.ryCsrq = IdCard(value, 1);
listQuery.value.ryXb =
parseInt(value.substr(16, 1)) % 2 === 1 ? "1" : "2";
}
}
callback();
@ -67,17 +132,22 @@ const validateIdentity = () => {
const { proxy } = getCurrentInstance();
const dialogForm = ref(false); //弹窗
const formData = ref([
{ label: "管辖部门", prop: "gxbmDm", type: "department" },
{ label: "姓名", prop: "ryXm", type: "input" },
{ label: "联系电话", prop: "ryLxdh", type: "input" },
{ label: "身份证号", prop: "rySfzh", type: "input" },
{ label: "出生日期", prop: "ryCsrq", type: "date" },
{ label: "性别", prop: "ryXb", type: "select", options:props.dic.D_BZ_XB },
{ label: "民族", prop: "ryMz", type: "select", options:props.dic.D_BZ_MZ },
{ label: "学历", prop: "ryXl", type: "select", options: props.dic.D_BZ_WHCD },
{ label: "政治面貌", prop: "ryZzmm", type: "select", options: props.dic.D_BZ_ZZMM },
{ label: "所在单位", prop: "rySzdw", type: "input" },
{ label: "居住地地址", prop: "jzdDz", type: "textarea",width:'100%' },
{ label: "管辖部门", prop: "gxbmDm", type: "department" },
{ label: "姓名", prop: "ryXm", type: "input" },
{ label: "联系电话", prop: "ryLxdh", type: "input" },
{ label: "身份证号", prop: "rySfzh", type: "input" },
{ label: "出生日期", prop: "ryCsrq", type: "date" },
{ label: "性别", prop: "ryXb", type: "select", options: props.dic.D_BZ_XB },
{ label: "民族", prop: "ryMz", type: "select", options: props.dic.D_BZ_MZ },
{ label: "学历", prop: "ryXl", type: "select", options: props.dic.D_BZ_WHCD },
{
label: "政治面貌",
prop: "ryZzmm",
type: "select",
options: props.dic.D_BZ_ZZMM
},
{ label: "所在单位", prop: "rySzdw", type: "input" },
{ label: "居住地地址", prop: "jzdDz", type: "textarea", width: "100%" }
]);
const listQuery = ref({}); //表单
const loading = ref(false);
@ -87,36 +157,45 @@ const rules = reactive({
gxbmDm: [{ required: true, message: "请选择管辖部门", trigger: "change" }],
ryXm: [{ required: true, message: "请输入人员姓名", trigger: "blur" }],
rySfzh: [
{ required: true, message: "请输入人员身份证号", trigger: ["blur",'change'] },
{ trigger: ["blur",'change'], validator: validateIdentity()}
{
required: true,
message: "请输入人员身份证号",
trigger: ["blur", "change"]
},
{ trigger: ["blur", "change"], validator: validateIdentity() }
],
...rule.phoneRule({ require: true, validator: true }, "ryLxdh"), // 是否必填 是否进行校验 可以传第二个参数
...rule.phoneRule({ require: true, validator: true }, "ryLxdh") // 是否必填 是否进行校验 可以传第二个参数
});
onMounted(() => {});
// 初始化数据
const init = (type, row,) => {
const init = (type, row) => {
dialogForm.value = true;
title.value = type == 'add' ? "新增" : "编辑";
title.value = type == "add" ? "新增" : "编辑";
if (row) getDataById(row.id);
};
// 根据id查询详情
const getDataById = (id) => {
qcckGet({}, '/mosty-gsxt/tbGsxtJwry/'+id).then((res) => {
qcckGet({}, "/mosty-gsxt/tbGsxtJwry/" + id).then((res) => {
listQuery.value = res;
});
};
// 提交
const submit = () => {
elform.value.submit((data)=>{
let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtJwry/save':'/mosty-gsxt/tbGsxtJwry/update';
let params = { ...data,ryLx: '01' }
qcckPost(params, url).then((res) => {
proxy.$message({ type: "success", message: title.value + "成功" });
emit("updateDate");
close();
}).catch(() => {});
elform.value.submit((data) => {
let url =
title.value == "新增"
? "/mosty-gsxt/tbGsxtJwry/save"
: "/mosty-gsxt/tbGsxtJwry/update";
let params = { ...data, ryLx: "01" };
qcckPost(params, url)
.then((res) => {
proxy.$message({ type: "success", message: title.value + "成功" });
emit("updateDate");
close();
})
.catch(() => {});
});
};

View File

@ -18,7 +18,11 @@
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"/>
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
/>
</div>
<!-- 表格 -->
<div class="tabBox">
@ -29,14 +33,19 @@
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
@chooseData="chooseData"
>
<template #ryMz="{ row }">
<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" />
<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
<el-link size="small" type="danger" @click="deleteRow(row.id)">删除</el-link>
<el-link size="small" type="success" @click="addEdit('edit', row)"
>编辑</el-link
>
<el-link size="small" type="danger" @click="deleteRow(row.id)"
>删除</el-link
>
</template>
</MyTable>
<Pages
@ -50,7 +59,12 @@
></Pages>
</div>
<!-- 详情 -->
<DetailForm v-if="show" @updateDate="getList" ref="detailDiloag" :dic="{D_BZ_WHCD,D_BZ_MZ, D_BZ_XB,D_BZ_ZZMM}" />
<DetailForm
v-if="show"
@updateDate="getList"
ref="detailDiloag"
:dic="{ D_BZ_WHCD, D_BZ_MZ, D_BZ_XB, D_BZ_ZZMM }"
/>
</div>
</template>
@ -62,16 +76,26 @@ import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/addForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import { CirclePlus, Upload, Download } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
import { CirclePlus, Upload, Download } from "@element-plus/icons-vue";
import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
const { D_BZ_WHCD,D_BZ_MZ, D_BZ_XB,D_BZ_ZZMM } = proxy.$dict("D_BZ_WHCD",'D_BZ_MZ','D_BZ_XB','D_BZ_ZZMM'); //获取字典数据
const { D_BZ_WHCD, D_BZ_MZ, D_BZ_XB, D_BZ_ZZMM } = proxy.$dict(
"D_BZ_WHCD",
"D_BZ_MZ",
"D_BZ_XB",
"D_BZ_ZZMM"
); //获取字典数据
const detailDiloag = ref();
const searchBox = ref(); //搜索框
const show = ref(false)
const show = ref(false);
const searchConfiger = ref([
{ label: "姓名", prop: 'ryXm', placeholder: "请输入姓名", showType: "input" },
{ label: "身份证号", prop: 'rySfzh', placeholder: "请输入身份证号", showType: "input" },
{ label: "姓名", prop: "ryXm", placeholder: "请输入姓名", showType: "input" },
{
label: "身份证号",
prop: "rySfzh",
placeholder: "请输入身份证号",
showType: "input"
}
]);
const pageData = reactive({
@ -92,66 +116,74 @@ const pageData = reactive({
{ label: "姓名", prop: "ryXm" },
{ label: "联系电话", prop: "ryLxdh" },
{ label: "身份证号", prop: "rySfzh" },
{ label: "民族", prop: "ryMz",showSolt: true },
{ label: "居住地址", prop: "jzdDz" },
{ label: "民族", prop: "ryMz", showSolt: true },
{ label: "居住地址", prop: "jzdDz" }
]
})
});
const queryFrom = ref({});
onMounted(() => {
getList()
getList();
tabHeightFn();
});
// 搜索
const onSearch = (val) =>{
queryFrom.value = {...val}
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList()
}
getList();
};
const changeNo = (val) =>{
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList()
}
const changeSize = (val) =>{
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList()
}
getList();
};
// 获取列表
const getList = () =>{
const getList = () => {
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
qcckGet(data,'/mosty-gsxt/tbGsxtJwry/selectPage').then(res=>{
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(()=>{ pageData.tableConfiger.loading = false; })
}
qcckGet(data, "/mosty-gsxt/tbGsxtJwry/selectPage")
.then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
// 删除
const deleteRow = (id) =>{
proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
qcckDelete({}, '/mosty-gsxt/tbGsxtJwry/'+id).then(()=>{
proxy.$message({ type: "success", message: "删除成功" });
getList();
const deleteRow = (id) => {
proxy
.$confirm("确定要删除", "警告", { type: "warning" })
.then(() => {
qcckDelete({}, "/mosty-gsxt/tbGsxtJwry/" + id).then(() => {
proxy.$message({ type: "success", message: "删除成功" });
getList();
});
})
}).catch(() => {});
}
.catch(() => {});
};
// 详情
const addEdit = (type, row) => {
show.value = true;
nextTick(()=>{
nextTick(() => {
detailDiloag.value.init(type, row);
})
});
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};

View File

@ -3,86 +3,340 @@
<div class="head_box">
<span class="title">人力情报信息搜索任务调度{{ title }} </span>
<div>
<el-button type="primary" size="small" :loading="loading" @click="submit" >保存</el-button>
<el-button
type="primary"
size="small"
:loading="loading"
@click="submit"
>保存</el-button
>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage :formList="formData" ref="elform" :rules="rules"></FormMessage>
<FormMessage
:formList="formData"
v-model="listQuery"
ref="elform"
:rules="rules"
>
<!-- 上报单位代码 -->
<template #bsDwDm>
<el-select
v-model="listQuery.bsDwDm"
placeholder="请选择上报单位代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 上报单位代码 -->
<template #ssbmdm>
<el-select
v-model="listQuery.ssbmdm"
placeholder="请选择所属单位代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 线索列表-->
<template #xsList>
<el-button @click="openDialog()">选择</el-button>
<div class="boxlist">
<MyTable
:tableData="tableDate.xsList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
@chooseData="chooseData"
>
<template #xsLy="{ row }">
<DictTag :tag="false" :value="row.xsLy" :options="D_GS_XS_LY" />
</template>
<template #xsFxdj="{ row }">
<DictTag
:tag="false"
:value="row.xsFxdj"
:options="D_GS_XS_FXDJ"
/>
</template>
<template #xsQtlx="{ row }">
<DictTag
:tag="false"
:value="row.xsQtlx"
:options="D_GS_ZDQT_LB"
/>
</template>
<template #xsZtCz="{ row }">
<DictTag
:tag="false"
:value="row.xsZtCz"
:options="D_GS_XS_CZZT"
/>
</template>
<template #xsZt="{ row }">
<DictTag :tag="false" :value="row.xsZt" :options="D_GS_XS_ZT" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" type="danger" @click="delDictItem(row.id)"
>删除</el-link
>
<el-link
size="small"
type="warning"
@click="transferClue(row)"
v-if="row.xsZt == '01'"
>采纳</el-link
>
</template>
</MyTable>
</div>
</template>
</FormMessage>
<!-- 列表弹窗 -->
<DialogList
:Single="false"
:roleIds="roleIds"
v-if="chooseShow"
@chooseDate="chooseDate"
:titleValue="chooseTitle"
v-model="chooseShow"
:bqLx="chooseType"
bqDl="02"
></DialogList>
</div>
</div>
</template>
<script setup>
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import DialogList from "./dialogList.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import * as rule from "@/utils/rules.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
import { selectUserDeptPage } from "@/api/user-manage";
import {
ref,
defineExpose,
reactive,
onMounted,
defineEmits,
getCurrentInstance,
nextTick
} from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
dic: Object
});
const { proxy } = getCurrentInstance();
const {
D_GS_RLQB_RWDD_LX,
D_GS_RLQB_RWDD_LY,
D_GS_RLQB_RWDD_YZCD,
D_GS_XS_FXDJ,
D_GS_XS_CZZT,
D_GS_XS_ZT,
D_GS_XS_LY,
D_GS_ZDQT_LB
} = proxy.$dict(
"D_GS_RLQB_RWDD_LX",
"D_GS_RLQB_RWDD_LY",
"D_GS_RLQB_RWDD_YZCD",
"D_GS_XS_FXDJ",
"D_GS_XS_CZZT",
"D_GS_XS_ZT",
"D_GS_XS_LY",
"D_GS_ZDQT_LB"
);
const tableDate = reactive({
xsList: [], //表格数据
rykeyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false,
size: "small",
border: true
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 220, //操作栏宽度
tableColumn: [
{ label: "线索名称", prop: "xsMc", width: "100px" },
{ label: "线索编号", prop: "xsBh", width: "100px" },
{ label: "线索来源", prop: "xsLy", showSolt: true, width: "100px" },
{ label: "风险等级", prop: "xsFxdj", showSolt: true, width: "100px" },
{ label: "开始时间", prop: "startTime", width: "100px" },
{ label: "结束时间", prop: "ryXjd", width: "100px" },
{ label: "指向地点", prop: "xsZxdd", width: "100px" },
{ label: "线索内容", prop: "xsNr", width: "100px" },
{ label: "群体类型", prop: "xsQtlx", showSolt: true, width: "100px" },
{ label: "群体名称", prop: "xsQtmc", width: "100px" },
{ label: "上报单位", prop: "sbDwMc", width: "100px" },
{ label: "上报时间", prop: "sbSj", width: "100px" },
{ label: "涉及人数", prop: "xsSjrs", width: "100px" },
{ label: "处置状态", prop: "xsZtCz", width: "100px", showSolt: true },
{ label: "状态", prop: "xsZt", width: "100px", showSolt: true }
]
});
const dialogForm = ref(false); //弹窗
const chooseTitle = ref(""); //选择弹窗
const formData = ref([
{ label: "任务标题", prop: "rwbt", type: "input" },
{ label: "任务编号", prop: "rwbh", type: "input", },
{ label: "任务类型", prop: "rwlx", type: "select", options: [] },
{ label: "任务来源", prop: "xsly", type: "input" },
{ label: "反馈截止时间", prop: "kssj", type: "datetime"},
{ label: "严重程度", prop: "yzcd", type: "select", options: []},
{ label: "任务类型细类", prop: "rwlxxl", type: "select", options: []},
{ label: "状态", prop: "cpcd", type: "select", options: []},
{ label: "任务内容", prop: "nr", type: "textarea",width: '100%' },
{ label: "备注", prop: "bz", type: "textarea",width: '100%' },
{ label: "报送单位代码", prop: "bsDwDm", type: "slot" },
{ label: "报送单位名称", prop: "bsDwMc", type: "input" },
{ label: "任务标题", prop: "rwBt", type: "input" },
{ label: "任务编号", prop: "rwBh", type: "input" },
{
label: "任务类型",
prop: "rwLx",
type: "select",
options: D_GS_RLQB_RWDD_LX
},
{
label: "任务来源",
prop: "rwLy",
type: "select",
options: D_GS_RLQB_RWDD_LY
},
{ label: "反馈开始时间", prop: "rwSjKs", type: "datetime" },
{ label: "反馈截止时间", prop: "rwSjFkjz", type: "datetime" },
{
label: "严重程度",
prop: "rwYzcd",
type: "select",
options: D_GS_RLQB_RWDD_YZCD
},
{ label: "所属单位代码", prop: "ssbmdm", type: "slot" },
{ label: "所属单位名称", prop: "ssbmmc", type: "input" },
{ label: "任务内容", prop: "rwNr", type: "textarea", width: "100%" },
{ label: "线索列表", prop: "xsList", type: "slot", width: "80%" }
]);
const listQuery = ref({
sfbqdj: []
}); //表单
const listQuery = ref({}); //表单
const roleIds = ref([]); //角色id
const chooseShow = ref(false); //选择弹窗
const loading = ref(false);
const elform = ref();
const title = ref("");
const deptList = ref([]); //部门列表
const chooseType = ref("01"); //选择弹窗类型
const rules = reactive({
rwbt: [{ required: true, message: "请输入任务标题", trigger: "blur" }]
});
const editpeo = ref();
onMounted(() => {});
onMounted(() => {
getdepartmentList();
});
// 初始化数据
const init = (type, row,) => {
const init = (type, row) => {
dialogForm.value = true;
title.value = type == 'add' ? "新增" : "编辑";
title.value = type == "add" ? "新增" : "编辑";
if (row) getDataById(row.id);
};
// 根据id查询详情
const getDataById = (id) => {
// qcckGet({}, '/mosty-gsxt/tbGsxtBqgl/'+id).then((res) => {
// listQuery.value = res;
// });
};
// 提交
const submit = () => {
elform.value.submit((data)=>{
// let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtBqgl/save':'/mosty-gsxt/tbGsxtBqgl/update';
// let params = { ...data }
// qcckPost(params, url).then((res) => {
// proxy.$message({ type: "success", message: title.value + "成功" });
// emit("updateDate");
// close();
// }).catch(() => {});
qcckGet({}, "/mosty-gsxt/tbGsxtRlqbRwdd/selectVoById/" + id).then((res) => {
listQuery.value = res;
tableDate.xsList = listQuery.value.xsList;
});
};
// 获取部门列表
const getdepartmentList = () => {
selectUserDeptPage().then((res) => {
deptList.value = res?.records.map((item) => ({
label: item.deptName,
value: item.deptId
}));
});
};
// 提交
const submit = () => {
elform.value.submit((data) => {
data.xsList = tableDate.xsList.map((item) => item.id);
let url =
title.value == "新增"
? "/mosty-gsxt/tbGsxtRlqbRwdd/save"
: "/mosty-gsxt/tbGsxtRlqbRwdd/update";
let params = { ...data };
qcckPost(params, url)
.then((res) => {
proxy.$message({ type: "success", message: title.value + "成功" });
emit("updateDate");
close();
})
.catch(() => {});
});
};
// 打开弹窗
const openDialog = (type) => {
chooseShow.value = true;
chooseTitle.value = "请选择线索列表";
roleIds.value = tableDate.xsList.map((item) => item.id);
};
const handleAdd = () => {
dialogFormVisible.value = true;
dialogTitle.value = "新增信息";
};
// 接收父组件传入的数据并回显
const setFormData = (data) => {
tableDate.xsList = data.xsList ?? [];
listQuery.value = {
...data // 假设 data 包含所有需要的字段
};
tableDate.tableData = data.bkdxList;
console.log(listQuery.value);
};
// 选择数据
const chooseDate = (data) => {
console.log(data, "选择数据");
tableDate.xsList = data;
listQuery.value.xsList = tableDate.xsList.map((item) => item.id);
};
// 关闭
const close = () => {
listQuery.value = {};
dialogForm.value = false;
loading.value = false;
};
defineExpose({ init });
// 删除
const delDictItem = (id) => {
console.log(id, "删除", tableDate.xsList);
tableDate.xsList = tableDate.xsList.filter((item) => item.id !== id);
listQuery.value.xsList = tableDate.xsList.map((item) => item.id);
};
defineExpose({ init, setFormData });
</script>
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
.boxlist {
width: 99%;
height: 225px;
margin-top: 10px;
overflow: hidden;
}
</style>

View File

@ -0,0 +1,269 @@
<template>
<el-dialog
:title="titleValue"
width="900px"
:model-value="modelValue"
append-to-body
@close="closed"
>
<div>
<el-form :model="listQuery" class="mosty-from-wrap" :inline="true">
<el-form-item label="线索名称">
<el-input
placeholder="请输入线索名称"
v-model="listQuery.xsMc"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="success" @click="handleFilter">查询</el-button>
<el-button type="info" @click="reset()"> 重置 </el-button>
</el-form-item>
</el-form>
<div
class="tabBox"
:class="props.Single ? 'tabBoxRadio' : ''"
style="margin-top: 0px"
>
<el-table
v-loading="loading"
ref="multipleUserRef"
@selection-change="handleSelectionChange"
:data="tableData"
border
:row-key="keyid"
style="width: 100%"
height="450"
>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
/>
<el-table-column prop="xsMc" align="center" label="线索名称" />
<el-table-column prop="xsBh" align="center" label="线索编号" />
<el-table-column prop="xsLy" align="center" label="线索来源">
<template #default="{ row }">
<DictTag :value="row.xsLy" :tag="false" :options="D_GS_XS_LY" />
</template>
</el-table-column>
<el-table-column prop="xsFxdj" align="center" label="风险等级">
<template #default="{ row }">
<DictTag
:value="row.xsFxdj"
:tag="false"
:options="D_GS_XS_FXDJ"
/>
</template>
</el-table-column>
<el-table-column prop="startTime" align="center" label="开始时间" />
<el-table-column prop="endTime" align="center" label="结束时间" />
<el-table-column prop="xsZxdd" align="center" label="指向地点" />
<el-table-column prop="xsNr" align="center" label="线索内容" />
<el-table-column prop="xsQtlx" align="center" label="群体类型">
<template #default="{ row }">
<DictTag
:value="row.xsQtlx"
:tag="false"
:options="D_GS_ZDQT_LB"
/>
</template>
</el-table-column>
<el-table-column prop="xsQtmc" align="center" label="群体名称" />
<el-table-column prop="sbDwMc" align="center" label="上报单位" />
<el-table-column prop="sbSj" align="center" label="上报时间" />
<el-table-column prop="xsSjrs" align="center" label="涉及人数" />
<el-table-column prop="xsZtCz" align="center" label="处置状态">
<template #default="{ row }">
<DictTag
:value="row.xsZtCz"
:tag="false"
:options="D_GS_XS_CZZT"
/>
</template>
</el-table-column>
<el-table-column prop="xsZt" align="center" label="状态">
<template #default="{ row }">
<DictTag :value="row.xsZt" :tag="false" :options="D_GS_XS_ZT" />
</template>
</el-table-column>
</el-table>
</div>
<div class="fenye" :style="{ top: tableHeight + 'px' }">
<el-pagination
class="pagination"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="listQuery.current"
:page-sizes="[10, 20, 50, 100]"
:page-size="listQuery.size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="closed">取消</el-button>
<el-button type="primary" @click="onComfirm">确认</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { defineProps, ref, onMounted, getCurrentInstance } from "vue";
import { qcckGet } from "@/api/qcckApi.js";
const { proxy } = getCurrentInstance();
const { D_GS_XS_LY, D_GS_XS_FXDJ, D_GS_ZDQT_LB, D_GS_XS_CZZT, D_GS_XS_ZT } =
proxy.$dict(
"D_GS_XS_LY",
"D_GS_XS_FXDJ",
"D_GS_ZDQT_LB",
"D_GS_XS_CZZT",
"D_GS_XS_ZT"
); //获取字典数据
const props = defineProps({
modelValue: {
type: Boolean,
required: true
},
dic: {
type: Object,
default: () => {}
},
bqDl: {
type: String,
default: "01"
},
bqLx: {
type: String,
default: "01"
},
titleValue: {
type: String,
default: "选择大类"
},
LeaderType: {
type: String,
default: ""
},
//是否单选
Single: {
type: Boolean,
default: true
},
roleIds: {
type: Array,
default: []
}
});
const total = ref(0);
const listQuery = ref({
current: 1,
size: 20
});
const loading = ref(false);
const tableData = ref([]);
const emits = defineEmits(["update:modelValue", "chooseDate"]);
onMounted(() => {
handleFilter();
});
const closed = () => {
emits("update:modelValue", false);
};
const reset = () => {
listQuery.value = { current: 1, size: 20 };
getDataList();
};
const keyid = (row) => {
return row.id;
};
// 为用户分配角色
const onComfirm = () => {
const userList = multipleSelectionUser.value;
let list = [];
let listId = [];
userList.forEach((val) => {
if (listId.indexOf(val.id) == -1) {
list.push(val);
listId.push(val.id);
}
});
emits("chooseDate", list);
let data = { type: props.LeaderType, userList: userList };
emits("chooseDateLeader", data);
closed();
};
/**
* pageSize 改变触发
*/
const handleSizeChange = (currentSize) => {
listQuery.value.size = currentSize;
getDataList();
};
/**
* 页码改变触发
*/
const handleCurrentChange = (currentPage) => {
listQuery.value.current = currentPage;
getDataList();
};
// 查询线索列表
const getDataList = () => {
const data = listQuery.value;
loading.value = true;
qcckGet(data, "/mosty-gsxt/tbGsxtXs/selectPage").then((res) => {
tableData.value = res?.records;
total.value = Number(res.total);
loading.value = false;
multipleUser();
});
};
//列表回显
function multipleUser() {
tableData.value.forEach((item) => {
if (props.roleIds.some((id) => id == item.id)) {
multipleUserRef.value.toggleRowSelection(item, true);
}
});
}
const handleFilter = () => {
listQuery.value.current = 1;
getDataList();
};
const multipleUserRef = ref(null);
const multipleSelectionUser = ref([]);
const handleSelectionChange = (val) => {
if (props.Single) {
if (val.length > 1) {
let del_row = val.shift();
multipleUserRef.value.toggleRowSelection(del_row, false);
}
multipleSelectionUser.value = val;
} else {
multipleSelectionUser.value = val;
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
@import "@/assets/css/element-plus.scss";
</style>
<style>
.tabBoxRadio .el-checkbox__inner {
border-radius: 50% !important;
}
.tabBoxRadio .el-table__header-wrapper .el-checkbox {
display: none;
}
</style>

View File

@ -0,0 +1,285 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">人力情报信息搜索任务调度详情 </span>
<div>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage
:formList="formData"
v-model="listQuery"
ref="elform"
:rules="rules"
>
<!-- 上报单位代码 -->
<template #bsDwDm>
<el-select
v-model="listQuery.bsDwDm"
placeholder="请选择上报单位代码"
style="width: 240px"
:disabled="true"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 上报单位代码 -->
<template #ssbmdm>
<el-select
v-model="listQuery.ssbmdm"
placeholder="请选择所属单位代码"
style="width: 240px"
:disabled="true"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
<!-- 线索列表-->
<template #xsList>
<div class="boxlist">
<MyTable
:tableData="tableDate.xsList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
@chooseData="chooseData"
>
<template #xsLy="{ row }">
<DictTag :tag="false" :value="row.xsLy" :options="D_GS_XS_LY" />
</template>
<template #xsFxdj="{ row }">
<DictTag
:tag="false"
:value="row.xsFxdj"
:options="D_GS_XS_FXDJ"
/>
</template>
<template #xsQtlx="{ row }">
<DictTag
:tag="false"
:value="row.xsQtlx"
:options="D_GS_ZDQT_LB"
/>
</template>
<template #xsZtCz="{ row }">
<DictTag
:tag="false"
:value="row.xsZtCz"
:options="D_GS_XS_CZZT"
/>
</template>
<template #xsZt="{ row }">
<DictTag :tag="false" :value="row.xsZt" :options="D_GS_XS_ZT" />
</template>
</MyTable>
</div>
</template>
</FormMessage>
</div>
</div>
</template>
<script setup>
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import DialogList from "./dialogList.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import * as rule from "@/utils/rules.js";
import { selectUserDeptPage } from "@/api/user-manage";
import {
ref,
defineExpose,
reactive,
onMounted,
defineEmits,
getCurrentInstance,
nextTick
} from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
dic: Object
});
const { proxy } = getCurrentInstance();
const {
D_GS_RLQB_RWDD_LX,
D_GS_RLQB_RWDD_LY,
D_GS_RLQB_RWDD_YZCD,
D_GS_XS_FXDJ,
D_GS_XS_CZZT,
D_GS_XS_ZT,
D_GS_XS_LY,
D_GS_ZDQT_LB
} = proxy.$dict(
"D_GS_RLQB_RWDD_LX",
"D_GS_RLQB_RWDD_LY",
"D_GS_RLQB_RWDD_YZCD",
"D_GS_XS_FXDJ",
"D_GS_XS_CZZT",
"D_GS_XS_ZT",
"D_GS_XS_LY",
"D_GS_ZDQT_LB"
);
const tableDate = reactive({
xsList: [], //表格数据
rykeyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false,
size: "small",
border: true
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 220, //操作栏宽度
tableColumn: [
{ label: "线索名称", prop: "xsMc", width: "100px" },
{ label: "线索编号", prop: "xsBh", width: "100px" },
{ label: "线索来源", prop: "xsLy", showSolt: true, width: "100px" },
{ label: "风险等级", prop: "xsFxdj", showSolt: true, width: "100px" },
{ label: "开始时间", prop: "startTime", width: "100px" },
{ label: "结束时间", prop: "ryXjd", width: "100px" },
{ label: "指向地点", prop: "xsZxdd", width: "100px" },
{ label: "线索内容", prop: "xsNr", width: "100px" },
{ label: "群体类型", prop: "xsQtlx", showSolt: true, width: "100px" },
{ label: "群体名称", prop: "xsQtmc", width: "100px" },
{ label: "上报单位", prop: "sbDwMc", width: "100px" },
{ label: "上报时间", prop: "sbSj", width: "100px" },
{ label: "涉及人数", prop: "xsSjrs", width: "100px" },
{ label: "处置状态", prop: "xsZtCz", width: "100px", showSolt: true },
{ label: "状态", prop: "xsZt", width: "100px", showSolt: true }
]
});
const dialogForm = ref(false); //弹窗
const chooseTitle = ref(""); //选择弹窗
const formData = ref([
{ label: "报送单位代码", prop: "bsDwDm", type: "slot", disabled: true },
{ label: "报送单位名称", prop: "bsDwMc", type: "input", disabled: true },
{ label: "任务标题", prop: "rwBt", type: "input", disabled: true },
{ label: "任务编号", prop: "rwBh", type: "input", disabled: true },
{
label: "任务类型",
prop: "rwLx",
type: "select",
options: D_GS_RLQB_RWDD_LX,
disabled: true
},
{
label: "任务来源",
prop: "rwLy",
type: "select",
options: D_GS_RLQB_RWDD_LY,
disabled: true
},
{ label: "反馈开始时间", prop: "rwSjKs", type: "datetime", disabled: true },
{ label: "反馈截止时间", prop: "rwSjFkjz", type: "datetime", disabled: true },
{
label: "严重程度",
prop: "rwYzcd",
type: "select",
options: D_GS_RLQB_RWDD_YZCD,
disabled: true
},
{ label: "所属单位代码", prop: "ssbmdm", type: "slot", disabled: true },
{ label: "所属单位名称", prop: "ssbmmc", type: "input", disabled: true },
{
label: "任务内容",
prop: "rwNr",
type: "textarea",
width: "100%",
disabled: true
},
{
label: "线索列表",
prop: "xsList",
type: "slot",
width: "80%",
disabled: true
}
]);
const listQuery = ref({}); //表单
const roleIds = ref([]); //角色id
const chooseShow = ref(false); //选择弹窗
const loading = ref(false);
const elform = ref();
const title = ref("");
const deptList = ref([]); //部门列表
const chooseType = ref("01"); //选择弹窗类型
const rules = reactive({
rwbt: [{ required: true, message: "请输入任务标题", trigger: "blur" }]
});
const editpeo = ref();
onMounted(() => {
getdepartmentList();
});
// 初始化数据
const init = (type, row) => {
dialogForm.value = true;
title.value = type == "add" ? "新增" : "编辑";
if (row) getDataById(row.id);
};
// 根据id查询详情
const getDataById = (id) => {
qcckGet({}, "/mosty-gsxt/tbGsxtRlqbRwdd/selectVoById/" + id).then((res) => {
listQuery.value = res;
tableDate.xsList = listQuery.value.xsList;
});
};
// 获取部门列表
const getdepartmentList = () => {
selectUserDeptPage().then((res) => {
deptList.value = res?.records.map((item) => ({
label: item.deptName,
value: item.deptId
}));
});
};
// 接收父组件传入的数据并回显
const setFormData = (data) => {
tableDate.xsList = data.xsList ?? [];
listQuery.value = {
...data // 假设 data 包含所有需要的字段
};
tableDate.tableData = data.bkdxList;
};
// 关闭
const close = () => {
listQuery.value = {};
dialogForm.value = false;
loading.value = false;
};
defineExpose({ init, setFormData });
</script>
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
.boxlist {
width: 99%;
height: 225px;
margin-top: 10px;
overflow: hidden;
}
</style>

View File

@ -17,7 +17,27 @@
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"/>
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
>
<!-- 所属单位 -->
<template #ssbmdm>
<el-select
v-model="listQuery.ssbmdm"
placeholder="请选择上报单位代码"
style="width: 240px"
>
<el-option
v-for="item in deptList"
:key="item.value"
:label="item.label"
:value="item.value.toString()"
/>
</el-select>
</template>
</Search>
</div>
<!-- 表格 -->
<div class="tabBox">
@ -28,13 +48,40 @@
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
@chooseData="chooseData"
>
<template #rwLy="{ row }">
<DictTag
:tag="false"
:value="row.rwLy"
:options="D_GS_RLQB_RWDD_LY"
/>
</template>
<template #rwYzcd="{ row }">
<DictTag
:tag="false"
:value="row.rwYzcd"
:options="D_GS_RLQB_RWDD_YZCD"
/>
</template>
<template #rwZt="{ row }">
<DictTag
:tag="false"
:value="row.rwZt"
:options="D_GS_RLQB_RWDD_ZT"
/>
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
<el-link size="small" type="primary">处置</el-link>
<el-link size="small" type="danger" @click="deleteRow(row)">删除</el-link>
<el-link size="small" type="warning" @click="transferClue(row)">采纳</el-link>
<el-link size="small" type="success" @click="addEdit('edit', row)"
>编辑</el-link
>
<el-link size="small" type="primary" @click="infoList('info', row)"
>详情</el-link
>
<el-link size="small" type="danger" @click="deleteRow(row)"
>删除</el-link
>
</template>
</MyTable>
<Pages
@ -47,8 +94,10 @@
}"
></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" />
<!-- 新增编辑 -->
<DetailForm ref="detailDiloag" @updateDate="getList()" />
<!-- 新增编辑 -->
<InfoForm ref="infoDiloag" />
</div>
</template>
@ -59,18 +108,64 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/addForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { selectUserDeptPage } from "@/api/user-manage";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
import InfoForm from "./components/infoForm.vue";
const { proxy } = getCurrentInstance();
const { D_GS_RLQB_RWDD_LY, D_GS_RLQB_RWDD_YZCD, D_GS_RLQB_RWDD_ZT } =
proxy.$dict("D_GS_RLQB_RWDD_LY", "D_GS_RLQB_RWDD_YZCD", "D_GS_RLQB_RWDD_ZT"); //获取字典数据
const detailDiloag = ref();
const infoDiloag = ref();
const searchBox = ref(); //搜索框
const deptList = ref([]); //部门列表
const searchConfiger = ref([
{ label: "所属单位", prop: 'belongUnit', placeholder: "请选择所属单位", showType: "select" },
{ label: "任务标题", prop: 'taskTitle', placeholder: "请输入任务标题", showType: "input" },
{ label: "任务编号", prop: 'taskNo', placeholder: "请输入任务编号", showType: "input" },
{ label: "任务内容", prop: 'taskContent', placeholder: "请输入任务内容", showType: "input" },
{ label: "任务来源", prop: 'taskSource', placeholder: "请选择任务来源", showType: "select" },
{ label: "严重程度", prop: 'severity', placeholder: "请选择严重程度", showType: "select" },
{
label: "所属单位",
prop: "ssbmdm",
placeholder: "请选择所属单位",
showType: "department"
},
{
label: "任务标题",
prop: "rwBt",
placeholder: "请输入任务标题",
showType: "input"
},
{
label: "任务编号",
prop: "rwBh",
placeholder: "请输入任务编号",
showType: "input"
},
{
label: "任务内容",
prop: "rwNr",
placeholder: "请输入任务内容",
showType: "input"
},
{
label: "任务来源",
prop: "rwLy",
placeholder: "请选择任务来源",
showType: "select",
options: D_GS_RLQB_RWDD_LY
},
{
label: "严重程度",
prop: "rwYzcd",
placeholder: "请选择严重程度",
showType: "select",
options: D_GS_RLQB_RWDD_YZCD
},
{
label: "任务状态",
prop: "rwZt",
placeholder: "请选择任务状态",
showType: "select",
options: D_GS_RLQB_RWDD_ZT
}
]);
const pageData = reactive({
@ -88,68 +183,86 @@ const pageData = reactive({
},
controlsWidth: 220,
tableColumn: [
{ label: "任务编号", prop: "taskNo" },
{ label: "任务标题", prop: "taskTitle" },
{ label: "任务内容", prop: "taskContent", width: 200 },
{ label: "任务来源", prop: "taskSource" },
{ label: "严重程度", prop: "severity" },
{ label: "处理情况", prop: "processStatus" },
{ label: "上报时间", prop: "reportTime" },
{ label: "采集状态", prop: "collectStatus" },
{ label: "填充部门", prop: "fillDepartment" },
{ label: "状态", prop: "status" }
{ label: "任务编号", prop: "rwBh" },
{ label: "任务标题", prop: "rwBt" },
{ label: "任务内容", prop: "rwNr", width: 200 },
{ label: "任务来源", prop: "rwLy", showSolt: true },
{ label: "严重程度", prop: "rwYzcd", showSolt: true },
// { label: "处理情况", prop: "processStatus" },
{ label: "上报时间", prop: "sbSj" },
// { label: "采集状态", prop: "collectStatus" },
// { label: "填充部门", prop: "fillDepartment" },
{ label: "状态", prop: "rwZt", showSolt: true }
]
})
});
const queryFrom = ref({});
onMounted(() => {
getList()
getList();
tabHeightFn();
getdepartmentList();
});
// 获取部门列表
const getdepartmentList = () => {
selectUserDeptPage().then((res) => {
deptList.value = res?.records.map((item) => ({
label: item.deptName,
value: item.deptId
}));
});
};
//选择类型
const handleType = (val) => {
pageData.keyCount++;
pageData.pageConfiger.pageCurrent = 1;
getList()
}
getList();
};
// 搜索
const onSearch = (val) =>{
queryFrom.value = {...val}
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList()
}
getList();
};
const changeNo = (val) =>{
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList()
}
const changeSize = (val) =>{
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList()
}
getList();
};
// 获取列表
const getList = (val) =>{
const getList = (val) => {
// pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
// let url = '/mosty-lzcj/tbDwMbkf/queryList';
// qcckPost(data,url).then(res=>{
// pageData.tableData = res.records || [];
// pageData.total = res.total;
// pageData.tableConfiger.loading = false;
// }).catch(()=>{ pageData.tableConfiger.loading = false; })
}
let url = "/mosty-gsxt/tbGsxtRlqbRwdd/selectPage";
qcckGet(data, url)
.then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
// 详情
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
};
// 详情
const infoList = (type, row) => {
infoDiloag.value.init(type, row);
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
@ -161,4 +274,3 @@ const tabHeightFn = () => {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>