mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 18:11:00 +08:00
优化工作流页面
This commit is contained in:
parent
41935748dc
commit
57ddf865e7
@ -81,7 +81,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveActivitiesInfo()"><i
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveWorkflowSettingInfo()"><i
|
||||
class="fa fa-check"></i> 提交
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
|
||||
@ -16,76 +16,6 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
addWorkflowSettingValidate() {
|
||||
return vc.validate.validate({
|
||||
workflowSettingInfo: vc.component.workflowSettingInfo
|
||||
}, {
|
||||
'workflowSettingInfo.title': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "活动标题不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxin",
|
||||
param: "1,200",
|
||||
errInfo: "活动标题不能超过200位"
|
||||
},
|
||||
],
|
||||
'workflowSettingInfo.typeCd': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "活动类型不能为空"
|
||||
},
|
||||
{
|
||||
limit: "num",
|
||||
param: "",
|
||||
errInfo: "活动类型格式错误"
|
||||
},
|
||||
],
|
||||
'workflowSettingInfo.headerImg': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "头部照片不能为空"
|
||||
}
|
||||
],
|
||||
'workflowSettingInfo.context': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "活动内容不能为空"
|
||||
}
|
||||
],
|
||||
'workflowSettingInfo.startTime': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "开始时间不能为空"
|
||||
},
|
||||
{
|
||||
limit: "dateTime",
|
||||
param: "",
|
||||
errInfo: "开始时间格式错误"
|
||||
},
|
||||
],
|
||||
'workflowSettingInfo.endTime': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "结束时间不能为空"
|
||||
},
|
||||
{
|
||||
limit: "dateTime",
|
||||
param: "",
|
||||
errInfo: "结束时间格式错误"
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
saveWorkflowSettingInfo: function () {
|
||||
if (!vc.component.addWorkflowSettingValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
@ -95,25 +25,20 @@
|
||||
|
||||
vc.component.workflowSettingInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
|
||||
vc.http.post(
|
||||
'workflowSetting',
|
||||
'save',
|
||||
vc.http.apiPost(
|
||||
'workflow.updateWorkflow',
|
||||
JSON.stringify(vc.component.workflowSettingInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if (res.status == 200) {
|
||||
//关闭model
|
||||
|
||||
vc.component.clearworkflowSettingInfo();
|
||||
vc.emit('activitiesManage', 'listWorkflowSetting', {});
|
||||
|
||||
let data = JSON.parse(json);
|
||||
if (data.code == 0) {
|
||||
vc.toast(data.msg);
|
||||
$that.getBack();
|
||||
return;
|
||||
}
|
||||
vc.toast(json);
|
||||
|
||||
vc.toast(data.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
@ -122,18 +47,6 @@
|
||||
|
||||
});
|
||||
},
|
||||
clearworkflowSettingInfo: function () {
|
||||
vc.component.workflowSettingInfo = {
|
||||
activitiesId: '',
|
||||
title: '',
|
||||
typeCd: '',
|
||||
headerImg: '',
|
||||
context: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
|
||||
};
|
||||
},
|
||||
_initWorkflowSettingInfo: function () {
|
||||
let flowId = vc.getParam('flowId');
|
||||
|
||||
@ -142,8 +55,6 @@
|
||||
vc.getBack();
|
||||
return;
|
||||
}
|
||||
|
||||
let _that = $that.workflowSettingInfo;
|
||||
$that.workflowSettingInfo.flowId = flowId;
|
||||
$that.workflowSettingInfo.flowName = vc.getParam('flowName');
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user