feat: 增加研判指令备用
This commit is contained in:
150
src/api/huiShangyp/tacticalApi.js
Normal file
150
src/api/huiShangyp/tacticalApi.js
Normal 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
|
||||
})
|
||||
}
|
||||
@ -1,62 +0,0 @@
|
||||
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
|
||||
})
|
||||
}
|
||||
@ -679,12 +679,21 @@ export const publicRoutes = [
|
||||
{
|
||||
path: "/strategicResearch",
|
||||
name: "strategicResearch",
|
||||
component: () => import("@/views/backOfficeSystem/JudgmentHome/strategicResearch/index"),
|
||||
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",
|
||||
|
||||
@ -0,0 +1,330 @@
|
||||
<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="handleStartJudgment" :disabled="statusDis('开始研判')">开始研判</el-button>
|
||||
<el-button type="primary" size="small" @click="handleEndJudgment" :disabled="statusDis('结束研判')">结束研判</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed, watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import FormMessage from '@/components/FormMessage/index.vue'
|
||||
import UploadFile from '@/components/UploadFile/index.vue'
|
||||
import {
|
||||
sjzlGetEntityById,
|
||||
sjzlCreateEntity,
|
||||
sjzlUpdateEntity,
|
||||
sjzlSendNotice,
|
||||
sjzlConfirmJudgment
|
||||
} from '@/api/yj.js'
|
||||
import { startJudgment, endJudgment } from '@/api/tacticalApi.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 statusDis = (action) => {
|
||||
if (!listQuery.value.zt) return true
|
||||
if (action === '开始研判') {
|
||||
return listQuery.value.zt !== '01'
|
||||
} else if (action === '结束研判') {
|
||||
return listQuery.value.zt !== '02'
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const updateDis = (row) => {
|
||||
return !isShiQingBaoZhongXin.value || row.wcqk === '02'
|
||||
}
|
||||
|
||||
// 开始研判
|
||||
const handleStartJudgment = async () => {
|
||||
try {
|
||||
await ElMessageBox.confirm('确定要开始研判吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
|
||||
await startJudgment(listQuery.value.id)
|
||||
ElMessage.success('开始研判成功')
|
||||
emit('getList')
|
||||
close()
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
ElMessage.error('开始研判失败')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 结束研判
|
||||
const handleEndJudgment = async () => {
|
||||
try {
|
||||
await ElMessageBox.confirm('确定要结束研判吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
|
||||
await endJudgment(listQuery.value.id)
|
||||
ElMessage.success('结束研判成功')
|
||||
emit('getList')
|
||||
close()
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
ElMessage.error('结束研判失败')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
@ -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>
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="dialog" v-if="dialogForm">
|
||||
<div class="head_box">
|
||||
<span class="title">数据整理{{ title }} </span>
|
||||
<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>
|
||||
@ -186,7 +186,7 @@ watch(() => listQuery.value.jsdxBmDm, (val) => {
|
||||
const isAddForm = !listQuery.value.id
|
||||
return {
|
||||
// id: null,
|
||||
// sjzlid: null, // 研判数据整理ID
|
||||
// sjzlid: null, // 研判战略研判ID
|
||||
/** 部门代码 */
|
||||
ypbmdm: item,
|
||||
ypbmmc: listQuery.value.jsdxBmMc[i],
|
||||
@ -232,7 +232,7 @@ const getXfbmList = () => {
|
||||
const curr = cyypList.find(item => item.ypbmdm == item.ypbmdm) || {}
|
||||
return {
|
||||
id: curr.id || null,
|
||||
sjzlid: curr.sjzlid || null, // 研判数据整理ID
|
||||
sjzlid: curr.sjzlid || null, // 研判战略研判ID
|
||||
ypbmdm: item.ypbmdm,
|
||||
ypbmmc: listQuery.value.jsdxBmMc[i],
|
||||
/** 素材要求 */
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="dialog" v-if="dialogForm">
|
||||
<div class="head_box">
|
||||
<span class="title">数据整理{{ title }} </span>
|
||||
<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>
|
||||
@ -186,7 +186,7 @@ watch(() => listQuery.value.jsdxBmDm, (val) => {
|
||||
const isAddForm = !listQuery.value.id
|
||||
return {
|
||||
// id: null,
|
||||
// sjzlid: null, // 研判数据整理ID
|
||||
// sjzlid: null, // 研判战术研判ID
|
||||
/** 部门代码 */
|
||||
ypbmdm: item,
|
||||
ypbmmc: listQuery.value.jsdxBmMc[i],
|
||||
@ -232,7 +232,7 @@ const getXfbmList = () => {
|
||||
const curr = cyypList.find(item => item.ypbmdm == item.ypbmdm) || {}
|
||||
return {
|
||||
id: curr.id || null,
|
||||
sjzlid: curr.sjzlid || null, // 研判数据整理ID
|
||||
sjzlid: curr.sjzlid || null, // 研判战术研判ID
|
||||
ypbmdm: item.ypbmdm,
|
||||
ypbmmc: listQuery.value.jsdxBmMc[i],
|
||||
/** 素材要求 */
|
||||
|
||||
Reference in New Issue
Block a user