{"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\\device\\driver\\standard_ordinary_site.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\acs\\device\\driver\\standard_ordinary_site.vue","mtime":1732871026596},{"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\r\nimport { updateConfig, queryDriverConfig } from '@/api/acs/device/driverConfig'\r\nimport crud from '@/mixins/crud'\r\nimport deviceCrud from '@/api/acs/device/device'\r\n\r\nexport default {\r\n name: 'StandardOrdinarySite',\r\n mixins: [crud],\r\n props: {\r\n // eslint-disable-next-line vue/require-default-prop\r\n parentForm: {\r\n type: Object,\r\n required: true\r\n }\r\n },\r\n data() {\r\n return {\r\n device_code: '',\r\n device_id: '',\r\n configLoading: false,\r\n deviceList: [],\r\n address: '',\r\n form: {\r\n inspect_in_stocck: true,\r\n ignore_pickup_check: true,\r\n ignore_release_check: true,\r\n apply_task: true,\r\n link_three_lamp: '',\r\n manual_create_task: true,\r\n auto_create_task: true,\r\n is_pickup: true,\r\n is_release: true,\r\n station_manager: true,\r\n auto_clean_task: true,\r\n input_material: true,\r\n reqWms: true\r\n },\r\n rules: {}\r\n }\r\n },\r\n created() {\r\n this.$nextTick(() => {\r\n // 从父表单获取设备编码\r\n this.device_code = this.$props.parentForm.device_code\r\n this.device_id = this.$props.parentForm.device_id\r\n queryDriverConfig(this.device_id, this.$props.parentForm.driver_code).then(data => {\r\n // 给表单赋值,并且属性不能为空\r\n if (data.form) {\r\n const arr = Object.keys(data.form)\r\n // 不为空\r\n if (arr.length > 0) {\r\n this.form = data.form\r\n }\r\n }\r\n })\r\n deviceCrud.selectDeviceList().then(data => {\r\n this.deviceList = data\r\n })\r\n })\r\n },\r\n methods: {\r\n doSubmit() {\r\n this.$refs['form'].validate((valid) => {\r\n if (valid) {\r\n this.configLoading = true\r\n // 根据驱动类型判断是否为路由设备\r\n const parentForm = this.parentForm\r\n parentForm.is_route = false\r\n updateConfig(parentForm, this.form).then(res => {\r\n this.notify('保存成功', 'success')\r\n this.configLoading = false\r\n }).catch(err => {\r\n this.configLoading = false\r\n console.log(err.response.data.message)\r\n })\r\n }\r\n })\r\n }\r\n }\r\n}\r\n",null]}