{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\components\\CmgtDutyVehicleGpsinfoFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\duty\\components\\CmgtDutyVehicleGpsinfoFormDialog.vue","mtime":1667545182770},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\n\r\nimport CmgtDutyVehicleGpsinfoApi from '@/views/Manage/duty/api/CmgtDutyVehicleGpsinfoApi'\r\nimport dictContracts from '@/components/dict/DictSelectUtils.js'\r\nimport CommonApi from '@/views/Manage/CommonApi.js'\r\nimport { mapState } from 'vuex'\r\n\r\n\r\nexport default {\r\n name: 'CmgtDutyVehicleGpsinfoFormDialog',\r\n props: {},\r\n components: {\r\n },\r\n data() {\r\n return {\r\n title: '新增',\r\n CommonApi,\r\n showFormDia: false,\r\n loading: false,\r\n activeCollapseNames: ['1'],\r\n activeTabChildName: '0',\r\n\r\n vehicleIdSelectOptions: [],\r\n params: {\r\n vehicleId: null,\r\n receiveTime: null,\r\n accStatus: null,\r\n valid: null,\r\n latitude: null,\r\n longitude: null,\r\n altitude: null,\r\n satellites: null,\r\n gpsspeed: null,\r\n direction: null,\r\n pdop: null,\r\n memo: null,\r\n },\r\n rules: {\r\n vehicleId: [\r\n { required: true,\r\n message: '所属车辆不能为空',\r\n trigger: 'blur'\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n computed: mapState({\r\n header: state => {\r\n return {\r\n Authorization: `Bearer ${state.login.currentUser.token}`\r\n }\r\n }\r\n }),\r\n created() {\r\n CommonApi.loadSelectOptions({ name: 'cmgtDutySelectOptions.getCmgtDutyVehicles'}, res => {\r\n this.vehicleIdSelectOptions = res\r\n })\r\n },\r\n methods: {\r\n add() {\r\n this.title = '新增'\r\n this.resetForm()\r\n this.showFormDia = true\r\n },\r\n resetForm() { \r\n this.params = {\r\n vehicleId: null,\r\n receiveTime: null,\r\n accStatus: null,\r\n valid: null,\r\n latitude: null,\r\n longitude: null,\r\n altitude: null,\r\n satellites: null,\r\n gpsspeed: null,\r\n direction: null,\r\n pdop: null,\r\n memo: null,\r\n } \r\n },\r\n handleClose() {\r\n this.resetForm()\r\n this.showFormDia = false\r\n },\r\n handleSave() {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n let method\r\n if (!this.params.id) {\r\n // 新增\r\n method = CmgtDutyVehicleGpsinfoApi.addCmgtDutyVehicleGpsinfo\r\n }else{\r\n // 修改\r\n method = CmgtDutyVehicleGpsinfoApi.editCmgtDutyVehicleGpsinfo\r\n }\r\n this.loading = true\r\n method(this.params, res => {\r\n this.loading = false\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: this.title + '成功',\r\n duration: 2000\r\n })\r\n //this.$emit('loadData')\r\n this.$parent.loadData()\r\n this.handleClose()\r\n } else {\r\n this.$message.warning(res.message)\r\n }\r\n })\r\n }\r\n })\r\n },\r\n Update(row) {\r\n this.title = '修改'\r\n this.showFormDia = true\r\n this.params = row\r\n }\r\n }\r\n}\r\n",null]}