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

1 line
6.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\\acs\\stage\\image\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\acs\\stage\\image\\index.vue","mtime":1732871026670},{"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\r\nimport crudStageImage from '@/api/acs/stage/stageImage'\r\nimport CRUD, { crud, form, header, presenter } from '@crud/crud'\r\nimport rrOperation from '@crud/RR.operation'\r\nimport crudOperation from '@crud/CRUD.operation'\r\nimport udOperation from '@crud/UD.operation'\r\nimport pagination from '@crud/Pagination'\r\nimport { get } from '@/views/system/dict/dictDetail'\r\nimport { mapGetters } from 'vuex'\r\nimport { getToken } from '@/utils/auth'\r\n\r\nconst defaultForm = {\r\n image_uuid: null,\r\n image_name: null,\r\n driver_code_json: null,\r\n remark: null,\r\n is_active: null,\r\n is_delete: null,\r\n create_by: null,\r\n create_time: null,\r\n update_by: null,\r\n update_time: null,\r\n image_code: null\r\n}\r\nexport default {\r\n name: 'StageImage',\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/stageImage',\r\n idField: 'image_uuid',\r\n sort: 'image_uuid,desc',\r\n crudMethod: { ...crudStageImage },\r\n optShow: {\r\n add: true,\r\n edit: true,\r\n del: true\r\n }\r\n })\r\n },\r\n data() {\r\n const generateData = _ => {\r\n const data = []\r\n const cities = []\r\n cities.forEach((city, index) => {\r\n data.push({\r\n label: city,\r\n key: index,\r\n cities: cities[index]\r\n })\r\n })\r\n return data\r\n }\r\n return {\r\n data: generateData(),\r\n value: [],\r\n cities: [],\r\n filterMethod(query, item) {\r\n return item.cities.indexOf(query) > -1\r\n },\r\n permission: {\r\n add: ['admin', 'stageImage:add'],\r\n edit: ['admin', 'stageImage:edit'],\r\n del: ['admin', 'stageImage:del']\r\n },\r\n headers: { 'Authorization': getToken() },\r\n rules: {\r\n image_uuid: [\r\n { required: true, message: '设备标识不能为空', trigger: 'blur' }\r\n ],\r\n image_name: [\r\n { required: true, message: '设备名字不能为空', trigger: 'blur' }\r\n ],\r\n is_active: [\r\n { required: true, message: '是否启用不能为空', trigger: 'blur' }\r\n ],\r\n is_delete: [\r\n { required: true, message: '是否删除不能为空', trigger: 'blur' }\r\n ],\r\n create_by: [\r\n { required: true, message: '创建者不能为空', trigger: 'blur' }\r\n ],\r\n create_time: [\r\n { required: true, message: '创建时间不能为空', trigger: 'blur' }\r\n ],\r\n image_code: [\r\n { required: true, message: '图标编码不能为空', trigger: 'blur' }\r\n ]\r\n },\r\n fileList: [],\r\n device_types: []\r\n }\r\n },\r\n computed: {\r\n ...mapGetters([\r\n 'imagesUploadApi',\r\n 'baseApi'\r\n ])\r\n\r\n },\r\n created() {\r\n this.$nextTick(() => {\r\n // 获取设备类型字典\r\n get('device_type').then(data => {\r\n this.device_types = data.content\r\n })\r\n })\r\n },\r\n\r\n mounted() {\r\n this.getUserInfo()\r\n },\r\n methods: {\r\n // 钩子在获取表格数据之前执行false 则代表不获取数据\r\n [CRUD.HOOK.beforeRefresh]() {\r\n return true\r\n },\r\n [CRUD.HOOK.afterSubmit]() {\r\n this.fileList = []\r\n this.value = []\r\n this.cities = []\r\n }, [CRUD.HOOK.beforeToAdd]() {\r\n this.fileList = []\r\n this.value = []\r\n this.cities = []\r\n },\r\n [CRUD.HOOK.afterToEdit]() {\r\n const driver_code_json = this.form.driver_code_json\r\n const json_arr = driver_code_json.split(',')\r\n const new_arr = []\r\n if (json_arr) {\r\n json_arr.forEach(function(c) {\r\n new_arr.push(c)\r\n })\r\n }\r\n this.value = new_arr\r\n let new_lst = []\r\n const image_code = this.form.image_code\r\n const image_name = this.form.image_name\r\n new_lst = [{ name: image_code, url: image_name }]\r\n this.fileList = new_lst\r\n },\r\n beforeUpload_u(file) {\r\n const testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)\r\n const extension = (testmsg === 'png' || testmsg === 'jpg')\r\n\r\n let bool = false\r\n if (extension) {\r\n bool = true\r\n } else {\r\n bool = false\r\n }\r\n if (!extension) {\r\n this.$confirm(`上传文件只能是png/jpg格式!`)\r\n }\r\n\r\n return bool\r\n },\r\n handleSuccess(response) {\r\n this.form.image_code = response.realName\r\n this.form.image_name = response.path\r\n },\r\n handleChange(value) {\r\n let a = ''\r\n if (value) {\r\n value.forEach(function(c, index) {\r\n a = a + c\r\n if ((index + 1) !== value.length) {\r\n a = a + ','\r\n }\r\n })\r\n }\r\n this.form.driver_code_json = a\r\n },\r\n getUserInfo: function() {\r\n const me = this\r\n // 清空数据\r\n me.data = []\r\n me.value = []\r\n get('device_type').then(device => {\r\n if (device) {\r\n device.content.forEach(function(c, index) {\r\n me.cities.push(c.label)\r\n me.data.push({\r\n key: c.value,\r\n label: c.label,\r\n cities: c.label\r\n })\r\n })\r\n }\r\n })\r\n }\r\n }\r\n}\r\n",null]}