|
@@ -42,6 +42,7 @@
|
|
|
</div>
|
|
|
</van-form>
|
|
|
</van-col>
|
|
|
+ <!-- <van-button @click="createData">添加</van-button> -->
|
|
|
</template>
|
|
|
</admin-frame>
|
|
|
</div>
|
|
@@ -50,6 +51,7 @@
|
|
|
<script>
|
|
|
import adminFrame from '@frame/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+import { Toast } from 'vant';
|
|
|
const { mapActions: patenttrans } = createNamespacedHelpers('patenttrans');
|
|
|
var moment = require('moment');
|
|
|
export default {
|
|
@@ -89,6 +91,16 @@ export default {
|
|
|
this.$set(this.form, this.calendar_type, moment(date).format('YYYY-MM-DD'));
|
|
|
this.calendarShow = false;
|
|
|
},
|
|
|
+ // 自动添加数据
|
|
|
+ async createData() {
|
|
|
+ let data = [];
|
|
|
+ for (const val of data) {
|
|
|
+ let res = await this.create(val);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$toast({ type: `success`, message: `操作成功` });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|