eoss-ui 0.7.12 → 0.7.14

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": "eoss-ui",
3
- "version": "0.7.12",
3
+ "version": "0.7.14",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -1,25 +1,23 @@
1
1
  <template>
2
2
  <div class="commonOpinion">
3
- <el-form
4
- :model="form"
5
- :rules="required?rules:{}"
6
- ref="ruleForm"
7
- label-width="0"
8
- >
3
+ <el-form :model="form" :rules="rules" ref="ruleForm" label-width="0">
9
4
  <el-form-item label="" prop="value">
10
- <el-tooltip :disabled="tooltipDisabled || !pendingItemHandleDescription" placement="top">
11
- <div slot="content">{{ pendingItemHandleDescription }}</div>
12
- <el-input
13
- v-model="form.value"
14
- :disabled="isBanInputOpinion == '1' || disabled"
15
- type="textarea"
16
- clear="inp"
17
- :placeholder="pendingItemHandleDescription || '请输入意见'"
18
- @change="changeOpinion"
19
- @blur="handleBlur"
20
- @focus="handleFocus"
21
- :rows="rows"
22
- ></el-input>
5
+ <el-tooltip
6
+ :disabled="tooltipDisabled || !pendingItemHandleDescription"
7
+ placement="top"
8
+ >
9
+ <div slot="content">{{ pendingItemHandleDescription }}</div>
10
+ <el-input
11
+ v-model="form.value"
12
+ :disabled="isBanInputOpinion == '1' || disabled"
13
+ type="textarea"
14
+ clear="inp"
15
+ :placeholder="pendingItemHandleDescription || '请输入意见'"
16
+ @change="changeOpinion"
17
+ @blur="handleBlur"
18
+ @focus="handleFocus"
19
+ :rows="rows"
20
+ ></el-input>
23
21
  </el-tooltip>
24
22
  </el-form-item>
25
23
  </el-form>
@@ -117,13 +115,10 @@ export default {
117
115
  data() {
118
116
  return {
119
117
  value: '',
120
- tooltipDisabled:false,
118
+ tooltipDisabled: false,
121
119
  form: {
122
120
  value: ''
123
121
  },
124
- rules: {
125
- value: [{ required: true, message: '请输入意见', trigger: 'blur' }]
126
- },
127
122
  input3: '',
128
123
  selectValue: '',
129
124
  optionList: [],
@@ -144,7 +139,7 @@ export default {
144
139
  type: String,
145
140
  default: ''
146
141
  },
147
- pendingItemHandleDescription:{
142
+ pendingItemHandleDescription: {
148
143
  type: String,
149
144
  default: ''
150
145
  },
@@ -153,10 +148,23 @@ export default {
153
148
  default: () => []
154
149
  },
155
150
  rows: {
156
- type: [Number,String],
151
+ type: [Number, String],
157
152
  default: 10
158
153
  },
159
- required:{type:Boolean,default:false}
154
+ required: { type: Boolean, default: false }
155
+ },
156
+ computed: {
157
+ rules() {
158
+ return {
159
+ value: [
160
+ {
161
+ required: this.required,
162
+ message: '请输入意见',
163
+ trigger: 'blur'
164
+ }
165
+ ]
166
+ };
167
+ }
160
168
  },
161
169
  mounted() {
162
170
  if (this.nodeFixedOpinionSelectList.length > 0) {
@@ -173,24 +181,24 @@ export default {
173
181
  }
174
182
  },
175
183
  methods: {
176
- handleBlur(){
177
- this.$emit('blur', this.form.value)
178
- this.tooltipDisabled = false
184
+ handleBlur() {
185
+ this.$emit('blur', this.form.value);
186
+ this.tooltipDisabled = false;
179
187
  },
180
- handleFocus(){
181
- this.$emit('focus', this.form.value)
182
- this.tooltipDisabled = true
188
+ handleFocus() {
189
+ this.$emit('focus', this.form.value);
190
+ this.tooltipDisabled = true;
183
191
  },
184
- validate(){
185
- let validSate = true
192
+ validate() {
193
+ let validSate = true;
186
194
  this.$refs.ruleForm.validate((valid) => {
187
- if (valid) {
188
- validSate = true
189
- } else {
190
- validSate = false;
191
- }
192
- });
193
- return validSate
195
+ if (valid) {
196
+ validSate = true;
197
+ } else {
198
+ validSate = false;
199
+ }
200
+ });
201
+ return validSate;
194
202
  },
195
203
  /**
196
204
  * changeOpinion
@@ -38,6 +38,7 @@
38
38
  </div>
39
39
  </div>
40
40
  <CommonOpinions
41
+ v-if="showOpinion"
41
42
  class="es-common-opinions"
42
43
  v-show="!shrink"
43
44
  ref="commonOpinions"
@@ -127,6 +128,7 @@
127
128
  v-else-if="typeCode == 'freeCirculation'"
128
129
  :appId="resetAppId"
129
130
  :params="param"
131
+ :showOther="showOther"
130
132
  :formLabelPosition="formLabelPosition"
131
133
  :simpleTips="simpleTips"
132
134
  />
@@ -183,6 +185,7 @@
183
185
  @change="(val) => (value = val)"
184
186
  :opinion="value"
185
187
  :rows="rows"
188
+ v-if="showOpinion"
186
189
  :pendingItemHandleDescription="pendingItemHandleDescription"
187
190
  :placeholder="pendingItemHandleDescription"
188
191
  :required="isOpinionRequired == 1"
@@ -1245,6 +1248,10 @@ export default {
1245
1248
  type: [String, Number],
1246
1249
  default: 10
1247
1250
  },
1251
+ showOther:{
1252
+ type: Boolean,
1253
+ default: true
1254
+ },
1248
1255
  isEndMessage: { type: Boolean, default: false }
1249
1256
  },
1250
1257
  data() {
@@ -1254,6 +1261,7 @@ export default {
1254
1261
  endMessage: '',
1255
1262
  isHideTemporarySave: false,
1256
1263
  oldNextOperate: '',
1264
+ showOpinion:true,
1257
1265
  taskOperationShiftedNodeList: null,
1258
1266
  currentNodeEnableItemHandleDescription: false,
1259
1267
  startFlowPageEmbeddedIntoStartFlowIndex: false,
@@ -1522,7 +1530,8 @@ export default {
1522
1530
  }
1523
1531
  }
1524
1532
  if (this.nodeInfo.nextNode) {
1525
- this.handleChange(this.nodeInfo.nextNode);
1533
+
1534
+ this.handleChange(this.nodeInfo.nextNode,true);
1526
1535
  }
1527
1536
  }
1528
1537
  },
@@ -1659,6 +1668,10 @@ export default {
1659
1668
  // }
1660
1669
  this.optionsKey++;
1661
1670
  this.isOpinionRequired = res.data.nodeExtAttr.isOpinionRequired == 1;
1671
+ this.showOpinion = false
1672
+ setTimeout(() => {
1673
+ this.showOpinion = true
1674
+ }, 0);
1662
1675
  }
1663
1676
  });
1664
1677
  },
@@ -1702,8 +1715,8 @@ export default {
1702
1715
  this.flowSuccess(true);
1703
1716
  // this.$emit('success');
1704
1717
  },
1705
- handleChange(val) {
1706
- this.getNodeInfoForStartFlow(val);
1718
+ handleChange(val,isForStartFlow) {
1719
+ this.getNodeInfoForStartFlow(val,isForStartFlow);
1707
1720
  this.$parent.$emit('flowChange', val);
1708
1721
  },
1709
1722
  getsubProcessColumns() {
@@ -2978,7 +2991,7 @@ export default {
2978
2991
  this.circularReadParamsMap.circularReadOrgRoleCode;
2979
2992
  }
2980
2993
  this.currentOrgName = currentOrgName;
2981
- this.nextOperateCheckType = nextOperateCheckType;
2994
+ this.nextOperateCheckType = nextOperateCheckType || 'select';
2982
2995
  this.currentNodeIsCircularReadNode =
2983
2996
  nodeInfoMap.nodeExtAttr.currentNodeIsCircularReadNode == 1;
2984
2997
 
@@ -3299,7 +3312,7 @@ export default {
3299
3312
  }
3300
3313
  }
3301
3314
  if (this.nodeInfo.nextNode) {
3302
- this.handleChange(this.nodeInfo.nextNode);
3315
+ this.handleChange(this.nodeInfo.nextNode,true);
3303
3316
  }
3304
3317
  if (
3305
3318
  this.showCirculate != undefined &&
@@ -3537,6 +3550,7 @@ export default {
3537
3550
  this.$refs['nextNode'].validate(async (valid) => {
3538
3551
  if (valid) {
3539
3552
  if (this.isFlow) {
3553
+ if(this.isOpinionRequired && !this.$refs.commonOpinions.validate()) return
3540
3554
  if (this.directCreateCircularReadWhenFlowStarted) {
3541
3555
  this.circulateVisible = true;
3542
3556
  } else {
package/src/index.js CHANGED
@@ -125,7 +125,7 @@ if (typeof window !== 'undefined' && window.Vue) {
125
125
  }
126
126
 
127
127
  export default {
128
- version: '0.7.12',
128
+ version: '0.7.14',
129
129
  install,
130
130
  Button,
131
131
  ButtonGroup,