feat:再次调整

This commit is contained in:
2025-12-10 23:09:53 +08:00
parent dd7e06d5f6
commit 9d783ea9b5
7 changed files with 200 additions and 265 deletions

View File

@ -1,4 +1,5 @@
<template>
<!-- 数据整理 -->
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">数据整理{{ title }} </span>
@ -13,14 +14,14 @@
<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">
<el-table-column label="素材要求" width="280" align="center">
<template #default="{ row }">
<el-input v-model="row.scyq" :disabled="!isShiQingBaoZhongXin" placeholder="请输入研判素材" />
<el-input v-model="row.scyq" type="textarea" :rows="4" :disabled="isDetail || !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"
<UploadFile v-model="row.fj" :disabled="isDetail || (!isShiQingBaoZhongXin && !isAdd)" :limit="1" :isImg="false"
:isAll="true" />
</template>
</el-table-column>
@ -98,6 +99,7 @@ import { ref, defineExpose, reactive, defineEmits, getCurrentInstance, watch, co
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
@ -108,7 +110,11 @@ const dialogForm = ref(false); //弹窗
const formData = ref([
]);
const { deptBizType, deptLevel, deptCode } = getItem('deptId')[0]
const isAdd = ref(true)
/** 当前是否是详情页 */
const isDetail = ref(false)
/** 登录人 */
const sfzh = getItem('idEntityCard')
/** 是否市情报指挥中心 */
@ -144,13 +150,13 @@ 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%' },
{ label: "研判议题", prop: "ypyt", type: "input", width: '48%', disabled: isDetail.value },
{ label: "研判时间", prop: "ypsj", type: "datetime", width: '48%' , disabled: isDetail.value },
{ label: "报告类型", prop: "bglx", type: "radio", options: props.dict.D_BZ_YPLX, width: '48%' , disabled: isDetail.value },
{ label: "研判方式", prop: "ypfs", type: "radio", options: props.dict.D_BZ_YPFS, width: '48%' , disabled: isDetail.value },
{ label: "参与研判部门", prop: "jsdxBmDm", type: "department", multiple: true, depMc: 'jsdxBmMc', width: '48%' , disabled: isDetail.value },
{ label: "研判要求", prop: "ypyq", type: "textarea", width: '100%' , disabled: isDetail.value },
{ label: "列表", prop: "bmList", type: "slot", width: '100%' },
]
}
})
@ -202,6 +208,13 @@ watch(() => listQuery.value.jsdxBmDm, (val) => {
const init = (type, row, wjlb) => {
dialogForm.value = true;
title.value = type == "add" ? "新增" : type == "edit" ? "编辑" : "详情";
isAdd.value = type == 'add'
isDetail.value = type != 'add' && type != 'edit'
// 设置禁用
formData.value = formData.value.map(item => {
item.disabled = isDetail.value
return item
})
outRow.value = row || {}
if (row) { getDataById(row.id) }
};