From b1030cfa642aeaa41ef7fb4983dd46e4b3c66730 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Thu, 16 Apr 2026 17:34:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.test | 1 + package.json | 134 ++++++++-------- src/api/teamaster_cert.ts | 26 +++ src/config/index.ts | 2 +- src/views/broker/edit.vue | 22 ++- src/views/broker/index.vue | 5 + src/views/order_teamaster/edit.vue | 26 ++- src/views/tea_store/teamaster_leaf/edit.vue | 2 +- src/views/tea_store/teamaster_leaf/index.vue | 2 +- src/views/teamaster_real/edit.vue | 29 +++- src/views/teamaster_user/edit.vue | 37 +++-- src/views/teamaster_user/index.vue | 84 +++++++--- .../teamaster_user/teamaster_cert/edit.vue | 127 +++++++++++++++ .../teamaster_user/teamaster_cert/index.vue | 148 ++++++++++++++++++ vite.config.ts | 138 ++++++++-------- 15 files changed, 588 insertions(+), 195 deletions(-) create mode 100644 .env.test create mode 100644 src/api/teamaster_cert.ts create mode 100644 src/views/teamaster_user/teamaster_cert/edit.vue create mode 100644 src/views/teamaster_user/teamaster_cert/index.vue diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..6e79810 --- /dev/null +++ b/.env.test @@ -0,0 +1 @@ +VITE_APP_BASE_URL=https://test1.stnav.com \ No newline at end of file diff --git a/package.json b/package.json index e1020ad..ccee94c 100644 --- a/package.json +++ b/package.json @@ -1,67 +1,69 @@ { - "name": "vue-project", - "version": "0.0.0", - "license": "MIT", - "scripts": { - "dev": "vite", - "preview": "vite preview --port 4173", - "build": "vite build && node scripts/release.mjs", - "type-check": "vue-tsc --noEmit", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" - }, - "dependencies": { - "@element-plus/icons-vue": "^2.3.1", - "@highlightjs/vue-plugin": "^2.1.0", - "@vue/shared": "^3.5.13", - "@vueuse/core": "^12.7.0", - "@wangeditor/editor": "^5.1.23", - "@wangeditor/editor-for-vue": "^5.1.12", - "axios": "^1.7.9", - "css-color-function": "^1.3.3", - "echarts": "^5.6.0", - "element-china-area-data": "^6.1.0", - "element-plus": "^2.9.4", - "highlight.js": "^11.11.1", - "lodash": "^4.17.21", - "lodash-es": "^4.17.21", - "nprogress": "^0.2.0", - "pinia": "^2.3.1", - "vue": "^3.5.13", - "vue-clipboard3": "^2.0.0", - "vue-echarts": "^6.7.3", - "vue-router": "^4.5.0", - "vuedraggable": "^4.1.0" - }, - "devDependencies": { - "@rushstack/eslint-patch": "^1.10.5", - "@types/lodash-es": "^4.17.12", - "@types/node": "^22.13.4", - "@types/nprogress": "^0.2.3", - "@vitejs/plugin-legacy": "^6.0.1", - "@vitejs/plugin-vue": "^5.2.1", - "@vitejs/plugin-vue-jsx": "^4.1.1", - "@vue/eslint-config-prettier": "^10.2.0", - "@vue/eslint-config-typescript": "^14.4.0", - "@vue/tsconfig": "^0.7.0", - "autoprefixer": "^10.4.20", - "consola": "^3.4.0", - "eslint": "^9.10.0", - "eslint-plugin-simple-import-sort": "^12.1.1", - "eslint-plugin-vue": "^9.32.0", - "execa": "^9.5.2", - "fs-extra": "^11.3.0", - "postcss": "^8.5.3", - "prettier": "^3.5.1", - "sass": "1.79.6", - "tailwindcss": "^3.4.17", - "terser": "^5.39.0", - "typescript": "^5.7.3", - "unplugin-auto-import": "^19.1.0", - "unplugin-vue-components": "^28.4.0", - "vite": "^6.1.1", - "vite-plugin-style-import": "^2.0.0", - "vite-plugin-svg-icons": "^2.0.1", - "vite-plugin-vue-setup-extend": "^0.4.0", - "vue-tsc": "^2.2.2" - } -} + "name": "vue-project", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "dev": "vite", + "preview": "vite preview --port 4173", + "build": "vite build && node scripts/release.mjs", + "build:test": "vite build --mode test && node scripts/release.mjs", + "build:pro": "vite build --mode production && node scripts/release.mjs", + "type-check": "vue-tsc --noEmit", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" + }, + "dependencies": { + "@element-plus/icons-vue": "^2.3.1", + "@highlightjs/vue-plugin": "^2.1.0", + "@vue/shared": "^3.5.13", + "@vueuse/core": "^12.7.0", + "@wangeditor/editor": "^5.1.23", + "@wangeditor/editor-for-vue": "^5.1.12", + "axios": "^1.7.9", + "css-color-function": "^1.3.3", + "echarts": "^5.6.0", + "element-china-area-data": "^6.1.0", + "element-plus": "^2.9.4", + "highlight.js": "^11.11.1", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "nprogress": "^0.2.0", + "pinia": "^2.3.1", + "vue": "^3.5.13", + "vue-clipboard3": "^2.0.0", + "vue-echarts": "^6.7.3", + "vue-router": "^4.5.0", + "vuedraggable": "^4.1.0" + }, + "devDependencies": { + "@rushstack/eslint-patch": "^1.10.5", + "@types/lodash-es": "^4.17.12", + "@types/node": "^22.13.4", + "@types/nprogress": "^0.2.3", + "@vitejs/plugin-legacy": "^6.0.1", + "@vitejs/plugin-vue": "^5.2.1", + "@vitejs/plugin-vue-jsx": "^4.1.1", + "@vue/eslint-config-prettier": "^10.2.0", + "@vue/eslint-config-typescript": "^14.4.0", + "@vue/tsconfig": "^0.7.0", + "autoprefixer": "^10.4.20", + "consola": "^3.4.0", + "eslint": "^9.10.0", + "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-vue": "^9.32.0", + "execa": "^9.5.2", + "fs-extra": "^11.3.0", + "postcss": "^8.5.3", + "prettier": "^3.5.1", + "sass": "1.79.6", + "tailwindcss": "^3.4.17", + "terser": "^5.39.0", + "typescript": "^5.7.3", + "unplugin-auto-import": "^19.1.0", + "unplugin-vue-components": "^28.4.0", + "vite": "^6.1.1", + "vite-plugin-style-import": "^2.0.0", + "vite-plugin-svg-icons": "^2.0.1", + "vite-plugin-vue-setup-extend": "^0.4.0", + "vue-tsc": "^2.2.2" + } +} \ No newline at end of file diff --git a/src/api/teamaster_cert.ts b/src/api/teamaster_cert.ts new file mode 100644 index 0000000..09db646 --- /dev/null +++ b/src/api/teamaster_cert.ts @@ -0,0 +1,26 @@ +import request from '@/utils/request' + +// 茶艺师认证表列表 +export function apiTeamasterCertLists(params: any) { + return request.get({ url: '/teamaster_cert/lists', params }) +} + +// 添加茶艺师认证表 +export function apiTeamasterCertAdd(params: any) { + return request.post({ url: '/teamaster_cert/add', params }) +} + +// 编辑茶艺师认证表 +export function apiTeamasterCertEdit(params: any) { + return request.post({ url: '/teamaster_cert/edit', params }) +} + +// 删除茶艺师认证表 +export function apiTeamasterCertDelete(params: any) { + return request.post({ url: '/teamaster_cert/delete', params }) +} + +// 茶艺师认证表详情 +export function apiTeamasterCertDetail(params: any) { + return request.get({ url: '/teamaster_cert/detail', params }) +} \ No newline at end of file diff --git a/src/config/index.ts b/src/config/index.ts index d5c707a..9072009 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -5,7 +5,7 @@ const config = { // 开发环境使用相对路径(通过代理),生产环境使用完整URL baseUrl: import.meta.env.DEV ? '/' - : `${import.meta.env.VITE_APP_BASE_URL || 'https://test1.stnav.com'}/`, //请求接口域名 + : `${import.meta.env.VITE_APP_BASE_URL}/`, //请求接口域名 urlPrefix: 'partenapi', //请求默认前缀 timeout: 10 * 1000 //请求超时时长 } diff --git a/src/views/broker/edit.vue b/src/views/broker/edit.vue index 632c52c..d23191f 100644 --- a/src/views/broker/edit.vue +++ b/src/views/broker/edit.vue @@ -13,11 +13,15 @@ - + + + + @@ -72,6 +76,7 @@ const formData = reactive({ avatar: '', account: '', company_name: '', + company_abv: '', company_url: '', company_sh: '', company_address: '', @@ -82,7 +87,7 @@ const formData = reactive({ // 表单验证 -const formRules = reactive({ +const formRules = computed(() => ({ name: [{ required: true, message: '请输入名称', @@ -103,6 +108,11 @@ const formRules = reactive({ message: '请输入公司名称', trigger: ['blur'] }], + company_abv: [{ + required: true, + message: '请输入公司简称', + trigger: ['blur'] + }], company_url: [{ required: true, message: '请选择营业执照', @@ -119,11 +129,11 @@ const formRules = reactive({ trigger: ['blur'] }], password: [{ - required: true, + required: mode.value === 'add', message: '请输入密码', trigger: ['blur'] }] -}) +})) // 获取详情 @@ -141,6 +151,7 @@ const getDetail = async (row: Record) => { id: row.id }) setFormData(data) + formData.password = '' } @@ -148,6 +159,9 @@ const getDetail = async (row: Record) => { const handleSubmit = async () => { await formRef.value?.validate() const data = { ...formData, } + if (mode.value === 'edit' && !data.password) { + delete data.password + } data.city_id = userStore.userInfo.city_id mode.value == 'edit' diff --git a/src/views/broker/index.vue b/src/views/broker/index.vue index f4e2c8a..6903a76 100644 --- a/src/views/broker/index.vue +++ b/src/views/broker/index.vue @@ -32,6 +32,11 @@ + + + diff --git a/src/views/teamaster_real/edit.vue b/src/views/teamaster_real/edit.vue index 0ed65bd..bbc02d7 100644 --- a/src/views/teamaster_real/edit.vue +++ b/src/views/teamaster_real/edit.vue @@ -37,7 +37,7 @@
{{ item.label_name - }} + }}
@@ -57,12 +57,24 @@ fit="cover" />
未上传
- - + + +
未上传
+
+ + +
未上传
+
+ + +
未上传
@@ -121,10 +133,13 @@ const formData = reactive({ avatar: '', health_certificate: '', information: [], + image: [], license_img: '', hobby_introduce: '', status: '', - label_id: '' + label_id: '', + front_card: '', + back_card: '', }) diff --git a/src/views/teamaster_user/edit.vue b/src/views/teamaster_user/edit.vue index 569782d..6318af9 100644 --- a/src/views/teamaster_user/edit.vue +++ b/src/views/teamaster_user/edit.vue @@ -7,24 +7,28 @@
- + - - - + + + + + + - + @@ -52,7 +56,7 @@ - + @@ -94,14 +98,17 @@ - + - +