hd-idevvue3 3.0.2 → 3.0.4

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 (147) hide show
  1. package/dist/assets/index.9c127719.css +1 -0
  2. package/dist/hd-idevvue3.mjs +3521 -3305
  3. package/dist/hd-idevvue3.umd.js +29 -29
  4. package/npminstall-debug.log +2 -10
  5. package/package.json +4 -2
  6. package/pnpm-lock.yaml +37 -4
  7. package/src/App.vue +11 -15
  8. package/src/assets/sound/notify.wav +0 -0
  9. package/src/demo/demo.vue +9 -10
  10. package/src/demo/dropdemo.vue +42 -43
  11. package/src/demo/extsets.vue +140 -39
  12. package/src/demo/formedit.vue +157 -145
  13. package/src/demo/hightquery.vue +263 -66
  14. package/src/demo/inlineedit.vue +129 -35
  15. package/src/demo/selfdrop.vue +32 -15
  16. package/src/directive/el-dragDialog/drag.js +13 -13
  17. package/src/directive/el-dragDialog/index.js +13 -13
  18. package/src/errorLog.js +3 -3
  19. package/src/hdcom/BigGrid.js +54 -48
  20. package/src/hdcom/BillShow.vue +84 -63
  21. package/src/hdcom/BillUpload.vue +144 -86
  22. package/src/hdcom/BtnRight.vue +26 -23
  23. package/src/hdcom/ErrHint.vue +36 -24
  24. package/src/hdcom/ExtendColumn.vue +97 -90
  25. package/src/hdcom/ExtendCommon.js +24 -13
  26. package/src/hdcom/ExtendForm.vue +107 -80
  27. package/src/hdcom/FacePicUpload.vue +59 -50
  28. package/src/hdcom/FaceRecTest.vue +87 -77
  29. package/src/hdcom/GridChart.vue +175 -162
  30. package/src/hdcom/GridExField.vue +328 -234
  31. package/src/hdcom/GridShow.vue +89 -39
  32. package/src/hdcom/HdAside.vue +192 -145
  33. package/src/hdcom/HdBtn.vue +44 -32
  34. package/src/hdcom/HdButton.vue +141 -117
  35. package/src/hdcom/HdComFaceRec.vue +80 -32
  36. package/src/hdcom/HdComGrid.vue +329 -229
  37. package/src/hdcom/HdComQuery.vue +179 -90
  38. package/src/hdcom/HdComQueryDetail.vue +159 -115
  39. package/src/hdcom/HdComSortDetail.vue +136 -130
  40. package/src/hdcom/HdDatePicker.vue +32 -16
  41. package/src/hdcom/HdDialog.vue +62 -44
  42. package/src/hdcom/HdDrop.vue +163 -138
  43. package/src/hdcom/HdFileUpload.vue +138 -119
  44. package/src/hdcom/HdFilterBox.vue +62 -62
  45. package/src/hdcom/HdFooter.vue +152 -119
  46. package/src/hdcom/HdForm.vue +276 -203
  47. package/src/hdcom/HdFormBtn.vue +81 -39
  48. package/src/hdcom/HdFormItem.vue +14 -10
  49. package/src/hdcom/HdGrid.vue +353 -156
  50. package/src/hdcom/HdGridEditBtn.vue +34 -20
  51. package/src/hdcom/HdGridExt.js +78 -47
  52. package/src/hdcom/HdGridSel.vue +227 -193
  53. package/src/hdcom/HdHeader.vue +149 -117
  54. package/src/hdcom/HdHotKey.vue +70 -67
  55. package/src/hdcom/HdInputHint.vue +40 -36
  56. package/src/hdcom/HdMain.vue +25 -27
  57. package/src/hdcom/HdMessage.vue +180 -171
  58. package/src/hdcom/HdNum.vue +67 -57
  59. package/src/hdcom/HdPopSel.vue +46 -24
  60. package/src/hdcom/HdRightMenu.vue +63 -61
  61. package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
  62. package/src/hdcom/HdTableColumn.vue +156 -109
  63. package/src/hdcom/HdTempSave.vue +138 -116
  64. package/src/hdcom/HdTree.vue +89 -72
  65. package/src/hdcom/HdTreeTable/eval.js +8 -3
  66. package/src/hdcom/HdTreeTable/index.vue +229 -174
  67. package/src/hdcom/ImportExcel.vue +69 -34
  68. package/src/hdcom/index.js +39 -44
  69. package/src/idev.common.js +54 -47
  70. package/src/index.js +3 -6
  71. package/src/utils/HdQuery.js +25 -14
  72. package/src/utils/comutils.js +50 -28
  73. package/src/utils/gogocodeTransfer.js +59 -0
  74. package/src/utils/utils.js +30 -19
  75. package/src/vendor/Blob.js +187 -179
  76. package/src/vendor/Export2Excel.js +231 -220
  77. package/src/vendor/Export2Zip.js +25 -22
  78. package/src/views/layout/AppMain.vue +34 -32
  79. package/src/views/layout/HdLayout.vue +64 -52
  80. package/src/views/layout/header/ElasticSearch.vue +196 -159
  81. package/src/views/layout/header/HZRecorder.js +163 -135
  82. package/src/views/layout/header/HeaderSearch.vue +165 -145
  83. package/src/views/layout/header/Levelbar.vue +55 -49
  84. package/src/views/layout/header/MainHeader.vue +233 -189
  85. package/src/views/layout/header/Navbar.vue +74 -78
  86. package/src/views/layout/header/ScrollPane.vue +103 -81
  87. package/src/views/layout/header/TagsView.vue +169 -164
  88. package/src/views/layout/header/VocRec.vue +86 -78
  89. package/src/views/layout/header/changepswform.vue +98 -64
  90. package/src/views/layout/index.js +5 -7
  91. package/src/views/layout/menu/Hamburger.vue +63 -45
  92. package/src/views/layout/menu/HdMenu.vue +155 -118
  93. package/src/views/layout/menu/index.vue +21 -19
  94. package/src/views/privilege/commsg/commsg.vue +115 -41
  95. package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
  96. package/src/views/privilege/commsg/commsgRole.vue +180 -109
  97. package/src/views/privilege/commsg/commsgform.vue +125 -101
  98. package/src/views/privilege/commsg/commsgiframe.vue +30 -23
  99. package/src/views/privilege/commsg/commsgto.vue +163 -84
  100. package/src/views/privilege/commsg/commsgtoform.vue +64 -58
  101. package/src/views/privilege/commsg/commsgtrans.vue +187 -115
  102. package/src/views/privilege/exfield/comexcolumn.vue +133 -43
  103. package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
  104. package/src/views/privilege/exfield/comexfield.vue +15 -17
  105. package/src/views/privilege/exfield/comexfieldform.vue +71 -53
  106. package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
  107. package/src/views/privilege/index.js +19 -20
  108. package/src/views/privilege/menu/comMenu.vue +49 -41
  109. package/src/views/privilege/menu/menu.vue +166 -49
  110. package/src/views/privilege/menu/menuinfo.vue +41 -34
  111. package/src/views/privilege/menu/rolelist.vue +78 -33
  112. package/src/views/privilege/menu/userlist.vue +76 -33
  113. package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
  114. package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
  115. package/src/views/privilege/orgDept/authOrgn.vue +157 -65
  116. package/src/views/privilege/orgDept/authorgnform.vue +50 -38
  117. package/src/views/privilege/orgDept/orgDept.vue +38 -37
  118. package/src/views/privilege/orgDept/orgTree.vue +99 -88
  119. package/src/views/privilege/orgDept/orgnselect.vue +132 -111
  120. package/src/views/privilege/personDept/authuser.vue +197 -91
  121. package/src/views/privilege/personDept/authuserform.vue +123 -71
  122. package/src/views/privilege/personDept/facerec.vue +128 -83
  123. package/src/views/privilege/personDept/orgncascader.vue +134 -115
  124. package/src/views/privilege/personDept/personDept.vue +9 -7
  125. package/src/views/privilege/quartz/comquartzjob.vue +123 -38
  126. package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
  127. package/src/views/privilege/quartz/comquartzlog.vue +116 -32
  128. package/src/views/privilege/role/btnRole.vue +123 -67
  129. package/src/views/privilege/role/menuRole.vue +65 -45
  130. package/src/views/privilege/role/orgnRole.vue +63 -41
  131. package/src/views/privilege/role/role.vue +26 -9
  132. package/src/views/privilege/role/rolelist.vue +114 -45
  133. package/src/views/privilege/role/roleselect.vue +34 -17
  134. package/src/views/privilege/search/comsearch.vue +164 -73
  135. package/src/views/privilege/search/menu.vue +38 -22
  136. package/src/views/privilege/syscode/syscode.vue +157 -69
  137. package/src/views/privilege/syscode/sysfield.vue +96 -43
  138. package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
  139. package/src/views/privilege/syslog/menulog.vue +38 -22
  140. package/src/views/privilege/syslog/syslog.vue +145 -78
  141. package/src/views/privilege/syslog/syslogconfig.vue +91 -24
  142. package/src/views/privilege/syslog/syslogform.vue +45 -43
  143. package/src/views/privilege/syslog/syslogframe.vue +26 -26
  144. package/src/views/privilege/userRole/userRole.vue +187 -89
  145. package/vite.config.js +7 -0
  146. package/dist/assets/index.774ef40e.css +0 -1
  147. package/src/views/privilege.zip +0 -0
@@ -1,117 +1,162 @@
1
1
  <template>
2
- <el-dialog title="人脸设置" :visible.sync="visible" append-to-body width="900px" top="2vh">
3
- <el-container style="height:500px">
2
+ <el-dialog
3
+ title="人脸设置"
4
+ :visible.sync="visible"
5
+ append-to-body
6
+ width="900px"
7
+ top="2vh"
8
+ >
9
+ <el-container style="height: 500px">
4
10
  <el-aside width="410px">
5
- <div>{{$t('摄像头')}}</div>
6
- <video ref="video" width="400px" height="225px" autoplay style="border: solid"></video>
11
+ <div>{{ $t('摄像头') }}</div>
12
+ <video
13
+ ref="video"
14
+ width="400px"
15
+ height="225px"
16
+ autoplay
17
+ style="border: solid"
18
+ ></video>
7
19
  </el-aside>
8
20
  <el-main>
9
- <div>{{$t('拍照')}}</div>
10
- <canvas ref='canvas' width="400px" height="225px" style="border: solid"></canvas>
21
+ <div>{{ $t('拍照') }}</div>
22
+ <canvas
23
+ ref="canvas"
24
+ width="400px"
25
+ height="225px"
26
+ style="border: solid"
27
+ ></canvas>
11
28
  </el-main>
12
29
  </el-container>
13
30
  <div slot="footer" class="dialog-footer">
14
- <el-button @click="faceRemove">{{$t('删除特征')}}</el-button>
15
- <el-button @click="faceTest">{{$t('人脸测试')}}</el-button>
31
+ <el-button @click="faceRemove">{{ $t('删除特征') }}</el-button>
32
+ <el-button @click="faceTest">{{ $t('人脸测试') }}</el-button>
16
33
  <el-button type="primary" @click="capAndSave" keyType="save">
17
- {{$t('拍照并上传')}}
34
+ {{ $t('拍照并上传') }}
18
35
  </el-button>
19
- <el-upload style="display: inline"
20
- :action="'/webresources/login/com/ComFaceRec/uploadFace?userId='+userId"
21
- :show-file-list="false"
22
- :on-success="uploadSuccess">
23
- <el-button>{{$t('上传图片')}}</el-button>
36
+ <el-upload
37
+ style="display: inline"
38
+ :action="
39
+ '/webresources/login/com/ComFaceRec/uploadFace?userId=' + userId
40
+ "
41
+ :show-file-list="false"
42
+ :on-success="uploadSuccess"
43
+ >
44
+ <el-button>{{ $t('上传图片') }}</el-button>
24
45
  </el-upload>
25
46
  </div>
26
47
  </el-dialog>
27
48
  </template>
28
- <script>
29
- export default {
30
- components: {},
31
- data() {
32
- return {
33
- visible: false,
34
- userId: null,
35
- account: null
36
- }
37
- },
38
49
 
39
- mounted() {
50
+ <script>
51
+ export default {
52
+ components: {},
53
+ data() {
54
+ return {
55
+ visible: false,
56
+ userId: null,
57
+ account: null,
58
+ }
59
+ },
40
60
 
61
+ mounted() {},
62
+ methods: {
63
+ show(row) {
64
+ this.userId = row.userId
65
+ this.account = row.account
66
+ this.visible = true
67
+ },
68
+ init() {
69
+ navigator.webkitGetUserMedia(
70
+ {
71
+ video: { width: 1280, height: 720 },
72
+ },
73
+ this.success,
74
+ this.error
75
+ )
76
+ },
77
+ success(stream) {
78
+ this.$refs.video.src = window.URL.createObjectURL(stream)
79
+ this.$refs.video.play()
80
+ },
81
+ error(err) {
82
+ alert('video error: ' + err)
41
83
  },
42
- methods: {
43
- show(row) {
44
- this.userId = row.userId
45
- this.account = row.account
46
- this.visible = true
47
- },
48
- init() {
49
- navigator.webkitGetUserMedia({
50
- video: {width: 1280, height: 720}
51
- }, this.success, this.error);
52
- },
53
- success(stream) {
54
- this.$refs.video.src = window.URL.createObjectURL(stream);
55
- this.$refs.video.play();
56
- },
57
- error(err) {
58
- alert('video error: ' + err)
59
- },
60
- faceTest() {
61
- this.$refs.canvas.getContext('2d').drawImage(this.$refs.video, 0, 0, 400, 225);
62
- let pic = this.$refs.canvas.toDataURL("image/jpg");
63
- //对其进行base64编 之后的字符串
64
- pic = pic.replace(/^data:image\/(png|jpg);base64,/, "")
65
- this.$http.post('/webresources/login/com/ComFaceRec/faceUserTest?account=' + this.account, {
66
- "imageData": pic
67
- }).then(response => {
84
+ faceTest() {
85
+ this.$refs.canvas
86
+ .getContext('2d')
87
+ .drawImage(this.$refs.video, 0, 0, 400, 225)
88
+ let pic = this.$refs.canvas.toDataURL('image/jpg')
89
+ //对其进行base64编 之后的字符串
90
+ pic = pic.replace(/^data:image\/(png|jpg);base64,/, '')
91
+ this.$http
92
+ .post(
93
+ '/webresources/login/com/ComFaceRec/faceUserTest?account=' +
94
+ this.account,
95
+ {
96
+ imageData: pic,
97
+ }
98
+ )
99
+ .then((response) => {
68
100
  const data = response.data
69
101
  this.$message({
70
102
  type: data.code === '-1' ? 'error' : 'success',
71
- message: data.message
103
+ message: data.message,
72
104
  })
73
105
  })
74
- },
75
- capAndSave() {
76
- this.$refs.canvas.getContext('2d').drawImage(this.$refs.video, 0, 0, 400, 225);
77
- let pic = this.$refs.canvas.toDataURL("image/jpg");
78
- //对其进行base64编 之后的字符串
79
- pic = pic.replace(/^data:image\/(png|jpg);base64,/, "")
80
- this.$http.post('/webresources/login/com/ComFaceRec/faceUserSave?userId=' + this.userId, {
81
- "imageData": pic
82
- }).then(response => {
106
+ },
107
+ capAndSave() {
108
+ this.$refs.canvas
109
+ .getContext('2d')
110
+ .drawImage(this.$refs.video, 0, 0, 400, 225)
111
+ let pic = this.$refs.canvas.toDataURL('image/jpg')
112
+ //对其进行base64编 之后的字符串
113
+ pic = pic.replace(/^data:image\/(png|jpg);base64,/, '')
114
+ this.$http
115
+ .post(
116
+ '/webresources/login/com/ComFaceRec/faceUserSave?userId=' +
117
+ this.userId,
118
+ {
119
+ imageData: pic,
120
+ }
121
+ )
122
+ .then((response) => {
83
123
  const data = response.data
84
124
  this.$message({
85
125
  type: data.code === '-1' ? 'error' : 'success',
86
- message: data.message
126
+ message: data.message,
87
127
  })
88
128
  })
89
- },
90
- uploadSuccess(response) {
91
- console.info(response)
92
- const data = response
93
- this.$message({
94
- type: data.code === '-1' ? 'error' : 'success',
95
- message: data.message
96
- })
97
- },
98
- faceRemove() {
99
- this.$http.post('/webresources/login/com/ComFaceRec/faceUserRemove?userId=' + this.userId).then(response => {
129
+ },
130
+ uploadSuccess(response) {
131
+ console.info(response)
132
+ const data = response
133
+ this.$message({
134
+ type: data.code === '-1' ? 'error' : 'success',
135
+ message: data.message,
136
+ })
137
+ },
138
+ faceRemove() {
139
+ this.$http
140
+ .post(
141
+ '/webresources/login/com/ComFaceRec/faceUserRemove?userId=' +
142
+ this.userId
143
+ )
144
+ .then((response) => {
100
145
  const data = response.data
101
146
  this.$message({
102
147
  type: data.code === '-1' ? 'error' : 'success',
103
- message: data.message
148
+ message: data.message,
104
149
  })
105
150
  })
106
- }
107
151
  },
108
- watch: {
109
- visible(nowVal) {
110
- if (nowVal) {
111
- this.init()
112
- } else {
113
- }
152
+ },
153
+ watch: {
154
+ visible(nowVal) {
155
+ if (nowVal) {
156
+ this.init()
157
+ } else {
114
158
  }
115
- }
116
- }
159
+ },
160
+ },
161
+ }
117
162
  </script>
@@ -1,125 +1,144 @@
1
1
  <template>
2
+ <div>
2
3
  <div>
3
- <div>
4
- <el-cascader :value="searchVal"
5
- :placeholder="placeholder?this.$(placeholder):this.$t('请选择')"
6
- :options="options" filterable
7
- :props="{expandTrigger: 'hover', checkStrictly: true, value : 'id', label: 'text'}"
8
- :disabled="disabled" ref="sel" @change="doSel">
9
- <template slot-scope="{ node, data }">
10
- <span>{{ data.text }}</span>
11
- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
12
- </template>
13
- </el-cascader>
14
- </div>
4
+ <el-cascader
5
+ :model-value="searchVal"
6
+ :placeholder="placeholder ? this.$(placeholder) : this.$t('请选择')"
7
+ :options="options"
8
+ filterable
9
+ :props="{
10
+ expandTrigger: 'hover',
11
+ checkStrictly: true,
12
+ value: 'id',
13
+ label: 'text',
14
+ }"
15
+ :disabled="disabled"
16
+ ref="sel"
17
+ @change="doSel"
18
+ >
19
+ <template slot-scope="{ node, data }">
20
+ <span>{{ data.text }}</span>
21
+ <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
22
+ </template>
23
+ </el-cascader>
15
24
  </div>
25
+ </div>
16
26
  </template>
17
- <script>
18
-
19
- /**
20
- * 自定义列表下拉
21
- * @module orgnselect
22
- */
23
- export default {
24
- name: 'orgnselect',
25
- data() {
26
- return {
27
- options: []
28
- }
29
- },
30
- inheritAttrs: false,
31
- /**
32
- * Props 继承hd-com-grid的属性和事件
33
- * @prop {String} txtVal 双向绑定 这里是为了clear清空用
34
- * @prop {String} idVal 双向绑定 这里是为了clear清空用
35
- * @prop {String} placeholder
36
- * @prop {String} disabled 只读
37
- * @prop {Object} hdQuery 查询封装类
38
- * @prop {String} height 默认为40vh
39
- * @prop {Function} beforeQuery 查询前的事件,通常需要绑定anyQuery
40
- */
41
- props: {
42
- txtVal: String,
43
- idVal: String,
44
- placeholder: String,
45
- disabled: Boolean,
46
- hdQuery: Object,
47
- url: String, // 全路径
48
- height: {// 高度
49
- type: String,
50
- default: '40vh'
51
- },
52
- beforeQuery: Function
53
- }, // 设置value为props属性-必须
54
- mounted() {
55
- this.doQuery()
56
- },
57
27
 
58
- methods: {
59
- doQuery() {
60
- this.$http.post('/webresources/login/privilege/AuthOrgn/gentree', this.hdQuery).then(response => {
61
- this.options = response.data;
62
- this.initOption(this.options);
63
- })
64
- },
65
- doClear() {
66
- this.$emit('update:txtVal', '')
67
- this.$emit('update:idVal', '')
68
- this.$emit('clear')
69
- },
70
- doSel(val) {
71
- if (!this.$refs.sel.getCheckedNodes() || this.$refs.sel.getCheckedNodes().length < 1) {
72
- this.$emit('update:txtVal', '')
73
- this.$emit('update:idVal', '')
74
- this.$refs.sel.toggleDropDownVisible(false)
75
- return;
76
- }
77
- const data = this.$refs.sel.getCheckedNodes()[0].data;
78
- this.$emit('update:txtVal', data.text)
79
- this.$emit('update:idVal', data.id)
80
- this.$emit('change', val)
81
- this.$refs.sel.toggleDropDownVisible(false)
82
- },
83
- getSearchIdList(list, id) {
84
- let rtn = [];
85
- list.forEach(v => {
86
- if(v.id == id) {
87
- rtn = [v.id];
88
- return;
89
- } else {
90
- let idList = this.getSearchIdList(v.children == null ? [] : v.children, id);
91
- if(idList.length > 0) {
92
- rtn = [v.id, ...idList];
93
- }
94
- }
95
- })
96
- return rtn;
97
- },
98
- initOption(list) {
99
- list.forEach(v => {
100
- if(!v.children || v.children.length === 0) {
101
- v.children = null;
102
- } else {
103
- this.initOption(v.children);
104
- }
105
- })
106
- },
107
- },
108
- computed: {
109
- searchVal() {
110
- let searchVal = this.getSearchIdList(this.options, this.idVal);
111
- console.log('searchVal', this.options, searchVal, this.idVal);
112
- return this.getSearchIdList(this.options, this.idVal);
113
- }
114
- }
28
+ <script>
29
+ /**
30
+ * 自定义列表下拉
31
+ * @module orgnselect
32
+ */
33
+ export default {
34
+ name: 'orgnselect',
35
+ data() {
36
+ return {
37
+ options: [],
115
38
  }
39
+ },
40
+ inheritAttrs: false,
41
+ /**
42
+ * Props 继承hd-com-grid的属性和事件
43
+ * @prop {String} txtVal 双向绑定 这里是为了clear清空用
44
+ * @prop {String} idVal 双向绑定 这里是为了clear清空用
45
+ * @prop {String} placeholder
46
+ * @prop {String} disabled 只读
47
+ * @prop {Object} hdQuery 查询封装类
48
+ * @prop {String} height 默认为40vh
49
+ * @prop {Function} beforeQuery 查询前的事件,通常需要绑定anyQuery
50
+ */
51
+ props: {
52
+ txtVal: String,
53
+ idVal: String,
54
+ placeholder: String,
55
+ disabled: Boolean,
56
+ hdQuery: Object,
57
+ url: String, // 全路径
58
+ height: {
59
+ // 高度
60
+ type: String,
61
+ default: '40vh',
62
+ },
63
+ beforeQuery: Function,
64
+ }, // 设置value为props属性-必须
65
+ mounted() {
66
+ this.doQuery()
67
+ },
116
68
 
69
+ methods: {
70
+ doQuery() {
71
+ this.$http
72
+ .post('/webresources/login/privilege/AuthOrgn/gentree', this.hdQuery)
73
+ .then((response) => {
74
+ this.options = response.data
75
+ this.initOption(this.options)
76
+ })
77
+ },
78
+ doClear() {
79
+ this.$emit('update:txtVal', '')
80
+ this.$emit('update:idVal', '')
81
+ this.$emit('clear')
82
+ },
83
+ doSel(val) {
84
+ if (
85
+ !this.$refs.sel.getCheckedNodes() ||
86
+ this.$refs.sel.getCheckedNodes().length < 1
87
+ ) {
88
+ this.$emit('update:txtVal', '')
89
+ this.$emit('update:idVal', '')
90
+ this.$refs.sel.toggleDropDownVisible(false)
91
+ return
92
+ }
93
+ const data = this.$refs.sel.getCheckedNodes()[0].data
94
+ this.$emit('update:txtVal', data.text)
95
+ this.$emit('update:idVal', data.id)
96
+ this.$emit('change', val)
97
+ this.$refs.sel.toggleDropDownVisible(false)
98
+ },
99
+ getSearchIdList(list, id) {
100
+ let rtn = []
101
+ list.forEach((v) => {
102
+ if (v.id == id) {
103
+ rtn = [v.id]
104
+ return
105
+ } else {
106
+ let idList = this.getSearchIdList(
107
+ v.children == null ? [] : v.children,
108
+ id
109
+ )
110
+ if (idList.length > 0) {
111
+ rtn = [v.id, ...idList]
112
+ }
113
+ }
114
+ })
115
+ return rtn
116
+ },
117
+ initOption(list) {
118
+ list.forEach((v) => {
119
+ if (!v.children || v.children.length === 0) {
120
+ v.children = null
121
+ } else {
122
+ this.initOption(v.children)
123
+ }
124
+ })
125
+ },
126
+ },
127
+ computed: {
128
+ searchVal() {
129
+ let searchVal = this.getSearchIdList(this.options, this.idVal)
130
+ console.log('searchVal', this.options, searchVal, this.idVal)
131
+ return this.getSearchIdList(this.options, this.idVal)
132
+ },
133
+ },
134
+ }
117
135
  </script>
136
+
118
137
  <style scoped>
119
- .lucencyInput .el-input__inner {
120
- border: 0px;
121
- }
122
- .el-cascader {
123
- width: 100%
124
- }
138
+ .lucencyInput .el-input__inner {
139
+ border: 0px;
140
+ }
141
+ .el-cascader {
142
+ width: 100%;
143
+ }
125
144
  </style>
@@ -1,31 +1,33 @@
1
1
  <template>
2
2
  <el-container>
3
3
  <el-aside>
4
- <orgTree ref='orgTree' @org-node-click='query'></orgTree>
4
+ <orgTree ref="orgTree" @org-node-click="query"></orgTree>
5
5
  </el-aside>
6
6
  <el-main>
7
- <authUser ref='authUser'></authUser>
7
+ <authUser ref="authUser"></authUser>
8
8
  </el-main>
9
9
  </el-container>
10
10
  </template>
11
+
11
12
  <script>
12
13
  import orgTree from '../orgDept/orgTree'
13
14
  import authUser from './authuser'
14
15
 
15
16
  export default {
16
17
  components: {
17
- orgTree, authUser
18
+ orgTree,
19
+ authUser,
18
20
  },
19
21
  data() {
20
22
  return {
21
23
  orgnId: '0',
22
- orgnName: ''
24
+ orgnName: '',
23
25
  }
24
26
  },
25
27
  methods: {
26
- query: function(data) {
28
+ query: function (data) {
27
29
  this.$refs['authUser'].queryUser(data.id, data.text)
28
- }
29
- }
30
+ },
31
+ },
30
32
  }
31
33
  </script>