修改bug

This commit is contained in:
GGJ
2024-04-18 16:03:53 +08:00
parent 5345dbd84b
commit 997e8a9252
7 changed files with 165 additions and 142 deletions

View File

@@ -8,7 +8,14 @@
<Table ref="tableRef" />
</div>
<!-- 新增编辑 -->
<Equipment ref="EquipmentRef" @onSubmit="tableStore.index()" />
<el-dialog draggable :title="title" v-model="userAdd" width="500px">
<Equipment ref="EquipmentRef" @onSubmit="onSubmit" />
<div style="display: flex; justify-content: center; margin-top: 30px">
<el-button type="primary" class="ml20" @click="EquipmentRef.config()">保存</el-button>
<el-button class="ml20" @click="userAdd = false">取消</el-button>
</div>
</el-dialog>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
@@ -21,10 +28,10 @@ import { deleteIssues } from '@/api/process-boot/electricitymanagement'
import { createCheckflow, getFileUrl } from '@/api/process-boot/retire'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
const userAdd = ref(false)
const TableHeaderRef = ref()
const EquipmentRef = ref()
const problemData = dictData.getBasicData('Problem_Sources')
const title: any = ref('')
defineOptions({
name: '/Processsupervision/retire'
@@ -98,7 +105,11 @@ const tableStore: any = new TableStore({
icon: 'el-icon-Plus',
render: 'basicButton',
click: async row => {
EquipmentRef.value.open('编辑设备退役申请单', row)
userAdd.value = true
title.value = '编辑设备退役申请单'
nextTick(() => {
EquipmentRef.value.open('编辑设备退役申请单', row)
})
}
},
@@ -190,6 +201,15 @@ onMounted(() => {
})
// 新增
const add = () => {
EquipmentRef.value.open('新增设备退役申请单')
userAdd.value = true
title.value = '新增设备退役申请单'
nextTick(() => {
EquipmentRef.value.open('新增设备退役申请单')
})
}
// 关闭
const onSubmit = () => {
tableStore.index()
userAdd.value = false
}
</script>