研判态势
This commit is contained in:
@ -503,7 +503,16 @@ export const publicRoutes = [
|
|||||||
name: "tsypHome",
|
name: "tsypHome",
|
||||||
component: () => import("@/views/backOfficeSystem/JudgmentHome/tsypHome/index"),
|
component: () => import("@/views/backOfficeSystem/JudgmentHome/tsypHome/index"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "态势研判",
|
title: "模型管理",
|
||||||
|
icon: "article"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/situationHome",
|
||||||
|
name: "situationHome",
|
||||||
|
component: () => import("@/views/backOfficeSystem/JudgmentHome/situationHome/index"),
|
||||||
|
meta: {
|
||||||
|
title: "研判态势",
|
||||||
icon: "article"
|
icon: "article"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -62,7 +62,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<YpModel v-model="showModel" :textContent="textContent" ></YpModel>
|
<YpModel v-model="showModel" :textContent="textContent" ></YpModel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -217,6 +216,8 @@ const handleYP = () =>{
|
|||||||
html+=`<p>${data.bc}</p>`
|
html+=`<p>${data.bc}</p>`
|
||||||
html+=`<p>${data.end}</p>`
|
html+=`<p>${data.end}</p>`
|
||||||
textContent.value = html;
|
textContent.value = html;
|
||||||
|
console.log(textContent.value,'textContent.value');
|
||||||
|
|
||||||
showModel.value = true;
|
showModel.value = true;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="modelValue" center width="1000px" :destroy-on-close="true" title="网上会商" @close="close"
|
||||||
|
:close-on-click-modal="false">
|
||||||
|
<div class="cntBox">
|
||||||
|
<div class="form_item flex">
|
||||||
|
<span class="demonstration">会议时间</span>
|
||||||
|
<el-date-picker style="width: 28vw;" v-model="listQuery.hysj" type="datetime" placeholder="请选择参会时间" />
|
||||||
|
<el-button type="primary" style="margin-left: 6px;">搜索</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="form_item flex">
|
||||||
|
<span class="demonstration">参会部门</span>
|
||||||
|
<MOSTY.Department clearable style="width: 28vw;" v-model="listQuery.ssbmdm" />
|
||||||
|
</div>
|
||||||
|
<el-transfer v-model="listQuery.chry" :titles="['人员信息', '参会人员']" :data="data">
|
||||||
|
<template #left-empty>
|
||||||
|
<el-empty :image-size="60" description="No data" />
|
||||||
|
</template>
|
||||||
|
<template #right-empty>
|
||||||
|
<el-empty :image-size="60" description="No data" />
|
||||||
|
</template>
|
||||||
|
</el-transfer>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" @click="SaveReport">保存</el-button>
|
||||||
|
<el-button type="primary" @click="close">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import * as MOSTY from "@/components/MyComponents/index";
|
||||||
|
import { ref, defineEmits, defineProps, watch } from "vue";
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const listQuery = ref({
|
||||||
|
chry: []
|
||||||
|
})
|
||||||
|
const data = ref([
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
label: `Option1`,
|
||||||
|
disabled: false,
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const emits = defineEmits(["update:modelValue"]);
|
||||||
|
|
||||||
|
const close = () => {
|
||||||
|
emits("update:modelValue", false)
|
||||||
|
}
|
||||||
|
const SaveReport = () => {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.cntBox {
|
||||||
|
height: 60vh;
|
||||||
|
padding: 8px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
border: 1px dashed #e9e9e9;
|
||||||
|
.form_item{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.demonstration {
|
||||||
|
width: 120px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-transfer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,204 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dialog" v-if="dialogForm">
|
||||||
|
<div class="head_box">
|
||||||
|
<span class="title">经验分享{{ title }} </span>
|
||||||
|
<div>
|
||||||
|
<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" v-model="listQuery" ref="elform" :rules="rules">
|
||||||
|
<template #ypnr>
|
||||||
|
<el-input v-model="listQuery.ypnr" style="width: 100%" placeholder="请输入关键字" class="input-with-select">
|
||||||
|
<template #append>
|
||||||
|
<el-button :icon="Search" type="primary">搜索</el-button>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
<template #fj><el-button type="primary" @click="showText = true">附件上传</el-button></template>
|
||||||
|
</FormMessage>
|
||||||
|
<div class="cntBox">
|
||||||
|
<!-- 工具栏 -->
|
||||||
|
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editorRef" :defaultConfig="toolbarConfig"
|
||||||
|
:mode="mode" />
|
||||||
|
<!-- 编辑器 -->
|
||||||
|
<Editor :style="`height: 480px; overflow-y: hidden`" v-model="textContent" :defaultConfig="editorConfig"
|
||||||
|
:mode="mode" @onCreated="handleCreated" @onChange="handChange" />
|
||||||
|
</div>
|
||||||
|
<el-button style="margin:0 auto;display: block;" type="primary" @click="ConsultationShow = true">网上会商</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 文字解析 -->
|
||||||
|
<ExtractionText v-model="showText" @change="getText"></ExtractionText>
|
||||||
|
<!-- 网上会商 -->
|
||||||
|
<Consultation v-model="ConsultationShow" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { Search } from '@element-plus/icons-vue'
|
||||||
|
import { timeValidate } from '@/utils/tools.js'
|
||||||
|
import ExtractionText from "@/components/ExtractionText/index.vue";
|
||||||
|
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||||
|
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||||
|
import "@wangeditor/editor/dist/css/style.css";
|
||||||
|
import Consultation from './consultation.vue'
|
||||||
|
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
||||||
|
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, shallowRef, onBeforeUnmount, watch } from "vue";
|
||||||
|
const emit = defineEmits(["updateDate"]);
|
||||||
|
const props = defineProps({
|
||||||
|
dic: Object
|
||||||
|
});
|
||||||
|
const ConsultationShow = ref(false)
|
||||||
|
const showText = ref(false);
|
||||||
|
const textContent = ref()
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const editorRef = shallowRef();
|
||||||
|
const dialogForm = ref(false); //弹窗
|
||||||
|
const mode = "default";
|
||||||
|
const dataBt = ref(`<p class="html_bt">
|
||||||
|
<h4 style=\"text-align: center;\"><span style=\"color: rgb(225, 60, 57); font-size: 32px; font-family: 标楷体;\">林芝市公安局情指中心</span></h4>
|
||||||
|
<h4 style=\"text-align: center;\"><span style=\"color: rgb(225, 60, 57); font-size: 32px; font-family: 标楷体;\">研判专刊(初稿)</span></h4></p>
|
||||||
|
<p style="text-align: center;"><span style="color: rgb(225, 60, 57); font-size: 22px; font-family: 标楷体;">市公安局情指中心编 ${timeValidate(new Date(), 'td')}</span></p>
|
||||||
|
<hr/>`)
|
||||||
|
//编辑器配置
|
||||||
|
const editorConfig = {
|
||||||
|
withCredentials: true, //允许跨域
|
||||||
|
placeholder: props.placeholder, //提示语
|
||||||
|
MENU_CONF: {
|
||||||
|
uploadImage: {
|
||||||
|
// 自定义上传图片
|
||||||
|
async customUpload(file, insertFn) {
|
||||||
|
let fileBlob = await compressImage(file);
|
||||||
|
let fileData = new File([fileBlob], fileBlob.name, { type: fileBlob.type });
|
||||||
|
if (fileData.size > 2 * 1024 * 1024) {
|
||||||
|
ElMessage({ message: "图片超过2MB", type: "success" });
|
||||||
|
} else {
|
||||||
|
await uploadFn(fileData, insertFn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
uploadVideo: {
|
||||||
|
// 自定义上传视频
|
||||||
|
async customUpload(file, insertFn) {
|
||||||
|
await uploadFn(file, insertFn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//工具配置
|
||||||
|
const toolbarConfig = {
|
||||||
|
excludeKeys: ["blockquote", "codeBlock"] //清除不必要的工具,引用和代码块
|
||||||
|
};
|
||||||
|
const rules = reactive({
|
||||||
|
jymc: [
|
||||||
|
{ required: true, message: "请输入经验名称", trigger: "blur" }
|
||||||
|
],
|
||||||
|
fbnr: [
|
||||||
|
{ required: true, message: "请输入经验内容", trigger: "blur" }
|
||||||
|
]
|
||||||
|
});
|
||||||
|
const formData = ref([
|
||||||
|
{ label: "研判标题", prop: "ypbt", type: "input", width: "100%" },
|
||||||
|
{ label: "研判内容", prop: "ypnr", type: "slot", width: "100%" },
|
||||||
|
{ label: "附件内容", prop: "fj", type: "slot", width: "100%" },
|
||||||
|
]);
|
||||||
|
const listQuery = ref({
|
||||||
|
ypbt: "",
|
||||||
|
ypnr: "",
|
||||||
|
fj: ""
|
||||||
|
}); //表单
|
||||||
|
const loading = ref(false);
|
||||||
|
const elform = ref();
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
// 初始化数据
|
||||||
|
const init = (type, row) => {
|
||||||
|
dialogForm.value = true;
|
||||||
|
title.value = type == "add" ? "新增" : "编辑";
|
||||||
|
};
|
||||||
|
const getText = (val) => {
|
||||||
|
console.log(val, 'val');
|
||||||
|
listQuery.value.fj = val.text;
|
||||||
|
|
||||||
|
}
|
||||||
|
watch(() => listQuery.value, (val) => {
|
||||||
|
let html = dataBt.value;
|
||||||
|
html += `<p style="text-align: center;"><span style="font-size: 22px;">${val.ypbt}</span></p>`
|
||||||
|
html += `<p>${val.fj}</p>`
|
||||||
|
textContent.value = html
|
||||||
|
},
|
||||||
|
{
|
||||||
|
deep: true, immediate: true
|
||||||
|
})
|
||||||
|
// 提交
|
||||||
|
const submit = () => {
|
||||||
|
elform.value.submit((data) => {
|
||||||
|
let url = title.value == "新增" ? "/mosty-gsxt/gsxt/jyfx/add" : "/mosty-gsxt/gsxt/jyfx/edit";
|
||||||
|
let params = { ...data };
|
||||||
|
qcckPost(params, url).then(() => {
|
||||||
|
loading.value = false;
|
||||||
|
proxy.$message({ type: "success", message: title.value + "成功" });
|
||||||
|
emit("updateDate");
|
||||||
|
close();
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//编辑器创建成功
|
||||||
|
const handleCreated = (editor) => {
|
||||||
|
editorRef.value = editor;
|
||||||
|
};
|
||||||
|
//内容发生变化
|
||||||
|
const handChange = (editor) => {
|
||||||
|
// 判断是否是一个空段落,是空就传空文本
|
||||||
|
console.log(editor.getHtml(), 'editor.getHtml()');
|
||||||
|
|
||||||
|
};
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
const editor = editorRef.value;
|
||||||
|
if (editor) editor.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 关闭
|
||||||
|
const close = () => {
|
||||||
|
listQuery.value = {};
|
||||||
|
loading.value = false;
|
||||||
|
dialogForm.value = false;
|
||||||
|
listQuery.value = {}
|
||||||
|
};
|
||||||
|
|
||||||
|
defineExpose({ init });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "~@/assets/css/layout.scss";
|
||||||
|
@import "~@/assets/css/element-plus.scss";
|
||||||
|
|
||||||
|
.boxlist {
|
||||||
|
width: 99%;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-textarea__inner {
|
||||||
|
min-height: 550px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.html_bt>>>p {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.html_bt {
|
||||||
|
h4 {
|
||||||
|
margin: 10px 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cntBox {
|
||||||
|
width: 80vw;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
</style>
|
165
src/views/backOfficeSystem/JudgmentHome/situationHome/index.vue
Normal file
165
src/views/backOfficeSystem/JudgmentHome/situationHome/index.vue
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="titleBox">
|
||||||
|
<PageTitle title="态势研判">
|
||||||
|
<el-button type="primary" @click="addEdit('add', '')">
|
||||||
|
<el-icon style="vertical-align: middle">
|
||||||
|
<CirclePlus />
|
||||||
|
</el-icon>
|
||||||
|
<span style="vertical-align: middle">新增</span>
|
||||||
|
</el-button>
|
||||||
|
</PageTitle>
|
||||||
|
</div>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<div ref="searchBox">
|
||||||
|
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
|
||||||
|
</div>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<div class="tabBox">
|
||||||
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||||
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
||||||
|
<!-- 操作 -->
|
||||||
|
<template #controls="{ row }">
|
||||||
|
<el-link type="primary" @click="addEdit('edit', row)">编辑</el-link>
|
||||||
|
<el-link type="danger" @click="delDictItem(row.id)">删除</el-link>
|
||||||
|
</template>
|
||||||
|
</MyTable>
|
||||||
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||||
|
...pageData.pageConfiger,
|
||||||
|
total: pageData.total
|
||||||
|
}"></Pages>
|
||||||
|
</div>
|
||||||
|
<!-- 编辑详情 -->
|
||||||
|
<EditAddForm v-if="show" ref="detailDiloag" :dic="{ D_GS_BQ_LX }"
|
||||||
|
@updateDate="getList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
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 EditAddForm from "./components/editAddForm.vue";
|
||||||
|
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||||
|
import { reactive, ref, onMounted, getCurrentInstance, nextTick,onBeforeUnmount } from "vue";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const { D_GS_BQ_LX } = proxy.$dict("D_GS_BQ_LX"); //获取字典数据
|
||||||
|
const detailDiloag = ref();
|
||||||
|
const show = ref(false);
|
||||||
|
const searchBox = ref(); //搜索框
|
||||||
|
const searchConfiger = ref([
|
||||||
|
{
|
||||||
|
label: "研判标题",
|
||||||
|
prop: "ypbt",
|
||||||
|
placeholder: "请输入研判标题",
|
||||||
|
showType: "input"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "研判时间",
|
||||||
|
prop: "startTime",
|
||||||
|
placeholder: "请选择研判时间",
|
||||||
|
showType: "daterange"
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const queryFrom = ref({});
|
||||||
|
const pageData = reactive({
|
||||||
|
tableData: [], //表格数据
|
||||||
|
keyCount: 0,
|
||||||
|
tableConfiger: {
|
||||||
|
rowHieght: 61,
|
||||||
|
showSelectType: "null",
|
||||||
|
loading: false
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
pageConfiger: {
|
||||||
|
pageSize: 20,
|
||||||
|
pageCurrent: 1
|
||||||
|
}, //分页
|
||||||
|
controlsWidth: 160, //操作栏宽度
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: "研判标题",
|
||||||
|
prop: "ypbt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "研判时间",
|
||||||
|
prop: "ypsj"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
|
tabHeightFn();
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 搜索
|
||||||
|
const onSearch = (val) => {
|
||||||
|
queryFrom.value = {
|
||||||
|
...val,
|
||||||
|
startTime: val.startTime && val.startTime.length > 0 ? val.startTime[0] : '',
|
||||||
|
endTime: val.startTime && val.startTime.length > 0 ? val.startTime[1] : ''
|
||||||
|
};
|
||||||
|
pageData.pageConfiger.pageCurrent = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const changeNo = (val) => {
|
||||||
|
pageData.pageConfiger.pageCurrent = val;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
const changeSize = (val) => {
|
||||||
|
pageData.pageConfiger.pageSize = val;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const getList = () => {
|
||||||
|
pageData.tableConfiger.loading = true;
|
||||||
|
qcckPost(queryFrom.value, "/mosty-gsxt/gsxt/jyfx/selectPage")
|
||||||
|
.then((res) => {
|
||||||
|
pageData.tableData = res.records;
|
||||||
|
pageData.total = res.total;
|
||||||
|
pageData.tableConfiger.loading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
pageData.tableConfiger.loading = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
const delDictItem = (id) => {
|
||||||
|
proxy
|
||||||
|
.$confirm("确定要删除", "警告", { type: "warning" })
|
||||||
|
.then(() => {
|
||||||
|
qcckDelete({}, "/mosty-gsxt/tbGsxtBqzh/" + id).then(() => {
|
||||||
|
proxy.$message({ type: "success", message: "删除成功" });
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
};
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
const addEdit = (type, row) => {
|
||||||
|
show.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
detailDiloag.value.init(type, row);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 表格高度计算
|
||||||
|
const tabHeightFn = () => {
|
||||||
|
pageData.tableHeight =
|
||||||
|
window.innerHeight - searchBox.value.offsetHeight - 250;
|
||||||
|
window.onresize = function () {
|
||||||
|
tabHeightFn();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-loading-mask {
|
||||||
|
background: rgba(0, 0, 0, 0.5) !important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,13 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div class="floating-ball" :style="ballStyle" @mousedown="startDrag" @touchstart="startDrag" @click="handleClick">
|
||||||
class="floating-ball"
|
|
||||||
:style="ballStyle"
|
|
||||||
@mousedown="startDrag"
|
|
||||||
@touchstart="startDrag"
|
|
||||||
@click="handleClick"
|
|
||||||
>
|
|
||||||
<slot>
|
<slot>
|
||||||
|
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Reference in New Issue
Block a user