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.
- package/dist/assets/index.9c127719.css +1 -0
- package/dist/hd-idevvue3.mjs +3521 -3305
- package/dist/hd-idevvue3.umd.js +29 -29
- package/npminstall-debug.log +2 -10
- package/package.json +4 -2
- package/pnpm-lock.yaml +37 -4
- package/src/App.vue +11 -15
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +9 -10
- package/src/demo/dropdemo.vue +42 -43
- package/src/demo/extsets.vue +140 -39
- package/src/demo/formedit.vue +157 -145
- package/src/demo/hightquery.vue +263 -66
- package/src/demo/inlineedit.vue +129 -35
- package/src/demo/selfdrop.vue +32 -15
- package/src/directive/el-dragDialog/drag.js +13 -13
- package/src/directive/el-dragDialog/index.js +13 -13
- package/src/errorLog.js +3 -3
- package/src/hdcom/BigGrid.js +54 -48
- package/src/hdcom/BillShow.vue +84 -63
- package/src/hdcom/BillUpload.vue +144 -86
- package/src/hdcom/BtnRight.vue +26 -23
- package/src/hdcom/ErrHint.vue +36 -24
- package/src/hdcom/ExtendColumn.vue +97 -90
- package/src/hdcom/ExtendCommon.js +24 -13
- package/src/hdcom/ExtendForm.vue +107 -80
- package/src/hdcom/FacePicUpload.vue +59 -50
- package/src/hdcom/FaceRecTest.vue +87 -77
- package/src/hdcom/GridChart.vue +175 -162
- package/src/hdcom/GridExField.vue +328 -234
- package/src/hdcom/GridShow.vue +89 -39
- package/src/hdcom/HdAside.vue +192 -145
- package/src/hdcom/HdBtn.vue +44 -32
- package/src/hdcom/HdButton.vue +141 -117
- package/src/hdcom/HdComFaceRec.vue +80 -32
- package/src/hdcom/HdComGrid.vue +329 -229
- package/src/hdcom/HdComQuery.vue +179 -90
- package/src/hdcom/HdComQueryDetail.vue +159 -115
- package/src/hdcom/HdComSortDetail.vue +136 -130
- package/src/hdcom/HdDatePicker.vue +32 -16
- package/src/hdcom/HdDialog.vue +62 -44
- package/src/hdcom/HdDrop.vue +163 -138
- package/src/hdcom/HdFileUpload.vue +138 -119
- package/src/hdcom/HdFilterBox.vue +62 -62
- package/src/hdcom/HdFooter.vue +152 -119
- package/src/hdcom/HdForm.vue +276 -203
- package/src/hdcom/HdFormBtn.vue +81 -39
- package/src/hdcom/HdFormItem.vue +14 -10
- package/src/hdcom/HdGrid.vue +353 -156
- package/src/hdcom/HdGridEditBtn.vue +34 -20
- package/src/hdcom/HdGridExt.js +78 -47
- package/src/hdcom/HdGridSel.vue +227 -193
- package/src/hdcom/HdHeader.vue +149 -117
- package/src/hdcom/HdHotKey.vue +70 -67
- package/src/hdcom/HdInputHint.vue +40 -36
- package/src/hdcom/HdMain.vue +25 -27
- package/src/hdcom/HdMessage.vue +180 -171
- package/src/hdcom/HdNum.vue +67 -57
- package/src/hdcom/HdPopSel.vue +46 -24
- package/src/hdcom/HdRightMenu.vue +63 -61
- package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
- package/src/hdcom/HdTableColumn.vue +156 -109
- package/src/hdcom/HdTempSave.vue +138 -116
- package/src/hdcom/HdTree.vue +89 -72
- package/src/hdcom/HdTreeTable/eval.js +8 -3
- package/src/hdcom/HdTreeTable/index.vue +229 -174
- package/src/hdcom/ImportExcel.vue +69 -34
- package/src/hdcom/index.js +39 -44
- package/src/idev.common.js +54 -47
- package/src/index.js +3 -6
- package/src/utils/HdQuery.js +25 -14
- package/src/utils/comutils.js +50 -28
- package/src/utils/gogocodeTransfer.js +59 -0
- package/src/utils/utils.js +30 -19
- package/src/vendor/Blob.js +187 -179
- package/src/vendor/Export2Excel.js +231 -220
- package/src/vendor/Export2Zip.js +25 -22
- package/src/views/layout/AppMain.vue +34 -32
- package/src/views/layout/HdLayout.vue +64 -52
- package/src/views/layout/header/ElasticSearch.vue +196 -159
- package/src/views/layout/header/HZRecorder.js +163 -135
- package/src/views/layout/header/HeaderSearch.vue +165 -145
- package/src/views/layout/header/Levelbar.vue +55 -49
- package/src/views/layout/header/MainHeader.vue +233 -189
- package/src/views/layout/header/Navbar.vue +74 -78
- package/src/views/layout/header/ScrollPane.vue +103 -81
- package/src/views/layout/header/TagsView.vue +169 -164
- package/src/views/layout/header/VocRec.vue +86 -78
- package/src/views/layout/header/changepswform.vue +98 -64
- package/src/views/layout/index.js +5 -7
- package/src/views/layout/menu/Hamburger.vue +63 -45
- package/src/views/layout/menu/HdMenu.vue +155 -118
- package/src/views/layout/menu/index.vue +21 -19
- package/src/views/privilege/commsg/commsg.vue +115 -41
- package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
- package/src/views/privilege/commsg/commsgRole.vue +180 -109
- package/src/views/privilege/commsg/commsgform.vue +125 -101
- package/src/views/privilege/commsg/commsgiframe.vue +30 -23
- package/src/views/privilege/commsg/commsgto.vue +163 -84
- package/src/views/privilege/commsg/commsgtoform.vue +64 -58
- package/src/views/privilege/commsg/commsgtrans.vue +187 -115
- package/src/views/privilege/exfield/comexcolumn.vue +133 -43
- package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
- package/src/views/privilege/exfield/comexfield.vue +15 -17
- package/src/views/privilege/exfield/comexfieldform.vue +71 -53
- package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
- package/src/views/privilege/index.js +19 -20
- package/src/views/privilege/menu/comMenu.vue +49 -41
- package/src/views/privilege/menu/menu.vue +166 -49
- package/src/views/privilege/menu/menuinfo.vue +41 -34
- package/src/views/privilege/menu/rolelist.vue +78 -33
- package/src/views/privilege/menu/userlist.vue +76 -33
- package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
- package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
- package/src/views/privilege/orgDept/authOrgn.vue +157 -65
- package/src/views/privilege/orgDept/authorgnform.vue +50 -38
- package/src/views/privilege/orgDept/orgDept.vue +38 -37
- package/src/views/privilege/orgDept/orgTree.vue +99 -88
- package/src/views/privilege/orgDept/orgnselect.vue +132 -111
- package/src/views/privilege/personDept/authuser.vue +197 -91
- package/src/views/privilege/personDept/authuserform.vue +123 -71
- package/src/views/privilege/personDept/facerec.vue +128 -83
- package/src/views/privilege/personDept/orgncascader.vue +134 -115
- package/src/views/privilege/personDept/personDept.vue +9 -7
- package/src/views/privilege/quartz/comquartzjob.vue +123 -38
- package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
- package/src/views/privilege/quartz/comquartzlog.vue +116 -32
- package/src/views/privilege/role/btnRole.vue +123 -67
- package/src/views/privilege/role/menuRole.vue +65 -45
- package/src/views/privilege/role/orgnRole.vue +63 -41
- package/src/views/privilege/role/role.vue +26 -9
- package/src/views/privilege/role/rolelist.vue +114 -45
- package/src/views/privilege/role/roleselect.vue +34 -17
- package/src/views/privilege/search/comsearch.vue +164 -73
- package/src/views/privilege/search/menu.vue +38 -22
- package/src/views/privilege/syscode/syscode.vue +157 -69
- package/src/views/privilege/syscode/sysfield.vue +96 -43
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
- package/src/views/privilege/syslog/menulog.vue +38 -22
- package/src/views/privilege/syslog/syslog.vue +145 -78
- package/src/views/privilege/syslog/syslogconfig.vue +91 -24
- package/src/views/privilege/syslog/syslogform.vue +45 -43
- package/src/views/privilege/syslog/syslogframe.vue +26 -26
- package/src/views/privilege/userRole/userRole.vue +187 -89
- package/vite.config.js +7 -0
- package/dist/assets/index.774ef40e.css +0 -1
- package/src/views/privilege.zip +0 -0
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ExDatePicker
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
12
|
-
|
|
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 (
|
|
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(
|
|
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: {
|
|
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) {
|
|
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>
|
package/src/hdcom/HdDialog.vue
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ExDialog
|
|
3
|
-
|
|
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
|
|
10
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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>
|
package/src/hdcom/HdDrop.vue
CHANGED
|
@@ -1,163 +1,188 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-select
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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">{{
|
|
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
|
-
*
|
|
18
|
-
* @
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
75
|
-
this.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
133
|
-
|
|
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
|
-
|
|
148
|
-
|
|
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>
|