This commit is contained in:
zhutianqi
2022-01-11 16:50:26 +08:00
parent 0aa0f1e1af
commit 75aa9e508e
5 changed files with 89 additions and 77 deletions
@@ -266,7 +266,7 @@
@checkedRole="checkedRole" @checkedRole="checkedRole"
></Role-tree> ></Role-tree>
<el-drawer <el-drawer
title="编辑" :title="modaltitle2"
:visible.sync="modalshowflag2" :visible.sync="modalshowflag2"
:wrapperClosable="false" :wrapperClosable="false"
size="800px"> size="800px">
@@ -336,6 +336,8 @@
name: "bzzqyjStep3", name: "bzzqyjStep3",
data() { data() {
return { return {
modaltitle2: '',
addType: '',
onlyKey: '', onlyKey: '',
commentText3: '', commentText3: '',
itermsConditionsFlag: false, itermsConditionsFlag: false,
@@ -349,6 +351,10 @@
oldText: '', oldText: '',
newText: '', newText: '',
reason: '', reason: '',
id: '',
department: this.$store.getters.userInfo.upDeptName,
responUserName: this.$store.getters.userInfo.userName,
responUser: this.$store.getters.userInfo.userId
}, },
drawerModal: false, drawerModal: false,
todoId: '', todoId: '',
@@ -426,7 +432,11 @@
} }
} }
}, },
saveUserInfo2 () { saveUserInfo2 () {
if (this.addType === 'add') {
this.data.push(this.editForm)
}
for( let a = 0; a < this.data.length; a++) { for( let a = 0; a < this.data.length; a++) {
if (this.data[a].id === this.itemId) { if (this.data[a].id === this.itemId) {
this.data[a].chapterNumber = this.editForm.chapterNumber this.data[a].chapterNumber = this.editForm.chapterNumber
@@ -438,10 +448,27 @@
} }
this.modalshowflag2 = false this.modalshowflag2 = false
}, },
cancleUserInfo2 () { addModal() {
this.modalshowflag2 = false var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
this.itemId = id
this.editForm = {
chapterNumber: '',
chapterName: '',
oldText: '',
newText: '',
reason: '',
id: id,
department: this.$store.getters.userInfo.upDeptName,
responUserName: this.$store.getters.userInfo.userName,
responUser: this.$store.getters.userInfo.userId
}
this.addType = 'add'
this.modaltitle2 = '新增'
this.modalshowflag2 = true
}, },
itemEdit (row) { itemEdit (row) {
this.addType = 'edit'
this.modaltitle2 = '编辑'
this.itemId = row.id this.itemId = row.id
this.modalshowflag2 = true this.modalshowflag2 = true
this.editForm = { this.editForm = {
@@ -452,6 +479,10 @@
reason: row.reason, reason: row.reason,
} }
}, },
cancleUserInfo2 () {
this.modalshowflag2 = false
},
downloadFile (attId) { downloadFile (attId) {
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
}, },
@@ -529,31 +560,6 @@
this.$message.warning('请选择要删除的数据') this.$message.warning('请选择要删除的数据')
} }
}, },
addModal() {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
var json = {
chapterNumber: '',
chapterName: '',
commentText: '',
oldText: '',
newText: '',
reason: '',
id: id,
department: this.$store.getters.userInfo.upDeptName,
responUserName: this.$store.getters.userInfo.userName,
responUser: this.$store.getters.userInfo.userId
}
this.data.push(json)
this.itemId = id
this.editForm = {
chapterNumber: '',
chapterName: '',
oldText: '',
newText: '',
reason: '',
}
this.modalshowflag2 = true
},
handleTabs(name) { handleTabs(name) {
this.active = name this.active = name
}, },
@@ -285,7 +285,7 @@
:nodeList="nodeList" :nodeList="nodeList"
></Role-tree> ></Role-tree>
<el-drawer <el-drawer
title="编辑" :title="modaltitle2"
:visible.sync="modalshowflag2" :visible.sync="modalshowflag2"
:wrapperClosable="false" :wrapperClosable="false"
size="800px"> size="800px">
@@ -346,6 +346,8 @@ export default {
name: "bzzqyjStep4", name: "bzzqyjStep4",
data() { data() {
return { return {
modaltitle2: '',
addType: '',
commentText4: '', commentText4: '',
acceptShow: false, acceptShow: false,
idList: [], idList: [],
@@ -450,31 +452,6 @@ export default {
this.$message.warning('请选择要删除的数据') this.$message.warning('请选择要删除的数据')
} }
}, },
addModal() {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
var json = {
chapterNumber: '',
chapterName: '',
commentText: '',
oldText: '',
newText: '',
reason: '',
id: id,
department: this.$store.getters.userInfo.institutionName,
responUserName: this.$store.getters.userInfo.userName,
responUser: this.$store.getters.userInfo.userId
}
this.data.push(json)
this.itemId = id
this.editForm = {
chapterNumber: '',
chapterName: '',
oldText: '',
newText: '',
reason: '',
}
this.modalshowflag2 = true
},
getItemList (standId, fileType) { // 查询分解单条款数据 getItemList (standId, fileType) { // 查询分解单条款数据
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', { this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
standId: standId, standId: standId,
@@ -497,6 +474,9 @@ export default {
} }
}, },
saveUserInfo2 () { saveUserInfo2 () {
if (this.addType === 'add') {
this.data.push(this.editForm)
}
for( let a = 0; a < this.data.length; a++) { for( let a = 0; a < this.data.length; a++) {
if (this.data[a].id === this.itemId) { if (this.data[a].id === this.itemId) {
this.data[a].chapterNumber = this.editForm.chapterNumber this.data[a].chapterNumber = this.editForm.chapterNumber
@@ -508,10 +488,27 @@ export default {
} }
this.modalshowflag2 = false this.modalshowflag2 = false
}, },
cancleUserInfo2 () { addModal() {
this.modalshowflag2 = false var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
this.itemId = id
this.editForm = {
chapterNumber: '',
chapterName: '',
oldText: '',
newText: '',
reason: '',
id: id,
department: this.$store.getters.userInfo.upDeptName,
responUserName: this.$store.getters.userInfo.userName,
responUser: this.$store.getters.userInfo.userId
}
this.addType = 'add'
this.modaltitle2 = '新增'
this.modalshowflag2 = true
}, },
itemEdit (row) { itemEdit (row) {
this.addType = 'edit'
this.modaltitle2 = '编辑'
this.itemId = row.id this.itemId = row.id
this.modalshowflag2 = true this.modalshowflag2 = true
this.editForm = { this.editForm = {
@@ -522,6 +519,9 @@ export default {
reason: row.reason, reason: row.reason,
} }
}, },
cancleUserInfo2 () {
this.modalshowflag2 = false
},
checkedRole2(data) { checkedRole2(data) {
this.form.spId = data[0].id this.form.spId = data[0].id
this.form.spName = data[0].name this.form.spName = data[0].name
@@ -598,7 +598,8 @@
this.form.textType = data.form ? data.form.textType : data.textType this.form.textType = data.form ? data.form.textType : data.textType
this.form.cid = data.form ? data.form.cid : data.cid this.form.cid = data.form ? data.form.cid : data.cid
this.form.endTime = data.form ? data.form.endTime : data.endTime this.form.endTime = data.form ? data.form.endTime : data.endTime
data.info.forEach(item => { let newArr = data.info ? data.info : data.form.data
newArr.forEach(item => {
if (!item.source) { if (!item.source) {
item.source = '1' item.source = '1'
} }
@@ -609,7 +610,7 @@
}); });
this.json = data; this.json = data;
this.getItemList(data.standId,this.form.textValue) this.getItemList(data.standId,this.form.textValue)
this.data = data.info this.data = newArr
if (data.introduce) { if (data.introduce) {
} else { } else {
this.$http.get("slrs/sar-public-idea-all/getPublicIdea", { this.$http.get("slrs/sar-public-idea-all/getPublicIdea", {
@@ -340,8 +340,8 @@
user7Name: '' user7Name: ''
}, },
formRules: { formRules: {
responUserList: [ user7: [
{required: true, message: "请选择责任人", trigger: "change"} {required: true, message: "请选择审批领导", trigger: "change"}
] ]
}, },
json: {} json: {}
@@ -474,23 +474,29 @@
this.active = name; this.active = name;
}, },
handleSubmit() { handleSubmit() {
this.isSubmit = true; this.$refs['bzzqyjForm'].validate((valid) => {
var json = this.json; if (valid) {
json.hqFlag = '0'; this.isSubmit = true;
json.commentText = this.commentText6; var json = this.json;
json.user7 = this.form.user7; json.hqFlag = '0';
json.user7Name = this.form.user7Name; json.commentText = this.commentText6;
this.$http.post("lawss/activiti/completeTask", { json.user7 = this.form.user7;
json: JSON.stringify(json), json.user7Name = this.form.user7Name;
taskId: this.taskIds, this.$http.post("lawss/activiti/completeTask", {
userId: this.$store.getters.userInfo.userId json: JSON.stringify(json),
}, {}, res => { taskId: this.taskIds,
if (res.success) { userId: this.$store.getters.userInfo.userId
this.$message.success("提交成功"); }, {}, res => {
this.$router.push("/processCenter"); if (res.success) {
this.$message.success("提交成功");
this.$router.push("/processCenter");
}
this.isSubmit = false;
});
} else {
this.$message.warning('请选择审批领导')
} }
this.isSubmit = false; })
});
}, },
handleSubmitNo() { handleSubmitNo() {
if (this.commentText6) { if (this.commentText6) {
@@ -249,7 +249,6 @@
show-submit show-submit
:submitLoading="isSubmit" :submitLoading="isSubmit"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@save="handleSave"
@submit="handleSubmit" @submit="handleSubmit"
show-back show-back
@back="handleSubmitNo" @back="handleSubmitNo"