doway-coms 1.4.55 → 1.4.57
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 +1 -1
- package/packages/BaseGrid/src/index.vue +14 -14
- package/packages/utils/api.js +26 -15
- package/packages/utils/request.js +65 -1
- package/packages/utils/store.js +8 -3
package/package.json
CHANGED
|
@@ -243,20 +243,7 @@
|
|
|
243
243
|
<a-button
|
|
244
244
|
type="link"
|
|
245
245
|
@click="operationButtonClick(item, scope)"
|
|
246
|
-
v-show="
|
|
247
|
-
item.visible === true &&
|
|
248
|
-
!(scope.row['sysOperationDisVisible_' + item.field] === true) &&
|
|
249
|
-
item.visibleStatuss != undefined
|
|
250
|
-
? item.visibleStatuss.indexOf(scope.row.status) != -1
|
|
251
|
-
: true &&
|
|
252
|
-
item.visibleState != undefined &&
|
|
253
|
-
item.visibleState.field != undefined &&
|
|
254
|
-
item.visibleState.visibleStatuss != undefined
|
|
255
|
-
? item.visibleState.visibleStatuss.indexOf(
|
|
256
|
-
scope.row[item.visibleState.field]
|
|
257
|
-
) != -1
|
|
258
|
-
: true
|
|
259
|
-
"
|
|
246
|
+
v-show="operationEdit(item, scope)"
|
|
260
247
|
v-for="item in scope.column.params.columns"
|
|
261
248
|
:key="item.field"
|
|
262
249
|
>
|
|
@@ -1732,6 +1719,19 @@ export default {
|
|
|
1732
1719
|
}
|
|
1733
1720
|
this.$emit("operationBtnClick", btn, scope.row, this);
|
|
1734
1721
|
},
|
|
1722
|
+
operationEdit(item, scope) {
|
|
1723
|
+
let isShow =
|
|
1724
|
+
item.visible === true &&
|
|
1725
|
+
!(scope.row["sysOperationDisVisible_" + item.field] === true) &&
|
|
1726
|
+
(item.visibleState != undefined &&
|
|
1727
|
+
item.visibleState.field != undefined &&
|
|
1728
|
+
item.visibleState.visibleStatuss != undefined
|
|
1729
|
+
? item.visibleState.visibleStatuss.indexOf(
|
|
1730
|
+
scope.row[item.visibleState.field]
|
|
1731
|
+
) != -1
|
|
1732
|
+
: true);
|
|
1733
|
+
return isShow;
|
|
1734
|
+
},
|
|
1735
1735
|
activeCellMethod({ row, column }) {
|
|
1736
1736
|
let emitData ={
|
|
1737
1737
|
row:row,
|
package/packages/utils/api.js
CHANGED
|
@@ -12,24 +12,35 @@ export function loadViewInfo(moduleCode) {
|
|
|
12
12
|
|
|
13
13
|
export function saveUserModuleDataFieldApi(data) {
|
|
14
14
|
return request({
|
|
15
|
-
url:
|
|
15
|
+
url: store.getters.umsUrl + '/v1/user/saveUserModuleDataField',
|
|
16
16
|
method: 'post',
|
|
17
17
|
data: data
|
|
18
18
|
})
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export function attachGetAttachUrlApi() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
return store.getters.msgUrl + '/v1/Attach'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 获取cust信息列表
|
|
27
|
+
* @param postData 提交的数据,分页信息
|
|
28
|
+
*/
|
|
29
|
+
export function attachSearchApi(postData) {
|
|
30
|
+
return request({
|
|
31
|
+
url: store.getters.msgUrl + '/v1/Attach/Search',
|
|
32
|
+
method: 'post',
|
|
33
|
+
data: postData
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 验证
|
|
39
|
+
*/
|
|
40
|
+
export function licenseAuthorizeApi(data) {
|
|
41
|
+
return request({
|
|
42
|
+
url: store.getters.identityUrl + '/oauth/licenseAuthorize',
|
|
43
|
+
method: 'post',
|
|
44
|
+
data: data
|
|
45
|
+
})
|
|
46
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import axios from 'axios'
|
|
2
|
-
import {
|
|
2
|
+
import { licenseAuthorizeApi } from './api'
|
|
3
|
+
import { notification, message, Modal, Input } from 'ant-design-vue'
|
|
3
4
|
import Vue from 'vue'
|
|
4
5
|
import store from './store'
|
|
5
6
|
import moment from 'moment'
|
|
@@ -55,6 +56,69 @@ service.interceptors.response.use(
|
|
|
55
56
|
if (res.status === 200 || res.code === 200) {
|
|
56
57
|
return response.data
|
|
57
58
|
}
|
|
59
|
+
if (res.code == 60001) {
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
let inputVal = '';
|
|
62
|
+
Modal.info({
|
|
63
|
+
zIndex: 3100,
|
|
64
|
+
title: '授权',
|
|
65
|
+
okText: '授权',
|
|
66
|
+
destroyOnClose: true,
|
|
67
|
+
keyboard: true,
|
|
68
|
+
content: h => {
|
|
69
|
+
return h('div', null, [
|
|
70
|
+
h(Input, {
|
|
71
|
+
attrs: {
|
|
72
|
+
type: 'text',
|
|
73
|
+
placeholder: "请输入许可",
|
|
74
|
+
},
|
|
75
|
+
on: {
|
|
76
|
+
input: event => {
|
|
77
|
+
inputVal = event.target.value;
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
]);
|
|
82
|
+
},
|
|
83
|
+
async onOk() {
|
|
84
|
+
try {
|
|
85
|
+
let data = {
|
|
86
|
+
system: store.state.webAppCode,
|
|
87
|
+
license: inputVal
|
|
88
|
+
}
|
|
89
|
+
let info = await licenseAuthorizeApi(data)
|
|
90
|
+
Modal.info({
|
|
91
|
+
zIndex: 4000,
|
|
92
|
+
title: '成功信息',
|
|
93
|
+
content: h => {
|
|
94
|
+
return h('div', null, [
|
|
95
|
+
h('div', null, `验证成功,许可有效期至:${info.content},请重新登录`),
|
|
96
|
+
]);
|
|
97
|
+
},
|
|
98
|
+
onOk() {
|
|
99
|
+
// 返回登录页
|
|
100
|
+
store.dispatch('logOut')
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
Modal.error({
|
|
106
|
+
zIndex: 4000,
|
|
107
|
+
title: '错误信息',
|
|
108
|
+
destroyOnClose: true,
|
|
109
|
+
keyboard: true,
|
|
110
|
+
content: h => {
|
|
111
|
+
return h('div', null, [
|
|
112
|
+
h('div', null, error),
|
|
113
|
+
]);
|
|
114
|
+
},
|
|
115
|
+
})
|
|
116
|
+
return Promise.reject(error)
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
})
|
|
121
|
+
}
|
|
58
122
|
if (res.status === undefined && res.code === undefined) {
|
|
59
123
|
return response.data
|
|
60
124
|
}
|
package/packages/utils/store.js
CHANGED
|
@@ -11,6 +11,7 @@ export default new Vuex.Store({
|
|
|
11
11
|
state: {
|
|
12
12
|
umsUrl:'',
|
|
13
13
|
msgUrl:'',
|
|
14
|
+
identityUrl:'',
|
|
14
15
|
token: '',
|
|
15
16
|
industryVersion:'',//行业版本
|
|
16
17
|
custPriceNotTaxPrecision:0,
|
|
@@ -92,7 +93,7 @@ export default new Vuex.Store({
|
|
|
92
93
|
state.newId = id
|
|
93
94
|
},
|
|
94
95
|
SET_UMS_URL:(state,url) => {
|
|
95
|
-
|
|
96
|
+
state.umsUrl = url
|
|
96
97
|
},
|
|
97
98
|
SET_CUST_PRICE_NOT_TAX_PRECISION:(state,custPriceNotTaxPrecision)=>{
|
|
98
99
|
state.custPriceNotTaxPrecision = custPriceNotTaxPrecision
|
|
@@ -107,8 +108,11 @@ export default new Vuex.Store({
|
|
|
107
108
|
state.supplyPricePrecision = supplyPricePrecision
|
|
108
109
|
},
|
|
109
110
|
SET_MSG_URL:(state,url) => {
|
|
110
|
-
|
|
111
|
-
}
|
|
111
|
+
state.msgUrl = url
|
|
112
|
+
},
|
|
113
|
+
SET_IDENTITY_URL:(state,url) => {
|
|
114
|
+
state.identityUrl = url
|
|
115
|
+
},
|
|
112
116
|
},
|
|
113
117
|
actions: {
|
|
114
118
|
/**
|
|
@@ -177,6 +181,7 @@ export default new Vuex.Store({
|
|
|
177
181
|
isGenerateMatCode:state=>state.isGenerateMatCode,
|
|
178
182
|
umsUrl:state=>state.umsUrl,
|
|
179
183
|
msgUrl:state=>state.msgUrl,
|
|
184
|
+
identityUrl:state=>state.identityUrl,
|
|
180
185
|
token: state => state.token,
|
|
181
186
|
webAppCode: state => state.webAppCode,
|
|
182
187
|
moduleViewInfo: state => state.moduleViewInfo,
|