cloud-web-corejs 1.0.54-dev.94 → 1.0.54-dev.96

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.94",
4
+ "version": "1.0.54-dev.96",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -0,0 +1,379 @@
1
+ <template>
2
+ <el-dialog
3
+ title="高级筛选"
4
+ :append-to-body="true"
5
+ :modal-append-to-body="true"
6
+ :close-on-click-modal="falseValue"
7
+ :visible.sync="showDialog"
8
+ :modal="falseValue"
9
+ custom-class="dialog-style proList-dialog"
10
+ width="1200px"
11
+ @close="dialogClose"
12
+ v-el-drag-dialog
13
+ v-el-dialog-center
14
+ >
15
+ <div class="cont">
16
+ <div id="containt" style="height:550px">
17
+ <div class="search-criteria fl" style="width:220px;height:100%;">
18
+ <div class="tit"><i class="iconfont icon-shaixuan"></i><b>搜索条件</b></div>
19
+
20
+ <el-form label-position="top">
21
+ <div style="height:468px;padding-top: 10px;overflow:auto">
22
+ <el-form-item label="文件名">
23
+ <el-input v-model="formData.fileName" size="small" clearable/>
24
+ </el-form-item>
25
+ <el-form-item label="所属对象描述">
26
+ <base-input-batch v-model="formData.note"/>
27
+ </el-form-item>
28
+ <el-form-item label="创建时间">
29
+ <el-date-picker
30
+ v-model="formData.startTime"
31
+ type="date"
32
+ placeholder=""
33
+ size="small"
34
+ clearable
35
+ value-format="yyyy-MM-dd"
36
+ :picker-options="$baseStartPickerOptions(formData.endTime)"
37
+ ></el-date-picker>
38
+ <span>-</span>
39
+ <el-date-picker
40
+ v-model="formData.endTime"
41
+ type="date"
42
+ placeholder=""
43
+ size="small"
44
+ clearable
45
+ value-format="yyyy-MM-dd"
46
+ :picker-options="$baseEndPickerOptions(formData.startTime)"
47
+ ></el-date-picker>
48
+ </el-form-item>
49
+ <el-form-item label="文件类型">
50
+ <el-select v-model="fileTypeSn" @change="getAttributeList">
51
+ <el-option v-for="(item,index) in fileTypes" :key="index" :label="item.fileTypeName"
52
+ :value="item.fileTypeSn"></el-option>
53
+ </el-select>
54
+ </el-form-item>
55
+ <el-form-item v-for="(item,index) in fileAttributes" :key="index" :label="item.attributeName">
56
+ <el-input v-model="item.formValue" clearable></el-input>
57
+ </el-form-item>
58
+ </div>
59
+ <el-form-item class="btns">
60
+ <el-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="primary" plain>重置
61
+ </el-button>
62
+ <el-button type="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
63
+ </el-button>
64
+ </el-form-item>
65
+ </el-form>
66
+ </div>
67
+ <label id="labBtn" class="labBtn1" style="cursor:unset;height: 100%;">
68
+ <!-- <div class="icon">
69
+ <i class="el-icon-more"></i>
70
+ <i class="el-icon-more"></i>
71
+ </div>-->
72
+ </label>
73
+ <div class="main-right fr" style="width:calc(100% - 220px);padding-left: 6px;">
74
+ <div style="height:100%">
75
+ <vxe-grid
76
+ ref="table-m1"
77
+ v-bind="vxeOption"
78
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
79
+ @custom="$vxeTableUtil.customHandle"
80
+ >
81
+ <template #form>
82
+ <div class="clearfix screen-btns">
83
+ <div class="fl screen-breadcrumb">
84
+ <el-breadcrumb separator-class="el-icon-arrow-right ">
85
+ <el-breadcrumb-item><i class="iconfont icon-dingwei-mianxing"></i><span class="f-blue"
86
+ @click="checkTreeNode()">搜索范围</span>
87
+ </el-breadcrumb-item>
88
+ <el-breadcrumb-item v-for="(treeNode,index) in treeNodeArr" :key="index">
89
+ <span class="f-blue" @click="checkTreeNode(treeNode)">{{ treeNode.label }}</span>
90
+ </el-breadcrumb-item>
91
+ </el-breadcrumb>
92
+ </div>
93
+ <div class="fr">
94
+ <!-- <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text"
95
+ status="primary"
96
+ plain>重置
97
+ </vxe-button>
98
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
99
+ </vxe-button>-->
100
+ </div>
101
+ </div>
102
+ </template>
103
+ <template #fileName="{row}">
104
+ <div>
105
+ <el-tooltip :enterable="false" effect="dark" :content="$t2('预览', 'components.fileLibrary.preview')"
106
+ placement="top">
107
+ <a class="a-link img" @click="$baseFilePreview(row)">
108
+ <el-image :src="getShowUrl(row,'thumbnail')"></el-image>
109
+ </a>
110
+ </el-tooltip>
111
+ <a class="a-link underLine" @click="$baseFilePreview(row)">{{ row.fileName }}</a>
112
+ </div>
113
+ </template>
114
+ </vxe-grid>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </el-dialog>
120
+ </template>
121
+
122
+ <script>
123
+ import {selectDialogMixins} from '@base/mixins/selectDialog/index.js';
124
+
125
+ import {treeScollx, treeScolly} from '@base/utils/global.js';
126
+ import {encode} from "js-base64";
127
+
128
+ export default {
129
+ name: 'productDialog',
130
+ props: ['visiable', 'multi', 'rows', 'treeNodeArr', 'currentFileCategory'],
131
+ mixins: [selectDialogMixins],
132
+ inject: ['current_prefix', 'storeAreaCode', 'getObjectForeignId', 'getIsPrivate'],
133
+ created() {
134
+ this.initSetting({treeScolly: false});
135
+ /*setTimeout(() => {
136
+ treeScollx({target: this, type: 'default', dragBtn: '.labBtn1'});
137
+ treeScolly({target: this, type: 'selectDialog', dragBtn: '.labBtn2'});
138
+ }, 200);*/
139
+
140
+ },
141
+ mounted() {
142
+ this.getFileTypeList();
143
+ this.initTableM1();
144
+ },
145
+
146
+ computed: {},
147
+ data() {
148
+ return {
149
+ showDialog: true,
150
+ falseValue: false,
151
+ selectMulti: true,
152
+ formData: {},
153
+ vxeOption: {},
154
+
155
+ fileTypes: [],
156
+ fileAttributes: [],
157
+ fileTypeSn: null,
158
+ fileAttachAttributeCDTos: []
159
+ };
160
+ },
161
+ methods: {
162
+ initTableM1() {
163
+ // debugger
164
+ let that = this;
165
+
166
+ let tableOption = {
167
+ vue: that,
168
+ tableRef: 'table-m1',
169
+ tableName: 'fileLigraryFilterDialog-m1',
170
+ path: this.current_prefix + "/file_obj/listAuthAttachPage",
171
+ param: () => {
172
+ /* let parents = this.currentFileCategory &&
173
+ this.currentFileCategory.id &&
174
+ this.currentFileCategory.id > 0
175
+ ? [this.currentFileCategory.id]
176
+ : [];*/
177
+ let fileAttachAttributeCDTOs = [];
178
+ this.fileAttributes.map(item => {
179
+ if (item.formValue !== "" && item.formValue !== null) {
180
+ fileAttachAttributeCDTOs.push({attributeSn: item.attributeSn, attributeValue: item.formValue});
181
+ }
182
+ })
183
+
184
+ let objectForeignId = this.getObjectForeignId();
185
+ let isPrivate = this.getIsPrivate();
186
+ return {
187
+ // parents,
188
+ objectForeignId: objectForeignId,
189
+ // privateDir: isPrivate ? 1 : 0,
190
+ fileAttachAttributeCDTOs,
191
+ storeAreaCode: this.storeAreaCode,
192
+ ...this.formData,
193
+ };
194
+ },
195
+ columns: [
196
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
197
+ {
198
+ title: this.$t2('文件名称', 'components.fileLibrary.fileName'),
199
+ field: "fileName",
200
+ width: 250,
201
+ fixed: "left",
202
+ slots: {
203
+ default: 'fileName'
204
+ },
205
+ },
206
+ {
207
+ title: this.$t2('文件大小', 'components.fileLibrary.fileSize'),
208
+ field: "fileSize",
209
+ width: 150,
210
+ slots: {
211
+ default: ({row, $rowIndex}) => {
212
+ if (!row.dirs) {
213
+ return this.formatFileSize(row.fileSize);
214
+ }
215
+ },
216
+ },
217
+ },
218
+ {
219
+ title: this.$t2('版本号', 'components.fileLibrary.fileRev'),
220
+ field: "rev",
221
+ width: 150,
222
+ slots: {
223
+ default: ({row, $rowIndex}) => {
224
+ if (!row.dirs) {
225
+ return row.rev;
226
+ }
227
+ }
228
+ }
229
+ },
230
+ {title: this.$t2('分辨率', 'components.fileLibrary.widthHeight'), field: "widthHeight", width: 150},
231
+ {title: this.$t2('所属对象描述', 'components.fileLibrary.note'), field: "note", width: 250},
232
+ {
233
+ title: '状态',
234
+ field: 'status',
235
+ width: 150,
236
+ slots: {
237
+ default: ({row, $rowIndex}) => {
238
+ if (!row.dirs) {
239
+ return row.status == 1 ? '已归档' : '未归档';
240
+ }
241
+ }
242
+ }
243
+ },
244
+ {
245
+ title: this.$t2('文件编码', 'components.fileLibrary.fileSn'),
246
+ field: "fileSn",
247
+ width: 150
248
+ },
249
+ // ...customColumns,
250
+ {title: this.$t2('创建人', 'components.fileLibrary.createBy'), field: "createBy", width: 150},
251
+ {
252
+ field: "createDate",
253
+ title: this.$t2('创建时间', 'components.fileLibrary.createDate'),
254
+ width: 150,
255
+ },
256
+ {
257
+ width: 47,
258
+ fixed: 'right',
259
+ title: '',
260
+ sortable: false,
261
+ slots: {
262
+ default: ({row, rowIndex}) => {
263
+ return [
264
+ <div>
265
+ <a
266
+ href="javascript:void(0);"
267
+ class="a-link"
268
+ onclick={() => {
269
+ this.openFileDirs(row);
270
+ }}
271
+ >
272
+ <el-tooltip enterable={false} effect="dark" content={this.$t1('在文件夹中显示')} placement="top"
273
+ popper-class="tooltip-skin">
274
+ <i class="el-icon-view"/>
275
+ </el-tooltip>
276
+ </a>
277
+ </div>
278
+ ];
279
+ }
280
+ }
281
+ }
282
+ ]
283
+ };
284
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
285
+ that.vxeOption = opts;
286
+ });
287
+ },
288
+ openFileDirs(row) {
289
+ this.dialogClose();
290
+ this.$emit("openFileDirs", row)
291
+ },
292
+ getShowUrl(attachment, field) {
293
+ if (!field) field = "medium";
294
+ return this.$commonFileUtil.getShowUrl(
295
+ attachment.domain +
296
+ (attachment[field] ? attachment[field] : attachment.url)
297
+ );
298
+ },
299
+ formatFileSize(fileSize) {
300
+ fileSize = fileSize || 0;
301
+ if (fileSize < 1024) {
302
+ return fileSize + "B";
303
+ } else if (fileSize < 1024 * 1024) {
304
+ var temp = fileSize / 1024;
305
+ temp = temp.toFixed(2);
306
+ return temp + "KB";
307
+ } else if (fileSize < 1024 * 1024 * 1024) {
308
+ var temp = fileSize / (1024 * 1024);
309
+ temp = temp.toFixed(2);
310
+ return temp + "MB";
311
+ } else {
312
+ var temp = fileSize / (1024 * 1024 * 1024);
313
+ temp = temp.toFixed(2);
314
+ return temp + "GB";
315
+ }
316
+ },
317
+ searchEvent() {
318
+ this.$refs['table-m1'].commitProxy('reload');
319
+ },
320
+ resetEvent() {
321
+ this.formData = {};
322
+ this.clearFileAttributeFormValue();
323
+ this.$refs['table-m1'].commitProxy('reload');
324
+ },
325
+ clearFileAttributeFormValue() {
326
+ this.fileTypeSn = null;
327
+ this.fileAttributes = [];
328
+ },
329
+ getFileTypeList() {
330
+ this.$http({
331
+ url: this.current_prefix + `/file_type/listPage`,
332
+ method: `post`,
333
+ data: {
334
+ enabled: true
335
+ },
336
+ // isLoading: true,
337
+ // modalStrictly: true,
338
+ success: (res) => {
339
+ this.fileTypes = res.objx?.records || [];
340
+ },
341
+ });
342
+ },
343
+ getAttributeList() {
344
+ this.$http({
345
+ url: this.current_prefix + `/file_type/listAttribute`,
346
+ method: `post`,
347
+ data: {
348
+ stringOne: this.fileTypeSn
349
+ },
350
+ // isLoading: true,
351
+ // modalStrictly: true,
352
+ success: (res) => {
353
+ let rows = res.objx || [];
354
+ rows.forEach(row => {
355
+ row.formValue = null;
356
+ })
357
+ this.fileAttributes = rows;
358
+ },
359
+ });
360
+ },
361
+
362
+
363
+ }
364
+ };
365
+ </script>
366
+ <style scoped lang="scss">
367
+ .dialog-style.proList-dialog .el-dialog__body #containt {
368
+ height: 100%;
369
+
370
+ .main-right {
371
+ height: 100%
372
+ }
373
+ }
374
+
375
+ #labBtn.transverse {
376
+ margin-bottom: 0;
377
+ margin-left: -8px;
378
+ }
379
+ </style>
@@ -108,6 +108,9 @@
108
108
  v-if="isEdit && (fileObjAuth.deleteAuth || fileObjAuth.deleteDirAuth)">
109
109
  {{ $t2('删除', 'components.fileLibrary.delete') }}
110
110
  </el-button>
111
+ <el-button icon="iconfont icon-shaixuan" class="button-sty" @click="showFilterDialog = true">
112
+ {{ $t1('高级筛选') }}
113
+ </el-button>
111
114
 
112
115
  <template v-for="(fileButton,customToobarButtonIndex) in customToobarButtons">
113
116
  <template
@@ -483,7 +486,7 @@
483
486
  </el-breadcrumb>
484
487
  </el-form-item>
485
488
  <el-form-item :label="$t2('文件夹编码','components.fileLibrary.fileCategorySn')">
486
- <span>{{editCategory.fileSn}}</span>
489
+ <span>{{ editCategory.fileSn }}</span>
487
490
  </el-form-item>
488
491
  <el-form-item :label="$t2('文件夹名称','components.fileLibrary.fileCategoryName')">
489
492
  <el-input v-model="editCategory.fileName" clearable class="all-width"/>
@@ -522,16 +525,16 @@
522
525
  :formData.sync="advancedFormData" @confirm="searchEvent">
523
526
  <template #form>
524
527
  <vxe-form :model="advancedFormData" title-width="102px" :inline="true" class="adSearchForm">
525
- <!-- <vxe-form-item title="属性名称:">
526
- <template v-slot>
527
- <el-input v-model="advancedFormData.attributeName" clearable/>
528
- </template>
529
- </vxe-form-item>
530
- <vxe-form-item title="属性值:">
531
- <template v-slot>
532
- <el-input v-model="advancedFormData.attributeValue" clearable/>
533
- </template>
534
- </vxe-form-item>-->
528
+ <!-- <vxe-form-item title="属性名称:">
529
+ <template v-slot>
530
+ <el-input v-model="advancedFormData.attributeName" clearable/>
531
+ </template>
532
+ </vxe-form-item>
533
+ <vxe-form-item title="属性值:">
534
+ <template v-slot>
535
+ <el-input v-model="advancedFormData.attributeValue" clearable/>
536
+ </template>
537
+ </vxe-form-item>-->
535
538
  <!-- <vxe-form-item title="状态:">
536
539
  <template v-slot>
537
540
  <el-select v-model="advancedFormData.status" clearable>
@@ -581,6 +584,9 @@
581
584
  <videoDialog v-if="showVideoDialog" :visiable.sync="showVideoDialog" :option="videoOption"></videoDialog>
582
585
  <fileObjAuthDialog v-if="showFileObjAuthDialog" :visiable.sync="showFileObjAuthDialog"
583
586
  :fileObjId="currentFileCategory ? currentFileCategory.id:0" :treeNodeArr="treeNodeArr"/>
587
+
588
+ <filterDialog v-if="showFilterDialog" :visiable.sync="showFilterDialog" queryType="pcp" :treeNodeArr="treeNodeArr"
589
+ :currentFileCategory="currentFileCategory" @openFileDirs="openFileDirs"></filterDialog>
584
590
  </div>
585
591
  </template>
586
592
 
@@ -588,16 +594,18 @@
588
594
 
589
595
  import mixins from './mixins/indexMixins';
590
596
  import fileObjAuthDialog from "../../components/fileLibrary/fileObjAuthDialog";
597
+ import filterDialog from "./filterDialog.vue";
591
598
 
592
599
  export default {
593
600
  name: 'ledgerLibrary',
594
601
  mixins: [mixins],
595
- components: {fileObjAuthDialog},
602
+ components: {fileObjAuthDialog, filterDialog},
596
603
  data() {
597
604
  return {
598
605
  showFileObjAuthDialog: false,
599
606
  fileObjAuth: {},
600
- popAnnexFilter: false
607
+ popAnnexFilter: false,
608
+ showFilterDialog: false
601
609
  }
602
610
  }
603
611
  }
@@ -683,5 +691,8 @@ export default {
683
691
  height: calc(100vh - 215px);
684
692
  }
685
693
  }
686
- #labBtn{height:calc(100vh - 34px)}
694
+
695
+ #labBtn {
696
+ height: calc(100vh - 34px)
697
+ }
687
698
  </style>
@@ -262,6 +262,34 @@ modules = {
262
262
  }
263
263
  },
264
264
  methods: {
265
+ openFileDirs(row) {
266
+ let keys = row.treePath.split(',').filter(item => !!item);
267
+ let size = keys.length
268
+ let tree = this.$refs.tree
269
+
270
+ let parent = null;
271
+ let loopDo = (index) => {
272
+ if (size <= index) return
273
+ let key = keys[index]
274
+ let node = tree.getNode(key + "");
275
+ let data = node.data;
276
+ if (size == index + 1) {
277
+ tree.setCurrentKey(data);
278
+ this.handleNodeClick(data, node, this);
279
+ return
280
+ }
281
+
282
+ if (!data.leaf) {
283
+ node.expand(() => {
284
+ loopDo(index + 1)
285
+ })
286
+ }
287
+ }
288
+ this.getTopNode().expand(() => {
289
+ loopDo(0)
290
+ })
291
+
292
+ },
265
293
  getTopNode() {
266
294
  return this.$refs.tree.root.childNodes[0];
267
295
  },