askbot-dragon 0.8.22 → 0.8.24

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.22",
3
+ "version": "0.8.24",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -289,8 +289,8 @@
289
289
  </p>
290
290
  <p v-else class="explanation-p">
291
291
  <span class="el-icon-info"></span>
292
- <span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.value}}</a></span>
293
- <span v-else>{{item.value}}</span>
292
+ <span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.formField.description?item.formField.description:item.formField.extInfo.placeholder}}</a></span>
293
+ <span v-else>{{item.formField.description?item.formField.description:item.formField.extInfo.placeholder}}</span>
294
294
  </p>
295
295
  </div>
296
296
  </div>
@@ -920,11 +920,6 @@ export default {
920
920
  item.value = item.formField.defaultValue
921
921
  }
922
922
  }
923
- if (item.formField.type === 'EXPLAIN'){
924
- if (!item.value){
925
- item.value = item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:''
926
- }
927
- }
928
923
  if (!item.relationDisplay){
929
924
  item.value = []
930
925
  this.extInfoFieldValue[item.fieldId] = []
@@ -1632,7 +1627,6 @@ export default {
1632
1627
  }
1633
1628
  bool[this.formShow.form.formFieldRelation[i].fieldId] = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n') && !strVal
1634
1629
  }
1635
- console.debug('formFieldRelation',this.formShow.form.formFieldRelation[i].value,bool[this.formShow.form.formFieldRelation[i]],Array.isArray(this.formShow.form.formFieldRelation[i].value) && !this.formShow.form.formFieldRelation[i].value.length)
1636
1630
  if(!this.formShow.form.formFieldRelation[i].value || bool[this.formShow.form.formFieldRelation[i].fieldId] || (Array.isArray(this.formShow.form.formFieldRelation[i].value) && !this.formShow.form.formFieldRelation[i].value.length)) {
1637
1631
  this.$message.error('请完善'+ this.formShow.form.formFieldRelation[i].formField.name)
1638
1632
  return
@@ -1642,9 +1636,15 @@ export default {
1642
1636
  let extInfo = {
1643
1637
  extInfoFieldValue:this.extInfoFieldValue
1644
1638
  }
1645
- this.$set(this.formShow,'extInfo',extInfo)
1646
- console.debug('form',this.formShow)
1647
- this.$emit('submitClick',this.formShow)
1639
+ this.$set(this.formShow,'extInfo',extInfo)
1640
+ let newForm = JSON.parse(JSON.stringify(this.formShow));
1641
+ for (let i=0;i<newForm.form.formFieldRelation.length;i++){
1642
+ if (newForm.form.formFieldRelation[i].fieldId === 'workorder_description'){
1643
+ newForm.form.formFieldRelation[i].value = newForm.form.formFieldRelation[i].value.replace(/<img/g, "<img onclick='previewImage(this)' ")
1644
+ }
1645
+ }
1646
+ console.debug('formShow',this.formShow.form,newForm.form)
1647
+ this.$emit('submitClick',newForm)
1648
1648
  this.disableds = true
1649
1649
  this.submitValue = '已提交'
1650
1650
  },