|
@@ -3,10 +3,15 @@
|
|
|
<a-divider orientation="left">
|
|
|
<b>{{ formTitle }}</b>
|
|
|
</a-divider>
|
|
|
- <span style="margin-right: 8px; margin-left: 22px">用车时间结束前</span>
|
|
|
- <a-input-number id="inputNumber" v-model="valueNum" :min="1" :max="1000" @change="onChange" />
|
|
|
- <!-- {{ valueNum }} -->
|
|
|
- <span style="margin-left: 10px">分钟</span>
|
|
|
+ <div>
|
|
|
+ <span style="margin-right: 8px; margin-left: 22px">用车时间结束前</span>
|
|
|
+ <a-input-number id="inputNumber" v-model="valueNum" :min="1" :max="1000" @change="onChange" />
|
|
|
+ <!-- {{ valueNum }} -->
|
|
|
+ <span style="margin-left: 10px">分钟</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>是否确认打开全部箱门</span>
|
|
|
+ </div>
|
|
|
<div slot="footer">
|
|
|
<a-button type="primary" @click="handleEdit">确定</a-button>
|
|
|
<a-button @click="onClose">取消</a-button>
|
|
@@ -15,9 +20,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getWarn } from '@/api/keys'
|
|
|
+import { getWarn, getOpenAll } from '@/api/keys'
|
|
|
export default {
|
|
|
components: {},
|
|
|
+ props: {
|
|
|
+ showNum: Number,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
submitLoading: false,
|
|
@@ -30,7 +38,19 @@ export default {
|
|
|
filters: {},
|
|
|
created() {},
|
|
|
computed: {},
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ showNum: {
|
|
|
+ handler(val) {
|
|
|
+ if (val == 1) {
|
|
|
+ this.formTitle = '自动归还提示配置'
|
|
|
+ } else if (val == 2) {
|
|
|
+ this.formTitle = '一键开箱'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ // immediate: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
onClose() {
|
|
@@ -38,16 +58,25 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
handleEdit() {
|
|
|
- const params = {
|
|
|
- remindId: 4,
|
|
|
- threshold: this.valueNum,
|
|
|
- }
|
|
|
- getWarn(params).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success('配置成功')
|
|
|
- this.onClose()
|
|
|
+ if (this.showNum == 1) {
|
|
|
+ const params = {
|
|
|
+ remindId: 4,
|
|
|
+ threshold: this.valueNum,
|
|
|
}
|
|
|
- })
|
|
|
+ getWarn(params).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('配置成功')
|
|
|
+ this.onClose()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.showNum == 2) {
|
|
|
+ getOpenAll().then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('开箱成功')
|
|
|
+ }
|
|
|
+ this.funKeyList()
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
onChange(val) {
|
|
|
this.valueNum = val
|