71 lines
1.6 KiB
Vue
71 lines
1.6 KiB
Vue
<template>
|
|
<view class="content">
|
|
<nav-bar title="缓存线异常处理"></nav-bar>
|
|
<view class="search-confirm-wrap">
|
|
<view class="search-wrap">
|
|
<view class="search-item">
|
|
<label class="search-label">缓存线</label>
|
|
<view class="filter_input_wraper">
|
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="confirm-button-wrap">
|
|
<button class="confirm-button" :disabled="disabled" @tap="toSure()">暂停</button>
|
|
<button class="confirm-button" :disabled="disabled" @tap="toSure()">启动</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import NavBar from '@/components/NavBar.vue'
|
|
import SearchBox from '@/components/SearchBox.vue'
|
|
import {cacheLineExcepOpt} from '@/utils/getData1.js'
|
|
export default {
|
|
components: {
|
|
NavBar,
|
|
SearchBox
|
|
},
|
|
data() {
|
|
return {
|
|
options1: [],
|
|
index1: '',
|
|
disabled: false
|
|
};
|
|
},
|
|
methods: {
|
|
/** 选择器1 */
|
|
selectChange1(e) {
|
|
this.index1 = e
|
|
},
|
|
async toSure (type) {
|
|
this.disabled = true
|
|
if (!this.index1) {
|
|
uni.showToast({
|
|
title: '请选择',
|
|
icon: 'none'
|
|
})
|
|
this.disabled = false
|
|
return
|
|
}
|
|
try {
|
|
let res = await _cacheLineExcepOpt()
|
|
this.disabled = false
|
|
uni.showToast({
|
|
title: res.message,
|
|
icon: 'none'
|
|
})
|
|
} catch (e) {
|
|
this.disabled = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="stylus" scoped>
|
|
@import '../../common/style/mixin.styl';
|
|
// .grid-wrap
|
|
// height calc(100% - 526rpx)
|
|
</style> |