|
|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
|
|
|
|
<uni-forms-item required label="AGV id" name="agvid">
|
|
|
|
|
<uni-easyinput
|
|
|
|
|
type="number"
|
|
|
|
|
type="text"
|
|
|
|
|
v-model="formData.agvid"
|
|
|
|
|
placeholder="请输入AGV id"
|
|
|
|
|
/>
|
|
|
|
|
@ -52,9 +52,12 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs.form.validate().then((res) => {
|
|
|
|
|
const params = { agvid: res.agvid, groupid: +res.groupid };
|
|
|
|
|
console.log(params);
|
|
|
|
|
uni.removeStorageSync("agv_id");
|
|
|
|
|
uni.setStorage({
|
|
|
|
|
key: "agv_id",
|
|
|
|
|
data: JSON.stringify(res),
|
|
|
|
|
data: JSON.stringify(params),
|
|
|
|
|
success: function () {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "提交成功",
|
|
|
|
|
@ -70,14 +73,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
const _this = this;
|
|
|
|
|
uni.setStorageSync({
|
|
|
|
|
key: "agv_id",
|
|
|
|
|
success: function (res) {
|
|
|
|
|
const data = JSON.parse(res.data);
|
|
|
|
|
_this.formData = data;
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const data = uni.getStorageSync("agv_id");
|
|
|
|
|
this.formData = JSON.parse(data);
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|