{"version":3,"sources":["webpack:///./src/webapp/system-set/organization-manage/role-manage/index.vue?2442","webpack:///./src/webapp/system-set/organization-manage/role-manage/index.vue?ed34","webpack:///./src/webapp/system-set/organization-manage/role-manage/apis.js","webpack:///src/webapp/system-set/organization-manage/role-manage/index.vue","webpack:///./src/webapp/system-set/organization-manage/role-manage/index.vue?4041","webpack:///./src/webapp/system-set/organization-manage/role-manage/index.vue","webpack:///./src/services/main.js","webpack:///./src/apis/regExp.js","webpack:///./src/apis/index.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_b","ref","on","search","table","attrs","beforeClose","queryNames","$route","query","title","editForm","slot","closeDialog","_v","sureDialog","staticRenderFns","Server","window","global","$tools","auth","getCurrentUserInfo","mpsCustomerId","sessionStorage","getItem","JSON","parse","partnerId","path","apiMps","userInfo","cardMenus","defaultCardMenus","defaultMenus","getRoles","opt","cb","err","$http","get","params","clearNull","then","res","data","error","getRole","roleId","addRole","post","putRole","put","clearAllNull","deleteRole","delete","getOperations","ownPort","0","1","2","currentType","putDefaultRole","id","o","name","components","props","self","hasclear","page","total","setSize","filters","type","prop","value","bind","placeholder","btns","label","hide","disabled","permission","click","checkedKeys","rules","roleName","required","$refs","role","open","isAdd","getOrgans","cols","minWidth","sort","fuc","row","h","moment","gmtCreate","format","gmtModified","width","filterMultiple","text","isValid","fixed","index","i","roleKey","push","no","isLink","$confirm","confirmButtonText","cancelButtonText","customClass","$apis","$message","success","$search","catch","isDefault","tips","is_default","isServiceIntoCom","osPort","modified_id","employeeId","modified_name","employeeName","length","map","item","currentPage","roleList","allKays","isWarn","read","labelWidth","validator","rule","callback","form","$getValue","Error","opId","trigger","opid","store","e","$setValueField","tag","options","change","write","defaultProps","children","_mergeJSXProps","check","checkedNode","halfCheckedNodes","halfCheckedKeys","concat","cardOpId","beforeCreate","$axios","warning","mounted","Number","methods","selecttion","platform","pageIndex","pageSize","size","Object","keys","encodeURIComponent","values","totalCount","product_class","kids","reduce","opKid","assign","menus","mainService","getMenus","$router","routes","arry2tree","a","b","customerOrgan","organName","partnerName","filterLastId","tree","forEach","$nextTick","isCard","filter","os_data","includes","$setValue","partner_id","role_name","String","status","Boolean","isBand","parentId","temp","opName","obj","unshift","close","$validate","valid","organ","find","it","created_id","created_name","go","component","routers","root","permissionCb","customerId","startsWith","substring","aPath","productClass","menu","meta","icon","promote","option","serviceLoginHide","partnerType","isNorightHide","isMarket","needKey","ignore","controlProductType","productImg","currentProductType","class","syncRouterParentsStatus","getClass","result","cell","email","apiCrmOS","apiCrmUs","constructor","http","axios","allError","isadd","response","headers","resData","msg","errors","message","join","Array","key","trim","regExp","stack"],"mappings":"sIAAA,W,oECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAACF,EAAG,WAAWJ,EAAIO,GAAG,CAACC,IAAI,QAAQC,GAAG,CAAC,OAAST,EAAIU,SAAS,WAAWV,EAAIW,OAAM,IAAQP,EAAG,wBAAwB,CAACI,IAAI,OAAOI,MAAM,CAAC,aAAY,EAAK,eAAeZ,EAAIa,YAAY,cAAcb,EAAIc,WAAW,MAAQd,EAAIe,OAAOC,MAAMC,OAAS,GAAG,eAAc,IAAQ,CAACb,EAAG,UAAUJ,EAAIO,GAAG,CAACC,IAAI,OAAOF,YAAY,aAAa,UAAUN,EAAIkB,UAAS,IAAQd,EAAG,MAAM,CAACQ,MAAM,CAAC,KAAO,UAAUO,KAAK,UAAU,CAACf,EAAG,YAAY,CAACQ,MAAM,CAAC,KAAO,SAASH,GAAG,CAAC,MAAQT,EAAIoB,cAAc,CAACpB,EAAIqB,GAAG,QAAQjB,EAAG,YAAY,CAACQ,MAAM,CAAC,KAAO,UAAU,KAAO,SAASH,GAAG,CAAC,MAAQT,EAAIsB,aAAa,CAACtB,EAAIqB,GAAG,SAAS,IAAI,IAAI,IACnuBE,EAAkB,G,iC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ASgJ,GAAYA,EAASW,OAPnC/M,EAAKoD,SAAS,CACZ9C,KAAM,QACNmM,QAAUL,GAAYA,EAAS3N,OAAS2N,EAAS3N,KAAK8N,KAAOH,EAAS3N,KAAKgO,SAAYL,EAAS3N,KAAK+N,QAAUJ,EAAS3N,KAAK+N,OAAOtI,KAAI,SAAUC,GAChJ,OAAOA,EAAKsI,WACXC,KAAK,OAAW,gBAQ3B7P,EAAOY,KAAOA,EACCZ","file":"js/systemSet_organizationManage_roles.12ff6a7c.js","sourcesContent":["export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=49eb038c&prod&lang=less\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"mod-role-manage\"},[_c('jw-table',_vm._b({ref:\"table\",on:{\"search\":_vm.search}},'jw-table',_vm.table,false)),_c('jw-full-screen-dialog',{ref:\"role\",attrs:{\"old-style\":true,\"before-close\":_vm.beforeClose,\"query-names\":_vm.queryNames,\"title\":_vm.$route.query.title || '',\"keep-render\":false}},[_c('jw-form',_vm._b({ref:\"form\",staticClass:\"role-form\"},'jw-form',_vm.editForm,false)),_c('div',{attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{attrs:{\"size\":\"small\"},on:{\"click\":_vm.closeDialog}},[_vm._v(\"取消\")]),_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.sureDialog}},[_vm._v(\"保存\")])],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Server from '@/apis/index.js'\nexport default class extends Server {\n get userInfo () {\n return window.global.$tools.auth.getCurrentUserInfo()\n }\n get mpsCustomerId () {\n const mpsCustomerId = window.sessionStorage.getItem('mps_customer_orang') && JSON.parse(window.sessionStorage.getItem('mps_customer_orang')).partnerId\n return mpsCustomerId\n }\n get path () {\n return `${Server.path.apiMps}${this.mpsCustomerId ? `/agent/${this.userInfo.partnerId}` : ''}/partner/${this.mpsCustomerId || this.userInfo.partnerId}`\n }\n\n // 智能名片拥有菜单\n cardMenus () {\n return {\n '50b67316-64e7-4e8c-b256-d97df0f59531': true,\n 'd4325c2d-f785-443d-ba11-e198c6162327': true,\n '1392e230-8d39-420a-a30a-27f28a0f5d94': true,\n 'b385dce7-1301-4b4c-8957-2686476637af': true,\n 'db9a3f00-61a6-47d9-bbae-ec3b88b0bb0f': true,\n 'cfd4b0bd-8ae8-441f-a725-df126ed5b9a3': true,\n 'be397892-72ee-4a83-995d-2a544239333e': true,\n 'e3db5516-6ffc-4d2e-8699-2e2ef4dd933f': true,\n 'F1DB5B93-C55A-4669-9DE0-88412C9156D1': true,\n '4806CC6E-1B7A-4B6D-AD15-90F243D7AB81': true,\n '0b84343d-039d-4b1d-91b5-9c9c8e70f9ec': true,\n 'fb45313a-45cd-4a0d-ac1b-7d74152df959': true,\n 'cad1831f-ddae-4651-b919-39abe1e07a84': true,\n 'baa0a687-df46-494d-a964-4a7300ffc67a': true,\n 'f1cf28eb-c199-4f82-9e7e-577299998b21': true,\n 'a7a6964c-6ce1-4489-b4af-cb95300c4b13': true,\n 'ee63700a-8346-4c3f-b914-3dc2cb91a856': true,\n 'c49c7faf-2552-415c-a655-2dd103ba5916': true,\n 'bbad5393-f10a-494c-ab13-575b267e9b6f': true,\n 'ff68c04d-7372-4afa-aa37-ba606f3408cb': true,\n 'eeb5684b-4801-488f-abeb-49db070781a4': true,\n 'FB706A65-79A0-414E-98F7-9EE6AC94BE83': true\n }\n }\n\n // 智能名片默认角色拥有菜单\n defaultCardMenus () {\n return [\n '50b67316-64e7-4e8c-b256-d97df0f59531', // 首页\n 'be397892-72ee-4a83-995d-2a544239333e' // 编辑名片\n ]\n }\n\n // 全员营销默认角色拥有菜单\n defaultMenus () {\n return [\n '50b67316-64e7-4e8c-b256-d97df0f59531', // 首页\n 'be397892-72ee-4a83-995d-2a544239333e', // 编辑名片\n 'f1233fdc-1c06-4938-9076-7b0b5fa80762', // 内容集市\n '34e2b7d9-43a5-42dc-b204-ed287280e28b', // 文章申领\n 'b0c2e330-6c36-42a2-be97-e8bcd160ddc4', // 媒介渠道查看\n 'c5ecb122-7aee-4d6d-9b5d-fad0c2d81c4a', // 推广活动 列表\n '6fe161fc-e7f7-4a5e-9ab6-3556420c8346', // 推广活动 详情\n 'fe901e05-75c2-44cf-9501-f82237130514' // 线索收集 列表\n ]\n }\n\n //\n /**\n *获取角色列表\n * @param {*} opt\n */\n getRoles (opt, cb, err) {\n this.$http.get(`${this.path}/os/role`, { params: Server.clearNull(opt) }).then(res => {\n cb(res.data)\n }, this.error(err))\n }\n /**\n *获取角色详情\n * @param {*} roleId\n */\n getRole (roleId, cb, err) {\n this.$http.get(`${this.path}/os/role/${roleId}`).then(res => {\n cb(res)\n }, this.error(err))\n }\n /**\n *新增角色\n * @param {*} opt\n */\n addRole (opt, cb, err) {\n this.$http.post(`${this.path}/os/role`, opt).then(res => {\n cb(res)\n }, this.error(err))\n }\n /**\n *修改角色\n * @param {*} roleId\n * @param {*} opt\n */\n putRole (roleId, opt, cb, err) {\n this.$http.put(`${this.path}/os/role/${roleId}`, Server.clearAllNull(opt)).then(res => {\n cb(res)\n }, this.error(err))\n }\n\n /**\n *删除角色\n * @param {*} roleId\n * @param {*} cb\n */\n deleteRole (roleId, cb) {\n this.$http.delete(`${this.path}/os/role/${roleId}`).then(function (res) {\n cb(res)\n })\n }\n /**\n *获取操作列表\n */\n getOperations (cb, err) {\n this.$http.get(`${this.path}/os/operations`, { params: { ownPort: this.mpsCustomerId ? 0 : { 0: 2, 1: 1, 2: 0 }[this.userInfo.currentType] }}).then(res => {\n cb(res)\n }, this.error(err))\n }\n\n /**\n *设置默认角色\n */\n putDefaultRole (id, o, cb, err) {\n this.$http.put(`${this.path}/os/role/${id}/default-role`, o).then(res => {\n cb(res)\n }, this.error(err))\n }\n}\n","\n\n\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=49eb038c\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=49eb038c&prod&lang=less\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export default {\n /**\n * 根据路由配置获取菜单数据\n * @param {*} routers 路由配置\n * @param {*} root 根路径,如果没有就以 '/' 为根路径\n * @param {function} permissionCb 更具权限id判断权限\n * @param {number} currentType 用户身份 2、普通用户 1、代理商 0、运营商\n */\n getMenus (routers, root, permissionCb, currentType) {\n const menus = []\n const customerId = window.sessionStorage.getItem('mps_customer_id')\n routers.forEach(row => {\n /**\n * @param {object} row.meta\n * @param {number} row.meta.id 菜单 Id 生成uuid\n *\n * @param {string} row.meta.partnerType 该菜单所属的企业类型,逗号分隔\n * @description\n * OS-MPS对应不同 OS 0: 企业 1: 服务商 2:运营商 MPS 0: 运营 1: 服务商 2: 企业\n * 在router中配置的是os的对应关系,要根据router生成os、us\n * 在项目中使用的currentType 是MPS的对应关系\n *\n * @param {string} row.meta.title 菜单名称\n * @param {string} row.meta.icon 菜单图片 iconfont字体库\n * @param {boolean} row.meta.isNorightHide 没有权限时菜单是否隐藏,服务商进入客户操作该菜单隐藏\n * @param {boolean} row.meta.isCard 该菜单是否属于智能名片产品\n * @param {boolean} row.meta.isMarket 该菜单是否属于全员营销产品\n * @param {string} row.meta.needKey 该菜单是否受产品内容控制,受控制的字段\n *\n * @param {number[]} row.meta.controlProductType 菜单所属产品类型 0 - 全员营销产品 1 - 智能名片产品\n * @description\n * isCard: true,\n isMarket: true,\n needKey: 'is_name_card',\n controlProductType: [0],\n *当前购买的产品为全员营销(type为0)时 验证全员营销产品 is_name_card 功能是否开启\n *当前购买的产品为智能名片(type为1)时 不需要验证\n\n * @param {string} row.meta.ignore 不验证改菜单权限\n * @param {string} row.meta.productImg 没开通产品功能时提示图片\n * @param {string} row.meta.productTitle 没开通产品功能时提示文字\n * @param {string} row.meta.noRightTip 没有角色权限时提示文字\n */\n\n let path = row.path\n if (path.startsWith('/')) {\n path = path.substring(1)\n }\n const aPath = (root || '') + '/' + path\n const userInfo = window.global.$tools.auth.getCurrentUserInfo()\n const productClass = Number(userInfo.product_class)\n const children = row.children && row.children.length > 0 ? this.getMenus(row.children, aPath, permissionCb, currentType) : []\n const menu = {\n id: row.meta.id, //\n title: row.meta.title, // 菜单名称\n icon: row.meta.icon, // 菜单图标,\n path: aPath, // 访问路径\n promote: row.meta.promote, // 是否提升菜单\n option: row.meta.option,\n component: row.component,\n sort: row.meta.sort,\n children: children // 子菜单\n }\n\n // 代理商进入客户\n if (customerId && !row.meta.serviceLoginHide && row.meta.partnerType.includes('0')) {\n menus.push(menu)\n } else if (!customerId) {\n // 运营商\n if (currentType === 0) {\n if ((!menu.id && row.meta.partnerType.includes('2')) || permissionCb(menu.id)) {\n menus.push(menu)\n }\n // 服务商\n } else if (currentType === 1) {\n if ((!menu.id && row.meta.partnerType.includes('1')) || permissionCb(menu.id)) {\n menus.push(menu)\n }\n } else {\n // 企业\n if (!row.meta.isNorightHide && row.meta.partnerType.includes('0')) {\n const { isCard, isMarket, needKey, ignore, controlProductType, productImg } = row.meta\n\n const currentProductType = productClass === 0 ? isMarket : isCard\n if ((typeof productImg !== 'undefined' ? (ignore || (currentProductType && !needKey) || (currentProductType && needKey && !controlProductType.includes(productClass)) || (currentProductType && needKey && controlProductType.includes(productClass) && Number(userInfo[needKey]) === 1)) : true) && ((permissionCb(menu.id) || !menu.id))) {\n menus.push(menu)\n } else {\n menus.push(Object.assign(menu, { class: 'menu-noright' }))\n }\n } else if (row.meta.isNorightHide && permissionCb(menu.id)) {\n const { isCard, isMarket, needKey, ignore, controlProductType, productImg } = row.meta\n\n const currentProductType = productClass === 0 ? isMarket : isCard\n if ((typeof productImg !== 'undefined' ? (ignore || (currentProductType && !needKey) || (currentProductType && needKey && !controlProductType.includes(productClass)) || (currentProductType && needKey && controlProductType.includes(productClass) && Number(userInfo[needKey]) === 1)) : true) && ((permissionCb(menu.id) || !menu.id))) {\n menus.push(menu)\n } else {\n menus.push(Object.assign(menu, { class: 'menu-noright' }))\n }\n }\n }\n }\n })\n return menus\n },\n syncRouterParentsStatus (tree) {\n for (let i = 0; i < tree.length; i++) {\n const item = tree[i]\n if (!((item.children && item.children.length === 0) || (item.class && item.class.includes('menu-noright')))) {\n item.class = this.getClass(item)\n }\n }\n return tree\n },\n getClass (item) {\n const result = []\n for (let i = 0; i < item.children.length; i++) {\n const cell = item.children[i]\n if (cell.children.length === 0) {\n result.push(cell.class)\n } else {\n result.push(this.getClass(cell))\n }\n }\n return result.filter(it => !it).length > 0 ? null : 'menu-noright'\n }\n}\n","export default {\n email: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/\n}\n","import regExp from './regExp'\nimport axios from 'axios'\nconst path = {\n apiMps: '/saas-ability-mps/v1',\n apiCrmOS: '/paas-ability-os/v1/',\n apiCrmUs: '/paas-ability-us/v1/'\n}\n\nclass Server {\n constructor (http = axios, allError = window.global.$message.warning) {\n this.$http = http\n this.error = function (err, isadd, cb) {\n return function (res) {\n const { response } = res\n if (!(response && response.headers && response.headers['x-response-by'] && response.headers['x-response-by'] === 'gateway')) {\n if (err) {\n err(res.data)\n }\n if (isadd || !err) {\n const resData = res.response.data\n const msg = resData.errors && resData.errors.map(function (item) {\n return item.message || item.msg\n }).join(',')\n allError(msg || resData.message || resData.msg || '系统异常,请稍后再试!')\n }\n }\n cb && cb()\n }\n }\n }\n // 提供方法清空所有为空的字段\n static clearAllNull (obj) {\n let o\n if (obj instanceof Array) {\n o = []\n obj.forEach(function (item) {\n o.push(Server.clearAllNull(item))\n })\n } else if (obj instanceof Object) {\n o = Object.assign({}, obj)\n for (const key in o) {\n if (!o[key] && o[key] !== 0) {\n delete o[key]\n } else {\n o[key] = Server.clearAllNull(o[key])\n }\n }\n }\n return o || obj\n }\n // 提供方法清空一层为空的obj字段\n static clearNull (obj) {\n const o = Object.assign({}, obj)\n for (const key in o) {\n if (!o[key] && o[key] !== 0) {\n delete o[key]\n }\n }\n return o\n }\n static clearTrim (obj) {\n const o = Object.assign({}, obj)\n for (const key in o) {\n if (!o[key] && o[key] !== 0) {\n delete o[key]\n } else if (typeof (o[key]) === 'string' || o[key] instanceof String) {\n o[key] = o[key].trim()\n }\n }\n return o\n }\n // 验证集合\n static regExp (type) {\n return regExp[type]\n }\n\n static $message (self, response) {\n if (!(response && response.headers && response.headers['x-response-by'] && response.headers['x-response-by'] === 'gateway')) {\n self.$message({\n type: 'error',\n message: (response && response.data && (response.data.msg || response.data.message || (response.data.errors && response.data.errors.map(function (item) {\n return item.message\n }).join(',')))) || '网络异常,请稍后再试'\n })\n } else if (!response.headers) {\n self.$message(response && response.stack)\n }\n }\n}\n\nServer.path = path\nexport default Server\n"],"sourceRoot":""}