Compare commits

...

6 Commits

Author SHA1 Message Date
21aad8176f 报表时间&经营性利润排序等bug 2026-03-30 14:13:51 +08:00
f208c3c744 路由跳转逻辑bug修复 2026-03-30 09:27:47 +08:00
b05d42cfc8 3.27修改入参及数据获取字段变更 2026-03-30 08:49:16 +08:00
9b0a768216 指标和预算填报删除指标类型 2026-03-27 08:36:02 +08:00
ee4fdbd45b 修改icon提示 2026-03-20 10:25:15 +08:00
5465a43bcc 去掉默认的账密 2026-03-19 09:13:27 +08:00
30 changed files with 134 additions and 83 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>切片</title> <title>全屏</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="01-运营驾驶舱" transform="translate(-1864.000000, -12.000000)" fill="#0B58FF"> <g id="01-运营驾驶舱" transform="translate(-1864.000000, -12.000000)" fill="#0B58FF">
<g id="icon/可视化/全屏" transform="translate(1864.000000, 12.000000)"> <g id="icon/可视化/全屏" transform="translate(1864.000000, 12.000000)">

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>展开备份</title> <title>展开菜单</title>
<g id="12-月修改-2-版" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="12-月修改-2-版" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="01-运营驾驶舱展开" transform="translate(-1818.000000, -12.000000)" fill="#0B58FF"> <g id="01-运营驾驶舱展开" transform="translate(-1818.000000, -12.000000)" fill="#0B58FF">
<g id="展开备份" transform="translate(1818.000000, 12.000000)"> <g id="展开菜单" transform="translate(1818.000000, 12.000000)">
<rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect> <rect id="矩形" stroke="#0B58FF" opacity="0" x="0.5" y="0.5" width="31" height="31"></rect>
<path d="M26.9054416,1.26315789 L27.1627614,1.2715785 C27.589262,1.29963047 28.0033877,1.39768715 28.3969525,1.56449606 C28.853625,1.75530116 29.2618455,2.03033772 29.6157539,2.38424612 C29.967102,2.73559426 30.2434779,3.1465945 30.4352441,3.6024321 C30.6356746,4.07532525 30.7368421,4.57721075 30.7368421,5.09455843 L30.7368421,26.9054416 L30.7284215,27.1627614 C30.7003695,27.589262 30.6023129,28.0033877 30.4355039,28.3969525 C30.2446988,28.853625 29.9696623,29.2618455 29.6157539,29.6157539 C29.2644057,29.967102 28.8534055,30.2434779 28.3975679,30.4352441 C27.9246748,30.6356746 27.4227892,30.7368421 26.9054416,30.7368421 L5.09455843,30.7368421 L4.83723859,30.7284215 C4.41073802,30.7003695 3.99661229,30.6023129 3.60304751,30.4355039 C3.14637497,30.2446988 2.73815452,29.9696623 2.38424612,29.6157539 C2.03289798,29.2644057 1.75652209,28.8534055 1.56475593,28.3975679 C1.36432537,27.9246748 1.26315789,27.4227892 1.26315789,26.9054416 L1.26315789,5.09455843 L1.2715785,4.83723859 C1.29963047,4.41073802 1.39768715,3.99661229 1.56449606,3.60304751 C1.75530116,3.14637497 2.03033772,2.73815452 2.38424612,2.38424612 C2.73559426,2.03289798 3.1465945,1.75652209 3.6024321,1.56475593 C4.07532525,1.36432537 4.57721075,1.26315789 5.09455843,1.26315789 L26.9054416,1.26315789 Z M26.9054416,3.17216771 L5.09455843,3.17216771 L4.94438644,3.17795455 C3.95326514,3.25463661 3.17216771,4.08386243 3.17216771,5.09455843 L3.17216771,26.9054416 L3.17795455,27.0556136 C3.25463661,28.0467349 4.08386243,28.8278323 5.09455843,28.8278323 L26.9054416,28.8278323 L27.0556136,28.8220454 C28.0467349,28.7453634 28.8278323,27.9161376 28.8278323,26.9054416 L28.8278323,5.09455843 L28.8220454,4.94438644 C28.7453634,3.95326514 27.9161376,3.17216771 26.9054416,3.17216771 Z M29.2015182,9.76714413 L29.2015182,11.8615014 L2.12281432,11.8615014 L2.12281432,9.76714413 L29.2015182,9.76714413 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path> <path d="M26.9054416,1.26315789 L27.1627614,1.2715785 C27.589262,1.29963047 28.0033877,1.39768715 28.3969525,1.56449606 C28.853625,1.75530116 29.2618455,2.03033772 29.6157539,2.38424612 C29.967102,2.73559426 30.2434779,3.1465945 30.4352441,3.6024321 C30.6356746,4.07532525 30.7368421,4.57721075 30.7368421,5.09455843 L30.7368421,26.9054416 L30.7284215,27.1627614 C30.7003695,27.589262 30.6023129,28.0033877 30.4355039,28.3969525 C30.2446988,28.853625 29.9696623,29.2618455 29.6157539,29.6157539 C29.2644057,29.967102 28.8534055,30.2434779 28.3975679,30.4352441 C27.9246748,30.6356746 27.4227892,30.7368421 26.9054416,30.7368421 L5.09455843,30.7368421 L4.83723859,30.7284215 C4.41073802,30.7003695 3.99661229,30.6023129 3.60304751,30.4355039 C3.14637497,30.2446988 2.73815452,29.9696623 2.38424612,29.6157539 C2.03289798,29.2644057 1.75652209,28.8534055 1.56475593,28.3975679 C1.36432537,27.9246748 1.26315789,27.4227892 1.26315789,26.9054416 L1.26315789,5.09455843 L1.2715785,4.83723859 C1.29963047,4.41073802 1.39768715,3.99661229 1.56449606,3.60304751 C1.75530116,3.14637497 2.03033772,2.73815452 2.38424612,2.38424612 C2.73559426,2.03289798 3.1465945,1.75652209 3.6024321,1.56475593 C4.07532525,1.36432537 4.57721075,1.26315789 5.09455843,1.26315789 L26.9054416,1.26315789 Z M26.9054416,3.17216771 L5.09455843,3.17216771 L4.94438644,3.17795455 C3.95326514,3.25463661 3.17216771,4.08386243 3.17216771,5.09455843 L3.17216771,26.9054416 L3.17795455,27.0556136 C3.25463661,28.0467349 4.08386243,28.8278323 5.09455843,28.8278323 L26.9054416,28.8278323 L27.0556136,28.8220454 C28.0467349,28.7453634 28.8278323,27.9161376 28.8278323,26.9054416 L28.8278323,5.09455843 L28.8220454,4.94438644 C28.7453634,3.95326514 27.9161376,3.17216771 26.9054416,3.17216771 Z M29.2015182,9.76714413 L29.2015182,11.8615014 L2.12281432,11.8615014 L2.12281432,9.76714413 L29.2015182,9.76714413 Z" id="形状结合" fill-rule="nonzero" opacity="0.79078311"></path>
</g> </g>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,6 +1,6 @@
<!--?xml version="1.0" encoding="UTF-8"?--> <!--?xml version="1.0" encoding="UTF-8"?-->
<svg width="100%" height="100%" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet"> <svg width="100%" height="100%" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet">
<title>icon/可视化/退出全屏</title> <title>退出全屏</title>
<g id="00首页" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="00首页" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-1802.000000, -40.000000)" fill="#0B58FF" id="icon/可视化/退出全屏"> <g transform="translate(-1802.000000, -40.000000)" fill="#0B58FF" id="icon/可视化/退出全屏">
<g transform="translate(1802.000000, 40.000000)"> <g transform="translate(1802.000000, 40.000000)">

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -8,11 +8,8 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
/** // 从菜单树中查找第一个可见叶子菜单路径(按接口返回顺序)
* 从菜单树中查找 jumpFlag===1 的默认跳转路径 function findFirstLeafPathFromMenus(menus) {
* 若打标在父节点则取其下第一个可见叶子路径;若在叶子则直接返回该路径
*/
function findDefaultPathFromMenus(menus) {
if (!Array.isArray(menus) || menus.length === 0) return null if (!Array.isArray(menus) || menus.length === 0) return null
function dfs(list, parentPath = '') { function dfs(list, parentPath = '') {
@@ -22,23 +19,34 @@ function findDefaultPathFromMenus(menus) {
const currentPath = rawPath.startsWith('/') const currentPath = rawPath.startsWith('/')
? rawPath ? rawPath
: `${parentPath}/${rawPath}`.replace(/\/+/g, '/') : `${parentPath}/${rawPath}`.replace(/\/+/g, '/')
if (item.jumpFlag === 1) {
if (item.children && item.children.length > 0) {
const childPath = dfs(item.children, currentPath)
return childPath != null ? childPath : currentPath
}
return currentPath
}
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
const found = dfs(item.children, currentPath) const found = dfs(item.children, currentPath)
if (found != null) return found if (found != null) return found
} else {
return currentPath
} }
} }
return null return null
} }
return dfs(menus) return dfs(menus)
} }
function findFirstLeafPathFromRoutes(routes) {
if (!Array.isArray(routes) || routes.length === 0) return null
const stack = [...routes]
while (stack.length) {
const route = stack.shift()
if (!route || route.hidden === true) continue
if (Array.isArray(route.children) && route.children.length > 0) {
stack.unshift(...route.children)
continue
}
const p = route.path || ''
if (typeof p === 'string' && p.startsWith('/') && p !== '/404') {
return p
}
}
return null
}
// 增加三方登陆 update by 芋艿 // 增加三方登陆 update by 芋艿
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee'] const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
@@ -65,11 +73,16 @@ router.beforeEach((to, from, next) => {
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => { store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
// 根据 roles 权限生成可访问的路由表 // 根据 roles 权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表 router.addRoutes(accessRoutes) // 动态添加可访问路由表
const defaultPath = findDefaultPathFromMenus(userInfo.menus) || '/' const menuDefaultPath = findFirstLeafPathFromMenus(userInfo.menus)
const routeFallbackPath = findFirstLeafPathFromRoutes(accessRoutes)
const defaultPath = menuDefaultPath || routeFallbackPath || '/'
store.dispatch('SetDefaultPath', defaultPath) store.dispatch('SetDefaultPath', defaultPath)
// 仅当目标为根路径 '/' 时跳默认页;否则保持当前路径(含刷新场景),避免刷新被误判为“未匹配”而跳到默认页 // 仅当目标为根路径 '/' 时跳默认页;否则保持当前路径(含刷新场景),避免刷新被误判为“未匹配”而跳到默认页
if (to.path === '/') { if (to.path === '/') {
next({ path: defaultPath, replace: true }) const matched = router.match(defaultPath)
const hasMatch = matched && Array.isArray(matched.matched) && matched.matched.length > 0
const safePath = hasMatch ? defaultPath : (routeFallbackPath || '/')
next({ path: safePath, replace: true })
} else { } else {
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成当前页刷新时保留 to 的路径 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成当前页刷新时保留 to 的路径
} }

View File

@@ -90,7 +90,7 @@
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button> <el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button> <el-button @click="cancelBtn"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</Container> </Container>
@@ -388,7 +388,7 @@ export default {
console.log('当前编辑状态:', isEdit, '当前时间维度:', this.timeType); console.log('当前编辑状态:', isEdit, '当前时间维度:', this.timeType);
// 基础表格列配置(只读模式使用) // 基础表格列配置(只读模式使用)
const baseTableProps = [ const baseTableProps = [
{ prop: 'type', label: '指标类型', align: 'center' }, // { prop: 'type', label: '指标类型', align: 'center' },
{ prop: 'name', label: '指标名称', align: 'center' }, { prop: 'name', label: '指标名称', align: 'center' },
{ prop: 'unit', label: '单位', align: 'center', filter: publicFormatter('lb_dw') }, { prop: 'unit', label: '单位', align: 'center', filter: publicFormatter('lb_dw') },
{ prop: 'target', label: '预算值', align: 'center' }, { prop: 'target', label: '预算值', align: 'center' },
@@ -512,6 +512,10 @@ export default {
this.$message.error('上传失败!') this.$message.error('上传失败!')
} }
}, },
cancelBtn() {
this.upload.open = false
this.$refs.upload.clearFiles();
}
} }
} }
</script> </script>

View File

@@ -77,7 +77,7 @@ font-style: normal;">指标详情</div>
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button> <el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button> <el-button @click="cancelBtn"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</Container> </Container>
@@ -169,7 +169,7 @@ export default {
// 基础表格列配置(只读模式使用) // 基础表格列配置(只读模式使用)
const baseTableProps = [ const baseTableProps = [
{ prop: 'type', label: '指标类型', align: 'center' }, // { prop: 'type', label: '指标类型', align: 'center' },
{ prop: 'name', label: '指标名称', align: 'center' }, { prop: 'name', label: '指标名称', align: 'center' },
{ prop: 'unitLabel', label: '单位', align: 'center' }, { prop: 'unitLabel', label: '单位', align: 'center' },
{ prop: 'value', label: '实际值', align: 'center' }, { prop: 'value', label: '实际值', align: 'center' },
@@ -387,6 +387,10 @@ export default {
console.error('文件上传出错:', error) console.error('文件上传出错:', error)
this.$message.error('上传失败!') this.$message.error('上传失败!')
} }
},
cancelBtn(){
this.upload.open = false
this.$refs.upload.clearFiles();
} }
} }
} }

View File

@@ -65,7 +65,7 @@
'bg-green': item.currentValue >= item.targetValue 'bg-green': item.currentValue >= item.targetValue
}" style="font-size: 12px;display: flex;align-items: center;justify-content: flex-end;"> }" style="font-size: 12px;display: flex;align-items: center;justify-content: flex-end;">
<div class="title">完成率</div> <div class="title">完成率</div>
<div class="yield" style="font-size: 22px;margin-bottom: 4px;"> <div class="yield" style="font-size: 18px;margin-bottom: 4px;">
{{ item.progress }} {{ item.progress }}
</div> </div>
<div class="unit">%</div> <div class="unit">%</div>
@@ -359,12 +359,11 @@ export default {
text-align: center; text-align: center;
.title { .title {
margin-top: 10px; margin-top:4px;
height: 12px; height: 12px;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
margin-right: 8px;
color: #000000; color: #000000;
line-height: 12px; line-height: 12px;
text-align: left; text-align: left;
@@ -372,7 +371,7 @@ export default {
} }
.unit { .unit {
margin-top: 10px; margin-top: 4px;
margin-right: 14px; margin-right: 14px;
height: 12px; height: 12px;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;

View File

@@ -149,7 +149,6 @@ export default {
levelId:1, levelId:1,
// timeDim: this.dateData.mode // timeDim: this.dateData.mode
}).then((res) => { }).then((res) => {
console.log(res);
this.monData = res.data.currentMonthData this.monData = res.data.currentMonthData
this.totalData = res.data.totalMonthData this.totalData = res.data.totalMonthData
// this.totalData = res.data.totalData // this.totalData = res.data.totalData

View File

@@ -121,6 +121,7 @@ export default {
// 最终传递给图表的排序后数据 // 最终传递给图表的排序后数据
chartD() { chartD() {
const data = this.currentDataSource; const data = this.currentDataSource;
console.log('charData+++++++++++++++++++++++++++++',data)
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
series: [ series: [
@@ -143,7 +144,7 @@ export default {
{ offset: 1, color: 'rgba(40, 138, 255, 0)' } { offset: 1, color: 'rgba(40, 138, 255, 0)' }
]) ])
}, },
data: data.rate || [], data: data.rates || [],
symbol: 'circle', symbol: 'circle',
symbolSize: 6 symbolSize: 6
}, },

View File

@@ -95,7 +95,6 @@ export default {
meterialName:'', meterialName:'',
materialOptions: [ materialOptions: [
{value:'硅砂',label:'硅砂'}, {value:'硅砂',label:'硅砂'},
{value:'海砂',label:'海砂'},
{value:'纯碱',label:'纯碱'}, {value:'纯碱',label:'纯碱'},
{value:'白云石',label:'白云石'}, {value:'白云石',label:'白云石'},
{value:'石灰石',label:'石灰石'} {value:'石灰石',label:'石灰石'}
@@ -189,23 +188,23 @@ export default {
startTime: this.dateData.startTime, startTime: this.dateData.startTime,
endTime: this.dateData.endTime, endTime: this.dateData.endTime,
trendName: '原料' + this.meterialName + this.trendName, trendName: '原料' + this.meterialName + this.trendName,
analysisObject: ['原料' + this.meterialName], analysisObject: [this.meterialName],
levelId: this.factory, levelId: this.factory,
}; };
// 调用接口 // 调用接口
getSingleMaterialAnalysis(requestParams).then((res) => { getSingleMaterialAnalysis(requestParams).then((res) => {
this.monData = res.data.currentMonthData.find(item => { this.monData = res.data.currentMonthData.find(item => {
return item.name === '原料' + this.meterialName; return item.name === this.meterialName + '成本';
}); });
this.totalData = res.data.totalMonthData.find(item => { this.totalData = res.data.totalMonthData.find(item => {
return item.name === '原料' + this.meterialName; return item.name === this.meterialName + '成本';
}); });
this.relatedData = { this.relatedData = {
relatedMon: res.data.currentMonthData.filter(item => { relatedMon: res.data.currentMonthData.filter(item => {
return item.name !== '原料' + this.meterialName; return item.name !== this.meterialName + '成本';
}), // 兜底月度数据 }), // 兜底月度数据
relatedTotal: res.data.totalMonthData.filter(item => { relatedTotal: res.data.totalMonthData.filter(item => {
return item.name !== '原料' + this.meterialName; return item.name !== this.meterialName + '成本';
}) // 兜底累计数据 }) // 兜底累计数据
} }
this.trend = res.data.dataTrend this.trend = res.data.dataTrend

View File

@@ -108,7 +108,7 @@ export default {
totalData: {}, totalData: {},
trend: [], trend: [],
relatedData: {}, relatedData: {},
trendName: '原片原料成本', trendName: '原片原料',
// monthRelatedData: [], // monthRelatedData: [],
// totalRelatedData: [], // totalRelatedData: [],
}; };

View File

@@ -84,7 +84,7 @@ export default {
overheadName:'', overheadName:'',
overheadOptions:[ overheadOptions:[
{value:'包材',label:'包材'}, {value:'包材',label:'包材'},
{value:'备品丶机物料',label:'备品丶机物料'}, {value:'备件、机物料',label:'备件、机物料'},
{value:'折旧',label:'折旧'}, {value:'折旧',label:'折旧'},
{value:'其他',label:'其他'} {value:'其他',label:'其他'}
] ]

View File

@@ -39,7 +39,7 @@
grid-template-columns: 1624px; grid-template-columns: 1624px;
"> ">
<!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> --> <!-- <monthlyRelatedMetrics :itemData="renderList" :title="'月度·相关指标分析'" /> -->
<relateSingleFuelCostAnalysis :relatedData="relatedData" :title="'相关指标分析'" /> <relateSingleFuelCostAnalysis :fuelName='fuelName' :relatedData="relatedData" :title="'相关指标分析'" />
</div> </div>
</div> </div>
@@ -213,7 +213,7 @@ export default {
// index: this.index, // index: this.index,
// sort: 1, // sort: 1,
trendName: this.trendName, trendName: this.trendName,
analysisObject: [this.fuelName + '成本'], analysisObject: [this.fuelName],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'], // paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory, levelId: this.factory,
// baseId: Number(this.factory), // baseId: Number(this.factory),

View File

@@ -211,7 +211,7 @@ export default {
// index: this.index, // index: this.index,
// sort: 1, // sort: 1,
trendName: this.trendName, trendName: this.trendName,
analysisObject: [this.fuelName + '成本'], analysisObject: [this.fuelName],
// paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'], // paramList: ['制造成本', '财务费用', '销售费用', '管理费用', '运费'],
levelId: this.factory, levelId: this.factory,
// baseId: Number(this.factory), // baseId: Number(this.factory),

View File

@@ -90,6 +90,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:'元/㎡',
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {

View File

@@ -35,7 +35,7 @@
<div class="dropdown-options" v-if="isDropdownShow"> <div class="dropdown-options" v-if="isDropdownShow">
<div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index" <div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index"
@click.stop="selectProfit(item)"> @click.stop="selectProfit(item)">
{{ item }} {{ item.name }}
</div> </div>
</div> </div>
</div> </div>
@@ -61,12 +61,22 @@ export default {
return { return {
isDropdownShow: false, isDropdownShow: false,
selectedProfit: '天然气', // 选中的名称初始为null selectedProfit: '天然气', // 选中的名称初始为null
profitOptions: [ profitOptions: [{
'天然气', name: '天然气',
'LNG液化天然气', unit:'元/㎡',
'重油', },
'水', {
] name: 'LNG液化天然气',
unit:'元/㎡',
},
{
name: '重油',
unit:'元/㎡',
},
{
name: '水',
unit:'元/㎡',
}],
}; };
}, },
computed: { computed: {
@@ -88,6 +98,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:'元/㎡',
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {
@@ -246,9 +257,10 @@ export default {
}, },
methods: { methods: {
selectProfit(item) { selectProfit(item) {
this.selectedProfit = item; this.selectedProfit = item.name;
this.unit = item.unit;
this.isDropdownShow = false; this.isDropdownShow = false;
this.$emit('handleGetItemData', item) this.$emit('handleGetItemData', item.name)
} }
}, },
}; };

View File

@@ -64,7 +64,7 @@ export default {
profitOptions: [ profitOptions: [
'原片制造费用成本', '原片制造费用成本',
'包材', '包材',
'备品丶机物料', '备件、机物料',
'折旧', '折旧',
'其他', '其他',
] ]

View File

@@ -60,9 +60,9 @@ export default {
data() { data() {
return { return {
isDropdownShow: false, isDropdownShow: false,
selectedProfit: '原片原料成本', // 选中的名称初始为null selectedProfit: '原片原料', // 选中的名称初始为null
profitOptions: [ profitOptions: [
'原片原料成本', '原片原料',
'硅砂', '硅砂',
'海砂', '海砂',
'纯碱', '纯碱',
@@ -90,6 +90,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:'元/㎡',
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {

View File

@@ -63,7 +63,7 @@ export default {
selectedProfit: '制造费用', // 选中的名称初始为null selectedProfit: '制造费用', // 选中的名称初始为null
profitOptions: [ profitOptions: [
'制造费用', '制造费用',
'备品丶机物料', '备件、机物料',
'折旧', '折旧',
'其他', '其他',
] ]

View File

@@ -87,6 +87,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:'元/㎡',
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {

View File

@@ -35,7 +35,7 @@
<div class="dropdown-options" v-if="isDropdownShow"> <div class="dropdown-options" v-if="isDropdownShow">
<div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index" <div class="dropdown-option" v-for="(item, index) in profitOptions" :key="index"
@click.stop="selectProfit(item)"> @click.stop="selectProfit(item)">
{{ item }} {{ item.name }}
</div> </div>
</div> </div>
</div> </div>
@@ -61,12 +61,23 @@ export default {
return { return {
isDropdownShow: false, isDropdownShow: false,
selectedProfit: '采购单价', // 选中的名称初始为null selectedProfit: '采购单价', // 选中的名称初始为null
profitOptions: [ profitOptions: [{
'采购单价', name: '采购单价',
'产量', unit: '元/吨'
'单耗', },
'消耗量', {
] name: '产量',
unit: '吨'
},
{
name: '单耗',
unit: 'kg/㎡'
},
{
name: '消耗量',
unit: '吨'
}],
unit:'元/吨',
}; };
}, },
computed: { computed: {
@@ -88,6 +99,7 @@ export default {
const salesData = { const salesData = {
allPlaceNames: this.locations, allPlaceNames: this.locations,
unit:this.unit,
series: [ series: [
// 1. 完成率(折线图) // 1. 完成率(折线图)
{ {
@@ -247,9 +259,10 @@ export default {
methods: { methods: {
selectProfit(item) { selectProfit(item) {
console.log('aaaaaa',item) console.log('aaaaaa',item)
this.selectedProfit = item; this.selectedProfit = item.name;
this.isDropdownShow = false; this.isDropdownShow = false;
this.$emit('handleGetItemData', item) this.$emit('handleGetItemData', item.name)
this.unit = item.unit;
} }
}, },
}; };

View File

@@ -5,7 +5,7 @@
<div class="kpi-content" style="padding: 14px 16px; display: flex; width: 100%;"> <div class="kpi-content" style="padding: 14px 16px; display: flex; width: 100%;">
<!-- 新增topItem 专属包裹容器统一控制样式和布局原有行内样式不变 --> <!-- 新增topItem 专属包裹容器统一控制样式和布局原有行内样式不变 -->
<div class="topItem-container" style="display: flex; gap: 8px;"> <div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left" @click="handleDashboardClick('备品丶机物料')"> <div class="dashboard left" @click="handleDashboardClick('备件、机物料')">
<div class="title"> <div class="title">
备件机物料·/ 备件机物料·/
</div> </div>
@@ -76,7 +76,7 @@ export default {
computed: { computed: {
// 1. 备件丶机物料数据:精准筛选对应名称数据,兜底值统一 // 1. 备件丶机物料数据:精准筛选对应名称数据,兜底值统一
sparePartsData() { sparePartsData() {
return this.relatedData.find(item => (item.name || '').includes('备品丶机物料')) || { return this.relatedData.find(item => (item.name || '').includes('备件、机物料')) || {
targetValue: 0, targetValue: 0,
value: 0, value: 0,
completed: 0, completed: 0,

View File

@@ -7,28 +7,28 @@
<div class="topItem-container" style="display: flex; gap: 8px;"> <div class="topItem-container" style="display: flex; gap: 8px;">
<!-- 天然气组件绑定对应筛选数据点击传递物料名和路由 --> <!-- 天然气组件绑定对应筛选数据点击传递物料名和路由 -->
<div class="dashboard left" @click="handleDashboardClick('天然气', 'singleCombustible')"> <div class="dashboard left" @click="handleDashboardClick('天然气', 'singleCombustible')">
<div class="title">天然气·/</div> <div class="title">天然气·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="naturalGasData"></operatingSingleBar> <operatingSingleBar :detailData="naturalGasData"></operatingSingleBar>
</div> </div>
</div> </div>
<!-- LNG液化天然气组件绑定对应筛选数据 --> <!-- LNG液化天然气组件绑定对应筛选数据 -->
<div class="dashboard right" @click="handleDashboardClick('LNG液化天然气', 'singleCombustible')"> <div class="dashboard right" @click="handleDashboardClick('LNG液化天然气', 'singleCombustible')">
<div class="title">LNG液化天然气·/</div> <div class="title">LNG液化天然气·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="lngData"></operatingSingleBar> <operatingSingleBar :detailData="lngData"></operatingSingleBar>
</div> </div>
</div> </div>
<!-- 重油组件绑定对应筛选数据 --> <!-- 重油组件绑定对应筛选数据 -->
<div class="dashboard right" @click="handleDashboardClick('重油', 'singleCombustible')"> <div class="dashboard right" @click="handleDashboardClick('重油', 'singleCombustible')">
<div class="title">重油·/</div> <div class="title">重油·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="heavyOilData"></operatingSingleBar> <operatingSingleBar :detailData="heavyOilData"></operatingSingleBar>
</div> </div>
</div> </div>
<!-- 水组件绑定对应筛选数据 --> <!-- 水组件绑定对应筛选数据 -->
<div class="dashboard right" @click="handleDashboardClick('水', 'singleCombustible')"> <div class="dashboard right" @click="handleDashboardClick('水', 'singleCombustible')">
<div class="title">·/</div> <div class="title">·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="waterData"></operatingSingleBar> <operatingSingleBar :detailData="waterData"></operatingSingleBar>
</div> </div>

View File

@@ -15,7 +15,7 @@
<operatingSingleBar :detailData="packagingData"></operatingSingleBar> <operatingSingleBar :detailData="packagingData"></operatingSingleBar>
</div> </div>
</div> </div>
<div class="dashboard right" @click="handleDashboardClick('备品丶机物料')"> <div class="dashboard right" @click="handleDashboardClick('备件、机物料')">
<div class="title"> <div class="title">
备件机物料·/ 备件机物料·/
</div> </div>
@@ -110,7 +110,7 @@ export default {
}, },
// 2. 备件丶机物料数据:精准筛选 // 2. 备件丶机物料数据:精准筛选
sparePartsData() { sparePartsData() {
return this.activeData.find(item => (item.name || '').includes('备品丶机物料')) || { return this.activeData.find(item => (item.name || '').includes('备件、机物料')) || {
targetValue: 0, targetValue: 0,
value: 0, value: 0,
completed: 0, completed: 0,

View File

@@ -13,12 +13,12 @@
</div> </div>
</div> </div>
<!-- 2. 海砂组件传递对应筛选数据 --> <!-- 2. 海砂组件传递对应筛选数据 -->
<div class="dashboard right" @click="handleDashboardClick('海砂', 'SIMFRMCostAnalysis')"> <!-- <div class="dashboard right" @click="handleDashboardClick('海砂', 'SIMFRMCostAnalysis')">
<div class="title">海砂·/</div> <div class="title">海砂·/</div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="seaSandData"></operatingSingleBar> <operatingSingleBar :detailData="seaSandData"></operatingSingleBar>
</div> </div>
</div> </div> -->
<!-- 3. 纯碱组件传递对应筛选数据 --> <!-- 3. 纯碱组件传递对应筛选数据 -->
<div class="dashboard right" @click="handleDashboardClick('纯碱', 'SIMFRMCostAnalysis')"> <div class="dashboard right" @click="handleDashboardClick('纯碱', 'SIMFRMCostAnalysis')">
<div class="title">纯碱·/</div> <div class="title">纯碱·/</div>
@@ -203,7 +203,7 @@ export default {
} }
.dashboard { .dashboard {
width: 310px; width: 390px;
height: 205px; height: 205px;
background: #F9FCFF; background: #F9FCFF;
padding: 16px 0 0 10px; padding: 16px 0 0 10px;

View File

@@ -8,7 +8,7 @@
<div class="topItem-container" style="display: flex; gap: 8px;"> <div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left"> <div class="dashboard left">
<div class="title"> <div class="title">
采购单价·/ 采购单价·{{fuelName=='天然气'||fuelName=='LNG液化天然气'||fuelName=='水'?'元/m³':'万元'}}
</div> </div>
<div class="line"> <div class="line">
<!-- 绑定对应数据新增数据绑定样式不变 --> <!-- 绑定对应数据新增数据绑定样式不变 -->
@@ -83,6 +83,10 @@ export default {
type: String, type: String,
default: '' // 默认空字符串,保持原有配置 default: '' // 默认空字符串,保持原有配置
}, },
fuelName:{
type: String,
default: ''
}
}, },
data() { data() {
return { return {

View File

@@ -24,7 +24,7 @@
</div> </div>
<div class="dashboard right"> <div class="dashboard right">
<div class="title"> <div class="title">
单耗· 单耗·kg/
</div> </div>
<div class="line"> <div class="line">
<operatingSingleBar :detailData="unitHaoData"></operatingSingleBar> <operatingSingleBar :detailData="unitHaoData"></operatingSingleBar>

View File

@@ -5,7 +5,7 @@
<div class="kpi-content" style="padding: 14px 16px; display: flex; width: 100%;"> <div class="kpi-content" style="padding: 14px 16px; display: flex; width: 100%;">
<!-- 新增topItem 专属包裹容器统一控制样式和布局原有行内样式不变 --> <!-- 新增topItem 专属包裹容器统一控制样式和布局原有行内样式不变 -->
<div class="topItem-container" style="display: flex; gap: 8px;"> <div class="topItem-container" style="display: flex; gap: 8px;">
<div class="dashboard left" @click="handleDashboardClick('备品丶机物料')"> <div class="dashboard left" @click="handleDashboardClick('备件、机物料')">
<div class="title"> <div class="title">
备件机物料·/ 备件机物料·/
</div> </div>
@@ -76,7 +76,7 @@ export default {
computed: { computed: {
// 1. 备件丶机物料数据:精准筛选对应名称数据,兜底值统一 // 1. 备件丶机物料数据:精准筛选对应名称数据,兜底值统一
sparePartsData() { sparePartsData() {
return this.relatedData.find(item => (item.name || '').includes('备品丶机物料')) || { return this.relatedData.find(item => (item.name || '').includes('备件、机物料')) || {
targetValue: 0, targetValue: 0,
value: 0, value: 0,
completed: 0, completed: 0,

View File

@@ -167,8 +167,8 @@ export default {
mobileCodeTimer: 0, mobileCodeTimer: 0,
loginForm: { loginForm: {
loginType: 'uname', loginType: 'uname',
username: 'admin', username: '',//admin
password: 'admin123', password: '',//admin123
captchaVerification: '', captchaVerification: '',
mobile: '', mobile: '',
mobileCode: '', mobileCode: '',

View File

@@ -135,9 +135,9 @@ export default {
mounted() { mounted() {
let timeArr = [] let timeArr = []
if (this.$route.query.startTime && this.$route.query.endTime) { if (this.$route.query.startTime && this.$route.query.endTime) {
timeArr = [moment(Number(this.$route.query.startTime)).format('YYYY-MM'), moment(Number(this.$route.query.endTime)).format('YYYY-MM')] timeArr = [moment(Number(this.$route.query.startTime)).format('YYYY-MM-DD'), moment(Number(this.$route.query.endTime)).format('YYYY-MM-DD')]
}else{ }else{
timeArr = [moment().startOf('month').format('YYYY-MM'), moment().endOf('month').format('YYYY-MM')] timeArr = [moment().startOf('month').format('YYYY-MM-DD'), moment().endOf('month').format('YYYY-MM-DD')]
}; };
this.$refs.searchBarForm.formInline.timeValMonth = timeArr this.$refs.searchBarForm.formInline.timeValMonth = timeArr
this.listQuery.startTime = moment(timeArr[0]).startOf('day').valueOf(); this.listQuery.startTime = moment(timeArr[0]).startOf('day').valueOf();
@@ -195,8 +195,8 @@ export default {
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 20; this.listQuery.pageSize = 20;
this.listQuery.status = val.status ? val.status : undefined; this.listQuery.status = val.status ? val.status : undefined;
this.listQuery.startTime = moment(val.timeValMonth[0]).startOf('day').valueOf(); this.listQuery.startTime = moment(moment(val.timeValMonth[0]).startOf('month').format('YYYY-MM-DD')).startOf('day').valueOf();
this.listQuery.endTime = moment(val.timeValMonth[1]).endOf('day').valueOf(); this.listQuery.endTime = moment(moment(val.timeValMonth[1]).endOf('month').format('YYYY-MM-DD')).endOf('day').valueOf();
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.getDataList(); this.getDataList();