更新数据
This commit is contained in:
@ -19,9 +19,7 @@
|
|||||||
:before-upload="beforeImgUpload"
|
:before-upload="beforeImgUpload"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<el-button v-if="props.showBtn" size="small" type="primary"
|
<el-button v-if="props.showBtn" size="small" type="primary">上传文件</el-button>
|
||||||
>上传文件</el-button
|
|
||||||
>
|
|
||||||
<el-icon v-else> <Plus /> </el-icon>
|
<el-icon v-else> <Plus /> </el-icon>
|
||||||
</template>
|
</template>
|
||||||
<template #file="{ file }" v-if="!props.showBtn">
|
<template #file="{ file }" v-if="!props.showBtn">
|
||||||
@ -108,13 +106,11 @@ const props = defineProps({
|
|||||||
showBtn: {
|
showBtn: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const actionUrl = computed(() =>
|
const actionUrl = computed(() =>
|
||||||
props.isImg
|
props.isImg ? "/mosty-api/mosty-base/minio/image/upload/id" : "/mosty-api/mosty-base/minio/file/upload"
|
||||||
? "/mosty-api/mosty-base/minio/image/upload/id"
|
|
||||||
: "/mosty-api/mosty-base/minio/file/upload"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const emits = defineEmits(["update:modelValue", "handleChange"]);
|
const emits = defineEmits(["update:modelValue", "handleChange"]);
|
||||||
@ -183,11 +179,11 @@ watch(
|
|||||||
if (arr && arr.length > 0) {
|
if (arr && arr.length > 0) {
|
||||||
if (!props.sfUrl) {
|
if (!props.sfUrl) {
|
||||||
fileList.value = arr.map((el) => {
|
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 {
|
} else {
|
||||||
fileList.value = arr.map((el) => {
|
fileList.value = arr.map((el) => {
|
||||||
return { url: el };
|
return { url: el ,name:'生活时尚'};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -197,13 +193,12 @@ watch(
|
|||||||
|
|
||||||
|
|
||||||
const handlerSuccess = (res, file) => {
|
const handlerSuccess = (res, file) => {
|
||||||
console.log(file,'===========00');
|
file.url = `/mosty-api/mosty-base/minio/image/download/` + res.data;
|
||||||
// file.url = `/mosty-api/mosty-base/minio/image/download/` + res.data;
|
fileList.value.push(file);
|
||||||
// fileList.value.push(file);
|
let arr = props.modelValue ? props.modelValue : [];
|
||||||
// let arr = props.modelValue ? props.modelValue : [];
|
arr.push(res.data);
|
||||||
// arr.push(res.data);
|
emits("update:modelValue", arr);
|
||||||
// emits("update:modelValue", arr);
|
emits("handleChange", props.modelValue);
|
||||||
// emits("handleChange", props.modelValue);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleExceed = (files, fileList) => {
|
const handleExceed = (files, fileList) => {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<template #scfj>
|
<template #scfj>
|
||||||
<div style="width: 100%;padding-left: 50px;">
|
<div style="width: 100%;padding-left: 50px;">
|
||||||
<div>上传附件:<span class="f12">(可附电子表格、Word文档、图像、音视频文件)</span> </div>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormMessage>
|
</FormMessage>
|
||||||
@ -108,7 +108,6 @@ onMounted(()=>{
|
|||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
const init = (list) => {
|
const init = (list) => {
|
||||||
|
|
||||||
fjdz.value = []
|
fjdz.value = []
|
||||||
tabHeightFn()
|
tabHeightFn()
|
||||||
dialogForm.value = true;
|
dialogForm.value = true;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<template #scfj>
|
<template #scfj>
|
||||||
<div style="width: 100%;padding-left: 50px;">
|
<div style="width: 100%;padding-left: 50px;">
|
||||||
<div>上传附件:<span class="f12">(可附电子表格、Word文档、图像、音视频文件)</span> </div>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormMessage>
|
</FormMessage>
|
||||||
@ -127,6 +127,7 @@ const init = (type, row) => {
|
|||||||
// 根据id查询详情
|
// 根据id查询详情
|
||||||
const getDataById = (id) => {
|
const getDataById = (id) => {
|
||||||
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
||||||
|
fjdz.value = res.fjdz ? res.fjdz.split(',') :[];
|
||||||
listQuery.value = res;
|
listQuery.value = res;
|
||||||
pageForm.tableData = res.ryList || [];
|
pageForm.tableData = res.ryList || [];
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<template #scfj>
|
<template #scfj>
|
||||||
<div style="width: 100%;padding-left: 50px;">
|
<div style="width: 100%;padding-left: 50px;">
|
||||||
<div>上传附件:<span class="f12">(可附电子表格、Word文档、图像、音视频文件)</span> </div>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormMessage>
|
</FormMessage>
|
||||||
@ -127,6 +127,7 @@ const init = (type, row) => {
|
|||||||
// 根据id查询详情
|
// 根据id查询详情
|
||||||
const getDataById = (id) => {
|
const getDataById = (id) => {
|
||||||
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
||||||
|
fjdz.value = res.fjdz ? res.fjdz.split(',') :[];
|
||||||
listQuery.value = res;
|
listQuery.value = res;
|
||||||
pageForm.tableData = res.ryList || [];
|
pageForm.tableData = res.ryList || [];
|
||||||
});
|
});
|
||||||
|
@ -146,8 +146,8 @@ const pageData = reactive({
|
|||||||
{ label: "线索名称", prop: "xsMc" },
|
{ label: "线索名称", prop: "xsMc" },
|
||||||
{ label: "线索类型", prop: "xlLx",showSolt:true },
|
{ label: "线索类型", prop: "xlLx",showSolt:true },
|
||||||
{ label: "线索来源", prop: "qbLy",showSolt:true },
|
{ label: "线索来源", prop: "qbLy",showSolt:true },
|
||||||
{ label: "指向时间", prop: "zxkssj",showSolt:true },
|
{ label: "指向时间", prop: "zxkssj",showSolt:true,showOverflowTooltip:true },
|
||||||
{ label: "上报时间", prop: "sxsbsj" },
|
{ label: "上报时间", prop: "sxsbsj",showOverflowTooltip:true },
|
||||||
{ label: "指向地点", prop: "zxdz" },
|
{ label: "指向地点", prop: "zxdz" },
|
||||||
{ label: "线索内容", prop: "xsNr"},
|
{ label: "线索内容", prop: "xsNr"},
|
||||||
{ label: "处置状态", prop: "czzt",showSolt: true},
|
{ label: "处置状态", prop: "czzt",showSolt: true},
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<template #scfj>
|
<template #scfj>
|
||||||
<div style="width: 100%;padding-left: 50px;">
|
<div style="width: 100%;padding-left: 50px;">
|
||||||
<div>上传附件:<span class="f12">(可附电子表格、Word文档、图像、音视频文件)</span> </div>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormMessage>
|
</FormMessage>
|
||||||
@ -122,6 +122,7 @@ const init = (type, row) => {
|
|||||||
// 根据id查询详情
|
// 根据id查询详情
|
||||||
const getDataById = (id) => {
|
const getDataById = (id) => {
|
||||||
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
||||||
|
fjdz.value = res.fjdz ? res.fjdz.split(',') :[];
|
||||||
listQuery.value = res;
|
listQuery.value = res;
|
||||||
pageForm.tableData = res.ryList || [];
|
pageForm.tableData = res.ryList || [];
|
||||||
});
|
});
|
||||||
|
@ -35,6 +35,10 @@
|
|||||||
<template #shzt="{row}">
|
<template #shzt="{row}">
|
||||||
<DictTag :tag="false" :value="row.shzt" :options="D_BZ_XSSHZT" />
|
<DictTag :tag="false" :value="row.shzt" :options="D_BZ_XSSHZT" />
|
||||||
</template>
|
</template>
|
||||||
|
<template #zxkssj="{row}">
|
||||||
|
<span>{{ row.zxkssj }}</span> 至
|
||||||
|
<span>{{ row.zxjssj }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
<template #controls="{ row }">
|
<template #controls="{ row }">
|
||||||
@ -79,11 +83,10 @@ const isShowhB = ref()
|
|||||||
const searchConfiger = ref([
|
const searchConfiger = ref([
|
||||||
{ label: "线索名称", prop: 'xsMc', placeholder: "请输入线索名称", showType: "input" },
|
{ label: "线索名称", prop: 'xsMc', placeholder: "请输入线索名称", showType: "input" },
|
||||||
{ label: "内容关键字", prop: 'xsNr', placeholder: "请输入语义关键字", showType: "input" },
|
{ label: "内容关键字", prop: 'xsNr', placeholder: "请输入语义关键字", showType: "input" },
|
||||||
{ label: "线索类型", prop: 'xlLx', placeholder: "请选择线索类型", showType: "select" },
|
{ label: "线索类型", prop: 'xlLx', placeholder: "请选择线索类型", showType: "select",options:D_GS_XS_LX },
|
||||||
{ label: "线索来源", prop: 'qbLy', placeholder: "请选择线索来源", showType: "select" },
|
{ label: "线索来源", prop: 'qbLy', placeholder: "请选择线索来源", showType: "select",options:D_GS_XS_LY },
|
||||||
{ label: "线索状态", prop: 'xszt', placeholder: "请选择线索状态", showType: "select" },
|
{ label: "开始时间", prop: 'kssj', placeholder: "请选择开始时间", showType: "date" },
|
||||||
{ label: "开始时间", prop: 'zxkssj', placeholder: "请选择开始时间", showType: "date" },
|
{ label: "结束时间", prop: 'jssj', placeholder: "请选择结束时间", showType: "date" },
|
||||||
{ label: "结束时间", prop: 'zxjssj', placeholder: "请选择结束时间", showType: "date" },
|
|
||||||
{ label: "指向地点", prop: 'zxdz', placeholder: "请输入指向地点", showType: "input" },
|
{ label: "指向地点", prop: 'zxdz', placeholder: "请输入指向地点", showType: "input" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -111,8 +114,8 @@ const pageData = reactive({
|
|||||||
{ label: "线索名称", prop: "xsMc" },
|
{ label: "线索名称", prop: "xsMc" },
|
||||||
{ label: "线索类型", prop: "xlLx",showSolt:true },
|
{ label: "线索类型", prop: "xlLx",showSolt:true },
|
||||||
{ label: "线索来源", prop: "qbLy",showSolt:true },
|
{ label: "线索来源", prop: "qbLy",showSolt:true },
|
||||||
{ label: "开始时间", prop: "zxkssj" },
|
{ label: "指向时间", prop: "zxkssj",showSolt:true,showOverflowTooltip:true },
|
||||||
{ label: "结束时间", prop: "zxjssj" },
|
{ label: "上报时间", prop: "sxsbsj",showOverflowTooltip:true },
|
||||||
{ label: "指向地点", prop: "zxdz" },
|
{ label: "指向地点", prop: "zxdz" },
|
||||||
{ label: "线索内容", prop: "xsNr"},
|
{ label: "线索内容", prop: "xsNr"},
|
||||||
{ label: "处置状态", prop: "czzt",showSolt: true},
|
{ label: "处置状态", prop: "czzt",showSolt: true},
|
||||||
@ -146,7 +149,7 @@ const changeSize = (val) =>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取列表
|
// 获取列表
|
||||||
const getList = (val) =>{
|
const getList = () =>{
|
||||||
pageData.tableConfiger.loading = true;
|
pageData.tableConfiger.loading = true;
|
||||||
let data = { ...pageData.pageConfiger, ...queryFrom.value };
|
let data = { ...pageData.pageConfiger, ...queryFrom.value };
|
||||||
qcckGet(data,'/mosty-gsxt/qbcj/selectPage').then(res=>{
|
qcckGet(data,'/mosty-gsxt/qbcj/selectPage').then(res=>{
|
||||||
|
@ -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>
|
@ -3,6 +3,7 @@
|
|||||||
<div class="head_box">
|
<div class="head_box">
|
||||||
<span class="title">{{ title }}</span>
|
<span class="title">{{ title }}</span>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" :loading="loading" @click="submit">保存</el-button>
|
||||||
<el-button @click="close">关闭</el-button>
|
<el-button @click="close">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -21,11 +22,11 @@
|
|||||||
<template #scfj>
|
<template #scfj>
|
||||||
<div style="width: 100%;padding-left: 50px;">
|
<div style="width: 100%;padding-left: 50px;">
|
||||||
<div>上传附件:<span class="f12">(可附电子表格、Word文档、图像、音视频文件)</span> </div>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormMessage>
|
</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
|
<MyTable
|
||||||
:tableData="pageForm.tableData"
|
:tableData="pageForm.tableData"
|
||||||
:tableColumn="pageForm.tableColumn"
|
:tableColumn="pageForm.tableColumn"
|
||||||
@ -42,13 +43,21 @@
|
|||||||
<el-tag type="success" v-for="(it,idx) in row.bqList" :key="idx">{{ it.bqMc }}</el-tag >
|
<el-tag type="success" v-for="(it,idx) in row.bqList" :key="idx">{{ it.bqMc }}</el-tag >
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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>
|
</MyTable>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 人员 -->
|
||||||
|
<AddPeo ref="showAdd" :dic="props.dic" @change="getPeo"></AddPeo>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import * as MOSTY from "@/components/MyComponents/index";
|
import * as MOSTY from "@/components/MyComponents/index";
|
||||||
|
import AddPeo from './addPeo.vue'
|
||||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||||
@ -77,7 +86,7 @@ const formData = ref([
|
|||||||
{ prop: "scfj", type: "slot",width:'100%'},
|
{ prop: "scfj", type: "slot",width:'100%'},
|
||||||
{ label: "线索内容", prop: "xsNr", type: "textarea",width:'100%'},
|
{ label: "线索内容", prop: "xsNr", type: "textarea",width:'100%'},
|
||||||
]);
|
]);
|
||||||
const fjdz = ref()
|
const fjdz = ref([])
|
||||||
const listQuery = ref({}); //表单
|
const listQuery = ref({}); //表单
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const elform = ref();
|
const elform = ref();
|
||||||
@ -88,8 +97,7 @@ const pageForm = reactive({
|
|||||||
tableConfiger: {
|
tableConfiger: {
|
||||||
rowHieght: 61,
|
rowHieght: 61,
|
||||||
showSelectType: "checkBox",
|
showSelectType: "checkBox",
|
||||||
loading: false,
|
loading: false
|
||||||
haveControls: false,
|
|
||||||
},
|
},
|
||||||
controlsWidth: 220,
|
controlsWidth: 220,
|
||||||
tableColumn: [
|
tableColumn: [
|
||||||
@ -101,6 +109,7 @@ const pageForm = reactive({
|
|||||||
{ label: "标签", prop: "bqList",showSolt:true }
|
{ label: "标签", prop: "bqList",showSolt:true }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
const showAdd = ref()
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
tabHeightFn()
|
tabHeightFn()
|
||||||
})
|
})
|
||||||
@ -118,11 +127,47 @@ const init = (type, row) => {
|
|||||||
// 根据id查询详情
|
// 根据id查询详情
|
||||||
const getDataById = (id) => {
|
const getDataById = (id) => {
|
||||||
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
qcckGet({id}, "/mosty-gsxt/qbcj/selectByid").then((res) => {
|
||||||
|
fjdz.value = res.fjdz ? res.fjdz.split(',') :[];
|
||||||
listQuery.value = res;
|
listQuery.value = res;
|
||||||
pageForm.tableData = res.ryList || [];
|
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 = () => {
|
const close = () => {
|
||||||
fjdz.value = []
|
fjdz.value = []
|
||||||
@ -131,7 +176,6 @@ const close = () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 表格高度计算
|
// 表格高度计算
|
||||||
const tabHeightFn = () => {
|
const tabHeightFn = () => {
|
||||||
pageForm.tableHeight = window.innerHeight - 720;
|
pageForm.tableHeight = window.innerHeight - 720;
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 编辑详情 -->
|
<!-- 编辑详情 -->
|
||||||
<EditAddForm ref="detailDiloag" @updateDate="getList" />
|
<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>
|
<ExtractionText v-model="showText" @change="getText"></ExtractionText>
|
||||||
</div>
|
</div>
|
||||||
@ -106,8 +106,8 @@ const searchConfiger = ref([
|
|||||||
{
|
{
|
||||||
label: "要素类型",
|
label: "要素类型",
|
||||||
prop: "yslx",
|
prop: "yslx",
|
||||||
placeholder: "请选择要素类型",
|
placeholder: "请输入要素类型",
|
||||||
showType: "select"
|
showType: "input"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "要素名称",
|
label: "要素名称",
|
||||||
@ -206,9 +206,11 @@ const onSearchR = (val) => {
|
|||||||
getjxListR();
|
getjxListR();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 获取数据
|
||||||
const getjxListR = () => {
|
const getjxListR = () => {
|
||||||
pageData.tableConfigerR.loading = true;
|
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.tableDataR = res.records || [];
|
||||||
pageData.pageConfigerR.total = res.total;
|
pageData.pageConfigerR.total = res.total;
|
||||||
pageData.tableConfigerR.loading = false;
|
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 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 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'
|
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;
|
obj.messages[1].content = obj.messages[1].content + val.text;
|
||||||
prsentText.value = obj;
|
prsentText.value = obj;
|
||||||
@ -312,9 +316,9 @@ const handleFx = () => {
|
|||||||
qbid:qbid.value,
|
qbid:qbid.value,
|
||||||
...message.jbxx[0],
|
...message.jbxx[0],
|
||||||
ryList:message.ryList,
|
ryList:message.ryList,
|
||||||
|
cjLx:2,
|
||||||
}
|
}
|
||||||
qcckPost(params,'/mosty-gsxt/qbcj/add').then((res)=>{
|
qcckPost(params,'/mosty-gsxt/qbcj/add').then((res)=>{
|
||||||
console.log(res,'============');
|
|
||||||
getjxListR()
|
getjxListR()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user