a99d479f by 李婷婷

下载文案

1 parent fbc9968c
...@@ -202,7 +202,7 @@ service.interceptors.response.use( ...@@ -202,7 +202,7 @@ service.interceptors.response.use(
202 // 通用下载方法 202 // 通用下载方法
203 export function download(url, params, filename, config) { 203 export function download(url, params, filename, config) {
204 downloadLoadingInstance = ElLoading.service({ 204 downloadLoadingInstance = ElLoading.service({
205 text: '正在下载数据,请稍候', 205 text:language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
206 background: 'rgba(0, 0, 0, 0.7)' 206 background: 'rgba(0, 0, 0, 0.7)'
207 }) 207 })
208 return service 208 return service
......
...@@ -26,6 +26,8 @@ import { ...@@ -26,6 +26,8 @@ import {
26 } from '@/api/download.js' 26 } from '@/api/download.js'
27 import url from '@/assets/images/download.png' 27 import url from '@/assets/images/download.png'
28 import { ElLoading } from 'element-plus' 28 import { ElLoading } from 'element-plus'
29 import {useStorage} from "@vueuse/core/index";
30 const language= useStorage('language',0)
29 const { proxy } = getCurrentInstance() 31 const { proxy } = getCurrentInstance()
30 const route = useRoute() 32 const route = useRoute()
31 const timer = ref(null) 33 const timer = ref(null)
...@@ -36,13 +38,13 @@ onMounted(() => { ...@@ -36,13 +38,13 @@ onMounted(() => {
36 if (route.query.type == 'batchMember') { 38 if (route.query.type == 'batchMember') {
37 clearInterval(timer.value) 39 clearInterval(timer.value)
38 downloadLoadingInstance.value = ElLoading.service({ 40 downloadLoadingInstance.value = ElLoading.service({
39 text: '正在下载数据,请稍候', 41 text: language == 1?'Data is being downloaded. Please wait a moment.': language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
40 background: 'rgba(0, 0, 0, 0.7)' 42 background: 'rgba(0, 0, 0, 0.7)'
41 }) 43 })
42 return downloadPersonCert(route.query.arr).then((res) => { 44 return downloadPersonCert(route.query.arr).then((res) => {
43 if (res.code == 200) { 45 if (res.code == 200) {
44 downloadLoadingInstance.value = ElLoading.service({ 46 downloadLoadingInstance.value = ElLoading.service({
45 text: '正在下载数据,请稍候', 47 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
46 background: 'rgba(0, 0, 0, 0.7)' 48 background: 'rgba(0, 0, 0, 0.7)'
47 }) 49 })
48 circulation(res.data) 50 circulation(res.data)
...@@ -54,13 +56,13 @@ onMounted(() => { ...@@ -54,13 +56,13 @@ onMounted(() => {
54 if (route.query.type == 'batchMemberFeeBill') { 56 if (route.query.type == 'batchMemberFeeBill') {
55 clearInterval(timer.value) 57 clearInterval(timer.value)
56 downloadLoadingInstance.value = ElLoading.service({ 58 downloadLoadingInstance.value = ElLoading.service({
57 text: '正在下载数据,请稍候', 59 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
58 background: 'rgba(0, 0, 0, 0.7)' 60 background: 'rgba(0, 0, 0, 0.7)'
59 }) 61 })
60 return downJiaoFei(route.query.arr).then((res) => { 62 return downJiaoFei(route.query.arr).then((res) => {
61 if (res.code == 200) { 63 if (res.code == 200) {
62 downloadLoadingInstance.value = ElLoading.service({ 64 downloadLoadingInstance.value = ElLoading.service({
63 text: '正在下载数据,请稍候', 65 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
64 background: 'rgba(0, 0, 0, 0.7)' 66 background: 'rgba(0, 0, 0, 0.7)'
65 }) 67 })
66 circulation(res.data) 68 circulation(res.data)
...@@ -72,13 +74,13 @@ onMounted(() => { ...@@ -72,13 +74,13 @@ onMounted(() => {
72 if (route.query.type == 'batchGroupMemberFeeBill') { 74 if (route.query.type == 'batchGroupMemberFeeBill') {
73 clearInterval(timer.value) 75 clearInterval(timer.value)
74 downloadLoadingInstance.value = ElLoading.service({ 76 downloadLoadingInstance.value = ElLoading.service({
75 text: '正在下载数据,请稍候', 77 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
76 background: 'rgba(0, 0, 0, 0.7)' 78 background: 'rgba(0, 0, 0, 0.7)'
77 }) 79 })
78 return downJiaoFeiGroup(route.query.arr).then((res) => { 80 return downJiaoFeiGroup(route.query.arr).then((res) => {
79 if (res.code == 200) { 81 if (res.code == 200) {
80 downloadLoadingInstance.value = ElLoading.service({ 82 downloadLoadingInstance.value = ElLoading.service({
81 text: '正在下载数据,请稍候', 83 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
82 background: 'rgba(0, 0, 0, 0.7)' 84 background: 'rgba(0, 0, 0, 0.7)'
83 }) 85 })
84 circulation(res.data) 86 circulation(res.data)
...@@ -90,13 +92,13 @@ onMounted(() => { ...@@ -90,13 +92,13 @@ onMounted(() => {
90 if (route.query.type == 'examCert') { 92 if (route.query.type == 'examCert') {
91 clearInterval(timer.value) 93 clearInterval(timer.value)
92 downloadLoadingInstance.value = ElLoading.service({ 94 downloadLoadingInstance.value = ElLoading.service({
93 text: '正在下载数据,请稍候', 95 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
94 background: 'rgba(0, 0, 0, 0.7)' 96 background: 'rgba(0, 0, 0, 0.7)'
95 }) 97 })
96 return downExamCerts(route.query.arr).then((res) => { 98 return downExamCerts(route.query.arr).then((res) => {
97 if (res.code == 200) { 99 if (res.code == 200) {
98 downloadLoadingInstance.value = ElLoading.service({ 100 downloadLoadingInstance.value = ElLoading.service({
99 text: '正在下载数据,请稍候', 101 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
100 background: 'rgba(0, 0, 0, 0.7)' 102 background: 'rgba(0, 0, 0, 0.7)'
101 }) 103 })
102 circulation(res.data) 104 circulation(res.data)
...@@ -106,13 +108,13 @@ onMounted(() => { ...@@ -106,13 +108,13 @@ onMounted(() => {
106 if (route.query.type == 'examCertByExamIds') { 108 if (route.query.type == 'examCertByExamIds') {
107 clearInterval(timer.value) 109 clearInterval(timer.value)
108 downloadLoadingInstance.value = ElLoading.service({ 110 downloadLoadingInstance.value = ElLoading.service({
109 text: '正在下载数据,请稍候', 111 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
110 background: 'rgba(0, 0, 0, 0.7)' 112 background: 'rgba(0, 0, 0, 0.7)'
111 }) 113 })
112 return downExamCertsByExamId(route.query.arr).then((res) => { 114 return downExamCertsByExamId(route.query.arr).then((res) => {
113 if (res.code == 200) { 115 if (res.code == 200) {
114 downloadLoadingInstance.value = ElLoading.service({ 116 downloadLoadingInstance.value = ElLoading.service({
115 text: '正在下载数据,请稍候', 117 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
116 background: 'rgba(0, 0, 0, 0.7)' 118 background: 'rgba(0, 0, 0, 0.7)'
117 }) 119 })
118 circulation(res.data) 120 circulation(res.data)
...@@ -122,13 +124,13 @@ onMounted(() => { ...@@ -122,13 +124,13 @@ onMounted(() => {
122 if (route.query.type == 'examCertByStudentIds') { 124 if (route.query.type == 'examCertByStudentIds') {
123 clearInterval(timer.value) 125 clearInterval(timer.value)
124 downloadLoadingInstance.value = ElLoading.service({ 126 downloadLoadingInstance.value = ElLoading.service({
125 text: '正在下载数据,请稍候', 127 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
126 background: 'rgba(0, 0, 0, 0.7)' 128 background: 'rgba(0, 0, 0, 0.7)'
127 }) 129 })
128 return downExamCertsByStudentId(route.query.arr, route.query.examIds).then((res) => { 130 return downExamCertsByStudentId(route.query.arr, route.query.examIds).then((res) => {
129 if (res.code == 200 && res.data) { 131 if (res.code == 200 && res.data) {
130 downloadLoadingInstance.value = ElLoading.service({ 132 downloadLoadingInstance.value = ElLoading.service({
131 text: '正在下载数据,请稍候', 133 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
132 background: 'rgba(0, 0, 0, 0.7)' 134 background: 'rgba(0, 0, 0, 0.7)'
133 }) 135 })
134 circulation(res.data) 136 circulation(res.data)
...@@ -140,13 +142,13 @@ onMounted(() => { ...@@ -140,13 +142,13 @@ onMounted(() => {
140 if (route.query.type == 'batchGroupMember') { 142 if (route.query.type == 'batchGroupMember') {
141 clearInterval(timer.value) 143 clearInterval(timer.value)
142 downloadLoadingInstance.value = ElLoading.service({ 144 downloadLoadingInstance.value = ElLoading.service({
143 text: '正在下载数据,请稍候', 145 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
144 background: 'rgba(0, 0, 0, 0.7)' 146 background: 'rgba(0, 0, 0, 0.7)'
145 }) 147 })
146 return downloadPersonCertGroup(route.query.arr).then((res) => { 148 return downloadPersonCertGroup(route.query.arr).then((res) => {
147 if (res.code == 200) { 149 if (res.code == 200) {
148 downloadLoadingInstance.value = ElLoading.service({ 150 downloadLoadingInstance.value = ElLoading.service({
149 text: '正在下载数据,请稍候', 151 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
150 background: 'rgba(0, 0, 0, 0.7)' 152 background: 'rgba(0, 0, 0, 0.7)'
151 }) 153 })
152 circulation(res.data) 154 circulation(res.data)
...@@ -158,13 +160,13 @@ onMounted(() => { ...@@ -158,13 +160,13 @@ onMounted(() => {
158 if (route.query.type == 'examPayment') { 160 if (route.query.type == 'examPayment') {
159 clearInterval(timer.value) 161 clearInterval(timer.value)
160 downloadLoadingInstance.value = ElLoading.service({ 162 downloadLoadingInstance.value = ElLoading.service({
161 text: '正在下载数据,请稍候', 163 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
162 background: 'rgba(0, 0, 0, 0.7)' 164 background: 'rgba(0, 0, 0, 0.7)'
163 }) 165 })
164 return downExamPayment(route.query.arr).then((res) => { 166 return downExamPayment(route.query.arr).then((res) => {
165 if (res.code == 200 && res.data) { 167 if (res.code == 200 && res.data) {
166 downloadLoadingInstance.value = ElLoading.service({ 168 downloadLoadingInstance.value = ElLoading.service({
167 text: '正在下载数据,请稍候', 169 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
168 background: 'rgba(0, 0, 0, 0.7)' 170 background: 'rgba(0, 0, 0, 0.7)'
169 }) 171 })
170 circulation(res.data) 172 circulation(res.data)
...@@ -178,7 +180,7 @@ onMounted(() => { ...@@ -178,7 +180,7 @@ onMounted(() => {
178 function circulation(id) { 180 function circulation(id) {
179 timer.value = setInterval(async() => { 181 timer.value = setInterval(async() => {
180 downloadLoadingInstance.value = ElLoading.service({ 182 downloadLoadingInstance.value = ElLoading.service({
181 text: '正在下载数据,请稍候', 183 text: language == 1?'Data is being downloaded. Please wait a moment.': '正在下载数据,请稍候',
182 background: 'rgba(0, 0, 0, 0.7)' 184 background: 'rgba(0, 0, 0, 0.7)'
183 }) 185 })
184 const res = await queryProcess(id) 186 const res = await queryProcess(id)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!