关闭弹窗bug

This commit is contained in:
851673013@qq.com 2022-07-21 13:52:30 +08:00
parent c0831d1eea
commit 66e479ed5f
2 changed files with 249 additions and 170 deletions

View File

@ -37,7 +37,9 @@
<h3>审批</h3> <h3>审批</h3>
<div> <div>
<el-button type="primary" @click="showDialog('同意')">同意</el-button> <el-button type="primary" @click="showDialog('同意')">同意</el-button>
<el-button type="danger" plain @click="showDialog('拒绝')">拒绝</el-button> <el-button type="danger" plain @click="showDialog('拒绝')"
>拒绝</el-button
>
<!-- <el-radio-group v-model="agreeOrList" style="width: 230px"> <!-- <el-radio-group v-model="agreeOrList" style="width: 230px">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button> <el-radio-button label="同意" class="blueAll">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button> <el-radio-button label="退回" class="redAll">退回</el-radio-button>
@ -63,11 +65,16 @@
title="审批意见" title="审批意见"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
:before-close="handleClose"> :before-close="handleClose"
>
<el-input v-model="input" placeholder="请输入审批意见"></el-input> <el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose2"> </el-button> <el-button @click="handleClose2"> </el-button>
<el-button type="primary" @click="agreeOrNot()"> </el-button> <el-button
type="primary"
@click.native="agreeOrNot($store.state.contentTabsActiveName)"
> </el-button
>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -157,11 +164,11 @@ export default {
}, },
handleClose (done) { handleClose (done) {
this.$confirm('确认关闭?') this.$confirm('确认关闭?')
.then(_ => { .then((_) => {
this.input = '' this.input = ''
done() done()
}) })
.catch(_ => {}) .catch((_) => {})
}, },
handleClose2 () { handleClose2 () {
this.dialogVisible = false this.dialogVisible = false
@ -185,61 +192,73 @@ export default {
}) })
}, },
// 退 // 退
agreeOrNot: debounce(function () { agreeOrNot: debounce(
if (this.dialogType === '同意') { function (data) {
console.log('this.dataForm', this.dataForm) if (this.dialogType === '同意') {
const params = qs.stringify({ console.log('this.dataForm', this.dataForm)
taskId: this.dataForm.taskId, const params = qs.stringify({
comment: this.input taskId: this.taskId,
}) comment: this.input
console.log(params)
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
}) })
}).catch(() => {}) console.log(params)
} else if (this.dialogType === '拒绝') { this.$http
const params = qs.stringify({ .post('/act/task/complete?' + params)
taskId: this.dataForm.taskId, .then(({ data: res }) => {
comment: this.input if (res.code !== 0) {
}) this.$message.error(res.msg)
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => { if (this.callbacks.taskHandleErrorCallback) {
if (res.code !== 0) { this.callbacks.taskHandleErrorCallback(res)
this.$message.error(res.msg) }
if (this.callbacks.taskHandleErrorCallback) { return
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
} }
} this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.dialogVisible = false
this.input = ''
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
.catch(() => {})
} else if (this.dialogType === '拒绝') {
const params = qs.stringify({
taskId: this.dataForm.taskId,
comment: this.input
}) })
}) this.$http
} .post('/act/task/backToFirst?', params)
}, 1000, { leading: true, trailing: false }), .then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
}
this.tabRemoveHandle(data)
},
1000,
{ leading: true, trailing: false }
),
tabRemoveHandle (tabName) { tabRemoveHandle (tabName) {
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
if (tabName === 'home') { if (tabName === 'home') {

View File

@ -7,49 +7,77 @@
--> -->
<!-- 流程业务表单 --> <!-- 流程业务表单 -->
<template> <template>
<el-card shadow="never" class="aui-card--fill" :key='showKey'> <el-card shadow="never" class="aui-card--fill" :key="showKey">
<!-- 申请人详情 --> <!-- 申请人详情 -->
<div> <div>
<h3>申请人信息</h3> <h3>申请人信息</h3>
<div class="big-BOX"> <div class="big-BOX">
<p> <p>
<span class="text">申请人<span> {{dataForm.content.user || '--'}}</span></span> <span class="text"
<span class="text">电话<span>{{dataForm.content.phone || '--'}}</span></span> >申请人<span> {{ dataForm.content.user || '--' }}</span></span
<span class="text">单位<span>{{dataForm.content.unit || '--'}}</span></span> >
</p> <span class="text"
<p> >电话<span>{{ dataForm.content.phone || '--' }}</span></span
<span class="text"> 能力申请标题<span> {{dataForm.content.title|| '--'}}</span></span> >
<span class="text">应用系统<span>{{dataForm.content.applicationSystem || '--'}}</span></span> <span class="text"
<span class="text">应用场景<span> {{dataForm.content.applicationSceneStr || '--'}}</span></span> >单位<span>{{ dataForm.content.unit || '--' }}</span></span
</p> >
<p> </p>
<span> 能力应用期望效果<span> {{dataForm.content.effectWish|| '--'}}</span></span> <p>
</p> <span class="text">
<p v-if="dataForm.content.enclosure"> 能力申请标题<span>
<span> 申请附件<span> {{dataForm.content.enclosure|| '--'}}<button @click="downloadFile2(dataForm.content.enclosure)">预览</button></span></span> {{ dataForm.content.title || '--' }}</span
></span
</p> >
<span class="text"
>应用系统<span>{{
dataForm.content.applicationSystem || '--'
}}</span></span
>
<span class="text"
>应用场景<span>
{{ dataForm.content.applicationSceneStr || '--' }}</span
></span
>
</p>
<p>
<span>
能力应用期望效果<span>
{{ dataForm.content.effectWish || '--' }}</span
></span
>
</p>
<p v-if="dataForm.content.enclosure">
<span>
申请附件<span>
{{ dataForm.content.enclosure || '--'
}}<button @click="downloadFile2(dataForm.content.enclosure)">
预览
</button></span
></span
>
</p>
</div>
</div> </div>
</div>
<!-- 申请能力 --> <!-- 申请能力 -->
<div class="AbilityApply"> <div class="AbilityApply">
<h3>申请能力</h3> <h3>申请能力</h3>
<ul v-for="item in dataList" :key="item.id"> <ul v-for="item in dataList" :key="item.id">
<!-- <li class="title">{{item.address}}</li> --> <!-- <li class="title">{{item.address}}</li> -->
<li class="clearfix"> <li class="clearfix">
<img <img src="~@/assets/img/imgLeft.png" />
src="~@/assets/img/imgLeft.png" <div>
/> <h2>
<div> {{ item.name }}<span>{{ item.type }}</span>
<h2>{{item.name}}<span>{{item.type}}</span></h2> </h2>
<p>{{item.describe}}</p> <p>{{ item.describe }}</p>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- 流程综合组件 --> <!-- 流程综合组件 -->
<!-- <ren-process-multiple <!-- <ren-process-multiple
v-if="processVisible" v-if="processVisible"
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId" updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
saveFormUrl="/processForm/tabilityapplication" saveFormUrl="/processForm/tabilityapplication"
@ -66,24 +94,31 @@
<el-radio-button label="退回" class="redAll" @click="showDialog('退回')">退回</el-radio-button> <el-radio-button label="退回" class="redAll" @click="showDialog('退回')">退回</el-radio-button>
</el-radio-group> --> </el-radio-group> -->
<el-button type="primary" @click="showDialog('同意')">同意</el-button> <el-button type="primary" @click="showDialog('同意')">同意</el-button>
<el-button type="danger" plain @click="showDialog('拒绝')">拒绝</el-button> <el-button type="danger" plain @click="showDialog('拒绝')"
>拒绝</el-button
>
<!-- <el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input> <!-- <el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input> <el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input>
<el-button class="inputBule" @click="agreeOrNot">提交</el-button> --> <el-button class="inputBule" @click="agreeOrNot">提交</el-button> -->
</div> </div>
</div> </div>
<!-- 流程详情 --> <!-- 流程详情 -->
<ren-process-detail></ren-process-detail> <ren-process-detail></ren-process-detail>
<el-dialog <el-dialog
title="审批意见" title="审批意见"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
:before-close="handleClose"> :before-close="handleClose"
>
<el-input v-model="input" placeholder="请输入审批意见"></el-input> <el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose2"> </el-button> <el-button @click="handleClose2"> </el-button>
<el-button type="primary" @click.native="agreeOrNot($store.state.contentTabsActiveName)"> </el-button> <el-button
type="primary"
@click.native="agreeOrNot($store.state.contentTabsActiveName)"
> </el-button
>
</span> </span>
</el-dialog> </el-dialog>
</el-card> </el-card>
@ -179,11 +214,11 @@ export default {
}, },
handleClose (done) { handleClose (done) {
this.$confirm('确认关闭?') this.$confirm('确认关闭?')
.then(_ => { .then((_) => {
this.input = '' this.input = ''
done() done()
}) })
.catch(_ => {}) .catch((_) => {})
}, },
handleClose2 () { handleClose2 () {
this.dialogVisible = false this.dialogVisible = false
@ -193,28 +228,43 @@ export default {
console.log(window.SITE_CONFIG.previewUrl) console.log(window.SITE_CONFIG.previewUrl)
window.open( window.open(
window.SITE_CONFIG.previewUrl + window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' + 'hisense_office/onlinePreview?url=' +
btoa(encodeURI(url)) btoa(encodeURI(url))
) )
}, },
// //
getInfo () { getInfo () {
this.$http this.$http
.get(`/act/task/getTaskVariables?taskId=${this.dataForm.taskId}&variableName=tAbilityApplicationDTOList`) .get(
`/act/task/getTaskVariables?taskId=${this.dataForm.taskId}&variableName=tAbilityApplicationDTOList`
)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
console.log(res.data) console.log(res.data)
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
console.log(res.data, this.dataForm, 'elas============================') console.log(
res.data,
this.dataForm,
'elas============================'
)
if (res.data.tAbilityApplicationDTOList[0].applicationScene) { if (res.data.tAbilityApplicationDTOList[0].applicationScene) {
res.data.tAbilityApplicationDTOList[0].applicationSceneStr = '' res.data.tAbilityApplicationDTOList[0].applicationSceneStr = ''
res.data.tAbilityApplicationDTOList[0].applicationScene.map((val, index) => { res.data.tAbilityApplicationDTOList[0].applicationScene.map(
res.data.tAbilityApplicationDTOList[0].applicationSceneStr += val (val, index) => {
if (index < res.data.tAbilityApplicationDTOList[0].applicationScene.length - 1) { res.data.tAbilityApplicationDTOList[0].applicationSceneStr +=
res.data.tAbilityApplicationDTOList[0].applicationSceneStr += '、' val
if (
index <
res.data.tAbilityApplicationDTOList[0].applicationScene
.length -
1
) {
res.data.tAbilityApplicationDTOList[0].applicationSceneStr +=
'、'
}
} }
}) )
} }
this.dataForm.content = res.data.tAbilityApplicationDTOList[0] this.dataForm.content = res.data.tAbilityApplicationDTOList[0]
const obj = { const obj = {
@ -223,12 +273,12 @@ export default {
describe: '' describe: ''
} }
let flag = false let flag = false
res.data.tAbilityApplicationDTOList.map(val => { res.data.tAbilityApplicationDTOList.map((val) => {
if (val.cameraList) { if (val.cameraList) {
flag = true flag = true
obj.describe += val.system obj.describe += val.system
} else { } else {
this.$http.get('/resource/' + val.resourceId).then(res1 => { this.$http.get('/resource/' + val.resourceId).then((res1) => {
// console.log(res1.data.data, '1111111111111111111111111111111111') // console.log(res1.data.data, '1111111111111111111111111111111111')
this.dataList.push({ this.dataList.push({
name: res1.data.data.name, name: res1.data.data.name,
@ -260,63 +310,73 @@ export default {
.catch(() => {}) .catch(() => {})
}, },
// 退 // 退
agreeOrNot: debounce(function (data) { agreeOrNot: debounce(
if (this.dialogType === '同意') { function (data) {
console.log('this.dataForm', this.dataForm) if (this.dialogType === '同意') {
const params = qs.stringify({ console.log('this.dataForm', this.dataForm)
taskId: this.dataForm.taskId, const params = qs.stringify({
comment: this.input taskId: this.dataForm.taskId,
}) comment: this.input
console.log(params)
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
}) })
}).catch(() => {}) console.log(params)
} else if (this.dialogType === '拒绝') { this.$http
const params = qs.stringify({ .post('/act/task/complete?' + params)
taskId: this.dataForm.taskId, .then(({ data: res }) => {
comment: this.input if (res.code !== 0) {
}) this.$message.error(res.msg)
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => { if (this.callbacks.taskHandleErrorCallback) {
if (res.code !== 0) { this.callbacks.taskHandleErrorCallback(res)
this.$message.error(res.msg) }
if (this.callbacks.taskHandleErrorCallback) { return
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
} }
} this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.dialogVisible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
.catch(() => {})
} else if (this.dialogType === '拒绝') {
const params = qs.stringify({
taskId: this.dataForm.taskId,
comment: this.input
}) })
}) this.$http
} .post('/act/task/backToFirst?', params)
this.tabRemoveHandle(data) .then(({ data: res }) => {
// this.getDataList(data) if (res.code !== 0) {
}, 1000, { leading: true, trailing: false }), this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
}
this.tabRemoveHandle(data)
// this.getDataList(data)
},
1000,
{ leading: true, trailing: false }
),
tabRemoveHandle (tabName) { tabRemoveHandle (tabName) {
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
if (tabName === 'home') { if (tabName === 'home') {
@ -450,7 +510,7 @@ export default {
} }
.clearfix:after { .clearfix:after {
display: block; display: block;
content: ""; content: '';
clear: both; clear: both;
} }
.title { .title {
@ -460,7 +520,7 @@ export default {
border-bottom: 0; border-bottom: 0;
} }
.title:before { .title:before {
content: ""; content: '';
width: 6px; width: 6px;
height: 6px; height: 6px;
display: inline-block; display: inline-block;