修改部分按钮重复点击
This commit is contained in:
@@ -50,8 +50,8 @@
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
|
||||
<el-button type="primary" @click="submit(true)">保存</el-button>
|
||||
<el-button type="primary" @click="submit(false)">提交审批</el-button>
|
||||
<el-button type="primary" @click="submit(true)" :loading="loading" >保存</el-button>
|
||||
<el-button type="primary" @click="submit(false)" :loading="loading" >提交审批</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -74,6 +74,7 @@ const sourceData = ref()
|
||||
const deviceList = ref()
|
||||
const data = ref()
|
||||
const title = ref('')
|
||||
const loading = ref(false)
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
const devStatuData: any = ref([])
|
||||
@@ -171,11 +172,12 @@ const open = async (text: string, tempData?: any) => {
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = (flag: boolean) => {
|
||||
const submit =async (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
form.value.saveOrCheckflag = '1'
|
||||
|
||||
addRunningDevice(form.value).then(res => {
|
||||
await addRunningDevice(form.value).then(res => {
|
||||
ElMessage.success('保存成功!')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
@@ -211,6 +213,9 @@ const submit = (flag: boolean) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -60,8 +60,8 @@
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
|
||||
<el-button type="primary" @click="submit(true)">保存</el-button>
|
||||
<el-button type="primary" @click="submit(false)">提交审批</el-button>
|
||||
<el-button type="primary" @click="submit(true)" :loading="loading" >保存</el-button>
|
||||
<el-button type="primary" @click="submit(false)" :loading="loading" >提交审批</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -79,6 +79,7 @@ const sourceData = ref()
|
||||
const lineList = ref()
|
||||
const data = ref()
|
||||
const title = ref('')
|
||||
const loading = ref(false)
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
const runFlag = ref('')
|
||||
@@ -148,11 +149,12 @@ const open = async (text: string, tempData?: any) => {
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = (flag: boolean) => {
|
||||
const submit = async (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
form.value.saveOrCheckflag = '1'
|
||||
|
||||
addRunningDevice(form.value).then(res => {
|
||||
await addRunningDevice(form.value).then(res => {
|
||||
ElMessage.success('保存成功!')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
@@ -178,6 +180,9 @@ const submit = (flag: boolean) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user