hd-idevvue3 3.0.5 → 3.0.8
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/static/css/index-DRHIlcVU.css +1 -0
- package/dist/static/js/index-DbUA6jg0.js +184 -0
- package/dist/static/js/index-Dl4O91nB.js +73768 -0
- package/package.json +16 -16
- package/.env.development +0 -5
- package/.env.production +0 -5
- package/.eslintrc.js +0 -151
- package/dist/assets/index.431f21ca.css +0 -1
- package/dist/hd-idevvue3.mjs +0 -45878
- package/dist/hd-idevvue3.umd.js +0 -153
- package/index.html +0 -18
- package/npminstall-debug.log +0 -200
- package/pnpm-lock.yaml +0 -2813
- package/src/App.vue +0 -11
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +0 -42
- package/src/demo/dropdemo.vue +0 -42
- package/src/demo/extsets.vue +0 -208
- package/src/demo/formedit.vue +0 -157
- package/src/demo/hightquery.vue +0 -366
- package/src/demo/inlineedit.vue +0 -182
- package/src/demo/selfdrop.vue +0 -58
- package/src/demo//350/241/214/345/206/205/347/272/247/350/201/224.txt +0 -2
- package/src/directive/el-dragDialog/drag.js +0 -124
- package/src/directive/el-dragDialog/index.js +0 -13
- package/src/errorLog.js +0 -16
- package/src/hdcom/BigGrid.js +0 -179
- package/src/hdcom/BillShow.vue +0 -111
- package/src/hdcom/BillUpload.vue +0 -311
- package/src/hdcom/BtnRight.vue +0 -101
- package/src/hdcom/ErrHint.vue +0 -42
- package/src/hdcom/ExtendColumn.vue +0 -115
- package/src/hdcom/ExtendCommon.js +0 -40
- package/src/hdcom/ExtendForm.vue +0 -141
- package/src/hdcom/FacePicUpload.vue +0 -80
- package/src/hdcom/FaceRecTest.vue +0 -114
- package/src/hdcom/GridChart.vue +0 -207
- package/src/hdcom/GridExField.vue +0 -375
- package/src/hdcom/GridShow.vue +0 -288
- package/src/hdcom/HdAside.vue +0 -225
- package/src/hdcom/HdBtn.vue +0 -125
- package/src/hdcom/HdButton.vue +0 -161
- package/src/hdcom/HdComFaceRec.vue +0 -106
- package/src/hdcom/HdComGrid.vue +0 -876
- package/src/hdcom/HdComQuery.vue +0 -362
- package/src/hdcom/HdComQueryDetail.vue +0 -205
- package/src/hdcom/HdComSortDetail.vue +0 -161
- package/src/hdcom/HdDatePicker.vue +0 -94
- package/src/hdcom/HdDialog.vue +0 -81
- package/src/hdcom/HdDrop.vue +0 -188
- package/src/hdcom/HdFileUpload.vue +0 -167
- package/src/hdcom/HdFilterBox.vue +0 -90
- package/src/hdcom/HdFooter.vue +0 -182
- package/src/hdcom/HdForm.vue +0 -351
- package/src/hdcom/HdFormBtn.vue +0 -131
- package/src/hdcom/HdFormItem.vue +0 -39
- package/src/hdcom/HdGctosGrid +0 -0
- package/src/hdcom/HdGrid.vue +0 -1022
- package/src/hdcom/HdGridEditBtn.vue +0 -58
- package/src/hdcom/HdGridExt.js +0 -250
- package/src/hdcom/HdGridSel.vue +0 -257
- package/src/hdcom/HdHeader.vue +0 -180
- package/src/hdcom/HdHotKey.vue +0 -84
- package/src/hdcom/HdInputHint.vue +0 -53
- package/src/hdcom/HdMain.vue +0 -41
- package/src/hdcom/HdMessage.vue +0 -201
- package/src/hdcom/HdNum.vue +0 -79
- package/src/hdcom/HdPopSel.vue +0 -80
- package/src/hdcom/HdRightMenu.vue +0 -63
- package/src/hdcom/HdSel/SelGridFieldcod.vue +0 -54
- package/src/hdcom/HdTableColumn.vue +0 -381
- package/src/hdcom/HdTempSave.vue +0 -162
- package/src/hdcom/HdTree.vue +0 -103
- package/src/hdcom/HdTreeTable/eval.js +0 -39
- package/src/hdcom/HdTreeTable/index.vue +0 -229
- package/src/hdcom/ImportExcel.vue +0 -178
- package/src/hdcom/index.js +0 -75
- package/src/idev.common.js +0 -79
- package/src/index.js +0 -11
- package/src/utils/HdQuery.js +0 -65
- package/src/utils/comutils.js +0 -120
- package/src/utils/gogocodeTransfer.js +0 -59
- package/src/utils/utils.js +0 -116
- package/src/vendor/Blob.js +0 -187
- package/src/vendor/Export2Excel.js +0 -231
- package/src/vendor/Export2Zip.js +0 -25
- package/src/views/layout/AppMain.vue +0 -34
- package/src/views/layout/HdLayout.vue +0 -90
- package/src/views/layout/header/ElasticSearch.vue +0 -262
- package/src/views/layout/header/HZRecorder.js +0 -259
- package/src/views/layout/header/HeaderSearch.vue +0 -218
- package/src/views/layout/header/Levelbar.vue +0 -55
- package/src/views/layout/header/MainHeader.vue +0 -315
- package/src/views/layout/header/Navbar.vue +0 -101
- package/src/views/layout/header/ScrollPane.vue +0 -103
- package/src/views/layout/header/TagsView.vue +0 -215
- package/src/views/layout/header/VocRec.vue +0 -105
- package/src/views/layout/header/changepswform.vue +0 -130
- package/src/views/layout/index.js +0 -10
- package/src/views/layout/menu/Hamburger.vue +0 -63
- package/src/views/layout/menu/HdMenu.vue +0 -204
- package/src/views/layout/menu/css/menu.css +0 -288
- package/src/views/layout/menu/index.vue +0 -27
- package/src/views/privilege/commsg/commsg.vue +0 -152
- package/src/views/privilege/commsg/commsgOrgn.vue +0 -51
- package/src/views/privilege/commsg/commsgRole.vue +0 -220
- package/src/views/privilege/commsg/commsgform.vue +0 -184
- package/src/views/privilege/commsg/commsgiframe.vue +0 -40
- package/src/views/privilege/commsg/commsgto.vue +0 -199
- package/src/views/privilege/commsg/commsgtoform.vue +0 -114
- package/src/views/privilege/commsg/commsgtrans.vue +0 -227
- package/src/views/privilege/exfield/comexcolumn.vue +0 -161
- package/src/views/privilege/exfield/comexcolumnform.vue +0 -128
- package/src/views/privilege/exfield/comexfield.vue +0 -29
- package/src/views/privilege/exfield/comexfieldform.vue +0 -112
- package/src/views/privilege/exfield/comexfieldsub.vue +0 -163
- package/src/views/privilege/index.js +0 -41
- package/src/views/privilege/menu/comMenu.vue +0 -49
- package/src/views/privilege/menu/menu.vue +0 -250
- package/src/views/privilege/menu/menuinfo.vue +0 -63
- package/src/views/privilege/menu/rolelist.vue +0 -92
- package/src/views/privilege/menu/userlist.vue +0 -92
- package/src/views/privilege/mobile/authmobileupdate.vue +0 -145
- package/src/views/privilege/mobile/authmobileupdateform.vue +0 -120
- package/src/views/privilege/orgDept/authOrgn.vue +0 -188
- package/src/views/privilege/orgDept/authorgnform.vue +0 -157
- package/src/views/privilege/orgDept/orgDept.vue +0 -38
- package/src/views/privilege/orgDept/orgTree.vue +0 -99
- package/src/views/privilege/orgDept/orgnselect.vue +0 -155
- package/src/views/privilege/personDept/authuser.vue +0 -229
- package/src/views/privilege/personDept/authuserform.vue +0 -206
- package/src/views/privilege/personDept/facerec.vue +0 -162
- package/src/views/privilege/personDept/orgncascader.vue +0 -144
- package/src/views/privilege/personDept/personDept.vue +0 -33
- package/src/views/privilege/quartz/comquartzjob.vue +0 -150
- package/src/views/privilege/quartz/comquartzjobform.vue +0 -115
- package/src/views/privilege/quartz/comquartzlog.vue +0 -143
- package/src/views/privilege/role/btnRole.vue +0 -173
- package/src/views/privilege/role/menuRole.vue +0 -84
- package/src/views/privilege/role/orgnRole.vue +0 -78
- package/src/views/privilege/role/role.vue +0 -84
- package/src/views/privilege/role/rolelist.vue +0 -136
- package/src/views/privilege/role/roleselect.vue +0 -74
- package/src/views/privilege/search/comsearch.vue +0 -196
- package/src/views/privilege/search/menu.vue +0 -68
- package/src/views/privilege/syscode/syscode.vue +0 -191
- package/src/views/privilege/syscode/sysfield.vue +0 -119
- package/src/views/privilege/syscode/sysfieldframe.vue +0 -30
- package/src/views/privilege/syslog/menulog.vue +0 -68
- package/src/views/privilege/syslog/syslog.vue +0 -182
- package/src/views/privilege/syslog/syslogconfig.vue +0 -128
- package/src/views/privilege/syslog/syslogform.vue +0 -85
- package/src/views/privilege/syslog/syslogframe.vue +0 -26
- package/src/views/privilege/userRole/userRole.vue +0 -220
- package/vite.config.js +0 -103
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
title="扩展字段设置"
|
|
4
|
-
:visible.sync="visible"
|
|
5
|
-
width="65%"
|
|
6
|
-
append-to-body
|
|
7
|
-
top="2vh"
|
|
8
|
-
>
|
|
9
|
-
<el-container style="height: 80vh; border: 1px solid #eee">
|
|
10
|
-
<el-main class="gridShow">
|
|
11
|
-
<hd-com-grid
|
|
12
|
-
ref="grid"
|
|
13
|
-
:hdQuery="hdQuery"
|
|
14
|
-
url="/webresources/login/tech/ComExFieldCustom"
|
|
15
|
-
not-init
|
|
16
|
-
no-sets
|
|
17
|
-
ck-hide
|
|
18
|
-
no-sort
|
|
19
|
-
index-hide
|
|
20
|
-
:hd-btn-tool="false"
|
|
21
|
-
rec-hide
|
|
22
|
-
page-hide
|
|
23
|
-
:default-sort="{ prop: 'sortNo', order: 'ascending' }"
|
|
24
|
-
>
|
|
25
|
-
<!-- <div class="filter-container" slot="query">
|
|
26
|
-
<!– <el-input @keyup.enter.native="$refs.grid.doQuery()" style="width: 200px;" class="filter-item"
|
|
27
|
-
placeholder="名称"
|
|
28
|
-
v-model="hdQuery.query.anyQuery">
|
|
29
|
-
</el-input>
|
|
30
|
-
<el-button class="filter-item" @click="$refs.grid.doQuery()" icon="search" type="primary" ref="q"
|
|
31
|
-
keyType="query">搜索
|
|
32
|
-
</el-button>–>
|
|
33
|
-
<el-button class="filter-item" type="primary" @click="doAdd()" icon="edit" ref="a"
|
|
34
|
-
keyType="add">新增
|
|
35
|
-
</el-button>
|
|
36
|
-
</div>-->
|
|
37
|
-
|
|
38
|
-
<!-- <el-table-column width="60px" align="center" label="操作" fixed="right">
|
|
39
|
-
<template slot-scope="scope">
|
|
40
|
-
<hd-btn icon="el-icon-edit" hint="编辑" @click.stop="$refs.grid.doEdit(scope.row)"
|
|
41
|
-
v-if="!scope.row.isEdit">
|
|
42
|
-
</hd-btn>
|
|
43
|
-
<hd-btn hint="撤销" @click.stop="$refs.grid.doCancel(scope.row)" v-if="scope.row.isEdit">
|
|
44
|
-
<svg-icon icon-class="undo"/>
|
|
45
|
-
</hd-btn>
|
|
46
|
-
<hd-btn icon="el-icon-check" hint="保存" @click.stop="$refs.grid.doSave(scope.row)" v-if="scope.row.isEdit">
|
|
47
|
-
</hd-btn>
|
|
48
|
-
</template>
|
|
49
|
-
</el-table-column>
|
|
50
|
-
-->
|
|
51
|
-
<el-table-column
|
|
52
|
-
width="100px"
|
|
53
|
-
align="center"
|
|
54
|
-
label="是否使用"
|
|
55
|
-
prop="useFlg"
|
|
56
|
-
sortable
|
|
57
|
-
:rules="$r(0, 0, 50)"
|
|
58
|
-
input="el-switch"
|
|
59
|
-
:inputProp="{ activeValue: '1', inactiveValue: '0' }"
|
|
60
|
-
:inputFormat="$ckFt"
|
|
61
|
-
>
|
|
62
|
-
</el-table-column>
|
|
63
|
-
|
|
64
|
-
<!-- <el-table-column width="100px" align="center" label="表名" prop="tableName" sortable
|
|
65
|
-
:rules="$r(1,0,50)" no-edit>
|
|
66
|
-
</el-table-column>
|
|
67
|
-
<el-table-column width="100px" align="center" label="字段名" prop="columnName" sortable
|
|
68
|
-
:rules="$r(1,0,50)" no-edit>
|
|
69
|
-
</el-table-column>-->
|
|
70
|
-
<el-table-column
|
|
71
|
-
width="100px"
|
|
72
|
-
align="center"
|
|
73
|
-
label="字段注解"
|
|
74
|
-
prop="columnComment"
|
|
75
|
-
:rules="$r(1, 0, 50)"
|
|
76
|
-
>
|
|
77
|
-
</el-table-column>
|
|
78
|
-
<el-table-column
|
|
79
|
-
width="100px"
|
|
80
|
-
align="center"
|
|
81
|
-
label="字段类型"
|
|
82
|
-
prop="columnType"
|
|
83
|
-
:rules="$r(1)"
|
|
84
|
-
input="HdDrop"
|
|
85
|
-
:inputProp="{ field: 'IDV_COLUMN_TYPE' }"
|
|
86
|
-
@change="columnTypeChange"
|
|
87
|
-
>
|
|
88
|
-
</el-table-column>
|
|
89
|
-
<el-table-column
|
|
90
|
-
width="110px"
|
|
91
|
-
align="center"
|
|
92
|
-
label="格式/代码"
|
|
93
|
-
prop="formatter"
|
|
94
|
-
:rules="$r(1)"
|
|
95
|
-
>
|
|
96
|
-
<template slot-scope="scope">
|
|
97
|
-
<!--noEdit不允许编辑-->
|
|
98
|
-
<template v-if="scope.row.isEdit">
|
|
99
|
-
<template v-if="scope.row.columnType == 'DROP'">
|
|
100
|
-
<sel-grid-fieldcode
|
|
101
|
-
:gridRow="scope.row"
|
|
102
|
-
:txtVal.sync="scope.row['formatter']"
|
|
103
|
-
:idVal.sync="scope.row['formatter']"
|
|
104
|
-
@blur="checkErr(scope.row)"
|
|
105
|
-
style="width: 100%"
|
|
106
|
-
v-model="scope.row['formatter']"
|
|
107
|
-
></sel-grid-fieldcode>
|
|
108
|
-
</template>
|
|
109
|
-
<template v-else-if="scope.row.columnType == 'NUMBER'">
|
|
110
|
-
<HdDrop
|
|
111
|
-
:gridRow="scope.row"
|
|
112
|
-
:txtVal.sync="scope.row['formatterStr']"
|
|
113
|
-
:idVal.sync="scope.row['formatter']"
|
|
114
|
-
@blur="checkErr(scope.row)"
|
|
115
|
-
style="width: 100%"
|
|
116
|
-
field="IDV_NUMBER_FORMATTER"
|
|
117
|
-
v-model="scope.row['formatter']"
|
|
118
|
-
></HdDrop>
|
|
119
|
-
</template>
|
|
120
|
-
<template v-else-if="scope.row.columnType == 'DATE'">
|
|
121
|
-
<HdDrop
|
|
122
|
-
:gridRow="scope.row"
|
|
123
|
-
:txtVal.sync="scope.row['formatterStr']"
|
|
124
|
-
:idVal.sync="scope.row['formatter']"
|
|
125
|
-
@blur="checkErr(scope.row)"
|
|
126
|
-
style="width: 100%"
|
|
127
|
-
field="IDV_DATE_FORMATTER"
|
|
128
|
-
v-model="scope.row['formatter']"
|
|
129
|
-
></HdDrop>
|
|
130
|
-
</template>
|
|
131
|
-
<template v-else> </template>
|
|
132
|
-
</template>
|
|
133
|
-
</template>
|
|
134
|
-
</el-table-column>
|
|
135
|
-
<el-table-column
|
|
136
|
-
width="100px"
|
|
137
|
-
align="center"
|
|
138
|
-
label="是否必填"
|
|
139
|
-
prop="columnRequire"
|
|
140
|
-
input="el-switch"
|
|
141
|
-
:inputProp="{ 'active-value': 1, 'inactive-value': 0 }"
|
|
142
|
-
:inputFormat="$ckFt"
|
|
143
|
-
>
|
|
144
|
-
</el-table-column>
|
|
145
|
-
<el-table-column
|
|
146
|
-
width="100px"
|
|
147
|
-
align="center"
|
|
148
|
-
label="最大长度"
|
|
149
|
-
prop="columnLen"
|
|
150
|
-
:rules="$r(1, 0, 255, 'number')"
|
|
151
|
-
input="HdNum"
|
|
152
|
-
>
|
|
153
|
-
</el-table-column>
|
|
154
|
-
<!-- <el-table-column width="100px" align="center" label="比例" prop="columnScale" sortable
|
|
155
|
-
:rules="$r(0, 'number', 0, 255)" input="HdNum">
|
|
156
|
-
</el-table-column>
|
|
157
|
-
<el-table-column width="100px" align="center" label="默认值" prop="columnDefaultValue" sortable
|
|
158
|
-
:rules="$r(0,0,50)">
|
|
159
|
-
</el-table-column>
|
|
160
|
-
|
|
161
|
-
<el-table-column width="100px" align="center" label="编码" prop="gridCode" sortable :rules="$r(1,0,50)" no-edit>
|
|
162
|
-
</el-table-column>-->
|
|
163
|
-
<el-table-column
|
|
164
|
-
width="100px"
|
|
165
|
-
align="center"
|
|
166
|
-
label="表格宽度"
|
|
167
|
-
prop="formSpan"
|
|
168
|
-
:rules="$r(1)"
|
|
169
|
-
input="HdDrop"
|
|
170
|
-
:inputProp="{ field: 'IDV_FORM_SPAN' }"
|
|
171
|
-
>
|
|
172
|
-
</el-table-column>
|
|
173
|
-
<!-- <el-table-column width="100px" align="center" label="表单高度" prop="formXs" sortable
|
|
174
|
-
:rules="$r(1, 'number', 0, 1024)" input="HdNum">
|
|
175
|
-
</el-table-column>-->
|
|
176
|
-
<!-- <el-table-column width="100px" align="center" label="列表宽度" prop="gridWidth"
|
|
177
|
-
:rules="$r(0, 0, 9999, 'number')" input="HdNum">
|
|
178
|
-
</el-table-column>-->
|
|
179
|
-
<!-- <el-table-column width="100px" align="center" label="默认值" prop="defaultValue" sortable :rules="$r(0,0,50)">
|
|
180
|
-
</el-table-column>
|
|
181
|
-
<el-table-column width="100px" align="center" label="描述" prop="placeHolder" sortable :rules="$r(0,0,50)">
|
|
182
|
-
</el-table-column>
|
|
183
|
-
<el-table-column width="100px" align="center" label="规则" prop="rules" sortable :rules="$r(1,0,50)">
|
|
184
|
-
</el-table-column>-->
|
|
185
|
-
<el-table-column align="center" label="排序" width="80px" noQuery>
|
|
186
|
-
<template slot-scope="scope">
|
|
187
|
-
<svg-icon class="drag-handler" icon-class="drag"></svg-icon>
|
|
188
|
-
</template>
|
|
189
|
-
</el-table-column>
|
|
190
|
-
</hd-com-grid>
|
|
191
|
-
</el-main>
|
|
192
|
-
</el-container>
|
|
193
|
-
<div slot="footer" class="dialog-footer">
|
|
194
|
-
<!-- <el-button class="filter-item" type="primary" @click="doAdd()" icon="edit" ref="a"
|
|
195
|
-
keyType="add">新增
|
|
196
|
-
</el-button>-->
|
|
197
|
-
<el-button @click="visible = false">{{ $t('取 消') }}</el-button>
|
|
198
|
-
<el-button type="primary" @click="submit" :loading="loading">
|
|
199
|
-
{{ $t('确 定') }}</el-button
|
|
200
|
-
>
|
|
201
|
-
</div>
|
|
202
|
-
</el-dialog>
|
|
203
|
-
</template>
|
|
204
|
-
|
|
205
|
-
<script>
|
|
206
|
-
import Sortable from 'sortablejs'
|
|
207
|
-
import SelGridFieldcode from './HdSel/SelGridFieldcod'
|
|
208
|
-
|
|
209
|
-
export default {
|
|
210
|
-
name: 'gridexfield',
|
|
211
|
-
components: { SelGridFieldcode },
|
|
212
|
-
props: {
|
|
213
|
-
table: String,
|
|
214
|
-
columnList: Array,
|
|
215
|
-
gridCode: String,
|
|
216
|
-
},
|
|
217
|
-
data() {
|
|
218
|
-
return {
|
|
219
|
-
hdQuery: new HdQuery(this),
|
|
220
|
-
visible: false,
|
|
221
|
-
loading: false,
|
|
222
|
-
list: [],
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
mounted() {
|
|
226
|
-
this.init()
|
|
227
|
-
},
|
|
228
|
-
methods: {
|
|
229
|
-
init(exField) {
|
|
230
|
-
this.hdQuery.query.tableName = this.table
|
|
231
|
-
this.hdQuery.query.columnList = this.columnList
|
|
232
|
-
this.hdQuery.query.gridCode = this.gridCode
|
|
233
|
-
this.hdQuery.sort = 'sortNo'
|
|
234
|
-
this.hdQuery.order = 'asc'
|
|
235
|
-
|
|
236
|
-
this.$http
|
|
237
|
-
.post('/webresources/login/tech/ComExFieldCustom/find', this.hdQuery)
|
|
238
|
-
.then((response) => {
|
|
239
|
-
this.list = response.data.rows
|
|
240
|
-
|
|
241
|
-
if (this.columnList) {
|
|
242
|
-
this.columnList.forEach((column) => {
|
|
243
|
-
if (
|
|
244
|
-
!response.data.rows.some((row) => {
|
|
245
|
-
return row.columnName == column
|
|
246
|
-
})
|
|
247
|
-
) {
|
|
248
|
-
this.list.unshift({
|
|
249
|
-
columnName: column,
|
|
250
|
-
tableName: this.table,
|
|
251
|
-
formXs: '20',
|
|
252
|
-
formSpan: '12',
|
|
253
|
-
isEdit: true,
|
|
254
|
-
})
|
|
255
|
-
}
|
|
256
|
-
})
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
let i = 0
|
|
260
|
-
this.list.forEach((row) => {
|
|
261
|
-
row.isEdit = true
|
|
262
|
-
row.sortNo = i++
|
|
263
|
-
row.formSpan = row.formSpan + ''
|
|
264
|
-
})
|
|
265
|
-
this.$refs.grid.doQuery({ rows: this.list })
|
|
266
|
-
|
|
267
|
-
this.$nextTick(() => {
|
|
268
|
-
this.setSort()
|
|
269
|
-
})
|
|
270
|
-
})
|
|
271
|
-
},
|
|
272
|
-
show() {
|
|
273
|
-
this.visible = true
|
|
274
|
-
|
|
275
|
-
this.list.forEach((row) => {
|
|
276
|
-
row.isEdit = true
|
|
277
|
-
})
|
|
278
|
-
},
|
|
279
|
-
setSort() {
|
|
280
|
-
const elAll = document.querySelectorAll(
|
|
281
|
-
'.gridShow .el-table__body-wrapper > table > tbody'
|
|
282
|
-
)
|
|
283
|
-
for (let i = 0; i < elAll.length; i++) {
|
|
284
|
-
const el = elAll[i]
|
|
285
|
-
this.sortable = Sortable.create(el, {
|
|
286
|
-
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
|
|
287
|
-
onEnd: (evt) => {
|
|
288
|
-
// this.list.forEach(row => console.log(row.columnComment, row.sortNo))
|
|
289
|
-
// console.log('----------------------------------')
|
|
290
|
-
// console.log(evt)
|
|
291
|
-
// console.log('----------------------------------')
|
|
292
|
-
|
|
293
|
-
this.list.forEach((row) => {
|
|
294
|
-
if (row.sortNo == evt.oldIndex) {
|
|
295
|
-
row.sortNo = evt.newIndex
|
|
296
|
-
} else if (
|
|
297
|
-
evt.newIndex > evt.oldIndex &&
|
|
298
|
-
row.sortNo <= evt.newIndex &&
|
|
299
|
-
row.sortNo > evt.oldIndex
|
|
300
|
-
) {
|
|
301
|
-
row.sortNo = row.sortNo - 1
|
|
302
|
-
} else if (
|
|
303
|
-
evt.newIndex < evt.oldIndex &&
|
|
304
|
-
row.sortNo >= evt.newIndex &&
|
|
305
|
-
row.sortNo < evt.oldIndex
|
|
306
|
-
) {
|
|
307
|
-
row.sortNo = row.sortNo + 1
|
|
308
|
-
}
|
|
309
|
-
})
|
|
310
|
-
|
|
311
|
-
// this.list.forEach(row => console.log(row.columnComment, row.sortNo))
|
|
312
|
-
},
|
|
313
|
-
})
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
doAdd() {
|
|
317
|
-
let emptyColumn = this.getEmptyColumn()
|
|
318
|
-
if (emptyColumn == null) {
|
|
319
|
-
this.$message({
|
|
320
|
-
message: '没有剩余的扩展字段',
|
|
321
|
-
})
|
|
322
|
-
return
|
|
323
|
-
}
|
|
324
|
-
let exField = {
|
|
325
|
-
gridCode: this.gridCode,
|
|
326
|
-
tableName: this.table,
|
|
327
|
-
columnName: emptyColumn,
|
|
328
|
-
formXs: 12,
|
|
329
|
-
formSpan: '20',
|
|
330
|
-
isEdit: true,
|
|
331
|
-
}
|
|
332
|
-
this.$refs.grid.doEdit('', exField)
|
|
333
|
-
},
|
|
334
|
-
submit() {
|
|
335
|
-
this.list.forEach((row) => {
|
|
336
|
-
if (!row.columnComment || !row.columnType) {
|
|
337
|
-
row.isEdit = false
|
|
338
|
-
}
|
|
339
|
-
row.gridCode = this.gridCode
|
|
340
|
-
})
|
|
341
|
-
|
|
342
|
-
this.$refs.grid
|
|
343
|
-
.doSaveAll()
|
|
344
|
-
.then((v) => {
|
|
345
|
-
this.visible = false
|
|
346
|
-
this.$emit('save-ok')
|
|
347
|
-
})
|
|
348
|
-
.catch((e) => {
|
|
349
|
-
this.$message({
|
|
350
|
-
message: '填写有误',
|
|
351
|
-
})
|
|
352
|
-
})
|
|
353
|
-
},
|
|
354
|
-
getEmptyColumn() {
|
|
355
|
-
let emptyColumns = this.columnList.filter((column) => {
|
|
356
|
-
return !this.list.some((row) => {
|
|
357
|
-
return row.columnName == column
|
|
358
|
-
})
|
|
359
|
-
})
|
|
360
|
-
return emptyColumns.length > 0 ? emptyColumns[0] : null
|
|
361
|
-
},
|
|
362
|
-
columnTypeChange(v, row) {
|
|
363
|
-
if (row.exColumnId) {
|
|
364
|
-
this.$message({
|
|
365
|
-
type: 'warning',
|
|
366
|
-
message: this.$t('修改类型可能回造成数据混乱或丢失, 请慎重!'),
|
|
367
|
-
})
|
|
368
|
-
}
|
|
369
|
-
if (row.columnType == 'VARCHAR' || row.columnType == 'BOOLEAN') {
|
|
370
|
-
row.formatter = 'x'
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
}
|
|
375
|
-
</script>
|
package/src/hdcom/GridShow.vue
DELETED
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
title="展示设置"
|
|
4
|
-
:visible.sync="visible"
|
|
5
|
-
width="50%"
|
|
6
|
-
append-to-body
|
|
7
|
-
top="2vh"
|
|
8
|
-
>
|
|
9
|
-
<el-container style="height: 80vh; border: 1px solid #eee">
|
|
10
|
-
<el-main class="gridShow">
|
|
11
|
-
<el-table :data="list" row-key="property">
|
|
12
|
-
<el-table-column
|
|
13
|
-
align="center"
|
|
14
|
-
label="名称"
|
|
15
|
-
prop="label"
|
|
16
|
-
width="150"
|
|
17
|
-
noQuery
|
|
18
|
-
>
|
|
19
|
-
</el-table-column>
|
|
20
|
-
<el-table-column
|
|
21
|
-
align="center"
|
|
22
|
-
label="宽度(px)"
|
|
23
|
-
prop="width"
|
|
24
|
-
width="150"
|
|
25
|
-
noQuery
|
|
26
|
-
>
|
|
27
|
-
<template slot-scope="scope">
|
|
28
|
-
<hd-num v-model.number="scope.row.width" :step="10"></hd-num>
|
|
29
|
-
</template>
|
|
30
|
-
</el-table-column>
|
|
31
|
-
<el-table-column align="center" label="展示" prop="showFlg" noQuery>
|
|
32
|
-
<template slot-scope="scope">
|
|
33
|
-
<el-switch
|
|
34
|
-
v-model="scope.row.showFlg"
|
|
35
|
-
active-value="1"
|
|
36
|
-
inactive-value="0"
|
|
37
|
-
></el-switch>
|
|
38
|
-
</template>
|
|
39
|
-
</el-table-column>
|
|
40
|
-
<el-table-column align="center" label="冻结" prop="freezeFlg" noQuery>
|
|
41
|
-
<template slot-scope="scope">
|
|
42
|
-
<el-switch
|
|
43
|
-
v-model="scope.row.freezeFlg"
|
|
44
|
-
active-value="1"
|
|
45
|
-
inactive-value="0"
|
|
46
|
-
></el-switch>
|
|
47
|
-
</template>
|
|
48
|
-
</el-table-column>
|
|
49
|
-
<el-table-column align="center" label="排序" width="80" noQuery>
|
|
50
|
-
<template slot-scope="scope">
|
|
51
|
-
<svg-icon class="drag-handler" icon-class="drag"></svg-icon>
|
|
52
|
-
</template>
|
|
53
|
-
</el-table-column>
|
|
54
|
-
</el-table>
|
|
55
|
-
</el-main>
|
|
56
|
-
</el-container>
|
|
57
|
-
<div slot="footer" class="dialog-footer">
|
|
58
|
-
<el-button @click="reset">{{ $t('重置') }}</el-button>
|
|
59
|
-
<el-button @click="visible = false">{{ $t('取 消') }}</el-button>
|
|
60
|
-
<el-button type="primary" @click="submit" :loading="loading">
|
|
61
|
-
{{ $t('确 定') }}</el-button
|
|
62
|
-
>
|
|
63
|
-
</div>
|
|
64
|
-
</el-dialog>
|
|
65
|
-
</template>
|
|
66
|
-
|
|
67
|
-
<script>
|
|
68
|
-
import Sortable from 'sortablejs'
|
|
69
|
-
|
|
70
|
-
export default {
|
|
71
|
-
name: 'gridshow',
|
|
72
|
-
components: {},
|
|
73
|
-
data() {
|
|
74
|
-
return {
|
|
75
|
-
hdQuery: new HdQuery(this),
|
|
76
|
-
list: [],
|
|
77
|
-
oldList: [],
|
|
78
|
-
newList: [],
|
|
79
|
-
visible: false,
|
|
80
|
-
loading: false,
|
|
81
|
-
menuId: '',
|
|
82
|
-
gridId: '',
|
|
83
|
-
specCkForGrid: true, // HdTableColumn判断是否来自HdGrid用
|
|
84
|
-
// shipId: ""
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
mounted() {
|
|
88
|
-
this.loading = false
|
|
89
|
-
},
|
|
90
|
-
methods: {
|
|
91
|
-
show(disCol, menuId, gridId) {
|
|
92
|
-
this.menuId = menuId
|
|
93
|
-
this.gridId = gridId
|
|
94
|
-
this.visible = true
|
|
95
|
-
this.list = JSON.parse(
|
|
96
|
-
JSON.stringify(disCol.filter((item) => item.property))
|
|
97
|
-
) // 判断有property的展示,使用复制采用新对象(否则chrome有问题)
|
|
98
|
-
// console.log('list',this.list)
|
|
99
|
-
//过滤掉子序列
|
|
100
|
-
this.list.forEach((v) => (v.children = []))
|
|
101
|
-
this.oldList = this.list.map((v) => v.property)
|
|
102
|
-
this.newList = this.oldList.slice() //清空
|
|
103
|
-
this.$nextTick(() => {
|
|
104
|
-
this.setSort()
|
|
105
|
-
})
|
|
106
|
-
},
|
|
107
|
-
setSort() {
|
|
108
|
-
const elAll = document.querySelectorAll(
|
|
109
|
-
'.gridShow .el-table__body-wrapper > table > tbody'
|
|
110
|
-
)
|
|
111
|
-
for (let i = 0; i < elAll.length; i++) {
|
|
112
|
-
const el = elAll[i]
|
|
113
|
-
this.sortable = Sortable.create(el, {
|
|
114
|
-
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
|
|
115
|
-
onEnd: (evt) => {
|
|
116
|
-
const targetRow = this.list.splice(evt.oldIndex, 1)[0]
|
|
117
|
-
this.list.splice(evt.newIndex, 0, targetRow)
|
|
118
|
-
|
|
119
|
-
// for show the changes, you can delete in you code
|
|
120
|
-
const tempIndex = this.newList.splice(evt.oldIndex, 1)[0]
|
|
121
|
-
this.newList.splice(evt.newIndex, 0, tempIndex)
|
|
122
|
-
},
|
|
123
|
-
})
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
submit() {
|
|
127
|
-
const url =
|
|
128
|
-
'/webresources/login/com/ComGridShow/save?menuId=' +
|
|
129
|
-
this.menuId +
|
|
130
|
-
'&gridId=' +
|
|
131
|
-
this.gridId
|
|
132
|
-
this.loading = true
|
|
133
|
-
this.$http.post(url, this.list).then((response) => {
|
|
134
|
-
this.loading = false
|
|
135
|
-
const data = response.data
|
|
136
|
-
this.$message({
|
|
137
|
-
type: data.code == '-1' ? 'error' : 'success',
|
|
138
|
-
message: data.message,
|
|
139
|
-
})
|
|
140
|
-
if (data.code == '-1') {
|
|
141
|
-
return
|
|
142
|
-
}
|
|
143
|
-
this.visible = false
|
|
144
|
-
this.$emit('save-ok')
|
|
145
|
-
})
|
|
146
|
-
},
|
|
147
|
-
reset() {
|
|
148
|
-
//江阴港特色,重置需要弹窗确认框,确认后方可重置
|
|
149
|
-
let resetFlag =
|
|
150
|
-
this.$store.state.app.sysParam.JYG_CONTROL.RESET_BUTTON_CONFIRM
|
|
151
|
-
if (resetFlag && resetFlag == '1') {
|
|
152
|
-
this.$confirm('是否确认重置?', '提示', {
|
|
153
|
-
confirmButtonText: '确定',
|
|
154
|
-
cancelButtonText: '取消',
|
|
155
|
-
type: 'warning',
|
|
156
|
-
}).then(() => {
|
|
157
|
-
// 确定
|
|
158
|
-
this.resetColumn()
|
|
159
|
-
})
|
|
160
|
-
} else {
|
|
161
|
-
this.resetColumn()
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
resetColumn() {
|
|
165
|
-
const url =
|
|
166
|
-
'/webresources/login/com/ComGridShow/reset?menuId=' +
|
|
167
|
-
this.menuId +
|
|
168
|
-
'&gridId=' +
|
|
169
|
-
this.gridId
|
|
170
|
-
this.$http.post(url, this.list).then((response) => {
|
|
171
|
-
const data = response.data
|
|
172
|
-
this.$message({
|
|
173
|
-
type: data.code == '-1' ? 'error' : 'success',
|
|
174
|
-
message: data.message,
|
|
175
|
-
})
|
|
176
|
-
if (data.code == '-1') {
|
|
177
|
-
return
|
|
178
|
-
}
|
|
179
|
-
this.visible = false
|
|
180
|
-
this.$emit('save-ok')
|
|
181
|
-
})
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
}
|
|
185
|
-
</script>
|
|
186
|
-
|
|
187
|
-
<style lang="scss" rel="stylesheet/scss">
|
|
188
|
-
.sortable-ghost {
|
|
189
|
-
opacity: 0.8;
|
|
190
|
-
color: #fff !important;
|
|
191
|
-
background: #42b983 !important;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.gridShow {
|
|
195
|
-
display: flex;
|
|
196
|
-
flex-direction: column;
|
|
197
|
-
|
|
198
|
-
.el-table {
|
|
199
|
-
height: 100%;
|
|
200
|
-
width: 100%;
|
|
201
|
-
flex: 1;
|
|
202
|
-
|
|
203
|
-
.el-table__body-wrapper {
|
|
204
|
-
width: 100%;
|
|
205
|
-
padding-bottom: 30px;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.el-table__header-wrapper th {
|
|
209
|
-
//列表标题
|
|
210
|
-
background-color: #f6f6f6;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.el-table__fixed-header-wrapper th {
|
|
214
|
-
//固定的列表标题
|
|
215
|
-
background-color: #8cbda4;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
td,
|
|
219
|
-
th {
|
|
220
|
-
//列表标题及内容
|
|
221
|
-
padding: 2px 0;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.cell,
|
|
225
|
-
.el-table th div,
|
|
226
|
-
.el-table--border th:first-child .cell,
|
|
227
|
-
.el-table--border td:first-child .cell {
|
|
228
|
-
//列表的margin
|
|
229
|
-
padding-left: 2px !important;
|
|
230
|
-
padding-right: 2px !important;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.el-table__empty-block {
|
|
234
|
-
position: static;
|
|
235
|
-
text-align: center;
|
|
236
|
-
width: 100%;
|
|
237
|
-
height: 80%;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.el-table__body {
|
|
241
|
-
//列表下面加了空白
|
|
242
|
-
margin-bottom: 10px;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.el-table__body-wrapper {
|
|
246
|
-
height: 100%;
|
|
247
|
-
overflow-y: auto;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.el-input__inner {
|
|
251
|
-
height: 27px;
|
|
252
|
-
margin-bottom: 0px;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.el-input,
|
|
256
|
-
.el-form-item__content,
|
|
257
|
-
.el-form-item__label,
|
|
258
|
-
.el-input__icon {
|
|
259
|
-
line-height: 30px;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.el-input__inner {
|
|
263
|
-
padding: 5px;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.el-input--prefix .el-input__inner {
|
|
267
|
-
//日期的有logo不一样
|
|
268
|
-
padding-left: 30px;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
</style>
|
|
273
|
-
|
|
274
|
-
<style scoped>
|
|
275
|
-
.icon-star {
|
|
276
|
-
margin-right: 2px;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.drag-handler {
|
|
280
|
-
width: 20px;
|
|
281
|
-
height: 20px;
|
|
282
|
-
cursor: pointer;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.show-d {
|
|
286
|
-
margin-top: 15px;
|
|
287
|
-
}
|
|
288
|
-
</style>
|