1 line
4.6 KiB
JSON
1 line
4.6 KiB
JSON
|
|
{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\notice\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\notice\\index.vue","mtime":1732871026791},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1732872825835}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport CRUD, { crud, form, header, presenter } from '@crud/crud'\r\nimport crudNotice from './sysNotice'\r\nimport rrOperation from '@crud/RR.operation.vue'\r\nimport crudOperation from '@crud/CRUD.operation.vue'\r\nimport udOperation from '@crud/UD.operation.vue'\r\nimport pagination from '@crud/Pagination.vue'\r\nimport { NOTICE_SHOW_MESSAGE, NOTICE_MESSAGE_UPDATE } from './VueBaseCode'\r\n\r\nconst defaultForm = { notice_id: null, notice_title: null, notice_content: null, notice_type: null, have_read: null, read_time: null, deal_status: null, create_time: null }\r\nexport default {\r\n name: 'Notice',\r\n dicts: ['deal_status', 'have_read_type', 'notice_type'],\r\n components: { pagination, crudOperation, rrOperation, udOperation },\r\n mixins: [presenter(), header(), form(defaultForm), crud()],\r\n cruds() {\r\n return CRUD({\r\n title: '消息通知',\r\n url: 'api/notice',\r\n idField: 'notice_id',\r\n sort: 'notice_id,desc',\r\n crudMethod: { ...crudNotice },\r\n optShow: {\r\n add: false,\r\n edit: false,\r\n del: true,\r\n download: false,\r\n reset: true\r\n }\r\n })\r\n },\r\n data() {\r\n return {\r\n permission: {},\r\n rules: {\r\n notice_title: [\r\n { required: true, message: '信息标题不能为空', trigger: 'blur' }\r\n ],\r\n notice_content: [\r\n { required: true, message: '信息内容不能为空', trigger: 'blur' }\r\n ],\r\n notice_type: [\r\n { required: true, message: '信息类型不能为空', trigger: 'blur' }\r\n ],\r\n have_read: [\r\n { required: true, message: '读取状态不能为空', trigger: 'blur' }\r\n ],\r\n deal_status: [\r\n { required: true, message: '处理状态不能为空', trigger: 'blur' }\r\n ],\r\n create_time: [\r\n { required: true, message: '创建时间不能为空', trigger: 'blur' }\r\n ]\r\n }}\r\n },\r\n methods: {\r\n // 钩子:在获取表格数据之前执行,false 则代表不获取数据\r\n [CRUD.HOOK.beforeRefresh]() {\r\n return true\r\n },\r\n show(record) {\r\n if (record.have_read == '1') {\r\n crudNotice.read(record.notice_id).then(() => {\r\n record.have_read = '2'\r\n this.$bus.emit(NOTICE_MESSAGE_UPDATE)\r\n })\r\n }\r\n this.$bus.emit(NOTICE_SHOW_MESSAGE, record)\r\n this.crud.toQuery()\r\n },
|