eoss-mobiles 0.3.13 → 0.3.14
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/lib/eoss-mobile.common.js +95 -54
- package/lib/flow.js +54 -25
- package/lib/index.js +1 -1
- package/lib/selector.js +40 -28
- package/package.json +1 -1
- package/packages/flow/src/components/Handle.vue +7 -2
- package/packages/flow/src/components/Message.vue +7 -1
- package/packages/flow/src/components/StartFlow.vue +8 -0
- package/packages/selector/src/selector-tree.vue +80 -61
- package/packages/selector/src/tree.vue +4 -4
- package/src/index.js +1 -1
package/lib/selector.js
CHANGED
|
@@ -2232,8 +2232,8 @@ render._withStripped = true
|
|
|
2232
2232
|
|
|
2233
2233
|
// CONCATENATED MODULE: ./packages/selector/src/main.vue?vue&type=template&id=17308961
|
|
2234
2234
|
|
|
2235
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector-tree.vue?vue&type=template&id=
|
|
2236
|
-
var
|
|
2235
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector-tree.vue?vue&type=template&id=d4e42ba6
|
|
2236
|
+
var selector_treevue_type_template_id_d4e42ba6_render = function () {
|
|
2237
2237
|
var _vm = this
|
|
2238
2238
|
var _h = _vm.$createElement
|
|
2239
2239
|
var _c = _vm._self._c || _h
|
|
@@ -2413,14 +2413,14 @@ var selector_treevue_type_template_id_347d4352_render = function () {
|
|
|
2413
2413
|
1
|
|
2414
2414
|
)
|
|
2415
2415
|
}
|
|
2416
|
-
var
|
|
2417
|
-
|
|
2416
|
+
var selector_treevue_type_template_id_d4e42ba6_staticRenderFns = []
|
|
2417
|
+
selector_treevue_type_template_id_d4e42ba6_render._withStripped = true
|
|
2418
2418
|
|
|
2419
2419
|
|
|
2420
|
-
// CONCATENATED MODULE: ./packages/selector/src/selector-tree.vue?vue&type=template&id=
|
|
2420
|
+
// CONCATENATED MODULE: ./packages/selector/src/selector-tree.vue?vue&type=template&id=d4e42ba6
|
|
2421
2421
|
|
|
2422
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/tree.vue?vue&type=template&id=
|
|
2423
|
-
var
|
|
2422
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/tree.vue?vue&type=template&id=207ee6a0
|
|
2423
|
+
var treevue_type_template_id_207ee6a0_render = function () {
|
|
2424
2424
|
var _vm = this
|
|
2425
2425
|
var _h = _vm.$createElement
|
|
2426
2426
|
var _c = _vm._self._c || _h
|
|
@@ -2579,12 +2579,13 @@ var treevue_type_template_id_1d5109d4_render = function () {
|
|
|
2579
2579
|
rawName: "v-show",
|
|
2580
2580
|
value:
|
|
2581
2581
|
(_vm.enterprise ||
|
|
2582
|
-
(_vm.
|
|
2582
|
+
(_vm.selectType ==
|
|
2583
|
+
_vm.departmentValueKey &&
|
|
2583
2584
|
item[_vm.departmentLabelKey] ==
|
|
2584
2585
|
_vm.departmentValueKey)) &&
|
|
2585
2586
|
!_vm.showTree,
|
|
2586
2587
|
expression:
|
|
2587
|
-
"\n (enterprise ||\n (
|
|
2588
|
+
"\n (enterprise ||\n (selectType == departmentValueKey && \n item[departmentLabelKey] == departmentValueKey)) &&\n !showTree\n ",
|
|
2588
2589
|
},
|
|
2589
2590
|
{
|
|
2590
2591
|
name: "tap",
|
|
@@ -2606,12 +2607,13 @@ var treevue_type_template_id_1d5109d4_render = function () {
|
|
|
2606
2607
|
rawName: "v-show",
|
|
2607
2608
|
value:
|
|
2608
2609
|
(_vm.enterprise ||
|
|
2609
|
-
(_vm.
|
|
2610
|
+
(_vm.selectType ==
|
|
2611
|
+
_vm.departmentValueKey &&
|
|
2610
2612
|
item[_vm.departmentLabelKey] ==
|
|
2611
2613
|
_vm.departmentValueKey)) &&
|
|
2612
2614
|
!_vm.showTree,
|
|
2613
2615
|
expression:
|
|
2614
|
-
"\n (enterprise ||\n (
|
|
2616
|
+
"\n (enterprise ||\n (selectType == departmentValueKey && \n item[departmentLabelKey] == departmentValueKey)) &&\n !showTree\n ",
|
|
2615
2617
|
},
|
|
2616
2618
|
{
|
|
2617
2619
|
name: "tap",
|
|
@@ -2752,7 +2754,7 @@ var treevue_type_template_id_1d5109d4_render = function () {
|
|
|
2752
2754
|
item.attr &&
|
|
2753
2755
|
(!item.nocheck ||
|
|
2754
2756
|
_vm.enterprise ||
|
|
2755
|
-
(_vm.
|
|
2757
|
+
(_vm.selectType == _vm.departmentValueKey &&
|
|
2756
2758
|
item[_vm.departmentLabelKey] ==
|
|
2757
2759
|
_vm.departmentValueKey)) &&
|
|
2758
2760
|
!_vm.showTree &&
|
|
@@ -2768,7 +2770,7 @@ var treevue_type_template_id_1d5109d4_render = function () {
|
|
|
2768
2770
|
),
|
|
2769
2771
|
(!item.nocheck ||
|
|
2770
2772
|
_vm.enterprise ||
|
|
2771
|
-
(_vm.
|
|
2773
|
+
(_vm.selectType == _vm.departmentValueKey &&
|
|
2772
2774
|
item[_vm.departmentLabelKey] ==
|
|
2773
2775
|
_vm.departmentValueKey)) &&
|
|
2774
2776
|
!_vm.showTree
|
|
@@ -2813,11 +2815,11 @@ var treevue_type_template_id_1d5109d4_render = function () {
|
|
|
2813
2815
|
0
|
|
2814
2816
|
)
|
|
2815
2817
|
}
|
|
2816
|
-
var
|
|
2817
|
-
|
|
2818
|
+
var treevue_type_template_id_207ee6a0_staticRenderFns = []
|
|
2819
|
+
treevue_type_template_id_207ee6a0_render._withStripped = true
|
|
2818
2820
|
|
|
2819
2821
|
|
|
2820
|
-
// CONCATENATED MODULE: ./packages/selector/src/tree.vue?vue&type=template&id=
|
|
2822
|
+
// CONCATENATED MODULE: ./packages/selector/src/tree.vue?vue&type=template&id=207ee6a0
|
|
2821
2823
|
|
|
2822
2824
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/tree.vue?vue&type=script&lang=js
|
|
2823
2825
|
//
|
|
@@ -3240,8 +3242,8 @@ var componentNormalizer = __webpack_require__(1);
|
|
|
3240
3242
|
|
|
3241
3243
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
3242
3244
|
src_treevue_type_script_lang_js,
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
+
treevue_type_template_id_207ee6a0_render,
|
|
3246
|
+
treevue_type_template_id_207ee6a0_staticRenderFns,
|
|
3245
3247
|
false,
|
|
3246
3248
|
null,
|
|
3247
3249
|
null,
|
|
@@ -3815,6 +3817,9 @@ var _props, _methods;
|
|
|
3815
3817
|
var copyTabs = this.tabs.split(',');
|
|
3816
3818
|
var obj = {};
|
|
3817
3819
|
copyTabs.map(function (x) {
|
|
3820
|
+
if (_this2.param[x]) {
|
|
3821
|
+
tabs[x].param = _extends({}, tabs[x].param, _this2.param[x]);
|
|
3822
|
+
}
|
|
3818
3823
|
obj[x];
|
|
3819
3824
|
});
|
|
3820
3825
|
if (this.tabs) {
|
|
@@ -3825,15 +3830,12 @@ var _props, _methods;
|
|
|
3825
3830
|
}
|
|
3826
3831
|
}
|
|
3827
3832
|
var newtabs = [];
|
|
3828
|
-
console.log(copyTabs, this.param, 'copyTabs');
|
|
3829
3833
|
copyTabs.map(function (x) {
|
|
3830
3834
|
if (_this2.param[x]) {
|
|
3831
3835
|
obj[x].param = _extends({}, obj[x].param, _this2.param[x]);
|
|
3832
|
-
console.log(_this2.param[x], 'this.param[x]');
|
|
3833
3836
|
}
|
|
3834
3837
|
newtabs.push(obj[x]);
|
|
3835
3838
|
});
|
|
3836
|
-
console.log(newtabs, 'newtabs');
|
|
3837
3839
|
return newtabs;
|
|
3838
3840
|
}
|
|
3839
3841
|
},
|
|
@@ -3990,8 +3992,11 @@ var _props, _methods;
|
|
|
3990
3992
|
this.newParam.pid = 'root';
|
|
3991
3993
|
this.newParam.myUserid = this.newParam.myUserid || util["a" /* default */].getStorage('userId');
|
|
3992
3994
|
} else {
|
|
3993
|
-
this.newParam
|
|
3995
|
+
this.newParam = _extends({}, this.newParam, this.newTabs[this.selectIndex].param);
|
|
3996
|
+
// this.newTabs[this.selectIndex].param.pid || this.param.pid || 'root';
|
|
3994
3997
|
}
|
|
3998
|
+
delete this.newParam.department;
|
|
3999
|
+
delete this.newParam.myemployee;
|
|
3995
4000
|
Object(http["a" /* default */])({
|
|
3996
4001
|
url: this.url ? this.url : this.baseUrl ? this.baseUrl + api["v" /* selectObject */] : api["v" /* selectObject */],
|
|
3997
4002
|
params: _extends({
|
|
@@ -4229,7 +4234,6 @@ var _props, _methods;
|
|
|
4229
4234
|
this.$set(res.obj, 'checked', false);
|
|
4230
4235
|
}
|
|
4231
4236
|
} else {
|
|
4232
|
-
|
|
4233
4237
|
// if (!this.multiple && this.list.length >= 1) {
|
|
4234
4238
|
// this.$toast(this.promptText);
|
|
4235
4239
|
// return;
|
|
@@ -4237,10 +4241,14 @@ var _props, _methods;
|
|
|
4237
4241
|
if (res.obj.isAllCheck) {
|
|
4238
4242
|
var _list;
|
|
4239
4243
|
|
|
4244
|
+
var selectData = [];
|
|
4240
4245
|
model.map(function (x) {
|
|
4241
|
-
|
|
4246
|
+
if (!x.disabled && !x.nocheck && !x.isAllCheck) {
|
|
4247
|
+
_this10.$set(x, 'checked', true);
|
|
4248
|
+
selectData.push(x);
|
|
4249
|
+
}
|
|
4242
4250
|
});
|
|
4243
|
-
(_list = this.list).push.apply(_list,
|
|
4251
|
+
(_list = this.list).push.apply(_list, selectData);
|
|
4244
4252
|
} else {
|
|
4245
4253
|
this.$set(res.obj, 'checked', true);
|
|
4246
4254
|
if (!this.multiple) {
|
|
@@ -4261,7 +4269,11 @@ var _props, _methods;
|
|
|
4261
4269
|
return item;
|
|
4262
4270
|
}, []);
|
|
4263
4271
|
if (model.length - 1 === checkList.length) {
|
|
4264
|
-
|
|
4272
|
+
model.map(function (x) {
|
|
4273
|
+
if (!x.disabled) {
|
|
4274
|
+
_this10.$set(model[0], 'checked', true);
|
|
4275
|
+
}
|
|
4276
|
+
});
|
|
4265
4277
|
} else {
|
|
4266
4278
|
this.$set(model[0], 'checked', false);
|
|
4267
4279
|
}
|
|
@@ -4304,8 +4316,8 @@ var _props, _methods;
|
|
|
4304
4316
|
|
|
4305
4317
|
var selector_tree_component = Object(componentNormalizer["a" /* default */])(
|
|
4306
4318
|
src_selector_treevue_type_script_lang_js,
|
|
4307
|
-
|
|
4308
|
-
|
|
4319
|
+
selector_treevue_type_template_id_d4e42ba6_render,
|
|
4320
|
+
selector_treevue_type_template_id_d4e42ba6_staticRenderFns,
|
|
4309
4321
|
false,
|
|
4310
4322
|
null,
|
|
4311
4323
|
null,
|
package/package.json
CHANGED
|
@@ -262,10 +262,12 @@
|
|
|
262
262
|
multiple
|
|
263
263
|
:isAllCheck="isAllCheck"
|
|
264
264
|
:paddingTop="paddingTop"
|
|
265
|
+
isDepartment
|
|
265
266
|
:objType="'enterprise'"
|
|
266
267
|
:tabs="'department,myemployee'"
|
|
267
268
|
:param="{
|
|
268
|
-
|
|
269
|
+
department:{pid: orgId,roleid:deptRoleCode} ,
|
|
270
|
+
myemployee:{pid: orgId,roleid:deptRoleCode} ,
|
|
269
271
|
}"
|
|
270
272
|
:disableds="currentOrgDisabledObjId"
|
|
271
273
|
:baseUrl="apiBaseUrl"
|
|
@@ -497,11 +499,12 @@
|
|
|
497
499
|
:choiceDeptId="choiceDeptId"
|
|
498
500
|
/>
|
|
499
501
|
<!-- 催办通知方式 -->
|
|
500
|
-
<div class="item-msg item-msg1" v-if="
|
|
502
|
+
<div class="item-msg item-msg1" v-if="form.isLimitedTime === '1'">
|
|
501
503
|
<Message
|
|
502
504
|
ref="message"
|
|
503
505
|
:label="'催办通知方式'"
|
|
504
506
|
:code="'notification_type'"
|
|
507
|
+
onlyShowType
|
|
505
508
|
:baseUrl="baseUrl"
|
|
506
509
|
@onInputMsg="onInputMsgUrge"
|
|
507
510
|
:required="true"
|
|
@@ -633,6 +636,7 @@ export default {
|
|
|
633
636
|
currentOrgDisabledObjId: [],
|
|
634
637
|
nextNodeDefault: 0,
|
|
635
638
|
showDefList: false,
|
|
639
|
+
deptRoleCode:'',
|
|
636
640
|
readOnlyNotificationType: '',
|
|
637
641
|
notificationMessageReadOnly: false,
|
|
638
642
|
freeStartFlowParams: {}, //自由发起流程参数
|
|
@@ -1720,6 +1724,7 @@ export default {
|
|
|
1720
1724
|
}).then((res) => {
|
|
1721
1725
|
this.$toast.clear();
|
|
1722
1726
|
if (res.status == 'success') {
|
|
1727
|
+
_that.deptRoleCode = res.data.nodeExtAttr.deptRoleCode
|
|
1723
1728
|
_that.enableCustomLimitTimeSetting =
|
|
1724
1729
|
res.data.nodeExtAttr.enableCustomLimitTimeSetting == 1;
|
|
1725
1730
|
res.data.otherOrgDisabledObjId &&
|
|
@@ -53,6 +53,10 @@ export default {
|
|
|
53
53
|
type: String,
|
|
54
54
|
default: ''
|
|
55
55
|
},
|
|
56
|
+
onlyShowType: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
56
60
|
code: {
|
|
57
61
|
type: String,
|
|
58
62
|
default: 'notification_type' // 代码表默认参数
|
|
@@ -127,7 +131,7 @@ export default {
|
|
|
127
131
|
},
|
|
128
132
|
methods: {
|
|
129
133
|
getNoticeType() {
|
|
130
|
-
|
|
134
|
+
|
|
131
135
|
if (this.defaultNotificationType) {
|
|
132
136
|
let arr = [];
|
|
133
137
|
this.newList.map((item) => {
|
|
@@ -175,6 +179,8 @@ export default {
|
|
|
175
179
|
this.form.notificationType = arr;
|
|
176
180
|
this.showCheck = true
|
|
177
181
|
this.$emit('onInputMsg', this.form);
|
|
182
|
+
}else if(this.onlyShowType){
|
|
183
|
+
this.showCheck = true
|
|
178
184
|
}
|
|
179
185
|
} else {
|
|
180
186
|
this.$toast(message);
|
|
@@ -73,6 +73,9 @@
|
|
|
73
73
|
pid: pid,
|
|
74
74
|
onlyMyOrg: false
|
|
75
75
|
}"
|
|
76
|
+
:disabled="
|
|
77
|
+
!isCustomUser || isCurrentNodeForbiddenChangeCandidate == 1
|
|
78
|
+
"
|
|
76
79
|
:baseUrl="apiBaseUrl"
|
|
77
80
|
:paddingTop="paddingTop"
|
|
78
81
|
:objType="objType"
|
|
@@ -255,6 +258,8 @@ export default {
|
|
|
255
258
|
showOpinion: true,
|
|
256
259
|
readOnlyNotificationType: '',
|
|
257
260
|
notificationMessageReadOnly: false,
|
|
261
|
+
isCustomUser:1,
|
|
262
|
+
isCurrentNodeForbiddenChangeCandidate: 0,
|
|
258
263
|
form: {
|
|
259
264
|
nextNodeId: undefined, // 流程节点id
|
|
260
265
|
nextNodeName: undefined, // 流程节点名称
|
|
@@ -614,6 +619,8 @@ export default {
|
|
|
614
619
|
that.readOnlyNotificationType =
|
|
615
620
|
res.results.extendData.readOnlyNotificationType;
|
|
616
621
|
}
|
|
622
|
+
that.isCurrentNodeForbiddenChangeCandidate =
|
|
623
|
+
res.results.nodeExtr.isCurrentNodeForbiddenChangeCandidate;
|
|
617
624
|
that.processObj = res.results;
|
|
618
625
|
that.nextList = res.results.nodeList;
|
|
619
626
|
that.isOpinionRequired = res.results.nodeExtr.isOpinionRequired;
|
|
@@ -674,6 +681,7 @@ export default {
|
|
|
674
681
|
}).then((res) => {
|
|
675
682
|
this.$toast.clear();
|
|
676
683
|
if (res.rCode == 0) {
|
|
684
|
+
_that.isCustomUser = res.results.nodeExtr.isCustomUser;
|
|
677
685
|
this.peopleObj = res.results.nodeExtr;
|
|
678
686
|
_that.enableCustomLimitTimeSetting =
|
|
679
687
|
this.peopleObj.enableCustomLimitTimeSetting == 1;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@click="handleClick"
|
|
25
25
|
class="em-flow-tabs"
|
|
26
26
|
type="card"
|
|
27
|
-
style="margin:10px 0px"
|
|
27
|
+
style="margin: 10px 0px"
|
|
28
28
|
>
|
|
29
29
|
<em-tab
|
|
30
30
|
:title="item.label"
|
|
@@ -153,8 +153,8 @@ export default {
|
|
|
153
153
|
type: String,
|
|
154
154
|
default: '人'
|
|
155
155
|
},
|
|
156
|
-
disableds:{
|
|
157
|
-
type:Array,
|
|
156
|
+
disableds: {
|
|
157
|
+
type: Array,
|
|
158
158
|
default: () => []
|
|
159
159
|
},
|
|
160
160
|
showSearch: {
|
|
@@ -293,7 +293,7 @@ export default {
|
|
|
293
293
|
selectData: [],
|
|
294
294
|
timer: null,
|
|
295
295
|
isSearch: false,
|
|
296
|
-
inputSearch:false,
|
|
296
|
+
inputSearch: false,
|
|
297
297
|
newParam: {},
|
|
298
298
|
oldIsSearch: false,
|
|
299
299
|
selectIndex: 0,
|
|
@@ -582,7 +582,10 @@ export default {
|
|
|
582
582
|
};
|
|
583
583
|
let copyTabs = this.tabs.split(',');
|
|
584
584
|
let obj = {};
|
|
585
|
-
copyTabs.map(x => {
|
|
585
|
+
copyTabs.map((x) => {
|
|
586
|
+
if(this.param[x]){
|
|
587
|
+
tabs[x].param = {...tabs[x].param, ...this.param[x]};
|
|
588
|
+
}
|
|
586
589
|
obj[x];
|
|
587
590
|
});
|
|
588
591
|
if (this.tabs) {
|
|
@@ -593,15 +596,12 @@ export default {
|
|
|
593
596
|
}
|
|
594
597
|
}
|
|
595
598
|
let newtabs = [];
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
obj[x].param ={...obj[x].param,...this.param[x]};
|
|
600
|
-
console.log(this.param[x],'this.param[x]')
|
|
599
|
+
copyTabs.map((x) => {
|
|
600
|
+
if (this.param[x]) {
|
|
601
|
+
obj[x].param = { ...obj[x].param, ...this.param[x] };
|
|
601
602
|
}
|
|
602
603
|
newtabs.push(obj[x]);
|
|
603
604
|
});
|
|
604
|
-
console.log(newtabs,'newtabs')
|
|
605
605
|
return newtabs;
|
|
606
606
|
}
|
|
607
607
|
},
|
|
@@ -619,7 +619,7 @@ export default {
|
|
|
619
619
|
methods: {
|
|
620
620
|
handleClick(index) {
|
|
621
621
|
this.selectIndex = index;
|
|
622
|
-
this.inputSearch = false
|
|
622
|
+
this.inputSearch = false;
|
|
623
623
|
this.getContent();
|
|
624
624
|
},
|
|
625
625
|
getNodeList(isSearch) {
|
|
@@ -636,17 +636,17 @@ export default {
|
|
|
636
636
|
}
|
|
637
637
|
let _this = this;
|
|
638
638
|
if (this.list && this.list.length > 0) {
|
|
639
|
-
this.list.filter(r => {
|
|
640
|
-
_this.personnel.find(i => {
|
|
639
|
+
this.list.filter((r) => {
|
|
640
|
+
_this.personnel.find((i) => {
|
|
641
641
|
if (i[_this.valueKey] === r[_this.valueKey]) {
|
|
642
642
|
_this.$set(i, 'checked', true);
|
|
643
643
|
} else if (i.children) {
|
|
644
644
|
_this.getActiveChildren(i.children, r[_this.valueKey]);
|
|
645
|
-
}
|
|
645
|
+
}
|
|
646
646
|
});
|
|
647
647
|
});
|
|
648
648
|
} else {
|
|
649
|
-
_this.personnel.map(x => {
|
|
649
|
+
_this.personnel.map((x) => {
|
|
650
650
|
if (x.children && x.children.length > 0) {
|
|
651
651
|
this.setChecked(x.children);
|
|
652
652
|
} else {
|
|
@@ -657,16 +657,16 @@ export default {
|
|
|
657
657
|
},
|
|
658
658
|
getActiveChildren(data, id) {
|
|
659
659
|
const _this = this;
|
|
660
|
-
data.map(x => {
|
|
660
|
+
data.map((x) => {
|
|
661
661
|
if (x[_this.valueKey] === id) {
|
|
662
662
|
_this.$set(x, 'checked', true);
|
|
663
663
|
} else if (x.children) {
|
|
664
664
|
_this.getActiveChildren(x.children, id);
|
|
665
|
-
}
|
|
665
|
+
}
|
|
666
666
|
});
|
|
667
667
|
},
|
|
668
668
|
setChecked(list) {
|
|
669
|
-
list.map(x => {
|
|
669
|
+
list.map((x) => {
|
|
670
670
|
if (x.children && x.children.length > 0) {
|
|
671
671
|
this.setChecked(x.children);
|
|
672
672
|
} else {
|
|
@@ -716,7 +716,7 @@ export default {
|
|
|
716
716
|
this.isSearch = !this.isSearch;
|
|
717
717
|
this.$emit('search', this.namelike);
|
|
718
718
|
} else {
|
|
719
|
-
this.inputSearch = true
|
|
719
|
+
this.inputSearch = true;
|
|
720
720
|
this.getContent();
|
|
721
721
|
}
|
|
722
722
|
}, 1000);
|
|
@@ -739,17 +739,19 @@ export default {
|
|
|
739
739
|
overlay: true,
|
|
740
740
|
duration: 0
|
|
741
741
|
});
|
|
742
|
-
this.newParam = {...JSON.parse(JSON.stringify(this.param))};
|
|
743
|
-
this.newParam.selecttype =
|
|
744
|
-
this.selectIndex
|
|
745
|
-
].param.selecttype;
|
|
742
|
+
this.newParam = { ...JSON.parse(JSON.stringify(this.param)) };
|
|
743
|
+
this.newParam.selecttype =
|
|
744
|
+
this.newTabs[this.selectIndex].param.selecttype;
|
|
746
745
|
if (this.newParam.selecttype === 'persongroup') {
|
|
747
746
|
this.newParam.pid = 'root';
|
|
748
747
|
this.newParam.myUserid =
|
|
749
748
|
this.newParam.myUserid || $.getStorage('userId');
|
|
750
749
|
} else {
|
|
751
|
-
this.newParam
|
|
750
|
+
this.newParam = {...this.newParam,...this.newTabs[this.selectIndex].param}
|
|
751
|
+
// this.newTabs[this.selectIndex].param.pid || this.param.pid || 'root';
|
|
752
752
|
}
|
|
753
|
+
delete this.newParam.department
|
|
754
|
+
delete this.newParam.myemployee
|
|
753
755
|
request({
|
|
754
756
|
url: this.url
|
|
755
757
|
? this.url
|
|
@@ -763,22 +765,26 @@ export default {
|
|
|
763
765
|
filid: this.filid,
|
|
764
766
|
...this.newParam
|
|
765
767
|
}
|
|
766
|
-
}).then(res => {
|
|
768
|
+
}).then((res) => {
|
|
767
769
|
this.$toast.clear();
|
|
768
770
|
const { rCode, msg } = res;
|
|
769
771
|
if (rCode == 0) {
|
|
770
|
-
if(this.inputSearch && !this.namelike)
|
|
771
|
-
this.inputSearch =
|
|
772
|
+
if (this.inputSearch && !this.namelike) {
|
|
773
|
+
this.inputSearch = false;
|
|
774
|
+
} else if (this.namelike.trim()) {
|
|
775
|
+
this.inputSearch = true;
|
|
772
776
|
}
|
|
773
777
|
if (typeof this.selectList == 'string') {
|
|
774
778
|
this.selectData = [];
|
|
775
|
-
this.list = this.getSelectData(
|
|
779
|
+
this.list = this.getSelectData(
|
|
780
|
+
JSON.parse(JSON.stringify(res.results))
|
|
781
|
+
);
|
|
776
782
|
this.$emit('update:selectList', this.list);
|
|
777
783
|
}
|
|
778
|
-
this.personnel =JSON.parse(JSON.stringify(res.results));
|
|
784
|
+
this.personnel = JSON.parse(JSON.stringify(res.results));
|
|
779
785
|
let _this = this;
|
|
780
|
-
this.list.filter(r => {
|
|
781
|
-
_this.personnel.find(i => {
|
|
786
|
+
this.list.filter((r) => {
|
|
787
|
+
_this.personnel.find((i) => {
|
|
782
788
|
if (i[_this.valueKey] === r[_this.valueKey]) {
|
|
783
789
|
_this.$set(i, 'checked', true);
|
|
784
790
|
}
|
|
@@ -793,8 +799,8 @@ export default {
|
|
|
793
799
|
getSelectData(data) {
|
|
794
800
|
const _this = this;
|
|
795
801
|
let user = this.selectList.split(',');
|
|
796
|
-
user.map(x => {
|
|
797
|
-
data.map(i => {
|
|
802
|
+
user.map((x) => {
|
|
803
|
+
data.map((i) => {
|
|
798
804
|
if (i[_this.valueKey] == x) {
|
|
799
805
|
this.selectData.push(i);
|
|
800
806
|
} else if (i.children) {
|
|
@@ -825,7 +831,7 @@ export default {
|
|
|
825
831
|
? this.baseUrl + selectObject
|
|
826
832
|
: selectObject,
|
|
827
833
|
params: params
|
|
828
|
-
}).then(res => {
|
|
834
|
+
}).then((res) => {
|
|
829
835
|
if (res.rCode == 0) {
|
|
830
836
|
if (
|
|
831
837
|
res.results.length > 0 &&
|
|
@@ -843,17 +849,17 @@ export default {
|
|
|
843
849
|
}
|
|
844
850
|
this.$set(obj, 'children', res.results);
|
|
845
851
|
let _this = this;
|
|
846
|
-
this.list.filter(r => {
|
|
847
|
-
obj.children.find(i => {
|
|
852
|
+
this.list.filter((r) => {
|
|
853
|
+
obj.children.find((i) => {
|
|
848
854
|
if (i[_this.valueKey] === r[_this.valueKey]) {
|
|
849
855
|
_this.$set(i, 'checked', true);
|
|
850
856
|
}
|
|
851
857
|
});
|
|
852
858
|
});
|
|
853
|
-
if (this.isAllCheck && this.multiple && obj.children.length>0) {
|
|
859
|
+
if (this.isAllCheck && this.multiple && obj.children.length > 0) {
|
|
854
860
|
let checkList = obj.children
|
|
855
861
|
.slice(1, obj.children.length)
|
|
856
|
-
.filter(x => x.checked);
|
|
862
|
+
.filter((x) => x.checked);
|
|
857
863
|
if (
|
|
858
864
|
checkList.length ===
|
|
859
865
|
obj.children.slice(1, obj.children.length).length
|
|
@@ -881,7 +887,11 @@ export default {
|
|
|
881
887
|
}
|
|
882
888
|
}
|
|
883
889
|
let newData = res.obj;
|
|
884
|
-
if (
|
|
890
|
+
if (
|
|
891
|
+
(!newData.children || newData.children.length == 0) &&
|
|
892
|
+
!isStart &&
|
|
893
|
+
data
|
|
894
|
+
) {
|
|
885
895
|
if (this.nodeList && this.nodeList.length > 0) {
|
|
886
896
|
this.$toast.loading({
|
|
887
897
|
message: '加载中...',
|
|
@@ -892,44 +902,44 @@ export default {
|
|
|
892
902
|
});
|
|
893
903
|
if (!Array.isArray(data)) {
|
|
894
904
|
data
|
|
895
|
-
.then(res => {
|
|
896
|
-
res.map(x => {
|
|
905
|
+
.then((res) => {
|
|
906
|
+
res.map((x) => {
|
|
897
907
|
!x[_that.nodeKey] && _that.$set(x, 'nocheck', false);
|
|
898
908
|
});
|
|
899
909
|
_that.$set(newData, 'children', res);
|
|
900
910
|
if (_that.selectList && _that.selectList.length > 0) {
|
|
901
|
-
_that.selectList.filter(r => {
|
|
902
|
-
newData.children.find(i => {
|
|
911
|
+
_that.selectList.filter((r) => {
|
|
912
|
+
newData.children.find((i) => {
|
|
903
913
|
if (i[_that.valueKey] === r[_that.valueKey]) {
|
|
904
914
|
_that.$set(i, 'checked', true);
|
|
905
915
|
}
|
|
906
916
|
});
|
|
907
917
|
});
|
|
908
918
|
} else {
|
|
909
|
-
newData.children.find(i => {
|
|
919
|
+
newData.children.find((i) => {
|
|
910
920
|
_that.$set(i, 'checked', false);
|
|
911
921
|
});
|
|
912
922
|
}
|
|
913
923
|
this.$toast.clear();
|
|
914
924
|
})
|
|
915
|
-
.catch(err => {
|
|
925
|
+
.catch((err) => {
|
|
916
926
|
this.$toast('数据返回错误');
|
|
917
927
|
});
|
|
918
928
|
} else {
|
|
919
|
-
data.map(x => {
|
|
929
|
+
data.map((x) => {
|
|
920
930
|
!x[_that.nodeKey] && _that.$set(x, 'nocheck', false);
|
|
921
931
|
});
|
|
922
932
|
_that.$set(newData, 'children', data);
|
|
923
933
|
if (_that.selectList && _that.selectList.length > 0) {
|
|
924
|
-
_that.selectList.filter(r => {
|
|
925
|
-
newData.children.find(i => {
|
|
934
|
+
_that.selectList.filter((r) => {
|
|
935
|
+
newData.children.find((i) => {
|
|
926
936
|
if (i[_that.valueKey] === r[_that.valueKey]) {
|
|
927
937
|
_that.$set(i, 'checked', true);
|
|
928
938
|
}
|
|
929
939
|
});
|
|
930
940
|
});
|
|
931
941
|
} else {
|
|
932
|
-
newData.children.find(i => {
|
|
942
|
+
newData.children.find((i) => {
|
|
933
943
|
_that.$set(i, 'checked', false);
|
|
934
944
|
});
|
|
935
945
|
}
|
|
@@ -948,8 +958,10 @@ export default {
|
|
|
948
958
|
// debugger
|
|
949
959
|
if (
|
|
950
960
|
this.$listeners['node-click'] &&
|
|
951
|
-
(this.$listeners['left-icon'] ||
|
|
952
|
-
|
|
961
|
+
(this.$listeners['left-icon'] ||
|
|
962
|
+
(this.showMore && !this.isDefaultNode)) &&
|
|
963
|
+
!isStart
|
|
964
|
+
) {
|
|
953
965
|
if (this.$listeners['left-icon'] && key === 'node') {
|
|
954
966
|
this.getChiled(res, isStart, 'left-icon');
|
|
955
967
|
} else if (
|
|
@@ -999,12 +1011,12 @@ export default {
|
|
|
999
1011
|
},
|
|
1000
1012
|
checked(res, model) {
|
|
1001
1013
|
this.oldIsSearch = this.isSearch;
|
|
1002
|
-
if(!res.obj.mixType){
|
|
1014
|
+
if (!res.obj.mixType) {
|
|
1003
1015
|
this.$set(res.obj, 'mixType', this.newTabs[this.selectIndex].name);
|
|
1004
1016
|
}
|
|
1005
1017
|
if (res.obj.checked) {
|
|
1006
1018
|
if (res.obj.isAllCheck) {
|
|
1007
|
-
model.map(x => {
|
|
1019
|
+
model.map((x) => {
|
|
1008
1020
|
for (let i in this.list) {
|
|
1009
1021
|
if (this.list[i][this.valueKey] == x[this.valueKey]) {
|
|
1010
1022
|
this.list.splice(i, 1);
|
|
@@ -1021,16 +1033,19 @@ export default {
|
|
|
1021
1033
|
this.$set(res.obj, 'checked', false);
|
|
1022
1034
|
}
|
|
1023
1035
|
} else {
|
|
1024
|
-
|
|
1025
1036
|
// if (!this.multiple && this.list.length >= 1) {
|
|
1026
1037
|
// this.$toast(this.promptText);
|
|
1027
1038
|
// return;
|
|
1028
1039
|
// }
|
|
1029
1040
|
if (res.obj.isAllCheck) {
|
|
1030
|
-
|
|
1031
|
-
|
|
1041
|
+
let selectData = [];
|
|
1042
|
+
model.map((x) => {
|
|
1043
|
+
if(!x.disabled && !x.nocheck && !x.isAllCheck){
|
|
1044
|
+
this.$set(x, 'checked', true);
|
|
1045
|
+
selectData.push(x);
|
|
1046
|
+
}
|
|
1032
1047
|
});
|
|
1033
|
-
this.list.push(...
|
|
1048
|
+
this.list.push(...selectData);
|
|
1034
1049
|
} else {
|
|
1035
1050
|
this.$set(res.obj, 'checked', true);
|
|
1036
1051
|
if (!this.multiple) {
|
|
@@ -1042,21 +1057,25 @@ export default {
|
|
|
1042
1057
|
}
|
|
1043
1058
|
}
|
|
1044
1059
|
if (this.isAllCheck && this.multiple && model[0].isAllCheck) {
|
|
1045
|
-
let checkList = model.slice(1, model.length).filter(x => x.checked);
|
|
1060
|
+
let checkList = model.slice(1, model.length).filter((x) => x.checked);
|
|
1046
1061
|
var obj = {};
|
|
1047
1062
|
this.list = this.list.reduce((item, next) => {
|
|
1048
1063
|
obj[next.showid] ? '' : (obj[next.showid] = true && item.push(next));
|
|
1049
1064
|
return item;
|
|
1050
1065
|
}, []);
|
|
1051
1066
|
if (model.length - 1 === checkList.length) {
|
|
1052
|
-
|
|
1067
|
+
model.map((x) => {
|
|
1068
|
+
if (!x.disabled) {
|
|
1069
|
+
this.$set(model[0], 'checked', true);
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1053
1072
|
} else {
|
|
1054
1073
|
this.$set(model[0], 'checked', false);
|
|
1055
1074
|
}
|
|
1056
1075
|
}
|
|
1057
1076
|
},
|
|
1058
1077
|
setChecked(data, item) {
|
|
1059
|
-
data.map(x => {
|
|
1078
|
+
data.map((x) => {
|
|
1060
1079
|
if (x[this.valueKey] === item[this.valueKey]) {
|
|
1061
1080
|
this.$set(x, 'checked', true);
|
|
1062
1081
|
} else {
|