{"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\\wsForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\wsForm-dialog.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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 {\n\tmapState\n} from 'vuex'\nimport waterPaper from '@/api/waterPaper.js'\nimport latitude from '@/mixins/latitude'\nimport req from '@/request.js'\nexport default {\n\tname: 'wsFormDialog',\n\tprops: {\n\t\tshowFormDia: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tplId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tparams: {\n\t\t\t\twpcSn: null,\n\t\t\t\tpaperId: null,\n\t\t\t\tstcd: null,\n\t\t\t\tstnm: null,\n\t\t\t\tsttp: null,\n\t\t\t\taddvcd: null,\n\t\t\t\tstlc: null,\n\t\t\t\tlgtd: null,\n\t\t\t\tlttd: null,\n\t\t\t\tintp: null,\n\t\t\t\tincd: null,\n\t\t\t\tmemo: null, //备注\n\t\t\t},\n\t\t\tbasAdNames: [], //行政区划\n\t\t\twaterCards: [], //取水证\n\t\t\tinstallationTypes: [], //安装类型 \n\t\t\tstationTypeS: [], //测站类型\n\t\t\trules: {\n\t\t\t\tpaperId: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择纸质证编号',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}],\n\t\t\t\tstcd: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入测站编号',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}],\n\t\t\t\tstnm: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入测站名称',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t},\n\tcreated() {\n\t\twaterPaper.getbasAdName({}, (res) => {\n\t\t\tthis.basAdNames = res.value\n\t\t\t// this.params.addvcd = []\n\t\t\t// if (this.basAdNames[0]) {\n\t\t\t// \tthis.params.addvcd.push(this.basAdNames[0].code)\n\t\t\t// \tif (this.basAdNames[0].children[0]) {\n\t\t\t// \t\tthis.params.addvcd.push(this.basAdNames[0].children[0].code)\n\t\t\t// \t\tif (this.basAdNames[0].children[0].children[0]) {\n\t\t\t// \t\t\tthis.params.addvcd.push(this.basAdNames[0].children[0].children[0].code)\n\t\t\t// \t\t\tif (this.basAdNames[0].children[0].children[0].children[0]) {\n\t\t\t// \t\t\t\tthis.params.addvcd.push(this.basAdNames[0].children[0].children[0].children[0]\n\t\t\t// \t\t\t\t\t.code)\n\t\t\t// \t\t\t}\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// }\n\t\t})\n\t\twaterPaper.positionTree({}, (res) => {\n\t\t\tthis.installationTypes = res.value\n\t\t\tthis.params.incd = []\n\t\t\tif (this.installationTypes[0]) {\n\t\t\t\tthis.params.incd.push(this.installationTypes[0].reCode)\n\t\t\t\tif (this.installationTypes[0].children[0]) {\n\t\t\t\t\tthis.params.incd.push(this.installationTypes[0].children[0].reCode)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\tthis.getwaterCard()\n\t\tthis.getDetailInfo()\n\t\tthis.getSysDict()\n\n\t},\n\tmethods: {\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.params.paperId = ee.id\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t\t},\n\t\tselectChange() {\n\t\t\tthis.$forceUpdate()\n\t\t},\n\t\tdeadLevs(val) {\n\t\t\tswitch (val) {\n\t\t\t\tcase '1':\n\t\t\t\t\tthis.params.lttd = latitude.TreeFour(this.params.lttd)\n\t\t\t\t\tbreak\n\t\t\t\tcase '2':\n\t\t\t\t\tthis.params.lttd = latitude.TreeFour(this.params.lttd)\n\t\t\t\t\tbreak\n\n\t\t\t}\n\t\t},\n\t\tonhouChange(val) {\n\t\t\tif (val) {\n\t\t\t\tthis.params.addvcd = val[val.length - 1]\n\t\t\t\tlet arr = this.basAdNames.filter((ite) => ite.code === val[0])\n\t\t\t\tthis.calleArr(arr, val[val.length - 1])\n\t\t\t}\n\t\t},\n\t\tcalleArr(array, val) {\n\t\t\tfor (let i in array) {\n\t\t\t\tlet item = array[i]\n\t\t\t\tif (item.children) {\n\t\t\t\t\tthis.calleArr(item.children, val) //自己调用自己\n\t\t\t\t} else {\n\t\t\t\t\tif (item.code === val) {\n\t\t\t\t\t\t// this.params.areaName = item.fullName\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t//取消\n\t\thandleClose() {\n\t\t\tthis.params = {}\n\t\t\tthis.$emit('closeFormDiao')\n\t\t},\n\n\t\t// 根据ID查询\n\t\tgetDetailInfo() {\n\t\t\tif (this.title === '修改') {\n\t\t\t\twaterPaper.detailIdStation(this.id, (res) => {\n\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\tthis.params.wpcSn = this.plId\n\t\t\t\t\t\tthis.params.id=res.value.id\n\t\t\t\t\t\tthis.params.addvcd = res.value.addvcd\n\t\t\t\t\t\tthis.params.incd = res.value.incd\n\t\t\t\t\t\tthis.params.intp = res.value.intp\n\t\t\t\t\t\tthis.params.lgtd = res.value.lgtd\n\t\t\t\t\t\tthis.params.lttd = res.value.lttd\n\t\t\t\t\t\tthis.params.memo = res.value.memo\n\t\t\t\t\t\tthis.params.paperId = res.value.paperId\n\t\t\t\t\t\tthis.params.stcd = res.value.stcd\n\t\t\t\t\t\tthis.params.stcd = res.value.stcd\n\t\t\t\t\t\tthis.params.stlc = res.value.stlc\n\t\t\t\t\t\tthis.params.stnm = res.value.stnm\n\t\t\t\t\t\t// this.params.sttp = res.value.sttp\n\t\t\t\t\t\tthis.params.usfl = res.value.usfl\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t}\n\t\t},\n\n\t\tgoInfo(e) {\n\t\t\tthis.params.wpcSn=this.params.paperId\n\t\t\tthis.params.intp = this.params.incd[0]\n\t\t\tthis.params.incd = this.params.incd[1]\n\t\t\tthis.$refs.formInfo.validate((valid) => {\n\t\t\t\tif (valid) {\n\t\t\t\t\tif (this.title === '新增') {\n\t\t\t\t\t\tlet arr = JSON.parse(JSON.stringify(this.params))\n\t\t\t\t\t\twaterPaper.addSaveStation(this.params, (response) => {\n\t\t\t\t\t\t\tif (response.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})\n\t\t\t\t\t\t\t\tthis.$emit('closeFormDiao')\n\t\t\t\t\t\t\t\tthis.$emit('refList')\n\t\t\t\t\t\t\t} else {}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tif (this.title === '修改') {\n\t\t\t\t\t\twaterPaper.upDataStation(this.params, (response) => {\n\t\t\t\t\t\t\tif (response.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})\n\t\t\t\t\t\t\t\tthis.$emit('closeFormDiao')\n\t\t\t\t\t\t\t\tthis.$emit('refList')\n\t\t\t\t\t\t\t} else {}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tgetRowKey(row) {\n\t\t\treturn row.id\n\t\t},\n\t\t//获取字典数据\n\t\tgetSysDict() {\n\t\t\tlet portal = window.context.portal\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\treq.post(portal + '/sys/sysDictionary/v1/queryAllDictItems').then(\n\t\t\t\t\t(response) => {\n\t\t\t\t\t\tresolve(response.data)\n\t\t\t\t\t\tthis.stationTypeS = response.data.sblx\n\t\t\t\t\t\tthis.params.sttp = this.stationTypeS[8].value\n\t\t\t\t\t},\n\t\t\t\t\t(error) => {\n\t\t\t\t\t\treject(error)\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t})\n\t\t},\n\t},\n}\n",null]}