mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
Compare commits
2 Commits
980b2549f5
...
9c8438cac3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c8438cac3 | ||
|
|
7bd9ddc951 |
@ -2,10 +2,10 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<h5>{{ $t('flowAudit.auditInfo') }}</h5>
|
||||
<div slot="header" class="flex justify-between ">
|
||||
<span>{{ $t('flowAudit.auditInfo') }}</span>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="">
|
||||
<el-form label-width="120px">
|
||||
<el-form-item :label="$t('flowAudit.auditStatus')">
|
||||
<el-select v-model="flowAuditInfo.state" :placeholder="$t('flowAudit.pleaseAudit')" style="width:100%">
|
||||
@ -40,7 +40,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<select-staff ref="selectStaff" />
|
||||
<select-staff ref="selectStaff" @selectStaff="handleSelectStaff" />
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
@ -53,16 +53,6 @@ export default {
|
||||
components: {
|
||||
SelectStaff
|
||||
},
|
||||
props: {
|
||||
callBackListener: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
callBackFunction: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
flowAuditInfo: {
|
||||
@ -90,6 +80,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSelectStaff(staff) {
|
||||
this.flowAuditInfo.staffId = staff.userId
|
||||
this.flowAuditInfo.staffName = staff.userName
|
||||
},
|
||||
open(auditOrder) {
|
||||
Object.assign(this.flowAuditInfo, auditOrder)
|
||||
this.flowAuditInfo.state = ''
|
||||
@ -117,17 +111,17 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.callBackListener) {
|
||||
const _flowAuditInfo = {
|
||||
state: this.flowAuditInfo.state,
|
||||
remark: this.flowAuditInfo.state === '1200'
|
||||
? `${this.$t('flowAudit.reject')}:${this.flowAuditInfo.remark}`
|
||||
: this.flowAuditInfo.remark,
|
||||
nextUserId: this.flowAuditInfo.staffId
|
||||
}
|
||||
this.$emit(this.callBackFunction, _flowAuditInfo)
|
||||
this.clearAddBasePrivilegeInfo()
|
||||
|
||||
const _flowAuditInfo = {
|
||||
state: this.flowAuditInfo.state,
|
||||
remark: this.flowAuditInfo.state === '1200'
|
||||
? `${this.$t('flowAudit.reject')}:${this.flowAuditInfo.remark}`
|
||||
: this.flowAuditInfo.remark,
|
||||
nextUserId: this.flowAuditInfo.staffId
|
||||
}
|
||||
this.$emit('auditSubmit', _flowAuditInfo)
|
||||
this.clearAddBasePrivilegeInfo()
|
||||
|
||||
},
|
||||
clearAddBasePrivilegeInfo() {
|
||||
this.flowAuditInfo = {
|
||||
@ -160,7 +154,7 @@ export default {
|
||||
this.$refs.selectStaff.open(this.flowAuditInfo)
|
||||
},
|
||||
_goBack() {
|
||||
this.$emit(this.callBackListener, 'list', {})
|
||||
this.$emit('goBack', {})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,8 +38,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<flow-audit v-else ref="flowAudit" :call-back-listener="'contractApplyAuditOrders'"
|
||||
:call-back-function="'notifyAudit'" />
|
||||
<flow-audit v-else ref="flowAudit" @auditSubmit="handleAuditSubmit" @goBack="handleGoBack" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -85,6 +84,13 @@ export default {
|
||||
this._loadStepStaff()
|
||||
},
|
||||
methods: {
|
||||
handleGoBack() {
|
||||
this.contractApplyAuditOrdersInfo.audit = '1'
|
||||
this._listAuditOrders(this.page.current, this.page.size)
|
||||
},
|
||||
handleAuditSubmit(auditInfo) {
|
||||
this._auditOrderInfo(auditInfo)
|
||||
},
|
||||
async _listAuditOrders(page, rows) {
|
||||
try {
|
||||
this.contractApplyAuditOrdersInfo.audit = '1'
|
||||
|
||||
@ -56,7 +56,8 @@ export const messages = {
|
||||
},
|
||||
fetchError: 'Failed to fetch task list',
|
||||
start: 'start',
|
||||
stop: 'stop'
|
||||
stop: 'stop',
|
||||
timeout: 'Submitted task, please check the result later'
|
||||
}
|
||||
},
|
||||
zh: {
|
||||
@ -116,7 +117,8 @@ export const messages = {
|
||||
},
|
||||
fetchError: '获取定时任务列表失败',
|
||||
start: '启动',
|
||||
stop: '停止'
|
||||
stop: '停止',
|
||||
timeout: '已提交任务,请稍后查看结果'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -118,7 +118,7 @@ export default {
|
||||
await startTask(row.taskId)
|
||||
this.getList()
|
||||
} catch (error) {
|
||||
this.$message.error(this.$t('task.fetchError'))
|
||||
this.$message.error(error)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
await stopTask(row.taskId)
|
||||
this.getList()
|
||||
} catch (error) {
|
||||
this.$message.error(this.$t('task.fetchError'))
|
||||
this.$message.error(error)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
@ -155,7 +155,7 @@ export default {
|
||||
await runTask(row.taskId)
|
||||
this.getList()
|
||||
} catch (error) {
|
||||
this.$message.error(this.$t('task.fetchError'))
|
||||
this.$message.error(this.$t('task.timeout'))
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user