{"version":3,"sources":["webpack:///./src/views/User/ApprovalProcess/components/customApprovalChainTableFirst.vue?8d56","webpack:///./src/views/User/ApprovalProcess/components/customApprovalChainTableFirst.vue","webpack:///./src/views/User/ApprovalProcess/components/customApprovalChainTableFirst.vue?af90","webpack:///./src/hooks/approvalChian/useProgramChian.ts","webpack:///./node_modules/@ant-design/icons-svg/es/asn/PlusCircleOutlined.js","webpack:///./node_modules/@ant-design/icons-vue/es/icons/PlusCircleOutlined.js","webpack:///./src/hooks/approvalChian/useDynamicColumn.ts","webpack:///./src/views/User/ApprovalProcess/components/customApprovalChainTableFirst.vue?1fe8"],"names":["_hoisted_1","key","class","_hoisted_2","_hoisted_3","style","_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_button","_component_PlusCircleOutlined","_component_a_select_option","_component_a_select","_component_DeleteOutlined","_component_a_popconfirm","_component_a_table","_component_a_modal","to","$route","name","type","onClick","doSave","default","_","bordered","dataSource","columns","pagination","scroll","y","approvalRole","record","approvalChainRole","item","index","$event","handleAddRoleAndUser","icon","value","placeholder","allowClear","onChange","changeRole","onFocus","selectRoles","approvalChainRoleSelectList","user","approvalChainUser","changeUser","selectUsers","usersOptions","customTitle","handleAdd","operation","title","levelTimes","onConfirm","onDelete","visible","deleteModalVisible","width","centered","footer","size","onDeleteConfirm","components","PlusCircleOutlined","DeleteOutlined","setup","route","useProgramChian","addNewVersion","dataIndex","slots","customRender","query","console","log","newVersionApprovalParams","approvalBusinessId","bu","newVersionEffectiveFrom","oldVersionEffectiveFrom","count","length","editableData","mode","editableFlag","entity","undefined","doEdit","save","Object","assign","filter","map","toString","approvalLevel","splice","newData","approvalChainUserSelectList","push","entityOptions","tabVisable","ntimes","isQuerySelectRolesFlg","__exports__","res","formatList","list","level","keys","forEach","i","ChainUserList","_list","JSON","parse","stringify","ChainRoleList","column","getChianList","bus","then","data","userOptions","getAllRolesByuserName","userName","getApprovalChainDetails","chainId","saveApprovalChain","chainName","effectiveFrom","businessId","saveParams","dataList","code","info","content","error","message","newVersionParas","_objectSpread","target","arguments","source","ownKeys","getOwnPropertySymbols","concat","sym","getOwnPropertyDescriptor","enumerable","_defineProperty","obj","defineProperty","configurable","writable","props","context","p","attrs","AntdIcon","displayName","inheritAttrs","useDynamicColumn","isMake","originColumn","fixed","text","router","_text","substring","children","path","make","isFull","max","lCount"],"mappings":"yIAEMA,EAAa,CACjBC,IAAK,EACLC,MAAO,yDAEHC,EAA0B,6BAAiB,QAC3CC,EAAa,CAAEC,MAAO,CAAC,eAAe,OAAO,gBAAgB,SAC7DC,EAAa,CAAEJ,MAAO,iBACtBK,EAAa,CAAEL,MAAO,+BACtBM,EAAa,CAAEN,MAAO,iBACtBO,EAAa,CAAEP,MAAO,+BACtBQ,EAA0B,6BAAiB,mBAC3CC,EAA0B,6BAAiB,WAC3CC,EAA2B,gCAAoB,SAAU,KAAM,uBAAwB,GACvFC,EAA2B,gCAAoB,MAAO,KAAM,0CAA2C,GACvGC,EAA2B,6BAAiB,UAC5CC,EAA2B,6BAAiB,WAE3C,SAASC,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMC,EAAsB,8BAAkB,YACxCC,EAAgC,8BAAkB,sBAClDC,EAA6B,8BAAkB,mBAC/CC,EAAsB,8BAAkB,YACxCC,EAA4B,8BAAkB,kBAC9CC,EAA0B,8BAAkB,gBAC5CC,EAAqB,8BAAkB,WACvCC,EAAqB,8BAAkB,WAE7C,OAAQ,yBAAc,gCAAoB,cAAW,KAAM,EACxD,yBAAc,yBAAa,cAAW,CAAEC,GAAI,mBAAqB,CAC1C,6BAArBd,EAAKe,OAAOC,MACR,yBAAc,gCAAoB,MAAOjC,EAAY,CACpD,yBAAauB,EAAqB,CAChCW,KAAM,UACNC,QAAS,2BAAelB,EAAKmB,OAAQ,CAAC,SACtC/B,MAAO,CAAC,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MT,EAAStI,EAAO+I,UAAOrF,OAKrCiF,IAUJ,OAPsB,IAAlB3I,EAAOgJ,QACTH,EAASvE,KACP,eAAE,OAAQ,CACRlH,MAAO,uCAIN,eAAE,MAAO,CAAEA,MAAO,iBAAmByL,IAE9CL,MAAO,QAET,CACEjH,MAAO,KACPkB,UAAW,KAEXZ,MAAO,IACP2G,MAAO,SAGPF,GACFC,EAAajE,KAAK,CAChB/C,MAAO,OACPkB,UAAW,OACXZ,MAAO,IACP2G,MAAO,SAGX,IAAIS,EAAM,EACVpD,EAAKZ,SAAQ,SAAC/E,GACZ,GAAIA,EAAK6E,MAAO,CACd,IAAMmE,EAASrF,OAAOmB,KAAK9E,EAAK6E,OAAO1B,OACnC6F,EAASD,IACXA,EAAMC,OAaZ,IADA,IAAMrH,EAAQoH,EAAM,GAAK,QAAU,OAC1B/D,EAAI,EAAGA,EAAI+D,EAAK/D,IACvBqD,EAAajE,KAAK,CAChB/C,MAAO,KAAI2D,EAAI,GACfzC,UAAW,KAAIyC,EAAI,GACnBrD,MAAK,EACLc,aAAc,SAAC,G,IAAE8F,EAAI,OACnB,GAAKA,EACL,OAAO,eACL,MACA,GACAA,EAAKzE,KAAI,SAAC9D,GACR,OAAO,eAAE,MAAO,GAAIA,UAO9B,OAAOqI,GAEM,U,oCCrHf,W","file":"js/chunk-382fd096.1e0dbe1f.js","sourcesContent":["import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Teleport as _Teleport, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"search-item d-f flex-d justify-e align-c m-l-16 m-r-8\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createTextVNode(\"Save\")\nconst _hoisted_3 = { style: {\"padding-left\":\"16px\",\"padding-right\":\"10px\"} }\nconst _hoisted_4 = { class: \"editable-cell\" }\nconst _hoisted_5 = { class: \"editable-cell-input-wrapper\" }\nconst _hoisted_6 = { class: \"editable-cell\" }\nconst _hoisted_7 = { class: \"editable-cell-input-wrapper\" }\nconst _hoisted_8 = /*#__PURE__*/_createTextVNode(\" ApprovalLevel \")\nconst _hoisted_9 = /*#__PURE__*/_createTextVNode(\"Delete \")\nconst _hoisted_10 = /*#__PURE__*/_createElementVNode(\"strong\", null, \"Delete confirmation\", -1)\nconst _hoisted_11 = /*#__PURE__*/_createElementVNode(\"div\", null, \"Do you confirm to delete current role?\", -1)\nconst _hoisted_12 = /*#__PURE__*/_createTextVNode(\"Cancel\")\nconst _hoisted_13 = /*#__PURE__*/_createTextVNode(\"Confirm\")\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_a_button = _resolveComponent(\"a-button\")!\n const _component_PlusCircleOutlined = _resolveComponent(\"PlusCircleOutlined\")!\n const _component_a_select_option = _resolveComponent(\"a-select-option\")!\n const _component_a_select = _resolveComponent(\"a-select\")!\n const _component_DeleteOutlined = _resolveComponent(\"DeleteOutlined\")!\n const _component_a_popconfirm = _resolveComponent(\"a-popconfirm\")!\n const _component_a_table = _resolveComponent(\"a-table\")!\n const _component_a_modal = _resolveComponent(\"a-modal\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(), _createBlock(_Teleport, { to: \"#approvalChainF\" }, [\n (_ctx.$route.name === 'customApprovalChainFirst')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_a_button, {\n type: \"primary\",\n onClick: _withModifiers(_ctx.doSave, [\"stop\"]),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _hoisted_2\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ]))\n : _createCommentVNode(\"\", true)\n ])),\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(_component_a_table, {\n bordered: \"\",\n \"data-source\": _ctx.dataSource,\n columns: _ctx.columns,\n pagination: false,\n scroll: { y: 480}\n }, {\n approvalRole: _withCtx(({ record }) => [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.approvalChainRole, (item, index) => {\n return (_openBlock(), _createElementBlock(\"div\", { key: index }, [\n _createVNode(_component_a_button, {\n type: \"link\",\n onClick: ($event: any) => (_ctx.handleAddRoleAndUser(record,index))\n }, {\n icon: _withCtx(() => [\n _createVNode(_component_PlusCircleOutlined)\n ]),\n _: 2\n }, 1032, [\"onClick\"]),\n _createVNode(_component_a_select, {\n style: {\"width\":\"200px\"},\n value: record.approvalChainRole[index][0],\n \"onUpdate:value\": ($event: any) => ((record.approvalChainRole[index][0]) = $event),\n placeholder: \"Please select\",\n allowClear: true,\n onChange: ($event: any) => (_ctx.changeRole(record.approvalChainRole[index][0],index,record)),\n onFocus: ($event: any) => (_ctx.selectRoles(record.approvalChainRole[index][0],index,record.key))\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.approvalChainRoleSelectList, (item) => {\n return (_openBlock(), _createBlock(_component_a_select_option, {\n value: item[0],\n key: item\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(item[1]), 1)\n ]),\n _: 2\n }, 1032, [\"value\"]))\n }), 128))\n ]),\n _: 2\n }, 1032, [\"value\", \"onUpdate:value\", \"onChange\", \"onFocus\"])\n ]))\n }), 128))\n ])\n ])\n ]),\n user: _withCtx(({ record }) => [\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.approvalChainUser, (item, index) => {\n return (_openBlock(), _createElementBlock(\"div\", { key: index }, [\n _createVNode(_component_a_select, {\n style: {\"width\":\"200px\"},\n value: record.approvalChainUser[index][1],\n \"onUpdate:value\": ($event: any) => ((record.approvalChainUser[index][1]) = $event),\n placeholder: \"Please select\",\n allowClear: true,\n onChange: ($event: any) => (_ctx.changeUser(record.approvalChainUser[index][0],index,record.key)),\n onFocus: ($event: any) => (_ctx.selectUsers(record.approvalChainRole[index][0],index,record.key))\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.usersOptions, (item) => {\n return (_openBlock(), _createBlock(_component_a_select_option, {\n value: item.value,\n key: item.value\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(item.key), 1)\n ]),\n _: 2\n }, 1032, [\"value\"]))\n }), 128))\n ]),\n _: 2\n }, 1032, [\"value\", \"onUpdate:value\", \"onChange\", \"onFocus\"])\n ]))\n }), 128))\n ])\n ])\n ]),\n customTitle: _withCtx(() => [\n _createElementVNode(\"span\", null, [\n _hoisted_8,\n _createVNode(_component_a_button, {\n type: \"link\",\n onClick: _ctx.handleAdd\n }, {\n icon: _withCtx(() => [\n _createVNode(_component_PlusCircleOutlined)\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ])\n ]),\n operation: _withCtx(({ record }) => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.approvalChainRole, (item, index) => {\n return (_openBlock(), _createElementBlock(\"div\", { key: index }, [\n _createVNode(_component_a_popconfirm, {\n title: record.levelTimes == 1?'This is the last role in current level, the whole level will also be deleted, Do you confirm?':'Do you confirm to delete current role?',\n onConfirm: ($event: any) => (_ctx.onDelete(record,index))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_a_button, { type: \"link\" }, {\n icon: _withCtx(() => [\n _createVNode(_component_DeleteOutlined)\n ]),\n default: _withCtx(() => [\n _hoisted_9\n ]),\n _: 1\n })\n ]),\n _: 2\n }, 1032, [\"title\", \"onConfirm\"])\n ]))\n }), 128))\n ]),\n _: 1\n }, 8, [\"data-source\", \"columns\"])\n ]),\n _createVNode(_component_a_modal, {\n visible: _ctx.deleteModalVisible,\n \"onUpdate:visible\": _cache[1] || (_cache[1] = ($event: any) => ((_ctx.deleteModalVisible) = $event)),\n width: 400,\n class: \"batch-query-modal\",\n centered: \"\"\n }, {\n title: _withCtx(() => [\n _hoisted_10\n ]),\n footer: _withCtx(() => [\n _createVNode(_component_a_button, {\n size: \"small\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.deleteModalVisible=false))\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n }),\n _createVNode(_component_a_button, {\n size: \"small\",\n onClick: _ctx.onDeleteConfirm,\n type: \"primary\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ]),\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n }, 8, [\"visible\"])\n ], 64))\n}","\nimport { computed, defineComponent, reactive, Ref, ref, UnwrapRef } from 'vue';\nimport { EditOutlined,PlusCircleOutlined,DeleteOutlined } from '@ant-design/icons-vue';\nimport deepClone from '@/utils/deepClone'\nimport {useRoute, useRouter} from \"vue-router\";\nimport useProgramChian from \"@/hooks/approvalChian/useProgramChian\";\nimport * as API from \"@/API/approvalChain\";\n\ninterface DataItem {\n key: string;\n approvalLevel: string;\n approvalChainRole: string[];\n approvalChainUser: string[];\n levelTimes: number;\n}\n\nexport default defineComponent({\n name:'customApprovalChainTableFirst',\n components: {\n //EditOutlined,\n PlusCircleOutlined,\n DeleteOutlined\n },\n setup() {\n const route = useRoute();\n const router = useRouter();\n const {\n getAllRolesByuserName,\n addNewVersion,\n dataSource\n } = useProgramChian();\n const columns = [\n {\n dataIndex: 'approvalLevel',\n slots: { title: 'customTitle', customRender: 'approvalLevel' },\n },\n {\n title: 'ApprovalRole',\n dataIndex: 'approvalRole',\n width: '30%',\n slots: { customRender: 'approvalRole' },\n },\n {\n title: 'User',\n dataIndex: 'user',\n width: '30%',\n slots: { customRender: 'user' },\n },\n {\n title: 'operation',\n dataIndex: 'operation',\n slots: { customRender: 'operation' },\n },\n ];\n /*const dataSource = ref([\n {\n key: '0',\n approvalLevel: 'Level1',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '1',\n approvalLevel: 'Level2',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '2',\n approvalLevel: 'Level3',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '3',\n approvalLevel: 'Level4',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '4',\n approvalLevel: 'Level5',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '5',\n approvalLevel: 'Level6',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '6',\n approvalLevel: 'Level7',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '7',\n approvalLevel: 'Level8',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '8',\n approvalLevel: 'Level9',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '9',\n approvalLevel: 'Level10',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '10',\n approvalLevel: 'Level11',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '11',\n approvalLevel: 'Level12',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '12',\n approvalLevel: 'Level13',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '13',\n approvalLevel: 'Level14',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n {\n key: '14',\n approvalLevel: 'Level15',\n approvalChainRole: [''],\n approvalChainUser: [''],\n levelTimes: 1\n },\n ]);*/\n if(route.query){\n console.log('进入查询新版本详情接口!')\n console.log('route.query====',route.query)\n const newVersionApprovalParams = {\n approvalBusinessId: route.query.approvalBusinessId as string,\n bu: route.query.bu as string,\n newVersionEffectiveFrom: route.query.newVersionEffectiveFrom as string,\n oldVersionEffectiveFrom: route.query.oldVersionEffectiveFrom as string\n }\n addNewVersion(newVersionApprovalParams)\n }\n const count = computed(() => dataSource.value.length + 1);\n const editableData: UnwrapRef> = reactive({});\n const mode = ref('detail')\n const levelTimes = ref(1)\n const editableFlag = ref(false)\n const entity = undefined\n const doEdit = () => {\n editableFlag.value = true\n mode.value = 'save'\n }\n const save = (key: string) => {\n Object.assign(dataSource.value.filter(item => key === item.key)[0], editableData[key]);\n delete editableData[key];\n };\n const deleteModalVisible = ref(false)\n const onDelete = (record: any,index: number) => {\n if(record.levelTimes == 1){\n dataSource.value = dataSource.value.filter(item => item.key !== record.key);\n dataSource.value.map((item,index) =>{\n item.key = index.toString()\n item.approvalLevel = 'Level'+`${index+1}`\n })\n console.log('dataSource===',dataSource)\n }\n else{\n record.approvalRole.splice(index,1)\n record.user.splice(index,1)\n record.levelTimes--\n }\n /*dataSource.value = dataSource.value.map((item) => {\n if(item.key == record.key){\n if(item.levelTimes>=2){\n item.levelTimes--\n return item\n }\n else{\n return item\n }\n }\n else {\n return item\n }\n })*/\n };\n const handleAdd = () => {\n /*const newData = {\n key: `${count.value}`,\n approvalLevel: `Level ${count.value}`,\n approvalChainRole: [['','']],\n approvalChainUser: [['','']],\n levelTimes: 1\n };*/\n const newData = {\n key: `${count.value}`,\n approvalLevel: `Level ${count.value}`,\n approvalChainRole: [['','']],\n approvalChainRoleSelectList:[],\n approvalChainUserSelectList: [],\n approvalChainUser: [['','']],\n levelTimes: 1\n };\n dataSource.value.push(newData);\n };\n const handleAddRoleAndUser = (record: any,index: number) => {\n console.log('record====',record)\n record.approvalRole.push(record.approvalRole[index])\n record.user.push(record.user[index])\n record.levelTimes++\n }\n const entityOptions = ref(['Controling B4', 'BU Central', 'CFO', 'COO']);\n const tabVisable = ref(false)\n const ntimes = ref(0)\n const isQuerySelectRolesFlg = ref(false)\n const changeRole = (user: any,index: any,record: any) => {\n // console.log('新的datasource的值为:',dataSource.value)\n // console.log('index and key====',index,record.key)\n const role = entityOptions.value.find((item: any) => item[0] === user) as string\n record.approvalChainRole[index][1] = role[1]\n isQuerySelectRolesFlg.value = false\n API.getAllUsersByRole(user,route.query.bu as string).then((res: any)=>{\n console.log('getAllUsersByRole接口返回结果====',res)\n record.approvalChainUser[index] = res[0]\n console.log('更改后的datasource======',dataSource.value)\n })\n }\n const selectRoles = (value: any,index: any,key: any) => {\n console.log('点击seleceRoles传参:')\n if(route.query.Totype == 'new' && isQuerySelectRolesFlg){\n console.log('是否查询下拉role==========')\n getAllRolesByuserName(\"\")\n }\n }\n return {\n columns,\n onDelete,\n handleAdd,\n handleAddRoleAndUser,\n dataSource,\n editableData,\n editableFlag,\n entity,\n entityOptions,\n levelTimes,\n count,\n doEdit,\n //edit,\n save,\n mode,\n tabVisable,\n ntimes,\n deleteModalVisible,\n //changeApprovalRole,\n isQuerySelectRolesFlg,\n addNewVersion\n };\n },\n});\n","import { render } from \"./customApprovalChainTableFirst.vue?vue&type=template&id=9d83cac0&ts=true\"\nimport script from \"./customApprovalChainTableFirst.vue?vue&type=script&lang=ts\"\nexport * from \"./customApprovalChainTableFirst.vue?vue&type=script&lang=ts\"\n\nimport \"./customApprovalChainTableFirst.vue?vue&type=style&index=0&id=9d83cac0&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]])\n\nexport default __exports__","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","// This icon file is generated automatically.\nvar PlusCircleOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\" } }] }, \"name\": \"plus-circle\", \"theme\": \"outlined\" };\nexport default PlusCircleOutlined;\n","import * as _vue from \"vue\";\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport PlusCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/PlusCircleOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar PlusCircleOutlined = function PlusCircleOutlined(props, context) {\n var p = _objectSpread({}, props, context.attrs);\n\n return _vue.createVNode(AntdIcon, _vue.mergeProps(p, {\n \"icon\": PlusCircleOutlinedSvg\n }), null);\n};\n\nPlusCircleOutlined.displayName = 'PlusCircleOutlined';\nPlusCircleOutlined.inheritAttrs = false;\nexport default PlusCircleOutlined;","import { h } from \"vue\";\nimport { useRouter } from \"vue-router\";\nimport { ColumnProps } from \"ant-design-vue/es/table/interface\";\nimport { DataProps } from \"@/views/User/ApprovalProcess/ApprovalChain/ProgramChain/type\";\nfunction isEmptyNode(chain: DataProps) {\n // const exculdeColumns = ['status', 'chianName', 'buName', 'makeName']\n // return Object.keys(chain).some(key => {\n // if (!exculdeColumns.includes(key)) {\n // return chain[key].length === 0\n // }\n // })\n}\nconst useDynamicColumn = (data: T[], isMake: boolean) => {\n const originColumn: ColumnProps[] = [\n {\n title: \"Status\",\n dataIndex: \"status\",\n slots: {\n customRender: \"status\",\n },\n width: 80,\n fixed: \"left\",\n },\n {\n title: \"Approval Chain\",\n dataIndex: \"chainName\",\n width: 240,\n customRender: ({ text, record }) => {\n const router = useRouter();\n const _text = text.length > 20 ? text.substring(0,20) + '……' : text\n const children = [\n h(\n \"span\",\n {\n class: \"text\",\n onClick: () => {\n console.log(\"record================\",record)\n router.push({\n path: \"/approvalChainEdit\",\n query: {\n bu: record.bu,\n chainName: record.chainName,\n businessId: record.businessId,\n type: isMake ? 'payout' : 'program',\n make: isMake ? record.make : undefined\n }\n });\n },\n },\n _text\n ),\n ];\n if (record.isFull !== 1) {\n children.push(\n h(\"span\", {\n class: \"font_family icon-old-Warning icon\",\n })\n );\n }\n return h(\"div\", { class: \"chain-wrapper\" }, children);\n },\n fixed: \"left\",\n },\n {\n title: \"BU\",\n dataIndex: \"bu\",\n // slots: { title: \"customTitle\" },\n width: 100,\n fixed: \"left\",\n },\n ];\n if (isMake) {\n originColumn.push({\n title: \"Make\",\n dataIndex: \"make\",\n width: 100,\n fixed: \"left\",\n });\n }\n let max = 0;\n data.forEach((item: any) => {\n if (item.level) {\n const lCount = Object.keys(item.level).length;\n if (lCount > max) {\n max = lCount;\n }\n }\n // Object.keys(item).forEach((key) => {\n // if (item[key] instanceof Array) {\n // lCount++;\n // }\n // });\n // if (lCount / 2 > max) {\n // max = lCount / 2;\n // }\n });\n const width = max > 10 ? '120px' : 'auto'\n for (let i = 0; i < max; i++) {\n originColumn.push({\n title: `L${i + 1}`,\n dataIndex: `L${i + 1}`,\n width,\n customRender: ({ text }) => {\n if (!text) return;\n return h(\n \"div\",\n {},\n text.map((item: string) => {\n return h(\"div\", {}, item);\n })\n );\n },\n });\n }\n\n return originColumn;\n};\nexport default useDynamicColumn;\n","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!./customApprovalChainTableFirst.vue?vue&type=style&index=0&id=9d83cac0&lang=scss\""],"sourceRoot":""}