Files
tekelanew_acs/acs/nladmin-ui/node_modules/.cache/vue-loader/cec188af239daaf448c4e39eb7952eac.json
2024-12-05 09:33:18 +08:00

1 line
4.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"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\\param\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\param\\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\r\nimport crudParam from '@/views/system/param/param'\r\nimport CRUD, { presenter, header, form, crud } from '@crud/crud'\r\nimport crudOperation from '@crud/CRUD.operation'\r\nimport udOperation from '@crud/UD.operation'\r\nimport pagination from '@crud/Pagination'\r\n\r\nconst defaultForm = {\r\n id: null,\r\n code: null,\r\n name: null,\r\n value: null,\r\n remark: null,\r\n is_active: true\r\n}\r\nexport default {\r\n name: 'Param',\r\n components: { pagination, crudOperation, udOperation },\r\n mixins: [presenter(), header(), form(defaultForm), crud()],\r\n cruds() {\r\n return CRUD({ title: 'menu.table_title.SystemParam', url: 'api/param', idField: 'id', sort: 'id,desc', crudMethod: { ...crudParam },\r\n optShow: {\r\n add: true,\r\n edit: true,\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 add: ['admin', 'param:add'],\r\n edit: ['admin', 'param:edit'],\r\n del: ['admin', 'param:del']\r\n },\r\n\r\n rules: {\r\n id: [\r\n { required: true, message: this.$t('SysParam.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n code: [\r\n { required: true, message: this.$t('SysParam.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n name: [\r\n { required: true, message: this.$t('SysParam.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n value: [\r\n { required: true, message: this.$t('SysParam.rules.NotNull'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n // computed: {\r\n // computedProp() {\r\n // // 在计算属性中拼接属性名\r\n // console.log(localStorage.getItem('lang'))\r\n // return localStorage.getItem('lang') + '_name'\r\n // }\r\n // },\r\n created() {\r\n // this.webSocket()\r\n },\r\n methods: {\r\n // 钩子在获取表格数据之前执行false 则代表不获取数据\r\n [CRUD.HOOK.beforeRefresh]() {\r\n return true\r\n },\r\n webSocket() {\r\n const that = this\r\n if (typeof (WebSocket) === 'undefined') {\r\n this.$notify({\r\n title: '提示',\r\n message: '当前浏览器无法接收实时报警信息,请使用谷歌浏览器!',\r\n type: 'warning',\r\n duration: 0\r\n })\r\n } else {\r\n const id = '123'\r\n // 获取token保存到vuex中的用户信息此处仅适用于本项目注意删除或修改\r\n // 实例化socket这里我把用户名传给了后台使后台能判断要把消息发给哪个用户其实也可以后台直接获取用户IP来判断并推送\r\n const socketUrl = process.env.VUE_APP_WS_API + id\r\n this.socket = new WebSocket(socketUrl)\r\n // 监听socket打开\r\n this.socket.onopen = function() {\r\n console.log('浏览器WebSocket已打开')\r\n that.socket.send('测试客户端发送消息')\r\n }\r\n\r\n // 监听socket消息接收\r\n\r\n this.socket.onmessage = function(msg) {\r\n console.log(msg)\r\n\r\n // 转换为json对象\r\n /* const data = JSON.parse(msg.data);*/\r\n }\r\n\r\n // 监听socket错误\r\n this.socket.onerror = function() {\r\n that.$notify({\r\n title: '错误',\r\n message: '服务器错误,无法接收实时报警信息',\r\n type: 'error',\r\n duration: 0\r\n })\r\n }\r\n // 监听socket关闭\r\n this.socket.onclose = function() {\r\n console.log('WebSocket已关闭')\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",null]}