Commit 0d536722 authored by tianhongyang's avatar tianhongyang

fix

parent 245b267b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="table-list-com-ins" :class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams,'auto-max-height' : maxHeight}" <div class="table-list-com-ins" :class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams,'auto-max-height' : maxHeight}"
:style="maxBodyFixedStyle"> :style="maxBodyFixedStyle">
<div class="table-item"> <div class="table-item">
<el-table v-if="tableDataTotal>0" class="fixed-table" v-loading="tableLoading" :data="tableData" element-loading-text="Loading" <el-table v-if="tableDataTotal>0" class="custom-table" v-loading="tableLoading" :data="tableData" element-loading-text="Loading"
ref="customTableRef" border fit highlight-current-row :default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange" ref="customTableRef" border fit highlight-current-row :default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange"
@selection-change="selectionChange" :cell-class-name="cellClassName" :cell-style="cellStyle" :row-class-name="rowClassName" @selection-change="selectionChange" :cell-class-name="cellClassName" :cell-style="cellStyle" :row-class-name="rowClassName"
:row-style="rowStyle" :height="height" :maxHeight="comMaxHeight" v-sticky-header="stickyHeader"> :row-style="rowStyle" :height="height" :maxHeight="comMaxHeight" v-sticky-header="stickyHeader">
...@@ -343,6 +343,7 @@ export default { ...@@ -343,6 +343,7 @@ export default {
max-height: 100%; max-height: 100%;
} }
} }
::v-deep .table-item { ::v-deep .table-item {
width: 100%; width: 100%;
max-height: calc(100% - 40px); max-height: calc(100% - 40px);
...@@ -400,6 +401,28 @@ export default { ...@@ -400,6 +401,28 @@ export default {
} }
.el-table { .el-table {
&.custom-table {
.el-table__body-wrapper {
/* 滚动条在最左侧时 */
&.is-scrolling-left {
& + .el-table__fixed {
box-shadow: unset;
}
}
/* 滚动条在最右侧时 */
&.is-scrolling-right {
/* 右侧固定列 */
& + .el-table__fixed + .el-table__fixed-right,
& + .el-table__fixed-right {
box-shadow: unset;
}
}
}
.el-table__fixed-right,
.el-table__fixed {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.12);
}
}
.el-table__header-wrapper { .el-table__header-wrapper {
min-height: 40px; min-height: 40px;
} }
......
import { add, multiply, divide } from "@/utils/decimal.js"; import { multiply, divide } from "@/utils/decimal.js";
/** /**
* 根据屏幕缩放率 来进行样式缩放 * 根据屏幕缩放率 来进行样式缩放
...@@ -42,7 +42,7 @@ export default class ScreenScal { ...@@ -42,7 +42,7 @@ export default class ScreenScal {
* @returns * @returns
*/ */
getDecimal = (num) => { getDecimal = (num) => {
return parseFloat(divide(multiply(num, 100), 100)); return parseFloat(divide(multiply(num, 100, 5), 100));
}; };
/** /**
...@@ -65,7 +65,7 @@ export default class ScreenScal { ...@@ -65,7 +65,7 @@ export default class ScreenScal {
// 屏幕最终需要适配结果 // 屏幕最终需要适配结果
const resultCalcZoom = 1 / zoom; const resultCalcZoom = 1 / zoom;
console.log('系统分辨率', systemResolution, '屏幕分辨率', screenResolution, '浏览器外部宽度', window.outerWidth, '浏览器内部宽度', browserWidth, '总缩放倍数', zoom, "系统最终适配倍数", resultCalcZoom, '浏览器缩放倍数', browserZoom, '系统缩放倍数', systemZoom); // console.log('系统分辨率', systemResolution, '屏幕分辨率', screenResolution, '浏览器外部宽度', window.outerWidth, '浏览器内部宽度', browserWidth, '总缩放倍数', zoom, "系统最终适配倍数", resultCalcZoom, '浏览器缩放倍数', browserZoom, '系统缩放倍数', systemZoom);
return { return {
zoom, zoom,
...@@ -77,7 +77,7 @@ export default class ScreenScal { ...@@ -77,7 +77,7 @@ export default class ScreenScal {
} }
/** /**
* 获取用户屏幕缩放倍数 * 获取用户屏幕缩放倍数 后期需要考虑 echarts 缩放兼容性问题
* @returns * @returns
*/ */
getZoom() { getZoom() {
...@@ -86,7 +86,8 @@ export default class ScreenScal { ...@@ -86,7 +86,8 @@ export default class ScreenScal {
ua = navigator.userAgent.toLowerCase(); ua = navigator.userAgent.toLowerCase();
if (window.devicePixelRatio !== undefined) { if (window.devicePixelRatio !== undefined) {
zoom = window.devicePixelRatio; const _devicePixelRatio = window.devicePixelRatio;
zoom = _devicePixelRatio > 1 ? window.outerWidth / window.innerWidth : window.devicePixelRatio;
} else if (~ua.indexOf('msie')) { } else if (~ua.indexOf('msie')) {
if (screen.deviceXDPI && screen.logicalXDPI) { if (screen.deviceXDPI && screen.logicalXDPI) {
zoom = screen.deviceXDPI / screen.logicalXDPI; zoom = screen.deviceXDPI / screen.logicalXDPI;
......
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
projectDetailInfo: { projectDetailInfo: {
handler(newValue) { handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {}; this.comProjectDetailInfo = newValue ? newValue : {};
this.getCbDirectExpenseMenuTreeApi(this.comProjectDetailInfo.projectId) this.getCbDirectExpenseMenuTree(this.comProjectDetailInfo.projectId)
// this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId) // this.getProjectOtherStatistics(this.comProjectDetailInfo.projectId)
// this.getProjectOtherStatistics('1762014527685136385') // this.getProjectOtherStatistics('1762014527685136385')
// this.init(this.comProjectDetailInfo); // this.init(this.comProjectDetailInfo);
...@@ -200,14 +200,15 @@ export default { ...@@ -200,14 +200,15 @@ export default {
}, },
//方法集 //方法集
methods: { methods: {
async getCbDirectExpenseMenuTreeApi(params) { async getCbDirectExpenseMenuTree(params) {
try { try {
const result = await getCbDirectExpenseMenuTreeApi(params); const result = await getCbDirectExpenseMenuTreeApi(params);
if (result.code == 200) { if (result.code == 200) {
const _tempArray = result.data; const _tempArray = result.data;
this.menuDetails=_tempArray this.menuDetails=_tempArray
this.menuTreeList.push(_tempArray); this.menuTreeList.push(_tempArray);
const defaultCurrent = this.findMenuNode(this.menuTreeList, "土石方部分"); const defaultCurrent = this.findMenuNode(this.menuTreeList, "宝安中学(集团)初中部改扩建工程施工总承包-加固修缮工程");
console.log(defaultCurrent,"defaultCurrent");
if (defaultCurrent) { if (defaultCurrent) {
this.defaultActive = defaultCurrent.menuId; this.defaultActive = defaultCurrent.menuId;
this.menuId = defaultCurrent.menuId; this.menuId = defaultCurrent.menuId;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<custom-table :tableData="dataForm.tableDataList" :formColum="formColum" :max-height="true" :tableDataTotal="total" :paging="false" <custom-table :tableData="dataForm.tableDataList" :formColum="formColum" :max-height="true" :tableDataTotal="total" :paging="false"
:cell-class-name="cellClassName"> :cell-class-name="cellClassName">
<template slot="action-field-bar" slot-scope="scope"> <template slot="action-field-bar" slot-scope="scope">
<div class="project-action-field-bar" v-if="scope.row.id != '0'"> <div class="project-action-field-bar" v-if="rowCanEditInput(scope.rowIndex,hasTarget)">
<span class="push-project-use" :class="{'is-emty-quantities' : !parseFloat(scope.row.quantities)}" <span class="push-project-use" :class="{'is-emty-quantities' : !parseFloat(scope.row.quantities)}"
@click="parseFloat(scope.row.quantities) ? pushProjectUse(scope.row) : ''">推送工程量</span> @click="parseFloat(scope.row.quantities) ? pushProjectUse(scope.row) : ''">推送工程量</span>
</div> </div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<template slot="quantities" slot-scope="scope"> <template slot="quantities" slot-scope="scope">
<!-- 编辑单元格 --> <!-- 编辑单元格 -->
<el-form-item :prop="`tableDataList.${scope.rowIndex}.quantities`" :rules="checkRules.amountCheck" <el-form-item :prop="`tableDataList.${scope.rowIndex}.quantities`" :rules="checkRules.amountCheck"
v-if="scope.rowIndex != '0' && addActualCostEditStatus" class="inner-edit-input-item"> v-if="rowCanEditInput(scope.rowIndex,hasTarget) && addActualCostEditStatus" class="inner-edit-input-item">
<el-input placeholder="请输入" v-model="scope.row.quantities" clearable @input="v => statisticsSum(v,'quantities')"></el-input> <el-input placeholder="请输入" v-model="scope.row.quantities" clearable @input="v => statisticsSum(v,'quantities')"></el-input>
</el-form-item> </el-form-item>
</template> </template>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<template slot="purchaseUnitPrice" slot-scope="scope"> <template slot="purchaseUnitPrice" slot-scope="scope">
<!-- 编辑单元格 --> <!-- 编辑单元格 -->
<el-form-item :prop="`tableDataList.${scope.rowIndex}.purchaseUnitPrice`" :rules="checkRules.amountCheck" <el-form-item :prop="`tableDataList.${scope.rowIndex}.purchaseUnitPrice`" :rules="checkRules.amountCheck"
v-if="scope.rowIndex != '0' && addActualCostEditStatus" class="inner-edit-input-item"> v-if="rowCanEditInput(scope.rowIndex,hasTarget) && addActualCostEditStatus" class="inner-edit-input-item">
<el-input placeholder="请输入" v-model="scope.row.purchaseUnitPrice" clearable <el-input placeholder="请输入" v-model="scope.row.purchaseUnitPrice" clearable
@input="v => statisticsSum(v,'purchaseUnitPrice')"></el-input> @input="v => statisticsSum(v,'purchaseUnitPrice')"></el-input>
</el-form-item> </el-form-item>
...@@ -605,6 +605,11 @@ export default { ...@@ -605,6 +605,11 @@ export default {
}, 0); }, 0);
return sum; return sum;
}, },
// 当前是否可编辑
rowCanEditInput(index, hasTarget) {
// 不为id 0 或 不是劳务分包跟专业分包
return index != 0 || !hasTarget;
},
// 保存 // 保存
saveActualCost() { saveActualCost() {
this.$refs["feedSummaryForm"].validate(async flag => { this.$refs["feedSummaryForm"].validate(async flag => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment