更新数据

This commit is contained in:
2025-07-19 17:08:53 +08:00
parent 72a2e174c1
commit fbd2431f63
10 changed files with 199 additions and 44 deletions

View File

@ -19,9 +19,7 @@
:before-upload="beforeImgUpload"
>
<template #default>
<el-button v-if="props.showBtn" size="small" type="primary"
>上传文件</el-button
>
<el-button v-if="props.showBtn" size="small" type="primary">上传文件</el-button>
<el-icon v-else> <Plus /> </el-icon>
</template>
<template #file="{ file }" v-if="!props.showBtn">
@ -108,13 +106,11 @@ const props = defineProps({
showBtn: {
type: Boolean,
default: false
}
},
});
const actionUrl = computed(() =>
props.isImg
? "/mosty-api/mosty-base/minio/image/upload/id"
: "/mosty-api/mosty-base/minio/file/upload"
props.isImg ? "/mosty-api/mosty-base/minio/image/upload/id" : "/mosty-api/mosty-base/minio/file/upload"
);
const emits = defineEmits(["update:modelValue", "handleChange"]);
@ -183,11 +179,11 @@ watch(
if (arr && arr.length > 0) {
if (!props.sfUrl) {
fileList.value = arr.map((el) => {
return { url: `/mosty-api/mosty-base/minio/image/download/` + el };
return { url: `/mosty-api/mosty-base/minio/image/download/` + el,name:'生活时尚' };
});
} else {
fileList.value = arr.map((el) => {
return { url: el };
return { url: el ,name:'生活时尚'};
});
}
}
@ -197,13 +193,12 @@ watch(
const handlerSuccess = (res, file) => {
console.log(file,'===========00');
// file.url = `/mosty-api/mosty-base/minio/image/download/` + res.data;
// fileList.value.push(file);
// let arr = props.modelValue ? props.modelValue : [];
// arr.push(res.data);
// emits("update:modelValue", arr);
// emits("handleChange", props.modelValue);
file.url = `/mosty-api/mosty-base/minio/image/download/` + res.data;
fileList.value.push(file);
let arr = props.modelValue ? props.modelValue : [];
arr.push(res.data);
emits("update:modelValue", arr);
emits("handleChange", props.modelValue);
};
const handleExceed = (files, fileList) => {

View File

@ -22,7 +22,7 @@
<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="fjdz" /> </div>
<div><MOSTY.Upload :showBtn="true" :isImg="true" :limit="10" v-model="fjdz" /> </div>
</div>
</template>
</FormMessage>
@ -108,7 +108,6 @@ onMounted(()=>{
// 初始化数据
const init = (list) => {
fjdz.value = []
tabHeightFn()
dialogForm.value = true;

View File

@ -21,7 +21,7 @@
<template #scfj>
<div style="width: 100%;padding-left: 50px;">
<div>上传附件:<span class="f12">可附电子表格Word文档图像音视频文件</span> </div>
<div><MOSTY.Upload :showBtn="true" disabled :limit="10" v-model="fjdz" /> </div>
<div><MOSTY.Upload :showBtn="true" :isImg="true" disabled :limit="10" v-model="fjdz" /> </div>
</div>
</template>
</FormMessage>
@ -127,6 +127,7 @@ const init = (type, row) => {
// 根据id查询详情
const getDataById = (id) => {
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
fjdz.value = res.fjdz ? res.fjdz.split(',') :[];
listQuery.value = res;
pageForm.tableData = res.ryList || [];
});

View File

@ -22,7 +22,7 @@
<template #scfj>
<div style="width: 100%;padding-left: 50px;">
<div>上传附件:<span class="f12">可附电子表格Word文档图像音视频文件</span> </div>
<div><MOSTY.Upload :showBtn="true" :isImg="false" :limit="10" v-model="fjdz" /> </div>
<div><MOSTY.Upload :showBtn="true" :isImg="true" :limit="10" v-model="fjdz" /> </div>
</div>
</template>
</FormMessage>
@ -127,6 +127,7 @@ const init = (type, row) => {
// 根据id查询详情
const getDataById = (id) => {
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
fjdz.value = res.fjdz ? res.fjdz.split(',') :[];
listQuery.value = res;
pageForm.tableData = res.ryList || [];
});

View File

@ -146,8 +146,8 @@ const pageData = reactive({
{ label: "线索名称", prop: "xsMc" },
{ label: "线索类型", prop: "xlLx",showSolt:true },
{ label: "线索来源", prop: "qbLy",showSolt:true },
{ label: "指向时间", prop: "zxkssj",showSolt:true },
{ label: "上报时间", prop: "sxsbsj" },
{ label: "指向时间", prop: "zxkssj",showSolt:true,showOverflowTooltip:true },
{ label: "上报时间", prop: "sxsbsj",showOverflowTooltip:true },
{ label: "指向地点", prop: "zxdz" },
{ label: "线索内容", prop: "xsNr"},
{ label: "处置状态", prop: "czzt",showSolt: true},

View File

@ -21,7 +21,7 @@
<template #scfj>
<div style="width: 100%;padding-left: 50px;">
<div>上传附件:<span class="f12">可附电子表格Word文档图像音视频文件</span> </div>
<div><MOSTY.Upload :showBtn="true" disabled :limit="10" v-model="fjdz" /> </div>
<div><MOSTY.Upload :showBtn="true" :isImg="true" disabled :limit="10" v-model="fjdz" /> </div>
</div>
</template>
</FormMessage>
@ -122,6 +122,7 @@ const init = (type, row) => {
// 根据id查询详情
const getDataById = (id) => {
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
fjdz.value = res.fjdz ? res.fjdz.split(',') :[];
listQuery.value = res;
pageForm.tableData = res.ryList || [];
});

View File

@ -35,6 +35,10 @@
<template #shzt="{row}">
<DictTag :tag="false" :value="row.shzt" :options="D_BZ_XSSHZT" />
</template>
<template #zxkssj="{row}">
<span>{{ row.zxkssj }}</span>
<span>{{ row.zxjssj }}</span>
</template>
<!-- 操作 -->
<template #controls="{ row }">
@ -79,11 +83,10 @@ const isShowhB = ref()
const searchConfiger = ref([
{ label: "线索名称", prop: 'xsMc', placeholder: "请输入线索名称", showType: "input" },
{ label: "内容关键字", prop: 'xsNr', placeholder: "请输入语义关键字", showType: "input" },
{ label: "线索类型", prop: 'xlLx', placeholder: "请选择线索类型", showType: "select" },
{ label: "线索来源", prop: 'qbLy', placeholder: "请选择线索来源", showType: "select" },
{ label: "线索状态", prop: 'xszt', placeholder: "请选择线索状态", showType: "select" },
{ label: "开始时间", prop: 'zxkssj', placeholder: "请选择开始时间", showType: "date" },
{ label: "结束时间", prop: 'zxjssj', placeholder: "请选择结束时间", showType: "date" },
{ label: "线索类型", prop: 'xlLx', placeholder: "请选择线索类型", showType: "select",options:D_GS_XS_LX },
{ label: "线索来源", prop: 'qbLy', placeholder: "请选择线索来源", showType: "select",options:D_GS_XS_LY },
{ label: "开始时间", prop: 'kssj', placeholder: "请选择开始时间", showType: "date" },
{ label: "结束时间", prop: 'jssj', placeholder: "请选择结束时间", showType: "date" },
{ label: "指向地点", prop: 'zxdz', placeholder: "请输入指向地点", showType: "input" },
]);
@ -111,8 +114,8 @@ const pageData = reactive({
{ label: "线索名称", prop: "xsMc" },
{ label: "线索类型", prop: "xlLx",showSolt:true },
{ label: "线索来源", prop: "qbLy",showSolt:true },
{ label: "开始时间", prop: "zxkssj" },
{ label: "结束时间", prop: "zxjssj" },
{ label: "指向时间", prop: "zxkssj",showSolt:true,showOverflowTooltip:true },
{ label: "上报时间", prop: "sxsbsj",showOverflowTooltip:true },
{ label: "指向地点", prop: "zxdz" },
{ label: "线索内容", prop: "xsNr"},
{ label: "处置状态", prop: "czzt",showSolt: true},
@ -146,7 +149,7 @@ const changeSize = (val) =>{
}
// 获取列表
const getList = (val) =>{
const getList = () =>{
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
qcckGet(data,'/mosty-gsxt/qbcj/selectPage').then(res=>{

View File

@ -0,0 +1,107 @@
<template>
<el-dialog v-model="showDialog" :destroy-on-close="true" :title="title+'人员'" @close="close" :close-on-click-modal="false">
<FormMessage v-model="listQuery" :formList="formData" labelWidth="120px" ref="elform" :rules="rules">
<template #bqList>
<div class="marks pointer" @click="chooseMarksVisible = true">
<span style="color: rgb(175 178 184);padding-left: 10px;" v-if="!listQuery.bqList || listQuery.bqList.length == 0 ">请选择标签</span>
<span v-else >
<el-tag @close.stop="closeTag(idx)" type="success" closable v-for="(it,idx) in listQuery.bqList" :key="idx">{{ it.bqMc }}</el-tag >
</span>
</div>
</template>
</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>
<ChooseMarks v-model="chooseMarksVisible" @choosed="choosed" :roleIds="roleIds" />
</template>
<script setup>
import ChooseMarks from "@/components/ChooseList/ChooseMarks/index.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { reactive, ref } from 'vue';
const props = defineProps({
dic:{
type:Object,
default:{}
},
})
const chooseMarksVisible = ref(false)
const roleIds = ref([])
const elform = ref()
const showDialog = ref(false)
const emit = defineEmits(['change'])
const listQuery = ref({})
const formData = ref([
{ label: "姓名", prop: "xm", type: "input" ,width:'48%'},
{ label: "性别", prop: "xb", type: "select",options:props.dic.D_BZ_XB ,width:'48%'},
{ label: "身份证号", prop: "sfzh", type: "input" ,width:'48%'},
{ label: "户籍地", prop: "hjdz", type: "input",width:'48%' },
{ label: "户籍地派出所", prop: "hjdpcsdm", type: "department" ,width:'48%'},
{ label: "标签", prop: "bqList", type: "slot",width:'100%' },
{ label: "是否挑头人", prop: "sfttr", type: "select",options:props.dic.D_BZ_SF ,width:'48%'},
{ label: "是否响应人", prop: "sfxyr", type: "select" ,options:props.dic.D_BZ_SF,width:'48%' },
{ label: "所属群体", prop: "ssqt", type: "input" ,width:'48%'},
{ label: "微信号", prop: "wx", type: "input" ,width:'48%'},
{ label: "QQ", prop: "qq", type: "input" ,width:'48%'},
])
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 title = ref('')
const order = ref(null)
const init = (type,row,index) =>{
title.value = type == 'add' ? '新增' :'编辑';
order.value = index;
showDialog.value = true;
if(row) listQuery.value = {...row};
}
// 选择标签
const choosed = (val) => {
listQuery.value.bqList = val.map(v=>{
return { bqDm:v.bqDm, bqId:v.id, bqLb:v.bqLb, bqLx:v.bqLx, bqMc:v.bqMc }
});
roleIds.value = val.map(v=>v.id)
}
// 删除数据
const closeTag = (idx) =>{
listQuery.value.bqList.splice(idx,1)
roleIds.value.splice(idx,1)
}
const submitForm = () =>{
elform.value.submit((val)=>{
let obj = JSON.parse(JSON.stringify({ data:val,type:title.value ,index:order.value}))
emit('change',obj)
showDialog.value = false;
elform.value.reset()
})
}
const close = () =>{
elform.value.reset();
showDialog.value = false;
}
defineExpose({init})
</script>
<style lang="scss" scoped>
.marks{
width: 100%;
width: 100%;
min-height: 32px;
border: 1px solid #e9e9e9;
border-radius: 4px;
}
</style>

View File

@ -2,7 +2,8 @@
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">{{ title }}</span>
<div>
<div>
<el-button type="primary" :loading="loading" @click="submit">保存</el-button>
<el-button @click="close">关闭</el-button>
</div>
</div>
@ -21,11 +22,11 @@
<template #scfj>
<div style="width: 100%;padding-left: 50px;">
<div>上传附件:<span class="f12">可附电子表格Word文档图像音视频文件</span> </div>
<div><MOSTY.Upload :showBtn="true" disabled :limit="10" v-model="fjdz" /> </div>
<MOSTY.Upload :showBtn="true" :isImg="true" :limit="10" v-model="fjdz" />
</div>
</template>
</FormMessage>
<el-divider content-position="left"><span class="mr20">相关人员</span> </el-divider>
<el-divider content-position="left"><span class="mr20">相关人员</span> <el-button type="primary" size="small" @click="addEdit('add',null)">添加人员</el-button></el-divider>
<MyTable
:tableData="pageForm.tableData"
:tableColumn="pageForm.tableColumn"
@ -42,13 +43,21 @@
<el-tag type="success" v-for="(it,idx) in row.bqList" :key="idx">{{ it.bqMc }}</el-tag >
</div>
</template>
<!-- 操作 -->
<template #controls="{ row,index }">
<el-link size="small" type="success" @click="addEdit('edit', row,index)">编辑</el-link>
<el-link size="small" type="danger" @click="deleteRow(index)">删除</el-link>
</template>
</MyTable>
</div>
<!-- 人员 -->
<AddPeo ref="showAdd" :dic="props.dic" @change="getPeo"></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";
@ -77,7 +86,7 @@ const formData = ref([
{ prop: "scfj", type: "slot",width:'100%'},
{ label: "线索内容", prop: "xsNr", type: "textarea",width:'100%'},
]);
const fjdz = ref()
const fjdz = ref([])
const listQuery = ref({}); //表单
const loading = ref(false);
const elform = ref();
@ -88,8 +97,7 @@ const pageForm = reactive({
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false,
haveControls: false,
loading: false
},
controlsWidth: 220,
tableColumn: [
@ -101,6 +109,7 @@ const pageForm = reactive({
{ label: "标签", prop: "bqList",showSolt:true }
]
});
const showAdd = ref()
onMounted(()=>{
tabHeightFn()
})
@ -118,11 +127,47 @@ const init = (type, row) => {
// 根据id查询详情
const getDataById = (id) => {
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
fjdz.value = res.fjdz ? res.fjdz.split(',') :[];
listQuery.value = res;
pageForm.tableData = res.ryList || [];
});
};
// 打开弹窗
const addEdit = (type,row,index) =>{
showAdd.value.init(type,row,index)
}
// 新增人员
const getPeo = (val) =>{
if(val.type == '新增'){
pageForm.tableData.push(val.data);
}else{
pageForm.tableData.splice(val.index, 1, val.data); // 在索引2的位置删除一个元素并插入newValue
}
}
const deleteRow = (index) =>{
pageForm.tableData.splice(index,1)
}
// 提交
const submit = () => {
elform.value.submit((data) => {
let params = { ...data ,ryList:pageForm.tableData,cjLx:'2'};
params.fjdz = fjdz.value.length > 0 ? fjdz.value.join(','):'';
loading.value = true;
qcckPost(params, "/mosty-gsxt/qbcj/update").then((res) => {
loading.value = false;
proxy.$message({ type: "success", message: title.value + "成功" });
emit("change");
close();
}).catch(() => {
loading.value = false;
});
});
};
// 关闭
const close = () => {
fjdz.value = []
@ -131,7 +176,6 @@ const close = () => {
loading.value = false;
};
// 表格高度计算
const tabHeightFn = () => {
pageForm.tableHeight = window.innerHeight - 720;

View File

@ -73,7 +73,7 @@
</div>
<!-- 编辑详情 -->
<EditAddForm ref="detailDiloag" @updateDate="getList" />
<Detail ref="detailForm" v-if="isShow" :dic="{D_BZ_SF,D_BZ_XB,D_GS_XS_LY,D_BZ_SSZT,D_GS_XS_LX ,D_GS_XS_QTLX}" />
<Detail ref="detailForm" @change="getjxListR" v-if="isShow" :dic="{D_BZ_SF,D_BZ_XB,D_GS_XS_LY,D_BZ_SSZT,D_GS_XS_LX ,D_GS_XS_QTLX}" />
<!-- 文字解析 -->
<ExtractionText v-model="showText" @change="getText"></ExtractionText>
</div>
@ -106,8 +106,8 @@ const searchConfiger = ref([
{
label: "要素类型",
prop: "yslx",
placeholder: "请选择要素类型",
showType: "select"
placeholder: "请输入要素类型",
showType: "input"
},
{
label: "要素名称",
@ -206,9 +206,11 @@ const onSearchR = (val) => {
getjxListR();
};
// 获取数据
const getjxListR = () => {
pageData.tableConfigerR.loading = true;
qcckGet(queryFromR.value,'/mosty-gsxt/qbcj/selectPage').then((res)=>{
let params = { ...queryFromR.value, cjLx:2, }
qcckGet(params,'/mosty-gsxt/qbcj/selectPage').then((res)=>{
pageData.tableDataR = res.records || [];
pageData.pageConfigerR.total = res.total;
pageData.tableConfigerR.loading = false;
@ -284,7 +286,9 @@ const getText = (val) =>{
let xslx = '线索类型是一个字典,字典内容包括:' + (D_GS_XS_LX.value.map(item=>item.dm+':'+item.zdmc).join(','))+'\n'
let qbLy = '情报来源是一个字典,字典内容包括:' + (D_GS_XS_LY.value.map(item=>item.dm+':'+item.zdmc).join(','))+'\n'
let sszt = '所属专题是一个字典,字典内容包括:' + (D_BZ_SSZT.value.map(item=>item.dm+':'+item.zdmc).join(','))+'\n'
obj.messages[0].content = obj.messages[0].content + xslx + qbLy + sszt;
let time = '时间必须按照 YYYY-MM-DD HH:mm:ss 的格式 \n'
obj.messages[0].content = obj.messages[0].content + xslx + qbLy + sszt + time;
// *********************
obj.messages[1].content = obj.messages[1].content + val.text;
prsentText.value = obj;
@ -312,9 +316,9 @@ const handleFx = () => {
qbid:qbid.value,
...message.jbxx[0],
ryList:message.ryList,
cjLx:2,
}
qcckPost(params,'/mosty-gsxt/qbcj/add').then((res)=>{
console.log(res,'============');
getjxListR()
})
})