|
@@ -140,8 +140,8 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
queryContent: [],
|
|
|
- catchOptions: JSON.parse(localStorage.getItem('catchOptions')) || [],
|
|
|
- catchOptionsAll: [JSON.parse(localStorage.getItem('catchOptions'))] || [],
|
|
|
+ catchOptions: JSON.parse(localStorage.getItem(this.$route.path)) || [],
|
|
|
+ catchOptionsAll: [JSON.parse(localStorage.getItem(this.$route.path))] || [],
|
|
|
flightDate: new Array(2).fill(parseTime(new Date(), '{y}-{m}-{d}')),
|
|
|
paramsForm: {
|
|
|
params: [],
|
|
@@ -277,7 +277,7 @@ export default {
|
|
|
this.addParamsHandler()
|
|
|
}
|
|
|
},
|
|
|
- advancedQueryHandler () {
|
|
|
+ advancedQueryHandler (Jump = false) {
|
|
|
try {
|
|
|
this.$refs['paramsForm'].validate(valid => {
|
|
|
if (!valid) {
|
|
@@ -323,7 +323,9 @@ export default {
|
|
|
queryContent.push(obj)
|
|
|
}
|
|
|
this.queryContent = queryContent
|
|
|
- this.sendColData()
|
|
|
+ if (!Jump) {
|
|
|
+ this.sendColData()
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
error.message && this.$message.error(error.message)
|
|
|
}
|
|
@@ -399,9 +401,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
deleteParam (rowIndex) {
|
|
|
- this.paramsTableCols[2].inputType.splice(rowIndex, 1)
|
|
|
- this.paramsForm.params.splice(rowIndex, 1)
|
|
|
- this.paramsForm.disabled.splice(rowIndex, 1)
|
|
|
+ if (this.paramsTableCols[2].inputType.length > 1 && this.paramsForm.params.length > 1) {
|
|
|
+ this.paramsTableCols[2].inputType.splice(rowIndex, 1)
|
|
|
+ this.paramsForm.params.splice(rowIndex, 1)
|
|
|
+ this.paramsForm.disabled.splice(rowIndex, 1)
|
|
|
+ }
|
|
|
},
|
|
|
toggle (rowIndex) {
|
|
|
const { connector } = this.paramsForm.params[rowIndex]
|
|
@@ -423,7 +427,7 @@ export default {
|
|
|
},
|
|
|
//收藏
|
|
|
advancedQueryCollect () {
|
|
|
- this.advancedQueryHandler()
|
|
|
+ this.advancedQueryHandler(true)
|
|
|
if (!this.queryContent.length) return
|
|
|
this.$prompt('请输入收藏标题', '收藏', {
|
|
|
confirmButtonText: '确定',
|
|
@@ -438,7 +442,8 @@ export default {
|
|
|
itemVal: this.catchOptionsAll?.at(-1)
|
|
|
}
|
|
|
this.catchOptions.push(catchItem)
|
|
|
- localStorage.setItem('catchOptions', JSON.stringify(this.catchOptions))
|
|
|
+ localStorage.setItem(this.$route.path, JSON.stringify(this.catchOptions))
|
|
|
+ this.$message.success('收藏成功')
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
@@ -452,7 +457,7 @@ export default {
|
|
|
catchCopy.splice(index, 1)
|
|
|
this.catchOptionsAll = []
|
|
|
this.catchOptionsAll = [catchCopy]
|
|
|
- localStorage.setItem('catchOptions', JSON.stringify(catchCopy))
|
|
|
+ localStorage.setItem(this.$route.path, JSON.stringify(catchCopy))
|
|
|
},
|
|
|
//收藏查询
|
|
|
queryRecover (item) {
|