属性配置
This commit is contained in:
parent
f75eca90f4
commit
11f2b33c94
@ -28,7 +28,6 @@ export default {
|
|||||||
my_show: false,
|
my_show: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
dataProvince: [],
|
dataProvince: [],
|
||||||
edits: [],
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '省份',
|
title: '省份',
|
||||||
@ -47,9 +46,9 @@ export default {
|
|||||||
disabled: !this.isUpdate
|
disabled: !this.isUpdate
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
input: (val) => {
|
'on-change': (val) => {
|
||||||
this.edits = JSON.parse(JSON.stringify(this.dataProvince));
|
context.row.percentages = val;
|
||||||
this.edits[context.index]['percentages'] = val;
|
this.dataProvince[context.index] = context.row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -73,7 +72,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
ok() {
|
ok() {
|
||||||
let total = this.edits.reduce((acc, cur) => {
|
let total = this.dataProvince.reduce((acc, cur) => {
|
||||||
return acc + cur.percentages;
|
return acc + cur.percentages;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
@ -83,8 +82,8 @@ export default {
|
|||||||
|
|
||||||
let province = {};
|
let province = {};
|
||||||
|
|
||||||
for (const key in this.edits) {
|
for (const key in this.dataProvince) {
|
||||||
const element = this.edits[key];
|
const element = this.dataProvince[key];
|
||||||
province[element.province] = element.percentages;
|
province[element.province] = element.percentages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
public/js/app.89c8d5ad.js
Normal file
2
public/js/app.89c8d5ad.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/app.89c8d5ad.js.map
Normal file
1
public/js/app.89c8d5ad.js.map
Normal file
File diff suppressed because one or more lines are too long
15
public/js/chunk-6d96644c.2e13fe3c.js
Normal file
15
public/js/chunk-6d96644c.2e13fe3c.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/chunk-6d96644c.2e13fe3c.js.map
Normal file
1
public/js/chunk-6d96644c.2e13fe3c.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-6d96644c.e151cd00.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.3874cd10.js rel=prefetch><link href=/js/chunk-07a274ec.c3ad5dec.js rel=prefetch><link href=/js/chunk-6d96644c.aac85e3c.js rel=prefetch><link href=/js/chunk-996b1e80.d3b45e46.js rel=prefetch><link href=/css/app.d71a8195.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.fb2ddb4b.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.d71a8195.css rel=stylesheet></head><body><noscript><strong>很抱歉,如果没有启用JavaScript,程序不能正常工作,若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.fb2ddb4b.js></script></body></html>
|
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-6d96644c.e151cd00.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.3874cd10.js rel=prefetch><link href=/js/chunk-07a274ec.c3ad5dec.js rel=prefetch><link href=/js/chunk-6d96644c.2e13fe3c.js rel=prefetch><link href=/js/chunk-996b1e80.d3b45e46.js rel=prefetch><link href=/css/app.d71a8195.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.89c8d5ad.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.d71a8195.css rel=stylesheet></head><body><noscript><strong>很抱歉,如果没有启用JavaScript,程序不能正常工作,若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.89c8d5ad.js></script></body></html>
|
Loading…
x
Reference in New Issue
Block a user