🎉 1.1.2.RELEASE

saber
ssc 5 years ago
parent db0bd88b77
commit 6de6dcdfa9
  1. 12
      public/cdn/wf-design/index.umd.min.js
  2. 3
      src/views/plugin/workflow/design/form-history.vue
  3. 2
      src/views/plugin/workflow/design/model-history.vue
  4. 73
      src/views/plugin/workflow/mixins/ex-form.js
  5. 12
      src/views/plugin/workflow/process/claim.vue
  6. 12
      src/views/plugin/workflow/process/components/examForm.vue
  7. 55
      src/views/plugin/workflow/process/components/form.vue
  8. 12
      src/views/plugin/workflow/process/copy.vue
  9. 12
      src/views/plugin/workflow/process/done.vue
  10. 12
      src/views/plugin/workflow/process/my-done.vue
  11. 12
      src/views/plugin/workflow/process/send.vue
  12. 12
      src/views/plugin/workflow/process/todo.vue

File diff suppressed because one or more lines are too long

@ -42,6 +42,7 @@
size="50%" size="50%"
append-to-body> append-to-body>
<avue-form v-if="viewVisible" <avue-form v-if="viewVisible"
style="height: 100%; overflow: auto;"
ref="viewForm" ref="viewForm"
v-model="viewForm" v-model="viewForm"
:option="viewOption"> :option="viewOption">
@ -205,9 +206,11 @@ export default {
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;

@ -203,9 +203,11 @@ export default {
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;

@ -30,11 +30,11 @@ export default {
methods: { methods: {
// 动态路由跳转 // 动态路由跳转
dynamicRoute(row, type) { dynamicRoute(row, type) {
const { id, taskId, processInstanceId, formKey, formUrl } = row const { id, taskId, processInstanceId, processId, formKey, formUrl } = row
let param = Buffer.from(JSON.stringify({ let param = Buffer.from(JSON.stringify({
processId: id, processId: id,
taskId, taskId,
processInsId: processInstanceId processInsId: processInstanceId || processId
})).toString('base64') })).toString('base64')
if (formKey && formKey.startsWith('wf_ex_')) { if (formKey && formKey.startsWith('wf_ex_')) {
@ -59,7 +59,7 @@ export default {
}, },
// 根据可读可写,过滤avue column // 根据可读可写,过滤avue column
filterAvueColumn(column, taskForm, props = { label: 'label', prop: 'prop' }) { filterAvueColumn(column, taskForm, props = { label: 'label', prop: 'prop' }) {
if (!column || column.length == 0) return { column } if (!column || column.length == 0) return { column, vars: [] }
const values = [] const values = []
const vars = [] const vars = []
@ -97,6 +97,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getFormByProcessId({ processId }).then(res => { getFormByProcessId({ processId }).then(res => {
const { process } = res.data.data const { process } = res.data.data
process.hideComment = true
this.process = process this.process = process
this.tag.label = '发起流程 - ' + process.name this.tag.label = '发起流程 - ' + process.name
resolve(res.data.data) resolve(res.data.data)
@ -110,6 +111,10 @@ export default {
* @param form {"processId": "流程定义id", ...表单自定义字段变量} * @param form {"processId": "流程定义id", ...表单自定义字段变量}
*/ */
handleStartProcess(form) { handleStartProcess(form) {
if (this.$refs.examineForm && this.$refs.examineForm.examineForm) {
const { copyUser, assignee } = this.$refs.examineForm.examineForm
form = { ...form, copyUser, assignee }
}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
startProcess(form).then(() => { startProcess(form).then(() => {
resolve() resolve()
@ -130,18 +135,9 @@ export default {
const { process, form, flow, button } = res.data.data const { process, form, flow, button } = res.data.data
const { xml } = process const { xml } = process
const flows = []
flow.forEach(f => {
const ff = {
id: f.historyActivityId
}
if (f.historyActivityType == 'sequenceFlow') ff.class = "lineWarn"
else ff.class = "nodeWarn"
flows.push(ff)
})
const bpmnOption = { const bpmnOption = {
mode: 'view', xml, flows mode: 'view', xml,
flows: this.handleResolveFlows(flow)
} }
this.process = process this.process = process
this.flow = flow this.flow = flow
@ -260,6 +256,55 @@ export default {
handleCloseTag(path) { handleCloseTag(path) {
this.$store.commit('DEL_TAG', this.tag) this.$store.commit('DEL_TAG', this.tag)
if (path) this.$router.push(path) if (path) this.$router.push(path)
},
handleResolveFlows(flow) {
const flows = []
flow.forEach(f => {
const { assigneeName, createTime, comments } = f
const ff = {
id: f.historyActivityId,
}
let tooltip = ''
if (assigneeName) {
tooltip = `${assigneeName}<br><span title='${createTime}'>${createTime}</span><br>`
if (comments && comments.length > 0) {
let comment
let { type, fullMessage } = comments[0]
if (type == 'transferComment') {
comment = '转办:' + fullMessage
ff.class = 'nodeWarn'
}
if (type == 'delegateComment') {
comment = '委托:' + fullMessage
ff.class = 'nodeWarn'
}
if (type == 'rollbackComment') {
comment = '驳回:' + fullMessage
ff.class = 'nodeError'
}
if (type == 'terminateComment') {
comment = '终止:' + fullMessage
ff.class = 'nodeError'
}
if (type == 'comment') {
comment = '审批:' + fullMessage
ff.class = 'nodeSuccess'
}
tooltip += `<span title='${comment}'>${comment}</span>`
}
ff.tooltip = tooltip
}
if (f.historyActivityType == 'sequenceFlow') ff.class = 'lineWarn'
else {
if (!ff.class) ff.class = 'nodeSuccess'
}
const index = flows.findIndex(fl => fl.id == f.historyActivityId)
if (index != -1) flows.splice(index, 1, ff)
else flows.push(ff)
})
return flows
} }
} }
} }

@ -159,20 +159,10 @@ export default {
detail({ taskId, processInsId: processInstanceId }).then(res => { detail({ taskId, processInsId: processInstanceId }).then(res => {
const { process, flow } = res.data.data const { process, flow } = res.data.data
const flows = []
flow.forEach(f => {
const ff = {
id: f.historyActivityId
}
if (f.historyActivityType == 'sequenceFlow') ff.class = "lineWarn"
else ff.class = "nodeWarn"
flows.push(ff)
})
this.bpmnOption = { this.bpmnOption = {
mode: 'view', mode: 'view',
xml: process.xml, xml: process.xml,
flows flows: this.handleResolveFlows(flow)
} }
this.bpmnVisible = true this.bpmnVisible = true

@ -19,6 +19,9 @@ export default {
process: { process: {
handler(val) { handler(val) {
if (!val) return if (!val) return
if (val.hideComment) {
this.findObject(this.examineOption.column, 'comment').display = false
}
if (val.hideCopy) { if (val.hideCopy) {
this.findObject(this.examineOption.column, '$copyUser').display = false this.findObject(this.examineOption.column, '$copyUser').display = false
} }
@ -44,7 +47,8 @@ export default {
change: (val) => { change: (val) => {
this.$emit('update:comment', val) this.$emit('update:comment', val)
} }
} },
display: true
}, { }, {
label: '抄送人', label: '抄送人',
prop: '$copyUser', prop: '$copyUser',
@ -56,7 +60,8 @@ export default {
click: () => { click: () => {
this.$emit('user-select', { type: 'copy', checkType: 'checkbox' }) this.$emit('user-select', { type: 'copy', checkType: 'checkbox' })
} }
} },
display: true
}, { }, {
label: '指定审批人', label: '指定审批人',
prop: '$assignee', prop: '$assignee',
@ -68,7 +73,8 @@ export default {
click: () => { click: () => {
this.$emit('user-select', { type: 'assignee', checkType: 'radio' }) this.$emit('user-select', { type: 'assignee', checkType: 'radio' })
} }
} },
display: true
}] }]
}, },
} }

@ -7,15 +7,44 @@
v-model="form" v-model="form"
ref="form" ref="form"
:option="option" :option="option"
@submit="handleSubmit"> @submit="handleSubmit"
@error="loading = false">
</avue-form> </avue-form>
<el-card shadow="never"
style="margin-top: 20px">
<wf-examine-form ref="examineForm"
:process="process"
@user-select="handleUserSelect"></wf-examine-form>
</el-card>
<div style="height: 120px;"></div>
<el-row class="foot-item avue-affix"
:style="{width: isCollapse? 'calc(100% - 80px)': 'calc(100% - 260px)' }"
id="avue-view">
<el-button type="primary"
size="medium"
v-loading="loading"
@click="() => {
loading = true;
$refs.form.submit()
}">发起</el-button>
</el-row>
<!-- 人员选择弹窗 -->
<wf-user-select ref="user-select"
:check-type="checkType"
@onConfirm="handleUserSelectConfirm"></wf-user-select>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import WfExamineForm from './examForm.vue'
import WfUserSelect from './user-select'
import exForm from '../../mixins/ex-form' import exForm from '../../mixins/ex-form'
export default { export default {
components: {
WfUserSelect, WfExamineForm
},
mixins: [exForm], mixins: [exForm],
watch: { watch: {
'$route.params.params': { '$route.params.params': {
@ -33,17 +62,17 @@ export default {
return { return {
form: {}, form: {},
option: {}, option: {},
process: {} process: {},
loading: false
} }
}, },
methods: { methods: {
getForm(processId) { getForm(processId) {
this.getStartForm(processId).then(res => { this.getStartForm(processId).then(res => {
let { process, form, startForm } = res let { process, form, startForm } = res
this.process = process
this.form.processId = process.id this.form.processId = process.id
if (form) { if (form) {
const option = eval('(' + form + ')') const option = { ...eval('(' + form + ')'), menuBtn: false }
const { column, group } = option const { column, group } = option
const groupArr = [] const groupArr = []
@ -74,5 +103,21 @@ export default {
} }
</script> </script>
<style> <style lang="scss" scoped>
.foot-item {
position: fixed;
bottom: 0;
margin-left: -20px;
// right: 0;
z-index: 101;
height: 66px;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
-webkit-transition: 0.3s;
transition: 0.3s;
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
</style> </style>

@ -124,20 +124,10 @@ export default {
detail({ taskId, processInsId: processId }).then(res => { detail({ taskId, processInsId: processId }).then(res => {
const { process, flow } = res.data.data const { process, flow } = res.data.data
const flows = []
flow.forEach(f => {
const ff = {
id: f.historyActivityId
}
if (f.historyActivityType == 'sequenceFlow') ff.class = "lineWarn"
else ff.class = "nodeWarn"
flows.push(ff)
})
this.bpmnOption = { this.bpmnOption = {
mode: 'view', mode: 'view',
xml: process.xml, xml: process.xml,
flows flows: this.handleResolveFlows(flow)
} }
this.bpmnVisible = true this.bpmnVisible = true

@ -158,20 +158,10 @@ export default {
detail({ taskId, processInsId: processInstanceId }).then(res => { detail({ taskId, processInsId: processInstanceId }).then(res => {
const { process, flow } = res.data.data const { process, flow } = res.data.data
const flows = []
flow.forEach(f => {
const ff = {
id: f.historyActivityId
}
if (f.historyActivityType == 'sequenceFlow') ff.class = "lineWarn"
else ff.class = "nodeWarn"
flows.push(ff)
})
this.bpmnOption = { this.bpmnOption = {
mode: 'view', mode: 'view',
xml: process.xml, xml: process.xml,
flows flows: this.handleResolveFlows(flow)
} }
this.bpmnVisible = true this.bpmnVisible = true

@ -145,20 +145,10 @@ export default {
detail({ taskId, processInsId: processInstanceId }).then(res => { detail({ taskId, processInsId: processInstanceId }).then(res => {
const { process, flow } = res.data.data const { process, flow } = res.data.data
const flows = []
flow.forEach(f => {
const ff = {
id: f.historyActivityId
}
if (f.historyActivityType == 'sequenceFlow') ff.class = "lineWarn"
else ff.class = "nodeWarn"
flows.push(ff)
})
this.bpmnOption = { this.bpmnOption = {
mode: 'view', mode: 'view',
xml: process.xml, xml: process.xml,
flows flows: this.handleResolveFlows(flow)
} }
this.bpmnVisible = true this.bpmnVisible = true

@ -168,20 +168,10 @@ export default {
detail({ taskId, processInsId: processInstanceId }).then(res => { detail({ taskId, processInsId: processInstanceId }).then(res => {
const { process, flow } = res.data.data const { process, flow } = res.data.data
const flows = []
flow.forEach(f => {
const ff = {
id: f.historyActivityId
}
if (f.historyActivityType == 'sequenceFlow') ff.class = "lineWarn"
else ff.class = "nodeWarn"
flows.push(ff)
})
this.bpmnOption = { this.bpmnOption = {
mode: 'view', mode: 'view',
xml: process.xml, xml: process.xml,
flows flows: this.handleResolveFlows(flow)
} }
this.bpmnVisible = true this.bpmnVisible = true

@ -157,20 +157,10 @@ export default {
detail({ taskId, processInsId: processInstanceId }).then(res => { detail({ taskId, processInsId: processInstanceId }).then(res => {
const { process, flow } = res.data.data const { process, flow } = res.data.data
const flows = []
flow.forEach(f => {
const ff = {
id: f.historyActivityId
}
if (f.historyActivityType == 'sequenceFlow') ff.class = "lineWarn"
else ff.class = "nodeWarn"
flows.push(ff)
})
this.bpmnOption = { this.bpmnOption = {
mode: 'view', mode: 'view',
xml: process.xml, xml: process.xml,
flows flows: this.handleResolveFlows(flow)
} }
this.bpmnVisible = true this.bpmnVisible = true

Loading…
Cancel
Save