Commit c339a8a7 by liangzhen

暂存

1 parent 902b1c71
......@@ -299,10 +299,7 @@ export function RectificationFeedbackQuery(params) {
// export function ruleFormulation(params) {
// return post(`${ARCH_EVALUATION}/ruleFormulation/ipage`, params)
// }
// //详情
// export function iPageRorm(params) {
// return post(`${ARCH_EVALUATION}/ruleFormulation/iPageRorm`, params)
// }
//分页
......@@ -321,6 +318,14 @@ export function addSelWtqd(params) {
export function addruleFormulation(params) {
return post(`${ARCH_EVALUATION}/ruleFormulation/addRuleFormulation`, params)
}
//编辑
export function updateRuleFormulation(params) {
return post(`${ARCH_EVALUATION}/ruleFormulation/updateRuleFormulation`, params)
}
//查询编辑信息
export function updateSelWtqd(params) {
return post(`${ARCH_EVALUATION}/ruleFormulation/updateSelWtqd`, params)
}
//编制
export function addiPageRorm(params) {
......@@ -343,6 +348,10 @@ export function addauditTasks(params) {
export function qidongTasks(params) {
return post(`${ARCH_EVALUATION}/auditTasks/qidong`, params)
}
//执行
export function qidongZx(params) {
return post(`${ARCH_EVALUATION}/auditTasks/qidongZx`, params)
}
//查询关联规则
export function selRuleProject(params) {
return post(`${ARCH_EVALUATION}/auditTasks/selRule`, params)
......@@ -496,4 +505,6 @@ export function postEvalQuesInfocxtj(params) {
//整改确认接口
export function zgqdauditTasks(params) {
return post(`${ARCH_EVALUATION}/auditTasksRuleProjectLink/zgqd`, params)
}
\ No newline at end of file
}
......@@ -350,11 +350,11 @@ export function trendsRules(type) {
children: [
{ name: '合规检查结果', url: '/projectCheck/checkResault', children: [] },
{ name: '合规问题整改', url: '/projectCheck/problemRectify', children: [] },
{
name: '合规问题整改核验',
url: '/projectCheck/verificationRectify',
children: [],
},
// {
// name: '合规问题整改核验',
// url: '/projectCheck/verificationRectify',
// children: [],
// },
],
},
],
......
......@@ -101,6 +101,22 @@
<el-button type="text" size="small" @click="detailsForm(scope.row)">{{scope.row.abnormalResults}}</el-button>
</template>
</el-table-column>
<el-table-column
prop="rectificationStatusText"
label="问题状态"
>
</el-table-column>
<!-- <el-table-column label="操作" width="130">
<template slot-scope="scope">
<el-button
@click="handleClick(scope.row, scope.$index)"
type="text"
size="small"
:disabled="scope.row.rectificationStatusText=='已下发'"
>下发</el-button
>
</template>
</el-table-column> -->
</el-table>
</div>
<el-pagination
......@@ -195,7 +211,7 @@
</template>
<script>
import { auditTasksResults, xqauditTasksResults } from "@/api/index";
import { auditTasksResults, xqauditTasksResults,wtxfResults } from "@/api/index";
import { generateYearOptions, projectCategoryText } from "@/utils/cache";
import tableMixin from '@/mixins/table.mixin.js'
export default {
......@@ -224,9 +240,39 @@ export default {
};
},
mounted() {
this.ruleForm.auditName = this.$route.query.auditName
this.submitForm();
},
methods: {
async handleClick(row){
this.$confirm("是否确认下发?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
distinguishCancelAndClose: true,
type: "warning",
})
.then(async () => {
// this.checkedList.forEach(item=>{
// if(item.confirmStatusText == "已下发") {
// this.$message.error("请选择未下发的项目");
// throw new Error("主动跳出循环");
// }
// })
let res = await wtxfResults(row);
if (res.code == 200) {
this.$message({
message: '下发成功',
type: 'success'
});
this.dialogXF = false;
this.resetForm();
}
})
.catch((action) => {});
},
timeChange(time) {
if (time) {
//给后端的参数
......@@ -252,17 +298,13 @@ export default {
if (res.code == "200") {
this.tableData = res.data.records;
this.tableData.forEach((item) => {
if (item.auditFrequency == 0) {
this.$set(item, "auditFrequencyText", "仅一次");
} else if (item.auditFrequency == 1) {
this.$set(item, "auditFrequencyText", "每周");
} else if (item.auditFrequency == 2) {
this.$set(item, "auditFrequencyText", "每月");
} else if (item.auditFrequency == 3) {
this.$set(item, "auditFrequencyText", "每季度");
} else if (item.auditFrequency == 4) {
this.$set(item, "auditFrequencyText", "每年");
}
if(item.confirmStatus ==1||!item.confirmStatus){
this.$set(item, "rectificationStatusText", "未下发");
}else if (item.confirmStatus == 2 ) {
this.$set(item, "rectificationStatusText", "已下发");
} else if (item.confirmStatus == 3) {
this.$set(item, "rectificationStatusText", "已整改");
}
this.$set(
item,
"projectCategory",
......@@ -287,7 +329,7 @@ export default {
this.checkedList[0]=info
}else{
if (this.checkedList.length != 1) {
this.$message("请选择");
this.$message.error("请选择");
return;
}
}
......
......@@ -16,14 +16,14 @@
></el-input>
</el-form-item>
<el-form-item label="创建人:" prop="creator" class="fromItem">
<!-- <el-form-item label="创建人:" prop="creator" class="fromItem">
<el-input
v-model="ruleFormdialogAdd.creator"
placeholder="请输入"
clearable
@input="numberVal"
></el-input>
</el-form-item>
</el-form-item> -->
</el-form>
<p class="zjBtn">
稽核规则<span @click="checkRules()">选择稽核规则</span>
......@@ -46,23 +46,7 @@
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<el-switch
v-model="scope.row.ruleStatus"
active-color="#13ce66"
inactive-color="#C0C0C0"
active-value="0"
inactive-value="1"
active-text=""
inactive-text=""
disabled
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</template>
</el-switch>
<span>{{ scope.row.ruleStatus==1?"未开启":"已开启" }}</span>
</template>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
......@@ -325,18 +309,6 @@
clearable
></el-input>
</el-form-item>
<!-- <el-form-item label="规则状态:" prop="ruleStatus" class="fromItem">
<el-select
v-model="ruleFormRule.ruleStatus"
placeholder="请选择"
clearable
@input="numberVal"
>
<el-option label="开启" value="0"></el-option>
<el-option label="关闭" value="1"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="创建人:" prop="creator" class="fromItem">
<el-input
v-model="ruleFormRule.creator"
......@@ -369,23 +341,7 @@
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<el-switch
v-model="scope.row.ruleStatus"
active-color="#13ce66"
inactive-color="#C0C0C0"
active-value="0"
inactive-value="1"
active-text=""
inactive-text=""
disabled
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</template>
</el-switch>
<span>{{ scope.row.ruleStatus==1?"未开启":"已开启" }}</span>
</template>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
......@@ -463,17 +419,17 @@ export default {
trigger: "blur",
},
],
creator: [
{
required: true,
message: "请输入稽核名称",
trigger: "change",
},
{
validator: this.validateNoWhitespace,
trigger: "blur",
},
],
// creator: [
// {
// required: true,
// message: "请输入稽核名称",
// trigger: "change",
// },
// {
// validator: this.validateNoWhitespace,
// trigger: "blur",
// },
// ],
},
pageSizeZJ: 10,
......@@ -568,6 +524,7 @@ export default {
auditStatus:0,
contractNumber:contractList.slice(0, -1),
createTime:getCurrentDate(),
creator:sessionStorage.getItem('authorName')
};
......
......@@ -7,7 +7,7 @@
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="规则名称:" prop="ruleName" class="fromItem">
<el-form-item label="规则名称:" prop="ruleName" class="fromItem">
<el-input
v-model="ruleForm.ruleName"
placeholder="请输入"
......@@ -65,9 +65,9 @@
<el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button
>
<el-button @click="detailsForm()">
<!-- <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
> -->
<el-button @click="add()">
<img class="buttonIcon" src="../../assets/xz.png" /> 添加
</el-button>
......@@ -77,7 +77,10 @@
<el-table
@selection-change="handleSelectionChange"
ref="multipleTable"
@row-click="(row, column, event) => handleRowClick(row, column, event, 'multipleTable')"
@row-click="
(row, column, event) =>
handleRowClick(row, column, event, 'multipleTable')
"
:data="tableData"
tooltip-effect="dark myTooltips"
style="width: 100%"
......@@ -88,34 +91,34 @@
>
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column>
<!-- <el-table-column type="selection"> </el-table-column> -->
<!-- <el-table-column prop="projectStagetext" label="项目环节" >
</el-table-column> -->
<el-table-column label="规则名称" prop="ruleName" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<el-switch
v-model="scope.row.ruleStatus"
active-color="#13ce66"
inactive-color="#C0C0C0"
active-value="0"
inactive-value="1"
active-text=""
inactive-text=""
disabled
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</template>
</el-switch>
<span>{{ scope.row.ruleStatus == 1 ? "未开启" : "已开启" }}</span>
</template>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
<el-table-column label="创建时间" prop="createTime"> </el-table-column>
<el-table-column label="操作" width="130">
<template slot-scope="scope">
<el-button
@click="detailsForm(scope.row, scope.$index)"
type="text"
size="small"
>详情</el-button
>
<el-button
@click="etailsEdit(scope.row, scope.$index)"
type="text"
size="small"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination
......@@ -152,9 +155,9 @@
disabled
></el-input>
</el-form-item>
<el-form-item label="创建人:" prop="creator" class="fromItem">
<el-form-item label="备注:" prop="creator" class="fromItem">
<el-input
v-model="ruleFormdialog.creator"
v-model="ruleFormdialog.notes"
placeholder="请输入"
clearable
@input="numberVal"
......@@ -162,7 +165,17 @@
></el-input>
</el-form-item>
<el-form-item label="规则状态:" prop="ruleStatus" class="fromItem">
<el-switch
<!-- <span>{{ruleFormdialog.ruleStatus==1?"未开启":"已开启" }}</span> -->
<el-input
:value="ruleFormdialog.ruleStatus == 1 ? '未开启' : '已开启'"
placeholder="请输入"
clearable
@input="numberVal"
disabled
></el-input>
<!-- <el-switch
disabled
v-model="ruleFormdialog.ruleStatus"
active-color="#13ce66"
......@@ -178,7 +191,7 @@
<template v-slot:inactive>
<span>关闭</span>
</template>
</el-switch>
</el-switch> -->
</el-form-item>
</el-form>
<div class="setscrolldialogAdd">
......@@ -210,12 +223,12 @@
<template slot-scope="scope">
<el-button
size="small"
v-if="showbzArr.includes(scope.row.questionId+'')"
v-if="showbzArr.includes(scope.row.questionId + '')"
type="primary"
class="btn-search"
@click="editxq(scope.row,scope.$index, '详情')"
@click="editxq(scope.row, scope.$index, '详情')"
>
查看
查看
</el-button>
</template>
</el-table-column>
......@@ -258,9 +271,9 @@
@input="numberVal"
></el-input>
</el-form-item>
<el-form-item label="创建人:" prop="creator" class="fromItem">
<el-form-item label="备注:" prop="notes" class="fromItem">
<el-input
v-model="ruleFormdialogAdd.creator"
v-model="ruleFormdialogAdd.notes"
placeholder="请输入"
clearable
@input="numberVal"
......@@ -313,15 +326,39 @@
show-overflow-tooltip
>
</el-table-column>
<!-- v-if="scope.row.questionId==1" -->
<el-table-column label="状态" prop="showFlag">
<template slot-scope="scope">
<el-switch
v-model="scope.row.showFlag"
active-color="#C0C0C0"
inactive-color="#13ce66"
:active-value="1"
:inactive-value="0"
active-text=""
inactive-text=""
:disabled="scope.row.delFlag == '1'"
@change="controlSwitch($event, scope.row)"
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</template>
</el-switch>
</template>
</el-table-column>
<el-table-column prop="lishi" label="操作" width="100">
<template slot-scope="scope">
<el-button
size="small"
v-if="showbzArr.includes(scope.row.questionId+'')"
v-if="
showbzArr.includes(scope.row.questionId + '') &&
scope.row.showFlag == '0'
"
type="primary"
class="btn-search"
@click="edit(scope.row,scope.$index)"
@click="edit(scope.row, scope.$index)"
>
编制
</el-button>
......@@ -338,6 +375,131 @@
</el-dialog>
<!-- 编辑弹窗 -->
<el-dialog
title="编辑检查规则"
:visible.sync="editShow"
width="90%"
:modal-append-to-body="false"
:append-to-body="false"
>
<div class="dialog">
<el-form
ref="formNameAD"
:model="ruleFormdialogEdit"
label-width="100px"
class="demo-ruleForm"
:rules="rules"
>
<el-form-item label="规则名称:" prop="ruleName" class="fromItem">
<el-input
v-model="ruleFormdialogEdit.ruleName"
placeholder="请输入"
clearable
@input="numberVal"
></el-input>
</el-form-item>
<el-form-item label="备注:" prop="notes" class="fromItem">
<el-input
v-model="ruleFormdialogEdit.notes"
placeholder="请输入"
clearable
@input="numberVal"
></el-input>
</el-form-item>
<el-form-item label="规则状态:" prop="ruleStatus" class="fromItem">
<el-switch
v-model="ruleFormdialogEdit.ruleStatus"
active-color="#13ce66"
inactive-color="#C0C0C0"
active-value="0"
inactive-value="1"
active-text=""
inactive-text=""
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</template>
</el-switch>
</el-form-item>
</el-form>
<p class="zjBtn">检查规则编制</p>
<div class="setscrolldialog">
<el-table
:data="tableDataEdit"
tooltip-effect="dark myTooltips"
style="width: 100%"
header-cell-class-name="custom-th-background"
class="eltable"
:row-class-name="tableRowClassName"
border
>
<!-- <el-table-column label="材料类别" prop="projectStagetext" width="100">
</el-table-column> -->
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column
label="问题检查项"
prop="quesCheckItem"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
label="检查说明"
prop="checkDesc"
show-overflow-tooltip
>
</el-table-column>
<!-- v-if="scope.row.questionId==1" -->
<el-table-column label="状态" prop="showFlag">
<template slot-scope="scope">
<el-switch
v-model="scope.row.showFlag"
active-color="#C0C0C0"
inactive-color="#13ce66"
active-value="1"
inactive-value="0"
active-text=""
inactive-text=""
:disabled="scope.row.delFlag == '1'"
@change="controlSwitch($event, scope.row)"
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</template>
</el-switch>
</template>
</el-table-column>
<el-table-column prop="lishi" label="操作" width="100">
<template slot-scope="scope">
<el-button
size="small"
v-if="showbzArr.includes(scope.row.questionId + '') &&
scope.row.showFlag == '0'"
type="primary"
class="btn-search"
@click="editBJ(scope.row, scope.$index)"
>
编制
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<p class="midBtn">
<span @click="BJcancel()">取消</span
><span @click="BJsave()">保存</span>
</p>
</div>
</el-dialog>
<!-- 编制弹窗 -->
<el-dialog
title="检查规则编制"
:visible.sync="dialogedit"
width="60%"
......@@ -345,16 +507,28 @@
:modal-append-to-body="false"
:append-to-body="false"
>
<div class="bjrule" >
<el-checkbox-group v-model="checkList" :disabled="xqedit" v-if="questionId == 1">
<div class="bjrule">
<el-checkbox-group
v-model="checkList"
:disabled="xqedit"
v-if="questionId == 1"
>
<el-checkbox label="1">应有可研报告或项目说明书</el-checkbox>
<el-checkbox label="2">可研评审意见</el-checkbox>
<el-checkbox label="3">可研批复</el-checkbox>
</el-checkbox-group>
<div v-else-if="questionId == 2">
<p>可研中的需求内容应与业务需求报告中的需求匹配度(%) &nbsp;&nbsp;&nbsp; <el-input-number v-model="numval" :step="10" :max="100" :min="0" :disabled="xqedit"></el-input-number></p>
<p>
可研中的需求内容应与业务需求报告中的需求匹配度(%) &nbsp;&nbsp;&nbsp;
<el-input-number
v-model="numval"
:step="10"
:max="100"
:min="0"
:disabled="xqedit"
></el-input-number>
</p>
</div>
<p class="midBtn bjBtn">
......@@ -374,23 +548,28 @@ import {
addruleFormulation,
addSelWtqd,
addiPageRorm,
updateRuleFormulation,
updateSelWtqd,
} from "@/api/index";
import { getCurrentDate } from "@/utils/format";
import tableMixin from '@/mixins/table.mixin.js'
import tableMixin from "@/mixins/table.mixin.js";
export default {
mixins: [tableMixin],
data() {
return {
xqedit:false,
editIndex:99999999,
checkList: [],
tableDataEdit: [],
xqedit: false,
editIndex: 99999999,
checkList: ["1", "2", "3"],
tableDataQR: [],
ruleFormdialogAdd: {
ruleName:'',
creator:'',
ruleStatus:'0',
ruleName: "",
ruleStatus: "0",
},
ruleFormdialogEdit: {
ruleName: "",
ruleStatus: "0",
},
listData: {},
qdtableData: JSON.parse(JSON.stringify(MaterialsList())),
......@@ -398,15 +577,14 @@ export default {
xxtableData: [],
showButton: true,
ruleForm: {
ruleName:'',
ruleStatus:'',
creator:'',
ruleName: "",
ruleStatus: "",
creator: "",
},
ruleFormdialog: {
ruleName:'',
ruleStatus:'',
creator:'',
ruleName: "",
ruleStatus: "",
creator: "",
},
tableData: [],
......@@ -426,6 +604,7 @@ export default {
pageSizeXQ: 5,
XQcurrentPage: 1,
dialogAdd: false,
editShow: false,
dialogedit: false,
rules: {
ruleName: [
......@@ -442,18 +621,19 @@ export default {
trigger: "change",
},
],
creator: [
{
required: true,
message: "请输入创建人",
trigger: "change",
},
],
// creator: [
// {
// required: true,
// message: "请输入创建人",
// trigger: "change",
// },
// ],
},
configInfo:'',//编制的入参信息
questionId:'',//编制的编号
numval:"",
showbzArr:['1','2']
configInfo: "", //编制的入参信息
questionId: "", //编制的编号
numval: 50,
showbzArr: ["1", "2"],
bjId:''
};
},
filters: {
......@@ -467,11 +647,13 @@ export default {
},
mounted() {
this.submitForm();
this.submitForm();
},
methods: {
handleClick(row) {
console.log(row, "下发");
},
async saveXZ() {
console.log( this.tableDataQR,' this.tableDataQR')
this.$refs.formNameAD.validate((valid) => {
if (!valid) {
console.log("error submit!!");
......@@ -479,29 +661,37 @@ export default {
} else {
let params = {
createTime: getCurrentDate(),
creator: sessionStorage.getItem("author"),
};
let paramsArr=this.tableDataQR.filter(items =>{
return items.configValue
let quesStr = "";
console.log( this.tableDataQR,'22')
this.tableDataQR.forEach((item) => {
console.log(item.showFlag==0,this.showbzArr.includes(item.questionId + ''),!item.configValue,'3345554')
if(item.showFlag==0&&this.showbzArr.includes(item.questionId + '')&&!item.configValue){
console.log('开启了有编制的并且没填')
this.$message.error("请编制检查规则或关闭状态");
throw new Error()
}
if (item.delFlag == 0) {
quesStr = quesStr.concat(item.questionId + "-");
if (!item.configValue) {
this.$set(item, "configValue", "NULL");
}
}
});
let paramsArr = this.tableDataQR.filter((items) => {
return items.configValue;
});
let namesString =paramsArr.map(obj => obj.configValue).join('-');
let quesStr= paramsArr.map(obj => obj.questionId).join('-');
//下边字符串转好在传过来
let statusStr = paramsArr.map((obj) => obj.showFlag).join("-");
let namesString = paramsArr.map((obj) => obj.configValue).join("-");
params.questionId = quesStr.slice(0, -1);
if (namesString) {
params.questionId = quesStr;
params.configValue = namesString
params.statusValue = statusStr;
params.configValue = namesString;
}
Object.assign(params, this.ruleFormdialogAdd);
console.log(params,'222222')
if(!params.questionId){
this.$message.error("请编制检查规则");
return;
}
// return
addruleFormulation(params).then((res) => {
this.dialogAdd = false;
this.resetForm();
......@@ -512,6 +702,58 @@ export default {
cancelXZ() {
this.dialogAdd = false;
},
BJcancel() {
this.editShow = false;
},
async BJsave() {
this.$refs.formNameAD.validate((valid) => {
if (!valid) {
return false;
} else {
let params = {
createTime: getCurrentDate(),
creator: sessionStorage.getItem("author"),
id:this.bjId,
ruleName:this.ruleFormdialogEdit.ruleName,
notes:this.ruleFormdialogEdit.notes,
ruleStatus:this.ruleFormdialogEdit.ruleStatus
};
let quesStr = "";
this.tableDataEdit.forEach((item) => {
if(item.showFlag==0&&this.showbzArr.includes(item.questionId + '')&&!item.configValue){
console.log('开启了有编制的并且没填')
this.$message.error("请编制检查规则或关闭该检查项");
throw new Error()
}
if (item.delFlag == 0) {
quesStr = quesStr.concat(item.questionId + "-");
if (!item.configValue) {
this.$set(item, "configValue", "NULL");
}
}
});
let paramsArr = this.tableDataEdit.filter((items) => {
return items.configValue;
});
let statusStr = paramsArr.map((obj) => obj.showFlag).join("-");
let namesString = paramsArr.map((obj) => obj.configValue).join("-");
params.questionId = quesStr.slice(0, -1);
if (namesString) {
params.statusValue = statusStr;
params.configValue = namesString;
}
// return
updateRuleFormulation(params).then((res) => {
this.editShow = false;
this.resetForm();
});
}
});
},
numberVal(val) {
this.$forceUpdate();
},
......@@ -520,31 +762,44 @@ export default {
this.dialogAdd = true;
let res = await addSelWtqd();
this.tableDataQR = res.data.records;
this.tableDataQR.forEach((item) => {
this.$set(item, "showFlag", item.delFlag);
});
},
//点击编辑
async edit(info,index) {
this.xqedit=false
this.editIndex=index
async edit(info, index) {
//新增的初始化
this.checkList = ["1", "2", "3"];
this.numval = 50;
this.xqedit = false;
this.editIndex = index;
this.dialogedit = true;
this.questionId=info.questionId ;
console.log(info,this.questionId,'555')
// if (info.questionId == 1 && info.configValue) {
// this.checkList = info.configValue.split(",");
// }
this.questionId = info.questionId;
console.log(this.checkList, "3333");
},
//详情里的编制
editxq(info,index){
console.log(info, index,"2222");
this.questionId=info.questionId
if (this.questionId==1) {
this.checkList = info.configValue.split(",")
editxq(info, index) {
this.questionId = info.questionId;
if (this.questionId == 1) {
this.checkList = info.configValue.split(",");
}
if (this.questionId == 2) {
this.numval = info.configValue;
}
this.xqedit = true;
this.dialogedit = true;
},
editBJ(info, index) {
this.questionId = info.questionId;
if (this.questionId == 1&&info.configValue) {
this.checkList = info.configValue.split(",");
}
if(this.questionId == 2){
this.numval = info.configValue;
if (this.questionId == 2&&info.configValue) {
this.numval = info.configValue*1;
}
this.xqedit=true
this.editIndex = index;
this.questionId = info.questionId;
this.xqedit = false;
this.dialogedit = true;
},
timeChange(time) {
......@@ -558,15 +813,15 @@ export default {
}
},
async submitForm(info) {
if(info==999){
this.currentPage=1
if (info == 999) {
this.currentPage = 1;
}
let params = {
current: this.currentPage,
pageSize: this.pageSize,
};
Object.assign(params, this.ruleForm);
console.log(params,'入参');
console.log(params, "入参");
let res = await ruleFormulation(params);
console.log(res, "reslll11");
if (res.code == "200") {
......@@ -584,21 +839,36 @@ export default {
this.submitForm();
},
//详情
async detailsForm() {
if (this.checkedList.length != 1) {
this.$message.error("请选择");
return;
}
async detailsForm(row) {
this.checkedList[0] = row;
this.dialog = true;
this.ruleFormdialog = this.checkedList[0];
let params = {
id:this.checkedList[0].id
id: this.bjId,
};
let res = await iPageRorm(params);
this.tableDataXQ = res.data.records;
this.totalXQ = res.data.total;
// this.resetForm()
},
//编辑
async etailsEdit(row) {
console.log(row,'row');
this.bjId=row.id
this.checkedList[0] = row;
this.ruleFormdialogEdit = row;
this.editShow = true;
let res = await updateSelWtqd({ id: row.id });
this.tableDataEdit = res.data.records;
this.tableDataEdit.forEach((item) => {
if(!item.status){
this.$set(item, "showFlag", '1' );
}else{
this.$set(item, "showFlag", item.status );
}
});
},
//表格颜色
tableRowClassName({ row, rowIndex }) {
......@@ -630,9 +900,9 @@ export default {
},
cancel() {
this.dialog = false;
this.ruleFormdialog={
ruleName:''
}
this.ruleFormdialog = {
ruleName: "",
};
},
handleSizeChangeXQ(val) {
this.pageSizeXQ = val;
......@@ -647,20 +917,23 @@ export default {
this.checkList = [];
},
saveBJ() {
this.configInfo='',
this.dialogedit = false;
if(this.questionId == 1){
this.configInfo= this.checkList.sort().join();
(this.configInfo = ""), (this.dialogedit = false);
if (this.questionId == 1) {
this.configInfo = this.checkList.sort().join();
}
if(this.questionId == 2){
this.configInfo= this.numval;
if (this.questionId == 2) {
this.configInfo = this.numval;
}
if(this.configInfo){
this.tableDataQR[this.editIndex].configValue=this.configInfo
if (this.configInfo) {
//区分新增还是编辑
if (this.dialogAdd) {
this.tableDataQR[this.editIndex].configValue = this.configInfo;
} else {
this.tableDataEdit[this.editIndex].configValue = this.configInfo;
}
}
console.log("选了什么", this.configInfo);
},
controlSwitch() {},
},
};
</script>
......
......@@ -61,28 +61,27 @@
<el-button @click="resetForm('ruleForm')">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button
>
<el-button @click="detailsForm()">
<!-- <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
> -->
<el-button @click="add()">
<img class="buttonIcon" src="../../assets/xz.png" /> 新增
</el-button>
<el-button @click="edit()">
<!-- <el-button @click="edit()">
<img class="buttonIcon" src="../../assets/bj.png" /> 编辑
</el-button>
<el-button @click="deletes()">
<el-button @click="deleted()">
<img class="buttonIcon" src="../../assets/sc.png" /> 删除
</el-button>
<el-button @click="working()">
<img class="buttonIcon" src="../../assets/dr.png" />
</el-button>
<img class="buttonIcon" src="../../assets/dr.png" />
</el-button> -->
</el-form-item>
</el-form>
<div class="setscrollOne">
<el-table
@selection-change="handleSelectionChange"
ref="multipleTable"
@row-click="(row, column, event) => handleRowClick(row, column, event, 'multipleTable')"
:data="tableData"
tooltip-effect="dark myTooltips"
style="width: 100%"
......@@ -93,7 +92,7 @@
>
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column>
<!-- <el-table-column type="selection"> </el-table-column> -->
<el-table-column label="稽核名称" prop="auditName" width="320">
</el-table-column>
<el-table-column
......@@ -104,21 +103,49 @@
</el-table-column>
<el-table-column prop="auditTime" label="稽核时间" width="250">
</el-table-column>
<el-table-column prop="fullId" label="项目编码" show-overflow-tooltip>
<el-table-column prop="fullNum" label="项目数量" show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column prop="fullId" label="项目编码" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="fullName" label="项目名称" show-overflow-tooltip>
</el-table-column>
</el-table-column> -->
<el-table-column prop="fullRule" label="规则名称" show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column prop="projectYear" label="项目年度" width="200">
<el-table-column label="操作" width="300">
<template slot-scope="scope">
{{ scope.row.projectYear }}
<el-button
@click="toResault(scope.row, scope.$index)"
type="text"
size="small"
>查看结果</el-button
>
<el-button
@click="detailsForm(scope.row, scope.$index)"
type="text"
size="small"
>详情</el-button
>
<el-button
@click="edit(scope.row, scope.$index)"
type="text"
size="small"
>编辑</el-button
>
<el-button
@click="deleted(scope.row, scope.$index)"
type="text"
size="small"
>删除</el-button
>
<el-button
@click="working(scope.row, scope.$index)"
type="text"
size="small"
>执行</el-button
>
</template>
</el-table-column>
<el-table-column prop="projectCategory" label="建设形式" width="200">
</el-table-column> -->
</el-table>
</div>
<el-pagination
......@@ -140,7 +167,7 @@
:modal-append-to-body="false"
:append-to-body="false"
>
<div class="dialog">
<div class="dialog">
<el-form
:model="ruleFormRule"
ref="ruleForm"
......@@ -155,25 +182,21 @@
></el-input>
</el-form-item>
<el-form-item label="规则状态:" prop="ruleStatus" class="fromItem">
<el-select
v-model="ruleFormRule.ruleStatus"
placeholder="请选择"
clearable
@change="numberVal"
>
<el-option label="开启" value="0"></el-option>
<el-option label="关闭" value="1"></el-option>
</el-select>
</el-form-item>
<el-input
:value="ruleFormRule.ruleStatus == 1 ? '未开启' : '已开启'"
placeholder="请输入"
disabled
></el-input>
</el-form-item>
<el-form-item label="创建人:" prop="creator" class="fromItem">
<el-input
v-model="ruleFormRule.creator"
placeholder="请输入"
clearable
@change="numberVal"
></el-input>
</el-form-item>
<el-form-item label="创建人:" prop="creator" class="fromItem">
<el-input
v-model="ruleFormRule.creator"
placeholder="请输入"
clearable
@change="numberVal"
></el-input>
</el-form-item>
<el-form-item class="RuleItem">
<span class="zjquery" @click="checkRules('999')"> 查询 </span>
</el-form-item>
......@@ -193,31 +216,22 @@
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column>
<el-table-column label="规则名称" prop="ruleName" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<el-switch
v-model="scope.row.ruleStatus"
active-color="#13ce66"
inactive-color="#C0C0C0"
active-value="0"
inactive-value="1"
active-text=""
inactive-text=""
disabled
<el-table-column
label="规则名称"
prop="ruleName"
show-overflow-tooltip
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<span>{{
scope.row.ruleStatus == 1 ? "未开启" : "已开启"
}}</span>
</template>
</el-switch>
</template>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
<el-table-column label="创建时间" prop="createTime"> </el-table-column>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
<el-table-column label="创建时间" prop="createTime">
</el-table-column>
</el-table>
</div>
<el-pagination
......@@ -325,9 +339,11 @@
<el-table
@select="handleSelectionChangeXM"
@select-all="selectAll"
@row-click="(row, column, event) => handleRowClick(row, column, event, 'multipleTableXM')"
@row-click="
(row, column, event) =>
handleRowClick(row, column, event, 'multipleTableXM')
"
ref="multipleTableXM"
:data="zjtableData"
tooltip-effect="dark myTooltips"
style="width: 100%"
......@@ -336,28 +352,52 @@
:row-class-name="tableRowClassName"
border
>
<el-table-column type="selection" :selectable="selectable"> </el-table-column>
<el-table-column type="selection" :selectable="selectable">
</el-table-column>
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column prop="projectCode" label="项目编码" width="130"> </el-table-column>
<el-table-column prop="projectName" label="项目名称" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="120">
<template slot-scope="scope">
<span v-show="scope.row.issueYear"> {{ scope.row.issueYear }}</span>
</template>
</el-table-column>
<el-table-column prop="projectType" label="项目类型" width="120">
<template slot-scope="scope">
<span v-show="scope.row.type"> {{ scope.row.type | proType }}</span>
</template>
</el-table-column>
<el-table-column prop="constructionForm" label="建设形式" width="120"> </el-table-column>
<el-table-column prop="projectCode" label="项目编码" width="130">
</el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="120">
<template slot-scope="scope">
<span v-show="scope.row.issueYear">
{{ scope.row.issueYear }}</span
>
</template>
</el-table-column>
<el-table-column prop="projectType" label="项目类型" width="120">
<template slot-scope="scope">
<span v-show="scope.row.type">
{{ scope.row.type | proType }}</span
>
</template>
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="120"
>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="contractName" label="合同名称" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="contractNumber"
label="合同编号"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
width="auto"
show-overflow-tooltip
>
</el-table-column>
</el-table>
</div>
......@@ -422,31 +462,22 @@
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column>
<el-table-column label="规则名称" prop="ruleName" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<el-switch
v-model="scope.row.ruleStatus"
active-color="#13ce66"
inactive-color="#C0C0C0"
active-value="0"
inactive-value="1"
active-text=""
inactive-text=""
disabled
<el-table-column
label="规则名称"
prop="ruleName"
show-overflow-tooltip
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<span>{{
scope.row.ruleStatus == 1 ? "未开启" : "已开启"
}}</span>
</template>
</el-switch>
</template>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
<el-table-column label="创建时间" prop="createTime"> </el-table-column>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
<el-table-column label="创建时间" prop="createTime">
</el-table-column>
</el-table>
</div>
<!-- <el-pagination
......@@ -463,7 +494,12 @@
<p class="zjBtn">待稽核项目</p>
<div class="setscrolldialogAdd">
<el-table
:data="addtableDataXM.slice((currentPageBJXM-1)*pageSizeBJXM,currentPageBJXM*pageSizeBJXM)"
:data="
addtableDataXM.slice(
(currentPageBJXM - 1) * pageSizeBJXM,
currentPageBJXM * pageSizeBJXM
)
"
tooltip-effect="dark myTooltips"
style="width: 100%"
header-cell-class-name="custom-th-background"
......@@ -475,41 +511,45 @@
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column prop="projectCode" label="项目编码" width="130">
</el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="120">
<template slot-scope="scope">
<span v-show="scope.row.issueYear">
{{ scope.row.issueYear }}</span
>
</template>
</el-table-column>
<!-- <el-table-column prop="projectType" label="项目类型" width="120">
</el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="120">
<template slot-scope="scope">
<span v-show="scope.row.issueYear">
{{ scope.row.issueYear }}</span
>
</template>
</el-table-column>
<!-- <el-table-column prop="projectType" label="项目类型" width="120">
<template slot-scope="scope">
<span v-show="scope.row.type"> {{ scope.row.type | proType }}</span>
</template>
</el-table-column> -->
<el-table-column prop="constructionForm" label="建设形式" width="120">
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="120"
>
</el-table-column>
<el-table-column
prop="contractNumber"
label="合同编号"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
width="auto"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="contractNumber"
label="合同编号"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
width="auto"
show-overflow-tooltip
>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChangeBJXM"
......@@ -554,13 +594,13 @@
></el-input>
</el-form-item>
<el-form-item label="创建人:" prop="creator" class="fromItem">
<el-input
v-model="ruleFormdialogBJ.creator"
placeholder="请输入"
clearable
@change="numberVal"
></el-input>
</el-form-item>
<el-input
v-model="ruleFormdialogBJ.creator"
placeholder="请输入"
clearable
@change="numberVal"
></el-input>
</el-form-item>
<!-- <el-form-item label="稽核时间:" class="fromItem" prop="dates">
<el-date-picker
v-model="ruleFormdialogBJ.auditTime"
......@@ -589,31 +629,22 @@
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column>
<el-table-column label="规则名称" prop="ruleName" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<el-switch
v-model="scope.row.ruleStatus"
active-color="#13ce66"
inactive-color="#C0C0C0"
active-value="0"
inactive-value="1"
active-text=""
inactive-text=""
disabled
<el-table-column
label="规则名称"
prop="ruleName"
show-overflow-tooltip
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</el-table-column>
<el-table-column prop="ruleStatus" label="规则状态">
<template slot-scope="scope">
<span>{{
scope.row.ruleStatus == 1 ? "未开启" : "已开启"
}}</span>
</template>
</el-switch>
</template>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
<el-table-column label="创建时间" prop="createTime"> </el-table-column>
</el-table-column>
<el-table-column label="创建人" prop="creator"> </el-table-column>
<el-table-column label="创建时间" prop="createTime">
</el-table-column>
<!-- <el-table-column label="操作" width="130">
<template slot-scope="scope">
<el-button
......@@ -642,7 +673,12 @@
</p>
<div class="setscrolldialogAdd">
<el-table
:data="addtableDataXM.slice((currentPageBJXM-1)*pageSizeBJXM,currentPageBJXM*pageSizeBJXM)"
:data="
addtableDataXM.slice(
(currentPageBJXM - 1) * pageSizeBJXM,
currentPageBJXM * pageSizeBJXM
)
"
tooltip-effect="dark myTooltips"
style="width: 100%"
header-cell-class-name="custom-th-background"
......@@ -653,25 +689,48 @@
<el-table-column type="selection"> </el-table-column>
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column prop="projectCode" label="项目编码" width="130"> </el-table-column>
<el-table-column prop="projectName" label="项目名称" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="120">
<template slot-scope="scope">
<span v-show="scope.row.issueYear"> {{ scope.row.issueYear }}</span>
</template>
</el-table-column>
<el-table-column prop="projectType" label="项目类型" width="120">
<template slot-scope="scope">
<span v-show="scope.row.type"> {{ scope.row.type | proType }}</span>
</template>
</el-table-column>
<el-table-column prop="constructionForm" label="建设形式" width="120"> </el-table-column>
<el-table-column prop="projectCode" label="项目编码" width="130">
</el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="120">
<template slot-scope="scope">
<span v-show="scope.row.issueYear">
{{ scope.row.issueYear }}</span
>
</template>
</el-table-column>
<el-table-column prop="projectType" label="项目类型" width="120">
<template slot-scope="scope">
<span v-show="scope.row.type">
{{ scope.row.type | proType }}</span
>
</template>
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="120"
>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="contractName" label="合同名称" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="contractNumber"
label="合同编号"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
width="auto"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="操作" width="130">
<template slot-scope="scope">
<el-button
......@@ -709,6 +768,7 @@
import { getCurrentDate } from "@/utils/format";
import { MaterialsList } from "@/utils/cache";
import {
qidongZx,
auditTasks,
ruleFormulation,
getProjectInfo,
......@@ -723,8 +783,8 @@ import {
selProjectList,
qidongTasks,
} from "@/api/index";
import { generateYearOptions, constructionFormText } from "@/utils/cache";
import tableMixin from '@/mixins/table.mixin.js'
import { generateYearOptions, constructionFormText } from "@/utils/cache";
import tableMixin from "@/mixins/table.mixin.js";
export default {
mixins: [tableMixin],
......@@ -744,7 +804,7 @@ export default {
ruleForm: {
auditName: "",
dates: "",
},//填写解决重置无法输入问题
}, //填写解决重置无法输入问题
ruleFormdialog: {
batchYear: "",
batchName: "",
......@@ -886,14 +946,22 @@ export default {
this.submitForm();
},
methods: {
toResault(row) {
this.$router.push({
path: '/projectCheck/checkResault',
query: {
auditName: row.auditName,
},
})
},
selectable(item, index) {
if (
!item.contractNumber ||
!item.projectCode
) {
return false
if (!item.contractNumber || !item.projectCode) {
return false;
} else {
return true
return true;
}
},
validateNoWhitespace(rule, value, callback) {
......@@ -914,8 +982,8 @@ export default {
}
},
async submitForm(info) {
if(info==999){
this.currentPage=1
if (info == 999) {
this.currentPage = 1;
}
let params = {
current: this.currentPage,
......@@ -928,6 +996,8 @@ export default {
if (res.code == "200") {
this.tableData = res.data.records;
this.tableData.forEach((item) => {
this.$set(item, "fullNum", item.fullId.split(",").length);
if (item.auditStatus == "1") {
this.$set(item, "auditStatusText", "执行中");
} else if (item.auditStatus == "2") {
......@@ -949,15 +1019,12 @@ export default {
this.submitForm();
},
//详情
async detailsForm() {
async detailsForm(row) {
this.currentPageBJXM = 1;
this.pageSizeBJXM = 5;
this.currentPageBJGZ = 1;
this.pageSizeBJGZ = 5;
if (this.checkedList.length != 1) {
this.$message.error("请选择");
return;
}
this.checkedList[0] = row;
this.ruleFormdialogXQ = this.checkedList[0];
this.ruleFormdialogXQ.dates = [
this.checkedList[0].auditStartTime,
......@@ -974,16 +1041,20 @@ export default {
current: this.currentPageBJXM,
pageSize: this.pageSizeBJXM,
};
Promise.all([selRuleProject(params), selProject(params2), selProjectList({ auditId: this.checkedList[0].auditId}),]).then((res) => {
Promise.all([
selRuleProject(params),
selProject(params2),
selProjectList({ auditId: this.checkedList[0].auditId }),
]).then((res) => {
this.addtableData = res[0].data.records;
this.addtableDataXM = res[2].data.records;
this.addtableDataXM.forEach((item) => {
this.$set(
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
});
this.addtotal = res[0].data.total;
this.totalXQXM = res[1].data.total;
......@@ -1080,36 +1151,63 @@ export default {
path: "/compliance/addConfigure",
});
},
//
async working() {
if (this.checkedList.length != 1) {
this.$message.error("请选择");
//
async working(row) {
if (row.auditStatus == 1) {
this.$message.error("该任务已在执行中");
return;
}
if (this.checkedList[0].auditStatus == 1||this.checkedList[0].auditStatus == 2) {
this.$message.error("只能运行未执行的任务");
return;
}
// let params = {
// batchId: this.checkedList[0].batchId,
// projectId: this.checkedList[0].projectId,
// };
let res = await qidongTasks(this.checkedList[0]);
if (res.code == 200) {
// this.$message("运行成功");
this.$message({
message: '运行成功',
type: 'success'
});
this.resetForm()
if (row.auditStatus == 2) {
this.$confirm("已有检查结果,再次执行会进行覆盖?", "提示", {
confirmButtonText: "执行",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
let resZX = await qidongZx(row);
if(resZX.code==200){
row.auditStatusText='执行中'
console.log('执行中',row.auditStatusText)
}
let res = await qidongTasks(row);
if (res.code == 200) {
this.$message({
message: "执行成功",
type: "success",
});
this.resetForm();
} else {
this.$message.error("执行失败");
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消执行",
});
});
} else {
this.$message.error("运行失败");
let resZX = await qidongZx(row);
if(resZX.code==200){
row.auditStatusText='执行中'
console.log('执行中',row.auditStatusText)
}
let res = await qidongTasks(row);
if (res.code == 200) {
this.$message({
message: "执行成功",
type: "success",
});
this.resetForm();
} else {
this.$message.error("执行失败");
}
}
},
//选择规则
async checkRules(info) {
if(info==999){
this.currentPageRule=1
//选择规则
async checkRules(info) {
if (info == 999) {
this.currentPageRule = 1;
}
let params = {
current: this.currentPageRule,
......@@ -1139,7 +1237,7 @@ export default {
// this.addtableData = this.addtableData.filter(
// (obj, index, self) => index === self.findIndex((t) => t.id === obj.id)
// );
this.addtableData = this.addZJList
this.addtableData = this.addZJList;
this.addtotal = this.addtableData.length;
this.dialogRule = false;
},
......@@ -1219,12 +1317,12 @@ export default {
handleSelectionChangeZJ(selection) {
if (selection.length > 0) {
this.inspectdisabled = false
this.inspectdisabled = false;
if (Array.isArray(selection) && selection.length > 1) {
this.$refs.multipleTableZJ.toggleRowSelection(selection[0], false)
this.$refs.multipleTableZJ.toggleRowSelection(selection[1], true)
this.$refs.multipleTableZJ.toggleRowSelection(selection[0], false);
this.$refs.multipleTableZJ.toggleRowSelection(selection[1], true);
}
this.addZJList = this.$refs.multipleTableZJ.selection
this.addZJList = this.$refs.multipleTableZJ.selection;
}
},
selectAll(selection) {
......@@ -1234,18 +1332,18 @@ export default {
handleSelectionChangeXM(selection) {
// this.addZJListXM = this.$refs.multipleTableXM.selection;
if (selection.length < 1) {
return
return;
}
if (selection.length === this.zjtableData.Length) {
console.log('全选')
console.log("全选");
}
this.addZJListXM = this.$refs.multipleTableXM.selection;
},
//编辑
edit() {
if (this.checkedList[0].auditStatus == 1||this.checkedList[0].auditStatus == 2) {
edit(row) {
if (row.auditStatus == 1 || row.auditStatus == 2) {
this.$message.error("只能编辑未执行的任务");
return;
}
......@@ -1255,11 +1353,8 @@ export default {
this.pageSizeBJGZ = 5;
this.oldid = "";
this.showDate = false;
if (this.checkedList.length != 1) {
this.$message.error("请选择");
return;
}
this.ruleFormdialogBJ = this.checkedList[0];
this.ruleFormdialogBJ = row;
this.checkedList[0] = row;
this.ruleFormdialogBJ.dates = [
this.checkedList[0].auditStartTime,
this.checkedList[0].auditEndTime,
......@@ -1278,7 +1373,7 @@ export default {
Promise.all([
selRuleProject(params),
selProject(params2),
selProjectList({ auditId: this.checkedList[0].auditId}),
selProjectList({ auditId: this.checkedList[0].auditId }),
]).then((res) => {
this.addtableData = res[0].data.records;
this.addtableDataXM = res[2].data.records;
......@@ -1292,21 +1387,17 @@ export default {
if (this.addtableDataXM.length > 0) {
this.addtableDataXM.forEach((item) => {
this.$set(
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
});
}
});
},
//删除
async deletes() {
if (this.checkedList.length != 1) {
this.$message.error("请选择");
return;
}
if (this.checkedList[0].auditStatus == 1||this.checkedList[0].auditStatus == 2) {
async deleted(row) {
if (row.auditStatus == 1 || row.auditStatus == 2) {
this.$message.error("只能删除未执行的任务");
return;
}
......@@ -1316,7 +1407,7 @@ export default {
type: "warning",
})
.then(async () => {
let res = await delAuditTasks({auditId: this.checkedList[0].auditId });
let res = await delAuditTasks({ auditId: row.auditId });
if (res.code == 200) {
this.$message({
type: "success",
......@@ -1380,9 +1471,11 @@ export default {
return (
index ==
self.findIndex(
(t) => t.projectCode == obj.projectCode && t.contractNumber == obj.contractNumber,
(t) =>
t.projectCode == obj.projectCode &&
t.contractNumber == obj.contractNumber
)
)
);
});
this.addtotalXM = this.addtableDataXM.length;
......@@ -1414,7 +1507,7 @@ export default {
projectId: row.projectCode,
auditId: this.checkedList[0].auditId,
};
console.log(params,'2222')
console.log(params, "2222");
let res = await delProject(params);
},
//点击删除规则
......@@ -1465,10 +1558,9 @@ export default {
addauditTasks(params).then((res) => {
if (res.code == 200) {
this.$message({
message: '保存成功',
type: 'success'
message: "保存成功",
type: "success",
});
} else {
this.$message.error("保存失败");
}
......@@ -1499,24 +1591,24 @@ export default {
}
let expertIdList = "";
let contractList ="";
let contractList = "";
if (this.addtableDataXM.length > 0) {
this.addtableDataXM.forEach((item) => {
expertIdList = expertIdList.concat(item.projectCode + ",");
contractList=contractList.concat(item.contractNumber + ",");
contractList = contractList.concat(item.contractNumber + ",");
});
}
let params = {
prjStr: expertIdList.slice(0, -1),
ruleStr: this.addtableData[0].id,
auditStatus:0,
contractNumber:contractList.slice(0, -1),
createTime:getCurrentDate(),
auditName:this.ruleFormdialogBJ.auditName,
creator:this.ruleFormdialogBJ.creator,
auditId:this.checkedList[0].auditId
auditStatus: 0,
contractNumber: contractList.slice(0, -1),
createTime: getCurrentDate(),
auditName: this.ruleFormdialogBJ.auditName,
creator: sessionStorage.getItem("authorName"),
auditId: this.checkedList[0].auditId,
};
upauditTasks(params).then((res) => {
this.dialogBJ = false;
this.resetForm();
......@@ -1777,9 +1869,9 @@ h3 {
border-radius: 5px;
}
}
.setscrolldialoggz{
.setscrolldialoggz {
width: 100%;
height:100px;
height: 100px;
overflow: auto;
box-sizing: border-box;
/deep/ .el-table {
......
......@@ -66,9 +66,9 @@
<el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button
>
<el-button @click="detailsForm()">
<!-- <el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
> -->
</el-form-item>
</el-form>
<div class="setscrollOne">
......@@ -101,6 +101,28 @@
<el-button type="text" size="small" @click="detailsForm(scope.row)">{{scope.row.abnormalResults}}</el-button>
</template>
</el-table-column>
<el-table-column
prop="rectificationStatusText"
label="问题状态"
>
</el-table-column>
<el-table-column label="操作" width="130">
<template slot-scope="scope">
<el-button
@click="handleClick(scope.row, scope.$index)"
type="text"
size="small"
:disabled="scope.row.rectificationStatusText!='未下发'"
>下发</el-button
>
<el-button
@click="detailsForm(scope.row, scope.$index)"
type="text"
size="small"
>详情</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination
......@@ -195,7 +217,7 @@
</template>
<script>
import { auditTasksResults, xqauditTasksResults } from "@/api/index";
import { auditTasksResults, xqauditTasksResults,wtxfResults } from "@/api/index";
import { generateYearOptions, projectCategoryText } from "@/utils/cache";
import tableMixin from '@/mixins/table.mixin.js'
export default {
......@@ -224,9 +246,39 @@ export default {
};
},
mounted() {
this.ruleForm.auditName = this.$route.query.auditName
this.submitForm();
},
methods: {
async handleClick(row){
this.$confirm("是否确认下发?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
distinguishCancelAndClose: true,
type: "warning",
})
.then(async () => {
// this.checkedList.forEach(item=>{
// if(item.confirmStatusText == "已下发") {
// this.$message.error("请选择未下发的项目");
// throw new Error("主动跳出循环");
// }
// })
let res = await wtxfResults(row);
if (res.code == 200) {
this.$message({
message: '下发成功',
type: 'success'
});
this.dialogXF = false;
this.resetForm();
}
})
.catch((action) => {});
},
timeChange(time) {
if (time) {
//给后端的参数
......@@ -252,17 +304,13 @@ export default {
if (res.code == "200") {
this.tableData = res.data.records;
this.tableData.forEach((item) => {
if (item.auditFrequency == 0) {
this.$set(item, "auditFrequencyText", "仅一次");
} else if (item.auditFrequency == 1) {
this.$set(item, "auditFrequencyText", "每周");
} else if (item.auditFrequency == 2) {
this.$set(item, "auditFrequencyText", "每月");
} else if (item.auditFrequency == 3) {
this.$set(item, "auditFrequencyText", "每季度");
} else if (item.auditFrequency == 4) {
this.$set(item, "auditFrequencyText", "每年");
}
if(item.confirmStatus ==1||!item.confirmStatus){
this.$set(item, "rectificationStatusText", "未下发");
}else if (item.confirmStatus == 2 ) {
this.$set(item, "rectificationStatusText", "已下发");
} else if (item.confirmStatus == 3) {
this.$set(item, "rectificationStatusText", "已整改");
}
this.$set(
item,
"projectCategory",
......@@ -285,13 +333,7 @@ export default {
async detailsForm(info) {
if(info){
this.checkedList[0]=info
}else{
if (this.checkedList.length != 1) {
this.$message.error("请选择");
return;
}
}
// console.log(this.checkedList[0],'22222334')
this.ruleFormdialogXQ = this.checkedList[0];
let params = {
current: this.currentPageXQ,
......
......@@ -78,7 +78,7 @@
<el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button
>
<el-button @click="detailsForm('xq')">
<!-- <el-button @click="detailsForm('xq')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
<el-button @click="zgqdauditTasks('xf')"
......@@ -86,7 +86,7 @@
:class="confirmdisabled ? 'noclick' : ''">
<i class="el-icon-document-remove"></i
>&nbsp;&nbsp;&nbsp;整改确认</el-button
>
> -->
</el-form-item>
</el-form>
<div class="setscroll">
......@@ -104,7 +104,7 @@
>
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column>
<!-- <el-table-column type="selection"> </el-table-column> -->
<el-table-column label="稽核名称" prop="auditName" width="320"> </el-table-column>
<el-table-column prop="auditTime" label="稽核时间" width="250">
</el-table-column>
......@@ -140,6 +140,23 @@
<span v-else>{{ scope.row.rectificationStatusText }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="130">
<template slot-scope="scope">
<el-button
@click="zgqdauditTasks(scope.row, scope.$index)"
type="text"
size="small"
:disabled="scope.row.rectificationStatusText!='去整改'"
>整改确认</el-button
>
<el-button
@click="detailsForm(scope.row, scope.$index)"
type="text"
size="small"
>详情</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<el-pagination
......@@ -462,12 +479,8 @@ export default {
this.ruleForm.dates=[]
this.submitForm();
},
async zgqdauditTasks(){
if (this.checkedList.length < 1) {
this.$message.error("请选择");
return;
}
let res = await zgqdauditTasks(this.checkedList[0]);
async zgqdauditTasks(row){
let res = await zgqdauditTasks(row);
if(res.code==200){
this.$message({
message: '整改确认完成',
......@@ -477,17 +490,11 @@ export default {
this.$message.error('整改确认失败')
}
this.resetForm()()
this.resetForm()
},
//详情
async detailsForm(info) {
if (this.checkedList.length != 1) {
this.$message.error("请选择");
return;
}
console.log(this.checkedList[0],'22222334')
this.checkedList[0]=info
this.ruleFormdialogXQ = this.checkedList[0];
let params = {
auditId: this.checkedList[0].auditId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!