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 pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
console.log(data);
this.form.title = data.title || data.form.title this.form.title = data.title || data.form.title
this.form.date = data.date || data.form.date this.form.date = data.date || data.form.date
this.json = data || data.form this.json = data || data.form
@@ -333,13 +333,12 @@
this.saveLoading = true this.saveLoading = true
let _formData = new FormData() let _formData = new FormData()
_formData.append('taskIds', this.taskIds) _formData.append('taskIds', this.taskIds)
_formData.append('pId', this.pId)
_formData.append('json', JSON.stringify({ _formData.append('json', JSON.stringify({
form: this.form, form: this.form,
roleForm: this.roleForm, roleForm: this.roleForm,
commentText: this.commentText, commentText: this.commentText,
itemList: this.itemList, itemList: this.itemList,
sarType: this.sarType standInData: this.sarType
})) }))
saveTaskForPub(_formData).then(res => { saveTaskForPub(_formData).then(res => {
this.saveLoading = false this.saveLoading = false
@@ -394,14 +393,19 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum console.log(data);
this.form.itemsName = data.itemsName this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsNum1 = data.itemsNum1 this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsName1 = data.itemsName1 this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.sarType = data.standInData this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData || data.sarType
this.json = data this.json = data
var arr = [] let arr
arr = JSON.parse(data.itemList) if (typeof(data.itemList) === 'string') {
arr = JSON.parse(data.itemList)
} else {
arr = data.itemList
}
arr.forEach(item => { arr.forEach(item => {
item.zxUserId = '' item.zxUserId = ''
item.zxUserIdName = '' item.zxUserIdName = ''
@@ -288,6 +288,7 @@
</el-table> </el-table>
</div> </div>
<ProcessFooter <ProcessFooter
show-save
show-submit show-submit
:submitLoading="isSubmit" :submitLoading="isSubmit"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@@ -377,7 +378,7 @@
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
import {inboundLiaisonDetail,processCreateStand} from 'api/process' import {inboundLiaisonDetail,processCreateStand,saveTaskForPub} from 'api/process'
export default { export default {
name: "bzjdStep3", name: "bzjdStep3",
@@ -488,7 +489,24 @@
handleTabs(name) { handleTabs(name) {
this.active = 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() { handleSubmit() {
this.$refs['bzzqyjForm'].validate((valid) => { this.$refs['bzzqyjForm'].validate((valid) => {
if (valid) { if (valid) {
@@ -558,11 +576,12 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum console.log(data);
this.form.itemsName = data.itemsName this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsNum1 = data.itemsNum1 this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsName1 = data.itemsName1 this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.sarType = data.standInData this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData || data.sarType
this.json = data this.json = data
let itemList let itemList
if (typeof (data.itemList) == 'string') { if (typeof (data.itemList) == 'string') {
@@ -378,11 +378,11 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsName = data.itemsName this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsNum1 = data.itemsNum1 this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.form.itemsName1 = data.itemsName1 this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData this.sarType = data.standInData || data.sarType
this.json = data this.json = data
this.itemList = data.itemList this.itemList = data.itemList
this.loading = false this.loading = false
@@ -378,11 +378,11 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsName = data.itemsName this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsNum1 = data.itemsNum1 this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.form.itemsName1 = data.itemsName1 this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData this.sarType = data.standInData || data.sarType
this.json = data this.json = data
this.itemList = data.itemList this.itemList = data.itemList
this.loading = false this.loading = false
@@ -377,11 +377,11 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.itemsNum = data.itemsNum this.form.itemsNum = data.itemsNum || data.form.itemsNum
this.form.itemsName = data.itemsName this.form.itemsName = data.itemsName || data.form.itemsName
this.form.itemsNum1 = data.itemsNum1 this.form.itemsNum1 = data.itemsNum1 || data.form.itemsNum1
this.form.itemsName1 = data.itemsName1 this.form.itemsName1 = data.itemsName1 || data.form.itemsName1
this.sarType = data.standInData this.sarType = data.standInData || data.sarType
this.json = data this.json = data
this.itemList = data.itemList this.itemList = data.itemList
this.loading = false this.loading = false
@@ -1035,7 +1035,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -595,7 +595,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -994,6 +994,8 @@ export default {
}, },
// 点击批量删除事件 // 点击批量删除事件
deleteList() { deleteList() {
console.log(this.selectList);
console.log(this.dataList);
if (this.selectList.length < 1) { if (this.selectList.length < 1) {
this.$message.warning("请选择一条数据进行删除"); this.$message.warning("请选择一条数据进行删除");
} else { } else {
@@ -1007,10 +1009,12 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
console.log(index);
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
console.log(this.dataList);
} }
exits.push(item); exits.push(item);
}); });
@@ -598,7 +598,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -263,7 +263,6 @@
this.form.endTime = data.endTime this.form.endTime = data.endTime
this.form.cname = data.cname this.form.cname = data.cname
this.json = data this.json = data
console.log(data);
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -317,7 +317,6 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
console.log(data);
this.form.cid = data.cid this.form.cid = data.cid
this.form.endTime = data.endTime this.form.endTime = data.endTime
this.form.cname = data.cname this.form.cname = data.cname
@@ -394,7 +394,7 @@ export default {
this.deleteDataList.map(item => { this.deleteDataList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -430,7 +430,7 @@ export default {
this.selectedList.map(item => { this.selectedList.map(item => {
let addList; let addList;
addList = this.dataList.findIndex(items => { addList = this.dataList.findIndex(items => {
return items.id == item.id return items.id === item.id
}) })
if(addList > -1){ if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection() // this.$refs.accessTypeSelect.clearSelection()
@@ -631,7 +631,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.productLine = item; return items.productLine === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -605,7 +605,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.productLine = item; return items.productLine === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -450,8 +450,13 @@ export default {
}, { }, {
_this: this _this: this
}, res => { }, res => {
this.ProjectDatas = res.data.Maintenance.records; if(res.data === null){
this.total = res.data.Maintenance.total; this.ProjectDatas = ''
this.total = 0
}else{
this.ProjectDatas = res.data.Maintenance.records;
this.total = res.data.Maintenance.total;
}
}); });
}, },
@@ -44,7 +44,7 @@
</process-title> </process-title>
<div class="tableTitle"> <div class="tableTitle">
<div class="tableButton"> <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>
</div> </div>
<el-table <el-table
@@ -94,11 +94,16 @@
> >
</el-table-column> </el-table-column>
<el-table-column label="责任人" prop="workPeople" align="center"> <el-table-column label="责任人" prop="workPeople" align="center">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.workPeople">
<div :class="{'fileClass': !scope.row.workPeople}"> <el-input v-model="scope.row.workPeopleId" style="display: none;" />
{{ scope.row.workPeople ? scope.row.workPeople : "" }} <el-input v-model="scope.row.workPeople" placeholder="请选择分发责任人"
</div> @click.native="choiceZRRS(scope.row, 1, scope.$index)" />
</template> </template>
<!-- <template slot-scope="scope">-->
<!-- <div :class="{'fileClass': !scope.row.workPeople}">-->
<!-- {{ scope.row.workPeople ? scope.row.workPeople : "" }}-->
<!-- </div>-->
<!-- </template>-->
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@@ -253,7 +258,8 @@ export default {
detailData: [], //流程历史数据 detailData: [], //流程历史数据
userId: this.$store.getters.userInfo.userId, userId: this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId pId: this.$route.query.prcId,
selectedId:'',
}; };
}, },
methods: { methods: {
@@ -316,7 +322,6 @@ export default {
taskIds: this.taskIds, taskIds: this.taskIds,
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
console.log(res.mesg);
if (res) { if (res) {
const processForm = JSON.parse(res.mesg); const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm); this.getFormFieldList(processForm);
@@ -408,14 +413,27 @@ export default {
}, e => { }, e => {
}); });
}, },
//批量分发按钮 //批量分发按钮
batchOperation(id) { choiceZRRS(row, type, index) {
if (this.selectList.length === 0) { this.selectedId=row.id
this.$message.warning("请至少选择一条数据进行批量分发"); this.type = type;
} else { if (type === 1) {
this.drawerTitle = "选择责任人";
this.nodeList = []; this.nodeList = [];
this.nodeList.push(id); this.zrIndex = index;
this.zrType = type;
this.nodeList.push(row);
this.modalshowflag = true; 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) { checkedRole(data) {
console.log(data[0].name); //单选操作
// 选取负责人时的操作 if (this.type === 1) {
let deposit = new Map(); this.dataList.forEach(item => {
let mis2 = new Map(); if(item.children){
this.selectList.forEach(item => { item.children.forEach(items => {
item.workPeople = data[0].name; if(items.id === this.selectedId){
item.workPeopleId = data[0].id; items.workPeople = data[0].name
if (item.children) { items.workPeopleId = data[0].id
item.children.forEach(items => { // this.$set(items,'workPeople',data[0].name)
deposit.set(items.standId, items); //this.$set(items,'workPeopleId',data[0].id)
}); }
} })
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);
} }
} else { })
if (item.children) { this.dataList = JSON.parse(JSON.stringify(this.dataList))
item.children.forEach((items, childIndex) => { } else if (this.type === 2) {
if (deposit.get(items.standId)) { this.selectList.forEach(item =>{
const childItems = JSON.parse(JSON.stringify(items)); this.dataList.map(items=>{
childItems.workPeopleId = deposit.get(items.standId).workPeopleId; if(item.id==items.id){
childItems.workPeople = deposit.get(items.standId).workPeople; items.workPeople = data[0].name
this.$set(this.dataList[index].children, childIndex, childItems); items.workPeopleId = data[0].id
} }
}); if(items.children.length){
} items.children.map(childrenItem=>{
} if(childrenItem.id==item.id){
}); childrenItem.workPeople = data[0].name
this.$refs.myTable.clearSelection(); childrenItem.workPeopleId = data[0].id
}
})
}
})
})
this.dataList = JSON.parse(JSON.stringify(this.dataList))
}
this.modalshowflag = false; this.modalshowflag = false;
}, },
cancleUserInfo() { cancleUserInfo() {
@@ -1124,7 +1124,7 @@ export default {
this.selectedAccInfoSearchList.map(item => { this.selectedAccInfoSearchList.map(item => {
let addList; let addList;
addList = this.sarAccessInfoList.findIndex(items => { addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id return items.id === item.id
}) })
if(addList > -1){ if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection() // this.$refs.accessTypeSelect.clearSelection()
@@ -1211,7 +1211,7 @@ export default {
this.sarAccessInfoListArry.map(item => { this.sarAccessInfoListArry.map(item => {
let index let index
index = this.sarAccessInfoList.findIndex(items => { index = this.sarAccessInfoList.findIndex(items => {
return items.id = item return items.id === item
}) })
if (index > -1) { if (index > -1) {
this.sarAccessInfoList.splice(index, 1) this.sarAccessInfoList.splice(index, 1)
@@ -1093,7 +1093,7 @@ export default {
let addList; let addList;
addList = this.sarAccessInfoList.findIndex(items => { addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id return items.id === item.id
}) })
if(addList > -1){ if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection() // this.$refs.accessTypeSelect.clearSelection()
@@ -1183,7 +1183,7 @@ export default {
this.sarAccessInfoListArry.map(item => { this.sarAccessInfoListArry.map(item => {
let index let index
index = this.sarAccessInfoList.findIndex(items => { index = this.sarAccessInfoList.findIndex(items => {
return items.id = item return items.id === item
}) })
if (index > -1) { if (index > -1) {
this.sarAccessInfoList.splice(index, 1) this.sarAccessInfoList.splice(index, 1)
@@ -1064,7 +1064,7 @@ export default {
this.selectedAccInfoSearchList.map(item => { this.selectedAccInfoSearchList.map(item => {
let addList; let addList;
addList = this.sarAccessInfoList.findIndex(items => { addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id return items.id === item.id
}) })
if(addList > -1){ if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection() // this.$refs.accessTypeSelect.clearSelection()
@@ -1154,7 +1154,7 @@ export default {
this.sarAccessInfoListArry.map(item => { this.sarAccessInfoListArry.map(item => {
let index let index
index = this.sarAccessInfoList.findIndex(items => { index = this.sarAccessInfoList.findIndex(items => {
return items.id = item return items.id === item
}) })
if (index > -1) { if (index > -1) {
this.sarAccessInfoList.splice(index, 1) this.sarAccessInfoList.splice(index, 1)
@@ -631,7 +631,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -743,6 +743,11 @@ export default {
}, { }, {
_this: this _this: this
}, res => { }, res => {
if(res.data === null){
this.standardData = ''
this.totalDo =''
this.standModel = true;
}
this.standardData = res.data.records this.standardData = res.data.records
this.totalDo = res.data.total this.totalDo = res.data.total
this.standModel = true; this.standModel = true;
@@ -2533,6 +2533,11 @@
/deep/.highlight-class { /deep/.highlight-class {
color: red !important; color: red !important;
} }
/deep/.pagination{
position: static !important;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
}
.standard-search { .standard-search {
padding: 6px 26px; padding: 6px 26px;
@borderColor: #BFBFBF; @borderColor: #BFBFBF;
@@ -2849,11 +2854,6 @@
} }
} }
} }
.pagination{
position: static;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 20px;
}
} }
} }
.content-right{ .content-right{