adtec-core-package 0.3.3 → 0.3.5

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.
Files changed (57) hide show
  1. package/README.en.md +36 -36
  2. package/package.json +58 -56
  3. package/src/api/BasicApi.ts +17 -17
  4. package/src/api/DocumentApi.ts +18 -18
  5. package/src/api/SysDictCacheApi.ts +26 -26
  6. package/src/api/SysUserApi.ts +35 -35
  7. package/src/api/framework.ts +12 -12
  8. package/src/assets/style/ant.scss +19 -19
  9. package/src/assets/style/index.less +180 -180
  10. package/src/components/ElFlex/ElFlex.vue +297 -297
  11. package/src/components/Search/ElSearch.vue +154 -154
  12. package/src/components/Table/ElTableColumnEdit.vue +218 -218
  13. package/src/components/Title/ElTitle.vue +49 -49
  14. package/src/components/autoToolTip/ElAutoToolTip.vue +61 -61
  15. package/src/components/baseEcharts/index.vue +48 -0
  16. package/src/components/business/userSelect.vue +412 -412
  17. package/src/components/upload/FileView.vue +158 -158
  18. package/src/components/upload/FileViewComponents.vue +57 -57
  19. package/src/config/ElementPlusConfig.ts +95 -95
  20. package/src/css/elementUI/autocomplete.scss +89 -89
  21. package/src/css/elementUI/common/var.scss +1549 -1549
  22. package/src/css/elementUI/date-picker/picker.scss +219 -219
  23. package/src/css/elementUI/drawer.scss +164 -164
  24. package/src/css/elementUI/table.scss +694 -694
  25. package/src/css/elementUI/tabs.scss +659 -659
  26. package/src/directives/vKeydown.ts +93 -93
  27. package/src/hooks/useDictHooks.ts +76 -76
  28. package/src/hooks/useEcharts.ts +58 -0
  29. package/src/hooks/useFileView.ts +34 -34
  30. package/src/hooks/useMessageHooks.ts +132 -132
  31. package/src/hooks/useResetRefHooks.ts +18 -18
  32. package/src/interface/BaseEntity.ts +28 -28
  33. package/src/interface/IMdmDept.ts +82 -82
  34. package/src/interface/IOrgDeptInfo.ts +12 -12
  35. package/src/interface/ISysDictDataCacheVo.ts +46 -46
  36. package/src/interface/ISysDictType.ts +37 -37
  37. package/src/interface/ISysMenuDataVo.ts +22 -22
  38. package/src/interface/ISysMenuInfoVo.ts +83 -83
  39. package/src/interface/ISysMenuOperationVo.ts +21 -21
  40. package/src/interface/ISysUploadFiles.ts +16 -16
  41. package/src/interface/ISysUserInfo.ts +70 -70
  42. package/src/interface/IUserPermissionVo.ts +34 -34
  43. package/src/interface/Message.ts +69 -69
  44. package/src/interface/PageData.ts +17 -17
  45. package/src/interface/ResponseData.ts +16 -16
  46. package/src/interface/dictMapType.ts +11 -11
  47. package/src/interface/enum/MessageEnum.ts +41 -41
  48. package/src/mixin/globalMixin.ts +4 -1
  49. package/src/packages/index.ts +18 -18
  50. package/src/packages/text.vue +13 -13
  51. package/src/plugins/echartsConfig.ts +73 -0
  52. package/src/plugins/plugins.ts +12 -12
  53. package/src/stores/dictStore.ts +20 -20
  54. package/src/stores/messageStore.ts +49 -49
  55. package/src/stores/storeConfig.ts +23 -23
  56. package/src/stores/userInfoStore.ts +31 -31
  57. package/src/utils/AxiosConfig.ts +216 -216
@@ -1,158 +1,158 @@
1
- <!--创建人 丁盼-->
2
- <!--说明: 文件查看-->
3
- <!--创建时间: 2024/12/3 上午10:06-->
4
- <!--修改时间: 2024/12/3 上午10:06-->
5
- <template>
6
- <!-- <el-dialog :title="title" v-model="model" @close="model = false" width="100%">-->
7
- <Teleport to="body" v-if="model">
8
- <div
9
- style="
10
- position: absolute;
11
- z-index: 9999;
12
- width: 100%;
13
- height: 100%;
14
- top: 0px;
15
- background: rgb(0, 0, 0, 0.5);
16
- text-align: center;
17
- vertical-align: middle;
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
- "
22
- >
23
- <el-icon
24
- @click="model = false"
25
- style="
26
- position: absolute;
27
- top: 20px;
28
- right: 20px;
29
- font-size: 30px;
30
- color: #fff;
31
- cursor: pointer;
32
- "
33
- ><CircleClose
34
- /></el-icon>
35
-
36
- <DocumentEditor
37
- id="docEditor"
38
- :documentServerUrl="documentServerUrl"
39
- :config="configcomp"
40
- :events_onDocumentReady="onDocumentReady"
41
- :onLoadComponentError="onLoadComponentError"
42
- />
43
- </div>
44
- </Teleport>
45
- <!-- </el-dialog>-->
46
- </template>
47
- <script setup lang="ts">
48
- import { DocumentEditor } from '@onlyoffice/document-editor-vue'
49
- import { computed, onBeforeMount, onMounted, ref } from 'vue'
50
- import { userInfoStore } from '../../stores/userInfoStore'
51
- import { useVModel } from '@vueuse/core'
52
- import { CircleClose } from '@element-plus/icons-vue'
53
- import { ElIcon } from 'element-plus'
54
- const userinfo = userInfoStore()
55
- const model = defineModel()
56
- const documentServerUrl = ref('')
57
- const documentServerCallbackUrl = ref('')
58
- // 定义Props类型
59
- const props = defineProps({
60
- /**
61
- * @default ''
62
- * @description 文件标题
63
- */
64
- title: {
65
- type: String,
66
- default: '',
67
- },
68
- /**
69
- * @default ''
70
- * @description 文件Url地址
71
- */
72
- url: {
73
- type: String,
74
- default: '',
75
- },
76
- /**
77
- * @default ''
78
- * @description 文件id
79
- */
80
- fileId: {
81
- type: String,
82
- default: '',
83
- },
84
- /**
85
- * @type {"view" | "edit"}
86
- * @default ''
87
- * @description 文件id
88
- */
89
- edit: {
90
- type: String,
91
- default: 'view',
92
- },
93
- })
94
- const emit = defineEmits(['update:title', 'update:url', 'update:fileId', 'update:edit'])
95
- const title = useVModel(props, 'title', emit)
96
- const fileId = useVModel(props, 'fileId', emit)
97
- const url = useVModel(props, 'url', emit)
98
- const edit = useVModel(props, 'edit', emit)
99
- const getFileType = () => {
100
- if ((url.value + '').indexOf('.docx') !== -1 || (url.value + '').indexOf('.doc') !== -1) {
101
- return 'docx'
102
- } else if ((url.value + '').indexOf('.pdf') !== -1) {
103
- return 'pdf'
104
- } else if ((url.value + '').indexOf('.xlsx') !== -1 || (url.value + '').indexOf('.xls') !== -1) {
105
- return 'xlsx'
106
- } else if ((url.value + '').indexOf('.pptx') !== -1 || (url.value + '').indexOf('.pptx') !== -1) {
107
- return 'pptx'
108
- }
109
- }
110
- const getDocumentType = () => {
111
- if ((url.value + '').indexOf('.docx') !== -1 || (url.value + '').indexOf('.doc') !== -1) {
112
- return 'word'
113
- } else if ((url.value + '').indexOf('.pdf') !== -1) {
114
- return 'pdf'
115
- } else if ((url.value + '').indexOf('.xlsx') !== -1 || (url.value + '').indexOf('.xls') !== -1) {
116
- return 'cell'
117
- } else if ((url.value + '').indexOf('.pptx') !== -1 || (url.value + '').indexOf('.pptx') !== -1) {
118
- return 'slide'
119
- }
120
- }
121
- const configcomp = computed(() => {
122
- return {
123
- document: {
124
- fileType: getFileType(),
125
- title: title.value,
126
- url: url.value + '',
127
- permissions: {
128
- download: false,
129
- edit: true,
130
- },
131
- },
132
- documentType: getDocumentType(),
133
- editorConfig: {
134
- callbackUrl: documentServerCallbackUrl.value + '?fileId=' + fileId.value,
135
- lang: 'zh-CN',
136
- mode: edit.value,
137
- // customization: {
138
- // autosave: false,
139
- // },
140
- user: {
141
- id: userinfo.getUserInfo.userCode,
142
- name: userinfo.getUserInfo.userName,
143
- },
144
- },
145
- height: '90%',
146
- width: '90%',
147
- }
148
- })
149
- const onDocumentReady = () => {}
150
- const onLoadComponentError = () => {}
151
- onBeforeMount(() => {
152
- const config = JSON.parse(localStorage.getItem('systemConfig') + '')
153
- documentServerUrl.value = config.documentServerUrl
154
- documentServerCallbackUrl.value = config.documentServerCallbackUrl
155
- })
156
- onMounted(() => {})
157
- </script>
158
- <style scoped lang="scss"></style>
1
+ <!--创建人 丁盼-->
2
+ <!--说明: 文件查看-->
3
+ <!--创建时间: 2024/12/3 上午10:06-->
4
+ <!--修改时间: 2024/12/3 上午10:06-->
5
+ <template>
6
+ <!-- <el-dialog :title="title" v-model="model" @close="model = false" width="100%">-->
7
+ <Teleport to="body" v-if="model">
8
+ <div
9
+ style="
10
+ position: absolute;
11
+ z-index: 9999;
12
+ width: 100%;
13
+ height: 100%;
14
+ top: 0px;
15
+ background: rgb(0, 0, 0, 0.5);
16
+ text-align: center;
17
+ vertical-align: middle;
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ "
22
+ >
23
+ <el-icon
24
+ @click="model = false"
25
+ style="
26
+ position: absolute;
27
+ top: 20px;
28
+ right: 20px;
29
+ font-size: 30px;
30
+ color: #fff;
31
+ cursor: pointer;
32
+ "
33
+ ><CircleClose
34
+ /></el-icon>
35
+
36
+ <DocumentEditor
37
+ id="docEditor"
38
+ :documentServerUrl="documentServerUrl"
39
+ :config="configcomp"
40
+ :events_onDocumentReady="onDocumentReady"
41
+ :onLoadComponentError="onLoadComponentError"
42
+ />
43
+ </div>
44
+ </Teleport>
45
+ <!-- </el-dialog>-->
46
+ </template>
47
+ <script setup lang="ts">
48
+ import { DocumentEditor } from '@onlyoffice/document-editor-vue'
49
+ import { computed, onBeforeMount, onMounted, ref } from 'vue'
50
+ import { userInfoStore } from '../../stores/userInfoStore'
51
+ import { useVModel } from '@vueuse/core'
52
+ import { CircleClose } from '@element-plus/icons-vue'
53
+ import { ElIcon } from 'element-plus'
54
+ const userinfo = userInfoStore()
55
+ const model = defineModel()
56
+ const documentServerUrl = ref('')
57
+ const documentServerCallbackUrl = ref('')
58
+ // 定义Props类型
59
+ const props = defineProps({
60
+ /**
61
+ * @default ''
62
+ * @description 文件标题
63
+ */
64
+ title: {
65
+ type: String,
66
+ default: '',
67
+ },
68
+ /**
69
+ * @default ''
70
+ * @description 文件Url地址
71
+ */
72
+ url: {
73
+ type: String,
74
+ default: '',
75
+ },
76
+ /**
77
+ * @default ''
78
+ * @description 文件id
79
+ */
80
+ fileId: {
81
+ type: String,
82
+ default: '',
83
+ },
84
+ /**
85
+ * @type {"view" | "edit"}
86
+ * @default ''
87
+ * @description 文件id
88
+ */
89
+ edit: {
90
+ type: String,
91
+ default: 'view',
92
+ },
93
+ })
94
+ const emit = defineEmits(['update:title', 'update:url', 'update:fileId', 'update:edit'])
95
+ const title = useVModel(props, 'title', emit)
96
+ const fileId = useVModel(props, 'fileId', emit)
97
+ const url = useVModel(props, 'url', emit)
98
+ const edit = useVModel(props, 'edit', emit)
99
+ const getFileType = () => {
100
+ if ((url.value + '').indexOf('.docx') !== -1 || (url.value + '').indexOf('.doc') !== -1) {
101
+ return 'docx'
102
+ } else if ((url.value + '').indexOf('.pdf') !== -1) {
103
+ return 'pdf'
104
+ } else if ((url.value + '').indexOf('.xlsx') !== -1 || (url.value + '').indexOf('.xls') !== -1) {
105
+ return 'xlsx'
106
+ } else if ((url.value + '').indexOf('.pptx') !== -1 || (url.value + '').indexOf('.pptx') !== -1) {
107
+ return 'pptx'
108
+ }
109
+ }
110
+ const getDocumentType = () => {
111
+ if ((url.value + '').indexOf('.docx') !== -1 || (url.value + '').indexOf('.doc') !== -1) {
112
+ return 'word'
113
+ } else if ((url.value + '').indexOf('.pdf') !== -1) {
114
+ return 'pdf'
115
+ } else if ((url.value + '').indexOf('.xlsx') !== -1 || (url.value + '').indexOf('.xls') !== -1) {
116
+ return 'cell'
117
+ } else if ((url.value + '').indexOf('.pptx') !== -1 || (url.value + '').indexOf('.pptx') !== -1) {
118
+ return 'slide'
119
+ }
120
+ }
121
+ const configcomp = computed(() => {
122
+ return {
123
+ document: {
124
+ fileType: getFileType(),
125
+ title: title.value,
126
+ url: url.value + '',
127
+ permissions: {
128
+ download: false,
129
+ edit: true,
130
+ },
131
+ },
132
+ documentType: getDocumentType(),
133
+ editorConfig: {
134
+ callbackUrl: documentServerCallbackUrl.value + '?fileId=' + fileId.value,
135
+ lang: 'zh-CN',
136
+ mode: edit.value,
137
+ // customization: {
138
+ // autosave: false,
139
+ // },
140
+ user: {
141
+ id: userinfo.getUserInfo.userCode,
142
+ name: userinfo.getUserInfo.userName,
143
+ },
144
+ },
145
+ height: '90%',
146
+ width: '90%',
147
+ }
148
+ })
149
+ const onDocumentReady = () => {}
150
+ const onLoadComponentError = () => {}
151
+ onBeforeMount(() => {
152
+ const config = JSON.parse(localStorage.getItem('systemConfig') + '')
153
+ documentServerUrl.value = config.documentServerUrl
154
+ documentServerCallbackUrl.value = config.documentServerCallbackUrl
155
+ })
156
+ onMounted(() => {})
157
+ </script>
158
+ <style scoped lang="scss"></style>
@@ -1,57 +1,57 @@
1
- <template>
2
- <file-view
3
- v-if="isVisible"
4
- v-model="isVisible"
5
- :title="fileTitle"
6
- :url="viewUrl"
7
- :fileId="fileId"
8
- :edit="edit"
9
- ></file-view>
10
- </template>
11
-
12
- <script setup lang="ts">
13
- import { ref } from 'vue'
14
- const isVisible = ref(false)
15
- //@ts-ignore
16
- import 'vue-img-viewr/styles/index.css'
17
- //@ts-ignore
18
- import ImgViewr, { showImages } from 'vue-img-viewr'
19
- import documentApi from '../../api/DocumentApi.ts'
20
- import { ElMessage } from 'element-plus'
21
- import framework from '../../api/framework.ts'
22
- import FileView from './FileView.vue'
23
- const fileTitle = ref('')
24
- const viewUrl = ref('')
25
- const fileId = ref('')
26
- const edit = ref('view')
27
-
28
- const viewFile = async (id: string) => {
29
- //根据文件id获取文件信息
30
- try {
31
- const data = await documentApi.getUpLoadFilesVoById(id)
32
- const data1 = await framework.getFileAccessAddress(data.id)
33
- if ('.jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP'.includes(data.type)) {
34
- showImages({
35
- urls: [data1.url],
36
- index: 0,
37
- })
38
- } else {
39
- fileTitle.value = data.name
40
- viewUrl.value = data1.url
41
- fileId.value = data.id
42
- isVisible.value = true
43
- }
44
- } catch (err: any) {
45
- console.log(err)
46
- ElMessage.error(err.msg)
47
- }
48
- }
49
-
50
- defineExpose<{
51
- viewFile: (id: string) => void
52
- }>({
53
- viewFile,
54
- })
55
- </script>
56
-
57
- <style scoped></style>
1
+ <template>
2
+ <file-view
3
+ v-if="isVisible"
4
+ v-model="isVisible"
5
+ :title="fileTitle"
6
+ :url="viewUrl"
7
+ :fileId="fileId"
8
+ :edit="edit"
9
+ ></file-view>
10
+ </template>
11
+
12
+ <script setup lang="ts">
13
+ import { ref } from 'vue'
14
+ const isVisible = ref(false)
15
+ //@ts-ignore
16
+ import 'vue-img-viewr/styles/index.css'
17
+ //@ts-ignore
18
+ import ImgViewr, { showImages } from 'vue-img-viewr'
19
+ import documentApi from '../../api/DocumentApi.ts'
20
+ import { ElMessage } from 'element-plus'
21
+ import framework from '../../api/framework.ts'
22
+ import FileView from './FileView.vue'
23
+ const fileTitle = ref('')
24
+ const viewUrl = ref('')
25
+ const fileId = ref('')
26
+ const edit = ref('view')
27
+
28
+ const viewFile = async (id: string) => {
29
+ //根据文件id获取文件信息
30
+ try {
31
+ const data = await documentApi.getUpLoadFilesVoById(id)
32
+ const data1 = await framework.getFileAccessAddress(data.id)
33
+ if ('.jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP'.includes(data.type)) {
34
+ showImages({
35
+ urls: [data1.url],
36
+ index: 0,
37
+ })
38
+ } else {
39
+ fileTitle.value = data.name
40
+ viewUrl.value = data1.url
41
+ fileId.value = data.id
42
+ isVisible.value = true
43
+ }
44
+ } catch (err: any) {
45
+ console.log(err)
46
+ ElMessage.error(err.msg)
47
+ }
48
+ }
49
+
50
+ defineExpose<{
51
+ viewFile: (id: string) => void
52
+ }>({
53
+ viewFile,
54
+ })
55
+ </script>
56
+
57
+ <style scoped></style>
@@ -1,95 +1,95 @@
1
- /**
2
- * Create by丁盼
3
- * 说明: config
4
- * 创建时间: 2025/1/14 15:15
5
- * 修改时间: 2025/1/14 15:15
6
- */
7
- /**
8
- * Create by丁盼
9
- * 说明: config
10
- * 创建时间: 2025/1/14 15:16
11
- * 修改时间: 2025/1/14 15:16
12
- */
13
- import elementPlus, {
14
- ElPagination,
15
- ElForm,
16
- ElDialog,
17
- ElDrawer,
18
- ElSelect,
19
- ElTreeSelect,
20
- ElTable,
21
- ElTooltip,
22
- } from 'element-plus'
23
- ElPagination.props.background = {
24
- type: Boolean,
25
- default: true,
26
- }
27
- ElPagination.props.layout = {
28
- type: String,
29
- default: 'prev, pager, next,total',
30
- }
31
- ElForm.props.requireAsteriskPosition = {
32
- type: String,
33
- default: 'right',
34
- }
35
- ElForm.props.labelPosition = {
36
- type: String,
37
- default: 'top',
38
- }
39
- ElDialog.props.closeOnClickModal = {
40
- type: Boolean,
41
- default: false,
42
- }
43
- ElDialog.props.appendToBody = {
44
- type: Boolean,
45
- default: true,
46
- }
47
- ElDialog.props.closeOnPressEscape = {
48
- type: Boolean,
49
- default: false,
50
- }
51
- ElDialog.props.destroyOnClose = {
52
- type: Boolean,
53
- default: true,
54
- }
55
- ElDialog.props.draggable = {
56
- type: Boolean,
57
- default: true,
58
- }
59
- ElDrawer.props.closeOnClickModal = {
60
- type: Boolean,
61
- default: true,
62
- }
63
- ElDialog.props.appendToBody = {
64
- type: Boolean,
65
- default: true,
66
- }
67
- ElDrawer.props.closeOnPressEscape = {
68
- type: Boolean,
69
- default: false,
70
- }
71
- ElSelect.props.fitInputWidth = {
72
- type: Boolean,
73
- default: true,
74
- }
75
- ElTreeSelect.props.fitInputWidth = {
76
- type: Boolean,
77
- default: true,
78
- }
79
- ElTable.props.showOverflowTooltip = {
80
- type: Boolean,
81
- default: true,
82
- }
83
- ElTable.props.highlightCurrentRow = {
84
- type: Boolean,
85
- default: true,
86
- }
87
- ElTable.props.tooltipEffect = {
88
- type: String,
89
- default: 'light',
90
- }
91
- ElTooltip.props.effect = {
92
- type: String,
93
- default: 'light',
94
- }
95
- export default elementPlus
1
+ /**
2
+ * Create by丁盼
3
+ * 说明: config
4
+ * 创建时间: 2025/1/14 15:15
5
+ * 修改时间: 2025/1/14 15:15
6
+ */
7
+ /**
8
+ * Create by丁盼
9
+ * 说明: config
10
+ * 创建时间: 2025/1/14 15:16
11
+ * 修改时间: 2025/1/14 15:16
12
+ */
13
+ import elementPlus, {
14
+ ElPagination,
15
+ ElForm,
16
+ ElDialog,
17
+ ElDrawer,
18
+ ElSelect,
19
+ ElTreeSelect,
20
+ ElTable,
21
+ ElTooltip,
22
+ } from 'element-plus'
23
+ ElPagination.props.background = {
24
+ type: Boolean,
25
+ default: true,
26
+ }
27
+ ElPagination.props.layout = {
28
+ type: String,
29
+ default: 'prev, pager, next,total',
30
+ }
31
+ ElForm.props.requireAsteriskPosition = {
32
+ type: String,
33
+ default: 'right',
34
+ }
35
+ ElForm.props.labelPosition = {
36
+ type: String,
37
+ default: 'top',
38
+ }
39
+ ElDialog.props.closeOnClickModal = {
40
+ type: Boolean,
41
+ default: false,
42
+ }
43
+ ElDialog.props.appendToBody = {
44
+ type: Boolean,
45
+ default: true,
46
+ }
47
+ ElDialog.props.closeOnPressEscape = {
48
+ type: Boolean,
49
+ default: false,
50
+ }
51
+ ElDialog.props.destroyOnClose = {
52
+ type: Boolean,
53
+ default: true,
54
+ }
55
+ ElDialog.props.draggable = {
56
+ type: Boolean,
57
+ default: true,
58
+ }
59
+ ElDrawer.props.closeOnClickModal = {
60
+ type: Boolean,
61
+ default: true,
62
+ }
63
+ ElDialog.props.appendToBody = {
64
+ type: Boolean,
65
+ default: true,
66
+ }
67
+ ElDrawer.props.closeOnPressEscape = {
68
+ type: Boolean,
69
+ default: false,
70
+ }
71
+ ElSelect.props.fitInputWidth = {
72
+ type: Boolean,
73
+ default: true,
74
+ }
75
+ ElTreeSelect.props.fitInputWidth = {
76
+ type: Boolean,
77
+ default: true,
78
+ }
79
+ ElTable.props.showOverflowTooltip = {
80
+ type: Boolean,
81
+ default: true,
82
+ }
83
+ ElTable.props.highlightCurrentRow = {
84
+ type: Boolean,
85
+ default: true,
86
+ }
87
+ ElTable.props.tooltipEffect = {
88
+ type: String,
89
+ default: 'light',
90
+ }
91
+ ElTooltip.props.effect = {
92
+ type: String,
93
+ default: 'light',
94
+ }
95
+ export default elementPlus