修改法规清单
This commit is contained in:
@@ -1178,7 +1178,8 @@
|
||||
rowKeysSuccessList: [],
|
||||
selectedRowKeysList: [],
|
||||
rowKeysWarningList: [],
|
||||
rolecode: false
|
||||
rolecode: false,
|
||||
dataWarningList: []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2081,9 +2082,9 @@
|
||||
})
|
||||
},
|
||||
|
||||
startProcess(value) {
|
||||
startProcess(value,type) {
|
||||
let query = {
|
||||
type: 1,
|
||||
type: type,
|
||||
projectLawsInvnetoryList: value,
|
||||
projectNameId: this.$route.query.projectNameId,
|
||||
projectName: this.$route.query.projectName,
|
||||
@@ -2091,10 +2092,10 @@
|
||||
}
|
||||
postAction('/workFlow/startProcess', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.visible = false
|
||||
this.selectedRowKeys = []
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.confirmLoading = false
|
||||
// this.visible = false
|
||||
// this.selectedRowKeys = []
|
||||
// this.$message.success(this.$t('OperationSuccessful'))
|
||||
// this.confirmLoading = false
|
||||
this.completeTask(value, res.result)
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
@@ -2103,47 +2104,38 @@
|
||||
},
|
||||
|
||||
completeTask(value, taskId, index) {
|
||||
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
value.handlingTime = handlingTime
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
userid: this.userInfo().id,
|
||||
taskId: taskId,
|
||||
json: JSON.stringify(value).replace(/\"/g, '\'')
|
||||
}
|
||||
postAction('/workFlow/completeTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
if (index == this.TaskSuccessList.length) {
|
||||
this.visible = false
|
||||
this.selectedRowKeys = []
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.confirmLoading = false
|
||||
this.getList()
|
||||
let that = this
|
||||
if (this.TaskWarningList.length > 0) {
|
||||
this.$warning({
|
||||
content: (
|
||||
< div >
|
||||
{ that.TaskWarningList }
|
||||
< /div>
|
||||
)
|
||||
})
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
value.handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
})
|
||||
let query = {
|
||||
userid: this.userInfo().id,
|
||||
taskId: taskId,
|
||||
json: JSON.stringify(value).replace(/\"/g, '\'')
|
||||
}
|
||||
postAction('/workFlow/completeTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
// this.visible = false
|
||||
// this.selectedRowKeys = []
|
||||
// this.$message.success(this.$t('OperationSuccessful'))
|
||||
// this.confirmLoading = false
|
||||
// this.getList()
|
||||
resolve(res)
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
submitOrSendBackClick(num) {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.detailedWarningList = []
|
||||
this.dataWarningList = []
|
||||
let dataSource = []
|
||||
let idList = []
|
||||
this.rowKeysSuccessList = []
|
||||
@@ -2162,6 +2154,8 @@
|
||||
} else {
|
||||
this.detailedWarningList.push(
|
||||
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
|
||||
this.dataWarningList.push(
|
||||
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
|
||||
}
|
||||
}
|
||||
if (idList && idList.length > 0) {
|
||||
@@ -2186,7 +2180,7 @@
|
||||
let designList = []
|
||||
let verifyList = []
|
||||
let detailedWarningList = []
|
||||
this.detailedWarningList = []
|
||||
this.detailedWarningList = this.dataWarningList || []
|
||||
let _this = this
|
||||
_this.$destroyAll()
|
||||
if (num == 1) {
|
||||
@@ -2263,6 +2257,11 @@
|
||||
}
|
||||
if (dataList[i].designDeliverableType && dataList[i].designDutyId && dataList[i].designDueDate) {
|
||||
_this.startProcess(dataList[i], 2)
|
||||
Promise.all(_this.completeTask()).then((res) => {
|
||||
console.log(res)
|
||||
}).catch(error => {
|
||||
console.log('error', error)
|
||||
})
|
||||
}
|
||||
if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) {
|
||||
_this.startProcess(dataList[i], 2)
|
||||
|
||||
Reference in New Issue
Block a user