yxuse 3.0.68 → 3.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api.cjs.js +0 -1
- package/lib/api.es.js +0 -1
- package/lib/app.cjs.js +0 -1
- package/lib/app.es.js +0 -1
- package/lib/components.cjs.js +0 -1
- package/lib/components.es.js +0 -1
- package/lib/directives.cjs.js +0 -1
- package/lib/directives.es.js +0 -1
- package/lib/hooks.cjs.js +0 -1
- package/lib/hooks.es.js +0 -1
- package/lib/index.cjs.js +0 -1
- package/lib/index.cjs10.js +0 -1
- package/lib/index.cjs11.js +1 -2
- package/lib/index.cjs12.js +1 -2
- package/lib/index.cjs13.js +1 -2
- package/lib/index.cjs14.js +0 -1
- package/lib/index.cjs2.js +1 -2
- package/lib/index.cjs3.js +0 -1
- package/lib/index.cjs4.js +0 -1
- package/lib/index.cjs5.js +1 -2
- package/lib/index.cjs5.js.gz +0 -0
- package/lib/index.cjs6.js +1 -2
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs7.js +0 -1
- package/lib/index.cjs8.js +0 -1
- package/lib/index.cjs9.js +0 -1
- package/lib/index.es.js +0 -1
- package/lib/index.es10.js +0 -1
- package/lib/index.es11.js +1 -2
- package/lib/index.es12.js +1 -2
- package/lib/index.es12.js.gz +0 -0
- package/lib/index.es13.js +1 -2
- package/lib/index.es14.js +0 -1
- package/lib/index.es2.js +1 -2
- package/lib/index.es3.js +0 -1
- package/lib/index.es4.js +0 -1
- package/lib/index.es5.js +8 -2
- package/lib/index.es5.js.gz +0 -0
- package/lib/index.es6.js +8 -6
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es7.js +0 -1
- package/lib/index.es8.js +0 -1
- package/lib/index.es9.js +0 -1
- package/lib/theme.cjs.js +1 -2
- package/lib/theme.es.js +5 -2
- package/lib/translate.cjs.js +1 -2
- package/lib/translate.es.js +7 -2
- package/lib/utils.cjs.js +0 -1
- package/lib/utils.es.js +0 -1
- package/lib/vendor-axios.cjs.js +1 -0
- package/lib/vendor-axios.cjs.js.gz +0 -0
- package/lib/vendor-axios.es.js +2378 -0
- package/lib/vendor-axios.es.js.gz +0 -0
- package/lib/vendor-dayjs.cjs.js +1 -0
- package/lib/vendor-dayjs.es.js +294 -0
- package/lib/vendor-dayjs.es.js.gz +0 -0
- package/lib/vendor-file-saver.cjs.js +1 -0
- package/lib/vendor-file-saver.es.js +77 -0
- package/lib/vendor-localforage.cjs.js +7 -0
- package/lib/vendor-localforage.cjs.js.gz +0 -0
- package/lib/vendor-localforage.es.js +2139 -0
- package/lib/vendor-localforage.es.js.gz +0 -0
- package/lib/vendor-lodash.cjs.js +9 -0
- package/lib/vendor-lodash.cjs.js.gz +0 -0
- package/lib/vendor-lodash.es.js +5493 -0
- package/lib/vendor-lodash.es.js.gz +0 -0
- package/lib/vendor-mqtt.cjs.js +1 -0
- package/lib/vendor-mqtt.cjs.js.gz +0 -0
- package/lib/vendor-mqtt.es.js +6822 -0
- package/lib/vendor-mqtt.es.js.gz +0 -0
- package/lib/vendor-sortablejs.cjs.js +7 -0
- package/lib/vendor-sortablejs.cjs.js.gz +0 -0
- package/lib/vendor-sortablejs.es.js +2160 -0
- package/lib/vendor-sortablejs.es.js.gz +0 -0
- package/lib/yxIcon.cjs.js +0 -1
- package/lib/yxIcon.es.js +0 -1
- package/lib/yxi18n.cjs.js +0 -1
- package/lib/yxi18n.es.js +0 -1
- package/lib/yxuse.css +1 -1
- package/lib/yxuse.css.gz +0 -0
- package/package.json +1 -1
- package/lib/.pnpm.cjs.js +0 -26
- package/lib/.pnpm.cjs.js.gz +0 -0
- package/lib/.pnpm.cjs.js.map +0 -1
- package/lib/.pnpm.es.js +0 -54020
- package/lib/.pnpm.es.js.gz +0 -0
- package/lib/.pnpm.es.js.map +0 -1
- package/lib/api.cjs.js.map +0 -1
- package/lib/api.es.js.map +0 -1
- package/lib/app.cjs.js.map +0 -1
- package/lib/app.es.js.map +0 -1
- package/lib/components.cjs.js.map +0 -1
- package/lib/components.es.js.map +0 -1
- package/lib/directives.cjs.js.map +0 -1
- package/lib/directives.es.js.map +0 -1
- package/lib/hooks.cjs.js.map +0 -1
- package/lib/hooks.es.js.map +0 -1
- package/lib/index.cjs.js.map +0 -1
- package/lib/index.cjs10.js.map +0 -1
- package/lib/index.cjs11.js.map +0 -1
- package/lib/index.cjs12.js.map +0 -1
- package/lib/index.cjs13.js.map +0 -1
- package/lib/index.cjs14.js.map +0 -1
- package/lib/index.cjs2.js.map +0 -1
- package/lib/index.cjs3.js.map +0 -1
- package/lib/index.cjs4.js.map +0 -1
- package/lib/index.cjs5.js.map +0 -1
- package/lib/index.cjs6.js.map +0 -1
- package/lib/index.cjs7.js.map +0 -1
- package/lib/index.cjs8.js.map +0 -1
- package/lib/index.cjs9.js.map +0 -1
- package/lib/index.es.js.map +0 -1
- package/lib/index.es10.js.map +0 -1
- package/lib/index.es11.js.map +0 -1
- package/lib/index.es12.js.map +0 -1
- package/lib/index.es13.js.map +0 -1
- package/lib/index.es14.js.map +0 -1
- package/lib/index.es2.js.map +0 -1
- package/lib/index.es3.js.map +0 -1
- package/lib/index.es4.js.map +0 -1
- package/lib/index.es5.js.map +0 -1
- package/lib/index.es6.js.map +0 -1
- package/lib/index.es7.js.map +0 -1
- package/lib/index.es8.js.map +0 -1
- package/lib/index.es9.js.map +0 -1
- package/lib/theme.cjs.js.map +0 -1
- package/lib/theme.es.js.map +0 -1
- package/lib/translate.cjs.js.map +0 -1
- package/lib/translate.es.js.map +0 -1
- package/lib/utils.cjs.js.map +0 -1
- package/lib/utils.es.js.map +0 -1
- package/lib/yxIcon.cjs.js.map +0 -1
- package/lib/yxIcon.es.js.map +0 -1
- package/lib/yxi18n.cjs.js.map +0 -1
- package/lib/yxi18n.es.js.map +0 -1
package/lib/index.cjs6.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs6.js","sources":["../packages/components/YxDialog/index.vue","../packages/components/YxDrawer/index.vue","../packages/components/YxTable/index.vue","../packages/utils/excel/index.ts","../packages/components/YxForm/icon/question.svg?component","../packages/components/YxForm/index.vue","../packages/utils/common/update.ts","../packages/components/Update/index.vue","../packages/components/YxIcon/index.vue","../packages/components/YxUpload/index.vue","../packages/components/LogoTitle/index.vue","../packages/components/LogoTitle/index.ts"],"sourcesContent":["<!--\n * @Author: WangXin\n * @Date: 2024-01-17 18:18:08\n * @LastEditors: WangXin\n * @LastEditTime: 2025-06-06 14:31:11\n * @FilePath: /yxuse/packages/components/YxDialog/index.vue\n * @Description: \n * \n * Copyright (c) 2024 by YuXing, All Rights Reserved. \n-->\n\n<script setup lang=\"ts\" name=\"YxDialog\">\nimport { reactive } from \"vue\";\nimport type { DialogOptions } from \"./type\";\nconst dialogOptions = reactive({\n\twidth: \"40%\",\n\tshow: false,\n\ttitle: \"\",\n\tloading: false,\n\tshowFooter: true,\n\tautoClose: true\n});\nconst close = () => {\n\tconsole.log(\"关闭\");\n\tdialogMap[\"cancel\"] && dialogMap[\"cancel\"]();\n\tdialogOptions.show = false;\n};\nconst dialogMap: Record<string, Function> = {};\nconst submit = async () => {\n\t//执行提交之前的回调\n\tif (dialogMap[\"beforeSubmit\"] && !(await dialogMap[\"beforeSubmit\"]())) return;\n\tdialogOptions.loading = true;\n\ttry {\n\t\tdialogMap[\"submit\"] && (await dialogMap[\"submit\"]());\n\t\tdialogOptions.loading = false;\n\t\tif (dialogOptions.autoClose) close();\n\t} catch (err) {\n\t\tdialogOptions.loading = false;\n\t}\n};\nconst show = async ({ width, title, submit, cancel, showFooter, autoClose, beforeOpen, beforeSubmit }: DialogOptions) => {\n\tif (width) dialogOptions.width = width;\n\tif (title) dialogOptions.title = title;\n\tif (showFooter !== undefined) dialogOptions.showFooter = showFooter;\n\tif (autoClose !== undefined) dialogOptions.autoClose = autoClose;\n\tif (submit) dialogMap[\"submit\"] = submit;\n\tif (cancel) dialogMap[\"cancel\"] = cancel;\n\tif (beforeSubmit) dialogMap[\"beforeSubmit\"] = beforeSubmit;\n\tif (beforeOpen) {\n\t\tawait beforeOpen();\n\t}\n\tdialogOptions.show = true;\n};\n\ndefineExpose({\n\tshow,\n\tclose\n});\n</script>\n\n<template>\n\t<el-dialog\n\t\t:close-on-click-modal=\"false\"\n\t\tattrs\n\t\t:width=\"dialogOptions.width\"\n\t\tv-model=\"dialogOptions.show\"\n\t\t:title=\"dialogOptions.title\"\n\t\tdestroy-on-close\n\t\t:before-close=\"close\"\n\t>\n\t\t<el-scrollbar height=\"100%\">\n\t\t\t<slot />\n\t\t</el-scrollbar>\n\t\t<template #footer v-if=\"dialogOptions.showFooter\">\n\t\t\t<span class=\"dialog-footer flex justify-end\">\n\t\t\t\t<el-button plain @click=\"dialogOptions.show = false\">取消</el-button>\n\t\t\t\t<el-button :loading=\"dialogOptions.loading\" @click=\"submit\">确认</el-button>\n\t\t\t</span>\n\t\t</template>\n\t</el-dialog>\n</template>\n\n<style scoped lang=\"scss\"></style>\n","<!--\n * @Author: WangXin\n * @Date: 2024-01-17 18:18:08\n * @LastEditors: WangXin\n * @LastEditTime: 2025-05-15 16:05:44\n * @FilePath: /yxuse/packages/components/YxDrawer/index.vue\n * @Description: \n * \n * Copyright (c) 2024 by YuXing, All Rights Reserved. \n-->\n\n<script setup lang=\"ts\" name=\"YxDrawer\">\nimport { reactive } from \"vue\";\nimport type { DrawerOptions } from \"./type\";\nconst drawerOptions = reactive({\n\twidth: \"40%\",\n\tshow: false,\n\ttitle: \"\",\n\tloading: false,\n\tshowFooter: true,\n\tautoClose: true\n});\nconst close = () => {\n\tdrawerMap[\"cancel\"] && drawerMap[\"cancel\"]();\n\tdrawerOptions.show = false;\n\tconsole.log(\"关闭\");\n};\nconst drawerMap: Record<string, Function> = {};\nconst submit = async () => {\n\t//执行提交之前的回调\n\tif (drawerMap[\"beforeSubmit\"] && !(await drawerMap[\"beforeSubmit\"]())) return;\n\tdrawerOptions.loading = true;\n\ttry {\n\t\tdrawerMap[\"submit\"] && (await drawerMap[\"submit\"]());\n\t\tdrawerOptions.loading = false;\n\t\tif (drawerOptions.autoClose) close();\n\t} catch (err) {\n\t\tdrawerOptions.loading = false;\n\t}\n};\nconst show = async ({ width, title, submit, cancel, showFooter, autoClose, beforeOpen, beforeSubmit }: DrawerOptions) => {\n\tif (width) drawerOptions.width = width;\n\tif (title) drawerOptions.title = title;\n\tif (showFooter !== undefined) drawerOptions.showFooter = showFooter;\n\tif (autoClose !== undefined) drawerOptions.autoClose = autoClose;\n\tif (submit) drawerMap[\"submit\"] = submit;\n\tif (cancel) drawerMap[\"cancel\"] = cancel;\n\tif (beforeSubmit) drawerMap[\"beforeSubmit\"] = beforeSubmit;\n\tif (beforeOpen) {\n\t\tawait beforeOpen();\n\t}\n\tdrawerOptions.show = true;\n};\ndefineExpose({\n\tshow,\n\tclose\n});\n</script>\n<template>\n\t<el-drawer\n\t\t:close-on-click-modal=\"false\"\n\t\tattrs\n\t\t:size=\"drawerOptions.width\"\n\t\tv-model=\"drawerOptions.show\"\n\t\t:title=\"drawerOptions.title\"\n\t\tdestroy-on-close\n\t\t@close=\"close\"\n\t>\n\t\t<slot />\n\t\t<template #footer v-if=\"drawerOptions.showFooter\">\n\t\t\t<span class=\"dialog-footer flex justify-end\">\n\t\t\t\t<el-button plain @click=\"drawerOptions.show = false\">取消</el-button>\n\t\t\t\t<el-button :loading=\"drawerOptions.loading\" @click=\"submit\">确认</el-button>\n\t\t\t</span>\n\t\t</template>\n\t</el-drawer>\n</template>\n\n<style scoped lang=\"scss\"></style>\n","<!--\n * @Author: WangXin\n * @Date: 2024-01-04 16:35:08\n * @LastEditors: WangXin\n * @LastEditTime: 2025-06-06 15:03:46\n * @FilePath: /yxuse/packages/components/YxTable/index.vue\n * @Description: \n * \n * Copyright (c) 2024 by YuXing, All Rights Reserved. \n-->\n<script setup lang=\"tsx\">\nimport {\n\tref,\n\tonMounted,\n\tonBeforeMount,\n\tnextTick,\n\tuseSlots,\n\tuseAttrs,\n\twithModifiers,\n\twatch,\n\tresolveComponent,\n\tdefineOptions\n} from \"vue\";\nimport type { FormItemRule } from \"element-plus\";\nimport type { TableColumn, YxTableProps, ColumnsConfig } from \"./type.ts\";\nimport { exportToExcel } from \"@packages/utils/excel\";\nimport Sortable from \"sortablejs\";\nconst props = defineProps<YxTableProps>();\nconst slots = useSlots();\nconst attrs = useAttrs();\nconst tableRef = ref();\nconst tableFormRef = ref();\nconst columns = ref<TableColumn[]>([]);\n/**是否为编辑表单,且需要进行表格校验 */\nconst isFormTable = ref(false);\nconst formTableRules = ref<{ [key: string]: FormItemRule[] }>({});\nconst emit = defineEmits<{\n\t(e: \"operate-handle\", type: string, data: object, index: number): void;\n\t(e: \"sort-end\", oldIndex: number, newIndex: number): void;\n\t(e: \"update-page\", type: string, value: number): void;\n}>();\nonMounted(() => {\n\tnextTick(() => {\n\t\tstartSort();\n\t});\n});\nwatch(\n\t() => props.columns,\n\t() => {\n\t\tinitTable();\n\t}\n);\nonBeforeMount(async () => {\n\tawait initTable();\n});\nconst initTable = async () => {\n\tcolumns.value = typeof props.columns === \"function\" ? await props.columns() : props.columns;\n\tcolumns.value.forEach((col: TableColumn) => {\n\t\tif (col.required || col.rules?.length) {\n\t\t\tisFormTable.value = true;\n\t\t}\n\t\tif (col?.renderType && [\"select\", \"cascader\"].includes(col?.renderType) && col?.config?.loadOptions) {\n\t\t\tloadOptions(col.config);\n\t\t}\n\t});\n\tif (isFormTable.value) {\n\t\tgetRules();\n\t}\n};\n/**远程加载下拉数据 */\nconst loadOptions = async (config: any) => {\n\tif (config?.options && config?.options.length === 0 && config?.loadOptions && typeof config?.loadOptions === \"function\") {\n\t\tconfig.options = await config?.loadOptions();\n\t}\n};\nconst startSort = () => {\n\tif (!props.sort) return;\n\tconst sortDom = tableRef.value?.$el?.querySelector(\".el-table__body tbody\");\n\tSortable.create(sortDom, {\n\t\tanimation: 200,\n\t\t// group: \"el-table__row table-row\",\n\t\tsort: true,\n\t\thandle: props.sortHandle ? `.${props.sortHandle}` : null,\n\t\tonEnd: ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\t\temit(\"sort-end\", oldIndex, newIndex);\n\t\t}\n\t});\n};\n/***渲染动态组件 */\nconst dynamicComponent = (column: TableColumn, { $index, row }: any) => {\n\tconst { renderType, event = {}, prop, label, config = {}, required, rules } = column;\n\tif (!prop || !renderType) return null;\n\tconst Component = resolveComponent(\"el-\" + renderType) as any;\n\tconst { options = [], ...restConfig } = config;\n\t// 渲染子组件(如 select 的 options)\n\tconst renderChildComponent = () => {\n\t\tif (!options || options.length === 0) return null;\n\t\tif (renderType === \"select\") {\n\t\t\treturn options.map((item: any) => <el-option label={item.label} value={item.value} key={item.value} />);\n\t\t}\n\t\tif (renderType === \"radio-group\") {\n\t\t\treturn options.map((item: any) => (\n\t\t\t\t<el-radio label={item.value} key={item.value}>\n\t\t\t\t\t{item.label}\n\t\t\t\t</el-radio>\n\t\t\t));\n\t\t}\n\t\treturn null;\n\t};\n\t// 单独处理 cascader\n\tif (renderType === \"cascader\") {\n\t\treturn <el-cascader v-model={row[prop]} placeholder={`请选择${label}`} options={options} {...event} {...restConfig} />;\n\t}\n\t// 通用组件渲染\n\tconst isSelect = [\"select\", \"cascader\"].includes(renderType);\n\t//是否为编辑表格必填项\n\tconst isFormCell = required || rules?.length;\n\tconst modelValue = row[prop];\n\tconst updateModelValue = (val: any) => {\n\t\t//处理配置是数值类型\n\t\trow[prop] = config?.type === \"number\" ? Number(val) : val;\n\t};\n\tconst component = (\n\t\t<Component\n\t\t\tmodelValue={modelValue}\n\t\t\tonUpdate:modelValue={updateModelValue}\n\t\t\tplaceholder={`请${isSelect ? \"选择\" : \"输入\"}${label}`}\n\t\t\t{...event}\n\t\t\t{...restConfig}\n\t\t>\n\t\t\t{renderChildComponent()}\n\t\t</Component>\n\t);\n\tif (!isFormCell) return component;\n\t//编辑表格\n\treturn renderForm(prop, $index, component);\n};\nconst renderForm = (prop: any, index: number, component: any) => {\n\treturn (\n\t\t<el-form-item prop={\"tableData.\" + index + \".\" + prop} rules={formTableRules.value[prop]}>\n\t\t\t{component}\n\t\t</el-form-item>\n\t);\n};\n/**初始化规则 */\nconst getRules = () => {\n\tconst rules: { [key: string]: FormItemRule[] } = {};\n\tif (!isFormTable.value) return;\n\tconst handleRule = (item: TableColumn) => {\n\t\tif (!item.prop) return;\n\t\tconst isSelect = item?.renderType && [\"select\", \"cascader\"].includes(item?.renderType);\n\t\tconst defaultRule = { required: true, message: `${item.label ?? \"该字段\"}不能为空`, trigger: isSelect ? \"change\" : \"blur\" };\n\t\tif (item.required) {\n\t\t\trules[item.prop] = [defaultRule];\n\t\t}\n\t\tif (item.rules && item.rules.length > 0) {\n\t\t\trules[item.prop] = [...(rules[item?.prop] || []), ...item.rules];\n\t\t}\n\t};\n\tcolumns.value\n\t\t.filter(cell => (cell?.renderType || cell?.render) && (cell?.required || cell?.rules))\n\t\t.forEach((form: any) => {\n\t\t\tform.children?.forEach(handleRule); // 处理子项\n\t\t\thandleRule(form); // 处理自身\n\t\t});\n\tformTableRules.value = rules;\n\tconsole.log(\"rules\", formTableRules.value);\n};\n/**编辑表格校验 */\nconst tableFormValidate = async (): Promise<boolean> => {\n\tif (!isFormTable.value) return Promise.resolve(true);\n\tif (!tableFormRef.value) return Promise.resolve(false);\n\treturn await tableFormRef.value.validate(() => Promise.resolve());\n};\nconst render = (props: YxTableProps) => {\n\tconst { rowKey, tableData, pageInfo } = props;\n\t//动态插槽\n\tconst columnSlots = (cell: TableColumn, scope: any) => cell.slotName && slots[cell.slotName]?.(scope);\n\t//处理列;\n\tconst renderColumn = (columns: TableColumn[]) => {\n\t\treturn columns\n\t\t\t.filter(cell => !cell.show || cell.show(cell))\n\t\t\t.map((cell: TableColumn) => {\n\t\t\t\tconst { children, ...cellConf } = cell;\n\t\t\t\treturn (\n\t\t\t\t\t<el-table-column {...cellConf}>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: (scope: any) => {\n\t\t\t\t\t\t\t\t//先处理操作栏\n\t\t\t\t\t\t\t\tif (cell?.renderType === \"operate\") return renderOperate(cell, scope);\n\t\t\t\t\t\t\t\t//处理动态渲染的组件,绑定动态row\n\t\t\t\t\t\t\t\tif (cell?.renderType && cell?.renderType !== \"operate\") {\n\t\t\t\t\t\t\t\t\treturn dynamicComponent(cell, scope);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//处理自定义渲染函数,判断是否为表单组件\n\t\t\t\t\t\t\t\tif (cell?.render) {\n\t\t\t\t\t\t\t\t\tconst renderResult = cell.render(scope.row, scope.$index, cell);\n\t\t\t\t\t\t\t\t\t//是否为编辑表单\n\t\t\t\t\t\t\t\t\tconst needsValidation = cell.required || cell.rules;\n\t\t\t\t\t\t\t\t\t//是否为组件节点\n\t\t\t\t\t\t\t\t\tconst isFragment = [\"symbol\", \"object\"].includes(typeof renderResult?.type);\n\t\t\t\t\t\t\t\t\t// 如果为表单节点且需要校验,进行form-item包裹\n\t\t\t\t\t\t\t\t\tif (needsValidation && isFragment) {\n\t\t\t\t\t\t\t\t\t\treturn renderForm(cell.prop, scope.$index, renderResult);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn renderResult;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//处理多级表头\n\t\t\t\t\t\t\t\tif (children && children?.length > 0) return renderColumn(children);\n\t\t\t\t\t\t\t\t//处理自定义插槽\n\t\t\t\t\t\t\t\treturn cell?.slotName && columnSlots(cell, scope);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\theader: (scope: any) => {\n\t\t\t\t\t\t\t\t//添加必填标识\n\t\t\t\t\t\t\t\tif (cell?.required) {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<span class=\"flex items-center gap-5 required\">\n\t\t\t\t\t\t\t\t\t\t\t{/* <span class=\"text-[var(--color-error-100)]\">* </span> */}\n\t\t\t\t\t\t\t\t\t\t\t{scope?.column?.label ?? \"\"}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//处理自定义渲染函数\n\t\t\t\t\t\t\t\tif (cell?.headerRender) return cell?.headerRender(scope.row);\n\t\t\t\t\t\t\t\t//处理表头自定义插槽\n\t\t\t\t\t\t\t\tif (cell?.headerSlotName) return slots[cell?.headerSlotName]?.(scope);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t</el-table-column>\n\t\t\t\t);\n\t\t\t});\n\t};\n\t//操作栏;\n\t// const renderOperate = (cell: TableColumn, scope: any) => {\n\t// \treturn (\n\t// \t\t<div class={`flex justify-center items-center cursor-pointer gap-10 ${cell.config?.className ?? \"\"}`}>\n\t// \t\t\t{cell.operate\n\t// \t\t\t\t?.filter(op => !op.show || op.show(scope.row))\n\t// \t\t\t\t.map(op => {\n\t// \t\t\t\t\tif (op?.render) return op.render(scope.row, scope.$index);\n\t// \t\t\t\t\treturn (\n\t// \t\t\t\t\t\t<span\n\t// \t\t\t\t\t\t\tonClick={withModifiers(() => {\n\t// \t\t\t\t\t\t\t\top?.onClick && op?.onClick(scope.row);\n\t// \t\t\t\t\t\t\t\temit(\"operate-handle\", op.key, scope.row, scope.$index);\n\t// \t\t\t\t\t\t\t}, [\"stop\"])}\n\t// \t\t\t\t\t\t\tclass={`table-handle whitespace-nowrap ${op?.className ?? \"\"}`}\n\t// \t\t\t\t\t\t>\n\t// \t\t\t\t\t\t\t{op.label}\n\t// \t\t\t\t\t\t</span>\n\t// \t\t\t\t\t);\n\t// \t\t\t\t})}\n\t// \t\t</div>\n\t// \t);\n\t// };\n\tconst renderOperate = (cell: TableColumn, scope: any) => {\n\t\treturn (\n\t\t\t<div class={`flex justify-center items-center cursor-pointer gap-10 ${cell.config?.className ?? \"\"}`}>\n\t\t\t\t{cell.operate\n\t\t\t\t\t?.filter(op => !op.show || op.show(scope.row))\n\t\t\t\t\t.map(op => {\n\t\t\t\t\t\tif (op?.render) return op.render(scope.row, scope.$index);\n\t\t\t\t\t\tconst disabled = typeof op?.disabled === \"function\" ? op.disabled(scope.row, scope.$index) : op?.disabled ?? false;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tonClick={withModifiers(() => {\n\t\t\t\t\t\t\t\t\tif (!disabled) {\n\t\t\t\t\t\t\t\t\t\top?.onClick && op?.onClick(scope.row);\n\t\t\t\t\t\t\t\t\t\temit(\"operate-handle\", op.key, scope.row, scope.$index);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, [\"stop\"])}\n\t\t\t\t\t\t\t\tclass={`table-handle whitespace-nowrap ${op?.className ?? \"\"} ${disabled ? \"table-handle-disabled\" : \"\"}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{op.label}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t</div>\n\t\t);\n\t};\n\t//分页\n\tconst pagination = () => {\n\t\tif (!pageInfo) return null;\n\t\tconst handleSizeChange = (e: number) => {\n\t\t\temit(\"update-page\", \"pageSize\", e);\n\t\t};\n\t\tconst handleCurrentChange = (e: number) => {\n\t\t\temit(\"update-page\", \"pageIndex\", e);\n\t\t};\n\t\treturn (\n\t\t\t<div class=\"pagination-wrap\">\n\t\t\t\t<el-pagination\n\t\t\t\t\tv-model:currentPage={pageInfo.pageIndex}\n\t\t\t\t\tv-model:pageSize={pageInfo.pageSize}\n\t\t\t\t\tsmall={false}\n\t\t\t\t\tdisabled={false}\n\t\t\t\t\tpage-sizes={[10, 20, 50, 100]}\n\t\t\t\t\tlayout={pageInfo?.layout ? pageInfo?.layout : \"total,sizes,prev, pager, next\"}\n\t\t\t\t\tbackground={false}\n\t\t\t\t\ttotal={pageInfo.total}\n\t\t\t\t\tonSizeChange={handleSizeChange}\n\t\t\t\t\tonCurrentChange={handleCurrentChange}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t};\n\tif (!columns.value) return;\n\treturn (\n\t\t<>\n\t\t\t{isFormTable.value ? (\n\t\t\t\t<el-form model={props} ref={tableFormRef}>\n\t\t\t\t\t{renderTable()}\n\t\t\t\t</el-form>\n\t\t\t) : (\n\t\t\t\trenderTable()\n\t\t\t)}\n\t\t\t{pagination()}\n\t\t</>\n\t);\n\t/**渲染表格 */\n\tfunction renderTable() {\n\t\treturn (\n\t\t\t<el-table ref={tableRef} {...attrs} row-key={rowKey} data={tableData}>\n\t\t\t\t{renderColumn(columns.value)}\n\t\t\t</el-table>\n\t\t);\n\t}\n};\nconst exportDataToExcel = (fileName?: string) => {\n\tconst header = columns.value.filter(cell => cell.prop);\n\tconst tableData = props.tableData;\n\texportToExcel({ header, tableData, fileName: fileName || Date.now() });\n};\n/** 更新列 */\nconst updateColumns = async (newColumns: ColumnsConfig) => {\n\tif (!columns.value) return;\n\tcolumns.value = typeof newColumns === \"function\" ? await newColumns() : newColumns;\n};\ndefineExpose({\n\ttableRef,\n\texportDataToExcel,\n\tupdateColumns,\n\ttableFormValidate\n});\ndefineOptions({\n\tname: \"YxTable\",\n\tinheritAttrs: false\n});\n</script>\n\n<template>\n\t<component :is=\"render(props)\" />\n</template>\n\n<style scoped lang=\"scss\"></style>\n","import * as XLSX from \"xlsx\";\nimport { saveAs } from \"file-saver\";\nimport XLSXStyle from \"xlsx-js-style\";\n\nfunction generateArray(table) {\n\tlet out = [];\n\tlet rows = table.querySelectorAll(\"tr\");\n\tlet ranges = [];\n\tfor (var R = 0; R < rows.length; ++R) {\n\t\tvar outRow = [];\n\t\tlet row = rows[R];\n\t\tlet columns = row.querySelectorAll(\"td\");\n\t\tfor (let C = 0; C < columns.length; ++C) {\n\t\t\tlet cell = columns[C];\n\t\t\tlet colspan = cell.getAttribute(\"colspan\");\n\t\t\tlet rowspan = cell.getAttribute(\"rowspan\");\n\t\t\tlet cellValue = cell.innerText;\n\t\t\tif (cellValue !== \"\" && cellValue == +cellValue) cellValue = +cellValue;\n\n\t\t\t//Skip ranges\n\t\t\tranges.forEach(function (range) {\n\t\t\t\tif (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {\n\t\t\t\t\tfor (let i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t//Handle Row Span\n\t\t\tif (rowspan || colspan) {\n\t\t\t\trowspan = rowspan || 1;\n\t\t\t\tcolspan = colspan || 1;\n\t\t\t\tranges.push({\n\t\t\t\t\ts: {\n\t\t\t\t\t\tr: R,\n\t\t\t\t\t\tc: outRow.length\n\t\t\t\t\t},\n\t\t\t\t\te: {\n\t\t\t\t\t\tr: R + rowspan - 1,\n\t\t\t\t\t\tc: outRow.length + colspan - 1\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t//Handle Value\n\t\t\toutRow.push(cellValue !== \"\" ? cellValue : null);\n\n\t\t\t//Handle Colspan\n\t\t\tif (colspan) for (let k = 0; k < colspan - 1; ++k) outRow.push(null);\n\t\t}\n\t\tout.push(outRow);\n\t}\n\treturn [out, ranges];\n}\n\nfunction datenum(v, date1904) {\n\tif (date1904) v += 1462;\n\tlet epoch = Date.parse(v);\n\treturn (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);\n}\n\nfunction sheet_from_array_of_arrays(data, opts) {\n\tlet ws = {};\n\tlet range = {\n\t\ts: {\n\t\t\tc: 10000000,\n\t\t\tr: 10000000\n\t\t},\n\t\te: {\n\t\t\tc: 0,\n\t\t\tr: 0\n\t\t}\n\t};\n\tfor (let R = 0; R != data.length; ++R) {\n\t\tfor (let C = 0; C != data[R].length; ++C) {\n\t\t\tif (range.s.r > R) range.s.r = R;\n\t\t\tif (range.s.c > C) range.s.c = C;\n\t\t\tif (range.e.r < R) range.e.r = R;\n\t\t\tif (range.e.c < C) range.e.c = C;\n\t\t\tlet cell = {\n\t\t\t\tv: data[R][C]\n\t\t\t};\n\t\t\tif (cell.v == null) continue;\n\t\t\tlet cell_ref = XLSX.utils.encode_cell({\n\t\t\t\tc: C,\n\t\t\t\tr: R\n\t\t\t});\n\n\t\t\tif (typeof cell.v === \"number\") cell.t = \"n\";\n\t\t\telse if (typeof cell.v === \"boolean\") cell.t = \"b\";\n\t\t\telse if (cell.v instanceof Date) {\n\t\t\t\tcell.t = \"n\";\n\t\t\t\tcell.z = XLSX.SSF._table[14];\n\t\t\t\tcell.v = datenum(cell.v);\n\t\t\t} else cell.t = \"s\";\n\n\t\t\tws[cell_ref] = cell;\n\t\t}\n\t}\n\tif (range.s.c < 10000000) ws[\"!ref\"] = XLSX.utils.encode_range(range);\n\treturn ws;\n}\n\nfunction Workbook() {\n\tif (!(this instanceof Workbook)) return new Workbook();\n\tthis.SheetNames = [];\n\tthis.Sheets = {};\n}\n\nfunction s2ab(s) {\n\tlet buf = new ArrayBuffer(s.length);\n\tlet view = new Uint8Array(buf);\n\tfor (let i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xff;\n\treturn buf;\n}\n\nexport function export_table_to_excel(id) {\n\tlet theTable = document.getElementById(id);\n\tlet oo = generateArray(theTable);\n\tlet ranges = oo[1];\n\n\t/* original data */\n\tlet data = oo[0];\n\tlet ws_name = \"SheetJS\";\n\n\tlet wb = new Workbook(),\n\t\tws = sheet_from_array_of_arrays(data);\n\n\t/* add ranges to worksheet */\n\t// ws['!cols'] = ['apple', 'banan'];\n\tws[\"!merges\"] = ranges;\n\n\t/* add worksheet to workbook */\n\twb.SheetNames.push(ws_name);\n\twb.Sheets[ws_name] = ws;\n\n\tlet wbout = XLSX.write(wb, {\n\t\tbookType: \"xlsx\",\n\t\tbookSST: false,\n\t\ttype: \"binary\"\n\t});\n\n\tsaveAs(\n\t\tnew Blob([s2ab(wbout)], {\n\t\t\ttype: \"application/octet-stream\"\n\t\t}),\n\t\t\"test.xlsx\"\n\t);\n}\n\nexport function export_json_to_excel({\n\tmultiHeader = [],\n\theader,\n\tdata,\n\tfilename,\n\tmerges = [],\n\tautoWidth = true,\n\texcelWidth = true,\n\tbookType = \"xlsx\"\n} = {}) {\n\t/* original data */\n\t// console.log( multiHeader,header,data,filename)\n\tfilename = filename || \"excel-list\";\n\tdata = [...data];\n\tdata.unshift(header);\n\n\tfor (let i = multiHeader.length - 1; i > -1; i--) {\n\t\tdata.unshift(multiHeader[i]);\n\t}\n\n\tlet ws_name = \"SheetJS\";\n\tlet wb = new Workbook(),\n\t\tws = sheet_from_array_of_arrays(data);\n\n\tif (merges.length > 0) {\n\t\tif (!ws[\"!merges\"]) ws[\"!merges\"] = [];\n\t\tmerges.forEach(item => {\n\t\t\tws[\"!merges\"].push(XLSX.utils.decode_range(item));\n\t\t});\n\t}\n\n\tif (autoWidth) ws[\"!cols\"] = getColWidth(data);\n\tif (excelWidth) setColMaxW(data, ws);\n\n\t/* add worksheet to workbook */\n\twb.SheetNames.push(ws_name);\n\twb.Sheets[ws_name] = ws;\n\n\tlet wbout = XLSX.write(wb, {\n\t\tbookType: bookType,\n\t\tbookSST: false,\n\t\ttype: \"binary\"\n\t});\n\tsaveAs(\n\t\tnew Blob([s2ab(wbout)], {\n\t\t\ttype: \"application/octet-stream\"\n\t\t}),\n\t\t`${filename}.${bookType}`\n\t);\n}\n\n// export function readFile(file) {\n// return new Promise((resolve) => {\n// let reader = new FileReader();\n// reader.readAsBinaryString(file);\n// reader.onload = (ev) => {\n// let dataBinary = ev.target.result;\n// let workBook = XLSX.read(dataBinary, { type: \"binary\", cellDates: true });\n// let workSheet = workBook.Sheets[workBook.SheetNames[0]];\n// const data = XLSX.utils.sheet_to_json(workSheet, {defval:\"\"});\n// resolve(data);\n// };\n// });\n// }\n\nexport function readFile(file) {\n\treturn new Promise(resolve => {\n\t\tlet reader = new FileReader();\n\t\treader.readAsBinaryString(file);\n\t\treader.onload = ev => {\n\t\t\tresolve(ev.target.result);\n\t\t};\n\t});\n}\n\n// 读取excel,返回一维数组,第一行格式:{列名:值,列名:值}\nexport async function readExcel(file) {\n\tlet dataBinary = await readFile(file);\n\tlet workBook = XLSX.read(dataBinary, { type: \"binary\", cellDates: true });\n\tlet workSheet = workBook.Sheets[workBook.SheetNames[0]];\n\tconst data = XLSX.utils.sheet_to_json(workSheet, { defval: \"\" });\n\treturn data;\n}\n\n// 读取excel,返回二维数组,第一行表头,后面行是数据\nexport async function readExcelToArray(file) {\n\tlet dataBinary = await readFile(file);\n\tlet workBook = XLSX.read(dataBinary, { type: \"binary\", cellDates: true });\n\tlet workSheet = workBook.Sheets[workBook.SheetNames[0]];\n\tconst data = XLSX.utils.sheet_to_json(workSheet, { defval: \"\", header: 1 });\n\treturn data;\n}\n\nexport async function saveFile(content, fileName) {\n\tlet file = new Blob([content]);\n\tsaveAs(file, fileName);\n}\n\n// 判断列宽\nfunction getColWidth(list) {\n\t/*设置worksheet每列的最大宽度*/\n\tconst colWidth = list.map(row =>\n\t\trow.map(val => {\n\t\t\t/*先判断是否为null/undefined*/\n\t\t\tif (val == null) {\n\t\t\t\treturn {\n\t\t\t\t\twch: 10\n\t\t\t\t};\n\t\t\t} else if (val.toString().charCodeAt(0) > 255) {\n\t\t\t\t/*再判断是否为中文*/\n\t\t\t\treturn {\n\t\t\t\t\twch: val.toString().length * 2\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\twch: val.toString().length\n\t\t\t\t};\n\t\t\t}\n\t\t})\n\t);\n\t/*以第一行为初始值*/\n\tlet result = colWidth[0];\n\tfor (let i = 1; i < colWidth.length; i++) {\n\t\tfor (let j = 0; j < colWidth[i].length; j++) {\n\t\t\tif (result[j][\"wch\"] < colWidth[i][j][\"wch\"]) {\n\t\t\t\tresult[j][\"wch\"] = colWidth[i][j][\"wch\"];\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n}\n\n// 设置最大列宽\nfunction setColMaxW(list, ws) {\n\t/*设置worksheet每列的最大宽度*/\n\tconst colWidth = list.map(row =>\n\t\trow.map(val => {\n\t\t\t/*先判断是否为null/undefined*/\n\t\t\t// console.log(val)\n\t\t\tif (val == null) {\n\t\t\t\treturn {\n\t\t\t\t\twch: 10\n\t\t\t\t};\n\t\t\t} else if (val.toString().charCodeAt(0) > 255) {\n\t\t\t\t/*再判断是否为中文*/\n\t\t\t\treturn {\n\t\t\t\t\twch: 20\n\t\t\t\t};\n\t\t\t} else if (val.toString().indexOf(\"<operation\") !== -1) {\n\t\t\t\t/* 判断是否为报文数据*/\n\t\t\t\treturn {\n\t\t\t\t\twch: 30\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\twch: val.toString().length\n\t\t\t\t};\n\t\t\t}\n\t\t})\n\t);\n\t// console.log(colWidth)\n\t/*以第一行为初始值*/\n\tlet result = colWidth[0];\n\tfor (let i = 1; i < colWidth.length; i++) {\n\t\tfor (let j = 0; j < colWidth[i].length; j++) {\n\t\t\tif (result[j][\"wch\"] < colWidth[i][j][\"wch\"]) {\n\t\t\t\tresult[j][\"wch\"] = colWidth[i][j][\"wch\"];\n\t\t\t}\n\t\t}\n\t}\n\t// console.log(result)\n\tresult[0].wch = 20;\n\tresult[4] ? (result[4].wch = 10) : \"\";\n\tws[\"!cols\"] = result;\n}\n\n// 导出excel,且可带单元格注释及样式\nconst englishLetter = [\n\t\"A\",\n\t\"B\",\n\t\"C\",\n\t\"D\",\n\t\"E\",\n\t\"F\",\n\t\"G\",\n\t\"H\",\n\t\"I\",\n\t\"J\",\n\t\"K\",\n\t\"L\",\n\t\"M\",\n\t\"N\",\n\t\"O\",\n\t\"P\",\n\t\"Q\",\n\t\"R\",\n\t\"S\",\n\t\"T\",\n\t\"U\",\n\t\"V\",\n\t\"W\",\n\t\"X\",\n\t\"Y\",\n\t\"X\"\n];\nexport function export_excel_style({ header, data, filename, merges = [], autoWidth = true, excelWidth = true } = {}) {\n\t// 创建一个工作簿\n\tconst workBook = XLSX.utils.book_new();\n\tdata = [...data];\n\tdata.unshift(header.map(item => item.label));\n\t// 创建工作表 worksheet\n\tconst workSheet = sheet_from_array_of_arrays(data);\n\tif (merges.length > 0) {\n\t\tif (!workSheet[\"!merges\"]) workSheet[\"!merges\"] = [];\n\t\tmerges.forEach(item => {\n\t\t\tworkSheet[\"!merges\"].push(XLSX.utils.decode_range(item));\n\t\t});\n\t}\n\tif (autoWidth) workSheet[\"!cols\"] = getColWidth(data);\n\tif (excelWidth) setColMaxW(data, workSheet);\n\theader.forEach((head, index) => {\n\t\tlet cell = workSheet[`${englishLetter[index]}1`];\n\t\t// cell.s = { font:{ bold: true } };\n\t\tif (cell && head.note) {\n\t\t\tif (!cell.c) cell.c = [];\n\t\t\tcell.c.hidden = true;\n\t\t\tcell.c.push({ a: head.label, t: head.note });\n\t\t}\n\t});\n\t// 将工作表放入工作簿中\n\tXLSX.utils.book_append_sheet(workBook, workSheet, \"Sheet1\");\n\t// 生成数据保存\n\tXLSXStyle.writeFile(workBook, `${filename}.xlsx`, { bookType: \"xlsx\" });\n}\n\n// 验证文件格式\nexport function checkFileType(file, fileType) {\n\tlet index = file.name.lastIndexOf(\".\");\n\tlet ext = file.name.substr(index);\n\tlet extList = fileType instanceof Array ? fileType : [fileType];\n\tif (fileType === \"Excel\") {\n\t\textList = [\".xls\", \".xlsx\", \".csv\"];\n\t}\n\tif (!extList.includes(ext)) {\n\t\treturn `请上传${extList.join(\"或\") || \"指定格式\"}文件!`;\n\t}\n\treturn \"\";\n}\n\n// 解析文件并判断文件类型\nexport async function parseFile(file, config) {\n\tlet typeErrorMsg = checkFileType(file, config.fileType);\n\tif (typeErrorMsg) return { code: 0, message: typeErrorMsg };\n\tif (config.fileType === \"Excel\") {\n\t\tlet data = await readExcelToArray(file);\n\t\treturn { code: 200, data };\n\t}\n\tlet dataBinary = await readFile(file);\n\treturn { code: 200, data: dataBinary };\n}\n\n// 导出多Sheet Excel\nexport async function exportMultiSheetExcel(fileName, list) {\n\tconst wb = XLSX.utils.book_new();\n\n\t// 使用 Promise 包装异步操作\n\tconst generateSheetAsync = async section => {\n\t\treturn new Promise(resolve => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst ws = XLSX.utils.json_to_sheet(section.data);\n\t\t\t\tXLSX.utils.book_append_sheet(wb, ws, section.sheetName.replace(/[\\\\/:*?\\[\\]]/g, \"-\"));\n\t\t\t\tresolve(true);\n\t\t\t}, 0);\n\t\t});\n\t};\n\n\t// 使用 for...of 循环和 await 处理异步操作\n\tfor (const section of list) {\n\t\tawait generateSheetAsync(section);\n\t}\n\n\tconst excelBuffer = XLSX.write(wb, { bookType: \"xlsx\", type: \"array\" });\n\tconst data = new Blob([excelBuffer], { type: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" });\n\tsaveAs(data, fileName);\n}\n\nexport const exportToExcel = ({ header, tableData, fileName }: any) => {\n\t// 1. 获取表头(columns)并处理为 Excel 中的第一行\n\tconst tHeader = header.map(col => col.label); // 获取每一列的 label 作为表头\n\t// 2. 获取表格数据(data)\n\tconst data = tableData.map(row => {\n\t\treturn header.map(col => row[col.prop]); // 按照表头的顺序排列每行数据\n\t});\n\t// 3. 将表头和数据合并\n\tconst finalData = [tHeader, ...data]; // 把表头和数据组合成一个数组\n\t// 4. 创建工作表(sheet)\n\tconst ws = XLSX.utils.aoa_to_sheet(finalData); // 使用 aoa_to_sheet 转换为工作表\n\tconst wb = XLSX.utils.book_new(); // 创建工作簿\n\tXLSX.utils.book_append_sheet(wb, ws, \"Sheet1\"); // 添加工作表\n\n\t// 5. 导出 Excel 文件\n\tXLSX.writeFile(wb, `${fileName}.xlsx`); // 下载 Excel 文件\n};\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 1024 1024\"\n}\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [\n _createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784\"\n }, null, -1)\n ])))\n}\nexport default { render: render }","<!--\n * @Author: WangXin\n * @Date: 2023-06-08 10:10:13\n * @LastEditors: WangXin\n * @LastEditTime: 2025-06-06 14:58:42\n * @FilePath: /yxuse/packages/components/YxForm/index.vue\n * @Description: \n * \n * Copyright (c) 2023 by YuXing, All Rights Reserved. \n-->\n<script setup lang=\"tsx\">\nimport { ref, useAttrs, useSlots, resolveComponent, watch, onBeforeMount, onUnmounted } from \"vue\";\nimport type { FormInstance, FormItemRule } from \"element-plus\";\nimport type { YxFormProps, FormItem, FormStyle } from \"./type\";\nimport Question from \"./icon/question.svg?component\";\nconst formData = ref<{ [key: string]: any }>({});\nconst formRules = ref<{ [key: string]: FormItemRule[] }>({});\nconst formColumn = ref<FormItem[]>([]);\nconst attrs = useAttrs();\nconst props = withDefaults(defineProps<YxFormProps>(), {\n\tformLayout: \"horizontal\",\n\tformStyle: () => ({\n\t\trow: 3,\n\t\tgap: \"15px\",\n\t\tlabelWidth: \"100px\",\n\t\talignItems: \"start\"\n\t})\n});\nconst isOptionsComponent = (type?: string): any => type && [\"select\", \"cascader\"].includes(type);\n//初始化表单data\nconst initForm = async () => {\n\tconst { formList, formParams } = props as YxFormProps;\n\t// 获取表单配置\n\tformColumn.value = typeof formList === \"function\" ? await formList() : formList;\n\tif (!Array.isArray(formColumn.value) || formColumn.value.length === 0) {\n\t\tconsole.warn(\"请配置表单项\");\n\t\treturn;\n\t}\n\t// 初始化表单数据\n\tconst initialData: Record<string, any> = {};\n\t// 填充默认值并加载选项(递归处理嵌套)\n\tconst fillFormData = (item: any) => {\n\t\tif (item.prop && !(item.prop in initialData)) {\n\t\t\tinitialData[item.prop] = undefined;\n\t\t}\n\t\tif (isOptionsComponent(item?.renderType)) {\n\t\t\tloadOptions(item); // 异步加载选项数据\n\t\t}\n\t\tif (Array.isArray(item.children)) {\n\t\t\titem.children.forEach(fillFormData);\n\t\t}\n\t\t//如果有配置关联的选项\n\t\thandleLinkOptions(item);\n\t};\n\tformColumn.value.forEach(item => fillFormData(item));\n\t// 编辑模式下回填数据\n\tif (formParams && Object.keys(formParams).length > 0) {\n\t\tif (hasLoadOptions()) {\n\t\t\tfor (const item of formColumn.value) {\n\t\t\t\tif (!item.prop) continue;\n\t\t\t\tconst isAsyncOption = item.config?.loadOptions && typeof item.config.loadOptions === \"function\";\n\t\t\t\t// 如果不是需要跳过赋值的字段,就赋值\n\t\t\t\tif (!(isAsyncOption && formParams[item.prop] !== undefined)) {\n\t\t\t\t\tformData.value[item.prop] = formParams[item.prop];\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//兼容老版本回写formParams数据\n\t\t\tformData.value = formParams;\n\t\t}\n\t} else {\n\t\tconsole.log(\"initialData\", initialData);\n\t\tformData.value = initialData;\n\t}\n\tconsole.log(\"formData\", formData.value);\n};\n/**处理关联选项的逻辑 */\nconst handleLinkOptions = (item: any) => {\n\tif (!item.config?.linkOptions || item?._linkedHandled) return;\n\tconst linkOptions = item.config.linkOptions;\n\tconst originOnChange = item.event?.onChange;\n\tconst newOnChange = async (e: any) => {\n\t\tconsole.log(\"执行事件\", e);\n\t\t// 执行你自己的逻辑\n\t\tconst updateForm: FormItem = formColumn.value.find((form: any) => form?.prop === linkOptions) as any;\n\t\t//没有自定义事件,不做处理\n\t\tif (!updateForm || !updateForm?.config?.loadOptions) return;\n\t\tconst options = await updateForm.config.loadOptions(e);\n\t\t//更新options\n\t\tupdateForm.config.options = options;\n\t\t// 调用原始事件\n\t\tif (typeof originOnChange === \"function\") {\n\t\t\toriginOnChange(e);\n\t\t}\n\t};\n\t// 保证 event 是对象\n\titem.event = {\n\t\t...item.event,\n\t\tonChange: newOnChange\n\t};\n\t//添加处理标识\n\titem._linkedHandled = true;\n};\n/**表单配置中是否有loadOptions兼容老版本formParams回写数据 */\nconst hasLoadOptions = () => {\n\treturn formColumn.value.some(item => item.config?.loadOptions && typeof item.config.loadOptions === \"function\");\n};\n/**远程加载下拉数据 */\nconst loadOptions = async ({ config, prop }: FormItem) => {\n\t//不自动加载选项\n\tif (!config || config.notAutoLoadOptions) return;\n\tconst { loadOptions, options } = config;\n\tif (!options || typeof loadOptions !== \"function\") return;\n\tconst { formParams } = props as YxFormProps;\n\t//回写联级表单\n\tconst parentProp = formColumn.value.find((item: any) => item?.config?.linkOptions === prop)?.prop;\n\tconst parentValue = parentProp ? formParams?.[parentProp] : undefined;\n\ttry {\n\t\tconfig.options = await loadOptions(parentValue);\n\t\t// 回填下拉框数据\n\t\tif (prop && formParams?.[prop]) {\n\t\t\tformData.value[prop] = formParams[prop];\n\t\t}\n\t} catch (err) {\n\t\tconsole.error(`加载选项失败: ${prop}`, err);\n\t}\n};\n//监听form配置更新后,则立即初始化form\nwatch(\n\t() => props.formList,\n\tformList => {\n\t\tif (formList.length > 0) {\n\t\t\tconsole.log(\"监听到了,formlist\", formList);\n\t\t\tinitForm();\n\t\t\tgetRules();\n\t\t}\n\t}\n);\n//监听默认参数变化后,重置form\nwatch(\n\t() => props.formParams,\n\tformParams => {\n\t\tif (formParams) {\n\t\t\tconsole.log(\"监听到了,formlist\");\n\t\t\tinitForm();\n\t\t}\n\t}\n);\n\n/**初始化规则 */\nconst getRules = () => {\n\tconst rules: { [key: string]: FormItemRule[] } = {};\n\tif (!formColumn.value?.length) return;\n\tconst handleRule = (item: FormItem) => {\n\t\tif (!item.prop) return;\n\t\tconst isSelect = item?.renderType && [\"select\", \"cascader\"].includes(item?.renderType);\n\t\tconst defaultRule = { required: true, message: `${item.label ?? \"该字段\"}不能为空`, trigger: isSelect ? \"change\" : \"blur\" };\n\t\tif (item.required) {\n\t\t\trules[item.prop] = [defaultRule];\n\t\t}\n\t\tif (item.rules && item.rules.length > 0) {\n\t\t\trules[item.prop] = [...(rules[item?.prop] || []), ...item.rules];\n\t\t}\n\t};\n\tformColumn.value.forEach((form: any) => {\n\t\tform.children?.forEach(handleRule); // 处理子项\n\t\thandleRule(form); // 处理自身\n\t});\n\tformRules.value = rules;\n\tconsole.log(\"rules\", rules);\n};\n\nonBeforeMount(async () => {\n\tif (props.formList) {\n\t\tawait initForm();\n\t\tgetRules();\n\t}\n});\nonUnmounted(() => {\n\t// formRef?.value && formRef?.value.resetFields();\n});\nconst formRef = ref<FormInstance>();\nconst getFormStyle = () => {\n\tconst { formStyle } = props;\n\tconst { row, gap, ...style } = formStyle as FormStyle;\n\treturn {\n\t\t\"grid-template-columns\": `repeat(${row}, 1fr)`,\n\t\t\"grid-gap\": gap,\n\t\t...style\n\t};\n};\n//分组样式\nconst getGroupStyle = (groupStyle: FormStyle) => {\n\tif (!groupStyle) return {};\n\tconst { row, gap, ...style } = groupStyle;\n\treturn {\n\t\t\"grid-template-columns\": `repeat(${row}, 1fr)`,\n\t\t\"grid-gap\": gap,\n\t\t...style\n\t};\n};\n/**动态渲染组件 */\nconst dynamicComponent = ({ renderType, event, prop, label, config }: FormItem) => {\n\tif (!prop) return;\n\tconst { options, ...conf } = config || {};\n\tif (renderType === \"cascader\")\n\t\treturn (\n\t\t\t<el-cascader\n\t\t\t\t{...event}\n\t\t\t\t{...conf}\n\t\t\t\toptions={options}\n\t\t\t\tv-model={formData.value[prop]}\n\t\t\t\tplaceholder={`请选择${label}`}\n\t\t\t></el-cascader>\n\t\t);\n\tconst Component = resolveComponent(\"el-\" + renderType) as any;\n\tconst renderChildComponent = () => {\n\t\tif (renderType === \"select\" && config?.options) {\n\t\t\treturn config?.options.map((item: any) => <el-option label={item.label} value={item.value} />);\n\t\t} else if (renderType === \"radio-group\" && config?.options) {\n\t\t\treturn config?.options.map((item: any) => <el-radio label={item.label} value={item.value} />);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\tconst isSelect = renderType && [\"select\", \"cascader\"].includes(renderType);\n\treturn (\n\t\t<Component {...event} placeholder={`请${isSelect ? \"选择\" : \"输入\"}${label}`} {...conf} v-model={formData.value[prop]}>\n\t\t\t{renderChildComponent()}\n\t\t</Component>\n\t);\n};\nconst render = (props: YxFormProps) => {\n\tconst { formStyle, formLayout } = props;\n\tif (!formColumn.value?.length) return;\n\tconst slots = useSlots();\n\tconsole.log(\"slots\", slots);\n\t//动态插槽\n\tconst formItemSlots = (form: FormItem) => form.slotName && slots[form.slotName]?.(formData.value);\n\tconst renderFormItem = (formList: any[]) => {\n\t\tconst renderForm = (form: FormItem) => {\n\t\t\tconst { className, ...formProps } = form;\n\t\t\treturn (\n\t\t\t\t<el-form-item\n\t\t\t\t\tclass={`${formLayout === \"vertical\" ? \"flex flex-col \" : \"\"} ${formStyle?.formItemClassName ?? \"\"} ${className ?? \"\"} ${\n\t\t\t\t\t\t!form.label ? \"no-label-item\" : \"\"\n\t\t\t\t\t}`}\n\t\t\t\t\t{...formProps}\n\t\t\t\t\tprop={form.prop}\n\t\t\t\t\tlabelWidth={formStyle?.labelWidth}\n\t\t\t\t\tkey={form.prop}\n\t\t\t\t>\n\t\t\t\t\t{{\n\t\t\t\t\t\tdefault: () => {\n\t\t\t\t\t\t\tif (form?.render) return form?.render(formData.value);\n\t\t\t\t\t\t\tif (form.renderType) return dynamicComponent(form);\n\t\t\t\t\t\t\treturn form?.slotName && formItemSlots(form);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlabel: () =>\n\t\t\t\t\t\t\tform.label ? (\n\t\t\t\t\t\t\t\t<div class={`flex items-center gap-5 ${form.labelClassName ?? \"\"}`}>\n\t\t\t\t\t\t\t\t\t{form.label}\n\t\t\t\t\t\t\t\t\t{form.promptConf ? (\n\t\t\t\t\t\t\t\t\t\t<el-tooltip {...form.promptConf?.tooltipConf}>\n\t\t\t\t\t\t\t\t\t\t\t<el-icon size={form.promptConf?.size ?? 15} color={form.promptConf?.color}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Question />\n\t\t\t\t\t\t\t\t\t\t\t</el-icon>\n\t\t\t\t\t\t\t\t\t\t</el-tooltip>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null\n\t\t\t\t\t}}\n\t\t\t\t</el-form-item>\n\t\t\t);\n\t\t};\n\t\t//处理分组的情况\n\t\treturn formList\n\t\t\t.filter(form => !form.show || form.show(formData.value))\n\t\t\t.map((form: FormItem) => {\n\t\t\t\tif (form.children && form.children.length > 0) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div class={`flex flex-col ${form.groupWrapClassName ?? \"\"}`} style={{ ...form?.groupWrapStyle }}>\n\t\t\t\t\t\t\t<div class={form.groupTitleClassName ?? \"\"} style={{ ...form?.groupTitleStyle }}>\n\t\t\t\t\t\t\t\t{form.groupName}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class={`grid ${form.groupClassName ?? \"\"}`} style={{ ...getGroupStyle(form?.groupStyle ?? {}) }}>\n\t\t\t\t\t\t\t\t{form.children.filter(form => !form.show || form.show(formData.value)).map(form => renderForm(form))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn renderForm(form);\n\t\t\t\t}\n\t\t\t});\n\t};\n\treturn (\n\t\t<>\n\t\t\t<el-form\n\t\t\t\tscroll-to-error\n\t\t\t\tmodel={formData.value}\n\t\t\t\trules={formRules.value}\n\t\t\t\tclass=\"grid\"\n\t\t\t\tref={formRef}\n\t\t\t\tvalidate-on-rule-change={false}\n\t\t\t\t{...attrs}\n\t\t\t\tstyle={{ ...getFormStyle() }}\n\t\t\t>\n\t\t\t\t{renderFormItem(formColumn.value)}\n\t\t\t</el-form>\n\t\t</>\n\t);\n};\n//表单验证\nconst formValidate = async (): Promise<boolean> => {\n\tif (!formRef.value) return Promise.resolve(false);\n\treturn await formRef.value.validate(() => Promise.resolve());\n};\ndefineExpose({\n\tformData,\n\tformValidate,\n\tformRef\n});\ndefineOptions({\n\tname: \"YxForm\"\n});\n</script>\n<template>\n\t<component :is=\"render(props)\" />\n</template>\n<style scoped lang=\"scss\">\n.no-label-item :deep() .el-form-item__label {\n\tpadding-right: 0;\n\theight: 0;\n\tline-height: 0;\n}\n</style>\n","/*\n * @Author: WangXin\n * @Date: 2023-12-06 17:21:49\n * @LastEditors: WangXin\n * @LastEditTime: 2023-12-08 10:35:59\n * @FilePath: \\yxUse\\packages\\utils\\common\\update.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport { Update } from \"@packages/components\";\nimport { createApp } from \"vue\";\nlet versionKey, versionJsonUrl, _timer, curVersion, updateApp, timeGap;\n//每5分钟请求一次\nexport const monitorUpdate = (systemName, gap = 300) => {\n\ttimeGap = gap;\n\ttimedExecution(systemName);\n};\nconst timedExecution = systemName => {\n\t_timer = setTimeout(() => {\n\t\tgetVersion(systemName);\n\t\t_timer && clearTimeout(_timer);\n\t\ttimedExecution(systemName);\n\t\t// localStorage.removeItem(versionKey + \"delayTime\");\n\t}, timeGap * 1000);\n};\nconst getVersion = async (systemName: string) => {\n\tversionKey = `${systemName}_version`;\n\tconst systemPre = window.location.pathname.split(\"/\")[1] || \"ttc\";\n\tconsole.log(versionKey, systemPre);\n\t// versionJsonUrl = `/${systemPre}/${systemName}/version.json`;\n\tversionJsonUrl = \"/version.json\";\n\tconst oldVersion = localStorage.getItem(versionKey) || \"\";\n\tconst data = await fetch(versionJsonUrl, { cache: \"no-cache\" });\n\tconst { version, message, isNotice } = await data.json();\n\t// 没有历史版本则给缓存注入版本\n\tif (!oldVersion) {\n\t\tlocalStorage.setItem(versionKey, version);\n\t}\n\t//如果新版本与用户当前版本不一致,则提醒用户有版本更新\n\n\tif (oldVersion !== version) {\n\t\tif (isNotice) {\n\t\t\t//通知用户\n\t\t\tconsole.log(\"监测到有新版本\", version);\n\t\t\tnoticeUser(message);\n\t\t}\n\t\tcurVersion = version;\n\t}\n};\n//立即更新\nexport const updateSysVersion = () => {\n\tlocalStorage.setItem(versionKey, curVersion);\n\twindow.location.reload(true);\n};\n//暂不更新,加入延迟时间1小时\nexport const delayUpdateSysVersion = () => {\n\t//隐藏弹窗\n\tupdateApp.unmount();\n\tdocument.body.removeChild(document.querySelector(\"#update\"));\n\tlocalStorage.setItem(versionKey, curVersion);\n};\nconst noticeUser = message => {\n\tif (!document.querySelector(\"#update\")) {\n\t\tconst div = document.createElement(\"div\");\n\t\tdiv.setAttribute(\"id\", \"update\");\n\t\tdiv.style.position = \"absolute\";\n\t\tdiv.style.width = \"100%\";\n\t\tdiv.style.height = \"100%\";\n\t\tdiv.style.top = \"0\";\n\t\tdiv.style.left = \"0\";\n\t\tdocument.body.appendChild(div);\n\t\tupdateApp = createApp(Update, message);\n\t\tupdateApp.mount(\"#update\");\n\t}\n};\n","<script setup lang=\"ts\">\nimport { ref, reactive, defineProps } from \"vue\";\nimport { updateSysVersion, delayUpdateSysVersion } from \"@packages/utils/common/update\";\n// const props =\ninterface UpdateProps {\n\ttitle: String;\n\tdescription: String;\n\tcontent: Object;\n\ttime: String;\n}\n\nconst props = defineProps<UpdateProps>();\nconsole.log(props);\n</script>\n<template>\n\t<div class=\"update-wrap flex items-center justify-center\">\n\t\t<div class=\"relative update-content\">\n\t\t\t<div class=\"flex items-center justify-center\">{{ props?.title }}</div>\n\t\t\t<div class=\"flex flex-col gap-5 mt-10\">\n\t\t\t\t<div class=\"update-title\">{{ props?.description }}</div>\n\t\t\t\t<div class=\"update-item px-20\" v-for=\"(item, key) in props?.content\">\n\t\t\t\t\t<span>{{ key }}:</span> <span>{{ item }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"text-end\">{{ props.time }} 软件专业部</div>\n\t\t\t\t<div class=\"flex justify-end items-center mt-10\">\n\t\t\t\t\t<el-button plain @click=\"delayUpdateSysVersion\">暂不更新</el-button>\n\t\t\t\t\t<el-button @click=\"updateSysVersion\">立即更新</el-button>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"tips mt-10\"\n\t\t\t\t\t>提示: 选择立即更新后,会立即刷新页面更新系统,当前页面缓存数据会消失选择暂不更新后,请稍后自行刷新页面更新系统。</span\n\t\t\t\t>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n<style scoped lang=\"scss\">\n.update-wrap {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tbackground: var(--dialog-overlay-background);\n\tz-index: 9999;\n\tcolor: var(--dialog-header-text-color);\n\tfont-family: YX-TEXT;\n\t.update-content {\n\t\twidth: 30%;\n\t\theight: fit-content;\n\t\tbackground: var(--dialog-background);\n\t\tborder-radius: var(--border-radius-medium);\n\t\tpadding: 20px 20px 10px 20px;\n\t\tbox-sizing: border-box;\n\t\t.tips {\n\t\t\tfont-size: 12px;\n\t\t}\n\t}\n}\n</style>\n","<!--\n * @Author: WangXin\n * @Date: 2024-04-02 20:01:00\n * @LastEditors: WangXin\n * @LastEditTime: 2024-04-11 15:11:58\n * @FilePath: /yxuse/packages/components/YxIcon/index.vue\n * @Description: \n * \n * Copyright (c) 2024 by YuXing, All Rights Reserved. \n-->\n<template>\n\t<i class=\"yx-icon\" :style=\"[{ '--color': color, 'font-size': size + 'px' }]\">\n\t\t<slot />\n\t</i>\n</template>\n\n<script>\n// import { version, createApp } from \"vue\";\n// console.log(this.$options);\nexport default {\n\tprops: {\n\t\tcolor: {\n\t\t\ttype: String,\n\t\t\tdefault: \"inherit\"\n\t\t},\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: \"16\"\n\t\t}\n\t}\n};\n</script>\n\n<style scoped>\n.yx-icon {\n\t--color: inherit;\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 1em;\n\theight: 1em;\n\tline-height: 1em;\n\tcolor: var(--color);\n\tfill: currentColor;\n}\n</style>\n","<!--\r\n * @Author: WangXin\r\n * @Date: 2024-03-20 09:40:21\r\n * @LastEditors: WangXin\r\n * @LastEditTime: 2025-05-22 09:26:11\r\n * @FilePath: /yxuse/packages/components/YxUpload/index.vue\r\n * @Description: \r\n * \r\n * Copyright (c) 2024 by YuXing, All Rights Reserved. \r\n-->\r\n<script setup lang=\"tsx\">\r\nimport { ref, useAttrs, useSlots } from \"vue\";\r\nimport type { UploadProps, UploadRawFile, UploadUserFile, UploadInstance } from \"element-plus\";\r\nimport { genFileId } from \"element-plus\";\r\nimport type { YxUploadProps } from \"./type\";\r\nimport { assets } from \"@packages/api\";\r\nconst attrs = useAttrs();\r\nconst slots = useSlots();\r\nconst fileList = ref<UploadUserFile[]>([]);\r\nconst props = defineProps<YxUploadProps>();\r\nlet uploadFileList: UploadUserFile[] = [];\r\nconst fileObsUrl = ref(\"\");\r\nconst upload = ref<UploadInstance>();\r\nconst emit = defineEmits<{\r\n\t(e: \"update:fileObsUrl\", value: string): void;\r\n\t(e: \"getFile\", value: any): void;\r\n}>();\r\nconst uploadFile = async (file: any) => {\r\n\tif (props?.customUpload) {\r\n\t\treturn props?.customUpload(file);\r\n\t}\r\n\tconst fromData = new FormData();\r\n\tfromData.append(\"file\", file);\r\n\tconst { data } = await (props?.uploadResourceApi ? props?.uploadResourceApi(fromData) : assets.uploadResourceApi(fromData));\r\n\tfileObsUrl.value = data.fileUrl;\r\n\temit(\"update:fileObsUrl\", fileObsUrl.value);\r\n};\r\nconst onExceed: UploadProps[\"onExceed\"] = async files => {\r\n\tupload.value!.clearFiles();\r\n\tconst file = files[0] as UploadRawFile;\r\n\tfile.uid = genFileId();\r\n\tupload.value!.handleStart(file);\r\n};\r\nconst onChange = async (file: UploadUserFile, uploadFiles: UploadUserFile[]) => {\r\n\tuploadFileList = uploadFiles;\r\n\tif (attrs?.limit && attrs?.limit === 1) {\r\n\t\tawait uploadFile(uploadFileList[0]?.raw);\r\n\t} else {\r\n\t\tawait uploadFile(uploadFileList);\r\n\t}\r\n};\r\n/**多文件使用 getFileList*/\r\nconst getFileList = () => uploadFileList;\r\ndefineExpose({ upload, getFileList });\r\nconst render = (props: YxUploadProps) => {\r\n\tconst defaultTrigger = () => {\r\n\t\treturn <el-button>{props.triggerText ?? \"上传文件\"}</el-button>;\r\n\t};\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<el-upload\r\n\t\t\t\tref={upload}\r\n\t\t\t\tclass=\"w-full h-full\"\r\n\t\t\t\thttp-request={uploadFile}\r\n\t\t\t\tfile-list={fileList.value}\r\n\t\t\t\t{...attrs}\r\n\t\t\t\ton-exceed={onExceed}\r\n\t\t\t\ton-change={onChange}\r\n\t\t\t\tauto-upload={false}\r\n\t\t\t>\r\n\t\t\t\t{{\r\n\t\t\t\t\ttrigger: () => {\r\n\t\t\t\t\t\treturn props?.triggerRender\r\n\t\t\t\t\t\t\t? props?.triggerRender(fileObsUrl.value)\r\n\t\t\t\t\t\t\t: slots[\"trigger\"]\r\n\t\t\t\t\t\t\t? slots[\"trigger\"]()\r\n\t\t\t\t\t\t\t: defaultTrigger();\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttip: () => {\r\n\t\t\t\t\t\treturn <div class=\"el-upload__tip\">{props?.uploadTips}</div>;\r\n\t\t\t\t\t}\r\n\t\t\t\t}}\r\n\t\t\t</el-upload>\r\n\t\t</>\r\n\t);\r\n};\r\n</script>\r\n<template>\r\n\t<component :model-value=\"fileObsUrl\" :is=\"render(props)\" />\r\n</template>\r\n<style scoped lang=\"scss\"></style>\r\n","<!--\n * @Author: WangXin\n * @Date: 2025-05-08 14:48:05\n * @LastEditors: WangXin\n * @LastEditTime: 2025-05-12 10:02:39\n * @FilePath: /yxuse/packages/components/LogoTitle/index.vue\n * @Description: \n * \n * Copyright (c) ${2024} by YuXing, All Rights Reserved. \n-->\n<script lang=\"ts\">\nimport { auth } from \"@packages/api\";\nimport type { SystemConfig } from \"./type\";\nexport default {\n\tname: \"LogoTitle\",\n\tprops: {\n\t\tshowLogo: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tshowTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tlogoCanJump: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tcustomConfig: {\n\t\t\t\ticonStyle: {\n\t\t\t\t\twidth: \"116px\",\n\t\t\t\t\theight: \"20px\"\n\t\t\t\t}\n\t\t\t} as SystemConfig\n\t\t};\n\t},\n\tasync created() {\n\t\ttry {\n\t\t\tconst data = await auth.getUserConfig();\n\t\t\tthis.customConfig = {\n\t\t\t\t...this.customConfig,\n\t\t\t\t...data\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tconsole.error(\"获取用户配置失败\", e);\n\t\t}\n\t},\n\tmethods: {\n\t\tlogoJumpHandle() {\n\t\t\tif (this.customConfig?.logoCanJump === false) return;\n\t\t\tauth.jumpToHome();\n\t\t}\n\t}\n};\n</script>\n\n<template>\n\t<div\n\t\tclass=\"flex items-center gap-x-10 logo-wrap\"\n\t\t:class=\"{ 'cursor-pointer': customConfig?.logoCanJump !== false }\"\n\t\t@click=\"logoJumpHandle\"\n\t>\n\t\t<div\n\t\t\tv-if=\"showLogo && customConfig?.icon\"\n\t\t\t:style=\"customConfig.iconStyle\"\n\t\t\tclass=\"yx-icon theme-icon\"\n\t\t\tv-html=\"customConfig.icon\"\n\t\t/>\n\t\t<div\n\t\t\t:style=\"customConfig.titleStyle\"\n\t\t\tv-if=\"showTitle && customConfig?.title\"\n\t\t\tclass=\"text-xl text-[var(--text-color-title)] title\"\n\t\t>\n\t\t\t{{ customConfig?.title }}\n\t\t</div>\n\t</div>\n</template>\n\n<style scoped>\n.logo-wrap {\n\tline-height: 1;\n}\n.yx-icon :deep() svg {\n\tvertical-align: middle;\n}\n</style>\n","/*\n * @Author: WangXin\n * @Date: 2025-05-08 14:48:05\n * @LastEditors: WangXin\n * @LastEditTime: 2025-05-08 18:01:08\n * @FilePath: /yxuse/packages/components/LogoTitle/index.ts\n * @Description:\n *\n * Copyright (c) ${2024} by YuXing, All Rights Reserved.\n */\nexport { default as LogoTitle } from \"./index.vue\";\nimport { version, createApp } from \"vue\";\nimport type { LogoTitleProps } from \"./type\";\nimport LogoTitle from \"./index.vue\";\nexport class LogoTitleRender {\n\tconstructor(props: LogoTitleProps, domId: string = \"system-logo-title\") {\n\t\tthis.render(props, domId);\n\t}\n\tget vueVersion(): \"2\" | \"3\" {\n\t\treturn version[0] as `${\"2\" | \"3\"}`;\n\t}\n\trender(props: LogoTitleProps, domId: string) {\n\t\tif (this.vueVersion === \"3\") {\n\t\t\tcreateApp(LogoTitle, props).mount(`#${domId}`);\n\t\t} else {\n\t\t\tconst Vue = require(\"vue\");\n\t\t\treturn new Vue({ render: h => h(LogoTitle, { props }) }).$mount(`#${domId}`);\n\t\t}\n\t}\n}\n"],"names":["dialogOptions","reactive","width","show","title","loading","showFooter","autoClose","close","dialogMap","submit","async","err","__expose","cancel","beforeOpen","beforeSubmit","drawerOptions","drawerMap","_isSlot","s","_isVNode","Object","prototype","toString","call","props","__props","slots","useSlots","attrs","useAttrs","tableRef","ref","tableFormRef","columns","isFormTable","formTableRules","emit","__emit","onMounted","nextTick","startSort","watch","initTable","onBeforeMount","value","forEach","col","required","rules","length","renderType","includes","config","loadOptions","getRules","options","sort","sortDom","$el","querySelector","_pnpm","Sortable","create","animation","handle","sortHandle","onEnd","oldIndex","newIndex","renderForm","prop","index","component","_createVNode","createVNode","_resolveComponent","default","handleRule","item","isSelect","defaultRule","message","label","trigger","filter","cell","render","form","children","_slot2","rowKey","tableData","pageInfo","renderColumn","map","cellConf","scope","renderOperate","dynamicComponent","column","$index","row","_slot","event","Component","resolveComponent","restConfig","_mergeProps","modelValue","$event","placeholder","isFormCell","val","type","Number","key","renderResult","needsValidation","isFragment","slotName","columnSlots","header","class","headerRender","headerSlotName","className","operate","op","disabled","onClick","withModifiers","_Fragment","model","renderTable","pagination","currentPage","pageIndex","pageSize","small","layout","background","total","onSizeChange","e","onCurrentChange","_slot3","data","exportDataToExcel","fileName","finalData","ws","XLSX.utils","aoa_to_sheet","wb","utils","book_new","book_append_sheet","XLSX.writeFile","exportToExcel","Date","now","updateColumns","newColumns","tableFormValidate","validate","Promise","resolve","_hoisted_1","xmlns","viewBox","Question","_ctx","_cache","_openBlock","openBlock","_createElementBlock","createElementBlock","_createElementVNode","fill","d","formData","formRules","formColumn","initForm","formList","formParams","Array","isArray","initialData","fillFormData","undefined","handleLinkOptions","keys","hasLoadOptions","linkOptions","_linkedHandled","originOnChange","onChange","updateForm","find","some","notAutoLoadOptions","parentProp","parentValue","onUnmounted","formRef","getFormStyle","formStyle","gap","style","getGroupStyle","groupStyle","formLayout","Fragment","formProps","formItemClassName","labelWidth","conf","mergeProps","formItemSlots","labelClassName","promptConf","tooltipConf","size","color","groupWrapClassName","groupWrapStyle","groupTitleClassName","groupTitleStyle","groupName","groupClassName","renderFormItem","formValidate","versionKey","curVersion","updateSysVersion","localStorage","setItem","window","location","reload","delayUpdateSysVersion","updateApp","unmount","document","body","removeChild","_sfc_main","String","_normalizeStyle","normalizeStyle","$props","_renderSlot","renderSlot","$slots","fileList","uploadFileList","fileObsUrl","upload","uploadFile","file","customUpload","fromData","FormData","append","uploadResourceApi","assets","fileUrl","onExceed","files","clearFiles","uid","genFileId","handleStart","uploadFiles","limit","raw","getFileList","triggerRender","triggerText","tip","uploadTips","name","showLogo","Boolean","showTitle","logoCanJump","customConfig","iconStyle","height","created","auth.getUserConfig","this","methods","logoJumpHandle","_a","auth.jumpToHome","$setup","$data","$options","_normalizeClass","args","_b","icon","innerHTML","_createCommentVNode","createCommentVNode","_c","titleStyle","_toDisplayString","toDisplayString","_d","LogoTitleRender","constructor","domId","vueVersion","version","require","h","LogoTitle","$mount","createApp","mount"],"mappings":"sVAcM,MAAAA,EAAgBC,EAAAA,SAAS,CAC9BC,MAAO,MACPC,MAAM,EACNC,MAAO,GACPC,SAAS,EACTC,YAAY,EACZC,WAAW,IAENC,EAAQ,KAEbC,EAAkB,QAAKA,EAAkB,SACzCT,EAAcG,MAAO,CAAA,EAEhBM,EAAsC,CAAC,EACvCC,EAASC,UAEV,IAAAF,EAAwB,oBAAaA,EAAwB,eAA7D,CACJT,EAAcK,SAAU,EACpB,IACHI,EAAkB,cAAYA,EAAkB,SAChDT,EAAcK,SAAU,EACpBL,EAAcO,WAAiBC,UAC3BI,GACRZ,EAAcK,SAAU,CAAA,CAP8C,CAO9C,SAiBbQ,EAAA,CACZV,KAfYQ,OAAST,QAAOE,QAAOM,OAAAA,EAAQI,SAAQR,aAAYC,YAAWQ,aAAYC,mBAClFd,MAAqBA,MAAQA,GAC7BE,MAAqBA,MAAQA,QACd,IAAfE,IAA0BN,EAAcM,WAAaA,QACvC,IAAdC,IAAyBP,EAAcO,UAAYA,GACnDG,IAAkBD,EAAQ,OAAIC,GAC9BI,IAAkBL,EAAQ,OAAIK,GAC9BE,IAAwBP,EAAc,aAAIO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AAtO,CAAO9D,EAAuBkS,GACzB,GAAoB,MAApBtB,KAAKuB,WAEF,CAEN,OAAO,IADKE,QAAQ,OACb,CAAQ,CAAEvO,OAAQwO,GAAKA,EAAEC,EAAW,CAAEvS,YAAYwS,OAAO,IAAIN,IAAO,CAH3EO,EAAAA,UAAUF,EAAWvS,GAAO0S,MAAM,IAAIR,IAIvC"}
|
package/lib/index.cjs7.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs7.js","sources":["../packages/yxi18n/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2024-04-24 11:20:12\n * @LastEditors: WangXin\n * @LastEditTime: 2024-11-18 18:27:21\n * @FilePath: /yxuse/packages/yxi18n/index.ts\n * @Description:\n *\n * Copyright (c) ${2024} by YuXing, All Rights Reserved.\n */\nimport { createI18n } from \"vue-i18n\";\n// import { getLang } from \"@packages/translate\";\nimport { auth } from \"@packages/api\";\nconst messages = {};\nwindow.lang = auth.getSystemConfig(\"lang\");\nconst yxi18n = createI18n({\n\tlocale: window.lang || \"zh\",\n\tfallbackLocale: \"zh\",\n\tfallbackWarn: true, // 禁止警告\n\tmissing: (locale, key) => key,\n\tmessages\n});\nwindow.$yxi18n = yxi18n.global.t;\nexport default yxi18n;\n"],"names":["window","lang","auth.getSystemConfig","getSystemConfig","yxi18n","createI18n","locale","fallbackLocale","fallbackWarn","missing","key","messages","$yxi18n","global","t"],"mappings":"uEAcAA,OAAOC,KAAOC,EAAKC,gBAAgB,QACnC,MAAMC,EAASC,EAAAA,WAAW,CACzBC,OAAQN,OAAOC,MAAQ,KACvBM,eAAgB,KAChBC,cAAc,EACdC,QAAS,CAACH,EAAQI,IAAQA,EAC1BC,SAPgB,CAAC,IASlBX,OAAOY,QAAUR,EAAOS,OAAOC"}
|
package/lib/index.cjs8.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs8.js","sources":["../packages/directives/modules/auth.ts","../packages/directives/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2023-09-15 10:33:59\n * @LastEditors: WangXin\n * @LastEditTime: 2023-09-15 10:37:28\n * @FilePath: \\yxUse\\packages\\directives\\modules\\auth.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport type { Directive, DirectiveBinding } from \"vue\";\nimport { getUserIsHaveBtnPower } from \"@packages/api/auth\";\nconst auth: Directive = {\n\tmounted(el, binding) {\n\t\tcontrolShowByUserPower(el, binding);\n\t}\n};\nconst controlShowByUserPower = (el: HTMLElement, binding: DirectiveBinding) => {\n\tconst value = binding.value as never;\n\treturn !getUserIsHaveBtnPower(value) ? el.remove() : \"\";\n};\nexport default auth;\n","/*\n * @Author: WangXin\n * @Date: 2023-09-15 10:33:40\n * @LastEditors: WangXin\n * @LastEditTime: 2023-09-15 10:35:52\n * @FilePath: \\yxUse\\packages\\directives\\index.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport type { App } from \"vue\";\nimport auth from \"./modules/auth\";\nconst directivesList: any = {\n\tauth\n};\nconst directives = {\n\tinstall: function (app: App<Element>) {\n\t\tObject.keys(directivesList).forEach(key => {\n\t\t\t// 注册所有自定义指令\n\t\t\tapp.directive(key, directivesList[key]);\n\t\t});\n\t}\n};\n\nexport default directives;\n"],"names":["auth","mounted","el","binding","controlShowByUserPower","value","getUserIsHaveBtnPower","remove","directivesList","directives","install","app","Object","keys","forEach","key","directive"],"mappings":"iDAYMA,EAAkB,CACvB,OAAAC,CAAQC,EAAIC,GACXC,EAAuBF,EAAIC,EAAO,GAG9BC,EAAyB,CAACF,EAAiBC,KAChD,MAAME,EAAQF,EAAQE,MACtB,OAAQC,EAAsBA,sBAAAD,GAAuB,GAAdH,EAAGK,QAAW,ECPhDC,EAAsB,CAC3BR,QAEKS,EAAa,CAClBC,QAAS,SAAUC,GAClBC,OAAOC,KAAKL,GAAgBM,SAAeC,IAE1CJ,EAAIK,UAAUD,EAAKP,EAAeO,GAAI,GACtC"}
|
package/lib/index.cjs9.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs9.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/lib/index.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../packages/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2023-08-16 15:38:34\n * @LastEditors: WangXin\n * @LastEditTime: 2025-05-08 15:48:37\n * @FilePath: /yxuse/packages/index.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nexport * as utils from \"./utils\";\n\n// export * as icons from \"./icons\";\nexport * as yxIcon from \"./yxIcon\";\nexport * as api from \"./api\";\nexport * as theme from \"./theme\";\nexport * as components from \"./components\";\nexport * as translate from \"./translate\";\nexport * as yxi18n from \"./yxi18n\";\nexport * from \"./directives\";\nexport * from \"./hooks\";\nexport * from \"./app\";\nexport * from \"./bc\";\n//导出类型\nexport * from \"./components/type\";\nimport * as utils from \"./utils\";\n\n// import * as icons from \"./icons\";\nimport * as api from \"./api\";\nimport * as theme from \"./theme\";\nimport * as components from \"./components\";\nimport * as directives from \"./directives\";\nimport * as translate from \"./translate\";\nimport * as yxi18n from \"./yxi18n\";\nimport * as yxHooks from \"./hooks\";\nimport * as yxIcon from \"./yxIcon\";\nimport * as app from \"./app\";\nimport * as BC from \"./bc\";\nexport default {\n\tutils,\n\tapi,\n\tapp,\n\ttheme,\n\tcomponents,\n\tdirectives,\n\tBC,\n\ttranslate,\n\tyxi18n,\n\tyxHooks,\n\tyxIcon\n};\n"],"names":["utils","api","theme","components","translate","yxi18n","yxIcon"],"mappings":";;;;;;;;;;;;AAsCA,MAAe,QAAA;AAAA,EACd,OAAAA;AAAAA,EACA,KAAAC;AAAAA,EACA;AAAA,EACA,OAAAC;AAAAA,EACA,YAAAC;AAAAA,EACA;AAAA,EACA;AAAA,EACA,WAAAC;AAAAA,EACA,QAAAC;AAAAA,EACA;AAAA,EACA,QAAAC;AACD;"}
|
package/lib/index.es10.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es10.js","sources":["../packages/app/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2024-09-02 14:03:25\n * @LastEditors: WangXin\n * @LastEditTime: 2024-09-02 15:40:00\n * @FilePath: /yxuse/packages/app/index.ts\n * @Description:\n *\n * Copyright (c) ${2024} by YuXing, All Rights Reserved.\n */\n// export const installWebApp = async (systemKey?: string, lang?: string, callback?: Function) => {\n// \twindow.__YUXING_APP_ENVIRONMENT__ = true;\n// \tconsole.log(\"当前的主题是\", getCurThemeCssVar(), getCurTheme());\n// \tinstallCssVarInSystemTheme();\n// \tconst langStr = await getLang();\n// \tawait initTranslate({ to: lang ? langStr : lang || \"zh\", systemKey });\n// \t//注册BC\n// \tBC.onmessage = event => {\n// \t\tconst data = JSON.parse(event.data);\n// \t\tif (data.type === \"theme\") {\n// \t\t\tconsole.log(\"监听到其他系统切换主题收到的信息\", data.data);\n// \t\t\tconst { themeCssVar, themeId, themeUrl } = data.data;\n// \t\t\t// setCssVar(themeUrl);\n// \t\t\tsaveCssVar({ themeCssVar, themeId });\n// \t\t\tinstallCssVarInSystemTheme(themeCssVar);\n// \t\t}\n// \t\tif (data.type === \"lang\") {\n// \t\t\tconsole.log(\"监听到其他系统切换语言\");\n// \t\t\tlocation.reload();\n// \t\t}\n// \t};\n// \tcallback && callback();\n// };\n\nexport const isWebApp = (key = \"isWebApp\") => {\n\tconst url = new URLSearchParams(window.location.href.split(\"?\")[1]);\n\tconst params = Object.fromEntries(url.entries());\n\treturn params[key] && +params[key] ? true : false;\n};\n"],"names":[],"mappings":"AAkCa,MAAA,WAAW,CAAC,MAAM,eAAe;AACvC,QAAA,MAAM,IAAI,gBAAgB,OAAO,SAAS,KAAK,MAAM,GAAG,EAAE,CAAC,CAAC;AAClE,QAAM,SAAS,OAAO,YAAY,IAAI,SAAS;AAC/C,SAAO,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,OAAO;AAC7C;;;;;"}
|
package/lib/index.es11.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es11.js","sources":["../packages/hooks/useTime/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2024-04-07 09:50:34\n * @LastEditors: WangXin\n * @LastEditTime: 2025-04-25 14:50:40\n * @FilePath: /yxuse/packages/hooks/useTime/index.ts\n * @Description:\n *\n * Copyright (c) 2024 by YuXing, All Rights Reserved.\n */\nimport { ref, reactive, computed } from \"vue\";\nimport dayjs from \"dayjs\";\nconst time = ref(\"\");\nlet _timer: any;\nexport const useTime = () => {\n\tconst timedExecution = () => {\n\t\t_timer = setTimeout(() => {\n\t\t\ttime.value = dayjs().format(\"YYYY-MM-DD HH:mm:ss\");\n\t\t\t_timer && clearTimeout(_timer);\n\t\t\ttimedExecution();\n\t\t}, 1000);\n\t};\n\ttimedExecution();\n\treturn { time };\n};\n"],"names":[],"mappings":";;AAYA,MAAM,OAAO,IAAI,EAAE;AACnB,IAAI;AACG,MAAM,UAAU,MAAM;AAC5B,QAAM,iBAAiB,MAAM;AAC5B,aAAS,WAAW,MAAM;AACzB,WAAK,QAAQ,QAAQ,OAAO,qBAAqB;AACjD,gBAAU,aAAa,MAAM;AACd,qBAAA;AAAA,OACb,GAAI;AAAA,EACR;AACe,iBAAA;AACf,SAAO,EAAE,KAAK;AACf;"}
|
package/lib/index.es12.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es12.js","sources":["../packages/config/index.ts","../packages/api/modules/auth/index.ts","../packages/api/auth/index.ts","../packages/utils/http/config.ts","../packages/utils/http/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2023-09-08 10:32:22\n * @LastEditors: WangXin\n * @LastEditTime: 2024-09-24 15:15:41\n * @FilePath: /yxuse/packages/config/index.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\ntype URL = Record<string, string>;\ntype BASE = Record<string, URL>;\nexport const SYSTEM_HOME_PATH = \"/cloud\";\nexport const ttc: URL = {\n\tLOGIN_URL: `${window.location.origin}/ttc/cloud/#/login`,\n\tHOME_URL: `${window.location.origin}/ttc/cloud/#/cloud`,\n\tINTEGRATED_BASE_URL: `/gateway/integrated-management/api/v1`\n};\nexport const URL: BASE = {\n\tttc\n};\n\nexport const BC_THEME_NAME = \"THEME\"; //主题BC\nexport const BC_LANG_NAME = \"LANG\"; //语言\nexport const BC_SETTINGS_NAME = \"SETTING\"; //系统设置\n","/*\n * @Author: WangXin\n * @Date: 2023-09-13 13:57:49\n * @LastEditors: WangXin\n * @LastEditTime: 2023-09-13 18:17:29\n * @FilePath: \\yxUse\\packages\\api\\modules\\auth\\index.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport http from \"@packages/utils/http\";\nimport type { LoginParams } from \"./index.d\";\nimport { URL } from \"@packages/config\";\n\nexport const getAuthRouteList = (systemName = \"ttc\") => {\n\treturn http.get(`${URL[systemName].INTEGRATED_BASE_URL}/account/auth/route/list`);\n};\nexport const login = (data: LoginParams, systemName = \"ttc\") => {\n\treturn http.post(`${URL[systemName].INTEGRATED_BASE_URL}/account/login`, data);\n};\nexport const getHomeMenuList = (systemName = \"ttc\") => {\n\treturn http.get(`${URL[systemName].INTEGRATED_BASE_URL}/account/home/menu`);\n};\n","/*\n * @Author: WangXin\n * @Date: 2023-08-17 09:29:40\n * @LastEditors: WangXin\n * @LastEditTime: 2025-04-27 09:53:47\n * @FilePath: /yxuse/packages/api/auth/index.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport { getAuthRouteList, login, getHomeMenuList } from \"../modules/auth\";\nimport { URL, SYSTEM_HOME_PATH } from \"@packages/config\";\nimport { ElMessage } from \"element-plus\";\nimport http from \"@packages/utils/http\";\n\n/**@description 移除token */\nexport const removeToken = (systemName = \"ttc\") => {\n\t//设置了不需要跳转 则直接return\n\tsetSystemConfig({ token: \"\" });\n\t// if (!JSON.parse(localStorage.getItem(\"jumpLogin\") ?? \"{}\")) return;\n\t// const GlobalStateKey = `${systemName}GlobalState`;\n\t// return localStorage.removeItem(GlobalStateKey);\n};\n\n/**@description 获取token */\nexport const getToken = (systemName = \"ttc\") => {\n\tconst GlobalStateKey = `${systemName}GlobalState`;\n\tconst GlobalState = localStorage.getItem(GlobalStateKey) ?? \"{}\";\n\tconst token = JSON.parse(GlobalState) ? JSON.parse(GlobalState).token : null;\n\treturn token;\n};\ninterface LoginParams {\n\tuserName: string;\n\tpassword: string;\n}\n/**@description 自动登录 */\nexport const autoLogin = async ({ userName, password }: LoginParams, systemName = \"ttc\") => {\n\tconst loginApiUrl = getSystemConfig(\"loginApiUrl\");\n\tconst { data } = await http.post(loginApiUrl, { userName, password });\n\tif (data.tokenValue) {\n\t\tElMessage.success(\"登录成功\");\n\t}\n\tsetSystemConfig({ token: data.tokenValue, userInfo: data });\n};\n\n/**@description 获取用户信息 */\nexport const getUserInfo = (systemName = \"ttc\") => {\n\tconst GlobalStateKey = `${systemName}GlobalState`;\n\tconst GlobalState = localStorage.getItem(GlobalStateKey) ?? \"{}\";\n\tconst userInfo = JSON.parse(GlobalState) ? JSON.parse(GlobalState).userInfo : null;\n\treturn userInfo;\n};\n\nexport const getUserRouteList = async () => {\n\tif (!getToken()) return [];\n\tconst data = await getHomeMenuList();\n\treturn data;\n};\n/**@description 自动跳转登录页 */\nexport const jumpToLogin = () => {\n\t//如果是生产环境,直接跳转至登录页\n\tif (isProduction()) {\n\t\tremoveToken();\n\t\tconst curRoute = location.pathname;\n\t\tconsole.log(\"跳转至登录页\", curRoute, curRoute.includes(getLoginUrl()));\n\t\tif (curRoute.includes(getLoginUrl())) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tconsole.log(\"跳转至登录页\", getLoginUrl());\n\t\t\tlocation.replace(getLoginUrl());\n\t\t}\n\t} else {\n\t\t//开发环境,直接弹窗进行账号密码登录\n\t\tconsole.log(\"开发环境!!!\");\n\t\tconst userName = window.prompt(\"当前系统处于开发环境,当前登录过期,请输入登录账号\", \"\");\n\t\tif (userName !== null) {\n\t\t\tconst password = window.prompt(\"请输入登录密码\", \"\");\n\t\t\tif (password === null || password == \"\") window.prompt(\"请输入登录密码\", \"\");\n\t\t\tautoLogin({ userName, password });\n\t\t}\n\t}\n};\n/**@description 自动跳转home */\nexport const jumpToHome = () => {\n\twindow.location.replace(getHomeUrl());\n};\nexport const getLoginUrl = () => {\n\treturn getSystemConfig(\"loginUrl\");\n};\n/**获取当前部署的系统前缀 */\nexport const getHomeUrl = () => {\n\treturn getSystemConfig(\"homeUrl\");\n\tconst systemName = window.location.pathname.split(\"/\")[1];\n\treturn `/${systemName}${SYSTEM_HOME_PATH}`;\n};\n/**设置系统配置信息 */\nexport const setSystemConfig = (config: any) => {\n\tconst GlobalState = localStorage.getItem(\"ttcGlobalState\") ?? \"{}\";\n\tconst newGlobalState = { ...JSON.parse(GlobalState), ...config };\n\tlocalStorage.setItem(\"ttcGlobalState\", JSON.stringify(newGlobalState));\n};\n/**修改某个系统配置 */\nexport const changeSystemConfig = (key: string, value: any) => {\n\tconst GlobalState = localStorage.getItem(\"ttcGlobalState\") ?? \"{}\";\n\tconst newGlobalState = { ...JSON.parse(GlobalState), [key]: value };\n\tlocalStorage.setItem(\"ttcGlobalState\", JSON.stringify(newGlobalState));\n};\n/**获取系统配置信息 */\nexport const getSystemConfig = (key: string) => {\n\tconst GlobalState = JSON.parse(localStorage.getItem(\"ttcGlobalState\") ?? \"{}\");\n\treturn GlobalState[key] ?? \"\";\n};\n/**当前系统环境是否是生产环境 */\nexport const isProduction = () => {\n\treturn getSystemConfig(\"environment\") === \"production\";\n};\n/**\n *\n * @param systemName 系统名称\n * @description 综合管理分系统->integrated\n * @description 站控分系统->station\n * @description 综合管理->integrated\n * @description 轨道分系统->orbit\n * @description 任务计划分系统->traceplan\n * @description 遥控分系统->telecommand\n * @description 遥测分系统->telemetry\n * @returns 当前分系统的用户菜单列表 userMenuList\n * @returns 当前分系统的用户按钮列表 userBtnList\n */\nexport const getUserPermissions = async (systemName: string, isJumpLogin: boolean = true, serverName?: string) => {\n\tif (!getToken() && isJumpLogin) return jumpToLogin();\n\ttry {\n\t\tconst { data } = await getAuthRouteList(serverName);\n\t\tconst systemPermissionList = data.filter(route => route.routeTag.includes(systemName));\n\t\tconst userMenuList = systemPermissionList.filter(item => item.routeType === \"VIEW\");\n\t\tconst userBtnList = systemPermissionList.filter(item => item.routeType === \"BTN\");\n\t\tsessionStorage.setItem(\"ttcUserBtnList\", JSON.stringify(userBtnList.map(item => item.routeTag)));\n\t\treturn {\n\t\t\tuserMenuList,\n\t\t\tuserBtnList\n\t\t};\n\t} catch (err) {\n\t\t// return jumpToLogin();\n\t}\n};\n/**\n *\n * @param userMenuList 用户路由数据\n * @param viewModules 页面文件\n * @returns UserRouter 用户动态路由\n * @description 综合管理分系统->integrated\n * @description 站控分系统->station\n */\nexport const getUserRouter = (userMenuList, viewModules): any[] => {\n\tlet menuList: any = [];\n\tuserMenuList.forEach((item: any) => {\n\t\tconst viewKey = `/src/views${item.routeView}/index.vue`;\n\t\tif (viewModules[viewKey]) {\n\t\t\tconst pageConfig = item?.reservedRouteInfo && JSON.parse(item?.reservedRouteInfo ?? \"{}\");\n\t\t\tconst routerObject = {\n\t\t\t\tpath: item.routeView,\n\t\t\t\tname: item.routeView.split(\"/\")[1],\n\t\t\t\tmeta: {\n\t\t\t\t\ttitle: item.routeName,\n\t\t\t\t\ticon: pageConfig?.routeIcon\n\t\t\t\t},\n\t\t\t\tcomponent: viewModules[viewKey]\n\t\t\t};\n\t\t\tmenuList.push(routerObject);\n\t\t}\n\t});\n\treturn menuList;\n};\n\n/**\n * @description 判断当前routeTag是否在用户的按钮权限里\n * @param routeTag\n */\nexport const getUserIsHaveBtnPower = (routeTag: string): boolean => {\n\tif (!routeTag) return false;\n\tconst authButtonListGet = sessionStorage.getItem(\"ttcUserBtnList\") ?? \"[]\";\n\treturn JSON.parse(authButtonListGet).includes(routeTag);\n};\n\n// 获取用户配置\nlet userConfig:any = null;\nexport const getUserConfig = async () => {\n\tif (userConfig) return userConfig;\n\tconst { data } = await http.get(getSystemConfig(\"userConfigApiUrl\"), {}, {headers: {noLoading: true}});\n\tuserConfig = data;\n\treturn data;\n}","/*\n * @Author: WangXin\n * @Date: 2023-09-13 13:58:34\n * @LastEditors: WangXin\n * @LastEditTime: 2025-05-08 15:43:32\n * @FilePath: /yxuse/packages/utils/http/config.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport { ElMessage, ElLoading } from \"element-plus\";\nimport \"element-plus/es/components/message/style/css\";\nimport \"element-plus/es/components/loading/style/css\";\nimport { auth } from \"@packages/api\";\n/* 全局请求 loading(服务方式调用) */\nlet loadingInstance: ReturnType<typeof ElLoading.service>;\nconst loadingOptions = {\n\tlock: true,\n\ttext: \"loading...\",\n\tfullscreen: true,\n\tbackground: \"rgba(0, 0, 0, 0.6)\"\n};\n/**\n * @description 开启 Loading\n * */\nconst startLoading = () => {\n\tloadingInstance = ElLoading.service(loadingOptions);\n};\n/**\n * @description 结束 Loading\n * */\nconst endLoading = () => {\n\tloadingInstance.close();\n};\n/**\n * @description 显示全屏加载\n * */\nlet needLoadingRequestCount = 0;\nexport const showFullScreenLoading = () => {\n\tif (needLoadingRequestCount === 0) {\n\t\tstartLoading();\n\t}\n\tneedLoadingRequestCount++;\n};\n\n/**\n * @description 隐藏全屏加载\n * */\nexport const hideFullScreenLoading = () => {\n\tif (needLoadingRequestCount <= 0) return;\n\tneedLoadingRequestCount--;\n\tif (needLoadingRequestCount === 0) {\n\t\tendLoading();\n\t}\n};\n/**\n * @description:请求配置\n */\nexport enum ResultEnum {\n\tSUCCESS = 200,\n\tERROR = 500,\n\tOVERDUE = 401,\n\tTIMEOUT = 30000\n}\nexport const config = {\n\t// 默认地址请求地址,可在 .env.*** 文件中修改\n\t// 设置超时时间(30s)\n\ttimeout: ResultEnum.TIMEOUT as number,\n\t// 跨域时候允许携带凭证\n\twithCredentials: true\n};\n/**\n * @description: 校验网络请求状态码\n * @param {Number} status\n * @return void\n */\nexport const checkStatus = (status: number, msg?: string): void => {\n\tswitch (status) {\n\t\tcase 400:\n\t\t\tElMessage.error(msg || \"请求失败!请您稍后重试\");\n\t\t\tbreak;\n\t\tcase 401:\n\t\t\tElMessage.error(msg || \"登录失效!请您重新登录\");\n\t\t\tif (!location.href.includes(auth.getLoginUrl())) {\n\t\t\t\tauth.jumpToLogin();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 403:\n\t\t\tElMessage.error(msg || \"当前账号无权限访问!\");\n\t\t\tbreak;\n\t\tcase 404:\n\t\t\tElMessage.error(\"你所访问的资源不存在\");\n\t\t\tbreak;\n\t\tcase 405:\n\t\t\tElMessage.error(msg || \"请求方式错误!请您稍后重试\");\n\t\t\tbreak;\n\t\tcase 408:\n\t\t\tElMessage.error(msg || \"请求超时!请您稍后重试\");\n\t\t\tbreak;\n\t\tcase 500:\n\t\t\tElMessage.error(msg || \"服务异常!\");\n\t\t\tbreak;\n\t\tcase 502:\n\t\t\tElMessage.error(msg || \"网关错误!\");\n\t\t\tbreak;\n\t\tcase 503:\n\t\t\tElMessage.error(msg || \"服务不可用\");\n\t\t\tbreak;\n\t\tcase 504:\n\t\t\tElMessage.error(msg || \"网关超时!\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tElMessage.error(msg || \"请求失败!请您稍后重试!\");\n\t}\n};\n","import axios from \"axios\";\nimport type { AxiosInstance, AxiosError, AxiosRequestConfig, AxiosResponse } from \"axios\";\nimport { ElNotification, ElMessage } from \"element-plus\";\nimport \"element-plus/es/components/message/style/css\";\nimport \"element-plus/es/components/notification/style/css\";\nimport { auth } from \"@packages/api\";\nimport { ResultEnum, checkStatus, showFullScreenLoading, hideFullScreenLoading, config } from \"./config\";\ninterface CustomAxiosRequestConfig extends AxiosRequestConfig {\n\t/** 自定义响应处理 */\n\tcustomResHandler?: (res: any) => void;\n}\nconst isTranslateApi = auth.getSystemConfig(\"isTranslateApi\");\nclass YxHttp {\n\tservice: AxiosInstance;\n\t/** 自定义响应处理map */\n\tcustomResMap: { [key: string]: Function };\n\tconstructor(config: CustomAxiosRequestConfig) {\n\t\tthis.service = axios.create(config);\n\t\tthis.setupInterceptors();\n\t\tthis.customResMap = {};\n\t}\n\tprivate setupInterceptors() {\n\t\tthis.service.interceptors.request.use(\n\t\t\t(config: any) => {\n\t\t\t\t// 默认添加 loading,不需要 loading,则设置 noLoading:true\n\t\t\t\tif (!config.headers?.noLoading) {\n\t\t\t\t\tshowFullScreenLoading();\n\t\t\t\t}\n\t\t\t\tconfig.headers!.token = auth.getToken();\n\t\t\t\tif (config?.customResHandler && config?.url) {\n\t\t\t\t\tthis.customResMap[config?.url] = config.customResHandler;\n\t\t\t\t}\n\t\t\t\treturn config;\n\t\t\t},\n\t\t\t(error: AxiosError) => {\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t);\n\t\t//响应拦截器\n\t\tthis.service.interceptors.response.use(\n\t\t\tasync (response: AxiosResponse) => {\n\t\t\t\tconst { config } = response;\n\t\t\t\tlet data = response.data;\n\t\t\t\tconst code = response.status;\n\t\t\t\thideFullScreenLoading();\n\t\t\t\tif (config.url && this.customResMap[config.url]) {\n\t\t\t\t\treturn this.customResMap[config.url](data);\n\t\t\t\t}\n\t\t\t\tif (code == ResultEnum.OVERDUE || data.code === ResultEnum.OVERDUE) {\n\t\t\t\t\tthis.handleOverdueResponse(data);\n\t\t\t\t} else if (data.code !== ResultEnum.SUCCESS) {\n\t\t\t\t\tthis.handleErrorResponse(data);\n\t\t\t\t}\n\n\t\t\t\treturn data;\n\t\t\t},\n\t\t\t(error: AxiosError) => {\n\t\t\t\thideFullScreenLoading();\n\t\t\t\tconst response = error.response as AxiosResponse;\n\t\t\t\tconst { config } = error;\n\t\t\t\tif (config?.url && this.customResMap[config.url]) {\n\t\t\t\t\tthis.customResMap[config.url](error.response);\n\t\t\t\t}\n\t\t\t\tif (error.message.includes(\"timeout\")) {\n\t\t\t\t\tElMessage.error(\"请求超时!请稍后重试\");\n\t\t\t\t} else if (error.message.includes(\"Network Error\")) {\n\t\t\t\t\tElMessage.error(\"网络错误!请稍后重试\");\n\t\t\t\t}\n\t\t\t\tif (response) {\n\t\t\t\t\tcheckStatus(response.status, response.data?.resultMsg);\n\t\t\t\t}\n\t\t\t\tif (!window.navigator.onLine) {\n\t\t\t\t\tElNotification({\n\t\t\t\t\t\ttitle: \"提示\",\n\t\t\t\t\t\tmessage: \"当前网络似乎开小差了\",\n\t\t\t\t\t\ttype: \"warning\",\n\t\t\t\t\t\tduration: 5000\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t);\n\t}\n\n\tprivate handleOverdueResponse(data: any): Promise<never> {\n\t\tElNotification({\n\t\t\ttitle: \"登录过期提醒\",\n\t\t\tmessage: data.resultMsg || \"当前登录失效\",\n\t\t\ttype: \"warning\",\n\t\t\tduration: 5000\n\t\t});\n\t\tauth.jumpToLogin();\n\t\treturn Promise.reject(data);\n\t}\n\n\tprivate handleErrorResponse(data: any): Promise<never> {\n\t\tif (data?.resultMsg) {\n\t\t\tElMessage.error(data.resultMsg);\n\t\t} else {\n\t\t\tcheckStatus(data.status);\n\t\t}\n\t\treturn Promise.reject(data);\n\t}\n\t/**\n\t *\n\t * @param url\n\t * @param params\n\t * @param options : AxiosRequestConfig\n\t * @description get 请求\n\t */\n\tget<T = any>(url: string, params?: object, options: CustomAxiosRequestConfig = {}): Promise<T> {\n\t\treturn this.service.get(url, { params, ...options });\n\t}\n\t/**\n\t *\n\t * @param url\n\t * @param params\n\t * @param options : AxiosRequestConfig\n\t * @description post 请求\n\t */\n\tpost<T = any>(url: string, params?: object, options: CustomAxiosRequestConfig = {}): Promise<T> {\n\t\treturn this.service.post(url, params, options);\n\t}\n\t/**\n\t *\n\t * @param url\n\t * @param params\n\t * @param options : AxiosRequestConfig\n\t */\n\tput<T = any>(url: string, params?: object, options: CustomAxiosRequestConfig = {}): Promise<T> {\n\t\treturn this.service.put(url, params, options);\n\t}\n\t/**\n\t *\n\t * @param url\n\t * @param params\n\t * @param options : AxiosRequestConfig\n\t */\n\tdelete<T = any>(url: string, params?: any, options: CustomAxiosRequestConfig = {}): Promise<T> {\n\t\treturn this.service.delete(url, { params, ...options });\n\t}\n}\n\nexport default new YxHttp(config);\n"],"names":["config","ResultEnum","auth.getLoginUrl","auth.jumpToLogin","auth.getSystemConfig","auth.getToken"],"mappings":";;;;;;;;;;;AAaO,MAAM,MAAW;AAAA,EACvB,WAAW,GAAG,OAAO,SAAS,MAAM;AAAA,EACpC,UAAU,GAAG,OAAO,SAAS,MAAM;AAAA,EACnC,qBAAqB;AACtB;AACO,MAAM,MAAY;AAAA,EACxB;AACD;AAEO,MAAM,gBAAgB;AACtB,MAAM,eAAe;ACTf,MAAA,mBAAmB,CAAC,aAAa,UAAU;AACvD,SAAO,KAAK,IAAI,GAAG,IAAI,UAAU,EAAE,mBAAmB,0BAA0B;AACjF;AAIa,MAAA,kBAAkB,CAAC,aAAa,UAAU;AACtD,SAAO,KAAK,IAAI,GAAG,IAAI,UAAU,EAAE,mBAAmB,oBAAoB;AAC3E;ACNa,MAAA,cAAc,CAAC,aAAa,UAAU;AAElC,kBAAA,EAAE,OAAO,IAAI;AAI9B;AAGa,MAAA,WAAW,CAAC,aAAa,UAAU;AACzC,QAAA,iBAAiB,GAAG,UAAU;AACpC,QAAM,cAAc,aAAa,QAAQ,cAAc,KAAK;AACtD,QAAA,QAAQ,KAAK,MAAM,WAAW,IAAI,KAAK,MAAM,WAAW,EAAE,QAAQ;AACjE,SAAA;AACR;AAMO,MAAM,YAAY,OAAO,EAAE,UAAU,SAAS,GAAgB,aAAa,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c,UAAoC,CAAA,GAAgB;AACvF,WAAA,KAAK,QAAQ,OAAO,KAAK,EAAE,QAAQ,GAAG,SAAS;AAAA,EAAA;AAExD;AAEA,MAAA,OAAe,IAAI,OAAO,MAAM;"}
|
package/lib/index.es13.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es13.js","sources":["../packages/utils/common/index.ts","../packages/utils/subscribe/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2023-09-13 16:21:13\n * @LastEditors: WangXin\n * @LastEditTime: 2025-05-22 11:36:09\n * @FilePath: /yxuse/packages/utils/common/index.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport { ElMessage, ElMessageBox } from \"element-plus\";\nimport type { ElMessageBoxOptions } from \"element-plus\";\nimport dayjs from \"dayjs\";\n/**\n * @description 给各分系统发送消息\n * @param data 发送的消息\n */\ninterface Message {\n\ttype: string; //消息类型\n\tdata: any; //消息data\n}\nexport const notifyMessageToSystems = (message: Message) => {\n\tconst themeBc = new BroadcastChannel(\"YXUSE_BC\");\n\tthemeBc.postMessage(message);\n};\n/**\n * @description 接收系统消息\n * @param callback 接收后的回调\n */\nexport const receiveMessage = (callback: Function) => {\n\tconst themeBc = new BroadcastChannel(\"YXUSE_BC\");\n\tthemeBc.onmessage = () => {\n\t\tcallback();\n\t};\n};\n\n/**\n * @param arr 处理的参数\n * @param labelKey label的key\n * @param valueKey value的key\n * @param isValueToNumber 是否将value转为number\n * @return [{label:\"\",value:\"\"}]\n */\nexport const getSelectOptions = (\n\tarr: [],\n\tlabelKey: string,\n\tvalueKey: string,\n\tisValueToNumber?: boolean\n): { label: string; value: string | number }[] => {\n\tif (!Array.isArray(arr)) return [];\n\treturn arr.map(item => {\n\t\treturn {\n\t\t\tlabel: item?.[labelKey],\n\t\t\tvalue: isValueToNumber ? +item[valueKey] : item[valueKey]\n\t\t};\n\t});\n};\n\n/**\n * @param enumObject 处理的枚举类\n */\nexport const enumToArray = <T extends Record<string, string | number>>(\n\tenumObject: T\n): { label: string; value: string | number }[] => {\n\tconst result: { label: string; value: string | number }[] = [];\n\tfor (const key in enumObject) {\n\t\tif (isNaN(Number(key))) {\n\t\t\tresult.push({ label: key, value: enumObject[key] });\n\t\t}\n\t}\n\treturn result;\n};\n\n/**\n * @description 判断该色值是否是深色\n * @param color 色值\n */\nexport const isDarkColor = (color: string) => {\n\tconst parseColor = (color: string): [number, number, number, number] | null => {\n\t\tlet r = 0,\n\t\t\tg = 0,\n\t\t\tb = 0,\n\t\t\ta = 1;\n\t\tif (color.startsWith(\"#\")) {\n\t\t\t// 解析十六进制颜色值\n\t\t\tcolor = color.slice(1);\n\t\t\tif (color.length === 3) {\n\t\t\t\tr = parseInt(color[0] + color[0], 16);\n\t\t\t\tg = parseInt(color[1] + color[1], 16);\n\t\t\t\tb = parseInt(color[2] + color[2], 16);\n\t\t\t} else if (color.length === 6) {\n\t\t\t\tr = parseInt(color.slice(0, 2), 16);\n\t\t\t\tg = parseInt(color.slice(2, 4), 16);\n\t\t\t\tb = parseInt(color.slice(4, 6), 16);\n\t\t\t} else {\n\t\t\t\t// 非法的颜色值\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else if (color.startsWith(\"rgb\")) {\n\t\t\t// 解析 RGB 或 RGBA 格式的颜色值\n\t\t\tconst rgbaMatch = color.match(/(\\d+(\\.\\d+)?)/g);\n\t\t\tif (rgbaMatch) {\n\t\t\t\tr = parseFloat(rgbaMatch[0]);\n\t\t\t\tg = parseFloat(rgbaMatch[1]);\n\t\t\t\tb = parseFloat(rgbaMatch[2]);\n\t\t\t\tif (rgbaMatch.length > 3) {\n\t\t\t\t\ta = parseFloat(rgbaMatch[3]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\treturn null; // 非法的颜色值\n\t\t}\n\t\treturn [r, g, b, a];\n\t};\n\n\tconst colorComponents = parseColor(color);\n\n\tif (!colorComponents) {\n\t\treturn null; // 非法的颜色值\n\t}\n\n\tconst [r, g, b, _] = colorComponents;\n\n\t// 转换为 HSL 颜色空间\n\tconst normalizedR = r / 255;\n\tconst normalizedG = g / 255;\n\tconst normalizedB = b / 255;\n\tconst max = Math.max(normalizedR, normalizedG, normalizedB);\n\tconst min = Math.min(normalizedR, normalizedG, normalizedB);\n\tlet h,\n\t\ts,\n\t\tl = (max + min) / 2;\n\n\tif (max === min) {\n\t\th = s = 0; // 灰色\n\t} else {\n\t\tconst d = max - min;\n\t\ts = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\t\tswitch (max) {\n\t\t\tcase normalizedR:\n\t\t\t\th = (normalizedG - normalizedB) / d + (normalizedG < normalizedB ? 6 : 0);\n\t\t\t\tbreak;\n\t\t\tcase normalizedG:\n\t\t\t\th = (normalizedB - normalizedR) / d + 2;\n\t\t\t\tbreak;\n\t\t\tcase normalizedB:\n\t\t\t\th = (normalizedR - normalizedG) / d + 4;\n\t\t\t\tbreak;\n\t\t}\n\t\th /= 6;\n\t}\n\n\t// 根据亮度判断是深色还是浅色\n\treturn l < 0.5; // 深色为 true,浅色为 false\n};\n\n/**\n * @description 判断两个色值是否为相近色\n * @param color1 第一个色值\n * @param color2 第二个色值\n * @param threshold 阈值,用于判断两个颜色是否相近\n */\nexport const areColorsSimilar = (color1: string, color2: string, threshold: number = 100): boolean => {\n\tconst getColorComponents = (color: string): [number, number, number, number] | null => {\n\t\tlet r,\n\t\t\tg,\n\t\t\tb,\n\t\t\ta = 1;\n\t\tif (color.startsWith(\"#\")) {\n\t\t\tcolor = color.slice(1);\n\t\t\tif (color.length === 3) {\n\t\t\t\tr = parseInt(color[0] + color[0], 16);\n\t\t\t\tg = parseInt(color[1] + color[1], 16);\n\t\t\t\tb = parseInt(color[2] + color[2], 16);\n\t\t\t} else if (color.length === 6) {\n\t\t\t\tr = parseInt(color.slice(0, 2), 16);\n\t\t\t\tg = parseInt(color.slice(2, 4), 16);\n\t\t\t\tb = parseInt(color.slice(4, 6), 16);\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else if (color.startsWith(\"rgb\")) {\n\t\t\tconst rgbaMatch = color.match(/(\\d+(\\.\\d+)?)/g) as string[];\n\t\t\tr = parseFloat(rgbaMatch[0]);\n\t\t\tg = parseFloat(rgbaMatch[1]);\n\t\t\tb = parseFloat(rgbaMatch[2]);\n\t\t\tif (rgbaMatch.length > 3) {\n\t\t\t\ta = parseFloat(rgbaMatch[3]);\n\t\t\t}\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\treturn [r, g, b, a];\n\t};\n\n\tconst color1Components = getColorComponents(color1);\n\tconst color2Components = getColorComponents(color2);\n\n\tif (!color1Components || !color2Components) {\n\t\treturn false; // 非法的颜色值\n\t}\n\n\tconst euclideanDistance = Math.sqrt(\n\t\tMath.pow(color1Components[0] - color2Components[0], 2) +\n\t\t\tMath.pow(color1Components[1] - color2Components[1], 2) +\n\t\t\tMath.pow(color1Components[2] - color2Components[2], 2) +\n\t\t\tMath.pow(color1Components[3] - color2Components[3], 2)\n\t);\n\tconsole.log(euclideanDistance);\n\n\treturn euclideanDistance <= threshold;\n};\n\n//判断两个色值是否相等\nexport const isColorEqual = (color1: string, color2: string) => {\n\tfunction toRGBA(color: string) {\n\t\tif (color.toLowerCase().startsWith(\"rgba\")) {\n\t\t\t// 如果是 RGBA 格式,则直接返回\n\t\t\treturn color.toLowerCase();\n\t\t} else if (color.toLowerCase().startsWith(\"rgb\")) {\n\t\t\t// 如果是 RGB 格式,则转换为 RGBA 格式,alpha 默认为 1\n\t\t\treturn color.replace(\"rgb\", \"rgba\").replace(\")\", \", 1)\");\n\t\t} else if (color.length === 7) {\n\t\t\t// 如果是十六进制格式,则转换为 RGBA 格式,alpha 默认为 1\n\t\t\tconst r = parseInt(color.substring(1, 3), 16);\n\t\t\tconst g = parseInt(color.substring(3, 5), 16);\n\t\t\tconst b = parseInt(color.substring(5, 7), 16);\n\t\t\treturn `rgba(${r}, ${g}, ${b}, 1)`;\n\t\t} else if (color.length === 9 && color.toLowerCase().startsWith(\"rrggbbaa\")) {\n\t\t\t// 如果是 RRGGBBAA 十六进制格式,则转换为 RGBA 格式\n\t\t\tconst r = parseInt(color.substring(1, 3), 16);\n\t\t\tconst g = parseInt(color.substring(3, 5), 16);\n\t\t\tconst b = parseInt(color.substring(5, 7), 16);\n\t\t\tconst a = Math.round((parseInt(color.substring(7, 9), 16) / 255) * 100) / 100; // 转换 alpha 值\n\t\t\treturn `rgba(${r}, ${g}, ${b}, ${a})`;\n\t\t} else {\n\t\t\t// 其他情况视为无效颜色值\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tconst rgbaColor1 = toRGBA(convertShortHexToLongHex(color1));\n\tconst rgbaColor2 = toRGBA(convertShortHexToLongHex(color2));\n\t// 如果转换失败,则返回 false\n\tif (!rgbaColor1 || !rgbaColor2) {\n\t\treturn false;\n\t}\n\n\t// 比较两个 RGBA 格式的颜色值是否相等\n\treturn rgbaColor1 === rgbaColor2;\n};\n\nconst convertShortHexToLongHex = (shortHex: string) => {\n\tif (shortHex.length === 4 && shortHex[0] === \"#\") {\n\t\t// 提取每个字符\n\t\tconst r = shortHex[1];\n\t\tconst g = shortHex[2];\n\t\tconst b = shortHex[3];\n\t\t// 转换为6位十六进制表示\n\t\tconst longHex = `#${r}${r}${g}${g}${b}${b}`;\n\t\treturn longHex;\n\t} else {\n\t\t// 如果不是3位十六进制表示,直接返回原始值\n\t\treturn shortHex;\n\t}\n};\n\n/**\n * @param data //后端返回的数据\n * @param isShowError //是否显示后端服务的报错信息\n * @param callback //回调\n * @description 消息提示\n */\n\nexport const yxMessage = (data: any, callback?: Function, isShowError = true) => {\n\tif (data.isSuccess) {\n\t\tElMessage.success(data.resultMsg || \"操作成功\");\n\t\tcallback && callback();\n\t} else {\n\t\tif (isShowError) {\n\t\t\tElMessage.error(data.resultMsg || \"操作失败\");\n\t\t}\n\t}\n};\n\n/**\n * @param text 要复制的文本\n * @description 复制文本到剪贴板\n * @return void\n */\nexport const copyText = (text: string) => {\n\tconst textField = document.createElement(\"textarea\");\n\ttextField.innerText = text;\n\tdocument.body.appendChild(textField);\n\ttextField.select();\n\tdocument.execCommand(\"copy\");\n\ttextField.remove();\n\tElMessage.success(\"已成功复制到剪贴板\");\n};\n\n/**\n * @param time 时间\n * @description 将传入的时间转为距离当前时间的 时 分 秒 的字符串\n * @return void\n */\nexport const getCownDownTime = (time: string) => {\n\tconst diffTimeSecond = dayjs(time).diff(dayjs(), \"second\");\n\tlet formattedTime = \"00:00:00\";\n\tif (diffTimeSecond > 0) {\n\t\tconst hours = Math.floor(diffTimeSecond / 3600);\n\t\tconst minutes = Math.floor((diffTimeSecond % 3600) / 60);\n\t\tconst seconds = diffTimeSecond % 60;\n\t\tformattedTime = `${hours.toString().padStart(2, \"0\")}:${minutes.toString().padStart(2, \"0\")}:${seconds\n\t\t\t.toString()\n\t\t\t.padStart(2, \"0\")}`;\n\t}\n\n\treturn formattedTime;\n};\n\n/**\n * @param content 提示内容\n * @confrmCallback 确认回调\n * @options 其他参数\n */\nexport const useConfirm = (content: string, confrmCallback: Function, options: ElMessageBoxOptions = {}) => {\n\tElMessageBox.confirm(content, options?.title || \"提示\", {\n\t\tconfirmButtonText: \"确定\",\n\t\tcancelButtonText: \"取消\",\n\t\ttype: \"warning\",\n\t\t...options\n\t})\n\t\t.then(() => {\n\t\t\tconfrmCallback();\n\t\t})\n\t\t.catch(() => {});\n};\n","/*\n * @Author: WangXin\n * @Date: 2024-01-01 10:33:25\n * @LastEditors: WangXin\n * @LastEditTime: 2024-01-03 10:59:31\n * @FilePath: \\yxUse\\packages\\utils\\subscribe\\index.ts\n * @Description:\n *\n * Copyright (c) 2024 by YuXing, All Rights Reserved.\n */\ninterface Message {\n\ttype: string;\n\tdata: any;\n}\ninterface Subscribe {\n\t[key: string]: Function[];\n}\nclass YxSubscribe {\n\tprivate subscribers: Subscribe;\n\tconstructor() {\n\t\tthis.subscribers = {};\n\t}\n\tsubscribe(sub: string, fn: Function) {\n\t\tif (!this.subscribers[sub]) {\n\t\t\tthis.subscribers[sub] = [];\n\t\t}\n\t\tthis.subscribers[sub].push(fn);\n\t}\n\tunsubscribe(sub: string, fn?: Function) {\n\t\tconst subscribers = this.subscribers[sub];\n\t\tif (!fn) return (this.subscribers[sub] = []);\n\t\tif (subscribers) {\n\t\t\tconst index = subscribers.indexOf(fn);\n\t\t\tif (index !== -1) {\n\t\t\t\tsubscribers.splice(index, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublish(message: Message) {\n\t\tconst subscribers = this.subscribers[message.type];\n\t\tif (subscribers) {\n\t\t\tsubscribers.forEach(fn => {\n\t\t\t\tfn(message.data);\n\t\t\t});\n\t\t}\n\t}\n}\n\nexport default new YxSubscribe();\n"],"names":["color","r","g","b"],"mappings":";;;;;;;AAqBa,MAAA,yBAAyB,CAAC,YAAqB;AACrD,QAAA,UAAU,IAAI,iBAAiB,UAAU;AAC/C,UAAQ,YAAY,OAAO;AAC5B;AAKa,MAAA,iBAAiB,CAAC,aAAuB;AAC/C,QAAA,UAAU,IAAI,iBAAiB,UAAU;AAC/C,UAAQ,YAAY,MAAM;AAChB,aAAA;AAAA,EACV;AACD;AASO,MAAM,mBAAmB,CAC/B,KACA,UACA,UACA,oBACiD;AACjD,MAAI,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC1B,SAAA,IAAI,IAAI,CAAQ,SAAA;AACf,WAAA;AAAA,MACN,OAAO,6BAAO;AAAA,MACd,OAAO,kBAAkB,CAAC,KAAK,QAAQ,IAAI,KAAK,QAAQ;AAAA,IACzD;AAAA,EAAA,CACA;AACF;AAKa,MAAA,cAAc,CAC1B,eACiD;AACjD,QAAM,SAAsD,CAAC;AAC7D,aAAW,OAAO,YAAY;AAC7B,QAAI,MAAM,OAAO,GAAG,CAAC,GAAG;AAChB,aAAA,KAAK,EAAE,OAAO,KAAK,OAAO,WAAW,GAAG,GAAG;AAAA,IAAA;AA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SAAkB;AACzB,UAAM,cAAc,KAAK,YAAY,QAAQ,IAAI;AACjD,QAAI,aAAa;AAChB,kBAAY,QAAQ,CAAM,OAAA;AACzB,WAAG,QAAQ,IAAI;AAAA,MAAA,CACf;AAAA,IAAA;AAAA,EACF;AAEF;AAEA,MAAe,cAAA,IAAI,YAAY;"}
|
package/lib/index.es14.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es14.js","sources":["../packages/api/modules/assets/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2024-04-11 11:09:04\n * @LastEditors: WangXin\n * @LastEditTime: 2024-08-16 10:16:23\n * @FilePath: /yxuse/packages/api/modules/assets/index.ts\n * @Description:\n *\n * Copyright (c) 2024 by YuXing, All Rights Reserved.\n */\nimport http from \"@packages/utils/http\";\nimport { URL } from \"@packages/config\";\n\nexport const uploadResourceApi = (params: FormData, config?: Object) =>\n\thttp.post(`${URL[\"ttc\"].INTEGRATED_BASE_URL}/file/upload`, params, config);\n\n//获取资源分组\nexport const getGroupListApi = () =>\n\thttp.get(\n\t\t`${URL[\"ttc\"].INTEGRATED_BASE_URL}/resource/group/list`,\n\t\t{},\n\t\t{\n\t\t\theaders: { noLoading: true }\n\t\t}\n\t);\n//获取icon的配置\nexport const getResourceListApi = (groupUuid: string, sign: number) =>\n\thttp.get(`${URL[\"ttc\"].INTEGRATED_BASE_URL}/resource/file/list/${sign}/${groupUuid}`, {}, { headers: { noLoading: true } });\n"],"names":[],"mappings":";AAaO,MAAM,oBAAoB,CAAC,QAAkB,WACnD,KAAK,KAAK,GAAG,IAAI,KAAK,EAAE,mBAAmB,gBAAgB,QAAQ,MAAM;AAG7D,MAAA,kBAAkB,MAC9B,KAAK;AAAA,EACJ,GAAG,IAAI,KAAK,EAAE,mBAAmB;AAAA,EACjC,CAAC;AAAA,EACD;AAAA,IACC,SAAS,EAAE,WAAW,KAAK;AAAA,EAAA;AAE7B;AAEY,MAAA,qBAAqB,CAAC,WAAmB,SACrD,KAAK,IAAI,GAAG,IAAI,KAAK,EAAE,mBAAmB,uBAAuB,IAAI,IAAI,SAAS,IAAI,CAAA,GAAI,EAAE,SAAS,EAAE,WAAW,OAAQ,CAAA;;;;;;;"}
|
package/lib/index.es2.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es2.js","sources":["../packages/utils/fecth/index.ts","../packages/utils/mqtt/index.ts","../packages/utils/socket/index.ts"],"sourcesContent":["import { ElMessage } from \"element-plus\";\nimport type { HttpMethod, RequestConfig } from \"./interface\";\nimport { auth } from \"@packages/api\";\nimport { checkStatus, showFullScreenLoading, hideFullScreenLoading } from \"../http/config\";\nfunction buildQuery(params?: Record<string, any>): string {\n\tif (!params) return \"\";\n\tconst query = new URLSearchParams();\n\tObject.entries(params).forEach(([key, value]) => {\n\t\tif (value !== undefined && value !== null) {\n\t\t\tquery.append(key, String(value));\n\t\t}\n\t});\n\treturn `?${query.toString()}`;\n}\n\nasync function baseRequest<T = any>(url: string, method: HttpMethod, data?: any, config: RequestConfig = {}): Promise<T> {\n\tconst { headers = {}, responseType = \"json\", signal, noAuth = false } = config;\n\tconst fullUrl = method === \"GET\" ? `${url}${buildQuery(data)}` : `${url}`;\n\tconst token = auth.getToken();\n\tif (!config.noLoading) {\n\t\tshowFullScreenLoading();\n\t}\n\tconst res = await fetch(fullUrl, {\n\t\tmethod,\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...(token && !noAuth ? { token: token } : \"\"),\n\t\t\t...headers\n\t\t},\n\t\tbody: method !== \"GET\" && data ? JSON.stringify(data) : undefined,\n\t\tsignal\n\t});\n\thideFullScreenLoading();\n\t// 统一错误处理\n\tif (!res.ok) {\n\t\tlet errorMessage = \"\";\n\t\ttry {\n\t\t\tconst errorData = await res.json();\n\t\t\tif (errorData?.resultMsg) {\n\t\t\t\terrorMessage = errorData.resultMsg;\n\t\t\t}\n\t\t} catch (_) {}\n\t\tcheckStatus(res.status, errorMessage);\n\t\tthrow new Error(errorMessage);\n\t}\n\n\tswitch (responseType) {\n\t\tcase \"text\":\n\t\t\treturn res.text() as Promise<T>;\n\t\tcase \"blob\":\n\t\t\treturn res.blob() as Promise<T>;\n\t\tdefault:\n\t\t\treturn res.json() as Promise<T>;\n\t}\n}\n\nexport const yxFecth = {\n\tget: <T = any>(url: string, params?: Record<string, any>, config?: RequestConfig) => baseRequest<T>(url, \"GET\", params, config),\n\n\tpost: <T = any>(url: string, data?: any, config?: RequestConfig) => baseRequest<T>(url, \"POST\", data, config),\n\n\tput: <T = any>(url: string, data?: any, config?: RequestConfig) => baseRequest<T>(url, \"PUT\", data, config),\n\n\tdelete: <T = any>(url: string, data?: any, config?: RequestConfig) => baseRequest<T>(url, \"DELETE\", data, config)\n};\n","/*\n * @Author: WangXin\n * @Date: 2023-06-28 10:33:54\n * @LastEditors: WangXin\n * @LastEditTime: 2025-04-25 18:35:47\n * @FilePath: /yxuse/packages/utils/mqtt/index.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport * as mqtt from \"mqtt/dist/mqtt.min\";\nimport type { ClientOptions, CusOptions } from \"./interface\";\nconst clientOptions: ClientOptions = {\n\tmqttVersion: 5,\n\tclean: true, // true: 清除会话, false: 保留会话\n\tconnectTimeout: 4000, // 超时时间\n\tkeepAlive: 60, // 认证信息\n\tclientId: \"mqttjs_\" + Date.now(),\n\t// username: \"xxxx\",\n\t// password: \"xxxx\",\n\tqos: 1\n};\nconst subscribeMap = new Map();\nclass MQ {\n\tclient: any;\n\tconstructor(url: string, options: CusOptions) {\n\t\tthis.client = null;\n\t\tthis.subscribe = this.subscribe;\n\t\tthis.unsubscribe = this.unsubscribe;\n\t\tthis.publish = this.publish;\n\t\tthis.destroyed = this.destroyed;\n\t\tthis.createClient(url, { ...clientOptions, ...options });\n\t}\n\tcreateClient(url: string, options: CusOptions) {\n\t\tthis.client = mqtt.connect(url, options);\n\t\tthis.client.on(\"connect\", this.onConnect);\n\t\tthis.client.on(\"reconnect\", this.onReconnect);\n\t\tthis.client.on(\"error\", this.onError);\n\t\tthis.client.on(\"message\", this.onMessage);\n\t}\n\tpublish(topic: string, message: any) {\n\t\tthis.client.publish(topic, message, { qos: clientOptions.qos }, (e: any) => {\n\t\t\tif (e) {\n\t\t\t\tconsole.log(`客户端: ${clientOptions.clientId}, 发送主题为: ${topic} 的消息, 发送失败: `, e);\n\t\t\t}\n\t\t});\n\t}\n\tsubscribe(topic, callback) {\n\t\tthis.client.subscribe(topic, error => {\n\t\t\tif (!error) {\n\t\t\t\tsubscribeMap.set(topic, callback);\n\t\t\t\tconsole.log(`客户端: ${clientOptions.clientId},主题:${topic}, 订阅成功`);\n\t\t\t} else {\n\t\t\t\tthrow new Error(error);\n\t\t\t}\n\t\t});\n\t}\n\tunsubscribe(topic) {\n\t\tthis.client.unsubscribe(topic, {}, error => {\n\t\t\tif (error) {\n\t\t\t\tconsole.log(`客户端: ${clientOptions.clientId}, 取消订阅主题: ${topic}失败: `, error);\n\t\t\t} else {\n\t\t\t\tconsole.log(`客户端: ${clientOptions.clientId}, 取消订阅主题: ${topic}成功`);\n\t\t\t}\n\t\t});\n\t}\n\tonConnect(e) {\n\t\tconsole.log(`客户端: ${clientOptions.clientId}, 连接emqx服务器成功:`, e);\n\t}\n\tonReconnect(error) {\n\t\tconsole.log(`客户端: ${clientOptions.clientId}, 正在重连:`, error);\n\t}\n\tonError(error) {\n\t\tconsole.log(`客户端: ${clientOptions.clientId}, 连接失败:`, error);\n\t}\n\tonMessage(topic, message) {\n\t\tconst data = message.toString();\n\t\tsubscribeMap.get(topic)(JSON.parse(data));\n\t}\n\tdestroyed() {\n\t\tif (this.client.end) this.client.end();\n\t\tconsole.log(`客户端: ${clientOptions.clientId}, 关闭连接`);\n\t}\n}\nexport default MQ;\n","import type { SocketParams, HeartMessage } from \"./interface\";\nexport default class Ws {\n\turl: string;\n\tprotocols: any;\n\twebSocketState: boolean;\n\tisCustomClose: boolean;\n\treconnectTime: number;\n\theartBeatTime: number;\n\twaitBeatTime: number;\n\tcallback: Function;\n\tHEART_KEY?: string;\n\tHEART_VALUE?: string | number;\n\tws: WebSocket | null;\n\tisReconnectionLoading: boolean;\n\ttimeId: any;\n\teventCenter: any;\n\terrorStack: any;\n\theartMessage?: HeartMessage;\n\tmsgDataPreHandler?: Function;\n\tconstructor(options: SocketParams, protocols?: string) {\n\t\tthis.url = options.url;\n\t\tthis.protocols = protocols;\n\t\tthis.webSocketState = false;\n\t\tthis.isCustomClose = true;\n\t\tthis.reconnectTime = options.reconnectTime; //断线重连时间间隔\n\t\tthis.heartBeatTime = options.heartBeatTime; //心跳间隔时间\n\t\tthis.waitBeatTime = options.waitBeatTime; //心跳等待时间\n\t\tthis.callback = options.callback;\n\t\tif (options.msgDataPreHandler) {\n\t\t\tthis.msgDataPreHandler = options.msgDataPreHandler;\n\t\t}\n\t\tthis.onmessage = this.onmessage;\n\t\tthis.heartMessage = options.heartMessage;\n\t\tthis.HEART_KEY = options.HEART_KEY; //心跳响应key\n\t\tthis.HEART_VALUE = options.HEART_VALUE; //心跳响应value\n\t\tthis.ws = null;\n\t\tthis.isReconnectionLoading = false;\n\t\tthis.createWs();\n\t}\n\n\tcreateWs() {\n\t\tif (\"WebSocket\" in window) {\n\t\t\t// 实例化\n\t\t\tthis.ws = null;\n\t\t\tthis.ws = new WebSocket(this.url, this.protocols);\n\t\t\t// 监听事件\n\t\t\tthis.onopen();\n\t\t\tthis.onerror();\n\t\t\tthis.onclose();\n\t\t\tthis.onmessage();\n\t\t} else {\n\t\t\tconsole.warn(\"你的浏览器不支持 WebSocket\");\n\t\t}\n\t}\n\n\t// 监听成功\n\tonopen() {\n\t\tthis.ws.onopen = () => {\n\t\t\tconsole.info(\"socket已连接成功\");\n\t\t\tthis.webSocketState = true;\n\t\t\tthis.startHeartBeat(this.heartBeatTime);\n\t\t};\n\t}\n\tstartHeartBeat(time: any) {\n\t\tsetTimeout(() => {\n\t\t\tthis.heartMessage && (this.heartMessage.data = new Date().getTime() + \"\");\n\t\t\tthis.send(this.heartMessage ? this.heartMessage : this.HEART_KEY);\n\t\t\tthis.waitingServer();\n\t\t}, time);\n\t}\n\t//延时等待服务端响应,通过webSocketState判断是否连线成功\n\twaitingServer() {\n\t\tthis.webSocketState = false;\n\t\tsetTimeout(() => {\n\t\t\tif (this.webSocketState) {\n\t\t\t\tthis.startHeartBeat(this.heartBeatTime);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.warn(\"warning\", \"心跳无响应,已断线\");\n\t\t\ttry {\n\t\t\t\tthis.close();\n\t\t\t\tif (this.ws) {\n\t\t\t\t\tthis.start();\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.info(\"连接已关闭,无需关闭\");\n\t\t\t}\n\t\t}, this.waitBeatTime);\n\t}\n\t// 监听错误\n\tonerror() {\n\t\tif (!this.ws) return;\n\t\tthis.ws.onerror = err => {\n\t\t\tconsole.log(err);\n\n\t\t\tthis.isCustomClose = false;\n\t\t\tthis.isReconnectionLoading = false;\n\t\t};\n\t}\n\n\t// 监听关闭\n\tonclose() {\n\t\tif (!this.ws) return;\n\t\tthis.ws.onclose = () => {\n\t\t\tconsole.info(\"success\", \"socket关闭成功\");\n\t\t\t// 用户手动关闭的不重连\n\t\t\tif (this.isCustomClose) return;\n\t\t\tif (this.ws) {\n\t\t\t\tconsole.log(\"重连\");\n\n\t\t\t\tthis.reconnection();\n\t\t\t\tthis.isReconnectionLoading = false;\n\t\t\t}\n\t\t};\n\t}\n\n\t// 接收 WebSocket 消息,增加二进制数据支持\n\tasync onmessage() {\n\t\tif (!this.ws) return;\n\t\tthis.ws.onmessage = async event => {\n\t\t\ttry {\n\t\t\t\tlet rawData = event.data;\n\t\t\t\tif (this.msgDataPreHandler) {\n\t\t\t\t\tawait this.msgDataPreHandler(rawData);\n\t\t\t\t}\n\t\t\t\t// 处理心跳消息\n\t\t\t\tif (rawData === this.HEART_VALUE) {\n\t\t\t\t\tthis.webSocketState = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// 解析 JSON 数据\n\t\t\t\tconst data = JSON.parse(rawData);\n\t\t\t\tthis.callback(data);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.log(error);\n\t\t\t\tthis.callback(event.data);\n\t\t\t}\n\t\t};\n\t}\n\n\t// 重连\n\treconnection() {\n\t\t// 防止重复\n\t\tif (this.isReconnectionLoading) return;\n\t\tthis.isReconnectionLoading = true;\n\t\tclearTimeout(this.timeId);\n\t\tthis.timeId = null;\n\t\tthis.timeId = setTimeout(() => {\n\t\t\tthis.createWs();\n\t\t}, this.reconnectTime);\n\t}\n\n\t// 发送消息\n\tsend(message: any) {\n\t\tif (this.webSocketState && this.ws) {\n\t\t\tthis.ws.send(message);\n\t\t}\n\t}\n\n\t// 手动关闭\n\tclose() {\n\t\tthis.isCustomClose = true;\n\t\tthis.isReconnectionLoading = false;\n\t\t// if (this.ws.readyState === WebSocket.OPEN) this.ws?.close();\n\t\tif (this.ws && this.ws.close) this.ws?.close();\n\t}\n\n\t// 手动开启\n\tstart() {\n\t\tthis.isCustomClose = false;\n\t\tthis.reconnection();\n\t}\n\n\t// 订阅\n\tsubscribe(eventName: string, cb: Function) {\n\t\tthis.eventCenter.on(eventName, cb);\n\t}\n\n\t// 取消订阅\n\tunsubscribe(eventName: string, cb: Function) {\n\t\tthis.eventCenter.off(eventName, cb);\n\t}\n\n\t// 销毁\n\tdestroy() {\n\t\tclearTimeout(this.timeId);\n\t\tthis.close();\n\t\tthis.ws = null;\n\t\tthis.errorStack = null;\n\t\tthis.eventCenter = null;\n\t\t// this.isCustomClose = true;\n\t\tthis.webSocketState = false;\n\t}\n}\n"],"names":["auth.getToken","mqtt.connect"],"mappings":";;;;;;;;AAIA,SAAS,WAAW,QAAsC;AACrD,MAAA,CAAC,OAAe,QAAA;AACd,QAAA,QAAQ,IAAI,gBAAgB;AAC3B,SAAA,QAAQ,MAAM,EAAE,QAAQ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.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2024-04-11 14:07:04\n * @LastEditors: WangXin\n * @LastEditTime: 2024-04-15 15:34:49\n * @FilePath: /yxuse/packages/yxIcon/index.ts\n * @Description:\n *\n * Copyright (c) 2024 by YuXing, All Rights Reserved.\n */\nimport type { App } from \"vue\";\nimport { assets } from \"@packages/api\";\nconst ICON_GROUP_NAME = \"yxIcon\";\nconst initYxIcon = () => {\n\tgetYxIconGroupUuid();\n\t// combineYxIconStr();\n};\nconst getYxIconGroupUuid = async () => {\n\tconst { data } = await assets.getGroupListApi();\n\tconst groupUuid = data.find((item: any) => item.groupName === ICON_GROUP_NAME)?.groupUuid;\n\tgetYxIconFileContent(groupUuid);\n};\nconst getYxIconFileContent = async (groupUuid: string) => {\n\tconst { data } = await assets.getResourceListApi(groupUuid, 1);\n\tcombineYxIconStr(data);\n\treturn data;\n};\nconst combineYxIconStr = (data: any) => {\n\tconst svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n\tsvg.setAttribute(\"xmlns\", \"http://www.w3.org/2000/svg\");\n\tsvg.setAttribute(\"xmlns:xlin\", \"http://www.w3.org/1999/xlink\");\n\tlet svgHtml = \"\";\n\tdata.forEach((svgElement: any) => {\n\t\tsvgHtml += svgElement.text\n\t\t\t.replace(/\\\\/g, \"\")\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, \"$1\");\n\t});\n\tsvg.innerHTML = svgHtml;\n\tsvg.style.position = \"absolute\";\n\tsvg.style.width = \"0\";\n\tsvg.style.height = \"0\";\n\tdocument.head.appendChild(svg);\n};\nexport default {\n\tinstall: function (app: App<Element>) {\n\t\tinitYxIcon();\n\t}\n};\n"],"names":["assets.getGroupListApi","assets.getResourceListApi"],"mappings":";;;;AAYA,MAAM,kBAAkB;AACxB,MAAM,aAAa,MAAM;AACL,qBAAA;AAEpB;AACA,MAAM,qBAAqB,YAAY;;AACtC,QAAM,EAAE,SAAS,MAAMA,gBAAuB;AACxC,QAAA,aAAY,UAAK,KAAK,CAAC,SAAc,KAAK,cAAc,eAAe,MAA3D,mBAA8D;AAChF,uBAAqB,SAAS;AAC/B;AACA,MAAM,uBAAuB,OAAO,cAAsB;AACzD,QAAM,EAAE,KAAK,IAAI,MAAMC,mBAA0B,WAAW,CAAC;AAC7D,mBAAiB,IAAI;AACd,SAAA;AACR;AACA,MAAM,mBAAmB,CAAC,SAAc;AACvC,QAAM,MAAM,SAAS,gBAAgB,8BAA8B,KAAK;AACpE,MAAA,aAAa,SAAS,4BAA4B;AAClD,MAAA,aAAa,cAAc,8BAA8B;AAC7D,MAAI,UAAU;AACT,OAAA,QAAQ,CAAC,eAAoB;AACtB,eAAA,WAAW,KACpB,QAAQ,OAAO,EAAE,EACjB,KAAK,EACL,QAAQ,YAAY,IAAI;AAAA,EAAA,CAC1B;AACD,MAAI,YAAY;AAChB,MAAI,MAAM,WAAW;AACrB,MAAI,MAAM,QAAQ;AAClB,MAAI,MAAM,SAAS;AACV,WAAA,KAAK,YAAY,GAAG;AAC9B;AACA,MAAe,QAAA;AAAA,EACd,SAAS,SAAU,KAAmB;AAC1B,eAAA;AAAA,EAAA;AAEb;;;;;"}
|
package/lib/index.es4.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es4.js","sources":["../packages/api/index.ts"],"sourcesContent":["/*\n * @Author: WangXin\n * @Date: 2023-08-17 09:30:47\n * @LastEditors: WangXin\n * @LastEditTime: 2024-08-15 18:45:26\n * @FilePath: /yxuse/packages/api/index.ts\n * @Description:\n *\n * Copyright (c) 2023 by YuXing, All Rights Reserved.\n */\nimport * as auth from \"./auth/index\";\nimport * as assets from \"./modules/assets/index\";\nexport { auth, assets };\nimport http from \"@packages/utils/http\";\nimport { URL } from \"@packages/config\";\n\n/**\n * 获取用户可选择的星\n *\n */\nexport const getUserSelectSatelliteList = async (systemName = \"ttc\") => {\n\tconst data = await http.get<any>(`${URL[systemName].INTEGRATED_BASE_URL}/basic/data/satellite/select`);\n\treturn data;\n};\n\n/**\n * 获取用户可选择的测站\n *\n */\nexport const getUserSelectAnteList = async (systemName = \"ttc\") => {\n\tconst data = await http.get<any>(`${URL[systemName].INTEGRATED_BASE_URL}/basic/data/ante/select`);\n\treturn data;\n};\n\n/**\n * 获取用户可选择的主题\n *\n */\nexport const getUserThemeList = async (systemName = \"ttc\") => {\n\treturn await http.get<any>(`${URL[systemName].INTEGRATED_BASE_URL}/theme/list`, {}, { headers: { noLoading: true } });\n};\n\nexport const getCommentUntreatedCount = async (systemName = \"ttc\") => {\n\treturn await http.get<any>(`${URL[systemName].INTEGRATED_BASE_URL}/workorder/comment/untreated/count`);\n};\n"],"names":[],"mappings":";;AAoBa,MAAA,6BAA6B,OAAO,aAAa,UAAU;AACjE,QAAA,OAAO,MAAM,KAAK,IAAS,GAAG,IAAI,UAAU,EAAE,mBAAmB,8BAA8B;AAC9F,SAAA;AACR;AAMa,MAAA,wBAAwB,OAAO,aAAa,UAAU;AAC5D,QAAA,OAAO,MAAM,KAAK,IAAS,GAAG,IAAI,UAAU,EAAE,mBAAmB,yBAAyB;AACzF,SAAA;AACR;AAMa,MAAA,mBAAmB,OAAO,aAAa,UAAU;AAC7D,SAAO,MAAM,KAAK,IAAS,GAAG,IAAI,UAAU,EAAE,mBAAmB,eAAe,IAAI,EAAE,SAAS,EAAE,WAAW,KAAA,GAAQ;AACrH;AAEa,MAAA,2BAA2B,OAAO,aAAa,UAAU;AAC9D,SAAA,MAAM,KAAK,IAAS,GAAG,IAAI,UAAU,EAAE,mBAAmB,oCAAoC;AACtG;;;;;;;;;;"}
|