askbot-dragon 0.8.17 → 0.8.18

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": "askbot-dragon",
3
- "version": "0.8.17",
3
+ "version": "0.8.18",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -1698,7 +1698,7 @@ export default {
1698
1698
  },
1699
1699
  "value":"",
1700
1700
  "display":true,
1701
- "required":false,
1701
+ "required":true,
1702
1702
  "editable":null
1703
1703
  },
1704
1704
  {
@@ -1484,18 +1484,19 @@ export default {
1484
1484
  (this.formShow.form.formFieldRelation[i].required || this.isRequiredFn(this.formShow.form.formFieldRelation[i].formField)) &&
1485
1485
  this.formShow.form.formFieldRelation[i].fieldId!=='workorder_name'&&
1486
1486
  this.formShow.form.formFieldRelation[i].formField.type !== 'EXPLANATION') {
1487
- console.debug('formFieldRelation',this.formShow.form.formFieldRelation[i].value)
1488
1487
  let value = "";
1489
- let bool = false
1488
+ let bool = {}
1489
+ bool[this.formShow.form.formFieldRelation[i].fieldId] = false
1490
1490
  if (this.formShow.form.formFieldRelation[i].formField.type === 'INPUT' || this.formShow.form.formFieldRelation[i].formField.type === 'TEXTAREA'){
1491
- value = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.indexOf('\n')!==-1?this.formShow.form.formFieldRelation[i].value:'';
1491
+ value = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n')?this.formShow.form.formFieldRelation[i].value:'';
1492
1492
  let strVal = '';
1493
1493
  if(value){
1494
1494
  strVal = value.replace(/\n/g,'');
1495
1495
  }
1496
- bool = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.indexOf('\n')!==-1 && !strVal
1496
+ bool[this.formShow.form.formFieldRelation[i].fieldId] = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n') && !strVal
1497
1497
  }
1498
- if(!this.formShow.form.formFieldRelation[i].value || bool || (this.formShow.form.formFieldRelation[i].value && !this.formShow.form.formFieldRelation[i].value.length)) {
1498
+ console.debug('formFieldRelation',this.formShow.form.formFieldRelation[i].value,bool[this.formShow.form.formFieldRelation[i]],this.formShow.form.formFieldRelation[i].value && !this.formShow.form.formFieldRelation[i].value.length)
1499
+ if(!this.formShow.form.formFieldRelation[i].value || bool[this.formShow.form.formFieldRelation[i].fieldId] || (this.formShow.form.formFieldRelation[i].value && !this.formShow.form.formFieldRelation[i].value.length)) {
1499
1500
  this.$message.error('请完善'+ this.formShow.form.formFieldRelation[i].formField.name)
1500
1501
  return
1501
1502
  }