hd-idevvue3 3.0.3 → 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 +3 -1
  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,16 +1,24 @@
1
1
  <template>
2
- <ExDatePicker ref="exDatePicker" v-model="selVal" v-bind="$attrs" v-on="$listeners" :format="dateFormat"
3
- :valueFormat="$attrs.valueFormat || valueFormat" :placeholder="placeholder" @focus="dateFocus"
4
- @blur="dateBlur" :clearable="false">
2
+ <ExDatePicker
3
+ ref="exDatePicker"
4
+ v-model="selVal"
5
+ v-bind="$attrs"
6
+ v-on="$listeners"
7
+ :format="dateFormat"
8
+ :valueFormat="$attrs.valueFormat || valueFormat"
9
+ :placeholder="placeholder"
10
+ @focus="dateFocus"
11
+ @blur="dateBlur"
12
+ :clearable="false"
13
+ >
5
14
  </ExDatePicker>
6
-
7
15
  </template>
8
16
 
9
17
  <script>
10
18
  /**
11
- * 继承ElDatePicker ElementUi的日期以时间戳形式,这里改为字符串形式'yyyy-MM-dd HH:mm' 简化调用
12
- * @module HdDatePicker
13
- */
19
+ * 继承ElDatePicker ElementUi的日期以时间戳形式,这里改为字符串形式'yyyy-MM-dd HH:mm' 简化调用
20
+ * @module HdDatePicker
21
+ */
14
22
  export default {
15
23
  name: 'HdDatePicker',
16
24
  data() {
@@ -24,12 +32,16 @@ export default {
24
32
  },
25
33
  props: ['value'],
26
34
  inheritAttrs: false,
27
- created() { // 判断
35
+ created() {
36
+ // 判断
28
37
  if (this.$attrs.type == 'date' || this.$attrs.type == 'daterange') {
29
38
  this.format = 'yyyy-MM-dd'
30
39
  this.valueFormat = 'yyyy-MM-dd'
31
40
  this.placeholder = this.$t('选择日期')
32
- } else if (this.$attrs.type == 'datetime' || this.$attrs.type == 'datetimerange') {
41
+ } else if (
42
+ this.$attrs.type == 'datetime' ||
43
+ this.$attrs.type == 'datetimerange'
44
+ ) {
33
45
  this.format = 'yyyy-MM-dd HH:mm'
34
46
  this.valueFormat = 'yyyy-MM-dd HH:mm'
35
47
  this.placeholder = this.$t('选择日期时间')
@@ -51,28 +63,32 @@ export default {
51
63
  },
52
64
  methods: {
53
65
  dateFocus(v) {
54
- this.dateFormat = (this.$attrs.format || this.format).replaceAll(/(-|:|\s|y)/, "");
66
+ this.dateFormat = (this.$attrs.format || this.format).replaceAll(
67
+ /(-|:|\s|y)/,
68
+ ''
69
+ )
55
70
  if (!this.value) {
56
71
  this.$set(this.$refs.exDatePicker, 'userInput', new Date().format('MM'))
57
72
  }
58
73
  },
59
74
  dateBlur() {
60
75
  this.dateFormat = this.$attrs.format || this.format
61
- }
76
+ },
62
77
  },
63
- computed: {// 给外层v-model赋值
78
+ computed: {
79
+ // 给外层v-model赋值
64
80
  selVal: {
65
81
  // 动态计算selVal的值
66
82
  get: function () {
67
83
  console.log('调用了get属性')
68
84
  return this.value
69
85
  },
70
- set: function (val) { // v-model input
86
+ set: function (val) {
87
+ // v-model input
71
88
  console.log('调用了set属性', val)
72
89
  this.$emit('input', val)
73
- }
90
+ },
74
91
  },
75
- }
92
+ },
76
93
  }
77
-
78
94
  </script>
@@ -1,13 +1,30 @@
1
1
  <template>
2
- <ExDialog :fullscreen="fullscreen" v-el-drag-dialog v-bind="$attrs" v-on="$listeners" :close-on-click-modal="false"
3
- append-to-body v-if="$attrs.modal==null||$attrs.modal==true" :title="$t($attrs.title)">
2
+ <ExDialog
3
+ :fullscreen="fullscreen"
4
+ v-el-drag-dialog
5
+ v-bind="$attrs"
6
+ v-on="$listeners"
7
+ :close-on-click-modal="false"
8
+ append-to-body
9
+ v-if="$attrs.modal == null || $attrs.modal == true"
10
+ :title="$t($attrs.title)"
11
+ >
4
12
  <slot></slot>
5
13
  <div slot="footer">
6
14
  <slot name="footer"></slot>
7
15
  </div>
8
16
  </ExDialog>
9
- <ExDialog :fullscreen="fullscreen" v-el-drag-dialog v-bind="$attrs" v-on="$listeners" :close-on-click-modal="false"
10
- append-to-body class="wrapperChg" custom-class="dialogChg" v-else>
17
+ <ExDialog
18
+ :fullscreen="fullscreen"
19
+ v-el-drag-dialog
20
+ v-bind="$attrs"
21
+ v-on="$listeners"
22
+ :close-on-click-modal="false"
23
+ append-to-body
24
+ class="wrapperChg"
25
+ custom-class="dialogChg"
26
+ v-else
27
+ >
11
28
  <slot></slot>
12
29
  <div slot="footer">
13
30
  <slot name="footer"></slot>
@@ -16,48 +33,49 @@
16
33
  </template>
17
34
 
18
35
  <script>
19
- /**
20
- * 继承并重写ElDialog 使弹窗可拖动
21
- * 7.6实现 在modal=false时,可以点击底层内容
22
- * @module HdDialog
23
- */
24
- import elDragDialog from '../directive/el-dragDialog' // base on element-ui
25
- export default {
26
- name: 'HdDialog',
27
- directives: {elDragDialog},
28
- inheritAttrs: false,
29
- components: {},
30
- data() {
31
- return {nowFull: false}
32
- },
33
- mounted() {
34
- // $(".el-dialog").draggable({handle: '.el-dialog__header'});
35
- // $(".el-dialog__header").css("cursor", "move")
36
- },
37
- computed: {
38
- fullscreen() {
39
- if (this.nowFull) {
40
- return true
41
- }
36
+ /**
37
+ * 继承并重写ElDialog 使弹窗可拖动
38
+ * 7.6实现 在modal=false时,可以点击底层内容
39
+ * @module HdDialog
40
+ */
41
+ import elDragDialog from '../directive/el-dragDialog' // base on element-ui
42
+ export default {
43
+ name: 'HdDialog',
44
+ directives: { elDragDialog },
45
+ inheritAttrs: false,
46
+ components: {},
47
+ data() {
48
+ return { nowFull: false }
49
+ },
50
+ mounted() {
51
+ // $(".el-dialog").draggable({handle: '.el-dialog__header'});
52
+ // $(".el-dialog__header").css("cursor", "move")
53
+ },
54
+ computed: {
55
+ fullscreen() {
56
+ if (this.nowFull) {
57
+ return true
58
+ }
42
59
 
43
- if (this.$attrs.fullscreen === '' || this.$attrs.fullscreen === true) {
44
- return true
45
- }
60
+ if (this.$attrs.fullscreen === '' || this.$attrs.fullscreen === true) {
61
+ return true
46
62
  }
47
- }
48
- }
63
+ },
64
+ },
65
+ }
49
66
  </script>
50
- <style rel="stylesheet/scss" lang="scss">
51
- .wrapperChg { //为了让弹窗底层的内容可以修改,在model:false时增加class
52
- position: static !important;
53
- z-index: 1;
54
- }
55
67
 
56
- .dialogChg {
57
- position: absolute !important;
58
- z-index: 1001;
59
- left: 0;
60
- right: 0;
61
- }
62
- </style>
68
+ <style lang="scss" rel="stylesheet/scss">
69
+ .wrapperChg {
70
+ //为了让弹窗底层的内容可以修改,在model:false时增加class
71
+ position: static !important;
72
+ z-index: 1;
73
+ }
63
74
 
75
+ .dialogChg {
76
+ position: absolute !important;
77
+ z-index: 1001;
78
+ left: 0;
79
+ right: 0;
80
+ }
81
+ </style>
@@ -1,163 +1,188 @@
1
1
  <template>
2
- <el-select v-model="selVal" filterable :clearable="clearable" :placeholder="placeholder?$t(placeholder):$t('请选择')"
3
- style="width:100%"
4
- v-bind="$attrs" v-on="$listeners" @change="change" :filter-method="filterMe"
5
- @visible-change="visibleChange">
6
- <el-option v-for="item in options" :key="item.codeId" :label="item.name" :value="item.code">
7
-
2
+ <el-select
3
+ v-model="selVal"
4
+ filterable
5
+ :clearable="clearable"
6
+ :placeholder="placeholder ? $t(placeholder) : $t('请选择')"
7
+ style="width: 100%"
8
+ v-bind="$attrs"
9
+ v-on="$listeners"
10
+ @change="change"
11
+ :filter-method="filterMe"
12
+ @visible-change="visibleChange"
13
+ >
14
+ <el-option
15
+ v-for="item in options"
16
+ :key="item.codeId"
17
+ :label="item.name"
18
+ :value="item.code"
19
+ >
8
20
  <!--item[myts]可以实现动态label-->
9
21
  <span style="float: left">{{ item.name }}</span>
10
- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
22
+ <span style="float: right; color: #8492a6; font-size: 13px">{{
23
+ item.code
24
+ }}</span>
11
25
  </el-option>
12
26
  </el-select>
13
27
  </template>
14
28
 
15
29
  <script>
30
+ /**
31
+ * 继承ElSelect属性和事件,syscode下的field只需要传入field,其它的需要传入url
32
+ * @module HdDrop
33
+ */
34
+ export default {
35
+ name: 'HdDrop',
36
+ data() {
37
+ return {
38
+ options: [],
39
+ backUpArr: [], // 备份
40
+ }
41
+ },
16
42
  /**
17
- * 继承ElSelect属性和事件,syscode下的field只需要传入field,其它的需要传入url
18
- * @module HdDrop
43
+ * Props
44
+ * @prop {String} value v-model双向绑定
45
+ * @prop {String} field syscode时,传入下拉field
46
+ * @prop {String} placeholder
47
+ * @prop {String} url 不使用syscode下拉时指定url
48
+ * @prop {String} txtVal 加.sync双向绑定 选择的label
49
+ * @prop {Array} codeIn 有值时,只显示指定的code :codeIn="['A','S']"
19
50
  */
20
- export default {
21
- name: 'HdDrop',
22
- data() {
23
- return {
24
- options: [],
25
- backUpArr: []// 备份
26
- }
51
+ props: {
52
+ value: String,
53
+ field: String,
54
+ placeholder: String,
55
+ name: String,
56
+ url: String,
57
+ txtVal: String,
58
+ codeIn: Array,
59
+ clearable: {
60
+ type: Boolean,
61
+ default: true,
27
62
  },
28
- /**
29
- * Props
30
- * @prop {String} value v-model双向绑定
31
- * @prop {String} field syscode时,传入下拉field
32
- * @prop {String} placeholder
33
- * @prop {String} url 不使用syscode下拉时指定url
34
- * @prop {String} txtVal 加.sync双向绑定 选择的label
35
- * @prop {Array} codeIn 有值时,只显示指定的code :codeIn="['A','S']"
36
- */
37
- props: {
38
- value: String,
39
- field: String,
40
- placeholder: String,
41
- name: String,
42
- url: String,
43
- txtVal: String,
44
- codeIn: Array,
45
- clearable: {
46
- type: Boolean,
47
- default: true
63
+ }, // 设置value为props属性-必须,name.sync(不能用)和txtVal.sync双向
64
+ inheritAttrs: false,
65
+ mounted() {
66
+ if (this.url || this.field) {
67
+ this.doQuery()
68
+ }
69
+ },
70
+ methods: {
71
+ doQuery() {
72
+ let quUrl = ''
73
+ if (!this.url) {
74
+ quUrl =
75
+ '/webresources/login/privilege/SysCode/findAll?fieldCod=' + this.field
76
+ } else {
77
+ quUrl = this.url
48
78
  }
49
- }, // 设置value为props属性-必须,name.sync(不能用)和txtVal.sync双向
50
- inheritAttrs: false,
51
- mounted() {
52
- if (this.url || this.field) {
53
- this.doQuery()
79
+ this.$http.get(quUrl).then((response) => {
80
+ this.options = response.data
81
+ if (this.codeIn) {
82
+ // 如果options的code和codeIn相同,就显示
83
+ this.options = this.options.filter((item) => {
84
+ return this.codeIn.find((v) => v == item.code)
85
+ })
86
+ }
87
+ this.backUpArr = this.options
88
+ })
89
+ },
90
+ change(val) {
91
+ this.upName(val)
92
+ //this.$emit('change', val) 不用写,el-select会传递到上层
93
+ },
94
+ visibleChange(val) {
95
+ // 下拉隐藏时还原
96
+ if (!val) {
97
+ // 隐藏时
98
+ this.options = this.backUpArr
54
99
  }
55
100
  },
56
- methods: {
57
- doQuery() {
58
- let quUrl = ''
59
- if (!this.url) {
60
- quUrl = '/webresources/login/privilege/SysCode/findAll?fieldCod=' + this.field
61
- } else {
62
- quUrl = this.url
63
- }
64
- this.$http.get(quUrl).then(response => {
65
- this.options = response.data
66
- if (this.codeIn) { // 如果options的code和codeIn相同,就显示
67
- this.options = this.options.filter((item) => {
68
- return this.codeIn.find(v => v == item.code)
69
- })
101
+ filterMe(val) {
102
+ // 过滤 根据name code
103
+ if (val) {
104
+ // val存在
105
+ this.options = this.backUpArr.filter((item) => {
106
+ if (item.code.indexOf(val) >= 0 || item.name.indexOf(val) >= 0) {
107
+ return true
70
108
  }
71
- this.backUpArr = this.options
72
109
  })
73
- },
74
- change(val) {
75
- this.upName(val)
76
- //this.$emit('change', val) 不用写,el-select会传递到上层
77
- },
78
- visibleChange(val) { // 下拉隐藏时还原
79
- if (!val) { // 隐藏时
80
- this.options = this.backUpArr
81
- }
82
- },
83
- filterMe(val) { // 过滤 根据name code
84
- if (val) { // val存在
85
- this.options = this.backUpArr.filter((item) => {
86
- if (item.code.indexOf(val) >= 0 || item.name.indexOf(val) >= 0) {
87
- return true
88
- }
89
- })
90
- } else { // val为空时,还原数组
91
- this.options = this.backUpArr
92
- }
93
- },
94
- upName(value) {
95
- if (!value) {
96
- this.$emit('update:name', null)// 匹配不上
110
+ } else {
111
+ // val为空时,还原数组
112
+ this.options = this.backUpArr
113
+ }
114
+ },
115
+ upName(value) {
116
+ if (!value) {
117
+ this.$emit('update:name', null) // 匹配不上
118
+ }
119
+ for (let i = 0; i < this.options.length; i++) {
120
+ if (this.options[i].code == value) {
121
+ const obj = this.options[i]
122
+ this.$emit('update:name', obj.name) // 用txtVal
123
+ this.$emit('update:txtVal', obj.name)
124
+ return true
97
125
  }
98
- for (let i = 0; i < this.options.length; i++) {
99
- if (this.options[i].code == value) {
100
- const obj = this.options[i]
101
- this.$emit('update:name', obj.name)// 用txtVal
102
- this.$emit('update:txtVal', obj.name)
126
+ }
127
+ },
128
+ },
129
+ watch: {
130
+ // // 针对编辑时,不改变 hddrop里的内容
131
+ // val: function (value) {
132
+ // for (let i = 0; i < this.options.length; i++) {
133
+ // if (this.options[i].code == value) {
134
+ // let obj = this.options[i]
135
+ // this.$emit('update:name', obj.name)
136
+ // return true
137
+ // }
138
+ // }
139
+ // },
140
+ // //针对增加编辑时,改变了hddrop里的值
141
+ // value: function (value) {
142
+ // for (let i = 0; i < this.options.length; i++) {
143
+ // if (this.options[i].code == value) {
144
+ // let obj = this.options[i]
145
+ // this.$emit('update:name', obj.name)
146
+ // return true
147
+ // }
148
+ // }
149
+ // }
150
+ url: function () {
151
+ this.doQuery()
152
+ },
153
+ field: function () {
154
+ this.doQuery()
155
+ },
156
+ codeIn: {
157
+ handler(newValue, oldValue) {
158
+ // codeIn改变时计算
159
+ for (let i = 0; i < newValue.length; i++) {
160
+ if (newValue[i] != oldValue[i]) {
161
+ this.doQuery()
103
162
  return true
104
163
  }
105
164
  }
106
- }
165
+ },
166
+ deep: true,
107
167
  },
108
- watch: {
109
- // // 针对编辑时,不改变 hddrop里的内容
110
- // val: function (value) {
111
- // for (let i = 0; i < this.options.length; i++) {
112
- // if (this.options[i].code == value) {
113
- // let obj = this.options[i]
114
- // this.$emit('update:name', obj.name)
115
- // return true
116
- // }
117
- // }
118
- // },
119
- // //针对增加编辑时,改变了hddrop里的值
120
- // value: function (value) {
121
- // for (let i = 0; i < this.options.length; i++) {
122
- // if (this.options[i].code == value) {
123
- // let obj = this.options[i]
124
- // this.$emit('update:name', obj.name)
125
- // return true
126
- // }
127
- // }
128
- // }
129
- url: function () {
130
- this.doQuery()
168
+ },
169
+ computed: {
170
+ // 给外层v-model赋值
171
+ selVal: {
172
+ // 动态计算selVal的值
173
+ get: function () {
174
+ if (!this.value) {
175
+ // filterMe在null时不触发,''就没问题
176
+ return ''
177
+ }
178
+ return this.value
131
179
  },
132
- field: function () {
133
- this.doQuery()
180
+ set: function (val) {
181
+ // v-model input
182
+ // upName(val)//更新name
183
+ this.$emit('input', val)
134
184
  },
135
- codeIn: {
136
- handler(newValue, oldValue) { // codeIn改变时计算
137
- for (let i = 0; i < newValue.length; i++) {
138
- if (newValue[i] != oldValue[i]) {
139
- this.doQuery()
140
- return true
141
- }
142
- }
143
- },
144
- deep: true
145
- }
146
185
  },
147
- computed: {// 给外层v-model赋值
148
- selVal: {
149
- // 动态计算selVal的值
150
- get: function () {
151
- if (!this.value) { // filterMe在null时不触发,''就没问题
152
- return ''
153
- }
154
- return this.value
155
- },
156
- set: function (val) { // v-model input
157
- // upName(val)//更新name
158
- this.$emit('input', val)
159
- }
160
- }
161
- }
162
- }
186
+ },
187
+ }
163
188
  </script>