Commit 0f2bc8da by liangzhen

编制配置

1 parent e3acb912
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
</el-form> </el-form>
<div class="setscrolldialogx"> <div class="setscrolldialogx">
<el-table <el-table
@select="handleSelectionChangeXM" @selection-change="handleSelectionChangeXM"
@select-all="selectAll" @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" ref="multipleTableXM"
...@@ -352,6 +352,7 @@ ...@@ -352,6 +352,7 @@
<div class="setscrolldialog"> <div class="setscrolldialog">
<el-table <el-table
@selection-change="handleSelectionChangeZJ" @selection-change="handleSelectionChangeZJ"
@row-click="(row, column, event) => handleRowClick(row, column, event, 'multipleTableZJ')"
ref="multipleTableZJ" ref="multipleTableZJ"
:data="tableDataRule" :data="tableDataRule"
tooltip-effect="dark myTooltips" tooltip-effect="dark myTooltips"
...@@ -590,6 +591,7 @@ export default { ...@@ -590,6 +591,7 @@ export default {
}, },
//选择项目 //选择项目
saveZJ() { saveZJ() {
console.log(this.addZJListXM,this.addtableDataXM,'选择了')
if (this.addZJListXM.length < 1) { if (this.addZJListXM.length < 1) {
this.$message("请选择项目"); this.$message("请选择项目");
return; return;
...@@ -694,6 +696,7 @@ export default { ...@@ -694,6 +696,7 @@ export default {
}, },
handleSelectionChangeXM(selection) { handleSelectionChangeXM(selection) {
console.log('点击了')
// this.addZJListXM = this.$refs.multipleTableXM.selection; // this.addZJListXM = this.$refs.multipleTableXM.selection;
if (selection.length < 1) { if (selection.length < 1) {
return return
......
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="small" size="small"
v-if="scope.row.questionId == 1" v-if="showbzArr.includes(scope.row.questionId+'')"
type="primary" type="primary"
class="btn-search" class="btn-search"
@click="editxq(scope.row,scope.$index, '详情')" @click="editxq(scope.row,scope.$index, '详情')"
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="small" size="small"
v-if="scope.row.questionId == 1" v-if="showbzArr.includes(scope.row.questionId+'')"
type="primary" type="primary"
class="btn-search" class="btn-search"
@click="edit(scope.row,scope.$index)" @click="edit(scope.row,scope.$index)"
...@@ -345,13 +345,18 @@ ...@@ -345,13 +345,18 @@
:modal-append-to-body="false" :modal-append-to-body="false"
:append-to-body="false" :append-to-body="false"
> >
<div class="bjrule"> <div class="bjrule" >
<el-checkbox-group v-model="checkList" :disabled="xqedit"> <el-checkbox-group v-model="checkList" :disabled="xqedit" v-if="questionId == 1">
<el-checkbox label="1">应有可研报告或项目说明书</el-checkbox> <el-checkbox label="1">应有可研报告或项目说明书</el-checkbox>
<el-checkbox label="2">可研评审意见</el-checkbox> <el-checkbox label="2">可研评审意见</el-checkbox>
<el-checkbox label="3">可研批复</el-checkbox> <el-checkbox label="3">可研批复</el-checkbox>
</el-checkbox-group> </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>
</div>
<p class="midBtn bjBtn"> <p class="midBtn bjBtn">
<span @click="cancelBJ()">取消</span <span @click="cancelBJ()">取消</span
><span @click="saveBJ()">保存</span> ><span @click="saveBJ()">保存</span>
...@@ -381,7 +386,12 @@ export default { ...@@ -381,7 +386,12 @@ export default {
editIndex:99999999, editIndex:99999999,
checkList: [], checkList: [],
tableDataQR: [], tableDataQR: [],
ruleFormdialogAdd: {}, ruleFormdialogAdd: {
ruleName:'',
creator:'',
ruleStatus:'0',
},
listData: {}, listData: {},
qdtableData: JSON.parse(JSON.stringify(MaterialsList())), qdtableData: JSON.parse(JSON.stringify(MaterialsList())),
tableDataNew: MaterialsList(), tableDataNew: MaterialsList(),
...@@ -394,10 +404,9 @@ export default { ...@@ -394,10 +404,9 @@ export default {
}, },
ruleFormdialog: { ruleFormdialog: {
batchYear: "", ruleName:'',
batchName: "", ruleStatus:'',
planReviewDate: "", creator:'',
fullName: "",
}, },
tableData: [], tableData: [],
...@@ -442,6 +451,9 @@ export default { ...@@ -442,6 +451,9 @@ export default {
], ],
}, },
configInfo:'',//编制的入参信息 configInfo:'',//编制的入参信息
questionId:'',//编制的编号
numval:"",
showbzArr:['1','2']
}; };
}, },
filters: { filters: {
...@@ -475,7 +487,7 @@ export default { ...@@ -475,7 +487,7 @@ export default {
let namesString =paramsArr.map(obj => obj.configValue).join('-'); let namesString =paramsArr.map(obj => obj.configValue).join('-');
let quesStr= paramsArr.map(obj => obj.questionId).join('-'); let quesStr= paramsArr.map(obj => obj.questionId).join('-');
console.log(namesString,'222222')
//下边字符串转好在传过来 //下边字符串转好在传过来
if (namesString) { if (namesString) {
...@@ -484,6 +496,7 @@ export default { ...@@ -484,6 +496,7 @@ export default {
} }
Object.assign(params, this.ruleFormdialogAdd); Object.assign(params, this.ruleFormdialogAdd);
console.log(params,'222222')
addruleFormulation(params).then((res) => { addruleFormulation(params).then((res) => {
this.dialogAdd = false; this.dialogAdd = false;
this.resetForm(); this.resetForm();
...@@ -508,6 +521,9 @@ export default { ...@@ -508,6 +521,9 @@ export default {
this.xqedit=false this.xqedit=false
this.editIndex=index this.editIndex=index
this.dialogedit = true; this.dialogedit = true;
this.questionId=info.questionId ;
console.log(info,this.questionId,'555')
// if (info.questionId == 1 && info.configValue) { // if (info.questionId == 1 && info.configValue) {
// this.checkList = info.configValue.split(","); // this.checkList = info.configValue.split(",");
// } // }
...@@ -516,9 +532,13 @@ export default { ...@@ -516,9 +532,13 @@ export default {
//详情里的编制 //详情里的编制
editxq(info,index){ editxq(info,index){
console.log(info, index,"2222"); console.log(info, index,"2222");
if ( info.configValue) { this.questionId=info.questionId
if (this.questionId==1) {
this.checkList = info.configValue.split(",") this.checkList = info.configValue.split(",")
} }
if(this.questionId == 2){
this.numval = info.configValue;
}
this.xqedit=true this.xqedit=true
this.dialogedit = true; this.dialogedit = true;
}, },
...@@ -541,33 +561,11 @@ export default { ...@@ -541,33 +561,11 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
}; };
Object.assign(params, this.ruleForm); Object.assign(params, this.ruleForm);
console.log(params); console.log(params,'入参');
let res = await ruleFormulation(params); let res = await ruleFormulation(params);
console.log(res, "reslll11"); console.log(res, "reslll11");
if (res.code == "200") { if (res.code == "200") {
this.tableData = res.data.records; this.tableData = res.data.records;
this.tableData.forEach((item) => {
switch (item.projectStage) {
case "1":
this.$set(item, "projectStagetext", "可研");
break;
case "2":
this.$set(item, "projectStagetext", "计划");
break;
case "3":
this.$set(item, "projectStagetext", "采购");
break;
case "4":
this.$set(item, "projectStagetext", "合同");
break;
case "5":
this.$set(item, "projectStagetext", "执行");
break;
case "6":
this.$set(item, "projectStagetext", "结决算及转资");
break;
}
});
this.total = res.data.total * 1; this.total = res.data.total * 1;
} }
}, },
...@@ -590,13 +588,11 @@ export default { ...@@ -590,13 +588,11 @@ export default {
this.ruleFormdialog = this.checkedList[0]; this.ruleFormdialog = this.checkedList[0];
let params = { let params = {
id:this.checkedList[0].id id:this.checkedList[0].id
// current: this.XQcurrentPage,
// pageSize: this.pageSizeXQ,
// projectStage: this.checkedList[0].questionId,
}; };
let res = await iPageRorm(params); let res = await iPageRorm(params);
this.tableDataXQ = res.data.records; this.tableDataXQ = res.data.records;
this.totalXQ = res.data.total; this.totalXQ = res.data.total;
// this.resetForm()
}, },
//表格颜色 //表格颜色
...@@ -614,7 +610,7 @@ export default { ...@@ -614,7 +610,7 @@ export default {
this.$refs.multipleTable.toggleRowSelection(selection[1], true); this.$refs.multipleTable.toggleRowSelection(selection[1], true);
} }
this.checkedList = this.$refs.multipleTable.selection; this.checkedList = this.$refs.multipleTable.selection;
this.ruleFormdialog = this.checkedList[0]; // this.ruleFormdialog = this.checkedList[0];
console.log(this.checkedList, "2222"); console.log(this.checkedList, "2222");
}, },
handleSizeChange(val) { handleSizeChange(val) {
...@@ -629,6 +625,9 @@ export default { ...@@ -629,6 +625,9 @@ export default {
}, },
cancel() { cancel() {
this.dialog = false; this.dialog = false;
this.ruleFormdialog={
ruleName:''
}
}, },
handleSizeChangeXQ(val) { handleSizeChangeXQ(val) {
this.pageSizeXQ = val; this.pageSizeXQ = val;
...@@ -643,10 +642,14 @@ export default { ...@@ -643,10 +642,14 @@ export default {
this.checkList = []; this.checkList = [];
}, },
saveBJ() { saveBJ() {
this.configInfo='',
this.dialogedit = false; this.dialogedit = false;
if(Array.isArray(this.checkList)){ if(this.questionId == 1){
this.configInfo= this.checkList.sort().join(); this.configInfo= this.checkList.sort().join();
} }
if(this.questionId == 2){
this.configInfo= this.numval;
}
if(this.configInfo){ if(this.configInfo){
this.tableDataQR[this.editIndex].configValue=this.configInfo this.tableDataQR[this.editIndex].configValue=this.configInfo
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!