格式修改

This commit is contained in:
wuhongjian 2022-10-20 16:20:40 +08:00
parent 5deb9a3826
commit a7ecd774c2
1 changed files with 61 additions and 62 deletions

View File

@ -1,7 +1,7 @@
<!--
* @Author: hisense.guoyue
* @LastEditors: hisense.guoyue
* @LastEditTime: 2022-09-21 10:37:29
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-10-20 16:19:48
* @Description: 设备审批
-->
<template>
@ -77,66 +77,66 @@ import bus from '@/views/bus.js'
import mixinViewModule from '@/mixins/view-module'
import processModule from '@/mixins/process-module'
export default {
mixins: [mixinViewModule, processModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/deviceApply/auditPage',
getDataListIsPage: true,
activatedIsNeed: true,
deleteIsBatch: true,
deleteIsBatchKey: 'deploymentId'
},
centerDialogVisible: false,
form: {
auditViem: ''
},
dataForm: {
state: 0
},
rowData: {},
wrjStateObj: {
0: '待审批',
1: '未申请',
2: '通过',
3: '未通过'
}
}
mixins: [mixinViewModule, processModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/deviceApply/auditPage',
getDataListIsPage: true,
activatedIsNeed: true,
deleteIsBatch: true,
deleteIsBatchKey: 'deploymentId'
},
centerDialogVisible: false,
form: {
auditViem: ''
},
dataForm: {
state: 0
},
rowData: {},
wrjStateObj: {
0: '待审批',
1: '未申请',
2: '通过',
3: '未通过'
}
}
},
methods: {
taskHandle (row) {
this.form.auditViem = ''
this.rowData = row
this.centerDialogVisible = true
},
methods: {
taskHandle(row) {
this.form.auditViem = '';
this.rowData = row;
this.centerDialogVisible = true
},
through(state) {
// 2- 3-
this.handlePut(state)
},
handlePut(state) {
this.$http.put(`/deviceApply`, {
...this.rowData,
state: state,
...this.form
}).then(({ data: res }) => {
console.log('res------------>', res);
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.centerDialogVisible = false
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.query()
}
})
}).catch((err) => {
console.log('err------------>', err);
})
}
through (state) {
// 2- 3-
this.handlePut(state)
},
handlePut (state) {
this.$http.put('/deviceApply', {
...this.rowData,
state: state,
...this.form
}).then(({ data: res }) => {
console.log('res------------>', res)
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.centerDialogVisible = false
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.query()
}
})
}).catch((err) => {
console.log('err------------>', err)
})
}
}
}
</script>
<style scoped>
@ -154,4 +154,3 @@ export default {
width: 400px;
}
</style>