提交 0e37b25c authored 作者: 林国禄's avatar 林国禄

更新项目

上级 b4a716f1
import request from '@/utils/request'
// 派发整改任务
export function distributeRectificationTasks(data) {
return request({
url: '/backstage/project/distributeRectificationTasks',
method: 'post',
data: data
})
}
// 获取所有已上报的村列表
export function getVillageList(id) {
......
......@@ -202,9 +202,9 @@
<el-select style="width: 100%" multiple clearable filterable v-model="form.villageSelectValue" placeholder="请选择">
<el-option
v-for="item in villageListOptions"
:key="item.id"
:label="item.name"
:value="item.id">
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
......@@ -212,7 +212,7 @@
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="" :disabled="repeatSubmit">确 定</el-button>
<el-button type="primary" @click="distributeRectificationTasksSubmit" :disabled="repeatSubmit">确 定</el-button>
<el-button @click="tasksOpen = false">取 消</el-button>
</div>
</el-dialog>
......@@ -221,7 +221,7 @@
</template>
<script>
import { getVillageList, getThemeListDetail, changeReleaseStatus, getThemeList, listProject, getProject, delProject, addProject, updateProject, exportProject } from "@/api/backstage/project";
import { distributeRectificationTasks, getVillageList, getThemeListDetail, changeReleaseStatus, getThemeList, listProject, getProject, delProject, addProject, updateProject, exportProject } from "@/api/backstage/project";
import { getStatisticalPointsList } from "@/api/backstage/point";
export default {
......@@ -506,8 +506,36 @@ export default {
getVillageList(row.id).then(res=>{
this.villageListOptions = res.data;
});
this.title = '派发整改任务';
this.tasksOpen = true;
getProject(row.id).then(response => {
this.form = response.data;
if(this.form.villageSelectValue){
this.form.villageSelectValue = JSON.parse(this.form.villageSelectValue);
}
this.title = '派发整改任务';
this.tasksOpen = true;
});
},
//派发整改任务提交按钮
distributeRectificationTasksSubmit(){
if(this.form.villageSelectValue != null && this.form.villageSelectValue.length>0){
this.form.villageSelectValue = JSON.stringify(this.form.villageSelectValue)
}else {
this.form.villageSelectValue = null
}
distributeRectificationTasks(this.form).then(res=>{
this.msgSuccess("派发成功");
this.tasksOpen = false;
this.getList();
}).catch(()=>{
if(this.form.villageSelectValue){
this.form.villageSelectValue = JSON.parse(this.form.villageSelectValue);
}
});
}
}
};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论