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