From ce80500f4642fa9e09a1d7133046856bba3ca804 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 1 Nov 2023 22:47:58 +0800 Subject: [PATCH] up --- package.json | 2 +- src/components/XyDialog/index.vue | 26 +- src/utils/request.js | 10 +- src/views/task/list/components/addPatrol.vue | 67 +- src/views/task/list/components/addUnit.vue | 628 +++--- .../task/list/components/showPatrol copy.vue | 1169 +++++++++++ src/views/task/list/components/showPatrol.vue | 1832 ++++++++++------- src/views/task/list/patrol.vue | 59 +- src/views/task/list/unit.vue | 17 +- vue.config.js | 2 +- 10 files changed, 2640 insertions(+), 1172 deletions(-) create mode 100644 src/views/task/list/components/showPatrol copy.vue diff --git a/package.json b/package.json index 269d60a..a3f763d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "avue-plugin-map": "^1.0.1", "axios": "^0.26.1", "core-js": "3.6.5", - "element-ui": "2.13.2", + "element-ui": "^2.15.14", "js-cookie": "2.2.0", "less": "^3.13.1", "moment": "^2.29.2", diff --git a/src/components/XyDialog/index.vue b/src/components/XyDialog/index.vue index 13544f0..74c8da5 100644 --- a/src/components/XyDialog/index.vue +++ b/src/components/XyDialog/index.vue @@ -8,7 +8,7 @@ export default { }, width:{ type:Number, - default:70 + default:65 }, // isFullScreen:{ // type:Boolean, @@ -137,13 +137,14 @@ export default { if(type === "form"){ let formItems = [] Object.keys(form).map((key)=>{ - formItems.push( - - {eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)} - - ) + formItems.push( + + {eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)} + + ) + }) return ( .xy-table-item-label{ - width: 140px; + // width: 140px; + /* width: 160px; */ + min-width: 120px; + padding-right: 0!important; } .xy-table-item-price{ position: relative; @@ -285,9 +289,9 @@ font-size: 15px; .xy-table-item{ display: flex; align-items: center; - + font-size:16px; padding-right: 80px; - margin-bottom:20px; + margin-bottom:10px; &-label{ padding: 0 20px; diff --git a/src/utils/request.js b/src/utils/request.js index ab2f96d..975e453 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -10,9 +10,15 @@ import { } from '@/utils/auth' let loading; -// create an axios instance +// create an axios instance +let baseUrl = '' +if(window.location.origin.indexOf('localhost')>-1){ + baseUrl = process.env.VUE_APP_BASE_API +}else{ + baseUrl = window.location.origin + '/' +} const service = axios.create({ - baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url + baseURL: baseUrl, // url = base url + request url // withCredentials: true, // send cookies when cross-domain requests timeout: 500000 // request timeout }) diff --git a/src/views/task/list/components/addPatrol.vue b/src/views/task/list/components/addPatrol.vue index c0d22d3..dc7cde9 100644 --- a/src/views/task/list/components/addPatrol.vue +++ b/src/views/task/list/components/addPatrol.vue @@ -18,11 +18,11 @@ - + @@ -147,9 +147,9 @@ date: '', site_id: '', ask_id: '', - file_ids: [], ask_introduce: '', - tips: '', + tips: '', + file_ids: [], }, rules: { @@ -159,7 +159,7 @@ }], date: [{ required: true, - message: '请选择上报日期' + message: '请选择巡查日期' }], site_id: [{ required: true, @@ -221,9 +221,9 @@ date: res?.date, site_id: res?.site_id, ask_id: res?.ask_id, - file_ids: res?.file_ids, ask_introduce: res?.ask_introduce, - tips: res?.tips, + tips: res?.tips, + file_ids: res?.file_ids, } for (var f of res.files) { @@ -297,10 +297,9 @@ + diff --git a/src/views/task/list/components/showPatrol.vue b/src/views/task/list/components/showPatrol.vue index 52ec56b..5fad5bd 100644 --- a/src/views/task/list/components/showPatrol.vue +++ b/src/views/task/list/components/showPatrol.vue @@ -1,443 +1,538 @@