{"remainingRequest":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\Normal\\DeviceManagement\\controDevice.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\Normal\\DeviceManagement\\controDevice.vue","mtime":1704418079228},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/sfz-lh-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport pagination from '@/components/pagination';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport tollStationManagement from '@/api/BasicDataManagement/tollStationManagement.js';\nimport device from '@/api/DeviceManagement/device.js';\nexport default {\n name: 'controDevice',\n mixins: [TableMixin, pagination],\n data: function data() {\n var _ref;\n\n return _ref = {\n disabledDetils: false,\n currentPage: 1,\n tableMaxHeight: 400,\n loading: false,\n tableLoading: false,\n tableData: [],\n multipleSelection: [],\n params: {\n pageBean: {\n page: 1,\n pageSize: 20,\n total: 0\n }\n },\n searchForm: {},\n // 顶部搜索对象\n tollStationData: [],\n tollStationId: '',\n value: '',\n allData: {\n pageBean: {\n page: 1,\n pageSize: -1,\n total: 0\n }\n },\n deviceData: [],\n dialog: {\n title: '添加',\n visible: false\n },\n deleteIds: ''\n }, _defineProperty(_ref, \"dialog\", {\n title: '添加',\n visible: false\n }), _defineProperty(_ref, \"dialogForm\", {}), _defineProperty(_ref, \"disabled\", false), _defineProperty(_ref, \"edit\", false), _defineProperty(_ref, \"rules\", {\n deviceName: {\n required: true,\n message: '请输入路线编号',\n trigger: 'blur'\n },\n showContext: {\n required: true,\n message: '请选择路线名称',\n trigger: 'blur'\n }\n }), _ref;\n },\n created: function created() {\n this.tollStationId = sessionStorage.getItem('tollStationId');\n this.searchForm.tollStationId = this.tollStationId;\n this.loadTollStation();\n this.getDeviceControl(1);\n this.loadDeviceData();\n },\n methods: {\n // 获取设备控制数据\n getDeviceControl: function getDeviceControl(page) {\n var _this = this;\n\n if (page) this.params.pageBean.page = page;\n this.tableLoading = true;\n device.queryDeviceControl(this.params).then(function (res) {\n _this.tableLoading = false;\n var data = res.data.value;\n _this.tableData = data.rows || [];\n\n if (data.page) {\n _this.params.pageBean = {\n page: data.page,\n pageSize: data.pageSize,\n total: data.total\n };\n }\n\n _this.params.querys = [];\n });\n },\n //获取设备数据\n loadDeviceData: function loadDeviceData() {\n var _this2 = this;\n\n this.deviceData = [];\n device.queryDeviceList(this.allData).then(function (res) {\n for (var i = 0; i < res.value.rows.length; i++) {\n var obj = [];\n\n if (res.value.rows[i].isController == 1) {\n obj = {\n code: res.value.rows[i].code,\n name: res.value.rows[i].name,\n tollStationName: res.value.rows[i].tollStationName,\n tollStationId: res.value.rows[i].tollStationId,\n isController: res.value.rows[i].isController,\n positionPathName: res.value.rows[i].positionPathName\n };\n\n _this2.deviceData.push(obj);\n }\n }\n });\n },\n // 获取收费站数据\n loadTollStation: function loadTollStation() {\n var _this3 = this;\n\n tollStationManagement.queryTollStation(this.allData).then(function (res) {\n var obj = [];\n\n for (var i = 0; i < res.data.rows.length; i++) {\n obj = {\n id: res.data.rows[i].id,\n name: res.data.rows[i].name,\n roadName: res.data.rows[i].roadSegmentName,\n roadId: res.data.rows[i].roadSegmentId\n };\n\n _this3.tollStationData.push(obj);\n }\n });\n },\n // 弹层关闭\n handleDialogClose: function handleDialogClose() {\n this.dialog.visible = false;\n },\n //添加\n handleAdd: function handleAdd() {\n this.edit = false;\n this.disabledDetils = false;\n this.dialogForm = {};\n this.dialog.title = '添加';\n this.dialog.visible = true;\n },\n // 编辑\n handleEdit: function handleEdit(rows) {\n this.$refs.form.clearValidate();\n this.edit = true;\n this.disabledDetils = false;\n this.dialogForm = rows || {};\n this.dialogForm = _objectSpread({}, rows);\n this.dialog.title = '编辑';\n this.dialog.visible = true;\n },\n // 顶部搜索\n handleSearch: function handleSearch() {\n var obj = this.searchForm;\n var querys = [];\n\n for (var i in obj) {\n if (obj[i]) {\n querys.push({\n group: 'main',\n operation: i == 'tollStationId' || i == 'deviceName' ? 'LIKE' : 'EQUAL',\n parentGroup: '',\n property: i,\n relation: 'AND',\n value: obj[i]\n });\n }\n }\n\n this.params.querys = querys;\n this.getDeviceControl(1);\n },\n // 表单提交保存\n submit: function submit() {\n var _this4 = this;\n\n for (var i = 0; i < this.deviceData.length; i++) {\n if (this.dialogForm.deviceName == this.deviceData[i].name) {\n this.dialogForm.deviceCode = this.deviceData[i].code;\n this.dialogForm.tollStationName = this.deviceData[i].tollStationName;\n this.dialogForm.isController = this.deviceData[i].isController;\n this.dialogForm.positionPathName = this.deviceData[i].positionPathName;\n this.dialogForm.tollStationId = this.deviceData[i].tollStationId;\n }\n }\n\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this4.loading = true;\n device.addDeviceControl(_this4.dialogForm).then(function (res) {\n if (res.data.state) {\n _this4.dialog.visible = false;\n\n _this4.getDeviceControl(1);\n }\n\n if (!res.errorMsg) {\n _this4.$message({\n message: !_this4.edit ? '添加成功' : '修改成功',\n type: 'success'\n });\n\n _this4.editVisible = false;\n }\n\n _this4.loading = false;\n }).catch(function () {\n _this4.loading = false;\n });\n } else {\n return false;\n }\n });\n },\n // 删除\n handleDelete: function handleDelete() {\n var _this5 = this;\n\n this.$confirm(this.$t('common.sureDelete'), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n device.batchControlDelete(_this5.deleteIds).then(function (res) {\n _this5.getDeviceControl(1);\n\n if (!res.errorMsg) {\n _this5.$message({\n message: '删除成功',\n type: 'success'\n });\n }\n });\n });\n }\n },\n mounted: function mounted() {\n var _this6 = this;\n\n this.calcTableHeight();\n this.$root.$on('resize', function () {\n _this6.calcTableHeight(500);\n });\n },\n computed: {\n SearchPanel: function SearchPanel() {\n return {\n '--searchPanel': this.searchPanel + 'px'\n };\n }\n }\n};",null]}