doway-coms 1.9.8 → 2.0.0
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/dist/css/chunk-vendors.7f83d8f9.css +8 -0
- package/dist/css/index.7946d50b.css +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/js/chunk-vendors.28fda91d.js +340 -0
- package/dist/js/index.49bc6add.js +2 -0
- package/lib/doway-coms.common.js +120397 -0
- package/lib/doway-coms.css +1 -0
- package/lib/doway-coms.umd.js +120407 -0
- package/lib/doway-coms.umd.min.js +328 -0
- package/package.json +1 -1
- package/packages/BaseTreeSelect/src/index.vue +6 -1
- package/packages/utils/api.js +6 -0
- package/packages/utils/common.js +11 -5
- package/packages/utils/store.js +23 -1
package/package.json
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
:replaceFields="replaceFields"
|
|
35
35
|
:dropdownMatchSelectWidth="dropdownMatchSelectWidth"
|
|
36
36
|
:treeDefaultExpandAll="treeDefaultExpandAll"
|
|
37
|
+
:treeDefaultExpandedKeys="treeDefaultExpandedKeys"
|
|
37
38
|
@change="changeData"
|
|
38
39
|
:size="size"
|
|
39
40
|
:allowClear="allowClear"
|
|
@@ -255,10 +256,11 @@ export default {
|
|
|
255
256
|
return {
|
|
256
257
|
treeData: [],
|
|
257
258
|
currentValue: '',
|
|
259
|
+
treeDefaultExpandedKeys: [],
|
|
258
260
|
}
|
|
259
261
|
},
|
|
260
262
|
mounted() {
|
|
261
|
-
|
|
263
|
+
this.searchData()
|
|
262
264
|
if (this.treeData.length) {
|
|
263
265
|
this.currentValue = this.row[this.linkedField]
|
|
264
266
|
} else {
|
|
@@ -269,11 +271,14 @@ export default {
|
|
|
269
271
|
treeData(val) {
|
|
270
272
|
if (this.treeData.length) {
|
|
271
273
|
this.currentValue = this.row[this.linkedField]
|
|
274
|
+
this.treeDefaultExpandedKeys = []
|
|
275
|
+
this.treeDefaultExpandedKeys.push(this.currentValue)
|
|
272
276
|
} else {
|
|
273
277
|
this.currentValue = this.value
|
|
274
278
|
}
|
|
275
279
|
},
|
|
276
280
|
edit(value) {
|
|
281
|
+
// debugger
|
|
277
282
|
if (value) {
|
|
278
283
|
if (this.treeData.length) {
|
|
279
284
|
this.currentValue = this.row[this.linkedField]
|
package/packages/utils/api.js
CHANGED
|
@@ -9,6 +9,12 @@ export function loadViewInfo(moduleCode) {
|
|
|
9
9
|
}
|
|
10
10
|
})
|
|
11
11
|
}
|
|
12
|
+
export function loadLangInfo(moduleCode,moduleLangCacheHash) {
|
|
13
|
+
return request({
|
|
14
|
+
url: store.getters.moduleLangUrl + '/'+ moduleCode+'_zh_cn.json?cacheHash='+moduleLangCacheHash,
|
|
15
|
+
method: 'get'
|
|
16
|
+
})
|
|
17
|
+
}
|
|
12
18
|
|
|
13
19
|
export function saveUserModuleDataFieldApi(data) {
|
|
14
20
|
return request({
|
package/packages/utils/common.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {notification } from 'ant-design-vue'
|
|
2
2
|
import store from './store'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
|
+
import axios from 'axios'
|
|
4
5
|
/**
|
|
5
6
|
* 替换掩码参数字符串
|
|
6
7
|
* @param {参数字符串} paramString
|
|
@@ -247,11 +248,16 @@ export function replaceParamString(
|
|
|
247
248
|
alert('防呆,子应用没有路由缓存键:'+JSON.stringify(to))
|
|
248
249
|
}
|
|
249
250
|
if (to.meta.moduleCode && !store.getters.moduleViewInfo[to.meta.moduleCode]) {
|
|
250
|
-
store
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
axios.all([store.dispatch('moduleLoadViewInfo', { moduleCode: to.meta.moduleCode }),
|
|
252
|
+
store.dispatch('moduleLoadLangInfo', { moduleCode: to.meta.moduleCode,moduleLangCacheHash:to.meta.moduleLangCacheHash })])
|
|
253
|
+
.then(axios.spread(function() {
|
|
254
|
+
next()
|
|
255
|
+
}))
|
|
256
|
+
// store
|
|
257
|
+
// .dispatch('moduleLoadViewInfo', { moduleCode: to.meta.moduleCode })
|
|
258
|
+
// .then(() => {
|
|
259
|
+
// next()
|
|
260
|
+
// })
|
|
255
261
|
.catch((err) => {
|
|
256
262
|
console.debug(err)
|
|
257
263
|
})
|
package/packages/utils/store.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {loadViewInfo} from './api'
|
|
2
|
+
import {loadViewInfo,loadLangInfo} from './api'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import Vue from 'vue'
|
|
5
5
|
import Vuex from 'vuex'
|
|
@@ -9,6 +9,7 @@ Vue.use(Vuex)
|
|
|
9
9
|
|
|
10
10
|
export default new Vuex.Store({
|
|
11
11
|
state: {
|
|
12
|
+
moduleLangUrl:'',
|
|
12
13
|
umsUrl:'',
|
|
13
14
|
baseUrl:'',
|
|
14
15
|
msgUrl:'',
|
|
@@ -143,6 +144,9 @@ export default new Vuex.Store({
|
|
|
143
144
|
SET_UMS_URL:(state,url) => {
|
|
144
145
|
state.umsUrl = url
|
|
145
146
|
},
|
|
147
|
+
SET_MODULE_LANG_URL:(state,url) => {
|
|
148
|
+
state.moduleLangUrl = url
|
|
149
|
+
},
|
|
146
150
|
SET_BASE_URL:(state,url) => {
|
|
147
151
|
state.baseUrl = url
|
|
148
152
|
},
|
|
@@ -224,6 +228,23 @@ export default new Vuex.Store({
|
|
|
224
228
|
})
|
|
225
229
|
})
|
|
226
230
|
},
|
|
231
|
+
moduleLoadLangInfo({ commit, state }, dataInfo) {
|
|
232
|
+
let vm = this
|
|
233
|
+
return new Promise((resolve, reject) => {
|
|
234
|
+
loadLangInfo(dataInfo.moduleCode)
|
|
235
|
+
.then(reponseData => {
|
|
236
|
+
commit('SET_MODULE_LANG_INFO', {
|
|
237
|
+
moduleCode: dataInfo.moduleCode,
|
|
238
|
+
info: reponseData.content
|
|
239
|
+
})
|
|
240
|
+
resolve()
|
|
241
|
+
})
|
|
242
|
+
.catch(error => {
|
|
243
|
+
console.debug(error)
|
|
244
|
+
resolve()
|
|
245
|
+
})
|
|
246
|
+
})
|
|
247
|
+
},
|
|
227
248
|
// 固定返回工作台,并根据条件决定是否关闭其余标签
|
|
228
249
|
goWorkbench({ commit }, tabsAllClose) {
|
|
229
250
|
if(window.$wujie){
|
|
@@ -249,6 +270,7 @@ export default new Vuex.Store({
|
|
|
249
270
|
industryVersion:state=>state.industryVersion,
|
|
250
271
|
isGenerateMatCode:state=>state.isGenerateMatCode,
|
|
251
272
|
umsUrl:state=>state.umsUrl,
|
|
273
|
+
moduleLangUrl:state=>state.moduleLangUrl,
|
|
252
274
|
baseUrl:state=>state.baseUrl,
|
|
253
275
|
msgUrl:state=>state.msgUrl,
|
|
254
276
|
identityUrl:state=>state.identityUrl,
|