|
|
|
@ -80,36 +80,38 @@
|
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="项目名" align="center" prop="name" /> |
|
|
|
|
<!-- <el-table-column label="项目内容" align="center" prop="content" /> --> |
|
|
|
|
<el-table-column label="区域名" align="center" prop="areas" width="180" > |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{areasConvert(scope.row.areas)}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="面积" align="center" prop="plantArea"/> |
|
|
|
|
<el-table-column label="作物名" align="center" prop="cropId" > |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span> {{cropList.find(t=>t.id == scope.row.cropId ).name}} </span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column label="项目成员" align="center" prop="members"> |
|
|
|
|
<el-table-column label="项目成员" align="center" prop="members"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{membersConvert(scope.row.members)}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
<el-table-column label="图片" align="center" prop="images"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-image |
|
|
|
|
v-if="scope.row.images != null && scope.row.images[0] != null" |
|
|
|
|
:src="scope.row.images[0]" :preview-src-list="scope.row.images"> |
|
|
|
|
</el-image> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="开始时间" align="center" prop="planStartTime" width="180"> |
|
|
|
|
<el-table-column label="育苗日期" align="center" prop="growSeedTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.growSeedTime) }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="种植日期" align="center" prop="plantTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.plantTime) }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="采收开始日期" align="center" prop="planStartTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.planStartTime) }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="结束时间" align="center" prop="planEndTime" width="180"> |
|
|
|
|
<el-table-column label="种植结束日期" align="center" prop="planEndTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.planEndTime) }}</span> |
|
|
|
|
</template> |
|
|
|
@ -139,26 +141,15 @@
|
|
|
|
|
<el-form-item label="项目名" prop="name"> |
|
|
|
|
<el-input v-model="form.name" placeholder="请输入" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="项目内容" prop="content"> |
|
|
|
|
<editor v-model="form.content" :min-height="192"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="区域选择" prop="areas"> |
|
|
|
|
<el-select v-model="form.areas" multiple placeholder="请选择"> |
|
|
|
|
<el-option v-for="item in areasList" :key="item.id" :label="item.name" :value="item.id"> {{item.name}} |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="区域选择" prop="assemAreaList"> |
|
|
|
|
<el-cascader :options="assemAreaList" :props="props" emitPath clearable ref="chooseA" v-model="form.areas"> |
|
|
|
|
</el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="种植面积" prop="plantArea"> |
|
|
|
|
<el-input v-model="form.plantArea" placeholder="请输入" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="作物选择" prop="cropId"> |
|
|
|
|
<el-select v-model="form.cropId" placeholder="请选择"> |
|
|
|
|
<el-select v-model="form.cropId" filterable placeholder="请选择"> |
|
|
|
|
<el-option v-for="item in cropList" :key="item.id" :label="item.name" :value="item.id"> {{item.name}} |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
@ -169,14 +160,17 @@
|
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="项目图片"> |
|
|
|
|
<imageUpload v-model="form.images"/> |
|
|
|
|
<el-form-item label="育苗日期" prop="growSeedTime"> |
|
|
|
|
<el-date-picker clearable v-model="form.growSeedTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="项目开始时间" prop="planStartTime"> |
|
|
|
|
<el-date-picker clearable v-model="form.planStartTime" type="datetime" value-format="timestamp" placeholder="选择" /> |
|
|
|
|
<el-form-item label="种植日期" prop="plantTime"> |
|
|
|
|
<el-date-picker clearable v-model="form.plantTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="项目结束时间" prop="planEndTime"> |
|
|
|
|
<el-date-picker clearable v-model="form.planEndTime" type="datetime" value-format="timestamp" placeholder="选择" /> |
|
|
|
|
<el-form-item label="采收开始日期" prop="planStartTime"> |
|
|
|
|
<el-date-picker clearable v-model="form.planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="种植结束日期" prop="planEndTime"> |
|
|
|
|
<el-date-picker clearable v-model="form.planEndTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="优先级" prop="weight"> |
|
|
|
|
<el-input v-model="form.weight" placeholder="请输入数字(1第一优先,99最后优先)" /> |
|
|
|
@ -188,7 +182,9 @@
|
|
|
|
|
<el-radio :label="2">已完成</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="项目图片"> |
|
|
|
|
<imageUpload v-model="form.images"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
|
|
@ -251,6 +247,12 @@ export default {
|
|
|
|
|
// 表单校验 |
|
|
|
|
rules: { |
|
|
|
|
name: [{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
areas:[{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
cropId:[{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
members:[{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
growSeedTime:[{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
plantTime:[{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
state:[{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
planStartTime: [{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
planEndTime: [{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|
weight: [{ required: true, message: "不能为空", trigger: "blur" }], |
|
|
|
|