2025-12-10 19:47:07 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div>
|
2026-01-23 15:43:22 +08:00
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
|
<div ref="searchBox" class="mt10">
|
2026-03-18 11:07:40 +08:00
|
|
|
|
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" >
|
|
|
|
|
|
<el-button size="small" type="primary" @click="getDataById('add', '')">
|
2025-12-10 19:47:07 +08:00
|
|
|
|
<el-icon style="vertical-align: middle">
|
|
|
|
|
|
<CirclePlus />
|
|
|
|
|
|
</el-icon>
|
|
|
|
|
|
<span style="vertical-align: middle">新增</span>
|
|
|
|
|
|
</el-button>
|
2026-03-18 11:07:40 +08:00
|
|
|
|
</Search>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-12-10 19:47:07 +08:00
|
|
|
|
<!-- 表格 -->
|
2026-03-18 11:07:40 +08:00
|
|
|
|
<div class="margTop">
|
2025-12-10 19:47:07 +08:00
|
|
|
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
|
|
|
|
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
2025-12-11 19:35:19 +08:00
|
|
|
|
<template #zlzt="{ row }">
|
2026-01-16 12:40:42 +08:00
|
|
|
|
{{ showSign(row) }}
|
|
|
|
|
|
<!-- <div v-for="item in row.xfbmList" :key="item.id">
|
|
|
|
|
|
{{ showSign(item) }}
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
<!-- <DictTag v-if="" :tag="true" :value="item.zlzt" :options="[{ label: '未签收', value: '01' }, { label: '已签收', value: '02' }, { label: '已反馈', value: '03' }]" /> -->
|
|
|
|
|
|
|
2025-12-10 19:47:07 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template #ypfs="{ row }">
|
|
|
|
|
|
<DictTag :tag="false" :value="row.ypfs" :options="D_BZ_YPFS" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
|
<template #controls="{ row }">
|
2026-04-28 11:26:26 +08:00
|
|
|
|
<el-link size="small" type="primary" @click="getDataById('edit', row)" :disabled="!canEdit(row)">修改</el-link>
|
2025-12-10 19:47:07 +08:00
|
|
|
|
<el-link size="small" type="primary" @click="getDataById('detail', row)">详情</el-link>
|
2026-04-28 11:26:26 +08:00
|
|
|
|
<el-link size="small" type="danger" @click="deleteFile(row)" :disabled="!canDelete(row)">删除</el-link>
|
|
|
|
|
|
<el-link v-if="canSign(row)" size="small" type="success" @click="sign(row)">签收</el-link>
|
|
|
|
|
|
<el-link v-if="canFeedback(row)" size="small" type="warning" @click="feedback(row)">反馈</el-link>
|
2025-12-10 19:47:07 +08:00
|
|
|
|
</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 }" />
|
2025-12-11 19:35:19 +08:00
|
|
|
|
<FeedbackDialog v-model="feedbackDialog" :currentRow="currentFeedbackRow" @ok="handleFeedbackSuccess" />
|
2025-12-10 19:47:07 +08:00
|
|
|
|
</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'
|
2025-12-11 19:35:19 +08:00
|
|
|
|
import { getJudgmentCommandList, deleteJudgmentCommand, signCommand, feedbackCommand } from "@/api/huiShangyp/judgmentCommand.js";
|
2025-12-10 23:09:53 +08:00
|
|
|
|
import { reactive, ref, onMounted, getCurrentInstance, watch, computed } from "vue";
|
2025-12-10 19:47:07 +08:00
|
|
|
|
import AddForm from "./addForm.vue";
|
2025-12-10 23:46:50 +08:00
|
|
|
|
import FeedbackDialog from "./components/FeedbackDialog.vue";
|
2026-01-16 12:40:42 +08:00
|
|
|
|
import { getItem } from '@//utils/storage.js'
|
2025-12-10 19:47:07 +08:00
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
const { D_BZ_YPFS, D_BZ_YPLX } = proxy.$dict("D_BZ_YPFS", "D_BZ_YPLX")
|
|
|
|
|
|
const searchBox = ref(); //搜索框
|
2026-01-16 12:40:42 +08:00
|
|
|
|
const userInfo = ref()
|
2025-12-10 19:47:07 +08:00
|
|
|
|
onMounted(() => {
|
2026-01-16 12:40:42 +08:00
|
|
|
|
userInfo.value = getItem('deptId')[0]
|
2025-12-10 19:47:07 +08:00
|
|
|
|
tabHeightFn()
|
|
|
|
|
|
getList()
|
|
|
|
|
|
});
|
2025-12-10 20:08:10 +08:00
|
|
|
|
|
2025-12-10 19:47:07 +08:00
|
|
|
|
|
|
|
|
|
|
const searchConfiger = ref([
|
2025-12-10 23:09:53 +08:00
|
|
|
|
{ label: "指令标题", prop: 'zlbt', placeholder: "请输入研判议题", showType: "input" },
|
2025-12-10 19:47:07 +08:00
|
|
|
|
// { 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,
|
2025-12-11 19:35:19 +08:00
|
|
|
|
// zlzt
|
|
|
|
|
|
// string
|
|
|
|
|
|
// 可选
|
|
|
|
|
|
// 指令状态:01 未签收、02 已签收、03已反馈
|
2025-12-10 19:47:07 +08:00
|
|
|
|
tableColumn: [
|
2025-12-10 23:09:53 +08:00
|
|
|
|
{ label: "指令标题", prop: "zlbt" },
|
|
|
|
|
|
{ label: "指令内容", prop: "zlnr", },
|
2025-12-11 19:35:19 +08:00
|
|
|
|
{ label: "指令状态", prop: "zlzt", showSolt: true },
|
2025-12-10 23:09:53 +08:00
|
|
|
|
{ label: "部门", prop: "xfbmMc" },
|
2025-12-10 19:47:07 +08:00
|
|
|
|
]
|
|
|
|
|
|
});
|
|
|
|
|
|
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;
|
2025-12-10 23:09:53 +08:00
|
|
|
|
let data = { ...pageData.pageConfiger, ...queryFrom.value };
|
2025-12-10 20:08:10 +08:00
|
|
|
|
getJudgmentCommandList(data).then(res => {
|
2025-12-10 19:47:07 +08:00
|
|
|
|
pageData.tableData = res.records || [];
|
|
|
|
|
|
pageData.total = res.total;
|
|
|
|
|
|
pageData.tableConfiger.loading = false;
|
|
|
|
|
|
}).catch(() => { pageData.tableConfiger.loading = false; })
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表格高度计算
|
|
|
|
|
|
const tabHeightFn = () => {
|
2026-03-18 11:07:40 +08:00
|
|
|
|
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 220;
|
2026-01-16 12:40:42 +08:00
|
|
|
|
window.onresize = function () {
|
2025-12-10 19:47:07 +08:00
|
|
|
|
tabHeightFn();
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
const addForm = ref(null)
|
2026-02-07 10:24:29 +08:00
|
|
|
|
watch(() => route.query.id, (val) => {
|
|
|
|
|
|
console.log('val: ', val);
|
|
|
|
|
|
if (val) {
|
|
|
|
|
|
addForm.value.init('detail', {id:val}, '01');
|
|
|
|
|
|
}
|
|
|
|
|
|
},{deep:true});
|
2025-12-10 23:46:50 +08:00
|
|
|
|
const feedbackDialog = ref(false)
|
|
|
|
|
|
const currentFeedbackRow = ref({})
|
2025-12-10 19:47:07 +08:00
|
|
|
|
const getDataById = (type, row) => {
|
|
|
|
|
|
addForm.value.init(type, row, '01');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const deleteFile = (row) => {
|
|
|
|
|
|
proxy.$confirm('确定删除选中数据吗?', '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
2025-12-10 23:09:53 +08:00
|
|
|
|
deleteJudgmentCommand({ ids: [row.id] }).then(res => {
|
2025-12-10 19:47:07 +08:00
|
|
|
|
proxy.$message.success('删除成功');
|
|
|
|
|
|
getList();
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
proxy.$message.error('删除失败');
|
|
|
|
|
|
});
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
proxy.$message.info('已取消删除');
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-12-10 23:27:41 +08:00
|
|
|
|
const sign = (row) => {
|
|
|
|
|
|
proxy.$confirm('确定签收吗?', '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
signCommand({ zlid: row.id }).then(res => {
|
|
|
|
|
|
proxy.$message.success('签收成功');
|
|
|
|
|
|
getList();
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
proxy.$message.error('签收失败');
|
|
|
|
|
|
});
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
proxy.$message.info('已取消签收');
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-12-10 23:46:50 +08:00
|
|
|
|
|
|
|
|
|
|
const feedback = (row) => {
|
|
|
|
|
|
currentFeedbackRow.value = row;
|
|
|
|
|
|
feedbackDialog.value = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleFeedbackSuccess = () => {
|
|
|
|
|
|
// 反馈成功后刷新列表
|
|
|
|
|
|
getList();
|
|
|
|
|
|
}
|
2026-01-16 12:40:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 权限控制
|
2026-04-28 11:26:26 +08:00
|
|
|
|
// 获取当前用户在xfbmList中的部门项
|
|
|
|
|
|
const getMyDeptItem = (row) => {
|
|
|
|
|
|
return row.xfbmList?.find(v => v.ssbmdm == userInfo.value?.deptCode)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 显示签收状态
|
2026-01-16 12:40:42 +08:00
|
|
|
|
const showSign = (row) => {
|
2026-04-28 11:26:26 +08:00
|
|
|
|
const item = getMyDeptItem(row)
|
2026-01-16 12:40:42 +08:00
|
|
|
|
if (item) {
|
|
|
|
|
|
return item.zlzt == '01' ? '未签收' : item.zlzt == '02' ? '已签收' : '已反馈'
|
|
|
|
|
|
}
|
2026-04-28 11:26:26 +08:00
|
|
|
|
return row.zlzt == '01' ? '未签收' : row.zlzt == '02' ? '已签收' : '已反馈'
|
2026-01-16 12:40:42 +08:00
|
|
|
|
}
|
2026-04-28 11:26:26 +08:00
|
|
|
|
|
|
|
|
|
|
// 删除权限:JS_666666/JS_777777可删除所有,其余只能删除自己的
|
|
|
|
|
|
const canDelete = (row) => {
|
|
|
|
|
|
const roleList = getItem('roleList') || []
|
|
|
|
|
|
const roleCodes = roleList.map(r => r.roleCode)
|
|
|
|
|
|
|
|
|
|
|
|
if (roleCodes.includes('JS_666666') || roleCodes.includes('JS_777777')) return true
|
|
|
|
|
|
return row.ssbmdm == userInfo.value?.deptCode
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 修改权限:只能自己修改,且未签收未反馈
|
|
|
|
|
|
const canEdit = (row) => {
|
|
|
|
|
|
const item = getMyDeptItem(row)
|
|
|
|
|
|
if (!item) return false
|
|
|
|
|
|
return item.zlzt == '01'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 签收权限:当前部门在列表中且未签收
|
|
|
|
|
|
const canSign = (row) => {
|
|
|
|
|
|
const item = getMyDeptItem(row)
|
|
|
|
|
|
return item?.zlzt == '01'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 反馈权限:当前部门在列表中且已签收或已反馈(可多次反馈)
|
|
|
|
|
|
const canFeedback = (row) => {
|
|
|
|
|
|
const item = getMyDeptItem(row)
|
|
|
|
|
|
return item && (item.zlzt == '02' || item.zlzt == '03')
|
2026-01-16 12:40:42 +08:00
|
|
|
|
}
|
2025-12-10 19:47:07 +08:00
|
|
|
|
</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;
|
|
|
|
|
|
}
|
2025-12-10 20:08:10 +08:00
|
|
|
|
</style>
|