{"version":3,"sources":["webpack:///./src/hooks/approvalChian/useProgramChian.ts","webpack:///./src/views/User/ApprovalProcess/ApprovalChain/ProgramChain/index.vue?09b8","webpack:///./src/views/User/ApprovalProcess/ApprovalChain/ProgramChain/index.vue","webpack:///./src/views/User/ApprovalProcess/ApprovalChain/ProgramChain/index.vue?7897","webpack:///./src/views/User/ApprovalProcess/ApprovalChain/ProgramChain/index.vue?f0c5","webpack:///./src/views/User/ApprovalProcess/ApprovalChain/ProgramChain/index.vue?050b"],"names":["useProgramChian","res","formatList","list","type","map","item","level","Object","keys","forEach","i","ChainUserList","value","_list","JSON","parse","stringify","ChainRoleList","column","bu","editableFlag","mode","getChianList","bus","then","data","entityOptions","userOptions","getAllRolesByuserName","userName","dataSource","key","approvalLevel","approvalChainRole","approvalChainRoleSelectList","approvalChainUserSelectList","approvalChainUser","levelTimes","getApprovalChainDetails","chainId","console","log","saveApprovalChain","chainName","effectiveFrom","businessId","saveParams","dataList","code","info","title","content","error","message","addNewVersion","newVersionParas","_withScopeId","n","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","render","_ctx","_cache","$props","$setup","$data","$options","_component_a_select_option","_component_a_select","_component_SwapOutlined","_component_a_button","_component_a_menu_item","_component_a_menu","_component_a_dropdown","_component_a_table","_component_table_wrapper","_component_chian_modal","$event","placeholder","allowClear","maxTagCount","style","default","$store","state","approvalChain","BUListData","index","_","onClick","handleToggleChain","placement","overlay","href","handleAddNew","args","handleCopy","handleExport","slotProps","scroll","y","tableHeight","x","tableData","columns","rowKey","pagination","rowClassName","getRowClass","status","text","record","handleToggleStatus","handleApprovalChainClick","visible","chianModalVisible","chianModalType","chainList","name","props","setup","useStripedRowClass","confirm","callback","cancelText","okText","onOk","close","isFull","success","checkedList","handleBuClear","router","push","path","url","params","method","downloadFile","components","ChianModal","TableWrapper","SwapOutlined","__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Y,CACVC,WAAU,OACVC,aAAY,OACZC,aAAY,U,2CC5JhB,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASnF,GAAQ,CAAC,YAAY,qBAE1E,gB,kCCVf,W,kCCAA","file":"js/chunk-3bfeb4a1.4296abb9.js","sourcesContent":["import {ref, computed, Ref} from \"vue\";\nimport {\n getListProgramApproval,\n getApprovalChainDetail,\n getAllRolesByUser,\n saveApprovalRole,\n addApprovalChainNewVersion\n} from \"@/API/approvalChain\";\nimport useDynamicColumn from \"./useDynamicColumn\";\nimport useMock from \"@/utils/payment/useMock\";\nimport { DataProps } from \"@/views/User/ApprovalProcess/ApprovalChain/ProgramChain/type\";\nimport Data from \"@/views/User/ApprovalProcess/ApprovalChain/ProgramChain/mock\";\nimport {Modal} from \"ant-design-vue\";\ninterface DataItem {\n key: string;\n approvalLevel: string;\n approvalChainRole: any;\n approvalChainRoleSelectList: any;\n approvalChainUser: any;\n approvalChainUserSelectList: any;\n levelTimes: number;\n}\ninterface RoleItem {\n key: string;\n value: string;\n}\nconst useProgramChian = () => {\n const res = ref();\n const formatList = (list: DataProps[], type: string) => {\n return list.map((item: any) => {\n // Object.keys(item).forEach((key) => {\n // if (key.indexOf(type) > 0) {\n // item[key.replace(type, \"\")] = item[key];\n // }\n // if (key.indexOf('User') > 0 || key.indexOf('Role') > 0) {\n // delete item[key]\n // }\n // });\n if (item.level) {\n Object.keys(item.level).forEach((i) => {\n item[`L${i}`] = item.level[i].map((level: any) => {\n return level[type];\n });\n });\n }\n\n return item;\n });\n };\n const ChainUserList = computed(() => {\n const list = res.value;\n if (list) {\n const _list = JSON.parse(JSON.stringify(list));\n return formatList(_list, \"userName\");\n } else {\n return [];\n }\n });\n const ChainRoleList = computed(() => {\n const list = res.value;\n if (list) {\n const _list = JSON.parse(JSON.stringify(list));\n return formatList(_list, \"roleName\");\n } else {\n return [];\n }\n });\n const column = ref();\n const bu = ref([])\n const editableFlag = ref(false)\n const mode = ref('detail')\n const getChianList = () => {\n getListProgramApproval({\n bus: bu.value\n }).then((data) => {\n res.value = data;\n column.value = useDynamicColumn(res.value, false);\n });\n // useMock(Data).then((data) => {\n // res.value = data;\n // column.value = useDynamicColumn(res.value?.data?.data, false);\n // });\n };\n const entityOptions = ref();\n const userOptions = ref();\n const getAllRolesByuserName = (userName: string) => {\n const rolesArray = [] as RoleItem[]\n // getAllRolesByUser(userName).then((res: any) => {\n // entityOptions.value = res\n // console.log('entityOptions.value======',entityOptions.value)\n // })\n }\n const dataSource: Ref = ref([\n {\n key: '1',\n approvalLevel: 'Level1',\n approvalChainRole: [['eee','BU Central E4'],['ddd','Controlling E4']],\n approvalChainRoleSelectList:[],\n approvalChainUserSelectList: [],\n approvalChainUser: [['userId1','Lifang'],['userId2','lily']],\n levelTimes: 2\n },\n {\n key: '2',\n approvalLevel: 'Level2',\n approvalChainRole: [['eee','BU Central E4'],['ddd','Controlling E4']],\n approvalChainRoleSelectList:[],\n approvalChainUserSelectList: [],\n approvalChainUser: [['userId3','Li,Hao'],['userId3','Li,Hao']],\n levelTimes: 2\n },\n ]);\n const getApprovalChainDetails = (chainId: string) => {\n getApprovalChainDetail(chainId).then((res: any) => {\n console.log('返回审批流详情结果:',res[0])\n dataSource.value = res[1] as DataItem[]\n })\n }\n const saveApprovalChain = (bu: string,chainName: string,effectiveFrom: string,businessId: string) => {\n //const datalist = []\n const saveParams = {\n bu:bu,\n businessId:businessId,\n chainName:chainName,\n effectiveFrom:effectiveFrom,\n dataList: dataSource.value\n }\n console.log('保存审批流传接口的参数=============',saveParams)\n saveApprovalRole(saveParams).then((res: any)=>{\n console.log('保存审批流详情结果:',res)\n if(res.code === '0'){\n editableFlag.value = false\n mode.value = 'detail'\n Modal.info({\n title: 'Tips',\n content: 'Sucessfully saved!'\n })\n }\n else\n {\n Modal.error({\n title: 'Tips',\n content: res.message\n })\n }\n })\n }\n //#region [新增审批流版本]\n const addNewVersion = (newVersionParas: {}) => {\n return addApprovalChainNewVersion(newVersionParas).then((res: any)=>{\n console.log('新增审批流版本返回结果=================',res)\n dataSource.value = res.data as DataItem[]\n })\n }\n //#endregion\n //#end\n return {\n getChianList,\n getApprovalChainDetails,\n getAllRolesByuserName,\n dataSource,\n ChainUserList,\n ChainRoleList,\n column,\n bu,\n entityOptions,\n userOptions,\n saveApprovalChain,\n editableFlag,\n mode,\n addNewVersion\n };\n};\nexport default useProgramChian;\n","import { createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock, createVNode as _createVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-34d37f47\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"payment-overview-wrapper\" }\nconst _hoisted_2 = { class: \"header-wrapper\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, null, -1))\nconst _hoisted_4 = { class: \"control-wrapper\" }\nconst _hoisted_5 = { class: \"filter-wrapper\" }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", null, \"BU\", -1))\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"divider\" }, null, -1))\nconst _hoisted_8 = /*#__PURE__*/_createTextVNode(\" Role/User View \")\nconst _hoisted_9 = /*#__PURE__*/_createTextVNode(\" Create approval chain \")\nconst _hoisted_10 = /*#__PURE__*/_createTextVNode(\" Export to excel \")\nconst _hoisted_11 = [\"onClick\"]\nconst _hoisted_12 = [\"onClick\"]\nconst _hoisted_13 = [\"onClick\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_a_select_option = _resolveComponent(\"a-select-option\")!\n const _component_a_select = _resolveComponent(\"a-select\")!\n const _component_SwapOutlined = _resolveComponent(\"SwapOutlined\")!\n const _component_a_button = _resolveComponent(\"a-button\")!\n const _component_a_menu_item = _resolveComponent(\"a-menu-item\")!\n const _component_a_menu = _resolveComponent(\"a-menu\")!\n const _component_a_dropdown = _resolveComponent(\"a-dropdown\")!\n const _component_a_table = _resolveComponent(\"a-table\")!\n const _component_table_wrapper = _resolveComponent(\"table-wrapper\")!\n const _component_chian_modal = _resolveComponent(\"chian-modal\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _hoisted_6,\n _createVNode(_component_a_select, {\n value: _ctx.bu,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.bu) = $event)),\n placeholder: \"please select\",\n allowClear: \"\",\n mode: \"multiple\",\n maxTagCount: 2,\n style: {\"width\":\"280px\"}\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.$store.state.approvalChain.BUListData, (item, index) => {\n return (_openBlock(), _createBlock(_component_a_select_option, {\n key: index,\n value: item\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(item), 1)\n ]),\n _: 2\n }, 1032, [\"value\"]))\n }), 128))\n ]),\n _: 1\n }, 8, [\"value\"])\n ]),\n _hoisted_7,\n _createVNode(_component_a_button, {\n onClick: _ctx.handleToggleChain,\n class: \"m-r-15\"\n }, {\n default: _withCtx(() => [\n _createVNode(_component_SwapOutlined, { style: {\"color\":\"#1890ff\"} }),\n _hoisted_8\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_a_dropdown, { placement: \"bottomCenter\" }, {\n overlay: _withCtx(() => [\n _createVNode(_component_a_menu, null, {\n default: _withCtx(() => [\n _createVNode(_component_a_menu_item, null, {\n default: _withCtx(() => [\n _createElementVNode(\"a\", {\n href: \"javascript:;\",\n onClick: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.handleAddNew && _ctx.handleAddNew(...args)))\n }, \"Add new\")\n ]),\n _: 1\n }),\n _createVNode(_component_a_menu_item, null, {\n default: _withCtx(() => [\n _createElementVNode(\"a\", {\n href: \"javascript:;\",\n onClick: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.handleCopy && _ctx.handleCopy(...args)))\n }, \"Copy from existing\")\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createVNode(_component_a_button, { class: \"m-r-15\" }, {\n default: _withCtx(() => [\n _hoisted_9\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(_component_a_button, {\n onClick: _ctx.handleExport,\n type: \"primary\"\n }, {\n default: _withCtx(() => [\n _hoisted_10\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ])\n ]),\n _createVNode(_component_table_wrapper, { \"is-pagination\": false }, {\n default: _withCtx((slotProps) => [\n _createVNode(_component_a_table, {\n scroll: { y: slotProps.tableHeight, x: 1200 },\n dataSource: _ctx.tableData,\n columns: _ctx.column,\n rowKey: \"chainId\",\n pagination: false,\n rowClassName: _ctx.getRowClass\n }, {\n status: _withCtx(({ text, record }) => [\n (text === 1)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n onClick: ($event: any) => (_ctx.handleToggleStatus(text, record)),\n class: \"font_family icon-old-Unlock link\"\n }, null, 8, _hoisted_11))\n : (_openBlock(), _createElementBlock(\"span\", {\n key: 1,\n onClick: ($event: any) => (_ctx.handleToggleStatus(text, record)),\n class: \"font_family icon-old-Lock link\"\n }, null, 8, _hoisted_12))\n ]),\n approvalChain: _withCtx(({ text, record }) => [\n _createElementVNode(\"span\", {\n class: \"link\",\n onClick: ($event: any) => (_ctx.handleApprovalChainClick(record))\n }, _toDisplayString(text), 9, _hoisted_13)\n ]),\n _: 2\n }, 1032, [\"scroll\", \"dataSource\", \"columns\", \"rowClassName\"])\n ]),\n _: 1\n }),\n _createVNode(_component_chian_modal, {\n visible: _ctx.chianModalVisible,\n \"onUpdate:visible\": _cache[3] || (_cache[3] = ($event: any) => ((_ctx.chianModalVisible) = $event)),\n type: _ctx.chianModalType,\n chainList: _ctx.tableData\n }, null, 8, [\"visible\", \"type\", \"chainList\"])\n ]))\n}","\nimport {\n computed,\n defineComponent,\n ref,\n unref,\n onBeforeUnmount,\n watch,\n} from \"vue\";\nimport { SwapOutlined } from \"@ant-design/icons-vue\";\nimport { message, Modal } from \"ant-design-vue\";\nimport useStripedRowClass from \"@/utils/payment/useStripedRowClass\";\nimport ChianModal from \"../../components/chianModal.vue\";\nimport TableWrapper from \"@/views/Payment/components/TableWrapper.vue\";\nimport useProgramChian from \"@/hooks/approvalChian/useProgramChian\";\nimport {\n ToActiveApprovalChain,\n ToInactiveApprovalChain,\n} from \"@/API/approvalChain\";\nimport { useRouter } from \"vue-router\";\nimport { DataProps } from \"./type\";\nimport downloadFile from \"@/utils/claim/downloadFile\";\nexport default defineComponent({\n name: \"App\",\n props: {},\n setup() {\n const getRowClass = useStripedRowClass();\n const {\n getChianList,\n ChainUserList,\n ChainRoleList,\n column,\n bu,\n // getBUList,\n // BUList,\n } = useProgramChian();\n\n // 查询工作流列表\n getChianList();\n watch(bu, () => {\n getChianList();\n });\n const type = ref(\"user\");\n const tableData = computed(() => {\n return type.value === \"user\"\n ? unref(ChainUserList)\n : unref(ChainRoleList);\n });\n // 切换user和role\n const handleToggleChain = () => {\n type.value = type.value === \"user\" ? \"role\" : \"user\";\n };\n // 修改工作流状态\n const confirm = (status: number, callback: any) => {\n const content =\n status === 1\n ? \"Change status to inactive?\"\n : \"Change status to active?\";\n Modal.confirm({\n content,\n cancelText: \"No\",\n okText: \"Yes\",\n onOk(close: any) {\n callback(close);\n },\n });\n };\n const handleToggleStatus = (status: number, record: any) => {\n console.log(status, 8888);\n if (status === 0) {\n confirm(0, (close: any) => {\n console.log(record);\n if (record.isFull === 0) {\n Modal.info({\n content: \"Current chain exists blank level, cannot be active.\",\n onOk() {\n close();\n },\n });\n } else {\n ToActiveApprovalChain(record.businessId).then((res: any) => {\n if (res.code === \"1\") {\n // message.error(res.message);\n close();\n } else {\n getChianList();\n close();\n message.success(\"Switch success\");\n }\n });\n }\n });\n } else {\n confirm(1, (close: any) => {\n ToInactiveApprovalChain(record.businessId).then((res: any) => {\n if (res.code === \"1\") {\n // message.error(res.message);\n close();\n } else {\n getChianList();\n close();\n message.success(\"Switch success\");\n }\n });\n });\n }\n };\n // 查询BU字典表\n // getBUList();\n const checkedList = ref([]);\n const handleBuClear = () => {\n checkedList.value = [];\n };\n const chianModalVisible = ref(false);\n const chianModalType = ref(\"new\");\n const handleAddNew = () => {\n chianModalVisible.value = true;\n chianModalType.value = \"new\";\n };\n const handleCopy = () => {\n chianModalVisible.value = true;\n chianModalType.value = \"copy\";\n };\n const router = useRouter();\n const handleApprovalChainClick = () => {\n router.push({ path: \"/approvalChainEdit\" });\n };\n // 导出excel\n const handleExport = () => {\n let url = \"\";\n if (type.value === \"user\") {\n url = \"/apapi/approvalSetting/downloadUserProgramExcel\";\n } else {\n url = \"/apapi/approvalSetting/downloadRoleProgramExcel\";\n }\n const params = {\n url,\n method: \"get\",\n };\n downloadFile(params, \"application/vnd-excel; char-set=UTF-8\");\n };\n\n return {\n getRowClass,\n ChainUserList,\n tableData,\n column,\n handleToggleChain,\n handleToggleStatus,\n // BUList,\n checkedList,\n handleBuClear,\n chianModalVisible,\n chianModalType,\n handleAddNew,\n handleCopy,\n handleApprovalChainClick,\n handleExport,\n bu,\n };\n },\n components: {\n ChianModal,\n TableWrapper,\n SwapOutlined,\n },\n});\n","import { render } from \"./index.vue?vue&type=template&id=34d37f47&scoped=true&ts=true\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=34d37f47&scoped=true&lang=scss\"\nimport \"./index.vue?vue&type=style&index=1&id=34d37f47&lang=scss\"\n\nimport exportComponent from \"/app/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-34d37f47\"]])\n\nexport default __exports__","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./index.vue?vue&type=style&index=1&id=34d37f47&lang=scss\"","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./index.vue?vue&type=style&index=0&id=34d37f47&scoped=true&lang=scss\""],"sourceRoot":""}