审批流保存数据检验
This commit is contained in:
1 parent
7e094cd83e
commit
9bec3c6de0
8 files changed
+233
-94
No files matched your search
@@ -1,78 +1,80 @@
|
||||
<template id="workflow-basic-info">
|
||||
<div class="workflow-basic-info-container">
|
||||
<v-row>
|
||||
<v-col cols="12" sm="12" md="12" xl="12">
|
||||
<span class="jh-input-label">流程名<span class="red--text text--accent-2 ml-1">*必填</span></span>
|
||||
<v-text-field
|
||||
class="jh-v-input mr-2" dense filled single-line color="success"
|
||||
v-model="workflowInfo['workflowName']" :rules="validationRules.requireRules">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="12" xl="12">
|
||||
<span class="jh-input-label">模板图标</span>
|
||||
<v-menu
|
||||
:nudge-right="40"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
max-width="75%"
|
||||
max-height="60%"
|
||||
class="block"
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-form ref="basicInfoForm" lazy-validation>
|
||||
<v-row>
|
||||
<v-col cols="12" sm="12" md="12" xl="12">
|
||||
<span class="jh-input-label">流程名<span class="red--text text--accent-2 ml-1">*必填</span></span>
|
||||
<v-text-field
|
||||
class="jh-v-input"
|
||||
dense
|
||||
single-line
|
||||
filled
|
||||
v-model="workflowInfo['taskTemplateIcon']"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
class="jh-v-input mr-2" dense filled single-line color="success"
|
||||
v-model="workflowInfo['workflowName']" :rules="validationRules.requireRules">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="12" xl="12">
|
||||
<span class="jh-input-label">模板图标</span>
|
||||
<v-menu
|
||||
:nudge-right="40"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
max-width="75%"
|
||||
max-height="60%"
|
||||
class="block"
|
||||
>
|
||||
<template #prepend-inner>
|
||||
<template v-if="workflowInfo.taskTemplateIcon">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-text-field
|
||||
class="jh-v-input"
|
||||
dense
|
||||
single-line
|
||||
filled
|
||||
v-model="workflowInfo['taskTemplateIcon']"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<template #prepend-inner>
|
||||
<template v-if="workflowInfo.taskTemplateIcon">
|
||||
<v-img
|
||||
max-height="30"
|
||||
max-width="30"
|
||||
:src="`/<$ ctx.app.config.appId $>/public${workflowInfo.taskTemplateIcon}`"
|
||||
></v-img>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</v-text-field>
|
||||
</template>
|
||||
<v-card>
|
||||
<div class="d-flex flex-wrap">
|
||||
<div
|
||||
v-for="icon in materialDesignIcons"
|
||||
:class="`item-icon pa-1 ${workflowInfo.taskTemplateIcon == icon && 'grey lighten-2'}`"
|
||||
@click="workflowInfo.taskTemplateIcon = icon"
|
||||
>
|
||||
<v-img
|
||||
max-height="30"
|
||||
max-width="30"
|
||||
:src="`/<$ ctx.app.config.appId $>/public${workflowInfo.taskTemplateIcon}`"
|
||||
:src="`/<$ ctx.app.config.appId $>/public${icon}`"
|
||||
></v-img>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</v-text-field>
|
||||
</template>
|
||||
<v-card>
|
||||
<div class="d-flex flex-wrap">
|
||||
<div
|
||||
v-for="icon in materialDesignIcons"
|
||||
:class="`item-icon pa-1 ${workflowInfo.taskTemplateIcon == icon && 'green'}`"
|
||||
@click="workflowInfo.taskTemplateIcon = icon"
|
||||
>
|
||||
<v-img
|
||||
max-height="30"
|
||||
max-width="30"
|
||||
:src="`/<$ ctx.app.config.appId $>/public${icon}`"
|
||||
></v-img>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</v-card>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</v-card>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="12" md="12" xl="12" class="pb-1">
|
||||
<span class="jh-input-label">模板分组(支持输入自定义分组)</span>
|
||||
<v-combobox v-model="workflowInfo['taskTemplateGroup']" :items="constantObj.taskTemplateGroup" class="jh-v-input" dense
|
||||
filled small hide-actions hide-controls hide-details>
|
||||
</v-combobox>
|
||||
</v-col>
|
||||
<!-- <v-col cols="12" sm="12" md="12" xl="12">
|
||||
<span class="jh-input-label">备注</span>
|
||||
<v-text-field
|
||||
class="jh-v-input mr-2" dense filled single-line color="success"
|
||||
v-model="workflowInfo['workflowRemark']">
|
||||
</v-text-field>
|
||||
</v-col> -->
|
||||
</v-row>
|
||||
<v-col cols="12" sm="12" md="12" xl="12" class="pb-1">
|
||||
<span class="jh-input-label">模板分组(支持输入自定义分组)</span>
|
||||
<v-combobox v-model="workflowInfo['taskTemplateGroup']" :items="constantObj.taskTemplateGroup" class="jh-v-input" dense
|
||||
filled small hide-actions hide-controls hide-details>
|
||||
</v-combobox>
|
||||
</v-col>
|
||||
<!-- <v-col cols="12" sm="12" md="12" xl="12">
|
||||
<span class="jh-input-label">备注</span>
|
||||
<v-text-field
|
||||
class="jh-v-input mr-2" dense filled single-line color="success"
|
||||
v-model="workflowInfo['workflowRemark']">
|
||||
</v-text-field>
|
||||
</v-col> -->
|
||||
</v-row>
|
||||
</v-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -111,13 +113,20 @@ Vue.component("workflow-basic-info", {
|
||||
methods: {
|
||||
async doUiAction(uiActionId, uiActionData) {
|
||||
switch (uiActionId) {
|
||||
case 'dataValidate':
|
||||
await this.dataValidate();
|
||||
break;
|
||||
default:
|
||||
console.error("[doUiAction] uiActionId not find", {uiActionId});
|
||||
break;
|
||||
}
|
||||
},
|
||||
setIcon(icon){
|
||||
this.$set(this.workflowInfo, 'taskTemplateIcon', icon)
|
||||
async dataValidate(){
|
||||
if (await this.$refs.basicInfoForm.validate()) {
|
||||
return true;
|
||||
}
|
||||
await window.vtoast.fail("请完善基础信息!");
|
||||
throw new Error("请完善基础信息!")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user