🎉 1.2.6.RELEASE

saber
ssc 4 years ago
parent 3b1f6c8257
commit 5f7de64686
  1. 6
      public/cdn/avue-form-design/index.umd.min.js
  2. 138
      public/cdn/wf-design/index.umd.min.js
  3. 2
      src/config/website.js
  4. 44
      src/views/plugin/workflow/components/wf-user-select/index.vue
  5. 19
      src/views/plugin/workflow/design/button.vue
  6. 2
      src/views/plugin/workflow/design/form.vue
  7. 25
      src/views/plugin/workflow/design/index.vue
  8. 58
      src/views/plugin/workflow/mixins/custom-fields.js
  9. 8
      src/views/plugin/workflow/mixins/ex-form.js
  10. 3
      src/views/plugin/workflow/ops/index.vue
  11. 2
      src/views/plugin/workflow/process/components/flow.vue

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -11,7 +11,7 @@ export default {
tenantMode: true, // 是否开启租户模式 tenantMode: true, // 是否开启租户模式
tenantId: "000000", // 管理组租户编号 tenantId: "000000", // 管理组租户编号
captchaMode: true, // 是否开启验证码模式 captchaMode: true, // 是否开启验证码模式
switchMode: true, // 是否开启部门切换模式 switchMode: false, // 是否开启部门切换模式
lockPage: '/lock', lockPage: '/lock',
tokenTime: 3000, tokenTime: 3000,
tokenHeader: 'Blade-Auth', tokenHeader: 'Blade-Auth',

@ -5,7 +5,8 @@
suffix-icon="el-icon-user" suffix-icon="el-icon-user"
placeholder="人员选择" placeholder="人员选择"
readonly readonly
@click.native="visible = true"></el-input> :disabled="disabled"
@click.native="handleSelect"></el-input>
<el-dialog ref="wf-dialog" <el-dialog ref="wf-dialog"
custom-class="wf-dialog" custom-class="wf-dialog"
:visible.sync="visible" :visible.sync="visible"
@ -49,7 +50,7 @@ export default {
name: 'user-select', name: 'user-select',
props: { props: {
value: [String, Number], value: [String, Number],
checkType: { checkType: { // radio checkbox
type: String, type: String,
default: () => { default: () => {
return 'radio' return 'radio'
@ -60,6 +61,14 @@ export default {
default: () => { default: () => {
return 'small' return 'small'
} }
},
readonly: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
} }
}, },
watch: { watch: {
@ -157,9 +166,15 @@ export default {
} }
}, },
mounted() { mounted() {
this.onLoad(this.page) this.onLoad(this.page).then(() => {
this.changeDefaultChecked()
})
}, },
methods: { methods: {
handleSelect() {
if (this.readonly || this.disabled) return
else this.visible = true
},
handleConfirm() { handleConfirm() {
if (this.selectionList.length === 0) { if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据") this.$message.warning("请选择至少一条数据")
@ -229,16 +244,19 @@ export default {
}, 1000); }, 1000);
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; return new Promise((resolve) => {
const param = { this.loading = true;
current: page.currentPage, const param = {
size: page.pageSize, current: page.currentPage,
...Object.assign(params, this.query) size: page.pageSize,
} ...Object.assign(params, this.query)
this.$axios.get('/api/blade-user/search/user', { params: param }).then(res => { }
this.page.total = res.data.data.total this.$axios.get('/api/blade-user/search/user', { params: param }).then(res => {
this.data = res.data.data.records this.page.total = res.data.data.total
this.loading = false this.data = res.data.data.records
this.loading = false
resolve()
})
}) })
}, },
} }

@ -80,6 +80,25 @@ export default {
}], }],
search: true search: true
}, },
{
label: "默认是否显示",
prop: "display",
type: 'select',
labelWidth: 100,
value: true,
dicData: [{
label: '是',
value: true
}, {
label: '否',
value: false
}],
rules: [{
required: true,
message: "请选择是否默认展示",
trigger: "change"
}],
},
{ {
label: "排序", label: "排序",
prop: "sort", prop: "sort",

@ -46,7 +46,7 @@
style="height: 88vh" style="height: 88vh"
ref="formDesign" ref="formDesign"
:toolbar="['clear', 'preview', 'import', 'generate']" :toolbar="['clear', 'preview', 'import', 'generate']"
:includeFields="['group', 'dynamic', 'input', 'textarea', 'number', 'map', 'radio','checkbox','select','tree','cascader', 'upload', 'date','time','datetime','daterange','datetimerange','timerange','ueditor','switch','rate','color','icon','slider']" :includeFields="['group', 'dynamic', 'input', 'textarea', 'number', 'map', 'radio','checkbox','select','tree','cascader', 'date','time','datetime','daterange','datetimerange','timerange','switch','rate','color','icon','slider']"
:customFields="customFields" :customFields="customFields"
:default-values="defaultValues" :default-values="defaultValues"
:options="options"> :options="options">

@ -1,5 +1,5 @@
<template> <template>
<basic-container> <basic-container class="wf-design">
<el-steps :active="step" <el-steps :active="step"
finish-status="success" finish-status="success"
simple simple
@ -33,8 +33,8 @@
</template> </template>
<template #form> <template #form>
<avue-form ref="form2" <avue-form ref="form2"
v-model="step1.form" v-model="form"
:option="step1.option1"></avue-form> :option="option"></avue-form>
</template> </template>
</avue-form> </avue-form>
</div> </div>
@ -133,6 +133,8 @@ export default {
data() { data() {
const _this = this const _this = this
return { return {
form: {},
option: {},
step: 0, step: 0,
step1: { step1: {
form: {}, form: {},
@ -194,10 +196,10 @@ export default {
}, },
event: { event: {
change: (val) => { change: (val) => {
this.step1.option1 = {} this.option = {}
if (val) { if (val) {
getFormByKey({ formKey: val }).then(res => { getFormByKey({ formKey: val }).then(res => {
_this.step1.option1 = { ...eval('(' + res.data.data.content + ')'), menuBtn: false, readonly: true } _this.option = { ...eval('(' + res.data.data.content.replace(/this/g, '_this') + ')'), menuBtn: false, readonly: true }
_this.step1.option.group[1].display = true _this.step1.option.group[1].display = true
setTimeout(() => { setTimeout(() => {
_this.$refs.form2.clearValidate() _this.$refs.form2.clearValidate()
@ -261,7 +263,6 @@ export default {
}] }]
}] }]
}, },
option1: {}
}, },
step2: { step2: {
option: { option: {
@ -298,7 +299,7 @@ export default {
const { formType, formKey, exFormKey, column } = this.step1.form const { formType, formKey, exFormKey, column } = this.step1.form
if (formType == 1) { // if (formType == 1) { //
this.process.formKey = formKey this.process.formKey = formKey
this.$set(this.step2.option, 'form', this.step1.option1) this.$set(this.step2.option, 'form', this.option)
} else { // } else { //
this.process.formKey = "wf_ex_" + exFormKey this.process.formKey = "wf_ex_" + exFormKey
this.$set(this.step2.option, 'exForm', { this.$set(this.step2.option, 'exForm', {
@ -371,7 +372,7 @@ export default {
return { return {
label: l.name, label: l.name,
prop: l.buttonKey, prop: l.buttonKey,
display: true display: l.display
} }
}) })
this.$set(this.step2.option, 'button', list) this.$set(this.step2.option, 'button', list)
@ -427,7 +428,13 @@ export default {
} }
} }
</script> </script>
<style lang="scss">
.wf-design {
.avue-group__title {
margin-top: 8px;
}
}
</style>
<style scoped lang="scss"> <style scoped lang="scss">
.foot-item { .foot-item {
position: fixed; position: fixed;

@ -5,12 +5,64 @@ export default {
title: '业务字段', title: '业务字段',
list: [{ list: [{
label: '人员选择', label: '人员选择',
prop: 'user',
component: 'wf-user-select', component: 'wf-user-select',
span: 12, span: 24,
params: { params: {
checkType: 'checkbox' checkType: 'checkbox'
} },
icon: 'icon-oa',
display: true
}]
}, {
title: '通用配置字段',
list: [{
label: '上传',
type: 'upload',
propsHttp: {
res: 'data',
url: 'link',
name: 'originalName'
},
action: '/api/blade-resource/oss/endpoint/put-file',
display: true,
span: 24,
canvasOption: {},
icon: 'icon-upload',
showFileList: true,
multiple: true,
limit: 10,
headersConfig: [],
dataConfig: []
}, {
type: 'select',
label: '下拉选择器',
icon: 'icon-select',
dicData: [],
dicUrl: '/api/blade-system/dict/dictionary?code=',
props: {
label: "dictValue",
value: "dictKey"
},
dicOption: 'remote',
span: 24,
display: true,
}, {
type: 'ueditor',
component: 'avue-ueditor',
label: '富文本',
icon: 'icon-richtext',
span: 24,
display: true,
options: {
action: '/api/blade-resource/oss/endpoint/put-file',
oss: '',
props: {
res: 'data',
url: 'link',
},
ali: {},
qiniu: {}
},
}] }]
}] }]
} }

@ -295,7 +295,8 @@ export default {
} }
let tooltip = '' let tooltip = ''
if (assigneeName) { if (assigneeName) {
tooltip = `${assigneeName}<br><span title='${createTime}'>${createTime}</span><br>` tooltip = `<span title='${assigneeName}'>${assigneeName}</span><br>`
if (createTime) tooltip += `<span title='${createTime}'>${this.dateFormat(new Date(createTime), 'yyyy-MM-dd hh:mm')}</span><br>`
if (comments && comments.length > 0) { if (comments && comments.length > 0) {
let comment let comment
@ -343,9 +344,8 @@ export default {
} }
if (f.historyActivityType == 'sequenceFlow') ff.class = 'lineWarn' if (f.historyActivityType == 'sequenceFlow') ff.class = 'lineWarn'
else { else if (!ff.class && f.historyActivityType != 'candidate') ff.class = 'nodeSuccess'
if (!ff.class) ff.class = 'nodeSuccess'
}
const index = flows.findIndex(fl => fl.id == f.historyActivityId) const index = flows.findIndex(fl => fl.id == f.historyActivityId)
if (index != -1) flows.splice(index, 1, ff) if (index != -1) flows.splice(index, 1, ff)
else flows.push(ff) else flows.push(ff)

@ -238,7 +238,8 @@ export default {
{ {
label: '审核人', label: '审核人',
prop: 'assignee', prop: 'assignee',
search: true search: true,
overHidden: true
}, },
{ {
label: '申请人', label: '申请人',

@ -2,7 +2,7 @@
<el-row type="flex"> <el-row type="flex">
<el-timeline> <el-timeline>
<template v-for="item in flow"> <template v-for="item in flow">
<el-timeline-item v-if="item.historyActivityType != 'sequenceFlow'" <el-timeline-item v-if="!['candidate', 'sequenceFlow'].includes(item.historyActivityType)"
:key="item.id" :key="item.id"
:timestamp="item.endTime || item.createTime" :timestamp="item.endTime || item.createTime"
placement="top"> placement="top">

Loading…
Cancel
Save