eoss-mobiles 0.2.13 → 0.2.15

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.
Files changed (38) hide show
  1. package/lib/checkbox.js +260 -199
  2. package/lib/config/api.js +4 -1
  3. package/lib/date.js +3 -3
  4. package/lib/eoss-mobile.common.js +746 -249
  5. package/lib/flow.js +362 -277
  6. package/lib/index.js +1 -1
  7. package/lib/notice-bar.js +2 -2
  8. package/lib/picker.js +260 -199
  9. package/lib/pull-refresh.js +2 -2
  10. package/lib/radio.js +260 -199
  11. package/lib/retrial-auth.js +2457 -0
  12. package/lib/selector.js +294 -233
  13. package/lib/table-column.js +260 -199
  14. package/lib/table.js +227 -172
  15. package/lib/theme-chalk/index.css +1 -1
  16. package/lib/theme-chalk/retrial-auth.css +1 -0
  17. package/lib/utils/axios.js +140 -154
  18. package/lib/utils/http.js +5 -5
  19. package/lib/utils/util.js +71 -2
  20. package/package.json +1 -1
  21. package/packages/date/src/main.vue +1 -1
  22. package/packages/flow/src/components/Handle.vue +4 -1
  23. package/packages/flow/src/components/Opinion.vue +39 -3
  24. package/packages/flow/src/components/StartFlow.vue +3 -3
  25. package/packages/flow/src/main.vue +6 -0
  26. package/packages/retrial-auth/index.js +5 -0
  27. package/packages/retrial-auth/src/main.vue +257 -0
  28. package/packages/selector/src/selector-tree.vue +1 -1
  29. package/packages/selector/src/tree.vue +1 -1
  30. package/packages/theme-chalk/lib/index.css +1 -1
  31. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  32. package/packages/theme-chalk/src/index.scss +1 -0
  33. package/packages/theme-chalk/src/retrial-auth.scss +28 -0
  34. package/src/config/api.js +3 -0
  35. package/src/index.js +4 -1
  36. package/src/utils/axios.js +156 -174
  37. package/src/utils/http.js +15 -5
  38. package/src/utils/util.js +164 -84
@@ -19,169 +19,157 @@ var _qs2 = _interopRequireDefault(_qs);
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
 
21
21
  var apiUrl = _util2.default.getStorage('host');
22
- // import Vue from 'vue';
23
22
 
24
- var http = _axios2.default.create({
25
- baseURL: apiUrl,
26
- timeout: 60000,
27
- headers: {
28
- // clientKey: 'csjk'
29
- },
30
- withCredentials: false
31
- });
32
- http.interceptors.request.use(function (config) {
33
- var data = {};
34
- if (config.method === 'post') {
35
- // 特殊处理在线考试接口1
36
- if (config.url.search('HGtest') !== -1) {
37
- config.headers['Content-Type'] = 'application/json;';
38
- // config.data = qs.stringify(data);
39
- Object.assign(data, config.data);
40
- } else if (config.url.search('/outsidedirector/business/update') !== -1) {
41
- delete config.data.userId;
42
- } else if (config.url.indexOf('decisionSuperviseMeet') !== -1) {
43
- config.headers['Content-Type'] = 'application/x-www-form-urlencoded';
44
- Object.assign(data, config.data);
45
- config.data = _qs2.default.stringify(data);
23
+ var ajax = function ajax(url) {
24
+ var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
25
+ var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
26
+ var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
27
+ var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
28
+
29
+ var http = _axios2.default.create({
30
+ baseURL: apiUrl,
31
+ timeout: 60000,
32
+ headers: {
33
+ // clientKey: 'csjk'
34
+ },
35
+ withCredentials: false
36
+ });
37
+ http.interceptors.request.use(function (config) {
38
+ if (type === 'post' && format) {
39
+ config.data = _qs2.default.stringify(params);
40
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
41
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
42
+ }
46
43
  } else {
47
- config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
48
- if (Object.prototype.toString.call(config.data).slice(8, -1).toLowerCase() !== 'formdata') {
49
- Object.assign(data, config.data);
50
- config.data = _qs2.default.stringify(data);
44
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
45
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
51
46
  }
47
+ config.data = params;
52
48
  }
53
- } else {
54
- Object.assign(config.params, data);
55
- config.headers['Content-Type'] = 'application/json;';
56
- }
57
- if (_util2.default.getStorage('token')) {
58
- config.headers.Authorization = _util2.default.getStorage('token');
59
- }
60
- if (_util2.default.getStorage('deviceId')) {
61
- config.headers.deviceId = _util2.default.getStorage('deviceId');
62
- }
63
49
 
64
- var a = '/config/';
50
+ if (_util2.default.getStorage('token')) {
51
+ config.headers.Authorization = _util2.default.getStorage('token');
52
+ }
53
+ if (_util2.default.getStorage('deviceId')) {
54
+ config.headers.deviceId = _util2.default.getStorage('deviceId');
55
+ }
65
56
 
66
- if (config.url.search(a) !== -1 && config.url.search('appInfo') === -1) {
67
- config.headers.clientKey = _util2.default.getStorage('clientKey') || 'csjk2';
68
- }
69
- if (config.url.search('api/financePhone/') !== -1) {
70
- config.baseURL = 'https://release.cdgzjg.cn/';
71
- }
72
- if (config.url.search('affairs/getHandleInfosnew.json') !== -1) {
73
- config.headers = {
74
- token: sessionStorage.getItem('token'),
75
- oueside_token: sessionStorage.getItem('token'),
76
- deviceId: '432a320f99793e39',
77
- Authorization: sessionStorage.getItem('token')
78
- };
79
- }
80
- if (config.url.search('/getmyAccount.json') !== -1) {
81
- delete config.params.userId;
82
- }
83
- if (config.url.search('/sso2/authCenter') !== -1) {
84
- delete config.headers.clientKey;
85
- delete config.headers.deviceId;
86
- }
87
- if (config.url.search('/appInfo') !== -1) {
88
- config.headers.deviceId = _util2.default.getStorage('deviceId');
89
- delete config.headers.clientKey;
90
- }
91
- if (config.url.search('getPresetCustomInfo') !== -1 || config.url.search('registerNew') !== -1) {
92
- // config.baseURL = "/api";
93
- config.headers.token = _util2.default.getStorage('token');
94
- }
95
- if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
96
- delete config.headers.deviceId;
97
- }
98
- // if(config.url.search('getVehicleMaintenanceInfoForAPP') !== -1 ) {
99
- // delete config.headers.deviceId
100
- // delete config.headers.Authorization
101
- // delete config.headers.clientKey
102
- // }
103
- if (config.url.search('/bpm') !== -1) {
104
- // config.baseURL = "/api";
105
- // config.headers.Authorization = $.getStorage('token');
106
- // config.headers.Deviceunique = $.getStorage('deviceunique');
107
- // config.headers.Ssid = $.getStorage('ssid');
108
- // delete config.headers.deviceId;
109
- // delete config.headers.clientKey;
110
- }
111
- return config;
112
- }, function (error) {
113
- return Promise.error(error);
114
- });
115
- // 响应拦截器
116
- http.interceptors.response.use(function (response) {
117
- if (response.status === 200) {
118
- if (response.data.rCode === 64 || response.data.rCode === 27) {
119
- _util2.default.H5TokenInvalid();
120
- } else {
121
- return Promise.resolve(response.data);
57
+ var a = '/config/';
58
+
59
+ if (config.url.search(a) !== -1 && config.url.search('appInfo') === -1) {
60
+ config.headers.clientKey = _util2.default.getStorage('clientKey') || 'csjk2';
122
61
  }
123
- } else {
124
- return Promise.reject(response);
125
- }
126
- }, function (error) {
127
- if (error && error.response) {
128
- if (error.response.status) {
129
- switch (error.response.status) {
130
- case 400:
131
- error.message = '错误请求';
132
- break;
133
- case 401:
134
- error.message = '未授权,请重新登录';
135
- break;
136
- case 403:
137
- error.message = '登录过期,请重新登录';
138
- _util2.default.removeStorage('userId');
139
- break;
140
- case 404:
141
- error.message = '网络请求不存在';
142
- break;
143
- case 405:
144
- error.message = '请求方法错误';
145
- break;
146
- case 408:
147
- error.message = '请求超时';
148
- break;
149
- case 500:
150
- error.message = '服务器端出错';
151
- break;
152
- case 501:
153
- error.message = '网络未实现';
154
- break;
155
- case 502:
156
- error.message = '网络错误';
157
- break;
158
- case 503:
159
- error.message = '服务不可用';
160
- break;
161
- case 504:
162
- error.message = '网络超时';
163
- break;
164
- case 505:
165
- error.message = 'http版本不支持该请求';
166
- break;
167
- default:
168
- error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
62
+ if (config.url.search('api/financePhone/') !== -1) {
63
+ config.baseURL = 'https://release.cdgzjg.cn/';
64
+ }
65
+ if (config.url.search('affairs/getHandleInfosnew.json') !== -1) {
66
+ config.headers = {
67
+ token: sessionStorage.getItem('token'),
68
+ oueside_token: sessionStorage.getItem('token'),
69
+ deviceId: '432a320f99793e39',
70
+ Authorization: sessionStorage.getItem('token')
71
+ };
72
+ }
73
+ if (config.url.search('/getmyAccount.json') !== -1) {
74
+ delete config.params.userId;
75
+ }
76
+ if (config.url.search('/sso2/authCenter') !== -1) {
77
+ delete config.headers.clientKey;
78
+ delete config.headers.deviceId;
79
+ }
80
+ if (config.url.search('/appInfo') !== -1) {
81
+ config.headers.deviceId = _util2.default.getStorage('deviceId');
82
+ delete config.headers.clientKey;
83
+ }
84
+ if (config.url.search('getPresetCustomInfo') !== -1 || config.url.search('registerNew') !== -1) {
85
+ config.headers.token = _util2.default.getStorage('token');
86
+ }
87
+ if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
88
+ delete config.headers.deviceId;
89
+ }
90
+ return config;
91
+ }, function (error) {
92
+ return Promise.error(error);
93
+ });
94
+ http.interceptors.response.use(function (response) {
95
+ if (response.status === 200) {
96
+ if (response.data.rCode === 64 || response.data.rCode === 27) {
97
+ _util2.default.H5TokenInvalid();
98
+ } else {
99
+ return Promise.resolve(response.data);
169
100
  }
170
101
  } else {
171
- error.message = '接口出现问题,无法请求';
102
+ return Promise.reject(response.data);
172
103
  }
173
- }
174
- (0, _eossMobileVant.Toast)({
175
- message: error.message,
176
- duration: 1500,
177
- forbidClick: true
104
+ }, function (error) {
105
+ if (error && error.response) {
106
+ if (error.response.status) {
107
+ switch (error.response.status) {
108
+ case 400:
109
+ error.message = '错误请求';
110
+ break;
111
+ case 401:
112
+ error.message = '未授权,请重新登录';
113
+ break;
114
+ case 403:
115
+ error.message = '登录过期,请重新登录';
116
+ _util2.default.removeStorage('userId');
117
+ break;
118
+ case 404:
119
+ error.message = '网络请求不存在';
120
+ break;
121
+ case 405:
122
+ error.message = '请求方法错误';
123
+ break;
124
+ case 408:
125
+ error.message = '请求超时';
126
+ break;
127
+ case 500:
128
+ error.message = '服务器端出错';
129
+ break;
130
+ case 501:
131
+ error.message = '网络未实现';
132
+ break;
133
+ case 502:
134
+ error.message = '网络错误';
135
+ break;
136
+ case 503:
137
+ error.message = '服务不可用';
138
+ break;
139
+ case 504:
140
+ error.message = '网络超时';
141
+ break;
142
+ case 505:
143
+ error.message = 'http版本不支持该请求';
144
+ break;
145
+ default:
146
+ error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
147
+ }
148
+ } else {
149
+ error.message = '接口出现问题,无法请求';
150
+ }
151
+ }
152
+ (0, _eossMobileVant.Toast)({
153
+ message: error.message,
154
+ duration: 1500,
155
+ forbidClick: true
156
+ });
157
+ return Promise.reject(error);
178
158
  });
179
- return Promise.reject(error);
180
- });
159
+ if (type === 'get' || type === 'GET') {
160
+ return http.get(url, params, headers, format);
161
+ } else {
162
+ return http.post(url, params, headers, format);
163
+ }
164
+ };
165
+
166
+ // 响应拦截器
181
167
 
182
168
  var base = {
183
169
  get: function get(url) {
184
170
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
171
+ var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
172
+ var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
185
173
 
186
174
  if (params.params && url.search('registerNew') === -1) {
187
175
  params.params.userId = params.params.userId ? params.params.userId : _util2.default.getStorage('userId');
@@ -198,19 +186,17 @@ var base = {
198
186
  params.userId = 'u1b9f3ce4731649e0b665af015d74c19b';
199
187
  }
200
188
  }
201
- return http.get(url, {
189
+ return ajax(url, {
202
190
  params: params
203
- });
191
+ }, headers, format);
204
192
  },
205
- post: function post(url) {
206
- var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
207
-
193
+ post: function post(url, params, headers, format) {
208
194
  if (params.params) {
209
195
  params.params.userId = params.params.userId || _util2.default.getStorage('userId');
210
196
  } else {
211
197
  params.userId = params.userId || _util2.default.getStorage('userId');
212
198
  }
213
- return http.post(url, params);
199
+ return ajax(url, params, headers, format, 'post');
214
200
  }
215
201
  };
216
202
  exports.default = base;
package/lib/utils/http.js CHANGED
@@ -12,19 +12,19 @@ var request = function request(options) {
12
12
  var fn = void 0;
13
13
  switch (options.type) {
14
14
  case 'post':
15
- fn = _axios2.default.post(options.url, options.params);
15
+ fn = _axios2.default.post(options.url, options.params, options.headers, options.format);
16
16
  break;
17
17
  case 'POST':
18
- fn = _axios2.default.post(options.url, options.params);
18
+ fn = _axios2.default.post(options.url, options.params, options.headers, options.format);
19
19
  break;
20
20
  case 'get':
21
- fn = _axios2.default.get(options.url, options.params);
21
+ fn = _axios2.default.get(options.url, options.params, options.headers = {});
22
22
  break;
23
23
  case 'GET':
24
- fn = _axios2.default.get(options.url, options.params);
24
+ fn = _axios2.default.get(options.url, options.params, options.headers = {});
25
25
  break;
26
26
  default:
27
- fn = _axios2.default.get(options.url, options.params);
27
+ fn = _axios2.default.get(options.url, options.params, options.headers = {});
28
28
  }
29
29
  return fn;
30
30
  };
package/lib/utils/util.js CHANGED
@@ -8,8 +8,43 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
8
8
 
9
9
  var _color = require('@eoss-design/color');
10
10
 
11
+ // import CryptoJS from 'crypto-js'
11
12
  var sm2 = require('sm-crypto').sm2;
12
-
13
+ // /**
14
+ // * esEncrypt
15
+ // * @desc:sm2加密
16
+ // * @author huangbo
17
+ // * @date 2022年5月7日
18
+ // * @param {string} [data] - 被加密的字符串
19
+ // * @param {string} [key] - 公钥
20
+ // **/
21
+ // const encryptDes = (message, key) => {
22
+ // const keyHex = CryptoJS.enc.Utf8.parse(key);
23
+ // const encrypted = CryptoJS.DES.encrypt(message, keyHex, {
24
+ // mode: CryptoJS.mode.ECB,
25
+ // padding: CryptoJS.pad.Pkcs7
26
+ // });
27
+ // return encrypted.toString();
28
+ // }
29
+ // /**
30
+ // * esEncrypt
31
+ // * @desc:sm2加密
32
+ // * @author huangbo
33
+ // * @date 2022年5月7日
34
+ // * @param {string} [data] - 被加密的字符串
35
+ // * @param {string} [key] - 公钥
36
+ // **/
37
+ // const decryptDes = (ciphertext, key) => {
38
+ // const keyHex = CryptoJS.enc.Utf8.parse(key);
39
+ // // direct decrypt ciphertext
40
+ // const decrypted = CryptoJS.DES.decrypt({
41
+ // ciphertext: CryptoJS.enc.Base64.parse(ciphertext)
42
+ // }, keyHex, {
43
+ // mode: CryptoJS.mode.ECB,
44
+ // padding: CryptoJS.pad.Pkcs7
45
+ // });
46
+ // return decrypted.toString(CryptoJS.enc.Utf8);
47
+ // }
13
48
  /**
14
49
  * esEncrypt
15
50
  * @desc:sm2加密
@@ -1211,6 +1246,23 @@ var openAttachment = function openAttachment(data) {
1211
1246
  }
1212
1247
  }
1213
1248
  };
1249
+ /**
1250
+ * jsGoPayrollIndexAct
1251
+ * @desc:原生app打开工资条页面
1252
+ * @date 2024年1月11日
1253
+ * @author liufan
1254
+ */
1255
+ var jsGoPayrollIndexAct = function jsGoPayrollIndexAct(id) {
1256
+ var u = navigator.userAgent;
1257
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1258
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1259
+ if (isAndroid) {
1260
+ window.AndroidWebView.jsGoPayrollIndexAct(id);
1261
+ } else if (isiOS) {
1262
+ window.webkit.messageHandlers.jsGoPayrollIndexAct.postMessage(id);
1263
+ }
1264
+ };
1265
+
1214
1266
  /**
1215
1267
  * deepClone
1216
1268
  * @desc:深拷贝
@@ -1268,6 +1320,21 @@ var exclAttribute = function exclAttribute(_ref4) {
1268
1320
  }
1269
1321
  return obj;
1270
1322
  };
1323
+ /**
1324
+ * 获取UUID
1325
+ * @desc:generateUUID
1326
+ * @author liufan
1327
+ * @date 2024年1月12日
1328
+ **/
1329
+ var generateUUID = function generateUUID() {
1330
+ var d = new Date().getTime();
1331
+ var uuid = 'xxxxxxxxxxxxxxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
1332
+ var r = (d + Math.random() * 16) % 16 | 0;
1333
+ d = Math.floor(d / 16);
1334
+ return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
1335
+ });
1336
+ return uuid;
1337
+ };
1271
1338
  exports.default = {
1272
1339
  esEncrypt: esEncrypt,
1273
1340
  esDecode: esDecode,
@@ -1311,5 +1378,7 @@ exports.default = {
1311
1378
  getTypeName: getTypeName,
1312
1379
  replenish: replenish,
1313
1380
  identical: identical,
1314
- exportXls: exportXls
1381
+ jsGoPayrollIndexAct: jsGoPayrollIndexAct,
1382
+ exportXls: exportXls,
1383
+ generateUUID: generateUUID
1315
1384
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-mobiles",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
@@ -327,7 +327,7 @@ export default {
327
327
  h +
328
328
  (this.joinStr ? ' ' : '时');
329
329
  } else if (type === 'year' && newValue != 'Invalid Date') {
330
- value = y + (this.joinStr || '年');
330
+ value = y + (this.joinStr? '' : '年');
331
331
  }
332
332
  return value;
333
333
  },
@@ -21,6 +21,8 @@
21
21
  :isOpinionRequired="isOpinionRequired"
22
22
  :disabled="isBanInputOpinion != 0"
23
23
  :baseUrl="baseUrl"
24
+ :isForceDisplayDefaultOptionForPrefix="isForceDisplayDefaultOptionForPrefix"
25
+ :nodeDefaultSubmitOpinion="nodeDefaultSubmitOpinion"
24
26
  :nodeFixedOpinionSelectList="nodeFixedOpinionSelectList"
25
27
  :isHiddenOftenOpinion="isHiddenOftenOpinion == 1 ? false : true"
26
28
  ></Opinion>
@@ -295,7 +297,6 @@
295
297
  v-model="nextReadUserSelectList"
296
298
  multiple
297
299
  :objType="objType"
298
- required
299
300
  :param="{
300
301
  pid: pid
301
302
  }"
@@ -479,6 +480,7 @@ export default {
479
480
  objType: 'enterprise', //树点击对象
480
481
  selectType: 'employee', // 树 选择类型
481
482
  isNextBox: true, // 是否展开隐藏下步操作
483
+ isForceDisplayDefaultOptionForPrefix:false,
482
484
  isOtherUnit: true, //是否是外单位
483
485
  isShowNode: false,
484
486
  subProcessInfo: '',
@@ -1281,6 +1283,7 @@ export default {
1281
1283
  // that.isChooseNextNode = nodeInfoMap.nodeExtAttr.isChooseNextNode;
1282
1284
  that.isBanInputOpinion =
1283
1285
  nodeInfoMap.nodeExtAttr.isBanInputOpinion;
1286
+ that.isForceDisplayDefaultOptionForPrefix = nodeInfoMap.nodeExtAttr.isForceDisplayDefaultOptionForPrefix == 1;
1284
1287
  }
1285
1288
  that.choiceOrgId = choiceOrgId;
1286
1289
  that.choiceDeptId = choiceDeptId;
@@ -32,7 +32,7 @@
32
32
  />
33
33
  <span
34
34
  class="em-flow-opion"
35
- v-if="opinionList.length > 0 && isHiddenOftenOpinion"
35
+ v-if="isHiddenOftenOpinion"
36
36
  @click="showPicker = true"
37
37
  >常用意见 <i class="iconfont icon-em-more"
38
38
  /></span>
@@ -88,7 +88,7 @@
88
88
  :columns="opinionList"
89
89
  valueKey="content"
90
90
  @cancel="handleClose"
91
- @confirm="onInput"
91
+ @confirm="onInput($event, true)"
92
92
  >
93
93
  </van-picker>
94
94
  </van-popup>
@@ -139,6 +139,14 @@ export default {
139
139
  userId: {
140
140
  type: String,
141
141
  default: ''
142
+ },
143
+ isForceDisplayDefaultOptionForPrefix: {
144
+ type: Boolean,
145
+ default: false
146
+ },
147
+ nodeDefaultSubmitOpinion: {
148
+ type: String,
149
+ default: ''
142
150
  }
143
151
  },
144
152
  // components: {
@@ -147,6 +155,7 @@ export default {
147
155
  data() {
148
156
  return {
149
157
  opinion: '',
158
+ newOpinion: '',
150
159
  fixedDisabled: false,
151
160
  showPicker: false,
152
161
  esignPath: '',
@@ -159,6 +168,17 @@ export default {
159
168
  opinionList: [] //意见列表
160
169
  };
161
170
  },
171
+ watch: {
172
+ isForceDisplayDefaultOptionForPrefix: {
173
+ handler(val) {
174
+ if (val) {
175
+ this.opinion = this.nodeDefaultSubmitOpinion;
176
+ }
177
+ },
178
+ deep: true,
179
+ immediate: true
180
+ }
181
+ },
162
182
  created() {
163
183
  if (this.nodeFixedOpinionSelectList.length > 0) {
164
184
  this.opinionList = this.nodeFixedOpinionSelectList;
@@ -202,9 +222,25 @@ export default {
202
222
  });
203
223
  },
204
224
  // 将input的值传递到父组件
205
- onInput(val) {
225
+ onInput(val, isSelect) {
206
226
  const { isImageOpinion, file } = this;
207
227
  this.opinion = typeof val === 'string' ? val : val.content;
228
+ if (
229
+ this.isForceDisplayDefaultOptionForPrefix &&
230
+ !this.opinion.startsWith(this.nodeDefaultSubmitOpinion) &&
231
+ !isSelect
232
+ ) {
233
+ this.opinion = this.nodeDefaultSubmitOpinion + this.newOpinion;
234
+ } else if (this.isForceDisplayDefaultOptionForPrefix && !isSelect) {
235
+ this.newOpinion = this.opinion.replace(
236
+ this.nodeDefaultSubmitOpinion,
237
+ ''
238
+ );
239
+ }
240
+ if (this.isForceDisplayDefaultOptionForPrefix && isSelect) {
241
+ this.newOpinion = this.opinion;
242
+ this.opinion = this.nodeDefaultSubmitOpinion + this.opinion;
243
+ }
208
244
  this.$emit('onInputOpintion', {
209
245
  opinion: this.opinion,
210
246
  isImageOpinion,
@@ -22,9 +22,9 @@
22
22
  <div class="input-box">
23
23
  <!-- 下一步所有相关操作-->
24
24
  <div>
25
- <div @click="isNextBox = !isNextBox" class="shrink-btn">
25
+ <!-- <div @click="isNextBox = !isNextBox" class="shrink-btn">
26
26
  {{ isNextBox ? '收起下一步操作和节点' : '展开下一步操作和节点' }}
27
- </div>
27
+ </div> -->
28
28
  <div class="next-box" v-show="isNextBox">
29
29
  <!-- 下一步操作 -->
30
30
  <div class="item">
@@ -164,7 +164,7 @@ export default {
164
164
  isChooseNextNode: 0,
165
165
  isOpinionRequired: 0, //办理意见是否必填
166
166
  isBanInputOpinion: 0, //是否禁用意见
167
- isNextBox: false, // 是否展开隐藏下步操作
167
+ isNextBox: true, // 是否展开隐藏下步操作
168
168
  defaultNotificationType: [], //选中消息数组
169
169
  // showAppUser: false, // 办理人遮罩层
170
170
  showNextList: false, // 下一步遮罩层
@@ -61,6 +61,12 @@ export default {
61
61
  },
62
62
  data() {
63
63
  return {};
64
+ },
65
+ mounted(){
66
+ for(let i=0;i<10;i++){
67
+ if(i == 2) return
68
+ console.log(i)
69
+ }
64
70
  }
65
71
  };
66
72
  </script>
@@ -0,0 +1,5 @@
1
+ import EmRetrialAuth from './src/main';
2
+
3
+ EmRetrialAuth.install = Vue => Vue.component(EmRetrialAuth.name, EmRetrialAuth);
4
+
5
+ export default EmRetrialAuth;