diff --git a/src/components/tablecmt/tablecmt.vue b/src/components/tablecmt/tablecmt.vue
index 18e858b4..78c6a1df 100644
--- a/src/components/tablecmt/tablecmt.vue
+++ b/src/components/tablecmt/tablecmt.vue
@@ -173,7 +173,7 @@
勾选合计:
-
+
{{ item.label + ':' }}
{{ item.value }}
@@ -339,10 +339,15 @@ let selectarr = ref([]);
/** 设置每行颜色 */
const tableRowClassName = ({ row, rowIndex }: { row: TableDataType; rowIndex: number }) => {
let sfcheck = false;
- selectarr.value.map(item => {
- if (item == row) {
+ selectarr.value.forEach((val, index) => {
+ if (val == row) {
sfcheck = true;
}
+
+ selectCount.value.forEach(item => {
+ if (index === 0) item.value = 0;
+ item.value = computeNumber(item.value, '+', Number(val[item.prop] || 0)).result;
+ });
});
if (sfcheck) {
return 'table-SelectedRow-bgcolor';
@@ -479,16 +484,17 @@ function timechange(value, column: TableColumnType) {
}
const handleSelectionChange = (param: TableDataType[]) => {
// 重置数据
- selectCount.value.forEach(item => {
- item.value = 0;
- });
+ // selectCount.value.forEach(item => {
+ // item.value = 0;
+ // });
selectarr.value = param;
- selectarr.value.forEach(val => {
- selectCount.value.forEach(
- item => (item.value = computeNumber(item.value, '+', Number(val[item.prop] || 0)).result)
- );
- });
+ // selectarr.value.forEach((val, index) => {
+ // selectCount.value.forEach(item => {
+ // if (index === 0) item.value = 0;
+ // item.value = computeNumber(item.value, '+', Number(val[item.prop] || 0)).result;
+ // });
+ // });
emit('selection', param);
};
function inputclear(value, column: TableColumnType) {
diff --git a/vite.config.js b/vite.config.js
index f18c7559..aad60748 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -12,27 +12,7 @@ export default ({ mode, command }) => {
port: 2888,
proxy: {
'/api': {
- // target: 'http://192.168.10.126:8889',
- // hy
- // target: 'http://192.168.10.48:13000',
- // lmy
- // target: 'http://192.168.10.123:8889',
- // target: 'http://192.168.10.101:8888',
- // 老zyc
- // target: 'http://192.168.10.75:8777',
- // 新zyc
- // target: 'http://192.168.6.116:8777',
- // target: 'http://192.168.6.122:8777',
- // target: 'http://192.168.10.25:13000',
- // target: 'http://192.168.10.57:13000',
- target: 'http://192.168.6.122:8777',
- // target: 'http://192.168.6.116:8777',
- // tjj
- // sst
- // target: 'http://192.168.10.94:8888',
- // target: 'http://192.168.10.29:13000',
- // target: 'http://h5uapi.huitongys.com',
- // target: 'http://test.api.huitongys.com',
+ target: 'http://test.api.huitongys.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},