parent
748b0784a0
commit
34523dcde2
@ -0,0 +1,49 @@
|
||||
/*
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : cxy
|
||||
Source Server Version : 80200
|
||||
Source Host : localhost:3306
|
||||
Source Database : express_management
|
||||
|
||||
Target Server Type : MYSQL
|
||||
Target Server Version : 80200
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2024-11-23 21:42:21
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for express_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `express_info`;
|
||||
CREATE TABLE `express_info` (
|
||||
`id` int NOT NULL,
|
||||
`expressId` varchar(50) NOT NULL,
|
||||
`sename` varchar(20) NOT NULL,
|
||||
`sephone` varchar(15) NOT NULL,
|
||||
`seaddress` varchar(100) NOT NULL,
|
||||
`rename` varchar(20) NOT NULL,
|
||||
`rephone` varchar(15) NOT NULL,
|
||||
`readdress` varchar(100) NOT NULL,
|
||||
`issigned` tinyint(1) NOT NULL,
|
||||
`signtime` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `user`;
|
||||
CREATE TABLE `user` (
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`username` varchar(20) NOT NULL,
|
||||
`password` varchar(32) NOT NULL,
|
||||
`nickname` varchar(10) DEFAULT NULL,
|
||||
`isCourier` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
After Width: | Height: | Size: 55 KiB |
@ -0,0 +1,50 @@
|
||||
import {defineStore} from 'pinia'
|
||||
|
||||
export const expressStore = defineStore('express', {
|
||||
state: () => {
|
||||
return {
|
||||
expressList: [
|
||||
{
|
||||
express_no: '123456789',
|
||||
s_datetime: '2023-10-01 10:00',
|
||||
senderCity: '北京',
|
||||
senderName: '张三',
|
||||
senderPhone: '13800000000',
|
||||
receiverCity: '上海',
|
||||
receiverName: '李四',
|
||||
receiverPhone: '13900000000'
|
||||
},
|
||||
{
|
||||
express_no: '987654321',
|
||||
s_datetime: '2023-10-02 11:00',
|
||||
senderCity: '广州',
|
||||
senderName: '王五',
|
||||
senderPhone: '13700000000',
|
||||
receiverCity: '深圳',
|
||||
receiverName: '赵六',
|
||||
receiverPhone: '13600000000'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
getters: {},
|
||||
actions: {
|
||||
add(item) {
|
||||
this.expressList.push(item)
|
||||
},
|
||||
modify(item, index) {
|
||||
this.expressList[index] = item
|
||||
},
|
||||
deleteByIndex(index) {
|
||||
this.expressList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
persist: {
|
||||
enabled: true,
|
||||
strategies: [{
|
||||
key: 'express',
|
||||
storage: localStorage,
|
||||
paths: ['expressList']
|
||||
}],
|
||||
}
|
||||
})
|
@ -1,29 +0,0 @@
|
||||
import {defineStore} from 'pinia'
|
||||
|
||||
export const expressStore = defineStore('express', {
|
||||
state: () => {
|
||||
return {
|
||||
expressList: [],
|
||||
}
|
||||
},
|
||||
getters: {},
|
||||
actions: {
|
||||
add(item) {
|
||||
this.expressList.push(item)
|
||||
},
|
||||
modify(item, index) {
|
||||
this.expressList[index] = item
|
||||
},
|
||||
remove(index) {
|
||||
this.expressList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
persist: {
|
||||
enabled: true,
|
||||
strategies: [{
|
||||
key: 'express',
|
||||
storage: localStorage,
|
||||
path: ['express']
|
||||
}],
|
||||
}
|
||||
})
|
Loading…
Reference in new issue