{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\reservoirManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\reservoirManager.vue","mtime":1684458239559},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-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\r\nimport FormDialog from './components/resForm-dialog.vue'\r\nimport reservoirManager from '@/api/reservoirManagement/reservoirManager.js'\r\nimport resRelation from './components/resRelation.vue'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport StresRelation from './components/StresRelation.vue'\r\nimport LiftRelation from './components/LiftRelation.vue'\r\n\r\nimport req from '@/request.js'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nexport default {\r\n name: 'reservoirManager',\r\n components: {\r\n FormDialog,\r\n resRelation,\r\n StresRelation,\r\n LiftRelation\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n relation: '', //关联参数\r\n reSets: [\r\n {\r\n name: '关联测站',\r\n value: 'relationStation',\r\n id: '1'\r\n },\r\n {\r\n name: '关联监控点',\r\n value: 'relationUpdate',\r\n id: '2'\r\n }\r\n ],\r\n waterSources: [\r\n {\r\n name: '非水源',\r\n value: '0'\r\n },\r\n {\r\n name: '饮用水源',\r\n value: '1'\r\n },\r\n {\r\n name: '备用水源',\r\n value: '2'\r\n }\r\n ], //水源地\r\n prsts: [\r\n {\r\n name: '在建',\r\n value: '1'\r\n },\r\n {\r\n name: '已建',\r\n value: '2'\r\n },\r\n {\r\n name: '其他',\r\n value: '9'\r\n }\r\n ], //工程状态\r\n rowId: '',\r\n showMore: false,\r\n prscs: [],\r\n rsrs: [{}], //水库功能\r\n resTypes: [], //水库类型\r\n damGrads: [], //大坝级别\r\n damTypeMats: [], //大坝材料类型\r\n loading: false,\r\n multipleSelection: [], // 复选框\r\n queryParam: {\r\n pageBean: {\r\n pageSize: 20,\r\n page: 1\r\n },\r\n params: {\r\n rsnm: null, //水库名称\r\n resType: null, //水库类型\r\n addvcd: null //行政区\r\n }\r\n },\r\n damGrad: null, // 大坝级别\r\n damTypeMat: null, //大坝材料类型\r\n total: 0,\r\n title: '',\r\n showFormDia: false,\r\n showFormDias: false,\r\n StshowFormDias: false,\r\n tableData: [],\r\n pId: '',\r\n rscd: '',\r\n errMessage: '',\r\n errorFileUrl: '',\r\n basAdNames: [], //行政区\r\n lookDetailDia: false, // 详情弹层\r\n codes: {\r\n codes: 'gkglbm'\r\n },\r\n crOverTypes: [], //跨界类型\r\n basGrads: [], //流域级别\r\n Station: '',\r\n reset: '',\r\n row: {},\r\n arr: [],\r\n LiftShow: false\r\n }\r\n },\r\n created() {\r\n this.gcgm = dictUtils.getDictItemsFromCache('gcgm')\r\n this.getDateList()\r\n this.getSysDict()\r\n // 行政区查询\r\n reservoirManager.getbasAdName({}, res => {\r\n this.basAdNames = res.value\r\n })\r\n },\r\n methods: {\r\n relationUpdate(row) {\r\n //打开监控关联\r\n this.row = row\r\n this.relation = this.row.hystCode\r\n this.rowId = this.row.id\r\n this.showFormDias = true\r\n },\r\n relationLift(row) {\r\n console.log(row);\r\n this.row = row\r\n // this.relation = this.row.hystCode\r\n this.rowId = this.row.id\r\n this.rscd = this.row.rscd\r\n this.LiftShow = true\r\n console.log(this.LiftShow);\r\n },\r\n relationStation(row) {\r\n //打开测站关联\r\n this.row = row\r\n this.relation = this.row.hystCode\r\n this.rowId = this.row.id\r\n this.rscd = this.row.rscd\r\n this.StshowFormDias = true\r\n },\r\n closeFormDiaos() {\r\n //关闭监控关联\r\n this.showFormDias = false\r\n this.getDateList()\r\n },\r\n LiftRelations() {\r\n //关闭监控关联\r\n this.LiftShow = false\r\n this.getDateList()\r\n },\r\n closeStshowForm() {\r\n //关闭测站关联\r\n this.StshowFormDias = false\r\n this.getDateList()\r\n },\r\n openMore() {\r\n this.showMore = !this.showMore\r\n },\r\n //获取字典数据\r\n getSysDict() {\r\n let portal = window.context.portal\r\n return new Promise((resolve, reject) => {\r\n req.post(portal + '/sys/sysDictionary/v1/queryAllDictItems').then(\r\n response => {\r\n resolve(response.data)\r\n this.resTypes = response.data.sklx\r\n this.prscs = response.data.gcgm //工程规模\r\n this.rsrs = response.data.skgn //水库功能\r\n this.damGrads = response.data.dbjb //大坝级别\r\n this.damTypeMats = response.data.dbcl //大坝材料类型\r\n this.getDateList()\r\n },\r\n error => {\r\n reject(error)\r\n }\r\n )\r\n })\r\n },\r\n changeResType(val) {\r\n if (val) {\r\n this.queryParam.params.resType = val\r\n } else {\r\n this.queryParam.params.resType = null\r\n }\r\n },\r\n onhouChange(val) {\r\n if (val) {\r\n this.queryParam.params.addvcd = val.pop()\r\n } else {\r\n this.queryParam.params.addvcd = null\r\n }\r\n },\r\n RemoveValByIndex(arr, index) {\r\n arr.splice(index, 1)\r\n },\r\n getDateList() {\r\n this.loading = true\r\n this.tableData = []\r\n reservoirManager.ListGet(this.queryParam, res => {\r\n this.tableData = res.value.rows\r\n this.total = res.value.total\r\n this.loading = false\r\n this.resTypes.forEach(e => {\r\n this.tableData.forEach(i => {\r\n if (i.resType === e.value) {\r\n i.resType = e.name\r\n }\r\n })\r\n })\r\n this.waterSources.forEach(e => {\r\n this.tableData.forEach(i => {\r\n if (i.waterSource === e.value) {\r\n i.waterSource = e.name\r\n }\r\n })\r\n })\r\n this.prscs.forEach(e => {\r\n this.tableData.forEach(i => {\r\n if (i.prsc === e.value) {\r\n i.prsc = e.name\r\n }\r\n })\r\n })\r\n this.prsts.forEach(e => {\r\n this.tableData.forEach(i => {\r\n if (i.prst === e.value) {\r\n i.prst = e.name\r\n }\r\n })\r\n })\r\n this.damGrads.forEach(e => {\r\n this.tableData.forEach(i => {\r\n if (i.damGrad === e.value) {\r\n i.damGrad = e.name\r\n }\r\n })\r\n })\r\n this.damTypeMats.forEach(e => {\r\n this.tableData.forEach(i => {\r\n if (i.damTypeMat === e.value) {\r\n i.damTypeMat = e.name\r\n }\r\n })\r\n })\r\n this.tableData.forEach((e) => {\r\n e.rsfn = this.handleName(e.rsfn)\r\n if (e.token != undefined) {\r\n e.token = 1\r\n } else {\r\n e['token'] = 0\r\n }\r\n })\r\n\r\n this.$set(this.tableData)\r\n })\r\n },\r\n handleName(row, column) {\r\n let name = \"\"\r\n let rsfn = row.split(',')\r\n this.rsrs.forEach((e) => {\r\n if (rsfn.includes(e.value)) {\r\n name += e.name + ','\r\n }\r\n })\r\n return name.substring(0, name.lastIndexOf(','))\r\n },\r\n openFormDiao() {\r\n this.title = '新增'\r\n this.showFormDia = true\r\n },\r\n closeFormDiao() {\r\n this.showFormDia = false\r\n this.getDateList()\r\n },\r\n handleSizeChange(val) {\r\n this.queryParam.pageBean.pageSize = val\r\n this.getDateList()\r\n },\r\n handleCurrentChange(val) {\r\n this.queryParam.pageBean.page = val\r\n this.getDateList()\r\n },\r\n // // 修改\r\n handleUpdate(row) {\r\n this.title = '修改'\r\n this.pId = row.id\r\n this.rscd = row.rscd\r\n this.showFormDia = true\r\n },\r\n handleSelectionChange(val) {\r\n this.multipleSelection = val.map(item => {\r\n return item.id\r\n })\r\n },\r\n // // 指定一个key标识这一行的数据\r\n getRowKey(row) {\r\n return row.id\r\n },\r\n // 注册水库\r\n registerRes() {\r\n this.$confirm('确定注册选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n reservoirManager\r\n .register(this.multipleSelection, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '注册成功',\r\n duration: 2000\r\n // offset: 80\r\n })\r\n // this.multipleSelection = [];\r\n this.$refs.multipleSelection.clearSelection()\r\n this.queryParam.pageBean.page = 1\r\n this.getDateList()\r\n }\r\n })\r\n .catch(res => {\r\n this.$notify({\r\n type: 'error',\r\n message: res.message,\r\n duration: 2000,\r\n offset: 80\r\n })\r\n this.getDateList()\r\n })\r\n })\r\n .catch(() => { })\r\n\r\n },\r\n // // 批量删除\r\n deleteSelect() {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n reservoirManager\r\n .remove(this.multipleSelection, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '删除成功',\r\n duration: 2000\r\n // offset: 80\r\n })\r\n // this.multipleSelection = [];\r\n this.$refs.multipleSelection.clearSelection()\r\n this.queryParam.pageBean.page = 1\r\n this.getDateList()\r\n }\r\n })\r\n .catch(res => {\r\n this.$notify({\r\n type: 'error',\r\n message: res.message,\r\n duration: 2000,\r\n offset: 80\r\n })\r\n this.getDateList()\r\n })\r\n })\r\n .catch(() => { })\r\n\r\n },\r\n /** 删除按钮操作 */\r\n handleDelete(row) {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n reservoirManager\r\n .remove(row.id, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '删除成功',\r\n duration: 2000\r\n // offset: 80\r\n })\r\n this.queryParam.pageBean.page = 1\r\n this.getDateList()\r\n }\r\n })\r\n .catch(res => {\r\n this.$notify({\r\n type: 'error',\r\n message: res.message,\r\n duration: 2000,\r\n offset: 80\r\n })\r\n this.getDateList()\r\n })\r\n })\r\n .catch(() => { })\r\n },\r\n // // 点击查询\r\n onClickSearch() {\r\n this.queryParam.pageBean.page = 1\r\n this.getDateList()\r\n },\r\n // 重置\r\n resetQuery() {\r\n this.queryParam.params = {}\r\n this.onClickSearch()\r\n }\r\n }\r\n}\r\n",null]}