格式修改

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 * @Author: hisense.guoyue
* @LastEditors: hisense.guoyue * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-09-21 10:37:29 * @LastEditTime: 2022-10-20 16:19:48
* @Description: 设备审批 * @Description: 设备审批
--> -->
<template> <template>
@ -71,72 +71,72 @@
</el-dialog> </el-dialog>
</el-card> </el-card>
</template> </template>
<script> <script>
import bus from '@/views/bus.js' import bus from '@/views/bus.js'
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import processModule from '@/mixins/process-module' import processModule from '@/mixins/process-module'
export default { export default {
mixins: [mixinViewModule, processModule], mixins: [mixinViewModule, processModule],
data() { data () {
return { return {
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: '/deviceApply/auditPage', getDataListURL: '/deviceApply/auditPage',
getDataListIsPage: true, getDataListIsPage: true,
activatedIsNeed: true, activatedIsNeed: true,
deleteIsBatch: true, deleteIsBatch: true,
deleteIsBatchKey: 'deploymentId' deleteIsBatchKey: 'deploymentId'
}, },
centerDialogVisible: false, centerDialogVisible: false,
form: { form: {
auditViem: '' auditViem: ''
}, },
dataForm: { dataForm: {
state: 0 state: 0
}, },
rowData: {}, rowData: {},
wrjStateObj: { wrjStateObj: {
0: '待审批', 0: '待审批',
1: '未申请', 1: '未申请',
2: '通过', 2: '通过',
3: '未通过' 3: '未通过'
} }
} }
},
methods: {
taskHandle (row) {
this.form.auditViem = ''
this.rowData = row
this.centerDialogVisible = true
}, },
methods: { through (state) {
taskHandle(row) { // 2- 3-
this.form.auditViem = ''; this.handlePut(state)
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);
})
}
}, },
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> </script>
<style scoped> <style scoped>
@ -154,4 +154,3 @@ export default {
width: 400px; width: 400px;
} }
</style> </style>