|
|
@ -1,22 +1,10 @@ |
|
|
|
<template> |
|
|
|
<div class="d-flex flex-wrap pb-3"> |
|
|
|
<!-- 添加 --> |
|
|
|
<a-modal |
|
|
|
:closable="false" |
|
|
|
:maskClosable="false" |
|
|
|
destroyOnClose |
|
|
|
footer |
|
|
|
title="添加创新挑战" |
|
|
|
v-model="visible" |
|
|
|
width="700px" |
|
|
|
> |
|
|
|
<a-modal :closable="false" :mask-closable="false" destroy-on-close footer title="添加服务" v-model="visible" width="700px"> |
|
|
|
<a-form :form="form" @submit="handleSubmit"> |
|
|
|
<!-- 服务名称 --> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
label="服务名称" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="服务名称"> |
|
|
|
<a-input |
|
|
|
@change="changeIpt($event, 'serviceName')" |
|
|
|
class="ml-3" |
|
|
@ -34,11 +22,7 @@ |
|
|
|
/> |
|
|
|
</a-form-item> |
|
|
|
<!-- 服务简介 --> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
label="服务简介" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="服务简介"> |
|
|
|
<a-textarea |
|
|
|
@change="changeIpt($event, 'intro')" |
|
|
|
class="ml-3" |
|
|
@ -56,11 +40,7 @@ |
|
|
|
/> |
|
|
|
</a-form-item> |
|
|
|
<!-- 服务内容 --> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
label="服务内容" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="服务内容"> |
|
|
|
<a-textarea |
|
|
|
@change="changeIpt($event, 'content')" |
|
|
|
class="ml-3" |
|
|
@ -78,49 +58,19 @@ |
|
|
|
/> |
|
|
|
</a-form-item> |
|
|
|
<!-- 服务排序 --> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
label="服务排序" |
|
|
|
> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="服务排序"> |
|
|
|
<a-input-number class="ml-3" v-model="orders" /> |
|
|
|
</a-form-item> |
|
|
|
<!-- 图片 --> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
label="图片" |
|
|
|
> |
|
|
|
<a-upload |
|
|
|
:action="upload" |
|
|
|
:before-upload="beforeUpload" |
|
|
|
@change="handleChange" |
|
|
|
class="ml-3" |
|
|
|
list-type="picture" |
|
|
|
name="files" |
|
|
|
> |
|
|
|
<a-button v-show="fileList.length - 0 === 0"> |
|
|
|
<a-icon type="upload" />选择图片 |
|
|
|
</a-button> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片"> |
|
|
|
<a-upload :action="upload" :before-upload="beforeUpload" @change="handleChange" class="ml-3" list-type="picture" name="files"> |
|
|
|
<a-button v-show="fileList.length - 0 === 0"> <a-icon type="upload" />选择图片 </a-button> |
|
|
|
</a-upload> |
|
|
|
</a-form-item> |
|
|
|
<!-- 服务状态 --> |
|
|
|
<a-form-item |
|
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
label="服务状态" |
|
|
|
> |
|
|
|
<a-select |
|
|
|
@change="getUse($event, 'recStatus')" |
|
|
|
class="ml-3" |
|
|
|
default-value="正常" |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
|
<a-select-option |
|
|
|
:key="index" |
|
|
|
:value="index" |
|
|
|
v-for="(item, index) in recStatusList" |
|
|
|
>{{ item }}</a-select-option> |
|
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="服务状态"> |
|
|
|
<a-select @change="getUse($event, 'recStatus')" class="ml-3" default-value="正常" style="width: 100%"> |
|
|
|
<a-select-option :key="index" :value="index" v-for="(item, index) in recStatusList">{{ item }}</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item class="d-flex flex-row-reverse"> |
|
|
|