doway-coms 1.1.52 → 1.1.55

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 (52) hide show
  1. package/lib/doway-coms.common.js +1506 -53
  2. package/lib/doway-coms.umd.js +1506 -53
  3. package/node_modules/vxe-table/package.json +1 -1
  4. package/package.json +13 -4
  5. package/packages/BaseCheckbox/index.js +8 -0
  6. package/packages/BaseCheckbox/src/index.vue +123 -0
  7. package/packages/BaseDate/index.js +8 -0
  8. package/packages/BaseDate/src/index.vue +145 -0
  9. package/packages/BaseDateWeek/index.js +8 -0
  10. package/packages/BaseDateWeek/src/index.vue +115 -0
  11. package/packages/BaseDatetime/index.js +8 -0
  12. package/packages/BaseDatetime/src/index.vue +143 -0
  13. package/packages/BaseForm/index.js +8 -0
  14. package/packages/BaseForm/src/index.vue +631 -0
  15. package/packages/BaseGrid/index.js +10 -0
  16. package/packages/BaseGrid/src/index.vue +2375 -0
  17. package/packages/BaseInput/index.js +8 -0
  18. package/packages/BaseInput/src/index.vue +122 -0
  19. package/packages/BaseIntervalInput/index.js +8 -0
  20. package/packages/BaseIntervalInput/src/index.vue +275 -0
  21. package/packages/BaseNumberInput/index.js +8 -0
  22. package/packages/BaseNumberInput/src/index.vue +216 -0
  23. package/packages/BasePagination/index.js +8 -0
  24. package/packages/BasePagination/src/index.vue +74 -0
  25. package/packages/BasePictureCard/index.js +8 -0
  26. package/packages/BasePictureCard/src/index.vue +580 -0
  27. package/packages/BasePulldown/index.js +8 -0
  28. package/packages/BasePulldown/src/index.vue +817 -0
  29. package/packages/BaseSelect/index.js +8 -0
  30. package/packages/BaseSelect/src/index.vue +141 -0
  31. package/packages/BaseSelectMulti/index.js +8 -0
  32. package/packages/BaseSelectMulti/src/index.vue +135 -0
  33. package/packages/BaseTextArea/index.js +8 -0
  34. package/packages/BaseTextArea/src/index.vue +138 -0
  35. package/packages/BaseTime/index.js +8 -0
  36. package/packages/BaseTime/src/index.vue +117 -0
  37. package/packages/BaseTool/index.js +8 -0
  38. package/packages/BaseTool/src/index.vue +350 -0
  39. package/packages/BaseToolStatus/index.js +8 -0
  40. package/packages/BaseToolStatus/src/index.vue +384 -0
  41. package/packages/index.js +138 -0
  42. package/packages/styles/default.less +79 -0
  43. package/packages/utils/api.js +35 -0
  44. package/packages/utils/auth.js +38 -0
  45. package/packages/utils/common.js +259 -0
  46. package/packages/utils/dom.js +181 -0
  47. package/packages/utils/enum.js +81 -0
  48. package/packages/utils/filters.js +459 -0
  49. package/packages/utils/msg.js +17 -0
  50. package/packages/utils/patchFiles.js +45 -0
  51. package/packages/utils/request.js +80 -0
  52. package/packages/utils/store.js +117 -0
@@ -0,0 +1,117 @@
1
+
2
+ import {loadViewInfo} from './api'
3
+ import XEUtils from 'xe-utils'
4
+ import Vue from 'vue'
5
+ import Vuex from 'vuex'
6
+ import {stringUrlQuery} from './common'
7
+ Vue.use(Vuex)
8
+
9
+ export default new Vuex.Store({
10
+ state: {
11
+ umsUrl:'',
12
+ msgUrl:'',
13
+ token: '',
14
+ industryVersion:'',//行业版本
15
+ webAppCode: '',
16
+ moduleViewInfo: {},
17
+ controlSize: 'small',
18
+ newId: 0,//明细新增id
19
+ },
20
+ mutations: {
21
+ SET_TOKEN: (state, token) => {
22
+ state.token = token
23
+ },
24
+ SET_INDUSTRY_VERSION:(state,industryVersion)=>{
25
+ state.industryVersion = industryVersion
26
+ },
27
+ SET_WEB_APP_CODE: (state, webAppCode) => {
28
+ state.webAppCode = webAppCode
29
+ },
30
+ SET_MODULE_VIEW_INFO: (state, data) => {
31
+ state.moduleViewInfo[data.moduleCode] = data.info
32
+ },
33
+ SET_NEW_ID: (state, id) => {
34
+ state.newId = id
35
+ },
36
+ SET_UMS_URL:(state,url) => {
37
+ state.umsUrl = url
38
+ },
39
+ SET_MSG_URL:(state,url) => {
40
+ state.msgUrl = url
41
+ }
42
+ },
43
+ actions: {
44
+ setTabTitle({ commit }, tabInfo) {
45
+ if (tabInfo.replaceQuery) {
46
+ let newRoutePath =
47
+ tabInfo.path + '?' + stringUrlQuery(tabInfo.replaceQuery)
48
+ history.replaceState(null,null,(window.$wujie.props.webAppActiveRule + newRoutePath))
49
+ let keepAliveComp =
50
+ tabInfo.rootComp.$children[0].$refs.routerView.$vnode.parent
51
+ .componentInstance
52
+
53
+ for (let cacheKey in keepAliveComp.cache) {
54
+ if (
55
+ keepAliveComp.cache[cacheKey].componentInstance._uid ===
56
+ tabInfo.compUid
57
+ ) {
58
+ keepAliveComp.cache[newRoutePath] = keepAliveComp.cache[cacheKey]
59
+ keepAliveComp.keyToCache = newRoutePath
60
+ XEUtils.remove(keepAliveComp.keys, loopKey => loopKey === cacheKey)
61
+ delete keepAliveComp.cache[cacheKey]
62
+ keepAliveComp.keys.push(newRoutePath)
63
+ break
64
+ }
65
+ }
66
+ }
67
+ //通知父应用修改Tab标签文字描述
68
+ if(window.$wujie){
69
+ window.$wujie.bus.$emit('subAppSetTabTitle', {
70
+ title: tabInfo.title,
71
+ name: tabInfo.name,
72
+ query: tabInfo.query,
73
+ replaceQuery: tabInfo.replaceQuery,
74
+ path: tabInfo.path
75
+ })
76
+ }
77
+ },
78
+ closeTab({ commit }, fullPath) {
79
+ if(window.$wujie){
80
+ window.$wujie.bus.$emit(
81
+ 'subAppCloseTab',
82
+ window.$wujie.props.webAppActiveRule + fullPath
83
+ )
84
+ }
85
+ },
86
+ moduleLoadViewInfo({ commit, state }, dataInfo) {
87
+ let vm = this
88
+ return new Promise((resolve, reject) => {
89
+ loadViewInfo(dataInfo.moduleCode)
90
+ .then(reponseData => {
91
+ commit('SET_MODULE_VIEW_INFO', {
92
+ moduleCode: dataInfo.moduleCode,
93
+ info: reponseData.content
94
+ })
95
+ resolve()
96
+ })
97
+ .catch(error => {
98
+ reject(error)
99
+ })
100
+ })
101
+ }
102
+ },
103
+ modules:{},
104
+ getters: {
105
+ industryVersion:state=>state.industryVersion,
106
+ umsUrl:state=>state.umsUrl,
107
+ msgUrl:state=>state.msgUrl,
108
+ token: state => state.token,
109
+ webAppCode: state => state.webAppCode,
110
+ moduleViewInfo: state => state.moduleViewInfo,
111
+ controlSize: state => state.controlSize,
112
+ newId: state => () => {
113
+ state.newId = state.newId + 1
114
+ return state.newId
115
+ }
116
+ }
117
+ })