feat:战略研判修改

This commit is contained in:
2025-12-19 14:11:16 +08:00
parent f6ce1455da
commit 32d5e53b59
4 changed files with 502 additions and 39 deletions

View File

@ -2,12 +2,12 @@
<div>
<div class="titleBox">
<PageTitle title="战略研判">
<!-- <el-button type="primary" @click="getDataById('add', '')">
<el-button type="primary" @click="selfCreateResearch('add')">
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle">新增</span>
</el-button> -->
<span style="vertical-align: middle">自建研判</span>
</el-button>
</PageTitle>
</div>
@ -29,6 +29,8 @@
<template #controls="{ row }">
<!-- <el-link size="small" type="primary" @click="getDataById('edit', row)">修改</el-link> -->
<el-link size="small" type="primary" @click="getDataById('detail', row)">详情</el-link>
<el-link size="small" type="primary" @click="createReport(row)">{{ row.ypbg?.id ? '编辑' : '创建' }}报告</el-link>
<el-link size="small" type="success" @click="createMeeting(row)">创建会议</el-link>
<el-link size="small" type="danger" @click="deleteFile(row)">删除</el-link>
</template>
</MyTable>
@ -38,7 +40,12 @@
}"></Pages>
</div>
</div>
<AddForm ref="addForm" @getList="getList" :dict="{ D_BZ_YPFS, D_BZ_YPLX }" />
<AddForm ref="addForm" :bglx="bglx" @getList="getList" :dict="{ D_BZ_YPFS, D_BZ_YPLX }" />
<!-- 创建报告 -->
<addReport ref="reportTc" :row="currRow" :dic="{ D_GS_BQ_LX }" @ok="getList" />
<!-- 创建报告 -->
<addMeeting ref="meetingTc" :row="currRow" @updateDate="getList" />
</template>
<script setup>
@ -47,12 +54,18 @@ import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import { useRoute, useRouter } from 'vue-router'
import { tacticalGet, strategicDelete } from "@/api/huiShangyp/strategicApi.js";
import { reactive, ref, onMounted, getCurrentInstance, watch, computed,nextTick } from "vue";
import { tacticalGet, strategicDelete } from "@/api/huiShangyp/tacticalApi.js";
import { reactive, ref, onMounted, getCurrentInstance, watch, computed, nextTick } from "vue";
import addReport from "./addReport.vue";
import AddForm from "./addForm.vue";
import addMeeting from "./addMeeting.vue";
const { proxy } = getCurrentInstance();
const { D_BZ_YPFS, D_BZ_YPLX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX")
const detailDiloag = ref();
const { D_BZ_YPFS, D_BZ_YPLX, D_GS_BQ_LX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX", "D_GS_BQ_LX")
/** 报告弹框 */
const reportTc = ref();
/** 会议弹框 */
const meetingTc = ref();
const searchBox = ref(); //搜索框
const router = useRouter();
const route = useRoute();
@ -64,10 +77,9 @@ onMounted(() => {
addForm.value && addForm.value.init('edit', {
id: route.query.id
});
router.replace({ path: '/strategicResearch' })// 移除id 避免刷新一直带参数
router.replace({ path: '/tacticalResearch' })// 移除id 避免刷新一直带参数
})
}
getList()
});
/** 是否市情报指挥中心 */
@ -104,8 +116,12 @@ const pageData = reactive({
{ label: "发起部门", prop: "ssbm" },
]
});
const queryFrom = ref({});
const isShowReport = ref(false)
const currRow = ref({})
const queryFrom = ref({});
/** 报告类型 01 战术研判 02 战略研判*/
const bglx = ref('02')
// 搜索
const onSearch = (val) => {
const promes = {
@ -146,6 +162,7 @@ const tabHeightFn = () => {
tabHeightFn();
};
};
// const route = useRoute()
const addForm = ref(null)
const getDataById = (type, row) => {
@ -168,6 +185,24 @@ const deleteFile = (row) => {
proxy.$message.info('已取消删除');
});
}
const selfCreateResearch = (type = 'add') => {
addForm.value.init(type, null, '01');
}
/** 创建报告 */
const createReport = (row) => {
const type = !row.id ? 'add' : 'edit'
reportTc.value.init(type, row?.ypbg || {}, row)
// currRow.value = { ...row }
// isShowReport.value = true
}
/** 创建会议 */
const createMeeting = (row) => {
meetingTc.value.init('add', null, row)
// currRow.value = { ...row }
// isShowReport.value = true
}
</script>
<style lang="scss" scoped>