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

更新调查列表

上级 baa5512f
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) {
return request({
......
......@@ -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-item label="整改指标" prop="rectifyTargetValue">
<div class="block">
<!-- <span class="demonstration"></span>-->
<el-cascader
style="width: 100%"
key="id"
v-model="form.rectifyTargetValue"
:options="rectifyTargetValueOptions"
:props="{multiple: true, expandTrigger: 'hover'}"
filterable
clearable></el-cascader>
</div>
<el-select style="width: 100%" multiple clearable filterable v-model="form.rectifyTargetValue" placeholder="请选择">
<el-option
v-for="item in rectifyTargetValueOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<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>
</div>
</el-dialog>
<!-- 选择复查指标对话框 -->
<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">
<div class="block">
<!-- <span class="demonstration"></span>-->
<el-cascader
style="width: 100%"
key="id"
v-model="form.checkTargetValue"
:options="checkTargetValueOptions"
:props="{multiple: true, expandTrigger: 'hover'}"
filterable
clearable></el-cascader>
</div>
<el-form-item label="复查指标" prop="checkTargetValue">
<el-select style="width: 100%" multiple clearable filterable v-model="form.checkTargetValue" placeholder="请选择">
<el-option
v-for="item in checkTargetValueOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<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>
</div>
</el-dialog>
......@@ -304,7 +299,7 @@
</template>
<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 {
name: "Job",
......@@ -415,6 +410,14 @@ export default {
form: {},
// 表单校验
rules: {
rectifyTargetValue: [
{ required: true, message: "整改指标不能为空,请选择整改指标", trigger: "blur" }
],
},
checkRules:{
checkTargetValue: [
{ required: true, message: "复查指标不能为空,请选择复查指标", trigger: "blur" }
],
}
};
},
......@@ -588,17 +591,80 @@ export default {
},
//选择整改指标(原来的扣分项里选择)
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(){
this.title = '请选择复查指标';
this.checkTargetOpen = true;
handleSelectCheckTarget(row){
getCheckTarget(row.id).then(res=>{
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){
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论