按钮修改

This commit is contained in:
a0049873 2022-07-21 09:57:47 +08:00
parent 30afa74344
commit 578c941f1c
2 changed files with 130 additions and 77 deletions

View File

@ -36,7 +36,9 @@
<div class="agreeOr">
<h3>审批</h3>
<div>
<el-radio-group v-model="agreeOrList" style="width: 230px">
<el-button type="primary" @click="showDialog('同意')">同意</el-button>
<el-button type="danger" plain @click="showDialog('拒绝')">拒绝</el-button>
<!-- <el-radio-group v-model="agreeOrList" style="width: 230px">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button>
</el-radio-group>
@ -54,9 +56,20 @@
class="inputBule"
@click.native="agreeOrNot($store.state.contentTabsActiveName)"
>提交</el-button
>
> -->
</div>
</div>
<el-dialog
title="审批意见"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose2"> </el-button>
<el-button type="primary" @click="agreeOrNot()"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -81,6 +94,9 @@ export default {
},
data () {
return {
dialogVisible: false,
dialogType: '',
input: '',
flagShow: false,
// processVisible: true,
visible: false,
@ -135,6 +151,22 @@ export default {
}
})
},
showDialog (title) {
this.dialogVisible = true
this.dialogType = title
},
handleClose (done) {
this.$confirm('确认关闭?')
.then(_ => {
this.input = ''
done()
})
.catch(_ => {})
},
handleClose2 () {
this.dialogVisible = false
this.input = ''
},
methodsThree () {
this.$http.get('/category/getCategoryTree').then((res) => {
this.insertList = res.data.data
@ -152,19 +184,16 @@ export default {
// }
})
},
agreeOrNot: debounce(
function (data) {
console.log(data)
if (this.agreeOrList === '同意') {
console.log('this.dataForm.taskId', this.taskId)
// 退
agreeOrNot: debounce(function () {
if (this.dialogType === '同意') {
console.log('this.dataForm', this.dataForm)
const params = qs.stringify({
taskId: this.taskId,
comment: this.inputAgree
taskId: this.dataForm.taskId,
comment: this.input
})
console.log(params)
this.$http
.post('/act/task/complete?' + params)
.then(({ data: res }) => {
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
@ -183,17 +212,13 @@ export default {
}
}
})
})
.catch(() => {})
} else if (this.agreeOrList === '退回') {
console.log('this.dataForm.taskId', this.taskId)
}).catch(() => {})
} else if (this.dialogType === '拒绝') {
const params = qs.stringify({
taskId: this.taskId,
comment: this.inputNo
taskId: this.dataForm.taskId,
comment: this.input
})
this.$http
.post('/act/task/backToFirst?', params)
.then(({ data: res }) => {
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
@ -214,11 +239,7 @@ export default {
})
})
}
this.tabRemoveHandle(data)
},
1000,
{ leading: true, trailing: false }
),
}, 1000, { leading: true, trailing: false }),
tabRemoveHandle (tabName) {
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
if (tabName === 'home') {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-29 15:59:51
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-04 16:17:22
* @LastEditTime: 2022-07-21 09:39:13
* @Description: 告诉大家这是什么
-->
<!-- 流程业务表单 -->
@ -61,18 +61,31 @@
<div class="agreeOr">
<h3>审批</h3>
<div>
<el-radio-group v-model="agreeOrList" style="width:230px;">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button>
</el-radio-group>
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
<!-- <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="redAll" @click="showDialog('退回')">退回</el-radio-button>
</el-radio-group> -->
<el-button type="primary" @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="inputNo" placeholder="请输入退回意见"></el-input>
<el-button class="inputBule" @click="agreeOrNot">提交</el-button>
<el-button class="inputBule" @click="agreeOrNot">提交</el-button> -->
</div>
</div>
<!-- 流程详情 -->
<ren-process-detail></ren-process-detail>
<el-dialog
title="审批意见"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose2"> </el-button>
<el-button type="primary" @click="agreeOrNot()"> </el-button>
</span>
</el-dialog>
</el-card>
</template>
@ -87,6 +100,9 @@ export default {
mixins: [processModule],
data () {
return {
dialogVisible: false,
dialogType: '',
input: '',
visible: true,
showKey: 0,
//
@ -156,6 +172,22 @@ export default {
}
})
},
showDialog (title) {
this.dialogVisible = true
this.dialogType = title
},
handleClose (done) {
this.$confirm('确认关闭?')
.then(_ => {
this.input = ''
done()
})
.catch(_ => {})
},
handleClose2 () {
this.dialogVisible = false
this.input = ''
},
downloadFile2 (url) {
console.log(window.SITE_CONFIG.previewUrl)
window.open(
@ -228,11 +260,11 @@ export default {
},
// 退
agreeOrNot: debounce(function () {
if (this.agreeOrList === '同意') {
if (this.dialogType === '同意') {
console.log('this.dataForm', this.dataForm)
const params = qs.stringify({
taskId: this.dataForm.taskId,
comment: this.inputAgree
comment: this.input
})
console.log(params)
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
@ -255,10 +287,10 @@ export default {
}
})
}).catch(() => {})
} else if (this.agreeOrList === '退回') {
} else if (this.dialogType === '拒绝') {
const params = qs.stringify({
taskId: this.dataForm.taskId,
comment: this.inputNo
comment: this.input
})
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
if (res.code !== 0) {