Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -1035,7 +1035,7 @@ export default {
|
||||
this.selectList.map(item => {
|
||||
let index;
|
||||
index = this.dataList.findIndex(items => {
|
||||
return items.id = item;
|
||||
return items.id === item;
|
||||
});
|
||||
if (index > -1) {
|
||||
this.dataList.splice(index, 1);
|
||||
|
||||
@@ -595,7 +595,7 @@ export default {
|
||||
this.selectList.map(item => {
|
||||
let index;
|
||||
index = this.dataList.findIndex(items => {
|
||||
return items.id = item;
|
||||
return items.id === item;
|
||||
});
|
||||
if (index > -1) {
|
||||
this.dataList.splice(index, 1);
|
||||
|
||||
@@ -1007,7 +1007,7 @@ export default {
|
||||
this.selectList.map(item => {
|
||||
let index;
|
||||
index = this.dataList.findIndex(items => {
|
||||
return items.id = item;
|
||||
return items.id === item;
|
||||
});
|
||||
if (index > -1) {
|
||||
this.dataList.splice(index, 1);
|
||||
|
||||
@@ -598,7 +598,7 @@ export default {
|
||||
this.selectList.map(item => {
|
||||
let index;
|
||||
index = this.dataList.findIndex(items => {
|
||||
return items.id = item;
|
||||
return items.id === item;
|
||||
});
|
||||
if (index > -1) {
|
||||
this.dataList.splice(index, 1);
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="add-form-item form-item-disabled" style="margin-left: -210px">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -1456,9 +1457,13 @@
|
||||
{ type: 'number', message: '年标准年份必须为数字值'}
|
||||
],
|
||||
standName: [
|
||||
{ required: true, message: '请输入标准名称', trigger: 'blur' },
|
||||
{ required: true, message: '请输入标准中文名称', trigger: 'blur' },
|
||||
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' }
|
||||
],
|
||||
standEnName: [
|
||||
{ required: true, message: '请输入标准英文名称', trigger: 'blur' },
|
||||
{ min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur' }
|
||||
],
|
||||
standNature: [
|
||||
{ required: true, message: '请选择标准性质', trigger: 'change' }
|
||||
],
|
||||
|
||||
@@ -394,7 +394,7 @@ export default {
|
||||
this.deleteDataList.map(item => {
|
||||
let index;
|
||||
index = this.dataList.findIndex(items => {
|
||||
return items.id = item;
|
||||
return items.id === item;
|
||||
});
|
||||
if (index > -1) {
|
||||
this.dataList.splice(index, 1);
|
||||
@@ -430,7 +430,7 @@ export default {
|
||||
this.selectedList.map(item => {
|
||||
let addList;
|
||||
addList = this.dataList.findIndex(items => {
|
||||
return items.id == item.id
|
||||
return items.id === item.id
|
||||
})
|
||||
if(addList > -1){
|
||||
// this.$refs.accessTypeSelect.clearSelection()
|
||||
|
||||
@@ -631,7 +631,7 @@ export default {
|
||||
this.selectList.map(item => {
|
||||
let index;
|
||||
index = this.dataList.findIndex(items => {
|
||||
return items.productLine = item;
|
||||
return items.productLine === item;
|
||||
});
|
||||
if (index > -1) {
|
||||
this.dataList.splice(index, 1);
|
||||
|
||||
@@ -605,7 +605,7 @@ export default {
|
||||
this.selectList.map(item => {
|
||||
let index;
|
||||
index = this.dataList.findIndex(items => {
|
||||
return items.productLine = item;
|
||||
return items.productLine === item;
|
||||
});
|
||||
if (index > -1) {
|
||||
this.dataList.splice(index, 1);
|
||||
|
||||
@@ -450,8 +450,13 @@ export default {
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.ProjectDatas = res.data.Maintenance.records;
|
||||
this.total = res.data.Maintenance.total;
|
||||
if(res.data === null){
|
||||
this.ProjectDatas = ''
|
||||
this.total = 0
|
||||
}else{
|
||||
this.ProjectDatas = res.data.Maintenance.records;
|
||||
this.total = res.data.Maintenance.total;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</process-title>
|
||||
<div class="tableTitle">
|
||||
<div class="tableButton">
|
||||
<el-button plain class="common-button-primary" size="mini" @click="batchOperation">批量分发责任人</el-button>
|
||||
<el-button plain class="common-button-primary" size="mini" @click="choiceZRRS('', 2, '')">批量分发责任人</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
@@ -94,11 +94,16 @@
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="责任人" prop="workPeople" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div :class="{'fileClass': !scope.row.workPeople}">
|
||||
{{ scope.row.workPeople ? scope.row.workPeople : "" }}
|
||||
</div>
|
||||
<template slot-scope="scope" v-if="scope.row.workPeople">
|
||||
<el-input v-model="scope.row.workPeopleId" style="display: none;" />
|
||||
<el-input v-model="scope.row.workPeople" placeholder="请选择分发责任人"
|
||||
@click.native="choiceZRRS(scope.row, 1, scope.$index)" />
|
||||
</template>
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <div :class="{'fileClass': !scope.row.workPeople}">-->
|
||||
<!-- {{ scope.row.workPeople ? scope.row.workPeople : "" }}-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
@@ -253,7 +258,8 @@ export default {
|
||||
detailData: [], //流程历史数据
|
||||
userId: this.$store.getters.userInfo.userId,
|
||||
taskIds: this.$route.query.taskIds,
|
||||
pId: this.$route.query.prcId
|
||||
pId: this.$route.query.prcId,
|
||||
selectedId:'',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -316,7 +322,6 @@ export default {
|
||||
taskIds: this.taskIds,
|
||||
pId: this.pId
|
||||
}).then(res => {
|
||||
console.log(res.mesg);
|
||||
if (res) {
|
||||
const processForm = JSON.parse(res.mesg);
|
||||
this.getFormFieldList(processForm);
|
||||
@@ -408,14 +413,27 @@ export default {
|
||||
}, e => {
|
||||
});
|
||||
},
|
||||
//批量分发按钮
|
||||
batchOperation(id) {
|
||||
if (this.selectList.length === 0) {
|
||||
this.$message.warning("请至少选择一条数据进行批量分发");
|
||||
} else {
|
||||
//批量分发按钮
|
||||
choiceZRRS(row, type, index) {
|
||||
this.selectedId=row.id
|
||||
this.type = type;
|
||||
if (type === 1) {
|
||||
this.drawerTitle = "选择责任人";
|
||||
this.nodeList = [];
|
||||
this.nodeList.push(id);
|
||||
this.zrIndex = index;
|
||||
this.zrType = type;
|
||||
this.nodeList.push(row);
|
||||
this.modalshowflag = true;
|
||||
} else if (type === 2) {
|
||||
// 批量
|
||||
if (this.selectList.length > 0) {
|
||||
this.zrType = type;
|
||||
this.nodeList = [];
|
||||
this.modalshowflag = true;
|
||||
this.drawerTitle = "批量选择责任人";
|
||||
} else {
|
||||
this.$message.warning("请选择要分发的数据");
|
||||
}
|
||||
}
|
||||
},
|
||||
//标准表格选择框改变
|
||||
@@ -437,47 +455,40 @@ export default {
|
||||
}
|
||||
},
|
||||
checkedRole(data) {
|
||||
console.log(data[0].name);
|
||||
// 选取负责人时的操作
|
||||
let deposit = new Map();
|
||||
let mis2 = new Map();
|
||||
this.selectList.forEach(item => {
|
||||
item.workPeople = data[0].name;
|
||||
item.workPeopleId = data[0].id;
|
||||
if (item.children) {
|
||||
item.children.forEach(items => {
|
||||
deposit.set(items.standId, items);
|
||||
});
|
||||
}
|
||||
mis2.set(item.standId, item);
|
||||
});
|
||||
this.dataList.forEach((item, index) => {
|
||||
if (mis2.get(item.standId)) {
|
||||
if (item.children) {
|
||||
item.children.forEach(i => {
|
||||
i.workPeopleId = undefined;
|
||||
i.workPeople = undefined;
|
||||
});
|
||||
} else {
|
||||
const newItem = JSON.parse(JSON.stringify(item));
|
||||
newItem.workPeopleId = data[0].id;
|
||||
newItem.workPeople = data[0].name;
|
||||
this.$set(this.dataList, index, newItem);
|
||||
//单选操作
|
||||
if (this.type === 1) {
|
||||
this.dataList.forEach(item => {
|
||||
if(item.children){
|
||||
item.children.forEach(items => {
|
||||
if(items.id === this.selectedId){
|
||||
items.workPeople = data[0].name
|
||||
items.workPeopleId = data[0].id
|
||||
// this.$set(items,'workPeople',data[0].name)
|
||||
//this.$set(items,'workPeopleId',data[0].id)
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if (item.children) {
|
||||
item.children.forEach((items, childIndex) => {
|
||||
if (deposit.get(items.standId)) {
|
||||
const childItems = JSON.parse(JSON.stringify(items));
|
||||
childItems.workPeopleId = deposit.get(items.standId).workPeopleId;
|
||||
childItems.workPeople = deposit.get(items.standId).workPeople;
|
||||
this.$set(this.dataList[index].children, childIndex, childItems);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$refs.myTable.clearSelection();
|
||||
})
|
||||
this.dataList = JSON.parse(JSON.stringify(this.dataList))
|
||||
} else if (this.type === 2) {
|
||||
this.selectList.forEach(item =>{
|
||||
this.dataList.map(items=>{
|
||||
if(item.id==items.id){
|
||||
items.workPeople = data[0].name
|
||||
items.workPeopleId = data[0].id
|
||||
}
|
||||
if(items.children.length){
|
||||
items.children.map(childrenItem=>{
|
||||
if(childrenItem.id==item.id){
|
||||
childrenItem.workPeople = data[0].name
|
||||
childrenItem.workPeopleId = data[0].id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
this.dataList = JSON.parse(JSON.stringify(this.dataList))
|
||||
}
|
||||
this.modalshowflag = false;
|
||||
},
|
||||
cancleUserInfo() {
|
||||
|
||||
Reference in New Issue
Block a user