doway-coms 1.1.26 → 1.1.27

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.
@@ -107551,8 +107551,234 @@ var api = {
107551
107551
 
107552
107552
  api.warn = api.warning;
107553
107553
  /* harmony default export */ var notification = (api);
107554
+ // EXTERNAL MODULE: ./node_modules/_axios@0.18.0@axios/index.js
107555
+ var _axios_0_18_0_axios = __webpack_require__("7f43");
107556
+ var _axios_0_18_0_axios_default = /*#__PURE__*/__webpack_require__.n(_axios_0_18_0_axios);
107557
+
107558
+ // CONCATENATED MODULE: ./packages/utils/request.js
107559
+
107560
+
107561
+
107562
+
107563
+
107564
+ // create an axios instance
107565
+ const service = _axios_0_18_0_axios_default.a.create({
107566
+ // baseURL: process.env.BASE_API, // api的base_url
107567
+ timeout: 1000 * 60 * 5 // request timeout
107568
+ })
107569
+ // request interceptor
107570
+ service.interceptors.request.use(
107571
+ config => {
107572
+ // Do something before request is sent
107573
+ let tempToken = utils_store.state.token
107574
+ if (tempToken) {
107575
+ config.headers.Authorization = `Bearer ${tempToken}`
107576
+ }
107577
+ // config.headers.Accept = 'application/json,Date, text/plain, */*'
107578
+ return config
107579
+ },
107580
+ error => {
107581
+ // Do something with request error
107582
+ Promise.reject(error)
107583
+ }
107584
+ )
107585
+
107586
+ // respone interceptor
107587
+ service.interceptors.response.use(
107588
+ response => {
107589
+ // store.dispatch(
107590
+ // "setLastRequireTime",
107591
+ // moment().format("YYYY-MM-DD HH:mm:ss")
107592
+ // );
107593
+
107594
+ const res = response.data
107595
+ if (res.status === 200 || res.code === 200) {
107596
+ return response.data
107597
+ }
107598
+ if (res.status === undefined && res.code === undefined) {
107599
+ return response.data
107600
+ }
107601
+ if (res.code === 401) {
107602
+ utils_store.dispatch('logOut')
107603
+ return Promise.reject(res.msg)
107604
+ }
107605
+ notification.error({
107606
+ message: '错误信息',
107607
+ description: h => {
107608
+ return h('div', null, [
107609
+ h('p', { domProps: { innerHTML: res.msg } }, null)
107610
+ ])
107611
+ }
107612
+ // description:parseContent.content
107613
+ })
107614
+
107615
+ // notification['error']({ message: '错误信息', description: res.msg })
107616
+ return Promise.reject(res.msg)
107617
+ },
107618
+ error => {
107619
+ if (error.response && error.response.status === 401) {
107620
+ utils_store.dispatch('logOut').then(() => {})
107621
+ return
107622
+ }
107623
+ let errorMsg = ''
107624
+ if (error.response && error.response.data && error.response.data.error) {
107625
+ if (error.response.data.error_description) {
107626
+ errorMsg = error.response.data.error_description
107627
+ } else {
107628
+ errorMsg = error.response.data.error
107629
+ }
107630
+ } else {
107631
+ errorMsg = error.msg
107632
+ }
107633
+ notification['error']({ message: '错误信息', description: errorMsg })
107634
+ return Promise.reject(error)
107635
+ }
107636
+ )
107637
+
107638
+ /* harmony default export */ var utils_request = (service);
107639
+
107640
+ // CONCATENATED MODULE: ./packages/utils/api.js
107641
+
107642
+
107643
+ function loadViewInfo(moduleCode) {
107644
+ return utils_request({
107645
+ url: utils_store.getters.umsUrl + '/v1/module/loadViewInfo',
107646
+ method: 'get',
107647
+ params: {
107648
+ moduleCode: moduleCode
107649
+ }
107650
+ })
107651
+ }
107652
+ function attachGetAttachUrlApi() {
107653
+ return utils_store.getters.msgUrl + '/v1/Attach'
107654
+ }
107655
+
107656
+ /**
107657
+ * 获取cust信息列表
107658
+ * @param postData 提交的数据,分页信息
107659
+ */
107660
+ function attachSearchApi(postData) {
107661
+ return utils_request({
107662
+ url: utils_store.getters.msgUrl + '/v1/Attach/Search',
107663
+ method: 'post',
107664
+ data: postData
107665
+ })
107666
+ }
107667
+
107668
+ // EXTERNAL MODULE: ./node_modules/_vuex@3.6.2@vuex/dist/vuex.esm.js
107669
+ var vuex_esm = __webpack_require__("7736");
107670
+
107671
+ // CONCATENATED MODULE: ./packages/utils/store.js
107672
+
107673
+
107674
+
107675
+
107676
+
107677
+ external_commonjs_vue_commonjs2_vue_root_Vue_default.a.use(vuex_esm["a" /* default */])
107678
+
107679
+ /* harmony default export */ var utils_store = (new vuex_esm["a" /* default */].Store({
107680
+ state: {
107681
+ umsUrl:'',
107682
+ msgUrl:'',
107683
+ token: '',
107684
+ webAppCode: '',
107685
+ moduleViewInfo: {},
107686
+ controlSize: 'small',
107687
+ newId: 0,//明细新增id
107688
+ },
107689
+ mutations: {
107690
+ SET_TOKEN: (state, token) => {
107691
+ state.token = token
107692
+ },
107693
+ SET_WEB_APP_CODE: (state, webAppCode) => {
107694
+ state.webAppCode = webAppCode
107695
+ },
107696
+ SET_MODULE_VIEW_INFO: (state, data) => {
107697
+ state.moduleViewInfo[data.moduleCode] = data.info
107698
+ },
107699
+ SET_NEW_ID: (state, id) => {
107700
+ state.newId = id
107701
+ },
107702
+ SET_UMS_URL:(state,url) => {
107703
+ state.umsUrl = url
107704
+ },
107705
+ SET_MSG_URL:(state,url) => {
107706
+ state.umsUrl = url
107707
+ }
107708
+ },
107709
+ actions: {
107710
+ setTabTitle({ commit }, tabInfo) {
107711
+ if (tabInfo.replaceQuery) {
107712
+ let newRoutePath =
107713
+ tabInfo.path + '?' + stringUrlQuery(tabInfo.replaceQuery)
107714
+ history.replaceState(null,null,(window.$wujie.props.webAppActiveRule + newRoutePath))
107715
+ let keepAliveComp =
107716
+ tabInfo.rootComp.$children[0].$refs.routerView.$vnode.parent
107717
+ .componentInstance
107718
+
107719
+ for (let cacheKey in keepAliveComp.cache) {
107720
+ if (
107721
+ keepAliveComp.cache[cacheKey].componentInstance._uid ===
107722
+ tabInfo.compUid
107723
+ ) {
107724
+ keepAliveComp.cache[newRoutePath] = keepAliveComp.cache[cacheKey]
107725
+ keepAliveComp.keyToCache = newRoutePath
107726
+ XEUtils.remove(keepAliveComp.keys, loopKey => loopKey === cacheKey)
107727
+ delete keepAliveComp.cache[cacheKey]
107728
+ keepAliveComp.keys.push(newRoutePath)
107729
+ break
107730
+ }
107731
+ }
107732
+ }
107733
+ //通知父应用修改Tab标签文字描述
107734
+ window.$wujie.bus.$emit('subAppSetTabTitle', {
107735
+ title: tabInfo.title,
107736
+ name: tabInfo.name,
107737
+ query: tabInfo.query,
107738
+ replaceQuery: tabInfo.replaceQuery,
107739
+ path: tabInfo.path
107740
+ })
107741
+ },
107742
+ closeTab({ commit }, fullPath) {
107743
+ window.$wujie.bus.$emit(
107744
+ 'subAppCloseTab',
107745
+ window.$wujie.props.webAppActiveRule + fullPath
107746
+ )
107747
+ },
107748
+ moduleLoadViewInfo({ commit, state }, dataInfo) {
107749
+ let vm = this
107750
+ return new Promise((resolve, reject) => {
107751
+ loadViewInfo(dataInfo.moduleCode)
107752
+ .then(reponseData => {
107753
+ commit('SET_MODULE_VIEW_INFO', {
107754
+ moduleCode: dataInfo.moduleCode,
107755
+ info: reponseData.content
107756
+ })
107757
+ resolve()
107758
+ })
107759
+ .catch(error => {
107760
+ reject(error)
107761
+ })
107762
+ })
107763
+ }
107764
+ },
107765
+ modules:{},
107766
+ getters: {
107767
+ umsUrl:state=>state.umsUrl,
107768
+ msgUrl:state=>state.msgUrl,
107769
+ token: state => state.token,
107770
+ webAppCode: state => state.webAppCode,
107771
+ moduleViewInfo: state => state.moduleViewInfo,
107772
+ controlSize: state => state.controlSize,
107773
+ newId: state => () => {
107774
+ state.newId = state.newId + 1
107775
+ return state.newId
107776
+ }
107777
+ }
107778
+ }));
107554
107779
  // CONCATENATED MODULE: ./packages/utils/common.js
107555
107780
 
107781
+
107556
107782
  /**
107557
107783
  * 替换掩码参数字符串
107558
107784
  * @param {参数字符串} paramString
@@ -107811,8 +108037,8 @@ function replaceParamString(
107811
108037
  if(!to.meta.aliveCacheKey){
107812
108038
  alert('防呆,子应用没有路由缓存键')
107813
108039
  }
107814
- if (to.meta.moduleCode && !store.getters.moduleViewInfo[to.meta.moduleCode]) {
107815
- store
108040
+ if (to.meta.moduleCode && !utils_store.getters.moduleViewInfo[to.meta.moduleCode]) {
108041
+ utils_store
107816
108042
  .dispatch('moduleLoadViewInfo', { moduleCode: to.meta.moduleCode })
107817
108043
  .then(() => {
107818
108044
  next()
@@ -107824,231 +108050,6 @@ function replaceParamString(
107824
108050
  next()
107825
108051
  }
107826
108052
  }
107827
- // EXTERNAL MODULE: ./node_modules/_axios@0.18.0@axios/index.js
107828
- var _axios_0_18_0_axios = __webpack_require__("7f43");
107829
- var _axios_0_18_0_axios_default = /*#__PURE__*/__webpack_require__.n(_axios_0_18_0_axios);
107830
-
107831
- // CONCATENATED MODULE: ./packages/utils/api.js
107832
-
107833
-
107834
- function loadViewInfo(moduleCode) {
107835
- return utils_request({
107836
- url: utils_store.getters.umsUrl + '/v1/module/loadViewInfo',
107837
- method: 'get',
107838
- params: {
107839
- moduleCode: moduleCode
107840
- }
107841
- })
107842
- }
107843
- function attachGetAttachUrlApi() {
107844
- return utils_store.getters.msgUrl + '/v1/Attach'
107845
- }
107846
-
107847
- /**
107848
- * 获取cust信息列表
107849
- * @param postData 提交的数据,分页信息
107850
- */
107851
- function attachSearchApi(postData) {
107852
- return utils_request({
107853
- url: utils_store.getters.msgUrl + '/v1/Attach/Search',
107854
- method: 'post',
107855
- data: postData
107856
- })
107857
- }
107858
-
107859
- // EXTERNAL MODULE: ./node_modules/_vuex@3.6.2@vuex/dist/vuex.esm.js
107860
- var vuex_esm = __webpack_require__("7736");
107861
-
107862
- // CONCATENATED MODULE: ./packages/utils/store.js
107863
-
107864
-
107865
-
107866
-
107867
-
107868
- external_commonjs_vue_commonjs2_vue_root_Vue_default.a.use(vuex_esm["a" /* default */])
107869
-
107870
- /* harmony default export */ var utils_store = (new vuex_esm["a" /* default */].Store({
107871
- state: {
107872
- umsUrl:'',
107873
- msgUrl:'',
107874
- token: '',
107875
- webAppCode: '',
107876
- moduleViewInfo: {},
107877
- controlSize: 'small',
107878
- newId: 0,//明细新增id
107879
- },
107880
- mutations: {
107881
- SET_TOKEN: (state, token) => {
107882
- state.token = token
107883
- },
107884
- SET_WEB_APP_CODE: (state, webAppCode) => {
107885
- state.webAppCode = webAppCode
107886
- },
107887
- SET_MODULE_VIEW_INFO: (state, data) => {
107888
- state.moduleViewInfo[data.moduleCode] = data.info
107889
- },
107890
- SET_NEW_ID: (state, id) => {
107891
- state.newId = id
107892
- },
107893
- SET_UMS_URL:(state,url) => {
107894
- state.umsUrl = url
107895
- },
107896
- SET_MSG_URL:(state,url) => {
107897
- state.umsUrl = url
107898
- }
107899
- },
107900
- actions: {
107901
- setTabTitle({ commit }, tabInfo) {
107902
- if (tabInfo.replaceQuery) {
107903
- let newRoutePath =
107904
- tabInfo.path + '?' + stringUrlQuery(tabInfo.replaceQuery)
107905
- history.replaceState(null,null,(window.$wujie.props.webAppActiveRule + newRoutePath))
107906
- let keepAliveComp =
107907
- tabInfo.rootComp.$children[0].$refs.routerView.$vnode.parent
107908
- .componentInstance
107909
-
107910
- for (let cacheKey in keepAliveComp.cache) {
107911
- if (
107912
- keepAliveComp.cache[cacheKey].componentInstance._uid ===
107913
- tabInfo.compUid
107914
- ) {
107915
- keepAliveComp.cache[newRoutePath] = keepAliveComp.cache[cacheKey]
107916
- keepAliveComp.keyToCache = newRoutePath
107917
- XEUtils.remove(keepAliveComp.keys, loopKey => loopKey === cacheKey)
107918
- delete keepAliveComp.cache[cacheKey]
107919
- keepAliveComp.keys.push(newRoutePath)
107920
- break
107921
- }
107922
- }
107923
- }
107924
- //通知父应用修改Tab标签文字描述
107925
- window.$wujie.bus.$emit('subAppSetTabTitle', {
107926
- title: tabInfo.title,
107927
- name: tabInfo.name,
107928
- query: tabInfo.query,
107929
- replaceQuery: tabInfo.replaceQuery,
107930
- path: tabInfo.path
107931
- })
107932
- },
107933
- closeTab({ commit }, fullPath) {
107934
- window.$wujie.bus.$emit(
107935
- 'subAppCloseTab',
107936
- window.$wujie.props.webAppActiveRule + fullPath
107937
- )
107938
- },
107939
- moduleLoadViewInfo({ commit, state }, dataInfo) {
107940
- let vm = this
107941
- return new Promise((resolve, reject) => {
107942
- loadViewInfo(dataInfo.moduleCode)
107943
- .then(reponseData => {
107944
- commit('SET_MODULE_VIEW_INFO', {
107945
- moduleCode: dataInfo.moduleCode,
107946
- info: reponseData.content
107947
- })
107948
- resolve()
107949
- })
107950
- .catch(error => {
107951
- reject(error)
107952
- })
107953
- })
107954
- }
107955
- },
107956
- modules:{},
107957
- getters: {
107958
- umsUrl:state=>state.umsUrl,
107959
- msgUrl:state=>state.msgUrl,
107960
- token: state => state.token,
107961
- webAppCode: state => state.webAppCode,
107962
- moduleViewInfo: state => state.moduleViewInfo,
107963
- controlSize: state => state.controlSize,
107964
- newId: state => () => {
107965
- state.newId = state.newId + 1
107966
- return state.newId
107967
- }
107968
- }
107969
- }));
107970
- // CONCATENATED MODULE: ./packages/utils/request.js
107971
-
107972
-
107973
-
107974
-
107975
-
107976
- // create an axios instance
107977
- const service = _axios_0_18_0_axios_default.a.create({
107978
- // baseURL: process.env.BASE_API, // api的base_url
107979
- timeout: 1000 * 60 * 5 // request timeout
107980
- })
107981
- // request interceptor
107982
- service.interceptors.request.use(
107983
- config => {
107984
- // Do something before request is sent
107985
- let tempToken = utils_store.state.token
107986
- if (tempToken) {
107987
- config.headers.Authorization = `Bearer ${tempToken}`
107988
- }
107989
- // config.headers.Accept = 'application/json,Date, text/plain, */*'
107990
- return config
107991
- },
107992
- error => {
107993
- // Do something with request error
107994
- Promise.reject(error)
107995
- }
107996
- )
107997
-
107998
- // respone interceptor
107999
- service.interceptors.response.use(
108000
- response => {
108001
- // store.dispatch(
108002
- // "setLastRequireTime",
108003
- // moment().format("YYYY-MM-DD HH:mm:ss")
108004
- // );
108005
-
108006
- const res = response.data
108007
- if (res.status === 200 || res.code === 200) {
108008
- return response.data
108009
- }
108010
- if (res.status === undefined && res.code === undefined) {
108011
- return response.data
108012
- }
108013
- if (res.code === 401) {
108014
- utils_store.dispatch('logOut')
108015
- return Promise.reject(res.msg)
108016
- }
108017
- notification.error({
108018
- message: '错误信息',
108019
- description: h => {
108020
- return h('div', null, [
108021
- h('p', { domProps: { innerHTML: res.msg } }, null)
108022
- ])
108023
- }
108024
- // description:parseContent.content
108025
- })
108026
-
108027
- // notification['error']({ message: '错误信息', description: res.msg })
108028
- return Promise.reject(res.msg)
108029
- },
108030
- error => {
108031
- if (error.response && error.response.status === 401) {
108032
- utils_store.dispatch('logOut').then(() => {})
108033
- return
108034
- }
108035
- let errorMsg = ''
108036
- if (error.response && error.response.data && error.response.data.error) {
108037
- if (error.response.data.error_description) {
108038
- errorMsg = error.response.data.error_description
108039
- } else {
108040
- errorMsg = error.response.data.error
108041
- }
108042
- } else {
108043
- errorMsg = error.msg
108044
- }
108045
- notification['error']({ message: '错误信息', description: errorMsg })
108046
- return Promise.reject(error)
108047
- }
108048
- )
108049
-
108050
- /* harmony default export */ var utils_request = (service);
108051
-
108052
108053
  // CONCATENATED MODULE: ./node_modules/_ant-design-vue@1.7.8@ant-design-vue/es/_util/responsiveObserve.js
108053
108054
 
108054
108055