bcc4f6f3 by zhangmeng

看板

1 parent 4c6301db
...@@ -25,15 +25,19 @@ import {useRouter} from 'vue-router' ...@@ -25,15 +25,19 @@ import {useRouter} from 'vue-router'
25 25
26 const type = ref('是') 26 const type = ref('是')
27 const url = ref() 27 const url = ref()
28 const obj = ref({}) 28 const obj = ref({
29 IFBASE: "是"
30 })
29 const result = ref() 31 const result = ref()
30 const router = useRouter() 32 const router = useRouter()
31 // url.value = 'http://192.168.1.152:8899/login/sid=41a9a180-b1ad-4c78-95cc-f369fadb13f0#/' 33 url.value = 'http://192.168.1.152:8899/login/sid=36487a35-4354-421a-b0d8-4a430f88b7fa#/'
32 // url.value = 'http://192.168.1.152:8899/login/sid5342b777-d86a-4967-a18b-7329a3fca56b/' 34 // url.value = 'http://192.168.1.152:8899/login/sid5342b777-d86a-4967-a18b-7329a3fca56b/'
33 url.value = window.location.href 35 // url.value = window.location.href
34 result.value = url.value?.split('=')[1]?.split('#')[0]; 36 result.value = url.value?.split('=')[1]?.split('#')[0];
35 37
36 onMounted(() => { 38 onMounted(() => {
39 // console.log(window.location.href)
40 console.log(result.value)
37 if (result.value) { 41 if (result.value) {
38 handelGetYS000() 42 handelGetYS000()
39 } else { 43 } else {
...@@ -44,8 +48,8 @@ onMounted(() => { ...@@ -44,8 +48,8 @@ onMounted(() => {
44 48
45 async function handelGetYS000() { 49 async function handelGetYS000() {
46 const res = await getYS000(result.value) 50 const res = await getYS000(result.value)
47 type.value = res.data?.IFBASE || '' 51 type.value = res.data?.IFBASE || ''
48 obj.value = res.data || {} 52 // obj.value = res.data || {}
49 } 53 }
50 54
51 55
......
...@@ -188,7 +188,7 @@ const init = () => { ...@@ -188,7 +188,7 @@ const init = () => {
188 188
189 async function handelGetYS001() { 189 async function handelGetYS001() {
190 const res = await getYS001(url.value, obj.value) 190 const res = await getYS001(url.value, obj.value)
191 resYear1.value = res.data.yeargroup 191 resYear1.value = res.data.yeargroup || []
192 handelBing1(res.data.yeargroup[0], res.data.yeargroup[1]) 192 handelBing1(res.data.yeargroup[0], res.data.yeargroup[1])
193 handelZhu1(res.data.yeargroup[0], res.data.yeargroup[1]) 193 handelZhu1(res.data.yeargroup[0], res.data.yeargroup[1])
194 activeName1.value = res.data.yeargroup[1].YEAR 194 activeName1.value = res.data.yeargroup[1].YEAR
...@@ -196,7 +196,7 @@ async function handelGetYS001() { ...@@ -196,7 +196,7 @@ async function handelGetYS001() {
196 196
197 async function handelGetYS002() { 197 async function handelGetYS002() {
198 const res = await getYS002(url.value, obj.value) 198 const res = await getYS002(url.value, obj.value)
199 resYear2.value = res.data.yeargroup 199 resYear2.value = res.data.yeargroup || []
200 handelBing2(res.data.yeargroup[0], res.data.yeargroup[1]) 200 handelBing2(res.data.yeargroup[0], res.data.yeargroup[1])
201 handelZhu2(res.data.yeargroup[0], res.data.yeargroup[1]) 201 handelZhu2(res.data.yeargroup[0], res.data.yeargroup[1])
202 activeName2.value = res.data.yeargroup[1].YEAR 202 activeName2.value = res.data.yeargroup[1].YEAR
...@@ -212,7 +212,7 @@ async function handelGetYS003() { ...@@ -212,7 +212,7 @@ async function handelGetYS003() {
212 212
213 async function handelGetYS004() { 213 async function handelGetYS004() {
214 const res = await getYS004(url.value, obj.value) 214 const res = await getYS004(url.value, obj.value)
215 let arrList = res.data.blockgroup 215 let arrList = res.data.blockgroup || []
216 // let arrList = [ 216 // let arrList = [
217 // { 217 // {
218 // BLOCK: '海上', 218 // BLOCK: '海上',
...@@ -1366,6 +1366,7 @@ onUnmounted(() => { ...@@ -1366,6 +1366,7 @@ onUnmounted(() => {
1366 font-weight: 600; 1366 font-weight: 600;
1367 font-size: calc(20 * 100vw / 1920); 1367 font-size: calc(20 * 100vw / 1920);
1368 color: #FFFFFF; 1368 color: #FFFFFF;
1369 padding-top: calc(9 * 100vw / 1920);
1369 //text-shadow: 0px 2px 0px rgba(0, 1, 1, 0.41); 1370 //text-shadow: 0px 2px 0px rgba(0, 1, 1, 0.41);
1370 background: linear-gradient(180deg, #75E2E9 0%, #FFFFFF 100%); 1371 background: linear-gradient(180deg, #75E2E9 0%, #FFFFFF 100%);
1371 -webkit-background-clip: text; 1372 -webkit-background-clip: text;
...@@ -1402,7 +1403,7 @@ onUnmounted(() => { ...@@ -1402,7 +1403,7 @@ onUnmounted(() => {
1402 background-size: 100% 100%; 1403 background-size: 100% 100%;
1403 width: calc(480 * 100vw / 1920); 1404 width: calc(480 * 100vw / 1920);
1404 height: calc(220 * 100vh / 1920); 1405 height: calc(220 * 100vh / 1920);
1405 padding: calc(13 * 100vw / 1920) calc(35 * 100vw / 1920); 1406 padding: calc(10 * 100vw / 1920) calc(35 * 100vw / 1920);
1406 1407
1407 .rTop { 1408 .rTop {
1408 display: flex; 1409 display: flex;
......
...@@ -140,7 +140,8 @@ async function handelGetYS006() { ...@@ -140,7 +140,8 @@ async function handelGetYS006() {
140 140
141 h1.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0 141 h1.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0
142 h2.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0 142 h2.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0
143 h3.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0 143 h3.value = new Array(12).fill(JSON.stringify({value: 0, info: ''})); // 初始化 12 个月,默认值 0
144 // h3.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0
144 type2.value = [] 145 type2.value = []
145 for (const v1 of list.value) { 146 for (const v1 of list.value) {
146 set1.value.push({ 147 set1.value.push({
...@@ -164,38 +165,21 @@ async function handelGetYS006() { ...@@ -164,38 +165,21 @@ async function handelGetYS006() {
164 165
165 type2.value.push(v1.BASEJC) 166 type2.value.push(v1.BASEJC)
166 for (const v2 of v1.list) { 167 for (const v2 of v1.list) {
167 const i2 = v2.MONTH - 1; // 转为 0~11 的索引 168 const i = v2.MONTH - 1; // 转为 0~11 的索引
168 h1.value[i2] += v2.YSDSK / 10000 || 0; 169 h1.value[i] += v2.YSDSK / 10000 || 0;
169 h2.value[i2] += v2.SFDDQ / 10000 || 0; 170 h2.value[i] += v2.SFDDQ / 10000 || 0;
170 h3.value[i2] += v2.HTDQ / 10000 || 0; 171 let obj = JSON.parse(h3.value[i])
171 s1.value[i2] += v2.INCOME / 10000 || 0; 172 obj.value += v2.HTDQ / 10000 || 0;
172 s2.value[i2] += v2.LASTINCOME / 10000 || 0; 173 obj.info += v2.YSWELLINFO;
173 s3.value[i2] += v2.LASTYSBALANCE / 10000 || 0; 174 h3.value[i] = JSON.stringify(obj)
174 s4.value[i2] += v2.YSBALANCE / 10000 || 0; 175 s1.value[i] += v2.INCOME / 10000 || 0;
176 s2.value[i] += v2.LASTINCOME / 10000 || 0;
177 s3.value[i] += v2.LASTYSBALANCE / 10000 || 0;
178 s4.value[i] += v2.YSBALANCE / 10000 || 0;
175 } 179 }
180 console.log(11111, h3.value[1])
176 } 181 }
177 182
178 // for (const val of list.value) {
179 // listY3.value.push(val.BASE)
180 // set1.value.push({
181 // value: val.TOTAL,
182 // name: val.BASE
183 // })
184 // arr2.value.push(val.LASTTOTAL)
185 // arr3.value.push(val.TOTAL)
186 // arr4.value.push(val.LASTTOTAL)
187 //
188 // h1.value.push(val.YSDSK)//应待收款
189 // h2.value.push(val.SFDDQ)//收费单待签
190 // h3.value.push(val.HTDQ)//合同待签
191 //
192 // s1.push(val.INCOME)//今年收入
193 // s2.push(val.LASTINCOME)//去年收入
194 // s3.push(val.LASTYSBALANCE)//去年应收账款余额
195 // s4.push(val.YSBALANCE)//去年收入
196 // }
197 //
198
199 setA(set1.value, set2.value, set3.value) 183 setA(set1.value, set2.value, set3.value)
200 setB( 184 setB(
201 type1.value.includes('1') ? s1.value : [], 185 type1.value.includes('1') ? s1.value : [],
...@@ -203,6 +187,7 @@ async function handelGetYS006() { ...@@ -203,6 +187,7 @@ async function handelGetYS006() {
203 type1.value.includes('2') ? s3.value : [], 187 type1.value.includes('2') ? s3.value : [],
204 type1.value.includes('2') ? s4.value : [] 188 type1.value.includes('2') ? s4.value : []
205 ) 189 )
190 h3.value = h3.value.map((item) => JSON.parse(item))
206 setC(h1.value, h2.value, h3.value) 191 setC(h1.value, h2.value, h3.value)
207 } 192 }
208 193
...@@ -245,24 +230,30 @@ function handelSelect3() { ...@@ -245,24 +230,30 @@ function handelSelect3() {
245 // h3.value.push(val.HTDQ)//合同待签 230 // h3.value.push(val.HTDQ)//合同待签
246 h1.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0 231 h1.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0
247 h2.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0 232 h2.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0
248 h3.value = new Array(12).fill(0); // 初始化 12 个月,默认值 0 233 h3.value = new Array(12).fill(JSON.stringify({value: 0, info: ''})); // 初始化 12 个月,默认值 0
249 234
250 for (const department of list.value) { 235 for (const department of list.value) {
251 for (const monthData of department.list) { 236 for (const monthData of department.list) {
252 const monthIndex = monthData.MONTH - 1; // 转为 0~11 的索引 237 const i = monthData.MONTH - 1; // 转为 0~11 的索引
253 h1.value[monthIndex] += monthData.YSDSK / 10000 || 0; 238 h1.value[i] += monthData.YSDSK / 10000 || 0;
254 h2.value[monthIndex] += monthData.SFDDQ / 10000 || 0; 239 h2.value[i] += monthData.SFDDQ / 10000 || 0;
255 h3.value[monthIndex] += monthData.HTDQ / 10000 || 0; 240 let obj = JSON.parse(h3.value[i])
241 obj.value += monthData.HTDQ / 10000 || 0;
242 obj.info += monthData.YSWELLINFO;
243 h3.value[i] = JSON.stringify(obj)
256 } 244 }
257 } 245 }
258 246 h3.value = h3.value.map((item) => JSON.parse(item))
259 } else { 247 } else {
260 // 找到对应的数据 248 // 找到对应的数据
261 let obj = list.value.find(item => item.BASEJC === type3.value) 249 let obj = list.value.find(item => item.BASEJC === type3.value)
262 for (const val of obj.list) { 250 for (const val of obj.list) {
263 h1.value.push(val.YSDSK)//应待收款 251 h1.value.push(val.YSDSK)//应待收款
264 h2.value.push(val.SFDDQ)//收费单待签 252 h2.value.push(val.SFDDQ)//收费单待签
265 h3.value.push(val.HTDQ)//合同待签 253 h3.value.push({
254 value: val.HTDQ,
255 info: val.YSWELLINFO
256 })//合同待签
266 } 257 }
267 } 258 }
268 259
...@@ -628,10 +619,11 @@ const setB = (arr1, arr2, arr3, arr4) => { ...@@ -628,10 +619,11 @@ const setB = (arr1, arr2, arr3, arr4) => {
628 autoHover(chartB, option, 0, 2000) 619 autoHover(chartB, option, 0, 2000)
629 } 620 }
630 const setC = (h1, h2, h3) => { 621 const setC = (h1, h2, h3) => {
622 console.log(h3)
623
631 chartC = echarts.init(payeeRef.value) 624 chartC = echarts.init(payeeRef.value)
632 const option = { 625 const option = {
633 tooltip: { 626 tooltip: {
634 trigger: 'axis',
635 axisPointer: { 627 axisPointer: {
636 type: 'shadow' 628 type: 'shadow'
637 }, 629 },
...@@ -642,6 +634,19 @@ const setC = (h1, h2, h3) => { ...@@ -642,6 +634,19 @@ const setC = (h1, h2, h3) => {
642 textStyle: { 634 textStyle: {
643 color: '#fff', // 文字颜色 635 color: '#fff', // 文字颜色
644 fontSize: 12, // 文字大小 636 fontSize: 12, // 文字大小
637 },
638 position: 'top',
639 formatter: function (row) {
640 return `
641 <div style="font-weight:bold">${row.name}</div>
642 <div style="display:flex;align-items:center;margin-top:5px">
643 ${row.marker}
644 ${row.seriesName}: ${row.value}
645 </div>
646 <div>
647 ${row.data?.info ? row.data?.info?.replaceAll('万', '万<br>') : ''}
648 </div>
649 `;
645 } 650 }
646 }, 651 },
647 legend: { 652 legend: {
......
...@@ -357,7 +357,7 @@ function handelSelect7() { ...@@ -357,7 +357,7 @@ function handelSelect7() {
357 357
358 async function handelGetYS008() { 358 async function handelGetYS008() {
359 const res = await getYS008(url.value, obj.value) 359 const res = await getYS008(url.value, obj.value)
360 list8.value = res.data.list 360 list8.value = res.data.list || []
361 list8Y.value = [] 361 list8Y.value = []
362 month8.value = [] 362 month8.value = []
363 year8.value = [] 363 year8.value = []
...@@ -412,7 +412,10 @@ async function handelGetYS009() { ...@@ -412,7 +412,10 @@ async function handelGetYS009() {
412 arrY.push(val.BASEJC) 412 arrY.push(val.BASEJC)
413 arr1.push(Math.round(val.WKPCOSTONE / 10000)) 413 arr1.push(Math.round(val.WKPCOSTONE / 10000))
414 arr2.push(Math.round(val.WKPCOSTTWO / 10000)) 414 arr2.push(Math.round(val.WKPCOSTTWO / 10000))
415 arr3.push(Math.round(val.WKPCOSTTHREE / 10000)) 415 arr3.push({
416 value: Math.round(val.WKPCOSTTHREE / 10000),
417 info: val.YQWELLINFO
418 })
416 } 419 }
417 setC(arrY, arr1, arr2, arr3) 420 setC(arrY, arr1, arr2, arr3)
418 } 421 }
...@@ -856,6 +859,9 @@ const setC = (arry, arr1, arr2, arr3) => { ...@@ -856,6 +859,9 @@ const setC = (arry, arr1, arr2, arr3) => {
856 ${row.marker} 859 ${row.marker}
857 ${row.seriesName == '逾期360天以上' ? '未开票金额' : row.seriesName}: ${row.value} 860 ${row.seriesName == '逾期360天以上' ? '未开票金额' : row.seriesName}: ${row.value}
858 </div> 861 </div>
862 <div>
863 ${row.data?.info ? row.data?.info?.replaceAll('\n', '<br>') : ''}
864 </div>
859 `; 865 `;
860 } 866 }
861 }, 867 },
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!