diff --git a/package.json b/package.json
index c736e4d..6efaae3 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "myVue_3.2",
+ "name": "my-vue-3.2",
"version": "0.1.0",
"private": true,
"scripts": {
@@ -11,7 +11,9 @@
"dependencies": {
"@element-plus/icons-vue": "^2.0.6",
"axios": "^0.27.2",
+ "cesium": "^1.95.0",
"core-js": "^3.8.3",
+ "dayjs": "^1.11.4",
"driver.js": "^0.9.8",
"element-plus": "1.3.0-beta.5",
"lint-staged": "13.0.3",
diff --git a/src/App.vue b/src/App.vue
index 17507fb..7c4b8de 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,4 +4,9 @@
-
+
diff --git a/src/api/user.js b/src/api/user.js
new file mode 100644
index 0000000..ac81d9e
--- /dev/null
+++ b/src/api/user.js
@@ -0,0 +1,38 @@
+import request from './request'
+
+export const getUser = (params) => {
+ return request({
+ url: '/users',
+ params
+ })
+}
+
+export const changeUserState = (uid, type) => {
+ return request({
+ url: `users/${uid}/state/${type}`,
+ method: 'put'
+ })
+}
+
+export const addUser = (data) => {
+ return request({
+ url: 'users',
+ method: 'post',
+ data
+ })
+}
+
+export const editUser = (data) => {
+ return request({
+ url: `users/${data.id}`,
+ method: 'put',
+ data
+ })
+}
+
+export const deleteUser = (id) => {
+ return request({
+ url: `users/${id}`,
+ method: 'delete'
+ })
+}
diff --git a/src/main.js b/src/main.js
index 2c359ab..eca0639 100644
--- a/src/main.js
+++ b/src/main.js
@@ -8,6 +8,9 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import '@/router/premission'
import i18n from './i18n/i18nIndex'
+import * as Cesium from '../node_modules/cesium/Source/Cesium'
+import '../node_modules/cesium/Source/Widgets/widgets.css'
+import filters from './utils/filters'
const app = createApp(App)
SvgIcon(app)
@@ -17,3 +20,11 @@ app.use(store).use(router).use(i18n).mount('#app')
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component)
}
+
+// 全局引入时间过滤设置
+filters(app)
+
+// 全局引入 Cesium
+app.config.globalProperties.$Cesium = Cesium
+Cesium.Ion.defaultAccessToken =
+ 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjhhMGMyNy0xOGJhLTQyNDItODdjMC1kYzdhZjU5M2RlNTYiLCJpZCI6MTAyNzI1LCJpYXQiOjE2NTg5MTQwMTV9.V8wOhhVUW0PvDJq7KIlzieoWhtZcbWXeYnrY2iZoJl8'
diff --git a/src/utils/filters.js b/src/utils/filters.js
new file mode 100644
index 0000000..e429dc7
--- /dev/null
+++ b/src/utils/filters.js
@@ -0,0 +1,22 @@
+const dayjs = require('dayjs')
+//
+const filterTimes = (val, format = 'YYYY-MM-DD') => {
+ if (!isNull(val)) {
+ val = parseInt(val) * 1000
+ return dayjs(val).format(format)
+ } else {
+ return '--'
+ }
+}
+// 判断外来的值是否为空
+export const isNull = (date) => {
+ if (!date) return true
+ if (JSON.stringify(date) === '{}') return true
+ if (JSON.stringify(date) === '[]') return true
+}
+
+export default (app) => {
+ app.config.globalProperties.$filters = {
+ filterTimes
+ }
+}
diff --git a/src/views/reports/myMap.vue b/src/views/reports/myMap.vue
new file mode 100644
index 0000000..05dfae9
--- /dev/null
+++ b/src/views/reports/myMap.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
diff --git a/src/views/reports/zdReports.vue b/src/views/reports/zdReports.vue
index 9960e8d..72fd350 100644
--- a/src/views/reports/zdReports.vue
+++ b/src/views/reports/zdReports.vue
@@ -1,7 +1,12 @@
reports
+
+
-
+
diff --git a/src/views/users/components/dialogIndex.vue b/src/views/users/components/dialogIndex.vue
new file mode 100644
index 0000000..9c1d946
--- /dev/null
+++ b/src/views/users/components/dialogIndex.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/users/userOptions.js b/src/views/users/userOptions.js
new file mode 100644
index 0000000..3f02f6a
--- /dev/null
+++ b/src/views/users/userOptions.js
@@ -0,0 +1,35 @@
+export const options = [
+ // {
+ // label: 'id',
+ // prop: 'id'
+ // },
+ {
+ label: 'username',
+ prop: 'username'
+ },
+ {
+ label: 'email',
+ prop: 'email'
+ },
+ {
+ label: 'mobile',
+ prop: 'mobile'
+ },
+ {
+ label: 'role_name',
+ prop: 'role_name'
+ },
+ {
+ label: 'mg_state',
+ prop: 'mg_state'
+ },
+ {
+ label: 'create_time',
+ prop: 'create_time'
+ },
+ {
+ label: 'action',
+ prop: 'action',
+ width: 200
+ }
+]
diff --git a/src/views/users/zdUsers.vue b/src/views/users/zdUsers.vue
index b1e1da7..af06354 100644
--- a/src/views/users/zdUsers.vue
+++ b/src/views/users/zdUsers.vue
@@ -1,7 +1,175 @@
- users
+
+
+
+
+
+
+
+
+
+
+ {{ $filters.filterTimes(row.create_time) }}
+
+
+
+
+
+
+
+
+
+
-
+
+
+
diff --git a/yarn.lock b/yarn.lock
index fe24a51..37f11e0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2610,6 +2610,11 @@ case-sensitive-paths-webpack-plugin@^2.3.0:
resolved "https://registry.npmmirror.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz#db64066c6422eed2e08cc14b986ca43796dbc6d4"
integrity sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==
+cesium@^1.95.0:
+ version "1.95.0"
+ resolved "https://registry.npmmirror.com/cesium/-/cesium-1.95.0.tgz#8a9036c58b9818406586259d3720a05f24e87a69"
+ integrity sha512-59U0lZD/wmSJa4t9FcK1/sp6PyCpx7h8c4giLd8VM7LJDL6w0G0o4QGlZ4TSJTBe4VIClf+qPDUf47wyBu4YoA==
+
chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.npmmirror.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
@@ -3187,6 +3192,11 @@ dayjs@^1.10.7:
resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258"
integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A==
+dayjs@^1.11.4:
+ version "1.11.4"
+ resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.4.tgz#3b3c10ca378140d8917e06ebc13a4922af4f433e"
+ integrity sha512-Zj/lPM5hOvQ1Bf7uAvewDaUcsJoI6JmNqmHhHl3nyumwe0XHwt8sWdOVAPACJzCebL8gQCi+K49w7iKWnGwX9g==
+
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"