doway-coms 2.3.2 → 2.3.3

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 (82) hide show
  1. package/.browserslistrc +2 -2
  2. package/README.md +28 -28
  3. package/dist/css/chunk-vendors.7f83d8f9.css +8 -0
  4. package/dist/css/index.7946d50b.css +1 -0
  5. package/dist/favicon.ico +0 -0
  6. package/dist/js/chunk-vendors.28fda91d.js +340 -0
  7. package/dist/js/index.49bc6add.js +2 -0
  8. package/lib/doway-coms.common.js +120397 -0
  9. package/lib/doway-coms.css +1 -0
  10. package/lib/doway-coms.umd.js +120407 -0
  11. package/lib/doway-coms.umd.min.js +328 -0
  12. package/package.json +53 -53
  13. package/packages/AuditsList/index.js +7 -7
  14. package/packages/AuditsList/src/index.vue +266 -266
  15. package/packages/BaseButton/index.js +7 -7
  16. package/packages/BaseButton/src/index.vue +241 -241
  17. package/packages/BaseCheckbox/index.js +7 -7
  18. package/packages/BaseCheckbox/src/index.vue +134 -134
  19. package/packages/BaseDate/index.js +7 -7
  20. package/packages/BaseDate/src/index.vue +197 -197
  21. package/packages/BaseDateWeek/index.js +7 -7
  22. package/packages/BaseDateWeek/src/index.vue +163 -163
  23. package/packages/BaseDatetime/index.js +7 -7
  24. package/packages/BaseDatetime/src/index.vue +196 -196
  25. package/packages/BaseForm/index.js +7 -7
  26. package/packages/BaseForm/src/index.vue +730 -730
  27. package/packages/BaseGantt/index.js +9 -9
  28. package/packages/BaseGantt/src/index.vue +617 -617
  29. package/packages/BaseGrid/index.js +9 -9
  30. package/packages/BaseGrid/src/SeqSetting.vue +278 -278
  31. package/packages/BaseGrid/src/index.vue +3616 -3616
  32. package/packages/BaseGridAdjust/index.js +9 -9
  33. package/packages/BaseGridAdjust/src/index.vue +482 -482
  34. package/packages/BaseInput/index.js +7 -7
  35. package/packages/BaseInput/src/index.vue +164 -164
  36. package/packages/BaseIntervalInput/index.js +7 -7
  37. package/packages/BaseIntervalInput/src/index.vue +310 -310
  38. package/packages/BaseKanbanEmpty/index.js +7 -7
  39. package/packages/BaseKanbanEmpty/src/index.vue +176 -176
  40. package/packages/BaseNumberInput/index.js +7 -7
  41. package/packages/BaseNumberInput/src/index.vue +291 -291
  42. package/packages/BasePagination/index.js +7 -7
  43. package/packages/BasePagination/src/index.vue +91 -91
  44. package/packages/BasePictureCard/index.js +7 -7
  45. package/packages/BasePictureCard/src/index.vue +580 -580
  46. package/packages/BasePrintPreview/index.js +7 -7
  47. package/packages/BasePrintPreview/src/index.vue +129 -129
  48. package/packages/BasePulldown/index.js +7 -7
  49. package/packages/BasePulldown/src/index.vue +1321 -1282
  50. package/packages/BaseSearch/index.js +7 -7
  51. package/packages/BaseSearch/src/index.vue +935 -935
  52. package/packages/BaseSelect/index.js +7 -7
  53. package/packages/BaseSelect/src/index.vue +155 -155
  54. package/packages/BaseSelectMulti/index.js +7 -7
  55. package/packages/BaseSelectMulti/src/index.vue +148 -148
  56. package/packages/BaseTextArea/index.js +7 -7
  57. package/packages/BaseTextArea/src/index.vue +178 -178
  58. package/packages/BaseTime/index.js +7 -7
  59. package/packages/BaseTime/src/index.vue +166 -166
  60. package/packages/BaseTool/index.js +7 -7
  61. package/packages/BaseTool/src/index.vue +349 -349
  62. package/packages/BaseToolStatus/index.js +7 -7
  63. package/packages/BaseToolStatus/src/index.vue +388 -388
  64. package/packages/BaseTreeSelect/index.js +8 -8
  65. package/packages/BaseTreeSelect/src/index.vue +437 -437
  66. package/packages/LeaveAMessage/index.js +7 -7
  67. package/packages/LeaveAMessage/src/index.vue +601 -601
  68. package/packages/index.js +191 -191
  69. package/packages/styles/default.css +78 -78
  70. package/packages/styles/default.less +84 -84
  71. package/packages/utils/api.js +107 -107
  72. package/packages/utils/auth.js +38 -38
  73. package/packages/utils/common.js +610 -610
  74. package/packages/utils/dom.js +181 -181
  75. package/packages/utils/enum.js +86 -86
  76. package/packages/utils/filters.js +472 -472
  77. package/packages/utils/gridFormat.js +66 -66
  78. package/packages/utils/msg.js +84 -84
  79. package/packages/utils/patchFiles.js +44 -44
  80. package/packages/utils/request.js +178 -178
  81. package/packages/utils/store.js +305 -309
  82. package/vue.config.js +59 -59
@@ -1,310 +1,306 @@
1
-
2
- import {loadViewInfo,loadLangInfo} from './api'
3
- import XEUtils from 'xe-utils'
4
- import Vue from 'vue'
5
- import Vuex from 'vuex'
6
- import {stringUrlQuery} from './common'
7
- import { controlType } from './enum'
8
- Vue.use(Vuex)
9
-
10
- export default new Vuex.Store({
11
- state: {
12
- moduleLangUrl:'',
13
- umsUrl:'',
14
- baseUrl:'',
15
- msgUrl:'',
16
- wmsUrl:'',
17
- identityUrl:'',
18
- token: '',
19
- industryVersion:'',//行业版本
20
- custPriceNotTaxPrecision:0,
21
- custPricePrecision:0,
22
- supplyPriceNotTaxPrecision:0,
23
- supplyPricePrecision:0,
24
- isGenerateMatCode:'false',//是否生成物料编码
25
- webAppCode: '',
26
- moduleViewInfo: {},
27
- moduleLangInfo:{},
28
- controlSize: 'small',
29
- newId: 0,//明细新增id
30
- userId: '',
31
- userName: '',
32
- staffId: '',
33
- },
34
- mutations: {
35
- SET_TOKEN: (state, token) => {
36
- state.token = token
37
- },
38
- SET_USERID: (state, userId) => {
39
- state.userId = userId
40
- },
41
- SET_USERNAME: (state, userName) => {
42
- state.userName = userName
43
- },
44
- SET_STAFFID: (state, staffId) => {
45
- state.staffId = staffId
46
- },
47
- SET_INDUSTRY_VERSION:(state,industryVersion)=>{
48
- state.industryVersion = industryVersion
49
- },
50
- SET_IS_GENERATE_MAT_CODE:(state,isGenerateMatCode)=>{
51
- state.isGenerateMatCode = isGenerateMatCode
52
- },
53
- SET_WEB_APP_CODE: (state, webAppCode) => {
54
- state.webAppCode = webAppCode
55
- },
56
- SET_MODULE_LANG_INFO:(state,data)=>{
57
- state.moduleLangInfo[data.moduleCode] = data.info
58
- },
59
- SET_MODULE_VIEW_INFO: (state, data) => {
60
- let tempDataInfo = {}
61
- XEUtils.arrayEach(data.info.datas,loopData=>{
62
- let tempFields = []
63
- let tempPagerButtons = []
64
- tempDataInfo[loopData.code] = {code:'',name:'',fields:[]}
65
- tempDataInfo[loopData.code].code = loopData.code
66
- tempDataInfo[loopData.code].name = loopData.name
67
- tempDataInfo[loopData.code].extraInfo = loopData.extraInfo
68
- let operationFields = []
69
- XEUtils.arrayEach(loopData.fields,loopField=>{
70
- let tempField = {
71
- field: loopField.boundField,
72
- title: loopField.name,
73
- width: loopField.width,
74
- visible: !loopField.hidden,
75
- filters: loopField.isFilter,
76
- sortable: loopField.isSortable,
77
- controlType: loopField.controlType,
78
- edit:loopField.edit,
79
- sysVisible:!loopField.sysHidden
80
- }
81
- if(tempField.sysVisible===false){
82
- tempField.visible = false
83
- }
84
- //页面状态控制
85
- if(loopField.editStates){
86
- tempField['editStates'] = loopField.editStates.split(',')
87
- tempField['visibleStates'] = loopField.editStates.split(',')
88
- }
89
- //单据状态控制
90
- if(loopField.editStatuss){
91
- tempField['editStatuss'] = loopField.editStatuss.split(',')
92
- tempField['visibleStatuss'] = loopField.editStatuss.split(',')
93
- }
94
- let extraInfo = loopField.extraInfo
95
- ? JSON.parse(loopField.extraInfo)
96
- : {}
97
- let userExtraInfo = loopField.userExtraInfo
98
- ? JSON.parse(loopField.userExtraInfo)
99
- : {}
100
- extraInfo = {...extraInfo, ...userExtraInfo}
101
- //存在额外参数,就赋值
102
- if (Object.keys(extraInfo).length) {
103
- if (Object.hasOwn(extraInfo,'api')){
104
- extraInfo['api'] = state[extraInfo['url']] + extraInfo['api']
105
- }
106
- tempField = XEUtils.assign(extraInfo, tempField)
107
- }
108
- if (tempField.controlType === controlType.select) {
109
- tempField['dataSource'] = XEUtils.filter(
110
- data.info.dictItems,
111
- p => p.dictCode === extraInfo.dataSource
112
- )
113
- }
114
-
115
- if(tempField.controlType === controlType.pager_button){
116
- tempPagerButtons.push(tempField)
117
- }else if(tempField.controlType===controlType.operation){
118
- //操作按钮列
119
- operationFields.push(tempField)
120
-
121
- }
122
- else{
123
- tempFields.push(tempField)
124
- }
125
- })
126
-
127
- tempDataInfo[loopData.code]['pagerButtons'] = tempPagerButtons
128
- if(operationFields.length>0){
129
- //添加右侧按钮操作列
130
- tempFields.push({
131
- field: controlType.operation,
132
- title: '操作',
133
- width: operationFields[0].width || 100,
134
- fixed: 'right',
135
- showOverflow: true,
136
- controlType: controlType.operation,
137
- params:{
138
- columns:operationFields
139
- }
140
- })
141
- }
142
- tempDataInfo[loopData.code]['fields'] = tempFields
143
-
144
- })
145
- data.info['dataInfo'] = tempDataInfo
146
- state.moduleViewInfo[data.moduleCode] = data.info
147
- },
148
- SET_NEW_ID: (state, id) => {
149
- state.newId = id
150
- },
151
- SET_UMS_URL:(state,url) => {
152
- state.umsUrl = url
153
- },
154
- SET_MODULE_LANG_URL:(state,url) => {
155
- state.moduleLangUrl = url
156
- },
157
- SET_BASE_URL:(state,url) => {
158
- state.baseUrl = url
159
- },
160
- SET_WMS_URL:(state,url) => {
161
- state.wmsUrl = url
162
- },
163
- SET_CUST_PRICE_NOT_TAX_PRECISION:(state,custPriceNotTaxPrecision)=>{
164
- state.custPriceNotTaxPrecision = custPriceNotTaxPrecision
165
- },
166
- SET_CUST_PRICE_PRECISION:(state,custPricePrecision)=>{
167
- state.custPricePrecision = custPricePrecision
168
- },
169
- SET_SUPPLY_PRICE_NOT_TAX_PRECISION:(state,supplyPriceNotTaxPrecision)=>{
170
- state.supplyPriceNotTaxPrecision = supplyPriceNotTaxPrecision
171
- },
172
- SET_SUPPLY_PRICE_PRECISION:(state,supplyPricePrecision)=>{
173
- state.supplyPricePrecision = supplyPricePrecision
174
- },
175
- SET_MSG_URL:(state,url) => {
176
- state.msgUrl = url
177
- },
178
- SET_IDENTITY_URL:(state,url) => {
179
- state.identityUrl = url
180
- },
181
- SET_BASE_SETTING:(state,baseSetting) => {
182
- state.baseSetting = baseSetting
183
- },
184
- },
185
- actions: {
186
- /**
187
- * 系统登出
188
- * @param {} param0
189
- */
190
- logOut({commit}){
191
- // alert('会话过期3');
192
- if(window.$wujie){
193
- // alert('会话过期4');
194
- //通知主应用会员过期重新登陆
195
- window.$wujie.bus.$emit(
196
- 'subAppLoginOut',window.$wujie.props.webAppCode
197
- )
198
- }
199
- },
200
- setTabTitle({ commit }, tabInfo) {
201
- if (tabInfo.replaceQuery) {
202
- let newRoutePath =
203
- tabInfo.path + '?' + stringUrlQuery(tabInfo.replaceQuery)
204
- history.replaceState(null,null,(window.$wujie.props.webAppActiveRule + newRoutePath))
205
- }
206
- //通知父应用修改Tab标签文字描述
207
- if(window.$wujie){
208
- window.$wujie.bus.$emit('subAppSetTabTitle', {
209
- title: tabInfo.title,
210
- name: tabInfo.name,
211
- query: tabInfo.query,
212
- replaceQuery: tabInfo.replaceQuery,
213
- path: tabInfo.path
214
- })
215
- }
216
- },
217
- closeTab({ commit }, fullPath) {
218
- if(window.$wujie){
219
- window.$wujie.bus.$emit(
220
- 'subAppCloseTab',
221
- window.$wujie.props.webAppActiveRule + fullPath
222
- )
223
- }
224
- },
225
- moduleLoadViewInfo({ commit, state }, dataInfo) {
226
- let vm = this
227
- return new Promise((resolve, reject) => {
228
- loadViewInfo(dataInfo.moduleCode)
229
- .then(reponseData => {
230
- commit('SET_MODULE_VIEW_INFO', {
231
- moduleCode: dataInfo.moduleCode,
232
- info: reponseData.content
233
- })
234
- loadLangInfo(dataInfo.moduleCode,reponseData.content.moduleLangCacheHash)
235
- .then(langData=>{
236
- commit('SET_MODULE_LANG_INFO', {
237
- moduleCode: dataInfo.moduleCode,
238
- info: langData.data
239
- })
240
- resolve()
241
- }).catch(()=>{
242
- resolve()
243
- })
244
- })
245
- .catch(error => {
246
- reject(error)
247
- })
248
- })
249
- },
250
- // moduleLoadLangInfo({ commit, state }, dataInfo) {
251
- // let vm = this
252
- // return new Promise((resolve, reject) => {
253
- // loadLangInfo(dataInfo.moduleCode)
254
- // .then(reponseData => {
255
- // commit('SET_MODULE_LANG_INFO', {
256
- // moduleCode: dataInfo.moduleCode,
257
- // info: reponseData.data
258
- // })
259
- // resolve()
260
- // })
261
- // .catch(error => {
262
- // console.debug(error)
263
- // resolve()
264
- // })
265
- // })
266
- // },
267
- // 固定返回工作台,并根据条件决定是否关闭其余标签
268
- goWorkbench({ commit }, tabsAllClose) {
269
- if(window.$wujie){
270
- window.$wujie.bus.$emit('subAppGoWorkbench', tabsAllClose==false?false:true)
271
- }
272
- },
273
- // 替换页面
274
- replaceTab({ commit }, fullPath) {
275
- if(window.$wujie){
276
- window.$wujie.bus.$emit(
277
- 'subAppReplaceTab',
278
- window.$wujie.props.webAppActiveRule + fullPath
279
- )
280
- }
281
- },
282
- },
283
- modules:{},
284
- getters: {
285
- custPriceNotTaxPrecision:state=>state.custPriceNotTaxPrecision,
286
- custPricePrecision:state=>state.custPricePrecision,
287
- supplyPriceNotTaxPrecision:state=>state.supplyPriceNotTaxPrecision,
288
- supplyPricePrecision:state=>state.supplyPricePrecision,
289
- industryVersion:state=>state.industryVersion,
290
- isGenerateMatCode:state=>state.isGenerateMatCode,
291
- umsUrl:state=>state.umsUrl,
292
- moduleLangUrl:state=>state.moduleLangUrl,
293
- baseUrl:state=>state.baseUrl,
294
- msgUrl:state=>state.msgUrl,
295
- identityUrl:state=>state.identityUrl,
296
- token: state => state.token,
297
- webAppCode: state => state.webAppCode,
298
- moduleViewInfo: state => state.moduleViewInfo,
299
- moduleLangInfo: state => state.moduleLangInfo,
300
- controlSize: state => state.controlSize,
301
- newId: state => () => {
302
- state.newId = state.newId + 1
303
- return state.newId
304
- },
305
- userId: state => state.userId,
306
- userName: state => state.userName,
307
- staffId: state => state.staffId,
308
- baseSetting: state => state.baseSetting,
309
- }
1
+
2
+ import {loadViewInfo,loadLangInfo} from './api'
3
+ import XEUtils from 'xe-utils'
4
+ import Vue from 'vue'
5
+ import Vuex from 'vuex'
6
+ import {stringUrlQuery} from './common'
7
+ import { controlType } from './enum'
8
+ Vue.use(Vuex)
9
+
10
+ export default new Vuex.Store({
11
+ state: {
12
+ moduleLangUrl:'',
13
+ umsUrl:'',
14
+ baseUrl:'',
15
+ msgUrl:'',
16
+ wmsUrl:'',
17
+ identityUrl:'',
18
+ token: '',
19
+ industryVersion:'',//行业版本
20
+ custPriceNotTaxPrecision:0,
21
+ custPricePrecision:0,
22
+ supplyPriceNotTaxPrecision:0,
23
+ supplyPricePrecision:0,
24
+ isGenerateMatCode:'false',//是否生成物料编码
25
+ webAppCode: '',
26
+ moduleViewInfo: {},
27
+ moduleLangInfo:{},
28
+ controlSize: 'small',
29
+ newId: 0,//明细新增id
30
+ userId: '',
31
+ userName: '',
32
+ staffId: '',
33
+ },
34
+ mutations: {
35
+ SET_TOKEN: (state, token) => {
36
+ state.token = token
37
+ },
38
+ SET_USERID: (state, userId) => {
39
+ state.userId = userId
40
+ },
41
+ SET_USERNAME: (state, userName) => {
42
+ state.userName = userName
43
+ },
44
+ SET_STAFFID: (state, staffId) => {
45
+ state.staffId = staffId
46
+ },
47
+ SET_INDUSTRY_VERSION:(state,industryVersion)=>{
48
+ state.industryVersion = industryVersion
49
+ },
50
+ SET_IS_GENERATE_MAT_CODE:(state,isGenerateMatCode)=>{
51
+ state.isGenerateMatCode = isGenerateMatCode
52
+ },
53
+ SET_WEB_APP_CODE: (state, webAppCode) => {
54
+ state.webAppCode = webAppCode
55
+ },
56
+ SET_MODULE_LANG_INFO:(state,data)=>{
57
+ state.moduleLangInfo[data.moduleCode] = data.info
58
+ },
59
+ SET_MODULE_VIEW_INFO: (state, data) => {
60
+ let tempDataInfo = {}
61
+ XEUtils.arrayEach(data.info.datas,loopData=>{
62
+ let tempFields = []
63
+ let tempPagerButtons = []
64
+ tempDataInfo[loopData.code] = {code:'',name:'',fields:[]}
65
+ tempDataInfo[loopData.code].code = loopData.code
66
+ tempDataInfo[loopData.code].name = loopData.name
67
+ tempDataInfo[loopData.code].extraInfo = loopData.extraInfo
68
+ let operationFields = []
69
+ XEUtils.arrayEach(loopData.fields,loopField=>{
70
+ let tempField = {
71
+ field: loopField.boundField,
72
+ title: loopField.name,
73
+ width: loopField.width,
74
+ visible: !loopField.hidden,
75
+ filters: loopField.isFilter,
76
+ sortable: loopField.isSortable,
77
+ controlType: loopField.controlType,
78
+ edit:loopField.edit,
79
+ sysVisible:!loopField.sysHidden
80
+ }
81
+ if(tempField.sysVisible===false){
82
+ tempField.visible = false
83
+ }
84
+ //页面状态控制
85
+ if(loopField.editStates){
86
+ tempField['editStates'] = loopField.editStates.split(',')
87
+ tempField['visibleStates'] = loopField.editStates.split(',')
88
+ }
89
+ //单据状态控制
90
+ if(loopField.editStatuss){
91
+ tempField['editStatuss'] = loopField.editStatuss.split(',')
92
+ tempField['visibleStatuss'] = loopField.editStatuss.split(',')
93
+ }
94
+ let extraInfo = loopField.extraInfo
95
+ ? JSON.parse(loopField.extraInfo)
96
+ : {}
97
+ let userExtraInfo = loopField.userExtraInfo
98
+ ? JSON.parse(loopField.userExtraInfo)
99
+ : {}
100
+ extraInfo = {...extraInfo, ...userExtraInfo}
101
+ //存在额外参数,就赋值
102
+ if (Object.keys(extraInfo).length) {
103
+ if (Object.hasOwn(extraInfo,'api')){
104
+ extraInfo['api'] = state[extraInfo['url']] + extraInfo['api']
105
+ }
106
+ tempField = XEUtils.assign(extraInfo, tempField)
107
+ }
108
+ if (tempField.controlType === controlType.select) {
109
+ tempField['dataSource'] = XEUtils.filter(
110
+ data.info.dictItems,
111
+ p => p.dictCode === extraInfo.dataSource
112
+ )
113
+ }
114
+
115
+ if(tempField.controlType === controlType.pager_button){
116
+ tempPagerButtons.push(tempField)
117
+ }else if(tempField.controlType===controlType.operation){
118
+ //操作按钮列
119
+ operationFields.push(tempField)
120
+
121
+ }
122
+ else{
123
+ tempFields.push(tempField)
124
+ }
125
+ })
126
+
127
+ tempDataInfo[loopData.code]['pagerButtons'] = tempPagerButtons
128
+ if(operationFields.length>0){
129
+ //添加右侧按钮操作列
130
+ tempFields.push({
131
+ field: controlType.operation,
132
+ title: '操作',
133
+ width: operationFields[0].width || 100,
134
+ fixed: 'right',
135
+ showOverflow: true,
136
+ controlType: controlType.operation,
137
+ params:{
138
+ columns:operationFields
139
+ }
140
+ })
141
+ }
142
+ tempDataInfo[loopData.code]['fields'] = tempFields
143
+
144
+ })
145
+ data.info['dataInfo'] = tempDataInfo
146
+ state.moduleViewInfo[data.moduleCode] = data.info
147
+ },
148
+ SET_NEW_ID: (state, id) => {
149
+ state.newId = id
150
+ },
151
+ SET_UMS_URL:(state,url) => {
152
+ state.umsUrl = url
153
+ },
154
+ SET_MODULE_LANG_URL:(state,url) => {
155
+ state.moduleLangUrl = url
156
+ },
157
+ SET_BASE_URL:(state,url) => {
158
+ state.baseUrl = url
159
+ },
160
+ SET_WMS_URL:(state,url) => {
161
+ state.wmsUrl = url
162
+ },
163
+ SET_CUST_PRICE_NOT_TAX_PRECISION:(state,custPriceNotTaxPrecision)=>{
164
+ state.custPriceNotTaxPrecision = custPriceNotTaxPrecision
165
+ },
166
+ SET_CUST_PRICE_PRECISION:(state,custPricePrecision)=>{
167
+ state.custPricePrecision = custPricePrecision
168
+ },
169
+ SET_SUPPLY_PRICE_NOT_TAX_PRECISION:(state,supplyPriceNotTaxPrecision)=>{
170
+ state.supplyPriceNotTaxPrecision = supplyPriceNotTaxPrecision
171
+ },
172
+ SET_SUPPLY_PRICE_PRECISION:(state,supplyPricePrecision)=>{
173
+ state.supplyPricePrecision = supplyPricePrecision
174
+ },
175
+ SET_MSG_URL:(state,url) => {
176
+ state.msgUrl = url
177
+ },
178
+ SET_IDENTITY_URL:(state,url) => {
179
+ state.identityUrl = url
180
+ },
181
+ },
182
+ actions: {
183
+ /**
184
+ * 系统登出
185
+ * @param {} param0
186
+ */
187
+ logOut({commit}){
188
+ // alert('会话过期3');
189
+ if(window.$wujie){
190
+ // alert('会话过期4');
191
+ //通知主应用会员过期重新登陆
192
+ window.$wujie.bus.$emit(
193
+ 'subAppLoginOut',window.$wujie.props.webAppCode
194
+ )
195
+ }
196
+ },
197
+ setTabTitle({ commit }, tabInfo) {
198
+ if (tabInfo.replaceQuery) {
199
+ let newRoutePath =
200
+ tabInfo.path + '?' + stringUrlQuery(tabInfo.replaceQuery)
201
+ history.replaceState(null,null,(window.$wujie.props.webAppActiveRule + newRoutePath))
202
+ }
203
+ //通知父应用修改Tab标签文字描述
204
+ if(window.$wujie){
205
+ window.$wujie.bus.$emit('subAppSetTabTitle', {
206
+ title: tabInfo.title,
207
+ name: tabInfo.name,
208
+ query: tabInfo.query,
209
+ replaceQuery: tabInfo.replaceQuery,
210
+ path: tabInfo.path
211
+ })
212
+ }
213
+ },
214
+ closeTab({ commit }, fullPath) {
215
+ if(window.$wujie){
216
+ window.$wujie.bus.$emit(
217
+ 'subAppCloseTab',
218
+ window.$wujie.props.webAppActiveRule + fullPath
219
+ )
220
+ }
221
+ },
222
+ moduleLoadViewInfo({ commit, state }, dataInfo) {
223
+ let vm = this
224
+ return new Promise((resolve, reject) => {
225
+ loadViewInfo(dataInfo.moduleCode)
226
+ .then(reponseData => {
227
+ commit('SET_MODULE_VIEW_INFO', {
228
+ moduleCode: dataInfo.moduleCode,
229
+ info: reponseData.content
230
+ })
231
+ loadLangInfo(dataInfo.moduleCode,reponseData.content.moduleLangCacheHash)
232
+ .then(langData=>{
233
+ commit('SET_MODULE_LANG_INFO', {
234
+ moduleCode: dataInfo.moduleCode,
235
+ info: langData.data
236
+ })
237
+ resolve()
238
+ }).catch(()=>{
239
+ resolve()
240
+ })
241
+ })
242
+ .catch(error => {
243
+ reject(error)
244
+ })
245
+ })
246
+ },
247
+ // moduleLoadLangInfo({ commit, state }, dataInfo) {
248
+ // let vm = this
249
+ // return new Promise((resolve, reject) => {
250
+ // loadLangInfo(dataInfo.moduleCode)
251
+ // .then(reponseData => {
252
+ // commit('SET_MODULE_LANG_INFO', {
253
+ // moduleCode: dataInfo.moduleCode,
254
+ // info: reponseData.data
255
+ // })
256
+ // resolve()
257
+ // })
258
+ // .catch(error => {
259
+ // console.debug(error)
260
+ // resolve()
261
+ // })
262
+ // })
263
+ // },
264
+ // 固定返回工作台,并根据条件决定是否关闭其余标签
265
+ goWorkbench({ commit }, tabsAllClose) {
266
+ if(window.$wujie){
267
+ window.$wujie.bus.$emit('subAppGoWorkbench', tabsAllClose==false?false:true)
268
+ }
269
+ },
270
+ // 替换页面
271
+ replaceTab({ commit }, fullPath) {
272
+ if(window.$wujie){
273
+ window.$wujie.bus.$emit(
274
+ 'subAppReplaceTab',
275
+ window.$wujie.props.webAppActiveRule + fullPath
276
+ )
277
+ }
278
+ },
279
+ },
280
+ modules:{},
281
+ getters: {
282
+ custPriceNotTaxPrecision:state=>state.custPriceNotTaxPrecision,
283
+ custPricePrecision:state=>state.custPricePrecision,
284
+ supplyPriceNotTaxPrecision:state=>state.supplyPriceNotTaxPrecision,
285
+ supplyPricePrecision:state=>state.supplyPricePrecision,
286
+ industryVersion:state=>state.industryVersion,
287
+ isGenerateMatCode:state=>state.isGenerateMatCode,
288
+ umsUrl:state=>state.umsUrl,
289
+ moduleLangUrl:state=>state.moduleLangUrl,
290
+ baseUrl:state=>state.baseUrl,
291
+ msgUrl:state=>state.msgUrl,
292
+ identityUrl:state=>state.identityUrl,
293
+ token: state => state.token,
294
+ webAppCode: state => state.webAppCode,
295
+ moduleViewInfo: state => state.moduleViewInfo,
296
+ moduleLangInfo: state => state.moduleLangInfo,
297
+ controlSize: state => state.controlSize,
298
+ newId: state => () => {
299
+ state.newId = state.newId + 1
300
+ return state.newId
301
+ },
302
+ userId: state => state.userId,
303
+ userName: state => state.userName,
304
+ staffId: state => state.staffId,
305
+ }
310
306
  })