修改部分按钮重复点击
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="submit">发起</el-button>
|
||||
<el-button type="primary" @click="submit" :loading="loading">发起</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
@@ -4,22 +4,14 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="用户名称:" prop="userName">
|
||||
<el-input
|
||||
v-model="form.userName"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入用户名称"
|
||||
></el-input>
|
||||
<el-input v-model="form.userName" clearable style="width: 100%"
|
||||
placeholder="请输入用户名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="用户编号:" prop="userNumber">
|
||||
<el-input
|
||||
v-model="form.userNumber"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入用户编号"
|
||||
></el-input>
|
||||
<el-input v-model="form.userNumber" clearable style="width: 100%"
|
||||
placeholder="请输入用户编号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -55,18 +47,9 @@
|
||||
></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item for="-" label="监测点:" prop="monitorNumber">
|
||||
<el-select
|
||||
v-model="form.monitorNumber"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择监测点"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in minitorList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="form.monitorNumber" clearable style="width: 100%" placeholder="请选择监测点">
|
||||
<el-option v-for="item in minitorList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -85,22 +68,14 @@
|
||||
</el-row> -->
|
||||
|
||||
<el-form-item for="-" label="投诉内容:" prop="complaintText">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.complaintText"
|
||||
></el-input>
|
||||
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入内容"
|
||||
v-model="form.complaintText"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="稳态指标:">
|
||||
<el-checkbox-group v-model="form.steadyIndicator">
|
||||
<div style="width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start">
|
||||
<el-checkbox
|
||||
style="flex: none; width: 120px"
|
||||
v-for="(item, ind) in steadyStateList"
|
||||
:key="ind"
|
||||
:label="item.name"
|
||||
>
|
||||
<el-checkbox style="flex: none; width: 120px" v-for="(item, ind) in steadyStateList" :key="ind"
|
||||
:label="item.name">
|
||||
<!-- @change="changeSteadyState" -->
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
@@ -110,12 +85,8 @@
|
||||
<el-form-item for="-" label="暂态指标:">
|
||||
<el-checkbox-group v-model="form.transientIndicators">
|
||||
<div style="width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start">
|
||||
<el-checkbox
|
||||
style="flex: none; width: 120px"
|
||||
v-for="(item, ind) in transientIndicatorsList"
|
||||
:key="ind"
|
||||
:label="item.name"
|
||||
>
|
||||
<el-checkbox style="flex: none; width: 120px" v-for="(item, ind) in transientIndicatorsList"
|
||||
:key="ind" :label="item.name">
|
||||
<!-- @change="changeTransientIndicators" -->
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
@@ -126,7 +97,7 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
<el-button type="primary" @click="submit" :loading="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -141,6 +112,7 @@ import Area from '@/components/form/area/index.vue'
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogVisible = ref(false)
|
||||
const loading = ref(false)
|
||||
const title: any = ref('')
|
||||
const steadyStateList = dictData.getBasicData('Steady_Indicator')
|
||||
const transientIndicatorsList = dictData.getBasicData('Transient_Indicators')
|
||||
@@ -184,9 +156,10 @@ const rules = {
|
||||
monitorNumber: [{ required: true, message: '请选择监测点', trigger: 'change' }],
|
||||
dutyOrgId: [{ required: true, message: '请选择负责单位', trigger: 'change' }]
|
||||
}
|
||||
const formRef = ref(null)
|
||||
const submit = () => {
|
||||
formRef.value.validate(valid => {
|
||||
const formRef = ref()
|
||||
const submit = async () => {
|
||||
loading.value = true
|
||||
formRef.value.validate(async (valid) => {
|
||||
if (valid) {
|
||||
form.value = {
|
||||
...form.value,
|
||||
@@ -196,7 +169,7 @@ const submit = () => {
|
||||
return item.id == form.value.monitorNumber
|
||||
})?.name
|
||||
}
|
||||
addComplaintsData(form.value).then(res => {
|
||||
await addComplaintsData(form.value).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
message: '新增成功',
|
||||
@@ -213,6 +186,9 @@ const submit = () => {
|
||||
return false
|
||||
}
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
const open = (row: any) => {
|
||||
|
||||
Reference in New Issue
Block a user