hd-idevvue3 3.0.0 → 3.0.2
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/.env.development +5 -0
- package/.env.production +5 -0
- package/README.md +22 -191
- package/dist/assets/index.774ef40e.css +1 -0
- package/dist/hd-idevvue3.mjs +45697 -0
- package/dist/hd-idevvue3.umd.js +153 -0
- package/index.html +1 -0
- package/npminstall-debug.log +10 -2
- package/package.json +35 -40
- package/pnpm-lock.yaml +2631 -0
- package/src/App.vue +15 -0
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +43 -0
- package/src/demo/dropdemo.vue +43 -0
- package/src/demo/extsets.vue +107 -0
- package/src/demo/formedit.vue +145 -0
- package/src/demo/hightquery.vue +169 -0
- package/src/demo/inlineedit.vue +88 -0
- package/src/demo/selfdrop.vue +41 -0
- package/src/demo//350/241/214/345/206/205/347/272/247/350/201/224.txt +2 -0
- package/src/directive/el-dragDialog/drag.js +124 -0
- package/src/directive/el-dragDialog/index.js +13 -0
- package/src/errorLog.js +16 -0
- package/src/hdcom/BigGrid.js +173 -0
- package/src/hdcom/BillShow.vue +90 -0
- package/src/hdcom/BillUpload.vue +253 -0
- package/src/hdcom/BtnRight.vue +98 -0
- package/src/hdcom/ErrHint.vue +30 -0
- package/src/hdcom/ExtendColumn.vue +108 -0
- package/src/hdcom/ExtendCommon.js +29 -0
- package/src/hdcom/ExtendForm.vue +114 -0
- package/src/hdcom/FacePicUpload.vue +71 -0
- package/src/hdcom/FaceRecTest.vue +104 -0
- package/src/hdcom/GridChart.vue +194 -0
- package/src/hdcom/GridExField.vue +281 -0
- package/src/hdcom/GridShow.vue +238 -0
- package/src/hdcom/HdAside.vue +178 -0
- package/src/hdcom/HdBtn.vue +113 -0
- package/src/hdcom/HdButton.vue +137 -0
- package/src/hdcom/HdComFaceRec.vue +58 -0
- package/src/hdcom/HdComGrid.vue +776 -0
- package/src/hdcom/HdComQuery.vue +273 -0
- package/src/hdcom/HdComQueryDetail.vue +161 -0
- package/src/hdcom/HdComSortDetail.vue +155 -0
- package/src/hdcom/HdDatePicker.vue +78 -0
- package/src/hdcom/HdDialog.vue +63 -0
- package/src/hdcom/HdDrop.vue +163 -0
- package/src/hdcom/HdFileUpload.vue +148 -0
- package/src/hdcom/HdFilterBox.vue +90 -0
- package/src/hdcom/HdFooter.vue +149 -0
- package/src/hdcom/HdForm.vue +278 -0
- package/src/hdcom/HdFormBtn.vue +89 -0
- package/src/hdcom/HdFormItem.vue +35 -0
- package/src/hdcom/HdGctosGrid +0 -0
- package/src/hdcom/HdGrid.vue +825 -0
- package/src/hdcom/HdGridEditBtn.vue +44 -0
- package/src/hdcom/HdGridExt.js +219 -0
- package/src/hdcom/HdGridSel.vue +223 -0
- package/src/hdcom/HdHeader.vue +148 -0
- package/src/hdcom/HdHotKey.vue +81 -0
- package/src/hdcom/HdInputHint.vue +49 -0
- package/src/hdcom/HdMain.vue +43 -0
- package/src/hdcom/HdMessage.vue +192 -0
- package/src/hdcom/HdNum.vue +69 -0
- package/src/hdcom/HdPopSel.vue +58 -0
- package/src/hdcom/HdRightMenu.vue +61 -0
- package/src/hdcom/HdSel/SelGridFieldcod.vue +36 -0
- package/src/hdcom/HdTableColumn.vue +334 -0
- package/src/hdcom/HdTempSave.vue +140 -0
- package/src/hdcom/HdTree.vue +86 -0
- package/src/hdcom/HdTreeTable/eval.js +34 -0
- package/src/hdcom/HdTreeTable/index.vue +174 -0
- package/src/hdcom/ImportExcel.vue +143 -0
- package/src/hdcom/index.js +80 -0
- package/src/idev.common.js +72 -0
- package/src/index.js +14 -0
- package/src/utils/HdQuery.js +54 -0
- package/src/utils/comutils.js +98 -0
- package/src/utils/utils.js +105 -0
- package/src/vendor/Blob.js +179 -0
- package/src/vendor/Export2Excel.js +220 -0
- package/src/vendor/Export2Zip.js +22 -0
- package/src/views/layout/AppMain.vue +32 -0
- package/src/views/layout/HdLayout.vue +78 -0
- package/src/views/layout/header/ElasticSearch.vue +225 -0
- package/src/views/layout/header/HZRecorder.js +231 -0
- package/src/views/layout/header/HeaderSearch.vue +198 -0
- package/src/views/layout/header/Levelbar.vue +49 -0
- package/src/views/layout/header/MainHeader.vue +271 -0
- package/src/views/layout/header/Navbar.vue +105 -0
- package/src/views/layout/header/ScrollPane.vue +81 -0
- package/src/views/layout/header/TagsView.vue +210 -0
- package/src/views/layout/header/VocRec.vue +97 -0
- package/src/views/layout/header/changepswform.vue +96 -0
- package/src/views/layout/index.js +12 -0
- package/src/views/layout/menu/Hamburger.vue +45 -0
- package/src/views/layout/menu/HdMenu.vue +167 -0
- package/src/views/layout/menu/css/menu.css +288 -0
- package/src/views/layout/menu/index.vue +25 -0
- package/src/views/privilege/commsg/commsg.vue +78 -0
- package/src/views/privilege/commsg/commsgOrgn.vue +42 -0
- package/src/views/privilege/commsg/commsgRole.vue +149 -0
- package/src/views/privilege/commsg/commsgform.vue +160 -0
- package/src/views/privilege/commsg/commsgiframe.vue +33 -0
- package/src/views/privilege/commsg/commsgto.vue +120 -0
- package/src/views/privilege/commsg/commsgtoform.vue +108 -0
- package/src/views/privilege/commsg/commsgtrans.vue +155 -0
- package/src/views/privilege/exfield/comexcolumn.vue +71 -0
- package/src/views/privilege/exfield/comexcolumnform.vue +101 -0
- package/src/views/privilege/exfield/comexfield.vue +31 -0
- package/src/views/privilege/exfield/comexfieldform.vue +94 -0
- package/src/views/privilege/exfield/comexfieldsub.vue +72 -0
- package/src/views/privilege/index.js +42 -0
- package/src/views/privilege/menu/comMenu.vue +41 -0
- package/src/views/privilege/menu/menu.vue +133 -0
- package/src/views/privilege/menu/menuinfo.vue +56 -0
- package/src/views/privilege/menu/rolelist.vue +47 -0
- package/src/views/privilege/menu/userlist.vue +49 -0
- package/src/views/privilege/mobile/authmobileupdate.vue +69 -0
- package/src/views/privilege/mobile/authmobileupdateform.vue +90 -0
- package/src/views/privilege/orgDept/authOrgn.vue +96 -0
- package/src/views/privilege/orgDept/authorgnform.vue +145 -0
- package/src/views/privilege/orgDept/orgDept.vue +37 -0
- package/src/views/privilege/orgDept/orgTree.vue +88 -0
- package/src/views/privilege/orgDept/orgnselect.vue +134 -0
- package/src/views/privilege/personDept/authuser.vue +123 -0
- package/src/views/privilege/personDept/authuserform.vue +154 -0
- package/src/views/privilege/personDept/facerec.vue +117 -0
- package/src/views/privilege/personDept/orgncascader.vue +125 -0
- package/src/views/privilege/personDept/personDept.vue +31 -0
- package/src/views/privilege/quartz/comquartzjob.vue +65 -0
- package/src/views/privilege/quartz/comquartzjobform.vue +99 -0
- package/src/views/privilege/quartz/comquartzlog.vue +59 -0
- package/src/views/privilege/role/btnRole.vue +117 -0
- package/src/views/privilege/role/menuRole.vue +64 -0
- package/src/views/privilege/role/orgnRole.vue +56 -0
- package/src/views/privilege/role/role.vue +67 -0
- package/src/views/privilege/role/rolelist.vue +67 -0
- package/src/views/privilege/role/roleselect.vue +57 -0
- package/src/views/privilege/search/comsearch.vue +105 -0
- package/src/views/privilege/search/menu.vue +52 -0
- package/src/views/privilege/syscode/syscode.vue +103 -0
- package/src/views/privilege/syscode/sysfield.vue +66 -0
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -0
- package/src/views/privilege/syslog/menulog.vue +52 -0
- package/src/views/privilege/syslog/syslog.vue +115 -0
- package/src/views/privilege/syslog/syslogconfig.vue +61 -0
- package/src/views/privilege/syslog/syslogform.vue +83 -0
- package/src/views/privilege/syslog/syslogframe.vue +26 -0
- package/src/views/privilege/userRole/userRole.vue +122 -0
- package/src/views/privilege.zip +0 -0
- package/vite.config.js +93 -0
- package/.babelrc +0 -17
- package/.editorconfig +0 -14
- package/.eslintignore +0 -3
- package/.npminstall.done +0 -1
- package/.postcssrc.js +0 -8
- package/LICENSE +0 -21
- package/Listening +0 -28
- package/build/build.js +0 -70
- package/build/check-versions.js +0 -45
- package/build/config.js +0 -81
- package/build/dev-client.js +0 -9
- package/build/dev-server.js +0 -93
- package/build/utils.js +0 -78
- package/build/vue-loader.conf.js +0 -12
- package/build/webpack.common.js +0 -37
- package/build/webpack.component.js +0 -36
- package/build/webpack.prod.conf.js +0 -38
- package/components.json +0 -8
- package/conf.js +0 -42
- package/config/dev.env.js +0 -6
- package/config/index.js +0 -43
- package/config/prod.env.js +0 -6
- package/config/sit.env.js +0 -6
- package/favicon.ico +0 -0
- package/jsdoc-vue.js +0 -12
- package/lib/0.index.js +0 -12573
- package/lib/1.index.js +0 -6
- package/lib/2.index.js +0 -2
- package/lib/idev.common.js +0 -1
- package/lib/idv8.common.js +0 -1
- package/lib/index.js +0 -49170
- package/lib/js/ErrHint.js +0 -1
- package/lib/js/HdAside.js +0 -1
- package/lib/js/HdBtn.js +0 -1
- package/lib/js/HdButton.js +0 -1
- package/lib/js/HdComFaceRec.js +0 -1
- package/lib/js/HdComGrid.js +0 -1
- package/lib/js/HdDatePicker.js +0 -1
- package/lib/js/HdDialog.js +0 -1
- package/lib/js/HdDrop.js +0 -1
- package/lib/js/HdFileUpload.js +0 -1
- package/lib/js/HdFooter.js +0 -1
- package/lib/js/HdForm.js +0 -1
- package/lib/js/HdFormBtn.js +0 -1
- package/lib/js/HdFormItem.js +0 -1
- package/lib/js/HdGrid.js +0 -1
- package/lib/js/HdGridEditBtn.js +0 -1
- package/lib/js/HdGridSel.js +0 -1
- package/lib/js/HdHeader.js +0 -1
- package/lib/js/HdHotkey.js +0 -1
- package/lib/js/HdLayout.js +0 -1
- package/lib/js/HdMain.js +0 -1
- package/lib/js/HdMessage.js +0 -1
- package/lib/js/HdNum.js +0 -1
- package/lib/js/HdPopSel.js +0 -1
- package/lib/js/HdSearch.js +0 -1
- package/lib/js/HdTableColumn.js +0 -1
- package/lib/js/HdTempSave.js +0 -1
- package/lib/js/HdTree.js +0 -1
- package/lib/js/HdTreeTable.js +0 -1
- package/lib/js/authmobileupdate.js +0 -1
- package/lib/js/comexfield.js +0 -1
- package/lib/js/commsg.js +0 -1
- package/lib/js/commsgto.js +0 -1
- package/lib/js/comquartzjob.js +0 -1
- package/lib/js/comquartzlog.js +0 -1
- package/lib/js/comsearch.js +0 -1
- package/lib/js/menu.js +0 -1
- package/lib/js/menuinfo.js +0 -1
- package/lib/js/orgDept.js +0 -1
- package/lib/js/orgTree.js +0 -1
- package/lib/js/personDept.js +0 -1
- package/lib/js/role.js +0 -1
- package/lib/js/sysfieldframe.js +0 -1
- package/lib/js/syslog.js +0 -1
- package/lib/js/syslogframe.js +0 -1
- package/lib/js/userRole.js +0 -1
- package/ytgvue.rar +0 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog title="高级查询" :visible.sync="visible" width='80%' append-to-body top="2vh">
|
|
3
|
+
<div class="filter-container" style="padding: 0">
|
|
4
|
+
<el-select v-model="selQueryId" filterable default-first-option placeholder="请选择方案" @change="change">
|
|
5
|
+
<el-option v-for="item in proLs" :key="item.queryId" :label="item.name" :value="item.queryId">
|
|
6
|
+
</el-option>
|
|
7
|
+
</el-select>
|
|
8
|
+
|
|
9
|
+
<el-button class="filter-item" @click="remove" type="primary" :hotKeyRange="$options.name">{{$t('删除方案')}}
|
|
10
|
+
</el-button>
|
|
11
|
+
<el-button class="filter-item" @click="proSaveVisible=true" type="primary" :hotKeyRange="$options.name">
|
|
12
|
+
{{$t('方案保存')}}
|
|
13
|
+
</el-button>
|
|
14
|
+
<el-button class="filter-item" @click="add" type="primary" :hotKeyRange="$options.name">{{$t('新增条件')}}
|
|
15
|
+
</el-button>
|
|
16
|
+
</div>
|
|
17
|
+
<div style="height: 360px">
|
|
18
|
+
<el-row>
|
|
19
|
+
<el-col :span="11">
|
|
20
|
+
<div style="padding-top: 0px;height: 250px">
|
|
21
|
+
<HdComQueryDetail :allColumn="allColumn" ref="LQuery" :list="leftLs" title="组一"></HdComQueryDetail>
|
|
22
|
+
</div>
|
|
23
|
+
</el-col>
|
|
24
|
+
<el-col :span="2">
|
|
25
|
+
<div style="width: 100%;position: relative;top:50px;text-align: center">{{$t('或者')}}</div>
|
|
26
|
+
</el-col>
|
|
27
|
+
<el-col :span="11">
|
|
28
|
+
<div style="padding-top: 0px;height: 250px">
|
|
29
|
+
<HdComQueryDetail :allColumn="allColumn" ref="RQuery" :list="rightLs" title="组二"></HdComQueryDetail>
|
|
30
|
+
</div>
|
|
31
|
+
</el-col>
|
|
32
|
+
</el-row>
|
|
33
|
+
|
|
34
|
+
<el-row>
|
|
35
|
+
<div style="padding-top: 0px;height: 100px">
|
|
36
|
+
<HdComSortDetail :allColumn="allColumn" ref="RQuery" :list="sortLs" title="排序"></HdComSortDetail>
|
|
37
|
+
</div>
|
|
38
|
+
</el-row>
|
|
39
|
+
</div>
|
|
40
|
+
<!-- <el-container style="height: 260px">
|
|
41
|
+
<el-main>
|
|
42
|
+
<el-container>
|
|
43
|
+
<el-aside width="45%" title="组1" :arrowShow="false" style="padding-top: 0px">
|
|
44
|
+
<HdComQueryDetail :allColumn="allColumn" ref="LQuery" :list="leftLs"></HdComQueryDetail>
|
|
45
|
+
</el-aside>
|
|
46
|
+
<ex-aside width="5%" :arrowShow="false">
|
|
47
|
+
<div style="width: 100%;position: relative;top:50px;text-align: center">{{$t('或者')}}</div>
|
|
48
|
+
</ex-aside>
|
|
49
|
+
<el-aside width="45%" title="组2" :arrowShow="false" style="padding-top: 0px">
|
|
50
|
+
<HdComQueryDetail :allColumn="allColumn" ref="RQuery" :list="rightLs"></HdComQueryDetail>
|
|
51
|
+
</el-aside>
|
|
52
|
+
</el-container>
|
|
53
|
+
</el-main>
|
|
54
|
+
<el-footer :arrowShow="false" height="100px" title="排序">
|
|
55
|
+
</el-footer>
|
|
56
|
+
</el-container>-->
|
|
57
|
+
<div slot="footer" class="dialog-footer">
|
|
58
|
+
<el-button @click="doCloseAndKeep()">{{$t('关闭') + '(' + $t('保留条件') + ')'}}</el-button>
|
|
59
|
+
<el-button @click="doCloseAndClear">{{$t('关闭')}}</el-button>
|
|
60
|
+
<el-button @click="doQueryRs" type="primary" :hotKeyRange="$options.name">{{$t('查询')}}</el-button>
|
|
61
|
+
</div>
|
|
62
|
+
<el-dialog title="方案保存" :visible.sync="proSaveVisible" width='30%' append-to-body top="2vh">
|
|
63
|
+
<el-row>
|
|
64
|
+
<el-col :span="20">
|
|
65
|
+
<el-input v-model="proName"></el-input>
|
|
66
|
+
</el-col>
|
|
67
|
+
<el-col :span="4">
|
|
68
|
+
<el-button @click="doSave" type="primary">{{$t('保存')}}</el-button>
|
|
69
|
+
</el-col>
|
|
70
|
+
</el-row>
|
|
71
|
+
</el-dialog>
|
|
72
|
+
</el-dialog>
|
|
73
|
+
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script>
|
|
77
|
+
import HdComQueryDetail from './HdComQueryDetail'
|
|
78
|
+
import HdComSortDetail from "./HdComSortDetail";
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
name: 'HdComQuery',
|
|
82
|
+
components: { HdComSortDetail, HdComQueryDetail },
|
|
83
|
+
data() {
|
|
84
|
+
return {
|
|
85
|
+
isFirst: true,
|
|
86
|
+
visible: false,
|
|
87
|
+
proSaveVisible: false,
|
|
88
|
+
leftLs: [],
|
|
89
|
+
rightLs: [],
|
|
90
|
+
sortLs: [],
|
|
91
|
+
selQueryId: '',
|
|
92
|
+
proName: '',
|
|
93
|
+
proLs: [],
|
|
94
|
+
keepQueryUse: false
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
inheritAttrs: false,
|
|
98
|
+
props: {
|
|
99
|
+
hdQuery: Object,
|
|
100
|
+
allColumn: Array
|
|
101
|
+
},
|
|
102
|
+
mounted() {
|
|
103
|
+
this.doQuery()
|
|
104
|
+
},
|
|
105
|
+
methods: {
|
|
106
|
+
doSave() {
|
|
107
|
+
const comQuery = {}
|
|
108
|
+
comQuery.name = this.proName
|
|
109
|
+
comQuery.menuId = this.$route.name
|
|
110
|
+
comQuery.gridId = this.getHdComGrid().$refs.hdgrid.gridId
|
|
111
|
+
const innHdQuery = { vueleftQueryLs: [], vuerightQueryLs: [], sorts: { params: this.sortLs } }
|
|
112
|
+
this.addToHdQuery(innHdQuery.vueleftQueryLs, this.leftLs)
|
|
113
|
+
innHdQuery.vueGroupRel = 'or'
|
|
114
|
+
this.addToHdQuery(innHdQuery.vuerightQueryLs, this.rightLs)
|
|
115
|
+
comQuery.hdQuery = innHdQuery
|
|
116
|
+
this.$http.post('/webresources/login/com/ComQuery/saveone/', comQuery).then(response => {
|
|
117
|
+
const data = response.data
|
|
118
|
+
this.$message({
|
|
119
|
+
type: data.code == '-1' ? 'error' : 'success',
|
|
120
|
+
showClose: true,
|
|
121
|
+
duration: 1500,
|
|
122
|
+
message: data.message
|
|
123
|
+
})
|
|
124
|
+
this.proLs.push(data.data)
|
|
125
|
+
this.selQueryId = data.data.queryId
|
|
126
|
+
this.proSaveVisible = false
|
|
127
|
+
this.getHdComGrid().adQueryTemplateNameList = this.proLs;
|
|
128
|
+
})
|
|
129
|
+
},
|
|
130
|
+
remove() {
|
|
131
|
+
if (!this.selQueryId) {
|
|
132
|
+
this.$message({
|
|
133
|
+
type: 'error',
|
|
134
|
+
message: this.$t('请先选择要删除的方案'),
|
|
135
|
+
showClose: true,
|
|
136
|
+
duration: 1500
|
|
137
|
+
})
|
|
138
|
+
return false
|
|
139
|
+
}
|
|
140
|
+
const comQuery = {}
|
|
141
|
+
comQuery.queryId = this.selQueryId
|
|
142
|
+
this.$http.post('/webresources/login/com/ComQuery/remove/', comQuery).then(response => {
|
|
143
|
+
const data = response.data
|
|
144
|
+
for (let i = 0; i < this.proLs.length; i++) {
|
|
145
|
+
if (this.proLs[i].queryId == this.selQueryId) {
|
|
146
|
+
this.proLs.splice(i, 1)
|
|
147
|
+
this.selQueryId = null
|
|
148
|
+
break
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
this.$message({
|
|
152
|
+
type: data.code == '-1' ? 'error' : 'success',
|
|
153
|
+
showClose: true,
|
|
154
|
+
duration: 1500,
|
|
155
|
+
message: data.message
|
|
156
|
+
})
|
|
157
|
+
this.getHdComGrid().adQueryTemplateNameList = this.proLs;
|
|
158
|
+
})
|
|
159
|
+
},
|
|
160
|
+
doQuery() {
|
|
161
|
+
// 默认三个
|
|
162
|
+
this.leftLs.push({ selCol: {}, rel: '=' })
|
|
163
|
+
this.leftLs.push({ selCol: {}, rel: '=' })
|
|
164
|
+
this.leftLs.push({ selCol: {}, rel: '=' })
|
|
165
|
+
this.rightLs.push({ selCol: {}, rel: '=' })
|
|
166
|
+
this.rightLs.push({ selCol: {}, rel: '=' })
|
|
167
|
+
this.rightLs.push({ selCol: {}, rel: '=' })
|
|
168
|
+
},
|
|
169
|
+
add() {
|
|
170
|
+
this.leftLs.push({ selCol: {}, rel: '=' })
|
|
171
|
+
this.rightLs.push({ selCol: {}, rel: '=' })
|
|
172
|
+
},
|
|
173
|
+
show() {
|
|
174
|
+
this.visible = true
|
|
175
|
+
const innHdQuery = { query: {} }
|
|
176
|
+
innHdQuery.query.menuId = this.$route.name
|
|
177
|
+
innHdQuery.query.gridId = this.getHdComGrid().$refs.hdgrid.gridId
|
|
178
|
+
if (this.isFirst) {
|
|
179
|
+
this.$http.post('/webresources/login/com/ComQuery/find/', innHdQuery).then(response => {
|
|
180
|
+
this.proLs = response.data
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
this.isFirst = false
|
|
184
|
+
},
|
|
185
|
+
doCloseAndClear() {
|
|
186
|
+
this.visible = false
|
|
187
|
+
},
|
|
188
|
+
doCloseAndKeep() {
|
|
189
|
+
this.keepQueryUse = true
|
|
190
|
+
this.visible = false
|
|
191
|
+
},
|
|
192
|
+
change(val) {
|
|
193
|
+
this.$http.post('/webresources/login/com/ComQuery/findDetail?queryId=' + val).then(response => {
|
|
194
|
+
const data = response.data
|
|
195
|
+
this.leftLs = this.listInit(data[0])
|
|
196
|
+
this.rightLs = this.listInit(data[1])
|
|
197
|
+
this.sortLs = this.sortInit(data[2])
|
|
198
|
+
})
|
|
199
|
+
// this.selCol = val
|
|
200
|
+
},
|
|
201
|
+
listInit(list) {
|
|
202
|
+
for (let i = 0; i < list.length; i++) {
|
|
203
|
+
const one = list[i]
|
|
204
|
+
for (let j = 0; j < this.allColumn.length; j++) {
|
|
205
|
+
const column = this.allColumn[j]
|
|
206
|
+
if (column.$attrs && one.key == column.$attrs.prop) {
|
|
207
|
+
one.selCol = column
|
|
208
|
+
break
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return list
|
|
213
|
+
},
|
|
214
|
+
sortInit(list) {
|
|
215
|
+
return list.map(sort => {
|
|
216
|
+
return {
|
|
217
|
+
sortProperty: sort.key,
|
|
218
|
+
sortType: sort.value,
|
|
219
|
+
alias: sort.rel,
|
|
220
|
+
text: this.allColumn.find(v => v.$attrs.prop == sort.key).$attrs.label + '/' + (sort.value == 'ASC' ? '升序' : '降序')
|
|
221
|
+
}
|
|
222
|
+
})
|
|
223
|
+
},
|
|
224
|
+
doQueryRs() {
|
|
225
|
+
this.hdQuery.vueleftQueryLs = []
|
|
226
|
+
this.hdQuery.vuerightQueryLs = []
|
|
227
|
+
this.addToHdQuery(this.hdQuery.vueleftQueryLs, this.leftLs)
|
|
228
|
+
this.hdQuery.vueGroupRel = 'or'
|
|
229
|
+
this.addToHdQuery(this.hdQuery.vuerightQueryLs, this.rightLs)
|
|
230
|
+
this.hdQuery.sorts = { params: this.sortLs }
|
|
231
|
+
this.hdQuery.sort = ''
|
|
232
|
+
//
|
|
233
|
+
// console.log(this.hdQuery, this.leftLs, this.rightLs)
|
|
234
|
+
this.getHdComGrid().doQuery().then(() => {
|
|
235
|
+
this.visible = false
|
|
236
|
+
})
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
},
|
|
240
|
+
addToHdQuery(queryLs, inputLs) {
|
|
241
|
+
for (let i = 0; i < inputLs.length; i++) {
|
|
242
|
+
const input = inputLs[i]
|
|
243
|
+
if (input.key) {
|
|
244
|
+
queryLs.push({ key: input.key, rel: input.rel, value: input.value, type: input.type })
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
getHdComGrid() {
|
|
249
|
+
let par = this.$parent
|
|
250
|
+
while (par) {
|
|
251
|
+
if (par.$options.name == 'HdComGrid') {
|
|
252
|
+
return par
|
|
253
|
+
}
|
|
254
|
+
par = par.$parent
|
|
255
|
+
}
|
|
256
|
+
return null
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
watch: {
|
|
260
|
+
visible: function (val) {
|
|
261
|
+
if (!val) { // 隐藏时
|
|
262
|
+
if (!this.keepQueryUse) {
|
|
263
|
+
this.hdQuery.vueleftQueryLs = []
|
|
264
|
+
this.hdQuery.vuerightQueryLs = []
|
|
265
|
+
this.hdQuery.vueGroupRel = null
|
|
266
|
+
} else {
|
|
267
|
+
this.keepQueryUse = false
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
</script>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container>
|
|
3
|
+
<el-main class="gridShow" :title="title">
|
|
4
|
+
<el-table :data="list" row-key="property">
|
|
5
|
+
<el-table-column align="center" label="条件" width="120px" noQuery>
|
|
6
|
+
<template slot-scope="scope">
|
|
7
|
+
<el-select v-model="scope.row.selCol" clearable :placeholder="$t('请选择')" style="width:100%" value-key="$attrs.prop"
|
|
8
|
+
@change="(v)=>change(v,scope.row)">
|
|
9
|
+
<el-option v-for="one in allColumn" :key="one.$attrs.prop" :label="one.$attrs.label" :value="one">
|
|
10
|
+
</el-option>
|
|
11
|
+
</el-select>
|
|
12
|
+
</template>
|
|
13
|
+
</el-table-column>
|
|
14
|
+
<el-table-column align="center" label="关系" prop="width" width="80px" noQuery>
|
|
15
|
+
<template slot-scope="scope">
|
|
16
|
+
<el-select v-model="scope.row.rel" :placeholder="$t('请选择')" style="width:100%">
|
|
17
|
+
<el-option label="=" value="="></el-option>
|
|
18
|
+
<el-option :label="$t('包含')" value="%like%"></el-option>
|
|
19
|
+
<el-option label=">=" value=">="></el-option>
|
|
20
|
+
<el-option label="<=" value="<="></el-option>
|
|
21
|
+
<el-option :label="$t('非空')" value="not null"></el-option>
|
|
22
|
+
<el-option :label="$t('为空')" value="is null"></el-option>
|
|
23
|
+
</el-select>
|
|
24
|
+
</template>
|
|
25
|
+
</el-table-column>
|
|
26
|
+
<el-table-column align="center" label="值" noQuery width="160px">
|
|
27
|
+
<template slot-scope="scope">
|
|
28
|
+
<component :is="scope.row.selCol.input?scope.row.selCol.input:'ElInput'" v-model="scope.row.value"
|
|
29
|
+
v-bind="scope.row.selCol.inputProp" :idVal.sync="scope.row.value"
|
|
30
|
+
:txtVal.sync="scope.row.showName"
|
|
31
|
+
style="width: 100%;"></component>
|
|
32
|
+
</template>
|
|
33
|
+
</el-table-column>
|
|
34
|
+
<el-table-column width="100px" align="center" label="操作">
|
|
35
|
+
<template slot-scope="scope">
|
|
36
|
+
<hd-btn icon="el-icon-circle-plus-outline" hint="复制" @click.stop="doCopy(scope.row,scope.index)"></hd-btn>
|
|
37
|
+
<hd-btn icon="el-icon-delete" hint="删除" @click.stop="doRemove(scope.row)"></hd-btn>
|
|
38
|
+
</template>
|
|
39
|
+
</el-table-column>
|
|
40
|
+
</el-table>
|
|
41
|
+
|
|
42
|
+
</el-main>
|
|
43
|
+
</el-container>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
// showName: '',//自定义下拉会用到
|
|
52
|
+
// selCol: {},
|
|
53
|
+
// queryRel: {key: '', rel: '=', value: '', type: ''},//查询的关系 prop='结果'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
inheritAttrs: false,
|
|
57
|
+
props: {
|
|
58
|
+
allColumn: Array,
|
|
59
|
+
list: Array,
|
|
60
|
+
title: String
|
|
61
|
+
},
|
|
62
|
+
mounted() {
|
|
63
|
+
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
doCopy(row, index) {
|
|
67
|
+
this.list.splice(index, 0, Object.assign({}, row))
|
|
68
|
+
},
|
|
69
|
+
doRemove(index) {
|
|
70
|
+
this.list.splice(index, 1)
|
|
71
|
+
},
|
|
72
|
+
change(val, row) {
|
|
73
|
+
if (!val) { // clear触发
|
|
74
|
+
row.key = ''
|
|
75
|
+
// this.queryRel.value = ''
|
|
76
|
+
return false
|
|
77
|
+
}
|
|
78
|
+
row.selCol = val
|
|
79
|
+
row.key = val.$attrs.prop
|
|
80
|
+
// this.queryRel.value = ''//切换时先清
|
|
81
|
+
if (!row.selCol.input) {
|
|
82
|
+
return false
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
row.type = ''// 默认字符串
|
|
86
|
+
if (typeof val.input != 'string') { // 自定义组件会传入function
|
|
87
|
+
return false
|
|
88
|
+
}
|
|
89
|
+
if (val.input.indexOf('date') >= 0 || val.input.indexOf('Date') >= 0) { // 日期格式
|
|
90
|
+
if (val.inputProp.type == 'date') {
|
|
91
|
+
row.type = 'date'
|
|
92
|
+
}
|
|
93
|
+
if (val.inputProp.type == 'datetime') {
|
|
94
|
+
row.type = 'datetime'
|
|
95
|
+
}
|
|
96
|
+
// row = val
|
|
97
|
+
}
|
|
98
|
+
if (val.input.indexOf('num') >= 0 || val.input.indexOf('Num') >= 0) { // 数字格式
|
|
99
|
+
row.type = 'number'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</script>
|
|
106
|
+
<style rel="stylesheet/scss" lang="scss">
|
|
107
|
+
.gridShow {
|
|
108
|
+
.el-table {
|
|
109
|
+
height: 100%;
|
|
110
|
+
width: 100%;
|
|
111
|
+
.el-table__body-wrapper {
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
.el-table__header-wrapper th { //列表标题
|
|
115
|
+
background-color: #f6f6f6;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.el-table__fixed-header-wrapper th { //固定的列表标题
|
|
119
|
+
background-color: #f6f6f6;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
td, th { //列表标题及内容
|
|
123
|
+
padding: 1px 0;
|
|
124
|
+
}
|
|
125
|
+
.cell, .el-table th div, .el-table--border th:first-child .cell, .el-table--border td:first-child .cell { //列表的margin
|
|
126
|
+
padding-left: 5px !important;
|
|
127
|
+
padding-right: 1px !important;
|
|
128
|
+
padding-top: 1.5px !important;
|
|
129
|
+
padding-bottom: 1.5px !important;
|
|
130
|
+
}
|
|
131
|
+
.el-table__empty-block {
|
|
132
|
+
position: static;
|
|
133
|
+
text-align: center;
|
|
134
|
+
width: 100%;
|
|
135
|
+
height: 80%
|
|
136
|
+
}
|
|
137
|
+
.el-table__body { //列表下面加了空白
|
|
138
|
+
margin-bottom: 10px;
|
|
139
|
+
}
|
|
140
|
+
.el-table__body-wrapper {
|
|
141
|
+
height: 100%;
|
|
142
|
+
overflow-y: auto;
|
|
143
|
+
}
|
|
144
|
+
.el-input__inner {
|
|
145
|
+
height: 27px;
|
|
146
|
+
margin-bottom: 0px;
|
|
147
|
+
}
|
|
148
|
+
.el-input, .el-form-item__content, .el-form-item__label, .el-input__icon {
|
|
149
|
+
line-height: 30px;
|
|
150
|
+
}
|
|
151
|
+
.el-input__inner {
|
|
152
|
+
padding: 5px;
|
|
153
|
+
}
|
|
154
|
+
.el-input--prefix .el-input__inner { //日期的有logo不一样
|
|
155
|
+
padding-left: 30px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
</style>
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container>
|
|
3
|
+
<el-main class="gridShow" :title="title">
|
|
4
|
+
<el-tag
|
|
5
|
+
v-for="tag in list"
|
|
6
|
+
:key="tag.text"
|
|
7
|
+
closable
|
|
8
|
+
:disable-transitions="false"
|
|
9
|
+
@close="handleClose(tag)">
|
|
10
|
+
{{tag.text}}
|
|
11
|
+
</el-tag>
|
|
12
|
+
<el-cascader v-model="inputValue"
|
|
13
|
+
:placeholder="$t('请选择')"
|
|
14
|
+
class="input-new-tag"
|
|
15
|
+
ref="saveTagInput"
|
|
16
|
+
v-if="inputVisible"
|
|
17
|
+
@keyup.enter.native="handleInputConfirm"
|
|
18
|
+
size="small"
|
|
19
|
+
@change="(v)=>change(v)"
|
|
20
|
+
:options="sortOption"
|
|
21
|
+
:props="{ expandTrigger: 'hover' }">
|
|
22
|
+
|
|
23
|
+
</el-cascader>
|
|
24
|
+
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ New Tag</el-button>
|
|
25
|
+
</el-main>
|
|
26
|
+
</el-container>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
name: "HdComSortDetail",
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
inputVisible: false,
|
|
36
|
+
inputValue: ''
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
inheritAttrs: false,
|
|
40
|
+
props: {
|
|
41
|
+
allColumn: Array,
|
|
42
|
+
list: Array,
|
|
43
|
+
title: String
|
|
44
|
+
},
|
|
45
|
+
mounted() {
|
|
46
|
+
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
handleClose(tag) {
|
|
50
|
+
this.list.splice(this.list.indexOf(tag), 1);
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
showInput() {
|
|
54
|
+
this.inputVisible = true;
|
|
55
|
+
this.$nextTick(_ => {
|
|
56
|
+
this.$refs.saveTagInput.$refs.input.focus();
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
change(val) {
|
|
61
|
+
console.log('inputValue', val)
|
|
62
|
+
let inputValue = this.inputValue;
|
|
63
|
+
if (inputValue) {
|
|
64
|
+
let item = this.genItem(inputValue);
|
|
65
|
+
this.list.forEach((v, i)=>{
|
|
66
|
+
if(v.sortProperty == item.sortProperty) {
|
|
67
|
+
this.list.splice(i, 1)
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
this.list.push(item);
|
|
71
|
+
}
|
|
72
|
+
console.log('list', this.list)
|
|
73
|
+
this.inputVisible = false;
|
|
74
|
+
this.inputValue = '';
|
|
75
|
+
// if (!val) { // clear触发
|
|
76
|
+
// row.key = ''
|
|
77
|
+
// // this.queryRel.value = ''
|
|
78
|
+
// return false
|
|
79
|
+
// }
|
|
80
|
+
// row.selCol = val
|
|
81
|
+
// row.key = val.$attrs.prop
|
|
82
|
+
// // this.queryRel.value = ''//切换时先清
|
|
83
|
+
// if (!row.selCol.input) {
|
|
84
|
+
// return false
|
|
85
|
+
// }
|
|
86
|
+
//
|
|
87
|
+
// row.type = ''// 默认字符串
|
|
88
|
+
// if (typeof val.input != 'string') { // 自定义组件会传入function
|
|
89
|
+
// return false
|
|
90
|
+
// }
|
|
91
|
+
// if (val.input.indexOf('date') >= 0 || val.input.indexOf('Date') >= 0) { // 日期格式
|
|
92
|
+
// if (val.inputProp.type == 'date') {
|
|
93
|
+
// row.type = 'date'
|
|
94
|
+
// }
|
|
95
|
+
// if (val.inputProp.type == 'datetime') {
|
|
96
|
+
// row.type = 'datetime'
|
|
97
|
+
// }
|
|
98
|
+
// // row = val
|
|
99
|
+
// }
|
|
100
|
+
// if (val.input.indexOf('num') >= 0 || val.input.indexOf('Num') >= 0) { // 数字格式
|
|
101
|
+
// row.type = 'number'
|
|
102
|
+
// }
|
|
103
|
+
},
|
|
104
|
+
genItem(val) {
|
|
105
|
+
return {
|
|
106
|
+
sortProperty: val[0],
|
|
107
|
+
sortType: val[1],
|
|
108
|
+
alias: 'a',
|
|
109
|
+
text: this.allColumn.find(v => v.$attrs.prop == val[0]).$attrs.label + '/' + (val[1] == 'ASC' ? '升序' : '降序')
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
},
|
|
114
|
+
computed: {
|
|
115
|
+
sortOption() {
|
|
116
|
+
let rtn = this.allColumn.map(v => {
|
|
117
|
+
return {
|
|
118
|
+
value: v.$attrs.prop,
|
|
119
|
+
label: v.$attrs.label,
|
|
120
|
+
children: [{
|
|
121
|
+
value: 'ASC',
|
|
122
|
+
label: '升序'
|
|
123
|
+
}, {
|
|
124
|
+
value: 'DESC',
|
|
125
|
+
label: '降序'
|
|
126
|
+
}]
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
return rtn
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</script>
|
|
134
|
+
<style rel="stylesheet/scss" lang="scss">
|
|
135
|
+
.gridShow {
|
|
136
|
+
.el-tag + .el-tag {
|
|
137
|
+
margin-left: 10px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.button-new-tag {
|
|
141
|
+
margin-left: 10px;
|
|
142
|
+
height: 32px;
|
|
143
|
+
line-height: 30px;
|
|
144
|
+
padding-top: 0;
|
|
145
|
+
padding-bottom: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.input-new-tag {
|
|
149
|
+
width: 90px;
|
|
150
|
+
margin-left: 10px;
|
|
151
|
+
vertical-align: bottom;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
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">
|
|
5
|
+
</ExDatePicker>
|
|
6
|
+
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
/**
|
|
11
|
+
* 继承ElDatePicker ElementUi的日期以时间戳形式,这里改为字符串形式'yyyy-MM-dd HH:mm' 简化调用
|
|
12
|
+
* @module HdDatePicker
|
|
13
|
+
*/
|
|
14
|
+
export default {
|
|
15
|
+
name: 'HdDatePicker',
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
format: '',
|
|
19
|
+
valueFormat: '',
|
|
20
|
+
placeholder: this.$t('选择日期'),
|
|
21
|
+
dateFormat: '',
|
|
22
|
+
focusValue: '',
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
props: ['value'],
|
|
26
|
+
inheritAttrs: false,
|
|
27
|
+
created() { // 判断
|
|
28
|
+
if (this.$attrs.type == 'date' || this.$attrs.type == 'daterange') {
|
|
29
|
+
this.format = 'yyyy-MM-dd'
|
|
30
|
+
this.valueFormat = 'yyyy-MM-dd'
|
|
31
|
+
this.placeholder = this.$t('选择日期')
|
|
32
|
+
} else if (this.$attrs.type == 'datetime' || this.$attrs.type == 'datetimerange') {
|
|
33
|
+
this.format = 'yyyy-MM-dd HH:mm'
|
|
34
|
+
this.valueFormat = 'yyyy-MM-dd HH:mm'
|
|
35
|
+
this.placeholder = this.$t('选择日期时间')
|
|
36
|
+
} else if (this.$attrs.type == 'month') {
|
|
37
|
+
this.format = 'yyyy-MM'
|
|
38
|
+
this.valueFormat = 'yyyy-MM'
|
|
39
|
+
this.placeholder = this.$t('选择月份')
|
|
40
|
+
} else if (this.$attrs.type == 'year') {
|
|
41
|
+
this.format = 'yyyy'
|
|
42
|
+
this.valueFormat = 'yyyy'
|
|
43
|
+
this.placeholder = this.$t('选择年份')
|
|
44
|
+
} else {
|
|
45
|
+
this.format = 'yyyy-MM-dd'
|
|
46
|
+
this.valueFormat = 'yyyy-MM-dd'
|
|
47
|
+
this.placeholder = this.$t('选择日期')
|
|
48
|
+
}
|
|
49
|
+
console.log('created', this.format, this.valueFormat)
|
|
50
|
+
this.dateFormat = this.$attrs.format || this.format
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
dateFocus(v) {
|
|
54
|
+
this.dateFormat = (this.$attrs.format || this.format).replaceAll(/(-|:|\s|y)/, "");
|
|
55
|
+
if (!this.value) {
|
|
56
|
+
this.$set(this.$refs.exDatePicker, 'userInput', new Date().format('MM'))
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
dateBlur() {
|
|
60
|
+
this.dateFormat = this.$attrs.format || this.format
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
computed: {// 给外层v-model赋值
|
|
64
|
+
selVal: {
|
|
65
|
+
// 动态计算selVal的值
|
|
66
|
+
get: function () {
|
|
67
|
+
console.log('调用了get属性')
|
|
68
|
+
return this.value
|
|
69
|
+
},
|
|
70
|
+
set: function (val) { // v-model input
|
|
71
|
+
console.log('调用了set属性', val)
|
|
72
|
+
this.$emit('input', val)
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
</script>
|