更新页面
This commit is contained in:
@ -1,736 +1,186 @@
|
||||
<template>
|
||||
<div class="dialog" v-if="dialogForm">
|
||||
<div class="head_box">
|
||||
<span class="title">情报信息流转{{ title }} </span>
|
||||
<span class="title">人力情报信息采集流转编辑</span>
|
||||
<div>
|
||||
<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>
|
||||
<el-button @click="submit">保存</el-button>
|
||||
<el-button @click="close">暂存</el-button>
|
||||
<el-button @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_cnt">
|
||||
<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>
|
||||
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
|
||||
<template #gapdive>
|
||||
<div style="width: 100%;height: 10px;" class="mb20">
|
||||
<el-divider content-position="left">基础信息</el-divider>
|
||||
</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>
|
||||
<template #gapline>
|
||||
<div style="width: 100%;height: 10px;" class="mb20">
|
||||
<el-divider content-position="left">线索内容</el-divider>
|
||||
</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 #xsNr>
|
||||
<div style="border: 1px solid #ccc">
|
||||
<Toolbar
|
||||
style="border-bottom: 1px solid #ccc"
|
||||
:editor="clueRef"
|
||||
:defaultConfig="clueConfig"
|
||||
mode="default"
|
||||
/>
|
||||
<Editor
|
||||
style="height: 500px; overflow-y: hidden"
|
||||
v-model="clueHtml"
|
||||
:defaultConfig="clueConfig"
|
||||
mode="default"
|
||||
@onCreated="clueCreated"
|
||||
/>
|
||||
</div>
|
||||
</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"
|
||||
/>
|
||||
<template #scfj>
|
||||
<div style="width: 100%;padding-left: 50px;">
|
||||
<div>上传附件:<span class="f12">(可附电子表格、Word文档、图像、音视频文件)</span> </div>
|
||||
<div><MOSTY.Upload :showBtn="true" :limit="10" v-model="listQuery.tps" /> </div>
|
||||
</div>
|
||||
</template>
|
||||
</FormMessage>
|
||||
<el-divider content-position="left"><span class="mr20">相关人员</span> <el-button type="primary" size="small" @click="showPeo = true,peoTitle = '新增人员'">添加人员</el-button></el-divider>
|
||||
<MyTable
|
||||
:tableData="pageForm.tableData"
|
||||
:tableColumn="pageForm.tableColumn"
|
||||
:tableHeight="pageForm.tableHeight"
|
||||
:key="pageForm.keyCount"
|
||||
:tableConfiger="pageForm.tableConfiger"
|
||||
:controlsWidth="pageForm.controlsWidth"
|
||||
@chooseData="chooseData"
|
||||
>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link size="small" type="primary" @click="addEdit('detail', row)">详情</el-link >
|
||||
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
|
||||
<el-link size="small" type="danger" @click="deleteRow(row)">删除</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
</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>
|
||||
<!-- 人员 -->
|
||||
<AddPeo v-model="showPeo" :dic="props.dic" :title="peoTitle"></AddPeo>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import AddPeo from './addPeo.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 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";
|
||||
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } 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 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: "slot",
|
||||
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();
|
||||
const clueRef = shallowRef();
|
||||
|
||||
// 内容 HTML
|
||||
const valueHtml = ref("<p>hello</p>");
|
||||
// 内容 HTML
|
||||
const clueHtml = ref("<p>hello</p>");
|
||||
const toolbarConfig = {};
|
||||
const editorConfig = ref({ placeholder: "请输入内容...", readOnly: false });
|
||||
const clueConfig = ref({ placeholder: "请输入内容...", readOnly: false });
|
||||
|
||||
const listQuery = ref({ sbRyLx: "06", xsLy: "02" }); //表单
|
||||
const formData = ref([
|
||||
{ label: "", prop: "gapdive", type: "slot",width:'100%' },
|
||||
{ label: "线索编号", prop: "xsbh", type: "input",},
|
||||
{ label: "线索名称", prop: "xsmc", type: "input" },
|
||||
{ label: "线索类型", prop: "xslx", type: "select", options:props.dic.D_GS_XS_LX },
|
||||
{ label: "情报来源", prop: "qbly", type: "select", options:props.dic.D_GS_XS_LY},
|
||||
{ label: "指向开始时间", prop: "zxkssj", type: "datetime"},
|
||||
{ label: "指向结束时间", prop: "zxjssj", type: "datetime"},
|
||||
{ label: "指向地点", prop: "zxdz", type: "input"},
|
||||
{ label: "所属专题", prop: "sszt", type: "select",options:props.dic.D_BZ_SSZT},
|
||||
{ prop: "gapline", type: "slot",width:'100%' },
|
||||
{ prop: "scfj", type: "slot",width:'100%'},
|
||||
{ label: "线索内容", prop: "xsnr", type: "textarea",width:'100%'},
|
||||
{ label: "群体类型", prop: "qtlx", type: "select",options:props.dic.D_GS_XS_QTLX },
|
||||
{ label: "群体名称", prop: "qtmc", type: "input"},
|
||||
{ label: "涉及人数", prop: "sjrs", type: "inputNumber"},
|
||||
{ label: "线索报送单位", prop: "fjWb", type: "department"},
|
||||
]);
|
||||
const listQuery = ref({tps:[]}); //表单
|
||||
const loading = ref(false);
|
||||
const elform = 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(() => {
|
||||
getdepartmentList();
|
||||
const title = ref("");
|
||||
const pageForm = reactive({
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "checkBox",
|
||||
loading: false
|
||||
},
|
||||
controlsWidth: 220,
|
||||
tableColumn: [
|
||||
{ label: "姓名", prop: "xm" },
|
||||
{ label: "性别", prop: "xb" },
|
||||
{ label: "身份证号", prop: "sfzh" },
|
||||
{ label: "户籍地", prop: "hjd" },
|
||||
{ label: "户籍地派出所", prop: "hjdpcs" },
|
||||
{ label: "标签", prop: "bq" }
|
||||
]
|
||||
});
|
||||
const showPeo = ref(false)
|
||||
const peoTitle = ref('')
|
||||
onMounted(()=>{
|
||||
tabHeightFn()
|
||||
})
|
||||
|
||||
// 获取部门列表
|
||||
const getdepartmentList = () => {
|
||||
selectUserDeptPage().then((res) => {
|
||||
deptList.value = res?.records.map((item) => ({
|
||||
label: item.deptName,
|
||||
value: item.deptId
|
||||
}));
|
||||
});
|
||||
};
|
||||
// 初始化数据
|
||||
const init = (type, row) => {
|
||||
listQuery.value = {tps :[]};
|
||||
tabHeightFn()
|
||||
dialogForm.value = true;
|
||||
title.value = TYPE_TO_TITLE[type] || "新增"; // 安全回退
|
||||
|
||||
typeOf.value = type;
|
||||
if (typeOf == "reportDetails") {
|
||||
editorRef.value.disable(); // 禁用
|
||||
editorConfig.readOnly = true; // 禁用
|
||||
}
|
||||
|
||||
if (typeOf == "leadDetails") {
|
||||
clueRef.value.enable(); // 启用
|
||||
clueConfig.readOnly = false; // 启用
|
||||
}
|
||||
|
||||
if (row) getDataById(row.id);
|
||||
if (row.sbRyId) getDataRyId(row.sbRyId);
|
||||
// 初始化表单数据,并根据详情页设置禁用状态
|
||||
// if (row) getDataById(row.id);
|
||||
};
|
||||
// 根据id查询详情
|
||||
const getDataById = (id) => {
|
||||
// 根据 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;
|
||||
});
|
||||
// qcckGet({}, "/mosty-gsxt/tbGsxtRqfjNr/" + id).then((res) => {
|
||||
// listQuery.value = res;
|
||||
// });
|
||||
};
|
||||
|
||||
// 根据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))
|
||||
),
|
||||
xsNr: clueHtml.value // 强制覆盖线索内容字段
|
||||
};
|
||||
}
|
||||
|
||||
// 根据 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) => {
|
||||
let params = { ...data };
|
||||
qcckPost(params, '/mosty-gsxt/tbGsxtRqfjNr/save').then((res) => {
|
||||
proxy.$message({ type: "success", message: title.value + "成功" });
|
||||
emit("getList");
|
||||
emit("onSearch");
|
||||
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;
|
||||
elform.value.reset()
|
||||
listQuery.value = {tps :[]};
|
||||
};
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageForm.tableHeight = window.innerHeight - 720;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
const handleCreated = (editor) => {
|
||||
editorRef.value = editor; // 记录 editor 实例,重要!
|
||||
};
|
||||
const clueCreated = (editor) => {
|
||||
clueRef.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";
|
||||
::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
|
||||
color: #0072ff;
|
||||
background: rgba(0, 114, 255, 0.3);
|
||||
}
|
||||
.boxlist {
|
||||
width: 99%;
|
||||
height: 225px;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
::v-deep .avatar-uploader{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .el-upload-list{
|
||||
margin-left: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-upload-list__item-name .el-icon{
|
||||
top: 3px;
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<el-dialog v-model="modelValue" :title="props.title" @close="close" :close-on-click-modal="false">
|
||||
<FormMessage v-model="listQuery" :formList="formData" labelWidth="120px" ref="elform" :rules="rules"></FormMessage>
|
||||
<template #footer>
|
||||
<div class="flex just-center">
|
||||
<el-button @click="close">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import { reactive, ref } from 'vue';
|
||||
const props = defineProps({
|
||||
modelValue:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
dic:{
|
||||
type:Object,
|
||||
default:{}
|
||||
},
|
||||
title:{
|
||||
type:String,
|
||||
default:'新增人员'
|
||||
}
|
||||
})
|
||||
const elform = ref()
|
||||
const emit = defineEmits('update:modelValue')
|
||||
const listQuery = ref({})
|
||||
const formData = ref([
|
||||
{ label: "姓名", prop: "xm", type: "input" },
|
||||
{ label: "性别", prop: "xb", type: "select",options:props.dic.D_BZ_XB },
|
||||
{ label: "身份证号", prop: "sfzh", type: "input" },
|
||||
{ label: "户籍地", prop: "hjd", type: "input" },
|
||||
{ label: "户籍地派出所", prop: "hjdpcs", type: "input" },
|
||||
{ label: "标签", prop: "bq", type: "input" },
|
||||
{ label: "是否挑头人", prop: "sfdtr", type: "select",options:props.dic.D_BZ_SF },
|
||||
{ label: "是否响应人", prop: "sfxyr", type: "select" ,options:props.dic.D_BZ_SF },
|
||||
{ label: "所属群体", prop: "ssqt", type: "input" },
|
||||
{ label: "微信号", prop: "wxh", type: "input" },
|
||||
{ label: "QQ", prop: "qqh", type: "input" },
|
||||
])
|
||||
const rules = reactive({
|
||||
xm: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||
xb: [{ required: true, message: "请选择性别", trigger: "change" }],
|
||||
sfzh: [{ required: true, message: "请输入身份证号", trigger: "blur" }],
|
||||
hjd: [{ required: true, message: "请输入户籍地", trigger: "blur" }],
|
||||
})
|
||||
|
||||
const submitForm = () =>{
|
||||
elform.value.submit(()=>{
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
const close = () =>{
|
||||
elform.value.reset();
|
||||
emit('update:modelValue',false)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-form-item--default {
|
||||
width: 48% !important;
|
||||
}
|
||||
</style>
|
@ -1,229 +0,0 @@
|
||||
<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.ryXm"
|
||||
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>
|
@ -4,24 +4,17 @@
|
||||
<PageTitle title="人力情报信息采集流转">
|
||||
<el-button type="primary" @click="addEdit('add', '')">
|
||||
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
||||
<span style="vertical-align: middle">新增</span>
|
||||
<span style="vertical-align: middle">导出</span>
|
||||
</el-button>
|
||||
<el-button type="danger" @click="addEdit('add', '')">
|
||||
<el-icon style="vertical-align: middle"><Dete /></el-icon>
|
||||
<span style="vertical-align: middle">批量删除</span>
|
||||
</el-button>
|
||||
<el-button type="primary">
|
||||
<span style="vertical-align: middle">导出</span>
|
||||
</el-button>
|
||||
</PageTitle>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
<div ref="searchBox">
|
||||
<Search
|
||||
:searchArr="searchConfiger"
|
||||
@submit="onSearch"
|
||||
:key="pageData.keyCount"
|
||||
/>
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"/>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div class="tabBox">
|
||||
@ -32,58 +25,19 @@
|
||||
:key="pageData.keyCount"
|
||||
:tableConfiger="pageData.tableConfiger"
|
||||
:controlsWidth="pageData.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" />
|
||||
@chooseData="chooseData">
|
||||
|
||||
<template #shzt="{row}">
|
||||
<span>采纳(将这条信息推送到情报管理模块)</span>
|
||||
<span>退回!</span>
|
||||
</template>
|
||||
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<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
|
||||
>
|
||||
<el-link size="small" type="primary" @click="addEdit('edit', row)">编辑</el-link>
|
||||
<!-- 审核 =》 退回(退回原因)和采纳 -->
|
||||
<el-link size="small" type="success" @click="addEdit">审核</el-link>
|
||||
<el-link size="small" type="danger" @click="deleteRow(row)">删除</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages
|
||||
@ -96,17 +50,8 @@
|
||||
}"
|
||||
></Pages>
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<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>
|
||||
<!-- 新增 -->
|
||||
<AddForm ref="detailDiloag" :dic="{D_BZ_SF,D_BZ_XB,D_GS_XS_LY,D_BZ_SSZT,D_GS_XS_LX ,D_GS_XS_QTLX}" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -115,67 +60,39 @@ import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import Pages from "@/components/aboutTable/Pages.vue";
|
||||
import Search from "@/components/aboutTable/Search.vue";
|
||||
import DetailForm from "./components/addForm.vue";
|
||||
import AddForm from "./components/addForm.vue";
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
|
||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } 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 {D_GS_XS_LY, D_BZ_SSZT,D_BZ_SF,D_GS_XS_LX ,D_GS_XS_QTLX,D_BZ_XB} = proxy.$dict("D_GS_XS_LY","D_BZ_SSZT","D_BZ_SF","D_GS_XS_LX","D_GS_XS_QTLX","D_BZ_XB"); //获取字典数据
|
||||
const detailDiloag = ref();
|
||||
const searchBox = ref(); //搜索框
|
||||
const dialogVisible = ref(false);
|
||||
const transferClueId = ref();
|
||||
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
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
|
||||
}
|
||||
{ label: "线索名称", prop: 'clueTitle', placeholder: "请输入线索名称", showType: "input" },
|
||||
{ label: "语义关键字", prop: 'semanticKeywords', placeholder: "请输入语义关键字", showType: "input" },
|
||||
{ label: "线索类型", prop: 'clueType', placeholder: "请选择线索类型", showType: "select" },
|
||||
{ label: "线索来源", prop: 'clueSource', placeholder: "请选择线索来源", showType: "select" },
|
||||
{ label: "线索状态", prop: 'xszt', placeholder: "请选择线索状态", showType: "select" },
|
||||
{ label: "处置状态", prop: 'czzt', placeholder: "请选择处置状态", showType: "select" },
|
||||
{ label: "开始时间", prop: 'startTime', placeholder: "请选择开始时间", showType: "date" },
|
||||
{ label: "结束时间", prop: 'endTime', placeholder: "请选择结束时间", showType: "date" },
|
||||
{ label: "指向地点", prop: 'targetLocation', placeholder: "请输入指向地点", showType: "input" },
|
||||
]);
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [],
|
||||
tableData: [
|
||||
{
|
||||
clueNo: "XS20240101001",
|
||||
clueTitle: "可疑人员活动线索",
|
||||
clueType: "人员线索",
|
||||
clueSource: "群众举报",
|
||||
startTime: "2024-01-01 08:00:00",
|
||||
endTime: "2024-01-01 18:00:00",
|
||||
targetLocation: "某市某区某街道",
|
||||
clueContent: "发现多名可疑人员在该区域频繁出入,疑似从事非法活动。",
|
||||
attachment: "report.pdf"
|
||||
},],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
@ -187,89 +104,69 @@ const pageData = reactive({
|
||||
pageSize: 20,
|
||||
pageCurrent: 1
|
||||
},
|
||||
controlsWidth: 350,
|
||||
controlsWidth: 150,
|
||||
tableColumn: [
|
||||
{ label: "线索编号", prop: "xsBh" },
|
||||
{ label: "线索名称", prop: "xsMc" },
|
||||
{ label: "线索来源", prop: "xsLy", showSolt: true },
|
||||
{ label: "风险等级", prop: "xsFxdj", showSolt: true },
|
||||
{ label: "上报人姓名", prop: "clueNo" },
|
||||
{ label: "上报人电话", prop: "clueNo" },
|
||||
{ label: "线索编号", prop: "clueNo" },
|
||||
{ label: "线索名称", prop: "clueTitle" },
|
||||
{ label: "线索类型", prop: "clueType" },
|
||||
{ label: "线索来源", prop: "clueSource" },
|
||||
{ label: "开始时间", prop: "startTime" },
|
||||
{ label: "结束时间", prop: "endTime" },
|
||||
{ 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 }
|
||||
{ label: "指向地点", prop: "targetLocation" },
|
||||
{ label: "线索内容", prop: "clueContent", width: 200 },
|
||||
{ label: "附件", prop: "attachment", showSolt: true },
|
||||
{ label: "审核状态", prop: "shzt", showSolt: true },
|
||||
]
|
||||
});
|
||||
|
||||
const queryFrom = ref({});
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getList()
|
||||
tabHeightFn();
|
||||
});
|
||||
|
||||
// 搜索
|
||||
const onSearch = (val) => {
|
||||
queryFrom.value = { ...val };
|
||||
//选择类型
|
||||
const handleType = (val) => {
|
||||
pageData.keyCount++;
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList();
|
||||
};
|
||||
getList()
|
||||
}
|
||||
// 搜索
|
||||
const onSearch = (val) =>{
|
||||
queryFrom.value = {...val}
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList()
|
||||
}
|
||||
|
||||
//采纳
|
||||
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) => {
|
||||
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 };
|
||||
qcckGet(data, "/mosty-gsxt/tbGsxtXs/selectPage").then((res) => {
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
pageData.tableConfiger.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
pageData.tableConfiger.loading = false;
|
||||
});
|
||||
};
|
||||
// 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; })
|
||||
}
|
||||
|
||||
// 详情
|
||||
const addEdit = (type, row) => {
|
||||
detailDiloag.value.init(type, row);
|
||||
nextTick(()=>{
|
||||
detailDiloag.value.init(type, row);
|
||||
})
|
||||
};
|
||||
|
||||
// 表格高度计算
|
||||
@ -286,3 +183,4 @@ const tabHeightFn = () => {
|
||||
background: rgba(0, 0, 0, 0.5) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
Reference in New Issue
Block a user