@@ -205,11 +205,7 @@ export default { | |||||
if (!code) { | if (!code) { | ||||
return [] | return [] | ||||
} | } | ||||
return await this.HTTP_GET('learun/adms/datasource/map', { | |||||
code, | |||||
ver: '' | |||||
}) | |||||
return await this.HTTP_GET('learun/adms/datasource/map', {code,ver: ''}) | |||||
}, | }, | ||||
// 拉取指定规则编号的表单编码数据 | // 拉取指定规则编号的表单编码数据 | ||||
@@ -64,8 +64,7 @@ export default { | |||||
} | } | ||||
const list = this.GET_GLOBAL(this.type) | const list = this.GET_GLOBAL(this.type) | ||||
let values = this.value.split(",") | |||||
let values = this.value instanceof Array?this.value:this.value.split(",") | |||||
if(values.length>1){ | if(values.length>1){ | ||||
const orgItems = values.map(t=>list[t]?list[t].name:'').toString() | const orgItems = values.map(t=>list[t]?list[t].name:'').toString() | ||||
return orgItems | return orgItems | ||||
@@ -97,6 +97,7 @@ export default { | |||||
getFormData(ProgressId){ | getFormData(ProgressId){ | ||||
return this.HTTP_GET("learun/news/shList",{ProgressId},"加载数据时出错").then(async res=>{ | return this.HTTP_GET("learun/news/shList",{ProgressId},"加载数据时出错").then(async res=>{ | ||||
if(res){ | if(res){ | ||||
res.F_SourceName = res.F_SourceName&&this.GET_GLOBAL('department')[res.F_SourceName]? this.GET_GLOBAL('department')[res.F_SourceName].name : res.F_SourceName | |||||
this.formData = res | this.formData = res | ||||
let fileList = await this.getFileListById(res.F_NewsImage) | let fileList = await this.getFileListById(res.F_NewsImage) | ||||
if(fileList&&fileList.length){ | if(fileList&&fileList.length){ | ||||
@@ -118,7 +119,9 @@ export default { | |||||
processId: currentTask.F_ProcessId, | processId: currentTask.F_ProcessId, | ||||
taskId: currentTask.F_Id, | taskId: currentTask.F_Id, | ||||
formreq: postData.formreq, | formreq: postData.formreq, | ||||
taskName: this.currentTask.F_Title | |||||
taskName: this.currentTask.F_Title, | |||||
currentNode:this.currentNode, | |||||
code:this.code||'' | |||||
} | } | ||||
// 不是加签 | // 不是加签 | ||||
if (action.code !== '__sign__') { | if (action.code !== '__sign__') { | ||||
@@ -215,7 +215,9 @@ export default { | |||||
StuNo:[], | StuNo:[], | ||||
}, | }, | ||||
} | |||||
} , | |||||
StuNoAll:[], | |||||
} | } | ||||
}, | }, | ||||
@@ -259,7 +261,8 @@ export default { | |||||
this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | |||||
this.StuNoAll = JSON.parse(JSON.stringify(this.dataSource.Acc_DailyAssess.StuNo)) | |||||
}), | }), | ||||
@@ -442,14 +445,17 @@ export default { | |||||
}, | }, | ||||
//多条件查询:班级改变事件 | //多条件查询:班级改变事件 | ||||
async ClassNoChange(){ | async ClassNoChange(){ | ||||
if (this.getValue('Acc_DailyAssess.ClassNo') != null && this.getValue('Acc_DailyAssess.ClassNo')!=undefined && this.getValue('Acc_DailyAssess.ClassNo') != "") { | |||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
this.dataSource.Acc_DailyAssess.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_DailyAssess.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) | |||||
}) | |||||
if (!this.getValue('Acc_DailyAssess.ClassNo')) { | |||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_DailyAssess.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// }) | |||||
this.dataSource.Acc_DailyAssess.StuNo = this.StuNoAll | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// }) | |||||
this.dataSource.Acc_DailyAssess.StuNo = this.StuNoAll.filter(t=>t.classno == this.getValue('Acc_DailyAssess.ClassNo')) | |||||
} | } | ||||
this.setValue('Acc_DailyAssess.StuNo',''); | this.setValue('Acc_DailyAssess.StuNo',''); | ||||
}, | }, | ||||
@@ -157,7 +157,9 @@ export default { | |||||
StuNo:[], | StuNo:[], | ||||
}, | }, | ||||
} | |||||
} , | |||||
StuNoAll:[], | |||||
} | } | ||||
}, | }, | ||||
@@ -189,7 +191,8 @@ export default { | |||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | |||||
this.StuNoAll = JSON.parse(JSON.stringify(this.dataSource.Acc_PublicAreaHealth.StuNo)) | |||||
}), | }), | ||||
@@ -332,14 +335,16 @@ export default { | |||||
}, | }, | ||||
//多条件查询:班级改变事件 | //多条件查询:班级改变事件 | ||||
async ClassNoChange(){ | async ClassNoChange(){ | ||||
if (this.getValue('Acc_PublicAreaHealth.ClassNo') != null && this.getValue('Acc_PublicAreaHealth.ClassNo')!=undefined && this.getValue('Acc_PublicAreaHealth.ClassNo') != "") { | |||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_PublicAreaHealth.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) | |||||
}) | |||||
if (!this.getValue('Acc_PublicAreaHealth.ClassNo')) { | |||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_PublicAreaHealth.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// }) | |||||
this.dataSource.Acc_PublicAreaHealth.StuNo = this.StuNoAll | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// }) | |||||
this.dataSource.Acc_PublicAreaHealth.StuNo = this.StuNoAll.filter(t=>t.classno == this.getValue('Acc_PublicAreaHealth.ClassNo')) | |||||
} | } | ||||
this.setValue('Acc_PublicAreaHealth.StuNo',''); | this.setValue('Acc_PublicAreaHealth.StuNo',''); | ||||
}, | }, | ||||
@@ -157,7 +157,9 @@ export default { | |||||
StuNo:[], | StuNo:[], | ||||
}, | }, | ||||
} | |||||
} , | |||||
StuNoAll:[], | |||||
} | } | ||||
}, | }, | ||||
@@ -189,7 +191,8 @@ export default { | |||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
this.dataSource.Acc_StuDayRoutine.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | |||||
this.StuNoAll = JSON.parse(JSON.stringify(this.dataSource.Acc_StuDayRoutine.StuNo)) | |||||
}), | }), | ||||
@@ -332,14 +335,16 @@ export default { | |||||
}, | }, | ||||
//多条件查询:班级改变事件 | //多条件查询:班级改变事件 | ||||
async ClassNoChange(){ | async ClassNoChange(){ | ||||
if (this.getValue('Acc_StuDayRoutine.ClassNo') != null && this.getValue('Acc_StuDayRoutine')!=undefined && this.getValue('Acc_StuDayRoutine.ClassNo') != "") { | |||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
this.dataSource.Acc_StuDayRoutine.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_StuDayRoutine.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) | |||||
}) | |||||
if (!this.getValue('Acc_StuDayRoutine.ClassNo')) { | |||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_StuDayRoutine.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_StuDayRoutine.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// }) | |||||
this.dataSource.Acc_StuDayRoutine.StuNo = this.StuNoAll | |||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
this.dataSource.Acc_StuDayRoutine.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
}) | |||||
// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | |||||
// this.dataSource.Acc_StuDayRoutine.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | |||||
// }) | |||||
this.dataSource.Acc_StuDayRoutine.StuNo = this.StuNoAll.filter(t=>t.classno == this.getValue('Acc_StuDayRoutine.ClassNo')) | |||||
} | } | ||||
this.setValue('Acc_StuDayRoutine.StuNo',''); | this.setValue('Acc_StuDayRoutine.StuNo',''); | ||||
}, | }, | ||||
@@ -397,7 +397,7 @@ export default { | |||||
}) | }) | ||||
} | } | ||||
if(item.F_Name == "待办事项"){ | if(item.F_Name == "待办事项"){ | ||||
this.CornerMarker = value.length | |||||
this.CornerMarker = value.length||'0' | |||||
} | } | ||||
this.noticeData.push({ | this.noticeData.push({ | ||||
title: item.F_Name, | title: item.F_Name, | ||||
@@ -34,6 +34,14 @@ | |||||
</template> | </template> | ||||
<l-textarea v-model="remark" :placeholder="`输入${typeText}意见`" title="审核意见:" /> | <l-textarea v-model="remark" :placeholder="`输入${typeText}意见`" title="审核意见:" /> | ||||
<!-- 弹层 --> | |||||
<l-modal v-model="modal" @close="reviewer = ''" title="指派审核人"> | |||||
<l-checkbox-picker @input="(e)=>{reviewer = e}" :value="reviewer" :readonly="false" :range="reviewerList" | |||||
required title="审核人" /> | |||||
<l-button @click="userAssign" color="blue" class="block" block>确定指派</l-button> | |||||
<l-button @click="()=>{modal = false;reviewer = ''}" line="blue" class="block margin-top-sm" block>取消</l-button> | |||||
</l-modal> | |||||
<view class="padding margin-top bg-white"> | <view class="padding margin-top bg-white"> | ||||
<l-button @click="submit" class="block" size="lg" color="green" block>提交流程{{ typeText }}</l-button> | <l-button @click="submit" class="block" size="lg" color="green" block>提交流程{{ typeText }}</l-button> | ||||
@@ -56,7 +64,13 @@ export default { | |||||
staff: '', | staff: '', | ||||
remark: '', | remark: '', | ||||
taskParam: {}, | taskParam: {}, | ||||
canvas: true | |||||
canvas: true, | |||||
modal: false, | |||||
reviewer: [], | |||||
reviewerList: [], | |||||
reviewerListId:'', | |||||
submitPostData:null, | |||||
} | } | ||||
}, | }, | ||||
@@ -86,6 +100,37 @@ export default { | |||||
context.setLineJoin('round') | context.setLineJoin('round') | ||||
touchs = [] | touchs = [] | ||||
}, | }, | ||||
// 指派审核人 | |||||
async userAssign() { | |||||
if(!this.reviewer.length){ | |||||
this.modal = false | |||||
this.TOAST('请选择审核人') | |||||
return | |||||
} | |||||
let postData = this.taskParam.formreq | |||||
const res = await this.HTTP_POST('learun/adms/newwf/instance', postData, `指派审核人时发生错误`) | |||||
if(!res){ | |||||
return | |||||
} | |||||
this.submitPostData.auditors = {} | |||||
this.submitPostData.auditors[this.reviewerListId] = this.reviewer | |||||
const success = await this.HTTP_POST( | |||||
this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/audit', | |||||
this.submitPostData, | |||||
`提交[${this.typeText}]时发生错误` | |||||
) | |||||
if (!success) { | |||||
return | |||||
} | |||||
this.EMIT('task-list-change') | |||||
this.NAV_BACK(2) | |||||
this.TOAST(`已成功提交${this.typeText}`, 'success') | |||||
}, | |||||
// 点击「提交」按钮 | // 点击「提交」按钮 | ||||
async submit() { | async submit() { | ||||
@@ -155,6 +200,37 @@ export default { | |||||
// #endif | // #endif | ||||
// #endif | // #endif | ||||
} | } | ||||
// 是否需要指派审核人 | |||||
let isNext = this.taskParam.currentNode.isNext | |||||
if (this.taskParam.next == '2') { | |||||
isNext = '1'; | |||||
} | |||||
if (isNext == '1') { | |||||
let params = { | |||||
code: this.taskParam.schemeCode, | |||||
processId: this.taskParam.processId, | |||||
taskId: this.taskParam.taskId, | |||||
nodeId: this.taskParam.currentNode.id, | |||||
operationCode: this.taskParam.code, | |||||
} | |||||
const userList = await this.HTTP_GET('learun/adms/newwf/auditer', params, `获取审核人时发生错误`) | |||||
if (!userList) { | |||||
return | |||||
} | |||||
let arr = Object.entries(userList) | |||||
this.reviewerListId = arr[0][0] | |||||
this.reviewerList = arr[0][1].map(item => { | |||||
return { | |||||
text: item.Name, | |||||
value: item.Id | |||||
} | |||||
}) | |||||
this.submitPostData = postData | |||||
this.modal = true | |||||
return | |||||
} | |||||
const success = await this.HTTP_POST( | const success = await this.HTTP_POST( | ||||
this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/audit', | this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/audit', | ||||
@@ -307,7 +307,9 @@ export default { | |||||
processId: currentTask.F_ProcessId, | processId: currentTask.F_ProcessId, | ||||
taskId: currentTask.F_Id, | taskId: currentTask.F_Id, | ||||
formreq: postData.formreq, | formreq: postData.formreq, | ||||
taskName: this.currentTask.F_Title | |||||
taskName: this.currentTask.F_Title, | |||||
currentNode:this.currentNode, | |||||
schemeCode:this.code||'' | |||||
} | } | ||||
// 不是加签 | // 不是加签 | ||||
if (action.code !== '__sign__') { | if (action.code !== '__sign__') { | ||||