{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\videoImport.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\videoImport.vue","mtime":1692168359204},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 utils from '@/utils.js'\r\nimport req from '@/request.js'\r\nimport {mapState} from 'vuex'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nconst portal = window.context.portal\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport equipmentManage from '@/api/device/equipmentManage.js'\r\nimport videoImport from '@/api/device/videoImport.js'\r\nimport ChooseMapPointVue from './components/ChooseMapPoint.vue'\r\nexport default {\r\n name: 'ReportManagement',\r\n components: {\r\n ChooseMapPointVue,\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n loading: false,\r\n uploading: false,\r\n dialogVisible: false,\r\n activeName: '',\r\n options: [\r\n {\r\n label: '以选择的区域为发布标准',\r\n value: 1,\r\n },\r\n {\r\n label: '以导入的区域为发布标准',\r\n value: 2,\r\n },\r\n ],\r\n radio: 2,\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'i.platform_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'i.name_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'i.status_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'i.area_code_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'i.src_area_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'i.code_',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n ],\r\n\r\n dialogLoading: false,\r\n tableData: [],\r\n params: {},\r\n fbztList: [],\r\n sxtlxList: [],\r\n uploadData: {\r\n platform: '',\r\n },\r\n actionUrl: '',\r\n regionList: [],\r\n regionValue: [],\r\n selectList: [],\r\n treeData: [],\r\n region: [],\r\n }\r\n },\r\n created() {\r\n this.actionUrl = window.context.portal\r\n this.conditions = dictUtils.getDictItemsFromCache('spdwsspt')\r\n this.fbztList = dictUtils.getDictItemsFromCache('fbzt')\r\n this.sxtlxList = dictUtils.getDictItemsFromCache('sxtlx')\r\n this.queryParam.pageBean.pageSize = 50\r\n this.activeName = this.conditions[0].value\r\n this.querys[0].value = this.activeName\r\n this.uploadData.platform = this.conditions[0].value\r\n this.getTreeAll()\r\n this.getAreaTree()\r\n },\r\n //获取token\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 methods: {\r\n getPosition(data) {\r\n this.updateVideoPoint(data)\r\n },\r\n updateVideoPoint(data) {\r\n let videoData = this.qs.stringify({\r\n id: data.id,\r\n lgtd: data.lgtd + '',\r\n lttd: data.lttd + '',\r\n areaCode: data.areaCode,\r\n })\r\n videoImport.updatePosition(videoData).then((res) => {\r\n if (res) {\r\n this.$message.success('设置点位成功')\r\n this.loadData()\r\n }\r\n })\r\n },\r\n setPosition(row) {\r\n this.$refs.mapDialog.handleOpen(row)\r\n },\r\n getAreaTree() {\r\n equipmentManage.loadAreaTree(\r\n {\r\n id: '0',\r\n },\r\n (res) => {\r\n this.treeData = res.value // this.formatData(res.rows)\r\n this.$set(this.treeData)\r\n }\r\n )\r\n },\r\n handleAvatarProgress() {\r\n this.uploading = true\r\n },\r\n //上传成功\r\n handleAvatarSuccess(res, file) {\r\n //提示\r\n this.$message.success('导入成功')\r\n this.uploading = false\r\n this.loadData() //调用用页面查询接口,刷新数据\r\n },\r\n //上传失败\r\n handleAvatarError(err, file, fileList) {\r\n //提示\r\n this.uploading = false\r\n this.$message.error(err.message)\r\n },\r\n getRowKey(row) {\r\n return row.id\r\n },\r\n loadData(page) {\r\n if (page) {\r\n this.queryParam.pageBean.page = page\r\n }\r\n this.loading = true\r\n this.tableData = []\r\n this.queryParam.querys = []\r\n if (this.region.length > 0) {\r\n let value = JSON.parse(JSON.stringify(this.region))\r\n this.querys[3].value = value.pop()\r\n } else {\r\n this.querys[3].value = ''\r\n }\r\n if (this.querys[0].value) {\r\n this.queryParam.querys.push(this.querys[0])\r\n }\r\n if (this.querys[1].value) {\r\n this.queryParam.querys.push(this.querys[1])\r\n }\r\n if (this.querys[2].value) {\r\n this.queryParam.querys.push(this.querys[2])\r\n }\r\n if (this.querys[3].value) {\r\n this.queryParam.querys.push(this.querys[3])\r\n }\r\n if (this.querys[4].value) {\r\n this.queryParam.querys.push(this.querys[4])\r\n }\r\n if (this.querys[5].value) {\r\n this.queryParam.querys.push(this.querys[5])\r\n }\r\n videoImport.getList(this.queryParam, (res) => {\r\n if (res) {\r\n this.tableData = res.rows\r\n this.tableData.forEach((item) => {\r\n this.fbztList.forEach((val) => {\r\n if (item.status == val.value) {\r\n item['statusName'] = val.name\r\n }\r\n })\r\n this.sxtlxList.forEach((val) => {\r\n if (item.type == val.value) {\r\n item['typeName'] = val.name\r\n }\r\n })\r\n })\r\n\r\n this.total = res.total\r\n this.loading = false\r\n }\r\n })\r\n },\r\n //搜索\r\n handleSearch() {},\r\n //tab切换\r\n handleTabsClick(tab) {\r\n this.querys[0].value = this.activeName\r\n this.uploadData.platform = this.activeName\r\n this.loadData(1)\r\n },\r\n selectable(row, index) {\r\n if (row.status != 1) {\r\n return true\r\n }\r\n },\r\n //下架\r\n handleUnPublish(val) {\r\n const formData = new FormData()\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n },\r\n }\r\n formData.append('ids', val.id)\r\n this.$http\r\n .post(\r\n window.context.portal +\r\n `/biz/catalog/videoImport/v1/unPublishPoint`,\r\n formData,\r\n config\r\n )\r\n .then((res) => {\r\n if (res.data.state) {\r\n this.$message.success(`下架成功`)\r\n this.loadData(1)\r\n }\r\n })\r\n },\r\n //打开弹框\r\n openPublish(val, data) {\r\n this.selectList = []\r\n if (val == 'single') {\r\n this.selectList.push(data.id)\r\n } else {\r\n this.selectList = this.multipleSelection\r\n }\r\n this.dialogVisible = true\r\n },\r\n handleClose() {\r\n this.dialogVisible = false\r\n this.selectList = []\r\n this.regionValue = []\r\n },\r\n //确认发布\r\n handlePublish() {\r\n if (this.regionValue.length == 0) {\r\n this.$message.warning('请选择区域')\r\n return\r\n }\r\n this.dialogLoading = true\r\n let zoneCode = JSON.parse(JSON.stringify(this.regionValue))\r\n const config = {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n },\r\n }\r\n const formData = new FormData()\r\n formData.append(\r\n 'ids',\r\n this.selectList ? this.selectList.join(',') : ''\r\n )\r\n formData.append('zoneCode', zoneCode ? zoneCode.pop() : '')\r\n formData.append('type', this.radio ? this.radio : '')\r\n this.$http\r\n .post(\r\n window.context.portal +\r\n `/biz/catalog/videoImport/v1/publishPoint`,\r\n formData,\r\n config\r\n )\r\n .then((res) => {\r\n if (res.data.state) {\r\n this.$message.success(`发布成功`)\r\n this.handleClose()\r\n this.loadData(1)\r\n }\r\n this.dialogLoading = false\r\n })\r\n },\r\n getTreeAll() {\r\n videoImport.getTree({}, (res) => {\r\n if (res.state) {\r\n this.regionList = res.value\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}