This commit is contained in:
851673013@qq.com 2022-07-22 14:33:03 +08:00
parent 4e0d54efb1
commit f0505d2d87
3 changed files with 117 additions and 58 deletions

View File

@ -98,7 +98,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="agreeOr"> <div class="agreeOr" v-if="this.dataForm.taskId">
<div> <div>
<!-- <el-radio-group v-model="agreeOrList" style="width:230px;"> <!-- <el-radio-group v-model="agreeOrList" style="width:230px;">
<el-radio-button label="同意" class="blueAll" @click="showDialog('同意')">同意</el-radio-button> <el-radio-button label="同意" class="blueAll" @click="showDialog('同意')">同意</el-radio-button>
@ -324,6 +324,7 @@ export default {
taskHandleErrorCallback (data) {} taskHandleErrorCallback (data) {}
}, },
created () { created () {
this.dataForm.taskId = this.$route.params.taskId
this.init() this.init()
}, },
mounted () {} mounted () {}

View File

@ -33,7 +33,7 @@
ref="renProcessMultiple" ref="renProcessMultiple"
></ren-process-multiple> --> ></ren-process-multiple> -->
<!-- 审批 --> <!-- 审批 -->
<div class="agreeOr"> <div class="agreeOr" v-if="taskId">
<h3>审批</h3> <h3>审批</h3>
<div> <div>
<el-button type="primary" @click="showDialog('同意')">同意</el-button> <el-button type="primary" @click="showDialog('同意')">同意</el-button>
@ -129,6 +129,7 @@ export default {
// KEY // KEY
console.log('params=================>', this.$route, this.$route.params) console.log('params=================>', this.$route, this.$route.params)
this.taskId = this.$route.params.taskId this.taskId = this.$route.params.taskId
this.dataForm.taskId = this.$route.params.taskId
this.init() this.init()
console.log('fromList', this.$router.currentRoute.params.businessKey) console.log('fromList', this.$router.currentRoute.params.businessKey)
// this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO // this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO

View File

@ -86,7 +86,7 @@
></ren-process-multiple> --> ></ren-process-multiple> -->
<!-- 审批 --> <!-- 审批 -->
<div class="agreeOr"> <div class="agreeOr" v-if="dataForm.taskId">
<h3>审批</h3> <h3>审批</h3>
<div> <div>
<!-- <el-radio-group v-model="agreeOrList" style="width:230px;"> <!-- <el-radio-group v-model="agreeOrList" style="width:230px;">
@ -167,6 +167,7 @@ export default {
// KEY // KEY
console.log('params=================>', this.$route, this.$route.params) console.log('params=================>', this.$route, this.$route.params)
this.dataForm.taskId = this.$route.params.taskId this.dataForm.taskId = this.$route.params.taskId
this.dataForm.instanceId = this.$route.params.processInstanceId
this.init() this.init()
// // // //
var callbacks = { var callbacks = {
@ -200,10 +201,10 @@ export default {
// this.visible = true // this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.dataForm.resetFields() // this.$refs.dataForm.resetFields()
this.getInfo()
if (this.dataForm.taskId) { if (this.dataForm.taskId) {
// KEY // KEY
// this.fieldDisabled = true // this.fieldDisabled = true
this.getInfo()
console.log(this.dataForm, 'init') console.log(this.dataForm, 'init')
} }
}) })
@ -234,65 +235,121 @@ export default {
}, },
// //
getInfo () { getInfo () {
this.$http let params = ''
.get( if (this.dataForm.taskId) {
`/act/task/getTaskVariables?taskId=${this.dataForm.taskId}&variableName=tAbilityApplicationDTOList` params = `taskId=${this.dataForm.taskId}`
) this.$http
.then(({ data: res }) => { .get(
if (res.code !== 0) { `/act/task/getTaskVariables?${params}&variableName=tAbilityApplicationDTOList`
console.log(res.data)
return this.$message.error(res.msg)
}
console.log(
res.data,
this.dataForm,
'elas============================'
) )
if (res.data.tAbilityApplicationDTOList[0].applicationScene) { .then(({ data: res }) => {
res.data.tAbilityApplicationDTOList[0].applicationSceneStr = '' if (res.code !== 0) {
res.data.tAbilityApplicationDTOList[0].applicationScene.map( console.log(res.data)
(val, index) => { return this.$message.error(res.msg)
res.data.tAbilityApplicationDTOList[0].applicationSceneStr += }
val console.log(
if ( res.data,
index < this.dataForm,
res.data.tAbilityApplicationDTOList[0].applicationScene 'elas============================'
.length -
1
) {
res.data.tAbilityApplicationDTOList[0].applicationSceneStr +=
'、'
}
}
) )
} if (res.data.tAbilityApplicationDTOList[0].applicationScene) {
this.dataForm.content = res.data.tAbilityApplicationDTOList[0] res.data.tAbilityApplicationDTOList[0].applicationSceneStr = ''
const obj = { res.data.tAbilityApplicationDTOList[0].applicationScene.map(
name: '申请摄像头列表', (val, index) => {
type: '基础设施', res.data.tAbilityApplicationDTOList[0].applicationSceneStr +=
describe: '' val
} if (
let flag = false index <
res.data.tAbilityApplicationDTOList.map((val) => { res.data.tAbilityApplicationDTOList[0].applicationScene
if (val.cameraList) { .length -
flag = true 1
obj.describe += val.system ) {
} else { res.data.tAbilityApplicationDTOList[0].applicationSceneStr +=
this.$http.get('/resource/' + val.resourceId).then((res1) => { '、'
// console.log(res1.data.data, '1111111111111111111111111111111111') }
this.dataList.push({ }
name: res1.data.data.name, )
type: res1.data.data.type, }
describe: res1.data.data.description this.dataForm.content = res.data.tAbilityApplicationDTOList[0]
const obj = {
name: '申请摄像头列表',
type: '基础设施',
describe: ''
}
let flag = false
res.data.tAbilityApplicationDTOList.map((val) => {
if (val.cameraList) {
flag = true
obj.describe += val.system
} else {
this.$http.get('/resource/' + val.resourceId).then((res1) => {
// console.log(res1.data.data, '1111111111111111111111111111111111')
this.dataList.push({
name: res1.data.data.name,
type: res1.data.data.type,
describe: res1.data.data.description
})
}) })
}) }
})
if (flag) {
this.dataList.push(obj)
} }
}) })
if (flag) { .catch(() => {})
this.dataList.push(obj) } else {
} params = `instanceId=${this.dataForm.instanceId}`
}) this.$http
.catch(() => {}) .get(
`/act/his/getVariablesByInstanceId?${params}&variableName=tAbilityApplicationDTOList`
)
.then(({ data: res }) => {
if (res.code !== 0) {
console.log(res.data)
return this.$message.error(res.msg)
}
console.log(
res.data,
this.dataForm,
'elas============================'
)
if (res.data[0].applicationScene) {
res.data[0].applicationSceneStr = ''
res.data[0].applicationScene.map((val, index) => {
res.data[0].applicationSceneStr += val
if (index < res.data[0].applicationScene.length - 1) {
res.data[0].applicationSceneStr += '、'
}
})
}
this.dataForm.content = res.data[0]
const obj = {
name: '申请摄像头列表',
type: '基础设施',
describe: ''
}
let flag = false
res.data.tAbilityApplicationDTOList.map((val) => {
if (val.cameraList) {
flag = true
obj.describe += val.system
} else {
this.$http.get('/resource/' + val.resourceId).then((res1) => {
// console.log(res1.data.data, '1111111111111111111111111111111111')
this.dataList.push({
name: res1.data.data.name,
type: res1.data.data.type,
describe: res1.data.data.description
})
})
}
})
if (flag) {
this.dataList.push(obj)
}
})
.catch(() => {})
}
}, },
// //
applyData () { applyData () {