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