From 8e0a3a5b157f4b7cdfd01bfba1e083c001f7461b Mon Sep 17 00:00:00 2001 From: zsvg <8680782@qq.com> Date: Sat, 4 Jun 2022 05:12:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BE=85=E5=8A=A9=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=EF=BC=9A=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=EF=BC=8C?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E7=AD=96=E7=95=A5=EF=BC=8C=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E9=80=89=E6=8B=A9=EF=BC=8CExcel=E5=AF=BC=E5=85=A5=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +- .env.development | 3 +- .env.production | 2 +- package-lock.json | 11 + package.json | 3 +- public/ass/amap.css | 432 ++++++++++++++++++++++++++++ public/ass/amap.html | 199 +++++++++++++ src/comps/ass/amap.vue | 58 ++++ src/comps/gen/GenUpload.vue | 82 ++++++ src/comps/page/edit.ts | 46 +++ src/pages/ass/addr/main/edit.vue | 209 ++++++++++++++ src/pages/ass/addr/main/index.vue | 124 ++++++++ src/pages/ass/dict/data/edit.vue | 77 +++++ src/pages/ass/dict/data/index.vue | 91 ++++++ src/pages/ass/dict/main/edit.vue | 74 +++++ src/pages/ass/dict/main/index.vue | 97 +++++++ src/pages/ass/num/main/edit.vue | 92 ++++++ src/pages/ass/num/main/index.vue | 83 ++++++ src/pages/sa/agent/main/edit.vue | 53 +++- src/pages/sa/agent/main/index.vue | 37 ++- src/pages/sys/job/log/view.vue | 2 +- src/pages/sys/portal/menu/index.vue | 2 +- src/router/route.ts | 78 +++++ src/theme/vboot.scss | 11 + src/utils/request.ts | 17 +- 25 files changed, 1866 insertions(+), 21 deletions(-) create mode 100644 public/ass/amap.css create mode 100644 public/ass/amap.html create mode 100644 src/comps/ass/amap.vue create mode 100644 src/comps/gen/GenUpload.vue create mode 100644 src/pages/ass/addr/main/edit.vue create mode 100644 src/pages/ass/addr/main/index.vue create mode 100644 src/pages/ass/dict/data/edit.vue create mode 100644 src/pages/ass/dict/data/index.vue create mode 100644 src/pages/ass/dict/main/edit.vue create mode 100644 src/pages/ass/dict/main/index.vue create mode 100644 src/pages/ass/num/main/edit.vue create mode 100644 src/pages/ass/num/main/index.vue diff --git a/.env b/.env index d02cfd7..e76b93d 100644 --- a/.env +++ b/.env @@ -5,5 +5,5 @@ VITE_PORT = 8888 VITE_OPEN = false # public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可 -VITE_PUBLIC_PATH = /vue/ -#VITE_PUBLIC_PATH = '' +#VITE_PUBLIC_PATH = /vue/ +VITE_PUBLIC_PATH = '' diff --git a/.env.development b/.env.development index c5b91eb..4cd2bd1 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,6 @@ ENV = 'development' # 本地环境接口地址 -VITE_API_URL = 'http://localhost:5000/' +#VITE_API_URL = 'http://localhost:5000/' #VITE_API_URL = 'http://localhost:8088/' -#VITE_API_URL = 'http://222.92.228.219:5301/' VITE_UI_URL = 'http://localhost:8888/' diff --git a/.env.production b/.env.production index b27e46d..35e3b19 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,6 @@ ENV = 'production' # 线上环境接口地址 #VITE_API_URL = 'https://lyt-top.gitee.io/vue-next-admin-preview/' -#VITE_API_URL = 'http://222.92.228.219:5301/' + VITE_API_URL = 'http://localhost:5000/' diff --git a/package-lock.json b/package-lock.json index cf09eda..e62a560 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "echarts-gl": "^2.0.9", "echarts-wordcloud": "^2.0.0", "element-plus": "2.2.0", + "file-saver": "2.0.5", "js-cookie": "^3.0.1", "jsplumb": "^2.15.6", "mitt": "^3.0.0", @@ -3371,6 +3372,11 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-saver": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz", + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -7903,6 +7909,11 @@ "flat-cache": "^3.0.4" } }, + "file-saver": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz", + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", diff --git a/package.json b/package.json index 082c482..829ca48 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ "codemirror": "^5.59.2", "bpmn-js": "^8.1.0", "bpmn-js-properties-panel": "^0.39.0", - "vform3-builds": "^3.0.8" + "vform3-builds": "^3.0.8", + "file-saver": "2.0.5" }, "devDependencies": { "@types/node": "^17.0.35", diff --git a/public/ass/amap.css b/public/ass/amap.css new file mode 100644 index 0000000..68e2b75 --- /dev/null +++ b/public/ass/amap.css @@ -0,0 +1,432 @@ +html { + font-size: 12px; +} +.amap-copyright{ + box-sizing: content-box +} +* { + box-sizing: border-box +} +.input-textarea{ + color:grey; + height:8em; + overflow:auto; + border-radius:0.4rem; + border:1px solid #ced4da; + margin-bottom:1rem; +} +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + line-height: 1.5; + font-weight: 300; + color: #111213; +} + +hr { + margin: 0.5rem 0; + box-sizing: content-box; + height: 0; + overflow: visible; + border: 0; + border-top: 1px solid rgba(0, 0, 0, .1) +} + +p { + margin-top: 0; + margin-bottom: 0; +} + +label { + display: inline-block; + margin-bottom: 0.4rem; +} + +label, .btn { + margin-left: 0; + font-size: 1rem; +} + +button, input, select { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; + overflow: visible; + text-transform: none +} + +[type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner, button::-moz-focus-inner { + padding: 0; + border-style: none; +} + +input[type=checkbox], input[type=radio] { + box-sizing: border-box; + padding: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 0; + margin: 0 0.5rem 0 0; +} + +h4 { + font-family: inherit; + line-height: 1.8; + font-weight: 300; + color: inherit; + font-size: 1.1rem; + margin-top: 0; + margin-bottom: .5rem +} + +.btn { + display: inline-block; + font-weight: 400; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + border: 1px solid transparent; + transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out; + background-color: transparent; + background-image: none; + color: #25A5F7; + border-color: #25A5F7; + padding: .25rem .5rem; + line-height: 1.5; + border-radius: 1rem; + -webkit-appearance: button; + cursor:pointer; +} + +.btn:hover { + color: #fff; + background-color: #25A5F7; + border-color: #25A5F7 +} + +.btn:hover { + text-decoration: none +} + +.input-item { + position: relative; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: center; + align-items: center; + width: 100%; + height: 3rem; +} + +.input-item:last-child { + margin-bottom: 0; +} + +.input-item>select, .input-item>input[type=text], .input-item>input[type=date] { + position: relative; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + width: 1%; + margin-bottom: 0; +} + +.input-item>select:not(:last-child), .input-item>input[type=text]:not(:last-child), .input-item>input[type=date]:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0 +} + +.input-item>select:not(:first-child), .input-item>input[type=text]:not(:first-child), .input-item>input[type=date]:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0 +} + +.input-item-prepend { + margin-right: -1px; +} + +.input-item-text, input[type=text],input[type=date], select { + height: calc(2.2rem + 2px); +} + +.input-item-text { + width: 6rem; + text-align: justify; + padding: 0.4rem 0.7rem; + display: inline-block; + text-justify: distribute-all-lines; + /*ie6-8*/ + text-align-last: justify; + /* ie9*/ + -moz-text-align-last: justify; + /*ff*/ + -webkit-text-align-last: justify; + /*chrome 20+*/ + -ms-flex-align: center; + align-items: center; + margin-bottom: 0; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #495057; + text-align: center; + white-space: nowrap; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: .25rem; + border-bottom-right-radius: 0; + border-top-right-radius: 0; +} + +.input-item-text input[type=checkbox], .input-item-text input[type=radio] { + margin-top: 0 +} + +.input-card { + display: flex; + flex-direction: column; + min-width: 0; + word-wrap: break-word; + background-color: #fff; + background-clip: border-box; + border-radius: .25rem; + width: 28rem; + border-width: 0; + border-radius: 0.4rem; + box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5); + position: fixed; + top: 1rem; + right: 1rem; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + padding: 0.75rem 1.25rem; +} + +.input-text { + line-height: 2rem; + margin-right: 2rem; +} + +.info hr { + margin-right: 0; + margin-left: 0; + border-top-color: grey; +} + +.info { + padding: .75rem 1.25rem; + margin-bottom: 1rem; + border-radius: .25rem; + position: fixed; + top: 1rem; + background-color: white; + width: auto; + min-width: 22rem; + border-width: 0; + left: 1rem; + box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5); +} + +.code { + left: 1.5rem; + right: 1.5rem; + top: 1.5rem; + bottom: 1.5rem; + overflow: auto; + margin-bottom: 0rem; +} + +.code .btn { + top: 1rem; + position: absolute; + right: 1rem; +} + +.code .result { + border: 1px solid rgba(0, 0, 0, 0.1); + border-radius: 0.5rem; + padding: 1rem; + bottom: 1rem; + position: absolute; + top: 5.5rem; + right: 1rem; + left: 1rem; + overflow: auto; +} + +.code .status { + color: #80adff; + display: inline-block; + font-size: 14px; +} + +.code h4 { + display: inline-block; + max-width: 20rem; + margin-right: 1rem; + margin-bottom: 1rem; +} + +select, input[type=text], input[type=date] { + display: inline-block; + width: 100%; + padding: .375rem 1.75rem .375rem .75rem; + line-height: 1.5; + color: #495057; + vertical-align: middle; + background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center; + background-size: 8px 10px; + border: 1px solid #ced4da; + border-radius: .25rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none +} + +input[type=text],input[type=date] { + background: #fff; + padding: .375rem .75rem; +} + +select:focus, input[type=text]:focus, input[type=date]:focus { + border-color: #80bdff; + outline: 0; + box-shadow: 0 0 0 .1rem rgba(128, 189, 255, .1) +} + +.btn:focus { + outline: 0; + box-shadow: none; +} + +select:focus::-ms-value, input[type=text]:focus::-ms-value,input[type=date]:focus::-ms-value { + color: #495057; + background-color: #fff +} + + +/* native toastr */ +.native-toast { + position: fixed; + background-color: rgba(50, 50, 50, .8); + border-radius: 33px; + color: white; + left: 50%; + text-align: center; + padding: 6px 12px; + opacity: 0; + z-index: 99999; + transition: transform .25s, opacity .25s, top .25s; + box-sizing: border-box; +} + +.native-toast-bottom { + bottom: 50px; + -ms-transform: translateX(-50%) translateY(50px); + transform: translateX(-50%) translateY(50px) +} + +.native-toast-bottom.native-toast-shown { + opacity: 1; + -ms-transform: translateX(-50%) translateY(0); + transform: translateX(-50%) translateY(0); +} + +.native-toast-bottom.native-toast-edge { + bottom: 0; +} + +.native-toast-top { + top: 50px; + -ms-transform: translateX(-50%) translateY(-50px); + transform: translateX(-50%) translateY(-50px) +} + +.native-toast-top.native-toast-shown { + opacity: 1; + -ms-transform: translateX(-50%) translateY(0); + transform: translateX(-50%) translateY(0); +} + +.native-toast-top.native-toast-edge { + top: 0; +} + +.native-toast-center { + top: 0; + -ms-transform: translateX(-50%) translateY(-50px); + transform: translateX(-50%) translateY(-50px) +} + +.native-toast-center.native-toast-shown { + opacity: 1; + top: 50%; + -ms-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%); +} + +.native-toast-edge { + border-radius: 0; + width: 100%; + text-align: left; +} + +@media screen and (min-width: 40rem) { + .native-toast:not(.native-toast-edge) { + max-width: 18rem; + } +} + +/* + max-width does not seem to work in small screen? +*/ + +/*@media screen and (max-width: 768px) { + .native-toast:not(.native-toast-edge) { + max-width: 400px; + } +} + +@media screen and (max-width: 468px) { + .native-toast:not(.native-toast-edge) { + max-width: 300px; + } +}*/ + +/* types */ + +.native-toast-error { + background-color: #d92727; + color: white; +} + +.native-toast-success { + background-color: #62a465; + color: white; +} + +.native-toast-warning { + background-color: #fdaf17; + color: white; +} + +.native-toast-info { + background-color: #5060ba; + color: white; +} + +[class^="native-toast-icon-"] { + vertical-align: middle; + margin-right: 8px +} + +[class^="native-toast-icon-"] svg { + width: 16px; + height: 16px; +} \ No newline at end of file diff --git a/public/ass/amap.html b/public/ass/amap.html new file mode 100644 index 0000000..0067e87 --- /dev/null +++ b/public/ass/amap.html @@ -0,0 +1,199 @@ + + + + + + + 地址选择 + + + + +
+
+
+
+ 请输入关键字 +
+ +
+
+
+ +
+
经纬度
+ +
+
+
所在地区
+ +
+
+
详细地址
+ +
+ + + + + +
+ + +
+
+ + + + + diff --git a/src/comps/ass/amap.vue b/src/comps/ass/amap.vue new file mode 100644 index 0000000..298360f --- /dev/null +++ b/src/comps/ass/amap.vue @@ -0,0 +1,58 @@ + + + + diff --git a/src/comps/gen/GenUpload.vue b/src/comps/gen/GenUpload.vue new file mode 100644 index 0000000..3dc47b3 --- /dev/null +++ b/src/comps/gen/GenUpload.vue @@ -0,0 +1,82 @@ + + + + diff --git a/src/comps/page/edit.ts b/src/comps/page/edit.ts index c75911e..4fd8b88 100644 --- a/src/comps/page/edit.ts +++ b/src/comps/page/edit.ts @@ -187,5 +187,51 @@ const checkSubmit = async (formRef: any) => { return canSubmit; } +interface ImodalSave { + state: any; + formRef:any; + iouField?: string; +} + +export const modalSave = async (data:ImodalSave) => { + const loading = ElLoading.service({ + lock: true, + fullscreen: true, + text:'', + background: 'rgba(0, 0, 0, 0.1)', + }); + let isSuccess=true; + const canSubmit = await checkSubmit(data.formRef); + if (!canSubmit) { + loading.close(); + return false; + } + + if(!data.iouField){ + data.iouField = "id"; + } + if (!data.state.form[data.iouField]) { + await request({ + url: data.state.url, + method: 'post', + data: data.state.form, + }).catch(() => { + isSuccess=false; + }); + } else { + await request({ + url: data.state.url, + method: 'put', + data: data.state.form, + }).catch(() => { + isSuccess=false; + }); + } + loading.close(); + if(isSuccess){ + data.state.show = false; + } +}; + diff --git a/src/pages/ass/addr/main/edit.vue b/src/pages/ass/addr/main/edit.vue new file mode 100644 index 0000000..1314497 --- /dev/null +++ b/src/pages/ass/addr/main/edit.vue @@ -0,0 +1,209 @@ + + + + + diff --git a/src/pages/ass/addr/main/index.vue b/src/pages/ass/addr/main/index.vue new file mode 100644 index 0000000..7f7f659 --- /dev/null +++ b/src/pages/ass/addr/main/index.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/pages/ass/dict/data/edit.vue b/src/pages/ass/dict/data/edit.vue new file mode 100644 index 0000000..e17ac43 --- /dev/null +++ b/src/pages/ass/dict/data/edit.vue @@ -0,0 +1,77 @@ + + + + diff --git a/src/pages/ass/dict/data/index.vue b/src/pages/ass/dict/data/index.vue new file mode 100644 index 0000000..2501a9c --- /dev/null +++ b/src/pages/ass/dict/data/index.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/src/pages/ass/dict/main/edit.vue b/src/pages/ass/dict/main/edit.vue new file mode 100644 index 0000000..c935461 --- /dev/null +++ b/src/pages/ass/dict/main/edit.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/pages/ass/dict/main/index.vue b/src/pages/ass/dict/main/index.vue new file mode 100644 index 0000000..2545fe0 --- /dev/null +++ b/src/pages/ass/dict/main/index.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/pages/ass/num/main/edit.vue b/src/pages/ass/num/main/edit.vue new file mode 100644 index 0000000..d361dd7 --- /dev/null +++ b/src/pages/ass/num/main/edit.vue @@ -0,0 +1,92 @@ + + + + diff --git a/src/pages/ass/num/main/index.vue b/src/pages/ass/num/main/index.vue new file mode 100644 index 0000000..4734151 --- /dev/null +++ b/src/pages/ass/num/main/index.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/src/pages/sa/agent/main/edit.vue b/src/pages/sa/agent/main/edit.vue index 651d5e0..1e7e6fc 100644 --- a/src/pages/sa/agent/main/edit.vue +++ b/src/pages/sa/agent/main/edit.vue @@ -16,27 +16,36 @@ - +
+ + +
+ {{form.senum}} + 提交后自动生成 +
+
+
- +
- +
- - + + +
@@ -107,6 +116,7 @@ +