three-trees-ui 1.0.26 → 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.26",
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
  }