index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <template>
  2. <div class="sensitive-words">
  3. <pageSearch ref="searchTableRef" :searchConfig="searchConfig">
  4. <template #disposeOrg="scope">
  5. <el-tree-select v-model="scope.value" :data="treeData" node-key="strId" filterable
  6. @change="newVal => onMessageChange(scope, newVal)" placeholder="请选择处罚机构" />
  7. </template>
  8. </pageSearch>
  9. <pageContent ref="tableListRef" :total="total" :contentConfig="contentConfig" :pageList="tableData">
  10. <!-- 案号 -->
  11. <template #caseNo="scope">
  12. <span>SHMS2025</span>
  13. </template>
  14. <!-- 案由 -->
  15. <template #punishReason="scope">
  16. <span>船舶碰撞损害责任纠纷</span>
  17. </template>
  18. <!-- 船舶名称 -->
  19. <template #shipNameCn="shipNameCn">
  20. <span>和谐号</span>
  21. </template>
  22. <!-- 处罚类型 -->
  23. <template #processType="scope">
  24. <span>行为罚</span>
  25. </template>
  26. <!-- 处罚对象名称 -->
  27. <template #punishObjName="scope">
  28. <span>江苏远洋运输有限公司</span>
  29. </template>
  30. <!-- 船籍港 -->
  31. <template #portOfregistry="scope">
  32. <span>上海</span>
  33. </template>
  34. <!-- 违法发现时间 -->
  35. <template #wffxsj="scope">
  36. <span>2025-7-14 7:00:00</span>
  37. </template>
  38. <!-- 案件状态 -->
  39. <template #caseStatus="scope">
  40. <span>立案</span>
  41. </template>
  42. <!--立案时间 -->
  43. <template #registerDate="scope">
  44. <span>2025-6-22 17:20:00</span>
  45. </template>
  46. <!--处罚金额 -->
  47. <template #punishAmount="scope">
  48. <span>89,987,487,101.000</span>
  49. </template>
  50. <!--当前处理人 -->
  51. <template #dqclr="scope">
  52. <span>受理执法人员</span>
  53. </template>
  54. <!--特殊情况 -->
  55. <template #tsqk="scope">
  56. <span>无</span>
  57. </template>
  58. <!-- 违法信息 -->
  59. <template #wfxx="scope">
  60. <span>洋山海事处处罚填 洋海罚字(2025)第0032号</span>
  61. </template>
  62. <!--立案提交时间 -->
  63. <template #latjsj="scope">
  64. <span>2025-4-02 20:38:47</span>
  65. </template>
  66. <!--发布时间 -->
  67. <template #declareDate="scope">
  68. <span>2025-3-28 16:37:23</span>
  69. </template>
  70. <!--是否发布 -->
  71. <template #sffb="scope">
  72. <span>否</span>
  73. </template>
  74. <template #button>
  75. <el-button type="primary" @click="handleExport()">导出</el-button>
  76. </template>
  77. <template #operate="scope">
  78. <el-button v-if="notifiShow" type="primary" plain @click="handleCheck(scope.row.releasedId)"> 查看
  79. </el-button>
  80. <el-button v-if="notifiShow" type="primary" plain @click="handlePublish(scope.row.releasedId)"> 发布通报
  81. </el-button>
  82. <el-button v-if="notifiShow" type="primary" @click="handleStatus(scope.row.releasedId, '2', '不予通报')">
  83. 不予通报
  84. </el-button>
  85. </template>
  86. </pageContent>
  87. <el-dialog v-model="dialogVisible" title="不予通报信息填写" width="500" :before-close="handleClose">
  88. <el-form ref="ruleFormRef" style="max-width: 500px" :model="ruleForm" :rules="rules" label-width="auto">
  89. <el-form-item label="不予通报原因:" prop="no_notification">
  90. <el-input v-model="ruleForm.no_notification" />
  91. </el-form-item>
  92. <el-form-item label="不予通报附件:">
  93. <FileUpload v-model="ruleForm.fileInfo"></FileUpload>
  94. </el-form-item>
  95. </el-form>
  96. <template #footer>
  97. <div class="dialog-footer">
  98. <el-button @click="resetForm(ruleFormRef)">取消</el-button>
  99. <el-button type="primary" @click="submitForm(ruleFormRef)">
  100. 确定
  101. </el-button>
  102. </div>
  103. </template>
  104. </el-dialog>
  105. </div>
  106. </template>
  107. <script setup lang="ts">
  108. import { useRouter } from 'vue-router';
  109. import contentConfig from './config/content.config';
  110. import pageContent from '@/components/components/pageContent.vue';
  111. import searchConfig from './config/search.config';
  112. import pageSearch from '@/components/components/pageSearch.vue';
  113. import useSystemStore from '@/store/main';
  114. import { outTypeList } from '@/libs/commonMeth';
  115. import useDeptStore from '@/store/modules/dept';
  116. import { TreeOptions } from '@/types/global';
  117. import type { FormInstance, FormRules } from 'element-plus'
  118. const systemStore = useSystemStore();
  119. import {
  120. categoryOnm,
  121. notificationStatus,
  122. isFeedback,
  123. overdueStatus,
  124. takeMeasures,
  125. bj_notification_type,
  126. bj_ship_delayed,
  127. bj_hand_opinion,
  128. bj_lssuing_unit,
  129. bj_initial_review_mark,
  130. bj_ship_port_registration,
  131. } from '@/plugins/dictData';
  132. const bj_ship_type = outTypeList('bj_ship_type'); // 船舶类型
  133. const bj_ship_sort = outTypeList('bj_ship_sort'); // 船舶种类
  134. const bj_process_type = outTypeList('bj_process_type'); // 处罚类型
  135. const bj_parties_type = outTypeList('bj_parties_type'); // 当事人类别
  136. const total = ref(0);
  137. const pageSize = ref([10, 20, 30]);
  138. const tableData = ref([]);
  139. const tableListRef = ref();
  140. const router = useRouter();
  141. // 操作弹框
  142. import usePageModal from '@/components/components/hooks/usePageDetails';
  143. const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick, handlePageDetail } =
  144. usePageModal();
  145. const handleCheck = async (id?: string) => {
  146. router.push({
  147. path: '/notificationInfoInquiry/administrativePenaltyDetail',
  148. query: { type: 'detail' },
  149. });
  150. };
  151. const handleExport = () => {
  152. ElMessage.success('小编在努力开发中。。。');
  153. return;
  154. };
  155. const onMessageChange = (scope, newVal) => {
  156. scope.onInput(newVal);
  157. };
  158. // 通报发布
  159. const handlePublish = releasedId => {
  160. ElMessage.success('小编在努力开发中。。。');
  161. // return;
  162. router.push({
  163. path: '/notificationInfoManage/detailPublish',
  164. query: { type: 'edit', releasedId }
  165. // path: '/notificationInfoInquiry/publish',
  166. // query: { type: 'edit', releasedId: releasedId },
  167. });
  168. };
  169. const searchTableRef = ref();
  170. // 状态按钮
  171. function handleStatus(value: string, status: string, str: string) {
  172. dialogVisible.value = true;
  173. // ElMessage.success('小编在努力开发中。。。');
  174. // return;
  175. // ElMessageBox.confirm(`是否${str}这条数据?`, '状态提示', {
  176. // confirmButtonText: '确定',
  177. // cancelButtonText: '取消',
  178. // type: 'warning',
  179. // })
  180. // .then(async () => {
  181. // const postData: any = await changeInventoryStatus(value, status);
  182. // if (postData.code === 200) {
  183. // tableListRef.value[0].fetchPageListData();
  184. // ElMessage.success('操作成功!');
  185. // } else {
  186. // ElMessage.error('操作失败!');
  187. // }
  188. // })
  189. // .catch(() => {
  190. // ElMessage({
  191. // type: 'info',
  192. // message: '取消操作',
  193. // });
  194. // });
  195. }
  196. const dialogVisible = ref(false);
  197. // 不予通报按钮取消
  198. const handleClose = (done: () => void) => {
  199. ElMessageBox.confirm('是否要关闭不予通报信息弹窗?')
  200. .then(() => {
  201. done()
  202. })
  203. .catch(() => {
  204. // catch error
  205. })
  206. }
  207. interface RuleForm {
  208. no_notification: string,
  209. fileInfo: string
  210. }
  211. const ruleFormRef = ref<FormInstance>()
  212. const ruleForm = reactive<RuleForm>({
  213. no_notification: '',
  214. fileInfo: ''
  215. })
  216. const rules = reactive<FormRules<RuleForm>>({
  217. no_notification: [
  218. { required: true, message: '不予通报原因不能为空!', trigger: 'blur' },
  219. ],
  220. fileInfo: [
  221. { required: true, message: '不予通报附件不能为空!', trigger: 'blur' },
  222. ]
  223. })
  224. const notifiShow = ref(true);
  225. const submitForm = async (formEl: FormInstance | undefined) => {
  226. if (!formEl) return
  227. await formEl.validate((valid, fields) => {
  228. if (valid) {
  229. dialogVisible.value = false;
  230. notifiShow.value = false;
  231. ElMessage({
  232. message: '操作成功!',
  233. type: 'success',
  234. })
  235. formEl.resetFields()
  236. } else {
  237. }
  238. })
  239. }
  240. const resetForm = (formEl: FormInstance | undefined) => {
  241. if (!formEl) return
  242. formEl.resetFields()
  243. dialogVisible.value = false;
  244. }
  245. // 删除按钮
  246. function handleDelete(value: any) {
  247. ElMessageBox.confirm('是否删除这条数据?', '删除提示', {
  248. confirmButtonText: '确定',
  249. cancelButtonText: '取消',
  250. type: 'warning',
  251. })
  252. .then(() => {
  253. systemStore.deletePageDataAction(contentConfig.pageName, value);
  254. })
  255. .catch(() => {
  256. ElMessage({
  257. type: 'info',
  258. message: '取消删除',
  259. });
  260. });
  261. }
  262. // 筛选-状态赋值
  263. async function searchItem() {
  264. searchConfig.formItems.forEach(item => {
  265. if (item.prop === 'punishReason') {
  266. // item.options = searchList.value;
  267. }
  268. if (item.prop === 'shipType') {
  269. item.options = bj_ship_type;
  270. }
  271. // 船舶种类
  272. if (item.prop === 'shipSort') {
  273. item.options = bj_ship_sort;
  274. }
  275. if (item.prop === 'processType') {
  276. item.options = bj_process_type;
  277. }
  278. //处罚种类
  279. if (item.prop === 'todo') {
  280. item.options = bj_process_type;
  281. }
  282. //任务来源
  283. if (item.prop === '') {
  284. item.options = bj_process_type;
  285. }
  286. //海内河船
  287. if (item.prop === 'hnhc') {
  288. item.options = bj_process_type;
  289. }
  290. if (item.prop === 'partiesType') {
  291. item.options = bj_parties_type;
  292. }
  293. if (item.prop === 'portOfregistry') {
  294. item.options = bj_ship_port_registration;
  295. }
  296. });
  297. }
  298. searchItem();
  299. const treeData = ref<TreeOptions[]>();
  300. const deptStore = useDeptStore();
  301. onMounted(async () => {
  302. // 加载组织架构
  303. if (!deptStore.hasDeptData) {
  304. await deptStore.loadDeptDataFromCache();
  305. }
  306. treeData.value = deptStore.deptData;
  307. });
  308. </script>
  309. <style scoped lang="scss">
  310. .sensitive-words {
  311. margin: 20px;
  312. // background-color: #fff;
  313. }
  314. .status {
  315. cursor: pointer;
  316. position: relative;
  317. .status-tip {
  318. position: absolute;
  319. top: 2px;
  320. left: 60px;
  321. }
  322. }
  323. .dialog-tip {
  324. text-align: center;
  325. }
  326. </style>