提交 8b32c799 authored 作者: 林国禄's avatar 林国禄

更新调查列表

上级 baa5512f
import request from '@/utils/request' import request from '@/utils/request'
//选择复查指标提交
export function selectCheckTarget(data) {
return request({
url: '/backstage/job/selectCheckTarget',
method: 'put',
data: data
})
}
// 获取复查指标列表
export function getCheckTarget(id) {
return request({
url: '/backstage/job/getCheckTarget/' + id,
method: 'get',
})
}
//选择整改指标提交
export function selectRectifyTarget(data) {
return request({
url: '/backstage/job/selectRectifyTarget',
method: 'put',
data: data
})
}
// 获取整改指标列表
export function getRectifyTarget(id) {
return request({
url: '/backstage/job/getRectifyTarget/' + id,
method: 'get',
})
}
// 获取相关联指标列表 // 获取相关联指标列表
export function getTargetList(id) { export function getTargetList(id) {
return request({ return request({
......
...@@ -253,49 +253,44 @@ ...@@ -253,49 +253,44 @@
<!-- 选择整改指标对话框 --> <!-- 选择整改指标对话框 -->
<el-dialog :title="title" :visible.sync="rectifyTargetOpen" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="rectifyTargetOpen" width="600px" style="margin-top: 200px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="整改指标" prop="rectifyTargetValue"> <el-form-item label="整改指标" prop="rectifyTargetValue">
<div class="block">
<!-- <span class="demonstration"></span>--> <el-select style="width: 100%" multiple clearable filterable v-model="form.rectifyTargetValue" placeholder="请选择">
<el-cascader <el-option
style="width: 100%" v-for="item in rectifyTargetValueOptions"
key="id" :key="item.value"
v-model="form.rectifyTargetValue" :label="item.label"
:options="rectifyTargetValueOptions" :value="item.value">
:props="{multiple: true, expandTrigger: 'hover'}" </el-option>
filterable </el-select>
clearable></el-cascader>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<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="rectifyTargetSubmit" :disabled="repeatSubmit">确 定</el-button>
<el-button @click="rectifyTargetOpen = false">取 消</el-button> <el-button @click="rectifyTargetOpen = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 选择复查指标对话框 --> <!-- 选择复查指标对话框 -->
<el-dialog :title="title" :visible.sync="checkTargetOpen" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="checkTargetOpen" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="checkRules" label-width="120px">
<el-form-item label="整改指标" prop="rectifyTargetValue"> <el-form-item label="复查指标" prop="checkTargetValue">
<div class="block"> <el-select style="width: 100%" multiple clearable filterable v-model="form.checkTargetValue" placeholder="请选择">
<!-- <span class="demonstration"></span>--> <el-option
<el-cascader v-for="item in checkTargetValueOptions"
style="width: 100%" :key="item.value"
key="id" :label="item.label"
v-model="form.checkTargetValue" :value="item.value">
:options="checkTargetValueOptions" </el-option>
:props="{multiple: true, expandTrigger: 'hover'}" </el-select>
filterable
clearable></el-cascader>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<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="checkTargetSubmit" :disabled="repeatSubmit">确 定</el-button>
<el-button @click="checkTargetOpen = false">取 消</el-button> <el-button @click="checkTargetOpen = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -304,7 +299,7 @@ ...@@ -304,7 +299,7 @@
</template> </template>
<script> <script>
import { distributeRectificationJob, rollbackJob, auditJob, getList,listJob, getJob, delJob, addJob, updateJob, exportJob } from "@/api/backstage/job"; import { selectCheckTarget,getCheckTarget,selectRectifyTarget,getRectifyTarget, distributeRectificationJob, rollbackJob, auditJob, getList,listJob, getJob, delJob, addJob, updateJob, exportJob } from "@/api/backstage/job";
export default { export default {
name: "Job", name: "Job",
...@@ -415,6 +410,14 @@ export default { ...@@ -415,6 +410,14 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
rectifyTargetValue: [
{ required: true, message: "整改指标不能为空,请选择整改指标", trigger: "blur" }
],
},
checkRules:{
checkTargetValue: [
{ required: true, message: "复查指标不能为空,请选择复查指标", trigger: "blur" }
],
} }
}; };
}, },
...@@ -588,17 +591,80 @@ export default { ...@@ -588,17 +591,80 @@ export default {
}, },
//选择整改指标(原来的扣分项里选择) //选择整改指标(原来的扣分项里选择)
handleSelectRectifyTarget(row){ handleSelectRectifyTarget(row){
this.title = '请选择整改指标';
this.rectifyTargetOpen = true; getRectifyTarget(row.id).then(res=>{
this.rectifyTargetValueOptions = res.data;
});
getJob(row.id).then(response => {
this.form = response.data;
if(this.form.rectifyTargetValue){
this.form.rectifyTargetValue = JSON.parse(this.form.rectifyTargetValue);
}
this.title = '请选择整改指标';
this.rectifyTargetOpen = true;
});
}, },
//选择复查指标(原考核指标里选择) //选择复查指标(原考核指标里选择)
handleSelectCheckTarget(){ handleSelectCheckTarget(row){
this.title = '请选择复查指标'; getCheckTarget(row.id).then(res=>{
this.checkTargetOpen = true; this.checkTargetValueOptions = res.data;
});
getJob(row.id).then(response => {
this.form = response.data;
if(this.form.checkTargetValue){
this.form.checkTargetValue = JSON.parse(this.form.checkTargetValue);
}
this.title = '请选择复查指标';
this.checkTargetOpen = true;
});
}, },
//查看详情 //查看详情
handleDetail(row){ handleDetail(row){
this.$router.push("/getJobDetail/"+ row.id); this.$router.push("/getJobDetail/"+ row.id);
},
//选择整改指标提交
rectifyTargetSubmit(){
if(this.form.rectifyTargetValue != null && this.form.rectifyTargetValue.length>0){
this.form.rectifyTargetValue = JSON.stringify(this.form.rectifyTargetValue)
}else {
this.form.rectifyTargetValue = null
}
selectRectifyTarget(this.form).then(res=>{
this.msgSuccess("选择成功");
this.rectifyTargetOpen = false;
this.getList();
}).catch(()=>{
if(this.form.rectifyTargetValue){
this.form.rectifyTargetValue = JSON.parse(this.form.rectifyTargetValue);
}
});
},
//选择复查指标提交
checkTargetSubmit(){
if(this.form.checkTargetValue != null && this.form.checkTargetValue.length>0){
this.form.checkTargetValue = JSON.stringify(this.form.checkTargetValue)
}else {
this.form.checkTargetValue = null
}
selectCheckTarget(this.form).then(res=>{
this.msgSuccess("选择成功");
this.checkTargetOpen = false;
this.getList();
}).catch(()=>{
if(this.form.checkTargetValue){
this.form.checkTargetValue = JSON.parse(this.form.checkTargetValue);
}
});
} }
} }
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论