{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\dikeManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\dikeManager.vue","mtime":1684458239527},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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/dikeForm-dialog.vue'\r\nimport dikeManager from '@/api/reservoirManagement/dikeManager.js'\r\nimport StresRelation from './components/StresRelationdike.vue'\r\nimport req from '@/request.js'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nexport default {\r\n name: 'dikeManager',\r\n components: {\r\n FormDialog,\r\n StresRelation\r\n },\r\n mixins: [TableMixin],\r\n data () {\r\n return {\r\n reSets: [{ name: '关联测站', value: 'relationStation', id: '1' }],\r\n loading: false,\r\n relation: '',//关联参数\r\n StshowFormDias: false,\r\n rowId: '',\r\n multipleSelection: [], // 复选框\r\n queryParam: {\r\n pageBean: {\r\n pageSize: 20,\r\n page: 1,\r\n },\r\n params: {\r\n dikeName: null, //堤防名称\r\n dikeType: null, //堤防类型(参考字典)\r\n dikeGrad: null, //堤防级别(参考字典\r\n },\r\n },\r\n total: 0,\r\n title: '',\r\n showFormDia: false,\r\n tableData: [],\r\n pId: '',\r\n dikeTypes: [], //堤防类型\r\n dikeGrads: [], //堤防级别\r\n dikePatts: [], //堤防形式\r\n }\r\n },\r\n created () {\r\n this.getDateList()\r\n this.getSysDict()\r\n },\r\n methods: {\r\n\r\n relationStation (row) {//打开测站关联\r\n this.row = row;\r\n this.relation = this.row.dikeCode;\r\n this.rowId = this.row.id;\r\n this.StshowFormDias = true;\r\n },\r\n closeStshowForm () {//关闭测站关联\r\n this.StshowFormDias = false;\r\n this.getDateList()\r\n },\r\n // openMore() {\r\n // this.showMore = !this.showMore\r\n // },\r\n changedikeGrad (val) {\r\n if (val) {\r\n this.queryParam.params.dikeGrad = val\r\n } else {\r\n this.queryParam.params.dikeGrad = null\r\n }\r\n },\r\n changedikeType (val) {\r\n if (val) {\r\n this.queryParam.params.dikeType = val\r\n } else {\r\n this.queryParam.params.dikeType = null\r\n }\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\r\n resolve(response.data)\r\n this.dikePatts = response.data.dfxs; //堤防形式\r\n this.dikeTypes = response.data.dflx //堤防类型\r\n this.dikeGrads = response.data.dfjb //堤防级别\r\n\r\n this.getDateList()\r\n },\r\n (error) => {\r\n reject(error)\r\n }\r\n )\r\n })\r\n },\r\n getDateList () {\r\n this.loading = true\r\n this.tableData = []\r\n dikeManager.ListGet(this.queryParam, (res) => {\r\n this.tableData = res.value.rows\r\n this.total = res.value.total\r\n for (let i = 0; i < this.dikeTypes.length; i++) {\r\n for (let j = 0; j < this.tableData.length; j++) {\r\n if (this.dikeTypes[i].value === this.tableData[j].dikeType) {\r\n this.tableData[j].dikeTypeName = this.dikeTypes[i].name\r\n } else {\r\n // this.tableData[j].dikeTypeName='';\r\n }\r\n }\r\n }\r\n this.dikePatts.forEach((e) => {\r\n this.tableData.forEach((i) => {\r\n if (i.dikePatt === e.value) {\r\n i.dikePatt = e.name\r\n }\r\n })\r\n })\r\n this.dikeGrads.forEach((e) => {\r\n this.tableData.forEach((i) => {\r\n if (i.dikeGrad === e.value) {\r\n i.dikeGrad = e.name\r\n }\r\n })\r\n })\r\n this.$set(this.tableData, this.tableData)\r\n this.loading = false\r\n })\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.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 deleteSelect () {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning',\r\n })\r\n .then(() => {\r\n dikeManager\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 handleDelete (row) {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning',\r\n })\r\n .then(() => {\r\n dikeManager\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]}