|
@ -1,12 +0,0 @@
|
|||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
|
@ -1,2 +0,0 @@
|
|||
TARO_APP_ID="wx0acd1c4fcf94bdd3"
|
||||
TARO_APP_BASE_API="http://172.10.10.93:8765"
|
|
@ -1,2 +0,0 @@
|
|||
TARO_APP_ID="wx24cc8a872b57ac79"
|
||||
TARO_APP_BASE_API="http://172.10.10.207:7000"
|
|
@ -1 +0,0 @@
|
|||
# TARO_APP_ID="测试环境下的小程序appid"
|
|
@ -1,10 +0,0 @@
|
|||
// ESLint 检查 .vue 文件需要单独配置编辑器:
|
||||
// https://eslint.vuejs.org/user-guide/#editor-integrations
|
||||
{
|
||||
"extends": [
|
||||
"taro/vue3"
|
||||
],
|
||||
"rules": {
|
||||
"vue/multi-word-component-names": "off"
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
dist/
|
||||
deploy_versions/
|
||||
.temp/
|
||||
.rn_temp/
|
||||
node_modules/
|
||||
.DS_Store
|
||||
.swc
|
||||
yarn.lock
|
||||
components.d.ts
|
||||
package-lock.json
|
||||
.idea
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
import TestUtils from '@tarojs/test-utils-vue3'
|
||||
|
||||
describe('Testing', () => {
|
||||
|
||||
test('Test', async () => {
|
||||
const testUtils = new TestUtils()
|
||||
await testUtils.createApp()
|
||||
await testUtils.PageLifecycle.onShow('pages/index/index')
|
||||
expect(testUtils.html()).toMatchSnapshot()
|
||||
})
|
||||
|
||||
})
|
|
@ -1,10 +0,0 @@
|
|||
// babel-preset-taro 更多选项和默认值:
|
||||
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
|
||||
module.exports = {
|
||||
presets: [
|
||||
['taro', {
|
||||
framework: 'vue3',
|
||||
ts: true
|
||||
}]
|
||||
]
|
||||
}
|
|
@ -1,124 +0,0 @@
|
|||
// import type { UserConfigExport } from "@tarojs/cli";
|
||||
// export default {
|
||||
// logger: {
|
||||
// quiet: false,
|
||||
// stats: true
|
||||
// },
|
||||
// mini: {},
|
||||
// h5: {}
|
||||
// } satisfies UserConfigExport
|
||||
import {defineConfig, type UserConfigExport} from '@tarojs/cli'
|
||||
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
|
||||
import devConfig from './dev'
|
||||
import prodConfig from './prod'
|
||||
import ComponentsPlugin from 'unplugin-vue-components/webpack'
|
||||
import NutUIResolver from '@nutui/auto-import-resolver'
|
||||
|
||||
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
|
||||
export default defineConfig(async (merge, {command, mode}) => {
|
||||
const baseConfig: UserConfigExport = {
|
||||
projectName: 'collect_information',
|
||||
date: '2024-4-12',
|
||||
designWidth(input: any) {
|
||||
// 配置 NutUI 375 尺寸
|
||||
if (input?.file?.replace(/\\+/g, '/').indexOf('@nutui') > -1) {
|
||||
return 375
|
||||
}
|
||||
// 全局使用 Taro 默认的 750 尺寸
|
||||
return 750
|
||||
},
|
||||
deviceRatio: {
|
||||
640: 2.34 / 2,
|
||||
750: 1,
|
||||
828: 1.81 / 2,
|
||||
375: 2
|
||||
},
|
||||
sourceRoot: 'src',
|
||||
outputRoot: 'dist',
|
||||
plugins: ['@tarojs/plugin-html'],
|
||||
defineConstants: {},
|
||||
copy: {
|
||||
patterns: [],
|
||||
options: {}
|
||||
},
|
||||
framework: 'vue3',
|
||||
compiler: 'webpack5',
|
||||
cache: {
|
||||
enable: false // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
||||
},
|
||||
mini: {
|
||||
miniCssExtractPluginOption: {
|
||||
ignoreOrder: true
|
||||
},
|
||||
postcss: {
|
||||
pxtransform: {
|
||||
enable: true,
|
||||
config: {}
|
||||
},
|
||||
url: {
|
||||
enable: true,
|
||||
config: {
|
||||
limit: 1024 // 设定转换尺寸上限
|
||||
}
|
||||
},
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
},
|
||||
webpackChain(chain) {
|
||||
chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin)
|
||||
chain.plugin('unplugin-vue-components').use(ComponentsPlugin({
|
||||
resolvers: [NutUIResolver({taro: true})]
|
||||
}))
|
||||
}
|
||||
},
|
||||
h5: {
|
||||
publicPath: '/',
|
||||
staticDirectory: 'static',
|
||||
output: {
|
||||
filename: 'js/[name].[hash:8].js',
|
||||
chunkFilename: 'js/[name].[chunkhash:8].js'
|
||||
},
|
||||
miniCssExtractPluginOption: {
|
||||
ignoreOrder: true,
|
||||
filename: 'css/[name].[hash].css',
|
||||
chunkFilename: 'css/[name].[chunkhash].css'
|
||||
},
|
||||
postcss: {
|
||||
autoprefixer: {
|
||||
enable: true,
|
||||
config: {}
|
||||
},
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
},
|
||||
webpackChain(chain) {
|
||||
chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin)
|
||||
}
|
||||
},
|
||||
rn: {
|
||||
appName: 'taroDemo',
|
||||
postcss: {
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 本地开发构建配置(不混淆压缩)
|
||||
return merge({}, baseConfig, devConfig)
|
||||
}
|
||||
// 生产构建配置(默认开启压缩混淆等)
|
||||
return merge({}, baseConfig, prodConfig)
|
||||
})
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
import {defineConfig, type UserConfigExport} from '@tarojs/cli'
|
||||
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
|
||||
import devConfig from './dev'
|
||||
import prodConfig from './prod'
|
||||
import ComponentsPlugin from 'unplugin-vue-components/webpack'
|
||||
import NutUIResolver from '@nutui/auto-import-resolver'
|
||||
|
||||
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
|
||||
export default defineConfig(async (merge, {command, mode}) => {
|
||||
const baseConfig: UserConfigExport = {
|
||||
projectName: 'collect_information',
|
||||
date: '2024-4-12',
|
||||
designWidth(input: any) {
|
||||
// 配置 NutUI 375 尺寸
|
||||
if (input?.file?.replace(/\\+/g, '/').indexOf('@nutui') > -1) {
|
||||
return 375
|
||||
}
|
||||
// 全局使用 Taro 默认的 750 尺寸
|
||||
return 750
|
||||
},
|
||||
deviceRatio: {
|
||||
640: 2.34 / 2,
|
||||
750: 1,
|
||||
828: 1.81 / 2,
|
||||
375: 2
|
||||
},
|
||||
sourceRoot: 'src',
|
||||
outputRoot: 'dist',
|
||||
plugins: ['@tarojs/plugin-html'],
|
||||
defineConstants: {},
|
||||
copy: {
|
||||
patterns: [],
|
||||
options: {}
|
||||
},
|
||||
framework: 'vue3',
|
||||
compiler: 'webpack5',
|
||||
cache: {
|
||||
enable: false // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
||||
},
|
||||
mini: {
|
||||
miniCssExtractPluginOption: {
|
||||
ignoreOrder: true
|
||||
},
|
||||
postcss: {
|
||||
pxtransform: {
|
||||
enable: true,
|
||||
config: {}
|
||||
},
|
||||
url: {
|
||||
enable: true,
|
||||
config: {
|
||||
limit: 1024 // 设定转换尺寸上限
|
||||
}
|
||||
},
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
},
|
||||
webpackChain(chain) {
|
||||
chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin)
|
||||
chain.plugin('unplugin-vue-components').use(ComponentsPlugin({
|
||||
resolvers: [NutUIResolver({taro: true})]
|
||||
}))
|
||||
}
|
||||
},
|
||||
h5: {
|
||||
publicPath: '/',
|
||||
staticDirectory: 'static',
|
||||
output: {
|
||||
filename: 'js/[name].[hash:8].js',
|
||||
chunkFilename: 'js/[name].[chunkhash:8].js'
|
||||
},
|
||||
miniCssExtractPluginOption: {
|
||||
ignoreOrder: true,
|
||||
filename: 'css/[name].[hash].css',
|
||||
chunkFilename: 'css/[name].[chunkhash].css'
|
||||
},
|
||||
postcss: {
|
||||
autoprefixer: {
|
||||
enable: true,
|
||||
config: {}
|
||||
},
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
}
|
||||
},
|
||||
webpackChain(chain) {
|
||||
chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin)
|
||||
}
|
||||
},
|
||||
rn: {
|
||||
appName: 'taroDemo',
|
||||
postcss: {
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 本地开发构建配置(不混淆压缩)
|
||||
return merge({}, baseConfig, devConfig)
|
||||
}
|
||||
// 生产构建配置(默认开启压缩混淆等)
|
||||
return merge({}, baseConfig, prodConfig)
|
||||
})
|
|
@ -1,32 +0,0 @@
|
|||
import type { UserConfigExport } from "@tarojs/cli";
|
||||
export default {
|
||||
mini: {},
|
||||
h5: {
|
||||
/**
|
||||
* WebpackChain 插件配置
|
||||
* @docs https://github.com/neutrinojs/webpack-chain
|
||||
*/
|
||||
// webpackChain (chain) {
|
||||
// /**
|
||||
// * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
|
||||
// * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
|
||||
// */
|
||||
// chain.plugin('analyzer')
|
||||
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
|
||||
// /**
|
||||
// * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
|
||||
// * @docs https://github.com/chrisvfritz/prerender-spa-plugin
|
||||
// */
|
||||
// const path = require('path')
|
||||
// const Prerender = require('prerender-spa-plugin')
|
||||
// const staticDir = path.join(__dirname, '..', 'dist')
|
||||
// chain
|
||||
// .plugin('prerender')
|
||||
// .use(new Prerender({
|
||||
// staticDir,
|
||||
// routes: [ '/pages/index/index' ],
|
||||
// postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
|
||||
// }))
|
||||
// }
|
||||
}
|
||||
} satisfies UserConfigExport
|
|
@ -1,6 +0,0 @@
|
|||
const defineJestConfig = require('@tarojs/test-utils-vue3/dist/jest.js').default
|
||||
|
||||
module.exports = defineJestConfig({
|
||||
testEnvironment: 'jsdom',
|
||||
testMatch: ['<rootDir>/__tests__/**/*.(spec|test).[jt]s?(x)']
|
||||
})
|
|
@ -1,97 +0,0 @@
|
|||
{
|
||||
"name": "collect_information",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "警保联勤联动小程序",
|
||||
"templateInfo": {
|
||||
"name": "default",
|
||||
"typescript": true,
|
||||
"css": "Sass",
|
||||
"framework": "Vue3"
|
||||
},
|
||||
"scripts": {
|
||||
"build:weapp": "taro build --type weapp",
|
||||
"build:swan": "taro build --type swan",
|
||||
"build:alipay": "taro build --type alipay",
|
||||
"build:tt": "taro build --type tt",
|
||||
"build:h5": "taro build --type h5",
|
||||
"build:rn": "taro build --type rn",
|
||||
"build:qq": "taro build --type qq",
|
||||
"build:jd": "taro build --type jd",
|
||||
"build:quickapp": "taro build --type quickapp",
|
||||
"build:harmony-hybrid": "taro build --type harmony-hybrid",
|
||||
"dev:weapp": "npm run build:weapp -- --watch",
|
||||
"dev:swan": "npm run build:swan -- --watch",
|
||||
"dev:alipay": "npm run build:alipay -- --watch",
|
||||
"dev:tt": "npm run build:tt -- --watch",
|
||||
"dev:h5": "npm run build:h5 -- --watch",
|
||||
"dev:rn": "npm run build:rn -- --watch",
|
||||
"dev:qq": "npm run build:qq -- --watch",
|
||||
"dev:jd": "npm run build:jd -- --watch",
|
||||
"dev:quickapp": "npm run build:quickapp -- --watch",
|
||||
"dev:harmony-hybrid": "npm run build:harmony-hybrid -- --watch",
|
||||
"test": "jest"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 3 versions",
|
||||
"Android >= 4.1",
|
||||
"ios >= 8"
|
||||
],
|
||||
"author": "",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.21.5",
|
||||
"@nutui/icons-vue-taro": "^0.0.9",
|
||||
"@nutui/nutui-taro": "^4.3.5",
|
||||
"@tarojs/components": "3.6.25",
|
||||
"@tarojs/helper": "3.6.25",
|
||||
"@tarojs/plugin-framework-vue3": "3.6.25",
|
||||
"@tarojs/plugin-html": "^3.6.26",
|
||||
"@tarojs/plugin-platform-alipay": "3.6.25",
|
||||
"@tarojs/plugin-platform-h5": "3.6.25",
|
||||
"@tarojs/plugin-platform-harmony-hybrid": "3.6.25",
|
||||
"@tarojs/plugin-platform-jd": "3.6.25",
|
||||
"@tarojs/plugin-platform-qq": "3.6.25",
|
||||
"@tarojs/plugin-platform-swan": "3.6.25",
|
||||
"@tarojs/plugin-platform-tt": "3.6.25",
|
||||
"@tarojs/plugin-platform-weapp": "3.6.25",
|
||||
"@tarojs/runtime": "3.6.25",
|
||||
"@tarojs/shared": "3.6.25",
|
||||
"@tarojs/taro": "3.6.25",
|
||||
"dayjs": "^1.11.10",
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persistedstate": "^4.0.1",
|
||||
"vue": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.0",
|
||||
"@nutui/auto-import-resolver": "^1.0.0",
|
||||
"@tarojs/cli": "3.6.25",
|
||||
"@tarojs/taro-loader": "3.6.25",
|
||||
"@tarojs/test-utils-vue3": "^0.1.1",
|
||||
"@tarojs/webpack5-runner": "3.6.25",
|
||||
"@types/jest": "^29.3.1",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/webpack-env": "^1.13.6",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||
"@typescript-eslint/parser": "^6.2.0",
|
||||
"@vue/babel-plugin-jsx": "^1.0.6",
|
||||
"@vue/compiler-sfc": "^3.0.0",
|
||||
"babel-preset-taro": "3.6.25",
|
||||
"css-loader": "3.4.2",
|
||||
"eslint": "^8.12.0",
|
||||
"eslint-config-taro": "3.6.25",
|
||||
"eslint-plugin-vue": "^8.0.0",
|
||||
"jest": "^29.3.1",
|
||||
"jest-environment-jsdom": "^29.5.0",
|
||||
"postcss": "^8.4.18",
|
||||
"style-loader": "1.3.0",
|
||||
"stylelint": "^14.4.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
||||
"typescript": "^5.1.0",
|
||||
"unplugin-vue-components": "^0.26.0",
|
||||
"vue-loader": "^17.0.0",
|
||||
"webpack": "5.78.0"
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"miniprogramRoot": "dist/",
|
||||
"projectname": "collect_information",
|
||||
"description": "警保联勤联动小程序",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": false,
|
||||
"enhance": false,
|
||||
"compileHotReLoad": true,
|
||||
"postcss": false,
|
||||
"minified": false,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"ignoreUploadUnusedFiles": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.5.0",
|
||||
"srcMiniprogramRoot": "dist/",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 2
|
||||
},
|
||||
"appid": "wx8902ddbfddb820d1"
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "collect_information",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
},
|
||||
"condition": {
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "pages/projectManager/myProject/myProject",
|
||||
"pathName": "pages/projectManager/myProject/myProject",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/mine/mine",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/login/login",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/mine/mine",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/index/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/index/dataEntry/buildFloorEntry/buildFloorEntry",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/register/register",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"miniprogramRoot": "./",
|
||||
"projectname": "collect_information",
|
||||
"appid": "testAppId",
|
||||
"setting": {
|
||||
"es6": false,
|
||||
"minified": false
|
||||
}
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
export default defineAppConfig({
|
||||
pages: [
|
||||
'pages/login/login',
|
||||
'pages/register/register',
|
||||
'pages/projectManager/index/index',
|
||||
'pages/policeManager/index/index',
|
||||
'pages/mine/mine',
|
||||
'pages/employeeInfo/employeeInfo',
|
||||
],
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
navigationBarBackgroundColor: '#4e87ff',
|
||||
navigationBarTitleText: '',
|
||||
navigationBarTextStyle:'white',
|
||||
},
|
||||
subpackages: [
|
||||
{
|
||||
root: "subPages",
|
||||
pages: [
|
||||
'pages/policeManager/index',
|
||||
'pages/policeDetails/index',
|
||||
'pages/myProject/myProject',
|
||||
'pages/projectDetails/projectDetails',
|
||||
'pages/form/form'
|
||||
]
|
||||
}
|
||||
],
|
||||
tabBar: {
|
||||
custom: true,
|
||||
list: [
|
||||
{
|
||||
pagePath: 'pages/projectManager/index/index',
|
||||
text: '首页',
|
||||
iconPath: "assets/mine/punch.png",
|
||||
selectedIconPath: "assets/mine/punch-active.png"
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/policeManager/index/index',
|
||||
text: '首页',
|
||||
iconPath: "assets/mine/punch.png",
|
||||
selectedIconPath: "assets/mine/punch-active.png"
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/employeeInfo/employeeInfo',
|
||||
text: '员工信息',
|
||||
iconPath: "assets/mine/punch.png",
|
||||
selectedIconPath: "assets/mine/punch-active.png"
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/mine/mine',
|
||||
text: '我的',
|
||||
iconPath: "assets/mine/my.png",
|
||||
selectedIconPath: "assets/mine/my-active.png"
|
||||
},
|
||||
]
|
||||
}
|
||||
})
|
|
@ -1,4 +0,0 @@
|
|||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
import {createApp} from 'vue'
|
||||
import {createPinia} from 'pinia'
|
||||
import {useCounterStore} from '@/store'
|
||||
import './app.scss'
|
||||
import './assets/scss/colorui.scss'
|
||||
import Taro from "@tarojs/taro";
|
||||
const pinia = createPinia()
|
||||
// import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
// pinia.use(piniaPluginPersistedstate)
|
||||
const App = createApp({
|
||||
onShow(options) {
|
||||
// try {
|
||||
// const store = useCounterStore()
|
||||
// const token = Taro.getStorageSync('token')
|
||||
// console.log(token)
|
||||
// if (token) {
|
||||
// Taro.switchTab({
|
||||
// url: '/pages/mine/mine'
|
||||
// // url: '/pages/projectManager/index/index'
|
||||
//
|
||||
// })
|
||||
// store.setSelected(2)
|
||||
// } else {
|
||||
// console.log(2222)
|
||||
// }
|
||||
// console.log('App onShow.')
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
//
|
||||
// }
|
||||
|
||||
},
|
||||
// 入口组件不需要实现 render 方法,即使实现了也会被 taro 所覆盖
|
||||
})
|
||||
|
||||
App.use(pinia)
|
||||
|
||||
export default App
|
Before Width: | Height: | Size: 500 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 501 B |
Before Width: | Height: | Size: 565 B |
Before Width: | Height: | Size: 416 B |
|
@ -1,308 +0,0 @@
|
|||
/* -- 内外边距 -- */
|
||||
.margin-0 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.margin-xs {
|
||||
margin: 10rpx;
|
||||
}
|
||||
|
||||
.margin-sm {
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.margin {
|
||||
margin: 30rpx;
|
||||
}
|
||||
|
||||
.margin-lg {
|
||||
margin: 40rpx;
|
||||
}
|
||||
|
||||
.margin-xl {
|
||||
margin: 50rpx;
|
||||
}
|
||||
|
||||
.margin-top-xs {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.margin-top-sm {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.margin-top {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.margin-top-lg {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.margin-top-xl {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.margin-right-xs {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.margin-right-sm {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.margin-right {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.margin-right-lg {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.margin-right-xl {
|
||||
margin-right: 50rpx;
|
||||
}
|
||||
|
||||
.margin-bottom-xs {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.margin-bottom-sm {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.margin-bottom {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.margin-bottom-lg {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.margin-bottom-xl {
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.margin-left-xs {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.margin-left-sm {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.margin-left {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.margin-left-lg {
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
.margin-left-xl {
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
|
||||
.margin-lr-xs {
|
||||
margin-left: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.margin-lr-sm {
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.margin-lr {
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.margin-lr-lg {
|
||||
margin-left: 40rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.margin-lr-xl {
|
||||
margin-left: 50rpx;
|
||||
margin-right: 50rpx;
|
||||
}
|
||||
|
||||
.margin-tb-xs {
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.margin-tb-sm {
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.margin-tb {
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.margin-tb-lg {
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.margin-tb-xl {
|
||||
margin-top: 50rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.padding-0 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.padding-xs {
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.padding-sm {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.padding {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.padding-lg {
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.padding-xl {
|
||||
padding: 50rpx;
|
||||
}
|
||||
|
||||
.padding-top-xs {
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.padding-top-sm {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.padding-top {
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.padding-top-lg {
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
|
||||
.padding-top-xl {
|
||||
padding-top: 50rpx;
|
||||
}
|
||||
|
||||
.padding-right-xs {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.padding-right-sm {
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.padding-right {
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.padding-right-lg {
|
||||
padding-right: 40rpx;
|
||||
}
|
||||
|
||||
.padding-right-xl {
|
||||
padding-right: 50rpx;
|
||||
}
|
||||
|
||||
.padding-bottom-xs {
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.padding-bottom-sm {
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.padding-bottom {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.padding-bottom-lg {
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.padding-bottom-xl {
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.padding-left-xs {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
|
||||
.padding-left-sm {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.padding-left {
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.padding-left-lg {
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
|
||||
.padding-left-xl {
|
||||
padding-left: 50rpx;
|
||||
}
|
||||
|
||||
.padding-lr-xs {
|
||||
padding-left: 10rpx;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.padding-lr-sm {
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.padding-lr {
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.padding-lr-lg {
|
||||
padding-left: 40rpx;
|
||||
padding-right: 40rpx;
|
||||
}
|
||||
|
||||
.padding-lr-xl {
|
||||
padding-left: 50rpx;
|
||||
padding-right: 50rpx;
|
||||
}
|
||||
|
||||
.padding-tb-xs {
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.padding-tb-sm {
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.padding-tb {
|
||||
padding-top: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.padding-tb-lg {
|
||||
padding-top: 40rpx;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.padding-tb-xl {
|
||||
padding-top: 50rpx;
|
||||
padding-bottom: 50rpx;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
export default {
|
||||
"component": true
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
<template>
|
||||
<!--https://developers.weixin.qq.com/community/develop/doc/000c84de0cc590bbe54b97edf5e414?highLine=%25E8%2587%25AA%25E5%25AE%259A%25E4%25B9%2589tabbar-->
|
||||
<!--微信官方 回复 关于 自定义tabbar切换时会闪烁-->
|
||||
|
||||
<view class="tab-bar">
|
||||
<view class="tab-bar-border"></view>
|
||||
<view v-for="(item, index) in list" :key="index" class="tab-bar-item" @tap="switchTab(index, item.pagePath)">
|
||||
<image :src="selected === index ? item.selectedIconPath : item.iconPath"/>
|
||||
<view :style="{ color: selected === index ? selectedColor : color }">{{ item.text }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Taro from '@tarojs/taro'
|
||||
import {computed} from 'vue'
|
||||
import {useCounterStore} from '@/store'
|
||||
|
||||
const store = useCounterStore()
|
||||
const selected = computed(() => store.getSelected)
|
||||
const color = '#000000'
|
||||
const selectedColor = '#DC143C'
|
||||
const list = computed(() => store.getList)
|
||||
|
||||
function switchTab(index, url) {
|
||||
setSelected(index)
|
||||
Taro.switchTab({url})
|
||||
}
|
||||
|
||||
function setSelected(index) {
|
||||
store.setSelected(index) // 使用 Pinia 的 action
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.tab-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 100px;
|
||||
background: white;
|
||||
display: flex;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.tab-bar-border {
|
||||
background-color: rgba(0, 0, 0, 0.33);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
.tab-bar-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tab-bar-item image {
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
.tab-bar-item view {
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
|
@ -1,34 +0,0 @@
|
|||
export const SEX: SelectNode<number>[] = [
|
||||
{
|
||||
value: 0,
|
||||
label: "男",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "女",
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: "隐藏",
|
||||
}
|
||||
];
|
||||
|
||||
export const IDENTITY: SelectNode<string>[] = [
|
||||
{
|
||||
label: "公安",
|
||||
value: "police"
|
||||
},
|
||||
{
|
||||
label: "项目经理",
|
||||
value: "project_manager"
|
||||
},
|
||||
]
|
||||
|
||||
export const getLabelByEnumValue = (enums: SelectNode<any>[], value: any): string => {
|
||||
for (let i = 0; i < enums.length; i++) {
|
||||
if (enums[i].value === value) {
|
||||
return enums[i].label
|
||||
}
|
||||
}
|
||||
return '-'
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-touch-fullscreen" content="yes">
|
||||
<meta name="format-detection" content="telephone=no,address=no">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="white">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
|
||||
<title>collect_information</title>
|
||||
<script><%= htmlWebpackPlugin.options.script %></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +0,0 @@
|
|||
export default definePageConfig({
|
||||
// navigationBarTitleText: '自定义导航栏',
|
||||
navigationStyle: "custom"
|
||||
})
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<template>
|
||||
<view style="height: 42px;background: #3d69dc"></view>
|
||||
<view></view>
|
||||
<view></view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Taro, {useLoad } from "@tarojs/taro";
|
||||
import './employeeInfo.scss'
|
||||
|
||||
|
||||
|
||||
useLoad(() => {
|
||||
// TaroSetNavigationBarTitle()
|
||||
})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.dropdown{
|
||||
background: red;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
|
@ -1,3 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '登录',
|
||||
})
|
|
@ -1,87 +0,0 @@
|
|||
.SignMultiple {
|
||||
height: 100vh;
|
||||
background: #f4f5f7;
|
||||
position: relative;
|
||||
|
||||
.urlIndex {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 440rpx;
|
||||
background: #3a6bbe;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
.urlTitle {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
|
||||
.urlWelcome {
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.urlHibiscus {
|
||||
height: 200rpx;
|
||||
line-height: 58rpx;
|
||||
//font-size: 38rpx;
|
||||
margin: 40rpx 20rpx;
|
||||
border: 2px solid #a1b8e0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.contact {
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
border-radius: 50%;
|
||||
border: solid 1px gray;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type {
|
||||
margin: 0 20rpx 0 20rpx;
|
||||
width: 29%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.HiddenEse {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 0;
|
||||
width: 76rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.SignItem {
|
||||
transform: translateY(15%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 20rpx 48rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.Cancel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
margin: 20rpx 40rpx;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
<template>
|
||||
<view class="SignMultiple">
|
||||
<view class="urlIndex">
|
||||
<view class="urlTitle">
|
||||
<view class="urlWelcome">
|
||||
<view style="font-size: 26px">Welcome</view>
|
||||
<view class="urlHibiscus">
|
||||
<view class="contact">
|
||||
<image
|
||||
src='https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png'
|
||||
mode="scaleToFill"
|
||||
class="image"
|
||||
/>
|
||||
<text>欢迎</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="SignItem">
|
||||
<view class="Cancel">
|
||||
<nut-button block type="success" @click="onLogin">一键授权</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import "./login.scss";
|
||||
import Taro, {useLoad} from "@tarojs/taro";
|
||||
import api from "@/request/index";
|
||||
|
||||
import {useCounterStore} from '@/store'
|
||||
|
||||
const store = useCounterStore()
|
||||
useLoad(() => {});
|
||||
const onLogin = () => {
|
||||
Taro.login({
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
api.post<LoginUserInfo>("/login", {
|
||||
clientType: 'MINI_PROGRAM',
|
||||
loginParams: {
|
||||
code: res.code
|
||||
}
|
||||
}).then(async (resp) => {
|
||||
const {
|
||||
extData: {
|
||||
identity: {value}
|
||||
}
|
||||
} = resp.data
|
||||
if (value === 'police') {
|
||||
store.updateHomePagePath('/pages/policeManager/index/index') // 公安首页
|
||||
} else {
|
||||
store.updateHomePagePath('/pages/projectManager/index/index') // 项目经理首页
|
||||
}
|
||||
// 将更新后的 list 存储到 Pinia 和本地存储
|
||||
await Taro.setStorageSync('list', store.list)
|
||||
await Taro.setStorage({
|
||||
key: "token",
|
||||
data: resp.data,
|
||||
success(res) {
|
||||
Taro.switchTab({
|
||||
// url: '/pages/projectManager/index/index'
|
||||
url: store.list[0].pagePath
|
||||
})
|
||||
},
|
||||
})
|
||||
}).catch((error) => {
|
||||
if (error.code === 402) {
|
||||
Taro.navigateTo({
|
||||
url: "/pages/register/register",
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
|
@ -1,5 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '我的',
|
||||
navigationBarBackgroundColor:'#3d69dc',
|
||||
navigationBarTextStyle:'white'
|
||||
})
|
|
@ -1,84 +0,0 @@
|
|||
.message {
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
height: 205rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-image: url('../../assets/images/banner.jpg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: right;
|
||||
overflow: hidden;
|
||||
padding: 18rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.contact {
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
border-radius: 50%;
|
||||
border: solid 1px gray;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%
|
||||
}
|
||||
}
|
||||
|
||||
.tips-text {
|
||||
display: flex;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
line-height: 50rpx;
|
||||
margin-left: 20rpx;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
}
|
||||
|
||||
.userIndex {
|
||||
.exit {
|
||||
height: 100rpx;
|
||||
line-height: 40px;
|
||||
border-bottom: solid 0.5px #ebebf7;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// margin-bottom: 30rpx;
|
||||
color: #7d7d7d;
|
||||
|
||||
.exitItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.exitItemIndex {
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
border-radius: 50%;
|
||||
// border: solid 1px gray;
|
||||
display: block;
|
||||
line-height: 48rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.iconScope {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
display: inline-block;
|
||||
border: solid 2px #ccc;
|
||||
-webkit-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
border-bottom: white;
|
||||
border-left: white;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<template>
|
||||
<view class="message">
|
||||
我的我的我的我的
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import './mine.scss'
|
||||
import {ref} from "vue";
|
||||
import Taro, {useLoad,useDidShow} from "@tarojs/taro";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '首页',
|
||||
|
||||
})
|
|
@ -1,39 +0,0 @@
|
|||
page {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 702rpx;
|
||||
margin: 10rpx auto;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
height: 500rpx;
|
||||
display: grid;
|
||||
/* 定义两列,每列占据50%的宽度 */
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
/* 定义两行,每行占据1fr(分数单位,表示剩余空间的一部分) */
|
||||
grid-template-rows: repeat(2, 1fr);
|
||||
/* 可选:增加一些间隙 */
|
||||
gap: 10px;
|
||||
|
||||
.grid-item {
|
||||
//width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.grid-item-image {
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.grid-item-text {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="swiper-demo">
|
||||
<nut-swiper ref="swiperRef" pagination-visible pagination-color="#e53e31" :auto-play="3000" :init-page="0">
|
||||
<nut-swiper-item v-for="(item, index) in list" :key="index" style="height: 150px">
|
||||
<img :src="item" alt="" style="height: 100%; width: 100%" draggable="false"/>
|
||||
</nut-swiper-item>
|
||||
</nut-swiper>
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
<nut-grid :column-num="3">
|
||||
<nut-grid-item
|
||||
text="企事业单位"
|
||||
@click="Taro.navigateTo({url: '/subPages/pages/policeManager/index'})">
|
||||
</nut-grid-item>
|
||||
<nut-grid-item
|
||||
text="警保风采"
|
||||
@click="Taro.navigateTo({url: '/pages/index/dataEntry/personnelInformationEntry/personnelInformationEntry'})">
|
||||
</nut-grid-item>
|
||||
<nut-grid-item text=".....">
|
||||
</nut-grid-item>
|
||||
</nut-grid>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import './index.scss'
|
||||
import {ref} from 'vue'
|
||||
import Taro from "@tarojs/taro";
|
||||
|
||||
const list = ref([
|
||||
'https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg',
|
||||
'https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg',
|
||||
'https://storage.360buyimg.com/jdc-article/welcomenutui.jpg',
|
||||
'https://storage.360buyimg.com/jdc-article/fristfabu.jpg'
|
||||
])
|
||||
const swiperRef = ref()
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--<template>-->
|
||||
<!-- <view>-->
|
||||
<!-- <view class="content">-->
|
||||
<!-- <div @tap="routerPush(1)" class="grid-item">-->
|
||||
<!-- <image class="grid-item-image"></image>-->
|
||||
<!-- <view class="grid-item-text">企事业单位</view>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="grid-item">-->
|
||||
<!-- <image class="grid-item-image"></image>-->
|
||||
<!-- <view class="grid-item-text">监督考核</view>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="grid-item">-->
|
||||
<!-- <image class="grid-item-image"></image>-->
|
||||
<!-- <view class="grid-item-text">警保风采</view>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="grid-item">-->
|
||||
<!-- <image class="grid-item-image"></image>-->
|
||||
<!-- <view class="grid-item-text">三色预警</view>-->
|
||||
<!-- </div>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- </view>-->
|
||||
<!--</template>-->
|
||||
<!--<script setup lang="ts">-->
|
||||
<!--import Taro from "@tarojs/taro";-->
|
||||
|
||||
<!--const routerPush = (path) => {-->
|
||||
<!-- switch (path) {-->
|
||||
<!-- case 1:-->
|
||||
<!-- Taro.navigateTo({-->
|
||||
<!-- url: '/subPages/pages/policeManager/index',-->
|
||||
|
||||
<!-- })-->
|
||||
<!-- }-->
|
||||
|
||||
<!--}-->
|
||||
|
||||
<!--import './index.scss'-->
|
||||
<!--</script>-->
|
||||
|
||||
|
||||
<!--<style scoped lang="scss">-->
|
||||
|
||||
<!--</style>-->
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '首页',
|
||||
})
|
|
@ -1,44 +0,0 @@
|
|||
|
||||
.swiperDemoItem{
|
||||
color: #3886d0;
|
||||
display: flex;
|
||||
padding: 20px 0 0 50px;
|
||||
overflow: hidden;
|
||||
height: 70rpx;
|
||||
.swiperDemoIndex{
|
||||
width: 15px;
|
||||
height: 45px;
|
||||
background-image: linear-gradient(to bottom , #5d9cf9, #317ad9);
|
||||
//background: rgb();
|
||||
border-radius: 20px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
.subModule {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin-right: -3px;
|
||||
margin-left: -1px;
|
||||
.subModuleItem {
|
||||
width: 33%;
|
||||
height: 180rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-bottom: 10rpx;
|
||||
border: 1px solid #ccc;
|
||||
border-left: 0;
|
||||
margin-top: -1px;
|
||||
.subModuleIndex {
|
||||
width: 65rpx;
|
||||
height: 65rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="swiperDemo">
|
||||
<nut-swiper ref="swiperRef" pagination-visible pagination-color="#e53e31" :auto-play="3000" :init-page="0">
|
||||
<nut-swiper-item v-for="(item, index) in list" :key="index" style="height: 180px">
|
||||
<image src="@/assets/images/01.png" alt="" style="height: 100%; width: 100%" draggable="false"/>
|
||||
</nut-swiper-item>
|
||||
</nut-swiper>
|
||||
</view>
|
||||
<view class="swiperDemoItem">
|
||||
<view class="swiperDemoIndex"> </view>
|
||||
<view>请选择</view>
|
||||
</view>
|
||||
<!--九宫格-->
|
||||
<view>
|
||||
<view class="subModule" >
|
||||
<view class="subModuleItem" v-for="item in subModuleList" :key="item.id" @click="subNavigation(item.id)">
|
||||
<view class="subModuleIndex">
|
||||
<image :src="item.icon"></image>
|
||||
</view>
|
||||
<view style=" font-size: 12px;color: #414141;margin-top: 9px">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue'
|
||||
import Taro from "@tarojs/taro";
|
||||
import icon from '@/assets/images/project.png'
|
||||
import './index.scss'
|
||||
const list = ref([
|
||||
'https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg',
|
||||
])
|
||||
const swiperRef = ref() //轮播图
|
||||
const subModuleList = ref([
|
||||
{
|
||||
id:0,
|
||||
icon:icon,
|
||||
name:'我的项目'
|
||||
},
|
||||
{
|
||||
id:1,
|
||||
icon:icon,
|
||||
name:'警保风采'
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
icon:icon,
|
||||
name:'待定'
|
||||
}
|
||||
])
|
||||
|
||||
const subNavigation = async (id:number)=>{
|
||||
switch (id) {
|
||||
case 0:
|
||||
await Taro.navigateTo({url: '/subPages/pages/myProject/myProject'})
|
||||
break;
|
||||
case 1:
|
||||
console.log("123132")
|
||||
// Taro.navigateTo({url: '/pages/index/dataEntry/personnelInformationEntry/personnelInformationEntry'})
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '用户注册'
|
||||
})
|
|
@ -1,43 +0,0 @@
|
|||
.register {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.nut-cell-group__wrap {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.registerIndex {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.registerBtn {
|
||||
margin-top: 40rpx;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.buttonChoose {
|
||||
margin: 0;
|
||||
border: none;
|
||||
background: transparent;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
height: 90rpx;
|
||||
width: 90rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.nickNameInput{
|
||||
color: black;
|
||||
}
|
||||
|
||||
.contact {
|
||||
height: 83rpx;
|
||||
width: 83rpx;
|
||||
border-radius: 50%;
|
||||
border: solid 1px gray;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
|
@ -1,217 +0,0 @@
|
|||
<template>
|
||||
<view class="register">
|
||||
<view class="registerIndex">
|
||||
<nut-form :model-value="formData" ref="formRef" :rules="rules">
|
||||
<nut-form-item label="头像:">
|
||||
<button class="buttonChoose" open-type="chooseAvatar" @chooseAvatar="onChooseAvatar">
|
||||
<view class="contact">
|
||||
<image :src="formData.avatar" mode="scaleToFill" class="image"/>
|
||||
</view>
|
||||
</button>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="姓名:" prop="name">
|
||||
<nut-input
|
||||
v-model="formData.name"
|
||||
placeholder="请输入您的昵称"
|
||||
type="text"
|
||||
/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="性别:" prop="sex">
|
||||
<nut-radio-group v-model="formData.sex" direction="horizontal">
|
||||
<nut-radio v-for="item in SEX" :key="item.value" :label="item.value"
|
||||
>{{ item.label }}
|
||||
</nut-radio>
|
||||
</nut-radio-group>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="身份:">
|
||||
<nut-radio-group v-model="formData.identity">
|
||||
<nut-radio
|
||||
v-for="item in IDENTITY"
|
||||
:key="item.value"
|
||||
:label="item.value"
|
||||
>{{ item.label }}
|
||||
</nut-radio>
|
||||
</nut-radio-group>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="手机号:">
|
||||
<nut-input
|
||||
v-model="formData.telephone"
|
||||
placeholder="请输入手机号码"
|
||||
type="text"
|
||||
/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="行政区划:" prop="name">
|
||||
<view @click="visible = true" style="color: #808080">
|
||||
{{ streetCommunitySmallCommunityLabel || "请选择行政区划" }}
|
||||
</view>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="单位:" name="unitId">
|
||||
<view @click="unitsList" style="color: #808080">
|
||||
{{ selectedLabel || '请选择单位'}}
|
||||
</view>
|
||||
</nut-form-item>
|
||||
</nut-form>
|
||||
<nut-cascader
|
||||
v-model:visible="visible"
|
||||
v-model="TreeValue"
|
||||
title="选择地址"
|
||||
:options="TreeData"
|
||||
@change="change"
|
||||
text-key="label"
|
||||
></nut-cascader>
|
||||
<nut-popup v-model:visible="show" position="bottom">
|
||||
<nut-picker
|
||||
:field-names="{
|
||||
text: 'label',
|
||||
children: 'extData'
|
||||
}" v-model="formData.unitId" :columns="columns" title="请选择单位" @confirm="confirm" @cancel="show = false"/>
|
||||
</nut-popup>
|
||||
<view class="registerBtn">
|
||||
<nut-button block type="success" @click="register">注册</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import './register.scss'
|
||||
import {onMounted, ref, watch} from "vue";
|
||||
import {IDENTITY, SEX} from "@/enums";
|
||||
import Taro from "@tarojs/taro";
|
||||
import api from '@/request/index'
|
||||
import type {FormInstance} from "@nutui/nutui-taro";
|
||||
import {FormRules} from "@nutui/nutui-taro/dist/types/__VUE/form/types";
|
||||
|
||||
const formData = ref<RegisterParams>({
|
||||
avatar: "https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png",
|
||||
name: "",
|
||||
sex:0,
|
||||
telephone:'',
|
||||
identity: 'police',
|
||||
unitId:''
|
||||
});
|
||||
const show = ref(false)
|
||||
const visible = ref(false)
|
||||
const TreeValue = ref<Record<string, any>[]>([])
|
||||
const TreeData = ref(['']);
|
||||
const streetCommunitySmallCommunityLabel = ref<string>("");
|
||||
const getAdministrativeDivisionTree = async () => {
|
||||
const resp = await api.get<TreeNode<string>[]>('/common/administrativeDivisionTree')
|
||||
TreeData.value = resp.data as any
|
||||
console.log(resp.data)
|
||||
}
|
||||
const change = (value: string, pathNodes: Record<string, any>[]) => {
|
||||
streetCommunitySmallCommunityLabel.value = pathNodes.map((e) => e.text).join(",");
|
||||
TreeValue.value = value as any
|
||||
}
|
||||
const columns = ref([])
|
||||
const unitsList = async () => {
|
||||
if(streetCommunitySmallCommunityLabel.value !== ''){
|
||||
show.value = true
|
||||
const queryUnitListByIdentityQueryParams = {
|
||||
identity: formData.value.identity,
|
||||
administrativeDivisionCodes: TreeValue.value
|
||||
}
|
||||
const resp = await api.post<TreeNode<string>[]>('/common/queryUnitListByIdentity', queryUnitListByIdentityQueryParams)
|
||||
columns.value = resp.data as any
|
||||
}else{
|
||||
Taro.showToast({
|
||||
title:'请先选择行政区划',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const selectedLabel = ref ('')
|
||||
const confirm = ({selectedOptions, selectedValue}) => {
|
||||
Object.keys(selectedOptions).forEach((e)=>{
|
||||
selectedLabel.value = selectedOptions[e].label
|
||||
formData.value.unitId = selectedOptions[e].value
|
||||
})
|
||||
console.log(formData.value.unitId,selectedLabel.value)
|
||||
show.value = false
|
||||
}
|
||||
|
||||
// 身份
|
||||
watch(()=>formData.value.identity,(value)=>{
|
||||
formData.value.unitId = ''
|
||||
selectedLabel.value = ''
|
||||
})
|
||||
const formRef = ref<FormInstance>()
|
||||
// 注册之前先调用login拿取code 传递给后端
|
||||
// 注册
|
||||
const register = async () => {
|
||||
await Taro.login({
|
||||
success: async function (res) {
|
||||
if (res.code) {
|
||||
const miniProgramUserRegisterParams = {
|
||||
code: res.code,
|
||||
name: formData.value.name,
|
||||
telephone: formData.value.telephone,
|
||||
sex: formData.value.sex,
|
||||
identity: formData.value.identity,
|
||||
unitId:formData.value.unitId
|
||||
}
|
||||
const resp = await api.post<string>('/miniProgramUser/register', miniProgramUserRegisterParams, {loading: true})
|
||||
Taro.showToast({
|
||||
title: "注册成功",
|
||||
icon: 'success',
|
||||
duration: 2000,
|
||||
mask: true,
|
||||
}).then()
|
||||
await Taro.setStorage({
|
||||
key: "token",
|
||||
data: resp.data,
|
||||
success(res) {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
})
|
||||
}else{
|
||||
Taro.showToast({
|
||||
title: res.errMsg,
|
||||
icon: 'error',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
}).then()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const rules: FormRules = {
|
||||
name: [
|
||||
{ required: true, message: "请输入姓名" },
|
||||
{
|
||||
validator: (value) => {
|
||||
return !(value.length < 2 || value.length >= 20);
|
||||
},
|
||||
message: "名字在2~20字符之间",
|
||||
},
|
||||
],
|
||||
sex: [{ required: true, message: "请选择性别" }],
|
||||
telephone: [
|
||||
{ required: true, message: "请输入手机号码" },
|
||||
{
|
||||
regex: /^400(-?)[0-9]{7}$|^1\d{10}$|^0[0-9]{2,3}-[0-9]{7,8}$/,
|
||||
message: "手机格式错误",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// 获取头像
|
||||
const onChooseAvatar = (e) => {
|
||||
const {avatarUrl} = e.detail
|
||||
formData.value.avatar = avatarUrl
|
||||
}
|
||||
// 获取昵称
|
||||
const getNickname = (e) => {
|
||||
formData.value.name = e.detail.value
|
||||
console.log( formData.value.name)
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getAdministrativeDivisionTree()
|
||||
})
|
||||
</script>
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
import Taro from "@tarojs/taro";
|
||||
import {ApiOptions} from "../../types/request";
|
||||
import {type} from "os";
|
||||
|
||||
const requestInterceptor = (chain: Taro.Chain) => {
|
||||
const requestParams = chain.requestParams
|
||||
const token = Taro.getStorageSync('token')
|
||||
if (token) {
|
||||
requestParams.header = {
|
||||
...requestParams.header,
|
||||
token: token.value
|
||||
}
|
||||
}
|
||||
return chain.proceed(requestParams)
|
||||
}
|
||||
|
||||
class CustomRequest {
|
||||
BASE_API: string
|
||||
|
||||
public constructor() {
|
||||
this.BASE_API = process.env.TARO_APP_BASE_API
|
||||
Taro.addInterceptor(requestInterceptor)
|
||||
}
|
||||
|
||||
private request<T>(url: string, method: keyof Taro.request.Method, options: ApiOptions, params?: object,): Promise<JsonResult<T>> {
|
||||
return new Promise<JsonResult<T>>((resolve, reject) => {
|
||||
if (options.loading) {
|
||||
Taro.showLoading({
|
||||
title: '请求中...',
|
||||
}).then()
|
||||
}
|
||||
|
||||
Taro.request<JsonResult<T>, object>({
|
||||
url: this.BASE_API + url,
|
||||
data: params,
|
||||
method,
|
||||
...options,
|
||||
success: (result) => {
|
||||
Taro.hideLoading()
|
||||
const jsonResult = result.data
|
||||
if (jsonResult.code !== 200) {
|
||||
if ([401].includes(jsonResult.code)) {
|
||||
//todo 重新登录 跳转登录页 提示错误
|
||||
}
|
||||
Taro.showToast({
|
||||
title: jsonResult.message,
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
}).then()
|
||||
reject(jsonResult);
|
||||
}
|
||||
resolve(jsonResult);
|
||||
},
|
||||
fail: (res) => {
|
||||
Taro.hideLoading()
|
||||
Taro.showToast({
|
||||
title: res.errMsg,
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
}).then()
|
||||
reject(res.errMsg);
|
||||
console.log(res.errMsg, '000')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
get<T>(url: string, params?: object, options: ApiOptions = {loading: false}): Promise<JsonResult<T>> {
|
||||
return this.request<T>(url, "GET", options, params)
|
||||
}
|
||||
|
||||
post<T>(url: string, params?: object, options: ApiOptions = {loading: false}): Promise<JsonResult<T>> {
|
||||
return this.request<T>(url, "POST", options, params)
|
||||
}
|
||||
|
||||
delete<T>(url: string, params?: object, options: ApiOptions = {loading: false}): Promise<JsonResult<T>> {
|
||||
return this.request(url, "DELETE", options, params)
|
||||
}
|
||||
|
||||
put<T>(url: string, params?: object, options: ApiOptions = {loading: false}): Promise<JsonResult<T>> {
|
||||
return this.request(url, "PUT", options, params)
|
||||
}
|
||||
}
|
||||
|
||||
const api = new CustomRequest();
|
||||
|
||||
export default api
|
|
@ -1,51 +0,0 @@
|
|||
import {defineStore} from 'pinia'
|
||||
import Taro from '@tarojs/taro'
|
||||
|
||||
export const useCounterStore = defineStore('counter', {
|
||||
state: () => {
|
||||
return {
|
||||
userInfo: {},
|
||||
selected: 0,
|
||||
list: Taro.getStorageSync('list') || [
|
||||
{
|
||||
pagePath: '/pages/projectManager/index/index',
|
||||
text: '首页',
|
||||
iconPath: "/assets/mine/punch.png",
|
||||
selectedIconPath: "/assets/mine/punch-active.png"
|
||||
},
|
||||
{
|
||||
pagePath: '/pages/employeeInfo/employeeInfo',
|
||||
text: '员工信息',
|
||||
iconPath: "/assets/mine/punch.png",
|
||||
selectedIconPath: "/assets/mine/punch-active.png"
|
||||
},
|
||||
{
|
||||
pagePath: '/pages/mine/mine',
|
||||
text: '我的',
|
||||
iconPath: "/assets/mine/my.png",
|
||||
selectedIconPath: "/assets/mine/my-active.png"
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setSelected(index: number) {
|
||||
this.selected = index
|
||||
},
|
||||
updateHomePagePath(newPath: string) {
|
||||
this.list[0].pagePath = newPath
|
||||
// 更新 list 后存储到小程序本地存储
|
||||
Taro.setStorageSync('list', this.list)
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
getSelected: (state) => state.selected,
|
||||
getList: (state) => state.list
|
||||
},
|
||||
persist: {
|
||||
// key: 'my-store', // 存储到 localStorage 的 key
|
||||
// storage: localStorage, // 持久化方式为 localStorage
|
||||
// paths: ['list'] // 持久化 list
|
||||
}
|
||||
})
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '项目人员录入',
|
||||
})
|
|
@ -1,8 +0,0 @@
|
|||
.form{
|
||||
.formButton{
|
||||
display: flex;
|
||||
margin-top: auto;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 30px
|
||||
}
|
||||
}
|
|
@ -1,168 +0,0 @@
|
|||
<template>
|
||||
<view class="form">
|
||||
<nut-form ref="formRef" :model-value="formData" :rules="rules">
|
||||
<nut-form-item label="姓名" prop="name">
|
||||
<nut-input v-model="formData.name" placeholder="请输入姓名" type="text"/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="性别" prop="sex">
|
||||
<nut-radio-group v-model="formData.sex" direction="horizontal">
|
||||
<nut-radio v-for="item in SEX" :key="item.value" :label="item.value"
|
||||
>{{ item.label }}
|
||||
</nut-radio>
|
||||
</nut-radio-group>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="身份证" prop="idCard">
|
||||
<nut-input v-model="formData.idCard" placeholder="请填写身份证" type="text" @blur="idCardBlur"/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="出生日期" prop="dateOfBirth">
|
||||
<view @click="showPicker = true">
|
||||
{{
|
||||
dayjs(formData.dateOfBirth).isValid() ? dayjs(formData.dateOfBirth).format('YYYY-MM-DD') : '请选择出生年月'
|
||||
}}
|
||||
</view>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="工作岗位" prop="workPost">
|
||||
<nut-input v-model="formData.workPost" placeholder="请输入工作岗位" type="text"/>
|
||||
</nut-form-item>
|
||||
|
||||
<nut-form-item label="手机号" prop="telephone">
|
||||
<nut-input v-model="formData.telephone" placeholder="请输入手机号" type="text"/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="籍贯" prop="nativePlace">
|
||||
<nut-input v-model="formData.nativePlace" placeholder="请输入籍贯" type="text"/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="地址" prop="homeAddress">
|
||||
<nut-input v-model="formData.homeAddress" placeholder="请输入地址" type="text"/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="保安证号" prop="securityNumber">
|
||||
<nut-input v-model="formData.securityNumber" placeholder="请输入保安证号" type="text"/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="备注" prop="remark">
|
||||
<nut-input v-model="formData.remark" placeholder="请填写备注" type="text"/>
|
||||
</nut-form-item>
|
||||
</nut-form>
|
||||
<view class="formButton">
|
||||
<nut-button style="width: 45%" type="success" size="small" @click="submit">提交</nut-button>
|
||||
<nut-button style="width: 45%" size="small" @click="formRef.value?.reset()">重置表单</nut-button>
|
||||
</view>
|
||||
<nut-popup v-model:visible="showPicker" position="bottom">
|
||||
<nut-date-picker
|
||||
v-model="formData.dateOfBirth"
|
||||
:three-dimensional="false"
|
||||
:min-date="new Date(1900,1,1)"
|
||||
:max-date="new Date(2100,1,1)"
|
||||
@confirm="showPicker = false"
|
||||
@cancel="showPicker = false"
|
||||
></nut-date-picker>
|
||||
</nut-popup>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref} from "vue";
|
||||
import {SEX} from "@/enums";
|
||||
import {FormRules} from "@nutui/nutui-taro/dist/types/__VUE/form/types";
|
||||
import api from "@/request";
|
||||
import './form.scss'
|
||||
import Taro, {useLoad} from "@tarojs/taro";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const showPicker = ref(false)
|
||||
|
||||
const formData = ref<formDate>({} as any)
|
||||
const formRef = ref(null)
|
||||
|
||||
const qrcodeId = ref()
|
||||
|
||||
const rules: FormRules = {
|
||||
name: [
|
||||
{required: true, message: "请输入姓名"},
|
||||
],
|
||||
sex: [{required: true, message: "请选择性别"}],
|
||||
idCard: [
|
||||
{required: true, message: "请输入身份证号"},
|
||||
{
|
||||
regex: /^(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))((0[1-9])|([12][0-9])|(30|31))\d{3}(\d|X)$)/,
|
||||
message: "身份证格式错误",
|
||||
},
|
||||
],
|
||||
telephone:[
|
||||
{required: true, message: "请输入手机号"},
|
||||
]
|
||||
};
|
||||
|
||||
useLoad((options) => {
|
||||
qrcodeId.value = options
|
||||
console.log(JSON.parse(options.item))
|
||||
if(options.id === '2'){
|
||||
formData.value = {
|
||||
serviceProjectId: JSON.parse(options.item).serviceProjectId,
|
||||
securityUnitId:JSON.parse(options.item).securityUnitId,
|
||||
name: '',
|
||||
workPost: '',
|
||||
sex: 0,
|
||||
nativePlace: '',
|
||||
idCard: '',
|
||||
dateOfBirth: null,
|
||||
securityNumber: '',
|
||||
remark: '',
|
||||
homeAddress: '',
|
||||
telephone:''
|
||||
}
|
||||
}else{
|
||||
formData.value = JSON.parse(options.item)
|
||||
}
|
||||
})
|
||||
|
||||
const idCardBlur = (e: any) => {
|
||||
const value = e.detail.value
|
||||
if (!value?.length || value.length < 18) {
|
||||
formData.value.dateOfBirth = null;
|
||||
return
|
||||
}
|
||||
const birthDate = value.substring(6, 14);
|
||||
const year = birthDate.substring(0, 4);
|
||||
const month = birthDate.substring(4, 6);
|
||||
const day = birthDate.substring(6, 8);
|
||||
formData.value.dateOfBirth = new Date(parseInt(year), parseInt(month) - 1, parseInt(day))
|
||||
}
|
||||
|
||||
const url = ref('')
|
||||
const submit = () => {
|
||||
formRef.value?.validate().then(async ({valid}) => {
|
||||
if (valid) {
|
||||
if( qrcodeId.value.id === '1'){
|
||||
url.value = '/projectManageIndex/saveOrUpdateSecurityUser'
|
||||
}else{
|
||||
url.value = '/miniProgramUser/qrCodeFormInputSecurityUser'
|
||||
}
|
||||
console.log(formData.value)
|
||||
const resp = await api.post(`${ url.value}`, formData.value)
|
||||
Taro.showToast({
|
||||
title: resp.message,
|
||||
icon: 'success',
|
||||
duration: 2000,
|
||||
mask: true,
|
||||
}).then()
|
||||
formData.value = {
|
||||
snowFlakeId: undefined,
|
||||
serviceProjectId: formData.value.serviceProjectId,
|
||||
securityUnitId:formData.value.securityUnitId,
|
||||
name: '',
|
||||
workPost: '',
|
||||
telephone: '',
|
||||
sex: 0,
|
||||
nativePlace: '',
|
||||
idCard: '',
|
||||
dateOfBirth: null,
|
||||
securityNumber: '',
|
||||
remark: '',
|
||||
homeAddress: ''
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -1,60 +0,0 @@
|
|||
<template>
|
||||
<view class="myProject">
|
||||
<view v-if="number !== 0">
|
||||
<view class="myProjectItem" v-for="(item,index) in myProjectList" :key="index">
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>{{ item?.name }}</text>
|
||||
<!--<text>进行中</text>-->
|
||||
</view>
|
||||
<view class="myProjectIndex">地址:
|
||||
<text>{{ item?.provinceName }}{{ item.cityName }}{{ item.districtsName }}{{ item.streetName }}</text>
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>联系人:{{ item?.contactPersonInfo.name }}</text>
|
||||
<text>电话:{{ item?.contactPersonInfo.telephone }}</text>
|
||||
</view>
|
||||
<view class="project">
|
||||
<view @click="projectClick(items,item?.name)" v-for="(items,index) in item.serviceProjectList" :key="index">
|
||||
{{ items.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="myProject" >
|
||||
<nut-empty image="empty" description="暂无项目">
|
||||
<div style="margin-top: 10px">
|
||||
</div>
|
||||
</nut-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import api from "@/request/index";
|
||||
import {onMounted, ref} from "vue";
|
||||
import Taro from "@tarojs/taro";
|
||||
import './myproject.scss'
|
||||
|
||||
const myProjectList = ref<MyProjectList[]>()
|
||||
|
||||
const number = ref(0)
|
||||
const getMyServiceProject = async () => {
|
||||
const resp = await api.get<MyProjectList[]>(`/projectManageIndex/getMyServiceProject`)
|
||||
myProjectList.value = resp.data
|
||||
number.value = resp.data.length
|
||||
}
|
||||
|
||||
const projectClick = (items: ServiceProjectList, name: string) => {
|
||||
console.log(items)
|
||||
Taro.navigateTo({
|
||||
url: `/subPages/pages/projectDetails/projectDetails?name=${name}&item=${JSON.stringify(items)}`,
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
await getMyServiceProject()
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--<style scoped lang="scss">-->
|
||||
|
||||
<!--</style>-->
|
|
@ -1,3 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '我的项目',
|
||||
})
|
|
@ -1,31 +0,0 @@
|
|||
.myProject{
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background: #f1f1f1;
|
||||
.myProjectItem{
|
||||
//height: 20%;
|
||||
margin: 20px;
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
padding: 15px;
|
||||
font-size: 28px;
|
||||
line-height: 50px;
|
||||
color: #333333;
|
||||
.myProjectIndex{
|
||||
color: #9b9b9f;
|
||||
}
|
||||
.project{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-flow: wrap;
|
||||
text-align: center;
|
||||
view{
|
||||
width: 45%;
|
||||
height: 100rpx;
|
||||
border: 1px solid #cccccc;
|
||||
line-height: 100rpx;
|
||||
margin: 8px 0 8px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '项目详情',
|
||||
|
||||
})
|
|
@ -1,71 +0,0 @@
|
|||
.projectDetails{
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background: #f1f1f1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.projectDetailsItem{
|
||||
margin: 10px 20px 10px 20px;
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
padding: 15px;
|
||||
font-size: 28px;
|
||||
line-height: 65px;
|
||||
color: #333333;
|
||||
.projectDetailsIndex{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
line-height: 44rpx;
|
||||
margin-bottom: 20px;
|
||||
.content{
|
||||
color: #9b9b9f;
|
||||
}
|
||||
}
|
||||
}
|
||||
.projectDetailsTableDrop{
|
||||
height: 80%;
|
||||
.projectDetailsTable{
|
||||
margin: 20px;
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
padding: 15px;
|
||||
font-size: 28px;
|
||||
line-height: 50px;
|
||||
color: #333333;
|
||||
.projectDetailsTableItem{
|
||||
//display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
font-size: 24px;
|
||||
margin-bottom: 15px;
|
||||
.projectDetailsTableIndex{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
text-align: center;
|
||||
view{
|
||||
width: 70px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.projectDetailsButton{
|
||||
position: fixed;
|
||||
bottom: 19px;
|
||||
display: flex;
|
||||
-webkit-justify-content: space-around;
|
||||
margin-bottom: 10rpx;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.nutPopup{
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,145 +0,0 @@
|
|||
<template>
|
||||
<view class="projectDetails">
|
||||
<view class="projectDetailsItem" style="line-height: 50rpx">
|
||||
<view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text style="font-size: 18px">{{ nameValue ? nameValue : '' }}{{ '-----' + detailsList?.name }}项目</text>
|
||||
<!-- <text>进行中</text>-->
|
||||
</view>
|
||||
<view>
|
||||
<view style="float: left;width: 50%;" class="content">
|
||||
经理名称:{{ detailsList?.projectManagerMiniProgramUserInfo.name }}
|
||||
</view>
|
||||
<view class="content">手机号:{{ detailsList?.projectManagerMiniProgramUserInfo.telephone }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="projectDetailsItem">
|
||||
<view class="projectDetailsIndex">
|
||||
<nut-row>
|
||||
<nut-col :span="24">
|
||||
<view class="content">保安证件号:{{ detailsList?.idNumber }}</view>
|
||||
</nut-col>
|
||||
</nut-row>
|
||||
<nut-row>
|
||||
<nut-col :span="12">
|
||||
<view class="content">工作人员数量:{{ detailsList?.staffTotal }}</view>
|
||||
</nut-col>
|
||||
<nut-col :span="12">
|
||||
<view class="content">保安人员数量:{{ detailsList?.securityUserTotal }}</view>
|
||||
</nut-col>
|
||||
</nut-row>
|
||||
<nut-row>
|
||||
<nut-col :span="12">
|
||||
<view class="content">服务区域面积:{{ detailsList?.serviceArea }}</view>
|
||||
</nut-col>
|
||||
<nut-col :span="12">
|
||||
<view class="content">楼栋数量:{{ detailsList?.buildingTotal }}</view>
|
||||
</nut-col>
|
||||
</nut-row>
|
||||
<nut-row>
|
||||
<nut-col :span="4">
|
||||
<view class="content">户数:{{ detailsList?.houseTotal }}</view>
|
||||
</nut-col>
|
||||
</nut-row>
|
||||
</view>
|
||||
</view>
|
||||
<!--表格-->
|
||||
<view class="projectDetailsTableDrop">
|
||||
<view style="padding: 0 12px">项目人员</view>
|
||||
<scroll-view :scroll-y="true" style="height: 80%;" @scrolltoupper="upper" @scrolltolower="lower"
|
||||
:scroll-into-view="toView" :scroll-top="scrollTop" :refresherEnabled="true"
|
||||
@refresherrefresh="onRefresherRefresh" :refresher-triggered="isRefresher"
|
||||
>
|
||||
<view class="projectDetailsTable" v-for="(item,index) in projectData" :key="index">
|
||||
<view>
|
||||
<view class="projectDetailsTableItem">
|
||||
<view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>姓名:{{ item?.name ? item?.name : '创建者' }}</text>
|
||||
<text>性别:{{ item.sex?.label ? item.sex?.label : ' 隐藏' }}</text>
|
||||
<text>职位:{{ item.workPost ? item.workPost : '创建者' }}</text>
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>保安证件:{{ item.securityNumber ? item.securityNumber : '125241256451' }}</text>
|
||||
<text>出生年月:{{ dayjs(item.dateOfBirth).format('YYYY-MM-DD') }}</text>
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>创建时间:{{ item.createTime }}</text>
|
||||
<text>身份证:{{ item.idCard }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Taro, {useLoad} from "@tarojs/taro";
|
||||
import './index.scss'
|
||||
import {ref} from "vue";
|
||||
import api from "@/request/index";
|
||||
import * as dayjs from 'dayjs'
|
||||
|
||||
const detailsList = ref()
|
||||
const nameValue = ref('')
|
||||
const projectData = ref<Records<string>[]>([])
|
||||
useLoad(async (options: MyProjectList) => {
|
||||
nameValue.value = options.name
|
||||
detailsList.value = await JSON.parse(options.item)
|
||||
await projectDetailsTable()
|
||||
})
|
||||
const projectDetailsTable = async () => {
|
||||
// if (total.value === projectData.value.length) return
|
||||
Taro.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
const queryParams = {
|
||||
params: {
|
||||
serviceProjectId: detailsList.value?.snowFlakeId,
|
||||
},
|
||||
page: {
|
||||
size: 4,
|
||||
current: current.value
|
||||
}
|
||||
}
|
||||
const resp = await api.post<ProjectData>('/miniProgramUser/securityUserPager', queryParams)
|
||||
projectData.value = [...projectData.value, ...resp?.data.records]
|
||||
total.value = resp?.data.total
|
||||
isRefresher.value = false
|
||||
Taro.hideLoading()
|
||||
}
|
||||
const formAdd = () => {
|
||||
Taro.navigateTo({url: `/subPages/pages/form/form?item=${JSON.stringify(detailsList.value)}`})
|
||||
}
|
||||
const total = ref<any>(null)
|
||||
const current = ref(1)
|
||||
const isRefresher = ref(false)
|
||||
const scrollTop = ref(0)
|
||||
const toView = ref('demo2')
|
||||
const upper = (e) => {
|
||||
console.log('到顶了:', e)
|
||||
}
|
||||
// 滚动到底部/右边时触发
|
||||
const lower = (e) => {
|
||||
if (total.value === projectData.value.length) return
|
||||
if (total.value > projectData.value.length) {
|
||||
console.log('触底了:', e)
|
||||
current.value = current.value + 1
|
||||
projectDetailsTable()
|
||||
}
|
||||
}
|
||||
// 自定义下拉刷新被触发
|
||||
const onRefresherRefresh = (e) => {
|
||||
projectData.value = []
|
||||
total.value = null
|
||||
current.value = 1 //重置
|
||||
isRefresher.value = true
|
||||
console.log('自定义下拉刷新被触发:', e)
|
||||
projectDetailsTable()
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '企事业单位',
|
||||
|
||||
})
|
|
@ -1,35 +0,0 @@
|
|||
page {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.myProject {
|
||||
.myProjectItem {
|
||||
margin: 20px;
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
padding: 15px;
|
||||
font-size: 28px;
|
||||
line-height: 50px;
|
||||
color: #333333;
|
||||
|
||||
.myProjectIndex {
|
||||
color: #9b9b9f;
|
||||
}
|
||||
|
||||
.project {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-flow: wrap;
|
||||
text-align: center;
|
||||
|
||||
view {
|
||||
width: 45%;
|
||||
height: 100rpx;
|
||||
border: 1px solid #cccccc;
|
||||
line-height: 100rpx;
|
||||
margin: 8px 0 8px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
<template>
|
||||
<view class="myProject">
|
||||
<view class="myProjectItem" v-for="(item,index) in myProjectList" :key="index">
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>{{ item?.name }}</text>
|
||||
<!--<text>进行中</text>-->
|
||||
</view>
|
||||
<view class="myProjectIndex">地址:
|
||||
<text>{{ item?.provinceName }}{{ item.cityName }}{{ item.districtsName }}{{ item.streetName }}</text>
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>联系人:{{ item?.contactPersonInfo.name }}</text>
|
||||
<text>电话:{{ item?.contactPersonInfo.telephone }}</text>
|
||||
</view>
|
||||
<view class="project">
|
||||
<view @click="projectClick(items,item?.name)" v-for="(items,index) in item.serviceProjectList" :key="index">
|
||||
{{ items.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import api from "@/request/index";
|
||||
import {onMounted, ref} from "vue";
|
||||
import Taro from "@tarojs/taro";
|
||||
import './index.scss'
|
||||
|
||||
const myProjectList = ref<MyProjectList[]>()
|
||||
const getMyServiceProject = async () => {
|
||||
const token = Taro.getStorageSync('token')
|
||||
const resp = await api.get<MyProjectList[]>(`/policeIndex/getUnitServiceProjectList`, {
|
||||
token: token.value
|
||||
})
|
||||
|
||||
myProjectList.value = resp.data
|
||||
console.log(resp.data)
|
||||
}
|
||||
|
||||
const projectClick = (items: ServiceProjectList, name: string) => {
|
||||
console.log(name, JSON.stringify(items))
|
||||
Taro.navigateTo({
|
||||
|
||||
url: `/subPages/pages/policeDetails/index?name=${name}&item=${JSON.stringify(items)}`,
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
await getMyServiceProject()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
export default definePageConfig({
|
||||
navigationBarTitleText: '项目详情',
|
||||
|
||||
})
|
|
@ -1,92 +0,0 @@
|
|||
.projectDetails{
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background: #f1f1f1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.projectDetailsItem{
|
||||
margin: 10px 20px 10px 20px;
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
padding: 15px;
|
||||
font-size: 28px;
|
||||
line-height: 65px;
|
||||
color: #333333;
|
||||
.projectDetailsIndex{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
line-height: 44rpx;
|
||||
margin-bottom: 20px;
|
||||
.content{
|
||||
color: #9b9b9f;
|
||||
}
|
||||
}
|
||||
}
|
||||
.projectDetailsTableDrop{
|
||||
height: 80%;
|
||||
.projectDetailsTable{
|
||||
margin: 20px;
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
padding: 15px;
|
||||
font-size: 28px;
|
||||
line-height: 50px;
|
||||
color: #333333;
|
||||
.projectDetailsTableItem{
|
||||
//display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
font-size: 24px;
|
||||
margin-bottom: 15px;
|
||||
.projectDetailsTableIndex{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
text-align: center;
|
||||
view{
|
||||
width: 70px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.projectDetailsButton{
|
||||
position: fixed;
|
||||
bottom: 19px;
|
||||
display: flex;
|
||||
-webkit-justify-content: space-around;
|
||||
margin-bottom: 10rpx;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.nutPopup{
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.qrcodeVisibleUrl{
|
||||
margin-bottom: 5px;
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.warp{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
.warpItem{
|
||||
width: 90%;
|
||||
height: 50%;
|
||||
text-align: center;
|
||||
.rect{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,279 +0,0 @@
|
|||
<template>
|
||||
<view class="projectDetails">
|
||||
<view class="projectDetailsItem" style="line-height: 50rpx">
|
||||
<view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text style="font-size: 18px">{{ nameValue ? nameValue : '' }}{{
|
||||
'-----' + serviceProjectDetails?.name
|
||||
}}项目
|
||||
</text>
|
||||
<text>进行中</text>
|
||||
</view>
|
||||
<view>
|
||||
<view style="float: left;width: 50%;" class="content">
|
||||
经理名称:{{ serviceProjectDetails?.projectManagerMiniProgramUserInfo.name }}
|
||||
</view>
|
||||
<view class="content">手机号:{{ serviceProjectDetails?.projectManagerMiniProgramUserInfo.telephone }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="projectDetailsItem">
|
||||
<view class="projectDetailsIndex">
|
||||
<nut-row>
|
||||
<nut-col :span="24">
|
||||
<view class="content">保安证件号:{{ serviceProjectDetails?.idNumber }}</view>
|
||||
</nut-col>
|
||||
</nut-row>
|
||||
<nut-row>
|
||||
<nut-col :span="12">
|
||||
<view class="content">工作人员数量:{{ serviceProjectDetails?.staffTotal }}</view>
|
||||
</nut-col>
|
||||
<nut-col :span="12">
|
||||
<view class="content">保安人员数量:{{ serviceProjectDetails?.securityUserTotal }}</view>
|
||||
</nut-col>
|
||||
</nut-row>
|
||||
<nut-row>
|
||||
<nut-col :span="12">
|
||||
<view class="content">服务区域面积:{{ serviceProjectDetails?.serviceArea }}</view>
|
||||
</nut-col>
|
||||
<nut-col :span="12">
|
||||
<view class="content">楼栋数量:{{ serviceProjectDetails?.buildingTotal }}</view>
|
||||
</nut-col>
|
||||
</nut-row>
|
||||
<nut-row>
|
||||
<nut-col :span="4">
|
||||
<view class="content">户数:{{ serviceProjectDetails?.houseTotal }}</view>
|
||||
</nut-col>
|
||||
</nut-row>
|
||||
</view>
|
||||
</view>
|
||||
<!--表格-->
|
||||
<view class="projectDetailsTableDrop">
|
||||
<view style="padding: 0 12px">项目人员({{ total }})</view>
|
||||
<scroll-view :scroll-y="true" style="height: 80%;" @scrolltolower="lower"
|
||||
:scroll-into-view="toView" :scroll-top="scrollTop" :refresherEnabled="true"
|
||||
@refresherrefresh="onRefresherRefresh" :refresher-triggered="isRefresher"
|
||||
>
|
||||
<view class="projectDetailsTable" v-for="(item,index) in projectData" :key="index">
|
||||
<view>
|
||||
<view class="projectDetailsTableItem">
|
||||
<view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>姓名:{{ item?.name ? item?.name : '创建者' }}</text>
|
||||
<text>性别:{{ item.sex?.label ? item.sex?.label : ' 隐藏' }}</text>
|
||||
<text>职位:{{ item.workPost ? item.workPost : '无' }}</text>
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>保安证件:{{ item.securityNumber ? item.securityNumber : '125241256451' }}</text>
|
||||
<text>出生年月:{{ dayjs(item.dateOfBirth).format('YYYY-MM-DD') }}</text>
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>创建时间:{{ item.createTime }}</text>
|
||||
<text>身份证:{{ item.idCard }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="projectDetailsTableIndex">
|
||||
<view style="color: #3a6bbe" @click="detail(item)">详情</view>
|
||||
<view style="color: #ffa60d" @click="projectEdit(item)">编辑</view>
|
||||
<view style="color: red" @click="deleteUssrID(item.snowFlakeId)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="projectDetailsButton">
|
||||
<nut-button style="width: 45%" type="info" @click="formAdd">项目人员录入</nut-button>
|
||||
<nut-button style="width: 45%" type="info" @click="generateMiniProgramQRCode">二维码录入</nut-button>
|
||||
</view>
|
||||
<view>
|
||||
<nut-dialog
|
||||
content="是否确认删除该用户?"
|
||||
:onOk="dialogOk"
|
||||
v-model:visible="confirmVisible"
|
||||
/>
|
||||
</view>
|
||||
<view>
|
||||
<nut-dialog no-cancel-btn content="详情" v-model:visible="detailVisible">
|
||||
<slot>
|
||||
<view style="margin-bottom: 5px">
|
||||
<view>籍贯:{{ content.nativePlace }}</view>
|
||||
<view>公司:{{ content.securityUnitName }}</view>
|
||||
<view>家庭地址:{{ content.homeAddress }}</view>
|
||||
<view>备注:{{ content.remark }}</view>
|
||||
</view>
|
||||
</slot>
|
||||
</nut-dialog>
|
||||
</view>
|
||||
<!-- 二维码-->
|
||||
<view>
|
||||
<nut-dialog no-cancel-btn content="二维码" v-model:visible="qrcodeVisible">
|
||||
<slot>
|
||||
<view class="qrcodeVisibleUrl" @click="showImage">
|
||||
<image style="width: 100%" show-menu-by-longpress='1' :lazy-load="true" :src="qrCodeImage" mode="aspectFit" />
|
||||
</view>
|
||||
</slot>
|
||||
</nut-dialog>
|
||||
</view>
|
||||
<nut-overlay v-model:visible="showOverlay">
|
||||
<view class="warp">
|
||||
<view class="warpItem">
|
||||
<movable-area :scale-area="true">
|
||||
<movable-view direction="all" style="width: 348px; height: 300px;" :scale="true" :scale-min="1" :scale-max="4" :scale-value="1" :x="2" :y="10">
|
||||
<image class="rect" show-menu-by-longpress='1' :src="qrCodeImage" mode="widthFix" />
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
</view>
|
||||
</view>
|
||||
</nut-overlay>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Taro, {useDidShow, useLoad} from "@tarojs/taro";
|
||||
import './projectDetails.scss'
|
||||
import {ref} from "vue";
|
||||
import api from "@/request/index";
|
||||
import * as dayjs from 'dayjs'
|
||||
|
||||
const serviceProjectDetails = ref()
|
||||
const nameValue = ref('')
|
||||
const projectData = ref<Records[]>([])
|
||||
const content = ref<Records>({} as any)
|
||||
// 控制模态框的显示状态
|
||||
const confirmVisible = ref(false);
|
||||
const detailVisible = ref(false)
|
||||
const qrcodeVisible = ref(false)
|
||||
const showOverlay = ref(false)
|
||||
|
||||
useLoad(async (options: MyProjectList) => {
|
||||
nameValue.value = options.name
|
||||
serviceProjectDetails.value = await JSON.parse(options.item)
|
||||
})
|
||||
useDidShow(async () => {
|
||||
initServiceProjectSecurityUserList()
|
||||
})
|
||||
const projectDetailsTable = async () => {
|
||||
await Taro.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
const queryParams = {
|
||||
params: {
|
||||
serviceProjectId: serviceProjectDetails.value?.snowFlakeId,
|
||||
},
|
||||
page: {
|
||||
size: 4,
|
||||
current: current.value
|
||||
}
|
||||
}
|
||||
const resp = await api.post<ProjectData>('/miniProgramUser/securityUserPager', queryParams)
|
||||
projectData.value = [...projectData.value, ...resp?.data.records]
|
||||
total.value = resp?.data.total
|
||||
isRefresher.value = false
|
||||
Taro.hideLoading()
|
||||
}
|
||||
const formAdd = () => {
|
||||
const params = {
|
||||
serviceProjectId: serviceProjectDetails.value.snowFlakeId,
|
||||
securityUnitId:serviceProjectDetails.value.securityUnitId,
|
||||
snowFlakeId: undefined,
|
||||
name: '',
|
||||
workPost: '',
|
||||
sex: 0,
|
||||
nativePlace: '',
|
||||
idCard: '',
|
||||
dateOfBirth: null,
|
||||
securityNumber: '',
|
||||
remark: '',
|
||||
homeAddress: '',
|
||||
telephone:''
|
||||
}
|
||||
Taro.navigateTo({url: `/subPages/pages/form/form?item=${JSON.stringify(params)}&&id=${1}`})
|
||||
}
|
||||
const total = ref<any>(null)
|
||||
const current = ref(1)
|
||||
const isRefresher = ref(false)
|
||||
const scrollTop = ref(0)
|
||||
const toView = ref('demo2')
|
||||
// 滚动到底部/右边时触发
|
||||
const lower = (e) => {
|
||||
if (total.value === projectData.value.length) return
|
||||
if (total.value > projectData.value.length) {
|
||||
current.value = current.value + 1
|
||||
projectDetailsTable()
|
||||
}
|
||||
}
|
||||
const initServiceProjectSecurityUserList = () => {
|
||||
projectData.value = []
|
||||
total.value = null
|
||||
current.value = 1 //重置
|
||||
isRefresher.value = true
|
||||
projectDetailsTable()
|
||||
|
||||
}
|
||||
// 自定义下拉刷新被触发
|
||||
const onRefresherRefresh = (e) => {
|
||||
initServiceProjectSecurityUserList()
|
||||
}
|
||||
|
||||
const securityUserId = ref<string>('')
|
||||
|
||||
// 删除
|
||||
const deleteUssrID = (snowFlakeId: string) => {
|
||||
confirmVisible.value = true
|
||||
securityUserId.value = snowFlakeId
|
||||
}
|
||||
// 二次删除
|
||||
const dialogOk = async () => {
|
||||
await api.delete(`/projectManageIndex/deleteSecurityUserByServiceProjectId`, {securityUserId: securityUserId.value}, {
|
||||
header: {
|
||||
"content-type": 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
initServiceProjectSecurityUserList()
|
||||
}
|
||||
// 详情
|
||||
const detail = (item) => {
|
||||
detailVisible.value = true
|
||||
content.value = item
|
||||
}
|
||||
const projectEdit = (item) => {
|
||||
const params = {...item, sex: item.sex.value}
|
||||
Taro.navigateTo({url: `/subPages/pages/form/form?item=${JSON.stringify(params)}`})
|
||||
}
|
||||
|
||||
const qrCodeImage = ref('')
|
||||
const generateMiniProgramQRCode = ()=>{
|
||||
const params = {
|
||||
securityUnitId:serviceProjectDetails.value.securityUnitId,
|
||||
serviceProjectId:serviceProjectDetails.value.snowFlakeId
|
||||
}
|
||||
const value = JSON.stringify(params)
|
||||
const paramsData = {
|
||||
path:`/subPages/pages/form/form?item=${value}&id=${2}`,
|
||||
width:200,
|
||||
}
|
||||
qrcodeVisible.value = true
|
||||
Taro.request({
|
||||
url: 'http://172.10.10.93:8765/projectManageIndex/shareForm_QR_Code',
|
||||
method:'GET',
|
||||
data:paramsData,
|
||||
responseType: 'arraybuffer',
|
||||
success(res) {
|
||||
const base64 = Taro.arrayBufferToBase64(res.data);
|
||||
qrCodeImage.value = 'data:image/jpeg;base64,' + base64
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const showImage = ()=>{
|
||||
showOverlay.value = true
|
||||
qrcodeVisible.value = false
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
|
||||
</style>
|
|
@ -1,67 +0,0 @@
|
|||
import Taro from "@tarojs/taro";
|
||||
|
||||
|
||||
/**
|
||||
* 授权综合逻辑
|
||||
* @param {*} scope 权限代表
|
||||
* @param {*} successCallback 成功回调
|
||||
* @param {*} failCallback 失败回调
|
||||
*/
|
||||
export function pullAuth(scope, successCallback, failCallback) {
|
||||
const map = new Map([
|
||||
['scope.userInfo', '用户信息'],
|
||||
['scope.userLocation', '地理位置'],
|
||||
['scope.userLocationBackground', '后台定位'],
|
||||
['scope.address', '通信地址'],
|
||||
['scope.record', '录音功能'],
|
||||
['scope.writePhotosAlbum', '保存到相册'],
|
||||
['scope.camera', '摄像头'],
|
||||
['scope.invoice', '获取发票'],
|
||||
['scope.invoiceTitle', '发票抬头'],
|
||||
['scope.werun', '微信运动步数'],
|
||||
])
|
||||
Taro.getSetting({
|
||||
success(res) {
|
||||
if (!res.authSetting[scope]) {
|
||||
Taro.authorize({
|
||||
scope,
|
||||
success(){ // 允许授权
|
||||
successCallback()
|
||||
},
|
||||
fail(){ // 拒绝授权
|
||||
if (map.has(scope)) {
|
||||
let word = map.get(scope)
|
||||
Taro.showModal({
|
||||
content:`检测到您没打开${word}权限,是否去设置打开?`,
|
||||
confirmText: "确认",
|
||||
cancelText:'取消',
|
||||
success: (res) => {
|
||||
if(res.confirm){
|
||||
Taro.openSetting({
|
||||
success: (res) => {
|
||||
successCallback()
|
||||
},
|
||||
fail: () => {
|
||||
failCallback()
|
||||
},
|
||||
})
|
||||
}else{
|
||||
failCallback()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: '无此授权功能'
|
||||
})
|
||||
failCallback()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
successCallback()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2017",
|
||||
"module": "commonjs",
|
||||
"removeComments": false,
|
||||
"preserveConstEnums": true,
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"noImplicitAny": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"outDir": "lib",
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"strictNullChecks": false,
|
||||
"sourceMap": true,
|
||||
"rootDir": ".",
|
||||
"jsx": "preserve",
|
||||
"allowJs": true,
|
||||
"resolveJsonModule": true,
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./src",
|
||||
"./types",
|
||||
"./config"
|
||||
],
|
||||
"compileOnSave": false
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
/// <reference types="@tarojs/taro" />
|
||||
|
||||
declare module '*.png';
|
||||
declare module '*.gif';
|
||||
declare module '*.jpg';
|
||||
declare module '*.jpeg';
|
||||
declare module '*.svg';
|
||||
declare module '*.css';
|
||||
declare module '*.less';
|
||||
declare module '*.scss';
|
||||
declare module '*.sass';
|
||||
declare module '*.styl';
|
||||
|
||||
declare namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
/** NODE 内置环境变量, 会影响到最终构建生成产物 */
|
||||
NODE_ENV: 'development' | 'production',
|
||||
/** 当前构建的平台 */
|
||||
TARO_ENV: 'weapp' | 'swan' | 'alipay' | 'h5' | 'rn' | 'tt' | 'quickapp' | 'qq' | 'jd'
|
||||
/**
|
||||
* 当前构建的小程序 appid
|
||||
* @description 若不同环境有不同的小程序,可通过在 env 文件中配置环境变量`TARO_APP_ID`来方便快速切换 appid, 而不必手动去修改 dist/project.config.json 文件
|
||||
* @see https://taro-docs.jd.com/docs/next/env-mode-config#特殊环境变量-taro_app_id
|
||||
*/
|
||||
TARO_APP_ID: string,
|
||||
TARO_APP_BASE_API: string
|
||||
}
|
||||
}
|
||||
|
||||
declare module '@tarojs/components' {
|
||||
export * from '@tarojs/components/types/index.vue3'
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择
|
||||
*/
|
||||
interface SelectNode<T> {
|
||||
value: T,
|
||||
label: string,
|
||||
options?: SelectNode<T>[]
|
||||
orderIndex?: number,
|
||||
disabled?: boolean,
|
||||
extData?: Record<string, any>
|
||||
}
|
||||
|
||||
interface JsonResult<T> {
|
||||
code: number;
|
||||
data?: T;
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 树
|
||||
*/
|
||||
interface TreeNode<T> {
|
||||
value: T,
|
||||
parentValue: T,
|
||||
label: string,
|
||||
orderIndex?: number,
|
||||
extData?: Record<string, any>,
|
||||
children?: TreeNode<T>[]
|
||||
}
|
||||
|
||||
|
||||
interface TokenInfo<T = Record<string, any>> {
|
||||
name: string;
|
||||
value: string;
|
||||
extData?: T
|
||||
}
|
||||
|
||||
/**
|
||||
* 基本枚举类型
|
||||
*/
|
||||
interface BaseEnum<T, E = Record<string, any>> {
|
||||
value: T;
|
||||
label: string;
|
||||
extData: E;
|
||||
}
|
||||
|
||||
|
||||
interface IconFontProps {
|
||||
fontClass?: string,
|
||||
size?: number,
|
||||
type?: 'class' | 'svg'
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
interface formDate {
|
||||
snowFlakeId?: string;
|
||||
securityUnitId:string;
|
||||
serviceProjectId: string;
|
||||
name?: string;
|
||||
workPost?: string;
|
||||
telephone?: string;
|
||||
sex: number;
|
||||
nativePlace?: string;
|
||||
idCard: string;
|
||||
dateOfBirth?: Date;
|
||||
securityNumber?: string;
|
||||
remark?: string;
|
||||
homeAddress?: string
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
interface PersonnelInformation {
|
||||
name: string,
|
||||
sex: number,
|
||||
dataOfBirth: Date | string,
|
||||
idCard: string,
|
||||
phone: string,
|
||||
householdRegistrationAddress: string,
|
||||
streetCommunitySmallCommunityIds: string[],
|
||||
buildingFloorHouseIds: string[]
|
||||
}
|
||||
|
||||
interface EnterUserInfoSaveOrUpdateParams {
|
||||
snowFlakeId?: string,
|
||||
|
||||
streetId?: string,
|
||||
communityId?: string,
|
||||
smallCommunityId?: string,
|
||||
buildingId?: string,
|
||||
floorId?: string,
|
||||
houseId?: string,
|
||||
|
||||
name: string,
|
||||
sex: number,
|
||||
dateOfBirth?: Date | string
|
||||
idCard: string
|
||||
phone: string
|
||||
householdRegistrationAddress?: string
|
||||
|
||||
optFlag: null | 0 | 1
|
||||
}
|
||||
|
||||
interface SystemExitsPopulationInformationVo {
|
||||
snowFlakeId: string,
|
||||
name: string,
|
||||
sex: number,
|
||||
residentialDivisionDetail: string,
|
||||
createTime: string,
|
||||
createUserName: string
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
interface LoginUserInfo {
|
||||
clientType?: string;
|
||||
avatar?: string;
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
interface MyProjectList {
|
||||
item?:any,
|
||||
address?: string;
|
||||
city?: string;
|
||||
cityName?: string;
|
||||
contactPersonInfo:ContactPersonInfo;
|
||||
districts?: string;
|
||||
districtsName?: string;
|
||||
name: string;
|
||||
province?: string;
|
||||
provinceName: string;
|
||||
remark?: string;
|
||||
serviceProjectList: ServiceProjectList[];
|
||||
snowFlakeId?: string;
|
||||
securityUnitId:string;
|
||||
street?: string;
|
||||
streetName?:string;
|
||||
}
|
||||
|
||||
interface ContactPersonInfo{
|
||||
name:string;
|
||||
telephone:string
|
||||
}
|
||||
|
||||
interface ServiceProjectList {
|
||||
buildingTotal?: number;
|
||||
houseTotal?: number;
|
||||
idNumber?: string;
|
||||
isRecruitSecurity?: null;
|
||||
name?: string;
|
||||
remark?: string;
|
||||
securityUserTotal?: number;
|
||||
serviceArea?: number;
|
||||
snowFlakeId?: string;
|
||||
staffTotal?: number;
|
||||
type?:string;
|
||||
projectManagerMiniProgramUserInfo?:ProgramUserInfo
|
||||
}
|
||||
interface ProgramUserInfo{
|
||||
idCard: null
|
||||
name: string
|
||||
telephone: string
|
||||
}
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
interface Records{
|
||||
createTime?: string;
|
||||
dateOfBirth?: string;
|
||||
homeAddress?: string;
|
||||
idCard?: string;
|
||||
name?: string;
|
||||
nativePlace?: string;
|
||||
remark?: string;
|
||||
securityNumber?: string;
|
||||
securityUnitId?: string;
|
||||
securityUnitName?: string;
|
||||
serviceProjectId?: string;
|
||||
snowFlakeId:string;
|
||||
workPost?:string;
|
||||
sex?:Sex
|
||||
}
|
||||
interface ProjectData<T> {
|
||||
current?:string;
|
||||
pages?:string;
|
||||
records?: Records[];
|
||||
size?: string;
|
||||
total?: string;
|
||||
data: Records[];
|
||||
}
|
||||
|
||||
interface Sex {
|
||||
value:number,
|
||||
label:string
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
interface RegisterParams {
|
||||
avatar: string;
|
||||
name: string;
|
||||
sex:number,
|
||||
telephone:string,
|
||||
identity: string;
|
||||
unitId: any
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
import Taro from "@tarojs/taro";
|
||||
|
||||
export interface ApiOptions
|
||||
extends Omit<
|
||||
Taro.request.Option,
|
||||
"url" | "method" | "data" | "success" | "fail"
|
||||
> {
|
||||
loading?: boolean;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
export {}
|
||||
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents extends JSX.IntrinsicElements {
|
||||
/** Note: Vue 在 runtime 中将 JSX.IntrinsicElements 通过 index signature 重复声明标签
|
||||
* 这会导致插件无法正常跳转类型,可以手动覆盖声明标签活得更好的体验,参考如下:
|
||||
* 'scroll-view': JSX.IntrinsicElements['scroll-view']
|
||||
*/
|
||||
}
|
||||
}
|