修改技术监督按钮重复点击问题
This commit is contained in:
@@ -1061,7 +1061,7 @@ export default {
|
|||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: "none",
|
symbol: "none",
|
||||||
sampling: "lttb",
|
sampling: "average",
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#FFCC00",
|
color: "#FFCC00",
|
||||||
},
|
},
|
||||||
@@ -1072,7 +1072,7 @@ export default {
|
|||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: "none",
|
symbol: "none",
|
||||||
sampling: "lttb",
|
sampling: "average",
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#009900",
|
color: "#009900",
|
||||||
},
|
},
|
||||||
@@ -1083,7 +1083,7 @@ export default {
|
|||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: "none",
|
symbol: "none",
|
||||||
sampling: "lttb",
|
sampling: "average",
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#CC0000",
|
color: "#CC0000",
|
||||||
},
|
},
|
||||||
@@ -1479,7 +1479,7 @@ export default {
|
|||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: "none",
|
symbol: "none",
|
||||||
sampling: "lttb",
|
sampling: "average",
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#FFCC00",
|
color: "#FFCC00",
|
||||||
},
|
},
|
||||||
@@ -1490,7 +1490,7 @@ export default {
|
|||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: "none",
|
symbol: "none",
|
||||||
sampling: "lttb",
|
sampling: "average",
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#009900",
|
color: "#009900",
|
||||||
},
|
},
|
||||||
@@ -1501,7 +1501,7 @@ export default {
|
|||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: "none",
|
symbol: "none",
|
||||||
sampling: "lttb",
|
sampling: "average",
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#CC0000",
|
color: "#CC0000",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -729,7 +729,7 @@ export default {
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'average',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#FFCC00'
|
color: '#FFCC00'
|
||||||
},
|
},
|
||||||
@@ -740,7 +740,7 @@ export default {
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'average',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#009900'
|
color: '#009900'
|
||||||
},
|
},
|
||||||
@@ -751,7 +751,7 @@ export default {
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'average',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#CC0000'
|
color: '#CC0000'
|
||||||
},
|
},
|
||||||
@@ -1083,7 +1083,7 @@ export default {
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'average',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#FFCC00'
|
color: '#FFCC00'
|
||||||
},
|
},
|
||||||
@@ -1094,7 +1094,7 @@ export default {
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'average',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#009900'
|
color: '#009900'
|
||||||
},
|
},
|
||||||
@@ -1105,7 +1105,7 @@ export default {
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'average',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#CC0000'
|
color: '#CC0000'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submit">确认</el-button>
|
<el-button type="primary" @click="submit" v-loading="loading">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -51,6 +51,7 @@ const emit = defineEmits(['getTree'])
|
|||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
|
const loading = ref(false)
|
||||||
const dataTree = ref([])
|
const dataTree = ref([])
|
||||||
const TreeList: any = ref({})
|
const TreeList: any = ref({})
|
||||||
const List = ref({})
|
const List = ref({})
|
||||||
@@ -110,7 +111,8 @@ const open = (row: any) => {
|
|||||||
// row.row
|
// row.row
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const submit = () => {
|
const submit = async () => {
|
||||||
|
loading.value = true
|
||||||
formRef.value.validate(async (valid: boolean) => {
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (title.value == '新增算法') {
|
if (title.value == '新增算法') {
|
||||||
@@ -121,7 +123,7 @@ const submit = () => {
|
|||||||
forms.name = form.name
|
forms.name = form.name
|
||||||
forms.pid = form.pid
|
forms.pid = form.pid
|
||||||
}
|
}
|
||||||
addAlgorithm(forms).then(res => {
|
await addAlgorithm(forms).then(res => {
|
||||||
ElMessage.success('新增成功')
|
ElMessage.success('新增成功')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
emit('getTree')
|
emit('getTree')
|
||||||
@@ -135,7 +137,7 @@ const submit = () => {
|
|||||||
forms.id = form.id
|
forms.id = form.id
|
||||||
}
|
}
|
||||||
forms.pid = null
|
forms.pid = null
|
||||||
updateAlgorithmLibrary(forms).then(res => {
|
await updateAlgorithmLibrary(forms).then(res => {
|
||||||
ElMessage.success('修改成功')
|
ElMessage.success('修改成功')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
emit('getTree')
|
emit('getTree')
|
||||||
@@ -143,6 +145,9 @@ const submit = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
await setTimeout(() => {
|
||||||
|
loading.value=false
|
||||||
|
},0)
|
||||||
}
|
}
|
||||||
const getTheTree = () => {
|
const getTheTree = () => {
|
||||||
queryAllAlgorithmLibrary().then(res => {
|
queryAllAlgorithmLibrary().then(res => {
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" :before-close="handleClose"
|
||||||
draggable
|
width="1200px">
|
||||||
class="cn-operate-dialog"
|
|
||||||
v-model="dialogVisible"
|
|
||||||
:title="title"
|
|
||||||
:before-close="handleClose"
|
|
||||||
width="1200px"
|
|
||||||
>
|
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-form :inline="false" :model="form" class="form-two" label-width="auto" :rules="rules" ref="formRef">
|
<el-form :inline="false" :model="form" class="form-two" label-width="auto" :rules="rules" ref="formRef">
|
||||||
<el-form-item label="事件名称" prop="name">
|
<el-form-item label="事件名称" prop="name">
|
||||||
@@ -21,37 +15,21 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="发生地点" prop="location">
|
<el-form-item label="发生地点" prop="location">
|
||||||
<el-input
|
<el-input v-model="form.location" placeholder="请输入发生地点" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
v-model="form.location"
|
type="textarea" />
|
||||||
placeholder="请输入发生地点"
|
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="事件经过" prop="process">
|
<el-form-item label="事件经过" prop="process">
|
||||||
<el-input
|
<el-input v-model="form.process" placeholder="请输入事件经过" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
v-model="form.process"
|
type="textarea" />
|
||||||
placeholder="请输入事件经过"
|
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="处理措施" prop="measures">
|
<el-form-item label="处理措施" prop="measures">
|
||||||
<el-input
|
<el-input v-model="form.measures" placeholder="请输入处理措施" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
v-model="form.measures"
|
type="textarea" />
|
||||||
placeholder="请输入处理措施"
|
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="治理效果" prop="effect">
|
<el-form-item label="治理效果" prop="effect">
|
||||||
<el-input
|
<el-input v-model="form.effect" placeholder="请输入治理效果" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
v-model="form.effect"
|
type="textarea" />
|
||||||
placeholder="请输入治理效果"
|
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<el-upload v-model:file-list="fileList" action="" :auto-upload="false" multiple>
|
<el-upload v-model:file-list="fileList" action="" :auto-upload="false" multiple>
|
||||||
@@ -68,7 +46,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="handleClose">取消</el-button>
|
<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>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -85,6 +63,7 @@ const emit = defineEmits(['onSubmit'])
|
|||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
|
const loading = ref(false)
|
||||||
const fileList: any = ref([])
|
const fileList: any = ref([])
|
||||||
// 注意不要和表单ref的命名冲突
|
// 注意不要和表单ref的命名冲突
|
||||||
const form = reactive<anyObj>({
|
const form = reactive<anyObj>({
|
||||||
@@ -135,8 +114,9 @@ const open = (text: string, data?: anyObj) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const submit = () => {
|
const submit = async () => {
|
||||||
formRef.value.validate(async (valid: boolean) => {
|
loading.value = true
|
||||||
|
await formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (fileList.value.length > 0) {
|
if (fileList.value.length > 0) {
|
||||||
const promises = fileList.value.map(async item => {
|
const promises = fileList.value.map(async item => {
|
||||||
@@ -164,21 +144,25 @@ const submit = () => {
|
|||||||
form.url = ''
|
form.url = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
await setTimeout(async () => {
|
||||||
if (title.value === '新增案例') {
|
if (title.value === '新增案例') {
|
||||||
libcaseAdd(form).then(res => {
|
await libcaseAdd(form).then(res => {
|
||||||
ElMessage.success(title.value + '成功!')
|
ElMessage.success(title.value + '成功!')
|
||||||
handleClose()
|
handleClose()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
await updateCaseLibrary(form).then(res => {
|
||||||
ElMessage.success(title.value + '成功!')
|
ElMessage.success(title.value + '成功!')
|
||||||
updateCaseLibrary(form).then(res => {
|
|
||||||
handleClose()
|
handleClose()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
await setTimeout(() => {
|
||||||
|
loading.value = false
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submit">确认</el-button>
|
<el-button type="primary" @click="submit" :loading="loading">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -57,6 +57,7 @@ const form = reactive<anyObj>({
|
|||||||
url: ''
|
url: ''
|
||||||
})
|
})
|
||||||
const urlList: any = ref([])
|
const urlList: any = ref([])
|
||||||
|
const loading=ref(false)
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name',
|
label: 'name',
|
||||||
@@ -107,7 +108,8 @@ const getTheTree = () => {
|
|||||||
dataTree.value = res.data
|
dataTree.value = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const submit = () => {
|
const submit = async() => {
|
||||||
|
loading.value=true
|
||||||
formRef.value.validate(async (valid: boolean) => {
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (urlList.value.length > 0 && form.pid != '') {
|
if (urlList.value.length > 0 && form.pid != '') {
|
||||||
@@ -162,6 +164,9 @@ const submit = () => {
|
|||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
loading.value=false
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
urlList.value = []
|
urlList.value = []
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submit">确认</el-button>
|
<el-button type="primary" @click="submit" :loading="loading">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -42,6 +42,7 @@ const form = reactive<anyObj>({
|
|||||||
url: ''
|
url: ''
|
||||||
})
|
})
|
||||||
const urlList: any = ref([])
|
const urlList: any = ref([])
|
||||||
|
const loading=ref(false)
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name',
|
label: 'name',
|
||||||
@@ -86,6 +87,7 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
|
|||||||
|
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
|
loading.value = true
|
||||||
formRef.value.validate(async (valid: boolean) => {
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (urlList.value.length > 0) {
|
if (urlList.value.length > 0) {
|
||||||
@@ -138,6 +140,9 @@ const submit = () => {
|
|||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
loading.value = false
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
urlList.value = []
|
urlList.value = []
|
||||||
|
|||||||
Reference in New Issue
Block a user