three-trees-ui 1.0.25 → 1.0.27

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,6 +1,6 @@
1
1
  {
2
2
  "name": "three-trees-ui",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "publicPath": "/ui",
5
5
  "author": "hotent",
6
6
  "private": false,
@@ -683,7 +683,7 @@
683
683
  var obj = {}
684
684
  //条件查询参数(用户输入的) 文本框输入 defaultType 1 用户输入 2固定值 3参数传入 5脚本
685
685
  if (ele.defaultType == '1') {
686
- obj[ele.field] = ''
686
+ obj[ele.field] = ele.regularValue || ''
687
687
  queryParams.push(obj)
688
688
  // queryParams[ele.field] = "";
689
689
  this_.conditionBind.push(ele)
@@ -1122,6 +1122,11 @@
1122
1122
  let flag = false
1123
1123
  if (this.queryParams.length != 0 && this.queryParams[0] != '') {
1124
1124
  this.conditionBind.forEach((item, index) => {
1125
+ if (item.isRequire == 1 && !this.queryParams[index][item.field]) {
1126
+ this.$message.error(`${item.comment}必填`)
1127
+ flag = true
1128
+ return
1129
+ }
1125
1130
  // 日期范围特殊处理
1126
1131
  if (item.dbType == 'date' && item.condition == 'BETWEEN') {
1127
1132
  if (
@@ -2,6 +2,11 @@
2
2
  <div class="frame-container">
3
3
  <div class="frame-container__body">
4
4
  <loading v-if="loading" />
5
+ <img
6
+ v-else-if="contentType.indexOf('image') > -1"
7
+ :src="dataSrc"
8
+ class="frame-viewer__iframe"
9
+ />
5
10
  <iframe
6
11
  v-else
7
12
  id="myNormframe"
@@ -54,6 +59,7 @@
54
59
  return {
55
60
  dataSrc: null,
56
61
  loading: false,
62
+ contentType: '',
57
63
  }
58
64
  },
59
65
  mounted() {
@@ -71,7 +77,7 @@
71
77
  .then((response) => {
72
78
  const { data, headers } = response
73
79
  const type = headers['content-type']
74
-
80
+ this.contentType = type
75
81
  if (type) {
76
82
  if (window.navigator && window.navigator.msSaveBlob) {
77
83
  //使用Blob构造函数可以直接在客户端上创建和操作Blob。msSaveBlob:只提供一个保存按钮
@@ -109,12 +115,12 @@
109
115
  return
110
116
  }
111
117
  if (iframe.attachEvent) {
112
- iframe.attachEvent('onload', function () {
118
+ iframe.attachEvent('onload', function() {
113
119
  that.setFrameBody(this.contentWindow.document)
114
120
  that.watermarkRender()
115
121
  })
116
122
  } else {
117
- iframe.onload = function () {
123
+ iframe.onload = function() {
118
124
  that.setFrameBody(this.contentWindow.document)
119
125
  that.watermarkRender()
120
126
  }
@@ -18,6 +18,7 @@
18
18
  @search="handleSearch"
19
19
  @reset="handleReset"
20
20
  @page-change="handlePageChange"
21
+ @size-change="handleSizeChange"
21
22
  @contact-group-change="loadContactUser"
22
23
  @load-org-user="loadOrgUser"
23
24
  @load-policy-user="loadPolicyUser"
@@ -165,6 +166,10 @@
165
166
  }
166
167
  }
167
168
  },
169
+ handleSizeChange(size) {
170
+ this.pagination.pageSize = size
171
+ this.handleLoad(this.pagination.page)
172
+ },
168
173
  // 处理过滤类型变化的事件
169
174
  handleFilterTypeChange(type) {
170
175
  this.filterType = type
@@ -10,21 +10,27 @@
10
10
  top="3vh"
11
11
  >
12
12
  <div class="dialog-selector__body">
13
- <el-input
14
- v-model="searchWord"
15
- size="small"
16
- clearable
17
- :placeholder="searchPlaceholder"
18
- @clear="reset"
19
- @keyup.enter.native="search"
20
- >
21
- <i
22
- slot="prefix"
23
- :title="t('ht.common.search')"
24
- class="el-input__icon el-icon-search"
25
- @click="search"
26
- />
27
- </el-input>
13
+ <div class="search-main">
14
+ <el-input
15
+ v-model="searchWord"
16
+ size="small"
17
+ clearable
18
+ :placeholder="searchPlaceholder"
19
+ @clear="reset"
20
+ @keyup.enter.native="search"
21
+ >
22
+ <i
23
+ slot="prefix"
24
+ :title="t('ht.common.search')"
25
+ class="el-input__icon el-icon-search"
26
+ @click="search"
27
+ />
28
+ </el-input>
29
+ <div class="right">
30
+ <el-button type="primary" size="mini" @click="search">搜索</el-button>
31
+ <el-button size="mini" @click="reset">重置</el-button>
32
+ </div>
33
+ </div>
28
34
  <ht-list-selector
29
35
  ref="selector"
30
36
  v-model="selectors"
@@ -290,6 +296,13 @@
290
296
  }
291
297
  }
292
298
  .dialog-selector__body {
299
+ .search-main {
300
+ display: flex;
301
+ .right {
302
+ display: flex;
303
+ margin-left: 15px;
304
+ }
305
+ }
293
306
  .el-icon-search {
294
307
  cursor: pointer;
295
308
  }
@@ -12,6 +12,7 @@ export default {
12
12
  fileList: [],
13
13
  tableData: { selectRows: [], querys: '' },
14
14
  dialogExportVisible: false,
15
+ isdefaultQuery: true,
15
16
  exportData: { getType: 'all', expField: [] },
16
17
  exportSellection: [],
17
18
  searchForm: {},
@@ -82,6 +83,11 @@ export default {
82
83
  handler(newVal) {
83
84
  if (newVal.shows) {
84
85
  let displayField = utils.parseToJson(newVal.shows)
86
+ let buttonsts = utils.parseToJson(newVal.buttons);
87
+ console.log(buttonsts)
88
+ if(buttonsts[0].isdefault == "1"){
89
+ this.isdefaultQuery = false
90
+ }
85
91
  for (var i = 0; i < displayField.length; i++) {
86
92
  if (displayField[i].hidden == 0) {
87
93
  this.displayFields.push(displayField[i])
@@ -553,7 +559,14 @@ export default {
553
559
  },
554
560
  //点击导出按钮
555
561
  exports() {
556
- this.dialogExportVisible = true
562
+ if(this.isdefaultQuery){
563
+ this.dialogExportVisible = true
564
+ }else{
565
+ this.exportData.expField= JSON.parse(JSON.stringify(this.displayFields))
566
+ console.log(this.exportData)
567
+ this.submitExport()
568
+ }
569
+
557
570
  },
558
571
  punchOrder() {
559
572
  this.$store