🎉 1.2.1.RELEASE

saber
ssc 4 years ago
parent bffb44a725
commit 3ab4f88b97
  1. 4
      public/cdn/avue-form-design/index.umd.min.js
  2. 2
      src/views/plugin/workflow/design/model.vue
  3. 16
      src/views/plugin/workflow/mixins/ex-form.js

File diff suppressed because one or more lines are too long

@ -39,7 +39,7 @@
size="mini"
icon="el-icon-time"
@click="handleHistory(row)">历史</el-button>
<el-button v-if="permission.wf_design_model_history"
<el-button v-if="permission.wf_design_model_scope"
type="text"
size="mini"
icon="el-icon-time"

@ -60,6 +60,8 @@ export default {
},
// 根据可读可写,过滤avue column
filterAvueColumn(column, taskForm, props = { label: 'label', prop: 'prop' }) {
const _this = this
if (!column || column.length == 0) return { column, vars: [] }
const values = []
@ -69,7 +71,7 @@ export default {
if (c && c.readable) {
if (c.writable) { // 可写,记录需要提交的字段、处理字段默认值
vars.push(col[props.prop])
if (col.value) col.value = this.getDefaultValues(col.value)
if (col.value) col.value = _this.getDefaultValues(col.value)
} else { // 不可写,清除校验与默认值
if (col.type == 'dynamic') {
col.children.addBtn = false
@ -82,13 +84,21 @@ export default {
delete col.value
}
if (col.type == 'dynamic') { // 处理子表单
col.children.column = this.filterAvueColumn(col.children.column, taskForm).column
col.children.column = _this.filterAvueColumn(col.children.column, taskForm).column
}
if (col.rules && col.pattern) {
if (col.rules && col.pattern) { // 处理正则
col.rules.forEach(c => {
if (c.pattern) c.pattern = new RegExp(col.pattern)
})
}
// 处理事件
let event = ['change', 'blur', 'click', 'focus']
event.forEach(e => {
if (col[e]) col[e] = eval((col[e] + '').replace(/this/g, '_this'))
})
if (col.event) Object.keys(col.event).forEach(key => col.event[key] = eval((col.event[key] + '').replace(/this/g, '_this')))
values.push(col)
}
})

Loading…
Cancel
Save