{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\components\\rltForm-dailog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\components\\rltForm-dailog.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\r\nimport req from '@/request.js'\r\nimport latitude from '@/mixins/latitude'\r\nimport capacity from '@/api/reservoirManagement/resFrom.js'\r\nimport uc from '@/api/uc.js'\r\nimport {\r\n TableMixin\r\n} from '@/mixins/tableMixin'\r\nimport {\r\n mapState\r\n} from 'vuex'\r\nexport default {\r\n props: {\r\n rscd: {\r\n type: String,\r\n default: '',\r\n },\r\n stateTitlt: {\r\n type: String,\r\n default: '',\r\n }\r\n },\r\n mixins: [TableMixin],\r\n data () {\r\n return {\r\n tableData: [],\r\n title: '新增',\r\n title1: \"选择\",\r\n showFormDia: false,\r\n showTableDia: false,\r\n multipleSelection: [],\r\n multipleSelections: [],\r\n params: {\r\n rscdId: null,\r\n account: null,\r\n password: null,\r\n mobilePhone: null,\r\n fullName: null,\r\n },\r\n accountOptions: [],\r\n loading: false,\r\n rules: {\r\n account: [{\r\n required: true,\r\n message: '请输入账号',\r\n trigger: ['change', 'blur'],\r\n },],\r\n mobilePhone: [{\r\n required: true,\r\n message: '请输入联系电话',\r\n trigger: 'blur',\r\n },],\r\n }\r\n }\r\n },\r\n created () {\r\n this.params.rscdId = this.rscd\r\n this.getResInsList()\r\n // 获取用户数据\r\n uc.getAllUser().then(res => {\r\n this.accountOptions = res\r\n console.log(res);\r\n })\r\n },\r\n methods: {\r\n // 账号添加\r\n handleAdd () {\r\n this.showTableDia = true;\r\n },\r\n // addAccount (command) {\r\n // this.params.account = command.account;\r\n // this.params.fullname = command.fullname;\r\n // this.params.mobilePhone = command.mobile;\r\n // console.log(command);\r\n // },\r\n //指定一个key标识这一行的数据\r\n getRowKey (row) {\r\n return row.id\r\n },\r\n handleSelectionChange (val) {\r\n this.multipleSelection = val.map((item) => {\r\n return item.id\r\n })\r\n },\r\n addAcount () {\r\n this.showFormDia = true\r\n this.title = '新增'\r\n },\r\n handleClose () {\r\n this.showFormDia = false\r\n },\r\n handleTableClose () {\r\n this.showTableDia = false\r\n },\r\n // 点击获取一行数据\r\n handleEdit (row) {\r\n console.log(row);\r\n this.params.account = row.account;\r\n this.params.fullName = row.fullname;\r\n this.params.mobilePhone = row.mobile;\r\n this.handleTableClose();\r\n },\r\n deletAcount () {\r\n capacity.deleteResIns(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.getResInsList()\r\n }\r\n })\r\n },\r\n bccelldblclick (row, column, cell, event) {\r\n console.log(row, column, cell);\r\n this.showFormDia = true\r\n this.title = '修改'\r\n this.params.id = row.id\r\n this.params.account = row.account\r\n this.params.fullName = row.fullName\r\n this.params.password = row.password\r\n this.params.mobilePhone = row.mobilePhone\r\n },\r\n goInfo () {\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n if (this.title == '新增') {\r\n capacity.addResIns(this.params, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '新增成功',\r\n duration: 2000,\r\n })\r\n this.getResInsList()\r\n this.showFormDia = false\r\n }\r\n })\r\n } else if (this.title == '修改') {\r\n capacity.updateResIns(this.params, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '修改成功',\r\n duration: 2000,\r\n })\r\n this.getResInsList()\r\n this.showFormDia = false\r\n this.params = {\r\n rscdId: null,\r\n account: null,\r\n password: null,\r\n mobilePhone: null,\r\n fullName: null,\r\n }\r\n }\r\n })\r\n }\r\n\r\n }\r\n })\r\n\r\n },\r\n getResInsList () {\r\n this.loading = true\r\n if (this.stateTitlt == '修改') {\r\n console.log(this.rscd);\r\n capacity.resInsList(this.rscd, res => {\r\n if (res.state) {\r\n this.tableData = res.value\r\n this.loading = false\r\n }\r\n })\r\n }\r\n }\r\n }\r\n}\r\n",null]}