doway-coms 2.0.0 → 2.0.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -1,5 +1,6 @@
1
1
  import request from './request'
2
2
  import store from './store'
3
+ import axios from 'axios'
3
4
  export function loadViewInfo(moduleCode) {
4
5
  return request({
5
6
  url: store.getters.umsUrl + '/v1/module/loadViewInfo',
@@ -10,10 +11,7 @@ export function loadViewInfo(moduleCode) {
10
11
  })
11
12
  }
12
13
  export function loadLangInfo(moduleCode,moduleLangCacheHash) {
13
- return request({
14
- url: store.getters.moduleLangUrl + '/'+ moduleCode+'_zh_cn.json?cacheHash='+moduleLangCacheHash,
15
- method: 'get'
16
- })
14
+ return axios.get(store.getters.moduleLangUrl + '/'+ moduleCode+'_zh_cn.json?cacheHash='+moduleLangCacheHash)
17
15
  }
18
16
 
19
17
  export function saveUserModuleDataFieldApi(data) {
@@ -24,6 +24,7 @@ export default new Vuex.Store({
24
24
  isGenerateMatCode:'false',//是否生成物料编码
25
25
  webAppCode: '',
26
26
  moduleViewInfo: {},
27
+ moduleLangInfo:{},
27
28
  controlSize: 'small',
28
29
  newId: 0,//明细新增id
29
30
  userId: '',
@@ -52,6 +53,9 @@ export default new Vuex.Store({
52
53
  SET_WEB_APP_CODE: (state, webAppCode) => {
53
54
  state.webAppCode = webAppCode
54
55
  },
56
+ SET_MODULE_LANG_INFO:(state,data)=>{
57
+ state.moduleLangInfo[data.moduleCode] = data.info
58
+ },
55
59
  SET_MODULE_VIEW_INFO: (state, data) => {
56
60
  let tempDataInfo = {}
57
61
  XEUtils.arrayEach(data.info.datas,loopData=>{
@@ -235,7 +239,7 @@ export default new Vuex.Store({
235
239
  .then(reponseData => {
236
240
  commit('SET_MODULE_LANG_INFO', {
237
241
  moduleCode: dataInfo.moduleCode,
238
- info: reponseData.content
242
+ info: reponseData.data
239
243
  })
240
244
  resolve()
241
245
  })
@@ -277,6 +281,7 @@ export default new Vuex.Store({
277
281
  token: state => state.token,
278
282
  webAppCode: state => state.webAppCode,
279
283
  moduleViewInfo: state => state.moduleViewInfo,
284
+ moduleLangInfo: state => state.moduleLangInfo,
280
285
  controlSize: state => state.controlSize,
281
286
  newId: state => () => {
282
287
  state.newId = state.newId + 1