|
|
|
@ -105,18 +105,12 @@
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{scope.row.projectName}}</span> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="负责人" align="center" prop="mainPerson"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{scope.row.mainPersonName}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column label="执行人" align="center" prop="executorPerson" width="80" > |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{executorPersonConvert(scope.row.executorNameList)}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
<el-table-column label="区域" align="center" prop="areas" width="180" > |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{areaConvert(scope.row.areaNameList)}}</span> |
|
|
|
@ -127,7 +121,6 @@
|
|
|
|
|
<span> {{scope.row.cropName}} </span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column label="作物数量" align="center" prop="cropNum" /> --> |
|
|
|
|
<el-table-column label="任务名" align="center" prop="taskCateId"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span> {{scope.row.taskName}} </span> |
|
|
|
@ -143,24 +136,6 @@
|
|
|
|
|
<span>{{resouceConvert(scope.row.taskResourceList)}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
<!-- <el-table-column label="工时" align="center" prop="workingHours" /> |
|
|
|
|
<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" style="" :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"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.planStartTime) }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column label="截止时间" align="center" prop="planEndTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.planEndTime) }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
<el-table-column label="优先级" align="center" prop="weight" /> |
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -197,7 +172,6 @@
|
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="负责人" prop="mainPerson"> |
|
|
|
|
<el-select v-model="form.mainPerson" filterable placeholder="请先选择项目"> |
|
|
|
|
<el-option v-for="item in selectCpUserList" :key="item.id" :label="item.name" :value="item.id"> |
|
|
|
@ -205,21 +179,10 @@
|
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="执行人" prop="executorPerson"> |
|
|
|
|
<el-select v-model="form.executorPerson" filterable multiple placeholder="请先选择项目"> |
|
|
|
|
<el-option v-for="item in selectCpUserList" :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" placeholder="请先选择项目"> |
|
|
|
|
</el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="作物数量" prop="cropNum"> |
|
|
|
|
<el-input v-model="form.cropNum" placeholder="请输入" /> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
<el-form-item label="任务类型" prop="taskCateId"> |
|
|
|
|
<el-select v-model="form.taskCateId" placeholder="请选择" @change="changeCateOne"> |
|
|
|
|
<el-option v-for="item in cateOneList" :key="item.id" :label="item.name" :value="item.id"> |
|
|
|
@ -236,15 +199,11 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
<el-button type="primary" @click="addResource">添加资源</el-button> |
|
|
|
|
<el-form-item label="资源选择" v-for="(item,index) in form.resources" :key="index"> |
|
|
|
|
<el-cascader :options="twoList" clearable v-model="item.resourceId" @change="(obj)=>ziyuanxuanze(item,index,obj)"> |
|
|
|
|
<el-cascader :options="twoList" clearable v-model="item.resourceId"> |
|
|
|
|
</el-cascader> |
|
|
|
|
<el-input v-model="item.num"/> |
|
|
|
|
<el-button @click="deleteResource(item)">删除</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="工时" prop="workingHours"> |
|
|
|
|
<el-input v-model="form.workingHours" placeholder="请输入工时" /> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
|
|
<el-form-item label="任务图片"> |
|
|
|
|
<imageUpload v-model="form.images" /> |
|
|
|
|
</el-form-item> |
|
|
|
@ -252,10 +211,6 @@
|
|
|
|
|
<el-date-picker clearable v-model="form.planStartTime" type="datetime" value-format="timestamp" |
|
|
|
|
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> --> |
|
|
|
|
<el-form-item label="优先级" prop="weight"> |
|
|
|
|
<el-input v-model="form.weight" placeholder="请输入优先级" /> |
|
|
|
|
</el-form-item> |
|
|
|
@ -264,7 +219,6 @@
|
|
|
|
|
<el-radio :label="0">计划中</el-radio> |
|
|
|
|
<el-radio :label="1">准备中 </el-radio> |
|
|
|
|
<el-radio :label="2">已开始</el-radio> |
|
|
|
|
<!-- <el-radio :label="4">完成</el-radio> --> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
@ -378,13 +332,11 @@ export default {
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
// this.getList(), |
|
|
|
|
this.getTaskCateList(); |
|
|
|
|
this.getAreasList(); |
|
|
|
|
this.getProjectList(); |
|
|
|
|
this.getResource(); |
|
|
|
|
this.getCpUserList(); |
|
|
|
|
// this.twoRescoure(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
startMethod(){ |
|
|
|
@ -395,7 +347,6 @@ export default {
|
|
|
|
|
this.getCropList(); |
|
|
|
|
this.getTaskCateList(); |
|
|
|
|
this.getAreasList(); |
|
|
|
|
// this.twoRescoure(); |
|
|
|
|
}, |
|
|
|
|
executorPersonConvert(executorPerson){ |
|
|
|
|
let executorPersonName = ""; |
|
|
|
@ -420,11 +371,8 @@ export default {
|
|
|
|
|
} |
|
|
|
|
return resouceMsg; |
|
|
|
|
}, |
|
|
|
|
ziyuanxuanze(item,index,obj){ |
|
|
|
|
this.form.resource[index].reource = obj[1]; |
|
|
|
|
}, |
|
|
|
|
addResource(){ |
|
|
|
|
let resourceTmp = {reource:0,num:1} |
|
|
|
|
let resourceTmp = {num:1} |
|
|
|
|
this.form.resources = this.form.resources.concat(resourceTmp) |
|
|
|
|
}, |
|
|
|
|
deleteResource(item){ |
|
|
|
@ -694,33 +642,6 @@ export default {
|
|
|
|
|
changeCateOne(row) { |
|
|
|
|
this.cateTwoList = this.taskCateAllList.filter(t => t.parentId == row); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// assemArea() { |
|
|
|
|
// let parentLsit = this.areasList.filter(t => t.parentId == 0); |
|
|
|
|
// let sonList = this.areasList.filter(s => s.parentId != 0); |
|
|
|
|
// let firstList = []; |
|
|
|
|
// parentLsit.forEach(p => { |
|
|
|
|
// this.areasParentList.push(p); |
|
|
|
|
// let secondList = []; |
|
|
|
|
// sonList.forEach(s => { |
|
|
|
|
// if (p.id == s.parentId) { |
|
|
|
|
// let three = this.areasList.filter(t => t.parentId == s.id); |
|
|
|
|
// if(three.length == 0){ |
|
|
|
|
// secondList.push({ value: s.id, label: s.name }); |
|
|
|
|
// }else{ |
|
|
|
|
// let threeList = []; |
|
|
|
|
// three.forEach(three =>{ |
|
|
|
|
// threeList.push({value:three.id, label:three.name}); |
|
|
|
|
// }) |
|
|
|
|
// secondList.push({value:s.id, label:s.name, children:threeList}); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// firstList.push({ value: p.id, label: p.name, children: secondList }) |
|
|
|
|
// }) |
|
|
|
|
// this.assemAreaList = firstList; |
|
|
|
|
// }, |
|
|
|
|
changeProject(row) { |
|
|
|
|
let project = this.projectList.filter(project => project.id == row)[0]; |
|
|
|
|
//根据项目 自动展示作物 |
|
|
|
|