Merge branch 'develop' into 'test'

Develop

See merge request !81
This commit is contained in:
王夏晖
2021-08-16 01:12:41 +00:00
22 changed files with 154 additions and 109 deletions
@@ -252,7 +252,6 @@
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
console.log(data);
this.form.title = data.title || data.form.title
this.form.date = data.date || data.form.date
this.json = data || data.form
@@ -333,13 +333,12 @@
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('pId', this.pId)
_formData.append('json', JSON.stringify({
form: this.form,
roleForm: this.roleForm,
commentText: this.commentText,
itemList: this.itemList,
sarType: this.sarType
standInData: this.sarType
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
@@ -394,14 +393,19 @@
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum
this.form.itemsName = data.itemsName
this.form.itemsNum1 = data.itemsNum1
this.form.itemsName1 = data.itemsName1
this.sarType = data.standInData
console.log(data);
this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData || data.sarType
this.json = data
var arr = []
arr = JSON.parse(data.itemList)
let arr
if (typeof(data.itemList) === 'string') {
arr = JSON.parse(data.itemList)
} else {
arr = data.itemList
}
arr.forEach(item => {
item.zxUserId = ''
item.zxUserIdName = ''
@@ -288,6 +288,7 @@
</el-table>
</div>
<ProcessFooter
show-save
show-submit
:submitLoading="isSubmit"
:saveLoading="saveLoading"
@@ -377,7 +378,7 @@
import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {inboundLiaisonDetail,processCreateStand} from 'api/process'
import {inboundLiaisonDetail,processCreateStand,saveTaskForPub} from 'api/process'
export default {
name: "bzjdStep3",
@@ -488,7 +489,24 @@
handleTabs(name) {
this.active = name
},
handleSave() {},
handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
form: this.form,
roleForm: this.roleForm,
commentText: this.commentText,
itemList: this.itemList,
standInData: this.sarType
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
}).catch(e => {
this.saveLoading = false
})
},
handleSubmit() {
this.$refs['bzzqyjForm'].validate((valid) => {
if (valid) {
@@ -558,11 +576,12 @@
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum
this.form.itemsName = data.itemsName
this.form.itemsNum1 = data.itemsNum1
this.form.itemsName1 = data.itemsName1
this.sarType = data.standInData
console.log(data);
this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData || data.sarType
this.json = data
let itemList
if (typeof (data.itemList) == 'string') {
@@ -378,11 +378,11 @@
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum
this.form.itemsName = data.itemsName
this.form.itemsNum1 = data.itemsNum1
this.form.itemsName1 = data.itemsName1
this.sarType = data.standInData
this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData || data.sarType
this.json = data
this.itemList = data.itemList
this.loading = false
@@ -378,11 +378,11 @@
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum
this.form.itemsName = data.itemsName
this.form.itemsNum1 = data.itemsNum1
this.form.itemsName1 = data.itemsName1
this.sarType = data.standInData
this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData || data.sarType
this.json = data
this.itemList = data.itemList
this.loading = false
@@ -377,11 +377,11 @@
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum
this.form.itemsName = data.itemsName
this.form.itemsNum1 = data.itemsNum1
this.form.itemsName1 = data.itemsName1
this.sarType = data.standInData
this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData || data.sarType
this.json = data
this.itemList = data.itemList
this.loading = false
@@ -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);
@@ -994,6 +994,8 @@ export default {
},
// 点击批量删除事件
deleteList() {
console.log(this.selectList);
console.log(this.dataList);
if (this.selectList.length < 1) {
this.$message.warning("请选择一条数据进行删除");
} else {
@@ -1007,10 +1009,12 @@ export default {
this.selectList.map(item => {
let index;
index = this.dataList.findIndex(items => {
return items.id = item;
return items.id === item;
});
console.log(index);
if (index > -1) {
this.dataList.splice(index, 1);
console.log(this.dataList);
}
exits.push(item);
});
@@ -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);
@@ -263,7 +263,6 @@
this.form.endTime = data.endTime
this.form.cname = data.cname
this.json = data
console.log(data);
}).catch(e => {
})
})
@@ -317,7 +317,6 @@
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
console.log(data);
this.form.cid = data.cid
this.form.endTime = data.endTime
this.form.cname = data.cname
@@ -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() {
@@ -1124,7 +1124,7 @@ export default {
this.selectedAccInfoSearchList.map(item => {
let addList;
addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id
return items.id === item.id
})
if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection()
@@ -1211,7 +1211,7 @@ export default {
this.sarAccessInfoListArry.map(item => {
let index
index = this.sarAccessInfoList.findIndex(items => {
return items.id = item
return items.id === item
})
if (index > -1) {
this.sarAccessInfoList.splice(index, 1)
@@ -1093,7 +1093,7 @@ export default {
let addList;
addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id
return items.id === item.id
})
if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection()
@@ -1183,7 +1183,7 @@ export default {
this.sarAccessInfoListArry.map(item => {
let index
index = this.sarAccessInfoList.findIndex(items => {
return items.id = item
return items.id === item
})
if (index > -1) {
this.sarAccessInfoList.splice(index, 1)
@@ -1064,7 +1064,7 @@ export default {
this.selectedAccInfoSearchList.map(item => {
let addList;
addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id
return items.id === item.id
})
if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection()
@@ -1154,7 +1154,7 @@ export default {
this.sarAccessInfoListArry.map(item => {
let index
index = this.sarAccessInfoList.findIndex(items => {
return items.id = item
return items.id === item
})
if (index > -1) {
this.sarAccessInfoList.splice(index, 1)
@@ -631,7 +631,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);
@@ -743,6 +743,11 @@ export default {
}, {
_this: this
}, res => {
if(res.data === null){
this.standardData = ''
this.totalDo =''
this.standModel = true;
}
this.standardData = res.data.records
this.totalDo = res.data.total
this.standModel = true;
@@ -2533,6 +2533,11 @@
/deep/.highlight-class {
color: red !important;
}
/deep/.pagination{
position: static !important;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
}
.standard-search {
padding: 6px 26px;
@borderColor: #BFBFBF;
@@ -2849,11 +2854,6 @@
}
}
}
.pagination{
position: static;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
}
}
}
.content-right{