fanfan 9 months ago
commit 37880d00da
  1. 10
      src/views/content/maintenance/Index.vue
  2. 6
      src/views/content/maintenance/modules/AddForm.vue
  3. 7
      src/views/content/maintenance/modules/EditForm.vue

@ -41,6 +41,11 @@
<span slot="name" slot-scope="text"> <span slot="name" slot-scope="text">
<p class="twoline-hide">{{ text }}</p> <p class="twoline-hide">{{ text }}</p>
</span> </span>
<span slot="img_url" slot-scope="text">
<a v-if="text" title="点击查看原图" :href="text" target="_blank">
<img height="50" :src="text" alt="分类图片" />
</a>
</span>
<!-- 所属分类 --> <!-- 所属分类 -->
<span slot="category" slot-scope="text">{{ text.name }}</span> <span slot="category" slot-scope="text">{{ text.name }}</span>
<!-- 状态 --> <!-- 状态 -->
@ -71,6 +76,11 @@ const columns = [
title: 'ID', title: 'ID',
dataIndex: 'id' dataIndex: 'id'
}, },
{
title: '维修图片',
dataIndex: 'img_url',
scopedSlots: { customRender: 'img_url' }
},
{ {
title: '维修名称', title: '维修名称',
dataIndex: 'name' dataIndex: 'name'

@ -27,9 +27,9 @@
>{{ item.name }}</a-select-option> >{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="维修链接" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="维修图片" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input <SelectImage
v-decorator="['url', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" v-decorator="['img_id', { rules: [{ required: true, message: '请上传维修图片' }] }]"
/> />
</a-form-item> </a-form-item>
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="数字越小越靠前"> <a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="数字越小越靠前">

@ -27,9 +27,10 @@
>{{ item.name }}</a-select-option> >{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="维修链接" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="维修图片" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input <SelectImage
v-decorator="['url', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" :defaultList="record.img ? [record.img] : []"
v-decorator="['img_id', { rules: [{ required: true, message: '请上传维修图片' }] }]"
/> />
</a-form-item> </a-form-item>
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="数字越小越靠前"> <a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="数字越小越靠前">

Loading…
Cancel
Save