{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\waterPlan.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\waterPlan.vue","mtime":1684458239215},{"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\nimport waterPaper from '@/api/waterPaper.js'\nimport req from '@/request.js'\nimport {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport FormDialog from './plForm-dialog.vue'\nexport default {\n\tname: 'waterPlan',\n\tmixins: [TableMixin],\n\tcomponents: {\n\t\tFormDialog\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tqueryParam: {\n\t\t\t\tpageBean: {\n\t\t\t\t\tpageSize: 20,\n\t\t\t\t\tpage: 1,\n\t\t\t\t},\n\t\t\t\tparams: {\n\t\t\t\t\tpaperId: this.$route.query.plId,\n\t\t\t\t\twpcSn: null,\n\t\t\t\t\tyear: null\n\t\t\t\t},\n\t\t\t},\n\t\t\ttitle: '',\n\t\t\ttotal: 0,\n\t\t\tshowFormDia: false,\n\t\t\ttableData: [],\n\t\t\tmultipleSelection: [], //选中的表格数据\n\t\t\tplId: null, //取水证id\n\t\t\twaterCards: [], //取水证\n\t\t\tfileList: [],\n\t\t\tbaseUrl:null,\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.baseUrl=window.context.portal;\n\t\tthis.plId = this.$route.query.plId\n\t\tthis.queryParam.params.paperId = this.plId\n\t\tthis.getwaterCard()\n\t\tthis.getDateList()\n\t},\n\tmethods: {\n\t\tgoBack() {\n\t\t\tthis.$router.go(-1)\n\t\t},\n\t\tselectChange() {\n\t\t\tthis.$forceUpdate()\n\t\t},\n\t\t// 获取取水证\n\t\tgetwaterCard() {\n\t\t\twaterPaper.getwaterCard({}, (res) => {\n\t\t\t\tthis.waterCards = res.value\n\t\t\t\tthis.waterCards.forEach((ee) => {\n\t\t\t\t\tif (this.plId == ee.id) {\n\t\t\t\t\t\tthis.queryParam.params.paperId = ee.id\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t\t},\n\t\t//搜索\n\t\tonClickSearch() {\n\t\t\tthis.queryParam.pageBean.page = 1\n\t\t\tthis.getDateList()\n\t\t},\n\t\t//重置\n\t\tresetQuery() {\n\t\t\tthis.queryParam.params = {}\n\t\t\tthis.queryParam.params.paperId = this.plId\n\t\t\tthis.getDateList()\n\t\t},\n\t\t//获取数据\n\t\tgetDateList() {\n\t\t\tthis.loading = true\n\t\t\tthis.tableData = []\n\t\t\twaterPaper.ListGetPlan(this.queryParam, (res) => {\n\t\t\t\tif (res.state) {\n\t\t\t\t\tthis.total = res.value.total\n\t\t\t\t\tthis.tableData = res.value.rows\n\t\t\t\t\tthis.loading = false\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\t//新增\n\t\topenFormDiao() {\n\t\t\tthis.title = '新增'\n\t\t\tthis.showFormDia = true\n\t\t},\n\t\t//删除\n\t\tdeleteSelect() {\n\t\t\tthis.$confirm('确定删除选中数据?', '提示', {\n\t\t\t\t\tconfirmButtonText: '确 定',\n\t\t\t\t\tcancelButtonText: '取 消',\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\twaterPaper.removePlan(this.multipleSelection, (res) => {\n\t\t\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\t\tmessage: '删除成功',\n\t\t\t\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\t\t\t\t// offset: 80\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t// this.multipleSelection = [];\n\t\t\t\t\t\t\t\tthis.$refs.multipleSelection.clearSelection()\n\t\t\t\t\t\t\t\tthis.queryParam.pageBean.page = 1\n\t\t\t\t\t\t\t\tthis.getDateList()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch((res) => {\n\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\tmessage: res.message,\n\t\t\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\t\t\toffset: 80,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tthis.getDateList()\n\t\t\t\t\t\t})\n\t\t\t\t})\n\t\t},\n\t\thandleChange(file, fileList) {\n\t\t if (fileList.length > 1) {\n\t\t fileList.splice(0, 1)\n\t\t }\n\t\t if (file.raw.name.split('.')[1] != 'xlsx') {\n\t\t this.$apiMessage.warning('请上传xlsx格式文件!')\n\t\t fileList.splice(0)\n\t\t } else {\n\t\t this.upLoadFile(file.raw)\n\t\t }\n\t\t},\n\t\t//自定义上传方法(覆盖默认上传行为)\n\t\tupLoadFile(file) {\n\t\t let formData = new FormData()\n\t\t formData.append('file', file)\n\t\t formData.append('paperId', this.queryParam.params.paperId)\n\t\t waterPaper.upload(formData,(res)=>{\n\t\t\t if (res.state) {\n\t\t\t \tthis.$notify({\n\t\t\t \t\ttype: 'success',\n\t\t\t \t\tmessage: '导入成功',\n\t\t\t \t\tduration: 2000,\n\t\t\t \t})\n\t\t\t \tthis.queryParam.pageBean.page = 1\n\t\t\t \tthis.getDateList()\n\t\t\t }else{\n\t\t\t\t this.$notify({\n\t\t\t\t \ttype: 'error',\n\t\t\t\t \tmessage: res.message,\n\t\t\t\t \tduration: 2000,\n\t\t\t\t \toffset: 80,\n\t\t\t\t })\n\t\t\t\t this.getDateList()\n\t\t\t }\n\t\t })\n\t\t},\n\t\t// 指定一个key标识这一行的数据\n\t\tgetRowKey(row) {\n\t\t\treturn row.id\n\t\t},\n\t\thandleSelectionChange(val) {\n\t\t\tthis.multipleSelection = val.map((item) => {\n\t\t\t\treturn item.id\n\t\t\t})\n\t\t},\n\t\thandleSizeChange(val) {\n\t\t\tthis.queryParam.pageBean.pageSize = val\n\t\t\tthis.getDateList()\n\t\t},\n\t\thandleCurrentChange(val) {\n\t\t\tthis.queryParam.pageBean.page = val\n\t\t\tthis.getDateList()\n\t\t},\n\t\tcloseFormDiao() {\n\t\t\tthis.showFormDia = false\n\t\t\tthis.getDateList()\n\t\t},\n\t\thandleUpdate(row) {\n\t\t\tthis.title = '修改';\n\t\t\tthis.plId = row.id;\n\t\t\tthis.showFormDia = true;\n\t\t},\n\t}\n}\n",null]}