申请审核

This commit is contained in:
Wenchao Gong 2021-09-09 23:29:34 +08:00
parent 3ca291d665
commit ec36b7a5c4
11 changed files with 241 additions and 174 deletions

View File

@ -8,6 +8,9 @@ public class IscConstants {
/** 审核通过 */ /** 审核通过 */
public static final String AUDIT_PASS = "1"; public static final String AUDIT_PASS = "1";
/** 审核驳回 */
public static final String AUDIT_REJECT = "2";
/** 待审核 */ /** 待审核 */
public static final String ONLINE_STATUS_ON = "1"; public static final String ONLINE_STATUS_ON = "1";

View File

@ -10,6 +10,7 @@ import com.ruoyi.common.core.validate.QueryGroup;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo; import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo;
import com.ruoyi.isc.domain.bo.IscAuditBo;
import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo; import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo;
import com.ruoyi.isc.service.IIscAppServiceApplyService; import com.ruoyi.isc.service.IIscAppServiceApplyService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -79,8 +80,8 @@ public class IscAppServiceApplyController extends BaseController {
@PreAuthorize("@ss.hasPermi('isc:serviceapply:audit')") @PreAuthorize("@ss.hasPermi('isc:serviceapply:audit')")
@Log(title = "应用服务申请信息审核", businessType = BusinessType.AUDIT) @Log(title = "应用服务申请信息审核", businessType = BusinessType.AUDIT)
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping("/audit")
public AjaxResult<Void> audit(@Validated(EditGroup.class) @RequestBody IscAppServiceApplyBo bo) { public AjaxResult<Void> audit(@Validated @RequestBody IscAuditBo bo) {
return toAjax(iIscAppServiceApplyService.updateByBo(bo) ? 1 : 0); return toAjax(iIscAppServiceApplyService.audit(bo) ? 1 : 0);
} }
} }

View File

@ -79,12 +79,6 @@ public class IscAppServiceApplyBo extends BaseEntity {
@ApiModelProperty(value = "秒配额") @ApiModelProperty(value = "秒配额")
private Long quotaSeconds; private Long quotaSeconds;
/**
* 删除标志0代表存在 2代表删除
*/
@ApiModelProperty(value = "删除标志0代表存在 2代表删除")
private String delFlag;
/** /**
* 分页大小 * 分页大小

View File

@ -0,0 +1,50 @@
package com.ruoyi.isc.domain.bo;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* 服务管控审核
*
* @author Wenchao Gong
* @date 2021-09-09
*/
@Data
@ApiModel("服务管控审核业务对象")
public class IscAuditBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID集合
*/
@ApiModelProperty(value = "ID集合")
@NotEmpty(message = "请选择记录")
private List<Long> ids;
/**
* 审核状态0待审核 1审核通过 2驳回
*/
@ApiModelProperty(value = "审核状态0待审核 1审核通过 2驳回")
@NotBlank(message = "请填写审核结果")
private String status;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String remark;
}

View File

@ -4,6 +4,7 @@ import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.isc.domain.IscAppServiceApply; import com.ruoyi.isc.domain.IscAppServiceApply;
import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo; import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo;
import com.ruoyi.isc.domain.bo.IscAuditBo;
import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo; import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo;
import java.util.Collection; import java.util.Collection;
@ -53,4 +54,11 @@ public interface IIscAppServiceApplyService extends IServicePlus<IscAppServiceAp
* @return * @return
*/ */
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
/**
* 应用服务审核
* @param bo 审核业务数据
* @return 是否审核成功
*/
Boolean audit(IscAuditBo bo);
} }

View File

@ -2,16 +2,20 @@ package com.ruoyi.isc.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Assert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.constant.IscConstants;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.ruoyi.common.core.page.PagePlus; import com.ruoyi.common.core.page.PagePlus;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.PageUtils; import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.isc.domain.IscAppService; import com.ruoyi.isc.domain.IscAppService;
import com.ruoyi.isc.domain.IscAppServiceApply; import com.ruoyi.isc.domain.IscAppServiceApply;
import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo; import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo;
import com.ruoyi.isc.domain.bo.IscAuditBo;
import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo; import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo;
import com.ruoyi.isc.mapper.IscAppServiceApplyMapper; import com.ruoyi.isc.mapper.IscAppServiceApplyMapper;
import com.ruoyi.isc.service.IIscAppServiceApplyService; import com.ruoyi.isc.service.IIscAppServiceApplyService;
@ -43,7 +47,9 @@ public class IscAppServiceApplyServiceImpl extends ServicePlusImpl<IscAppService
@Override @Override
public IscAppServiceApplyVo queryById(Long applyId){ public IscAppServiceApplyVo queryById(Long applyId){
return getVoById(applyId); IscAppServiceApplyVo vo = getVoById(applyId);
genServiceNameAndApplicationName(Arrays.asList(vo));
return vo;
} }
@Override @Override
@ -128,4 +134,31 @@ public class IscAppServiceApplyServiceImpl extends ServicePlusImpl<IscAppService
} }
return removeByIds(ids); return removeByIds(ids);
} }
@Override
public Boolean audit(IscAuditBo bo)
{
switch (bo.getStatus()) {
case IscConstants.AUDIT_PASS:
break;
case IscConstants.AUDIT_REJECT:
Assert.notBlank(bo.getRemark(), () -> new ServiceException("审核意见不能为空"));
break;
default:
throw new ServiceException("审核状态异常");
}
boolean result = true;
for (Long id : bo.getIds())
{
IscAppServiceApply apply = getOne(Wrappers.<IscAppServiceApply>lambdaQuery()
.eq(IscAppServiceApply::getApplyId, id)
.eq(IscAppServiceApply::getStatus, IscConstants.AUDIT_WAIT), false);
if(Objects.isNull(apply)) {
continue;
}
result = updateById(new IscAppServiceApply().setApplyId(id).setStatus(bo.getStatus())
.setAuditMind(bo.getRemark()));
}
return result;
}
} }

View File

@ -17,28 +17,11 @@ export function getServiceapply(applyId) {
}) })
} }
// 新增应用服务申请信息 // 应用服务申请信息审核
export function addServiceapply(data) { export function auditServiceapply(data) {
return request({ return request({
url: '/isc/serviceapply', url: '/isc/serviceapply/audit',
method: 'post',
data: data
})
}
// 修改应用服务申请信息
export function updateServiceapply(data) {
return request({
url: '/isc/serviceapply',
method: 'put', method: 'put',
data: data data: data
}) })
} }
// 删除应用服务申请信息
export function delServiceapply(applyId) {
return request({
url: '/isc/serviceapply/' + applyId,
method: 'delete'
})
}

View File

@ -186,8 +186,8 @@
<el-option key="3" label="3(月)" value="3"/> <el-option key="3" label="3(月)" value="3"/>
<el-option key="6" label="6(月)" value="6"/> <el-option key="6" label="6(月)" value="6"/>
<el-option key="9" label="9(月)" value="9"/> <el-option key="9" label="9(月)" value="9"/>
<el-option key="12" label="1(年)" value="12"/> <el-option key="12" label="12(月)" value="12"/>
<el-option key="24" label="2(年)" value="24"/> <el-option key="24" label="24(月)" value="24"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="日配额" prop="quotaDays" v-if="this.applyType === 0 || this.applyType === 2"> <el-form-item label="日配额" prop="quotaDays" v-if="this.applyType === 0 || this.applyType === 2">

View File

@ -48,7 +48,11 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
> >
<el-table-column label="分类名称" align="center" prop="cateName" width="160"/> <el-table-column label="分类名称" align="center" prop="cateName" width="160"/>
<el-table-column label="启用状态" align="center" prop="enabled" :formatter="enabledFormat" /> <el-table-column label="启用状态" align="center" prop="enabled" >
<template slot-scope="scope">
<dict-tag :options="enabledOptions" :value="scope.row.enabled"/>
</template>
</el-table-column>
<el-table-column label="显示顺序" align="center" prop="orderNum" /> <el-table-column label="显示顺序" align="center" prop="orderNum" />
<el-table-column label="更新者" align="center" prop="updateBy" /> <el-table-column label="更新者" align="center" prop="updateBy" />
<el-table-column label="更新时间" align="center" prop="updateTime" width="180"> <el-table-column label="更新时间" align="center" prop="updateTime" width="180">
@ -205,10 +209,6 @@ export default {
this.cateOptions.push(data); this.cateOptions.push(data);
}); });
}, },
//
enabledFormat(row, column) {
return this.selectDictLabel(this.enabledOptions, row.enabled);
},
// //
cancel() { cancel() {
this.open = false; this.open = false;

View File

@ -101,9 +101,21 @@
<el-table-column label="服务ID" align="center" prop="serviceId" width="100"/> <el-table-column label="服务ID" align="center" prop="serviceId" width="100"/>
<el-table-column label="服务名称" align="left" prop="serviceName" /> <el-table-column label="服务名称" align="left" prop="serviceName" />
<el-table-column label="服务分类" align="left" prop="cateName" width="150"/> <el-table-column label="服务分类" align="left" prop="cateName" width="150"/>
<el-table-column label="服务状态" align="center" prop="enabled" :formatter="enabledFormat" width="100"/> <el-table-column label="服务状态" align="center" prop="enabled" width="100">
<el-table-column label="是否在线" align="center" prop="onlineStatus" :formatter="onlineStatusFormat" width="100"/> <template slot-scope="scope">
<el-table-column label="审核状态" align="center" prop="status" :formatter="statusFormat" width="100"/> <dict-tag :options="enabledOptions" :value="scope.row.enabled"/>
</template>
</el-table-column>
<el-table-column label="是否在线" align="center" prop="onlineStatus" width="100">
<template slot-scope="scope">
<dict-tag :options="onlineStatusOptions" :value="scope.row.onlineStatus"/>
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" prop="status" width="100">
<template slot-scope="scope">
<dict-tag :options="statusOptions" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" width="150"/> <el-table-column label="更新人" align="center" prop="updateBy" width="150"/>
<el-table-column label="更新时间" align="center" prop="updateTime" width="150"> <el-table-column label="更新时间" align="center" prop="updateTime" width="150">
<template slot-scope="scope"> <template slot-scope="scope">

View File

@ -32,33 +32,13 @@
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="el-icon-view"
size="mini"
@click="handleAdd"
v-hasPermi="['isc:serviceapply:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['isc:serviceapply:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleAudit"
v-hasPermi="['isc:serviceapply:remove']" v-hasPermi="['isc:serviceapply:audit']"
>删除</el-button> >批量审核</el-button>
</el-col>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -75,7 +55,7 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="serviceapplyList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="serviceapplyList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
<el-table-column label="申请ID" align="center" prop="applyId" v-if="false"/> <el-table-column label="申请ID" align="center" prop="applyId" v-if="false"/>
<el-table-column label="应用名称" align="left" prop="applicationName" /> <el-table-column label="应用名称" align="left" prop="applicationName" />
<el-table-column label="服务名称" align="left" prop="serviceName" /> <el-table-column label="服务名称" align="left" prop="serviceName" />
@ -105,17 +85,19 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-view"
@click="handleUpdate(scope.row)" @click="handleAuditSingle(scope.row)"
v-hasPermi="['isc:serviceapply:edit']" v-if="scope.row.status == 0"
>修改</el-button> v-hasPermi="['isc:serviceapply:audit']"
>审核</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-info"
@click="handleDelete(scope.row)" @click="handleAuditSingle(scope.row)"
v-hasPermi="['isc:serviceapply:remove']" v-if="scope.row.status > 0"
>删除</el-button> v-hasPermi="['isc:serviceapply:query']"
>查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -130,56 +112,68 @@
<!-- 添加或修改应用服务申请信息对话框 --> <!-- 添加或修改应用服务申请信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-card shadow="never" v-if="!single" style="margin-bottom: 20px">
<el-form-item label="应用服务ID" prop="appServiceId"> <el-row :gutter="20">
<el-input v-model="form.appServiceId" placeholder="请输入应用服务ID" /> <el-col :span="6" class="col-title">应用名称</el-col>
</el-form-item> <el-col :span="18" class="col-content">{{this.form.applicationName}}</el-col>
<el-form-item label="续期时长" prop="renewalDuration"> </el-row>
<el-input v-model="form.renewalDuration" placeholder="请输入续期时长" /> <el-row :gutter="20">
</el-form-item> <el-col :span="6" class="col-title">服务名称</el-col>
<el-form-item label="天配额" prop="quotaDays"> <el-col :span="18" class="col-content">{{this.form.serviceName}}</el-col>
<el-input v-model="form.quotaDays" placeholder="请输入天配额" /> </el-row>
</el-form-item> <el-row :gutter="20">
<el-form-item label="小时配额" prop="quotaHours"> <el-col :span="6" class="col-title">申请类型</el-col>
<el-input v-model="form.quotaHours" placeholder="请输入小时配额" /> <el-col :span="18" class="col-content">
</el-form-item> <dict-tag :options="applyTypeOptions" :value="this.form.applyType"/>
<el-form-item label="分钟配额" prop="quotaMinutes"> </el-col>
<el-input v-model="form.quotaMinutes" placeholder="请输入分钟配额" /> </el-row>
</el-form-item> <el-row :gutter="20">
<el-form-item label="秒配额" prop="quotaSeconds"> <el-col :span="6" class="col-title">审核状态</el-col>
<el-input v-model="form.quotaSeconds" placeholder="请输入秒配额" /> <el-col :span="18" class="col-content">
</el-form-item> <dict-tag :options="statusOptions" :value="this.form.status"/>
<el-form-item label="创建者" prop="createBy"> </el-col>
<el-input v-model="form.createBy" placeholder="请输入创建者" /> </el-row>
</el-form-item> <el-row :gutter="20">
<el-form-item label="创建时间" prop="createTime"> <el-col :span="6" class="col-title">续期时长()</el-col>
<el-date-picker clearable size="small" <el-col :span="18" class="col-content">{{this.form.renewalDuration}}</el-col>
v-model="form.createTime" </el-row>
type="datetime" <el-row :gutter="20">
value-format="yyyy-MM-dd HH:mm:ss" <el-col :span="6" class="col-title">每日配额</el-col>
placeholder="选择创建时间"> <el-col :span="18" class="col-content">{{this.form.quotaDays}}</el-col>
</el-date-picker> </el-row>
</el-form-item> <el-row :gutter="20">
<el-form-item label="更新者" prop="updateBy"> <el-col :span="6" class="col-title">小时配额</el-col>
<el-input v-model="form.updateBy" placeholder="请输入更新者" /> <el-col :span="18" class="col-content">{{this.form.quotaHours}}</el-col>
</el-form-item> </el-row>
<el-form-item label="更新时间" prop="updateTime"> <el-row :gutter="20">
<el-date-picker clearable size="small" <el-col :span="6" class="col-title">分钟配额</el-col>
v-model="form.updateTime" <el-col :span="18" class="col-content">{{this.form.quotaMinutes}}</el-col>
type="datetime" </el-row>
value-format="yyyy-MM-dd HH:mm:ss" <el-row :gutter="20">
placeholder="选择更新时间"> <el-col :span="6" class="col-title">每秒配额</el-col>
</el-date-picker> <el-col :span="18" class="col-content">{{this.form.quotaSeconds}}</el-col>
</el-form-item> </el-row>
<el-form-item label="删除标志" prop="delFlag"> <el-row :gutter="20">
<el-input v-model="form.delFlag" placeholder="请输入删除标志" /> <el-col :span="6" class="col-title">提交人</el-col>
</el-form-item> <el-col :span="18" class="col-content">{{this.form.updateBy}}</el-col>
<el-form-item label="备注" prop="remark"> </el-row>
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-row :gutter="20">
<el-col :span="6" class="col-title">提交时间</el-col>
<el-col :span="18" class="col-content">{{this.form.updateTime}}</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6" class="col-title">备注</el-col>
<el-col :span="18" class="col-content">{{this.form.remark}}</el-col>
</el-row>
</el-card>
<el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="80px">
<el-form-item label="审核意见" prop="remark">
<el-input v-model="auditForm.remark" type="textarea" :disabled='this.form.status > 0' placeholder="请输入审核意见"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="success" @click="submitForm(1)" icon="el-icon-check" v-if="this.form.status == 0"> </el-button>
<el-button :loading="buttonLoading" type="warning" @click="submitForm(2)" icon="el-icon-close" v-if="this.form.status == 0"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -187,7 +181,7 @@
</template> </template>
<script> <script>
import { listServiceapply, getServiceapply, delServiceapply, addServiceapply, updateServiceapply } from "@/api/isc/serviceapply"; import { listServiceapply, getServiceapply, auditServiceapply } from "@/api/isc/serviceapply";
export default { export default {
name: "Serviceapply", name: "Serviceapply",
@ -228,10 +222,12 @@ export default {
}, },
// //
form: {}, form: {},
//
auditForm: {},
// //
rules: { rules: {
appServiceId: [ remark: [
{ required: true, message: "应用服务ID不能为空", trigger: "blur" } { max: 200, message: '最大长度为200个字符', trigger: 'blur' }
], ],
} }
}; };
@ -260,24 +256,14 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
selectable(row, index) {
return row.status == 0;
},
// //
reset() { reset() {
this.form = { this.form = {
applyId: undefined, applyId: undefined,
appServiceId: undefined,
applyType: undefined,
status: "0", status: "0",
auditMind: undefined,
renewalDuration: undefined,
quotaDays: undefined,
quotaHours: undefined,
quotaMinutes: undefined,
quotaSeconds: undefined,
createBy: undefined,
createTime: undefined,
updateBy: undefined,
updateTime: undefined,
delFlag: undefined,
remark: undefined remark: undefined
}; };
this.resetForm("form"); this.resetForm("form");
@ -298,67 +284,52 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 审核按钮操作 */
handleAdd() { handleAudit(row) {
this.reset(); if(this.single) {
this.open = true; this.open = true;
this.title = "添加应用服务申请信息"; this.title = "服务申请审核";
this.auditForm.ids = this.ids;
return;
}
this.handleAuditSingle(row);
}, },
/** 修改按钮操作 */ handleAuditSingle(row) {
handleUpdate(row) { this.single = false;
this.loading = true; this.loading = true;
this.reset(); this.reset();
const applyId = row.applyId || this.ids const applyId = row.applyId || this.ids
console.log(applyId)
getServiceapply(applyId).then(response => { getServiceapply(applyId).then(response => {
this.loading = false; this.loading = false;
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改应用服务申请信息"; this.title = "服务申请审核";
this.auditForm.ids = [applyId]
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm(status) {
this.$refs["form"].validate(valid => { this.auditForm.status = status;
this.$refs["auditForm"].validate(valid => {
if (valid) { if (valid) {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.applyId != null) { console.log(this.auditForm)
updateServiceapply(this.form).then(response => { if (this.auditForm.ids.length > 0) {
this.msgSuccess("修改成功"); auditServiceapply(this.auditForm).then(response => {
this.msgSuccess("审核成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => { }).finally(() => {
this.buttonLoading = false; this.buttonLoading = false;
}); });
} else { } else {
addServiceapply(this.form).then(response => { this.msgError("请选择记录");
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false; this.buttonLoading = false;
});
} }
} }
}); });
}, },
/** 删除按钮操作 */
handleDelete(row) {
const applyIds = row.applyId || this.ids;
this.$confirm('是否确认删除应用服务申请信息编号为"' + applyIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true;
return delServiceapply(applyIds);
}).then(() => {
this.loading = false;
this.getList();
this.msgSuccess("删除成功");
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.downLoadExcel('/isc/serviceapply/export', this.queryParams); this.downLoadExcel('/isc/serviceapply/export', this.queryParams);
@ -366,3 +337,15 @@ export default {
} }
}; };
</script> </script>
<style lang="scss" scoped>
.el-card .el-row {
font-size: 14px;
line-height: 36px;
vertical-align: middle;
}
.el-card .el-row .col-title {
text-align: right;
color: #606266;
font-weight: bold;
}
</style>