eoss-mobiles 0.2.19 → 0.2.21
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/CHANGELOG.md +7 -4
- package/lib/checkbox.js +34 -19
- package/lib/eoss-mobile.common.js +448 -175
- package/lib/flow.js +51 -38
- package/lib/index.js +1 -1
- package/lib/picker.js +18 -13
- package/lib/radio.js +32 -18
- package/lib/retrial-auth.js +5 -3
- package/lib/selector.js +5 -3
- package/lib/table-column.js +314 -80
- package/lib/table.js +5 -3
- package/lib/utils/axios.js +4 -3
- package/lib/utils/http.js +1 -0
- package/package.json +1 -1
- package/packages/checkbox/src/main.vue +27 -11
- package/packages/flow/src/components/Handle.vue +13 -4
- package/packages/flow/src/components/Reject.vue +17 -9
- package/packages/flow/src/components/StartFlow.vue +2 -1
- package/packages/flow/src/components/taskUnionExamine.vue +3 -1
- package/packages/picker/src/main.vue +28 -24
- package/packages/radio/src/main.vue +22 -9
- package/packages/table-column/src/main.vue +128 -48
- package/src/index.js +1 -1
- package/src/utils/axios.js +4 -3
- package/src/utils/http.js +4 -3
package/lib/table.js
CHANGED
|
@@ -1628,8 +1628,8 @@ var axios_ajax = function ajax(url) {
|
|
|
1628
1628
|
withCredentials: false
|
|
1629
1629
|
});
|
|
1630
1630
|
http.interceptors.request.use(function (config) {
|
|
1631
|
-
if (type === 'post' && format) {
|
|
1632
|
-
config.
|
|
1631
|
+
if (type === 'post' && !format) {
|
|
1632
|
+
config.params = external_qs_default.a.stringify(params.params || params);
|
|
1633
1633
|
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1634
1634
|
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1635
1635
|
}
|
|
@@ -1637,7 +1637,7 @@ var axios_ajax = function ajax(url) {
|
|
|
1637
1637
|
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1638
1638
|
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1639
1639
|
}
|
|
1640
|
-
config.
|
|
1640
|
+
config.params = params.params || params;
|
|
1641
1641
|
}
|
|
1642
1642
|
|
|
1643
1643
|
if (util["a" /* default */].getStorage('token')) {
|
|
@@ -1784,6 +1784,7 @@ var base = {
|
|
|
1784
1784
|
}, headers, format);
|
|
1785
1785
|
},
|
|
1786
1786
|
post: function post(url, params, headers, format) {
|
|
1787
|
+
console.log(params, 'params');
|
|
1787
1788
|
if (params.params) {
|
|
1788
1789
|
params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
|
|
1789
1790
|
} else {
|
|
@@ -1796,6 +1797,7 @@ var base = {
|
|
|
1796
1797
|
// CONCATENATED MODULE: ./src/utils/http.js
|
|
1797
1798
|
|
|
1798
1799
|
var http_request = function request(options) {
|
|
1800
|
+
console.log(options, 'options');
|
|
1799
1801
|
var fn = void 0;
|
|
1800
1802
|
switch (options.type) {
|
|
1801
1803
|
case 'post':
|
package/lib/utils/axios.js
CHANGED
|
@@ -35,8 +35,8 @@ var ajax = function ajax(url) {
|
|
|
35
35
|
withCredentials: false
|
|
36
36
|
});
|
|
37
37
|
http.interceptors.request.use(function (config) {
|
|
38
|
-
if (type === 'post' && format) {
|
|
39
|
-
config.
|
|
38
|
+
if (type === 'post' && !format) {
|
|
39
|
+
config.params = _qs2.default.stringify(params.params || params);
|
|
40
40
|
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
41
41
|
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
42
42
|
}
|
|
@@ -44,7 +44,7 @@ var ajax = function ajax(url) {
|
|
|
44
44
|
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
45
45
|
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
46
46
|
}
|
|
47
|
-
config.
|
|
47
|
+
config.params = params.params || params;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
if (_util2.default.getStorage('token')) {
|
|
@@ -191,6 +191,7 @@ var base = {
|
|
|
191
191
|
}, headers, format);
|
|
192
192
|
},
|
|
193
193
|
post: function post(url, params, headers, format) {
|
|
194
|
+
console.log(params, 'params');
|
|
194
195
|
if (params.params) {
|
|
195
196
|
params.params.userId = params.params.userId || _util2.default.getStorage('userId');
|
|
196
197
|
} else {
|
package/lib/utils/http.js
CHANGED
|
@@ -9,6 +9,7 @@ var _axios2 = _interopRequireDefault(_axios);
|
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
|
|
11
11
|
var request = function request(options) {
|
|
12
|
+
console.log(options, 'options');
|
|
12
13
|
var fn = void 0;
|
|
13
14
|
switch (options.type) {
|
|
14
15
|
case 'post':
|
package/package.json
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
v-on="$listeners"
|
|
17
17
|
:disabled="item.disabled"
|
|
18
18
|
:name="item[valueKey]"
|
|
19
|
-
>
|
|
19
|
+
>
|
|
20
|
+
<span v-html="item[labelKey]"></span>
|
|
20
21
|
<slot
|
|
21
22
|
slot="icon"
|
|
22
23
|
:checked="newValue.indexOf(item[valueKey]) != -1"
|
|
@@ -91,7 +92,12 @@ export default {
|
|
|
91
92
|
type: Boolean,
|
|
92
93
|
default: false
|
|
93
94
|
},
|
|
94
|
-
baseUrl: String
|
|
95
|
+
baseUrl: String,
|
|
96
|
+
allowHtml: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false
|
|
99
|
+
},
|
|
100
|
+
|
|
95
101
|
},
|
|
96
102
|
computed: {
|
|
97
103
|
newValue: {
|
|
@@ -107,6 +113,11 @@ export default {
|
|
|
107
113
|
watch: {
|
|
108
114
|
data: {
|
|
109
115
|
handler(val) {
|
|
116
|
+
val.map(item => {
|
|
117
|
+
item[this.labelKey] = this.allowHtml
|
|
118
|
+
? item[this.labelKey]
|
|
119
|
+
: item[this.labelKey].replace(/<[^>]+>/g, '');
|
|
120
|
+
});
|
|
110
121
|
this.newData = val;
|
|
111
122
|
},
|
|
112
123
|
deep: true,
|
|
@@ -128,7 +139,9 @@ export default {
|
|
|
128
139
|
getSysCode() {
|
|
129
140
|
const { url, method, sysAppCode, param } = this;
|
|
130
141
|
let params = {
|
|
131
|
-
url: this.baseUrl
|
|
142
|
+
url: this.baseUrl
|
|
143
|
+
? this.baseUrl + (url || findSysCode)
|
|
144
|
+
: url || findSysCode,
|
|
132
145
|
type: method,
|
|
133
146
|
params: {
|
|
134
147
|
ccCode: sysAppCode,
|
|
@@ -137,15 +150,18 @@ export default {
|
|
|
137
150
|
};
|
|
138
151
|
request(params)
|
|
139
152
|
.then(res => {
|
|
140
|
-
const { status, data, message } = res;
|
|
141
|
-
if (status == 'success') {
|
|
142
|
-
data.map(item => {
|
|
143
|
-
item.name =
|
|
144
|
-
|
|
153
|
+
const { status, data, message, rCode, results } = res;
|
|
154
|
+
if (status == 'success' || rCode === 0 || status === true) {
|
|
155
|
+
[...(data || results)].map(item => {
|
|
156
|
+
item.name = this.allowHtml
|
|
157
|
+
? item[sysAppCode ? 'shortName' : this.labelKey]
|
|
158
|
+
: item[sysAppCode ? 'shortName' : this.labelKey].replace(
|
|
159
|
+
/<[^>]+>/g,
|
|
160
|
+
''
|
|
161
|
+
);
|
|
162
|
+
item.value = item[sysAppCode ? 'cciValue' : this.value];
|
|
145
163
|
});
|
|
146
|
-
this.newData = data;
|
|
147
|
-
console.log(this.newData, 'this.newData');
|
|
148
|
-
if (this.isTable) this.$emit('tableColumns', this.newData);
|
|
164
|
+
this.newData = data || results;
|
|
149
165
|
} else {
|
|
150
166
|
this.$toast(message);
|
|
151
167
|
}
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
/>
|
|
260
260
|
</div>
|
|
261
261
|
<!-- 主办 -->
|
|
262
|
-
<div class="item" v-if="isMainSubProcess">
|
|
262
|
+
<div class="item" v-if="isMainSubProcess && isNodeShowProcess">
|
|
263
263
|
<!-- <van-field
|
|
264
264
|
value="主办"
|
|
265
265
|
label="主办"
|
|
@@ -485,6 +485,7 @@ export default {
|
|
|
485
485
|
isOtherUnit: true, //是否是外单位
|
|
486
486
|
isShowNode: false,
|
|
487
487
|
subProcessInfo: '',
|
|
488
|
+
isNodeShowProcess: false, //是否展示主办
|
|
488
489
|
isHiddenOftenOpinion: undefined, //是否隐藏常用意见
|
|
489
490
|
isAddSignList: [{ name: '是', value: '1' }, { name: '否', value: '2' }],
|
|
490
491
|
form: {
|
|
@@ -632,7 +633,7 @@ export default {
|
|
|
632
633
|
},
|
|
633
634
|
computed: {
|
|
634
635
|
subProcessColumns() {
|
|
635
|
-
if (!this.isMainSubProcess) return [];
|
|
636
|
+
if (!this.isMainSubProcess || !this.isNodeShowProcess) return [];
|
|
636
637
|
let data = [];
|
|
637
638
|
let obj = { name: '[部门员工]-' };
|
|
638
639
|
this.nextCurrentOrgObjSelect.map(x => {
|
|
@@ -724,7 +725,8 @@ export default {
|
|
|
724
725
|
Accept: 'application/json,text/plain'
|
|
725
726
|
},
|
|
726
727
|
type: 'post',
|
|
727
|
-
params: formData
|
|
728
|
+
params: formData,
|
|
729
|
+
format:false
|
|
728
730
|
})
|
|
729
731
|
.then(res => {
|
|
730
732
|
const { status, message } = res;
|
|
@@ -892,7 +894,9 @@ export default {
|
|
|
892
894
|
? taskHandleHtmlImg
|
|
893
895
|
: taskHandleHtml,
|
|
894
896
|
type: 'post',
|
|
895
|
-
params: formData
|
|
897
|
+
params: formData,
|
|
898
|
+
format:false
|
|
899
|
+
|
|
896
900
|
}).then(res => {
|
|
897
901
|
this.$toast.clear();
|
|
898
902
|
if (res.status == 'success') {
|
|
@@ -945,6 +949,7 @@ export default {
|
|
|
945
949
|
this.isNextUser = false;
|
|
946
950
|
this.isShowNode = false;
|
|
947
951
|
this.isMainSubProcess = false;
|
|
952
|
+
this.isNodeShowProcess = false;
|
|
948
953
|
this.form.nextNodeId = '';
|
|
949
954
|
this.form.isReturnSubmitter = 0;
|
|
950
955
|
this.form.isUndertakeReply = 0;
|
|
@@ -1406,6 +1411,9 @@ export default {
|
|
|
1406
1411
|
this.countersignaturetypeText = res.data.countersignaturetypeText;
|
|
1407
1412
|
//如果当前为承办节点/会签节点,则展示本单位外单位办理人选择
|
|
1408
1413
|
if (this.nodeType === 1 || this.nodeType === 2) {
|
|
1414
|
+
this.isMainSubProcess === true
|
|
1415
|
+
? (this.isNodeShowProcess = true)
|
|
1416
|
+
: (this.isNodeShowProcess = false);
|
|
1409
1417
|
this.isMainSubProcess === true
|
|
1410
1418
|
? (this.isMainSubProcess = true)
|
|
1411
1419
|
: (this.isMainSubProcess = false);
|
|
@@ -1418,6 +1426,7 @@ export default {
|
|
|
1418
1426
|
this.isHideCurrentOrg = false;
|
|
1419
1427
|
this.isHideOtherOrg = false;
|
|
1420
1428
|
this.isMainSubProcess = false;
|
|
1429
|
+
this.isNodeShowProcess = false
|
|
1421
1430
|
this.isNextUser = true;
|
|
1422
1431
|
// this.isMainSubProcess === true
|
|
1423
1432
|
// ? (this.isMainSubProcess = true)
|
|
@@ -53,13 +53,13 @@ export default {
|
|
|
53
53
|
pendingId: String,
|
|
54
54
|
beforeSubmit: Function,
|
|
55
55
|
baseUrl: String,
|
|
56
|
-
|
|
56
|
+
esign: {
|
|
57
57
|
type: Boolean,
|
|
58
58
|
default: false
|
|
59
59
|
},
|
|
60
|
-
userId:{
|
|
61
|
-
type:String,
|
|
62
|
-
default:''
|
|
60
|
+
userId: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ''
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
data() {
|
|
@@ -71,9 +71,9 @@ export default {
|
|
|
71
71
|
notificationMsg: undefined, //系统消息
|
|
72
72
|
nextNodeId: undefined,
|
|
73
73
|
loginType: 2, //登录方式
|
|
74
|
-
isImageOpinion:0
|
|
74
|
+
isImageOpinion: 0
|
|
75
75
|
},
|
|
76
|
-
file:'',
|
|
76
|
+
file: '',
|
|
77
77
|
processObj: {
|
|
78
78
|
taskExamine: { nodeName: undefined },
|
|
79
79
|
nodeInfoMap: { nextUserList: [] }
|
|
@@ -114,7 +114,14 @@ export default {
|
|
|
114
114
|
},
|
|
115
115
|
// 提交流程
|
|
116
116
|
onSubmit() {
|
|
117
|
-
if (
|
|
117
|
+
if (
|
|
118
|
+
(!this.form.opinion &&
|
|
119
|
+
this.isBanInputOpinion == 0 &&
|
|
120
|
+
this.form.isImageOpinion == 0) ||
|
|
121
|
+
(!this.file &&
|
|
122
|
+
this.isBanInputOpinion == 0 &&
|
|
123
|
+
this.form.isImageOpinion == 1)
|
|
124
|
+
) {
|
|
118
125
|
this.$toast('请输入审批意见');
|
|
119
126
|
return;
|
|
120
127
|
}
|
|
@@ -134,7 +141,7 @@ export default {
|
|
|
134
141
|
formData.append('file', this.file);
|
|
135
142
|
}
|
|
136
143
|
formData.append('pendingId', this.pendingId);
|
|
137
|
-
this.form.userId = this.userId
|
|
144
|
+
this.form.userId = this.userId;
|
|
138
145
|
for (let key in this.form) {
|
|
139
146
|
if (this.form[key] !== '' && this.form[key] !== undefined) {
|
|
140
147
|
formData.append(key, this.form[key]);
|
|
@@ -151,7 +158,8 @@ export default {
|
|
|
151
158
|
request({
|
|
152
159
|
url: _that.baseUrl ? _that.baseUrl + taskRejectHtml : taskRejectHtml,
|
|
153
160
|
type: 'post',
|
|
154
|
-
params: formData
|
|
161
|
+
params: formData,
|
|
162
|
+
format:false
|
|
155
163
|
}).then(res => {
|
|
156
164
|
if (res.status == 'success') {
|
|
157
165
|
this.$toast('操作成功');
|
|
@@ -309,7 +309,8 @@ export default {
|
|
|
309
309
|
request({
|
|
310
310
|
url: _that.apiBaseUrl ? _that.apiBaseUrl + registerNew : registerNew,
|
|
311
311
|
type: 'post',
|
|
312
|
-
params: formData
|
|
312
|
+
params: formData,
|
|
313
|
+
format:false
|
|
313
314
|
}).then(res => {
|
|
314
315
|
this.$toast.clear();
|
|
315
316
|
if (res.rCode == 0) {
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
:required="required"
|
|
11
11
|
:label-width="labelWidth"
|
|
12
12
|
:hideLabel="hideLabel"
|
|
13
|
-
:placeholder="
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
:placeholder="
|
|
14
|
+
pickerValue
|
|
15
|
+
? pickerValue
|
|
16
|
+
: disabled || readonly
|
|
17
|
+
? '暂无数据'
|
|
18
|
+
: placeholder
|
|
19
|
+
? placeholder
|
|
20
|
+
: `请选择${label}`
|
|
21
|
+
"
|
|
20
22
|
@click="handlePicker"
|
|
21
23
|
/>
|
|
22
24
|
<em-input
|
|
@@ -308,9 +310,9 @@ export default {
|
|
|
308
310
|
},
|
|
309
311
|
methods: {
|
|
310
312
|
handleClick(val) {
|
|
311
|
-
if(this.linkTag){
|
|
313
|
+
if (this.linkTag) {
|
|
312
314
|
this.$emit('tagClick', val);
|
|
313
|
-
}else{
|
|
315
|
+
} else {
|
|
314
316
|
this.showPicker = true;
|
|
315
317
|
}
|
|
316
318
|
},
|
|
@@ -455,27 +457,30 @@ export default {
|
|
|
455
457
|
this.newLoading = true;
|
|
456
458
|
request(params)
|
|
457
459
|
.then(res => {
|
|
458
|
-
const { status, data, message } = res;
|
|
460
|
+
const { status, data, message, rCode, results } = res;
|
|
459
461
|
this.listLoading = false;
|
|
460
|
-
if (status == 'success') {
|
|
461
|
-
let info = this.resultsName
|
|
462
|
+
if (status == 'success' || rCode === 0|| status === true) {
|
|
463
|
+
let info = this.resultsName
|
|
464
|
+
? data
|
|
465
|
+
? data[this.resultsName]
|
|
466
|
+
: results[this.resultsName]
|
|
467
|
+
: data
|
|
468
|
+
? data
|
|
469
|
+
: results;
|
|
462
470
|
info.map(x => {
|
|
463
471
|
if (this.isCheck) {
|
|
464
472
|
x.name =
|
|
465
|
-
x[
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
].replace(/<[^>]+>/g, '');
|
|
473
|
+
x[sysAppCode ? 'shortName' : this.labelKey] &&
|
|
474
|
+
x[sysAppCode ? 'shortName' : this.labelKey].replace(
|
|
475
|
+
/<[^>]+>/g,
|
|
476
|
+
''
|
|
477
|
+
);
|
|
471
478
|
} else {
|
|
472
|
-
x.name =
|
|
473
|
-
x[(this.labelKey != 'name' && this.labelKey) || 'shortName'];
|
|
479
|
+
x.name = x[sysAppCode ? 'shortName' : this.labelKey];
|
|
474
480
|
}
|
|
475
|
-
x.value =
|
|
476
|
-
x[(this.valueKey != 'value' && this.valueKey) || 'cciValue'];
|
|
481
|
+
x.value = x[sysAppCode ? 'cciValue' : this.valueKey];
|
|
477
482
|
});
|
|
478
|
-
if (data.totalCount) {
|
|
483
|
+
if (data && data.totalCount) {
|
|
479
484
|
this.total = data.totalCount;
|
|
480
485
|
if (data.totalCount === this.newColumns.length) {
|
|
481
486
|
this.listFinished = true;
|
|
@@ -491,7 +496,6 @@ export default {
|
|
|
491
496
|
this.listFinished = true;
|
|
492
497
|
this.newColumns = info;
|
|
493
498
|
}
|
|
494
|
-
if (this.isTable) this.$emit('tableColumns', this.newColumns);
|
|
495
499
|
if (this.beforResponse) {
|
|
496
500
|
this.newColumns = this.beforResponse(this.newColumns);
|
|
497
501
|
this.getValue();
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:disabled="item.disabled"
|
|
14
14
|
:name="item[valueKey]"
|
|
15
15
|
>
|
|
16
|
-
|
|
16
|
+
<span v-html="item[labelKey]"></span>
|
|
17
17
|
<slot slot="icon" :checked="item[valueKey] == newRadio"></slot>
|
|
18
18
|
</van-radio>
|
|
19
19
|
</van-radio-group>
|
|
@@ -88,7 +88,11 @@ export default {
|
|
|
88
88
|
type: Boolean,
|
|
89
89
|
default: false
|
|
90
90
|
},
|
|
91
|
-
baseUrl: String
|
|
91
|
+
baseUrl: String,
|
|
92
|
+
allowHtml: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false
|
|
95
|
+
}
|
|
92
96
|
},
|
|
93
97
|
computed: {
|
|
94
98
|
newRadio: {
|
|
@@ -104,6 +108,11 @@ export default {
|
|
|
104
108
|
watch: {
|
|
105
109
|
data: {
|
|
106
110
|
handler(val) {
|
|
111
|
+
val.map(item => {
|
|
112
|
+
item[this.labelKey] = this.allowHtml
|
|
113
|
+
? item[this.labelKey]
|
|
114
|
+
: item[this.labelKey].replace(/<[^>]+>/g, '');
|
|
115
|
+
});
|
|
107
116
|
this.newData = val;
|
|
108
117
|
},
|
|
109
118
|
deep: true,
|
|
@@ -139,14 +148,18 @@ export default {
|
|
|
139
148
|
};
|
|
140
149
|
request(params)
|
|
141
150
|
.then(res => {
|
|
142
|
-
const { status, data, message } = res;
|
|
143
|
-
if (status == 'success') {
|
|
144
|
-
data.map(item => {
|
|
145
|
-
item.name =
|
|
146
|
-
|
|
151
|
+
const { status, data, message, rCode, results } = res;
|
|
152
|
+
if (status == 'success' || rCode === 0 || status === true) {
|
|
153
|
+
[...(data || results)].map(item => {
|
|
154
|
+
item.name = this.allowHtml
|
|
155
|
+
? item[sysAppCode ? 'shortName' : this.labelKey]
|
|
156
|
+
: item[sysAppCode ? 'shortName' : this.labelKey].replace(
|
|
157
|
+
/<[^>]+>/g,
|
|
158
|
+
''
|
|
159
|
+
);
|
|
160
|
+
item.value = item[sysAppCode ? 'cciValue' : this.value];
|
|
147
161
|
});
|
|
148
|
-
this.newData = data;
|
|
149
|
-
if (this.isTable) this.$emit('tableColumns', this.newData);
|
|
162
|
+
this.newData = data || results;
|
|
150
163
|
} else {
|
|
151
164
|
this.$toast(message);
|
|
152
165
|
}
|