sohelp-eleplus 1.1.24 → 1.1.26

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 (48) hide show
  1. package/components.js +1 -0
  2. package/http/SohelpHttp.js +21 -21
  3. package/icons/flag/AustraliaFlag.vue +10 -0
  4. package/icons/flag/BrazilFlag.vue +13 -0
  5. package/icons/flag/CanadaFlag.vue +6 -0
  6. package/icons/flag/ChinaFlag.vue +13 -0
  7. package/icons/flag/DenmarkFlag.vue +7 -0
  8. package/icons/flag/EuropeFlag.vue +30 -0
  9. package/icons/flag/HongkongFlag.vue +10 -0
  10. package/icons/flag/IndiaFlag.vue +27 -0
  11. package/icons/flag/IndonesiaFlag.vue +12 -0
  12. package/icons/flag/JapanFlag.vue +13 -0
  13. package/icons/flag/KoreaFlag.vue +26 -0
  14. package/icons/flag/MalaysiaFlag.vue +28 -0
  15. package/icons/flag/MexicoFlag.vue +15 -0
  16. package/icons/flag/NewZealandFlag.vue +45 -0
  17. package/icons/flag/NorwayFlag.vue +9 -0
  18. package/icons/flag/PhilippinesFlag.vue +8 -0
  19. package/icons/flag/PolandFlag.vue +12 -0
  20. package/icons/flag/README.md +100 -0
  21. package/icons/flag/RussiaFlag.vue +7 -0
  22. package/icons/flag/SingaporeFlag.vue +15 -0
  23. package/icons/flag/SouthAfricaFlag.vue +19 -0
  24. package/icons/flag/SwedenFlag.vue +6 -0
  25. package/icons/flag/SwitzerlandFlag.vue +11 -0
  26. package/icons/flag/ThailandFlag.vue +9 -0
  27. package/icons/flag/TurkeyFlag.vue +14 -0
  28. package/icons/flag/UkFlag.vue +9 -0
  29. package/icons/flag/UsaFlag.vue +11 -0
  30. package/icons/flag/VietnamFlag.vue +12 -0
  31. package/icons/flag/index.js +97 -0
  32. package/package.json +1 -1
  33. package/sohelp-country-select/README.md +140 -0
  34. package/sohelp-country-select/index.vue +146 -0
  35. package/sohelp-cry-input/README.md +191 -10
  36. package/sohelp-cry-input/index.vue +137 -47
  37. package/sohelp-grid/index.vue +121 -114
  38. package/sohelp-grid/js/DefaultGridOptions.js +1 -1
  39. package/sohelp-grid/js/useSohelpGridConfig.js +5 -5
  40. package/sohelp-import/index.vue +372 -365
  41. package/sohelp-table/index.vue +113 -115
  42. package/sohelp-vform-eleplus/render.es.js +0 -1
  43. package/sohelp-vxe-table/index.vue +20 -32
  44. package/sohelp-workflow-drawer/components/form.vue +1 -1
  45. package/sohelp-workflow-drawer/components/table.vue +0 -1
  46. package/sohelp-workflow-drawer/components/timeline.vue +2 -2
  47. package/sohelp-workflow-drawer/components/workflow.vue +28 -0
  48. package/sohelp-workflow-drawer/index.vue +189 -200
@@ -9,10 +9,11 @@
9
9
  :where="where"
10
10
  :show-overflow-tooltip="true"
11
11
  v-model:selections="selections"
12
- highlight-current-row>
12
+ highlight-current-row
13
+ >
13
14
  <slot>
14
15
  <template v-for="(slotProps, slotName) in $scopedSlots" :key="slotName">
15
- <slot :name="slotName" v-bind="slotProps"/>
16
+ <slot :name="slotName" v-bind="slotProps" />
16
17
  </template>
17
18
  </slot>
18
19
  <template #toolbar="{ row }">
@@ -25,127 +26,124 @@
25
26
  </ele-pro-table>
26
27
  </template>
27
28
  <script>
28
- import {reactive, ref} from 'vue';
29
- import {moduleCache} from '../cache/ModuleCache';
30
- import {EleMessage} from "@/components/ele-admin-plus/components";
29
+ import { reactive, ref } from 'vue';
30
+ import { moduleCache } from '../cache/ModuleCache';
31
+ import { EleMessage } from '@/components/ele-admin-plus/components';
31
32
 
32
-
33
- export default {
34
- name: "SohelpTable",
35
- props: {
36
- /**网格列表配置ID*/
37
- refid: {
38
- type: String,
39
- default: "",
40
- required: true
41
- },
42
- /**数据源URL**/
43
- url: {
44
- type: String,
45
- default: ""
33
+ export default {
34
+ name: 'SohelpTable',
35
+ props: {
36
+ /**网格列表配置ID*/
37
+ refid: {
38
+ type: String,
39
+ default: '',
40
+ required: true
41
+ },
42
+ /**数据源URL**/
43
+ url: {
44
+ type: String,
45
+ default: ''
46
+ },
47
+ /**数据源URL**/
48
+ where: {
49
+ type: Object,
50
+ default: {}
51
+ }
46
52
  },
47
- /**数据源URL**/
48
- where: {
49
- type: Object,
50
- default: {}
51
- }
52
- },
53
- setup(props, {emit}) {
54
- /**列表实例*/
55
- const sohelpTableRef = ref(null);
56
- /**存储表格配置*/
57
- const sohelpConfig = reactive({});
58
- /**在放选中数据列表**/
59
- const selections = ref([]);
60
- /**默认加载数据**/
61
- const loadOnCreated = ref(false);
53
+ setup(props, { emit }) {
54
+ /**列表实例*/
55
+ const sohelpTableRef = ref(null);
56
+ /**存储表格配置*/
57
+ const sohelpConfig = reactive({});
58
+ /**在放选中数据列表**/
59
+ const selections = ref([]);
60
+ /**默认加载数据**/
61
+ const loadOnCreated = ref(false);
62
62
 
63
- /**自定义列配置 **/
64
- const columns = reactive([{
65
- type: 'selection',
66
- columnKey: 'selection',
67
- width: 50,
68
- align: 'center',
69
- fixed: 'left'
70
- }, {
71
- type: 'index',
72
- columnKey: 'index',
73
- width: 50,
74
- align: 'center',
75
- fixed: 'left'
76
- }]);
63
+ /**自定义列配置 **/
64
+ const columns = reactive([
65
+ {
66
+ type: 'selection',
67
+ columnKey: 'selection',
68
+ width: 50,
69
+ align: 'center',
70
+ fixed: 'left'
71
+ },
72
+ {
73
+ type: 'index',
74
+ columnKey: 'index',
75
+ width: 50,
76
+ align: 'center',
77
+ fixed: 'left'
78
+ }
79
+ ]);
77
80
 
78
- /** 表格数据源 */
79
- const datasource = async ({page, limit, where, orders}) => {
80
- if (!loadOnCreated.value) {
81
- return {total: 0, results: []}
82
- }
83
- const res = await SohelpHttp.get(props.url || sohelpConfig.requestValue, {
84
- page,
85
- limit,
86
- ...where,
87
- ...props.where,
88
- orders
89
- }).catch(e => {
90
- EleMessage.error(e.message);
91
- });
92
- return res.data;
93
- };
81
+ /** 表格数据源 */
82
+ const datasource = async ({ page, limit, where, orders }) => {
83
+ if (!loadOnCreated.value) {
84
+ return { total: 0, results: [] };
85
+ }
86
+ const res = await SohelpHttp.get(props.url || sohelpConfig.requestValue, {
87
+ page,
88
+ limit,
89
+ ...where,
90
+ ...props.where,
91
+ orders
92
+ }).catch((e) => {
93
+ EleMessage.error(e.message);
94
+ });
95
+ return res.data;
96
+ };
94
97
 
95
- /**根据配置列转成ProTable格式的列*/
96
- const switchProperty = (property) => {
97
- return {
98
- prop: property.name,
99
- columnKey: property.name,
100
- label: property.label,
101
- width: property.width || 100
102
- }
103
- }
98
+ /**根据配置列转成ProTable格式的列*/
99
+ const switchProperty = (property) => {
100
+ return {
101
+ prop: property.name,
102
+ columnKey: property.name,
103
+ label: property.label,
104
+ width: property.width || 100
105
+ };
106
+ };
104
107
 
105
- /***初始化网格列表配置**/
106
- const initProTableConfiguration = (cfg) => {
107
- loadOnCreated.value = true;
108
- reload();
109
- }
110
- /**获取列表配置*/
111
- moduleCache.getGrid(props.refid).then(data => {
112
- Object.assign(sohelpConfig, {...data});
113
- //初始化属性列表配置
114
- data.properties.map(property => {
115
- columns.push(switchProperty(property));
116
- });
117
- /**添加操作列**/
118
- columns.push({
119
- columnKey: 'action',
120
- label: '操作',
121
- width: 200,
122
- align: 'center',
123
- slot: 'action'
108
+ /***初始化网格列表配置**/
109
+ const initProTableConfiguration = (cfg) => {
110
+ loadOnCreated.value = true;
111
+ reload();
112
+ };
113
+ /**获取列表配置*/
114
+ moduleCache.getGrid(props.refid).then((data) => {
115
+ Object.assign(sohelpConfig, { ...data });
116
+ //初始化属性列表配置
117
+ data.properties.map((property) => {
118
+ columns.push(switchProperty(property));
119
+ });
120
+ /**添加操作列**/
121
+ columns.push({
122
+ field: 'action',
123
+ label: '操作',
124
+ width: 200,
125
+ align: 'center',
126
+ slot: 'action'
127
+ });
128
+ //初始化表格配置
129
+ initProTableConfiguration();
124
130
  });
125
- //初始化表格配置
126
- initProTableConfiguration();
127
- });
128
131
 
132
+ const reload = (param) => {
133
+ sohelpTableRef.value?.reload?.(param);
134
+ };
135
+ const getData = () => {
136
+ return sohelpTableRef.value?.getData?.();
137
+ };
138
+ const getTableRef = () => {
139
+ return sohelpTableRef.value?.getTableRef?.();
140
+ };
129
141
 
130
- const reload = (param) => {
131
- sohelpTableRef.value?.reload?.(param);
132
- }
133
- const getData = () => {
134
- return sohelpTableRef.value?.getData?.();
135
- }
136
- const getTableRef = () => {
137
- return sohelpTableRef.value?.getTableRef?.();
142
+ // defineExpose({
143
+ // reload, getData,getTableRef,datasource
144
+ // })
145
+ return { columns, reload, getData, getTableRef, datasource, selections, sohelpTableRef, sohelpConfig };
138
146
  }
139
-
140
- // defineExpose({
141
- // reload, getData,getTableRef,datasource
142
- // })
143
- return {columns, reload, getData, getTableRef, datasource, selections, sohelpTableRef, sohelpConfig}
144
- }
145
-
146
- };
147
-
147
+ };
148
148
  </script>
149
- <style scoped>
150
-
151
- </style>
149
+ <style scoped></style>
@@ -63893,7 +63893,6 @@ const _sfc_main$C = {
63893
63893
  },
63894
63894
  methods: {
63895
63895
  toolbarClick(event) {
63896
- console.log("toolbarClick", event);
63897
63896
  this.$emit("toolbarButtonClick", event);
63898
63897
  },
63899
63898
  onCheckboxChange(event) {
@@ -18,12 +18,7 @@
18
18
  :edit-render="getEditor(item)"
19
19
  :key="item.name"
20
20
  ></vxe-column>
21
- <vxe-pager
22
- v-model:currentPage="page"
23
- v-model:pageSize="limit"
24
- :total="datasource.total"
25
- @page-change="reload"
26
- >
21
+ <vxe-pager v-model:currentPage="page" v-model:pageSize="limit" :total="datasource.total" @page-change="reload">
27
22
  </vxe-pager>
28
23
  </vxe-table>
29
24
  </template>
@@ -32,7 +27,7 @@
32
27
  import { EleMessage } from '@/components/ele-admin-plus/components';
33
28
  import { DragOutlined } from '../sohelp-icon-select/icons';
34
29
  import Sortable from 'sortablejs';
35
- import {moduleCache} from '../cache/ModuleCache';
30
+ import { moduleCache } from '../cache/ModuleCache';
36
31
 
37
32
  export default {
38
33
  name: 'SohelpVxeTable',
@@ -82,18 +77,18 @@
82
77
  header: property.label,
83
78
  width: property.with || 100,
84
79
  edit: property.edit,
85
- editor:property.editor
80
+ editor: property.editor
86
81
  };
87
82
  };
88
83
 
89
84
  /***初始化网格列表配置**/
90
85
  const initProTableConfiguration = () => {
91
- props.drag && rowDrop()
86
+ props.drag && rowDrop();
92
87
  };
93
88
 
94
89
  /**获取列表配置*/
95
90
  moduleCache.getGrid(props.refid).then((data) => {
96
- if(!data){
91
+ if (!data) {
97
92
  return;
98
93
  }
99
94
  Object.assign(sohelpConfig, { ...data });
@@ -103,7 +98,7 @@
103
98
  });
104
99
  /**添加操作列**/
105
100
  columns.push({
106
- columnKey: 'action',
101
+ field: 'action',
107
102
  label: '操作',
108
103
  width: 200,
109
104
  align: 'center',
@@ -120,39 +115,32 @@
120
115
  Object.assign(datasource, { total: 0, results: [] });
121
116
  return;
122
117
  }
123
- const res = await SohelpHttp.get(
124
- props.url || sohelpConfig.requestValue,
125
- {
126
- page,
127
- limit,
128
- ...props.where
129
- }
130
- ).catch((e) => {
118
+ const res = await SohelpHttp.get(props.url || sohelpConfig.requestValue, {
119
+ page,
120
+ limit,
121
+ ...props.where
122
+ }).catch((e) => {
131
123
  EleMessage.error(e.message);
132
124
  });
133
125
  Object.assign(datasource, { ...res.data });
134
126
  };
135
127
 
136
- const getEditor = (item) =>{
137
- if(item.edit){
138
- return {'name':'input'}
139
- }else{
128
+ const getEditor = (item) => {
129
+ if (item.edit) {
130
+ return { name: 'input' };
131
+ } else {
140
132
  return null;
141
133
  }
142
-
143
- }
134
+ };
144
135
 
145
136
  // 行拖拽
146
137
  const rowDrop = () => {
147
138
  nextTick(() => {
148
139
  const xGTable = sohelpVxeTableRef.value;
149
- sortable.value = Sortable.create(
150
- xGTable.$el.querySelector('.body--wrapper>.vxe-table--body tbody'),
151
- {
152
- handle: '.drag-btn',
153
- onEnd: ({ newIndex, oldIndex }) => {}
154
- }
155
- );
140
+ sortable.value = Sortable.create(xGTable.$el.querySelector('.body--wrapper>.vxe-table--body tbody'), {
141
+ handle: '.drag-btn',
142
+ onEnd: ({ newIndex, oldIndex }) => {}
143
+ });
156
144
  });
157
145
  };
158
146
 
@@ -26,7 +26,7 @@
26
26
  const formValue = ref(null);
27
27
  const entityFormRef = ref(null);
28
28
 
29
- const refid = ref(props.data.refid.split('!')[0]);
29
+ const refid = ref(props.data?.refid?.split('!')[0]);
30
30
 
31
31
  const load = async () => {
32
32
  const { id, refid } = props.data || {};
@@ -1,5 +1,4 @@
1
1
  <template>
2
- fff
3
2
  <sohelp-vxe-grid
4
3
  style="padding-top: 10px"
5
4
  url="/engine/web/workflow/getTasks"
@@ -25,8 +25,8 @@
25
25
 
26
26
  <ele-text style="margin-top: 5px">
27
27
  <div style="display: flex; gap: 5px; flex-wrap: wrap">
28
- <ele-text v-if="item.task_type == 1">办理人:</ele-text>
29
28
  <ele-text v-if="item.task_type == 0">申请人:</ele-text>
29
+ <ele-text v-if="item.task_type == 1">办理人:</ele-text>
30
30
  <ele-text v-if="item.task_type == 2" type="info">抄送人:</ele-text>
31
31
  <span v-for="row in item?.actorList" :key="row.actor_id">
32
32
  <vxe-tag status="primary">{{ row.actor_name }}</vxe-tag>
@@ -34,8 +34,8 @@
34
34
  </div>
35
35
  </ele-text>
36
36
  <div style="display: flex; gap: 5px; flex-wrap: wrap">
37
- <ele-text v-if="item.task_type === 1">办理意见:</ele-text>
38
37
  <ele-text v-if="item.task_type === 0">申请理由:</ele-text>
38
+ <ele-text v-if="item.task_type === 1">办理意见:</ele-text>
39
39
  <ele-text v-if="item.task_type !== 2">{{ getVariable(item)?.reason }}</ele-text>
40
40
  <ele-text v-if="item.type !== 'done'" type="info">指派人:</ele-text>
41
41
 
@@ -1,5 +1,10 @@
1
1
  <template>
2
2
  <div v-loading="loading" class="workflow-wrap">
3
+ <div class="tips">
4
+ <span class="tips-item done">已通过</span>
5
+ <span class="tips-item do">办理中</span>
6
+ <span class="tips-item undo">未处理</span>
7
+ </div>
3
8
  <draw-box class="workflow-scroll">
4
9
  <sohelp-workflow class="workflow" ref="workflowRef" v-model="workflow.nodeConfig" v-if="workflow?.nodeConfig" />
5
10
  </draw-box>
@@ -65,4 +70,27 @@
65
70
  align-items: center;
66
71
  margin: 0 20px 20px auto;
67
72
  }
73
+ .tips {
74
+ display: flex;
75
+ gap: 10px;
76
+ width: 100%;
77
+ align-items: center;
78
+ justify-content: center;
79
+ margin: 0 20px 20px auto;
80
+ .tips-item {
81
+ padding: 2px 10px;
82
+ height: 20px;
83
+ border-radius: 6px;
84
+ line-height: 20px;
85
+ }
86
+ .tips-item.done {
87
+ border: 3px solid #409eff;
88
+ }
89
+ .tips-item.do {
90
+ border: 3px dashed #e6a23c;
91
+ }
92
+ .tips-item.undo {
93
+ border: 3px solid #ccc;
94
+ }
95
+ }
68
96
  </style>