{"version":3,"sources":["webpack:///./src/views/User/ApprovalProcess/components/customApprovalChainTableSecond.vue?479e","webpack:///./node_modules/@ant-design/icons-svg/es/asn/PlusCircleOutlined.js","webpack:///./node_modules/@ant-design/icons-vue/es/icons/PlusCircleOutlined.js","webpack:///./src/views/User/ApprovalProcess/components/customApprovalChainTableSecond.vue?a05c","webpack:///./src/views/User/ApprovalProcess/components/customApprovalChainTableSecond.vue","webpack:///./src/views/User/ApprovalProcess/components/customApprovalChainTableSecond.vue?0db5"],"names":["_objectSpread","target","i","arguments","length","source","Object","ownKeys","keys","getOwnPropertySymbols","concat","filter","sym","getOwnPropertyDescriptor","enumerable","forEach","key","_defineProperty","obj","value","defineProperty","configurable","writable","props","context","p","attrs","AntdIcon","displayName","inheritAttrs","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","style","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","render","_ctx","_cache","$props","$setup","$data","$options","_component_a_button","_component_PlusCircleOutlined","_component_a_select_option","_component_a_select","_component_edit_outlined","_component_DeleteOutlined","_component_a_table","to","$route","name","mode","type","onClick","doEdit","default","_","doSave","bordered","dataSource","columns","pagination","scroll","y","approvalRole","text","record","levelTimes","index","$event","handleAddRoleAndUser","icon","entity","placeholder","allowClear","entityOptions","item","title","edit","user","customTitle","handleAdd","operation","onDelete","components","EditOutlined","PlusCircleOutlined","DeleteOutlined","setup","dataIndex","slots","customRender","width","approvalLevel","count","editableData","editableFlag","undefined","deepClone","save","assign","map","newData","push","console","log","tabVisable","ntimes","__exports__"],"mappings":"kHAAA,W,oDCCI,EAAqB,CAAE,KAAQ,CAAE,IAAO,MAAO,MAAS,CAAE,QAAW,gBAAiB,UAAa,SAAW,SAAY,CAAC,CAAE,IAAO,OAAQ,MAAS,CAAE,EAAK,8LAAiM,CAAE,IAAO,OAAQ,MAAS,CAAE,EAAK,oLAAwL,KAAQ,cAAe,MAAS,YAC3kB,I,Y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ClBS,EAAKT,aACES,GAOFA,MAIPK,EAAY,WAChB,IAAMqB,EAAU,CACdhG,IAAK,GAAGwF,EAAMrF,MACdoF,cAAe,SAASC,EAAMrF,MAC9BuD,aAAc,GACde,KAAM,yBAAyBe,EAAMrF,MACrC0D,WAAY,GAEdR,EAAWlD,MAAM8F,KAAKD,IAElBhC,EAAuB,SAACJ,GAC5BsC,QAAQC,IAAI,aAAavC,GACzBA,EAAOC,cAEHQ,EAAgB,iBAAc,CAAC,gBAAiB,aAAc,MAAO,QACrE+B,EAAa,kBAAa,GAC1BC,EAAS,iBAAY,GAC3B,MAAO,CACL/C,QAAO,EACPuB,SAAQ,EACRF,UAAS,EACTX,qBAAoB,EACpBX,WAAU,EACVoC,aAAY,EACZC,aAAY,EACZxB,OAAM,EACNG,cAAa,EACbR,WAAU,EACV2B,MAAK,EACLxC,OAAM,EACNwB,KAAI,EACJqB,KAAI,EACJhD,KAAI,EACJuD,WAAU,EACVC,OAAM,M,iCCzHZ,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS1E,KAErD","file":"js/chunk-25dcfa4e.597c92d0.js","sourcesContent":["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!./customApprovalChainTableSecond.vue?vue&type=style&index=0&id=7db3d46e&lang=scss\"","// 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 { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, Teleport as _Teleport, renderList as _renderList, Fragment as _Fragment, createVNode as _createVNode, 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(\"Edit\")\nconst _hoisted_3 = /*#__PURE__*/_createTextVNode(\"Save\")\nconst _hoisted_4 = { style: {\"padding-left\":\"16px\",\"padding-right\":\"10px\"} }\nconst _hoisted_5 = { class: \"editable-cell\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"editable-cell-input-wrapper\"\n}\nconst _hoisted_7 = {\n key: 1,\n class: \"editable-cell-text-wrapper\"\n}\nconst _hoisted_8 = { class: \"editable-cell\" }\nconst _hoisted_9 = {\n key: 0,\n class: \"editable-cell-input-wrapper\"\n}\nconst _hoisted_10 = {\n key: 1,\n class: \"editable-cell-text-wrapper\"\n}\nconst _hoisted_11 = /*#__PURE__*/_createTextVNode(\" ApprovalLevel \")\nconst _hoisted_12 = /*#__PURE__*/_createTextVNode(\"Delete \")\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_edit_outlined = _resolveComponent(\"edit-outlined\")!\n const _component_DeleteOutlined = _resolveComponent(\"DeleteOutlined\")!\n const _component_a_table = _resolveComponent(\"a-table\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(), _createBlock(_Teleport, { to: \"#approvalChainF\" }, [\n (_ctx.$route.name === 'customApprovalChainSecond')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_ctx.mode=='detail')\n ? (_openBlock(), _createBlock(_component_a_button, {\n key: 0,\n type: \"primary\",\n onClick: _withModifiers(_ctx.doEdit, [\"stop\"]),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _hoisted_2\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : (_openBlock(), _createBlock(_component_a_button, {\n key: 1,\n type: \"primary\",\n onClick: _withModifiers(_ctx.doSave, [\"stop\"]),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n ]))\n : _createCommentVNode(\"\", true)\n ])),\n _createElementVNode(\"div\", _hoisted_4, [\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(({ text, record }) => [\n _createElementVNode(\"div\", _hoisted_5, [\n (_ctx.editableFlag)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.levelTimes, (index) => {\n return (_openBlock(), _createElementBlock(\"div\", { key: index }, [\n _createVNode(_component_a_button, {\n type: \"link\",\n onClick: ($event: any) => (_ctx.handleAddRoleAndUser(record))\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: _ctx.entity,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.entity) = $event)),\n placeholder: \"Please select\",\n allowClear: true\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.entityOptions, (item) => {\n return (_openBlock(), _createBlock(_component_a_select_option, {\n value: item,\n key: item,\n title: item\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(item), 1)\n ]),\n _: 2\n }, 1032, [\"value\", \"title\"]))\n }), 128))\n ]),\n _: 1\n }, 8, [\"value\"])\n ]))\n }), 128))\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createTextVNode(_toDisplayString(text || ' ') + \" \", 1),\n _createVNode(_component_edit_outlined, {\n class: \"editable-cell-icon\",\n onClick: ($event: any) => (_ctx.edit(record.key))\n }, null, 8, [\"onClick\"])\n ]))\n ])\n ]),\n user: _withCtx(({ text, record }) => [\n _createElementVNode(\"div\", _hoisted_8, [\n (_ctx.editableFlag)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.levelTimes, (index) => {\n return (_openBlock(), _createElementBlock(\"div\", { key: index }, [\n _createVNode(_component_a_select, {\n style: {\"width\":\"200px\"},\n value: _ctx.entity,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((_ctx.entity) = $event)),\n placeholder: \"Please select\",\n allowClear: true\n }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.entityOptions, (item) => {\n return (_openBlock(), _createBlock(_component_a_select_option, {\n value: item,\n key: item,\n title: item\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(item), 1)\n ]),\n _: 2\n }, 1032, [\"value\", \"title\"]))\n }), 128))\n ]),\n _: 1\n }, 8, [\"value\"])\n ]))\n }), 128))\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _createTextVNode(_toDisplayString(text || ' ') + \" \", 1),\n _createVNode(_component_edit_outlined, {\n class: \"editable-cell-icon\",\n onClick: ($event: any) => (_ctx.edit(record.key))\n }, null, 8, [\"onClick\"])\n ]))\n ])\n ]),\n customTitle: _withCtx(() => [\n _createElementVNode(\"span\", null, [\n _hoisted_11,\n (!(_ctx.mode=='detail'))\n ? (_openBlock(), _createBlock(_component_a_button, {\n key: 0,\n type: \"link\",\n onClick: _ctx.handleAdd\n }, {\n icon: _withCtx(() => [\n _createVNode(_component_PlusCircleOutlined)\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n operation: _withCtx(({ record }) => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.levelTimes, (index) => {\n return (_openBlock(), _createElementBlock(\"div\", { key: index }, [\n _createVNode(_component_a_button, {\n type: \"link\",\n onClick: ($event: any) => (_ctx.onDelete(record))\n }, {\n icon: _withCtx(() => [\n _createVNode(_component_DeleteOutlined)\n ]),\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 2\n }, 1032, [\"onClick\"])\n ]))\n }), 128))\n ]),\n _: 1\n }, 8, [\"data-source\", \"columns\"])\n ])\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'\n\ninterface DataItem {\n key: string;\n approvalLevel: string;\n approvalRole: string;\n user: string;\n levelTimes: number;\n}\n\nexport default defineComponent({\n name:'customApprovalChainTableSecond',\n components: {\n EditOutlined,\n PlusCircleOutlined,\n DeleteOutlined\n },\n setup() {\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 = ref([\n {\n key: '0',\n approvalLevel: 'Level1',\n approvalRole: 'BU Central E4',\n user: 'Lifang',\n levelTimes: 1\n },\n {\n key: '1',\n approvalLevel: 'Level2',\n approvalRole: 'Controlling E4',\n user: 'Li,Hao',\n levelTimes: 1\n },\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 edit = (key: string) => {\n editableData[key] = deepClone(dataSource.value.filter(item => key === item.key)[0]);\n };\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 onDelete = (record: any) => {\n //dataSource.value = dataSource.value.filter(item => item.key !== key);\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 approvalRole: '',\n user: `London, Park Lane no. ${count.value}`,\n levelTimes: 1\n };\n dataSource.value.push(newData);\n };\n const handleAddRoleAndUser = (record: any) => {\n console.log('record====',record)\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 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 };\n },\n});\n","import { render } from \"./customApprovalChainTableSecond.vue?vue&type=template&id=7db3d46e&ts=true\"\nimport script from \"./customApprovalChainTableSecond.vue?vue&type=script&lang=ts\"\nexport * from \"./customApprovalChainTableSecond.vue?vue&type=script&lang=ts\"\n\nimport \"./customApprovalChainTableSecond.vue?vue&type=style&index=0&id=7db3d46e&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__"],"sourceRoot":""}