fix
This commit is contained in:
parent
757de9a43f
commit
3950057707
200
bun.lock
200
bun.lock
@ -1,10 +1,12 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"configVersion": 0,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "my-vue-app",
|
||||
"dependencies": {
|
||||
"@ag-grid-community/locale": "^35.1.0",
|
||||
"@iconify/vue": "^5.0.0",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@vueuse/core": "^14.2.1",
|
||||
"ag-grid-community": "^35.1.0",
|
||||
@ -13,8 +15,10 @@
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"decimal.js": "^10.6.0",
|
||||
"exceljs": "^4.4.0",
|
||||
"localforage": "^1.10.0",
|
||||
"lucide-vue-next": "^0.563.0",
|
||||
"motion-v": "^2.0.0",
|
||||
"pinia": "^3.0.4",
|
||||
"pinia-plugin-persistedstate": "^4.7.1",
|
||||
"reka-ui": "^2.8.0",
|
||||
@ -52,6 +56,10 @@
|
||||
|
||||
"@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.1.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ=="],
|
||||
|
||||
"@fast-csv/format": ["@fast-csv/format@4.3.5", "", { "dependencies": { "@types/node": "^14.0.1", "lodash.escaperegexp": "^4.1.2", "lodash.isboolean": "^3.0.3", "lodash.isequal": "^4.5.0", "lodash.isfunction": "^3.0.9", "lodash.isnil": "^4.0.0" } }, "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A=="],
|
||||
|
||||
"@fast-csv/parse": ["@fast-csv/parse@4.3.6", "", { "dependencies": { "@types/node": "^14.0.1", "lodash.escaperegexp": "^4.1.2", "lodash.groupby": "^4.6.0", "lodash.isfunction": "^3.0.9", "lodash.isnil": "^4.0.0", "lodash.isundefined": "^3.0.1", "lodash.uniq": "^4.5.0" } }, "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA=="],
|
||||
|
||||
"@floating-ui/core": ["@floating-ui/core@1.7.4", "", { "dependencies": { "@floating-ui/utils": "^0.2.10" } }, "sha512-C3HlIdsBxszvm5McXlB8PeOEWfBhcGBTZGkGlWc2U0KFY5IwG5OQEuQ8rq52DZmcHDlPLd+YFBK+cZcytwIFWg=="],
|
||||
|
||||
"@floating-ui/dom": ["@floating-ui/dom@1.7.5", "", { "dependencies": { "@floating-ui/core": "^1.7.4", "@floating-ui/utils": "^0.2.10" } }, "sha512-N0bD2kIPInNHUHehXhMke1rBGs1dwqvC9O9KYMyyjK7iXt7GAhnro7UlcuYcGdS/yYOlq0MAVgrow8IbWJwyqg=="],
|
||||
@ -60,6 +68,10 @@
|
||||
|
||||
"@floating-ui/vue": ["@floating-ui/vue@1.1.10", "", { "dependencies": { "@floating-ui/dom": "^1.7.5", "@floating-ui/utils": "^0.2.10", "vue-demi": ">=0.13.0" } }, "sha512-vdf8f6rHnFPPLRsmL4p12wYl+Ux4mOJOkjzKEMYVnwdf7UFdvBtHlLvQyx8iKG5vhPRbDRgZxdtpmyigDPjzYg=="],
|
||||
|
||||
"@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="],
|
||||
|
||||
"@iconify/vue": ["@iconify/vue@5.0.0", "", { "dependencies": { "@iconify/types": "^2.0.0" }, "peerDependencies": { "vue": ">=3" } }, "sha512-C+KuEWIF5nSBrobFJhT//JS87OZ++QDORB6f2q2Wm6fl2mueSTpFBeBsveK0KW9hWiZ4mNiPjsh6Zs4jjdROSg=="],
|
||||
|
||||
"@internationalized/date": ["@internationalized/date@3.11.0", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-BOx5huLAWhicM9/ZFs84CzP+V3gBW6vlpM02yzsdYC7TGlZJX1OJiEEHcSayF00Z+3jLlm4w79amvSt6RqKN3Q=="],
|
||||
|
||||
"@internationalized/number": ["@internationalized/number@3.6.5", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-6hY4Kl4HPBvtfS62asS/R22JzNNy8vi/Ssev7x6EobfCp+9QIB2hKvI2EtbdJ0VSQacxVNtqhE/NmF/NZ0gm6g=="],
|
||||
@ -212,46 +224,120 @@
|
||||
|
||||
"alien-signals": ["alien-signals@3.1.2", "", {}, "sha512-d9dYqZTS90WLiU0I5c6DHj/HcKkF8ZyGN3G5x8wSbslulz70KOxaqCT0hQCo9KOyhVqzqGojvNdJXoTumZOtcw=="],
|
||||
|
||||
"archiver": ["archiver@5.3.2", "", { "dependencies": { "archiver-utils": "^2.1.0", "async": "^3.2.4", "buffer-crc32": "^0.2.1", "readable-stream": "^3.6.0", "readdir-glob": "^1.1.2", "tar-stream": "^2.2.0", "zip-stream": "^4.1.0" } }, "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw=="],
|
||||
|
||||
"archiver-utils": ["archiver-utils@2.1.0", "", { "dependencies": { "glob": "^7.1.4", "graceful-fs": "^4.2.0", "lazystream": "^1.0.0", "lodash.defaults": "^4.2.0", "lodash.difference": "^4.5.0", "lodash.flatten": "^4.4.0", "lodash.isplainobject": "^4.0.6", "lodash.union": "^4.6.0", "normalize-path": "^3.0.0", "readable-stream": "^2.0.0" } }, "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw=="],
|
||||
|
||||
"aria-hidden": ["aria-hidden@1.2.6", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA=="],
|
||||
|
||||
"async": ["async@3.2.6", "", {}, "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA=="],
|
||||
|
||||
"balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
|
||||
|
||||
"base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
|
||||
|
||||
"big-integer": ["big-integer@1.6.52", "", {}, "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg=="],
|
||||
|
||||
"binary": ["binary@0.3.0", "", { "dependencies": { "buffers": "~0.1.1", "chainsaw": "~0.1.0" } }, "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg=="],
|
||||
|
||||
"birpc": ["birpc@2.9.0", "", {}, "sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw=="],
|
||||
|
||||
"bl": ["bl@4.1.0", "", { "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } }, "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w=="],
|
||||
|
||||
"bluebird": ["bluebird@3.4.7", "", {}, "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA=="],
|
||||
|
||||
"brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
|
||||
|
||||
"buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
|
||||
|
||||
"buffer-crc32": ["buffer-crc32@0.2.13", "", {}, "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="],
|
||||
|
||||
"buffer-indexof-polyfill": ["buffer-indexof-polyfill@1.0.2", "", {}, "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A=="],
|
||||
|
||||
"buffers": ["buffers@0.1.1", "", {}, "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ=="],
|
||||
|
||||
"bun-types": ["bun-types@1.3.9", "", { "dependencies": { "@types/node": "*" } }, "sha512-+UBWWOakIP4Tswh0Bt0QD0alpTY8cb5hvgiYeWCMet9YukHbzuruIEeXC2D7nMJPB12kbh8C7XJykSexEqGKJg=="],
|
||||
|
||||
"chainsaw": ["chainsaw@0.1.0", "", { "dependencies": { "traverse": ">=0.3.0 <0.4" } }, "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ=="],
|
||||
|
||||
"class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="],
|
||||
|
||||
"clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="],
|
||||
|
||||
"compress-commons": ["compress-commons@4.1.2", "", { "dependencies": { "buffer-crc32": "^0.2.13", "crc32-stream": "^4.0.2", "normalize-path": "^3.0.0", "readable-stream": "^3.6.0" } }, "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg=="],
|
||||
|
||||
"concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="],
|
||||
|
||||
"copy-anything": ["copy-anything@4.0.5", "", { "dependencies": { "is-what": "^5.2.0" } }, "sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA=="],
|
||||
|
||||
"core-util-is": ["core-util-is@1.0.3", "", {}, "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="],
|
||||
|
||||
"crc-32": ["crc-32@1.2.2", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="],
|
||||
|
||||
"crc32-stream": ["crc32-stream@4.0.3", "", { "dependencies": { "crc-32": "^1.2.0", "readable-stream": "^3.4.0" } }, "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw=="],
|
||||
|
||||
"csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],
|
||||
|
||||
"dayjs": ["dayjs@1.11.19", "", {}, "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw=="],
|
||||
|
||||
"decimal.js": ["decimal.js@10.6.0", "", {}, "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="],
|
||||
|
||||
"defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="],
|
||||
|
||||
"detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
|
||||
|
||||
"duplexer2": ["duplexer2@0.1.4", "", { "dependencies": { "readable-stream": "^2.0.2" } }, "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA=="],
|
||||
|
||||
"end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="],
|
||||
|
||||
"enhanced-resolve": ["enhanced-resolve@5.19.0", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.0" } }, "sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg=="],
|
||||
|
||||
"entities": ["entities@7.0.1", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="],
|
||||
|
||||
"estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="],
|
||||
|
||||
"exceljs": ["exceljs@4.4.0", "", { "dependencies": { "archiver": "^5.0.0", "dayjs": "^1.8.34", "fast-csv": "^4.3.1", "jszip": "^3.10.1", "readable-stream": "^3.6.0", "saxes": "^5.0.1", "tmp": "^0.2.0", "unzipper": "^0.10.11", "uuid": "^8.3.0" } }, "sha512-XctvKaEMaj1Ii9oDOqbW/6e1gXknSY4g/aLCDicOXqBE4M0nRWkUu0PTp++UPNzoFY12BNHMfs/VadKIS6llvg=="],
|
||||
|
||||
"fast-csv": ["fast-csv@4.3.6", "", { "dependencies": { "@fast-csv/format": "4.3.5", "@fast-csv/parse": "4.3.6" } }, "sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw=="],
|
||||
|
||||
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
|
||||
|
||||
"framer-motion": ["framer-motion@12.34.3", "", { "dependencies": { "motion-dom": "^12.34.3", "motion-utils": "^12.29.2", "tslib": "^2.4.0" }, "peerDependencies": { "@emotion/is-prop-valid": "*", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@emotion/is-prop-valid", "react", "react-dom"] }, "sha512-v81ecyZKYO/DfpTwHivqkxSUBzvceOpoI+wLfgCgoUIKxlFKEXdg0oR9imxwXumT4SFy8vRk9xzJ5l3/Du/55Q=="],
|
||||
|
||||
"fs-constants": ["fs-constants@1.0.0", "", {}, "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="],
|
||||
|
||||
"fs.realpath": ["fs.realpath@1.0.0", "", {}, "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="],
|
||||
|
||||
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
|
||||
|
||||
"fstream": ["fstream@1.0.12", "", { "dependencies": { "graceful-fs": "^4.1.2", "inherits": "~2.0.0", "mkdirp": ">=0.5 0", "rimraf": "2" } }, "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg=="],
|
||||
|
||||
"glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
||||
|
||||
"graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="],
|
||||
|
||||
"hey-listen": ["hey-listen@1.0.8", "", {}, "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q=="],
|
||||
|
||||
"hookable": ["hookable@5.5.3", "", {}, "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ=="],
|
||||
|
||||
"ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="],
|
||||
|
||||
"immediate": ["immediate@3.0.6", "", {}, "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="],
|
||||
|
||||
"inflight": ["inflight@1.0.6", "", { "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA=="],
|
||||
|
||||
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
|
||||
|
||||
"is-what": ["is-what@5.5.0", "", {}, "sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw=="],
|
||||
|
||||
"isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="],
|
||||
|
||||
"jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="],
|
||||
|
||||
"jszip": ["jszip@3.10.1", "", { "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", "readable-stream": "~2.3.6", "setimmediate": "^1.0.5" } }, "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g=="],
|
||||
|
||||
"lazystream": ["lazystream@1.0.1", "", { "dependencies": { "readable-stream": "^2.0.5" } }, "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw=="],
|
||||
|
||||
"lie": ["lie@3.1.1", "", { "dependencies": { "immediate": "~3.0.5" } }, "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw=="],
|
||||
|
||||
"lightningcss": ["lightningcss@1.31.1", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.31.1", "lightningcss-darwin-arm64": "1.31.1", "lightningcss-darwin-x64": "1.31.1", "lightningcss-freebsd-x64": "1.31.1", "lightningcss-linux-arm-gnueabihf": "1.31.1", "lightningcss-linux-arm64-gnu": "1.31.1", "lightningcss-linux-arm64-musl": "1.31.1", "lightningcss-linux-x64-gnu": "1.31.1", "lightningcss-linux-x64-musl": "1.31.1", "lightningcss-win32-arm64-msvc": "1.31.1", "lightningcss-win32-x64-msvc": "1.31.1" } }, "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ=="],
|
||||
@ -278,22 +364,68 @@
|
||||
|
||||
"lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.31.1", "", { "os": "win32", "cpu": "x64" }, "sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw=="],
|
||||
|
||||
"listenercount": ["listenercount@1.0.1", "", {}, "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ=="],
|
||||
|
||||
"localforage": ["localforage@1.10.0", "", { "dependencies": { "lie": "3.1.1" } }, "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg=="],
|
||||
|
||||
"lodash.defaults": ["lodash.defaults@4.2.0", "", {}, "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="],
|
||||
|
||||
"lodash.difference": ["lodash.difference@4.5.0", "", {}, "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA=="],
|
||||
|
||||
"lodash.escaperegexp": ["lodash.escaperegexp@4.1.2", "", {}, "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw=="],
|
||||
|
||||
"lodash.flatten": ["lodash.flatten@4.4.0", "", {}, "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g=="],
|
||||
|
||||
"lodash.groupby": ["lodash.groupby@4.6.0", "", {}, "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw=="],
|
||||
|
||||
"lodash.isboolean": ["lodash.isboolean@3.0.3", "", {}, "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="],
|
||||
|
||||
"lodash.isequal": ["lodash.isequal@4.5.0", "", {}, "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="],
|
||||
|
||||
"lodash.isfunction": ["lodash.isfunction@3.0.9", "", {}, "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw=="],
|
||||
|
||||
"lodash.isnil": ["lodash.isnil@4.0.0", "", {}, "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng=="],
|
||||
|
||||
"lodash.isplainobject": ["lodash.isplainobject@4.0.6", "", {}, "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="],
|
||||
|
||||
"lodash.isundefined": ["lodash.isundefined@3.0.1", "", {}, "sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA=="],
|
||||
|
||||
"lodash.union": ["lodash.union@4.6.0", "", {}, "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw=="],
|
||||
|
||||
"lodash.uniq": ["lodash.uniq@4.5.0", "", {}, "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ=="],
|
||||
|
||||
"lucide-vue-next": ["lucide-vue-next@0.563.0", "", { "peerDependencies": { "vue": ">=3.0.1" } }, "sha512-zsE/lCKtmaa7bGfhSpN84br1K9YoQ5pCN+2oKWjQQG3Lo6ufUUKBuHSjNFI6RvUevxaajNXb8XwFUKeTXG3sIA=="],
|
||||
|
||||
"magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],
|
||||
|
||||
"minimatch": ["minimatch@5.1.9", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw=="],
|
||||
|
||||
"mitt": ["mitt@3.0.1", "", {}, "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="],
|
||||
|
||||
"mkdirp": ["mkdirp@3.0.1", "", { "bin": { "mkdirp": "dist/cjs/src/bin.js" } }, "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg=="],
|
||||
|
||||
"motion-dom": ["motion-dom@12.34.3", "", { "dependencies": { "motion-utils": "^12.29.2" } }, "sha512-sYgFe+pR9aIM7o4fhs2aXtOI+oqlUd33N9Yoxcgo1Fv7M20sRkHtCmzE/VRNIcq7uNJ+qio+Xubt1FXH3pQ+eQ=="],
|
||||
|
||||
"motion-utils": ["motion-utils@12.29.2", "", {}, "sha512-G3kc34H2cX2gI63RqU+cZq+zWRRPSsNIOjpdl9TN4AQwC4sgwYPl/Q/Obf/d53nOm569T0fYK+tcoSV50BWx8A=="],
|
||||
|
||||
"motion-v": ["motion-v@2.0.0", "", { "dependencies": { "framer-motion": "^12.29.2", "hey-listen": "^1.0.8", "motion-dom": "^12.29.2", "motion-utils": "^12.29.2" }, "peerDependencies": { "@vueuse/core": ">=10.0.0", "vue": ">=3.0.0" } }, "sha512-oQuQMrPhti+Zps6OosOaW3b/eqzaGAuwI54XHJKq/dIWtQWcNzfyhTo4VB5xmp7yLN+3BE9FKF6skLsynfgbHQ=="],
|
||||
|
||||
"muggle-string": ["muggle-string@0.4.1", "", {}, "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ=="],
|
||||
|
||||
"nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="],
|
||||
|
||||
"normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="],
|
||||
|
||||
"ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="],
|
||||
|
||||
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
|
||||
|
||||
"pako": ["pako@1.0.11", "", {}, "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="],
|
||||
|
||||
"path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="],
|
||||
|
||||
"path-is-absolute": ["path-is-absolute@1.0.1", "", {}, "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="],
|
||||
|
||||
"perfect-debounce": ["perfect-debounce@1.0.0", "", {}, "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA=="],
|
||||
|
||||
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
||||
@ -306,18 +438,34 @@
|
||||
|
||||
"postcss": ["postcss@8.5.6", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="],
|
||||
|
||||
"process-nextick-args": ["process-nextick-args@2.0.1", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="],
|
||||
|
||||
"readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||
|
||||
"readdir-glob": ["readdir-glob@1.1.3", "", { "dependencies": { "minimatch": "^5.1.0" } }, "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA=="],
|
||||
|
||||
"reka-ui": ["reka-ui@2.8.2", "", { "dependencies": { "@floating-ui/dom": "^1.6.13", "@floating-ui/vue": "^1.1.6", "@internationalized/date": "^3.5.0", "@internationalized/number": "^3.5.0", "@tanstack/vue-virtual": "^3.12.0", "@vueuse/core": "^14.1.0", "@vueuse/shared": "^14.1.0", "aria-hidden": "^1.2.4", "defu": "^6.1.4", "ohash": "^2.0.11" }, "peerDependencies": { "vue": ">= 3.2.0" } }, "sha512-8lTKcJhmG+D3UyJxhBnNnW/720sLzm0pbA9AC1MWazmJ5YchJAyTSl+O00xP/kxBmEN0fw5JqWVHguiFmsGjzA=="],
|
||||
|
||||
"rfdc": ["rfdc@1.4.1", "", {}, "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="],
|
||||
|
||||
"rimraf": ["rimraf@2.7.1", "", { "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "./bin.js" } }, "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w=="],
|
||||
|
||||
"rolldown": ["rolldown@1.0.0-rc.5", "", { "dependencies": { "@oxc-project/types": "=0.114.0", "@rolldown/pluginutils": "1.0.0-rc.5" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.0-rc.5", "@rolldown/binding-darwin-arm64": "1.0.0-rc.5", "@rolldown/binding-darwin-x64": "1.0.0-rc.5", "@rolldown/binding-freebsd-x64": "1.0.0-rc.5", "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.5", "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.5", "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.5", "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.5", "@rolldown/binding-linux-x64-musl": "1.0.0-rc.5", "@rolldown/binding-openharmony-arm64": "1.0.0-rc.5", "@rolldown/binding-wasm32-wasi": "1.0.0-rc.5", "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.5", "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.5" }, "bin": { "rolldown": "bin/cli.mjs" } }, "sha512-0AdalTs6hNTioaCYIkAa7+xsmHBfU5hCNclZnM/lp7lGGDuUOb6N4BVNtwiomybbencDjq/waKjTImqiGCs5sw=="],
|
||||
|
||||
"safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
|
||||
|
||||
"saxes": ["saxes@5.0.1", "", { "dependencies": { "xmlchars": "^2.2.0" } }, "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw=="],
|
||||
|
||||
"setimmediate": ["setimmediate@1.0.5", "", {}, "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA=="],
|
||||
|
||||
"sortablejs": ["sortablejs@1.14.0", "", {}, "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w=="],
|
||||
|
||||
"source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
|
||||
|
||||
"speakingurl": ["speakingurl@14.0.1", "", {}, "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ=="],
|
||||
|
||||
"string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="],
|
||||
|
||||
"superjson": ["superjson@2.2.6", "", { "dependencies": { "copy-anything": "^4" } }, "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA=="],
|
||||
|
||||
"tailwind-merge": ["tailwind-merge@3.5.0", "", {}, "sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A=="],
|
||||
@ -326,8 +474,14 @@
|
||||
|
||||
"tapable": ["tapable@2.3.0", "", {}, "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg=="],
|
||||
|
||||
"tar-stream": ["tar-stream@2.2.0", "", { "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" } }, "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="],
|
||||
|
||||
"tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="],
|
||||
|
||||
"tmp": ["tmp@0.2.5", "", {}, "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow=="],
|
||||
|
||||
"traverse": ["traverse@0.3.9", "", {}, "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ=="],
|
||||
|
||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"tw-animate-css": ["tw-animate-css@1.4.0", "", {}, "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ=="],
|
||||
@ -336,6 +490,12 @@
|
||||
|
||||
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
||||
|
||||
"unzipper": ["unzipper@0.10.14", "", { "dependencies": { "big-integer": "^1.6.17", "binary": "~0.3.0", "bluebird": "~3.4.1", "buffer-indexof-polyfill": "~1.0.0", "duplexer2": "~0.1.4", "fstream": "^1.0.12", "graceful-fs": "^4.2.2", "listenercount": "~1.0.1", "readable-stream": "~2.3.6", "setimmediate": "~1.0.4" } }, "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g=="],
|
||||
|
||||
"util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
|
||||
|
||||
"uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
|
||||
"vite": ["vite@8.0.0-beta.15", "", { "dependencies": { "@oxc-project/runtime": "0.114.0", "lightningcss": "^1.31.1", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rolldown": "1.0.0-rc.5", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.0.0-alpha.31", "esbuild": "^0.27.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-RHX7IvsJlEfjyA1rS7MY0UsmF91etdLAamslHR5lfuO3W/BXRdXm2tRE64ztpSPZbKqB4wAAZ0AwtF6QzfKZLA=="],
|
||||
|
||||
"vscode-uri": ["vscode-uri@3.1.0", "", {}, "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ=="],
|
||||
@ -348,6 +508,16 @@
|
||||
|
||||
"vuedraggable": ["vuedraggable@4.1.0", "", { "dependencies": { "sortablejs": "1.14.0" }, "peerDependencies": { "vue": "^3.0.1" } }, "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww=="],
|
||||
|
||||
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
||||
|
||||
"xmlchars": ["xmlchars@2.2.0", "", {}, "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="],
|
||||
|
||||
"zip-stream": ["zip-stream@4.1.1", "", { "dependencies": { "archiver-utils": "^3.0.4", "compress-commons": "^4.1.2", "readable-stream": "^3.6.0" } }, "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ=="],
|
||||
|
||||
"@fast-csv/format/@types/node": ["@types/node@14.18.63", "", {}, "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ=="],
|
||||
|
||||
"@fast-csv/parse/@types/node": ["@types/node@14.18.63", "", {}, "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ=="],
|
||||
|
||||
"@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.8.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" }, "bundled": true }, "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg=="],
|
||||
|
||||
"@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.8.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg=="],
|
||||
@ -360,6 +530,36 @@
|
||||
|
||||
"@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"archiver-utils/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
||||
|
||||
"duplexer2/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
||||
|
||||
"glob/minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="],
|
||||
|
||||
"jszip/lie": ["lie@3.3.0", "", { "dependencies": { "immediate": "~3.0.5" } }, "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ=="],
|
||||
|
||||
"jszip/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
||||
|
||||
"lazystream/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
||||
|
||||
"rolldown/@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-rc.5", "", {}, "sha512-RxlLX/DPoarZ9PtxVrQgZhPoor987YtKQqCo5zkjX+0S0yLJ7Vv515Wk6+xtTL67VONKJKxETWZwuZjss2idYw=="],
|
||||
|
||||
"string_decoder/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||
|
||||
"unzipper/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
||||
|
||||
"zip-stream/archiver-utils": ["archiver-utils@3.0.4", "", { "dependencies": { "glob": "^7.2.3", "graceful-fs": "^4.2.0", "lazystream": "^1.0.0", "lodash.defaults": "^4.2.0", "lodash.difference": "^4.5.0", "lodash.flatten": "^4.4.0", "lodash.isplainobject": "^4.0.6", "lodash.union": "^4.6.0", "normalize-path": "^3.0.0", "readable-stream": "^3.6.0" } }, "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw=="],
|
||||
|
||||
"archiver-utils/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
||||
|
||||
"duplexer2/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
||||
|
||||
"glob/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="],
|
||||
|
||||
"jszip/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
||||
|
||||
"lazystream/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
||||
|
||||
"unzipper/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ag-grid-community/locale": "^35.1.0",
|
||||
"@iconify/vue": "^5.0.0",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@vueuse/core": "^14.2.1",
|
||||
"ag-grid-community": "^35.1.0",
|
||||
@ -19,8 +20,10 @@
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"decimal.js": "^10.6.0",
|
||||
"exceljs": "^4.4.0",
|
||||
"localforage": "^1.10.0",
|
||||
"lucide-vue-next": "^0.563.0",
|
||||
"motion-v": "^2.0.0",
|
||||
"pinia": "^3.0.4",
|
||||
"pinia-plugin-persistedstate": "^4.7.1",
|
||||
"reka-ui": "^2.8.0",
|
||||
|
||||
@ -10,6 +10,14 @@ import { useTabStore } from '@/pinia/tab'
|
||||
import { ArrowUp, Edit3, GripVertical, MoreHorizontal, Plus, Trash2, X } from 'lucide-vue-next'
|
||||
import { decodeZwArchive, encodeZwArchive } from '@/lib/zwArchive'
|
||||
import {
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogContent,
|
||||
AlertDialogDescription,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogPortal,
|
||||
AlertDialogRoot,
|
||||
AlertDialogTitle,
|
||||
ToastAction,
|
||||
ToastDescription,
|
||||
ToastProvider,
|
||||
@ -64,6 +72,8 @@ const editingContractId = ref<string | null>(null)
|
||||
const toastOpen = ref(false)
|
||||
const toastTitle = ref('操作成功')
|
||||
const toastText = ref('')
|
||||
const deleteConfirmOpen = ref(false)
|
||||
const pendingDeleteContractId = ref<string | null>(null)
|
||||
const modalOffset = ref({ x: 0, y: 0 })
|
||||
let dragStartX = 0
|
||||
let dragStartY = 0
|
||||
@ -125,6 +135,30 @@ const notify = (text: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
const pendingDeleteContractName = computed(() => {
|
||||
if (!pendingDeleteContractId.value) return ''
|
||||
const target = contracts.value.find(item => item.id === pendingDeleteContractId.value)
|
||||
return target?.name || pendingDeleteContractId.value
|
||||
})
|
||||
|
||||
const handleDeleteConfirmOpenChange = (open: boolean) => {
|
||||
deleteConfirmOpen.value = open
|
||||
if (!open) pendingDeleteContractId.value = null
|
||||
}
|
||||
|
||||
const requestDeleteContract = (id: string) => {
|
||||
pendingDeleteContractId.value = id
|
||||
deleteConfirmOpen.value = true
|
||||
}
|
||||
|
||||
const confirmDeleteContract = async () => {
|
||||
const id = pendingDeleteContractId.value
|
||||
if (!id) return
|
||||
await deleteContract(id)
|
||||
deleteConfirmOpen.value = false
|
||||
pendingDeleteContractId.value = null
|
||||
}
|
||||
|
||||
const closeContractDataMenu = () => {
|
||||
contractDataMenuOpen.value = false
|
||||
}
|
||||
@ -945,7 +979,7 @@ onBeforeUnmount(() => {
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
:class="[isListLayout ? 'h-6 w-6' : 'h-7 w-7', 'text-destructive']"
|
||||
@click.stop="deleteContract(element.id)"
|
||||
@click.stop="requestDeleteContract(element.id)"
|
||||
>
|
||||
<Trash2 :class="isListLayout ? 'h-3.5 w-3.5' : 'h-4 w-4'" />
|
||||
</Button>
|
||||
@ -1063,7 +1097,7 @@ onBeforeUnmount(() => {
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
:class="[isListLayout ? 'h-6 w-6' : 'h-7 w-7', 'text-destructive']"
|
||||
@click.stop="deleteContract(element.id)"
|
||||
@click.stop="requestDeleteContract(element.id)"
|
||||
>
|
||||
<Trash2 :class="isListLayout ? 'h-3.5 w-3.5' : 'h-4 w-4'" />
|
||||
</Button>
|
||||
@ -1150,6 +1184,25 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AlertDialogRoot :open="deleteConfirmOpen" @update:open="handleDeleteConfirmOpenChange">
|
||||
<AlertDialogPortal>
|
||||
<AlertDialogOverlay class="fixed inset-0 z-50 bg-black/45" />
|
||||
<AlertDialogContent class="fixed left-1/2 top-1/2 z-[70] w-[92vw] max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg border bg-background p-5 shadow-xl">
|
||||
<AlertDialogTitle class="text-base font-semibold">确认删除合同段</AlertDialogTitle>
|
||||
<AlertDialogDescription class="mt-2 text-sm text-muted-foreground">
|
||||
即将删除“{{ pendingDeleteContractName }}”及其关联咨询服务和计价数据,是否继续?
|
||||
</AlertDialogDescription>
|
||||
<div class="mt-4 flex items-center justify-end gap-2">
|
||||
<AlertDialogCancel as-child>
|
||||
<Button variant="outline">取消</Button>
|
||||
</AlertDialogCancel>
|
||||
<AlertDialogAction as-child>
|
||||
<Button variant="destructive" @click="confirmDeleteContract">确认删除</Button>
|
||||
</AlertDialogAction>
|
||||
</div>
|
||||
</AlertDialogContent>
|
||||
</AlertDialogPortal>
|
||||
</AlertDialogRoot>
|
||||
<ToastRoot
|
||||
v-model:open="toastOpen"
|
||||
:duration="1800"
|
||||
|
||||
@ -40,13 +40,27 @@ const DB_KEY = computed(() => `hourlyPricing-${props.contractId}-${props.service
|
||||
const PRICING_CLEAR_SKIP_PREFIX = 'pricing-clear-skip:'
|
||||
const PRICING_FORCE_DEFAULT_PREFIX = 'pricing-force-default:'
|
||||
const pricingPaneReloadStore = usePricingPaneReloadStore()
|
||||
const paneInstanceCreatedAt = Date.now()
|
||||
|
||||
const shouldSkipPersist = () => {
|
||||
const storageKey = `${PRICING_CLEAR_SKIP_PREFIX}${DB_KEY.value}`
|
||||
const raw = sessionStorage.getItem(storageKey)
|
||||
if (!raw) return false
|
||||
const now = Date.now()
|
||||
|
||||
if (raw.includes(':')) {
|
||||
const [issuedRaw, untilRaw] = raw.split(':')
|
||||
const issuedAt = Number(issuedRaw)
|
||||
const skipUntil = Number(untilRaw)
|
||||
if (Number.isFinite(issuedAt) && Number.isFinite(skipUntil) && now <= skipUntil) {
|
||||
return paneInstanceCreatedAt <= issuedAt
|
||||
}
|
||||
sessionStorage.removeItem(storageKey)
|
||||
return false
|
||||
}
|
||||
|
||||
const skipUntil = Number(raw)
|
||||
if (Number.isFinite(skipUntil) && Date.now() <= skipUntil) return true
|
||||
if (Number.isFinite(skipUntil) && now <= skipUntil) return true
|
||||
sessionStorage.removeItem(storageKey)
|
||||
return false
|
||||
}
|
||||
|
||||
@ -10,6 +10,18 @@ import { formatThousands } from '@/lib/numberFormat'
|
||||
import { syncPricingTotalToZxFw, ZXFW_RELOAD_SERVICE_KEY } from '@/lib/zxFwPricingSync'
|
||||
import { usePricingPaneReloadStore } from '@/pinia/pricingPaneReload'
|
||||
import { loadConsultCategoryFactorMap, loadMajorFactorMap } from '@/lib/xmFactorDefaults'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import {
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogContent,
|
||||
AlertDialogDescription,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogPortal,
|
||||
AlertDialogRoot,
|
||||
AlertDialogTitle,
|
||||
AlertDialogTrigger,
|
||||
} from 'reka-ui'
|
||||
|
||||
import { AG_GRID_LOCALE_CN } from '@ag-grid-community/locale';
|
||||
// 精简的边框配置(细线条+浅灰色,弱化分割线视觉)
|
||||
@ -59,14 +71,14 @@ const pricingPaneReloadStore = usePricingPaneReloadStore()
|
||||
const consultCategoryFactorMap = ref<Map<string, number | null>>(new Map())
|
||||
const majorFactorMap = ref<Map<string, number | null>>(new Map())
|
||||
let factorDefaultsLoaded = false
|
||||
const paneInstanceCreatedAt = Date.now()
|
||||
|
||||
const getDefaultConsultCategoryFactor = () =>
|
||||
consultCategoryFactorMap.value.get(String(props.serviceId)) ?? null
|
||||
|
||||
const getDefaultMajorFactorById = (id: string): number | null => majorFactorMap.value.get(id) ?? null
|
||||
|
||||
const ensureFactorDefaultsLoaded = async () => {
|
||||
if (factorDefaultsLoaded) return
|
||||
const loadFactorDefaults = async () => {
|
||||
const [consultMap, majorMap] = await Promise.all([
|
||||
loadConsultCategoryFactorMap(),
|
||||
loadMajorFactorMap()
|
||||
@ -76,12 +88,30 @@ const ensureFactorDefaultsLoaded = async () => {
|
||||
factorDefaultsLoaded = true
|
||||
}
|
||||
|
||||
const ensureFactorDefaultsLoaded = async () => {
|
||||
if (factorDefaultsLoaded) return
|
||||
await loadFactorDefaults()
|
||||
}
|
||||
|
||||
const shouldSkipPersist = () => {
|
||||
const storageKey = `${PRICING_CLEAR_SKIP_PREFIX}${DB_KEY.value}`
|
||||
const raw = sessionStorage.getItem(storageKey)
|
||||
if (!raw) return false
|
||||
const now = Date.now()
|
||||
|
||||
if (raw.includes(':')) {
|
||||
const [issuedRaw, untilRaw] = raw.split(':')
|
||||
const issuedAt = Number(issuedRaw)
|
||||
const skipUntil = Number(untilRaw)
|
||||
if (Number.isFinite(issuedAt) && Number.isFinite(skipUntil) && now <= skipUntil) {
|
||||
return paneInstanceCreatedAt <= issuedAt
|
||||
}
|
||||
sessionStorage.removeItem(storageKey)
|
||||
return false
|
||||
}
|
||||
|
||||
const skipUntil = Number(raw)
|
||||
if (Number.isFinite(skipUntil) && Date.now() <= skipUntil) return true
|
||||
if (Number.isFinite(skipUntil) && now <= skipUntil) return true
|
||||
sessionStorage.removeItem(storageKey)
|
||||
return false
|
||||
}
|
||||
@ -165,8 +195,8 @@ const buildDefaultRows = (): DetailRow[] => {
|
||||
majorName: child.name,
|
||||
amount: null,
|
||||
benchmarkBudget: null,
|
||||
consultCategoryFactor: getDefaultConsultCategoryFactor(),
|
||||
majorFactor: getDefaultMajorFactorById(child.id),
|
||||
consultCategoryFactor: null,
|
||||
majorFactor: null,
|
||||
budgetFee: null,
|
||||
remark: '',
|
||||
path: [group.id, child.id]
|
||||
@ -177,7 +207,12 @@ const buildDefaultRows = (): DetailRow[] => {
|
||||
}
|
||||
|
||||
type SourceRow = Pick<DetailRow, 'id'> & Partial<Pick<DetailRow, 'amount' | 'benchmarkBudget' | 'consultCategoryFactor' | 'majorFactor' | 'budgetFee' | 'remark'>>
|
||||
const mergeWithDictRows = (rowsFromDb: SourceRow[] | undefined): DetailRow[] => {
|
||||
const mergeWithDictRows = (
|
||||
rowsFromDb: SourceRow[] | undefined,
|
||||
options?: { includeAmount?: boolean; includeFactorValues?: boolean }
|
||||
): DetailRow[] => {
|
||||
const includeAmount = options?.includeAmount ?? true
|
||||
const includeFactorValues = options?.includeFactorValues ?? true
|
||||
const dbValueMap = new Map<string, SourceRow>()
|
||||
for (const row of rowsFromDb || []) {
|
||||
dbValueMap.set(row.id, row)
|
||||
@ -191,20 +226,24 @@ const mergeWithDictRows = (rowsFromDb: SourceRow[] | undefined): DetailRow[] =>
|
||||
|
||||
return {
|
||||
...row,
|
||||
amount: typeof fromDb.amount === 'number' ? fromDb.amount : null,
|
||||
amount: includeAmount && typeof fromDb.amount === 'number' ? fromDb.amount : null,
|
||||
benchmarkBudget: typeof fromDb.benchmarkBudget === 'number' ? fromDb.benchmarkBudget : null,
|
||||
consultCategoryFactor:
|
||||
typeof fromDb.consultCategoryFactor === 'number'
|
||||
? fromDb.consultCategoryFactor
|
||||
: hasConsultCategoryFactor
|
||||
? null
|
||||
: getDefaultConsultCategoryFactor(),
|
||||
!includeFactorValues
|
||||
? null
|
||||
: typeof fromDb.consultCategoryFactor === 'number'
|
||||
? fromDb.consultCategoryFactor
|
||||
: hasConsultCategoryFactor
|
||||
? null
|
||||
: getDefaultConsultCategoryFactor(),
|
||||
majorFactor:
|
||||
typeof fromDb.majorFactor === 'number'
|
||||
? fromDb.majorFactor
|
||||
: hasMajorFactor
|
||||
? null
|
||||
: getDefaultMajorFactorById(row.id),
|
||||
!includeFactorValues
|
||||
? null
|
||||
: typeof fromDb.majorFactor === 'number'
|
||||
? fromDb.majorFactor
|
||||
: hasMajorFactor
|
||||
? null
|
||||
: getDefaultMajorFactorById(row.id),
|
||||
budgetFee: typeof fromDb.budgetFee === 'number' ? fromDb.budgetFee : null,
|
||||
remark: typeof fromDb.remark === 'string' ? fromDb.remark : ''
|
||||
}
|
||||
@ -226,21 +265,10 @@ const formatEditableNumber = (params: any) => {
|
||||
}
|
||||
|
||||
const formatConsultCategoryFactor = (params: any) => {
|
||||
if (params.node?.group) {
|
||||
const v = getDefaultConsultCategoryFactor()
|
||||
if (v == null) return ''
|
||||
return Number(v).toFixed(2)
|
||||
}
|
||||
return formatEditableNumber(params)
|
||||
}
|
||||
|
||||
const formatMajorFactor = (params: any) => {
|
||||
if (params.node?.group) {
|
||||
const groupId = String(params.node?.key || '')
|
||||
const v = getDefaultMajorFactorById(groupId)
|
||||
if (v == null) return ''
|
||||
return Number(v).toFixed(2)
|
||||
}
|
||||
return formatEditableNumber(params)
|
||||
}
|
||||
|
||||
@ -438,10 +466,13 @@ const saveToIndexedDB = async () => {
|
||||
|
||||
const loadFromIndexedDB = async () => {
|
||||
try {
|
||||
|
||||
await ensureFactorDefaultsLoaded()
|
||||
if (shouldForceDefaultLoad()) {
|
||||
const htData = await localforage.getItem<{ detailRows: SourceRow[] }>(HT_DB_KEY.value)
|
||||
detailRows.value = htData?.detailRows ? mergeWithDictRows(htData.detailRows) : buildDefaultRows()
|
||||
detailRows.value = htData?.detailRows
|
||||
? mergeWithDictRows(htData.detailRows, { includeAmount: false, includeFactorValues: false })
|
||||
: buildDefaultRows()
|
||||
return
|
||||
}
|
||||
|
||||
@ -453,7 +484,7 @@ const loadFromIndexedDB = async () => {
|
||||
|
||||
const htData = await localforage.getItem<{ detailRows: SourceRow[] }>(HT_DB_KEY.value)
|
||||
if (htData?.detailRows) {
|
||||
detailRows.value = mergeWithDictRows(htData.detailRows)
|
||||
detailRows.value = mergeWithDictRows(htData.detailRows, { includeAmount: false, includeFactorValues: false })
|
||||
return
|
||||
}
|
||||
|
||||
@ -464,6 +495,25 @@ const loadFromIndexedDB = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const importContractData = async () => {
|
||||
try {
|
||||
// 使用默认数据时,强制读取最新的项目系数(预算取值优先,空值回退标准系数)
|
||||
await loadFactorDefaults()
|
||||
const htData = await localforage.getItem<{ detailRows: SourceRow[] }>(HT_DB_KEY.value)
|
||||
const hasContractRows = Array.isArray(htData?.detailRows) && htData.detailRows.length > 0
|
||||
detailRows.value = hasContractRows
|
||||
? mergeWithDictRows(htData!.detailRows, { includeFactorValues: true })
|
||||
: buildDefaultRows().map(row => ({
|
||||
...row,
|
||||
consultCategoryFactor: getDefaultConsultCategoryFactor(),
|
||||
majorFactor: getDefaultMajorFactorById(row.id)
|
||||
}))
|
||||
await saveToIndexedDB()
|
||||
} catch (error) {
|
||||
console.error('importContractData failed:', error)
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => pricingPaneReloadStore.getReloadVersion(props.contractId, props.serviceId),
|
||||
(nextVersion, prevVersion) => {
|
||||
@ -521,7 +571,28 @@ const processCellFromClipboard = (params: any) => {
|
||||
<div class="rounded-lg border bg-card xmMx flex min-h-0 flex-1 flex-col">
|
||||
<div class="flex items-center justify-between border-b px-4 py-3">
|
||||
<h3 class="text-sm font-semibold text-foreground">投资规模明细</h3>
|
||||
<div class="text-xs text-muted-foreground">导入导出</div>
|
||||
<AlertDialogRoot>
|
||||
<AlertDialogTrigger as-child>
|
||||
<Button type="button" variant="outline" size="sm">使用默认数据</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogPortal>
|
||||
<AlertDialogOverlay class="fixed inset-0 z-50 bg-black/45" />
|
||||
<AlertDialogContent class="fixed left-1/2 top-1/2 z-50 w-[92vw] max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg border bg-background p-5 shadow-xl">
|
||||
<AlertDialogTitle class="text-base font-semibold">确认覆盖当前明细</AlertDialogTitle>
|
||||
<AlertDialogDescription class="mt-2 text-sm text-muted-foreground">
|
||||
将使用合同默认数据覆盖当前投资规模明细,是否继续?
|
||||
</AlertDialogDescription>
|
||||
<div class="mt-4 flex items-center justify-end gap-2">
|
||||
<AlertDialogCancel as-child>
|
||||
<Button variant="outline">取消</Button>
|
||||
</AlertDialogCancel>
|
||||
<AlertDialogAction as-child>
|
||||
<Button @click="importContractData">确认覆盖</Button>
|
||||
</AlertDialogAction>
|
||||
</div>
|
||||
</AlertDialogContent>
|
||||
</AlertDialogPortal>
|
||||
</AlertDialogRoot>
|
||||
</div>
|
||||
|
||||
<div class="ag-theme-quartz h-full min-h-0 w-full flex-1">
|
||||
|
||||
@ -10,6 +10,18 @@ import { formatThousands } from '@/lib/numberFormat'
|
||||
import { syncPricingTotalToZxFw, ZXFW_RELOAD_SERVICE_KEY } from '@/lib/zxFwPricingSync'
|
||||
import { usePricingPaneReloadStore } from '@/pinia/pricingPaneReload'
|
||||
import { loadConsultCategoryFactorMap, loadMajorFactorMap } from '@/lib/xmFactorDefaults'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import {
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogContent,
|
||||
AlertDialogDescription,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogPortal,
|
||||
AlertDialogRoot,
|
||||
AlertDialogTitle,
|
||||
AlertDialogTrigger,
|
||||
} from 'reka-ui'
|
||||
|
||||
import { AG_GRID_LOCALE_CN } from '@ag-grid-community/locale';
|
||||
// 精简的边框配置(细线条+浅灰色,弱化分割线视觉)
|
||||
@ -60,6 +72,7 @@ const pricingPaneReloadStore = usePricingPaneReloadStore()
|
||||
const consultCategoryFactorMap = ref<Map<string, number | null>>(new Map())
|
||||
const majorFactorMap = ref<Map<string, number | null>>(new Map())
|
||||
let factorDefaultsLoaded = false
|
||||
const paneInstanceCreatedAt = Date.now()
|
||||
|
||||
const detailRows = ref<DetailRow[]>([])
|
||||
const getDefaultConsultCategoryFactor = () =>
|
||||
@ -67,8 +80,7 @@ const getDefaultConsultCategoryFactor = () =>
|
||||
|
||||
const getDefaultMajorFactorById = (id: string): number | null => majorFactorMap.value.get(id) ?? null
|
||||
|
||||
const ensureFactorDefaultsLoaded = async () => {
|
||||
if (factorDefaultsLoaded) return
|
||||
const loadFactorDefaults = async () => {
|
||||
const [consultMap, majorMap] = await Promise.all([
|
||||
loadConsultCategoryFactorMap(),
|
||||
loadMajorFactorMap()
|
||||
@ -78,6 +90,11 @@ const ensureFactorDefaultsLoaded = async () => {
|
||||
factorDefaultsLoaded = true
|
||||
}
|
||||
|
||||
const ensureFactorDefaultsLoaded = async () => {
|
||||
if (factorDefaultsLoaded) return
|
||||
await loadFactorDefaults()
|
||||
}
|
||||
|
||||
const shouldForceDefaultLoad = () => {
|
||||
const storageKey = `${PRICING_FORCE_DEFAULT_PREFIX}${DB_KEY.value}`
|
||||
const raw = sessionStorage.getItem(storageKey)
|
||||
@ -91,8 +108,21 @@ const shouldSkipPersist = () => {
|
||||
const storageKey = `${PRICING_CLEAR_SKIP_PREFIX}${DB_KEY.value}`
|
||||
const raw = sessionStorage.getItem(storageKey)
|
||||
if (!raw) return false
|
||||
const now = Date.now()
|
||||
|
||||
if (raw.includes(':')) {
|
||||
const [issuedRaw, untilRaw] = raw.split(':')
|
||||
const issuedAt = Number(issuedRaw)
|
||||
const skipUntil = Number(untilRaw)
|
||||
if (Number.isFinite(issuedAt) && Number.isFinite(skipUntil) && now <= skipUntil) {
|
||||
return paneInstanceCreatedAt <= issuedAt
|
||||
}
|
||||
sessionStorage.removeItem(storageKey)
|
||||
return false
|
||||
}
|
||||
|
||||
const skipUntil = Number(raw)
|
||||
if (Number.isFinite(skipUntil) && Date.now() <= skipUntil) return true
|
||||
if (Number.isFinite(skipUntil) && now <= skipUntil) return true
|
||||
sessionStorage.removeItem(storageKey)
|
||||
return false
|
||||
}
|
||||
@ -167,8 +197,8 @@ const buildDefaultRows = (): DetailRow[] => {
|
||||
amount: null,
|
||||
landArea: null,
|
||||
benchmarkBudget: null,
|
||||
consultCategoryFactor: getDefaultConsultCategoryFactor(),
|
||||
majorFactor: getDefaultMajorFactorById(child.id),
|
||||
consultCategoryFactor: null,
|
||||
majorFactor: null,
|
||||
budgetFee: null,
|
||||
remark: '',
|
||||
path: [group.id, child.id]
|
||||
@ -179,7 +209,12 @@ const buildDefaultRows = (): DetailRow[] => {
|
||||
}
|
||||
|
||||
type SourceRow = Pick<DetailRow, 'id'> & Partial<Pick<DetailRow, 'amount' | 'landArea' | 'benchmarkBudget' | 'consultCategoryFactor' | 'majorFactor' | 'budgetFee' | 'remark'>>
|
||||
const mergeWithDictRows = (rowsFromDb: SourceRow[] | undefined): DetailRow[] => {
|
||||
const mergeWithDictRows = (
|
||||
rowsFromDb: SourceRow[] | undefined,
|
||||
options?: { includeScaleValues?: boolean; includeFactorValues?: boolean }
|
||||
): DetailRow[] => {
|
||||
const includeScaleValues = options?.includeScaleValues ?? true
|
||||
const includeFactorValues = options?.includeFactorValues ?? true
|
||||
const dbValueMap = new Map<string, SourceRow>()
|
||||
for (const row of rowsFromDb || []) {
|
||||
dbValueMap.set(row.id, row)
|
||||
@ -193,21 +228,25 @@ const mergeWithDictRows = (rowsFromDb: SourceRow[] | undefined): DetailRow[] =>
|
||||
|
||||
return {
|
||||
...row,
|
||||
amount: typeof fromDb.amount === 'number' ? fromDb.amount : null,
|
||||
landArea: typeof fromDb.landArea === 'number' ? fromDb.landArea : null,
|
||||
amount: includeScaleValues && typeof fromDb.amount === 'number' ? fromDb.amount : null,
|
||||
landArea: includeScaleValues && typeof fromDb.landArea === 'number' ? fromDb.landArea : null,
|
||||
benchmarkBudget: typeof fromDb.benchmarkBudget === 'number' ? fromDb.benchmarkBudget : null,
|
||||
consultCategoryFactor:
|
||||
typeof fromDb.consultCategoryFactor === 'number'
|
||||
? fromDb.consultCategoryFactor
|
||||
: hasConsultCategoryFactor
|
||||
? null
|
||||
: getDefaultConsultCategoryFactor(),
|
||||
!includeFactorValues
|
||||
? null
|
||||
: typeof fromDb.consultCategoryFactor === 'number'
|
||||
? fromDb.consultCategoryFactor
|
||||
: hasConsultCategoryFactor
|
||||
? null
|
||||
: getDefaultConsultCategoryFactor(),
|
||||
majorFactor:
|
||||
typeof fromDb.majorFactor === 'number'
|
||||
? fromDb.majorFactor
|
||||
: hasMajorFactor
|
||||
? null
|
||||
: getDefaultMajorFactorById(row.id),
|
||||
!includeFactorValues
|
||||
? null
|
||||
: typeof fromDb.majorFactor === 'number'
|
||||
? fromDb.majorFactor
|
||||
: hasMajorFactor
|
||||
? null
|
||||
: getDefaultMajorFactorById(row.id),
|
||||
budgetFee: typeof fromDb.budgetFee === 'number' ? fromDb.budgetFee : null,
|
||||
remark: typeof fromDb.remark === 'string' ? fromDb.remark : ''
|
||||
}
|
||||
@ -229,21 +268,10 @@ const formatEditableNumber = (params: any) => {
|
||||
}
|
||||
|
||||
const formatConsultCategoryFactor = (params: any) => {
|
||||
if (params.node?.group) {
|
||||
const v = getDefaultConsultCategoryFactor()
|
||||
if (v == null) return ''
|
||||
return Number(v).toFixed(2)
|
||||
}
|
||||
return formatEditableNumber(params)
|
||||
}
|
||||
|
||||
const formatMajorFactor = (params: any) => {
|
||||
if (params.node?.group) {
|
||||
const groupId = String(params.node?.key || '')
|
||||
const v = getDefaultMajorFactorById(groupId)
|
||||
if (v == null) return ''
|
||||
return Number(v).toFixed(2)
|
||||
}
|
||||
return formatEditableNumber(params)
|
||||
}
|
||||
|
||||
@ -444,7 +472,9 @@ const loadFromIndexedDB = async () => {
|
||||
await ensureFactorDefaultsLoaded()
|
||||
if (shouldForceDefaultLoad()) {
|
||||
const htData = await localforage.getItem<{ detailRows: SourceRow[] }>(HT_DB_KEY.value)
|
||||
detailRows.value = htData?.detailRows ? mergeWithDictRows(htData.detailRows) : buildDefaultRows()
|
||||
detailRows.value = htData?.detailRows
|
||||
? mergeWithDictRows(htData.detailRows, { includeScaleValues: false, includeFactorValues: false })
|
||||
: buildDefaultRows()
|
||||
return
|
||||
}
|
||||
|
||||
@ -456,7 +486,7 @@ const loadFromIndexedDB = async () => {
|
||||
|
||||
const htData = await localforage.getItem<{ detailRows: SourceRow[] }>(HT_DB_KEY.value)
|
||||
if (htData?.detailRows) {
|
||||
detailRows.value = mergeWithDictRows(htData.detailRows)
|
||||
detailRows.value = mergeWithDictRows(htData.detailRows, { includeScaleValues: false, includeFactorValues: false })
|
||||
return
|
||||
}
|
||||
|
||||
@ -467,6 +497,25 @@ const loadFromIndexedDB = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const importContractData = async () => {
|
||||
try {
|
||||
// 使用默认数据时,强制读取最新的项目系数(预算取值优先,空值回退标准系数)
|
||||
await loadFactorDefaults()
|
||||
const htData = await localforage.getItem<{ detailRows: SourceRow[] }>(HT_DB_KEY.value)
|
||||
const hasContractRows = Array.isArray(htData?.detailRows) && htData.detailRows.length > 0
|
||||
detailRows.value = hasContractRows
|
||||
? mergeWithDictRows(htData!.detailRows, { includeFactorValues: true })
|
||||
: buildDefaultRows().map(row => ({
|
||||
...row,
|
||||
consultCategoryFactor: getDefaultConsultCategoryFactor(),
|
||||
majorFactor: getDefaultMajorFactorById(row.id)
|
||||
}))
|
||||
await saveToIndexedDB()
|
||||
} catch (error) {
|
||||
console.error('importContractData failed:', error)
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => pricingPaneReloadStore.getReloadVersion(props.contractId, props.serviceId),
|
||||
(nextVersion, prevVersion) => {
|
||||
@ -524,7 +573,28 @@ const processCellFromClipboard = (params: any) => {
|
||||
<div class="rounded-lg border bg-card xmMx flex min-h-0 flex-1 flex-col">
|
||||
<div class="flex items-center justify-between border-b px-4 py-3">
|
||||
<h3 class="text-sm font-semibold text-foreground">用地规模明细</h3>
|
||||
<div class="text-xs text-muted-foreground">导入导出</div>
|
||||
<AlertDialogRoot>
|
||||
<AlertDialogTrigger as-child>
|
||||
<Button type="button" variant="outline" size="sm">使用默认数据</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogPortal>
|
||||
<AlertDialogOverlay class="fixed inset-0 z-50 bg-black/45" />
|
||||
<AlertDialogContent class="fixed left-1/2 top-1/2 z-50 w-[92vw] max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg border bg-background p-5 shadow-xl">
|
||||
<AlertDialogTitle class="text-base font-semibold">确认覆盖当前明细</AlertDialogTitle>
|
||||
<AlertDialogDescription class="mt-2 text-sm text-muted-foreground">
|
||||
将使用合同默认数据覆盖当前用地规模明细,是否继续?
|
||||
</AlertDialogDescription>
|
||||
<div class="mt-4 flex items-center justify-end gap-2">
|
||||
<AlertDialogCancel as-child>
|
||||
<Button variant="outline">取消</Button>
|
||||
</AlertDialogCancel>
|
||||
<AlertDialogAction as-child>
|
||||
<Button @click="importContractData">确认覆盖</Button>
|
||||
</AlertDialogAction>
|
||||
</div>
|
||||
</AlertDialogContent>
|
||||
</AlertDialogPortal>
|
||||
</AlertDialogRoot>
|
||||
</div>
|
||||
|
||||
<div class="ag-theme-quartz h-full min-h-0 w-full flex-1">
|
||||
|
||||
@ -45,6 +45,7 @@ const PRICING_FORCE_DEFAULT_PREFIX = 'pricing-force-default:'
|
||||
const pricingPaneReloadStore = usePricingPaneReloadStore()
|
||||
const consultCategoryFactorMap = ref<Map<string, number | null>>(new Map())
|
||||
let factorDefaultsLoaded = false
|
||||
const paneInstanceCreatedAt = Date.now()
|
||||
|
||||
const getDefaultConsultCategoryFactor = () =>
|
||||
consultCategoryFactorMap.value.get(String(props.serviceId)) ?? null
|
||||
@ -59,8 +60,21 @@ const shouldSkipPersist = () => {
|
||||
const storageKey = `${PRICING_CLEAR_SKIP_PREFIX}${DB_KEY.value}`
|
||||
const raw = sessionStorage.getItem(storageKey)
|
||||
if (!raw) return false
|
||||
const now = Date.now()
|
||||
|
||||
if (raw.includes(':')) {
|
||||
const [issuedRaw, untilRaw] = raw.split(':')
|
||||
const issuedAt = Number(issuedRaw)
|
||||
const skipUntil = Number(untilRaw)
|
||||
if (Number.isFinite(issuedAt) && Number.isFinite(skipUntil) && now <= skipUntil) {
|
||||
return paneInstanceCreatedAt <= issuedAt
|
||||
}
|
||||
sessionStorage.removeItem(storageKey)
|
||||
return false
|
||||
}
|
||||
|
||||
const skipUntil = Number(raw)
|
||||
if (Number.isFinite(skipUntil) && Date.now() <= skipUntil) return true
|
||||
if (Number.isFinite(skipUntil) && now <= skipUntil) return true
|
||||
sessionStorage.removeItem(storageKey)
|
||||
return false
|
||||
}
|
||||
@ -78,7 +92,8 @@ const detailRows = ref<DetailRow[]>([])
|
||||
|
||||
type taskLite = {
|
||||
serviceID: number
|
||||
code: string
|
||||
code?: string
|
||||
ref?: string
|
||||
name: string
|
||||
basicParam: string
|
||||
unit: string
|
||||
@ -116,11 +131,12 @@ const buildDefaultRows = (): DetailRow[] => {
|
||||
|
||||
for (const [order, taskId] of sourceTaskIds.entries()) {
|
||||
const task = (taskList as Record<string, taskLite | undefined>)[String(taskId)]
|
||||
if (!task?.code || !task?.name) continue
|
||||
const taskCode = task?.code || task?.ref || ''
|
||||
if (!taskCode || !task?.name) continue
|
||||
const rowId = `task-${taskId}-${order}`
|
||||
rows.push({
|
||||
id: rowId,
|
||||
taskCode: task.code,
|
||||
taskCode,
|
||||
taskName: task.name,
|
||||
unit: task.unit || '',
|
||||
conversion: typeof task.conversion === 'number' && Number.isFinite(task.conversion) ? task.conversion : null,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import type { ComponentPublicInstance } from 'vue'
|
||||
import { computed, defineComponent, h, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import type { ComponentPublicInstance, PropType } from 'vue'
|
||||
import { AgGridVue } from 'ag-grid-vue3'
|
||||
import type { ColDef, GridOptions, ICellRendererParams } from 'ag-grid-community'
|
||||
import localforage from 'localforage'
|
||||
@ -8,10 +8,18 @@ import { myTheme ,gridOptions} from '@/lib/diyAgGridOptions'
|
||||
import { AG_GRID_LOCALE_CN } from '@ag-grid-community/locale'
|
||||
import { addNumbers } from '@/lib/decimal'
|
||||
import { formatThousands, formatThousandsFlexible } from '@/lib/numberFormat'
|
||||
import { getPricingMethodTotalsForService, getPricingMethodTotalsForServices } from '@/lib/pricingMethodTotals'
|
||||
import { getPricingMethodTotalsForServices } from '@/lib/pricingMethodTotals'
|
||||
import { ZXFW_RELOAD_SERVICE_KEY } from '@/lib/zxFwPricingSync'
|
||||
import { Search } from 'lucide-vue-next'
|
||||
import {
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogContent,
|
||||
AlertDialogDescription,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogPortal,
|
||||
AlertDialogRoot,
|
||||
AlertDialogTitle,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
@ -22,6 +30,7 @@ import {
|
||||
DialogTrigger
|
||||
} from 'reka-ui'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { serviceList } from '@/sql'
|
||||
import { useTabStore } from '@/pinia/tab'
|
||||
import { usePricingPaneReloadStore } from '@/pinia/pricingPaneReload'
|
||||
@ -153,6 +162,8 @@ function handleSnapHostScroll() {
|
||||
const pickerOpen = ref(false)
|
||||
const pickerTempIds = ref<string[]>([])
|
||||
const pickerSearch = ref('')
|
||||
const clearConfirmOpen = ref(false)
|
||||
const pendingClearServiceId = ref<string | null>(null)
|
||||
const dragSelecting = ref(false)
|
||||
const dragMoved = ref(false)
|
||||
let dragSelectChecked = false
|
||||
@ -170,6 +181,39 @@ const selectedServiceText = computed(() => {
|
||||
return `${names.slice(0, 2).join('、')} 等 ${names.length} 项`
|
||||
})
|
||||
|
||||
const pendingClearServiceName = computed(() => {
|
||||
if (!pendingClearServiceId.value) return ''
|
||||
const row = detailRows.value.find(item => item.id === pendingClearServiceId.value)
|
||||
if (row) return `${row.code}${row.name}`
|
||||
const dict = serviceById.get(pendingClearServiceId.value)
|
||||
if (dict) return `${dict.code}${dict.name}`
|
||||
return pendingClearServiceId.value
|
||||
})
|
||||
|
||||
const handleClearConfirmOpenChange = (open: boolean) => {
|
||||
clearConfirmOpen.value = open
|
||||
}
|
||||
|
||||
const requestClearRow = (row: DetailRow) => {
|
||||
if (isFixedRow(row)) return
|
||||
pendingClearServiceId.value = row.id
|
||||
clearConfirmOpen.value = true
|
||||
}
|
||||
|
||||
const confirmClearRow = async () => {
|
||||
const id = pendingClearServiceId.value
|
||||
if (!id) return
|
||||
const row = detailRows.value.find(item => item.id === id)
|
||||
if (!row || isFixedRow(row)) {
|
||||
clearConfirmOpen.value = false
|
||||
pendingClearServiceId.value = null
|
||||
return
|
||||
}
|
||||
await clearRowValues(row)
|
||||
clearConfirmOpen.value = false
|
||||
pendingClearServiceId.value = null
|
||||
}
|
||||
|
||||
const filteredServiceDict = computed(() => {
|
||||
const keyword = pickerSearch.value.trim()
|
||||
if (!keyword) return serviceDict
|
||||
@ -198,6 +242,26 @@ const numericParser = (newValue: any): number | null => {
|
||||
|
||||
const valueOrZero = (v: number | null | undefined) => (typeof v === 'number' ? v : 0)
|
||||
|
||||
const getMethodTotalFromRows = (
|
||||
rows: DetailRow[],
|
||||
field: 'investScale' | 'landScale' | 'workload' | 'hourly'
|
||||
) =>
|
||||
rows.reduce((sum, row) => {
|
||||
if (isFixedRow(row)) return sum
|
||||
return addNumbers(sum, valueOrZero(row[field]))
|
||||
}, 0)
|
||||
|
||||
const getMethodTotal = (field: 'investScale' | 'landScale' | 'workload' | 'hourly') =>
|
||||
getMethodTotalFromRows(detailRows.value, field)
|
||||
|
||||
const getFixedRowSubtotal = () =>
|
||||
addNumbers(
|
||||
getMethodTotal('investScale'),
|
||||
getMethodTotal('landScale'),
|
||||
getMethodTotal('workload'),
|
||||
getMethodTotal('hourly')
|
||||
)
|
||||
|
||||
const getPricingPaneStorageKeys = (serviceId: string) => [
|
||||
`tzGMF-${props.contractId}-${serviceId}`,
|
||||
`ydGMF-${props.contractId}-${serviceId}`,
|
||||
@ -207,9 +271,11 @@ const getPricingPaneStorageKeys = (serviceId: string) => [
|
||||
|
||||
const clearPricingPaneValues = async (serviceId: string) => {
|
||||
const keys = getPricingPaneStorageKeys(serviceId)
|
||||
const skipUntil = Date.now() + PRICING_CLEAR_SKIP_TTL_MS
|
||||
const clearIssuedAt = Date.now()
|
||||
const skipUntil = clearIssuedAt + PRICING_CLEAR_SKIP_TTL_MS
|
||||
const skipToken = `${clearIssuedAt}:${skipUntil}`
|
||||
for (const key of keys) {
|
||||
sessionStorage.setItem(`${PRICING_CLEAR_SKIP_PREFIX}${key}`, String(skipUntil))
|
||||
sessionStorage.setItem(`${PRICING_CLEAR_SKIP_PREFIX}${key}`, skipToken)
|
||||
sessionStorage.setItem(`${PRICING_FORCE_DEFAULT_PREFIX}${key}`, String(skipUntil))
|
||||
}
|
||||
await Promise.all(keys.map(key => localforage.removeItem(key)))
|
||||
@ -222,21 +288,37 @@ const clearRowValues = async (row: DetailRow) => {
|
||||
// 若该服务编辑页已打开,先关闭,避免子页面卸载时把旧数据写回缓? tabStore.removeTab(`zxfw-edit-${props.contractId}-${row.id}`)
|
||||
await nextTick()
|
||||
await clearPricingPaneValues(row.id)
|
||||
const totals = await getPricingMethodTotalsForService({
|
||||
contractId: props.contractId,
|
||||
serviceId: row.id
|
||||
})
|
||||
detailRows.value = detailRows.value.map(item =>
|
||||
// const totals = await getPricingMethodTotalsForService({
|
||||
// contractId: props.contractId,
|
||||
// serviceId: row.id
|
||||
// })
|
||||
const clearedRows = detailRows.value.map(item =>
|
||||
item.id !== row.id
|
||||
? item
|
||||
: {
|
||||
...item,
|
||||
investScale: totals.investScale,
|
||||
landScale: totals.landScale,
|
||||
workload: totals.workload,
|
||||
hourly: totals.hourly
|
||||
investScale: null,
|
||||
landScale: null,
|
||||
workload: null,
|
||||
hourly: null
|
||||
}
|
||||
)
|
||||
const nextInvestScale = getMethodTotalFromRows(clearedRows, 'investScale')
|
||||
const nextLandScale = getMethodTotalFromRows(clearedRows, 'landScale')
|
||||
const nextWorkload = getMethodTotalFromRows(clearedRows, 'workload')
|
||||
const nextHourly = getMethodTotalFromRows(clearedRows, 'hourly')
|
||||
detailRows.value = clearedRows.map(item =>
|
||||
isFixedRow(item)
|
||||
? {
|
||||
...item,
|
||||
investScale: nextInvestScale,
|
||||
landScale: nextLandScale,
|
||||
workload: nextWorkload,
|
||||
hourly: nextHourly,
|
||||
subtotal: addNumbers(nextInvestScale, nextLandScale, nextWorkload, nextHourly)
|
||||
}
|
||||
: item
|
||||
)
|
||||
await saveToIndexedDB()
|
||||
}
|
||||
|
||||
@ -249,6 +331,41 @@ const openEditTab = (row: DetailRow) => {
|
||||
})
|
||||
}
|
||||
|
||||
const ActionCellRenderer = defineComponent({
|
||||
name: 'ActionCellRenderer',
|
||||
props: {
|
||||
params: {
|
||||
type: Object as PropType<ICellRendererParams<DetailRow>>,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
return () => {
|
||||
if (isFixedRow(props.params.data)) return null
|
||||
return h('div', { class: 'zxfw-action-wrap' }, [
|
||||
h(TooltipRoot, null, {
|
||||
default: () => [
|
||||
h(TooltipTrigger, { asChild: true }, {
|
||||
default: () =>
|
||||
h('button', { class: 'zxfw-action-btn', 'data-action': 'edit' }, '✏️')
|
||||
}),
|
||||
h(TooltipContent, { side: 'top' }, { default: () => '编辑' })
|
||||
]
|
||||
}),
|
||||
h(TooltipRoot, null, {
|
||||
default: () => [
|
||||
h(TooltipTrigger, { asChild: true }, {
|
||||
default: () =>
|
||||
h('button', { class: 'zxfw-action-btn', 'data-action': 'clear' }, '🧹')
|
||||
}),
|
||||
h(TooltipContent, { side: 'top' }, { default: () => '清空' })
|
||||
]
|
||||
})
|
||||
])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const columnDefs: ColDef<DetailRow>[] = [
|
||||
{ headerName: '编码', field: 'code', minWidth: 50, maxWidth: 100 },
|
||||
{ headerName: '名称', field: 'name', minWidth: 250, flex: 3, tooltipField: 'name' },
|
||||
@ -261,6 +378,11 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
cellClass: 'ag-right-aligned-cell',
|
||||
editable: false,
|
||||
|
||||
valueGetter: params => {
|
||||
if (!params.data) return null
|
||||
if (isFixedRow(params.data)) return getMethodTotal('investScale')
|
||||
return params.data.investScale
|
||||
},
|
||||
valueParser: params => numericParser(params.newValue),
|
||||
valueFormatter: params => (params.value == null ? '' : formatThousands(params.value))
|
||||
},
|
||||
@ -273,6 +395,11 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
cellClass: 'ag-right-aligned-cell',
|
||||
editable: false,
|
||||
|
||||
valueGetter: params => {
|
||||
if (!params.data) return null
|
||||
if (isFixedRow(params.data)) return getMethodTotal('landScale')
|
||||
return params.data.landScale
|
||||
},
|
||||
valueParser: params => numericParser(params.newValue),
|
||||
valueFormatter: params => (params.value == null ? '' : formatThousandsFlexible(params.value, 2))
|
||||
},
|
||||
@ -285,6 +412,11 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
cellClass: 'ag-right-aligned-cell',
|
||||
editable: false,
|
||||
|
||||
valueGetter: params => {
|
||||
if (!params.data) return null
|
||||
if (isFixedRow(params.data)) return getMethodTotal('workload')
|
||||
return params.data.workload
|
||||
},
|
||||
// editable: params => !params.node?.rowPinned && !isFixedRow(params.data),
|
||||
valueParser: params => numericParser(params.newValue),
|
||||
valueFormatter: params => (params.value == null ? '' : formatThousands(params.value))
|
||||
@ -298,6 +430,11 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
cellClass: 'ag-right-aligned-cell',
|
||||
editable: false,
|
||||
|
||||
valueGetter: params => {
|
||||
if (!params.data) return null
|
||||
if (isFixedRow(params.data)) return getMethodTotal('hourly')
|
||||
return params.data.hourly
|
||||
},
|
||||
// editable: params => !params.node?.rowPinned && !isFixedRow(params.data),
|
||||
valueParser: params => numericParser(params.newValue),
|
||||
valueFormatter: params => (params.value == null ? '' : formatThousands(params.value))
|
||||
@ -313,6 +450,7 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
editable: false,
|
||||
valueGetter: params => {
|
||||
if (!params.data) return null
|
||||
if (isFixedRow(params.data)) return getFixedRowSubtotal()
|
||||
return addNumbers(
|
||||
valueOrZero(params.data.investScale),
|
||||
valueOrZero(params.data.landScale),
|
||||
@ -332,14 +470,7 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
sortable: false,
|
||||
filter: false,
|
||||
suppressMovable: true,
|
||||
cellRenderer: (params: ICellRendererParams<DetailRow>) =>
|
||||
isFixedRow(params.data)
|
||||
? ''
|
||||
: `<div class="zxfw-action-wrap">
|
||||
<button class="zxfw-action-btn" data-action="edit" title="编辑">✏️</button>
|
||||
|
||||
<button class="zxfw-action-btn" data-action="clear" title="清空(重置到默认状态)">🧹</button>
|
||||
</div>`
|
||||
cellRenderer: ActionCellRenderer
|
||||
}
|
||||
]
|
||||
|
||||
@ -353,7 +484,7 @@ const detailGridOptions: GridOptions<DetailRow> = {
|
||||
const btn = target?.closest('button[data-action]') as HTMLButtonElement | null
|
||||
const action = btn?.dataset.action
|
||||
if (action === 'clear') {
|
||||
await clearRowValues(params.data)
|
||||
requestClearRow(params.data)
|
||||
return
|
||||
}
|
||||
if (action === 'edit') {
|
||||
@ -457,7 +588,7 @@ const handlePickerOpenChange = (open: boolean) => {
|
||||
const confirmPicker = async () => {
|
||||
applySelection(pickerTempIds.value)
|
||||
try {
|
||||
await fillPricingTotalsForSelectedRows()
|
||||
// await fillPricingTotalsForSelectedRows()
|
||||
await saveToIndexedDB()
|
||||
} catch (error) {
|
||||
console.error('confirmPicker failed:', error)
|
||||
@ -469,15 +600,7 @@ const clearPickerSelection = () => {
|
||||
pickerTempIds.value = []
|
||||
}
|
||||
|
||||
const toggleServiceCode = (code: string, checked: boolean) => {
|
||||
if (checked) {
|
||||
if (!pickerTempIds.value.includes(code)) {
|
||||
pickerTempIds.value = [...pickerTempIds.value, code]
|
||||
}
|
||||
return
|
||||
}
|
||||
pickerTempIds.value = pickerTempIds.value.filter(item => item !== code)
|
||||
}
|
||||
|
||||
|
||||
const applyTempChecked = (code: string, checked: boolean) => {
|
||||
const exists = pickerTempIds.value.includes(code)
|
||||
@ -608,7 +731,7 @@ const loadFromIndexedDB = async () => {
|
||||
})
|
||||
|
||||
try {
|
||||
await fillPricingTotalsForSelectedRows()
|
||||
// await fillPricingTotalsForSelectedRows()
|
||||
} catch (error) {
|
||||
console.error('fillPricingTotalsForSelectedRows failed:', error)
|
||||
}
|
||||
@ -659,7 +782,8 @@ onBeforeUnmount(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="rootRef" class="space-y-6">
|
||||
<TooltipProvider>
|
||||
<div ref="rootRef" class="space-y-6">
|
||||
<DialogRoot v-model:open="pickerOpen" @update:open="handlePickerOpenChange">
|
||||
<div class="rounded-lg border bg-card p-4 shadow-sm shrink-0">
|
||||
<div class="mb-2 flex items-center justify-between gap-3">
|
||||
@ -668,13 +792,17 @@ onBeforeUnmount(() => {
|
||||
<div class="flex items-center gap-2">
|
||||
<input :value="selectedServiceText" readonly placeholder="请点击右侧“浏览”选择服务"
|
||||
class="h-10 w-full rounded-md border bg-background px-3 text-sm text-foreground outline-none" />
|
||||
<DialogTrigger as-child>
|
||||
<button type="button"
|
||||
class="inline-flex h-10 w-10 items-center justify-center rounded-md border text-sm hover:bg-accent cursor-pointer"
|
||||
title="浏览服务词典">
|
||||
<Search class="h-4 w-4" />
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<TooltipRoot>
|
||||
<TooltipTrigger as-child>
|
||||
<DialogTrigger as-child>
|
||||
<button type="button"
|
||||
class="inline-flex h-10 w-10 items-center justify-center rounded-md border text-sm hover:bg-accent cursor-pointer">
|
||||
<Search class="h-4 w-4" />
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top">浏览服务词典</TooltipContent>
|
||||
</TooltipRoot>
|
||||
</div>
|
||||
</div>
|
||||
<DialogPortal>
|
||||
@ -754,5 +882,26 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<AlertDialogRoot :open="clearConfirmOpen" @update:open="handleClearConfirmOpenChange">
|
||||
<AlertDialogPortal>
|
||||
<AlertDialogOverlay class="fixed inset-0 z-50 bg-black/45" />
|
||||
<AlertDialogContent class="fixed left-1/2 top-1/2 z-[70] w-[92vw] max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg border bg-background p-5 shadow-xl">
|
||||
<AlertDialogTitle class="text-base font-semibold">确认清空服务数据</AlertDialogTitle>
|
||||
<AlertDialogDescription class="mt-2 text-sm text-muted-foreground">
|
||||
将清空“{{ pendingClearServiceName }}”的计价数据是否继续?
|
||||
</AlertDialogDescription>
|
||||
<div class="mt-4 flex items-center justify-end gap-2">
|
||||
<AlertDialogCancel as-child>
|
||||
<Button variant="outline">取消</Button>
|
||||
</AlertDialogCancel>
|
||||
<AlertDialogAction as-child>
|
||||
<Button variant="destructive" @click="confirmClearRow">确认清空</Button>
|
||||
</AlertDialogAction>
|
||||
</div>
|
||||
</AlertDialogContent>
|
||||
</AlertDialogPortal>
|
||||
</AlertDialogRoot>
|
||||
|
||||
</div>
|
||||
</TooltipProvider>
|
||||
</template>
|
||||
|
||||
@ -485,7 +485,9 @@ const exportData = async () => {
|
||||
dataMenuOpen.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const exportReport = async ()=>{
|
||||
|
||||
}
|
||||
const triggerImport = () => {
|
||||
importFileRef.value?.click()
|
||||
}
|
||||
@ -629,17 +631,23 @@ watch(
|
||||
v-if="dataMenuOpen"
|
||||
class="absolute right-0 top-full mt-1 z-50 min-w-[108px] rounded-md border bg-background p-1 shadow-md"
|
||||
>
|
||||
<button
|
||||
class="w-full cursor-pointer rounded px-3 py-1.5 text-left text-sm hover:bg-muted"
|
||||
@click="triggerImport"
|
||||
>
|
||||
导入
|
||||
</button>
|
||||
<button
|
||||
class="w-full cursor-pointer rounded px-3 py-1.5 text-left text-sm hover:bg-muted"
|
||||
@click="exportData"
|
||||
>
|
||||
导出
|
||||
</button>
|
||||
<button
|
||||
<button
|
||||
class="w-full cursor-pointer rounded px-3 py-1.5 text-left text-sm hover:bg-muted"
|
||||
@click="triggerImport"
|
||||
@click="exportReport"
|
||||
>
|
||||
导入
|
||||
导出报表
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
|
||||
@ -1,8 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onBeforeUnmount, ref, watch, type Component } from 'vue'
|
||||
import { computed, onBeforeUnmount, ref, watch, type Component ,onMounted} from 'vue'
|
||||
import { ScrollArea } from '@/components/ui/scroll-area'
|
||||
import { Button } from '@/components/ui/button'
|
||||
|
||||
import {
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogOverlay,
|
||||
DialogPortal,
|
||||
DialogRoot,
|
||||
DialogTitle,
|
||||
DialogTrigger,DialogDescription
|
||||
} from 'reka-ui'
|
||||
import { Icon } from '@iconify/vue'
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { animate, AnimatePresence, Motion, useMotionValue, useMotionValueEvent, useTransform } from 'motion-v'
|
||||
interface TypeLineCategory {
|
||||
key: string
|
||||
label: string
|
||||
@ -59,6 +70,7 @@ const activeComponent = computed(() => {
|
||||
})
|
||||
|
||||
const copyBtnText = ref('复制')
|
||||
const sheetOpen = ref(false)
|
||||
let copyBtnTimer: ReturnType<typeof setTimeout> | null = null
|
||||
|
||||
const handleCopySubtitle = async () => {
|
||||
@ -81,7 +93,91 @@ const handleCopySubtitle = async () => {
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (copyBtnTimer) clearTimeout(copyBtnTimer)
|
||||
if (!root) return
|
||||
root.style.scale = ''
|
||||
root.style.translate = ''
|
||||
root.style.borderRadius = ''
|
||||
})
|
||||
|
||||
//
|
||||
|
||||
|
||||
const inertiaTransition = {
|
||||
type: 'inertia' as const,
|
||||
bounceStiffness: 300,
|
||||
bounceDamping: 40,
|
||||
timeConstant: 300,
|
||||
}
|
||||
|
||||
const staticTransition = {
|
||||
duration: 0.5,
|
||||
ease: [0.32, 0.72, 0, 1] as const,
|
||||
}
|
||||
|
||||
const SHEET_TOP_RATIO = 0.1
|
||||
const SHEET_RADIUS = 12
|
||||
const OFFICIAL_SITE_URL = 'http://www.zwgczx.com.cn/'
|
||||
|
||||
let root: HTMLElement | null = null
|
||||
|
||||
onMounted(() => {
|
||||
root = document.body.firstElementChild as HTMLElement | null
|
||||
})
|
||||
|
||||
const { height, width } = useWindowSize()
|
||||
|
||||
const sheetTop = computed(() => Math.round(height.value * SHEET_TOP_RATIO))
|
||||
const h = computed(() => Math.max(0, height.value - sheetTop.value))
|
||||
const y = useMotionValue(h.value)
|
||||
|
||||
watch(
|
||||
() => h.value,
|
||||
(nextHeight) => {
|
||||
if (!sheetOpen.value) y.jump(nextHeight)
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => sheetOpen.value,
|
||||
(isOpen) => {
|
||||
if (!isOpen) {
|
||||
y.jump(h.value)
|
||||
return
|
||||
}
|
||||
y.jump(h.value)
|
||||
animate(y, 0, staticTransition)
|
||||
}
|
||||
)
|
||||
|
||||
// Scale the body down and adjust the border radius when the sheet is open.
|
||||
const bodyScale = useTransform(
|
||||
y,
|
||||
[0, h.value],
|
||||
[(width.value - sheetTop.value) / width.value, 1],
|
||||
)
|
||||
const bodyTranslate = useTransform(y, [0, h.value], [sheetTop.value - SHEET_RADIUS, 0])
|
||||
const bodyBorderRadius = useTransform(y, [0, h.value], [SHEET_RADIUS, 0])
|
||||
|
||||
useMotionValueEvent(bodyScale, 'change', (v) => {
|
||||
if (!root) return
|
||||
root.style.scale = `${v}`
|
||||
})
|
||||
useMotionValueEvent(
|
||||
bodyTranslate,
|
||||
'change',
|
||||
(v) => {
|
||||
if (!root) return
|
||||
root.style.translate = `0 ${v}px`
|
||||
},
|
||||
)
|
||||
useMotionValueEvent(
|
||||
bodyBorderRadius,
|
||||
'change',
|
||||
(v) => {
|
||||
if (!root) return
|
||||
root.style.borderRadius = `${v}px`
|
||||
},
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -140,6 +236,104 @@ onBeforeUnmount(() => {
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DialogRoot v-model:open="sheetOpen">
|
||||
<DialogTrigger as-child>
|
||||
<button
|
||||
type="button"
|
||||
class="absolute left-4 right-4 bottom-4 flex cursor-pointer flex-col items-center gap-1.5 rounded-lg border bg-muted/35 px-3 py-2 text-center text-[12px] leading-5 text-foreground/85 shadow-sm transition-colors hover:bg-muted/55 hover:text-foreground"
|
||||
>
|
||||
<img src="/favicon.ico" alt="众为咨询" class="h-5 w-5 shrink-0 rounded-sm" />
|
||||
<span>本网站由众为工程咨询有限公司提供免费技术支持</span>
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogPortal>
|
||||
<AnimatePresence
|
||||
multiple
|
||||
as="div"
|
||||
>
|
||||
<DialogOverlay as-child>
|
||||
<Motion
|
||||
class="fixed inset-0 z-10 bg-black/45 backdrop-blur-[2px]"
|
||||
:initial="{ opacity: 0 }"
|
||||
:animate="{ opacity: 1 }"
|
||||
:exit="{ opacity: 0 }"
|
||||
:transition="staticTransition"
|
||||
/>
|
||||
</DialogOverlay>
|
||||
|
||||
<DialogContent as-child>
|
||||
<Motion
|
||||
class="fixed inset-x-0 bottom-0 z-20 overflow-hidden rounded-t-2xl border border-border/60 bg-card/95 shadow-2xl backdrop-blur-xl will-change-transform"
|
||||
:style="{
|
||||
y,
|
||||
top: `${sheetTop}px`,
|
||||
}"
|
||||
drag="y"
|
||||
:drag-constraints="{ top: 0 }"
|
||||
@drag-end="(e, { offset, velocity }) => {
|
||||
if (offset.y > h * 0.35 || velocity.y > 10) {
|
||||
sheetOpen = false;
|
||||
}
|
||||
else {
|
||||
animate(y, 0, { ...inertiaTransition, min: 0, max: 0 });
|
||||
}
|
||||
}"
|
||||
>
|
||||
<div class="mx-auto mt-2 h-1.5 w-12 cursor-grab rounded-full bg-muted-foreground/35 active:cursor-grabbing" />
|
||||
<div class="mx-auto flex h-full w-full max-w-2xl flex-col px-4 pb-5 pt-3">
|
||||
<div class="mb-3">
|
||||
<div class="flex justify-end">
|
||||
<DialogClose class="inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-muted-foreground/30 text-muted-foreground transition-colors hover:border-foreground/40 hover:text-foreground">
|
||||
<Icon icon="lucide:x" class="h-4 w-4" />
|
||||
</DialogClose>
|
||||
</div>
|
||||
<DialogTitle class="mt-2">
|
||||
<div class="flex items-center gap-3">
|
||||
<img src="/favicon.ico" alt="众为咨询" class="h-7 w-7 shrink-0 rounded-sm" />
|
||||
<span class="text-2xl font-semibold leading-none">关于我们</span>
|
||||
</div>
|
||||
</DialogTitle>
|
||||
</div>
|
||||
|
||||
<DialogDescription class="mb-4 text-base text-muted-foreground">
|
||||
<div class="flex items-center gap-2">
|
||||
<a
|
||||
:href="OFFICIAL_SITE_URL"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="inline-flex cursor-pointer items-center font-medium text-foreground transition-colors hover:text-primary hover:underline"
|
||||
>
|
||||
众为工程咨询有限公司
|
||||
</a>
|
||||
<a
|
||||
:href="OFFICIAL_SITE_URL"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border border-muted-foreground/30 text-muted-foreground transition-colors hover:border-foreground/40 hover:text-foreground"
|
||||
aria-label="跳转到官网首页"
|
||||
title="官网首页"
|
||||
>
|
||||
<Icon icon="lucide:arrow-up-right" class="h-4 w-4" />
|
||||
</a>
|
||||
</div>
|
||||
</DialogDescription>
|
||||
|
||||
<div class="space-y-4 overflow-y-auto pr-1 text-[15px] leading-7">
|
||||
<p>
|
||||
众为工程咨询有限公司 2009 年成立,专注工程造价与工程成本管控全过程咨询,是广东省政府审计入库优选单位。公司服务覆盖多领域、全类型客户,累计服务投资额超万亿元,深度参与港珠澳大桥、澳门大学横琴校区等国家级重点工程,参编三十余项国家及省市行业标准。
|
||||
</p>
|
||||
<p>
|
||||
公司立足大湾区,布局全球,设有澳门公司、斯里兰卡分公司,具备跨境与海外项目服务能力,以十五年专业沉淀、万亿级项目经验,为客户提供精准、可靠的工程咨询服务。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</Motion>
|
||||
</DialogContent>
|
||||
</AnimatePresence>
|
||||
</DialogPortal>
|
||||
</DialogRoot>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="w-88/100 min-h-0 h-full flex flex-col">
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
import {
|
||||
|
||||
GridOptions,
|
||||
themeQuartz
|
||||
} from "ag-grid-community"
|
||||
import { GridOptions, themeQuartz } from "ag-grid-community"
|
||||
const borderConfig = {
|
||||
style: "solid", // 虚线改实线更简洁,也可保留 dotted 但建议用 solid
|
||||
width: 0.3, // 更细的边框,减少视觉干扰
|
||||
@ -13,7 +9,7 @@ const borderConfig = {
|
||||
export const myTheme = themeQuartz.withParams({
|
||||
// 核心:移除外边框,减少视觉包裹感
|
||||
wrapperBorder: false,
|
||||
|
||||
|
||||
// 表头样式(柔和浅蓝,无加粗,更轻盈)
|
||||
headerBackgroundColor: "#f0f2f3", // 极浅的背景色,替代深一点的 #e7f3fc
|
||||
headerTextColor: "#374151", // 深灰色文字,比纯黑更柔和
|
||||
@ -24,8 +20,7 @@ export const myTheme = themeQuartz.withParams({
|
||||
rowBorder: borderConfig,
|
||||
columnBorder: borderConfig,
|
||||
headerRowBorder: borderConfig,
|
||||
|
||||
|
||||
|
||||
// 可选:偶数行背景色(轻微区分,更清新)
|
||||
dataBackgroundColor: "#fefefe"
|
||||
});
|
||||
@ -43,6 +38,8 @@ export const gridOptions: GridOptions<any> = {
|
||||
// },
|
||||
groupDefaultExpanded: -1,
|
||||
suppressFieldDotNotation: true,
|
||||
// Keep group expand/collapse state when rowData updates after edits/saves.
|
||||
getRowId: params => String(params.data?.id ?? params.data?.path?.join('/') ?? ''),
|
||||
getDataPath: data => data.path,
|
||||
getContextMenuItems: () => ['copy', 'paste', 'separator', 'export'],
|
||||
defaultColDef: {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import localforage from 'localforage'
|
||||
import { majorList, serviceList } from '@/sql'
|
||||
|
||||
const CONSULT_CATEGORY_FACTOR_KEY = 'xm-consult-category-factor-v1'
|
||||
const MAJOR_FACTOR_KEY = 'xm-major-factor-v1'
|
||||
@ -13,27 +14,51 @@ type XmFactorState = {
|
||||
detailRows?: XmFactorRow[]
|
||||
}
|
||||
|
||||
type FactorDictItem = {
|
||||
defCoe?: number | null
|
||||
}
|
||||
|
||||
type FactorDict = Record<string, FactorDictItem>
|
||||
|
||||
const toFiniteNumberOrNull = (value: unknown): number | null =>
|
||||
typeof value === 'number' && Number.isFinite(value) ? value : null
|
||||
|
||||
const resolveFactorValue = (row: Partial<XmFactorRow> | undefined): number | null => {
|
||||
if (!row) return null
|
||||
const budgetValue = toFiniteNumberOrNull(row.budgetValue)
|
||||
if (budgetValue != null) return budgetValue
|
||||
return toFiniteNumberOrNull(row.standardFactor)
|
||||
}
|
||||
|
||||
const loadFactorMap = async (storageKey: string): Promise<Map<string, number | null>> => {
|
||||
const data = await localforage.getItem<XmFactorState>(storageKey)
|
||||
const buildStandardFactorMap = (dict: FactorDict): Map<string, number | null> => {
|
||||
const map = new Map<string, number | null>()
|
||||
for (const row of data?.detailRows || []) {
|
||||
if (!row?.id) continue
|
||||
map.set(String(row.id), resolveFactorValue(row))
|
||||
for (const [id, item] of Object.entries(dict)) {
|
||||
map.set(String(id), toFiniteNumberOrNull(item?.defCoe))
|
||||
}
|
||||
return map
|
||||
}
|
||||
|
||||
export const loadConsultCategoryFactorMap = async () => loadFactorMap(CONSULT_CATEGORY_FACTOR_KEY)
|
||||
const resolveFactorValue = (
|
||||
row: Partial<XmFactorRow> | undefined,
|
||||
fallbackStandard: number | null
|
||||
): number | null => {
|
||||
if (!row) return null
|
||||
const budgetValue = toFiniteNumberOrNull(row.budgetValue)
|
||||
if (budgetValue != null) return budgetValue
|
||||
const standardFactor = toFiniteNumberOrNull(row.standardFactor)
|
||||
if (standardFactor != null) return standardFactor
|
||||
return fallbackStandard
|
||||
}
|
||||
|
||||
export const loadMajorFactorMap = async () => loadFactorMap(MAJOR_FACTOR_KEY)
|
||||
const loadFactorMap = async (
|
||||
storageKey: string,
|
||||
dict: FactorDict
|
||||
): Promise<Map<string, number | null>> => {
|
||||
const data = await localforage.getItem<XmFactorState>(storageKey)
|
||||
const map = buildStandardFactorMap(dict)
|
||||
for (const row of data?.detailRows || []) {
|
||||
if (!row?.id) continue
|
||||
const id = String(row.id)
|
||||
map.set(id, resolveFactorValue(row, map.get(id) ?? null))
|
||||
}
|
||||
return map
|
||||
}
|
||||
|
||||
export const loadConsultCategoryFactorMap = async () =>
|
||||
loadFactorMap(CONSULT_CATEGORY_FACTOR_KEY, serviceList as FactorDict)
|
||||
|
||||
export const loadMajorFactorMap = async () =>
|
||||
loadFactorMap(MAJOR_FACTOR_KEY, majorList as FactorDict)
|
||||
|
||||
878
src/sql.ts
878
src/sql.ts
@ -1,3 +1,4 @@
|
||||
// @ts-nocheck
|
||||
import { roundTo, toDecimal } from '@/lib/decimal'
|
||||
|
||||
export const majorList = {
|
||||
@ -67,44 +68,51 @@ export const serviceList = {
|
||||
};
|
||||
//basicParam预算基数
|
||||
|
||||
export const taskList = {
|
||||
0: { serviceID: 15, code: 'C4-1', name: '工程造价日常顾问', basicParam: '服务月份数', required: true, unit: '万元/月', conversion: 10000, maxPrice: 0.5, minPrice: 0.3, defPrice: 0.4, desc: '' },
|
||||
1: { serviceID: 15, code: 'C4-2', name: '工程造价专项顾问', basicParam: '服务项目的造价金额', required: true, unit: '%', conversion: 0.01, maxPrice: null, minPrice: null, defPrice: 0.01, desc: '适用于涉及造价费用类的顾问' },
|
||||
2: { serviceID: 16, code: 'C5-1', name: '组织与调研工作', basicParam: '调研次数', required: true, unit: '万元/次', conversion: 10000, maxPrice: 2, minPrice: 1, defPrice: 1.5, desc: '' },
|
||||
3: { serviceID: 16, code: 'C5-2-1', name: '文件编写工作', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 5, minPrice: 3, defPrice: 4, desc: '主编' },
|
||||
4: { serviceID: 16, code: 'C5-2-2', name: '文件编写工作', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 3, minPrice: 1, defPrice: 2, desc: '参编' },
|
||||
5: { serviceID: 16, code: 'C5-3-1', name: '评审工作', basicParam: '评审次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 20, minPrice: 8, defPrice: 14, desc: '大型评审' },
|
||||
6: { serviceID: 16, code: 'C5-3-2', name: '评审工作', basicParam: '评审次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '中型评审' },
|
||||
7: { serviceID: 16, code: 'C5-3-3', name: '评审工作', basicParam: '评审次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 6, minPrice: 3, defPrice: 4.5, desc: '小型评审' },
|
||||
8: { serviceID: 17, code: 'C6-1', name: '组织与调研工作', basicParam: '调研次数', required: true, unit: '万元/次', conversion: 10000, maxPrice: 2, minPrice: 1, defPrice: 1.5, desc: '' },
|
||||
9: { serviceID: 17, code: 'C6-2-1', name: '研究及编写报告', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 50, minPrice: 20, defPrice: 35, desc: '国家级' },
|
||||
10: { serviceID: 17, code: 'C6-2-2', name: '研究及编写报告', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 20, minPrice: 10, defPrice: 15, desc: '省部级' },
|
||||
11: { serviceID: 17, code: 'C6-2-3', name: '研究及编写报告', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '其他级' },
|
||||
12: { serviceID: 17, code: 'C6-3-1', name: '标准与技术性指导文件的编制', basicParam: '文件与标准的数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 80, minPrice: 50, defPrice: 65, desc: '复杂标准' },
|
||||
13: { serviceID: 17, code: 'C6-3-2', name: '标准与技术性指导文件的编制', basicParam: '文件与标准的数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 50, minPrice: 20, defPrice: 35, desc: '较复杂标准' },
|
||||
14: { serviceID: 17, code: 'C6-3-3', name: '标准与技术性指导文件的编制', basicParam: '文件与标准的数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 20, minPrice: 10, defPrice: 15, desc: '一般标准' },
|
||||
15: { serviceID: 17, code: 'C6-3-4', name: '标准与技术性指导文件的编制', basicParam: '文件与标准的数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '简单标准' },
|
||||
16: { serviceID: 17, code: 'C6-4-1', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 20, minPrice: 8, defPrice: 14, desc: '大型评审' },
|
||||
17: { serviceID: 17, code: 'C6-4-2', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '中型评审' },
|
||||
18: { serviceID: 17, code: 'C6-4-3', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 6, minPrice: 3, defPrice: 4.5, desc: '小型评审' },
|
||||
19: { serviceID: 17, code: 'C6-5-1', name: '培训与宣贯工作', basicParam: '项目数量', required: false, unit: '万元/次', conversion: 10000, maxPrice: 3, minPrice: 1, defPrice: 2, desc: '培训与宣贯材料' },
|
||||
20: { serviceID: 17, code: 'C6-5-2', name: '培训与宣贯工作', basicParam: '培训与宣贯次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 1, minPrice: 0.5, defPrice: 0.75, desc: '组织培训与宣贯' },
|
||||
21: { serviceID: 17, code: 'C6-6', name: '测试与验证工作', basicParam: '', required: false, unit: '%', conversion: 0.01, maxPrice: 50, minPrice: 30, defPrice: 40, desc: '' },
|
||||
22: { serviceID: 18, code: 'C7-1', name: '组织与调研工作', basicParam: '调研次数', required: true, unit: '万元/次', conversion: 10000, maxPrice: 2, minPrice: 1, defPrice: 1.5, desc: '' },
|
||||
23: { serviceID: 18, code: 'C7-2', name: '编制大纲', basicParam: '项目数量', required: true, unit: '万元/个', conversion: 10000, maxPrice: 3, minPrice: 2, defPrice: 2.5, desc: '包括技术与定额子目研究' },
|
||||
24: { serviceID: 18, code: 'C7-3', name: '数据采集与测定', basicParam: '采集组数', required: true, unit: '万元/组', conversion: 10000, maxPrice: 0.8, minPrice: 0.2, defPrice: 0.5, desc: '现场采集方式时计' },
|
||||
25: { serviceID: 18, code: 'C7-4-1', name: '数据整理与分析', basicParam: '定额子目条数', required: true, unit: '万元/条', conversion: 10000, maxPrice: 0.3, minPrice: 0.1, defPrice: 0.2, desc: '简单定额' },
|
||||
26: { serviceID: 18, code: 'C7-4-2', name: '数据整理与分析', basicParam: '定额子目条数', required: true, unit: '万元/条', conversion: 10000, maxPrice: 3, minPrice: 0.3, defPrice: 1.65, desc: '复杂定额' },
|
||||
27: { serviceID: 18, code: 'C7-5', name: '编写定额测定报告', basicParam: '项目数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 5, minPrice: 2, defPrice: 3.5, desc: '' },
|
||||
28: { serviceID: 18, code: 'C7-6-1', name: '编制定额文本和释义', basicParam: '基本费用', required: true, unit: '万元/份', conversion: 10000, maxPrice: 1, minPrice: 0.5, defPrice: 0.75, desc: '20条定额子目内' },
|
||||
29: { serviceID: 18, code: 'C7-6-2', name: '编制定额文本和释义', basicParam: '定额子目条数', required: true, unit: '万元/条', conversion: 10000, maxPrice: 0.2, minPrice: 0.1, defPrice: 0.15, desc: '超过20条每增加1条' },
|
||||
30: { serviceID: 18, code: 'C7-7-1', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 20, minPrice: 8, defPrice: 14, desc: '大型评审' },
|
||||
31: { serviceID: 18, code: 'C7-7-2', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '中型评审' },
|
||||
32: { serviceID: 18, code: 'C7-7-3', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 6, minPrice: 3, defPrice: 4.5, desc: '小型评审' },
|
||||
33: { serviceID: 18, code: 'C7-8-1', name: '培训与宣贯工作', basicParam: '项目数量', required: false, unit: '万元/次', conversion: 10000, maxPrice: 3, minPrice: 1, defPrice: 2, desc: '培训与宣贯材料' },
|
||||
34:{ serviceID :18 ,code :'C7-8-2' ,name :'培训与宣贯工作' ,basicParam :'培训与宣贯次数' ,required :false ,unit :'万元/次' ,conversion :10000 ,maxPrice :1 ,minPrice :0.5 ,defPrice :0.75 ,desc :'组织培训与宣贯'},
|
||||
35: { serviceID: 18, code: 'C7-9', name: '定额测试与验证', basicParam: '', required: false, unit: '%', conversion: 0.01, maxPrice: 50, minPrice: 30, defPrice: 40, desc: '' },
|
||||
export const taskList = {
|
||||
0: { serviceID: 15, ref: 'C4-1', name: '工程造价日常顾问', basicParam: '服务月份数', required: true, unit: '万元/月', conversion: 10000, maxPrice: 0.5, minPrice: 0.3, defPrice: 0.4, desc: '' },
|
||||
1: { serviceID: 15, ref: 'C4-2', name: '工程造价专项顾问', basicParam: '服务项目的造价金额', required: true, unit: '%', conversion: 0.01, maxPrice: null, minPrice: null, defPrice: 0.01, desc: '适用于涉及造价费用类的顾问' },
|
||||
2: { serviceID: 16, ref: 'C5-1', name: '组织与调研工作', basicParam: '调研次数', required: true, unit: '万元/次', conversion: 10000, maxPrice: 2, minPrice: 1, defPrice: 1.5, desc: '' },
|
||||
3: { serviceID: 16, ref: 'C5-2-1', name: '文件编写工作', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 5, minPrice: 3, defPrice: 4, desc: '主编' },
|
||||
4: { serviceID: 16, ref: 'C5-2-2', name: '文件编写工作', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 3, minPrice: 1, defPrice: 2, desc: '参编' },
|
||||
5: { serviceID: 16, ref: 'C5-3-1', name: '评审工作', basicParam: '评审次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 20, minPrice: 8, defPrice: 14, desc: '大型评审' },
|
||||
6: { serviceID: 16, ref: 'C5-3-2', name: '评审工作', basicParam: '评审次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '中型评审' },
|
||||
7: { serviceID: 16, ref: 'C5-3-3', name: '评审工作', basicParam: '评审次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 6, minPrice: 3, defPrice: 4.5, desc: '小型评审' },
|
||||
8: { serviceID: 17, ref: 'C6-1', name: '组织与调研工作', basicParam: '调研次数', required: true, unit: '万元/次', conversion: 10000, maxPrice: 2, minPrice: 1, defPrice: 1.5, desc: '' },
|
||||
9: { serviceID: 17, ref: 'C6-2-1', name: '研究及编写报告', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 50, minPrice: 20, defPrice: 35, desc: '国家级' },
|
||||
10: { serviceID: 17, ref: 'C6-2-2', name: '研究及编写报告', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 20, minPrice: 10, defPrice: 15, desc: '省部级' },
|
||||
11: { serviceID: 17, ref: 'C6-2-3', name: '研究及编写报告', basicParam: '文件份数', required: true, unit: '万元/份', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '其他级' },
|
||||
12: { serviceID: 17, ref: 'C6-3-1', name: '标准与技术性指导文件的编制', basicParam: '文件与标准的数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 80, minPrice: 50, defPrice: 65, desc: '复杂标准' },
|
||||
13: { serviceID: 17, ref: 'C6-3-2', name: '标准与技术性指导文件的编制', basicParam: '文件与标准的数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 50, minPrice: 20, defPrice: 35, desc: '较复杂标准' },
|
||||
14: { serviceID: 17, ref: 'C6-3-3', name: '标准与技术性指导文件的编制', basicParam: '文件与标准的数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 20, minPrice: 10, defPrice: 15, desc: '一般标准' },
|
||||
15: { serviceID: 17, ref: 'C6-3-4', name: '标准与技术性指导文件的编制', basicParam: '文件与标准的数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '简单标准' },
|
||||
16: { serviceID: 17, ref: 'C6-4-1', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 20, minPrice: 8, defPrice: 14, desc: '大型评审' },
|
||||
17: { serviceID: 17, ref: 'C6-4-2', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '中型评审' },
|
||||
18: { serviceID: 17, ref: 'C6-4-3', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 6, minPrice: 3, defPrice: 4.5, desc: '小型评审' },
|
||||
19: { serviceID: 17, ref: 'C6-5-1', name: '培训与宣贯工作', basicParam: '项目数量', required: false, unit: '万元/次', conversion: 10000, maxPrice: 3, minPrice: 1, defPrice: 2, desc: '培训与宣贯材料' },
|
||||
20: { serviceID: 17, ref: 'C6-5-2', name: '培训与宣贯工作', basicParam: '培训与宣贯次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 1, minPrice: 0.5, defPrice: 0.75, desc: '组织培训与宣贯' },
|
||||
21: { serviceID: 17, ref: 'C6-6', name: '测试与验证工作', basicParam: '', required: false, unit: '%', conversion: 0.01, maxPrice: 50, minPrice: 30, defPrice: 40, desc: '' },
|
||||
22: { serviceID: 18, ref: 'C7-1', name: '组织与调研工作', basicParam: '调研次数', required: true, unit: '万元/次', conversion: 10000, maxPrice: 2, minPrice: 1, defPrice: 1.5, desc: '' },
|
||||
23: { serviceID: 18, ref: 'C7-2', name: '编制大纲', basicParam: '项目数量', required: true, unit: '万元/个', conversion: 10000, maxPrice: 3, minPrice: 2, defPrice: 2.5, desc: '包括技术与定额子目研究' },
|
||||
24: { serviceID: 18, ref: 'C7-3', name: '数据采集与测定', basicParam: '采集组数', required: true, unit: '万元/组', conversion: 10000, maxPrice: 0.8, minPrice: 0.2, defPrice: 0.5, desc: '现场采集方式时计' },
|
||||
25: { serviceID: 18, ref: 'C7-4-1', name: '数据整理与分析', basicParam: '定额子目条数', required: true, unit: '万元/条', conversion: 10000, maxPrice: 0.3, minPrice: 0.1, defPrice: 0.2, desc: '简单定额' },
|
||||
26: { serviceID: 18, ref: 'C7-4-2', name: '数据整理与分析', basicParam: '定额子目条数', required: true, unit: '万元/条', conversion: 10000, maxPrice: 3, minPrice: 0.3, defPrice: 1.65, desc: '复杂定额' },
|
||||
27: { serviceID: 18, ref: 'C7-5', name: '编写定额测定报告', basicParam: '项目数量', required: true, unit: '万元/份', conversion: 10000, maxPrice: 5, minPrice: 2, defPrice: 3.5, desc: '' },
|
||||
28: { serviceID: 18, ref: 'C7-6-1', name: '编制定额文本和释义', basicParam: '基本费用', required: true, unit: '万元/份', conversion: 10000, maxPrice: 1, minPrice: 0.5, defPrice: 0.75, desc: '20条定额子目内' },
|
||||
29: { serviceID: 18, ref: 'C7-6-2', name: '编制定额文本和释义', basicParam: '定额子目条数', required: true, unit: '万元/条', conversion: 10000, maxPrice: 0.2, minPrice: 0.1, defPrice: 0.15, desc: '超过20条每增加1条' },
|
||||
30: { serviceID: 18, ref: 'C7-7-1', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 20, minPrice: 8, defPrice: 14, desc: '大型评审' },
|
||||
31: { serviceID: 18, ref: 'C7-7-2', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 10, minPrice: 5, defPrice: 7.5, desc: '中型评审' },
|
||||
32: { serviceID: 18, ref: 'C7-7-3', name: '评审与验收工作', basicParam: '评审与验收次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 6, minPrice: 3, defPrice: 4.5, desc: '小型评审' },
|
||||
33: { serviceID: 18, ref: 'C7-8-1', name: '培训与宣贯工作', basicParam: '项目数量', required: false, unit: '万元/次', conversion: 10000, maxPrice: 3, minPrice: 1, defPrice: 2, desc: '培训与宣贯材料' },
|
||||
34: { serviceID: 18, ref: 'C7-8-2', name: '培训与宣贯工作', basicParam: '培训与宣贯次数', required: false, unit: '万元/次', conversion: 10000, maxPrice: 1, minPrice: 0.5, defPrice: 0.75, desc: '组织培训与宣贯' },
|
||||
35: { serviceID: 18, ref: 'C7-9', name: '定额测试与验证', basicParam: '', required: false, unit: '%', conversion: 0.01, maxPrice: 50, minPrice: 30, defPrice: 40, desc: '' },
|
||||
36: { serviceID: 19, ref: 'C8-1', name: 'Q≤10条', basicParam: '价格信息数量', required: true, unit: '元/条', conversion: 1, maxPrice: null, minPrice: null, defPrice: 500, desc: '' },
|
||||
37: { serviceID: 19, ref: 'C8-2', name: '10条<Q≤30条', basicParam: '价格信息数量', required: true, unit: '元/条', conversion: 1, maxPrice: null, minPrice: null, defPrice: 400, desc: '' },
|
||||
38: { serviceID: 19, ref: 'C8-3', name: '30条<Q≤50条', basicParam: '价格信息数量', required: true, unit: '元/条', conversion: 1, maxPrice: null, minPrice: null, defPrice: 300, desc: '' },
|
||||
39: { serviceID: 19, ref: 'C8-4', name: '50条<Q≤100条', basicParam: '价格信息数量', required: true, unit: '元/条', conversion: 1, maxPrice: null, minPrice: null, defPrice: 200, desc: '' },
|
||||
40: { serviceID: 19, ref: 'C8-5', name: 'Q>100条', basicParam: '价格信息数量', required: true, unit: '元/条', conversion: 1, maxPrice: null, minPrice: null, defPrice: 100, desc: '' }
|
||||
|
||||
};
|
||||
|
||||
export const expertList = {
|
||||
0: { code: 'C9-1-1', name: '技术员及其他', maxPrice: 800, minPrice: 600, defPrice: 700, manageCoe: 2.3 },
|
||||
1: { code: 'C9-1-2', name: '助理工程师', maxPrice: 1000, minPrice: 800, defPrice: 900, manageCoe: 2.3 },
|
||||
@ -145,51 +153,799 @@ export const expertList = {
|
||||
{ code: 'C2-6', staLine: 5000, endLine: null, basic: { staPrice: 346000, rate: 20 }, optional: { staPrice: 69200, rate: 4 } },
|
||||
];
|
||||
|
||||
// TODO: 补充信息服务规模计价区间后替换空数组
|
||||
const infoServiceScaleCal: Array<{ staLine: number; endLine: number | null; staPrice: number; rate: number }> = []
|
||||
|
||||
const inRange = (sv: number, staLine: number, endLine: number | null) =>
|
||||
sv >= staLine && (endLine == null || sv <= endLine)
|
||||
staLine < sv && (endLine == null || sv <= endLine)
|
||||
|
||||
export function getBasicFeeFromScale(scaleValue: unknown, scaleType: 'cost' | 'area' | 'amount') {
|
||||
const calcScaleFee = (params: {
|
||||
staPrice: number
|
||||
sv: number
|
||||
staLine: number
|
||||
rate: number
|
||||
multiplier?: number
|
||||
}) => {
|
||||
const multiplier = params.multiplier ?? 1
|
||||
return roundTo(
|
||||
toDecimal(params.staPrice).plus(
|
||||
toDecimal(params.sv)
|
||||
.minus(params.staLine)
|
||||
.mul(multiplier)
|
||||
.mul(params.rate)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
export function getBasicFeeFromScale1(scaleValue: unknown, scaleType: 'cost' | 'area' | 'amount') {
|
||||
const sv = Number(scaleValue)
|
||||
if (!Number.isFinite(sv) || sv <= 0) return null
|
||||
|
||||
if (scaleType === 'cost') {// 造价规模
|
||||
if (scaleType === 'cost') {
|
||||
const targetRange = costScaleCal.find(f => inRange(sv, f.staLine, f.endLine))
|
||||
if (!targetRange) return null
|
||||
const delta = toDecimal(sv).minus(targetRange.staLine)
|
||||
return {
|
||||
basic: roundTo(
|
||||
toDecimal(targetRange.basic.staPrice).plus(delta.mul(10000).mul(targetRange.basic.rate))
|
||||
),
|
||||
optional: roundTo(
|
||||
toDecimal(targetRange.optional.staPrice).plus(delta.mul(10000).mul(targetRange.optional.rate))
|
||||
),
|
||||
basic: calcScaleFee({
|
||||
staPrice: targetRange.basic.staPrice,
|
||||
sv,
|
||||
staLine: targetRange.staLine,
|
||||
rate: targetRange.basic.rate,
|
||||
multiplier: 10000
|
||||
}),
|
||||
optional: calcScaleFee({
|
||||
staPrice: targetRange.optional.staPrice,
|
||||
sv,
|
||||
staLine: targetRange.staLine,
|
||||
rate: targetRange.optional.rate,
|
||||
multiplier: 10000
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (scaleType === 'area') {//用地
|
||||
if (scaleType === 'area') {
|
||||
const targetRange = areaScaleCal.find(f => inRange(sv, f.staLine, f.endLine))
|
||||
if (!targetRange) return null
|
||||
const delta = toDecimal(sv).minus(targetRange.staLine)
|
||||
return {
|
||||
basic: roundTo(
|
||||
toDecimal(targetRange.basic.staPrice).plus(delta.mul(targetRange.basic.rate))
|
||||
),
|
||||
optional: roundTo(
|
||||
toDecimal(targetRange.optional.staPrice).plus(delta.mul(targetRange.optional.rate))
|
||||
),
|
||||
basic: calcScaleFee({
|
||||
staPrice: targetRange.basic.staPrice,
|
||||
sv,
|
||||
staLine: targetRange.staLine,
|
||||
rate: targetRange.basic.rate
|
||||
}),
|
||||
optional: calcScaleFee({
|
||||
staPrice: targetRange.optional.staPrice,
|
||||
sv,
|
||||
staLine: targetRange.staLine,
|
||||
rate: targetRange.optional.rate
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const targetRange = infoServiceScaleCal.find(f => inRange(sv, f.staLine, f.endLine))
|
||||
if (!targetRange) return null
|
||||
const delta = toDecimal(sv).minus(targetRange.staLine)
|
||||
return {
|
||||
basic: roundTo(
|
||||
toDecimal(targetRange.staPrice).plus(delta.mul(targetRange.rate))
|
||||
),
|
||||
optional: 0,
|
||||
basic: calcScaleFee({
|
||||
staPrice: targetRange.staPrice,
|
||||
sv,
|
||||
staLine: targetRange.staLine,
|
||||
rate: targetRange.rate
|
||||
}),
|
||||
optional: 0
|
||||
}
|
||||
}
|
||||
|
||||
export function getBasicFeeFromScale(scaleValue: unknown, scaleType: 'cost' | 'area' | 'amount') {
|
||||
return getBasicFeeFromScale1(scaleValue, scaleType)
|
||||
}
|
||||
|
||||
|
||||
async function exportFile(fileName, data) {
|
||||
if (window.showSaveFilePicker) {
|
||||
const handle = await window.showSaveFilePicker({
|
||||
suggestedName: fileName,
|
||||
types: [{
|
||||
description: "Excel 文件",
|
||||
accept: { "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"] }
|
||||
}]
|
||||
});
|
||||
// ecCom.WeaLoadingGlobal.start({
|
||||
// tip: "下载中,结束前请勿打开文件...",
|
||||
// });
|
||||
try {
|
||||
const workbook = await generateTemplate(data);
|
||||
const buffer = await workbook.xlsx.writeBuffer();
|
||||
const writable = await handle.createWritable();
|
||||
await writable.write(buffer);
|
||||
await writable.close();
|
||||
// ecCom.WeaLoadingGlobal.destroy();
|
||||
// antd.notification['success']({
|
||||
// message: '下载成功!',
|
||||
// });
|
||||
} catch (err) {
|
||||
console.log('err:' + err);
|
||||
// ecCom.WeaLoadingGlobal.destroy();
|
||||
// antd.notification['error']({
|
||||
// message: '下载失败!',
|
||||
// });
|
||||
}
|
||||
} else {
|
||||
const workbook = await generateTemplate(data);
|
||||
const buffer = await workbook.xlsx.writeBuffer();
|
||||
const blob = new Blob([buffer], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
const url1 = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url1;
|
||||
a.download = `${fileName}.xlsx`;
|
||||
a.click();
|
||||
URL.revokeObjectURL(url1);
|
||||
}
|
||||
}
|
||||
|
||||
async function generateTemplate(data) {
|
||||
// 获取模板
|
||||
let templateExcel = 'template20260226001test009';
|
||||
let templateUrl = `https://oa.zwgczx.com/myExcelTemplate/${templateExcel}.xlsx`;
|
||||
let buf = await (await fetch(templateUrl)).arrayBuffer();
|
||||
let workbook = new ExcelJS.Workbook();
|
||||
await workbook.xlsx.load(buf);
|
||||
|
||||
// 生成表格
|
||||
let fm_sheet = workbook.getWorksheet('封面');
|
||||
let ml_sheet = workbook.getWorksheet('目录');
|
||||
let yz01_sheet = workbook.getWorksheet('预总01表');
|
||||
let f01_sheet = workbook.getWorksheet('辅01表');
|
||||
|
||||
let now = new Date();
|
||||
let year = now.getFullYear();
|
||||
let month = now.getMonth() + 1;
|
||||
let day = now.getDate();
|
||||
|
||||
fm_sheet.getRow(2).getCell(1).value = data.name;
|
||||
fm_sheet.getRow(11).getCell(4).value = `${year} 年 ${month} 月 ${day} 日`;
|
||||
|
||||
let yz01Mod = (data.contracts.length + 1) % 4;
|
||||
let yz01Num = (data.contracts.length + 1 - yz01Mod) / 4;
|
||||
switch (yz01Mod) {
|
||||
case 0:
|
||||
yz01_sheet.spliceColumns(8, 15);
|
||||
break;
|
||||
case 1:
|
||||
yz01_sheet.spliceColumns(8, 11);
|
||||
break;
|
||||
case 2:
|
||||
yz01_sheet.spliceColumns(19, 4);
|
||||
yz01_sheet.spliceColumns(8, 6);
|
||||
break;
|
||||
case 3:
|
||||
yz01_sheet.spliceColumns(14, 9);
|
||||
break;
|
||||
}
|
||||
if (yz01Num == 0) {
|
||||
yz01_sheet.spliceColumns(1, 7);
|
||||
} else {
|
||||
if (yz01Num > 1) {
|
||||
for (let i = 0; i < yz01Num - 1; i++) {
|
||||
insertAndCopyColumn(7 * (i + 1) + 1, [1, 2, 3, 4, 5, 6, 7], yz01_sheet);
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < yz01Num; i++) {
|
||||
yz01_sheet.mergeCells(6, i * 7 + 2, 6, i * 7 + 7);
|
||||
}
|
||||
}
|
||||
if (yz01Mod > 0) {
|
||||
yz01_sheet.mergeCells(6, yz01Num * 7 + 2, 6, yz01Num * 7 + 3 + yz01Mod);
|
||||
}
|
||||
|
||||
let f01Mod = (data.contracts.length) % 3;
|
||||
let f01Num = (data.contracts.length - f01Mod) / 3;
|
||||
switch (f01Mod) {
|
||||
case 0:
|
||||
f01_sheet.spliceColumns(11, 14);
|
||||
break;
|
||||
case 1:
|
||||
f01_sheet.spliceColumns(11, 8);
|
||||
break;
|
||||
case 2:
|
||||
f01_sheet.spliceColumns(19, 6);
|
||||
break;
|
||||
}
|
||||
if (f01Num == 0) {
|
||||
f01_sheet.spliceColumns(1, 10);
|
||||
} else {
|
||||
if (f01Num > 1) {
|
||||
for (let i = 0; i < f01Num - 1; i++) {
|
||||
insertAndCopyColumn(10 * (i + 1) + 1, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], f01_sheet);
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < f01Num; i++) {
|
||||
f01_sheet.mergeCells(1, i * 10 + 1, 2, i * 10 + 1);
|
||||
f01_sheet.mergeCells(1, i * 10 + 2, 2, i * 10 + 2);
|
||||
f01_sheet.mergeCells(1, i * 10 + 3, 2, i * 10 + 3);
|
||||
f01_sheet.mergeCells(1, i * 10 + 10, 2, i * 10 + 10);
|
||||
f01_sheet.mergeCells(1, i * 10 + 4, 1, i * 10 + 5);
|
||||
f01_sheet.mergeCells(1, i * 10 + 6, 1, i * 10 + 7);
|
||||
f01_sheet.mergeCells(1, i * 10 + 8, 1, i * 10 + 9);
|
||||
}
|
||||
}
|
||||
if (f01Mod > 0) {
|
||||
f01_sheet.mergeCells(1, f01Num * 10 + 1, 2, f01Num * 10 + 1);
|
||||
f01_sheet.mergeCells(1, f01Num * 10 + 2, 2, f01Num * 10 + 2);
|
||||
f01_sheet.mergeCells(1, f01Num * 10 + 3, 2, f01Num * 10 + 3);
|
||||
f01_sheet.mergeCells(1, f01Num * 10 + 2 * f01Mod + 4, 2, f01Num * 10 + 2 * f01Mod + 4);
|
||||
f01_sheet.mergeCells(1, f01Num * 10 + 4, 1, f01Num * 10 + 5);
|
||||
if (f01Mod == 2) f01_sheet.mergeCells(1, f01Num * 10 + 6, 1, f01Num * 10 + 7);
|
||||
}
|
||||
|
||||
let ml_slotRow = 13;
|
||||
let ml_number = 1;
|
||||
let allServices = [];
|
||||
data.contracts.forEach((ci, index) => {
|
||||
ci.method1 = [];
|
||||
ci.method2 = [];
|
||||
ci.method3 = [];
|
||||
ci.method4 = [];
|
||||
ci.services.forEach(si => {
|
||||
if (si.method1) {
|
||||
ci.method1.push(si.id);
|
||||
}
|
||||
if (si.method2) {
|
||||
ci.method2.push(si.id);
|
||||
}
|
||||
if (si.method3) ci.method3.push(si.id);
|
||||
if (si.method4) ci.method4.push(si.id);
|
||||
});
|
||||
|
||||
let ml_sourceRows = [ml_sheet.getRow(6)];
|
||||
let sheet_1 = copyWorksheet(workbook, '预i-1表', `预${index + 1}-1表`);
|
||||
let sheet_2;
|
||||
let sheet_2_1;
|
||||
let sheet_2_2;
|
||||
let sheet_3;
|
||||
let sheet_4;
|
||||
let sheet_4_1;
|
||||
if (ci.method1.length || ci.method2.length) {
|
||||
ml_sourceRows.push(ml_sheet.getRow(7));
|
||||
sheet_2 = copyWorksheet(workbook, '预i-2表', `预${index + 1}-2表`);
|
||||
if (ci.method1.length) {
|
||||
ml_sourceRows.push(ml_sheet.getRow(8));
|
||||
sheet_2_1 = copyWorksheet(workbook, '预i-2-1表', `预${index + 1}-2-1表`);
|
||||
}
|
||||
if (ci.method2.length) {
|
||||
ml_sourceRows.push(ml_sheet.getRow(9));
|
||||
sheet_2_2 = copyWorksheet(workbook, '预i-2-2表', `预${index + 1}-2-2表`);
|
||||
}
|
||||
}
|
||||
if (ci.method3.length) {
|
||||
ml_sourceRows.push(ml_sheet.getRow(10));
|
||||
sheet_3 = copyWorksheet(workbook, '预i-3表', `预${index + 1}-3表`);
|
||||
}
|
||||
if (ci.method4.length) {
|
||||
ml_sourceRows.push(ml_sheet.getRow(11));
|
||||
ml_sourceRows.push(ml_sheet.getRow(12));
|
||||
sheet_4 = copyWorksheet(workbook, '预i-4表', `预${index + 1}-4表`);
|
||||
sheet_4_1 = copyWorksheet(workbook, '预i-4-1表', `预${index + 1}-4-1表`);
|
||||
}
|
||||
|
||||
cusInsertRowFunc(ml_slotRow, ml_sourceRows, ml_sheet, () => ml_slotRow++, (targetCell, sourceCell, colNumber) => {
|
||||
if (colNumber == 1) {
|
||||
targetCell.value = ml_number++;
|
||||
} else if (colNumber == 2) {
|
||||
targetCell.value = sourceCell.value.replaceAll('第i合同', ci.name);
|
||||
} else if (colNumber == 3) {
|
||||
targetCell.value = sourceCell.value.replaceAll('i', index + 1);
|
||||
} else {
|
||||
targetCell.value = sourceCell.value;
|
||||
}
|
||||
});
|
||||
|
||||
let num_2 = 1;
|
||||
let num_2_1 = 1;
|
||||
let num_2_2 = 1;
|
||||
let num_3 = 1;
|
||||
let num_4 = 1;
|
||||
let num_4_1 = 1;
|
||||
ci.services.forEach((sobj, sindex) => {
|
||||
let allServicesX = allServices.find(s => s.id == sobj.id);
|
||||
if (allServicesX) {
|
||||
allServicesX.contracts[index] = sobj.fee;
|
||||
} else {
|
||||
allServices.push({
|
||||
id: sobj.id,
|
||||
contracts: {
|
||||
[index]: sobj.fee,
|
||||
},
|
||||
});
|
||||
}
|
||||
let serviceX = serviceList[sobj.id];
|
||||
cusInsertRowFunc(4 + sindex, [sheet_1.getRow(3)], sheet_1, (targetRow) => {
|
||||
targetRow.getCell(1).value = sindex + 1;
|
||||
targetRow.getCell(2).value = serviceX.ref;
|
||||
targetRow.getCell(3).value = serviceX.name;
|
||||
targetRow.getCell(4).value = sobj.method1 ? sobj.method1.fee : '';
|
||||
targetRow.getCell(5).value = sobj.method2 ? sobj.method2.fee : '';
|
||||
targetRow.getCell(6).value = sobj.method3 ? sobj.method3.fee : '';
|
||||
targetRow.getCell(7).value = sobj.method4 ? sobj.method4.fee : '';
|
||||
targetRow.getCell(8).value = sobj.fee;
|
||||
});
|
||||
if (sobj.method1 || sobj.method2) {
|
||||
let det1 = sobj.method1 ? sobj.method1.det.map(m => m.major) : [];
|
||||
let det2 = sobj.method2 ? sobj.method2.det.map(m => m.major) : [];
|
||||
let allDet = [...(new Set([...det1, ...det2]))].sort((a, b) => a - b).map(m => {
|
||||
return {
|
||||
major: m,
|
||||
mth1: det1.includes(m) ? sobj.method1.det[det1.indexOf(m)] : null,
|
||||
mth2: det2.includes(m) ? sobj.method2.det[det2.indexOf(m)] : null,
|
||||
};
|
||||
});
|
||||
|
||||
cusInsertRowFunc(4 + num_2, [sheet_2.getRow(4)], sheet_2, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_2++;
|
||||
targetRow.getCell(2).value = serviceX.ref;
|
||||
targetRow.getCell(3).value = serviceX.name;
|
||||
targetRow.getCell(4).value = '/';
|
||||
targetRow.getCell(5).value = '/';
|
||||
if (sobj.method1) {
|
||||
targetRow.getCell(6).value = sobj.method1.basicFee;
|
||||
targetRow.getCell(7).value = sobj.method1.fee;
|
||||
cusInsertRowFunc(4 + num_2_1, [sheet_2_1.getRow(4)], sheet_2_1, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_2_1++;
|
||||
targetRow.getCell(2).value = serviceX.ref;
|
||||
targetRow.getCell(3).value = serviceX.name;
|
||||
targetRow.getCell(4).value = sobj.method1.cost;
|
||||
targetRow.getCell(5).value = '/';
|
||||
targetRow.getCell(6).value = sobj.method1.basicFee_basic;
|
||||
targetRow.getCell(7).value = '/';
|
||||
targetRow.getCell(8).value = sobj.method1.basicFee_optional;
|
||||
targetRow.getCell(9).value = sobj.method1.basicFee;
|
||||
});
|
||||
}
|
||||
if (sobj.method2) {
|
||||
targetRow.getCell(8).value = sobj.method2.basicFee;
|
||||
targetRow.getCell(9).value = sobj.method2.fee;
|
||||
cusInsertRowFunc(4 + num_2_2, [sheet_2_2.getRow(4)], sheet_2_2, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_2_2++;
|
||||
targetRow.getCell(2).value = serviceX.ref;
|
||||
targetRow.getCell(3).value = serviceX.name;
|
||||
targetRow.getCell(4).value = sobj.method2.area;
|
||||
targetRow.getCell(5).value = '/';
|
||||
targetRow.getCell(6).value = sobj.method2.basicFee_basic;
|
||||
targetRow.getCell(7).value = '/';
|
||||
targetRow.getCell(8).value = sobj.method2.basicFee_optional;
|
||||
targetRow.getCell(9).value = sobj.method2.basicFee;
|
||||
});
|
||||
}
|
||||
});
|
||||
allDet.forEach((m, mindex) => {
|
||||
let majorX = majorList[m.major];
|
||||
cusInsertRowFunc(4 + num_2, [sheet_2.getRow(4)], sheet_2, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_2++;
|
||||
targetRow.getCell(2).value = serviceX.ref + '-' + (mindex + 1);
|
||||
targetRow.getCell(3).value = majorX.name;
|
||||
if (m.mth1) {
|
||||
targetRow.getCell(4).value = m.mth1.serviceCoe;
|
||||
targetRow.getCell(5).value = m.mth1.majorCoe;
|
||||
targetRow.getCell(6).value = m.mth1.basicFee;
|
||||
targetRow.getCell(7).value = m.mth1.fee;
|
||||
targetRow.getCell(8).value = 0;
|
||||
targetRow.getCell(9).value = 0;
|
||||
cusInsertRowFunc(4 + num_2_1, [sheet_2_1.getRow(4)], sheet_2_1, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_2_1++;
|
||||
targetRow.getCell(2).value = serviceX.ref + '-' + (mindex + 1);
|
||||
targetRow.getCell(3).value = majorX.name;
|
||||
targetRow.getCell(4).value = m.mth1.cost;
|
||||
targetRow.getCell(5).value = m.mth1.basicFormula;
|
||||
targetRow.getCell(6).value = m.mth1.basicFee_basic;
|
||||
targetRow.getCell(7).value = m.mth1.optionalFormula;
|
||||
targetRow.getCell(8).value = m.mth1.basicFee_optional;
|
||||
targetRow.getCell(9).value = m.mth1.basicFee;
|
||||
});
|
||||
} else {
|
||||
targetRow.getCell(4).value = m.mth2.serviceCoe;
|
||||
targetRow.getCell(5).value = m.mth2.majorCoe;
|
||||
targetRow.getCell(6).value = 0;
|
||||
targetRow.getCell(7).value = 0;
|
||||
targetRow.getCell(8).value = m.mth2.basicFee;
|
||||
targetRow.getCell(9).value = m.mth2.fee;
|
||||
cusInsertRowFunc(4 + num_2_2, [sheet_2_2.getRow(4)], sheet_2_2, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_2_2++;
|
||||
targetRow.getCell(2).value = serviceX.ref + '-' + (mindex + 1);
|
||||
targetRow.getCell(3).value = majorX.name;
|
||||
targetRow.getCell(4).value = m.mth2.area;
|
||||
targetRow.getCell(5).value = m.mth2.basicFormula;
|
||||
targetRow.getCell(6).value = m.mth2.basicFee_basic;
|
||||
targetRow.getCell(7).value = m.mth2.optionalFormula;
|
||||
targetRow.getCell(8).value = m.mth2.basicFee_optional;
|
||||
targetRow.getCell(9).value = m.mth2.basicFee;
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
if (sobj.method3) {
|
||||
cusInsertRowFunc(3 + num_3, [sheet_3.getRow(3)], sheet_3, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_3++;
|
||||
targetRow.getCell(2).value = serviceX.ref;
|
||||
targetRow.getCell(3).value = serviceX.name;
|
||||
targetRow.getCell(4).value = '/';
|
||||
targetRow.getCell(5).value = '/';
|
||||
targetRow.getCell(6).value = '/';
|
||||
targetRow.getCell(7).value = sobj.method3.basicFee;
|
||||
targetRow.getCell(8).value = '/';
|
||||
targetRow.getCell(9).value = sobj.method3.fee;
|
||||
});
|
||||
sobj.method3.det.forEach((tobj, tindex) => {
|
||||
const taskX = taskList[tobj.task];
|
||||
cusInsertRowFunc(3 + num_3, [sheet_3.getRow(3)], sheet_3, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_3++;
|
||||
targetRow.getCell(2).value = taskX.ref;
|
||||
targetRow.getCell(3).value = taskX.name + (taskX.desc ? `(${taskX.desc})` : '');
|
||||
targetRow.getCell(4).value = taskX.basicParam;
|
||||
targetRow.getCell(5).value = tobj.price;
|
||||
targetRow.getCell(6).value = tobj.amount;
|
||||
targetRow.getCell(7).value = tobj.basicFee;
|
||||
targetRow.getCell(8).value = tobj.serviceCoe;
|
||||
targetRow.getCell(9).value = tobj.fee;
|
||||
});
|
||||
});
|
||||
}
|
||||
if (sobj.method4) {
|
||||
cusInsertRowFunc(4 + num_4, [sheet_4.getRow(4)], sheet_4, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_4++;
|
||||
targetRow.getCell(2).value = serviceX.ref;
|
||||
targetRow.getCell(3).value = serviceX.name;
|
||||
targetRow.getCell(4).value = sobj.method4.person_num;
|
||||
targetRow.getCell(5).value = sobj.method4.work_day;
|
||||
targetRow.getCell(6).value = sobj.method4.fee;
|
||||
});
|
||||
cusInsertRowFunc(5 + num_4_1, [sheet_4_1.getRow(5)], sheet_4_1, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_4_1++;
|
||||
targetRow.getCell(2).value = serviceX.ref;
|
||||
targetRow.getCell(3).value = serviceX.name;
|
||||
targetRow.getCell(4).value = '/';
|
||||
targetRow.getCell(5).value = '/';
|
||||
targetRow.getCell(6).value = '/';
|
||||
targetRow.getCell(7).value = sobj.method4.person_num;
|
||||
targetRow.getCell(8).value = sobj.method4.work_day;
|
||||
targetRow.getCell(9).value = sobj.method4.fee;
|
||||
});
|
||||
sobj.method4.det.forEach((eobj, eindex) => {
|
||||
const expertX = expertList[eobj.expert];
|
||||
cusInsertRowFunc(5 + num_4_1, [sheet_4_1.getRow(5)], sheet_4_1, (targetRow) => {
|
||||
targetRow.getCell(1).value = num_4_1++;
|
||||
targetRow.getCell(2).value = expertX.ref;
|
||||
targetRow.getCell(3).value = expertX.name;
|
||||
targetRow.getCell(4).value = `${expertX.minPrice}~${expertX.maxPrice}`;
|
||||
targetRow.getCell(5).value = `${Math.round(expertX.minPrice * expertX.manageCoe)}~${Math.round(expertX.maxPrice * expertX.manageCoe)}`;
|
||||
targetRow.getCell(6).value = eobj.price;
|
||||
targetRow.getCell(7).value = eobj.person_num;
|
||||
targetRow.getCell(8).value = eobj.work_day;
|
||||
targetRow.getCell(9).value = eobj.fee;
|
||||
targetRow.getCell(10).value = eobj.desc;
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
allServices.sort((a, b) => a.id - b.id);
|
||||
allServices.forEach((s, sindex) => {
|
||||
const serviceX = serviceList[s.id];
|
||||
cusInsertRowFunc(3 + sindex, [yz01_sheet.getRow(2)], yz01_sheet, (targetRow) => {
|
||||
const sumCol = data.contracts.length;
|
||||
let siSum = 0;
|
||||
for (let i = 0; i < yz01Num; i++) {
|
||||
targetRow.getCell(i * 7 + 1).value = sindex + 1;
|
||||
targetRow.getCell(i * 7 + 2).value = serviceX.ref;
|
||||
targetRow.getCell(i * 7 + 3).value = serviceX.name;
|
||||
targetRow.getCell(i * 7 + 4).value = s.contracts[i * 4];
|
||||
targetRow.getCell(i * 7 + 5).value = s.contracts[i * 4 + 1];
|
||||
targetRow.getCell(i * 7 + 6).value = s.contracts[i * 4 + 2];
|
||||
siSum = siSum + (Number(s.contracts[i * 4]) || 0 + Number(s.contracts[i * 4 + 1]) || 0 + Number(s.contracts[i * 4 + 2]) || 0);
|
||||
if (i * 4 + 3 == sumCol) {
|
||||
targetRow.getCell(i * 7 + 7).value = numberFormatter(siSum, 2);
|
||||
} else {
|
||||
targetRow.getCell(i * 7 + 7).value = s.contracts[i * 4 + 3];
|
||||
siSum = siSum + (Number(s.contracts[i * 4 + 3]) || 0);
|
||||
}
|
||||
}
|
||||
if (yz01Mod) {
|
||||
targetRow.getCell(yz01Num * 7 + 1).value = sindex + 1;
|
||||
targetRow.getCell(yz01Num * 7 + 2).value = serviceX.ref;
|
||||
targetRow.getCell(yz01Num * 7 + 3).value = serviceX.name;
|
||||
if (yz01Mod == 1) {
|
||||
targetRow.getCell(yz01Num * 7 + 4).value = numberFormatter(siSum, 2);
|
||||
} else if (yz01Mod == 2) {
|
||||
targetRow.getCell(yz01Num * 7 + 4).value = s.contracts[yz01Num * 4];
|
||||
siSum = siSum + (Number(s.contracts[yz01Num * 4]) || 0);
|
||||
targetRow.getCell(yz01Num * 7 + 5).value = numberFormatter(siSum, 2);
|
||||
} else {
|
||||
targetRow.getCell(yz01Num * 7 + 4).value = s.contracts[yz01Num * 4];
|
||||
targetRow.getCell(yz01Num * 7 + 5).value = s.contracts[yz01Num * 4 + 1];
|
||||
siSum = siSum + (Number(s.contracts[yz01Num * 4]) || 0 + Number(s.contracts[yz01Num * 4 + 1]) || 0);
|
||||
targetRow.getCell(yz01Num * 7 + 6).value = numberFormatter(siSum, 2);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
ml_sheet.spliceRows(6, 6);
|
||||
ml_sheet.spliceRows(6, 1);
|
||||
ml_sheet.mergeCells(ml_slotRow - 7, 1, ml_slotRow - 7, 4);
|
||||
|
||||
workbook.removeWorksheet('预i-1表');
|
||||
workbook.removeWorksheet('预i-2表');
|
||||
workbook.removeWorksheet('预i-2-1表');
|
||||
workbook.removeWorksheet('预i-2-2表');
|
||||
workbook.removeWorksheet('预i-3表');
|
||||
workbook.removeWorksheet('预i-4表');
|
||||
workbook.removeWorksheet('预i-4-1表');
|
||||
workbook.getWorksheet('辅01表').orderNo = ml_number + 2 + 10;
|
||||
workbook.getWorksheet('辅02表').orderNo = ml_number + 3 + 10;
|
||||
workbook.getWorksheet('辅03表').orderNo = ml_number + 4 + 10;
|
||||
|
||||
// workbook._worksheets.forEach(sheet => {
|
||||
// if (sheet) {
|
||||
// if (sheet.headerFooter.oddHeader) sheet.headerFooter.oddHeader = sheet.headerFooter.oddHeader.replace(/&([CLR])&/g, '&$1&"宋体"&');
|
||||
// if (sheet.headerFooter.oddFooter) sheet.headerFooter.oddFooter = sheet.headerFooter.oddFooter.replace(/&([CLR])&/g, '&$1&"宋体"&');
|
||||
// }
|
||||
// });
|
||||
|
||||
window.workbook = workbook;
|
||||
|
||||
return workbook;
|
||||
}
|
||||
|
||||
function cusInsertRowFunc(insertRowNum, sourceRows, worksheet, RowFun, cellFun) {
|
||||
// 插入行
|
||||
let newRows = [];
|
||||
for (let i = 0; i < sourceRows.length; i++) {
|
||||
newRows.push([]);
|
||||
}
|
||||
worksheet.insertRows(insertRowNum, newRows);
|
||||
|
||||
for (let i = 0; i < sourceRows.length; i++) {
|
||||
const sourceRow = sourceRows[i];
|
||||
const targetRowNum = insertRowNum + i;
|
||||
const targetRow = worksheet.getRow(targetRowNum);
|
||||
targetRow.height = undefined;
|
||||
sourceRow.eachCell({ includeEmpty: true }, (cell, colNumber) => {
|
||||
const targetCell = targetRow.getCell(colNumber);
|
||||
// targetCell.value = cell.value; // 复制内容
|
||||
// 复制样式
|
||||
if (cell.style) {
|
||||
targetCell.style = { ...cell.style };
|
||||
}
|
||||
|
||||
if (cellFun) {
|
||||
cellFun(targetCell, cell, colNumber, targetRow, sourceRow);
|
||||
}
|
||||
});
|
||||
if (RowFun) {
|
||||
RowFun(targetRow, sourceRow, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function copyWorksheet(workbook, sourceName, targetName) {
|
||||
const source = workbook.getWorksheet(sourceName);
|
||||
if (!source) throw new Error("Source sheet not found");
|
||||
|
||||
const target = workbook.addWorksheet(targetName, {
|
||||
properties: { ...source.properties },
|
||||
pageSetup: { ...source.pageSetup },
|
||||
views: source.views ? JSON.parse(JSON.stringify(source.views)) : [],
|
||||
});
|
||||
|
||||
/* 复制页眉页脚(关键补充) */
|
||||
if (source.headerFooter) {
|
||||
target.headerFooter = JSON.parse(
|
||||
JSON.stringify(source.headerFooter)
|
||||
);
|
||||
}
|
||||
|
||||
/* 复制合并单元格 */
|
||||
Object.keys(source._merges).forEach(range => {
|
||||
let rangeModel = source._merges[range].model;
|
||||
target.mergeCells(rangeModel.top, rangeModel.left, rangeModel.bottom, rangeModel.right);
|
||||
});
|
||||
|
||||
/* 复制列(宽度、样式) */
|
||||
source.columns.forEach((col, i) => {
|
||||
const targetCol = target.getColumn(i + 1);
|
||||
targetCol.width = col.width;
|
||||
targetCol.style = JSON.parse(JSON.stringify(col.style || {}));
|
||||
});
|
||||
|
||||
/* 复制行 & 单元格 */
|
||||
source.eachRow({ includeEmpty: true }, (row, rowNumber) => {
|
||||
const targetRow = target.getRow(rowNumber);
|
||||
targetRow.height = undefined;
|
||||
|
||||
row.eachCell({ includeEmpty: true }, (cell, colNumber) => {
|
||||
const targetCell = targetRow.getCell(colNumber);
|
||||
|
||||
// value(富文本/公式安全)
|
||||
targetCell.value = cloneCellValue(cell.value);
|
||||
|
||||
// style(必须深拷贝)
|
||||
targetCell.style = JSON.parse(JSON.stringify(cell.style || {}));
|
||||
});
|
||||
});
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function insertAndCopyColumn(insertAt, cols, ws) {
|
||||
let insertAti = insertAt;
|
||||
cols.forEach((col, index) => {
|
||||
// 在 insertAti 位置插入空列
|
||||
ws.spliceColumns(insertAti, 0, []);
|
||||
|
||||
// 插入后,col 可能需要偏移
|
||||
const srcColIndex = col >= insertAti ? col + 1 + index : col;
|
||||
|
||||
// 复制列
|
||||
copyColumn(insertAti, srcColIndex, ws);
|
||||
|
||||
insertAti++;
|
||||
});
|
||||
}
|
||||
|
||||
function copyColumn(toCol, fromCol, ws) {
|
||||
const srcCol = ws.getColumn(fromCol);
|
||||
const dstCol = ws.getColumn(toCol);
|
||||
|
||||
// 列级属性
|
||||
dstCol.width = srcCol.width;
|
||||
dstCol.hidden = srcCol.hidden;
|
||||
dstCol.style = JSON.parse(JSON.stringify(srcCol.style || {}));
|
||||
|
||||
// 单元格
|
||||
srcCol.eachCell({ includeEmpty: true }, (cell, rowNumber) => {
|
||||
const dstCell = ws.getRow(rowNumber).getCell(toCol);
|
||||
dstCell.value = cloneCellValue(cell.value);
|
||||
dstCell.style = JSON.parse(JSON.stringify(cell.style || {}));
|
||||
});
|
||||
}
|
||||
|
||||
function cloneCellValue(value) {
|
||||
if (value == null) return value;
|
||||
|
||||
if (typeof value === "object") {
|
||||
return JSON.parse(JSON.stringify(value));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
let data1 = {
|
||||
name: 'test001',
|
||||
fee: 10000,
|
||||
scale: [
|
||||
{
|
||||
major: 0,
|
||||
cost: 100000,
|
||||
area: 200,
|
||||
},
|
||||
{
|
||||
major: 1,
|
||||
cost: 100000,
|
||||
area: 200,
|
||||
},
|
||||
],
|
||||
contracts: [
|
||||
{
|
||||
name: 'A合同段',
|
||||
fee: 10000,
|
||||
scale: [
|
||||
{
|
||||
major: 0,
|
||||
cost: 100000,
|
||||
area: 200,
|
||||
},
|
||||
{
|
||||
major: 1,
|
||||
cost: 100000,
|
||||
area: 200,
|
||||
},
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 0,
|
||||
fee: 100000,
|
||||
method1: { // 投资规模法
|
||||
cost: 100000,
|
||||
basicFee: 200,
|
||||
basicFee_basic: 200,
|
||||
basicFee_optional: 0,
|
||||
fee: 250000,
|
||||
det: [
|
||||
{
|
||||
major: 0,
|
||||
cost: 100000,
|
||||
basicFee: 200,
|
||||
basicFormula: '856,000+(1,000,000,000-500,000,000)×1‰',
|
||||
basicFee_basic: 200,
|
||||
optionalFormula: '171,200+(1,000,000,000-500,000,000)×0.2‰',
|
||||
basicFee_optional: 0,
|
||||
serviceCoe: 1.1,
|
||||
majorCoe: 1.2,
|
||||
fee: 100000,
|
||||
desc: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
method2: { // 用地规模法
|
||||
area: 1200,
|
||||
basicFee: 200,
|
||||
basicFee_basic: 200,
|
||||
basicFee_optional: 0,
|
||||
fee: 250000,
|
||||
det: [
|
||||
{
|
||||
major: 0,
|
||||
area: 1200,
|
||||
basicFee: 200,
|
||||
basicFormula: '106,000+(1,200-1,000)×60',
|
||||
basicFee_basic: 200,
|
||||
optionalFormula: '21,200+(1,200-1,000)×12',
|
||||
basicFee_optional: 0,
|
||||
serviceCoe: 1.1,
|
||||
majorCoe: 1.2,
|
||||
fee: 100000,
|
||||
desc: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
method3: { // 工作量法
|
||||
basicFee: 200,
|
||||
fee: 250000,
|
||||
det: [
|
||||
{
|
||||
task: 0,
|
||||
price: 100000,
|
||||
amount: 10,
|
||||
basicFee: 200,
|
||||
serviceCoe: 1.1,
|
||||
fee: 100000,
|
||||
desc: '',
|
||||
},
|
||||
{
|
||||
task: 1,
|
||||
price: 100000,
|
||||
amount: 10,
|
||||
basicFee: 200,
|
||||
serviceCoe: 1.1,
|
||||
fee: 100000,
|
||||
desc: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
method4: { // 工时法
|
||||
person_num: 10,
|
||||
work_day: 10,
|
||||
fee: 250000,
|
||||
det: [
|
||||
{
|
||||
expert: 0,
|
||||
price: 100000,
|
||||
person_num: 10,
|
||||
work_day: 3,
|
||||
fee: 100000,
|
||||
desc: '',
|
||||
},
|
||||
{
|
||||
expert: 1,
|
||||
price: 100000,
|
||||
person_num: 10,
|
||||
work_day: 3,
|
||||
fee: 100000,
|
||||
desc: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@ -231,5 +231,6 @@
|
||||
.xmMx .ag-cell.editable-cell-empty .ag-cell-value * {
|
||||
--ag-data-color: #94a3b8;
|
||||
color: #94a3b8 !important;
|
||||
height:100%;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
43
tmp_reka_dialog.html
Normal file
43
tmp_reka_dialog.html
Normal file
File diff suppressed because one or more lines are too long
528
tmp_reka_dialog_md.js
Normal file
528
tmp_reka_dialog_md.js
Normal file
File diff suppressed because one or more lines are too long
351
tmp_typeline_numbered.txt
Normal file
351
tmp_typeline_numbered.txt
Normal file
@ -0,0 +1,351 @@
|
||||
1 <script setup lang="ts">
|
||||
2 import { computed, onBeforeUnmount, ref, watch, type Component ,onMounted} from 'vue'
|
||||
3 import { ScrollArea } from '@/components/ui/scroll-area'
|
||||
4 import { Button } from '@/components/ui/button'
|
||||
5 import {
|
||||
6 DialogClose,
|
||||
7 DialogContent,
|
||||
8 DialogOverlay,
|
||||
9 DialogPortal,
|
||||
10 DialogRoot,
|
||||
11 DialogTitle,
|
||||
12 DialogTrigger,DialogDescription
|
||||
13 } from 'reka-ui'
|
||||
14 import { Icon } from '@iconify/vue'
|
||||
15 import { useWindowSize } from '@vueuse/core'
|
||||
16 import { animate, AnimatePresence, Motion, useMotionValue, useMotionValueEvent, useTransform } from 'motion-v'
|
||||
17 interface TypeLineCategory {
|
||||
18 key: string
|
||||
19 label: string
|
||||
20 component: Component
|
||||
21 }
|
||||
22
|
||||
23 const props = withDefaults(
|
||||
24 defineProps<{
|
||||
25 scene?: string
|
||||
26 title?: string
|
||||
27 subtitle?: string
|
||||
28 copyText?: string
|
||||
29 categories: TypeLineCategory[]
|
||||
30 storageKey?: string
|
||||
31 defaultCategory?: string
|
||||
32 }>(),
|
||||
33 {
|
||||
34 scene: 'default',
|
||||
35 title: '配置',
|
||||
36 subtitle: '',
|
||||
37 copyText: '',
|
||||
38 storageKey: '',
|
||||
39 defaultCategory: ''
|
||||
40 }
|
||||
41 )
|
||||
42
|
||||
43 const cacheKey = computed(() => props.storageKey || `type-line-active-cat-${props.scene}`)
|
||||
44
|
||||
45 const resolveInitialCategory = () => {
|
||||
46 const defaultKey = props.defaultCategory || props.categories[0]?.key || ''
|
||||
47 const savedKey = sessionStorage.getItem(cacheKey.value)
|
||||
48 const validSavedKey = props.categories.some(item => item.key === savedKey)
|
||||
49 return validSavedKey ? (savedKey as string) : defaultKey
|
||||
50 }
|
||||
51
|
||||
52 const activeCategory = ref(resolveInitialCategory())
|
||||
53
|
||||
54 watch(
|
||||
55 () => [props.categories, props.defaultCategory, cacheKey.value],
|
||||
56 () => {
|
||||
57 activeCategory.value = resolveInitialCategory()
|
||||
58 },
|
||||
59 { deep: true }
|
||||
60 )
|
||||
61
|
||||
62 const switchCategory = (cat: string) => {
|
||||
63 activeCategory.value = cat
|
||||
64 sessionStorage.setItem(cacheKey.value, cat)
|
||||
65 }
|
||||
66
|
||||
67 const activeComponent = computed(() => {
|
||||
68 const selected = props.categories.find(item => item.key === activeCategory.value)
|
||||
69 return selected?.component || props.categories[0]?.component || null
|
||||
70 })
|
||||
71
|
||||
72 const copyBtnText = ref('复制')
|
||||
73 const sheetOpen = ref(false)
|
||||
74 let copyBtnTimer: ReturnType<typeof setTimeout> | null = null
|
||||
75
|
||||
76 const handleCopySubtitle = async () => {
|
||||
77 const text = (props.copyText || '').trim()
|
||||
78 if (!text) return
|
||||
79
|
||||
80 try {
|
||||
81 await navigator.clipboard.writeText(text)
|
||||
82 copyBtnText.value = '已复制'
|
||||
83 } catch (error) {
|
||||
84 console.error('copy failed:', error)
|
||||
85 copyBtnText.value = '复制失败'
|
||||
86 }
|
||||
87
|
||||
88 if (copyBtnTimer) clearTimeout(copyBtnTimer)
|
||||
89 copyBtnTimer = setTimeout(() => {
|
||||
90 copyBtnText.value = '复制'
|
||||
91 }, 1200)
|
||||
92 }
|
||||
93
|
||||
94 onBeforeUnmount(() => {
|
||||
95 if (copyBtnTimer) clearTimeout(copyBtnTimer)
|
||||
96 if (!root) return
|
||||
97 root.style.scale = ''
|
||||
98 root.style.translate = ''
|
||||
99 root.style.borderRadius = ''
|
||||
100 })
|
||||
101
|
||||
102 //
|
||||
103
|
||||
104
|
||||
105 const inertiaTransition = {
|
||||
106 type: 'inertia' as const,
|
||||
107 bounceStiffness: 300,
|
||||
108 bounceDamping: 40,
|
||||
109 timeConstant: 300,
|
||||
110 }
|
||||
111
|
||||
112 const staticTransition = {
|
||||
113 duration: 0.5,
|
||||
114 ease: [0.32, 0.72, 0, 1] as const,
|
||||
115 }
|
||||
116
|
||||
117 const SHEET_TOP_RATIO = 0.1
|
||||
118 const SHEET_RADIUS = 12
|
||||
119 const OFFICIAL_SITE_URL = '/'
|
||||
120
|
||||
121 let root: HTMLElement | null = null
|
||||
122
|
||||
123 onMounted(() => {
|
||||
124 root = document.body.firstElementChild as HTMLElement | null
|
||||
125 })
|
||||
126
|
||||
127 const { height, width } = useWindowSize()
|
||||
128
|
||||
129 const sheetTop = computed(() => Math.round(height.value * SHEET_TOP_RATIO))
|
||||
130 const h = computed(() => Math.max(0, height.value - sheetTop.value))
|
||||
131 const y = useMotionValue(h.value)
|
||||
132
|
||||
133 watch(
|
||||
134 () => h.value,
|
||||
135 (nextHeight) => {
|
||||
136 if (!sheetOpen.value) y.jump(nextHeight)
|
||||
137 }
|
||||
138 )
|
||||
139
|
||||
140 watch(
|
||||
141 () => sheetOpen.value,
|
||||
142 (isOpen) => {
|
||||
143 if (!isOpen) {
|
||||
144 y.jump(h.value)
|
||||
145 return
|
||||
146 }
|
||||
147 y.jump(h.value)
|
||||
148 animate(y, 0, staticTransition)
|
||||
149 }
|
||||
150 )
|
||||
151
|
||||
152 // Scale the body down and adjust the border radius when the sheet is open.
|
||||
153 const bodyScale = useTransform(
|
||||
154 y,
|
||||
155 [0, h.value],
|
||||
156 [(width.value - sheetTop.value) / width.value, 1],
|
||||
157 )
|
||||
158 const bodyTranslate = useTransform(y, [0, h.value], [sheetTop.value - SHEET_RADIUS, 0])
|
||||
159 const bodyBorderRadius = useTransform(y, [0, h.value], [SHEET_RADIUS, 0])
|
||||
160
|
||||
161 useMotionValueEvent(bodyScale, 'change', (v) => {
|
||||
162 if (!root) return
|
||||
163 root.style.scale = `${v}`
|
||||
164 })
|
||||
165 useMotionValueEvent(
|
||||
166 bodyTranslate,
|
||||
167 'change',
|
||||
168 (v) => {
|
||||
169 if (!root) return
|
||||
170 root.style.translate = `0 ${v}px`
|
||||
171 },
|
||||
172 )
|
||||
173 useMotionValueEvent(
|
||||
174 bodyBorderRadius,
|
||||
175 'change',
|
||||
176 (v) => {
|
||||
177 if (!root) return
|
||||
178 root.style.borderRadius = `${v}px`
|
||||
179 },
|
||||
180 )
|
||||
181 </script>
|
||||
182
|
||||
183 <template>
|
||||
184 <div class="flex h-full w-full bg-background">
|
||||
185 <div class="w-12/100 border-r p-6 flex flex-col gap-8 relative">
|
||||
186 <div v-if="props.title || props.subtitle" class="space-y-1">
|
||||
187 <div v-if="props.title" class="font-bold text-base leading-6 text-primary break-words">
|
||||
188 {{ props.title }}
|
||||
189 </div>
|
||||
190 <div
|
||||
191 v-if="props.subtitle"
|
||||
192 class="flex flex-wrap items-center gap-2 text-xs leading-5 text-muted-foreground"
|
||||
193 >
|
||||
194 <span class="break-all">{{ props.subtitle }}</span>
|
||||
195 <Button
|
||||
196 v-if="props.copyText"
|
||||
197 type="button"
|
||||
198 variant="outline"
|
||||
199 size="sm"
|
||||
200 class="h-6 rounded-md px-2 text-[11px]"
|
||||
201 @click.stop="handleCopySubtitle"
|
||||
202 >
|
||||
203 {{ copyBtnText }}
|
||||
204 </Button>
|
||||
205 </div>
|
||||
206 </div>
|
||||
207
|
||||
208 <div class="flex flex-col gap-10 relative">
|
||||
209 <div class="absolute left-[11px] top-2 bottom-2 w-[2px] bg-muted"></div>
|
||||
210
|
||||
211 <div
|
||||
212 v-for="item in props.categories"
|
||||
213 :key="item.key"
|
||||
214 class="relative flex items-center gap-4 cursor-pointer group"
|
||||
215 @click="switchCategory(item.key)"
|
||||
216 >
|
||||
217 <div
|
||||
218 :class="[
|
||||
219 'z-10 w-6 h-6 rounded-full border-2 flex items-center justify-center transition-all',
|
||||
220 activeCategory === item.key
|
||||
221 ? 'bg-primary border-primary scale-110'
|
||||
222 : 'bg-background border-muted-foreground'
|
||||
223 ]"
|
||||
224 >
|
||||
225 <div v-if="activeCategory === item.key" class="w-2 h-2 bg-background rounded-full"></div>
|
||||
226 </div>
|
||||
227 <span
|
||||
228 :class="[
|
||||
229 'text-sm transition-colors',
|
||||
230 activeCategory === item.key
|
||||
231 ? 'font-bold text-primary'
|
||||
232 : 'text-muted-foreground group-hover:text-foreground'
|
||||
233 ]"
|
||||
234 >
|
||||
235 {{ item.label }}
|
||||
236 </span>
|
||||
237 </div>
|
||||
238 </div>
|
||||
239
|
||||
240 <DialogRoot v-model:open="sheetOpen">
|
||||
241 <DialogTrigger as-child>
|
||||
242 <button
|
||||
243 type="button"
|
||||
244 class="absolute left-4 right-4 bottom-4 flex flex-col items-center gap-1.5 rounded-lg border bg-muted/35 px-3 py-2 text-center text-[12px] leading-5 text-foreground/85 shadow-sm hover:bg-muted/55 hover:text-foreground transition-colors"
|
||||
245 >
|
||||
246 <img src="/favicon.ico" alt="众为咨询" class="h-5 w-5 shrink-0 rounded-sm" />
|
||||
247 <span>本网站由众为工程咨询有限公司提供免费技术支持</span>
|
||||
248 </button>
|
||||
249 </DialogTrigger>
|
||||
250 <DialogPortal>
|
||||
251 <AnimatePresence
|
||||
252 multiple
|
||||
253 as="div"
|
||||
254 >
|
||||
255 <DialogOverlay as-child>
|
||||
256 <Motion
|
||||
257 class="fixed inset-0 z-10 bg-black/45 backdrop-blur-[2px]"
|
||||
258 :initial="{ opacity: 0 }"
|
||||
259 :animate="{ opacity: 1 }"
|
||||
260 :exit="{ opacity: 0 }"
|
||||
261 :transition="staticTransition"
|
||||
262 />
|
||||
263 </DialogOverlay>
|
||||
264
|
||||
265 <DialogContent as-child>
|
||||
266 <Motion
|
||||
267 class="fixed inset-x-0 bottom-0 z-20 overflow-hidden rounded-t-2xl border border-border/60 bg-card/95 shadow-2xl backdrop-blur-xl will-change-transform"
|
||||
268 :style="{
|
||||
269 y,
|
||||
270 top: `${sheetTop}px`,
|
||||
271 }"
|
||||
272 drag="y"
|
||||
273 :drag-constraints="{ top: 0 }"
|
||||
274 @drag-end="(e, { offset, velocity }) => {
|
||||
275 if (offset.y > h * 0.35 || velocity.y > 10) {
|
||||
276 sheetOpen = false;
|
||||
277 }
|
||||
278 else {
|
||||
279 animate(y, 0, { ...inertiaTransition, min: 0, max: 0 });
|
||||
280 }
|
||||
281 }"
|
||||
282 >
|
||||
283 <div class="mx-auto mt-2 h-1.5 w-12 rounded-full bg-muted-foreground/35" />
|
||||
284 <div class="mx-auto flex h-full w-full max-w-2xl flex-col px-4 pb-5 pt-3">
|
||||
285 <div class="mb-3 flex items-center justify-between gap-3">
|
||||
286 <DialogTitle class="m-0">
|
||||
287 <div class="flex items-center gap-3">
|
||||
288 <img src="/favicon.ico" alt="众为咨询" class="h-7 w-7 shrink-0 rounded-sm" />
|
||||
289 <span class="text-2xl font-semibold leading-none">关于我们</span>
|
||||
290 </div>
|
||||
291 </DialogTitle>
|
||||
292 <div class="flex items-center gap-2">
|
||||
293 <a
|
||||
294 :href="OFFICIAL_SITE_URL"
|
||||
295 target="_blank"
|
||||
296 rel="noopener noreferrer"
|
||||
297 class="inline-flex h-8 w-8 items-center justify-center rounded-md border border-muted-foreground/30 text-muted-foreground transition-colors hover:border-foreground/40 hover:text-foreground"
|
||||
298 aria-label="跳转到官网首页"
|
||||
299 title="官网首页"
|
||||
300 >
|
||||
301 <Icon icon="lucide:arrow-up-right" class="h-4 w-4" />
|
||||
302 </a>
|
||||
303 <DialogClose class="inline-flex h-8 w-8 items-center justify-center rounded-md border border-muted-foreground/30 text-muted-foreground transition-colors hover:border-foreground/40 hover:text-foreground">
|
||||
304 <Icon icon="lucide:x" class="h-4 w-4" />
|
||||
305 </DialogClose>
|
||||
306 </div>
|
||||
307 </div>
|
||||
308
|
||||
309 <DialogDescription class="mb-4 text-base text-muted-foreground">
|
||||
310 <p class="font-medium text-foreground">众为工程咨询有限公司</p>
|
||||
311 </DialogDescription>
|
||||
312
|
||||
313 <div class="space-y-4 overflow-y-auto pr-1 text-[15px] leading-7">
|
||||
314 <p>
|
||||
315 众为工程咨询有限公司长期专注于工程咨询与数字化服务,致力于为客户提供高效、可靠、可持续的解决方案。
|
||||
316 </p>
|
||||
317 <p>
|
||||
318 我们围绕咨询管理、数据治理、系统建设与运维支持,持续提升项目交付质量,帮助客户降低沟通成本、提升协同效率。
|
||||
319 </p>
|
||||
320 <p>
|
||||
321 本网站由众为工程咨询有限公司提供免费技术支持,如需商务合作或技术咨询,请与我们联系。
|
||||
322 </p>
|
||||
323 </div>
|
||||
324 </div>
|
||||
325 </Motion>
|
||||
326 </DialogContent>
|
||||
327 </AnimatePresence>
|
||||
328 </DialogPortal>
|
||||
329 </DialogRoot>
|
||||
330
|
||||
331 </div>
|
||||
332
|
||||
333 <div class="w-88/100 min-h-0 h-full flex flex-col">
|
||||
334 <ScrollArea class="h-full w-full min-h-0 rightMain">
|
||||
335 <div class="p-3 h-full min-h-0 flex flex-col">
|
||||
336 <keep-alive>
|
||||
337 <component :is="activeComponent" />
|
||||
338 </keep-alive>
|
||||
339 </div>
|
||||
340 </ScrollArea>
|
||||
341 </div>
|
||||
342 </div>
|
||||
343 </template>
|
||||
344 <style scoped>
|
||||
345 /* 核心修改:添加 :deep() 穿透 scoped 作用域 */
|
||||
346 :deep(.rightMain > div > div) {
|
||||
347 height: 100%;
|
||||
348 min-height: 0;
|
||||
349 box-sizing: border-box;
|
||||
350 }
|
||||
351 </style>
|
||||
Loading…
x
Reference in New Issue
Block a user