🎉 1.2.4.RELEASE

saber
ssc 4 years ago
parent 29e8a5c5ce
commit fda19f9f12
  1. 14
      public/cdn/wf-design/index.umd.min.js
  2. 41
      src/api/plugin/workflow/draft.js
  3. 2
      src/views/plugin/workflow/design/model-history.vue
  4. 24
      src/views/plugin/workflow/mixins/draft.js
  5. 2
      src/views/plugin/workflow/mixins/ex-form.js
  6. 6
      src/views/plugin/workflow/process/components/examForm.vue
  7. 32
      src/views/plugin/workflow/process/components/form.vue

File diff suppressed because one or more lines are too long

@ -0,0 +1,41 @@
import request from '@/router/axios';
const prefix = '/api/blade-workflow/process/draft'
export const getList = (current, size, params) => {
return request({
url: `${prefix}/list`,
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (params) => {
return request({
url: `${prefix}/detail`,
method: 'get',
params
})
}
export const remove = (ids) => {
return request({
url: `${prefix}/remove`,
method: 'post',
params: {
ids,
}
})
}
export const submit = (row) => {
return request({
url: `${prefix}/submit`,
method: 'post',
data: row
})
}

@ -211,7 +211,7 @@ export default {
},
onLoad(page, params = {}) {
this.loading = true;
params.modelId = this.formId
params.modelId = this.modelId
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;

@ -0,0 +1,24 @@
import { getDetail, submit } from '@/api/plugin/workflow/draft'
export default {
methods: {
initDraft(processDefId) {
return new Promise((resolve) => {
getDetail({ processDefId, platform: 'pc' }).then(res => {
const { data } = res.data
if (data && data.variables && Object.keys(data.variables).length > 0) resolve(data.variables)
})
})
},
handleDraft(processDefId, formKey, variables) {
this.$confirm('保存至草稿箱并关闭?', '提示', {
type: 'warning'
}).then(() => {
submit({ processDefId, formKey, variables: JSON.stringify(variables), platform: 'pc' }).then(() => {
this.handleCloseTag('/plugin/workflow/process/start')
})
}).catch(() => {
})
}
}
}

@ -10,7 +10,7 @@ import { mapGetters } from 'vuex'
export default {
mixins: [defaultValues],
computed: {
...mapGetters(['tag', 'userInfo']),
...mapGetters(['tag', 'userInfo', 'permission']),
},
data() {
return {

@ -28,6 +28,12 @@ export default {
if (val.hideExamine) {
this.findObject(this.examineOption.column, '$assignee').display = false
}
if (val.copyUser) {
this.$set(this.examineForm, 'copyUser', val.copyUser)
}
if (val.copyUserName) {
this.$set(this.examineForm, '$copyUser', val.copyUserName)
}
},
deep: true,
immediate: true

@ -3,6 +3,8 @@
<avue-title style="margin-bottom: 20px; "
:styles="{fontSize: '20px'}"
:value="process.name"></avue-title>
<el-card shadow="never"
style="margin-top: 20px">
<avue-form v-if="option && ((option.column && option.column.length > 0) || (option.group && option.group.length > 0))"
v-model="form"
ref="form"
@ -11,8 +13,11 @@
@error="loading = false"
:upload-preview="handleUploadPreview">
</avue-form>
</el-card>
<el-card shadow="never"
style="margin-top: 20px">
style="margin-top: 20px"
v-if="showExamForm">
<wf-examine-form ref="examineForm"
:process="process"
@user-select="handleUserSelect"></wf-examine-form>
@ -28,6 +33,11 @@
loading = true;
$refs.form.submit()
}">发起</el-button>
<el-button v-if="permission.wf_process_draft"
type="success"
size="medium"
v-loading="loading"
@click="handleDraft(process.id, process.formKey, form)">存为草稿</el-button>
</el-row>
<!-- 人员选择弹窗 -->
@ -42,12 +52,13 @@
import WfExamineForm from './examForm.vue'
import WfUserSelect from './user-select'
import exForm from '../../mixins/ex-form'
import draft from '../../mixins/draft'
export default {
components: {
WfUserSelect, WfExamineForm
},
mixins: [exForm],
mixins: [exForm, draft],
watch: {
'$route.params.params': {
handler(val) {
@ -60,6 +71,12 @@ export default {
immediate: true
}
},
computed: {
showExamForm() {
const { hideComment, hideCopy, hideExamine } = this.process
return !hideComment || !hideCopy || !hideExamine
}
},
data() {
return {
form: {},
@ -91,6 +108,17 @@ export default {
this.option = option
this.tag.label = '发起流程 - ' + process.name
if (this.permission.wf_process_draft) {
// 稿
this.initDraft(process.id).then(data => {
this.$confirm('是否恢复之前保存的草稿?', '提示', {
}).then(() => {
this.form = JSON.parse(data)
}).catch(() => {
})
})
}
}
})
},

Loading…
Cancel
Save