This commit is contained in:
lcw
2025-12-10 21:47:23 +08:00
15 changed files with 2483 additions and 33 deletions

View File

@ -0,0 +1,54 @@
import request from "@/utils/request";
const api = "/mosty-api/mosty-gsxt";
// =================== 指令 ====================
/**
* 研判指令列表
* @param {Object} params 查询参数
* @param {number} [params.pageSize] 每页显示数量
* @param {number} [params.pageCurrent] 页码
* @param {string} [params.zlbt] 指令标题
* @param {string} [params.zlnr] 指令内容
* @param {string} [params.fqrxm] 发起人姓名
* @returns {Promise} 请求Promise对象
*/
export const getJudgmentCommandList = (params) => {
return request({
url: api + `/ypbg/zlxx/getPageList`,
method: "get",
params
})
}
/**
* 指令签收
* @param {Object} data 签收数据
* @param {string|number} data.zlid 指令ID签收必传
* @param {string} [data.bglx] 报告类型01 战术报告 02 战略报告
* @param {string} [data.ypid] 研判业务ID(研判报告ID)
* @returns {Promise} 请求Promise对象
*/
export const signCommand = (data) => {
return request({
url: api + `/ypbg/zlxx/zlqs`,
method: "post",
data
})
}
/**
* 指令反馈
* @param {Object} data 反馈数据
* @param {string|number} data.zlid 指令ID反馈必传
* @param {string} data.bglx 报告类型01 战术报告 02 战略报告(反馈必传)
* @param {string} data.ypid 研判业务ID(研判报告ID)(反馈必传)
* @returns {Promise} 请求Promise对象
*/
export const feedbackCommand = (data) => {
return request({
url: api + `/ypbg/zlxx/zlfk`,
method: "post",
data
})
}

View File

@ -0,0 +1,46 @@
import request from "@/utils/request";
const api = "/mosty-api/mosty-gsxt";
// 战略研判-分页查询
export const strategicGet = (data, url) => {
return request({
url: url + `/ypbg/sjzl/getPageYpList`,
method: "post",
data
})
}
// 战略研判-新增
export const strategicPost = (data, url) => {
return request({
url: url,
method: "post",
data
})
}
// 战略研判-删除
export const strategicDelete = (data, url) => {
return request({
url: url,
method: "delete",
data
})
}
// 战略研判-根据ID查询详情
export const strategicGetInfo = (id) => {
return request({
url: api + `/strategic/${id}`,
method: "get"
})
}
// 战略研判-编辑
export const strategicPut = (data, url) => {
return request({
url: url,
method: "put",
data
})
}

View File

@ -0,0 +1,150 @@
import request from "@/utils/request";
const api = "/mosty-api/mosty-gsxt";
/**
* 战术研判-分页查询
* @param {Object} params 查询参数
* @param {number} [params.pageSize] 每页显示数量
* @param {number} [params.pageCurrent] 页码
* @param {string} [params.startTime] 开始时间
* @param {string} [params.endTime] 结束时间
* @param {string} [params.timeField] 时间范围查询字段
* @param {string} [params.sort] 排序字段
* @param {string} [params.order] 排序方式
* @param {string} [params.ypyt] 研判议题
* @param {string} [params.yppyq] 研判要求
* @param {string} [params.ypfs] 研判方式01 线上、02 线下、03 自建)
* @param {string} [params.bglx] 报告类型01 战术研判 02 战略研判)查询研判列表必传
* @param {string} [params.ssbmdm] 所属部门代码
* @returns {Promise} 请求Promise对象
*/
export const tacticalGet = (params) => {
return request({
url: api + `/ypbg/sjzl/getPageYpList`,
method: "get",
params
})
}
// 战术研判-新增
export const tacticalPost = (data, url) => {
return request({
url: api,
method: "post",
data
})
}
// 战术研判-删除
export const tacticalDelete = (data, url) => {
return request({
url: api,
method: "delete",
data
})
}
// 战术研判-根据ID查询详情
export const tacticalGetInfo = (id) => {
return request({
url: api + `/tactical/${id}`,
method: "get"
})
}
// 战术研判-编辑
export const tacticalPut = (data, url) => {
return request({
url: api,
method: "put",
data
})
}
/**
* 开始研判
* @param {string|number} id 研判ID
* @returns {Promise} 请求Promise对象
*/
export const startJudgment = (id) => {
return request({
url: api + `/ypbg/sjzl/ksyp/${id}`,
method: "post"
})
}
/**
* 结束研判
* @param {string|number} id 研判ID
* @returns {Promise} 请求Promise对象
*/
export const endJudgment = (id) => {
return request({
url: api + `/ypbg/sjzl/jsyp/${id}`,
method: "post"
})
}
/**
* 自建研判报告
* @param {Object} data 自建研判数据
* @returns {Promise} 请求Promise对象
*/
export const selfBuildJudgment = (data) => {
return request({
url: api + `/ypbg/sjzl/selfBuild`,
method: "post",
data
})
}
// =================== 指令 ====================
/**
* 研判指令列表
* @param {Object} params 查询参数
* @param {number} [params.pageSize] 每页显示数量
* @param {number} [params.pageCurrent] 页码
* @param {string} [params.zlbt] 指令标题
* @param {string} [params.zlnr] 指令内容
* @param {string} [params.fqrxm] 发起人姓名
* @returns {Promise} 请求Promise对象
*/
export const getJudgmentCommandList = (params) => {
return request({
url: api + `/ypbg/zlxx/getPageList`,
method: "get",
params
})
}
/**
* 指令签收
* @param {Object} data 签收数据
* @param {string|number} data.zlid 指令ID签收必传
* @param {string} [data.bglx] 报告类型01 战术报告 02 战略报告
* @param {string} [data.ypid] 研判业务ID(研判报告ID)
* @returns {Promise} 请求Promise对象
*/
export const signCommand = (data) => {
return request({
url: api + `/ypbg/zlxx/zlqs`,
method: "post",
data
})
}
/**
* 指令反馈
* @param {Object} data 反馈数据
* @param {string|number} data.zlid 指令ID反馈必传
* @param {string} data.bglx 报告类型01 战术报告 02 战略报告(反馈必传)
* @param {string} data.ypid 研判业务ID(研判报告ID)(反馈必传)
* @returns {Promise} 请求Promise对象
*/
export const feedbackCommand = (data) => {
return request({
url: api + `/ypbg/zlxx/zlfk`,
method: "post",
data
})
}

View File

@ -160,4 +160,54 @@ export const sjzlGetInfo = (id) => {
method: "get",
})
}
/**
* 非市情报指挥中心修改状态为完成 - 完成资料准备 (对应下发部门去完成)
* @param {Object} data 请求数据对象
* @param {Array} [data.fj] 附件数组,可选
* @param {string} data.id 数据整理记录ID必填
* @param {string} data.wcqk 完成情况必填01:准备中, 02:已完成)
* @returns {Promise} 请求Promise对象
*/
export const sjzlPerfectlnfo = (data) => {
return request({
url: api + `/ypbg/sjzl/perfectInfo`,
method: "post",
data
})
}
/**
* 数据整理-完善素材上传 (对应下发部门去完成)
* @param {Object} data 请求数据对象
* @param {Array} [data.fj] 附件数组,可选
* @param {string} data.id 数据整理记录ID必填
* @param {string} data.wcqk 完成情况必填01:准备中, 02:已完成)
* @returns {Promise} 请求Promise对象
*/
export const sjzlPerfectSorce = (data) => {
return request({
url: api + `/ypbg/sjzl/perfectSorce`,
method: "post",
data
})
}
/**
* 数据整理-发送消息通知
* @param {String} id id
*/
export const sjzlFstz = (id) => {
return request({
url: api + `/ypbg/sjzl/fstz/${id}`,
method: "get",
})
}
/**
* 数据整理-确认研判
* @param {String} id id
*/
export const sjzlQryp = (id) => {
return request({
url: api + `/ypbg/sjzl/qryp/${id}`,
method: "get",
})
}

View File

@ -200,9 +200,30 @@ const handlePictureCardPreview = (file) => {
dialogImageUrl.value = file.url || '';
dialogVisible.value = true;
};
function downloadFile(url, filename) {
fetch(url)
.then((response) => response.blob())
.then((blob) => {
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(link.href);
})
.catch((error) => console.error("下载失败:", error));
}
const handleDownload = (file) => {
window.open(file.response?file.response.data:file.url);
if (file?.response?.data) {
window.open(file.response.data);
} else if (file?.url) {
downloadFile(file.url, file.name);
}
};
// const handleDownload = (file) => {
// window.open(file.response.data);
// };
// 删除文件 触发父组件更新
const beforeRemove = (file) => {

View File

@ -676,24 +676,33 @@ export const publicRoutes = [
}
},
{
path: "/ResearchHome",
name: "ResearchHome",
component: () => import("@/views/backOfficeSystem/JudgmentHome/ResearchHome/index"),
path: "/tacticalResearch",
name: "tacticalResearch",
component: () => import("@/views/backOfficeSystem/JudgmentHome/tacticalResearch/index.vue"),
meta: {
title: "战术研判",
icon: "article"
}
},
{
path: "/situationHome",
name: "situationHome",
component: () => import("@/views/backOfficeSystem/JudgmentHome/situationHome/index"),
path: "/strategicResearch",
name: "strategicResearch",
component: () => import("@/views/backOfficeSystem/JudgmentHome/strategicResearch/index.vue"),
meta: {
title: "战略研判",
icon: "article"
}
},
{
path: "/judgmentCommand",
name: "judgmentCommand",
component: () => import("@/views/backOfficeSystem/JudgmentHome/judgmentCommand/index.vue"),
meta: {
title: "研判指令",
icon: "article"
}
},
// {
// path: "/analysisReport",
// name: "AnalysisReport",
@ -851,6 +860,25 @@ export const publicRoutes = [
component: () => import("@/views/backOfficeSystem/HumanIntelligence/CollectCrculate/index"),
meta: { title: "信息采集", icon: "article" },
},
{
path: "/ResearchHome",
name: "ResearchHome",
component: () => import("@/views/backOfficeSystem/JudgmentHome/ResearchHome/index"),
meta: {
title: "战术研判",
icon: "article"
}
},
{
path: "/situationHome",
name: "situationHome",
component: () => import("@/views/backOfficeSystem/JudgmentHome/situationHome/index"),
meta: {
title: "战略研判",
icon: "article"
}
},
]
},
]

View File

@ -42,13 +42,16 @@ const handleClick = (tab) => {
console.log(tab)
}
onMounted(() => {
lemon.basedata.fetchSystemOrg({
try {
lemon?.basedata?.fetchSystemOrg({
flat: true,
key_word: ""
}).then(res => {
console.log(res);
})
} catch (error) {
console.log('error: ', error);
}
})
const getJgList = () => {

View File

@ -7,19 +7,97 @@
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div style="padding-bottom: 40px;" class="form_cnt">
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
<template #bmList>
<div class="table-box">
<el-table :data="tableList" border style="width: 100%">
<el-table-column prop="ypbmmc" label="部门" width="150" align="center" />
<el-table-column label="研判素材" width="280" align="center">
<template #default="{ row }">
<el-input v-model="row.scyq" :disabled="!isShiQingBaoZhongXin" placeholder="请输入研判素材" />
</template>
</el-table-column>
<el-table-column label="附件" width="200" align="center">
<template #default="{ row }">
<UploadFile v-model="row.fj" :disabled="!isShiQingBaoZhongXin" :limit="1" :isImg="false"
:isAll="true" />
</template>
</el-table-column>
<el-table-column prop="wcqk" label="完成状态" width="120" align="center">
<template #default="{ row }">
<el-tag :type="row.wcqk === '02' ? 'success' : 'warning'">
{{ row.wcqk == '01' ? '准备中' : '已完成' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template #default="{ row }">
<el-button type="text" size="small" @click="updateStatus(row)" :disabled="updateDis(row)">
修改状态
</el-button>
<el-button type="text" size="small" @click="submitMaterial(row)" :disabled="updateDis(row)">
提交素材
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
</FormMessage>
</div>
<!-- 底部按钮 -->
<div class="bottom-actions" v-if="title !== '新增' && listQuery.id">
<el-button type="primary" size="small" @click="sendNotice" :loading="noticeLoading">下发通知</el-button>
<el-button type="success" size="small" @click="confirmJudgment" :loading="confirmLoading">确认研判</el-button>
</div>
</div>
<!-- 修改状态弹框 -->
<div class="dialog" v-if="statusDialog">
<div class="head_box">
<span class="title">修改状态</span>
<div>
<el-button type="primary" size="small" :loading="statusLoading" @click="submitStatus">保存</el-button>
<el-button size="small" @click="closeStatusDialog">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules" />
<el-form :model="statusForm" label-width="80px">
<el-form-item label="附件">
<UploadFile v-model="statusForm.fj" :limit="2" :isImg="false" :isAll="true" />
</el-form-item>
</el-form>
</div>
</div>
<!-- 提交素材弹框 -->
<div class="dialog" v-if="materialDialog">
<div class="head_box">
<span class="title">提交素材</span>
<div>
<el-button type="primary" size="small" :loading="materialLoading" @click="submitMaterialAction">保存</el-button>
<el-button size="small" @click="closeMaterialDialog">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<el-form :model="materialForm" label-width="80px">
<el-form-item label="附件">
<UploadFile v-model="materialForm.fj" :limit="2" :isImg="false" :isAll="true" />
</el-form-item>
</el-form>
</div>
</div>
<!-- <ChooseUser v-model="chooseUserVisible" @choosedUsers="handleUserSelected" :roleIds="roleIds" :Single="false" /> -->
</template>
<script setup>
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import UploadFile from "@/components/MyComponents/Upload/index.vue";
// import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue"
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, watch } from "vue";
import { sjzlAddEntity, sjzlEditEntity, sjzlGetInfo } from '@//api/yj.js'
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, watch, computed } from "vue";
import { sjzlAddEntity, sjzlEditEntity, sjzlGetInfo, sjzlPerfectlnfo, sjzlFstz, sjzlQryp, sjzlPerfectSorce } from '@//api/yj.js'
import { getItem } from '@//utils/storage.js'
const emit = defineEmits(["updateDate", "getList"]);
const props = defineProps({
dict: Object
@ -30,11 +108,38 @@ const dialogForm = ref(false); //弹窗
const formData = ref([
]);
const { deptBizType, deptLevel, deptCode } = getItem('deptId')[0]
/** 登录人 */
const sfzh = getItem('idEntityCard')
/** 是否市情报指挥中心 */
const isShiQingBaoZhongXin = computed(() => {
const Jb = deptLevel[0] == '2' ? '01' : deptLevel[0] == '3' ? '02' : '03'
return deptBizType == '23' && Jb == '01'
})
const listQuery = ref({}); //表单
const loading = ref(false);
const elform = ref();
const title = ref("");
const tableList = ref([])
// const detailObj = ref({})
const statusDialog = ref(false) // 修改状态弹框
const statusLoading = ref(false)
const statusForm = ref({ fj: [] }) // 修改状态表单
const currentRow = ref({}) // 当前操作的行
// 提交素材相关
const materialDialog = ref(false) // 提交素材弹框
const materialLoading = ref(false)
const materialForm = ref({ fj: [] }) // 提交素材表单
const materialRow = ref({}) // 当前操作的行
/** 外面行数据 */
const outRow = ref({})
const noticeLoading = ref(false) // 下发通知加载状态
const confirmLoading = ref(false) // 确认研判加载状态
const rules = reactive({
// 可以在这里添加表单验证规则
});
watch(() => props.dict, (val) => {
if (val) {
@ -45,40 +150,114 @@ watch(() => props.dict, (val) => {
{ label: "研判方式", prop: "ypfs", type: "radio", options: props.dict.D_BZ_YPFS, width: '48%' },
{ label: "参与研判部门", prop: "jsdxBmDm", type: "department", multiple: true, depMc: 'jsdxBmMc', width: '48%' },
{ label: "研判要求", prop: "ypyq", type: "textarea", width: '100%' },
{ label: "列表", prop: "bmList", type: "slot", width: '100%' },
]
}
})
/** 是否修改禁用 */
function updateDis(row) {
/** 无id 禁用 */
if (!listQuery.value.id) return true
/** 是否创建人 */
const iscjr = !row.cjrsfzh || row?.cjrsfzh == deptCode
/** 是否完成 */
const isFinish = row.wcqk === '02'
return isShiQingBaoZhongXin.value || !iscjr || isFinish
}
function getFjArr(fj) {
if (typeof fj !== 'string' || !fj) return []
let fjArr = []
try {
fjArr = JSON.parse(fj)
} catch (error) {
}
return fjArr
}
watch(() => listQuery.value.jsdxBmDm, (val) => {
/** @type {Array<{ypbmdm: string, ypbmmc: string, scyq: string, fj: Array, wcqk: string}>} 参与研判部门数据数组 */
const arr = Array.isArray(val) ? val : []
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
tableList.value = arr.map((item, i) => {
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == item) || {}
/** 是否是新增 */
const isAddForm = !listQuery.value.id
return {
// id: null,
// sjzlid: null, // 研判数据整理ID
/** 部门代码 */
ypbmdm: item,
ypbmmc: listQuery.value.jsdxBmMc[i],
/** 素材要求 */
scyq: isAddForm ? '' : curr.scyq,
fj: isAddForm ? [] : getFjArr(curr.fj),
/** 完成情况01 准备中、02 已完成)*/
wcqk: isAddForm ? '01' : curr.wcqk || '01'
}
})
})
// 初始化数据
const init = (type, row, wjlb) => {
dialogForm.value = true;
title.value = type == "add" ? "新增" : type == "edit" ? "编辑" : "详情";
outRow.value = row || {}
if (row) { getDataById(row.id) }
};
// 根据id查询详情
const getDataById = (id) => {
sjzlGetInfo(id).then((res) => {
listQuery.value = res;
listQuery.value.jsdxBmDm = res.cyypList.map(item => {
listQuery.value = res || {};
const cyypList = Array.isArray(res.cyypList) ? res.cyypList : []
listQuery.value.jsdxBmDm = cyypList.map(item => {
return item.ypbmdm
})
listQuery.value.jsdxBmMc = res.cyypList.map(item => {
listQuery.value.jsdxBmMc = cyypList.map(item => {
return item.ypbmmc
})
});
};
function getFjString(arr) {
arr = Array.isArray(arr) ? arr : []
return JSON.stringify(arr)
}
/**获取下发部门数据 */
const getXfbmList = () => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
return tableList.value.map((item, i) => {
/** 找原来的对象 */
const curr = cyypList.find(item => item.ypbmdm == item.ypbmdm) || {}
return {
id: curr.id || null,
sjzlid: curr.sjzlid || null, // 研判数据整理ID
ypbmdm: item.ypbmdm,
ypbmmc: listQuery.value.jsdxBmMc[i],
/** 素材要求 */
scyq: item.scyq,
fj: getFjString(item.fj),
/** 完成情况01 准备中、02 已完成)*/
wcqk: item.wcqk
}
})
}
// 提交
const submit = () => {
elform.value.submit(async (data) => {
const xfbmList = getXfbmList()
let params = {
...listQuery.value,
cyypList: listQuery.value.jsdxBmDm.map((item, index) => {
return {
ypbmdm: item,
ypbmmc: listQuery.value.jsdxBmMc[index],
ypcylx: '01'
}
})
cyypList: xfbmList,
// cyypList: listQuery.value.jsdxBmDm.map((item, index) => {
// return {
// ypbmdm: item,
// ypbmmc: listQuery.value.jsdxBmMc[index],
// ypcylx: '01'
// }
// })
};
try {
loading.value = true;
@ -97,7 +276,7 @@ const submit = () => {
loading.value = false;
} catch (error) {
console.log(error);
loading.value = false;
}
});
@ -110,6 +289,128 @@ const submit = () => {
// userList.value = val
// listQuery.value.jsrxm = val.map(item => item.userName).join(',')
// }
// 修改状态
const updateStatus = (row) => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == row.ypbmdm) || {}
currentRow.value = { ...curr, row }
statusForm.value = { fj: [] }
statusDialog.value = true
};
// 提交修改状态
const submitStatus = async () => {
try {
statusLoading.value = true
const params = {
id: currentRow.value.id,
fj: statusForm.value.fj?.length > 0 ? getFjString(statusForm.value.fj) : '',
wcqk: '02'
}
const res = await sjzlPerfectlnfo(params)
if (res && res > 0) {
proxy.$message({ type: "success", message: "修改成功" })
// 更新本地状态
currentRow.value.wcqk = '02'
closeStatusDialog()
if (outRow.value.id) { getDataById(outRow.value.id) }
}
} catch (error) {
} finally {
statusLoading.value = false
}
}
// 关闭修改状态弹框
const closeStatusDialog = () => {
statusDialog.value = false
statusForm.value = { fj: [] }
statusLoading.value = false
}
// 提交素材
const submitMaterial = (row) => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == row.ypbmdm) || {}
materialRow.value = { ...curr, row }
materialForm.value = { fj: [] }
materialDialog.value = true
}
// 提交素材操作
const submitMaterialAction = async () => {
try {
materialLoading.value = true
const params = {
id: materialRow.value.id,
fj: materialForm.value.fj?.length > 0 ? getFjString(materialForm.value.fj) : '',
}
const res = await sjzlPerfectSorce(params)
proxy.$message({ type: "success", message: "提交素材成功" })
closeMaterialDialog()
if (outRow.value.id) { getDataById(outRow.value.id) }
} catch (error) {
console.log(error)
} finally {
materialLoading.value = false
}
}
// 关闭提交素材弹框
const closeMaterialDialog = () => {
materialDialog.value = false
materialForm.value = { fj: [] }
materialLoading.value = false
}
// 下发通知
const sendNotice = () => {
proxy.$confirm('确认下发通知?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
noticeLoading.value = true;
const res = await sjzlFstz(listQuery.value.id);
proxy.$message({ type: "success", message: "下发通知成功" });
close();
} catch (error) {
console.log(error);
} finally {
noticeLoading.value = false;
}
});
};
// 确认研判
const confirmJudgment = () => {
proxy.$confirm('确认研判完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
confirmLoading.value = true;
const res = await sjzlQryp(listQuery.value.id);
proxy.$message({ type: "success", message: "确认研判成功" });
close();
} catch (error) {
console.log(error);
} finally {
confirmLoading.value = false;
}
});
};
// 关闭
const close = () => {
listQuery.value = {};
@ -127,4 +428,22 @@ defineExpose({ init });
::v-deep .form-item-box {
width: 100% !important;
}
.bottom-actions {
position: absolute;
bottom: 0;
left: 50%;
display: flex;
justify-content: center;
gap: 10px;
width: 100%;
transform: translateX(-50%);
padding: 10px 20px;
border-radius: 4px;
background: white;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
// z-index: 1000;
}
</style>

View File

@ -48,7 +48,7 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import { useRoute } from 'vue-router'
import { sjzlGetPageList, sjzldeleteEntity } from "@/api/yj.js";
import { reactive, ref, onMounted, getCurrentInstance, watch } from "vue";
import { reactive, ref, onMounted, getCurrentInstance, watch,computed } from "vue";
import AddForm from "./addForm.vue";
const { proxy } = getCurrentInstance();
const { D_BZ_YPFS, D_BZ_YPLX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX")
@ -64,7 +64,11 @@ onMounted(() => {
}
getList()
});
/** 是否市情报指挥中心 */
const isShiQingBaoZhongXin = computed(() => {
const Jb = deptLevel[0] == '2' ? '01' : deptLevel[0] == '3' ? '02' : '03'
return deptBizType == '23' && Jb == '01'
})
const searchConfiger = ref([
{ label: "研判议题", prop: 'ypyt', placeholder: "请输入研判议题", showType: "input" },

View File

@ -0,0 +1,281 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">研判指令{{ title }} </span>
<div>
<el-button type="primary" size="small" v-if="title != '详情'" :loading="loading" @click="submit">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div style="padding-bottom: 40px;" class="form_cnt">
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
<template #bmList>
<div class="table-box">
<el-table :data="tableList" border style="width: 100%">
<el-table-column prop="ypbmmc" label="部门" width="150" align="center" />
<el-table-column label="研判素材" width="280" align="center">
<template #default="{ row }">
<el-input v-model="row.scyq" :disabled="!isShiQingBaoZhongXin" placeholder="请输入研判素材" />
</template>
</el-table-column>
<el-table-column label="附件" width="200" align="center">
<template #default="{ row }">
<UploadFile v-model="row.fj" :disabled="!isShiQingBaoZhongXin" :limit="1" :isImg="false"
:isAll="true" />
</template>
</el-table-column>
<el-table-column prop="wcqk" label="完成状态" width="120" align="center">
<template #default="{ row }">
<el-tag :type="row.wcqk === '02' ? 'success' : 'warning'">
{{ row.wcqk == '01' ? '准备中' : '已完成' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template #default="{ row }">
<el-button type="text" size="small" @click="updateStatus(row)" :disabled="updateDis(row)">
修改状态
</el-button>
<el-button type="text" size="small" @click="submitMaterial(row)" :disabled="updateDis(row)">
提交素材
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
</FormMessage>
</div>
</div>
</template>
<script setup>
import { ref, reactive, computed, watch } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import UploadFile from "@/components/MyComponents/Upload/index.vue";
import {
sjzlGetEntityById,
sjzlCreateEntity,
sjzlUpdateEntity,
sjzlSendNotice,
sjzlConfirmJudgment
} from '@/api/yj.js'
//
import { getJudgmentCommandList, signCommand, feedbackCommand } from "@/api/huiShangyp/judgmentCommand.js";
const props = defineProps({
dict: {
type: Object,
default: () => ({})
}
})
const dialogForm = ref(false)
const title = ref('新增')
const loading = ref(false)
const elform = ref()
const listQuery = ref({})
const tableList = ref([])
// 表单配置
const formData = computed(() => [
{
label: '研判议题',
prop: 'ypyt',
type: 'input',
placeholder: '请输入研判议题',
required: true
},
{
label: '研判要求',
prop: 'ypyq',
type: 'textarea',
placeholder: '请输入研判要求',
required: true
},
{
label: '研判方式',
prop: 'ypfs',
type: 'select',
placeholder: '请选择研判方式',
options: props.dict.D_BZ_YPFS || [],
required: true
},
{
label: '研判时间',
prop: 'ypsj',
type: 'datetime',
placeholder: '请选择研判时间',
required: true
},
{
label: '报告类型',
prop: 'bglx',
type: 'radio',
placeholder: '请选择报告类型',
options: props.dict.D_BZ_YPLX || [],
required: true,
defaultValue: '02'
},
{
label: '部门列表',
prop: 'bmList',
type: 'slot',
slotName: 'bmList'
}
])
// 验证规则
const rules = {
ypyt: [{ required: true, message: '请输入研判议题', trigger: 'blur' }],
ypyq: [{ required: true, message: '请输入研判要求', trigger: 'blur' }],
ypfs: [{ required: true, message: '请选择研判方式', trigger: 'change' }],
ypsj: [{ required: true, message: '请选择研判时间', trigger: 'change' }],
bglx: [{ required: true, message: '请选择报告类型', trigger: 'change' }]
}
const isShiQingBaoZhongXin = computed(() => {
// 这里根据实际情况判断是否是市情报指挥中心
return true
})
// 初始化方法
const init = async (type, row, reportType) => {
title.value = type === 'add' ? '新增' : type === 'edit' ? '编辑' : '详情'
dialogForm.value = true
if (type === 'add') {
listQuery.value = {
bglx: reportType,
wjlx: reportType
}
tableList.value = []
} else if (row && row.id) {
try {
const res = await sjzlGetEntityById({ id: row.id })
listQuery.value = res
tableList.value = res.ypbmList || []
} catch (error) {
ElMessage.error('获取详情失败')
}
}
}
// 提交方法
const submit = async () => {
if (!elform.value) return
try {
await elform.value.validate()
loading.value = true
const data = {
...listQuery.value,
ypbmList: tableList.value
}
if (title.value === '新增') {
await sjzlCreateEntity(data)
ElMessage.success('新增成功')
} else {
await sjzlUpdateEntity(data)
ElMessage.success('修改成功')
}
emit('getList')
close()
} catch (error) {
console.error('提交失败:', error)
} finally {
loading.value = false
}
}
// 关闭方法
const close = () => {
dialogForm.value = false
listQuery.value = {}
tableList.value = []
}
// 修改状态
const updateStatus = (row) => {
ElMessageBox.prompt('请输入状态', '修改状态', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
row.wcqk = value
ElMessage.success('修改成功')
})
}
// 提交素材
const submitMaterial = (row) => {
ElMessage.success('提交成功')
}
const updateDis = (row) => {
return !isShiQingBaoZhongXin.value || row.wcqk === '02'
}
const emit = defineEmits(['getList'])
defineExpose({
init
})
</script>
<style lang="scss" scoped>
.dialog {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
.head_box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background: #fff;
border-bottom: 1px solid #ebeef5;
.title {
font-size: 16px;
font-weight: 600;
}
}
.form_cnt {
background: #fff;
padding: 20px;
max-height: 70vh;
overflow-y: auto;
}
.bottom-actions {
background: #fff;
padding: 20px;
border-top: 1px solid #ebeef5;
text-align: center;
}
}
.table-box {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,196 @@
<template>
<div>
<div class="titleBox">
<PageTitle title="研判指令">
<el-button type="primary" @click="getDataById('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" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<template #bglx="{ row }">
<DictTag :tag="false" :value="row.bglx" :options="D_BZ_YPLX" />
</template>
<template #ypfs="{ row }">
<DictTag :tag="false" :value="row.ypfs" :options="D_BZ_YPFS" />
</template>
<!-- 操作 -->
<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="danger" @click="deleteFile(row)">删除</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
</div>
<AddForm ref="addForm" @getList="getList" :dict="{ D_BZ_YPFS, D_BZ_YPLX }" />
</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 { useRoute } from 'vue-router'
import { getJudgmentCommandList, signCommand, feedbackCommand } from "@/api/huiShangyp/judgmentCommand.js";
import { reactive, ref, onMounted, getCurrentInstance, watch,computed } from "vue";
import AddForm from "./addForm.vue";
const { proxy } = getCurrentInstance();
const { D_BZ_YPFS, D_BZ_YPLX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX")
const detailDiloag = ref();
const searchBox = ref(); //搜索框
onMounted(() => {
tabHeightFn()
if (route.query.id) {
detailDiloag.value.init('edit', {
id: route.query.id
});
return
}
getList()
});
const searchConfiger = ref([
{ label: "研判议题", prop: 'ypyt', placeholder: "请输入研判议题", showType: "input" },
// { label: "研判方式", prop: 'ypfs', placeholder: "请输入研判方式", showType: "radio",options:D_BZ_YPFS },
]);
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 240,
tableColumn: [
{ label: "研判议题", prop: "ypyt" },
{ label: "研判方式", prop: "ypfs", showSolt: true },
{ label: "报告类型", prop: "bglx", showSolt: true },
{ label: "研判时间", prop: "ypsj" },
{ label: "研判要求", prop: "ypyq" },
{ label: "发起部门", prop: "ssbm" },
]
});
const queryFrom = ref({});
// 搜索
const onSearch = (val) => {
const promes = {
...val,
...pageData.pageConfiger,
}
queryFrom.value = { ...promes }
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;
let data = { ...pageData.pageConfiger, ...queryFrom.value, wjlb: '01' };
getJudgmentCommandList(data).then(res => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => { pageData.tableConfiger.loading = false; })
}
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
};
const route = useRoute()
const addForm = ref(null)
const getDataById = (type, row) => {
addForm.value.init(type, row, '01');
}
const deleteFile = (row) => {
proxy.$confirm('确定删除选中数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
sjzldeleteEntity({ ids: [row.id] }).then(res => {
proxy.$message.success('删除成功');
getList();
}).catch(() => {
proxy.$message.error('删除失败');
});
}).catch(() => {
proxy.$message.info('已取消删除');
});
}
</script>
<style lang="scss" scoped>
.label-pop {
position: relative;
&::before {
position: absolute;
content: '*';
top: 0;
left: -7px;
color: red;
}
}
</style>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
:v-deep .el-dialog {
width: 90% !important;
}
.zdy-model-dialogs {
/* background-color: rgb(50, 148, 214); */
background: url("~@/assets/images/bg46.png") no-repeat center center;
background-size: 100% 100%;
padding: 8px 10px;
box-sizing: border-box;
pointer-events: auto !important;
height: calc(100% - 50px);
overflow: auto;
}
</style>

View File

@ -0,0 +1,449 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">战略研判{{ title }} </span>
<div>
<el-button type="primary" size="small" v-if="title != '详情'" :loading="loading" @click="submit">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div style="padding-bottom: 40px;" class="form_cnt">
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
<template #bmList>
<div class="table-box">
<el-table :data="tableList" border style="width: 100%">
<el-table-column prop="ypbmmc" label="部门" width="150" align="center" />
<el-table-column label="研判素材" width="280" align="center">
<template #default="{ row }">
<el-input v-model="row.scyq" :disabled="!isShiQingBaoZhongXin" placeholder="请输入研判素材" />
</template>
</el-table-column>
<el-table-column label="附件" width="200" align="center">
<template #default="{ row }">
<UploadFile v-model="row.fj" :disabled="!isShiQingBaoZhongXin" :limit="1" :isImg="false"
:isAll="true" />
</template>
</el-table-column>
<el-table-column prop="wcqk" label="完成状态" width="120" align="center">
<template #default="{ row }">
<el-tag :type="row.wcqk === '02' ? 'success' : 'warning'">
{{ row.wcqk == '01' ? '准备中' : '已完成' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template #default="{ row }">
<el-button type="text" size="small" @click="updateStatus(row)" :disabled="updateDis(row)">
修改状态
</el-button>
<el-button type="text" size="small" @click="submitMaterial(row)" :disabled="updateDis(row)">
提交素材
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
</FormMessage>
</div>
<!-- 底部按钮 -->
<div class="bottom-actions" v-if="title !== '新增' && listQuery.id">
<el-button type="primary" size="small" @click="sendNotice" :loading="noticeLoading">下发通知</el-button>
<el-button type="success" size="small" @click="confirmJudgment" :loading="confirmLoading">确认研判</el-button>
</div>
</div>
<!-- 修改状态弹框 -->
<div class="dialog" v-if="statusDialog">
<div class="head_box">
<span class="title">修改状态</span>
<div>
<el-button type="primary" size="small" :loading="statusLoading" @click="submitStatus">保存</el-button>
<el-button size="small" @click="closeStatusDialog">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<el-form :model="statusForm" label-width="80px">
<el-form-item label="附件">
<UploadFile v-model="statusForm.fj" :limit="2" :isImg="false" :isAll="true" />
</el-form-item>
</el-form>
</div>
</div>
<!-- 提交素材弹框 -->
<div class="dialog" v-if="materialDialog">
<div class="head_box">
<span class="title">提交素材</span>
<div>
<el-button type="primary" size="small" :loading="materialLoading" @click="submitMaterialAction">保存</el-button>
<el-button size="small" @click="closeMaterialDialog">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<el-form :model="materialForm" label-width="80px">
<el-form-item label="附件">
<UploadFile v-model="materialForm.fj" :limit="2" :isImg="false" :isAll="true" />
</el-form-item>
</el-form>
</div>
</div>
</template>
<script setup>
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import UploadFile from "@/components/MyComponents/Upload/index.vue";
// import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue"
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, watch, computed } from "vue";
import { sjzlAddEntity, sjzlEditEntity, sjzlGetInfo, sjzlPerfectlnfo, sjzlFstz, sjzlQryp, sjzlPerfectSorce } from '@//api/yj.js'
import { getItem } from '@//utils/storage.js'
const emit = defineEmits(["updateDate", "getList"]);
const props = defineProps({
dict: Object
});
const imgMsg = ref([])
const { proxy } = getCurrentInstance();
const dialogForm = ref(false); //弹窗
const formData = ref([
]);
const { deptBizType, deptLevel, deptCode } = getItem('deptId')[0]
/** 登录人 */
const sfzh = getItem('idEntityCard')
/** 是否市情报指挥中心 */
const isShiQingBaoZhongXin = computed(() => {
const Jb = deptLevel[0] == '2' ? '01' : deptLevel[0] == '3' ? '02' : '03'
return deptBizType == '23' && Jb == '01'
})
const listQuery = ref({}); //表单
const loading = ref(false);
const elform = ref();
const title = ref("");
const tableList = ref([])
// const detailObj = ref({})
const statusDialog = ref(false) // 修改状态弹框
const statusLoading = ref(false)
const statusForm = ref({ fj: [] }) // 修改状态表单
const currentRow = ref({}) // 当前操作的行
// 提交素材相关
const materialDialog = ref(false) // 提交素材弹框
const materialLoading = ref(false)
const materialForm = ref({ fj: [] }) // 提交素材表单
const materialRow = ref({}) // 当前操作的行
/** 外面行数据 */
const outRow = ref({})
const noticeLoading = ref(false) // 下发通知加载状态
const confirmLoading = ref(false) // 确认研判加载状态
const rules = reactive({
// 可以在这里添加表单验证规则
});
watch(() => props.dict, (val) => {
if (val) {
formData.value = [
{ label: "研判议题", prop: "ypyt", type: "input", width: '48%' },
{ label: "研判时间", prop: "ypsj", type: "datetime", width: '48%' },
{ label: "报告类型", prop: "bglx", type: "radio", options: props.dict.D_BZ_YPLX, width: '48%' },
{ label: "研判方式", prop: "ypfs", type: "radio", options: props.dict.D_BZ_YPFS, width: '48%' },
{ label: "参与研判部门", prop: "jsdxBmDm", type: "department", multiple: true, depMc: 'jsdxBmMc', width: '48%' },
{ label: "研判要求", prop: "ypyq", type: "textarea", width: '100%' },
{ label: "列表", prop: "bmList", type: "slot", width: '100%' },
]
}
})
/** 是否修改禁用 */
function updateDis(row) {
/** 无id 禁用 */
if (!listQuery.value.id) return true
/** 是否创建人 */
const iscjr = !row.cjrsfzh || row?.cjrsfzh == deptCode
/** 是否完成 */
const isFinish = row.wcqk === '02'
return isShiQingBaoZhongXin.value || !iscjr || isFinish
}
function getFjArr(fj) {
if (typeof fj !== 'string' || !fj) return []
let fjArr = []
try {
fjArr = JSON.parse(fj)
} catch (error) {
}
return fjArr
}
watch(() => listQuery.value.jsdxBmDm, (val) => {
/** @type {Array<{ypbmdm: string, ypbmmc: string, scyq: string, fj: Array, wcqk: string}>} 参与研判部门数据数组 */
const arr = Array.isArray(val) ? val : []
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
tableList.value = arr.map((item, i) => {
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == item) || {}
/** 是否是新增 */
const isAddForm = !listQuery.value.id
return {
// id: null,
// sjzlid: null, // 研判战略研判ID
/** 部门代码 */
ypbmdm: item,
ypbmmc: listQuery.value.jsdxBmMc[i],
/** 素材要求 */
scyq: isAddForm ? '' : curr.scyq,
fj: isAddForm ? [] : getFjArr(curr.fj),
/** 完成情况01 准备中、02 已完成)*/
wcqk: isAddForm ? '01' : curr.wcqk || '01'
}
})
})
// 初始化数据
const init = (type, row, wjlb) => {
dialogForm.value = true;
title.value = type == "add" ? "新增" : type == "edit" ? "编辑" : "详情";
outRow.value = row || {}
if (row) { getDataById(row.id) }
};
// 根据id查询详情
const getDataById = (id) => {
sjzlGetInfo(id).then((res) => {
listQuery.value = res || {};
const cyypList = Array.isArray(res.cyypList) ? res.cyypList : []
listQuery.value.jsdxBmDm = cyypList.map(item => {
return item.ypbmdm
})
listQuery.value.jsdxBmMc = cyypList.map(item => {
return item.ypbmmc
})
});
};
function getFjString(arr) {
arr = Array.isArray(arr) ? arr : []
return JSON.stringify(arr)
}
/**获取下发部门数据 */
const getXfbmList = () => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
return tableList.value.map((item, i) => {
/** 找原来的对象 */
const curr = cyypList.find(item => item.ypbmdm == item.ypbmdm) || {}
return {
id: curr.id || null,
sjzlid: curr.sjzlid || null, // 研判战略研判ID
ypbmdm: item.ypbmdm,
ypbmmc: listQuery.value.jsdxBmMc[i],
/** 素材要求 */
scyq: item.scyq,
fj: getFjString(item.fj),
/** 完成情况01 准备中、02 已完成)*/
wcqk: item.wcqk
}
})
}
// 提交
const submit = () => {
elform.value.submit(async (data) => {
const xfbmList = getXfbmList()
let params = {
...listQuery.value,
cyypList: xfbmList,
// cyypList: listQuery.value.jsdxBmDm.map((item, index) => {
// return {
// ypbmdm: item,
// ypbmmc: listQuery.value.jsdxBmMc[index],
// ypcylx: '01'
// }
// })
};
try {
loading.value = true;
let res
if (title.value == "新增") {
res = await sjzlAddEntity(params)
} else {
res = await sjzlEditEntity(params)
}
if (res && res > 0) {
loading.value = false;
proxy.$message({ type: "success", message: title.value + "成功" });
emit("getList");
close();
}
loading.value = false;
} catch (error) {
loading.value = false;
}
});
};
// const chooseUserVisible = ref()
// const roleIds = ref([])
// const userList = ref([])
// const handleUserSelected = (val) => {
// userList.value = val
// listQuery.value.jsrxm = val.map(item => item.userName).join(',')
// }
// 修改状态
const updateStatus = (row) => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == row.ypbmdm) || {}
currentRow.value = { ...curr, row }
statusForm.value = { fj: [] }
statusDialog.value = true
};
// 提交修改状态
const submitStatus = async () => {
try {
statusLoading.value = true
const params = {
id: currentRow.value.id,
fj: statusForm.value.fj?.length > 0 ? getFjString(statusForm.value.fj) : '',
wcqk: '02'
}
const res = await sjzlPerfectlnfo(params)
if (res && res > 0) {
proxy.$message({ type: "success", message: "修改成功" })
// 更新本地状态
currentRow.value.wcqk = '02'
closeStatusDialog()
if (outRow.value.id) { getDataById(outRow.value.id) }
}
} catch (error) {
} finally {
statusLoading.value = false
}
}
// 关闭修改状态弹框
const closeStatusDialog = () => {
statusDialog.value = false
statusForm.value = { fj: [] }
statusLoading.value = false
}
// 提交素材
const submitMaterial = (row) => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == row.ypbmdm) || {}
materialRow.value = { ...curr, row }
materialForm.value = { fj: [] }
materialDialog.value = true
}
// 提交素材操作
const submitMaterialAction = async () => {
try {
materialLoading.value = true
const params = {
id: materialRow.value.id,
fj: materialForm.value.fj?.length > 0 ? getFjString(materialForm.value.fj) : '',
}
const res = await sjzlPerfectSorce(params)
proxy.$message({ type: "success", message: "提交素材成功" })
closeMaterialDialog()
if (outRow.value.id) { getDataById(outRow.value.id) }
} catch (error) {
console.log(error)
} finally {
materialLoading.value = false
}
}
// 关闭提交素材弹框
const closeMaterialDialog = () => {
materialDialog.value = false
materialForm.value = { fj: [] }
materialLoading.value = false
}
// 下发通知
const sendNotice = () => {
proxy.$confirm('确认下发通知?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
noticeLoading.value = true;
const res = await sjzlFstz(listQuery.value.id);
proxy.$message({ type: "success", message: "下发通知成功" });
close();
} catch (error) {
console.log(error);
} finally {
noticeLoading.value = false;
}
});
};
// 确认研判
const confirmJudgment = () => {
proxy.$confirm('确认研判完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
confirmLoading.value = true;
const res = await sjzlQryp(listQuery.value.id);
proxy.$message({ type: "success", message: "确认研判成功" });
close();
} catch (error) {
console.log(error);
} finally {
confirmLoading.value = false;
}
});
};
// 关闭
const close = () => {
listQuery.value = {};
dialogForm.value = false;
loading.value = false;
};
defineExpose({ init });
</script>
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
::v-deep .form-item-box {
width: 100% !important;
}
.bottom-actions {
position: absolute;
bottom: 0;
left: 50%;
display: flex;
justify-content: center;
gap: 10px;
width: 100%;
transform: translateX(-50%);
padding: 10px 20px;
border-radius: 4px;
background: white;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
// z-index: 1000;
}
</style>

View File

@ -0,0 +1,200 @@
<template>
<div>
<div class="titleBox">
<PageTitle title="战略研判">
<el-button type="primary" @click="getDataById('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" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<template #bglx="{ row }">
<DictTag :tag="false" :value="row.bglx" :options="D_BZ_YPLX" />
</template>
<template #ypfs="{ row }">
<DictTag :tag="false" :value="row.ypfs" :options="D_BZ_YPFS" />
</template>
<!-- 操作 -->
<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="danger" @click="deleteFile(row)">删除</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
</div>
<AddForm ref="addForm" @getList="getList" :dict="{ D_BZ_YPFS, D_BZ_YPLX }" />
</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 { useRoute } from 'vue-router'
import { sjzlGetPageList, sjzldeleteEntity } from "@/api/yj.js";
import { reactive, ref, onMounted, getCurrentInstance, watch,computed } from "vue";
import AddForm from "./addForm.vue";
const { proxy } = getCurrentInstance();
const { D_BZ_YPFS, D_BZ_YPLX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX")
const detailDiloag = ref();
const searchBox = ref(); //搜索框
onMounted(() => {
tabHeightFn()
if (route.query.id) {
detailDiloag.value.init('edit', {
id: route.query.id
});
return
}
getList()
});
/** 是否市情报指挥中心 */
const isShiQingBaoZhongXin = computed(() => {
const Jb = deptLevel[0] == '2' ? '01' : deptLevel[0] == '3' ? '02' : '03'
return deptBizType == '23' && Jb == '01'
})
const searchConfiger = ref([
{ label: "研判议题", prop: 'ypyt', placeholder: "请输入研判议题", showType: "input" },
// { label: "研判方式", prop: 'ypfs', placeholder: "请输入研判方式", showType: "radio",options:D_BZ_YPFS },
]);
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 240,
tableColumn: [
{ label: "研判议题", prop: "ypyt" },
{ label: "研判方式", prop: "ypfs", showSolt: true },
{ label: "报告类型", prop: "bglx", showSolt: true },
{ label: "研判时间", prop: "ypsj" },
{ label: "研判要求", prop: "ypyq" },
{ label: "发起部门", prop: "ssbm" },
]
});
const queryFrom = ref({});
// 搜索
const onSearch = (val) => {
const promes = {
...val,
...pageData.pageConfiger,
}
queryFrom.value = { ...promes }
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;
let data = { ...pageData.pageConfiger, ...queryFrom.value, wjlb: '01' };
sjzlGetPageList(data).then(res => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => { pageData.tableConfiger.loading = false; })
}
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
};
const route = useRoute()
const addForm = ref(null)
const getDataById = (type, row) => {
addForm.value.init(type, row, '01');
}
const deleteFile = (row) => {
proxy.$confirm('确定删除选中数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
sjzldeleteEntity({ ids: [row.id] }).then(res => {
proxy.$message.success('删除成功');
getList();
}).catch(() => {
proxy.$message.error('删除失败');
});
}).catch(() => {
proxy.$message.info('已取消删除');
});
}
</script>
<style lang="scss" scoped>
.label-pop {
position: relative;
&::before {
position: absolute;
content: '*';
top: 0;
left: -7px;
color: red;
}
}
</style>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
:v-deep .el-dialog {
width: 90% !important;
}
.zdy-model-dialogs {
/* background-color: rgb(50, 148, 214); */
background: url("~@/assets/images/bg46.png") no-repeat center center;
background-size: 100% 100%;
padding: 8px 10px;
box-sizing: border-box;
pointer-events: auto !important;
height: calc(100% - 50px);
overflow: auto;
}
</style>

View File

@ -0,0 +1,449 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">战术研判{{ title }} </span>
<div>
<el-button type="primary" size="small" v-if="title != '详情'" :loading="loading" @click="submit">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div style="padding-bottom: 40px;" class="form_cnt">
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
<template #bmList>
<div class="table-box">
<el-table :data="tableList" border style="width: 100%">
<el-table-column prop="ypbmmc" label="部门" width="150" align="center" />
<el-table-column label="研判素材" width="280" align="center">
<template #default="{ row }">
<el-input v-model="row.scyq" :disabled="!isShiQingBaoZhongXin" placeholder="请输入研判素材" />
</template>
</el-table-column>
<el-table-column label="附件" width="200" align="center">
<template #default="{ row }">
<UploadFile v-model="row.fj" :disabled="!isShiQingBaoZhongXin" :limit="1" :isImg="false"
:isAll="true" />
</template>
</el-table-column>
<el-table-column prop="wcqk" label="完成状态" width="120" align="center">
<template #default="{ row }">
<el-tag :type="row.wcqk === '02' ? 'success' : 'warning'">
{{ row.wcqk == '01' ? '准备中' : '已完成' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template #default="{ row }">
<el-button type="text" size="small" @click="updateStatus(row)" :disabled="updateDis(row)">
修改状态
</el-button>
<el-button type="text" size="small" @click="submitMaterial(row)" :disabled="updateDis(row)">
提交素材
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
</FormMessage>
</div>
<!-- 底部按钮 -->
<div class="bottom-actions" v-if="title !== '新增' && listQuery.id">
<el-button type="primary" size="small" @click="sendNotice" :loading="noticeLoading">下发通知</el-button>
<el-button type="success" size="small" @click="confirmJudgment" :loading="confirmLoading">确认研判</el-button>
</div>
</div>
<!-- 修改状态弹框 -->
<div class="dialog" v-if="statusDialog">
<div class="head_box">
<span class="title">修改状态</span>
<div>
<el-button type="primary" size="small" :loading="statusLoading" @click="submitStatus">保存</el-button>
<el-button size="small" @click="closeStatusDialog">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<el-form :model="statusForm" label-width="80px">
<el-form-item label="附件">
<UploadFile v-model="statusForm.fj" :limit="2" :isImg="false" :isAll="true" />
</el-form-item>
</el-form>
</div>
</div>
<!-- 提交素材弹框 -->
<div class="dialog" v-if="materialDialog">
<div class="head_box">
<span class="title">提交素材</span>
<div>
<el-button type="primary" size="small" :loading="materialLoading" @click="submitMaterialAction">保存</el-button>
<el-button size="small" @click="closeMaterialDialog">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<el-form :model="materialForm" label-width="80px">
<el-form-item label="附件">
<UploadFile v-model="materialForm.fj" :limit="2" :isImg="false" :isAll="true" />
</el-form-item>
</el-form>
</div>
</div>
</template>
<script setup>
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import UploadFile from "@/components/MyComponents/Upload/index.vue";
// import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue"
import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, watch, computed } from "vue";
import { sjzlAddEntity, sjzlEditEntity, sjzlGetInfo, sjzlPerfectlnfo, sjzlFstz, sjzlQryp, sjzlPerfectSorce } from '@//api/yj.js'
import { getItem } from '@//utils/storage.js'
const emit = defineEmits(["updateDate", "getList"]);
const props = defineProps({
dict: Object
});
const imgMsg = ref([])
const { proxy } = getCurrentInstance();
const dialogForm = ref(false); //弹窗
const formData = ref([
]);
const { deptBizType, deptLevel, deptCode } = getItem('deptId')[0]
/** 登录人 */
const sfzh = getItem('idEntityCard')
/** 是否市情报指挥中心 */
const isShiQingBaoZhongXin = computed(() => {
const Jb = deptLevel[0] == '2' ? '01' : deptLevel[0] == '3' ? '02' : '03'
return deptBizType == '23' && Jb == '01'
})
const listQuery = ref({}); //表单
const loading = ref(false);
const elform = ref();
const title = ref("");
const tableList = ref([])
// const detailObj = ref({})
const statusDialog = ref(false) // 修改状态弹框
const statusLoading = ref(false)
const statusForm = ref({ fj: [] }) // 修改状态表单
const currentRow = ref({}) // 当前操作的行
// 提交素材相关
const materialDialog = ref(false) // 提交素材弹框
const materialLoading = ref(false)
const materialForm = ref({ fj: [] }) // 提交素材表单
const materialRow = ref({}) // 当前操作的行
/** 外面行数据 */
const outRow = ref({})
const noticeLoading = ref(false) // 下发通知加载状态
const confirmLoading = ref(false) // 确认研判加载状态
const rules = reactive({
// 可以在这里添加表单验证规则
});
watch(() => props.dict, (val) => {
if (val) {
formData.value = [
{ label: "研判议题", prop: "ypyt", type: "input", width: '48%' },
{ label: "研判时间", prop: "ypsj", type: "datetime", width: '48%' },
{ label: "报告类型", prop: "bglx", type: "radio", options: props.dict.D_BZ_YPLX, width: '48%' },
{ label: "研判方式", prop: "ypfs", type: "radio", options: props.dict.D_BZ_YPFS, width: '48%' },
{ label: "参与研判部门", prop: "jsdxBmDm", type: "department", multiple: true, depMc: 'jsdxBmMc', width: '48%' },
{ label: "研判要求", prop: "ypyq", type: "textarea", width: '100%' },
{ label: "列表", prop: "bmList", type: "slot", width: '100%' },
]
}
})
/** 是否修改禁用 */
function updateDis(row) {
/** 无id 禁用 */
if (!listQuery.value.id) return true
/** 是否创建人 */
const iscjr = !row.cjrsfzh || row?.cjrsfzh == deptCode
/** 是否完成 */
const isFinish = row.wcqk === '02'
return isShiQingBaoZhongXin.value || !iscjr || isFinish
}
function getFjArr(fj) {
if (typeof fj !== 'string' || !fj) return []
let fjArr = []
try {
fjArr = JSON.parse(fj)
} catch (error) {
}
return fjArr
}
watch(() => listQuery.value.jsdxBmDm, (val) => {
/** @type {Array<{ypbmdm: string, ypbmmc: string, scyq: string, fj: Array, wcqk: string}>} 参与研判部门数据数组 */
const arr = Array.isArray(val) ? val : []
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
tableList.value = arr.map((item, i) => {
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == item) || {}
/** 是否是新增 */
const isAddForm = !listQuery.value.id
return {
// id: null,
// sjzlid: null, // 研判战术研判ID
/** 部门代码 */
ypbmdm: item,
ypbmmc: listQuery.value.jsdxBmMc[i],
/** 素材要求 */
scyq: isAddForm ? '' : curr.scyq,
fj: isAddForm ? [] : getFjArr(curr.fj),
/** 完成情况01 准备中、02 已完成)*/
wcqk: isAddForm ? '01' : curr.wcqk || '01'
}
})
})
// 初始化数据
const init = (type, row, wjlb) => {
dialogForm.value = true;
title.value = type == "add" ? "新增" : type == "edit" ? "编辑" : "详情";
outRow.value = row || {}
if (row) { getDataById(row.id) }
};
// 根据id查询详情
const getDataById = (id) => {
sjzlGetInfo(id).then((res) => {
listQuery.value = res || {};
const cyypList = Array.isArray(res.cyypList) ? res.cyypList : []
listQuery.value.jsdxBmDm = cyypList.map(item => {
return item.ypbmdm
})
listQuery.value.jsdxBmMc = cyypList.map(item => {
return item.ypbmmc
})
});
};
function getFjString(arr) {
arr = Array.isArray(arr) ? arr : []
return JSON.stringify(arr)
}
/**获取下发部门数据 */
const getXfbmList = () => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
return tableList.value.map((item, i) => {
/** 找原来的对象 */
const curr = cyypList.find(item => item.ypbmdm == item.ypbmdm) || {}
return {
id: curr.id || null,
sjzlid: curr.sjzlid || null, // 研判战术研判ID
ypbmdm: item.ypbmdm,
ypbmmc: listQuery.value.jsdxBmMc[i],
/** 素材要求 */
scyq: item.scyq,
fj: getFjString(item.fj),
/** 完成情况01 准备中、02 已完成)*/
wcqk: item.wcqk
}
})
}
// 提交
const submit = () => {
elform.value.submit(async (data) => {
const xfbmList = getXfbmList()
let params = {
...listQuery.value,
cyypList: xfbmList,
// cyypList: listQuery.value.jsdxBmDm.map((item, index) => {
// return {
// ypbmdm: item,
// ypbmmc: listQuery.value.jsdxBmMc[index],
// ypcylx: '01'
// }
// })
};
try {
loading.value = true;
let res
if (title.value == "新增") {
res = await sjzlAddEntity(params)
} else {
res = await sjzlEditEntity(params)
}
if (res && res > 0) {
loading.value = false;
proxy.$message({ type: "success", message: title.value + "成功" });
emit("getList");
close();
}
loading.value = false;
} catch (error) {
loading.value = false;
}
});
};
// const chooseUserVisible = ref()
// const roleIds = ref([])
// const userList = ref([])
// const handleUserSelected = (val) => {
// userList.value = val
// listQuery.value.jsrxm = val.map(item => item.userName).join(',')
// }
// 修改状态
const updateStatus = (row) => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == row.ypbmdm) || {}
currentRow.value = { ...curr, row }
statusForm.value = { fj: [] }
statusDialog.value = true
};
// 提交修改状态
const submitStatus = async () => {
try {
statusLoading.value = true
const params = {
id: currentRow.value.id,
fj: statusForm.value.fj?.length > 0 ? getFjString(statusForm.value.fj) : '',
wcqk: '02'
}
const res = await sjzlPerfectlnfo(params)
if (res && res > 0) {
proxy.$message({ type: "success", message: "修改成功" })
// 更新本地状态
currentRow.value.wcqk = '02'
closeStatusDialog()
if (outRow.value.id) { getDataById(outRow.value.id) }
}
} catch (error) {
} finally {
statusLoading.value = false
}
}
// 关闭修改状态弹框
const closeStatusDialog = () => {
statusDialog.value = false
statusForm.value = { fj: [] }
statusLoading.value = false
}
// 提交素材
const submitMaterial = (row) => {
const cyypList = Array.isArray(listQuery.value.cyypList) ? listQuery.value.cyypList : []
/** 找原来的对象 */
const curr = cyypList.find(item2 => item2.ypbmdm == row.ypbmdm) || {}
materialRow.value = { ...curr, row }
materialForm.value = { fj: [] }
materialDialog.value = true
}
// 提交素材操作
const submitMaterialAction = async () => {
try {
materialLoading.value = true
const params = {
id: materialRow.value.id,
fj: materialForm.value.fj?.length > 0 ? getFjString(materialForm.value.fj) : '',
}
const res = await sjzlPerfectSorce(params)
proxy.$message({ type: "success", message: "提交素材成功" })
closeMaterialDialog()
if (outRow.value.id) { getDataById(outRow.value.id) }
} catch (error) {
console.log(error)
} finally {
materialLoading.value = false
}
}
// 关闭提交素材弹框
const closeMaterialDialog = () => {
materialDialog.value = false
materialForm.value = { fj: [] }
materialLoading.value = false
}
// 下发通知
const sendNotice = () => {
proxy.$confirm('确认下发通知?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
noticeLoading.value = true;
const res = await sjzlFstz(listQuery.value.id);
proxy.$message({ type: "success", message: "下发通知成功" });
close();
} catch (error) {
console.log(error);
} finally {
noticeLoading.value = false;
}
});
};
// 确认研判
const confirmJudgment = () => {
proxy.$confirm('确认研判完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
confirmLoading.value = true;
const res = await sjzlQryp(listQuery.value.id);
proxy.$message({ type: "success", message: "确认研判成功" });
close();
} catch (error) {
console.log(error);
} finally {
confirmLoading.value = false;
}
});
};
// 关闭
const close = () => {
listQuery.value = {};
dialogForm.value = false;
loading.value = false;
};
defineExpose({ init });
</script>
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
::v-deep .form-item-box {
width: 100% !important;
}
.bottom-actions {
position: absolute;
bottom: 0;
left: 50%;
display: flex;
justify-content: center;
gap: 10px;
width: 100%;
transform: translateX(-50%);
padding: 10px 20px;
border-radius: 4px;
background: white;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
// z-index: 1000;
}
</style>

View File

@ -0,0 +1,200 @@
<template>
<div>
<div class="titleBox">
<PageTitle title="战术研判">
<el-button type="primary" @click="getDataById('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" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<template #bglx="{ row }">
<DictTag :tag="false" :value="row.bglx" :options="D_BZ_YPLX" />
</template>
<template #ypfs="{ row }">
<DictTag :tag="false" :value="row.ypfs" :options="D_BZ_YPFS" />
</template>
<!-- 操作 -->
<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="danger" @click="deleteFile(row)">删除</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
</div>
<AddForm ref="addForm" @getList="getList" :dict="{ D_BZ_YPFS, D_BZ_YPLX }" />
</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 { useRoute } from 'vue-router'
import { sjzlGetPageList, sjzldeleteEntity } from "@/api/yj.js";
import { reactive, ref, onMounted, getCurrentInstance, watch,computed } from "vue";
import AddForm from "./addForm.vue";
const { proxy } = getCurrentInstance();
const { D_BZ_YPFS, D_BZ_YPLX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX")
const detailDiloag = ref();
const searchBox = ref(); //搜索框
onMounted(() => {
tabHeightFn()
if (route.query.id) {
detailDiloag.value.init('edit', {
id: route.query.id
});
return
}
getList()
});
/** 是否市情报指挥中心 */
const isShiQingBaoZhongXin = computed(() => {
const Jb = deptLevel[0] == '2' ? '01' : deptLevel[0] == '3' ? '02' : '03'
return deptBizType == '23' && Jb == '01'
})
const searchConfiger = ref([
{ label: "研判议题", prop: 'ypyt', placeholder: "请输入研判议题", showType: "input" },
// { label: "研判方式", prop: 'ypfs', placeholder: "请输入研判方式", showType: "radio",options:D_BZ_YPFS },
]);
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 240,
tableColumn: [
{ label: "研判议题", prop: "ypyt" },
{ label: "研判方式", prop: "ypfs", showSolt: true },
{ label: "报告类型", prop: "bglx", showSolt: true },
{ label: "研判时间", prop: "ypsj" },
{ label: "研判要求", prop: "ypyq" },
{ label: "发起部门", prop: "ssbm" },
]
});
const queryFrom = ref({});
// 搜索
const onSearch = (val) => {
const promes = {
...val,
...pageData.pageConfiger,
}
queryFrom.value = { ...promes }
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;
let data = { ...pageData.pageConfiger, ...queryFrom.value, wjlb: '01' };
sjzlGetPageList(data).then(res => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => { pageData.tableConfiger.loading = false; })
}
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
};
const route = useRoute()
const addForm = ref(null)
const getDataById = (type, row) => {
addForm.value.init(type, row, '01');
}
const deleteFile = (row) => {
proxy.$confirm('确定删除选中数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
sjzldeleteEntity({ ids: [row.id] }).then(res => {
proxy.$message.success('删除成功');
getList();
}).catch(() => {
proxy.$message.error('删除失败');
});
}).catch(() => {
proxy.$message.info('已取消删除');
});
}
</script>
<style lang="scss" scoped>
.label-pop {
position: relative;
&::before {
position: absolute;
content: '*';
top: 0;
left: -7px;
color: red;
}
}
</style>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
:v-deep .el-dialog {
width: 90% !important;
}
.zdy-model-dialogs {
/* background-color: rgb(50, 148, 214); */
background: url("~@/assets/images/bg46.png") no-repeat center center;
background-size: 100% 100%;
padding: 8px 10px;
box-sizing: border-box;
pointer-events: auto !important;
height: calc(100% - 50px);
overflow: auto;
}
</style>