{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/profile.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/profile.vue","mtime":1725957645729},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/babel.config.js","mtime":1725957645200},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":1655715099000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport form_selectApprover_flowpanel from \"@/components/form_selectApprover_flowpanel.vue\";\nimport API from \"@/api.js\";\nexport default {\n name: \"profile\",\n props: [\"appid\"],\n components: {\n form_selectApprover_flowpanel: form_selectApprover_flowpanel\n },\n computed: {\n baseInfoma: function baseInfoma() {\n return this.$store.state.myProfile;\n }\n },\n data: function data() {\n return {\n currentPage: 1,\n labelPosition: \"right\",\n startDay: \"\",\n endDay: \"\",\n description: \"\",\n flowName: \"\",\n selectFlowId: \"\",\n authorizedUser: \"\",\n authorizedUserId: \"\",\n flowData: [],\n checkedFlowId: [],\n information: \"\",\n tabPosition: \"left\",\n oldPassword: \"\",\n //\n newPassword: \"\",\n affirmPassword: \"\",\n userVisible: false,\n //用户选择框弹窗\n isProxys: true,\n owner: \"\",\n proxyMode: \"0\",\n row_count: 0,\n //代理设置分页总数\n flowId: \"\",\n addressBookVisible: false,\n //通讯录弹窗\n newGroupName: \"\",\n groupId: \"\",\n groupList: [],\n //通讯录分组列表\n selectGroup: [],\n //选中的通讯录数据\n groupValue: \"\",\n nohark: \"\",\n //通讯录查询关键字\n isOneGroup: false,\n currentGroupId: \"\",\n agency: \"\",\n radio: \"1\",\n pageSize: 10,\n pageNum: 1,\n centerDialogVisible: false,\n innerVisible: false,\n AgencyDialogVisible: false,\n value: \"\",\n tableData: [],\n tableDataNum: 0,\n multipleSelection: [],\n process: [],\n currentRow: [],\n selectedIDs: [],\n appId: \"\",\n //获取到的软件id\n saveApproverStatus: \"\",\n state: \"1\",\n currentRowId: \"\",\n currentGroupName: \"\",\n addUserTogroup: \"\",\n allSoftware: [],\n selectSoftwareId: \"\",\n currentAppid: \"\",\n searchFlowValue: \"\",\n isShowError: false //是否出现邮箱或者手机验证消息\n };\n },\n created: function created() {\n var _this = this;\n this.baseInfo();\n this.ContentBox();\n this.proxys();\n this.contactsGroup();\n //获取软件列表\n API.GetsoFtwareList({\n onSucess: function onSucess(response) {\n var newData = [];\n response.data.data.applications.forEach(function (app) {\n if (app.id != \"km\" && app.id != \"pm\" && app.id != \"qm\") {\n newData.push(app);\n }\n });\n _this.allSoftware = newData;\n _this.selectSoftwareId = _this.$root.appid;\n }\n });\n },\n methods: {\n handleIconSearch: function handleIconSearch(value) {\n var _this2 = this;\n var appId = this.$root.appid;\n this.$api.getSearchProxysFlows(appId, value, {\n onSucess: function onSucess(res) {\n var flowData = res.data.data;\n var arr = [];\n for (var key in flowData) {\n var obj = {};\n if (key) {\n obj.id = key;\n obj.name = flowData[key];\n arr.push(obj);\n }\n }\n _this2.flowData = arr;\n }\n });\n },\n onChange: function onChange(e) {\n this.currentAppid = e;\n this.proxys();\n },\n showInnerDialog: function showInnerDialog() {\n var _this3 = this;\n var appId = this.currentAppid ? this.currentAppid : this.$root.appid;\n this.$api.getProxysFlow(appId, {\n onSucess: function onSucess(res) {\n var flowData = res.data.data;\n var arr = [];\n for (var key in flowData) {\n var obj = {};\n if (key) {\n obj.id = key;\n obj.name = flowData[key];\n arr.push(obj);\n }\n }\n _this3.flowData = arr;\n _this3.$nextTick(function () {\n for (var i = 0; i < arr.length; i++) {\n if (_this3.flowId == arr[i].id) {\n _this3.$refs.flowTable.toggleRowSelection(arr[i]);\n }\n }\n });\n }\n });\n this.innerVisible = true;\n },\n changeHandler: function changeHandler() {\n this.state = \"1\";\n },\n //移出分组\n moveOutOfGroup: function moveOutOfGroup() {\n var _this4 = this;\n if (this.selectGroup.length < 1) {\n this.$message({\n message: this.$t(\"msg.select_atLeastOne\"),\n type: \"warning\"\n });\n } else {\n this.$confirm(this.$t(\"msg.comfirm\") + \"\".concat(this.selectGroup.length) + this.$t(\"msg.move_group\"), this.$t(\"msg.move\"), {\n confirmButtonText: this.$t(\"msg.confirm\"),\n cancelButtonText: this.$t(\"btns.cancel\"),\n type: \"warning\"\n }).then(function () {\n var arr = [];\n for (var i = 0; i < _this4.selectGroup.length; i++) {\n arr.push(_this4.selectGroup[i].id);\n }\n _this4.$api.deleteGroupUserList(_this4.currentGroupId, arr, {\n onSucess: function onSucess(res) {\n if (res.data.errcode == 0) {\n // this.selectGroup.forEach((item,index) => {\n\n // for(let i=0; i 0) {\n this.checkedFlowId.forEach(function (item) {\n _this13.flowName += item.name + \";\";\n _this13.selectFlowId += item.id + \";\";\n });\n this.innerVisible = false;\n } else {\n this.flowName = \"\";\n this.selectFlowId = \"\";\n }\n },\n //流程选择中的数据\n handleSelectionChange: function handleSelectionChange(val) {\n this.checkedFlowId = val;\n },\n //通讯录选择中的数据\n handleGrounpChange: function handleGrounpChange(val) {\n this.selectGroup = val;\n },\n //打开代理弹窗并获取流程数据\n construction: function construction() {\n var _this14 = this;\n this.proxyMode = \"0\";\n this.state = \"1\";\n this.currentRowId = \"\";\n this.saveApproverStatus = \"\";\n this.authorizedUser = \"\";\n this.description = \"\";\n this.endDay = \"\";\n this.startDay = \"\";\n this.selectFlowId = \"\";\n this.flowName = \"\";\n this.centerDialogVisible = true;\n this.innerVisible = false;\n var appId = this.currentAppid ? this.currentAppid : this.$root.appid;\n this.$api.getProxysFlow(appId, {\n onSucess: function onSucess(res) {\n var flowData = res.data.data;\n var arr = [];\n for (var key in flowData) {\n var obj = {};\n if (key) {\n obj.id = key;\n obj.name = flowData[key];\n arr.push(obj);\n }\n }\n _this14.flowData = arr;\n }\n });\n },\n // 保存代理信息\n centerDialog: function centerDialog() {\n var _this15 = this;\n if (!this.authorizedUser) {\n this.$message({\n message: this.$t(\"view.select_authorizer\"),\n type: \"warning\"\n });\n } else if (!this.startDay) {\n this.$message({\n message: this.$t(\"view.select_start_date\"),\n type: \"warning\"\n });\n } else if (!this.endDay) {\n this.$message({\n message: this.$t(\"view.select_end_date\"),\n type: \"warning\"\n });\n } else {\n var startTime = new Date(this.startDay);\n startTime = startTime.getTime();\n var endTime = new Date(this.endDay);\n endTime = endTime.getTime();\n if (startTime > endTime) {\n this.$message({\n message: this.$t(\"view.end_than_start\"),\n type: \"warning\"\n });\n } else {\n var appId = this.currentAppid ? this.currentAppid : this.$root.appid;\n var id = this.currentRowId ? this.currentRowId : \"\";\n var data = {\n agents: this.authorizedUserId,\n agentsName: this.authorizedUser,\n description: this.description,\n endProxyTime: endTime,\n flowId: this.proxyMode == \"0\" ? this.selectFlowId : \"\",\n flowName: this.proxyMode == \"0\" ? this.flowName : this.$t(\"view.total_flow\"),\n owner: this.$store.state.userId,\n proxyMode: parseInt(this.proxyMode),\n startProxyTime: startTime,\n state: this.state\n };\n this.$api.saveProxys(appId, data, id, {\n onSucess: function onSucess(res) {\n if (res.data.errcode == 40014) {\n _this15.centerDialogVisible = false;\n _this15.$notify.error({\n title: _this15.$t(\"msg.err\"),\n message: res.data.errmsg\n });\n } else {\n _this15.centerDialogVisible = false;\n _this15.$notify({\n title: _this15.$t(\"msg.ss\"),\n message: \"\",\n type: \"success\"\n });\n _this15.proxys();\n }\n }\n });\n }\n }\n },\n //校验邮箱\n checkedEmail: function checkedEmail() {\n var emailReg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$/;\n if (!emailReg.test(this.information.email) && this.information.email !== \"\" && this.information.email !== null) {\n this.$notify({\n title: this.$t(\"view.noagree_email\"),\n message: \"\",\n type: \"warning\"\n });\n this.isShowError = true;\n return;\n }\n },\n //校验手机\n checkedMobile: function checkedMobile() {\n var phoneReg = /^1\\d{10}$/;\n if (!phoneReg.test(this.information.mobile) && this.information.mobile !== \"\" && this.information.mobile !== null) {\n this.$notify({\n title: this.$t(\"view.noagree_tel\"),\n message: \"\",\n type: \"warning\"\n });\n this.isShowError = true;\n return;\n }\n },\n // 个人基本信息保存的请求\n UserSetups: function UserSetups() {\n var _this16 = this;\n // let Base64 = require('js-base64').Base64;\n // this.isShowError = false;\n // this.checkedEmail();\n // this.checkedMobile();\n // if(!this.isShowError){\n if (this.oldPassword) {\n if (!this.newPassword) {\n this.$notify({\n title: this.$t(\"view.new_pwd_notnull\"),\n message: \"\",\n type: \"warning\"\n });\n } else {\n if (!this.affirmPassword) {\n this.$notify({\n title: this.$t(\"view.old_new_same\"),\n message: \"\",\n type: \"warning\"\n });\n } else if (this.newPassword !== this.affirmPassword) {\n this.$notify({\n title: this.$t(\"view.old_new_same\"),\n message: \"\",\n type: \"warning\"\n });\n } else if (this.newPassword == this.affirmPassword) {\n var ap = this.affirmPassword;\n var np = this.newPassword;\n var op = this.oldPassword;\n // ap = Base64.encode(this.affirmPassword)\n // np = Base64.encode(this.newPassword)\n // op = Base64.encode(this.oldPassword)\n // let ap1 = ap.substr(0,2)\n // let ap2 = ap.substr(2)\n\n // let np1 = np.substr(0,2)\n // let np2 = np.substr(2)\n\n // let op1 = op.substr(0,2)\n // let op2 = op.substr(2)\n\n // ap = ap2 + ap1\n // np = np2 + np1\n // op = op2 + op1\n\n var data = {\n userName: localStorage.getItem(\"userName\"),\n confirmedPassword: this.$getCodeRSA(ap),\n newPassword: this.$getCodeRSA(np),\n password: this.$getCodeRSA(op)\n };\n this.$api.updatePassword(data, {\n onSucess: function onSucess(res) {\n if (res.data.status == 200) {\n //res.data.errcode == 0\n _this16.$notify({\n title: _this16.$t(\"view.update_ss\"),\n message: \"\",\n type: \"success\"\n });\n } else {\n _this16.$notify({\n title: res.data.message,\n message: \"\",\n type: \"error\"\n });\n }\n }\n });\n }\n }\n } else if (!this.oldPassword && this.affirmPassword) {\n this.$notify({\n title: this.$t(\"view.old_pwd_notnull\"),\n message: \"\",\n type: \"warning\"\n });\n } else if (this.newPassword) {\n if (!this.oldPassword) {\n this.$notify({\n title: this.$t(\"view.old_pwd_notnull\"),\n message: \"\",\n type: \"warning\"\n });\n }\n }\n this.$api.PersonalInformationSettings({\n name: this.information.name,\n email: this.information.email,\n telephone: this.information.mobile\n }, {\n onSucess: function onSucess(response) {\n if (!_this16.oldPassword && !_this16.newPassword && !_this16.affirmPassword) {\n if (response.status == 200) {\n _this16.$notify({\n title: _this16.$t(\"msg.ss\"),\n message: \"\",\n type: \"success\"\n });\n }\n }\n },\n onError: function onError(error) {}\n });\n // }\n },\n baseInfo: function baseInfo() {\n this.information = this.$store.state.myProfile;\n },\n setCurrent: function setCurrent(rows) {\n var _this17 = this;\n if (rows) {\n rows.forEach(function (row) {\n _this17.$refs.Current.toggleRowSelection(row);\n });\n } else {\n this.$refs.Current.clearSelection();\n }\n },\n handleCurrentChange: function handleCurrentChange(val) {\n this.currentRow = val;\n var ids = [];\n this.currentRow.map(function (item) {\n ids.push(item.id);\n });\n this.selectedIDs = ids;\n },\n toggleSelection: function toggleSelection(rows) {\n var _this18 = this;\n if (rows) {\n rows.forEach(function (row) {\n _this18.$refs.multipleTable.toggleRowSelection(row);\n });\n } else {\n this.$refs.multipleTable.clearSelection();\n }\n },\n //新建代理信息的弹框\n innerAgencyVisible: function innerAgencyVisible() {\n this.innerVisible = false;\n this.centerDialogVisible = false;\n },\n //通讯录{{$t('profile.add')}}\n contentNowrap: function contentNowrap() {\n var _this19 = this;\n this.addUserTogroup = this.$t(\"view.add_to_group\");\n if (this.selectGroup.length == 0) {\n this.$message({\n message: this.$t(\"profile.select_one_user\"),\n type: \"warning\"\n });\n } else {\n this.$api.getContactGroup({\n onSucess: function onSucess(res) {\n _this19.groupList = res.data.data.datas;\n }\n });\n this.AgencyDialogVisible = true;\n }\n },\n replacement: function replacement() {\n this.agency = \"\";\n },\n reset: function reset() {\n this.nohark = \"\";\n },\n // 通讯录查询用户\n inquire: function inquire() {\n var _this20 = this;\n this.pageNum = 1;\n var params = {\n contactsId: this.currentGroupId ? this.currentGroupId : \"\",\n userName: this.nohark,\n pageSize: 10,\n pageNum: 1\n };\n this.$api.getSearchContact(params, {\n onSucess: function onSucess(res) {\n var newData = res.data.data.datas.map(function (item) {\n return {\n name: item.name,\n dept: item.dept,\n mobile: item.mobile,\n email: item.email,\n id: item.id,\n deptId: item.deptId\n };\n });\n _this20.tableData = newData;\n _this20.tableDataNum = res.data.data.rowCount;\n }\n });\n },\n // 获取代理列表\n proxys: function proxys() {\n var _this21 = this;\n var appId = this.currentAppid ? this.currentAppid : this.$root.appid;\n var jsonData = {\n flowName: \"\",\n linesPerPage: 10,\n pageNo: 1\n };\n this.$api.getproxys(appId, jsonData, {\n onSucess: function onSucess(res) {\n _this21.row_count = res.data.data.rowCount;\n var newData = res.data.data.datas.map(function (item) {\n return {\n id: item.id,\n flowName: item.flowName,\n proxyMode: item.proxyMode,\n description: item.description,\n agentsName: item.agentsName,\n state: item.state\n };\n });\n _this21.process = newData;\n }\n });\n },\n // 获取通讯录分组\n contactsGroup: function contactsGroup() {\n var _this22 = this;\n this.$api.getContactGroup({\n onSucess: function onSucess(res) {\n _this22.groupList = res.data.data.datas;\n }\n });\n },\n //获取代理设置分页数据的请求\n handlAgentpaging: function handlAgentpaging(ev) {\n var _this23 = this;\n var appId = this.currentAppid ? this.currentAppid : this.$root.appid;\n var jsonData = {\n flowName: this.agency,\n linesPerPage: 10,\n pageNo: ev\n };\n this.$api.getproxys(appId, jsonData, {\n onSucess: function onSucess(res) {\n _this23.row_count = res.data.data.rowCount;\n var newData = res.data.data.datas.map(function (item) {\n return {\n id: item.id,\n flowName: item.flowName,\n proxyMode: item.proxyMode,\n description: item.description,\n agentsName: item.agentsName,\n state: item.state\n };\n });\n _this23.process = newData;\n }\n });\n },\n //通讯录分页请求\n Addressbookpaging: function Addressbookpaging(num) {\n var _this24 = this;\n if (this.currentGroupId) {\n this.$api.getAddressBook({\n contactsId: this.currentGroupId,\n userName: this.nohark,\n pageSize: 10,\n pageNum: num\n }, {\n onSucess: function onSucess(res) {\n _this24.tableDataNum = res.data.data.rowCount;\n var newData = res.data.data.datas.map(function (item) {\n return {\n name: item.name,\n dept: item.dept,\n mobile: item.mobile,\n email: item.email,\n id: item.id,\n deptId: item.deptId\n };\n });\n _this24.tableData = newData;\n }\n });\n } else {\n this.$api.getAddressBook({\n contactsId: \"\",\n userName: this.nohark,\n pageSize: 10,\n pageNum: num\n }, {\n onSucess: function onSucess(res) {\n _this24.tableDataNum = res.data.data.rowCount;\n var newData = res.data.data.datas.map(function (item) {\n return {\n name: item.name,\n dept: item.dept,\n mobile: item.mobile,\n email: item.email,\n id: item.id,\n deptId: item.deptId\n };\n });\n _this24.tableData = newData;\n }\n });\n }\n },\n // 请求通讯录里面要渲染的数据\n ContentBox: function ContentBox() {\n var _this25 = this;\n this.isOneGroup = false;\n this.currentGroupId = \"\";\n this.nohark = \"\";\n this.$api.getAddressBook({\n contactsId: \"\",\n pageSize: 10,\n pageNum: 1\n }, {\n onSucess: function onSucess(res) {\n _this25.tableDataNum = res.data.data.rowCount;\n var newData = res.data.data.datas.map(function (item) {\n return {\n name: item.name,\n dept: item.dept,\n mobile: item.mobile,\n email: item.email,\n id: item.id,\n deptId: item.deptId\n };\n });\n _this25.tableData = newData;\n }\n });\n },\n // 这是皮肤样式的请求\n Userskin: function Userskin() {\n var _this26 = this;\n API.SkinSetting({\n skin: \"H5\"\n }, {\n onSucess: function onSucess(response) {\n if (response.status == 200) {\n alert(_this26, $t(\"profile.h_ss\"));\n window.location = \"http://localhost:8080/obpm/portal/H5/main.jsp\";\n }\n },\n onError: function onError(error) {}\n });\n }\n }\n};",null]}