加入标准化协会信息保存

This commit is contained in:
宋伟佳
2021-12-28 11:30:29 +08:00
parent d477da1d2d
commit e9b14f1682
@@ -49,7 +49,7 @@
:value="item.id">
</el-option>
</el-select>
<el-select v-if="wbbzform.associationName !== '' && wbbzform.committee !== ''" v-model="wbbzform.workingGroup" placeholder="请选择工作组">
<el-select v-if="wbbzform.associationName !== '' && wbbzform.committee !== ''" @change="comityChangeTwo" v-model="wbbzform.workingGroup" placeholder="请选择工作组">
<el-option
v-for="item in comityOptionsOneThree"
:key="item.id"
@@ -127,7 +127,7 @@
<template slot-scope="scope">
<el-input v-model="scope.row.workPeopleId" style="display: none;" readonly/>
<el-input v-model="scope.row.workPeople" placeholder="请选择分发责任人"
@click.native="choiceZRRS(scope.row, scope.$index)" readonly/>
@click.native="choiceZRRS(scope.row, scope.$index)" readonly/>
</template>
</el-table-column>
<el-table-column
@@ -172,7 +172,7 @@
width="300"
align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.accounts" placeholder="请输入账户"></el-input>
<el-input v-model="scope.row.accounts" placeholder="请输入账户"></el-input>
</template>
</el-table-column>
<el-table-column
@@ -205,7 +205,6 @@
row-key="id">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="contactPerson"
label="协会联络人"
align="center">
<template slot-scope="scope">
@@ -217,7 +216,6 @@
</template>
</el-table-column>
<el-table-column
prop="telephone"
label="电话"
align="center">
<template slot-scope="scope">
@@ -229,7 +227,6 @@
</template>
</el-table-column>
<el-table-column
prop="mailbox"
label="邮箱"
align="center">
<template slot-scope="scope">
@@ -369,6 +366,7 @@ export default {
recordLoading: false,
loading: false,
modalshowflag: false,
fileIds: "",
comityOptionsOne: [], //工作组数据
comityOptionsTwo: [], //分标委数据
comityOptionsOneThree: [], //工作组数据
@@ -441,6 +439,7 @@ export default {
bpnId: this.$route.query.bpnId
}).then(res => {
let mes = JSON.parse(res.mes);
console.log(mes);
this.wbbzform = mes.form
this.associationData = mes.form.associationData
this.getFileInfo();
@@ -471,7 +470,7 @@ export default {
this.$nextTick(() => {
res.data.map(item => {
// 赋值要回显的上传文件内容
this.fileList.push({
this.fileInfoList.push({
name: item.oldFileName,
uid: item.uid,
status: item.status,
@@ -486,32 +485,62 @@ export default {
* @description: 动态表单读取
*/
getFormFieldList(item) {
console.log(item);
this.$nextTick(() => {
if(!item.directorUser){
this.wbbzform = JSON.parse(JSON.stringify(item));
this.associationData = item.associationData
this.participantsData = item.participantsData
this.wbbzform = JSON.parse(JSON.stringify(item.form));
this.wbbzform.comityOptionsOne.forEach(item =>{
if(this.wbbzform.associationName === item.id){
this.wbbzform.associationName = item.name
}
})
this.wbbzform.comityOptionsTwo.forEach(item =>{
if(this.wbbzform.committee === item.id){
this.wbbzform.committee = item.name
}
})
this.wbbzform.comityOptionsOneThree.forEach(item =>{
if(this.wbbzform.workingGroup === item.id){
this.wbbzform.workingGroup = item.name
}
})
if (item.form.associationData) {
this.associationData = item.form.associationData
}
if (item.form.participantsData) {
this.participantsData = item.form.participantsData
}
item.form.fileName.forEach(fileId => {
this.fileIds = fileId.id
this.getFileInfo();
})
}else{
this.wbbzform = JSON.parse(JSON.stringify(item));
if (item.associationData) {
this.associationData = item.associationData
}
if (item.participantsData) {
this.participantsData = item.participantsData
}
}
});
},
choiceZRRS(row, index) {
this.selectedId = index;
this.drawerTitle = "选择责任人";
this.nodeList = [];
this.zrIndex = index;
this.nodeList.push(row);
this.modalshowflag = true;
},
this.selectedId = index;
this.drawerTitle = "选择责任人";
this.nodeList = [];
this.zrIndex = index;
this.nodeList.push(row);
this.modalshowflag = true;
},
checkedRole(data){
if(this.participantsData.length > 1){
let parList = data
this.participantsData.forEach(item =>{
parList.forEach(items => {
if(items.name === item.workPeople){
this.$message.warning('请勿重复添加参与人')
return
this.$message.warning('请勿重复添加参与人')
return
}else{
}
})
@@ -534,7 +563,7 @@ export default {
//不备案
handleRecord(){
this.recordLoading = true
this.dlFlag = '0',
this.dlFlag = '0'
this.wbbzform.commentText = this.commentText;
this.wbbzform.participantsData = this.participantsData
this.wbbzform.associationData = this.associationData
@@ -559,11 +588,17 @@ export default {
handleSave() {
this.saveLoading = true
this.wbbzform.fileName = this.fileInfoList
this.wbbzform.commentText = this.commentText;
this.wbbzform.participantsData = this.participantsData
this.wbbzform.associationData = this.associationData
this.wbbzform.comityOptionsOne = this.comityOptionsOne
this.wbbzform.comityOptionsTwo = this.comityOptionsTwo
this.wbbzform.comityOptionsOneThree = this.comityOptionsOneThree
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
roleList: this.roleForm,
wbbzform: this.wbbzform,
form: this.wbbzform,
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
@@ -646,11 +681,12 @@ export default {
},
//添加协会信息
addSociety(){
var list = {
let list = {
contactPerson: this.contactPerson,
telephone: this.telephone,
mailbox: this.mailbox,
}
console.log(this.associationData);
this.associationData.push(list)
},
//批量删除协会信息
@@ -708,6 +744,7 @@ export default {
this.comityOptionsOne.forEach(item => {
if (item.children !== null && item.id === this.wbbzform.associationName) {
this.comityOptionsTwo = item.children
this.$forceUpdate()
}
})
},
@@ -717,9 +754,13 @@ export default {
this.comityOptionsTwo.forEach(item => {
if (item.children !== null && item.id === this.wbbzform.committee) {
this.comityOptionsOneThree = item.children
this.$forceUpdate()
}
})
},
comityChangeTwo(){
this.$forceUpdate()
},
},
mounted() {
/* 获取标准法规工作组数据 */