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

更新项目

上级 b4a716f1
import request from '@/utils/request' import request from '@/utils/request'
// 派发整改任务
export function distributeRectificationTasks(data) {
return request({
url: '/backstage/project/distributeRectificationTasks',
method: 'post',
data: data
})
}
// 获取所有已上报的村列表 // 获取所有已上报的村列表
export function getVillageList(id) { export function getVillageList(id) {
......
...@@ -202,9 +202,9 @@ ...@@ -202,9 +202,9 @@
<el-select style="width: 100%" multiple clearable filterable v-model="form.villageSelectValue" placeholder="请选择"> <el-select style="width: 100%" multiple clearable filterable v-model="form.villageSelectValue" placeholder="请选择">
<el-option <el-option
v-for="item in villageListOptions" v-for="item in villageListOptions"
:key="item.id" :key="item.value"
:label="item.name" :label="item.label"
:value="item.id"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
</div> </div>
<div slot="footer" class="dialog-footer"> <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> <el-button @click="tasksOpen = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
</template> </template>
<script> <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"; import { getStatisticalPointsList } from "@/api/backstage/point";
export default { export default {
...@@ -506,8 +506,36 @@ export default { ...@@ -506,8 +506,36 @@ export default {
getVillageList(row.id).then(res=>{ getVillageList(row.id).then(res=>{
this.villageListOptions = res.data; this.villageListOptions = res.data;
}); });
getProject(row.id).then(response => {
this.form = response.data;
if(this.form.villageSelectValue){
this.form.villageSelectValue = JSON.parse(this.form.villageSelectValue);
}
this.title = '派发整改任务'; this.title = '派发整改任务';
this.tasksOpen = true; 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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论