Compare commits

..

No commits in common. "af52db4a37a564f69a579be7359000e42886b9ad" and "d5673f3c9f75da970612f6a56caf8775e155012d" have entirely different histories.

40 changed files with 479 additions and 702 deletions

View File

@ -92,7 +92,7 @@ const actions = {
/** 初始化首页数据 */ /** 初始化首页数据 */
async initHome({ commit }) { async initHome({ commit }) {
const dataArr = await getHomeInfo(); const dataArr = await getHomeInfo();
// console.log('dataArr', dataArr); console.log('dataArr', dataArr);
let preData = dataArr.previousProdOutputOutDO let preData = dataArr.previousProdOutputOutDO
let preFtoData = dataArr.previousProdOutputFtoDO let preFtoData = dataArr.previousProdOutputFtoDO
// const targetArr = await getHomeInfo(); // const targetArr = await getHomeInfo();
@ -127,7 +127,7 @@ const actions = {
// const payload = handler(factoryData) // const payload = handler(factoryData)
// commit("SET_COPILOT_INFO", { type, payload }); // commit("SET_COPILOT_INFO", { type, payload });
// } else { // } else {
// console.log('factoryList',factoryList) console.log('factoryList',factoryList)
let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO
let preData = factoryList.previousProdOutputOutDO ? factoryList.previousProdOutputOutDO : factoryList.previousProdOutputRateDO let preData = factoryList.previousProdOutputOutDO ? factoryList.previousProdOutputOutDO : factoryList.previousProdOutputRateDO
let preFtoData = factoryList.previousProdOutputFtoDO ? factoryList.previousProdOutputFtoDO : [] let preFtoData = factoryList.previousProdOutputFtoDO ? factoryList.previousProdOutputFtoDO : []
@ -289,7 +289,7 @@ function splitCurrentAndPreviousB(factoryListResponse) {
} }
function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) { function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
// console.log('工厂',preData); console.log('工厂',preData);
// 初始数据 // 初始数据
const { chipOeeRate, transformRate, chipRate, stdRate } = initA(); const { chipOeeRate, transformRate, chipRate, stdRate } = initA();
@ -346,7 +346,7 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
if (preData) { if (preData) {
for (const factory of preData) { for (const factory of preData) {
const fId = getPreFactoryId(factory) const fId = getPreFactoryId(factory)
// console.log('factory',factory.previousYearOee); console.log('factory',factory.previousYearOee);
// chipInvest.previous[fId] = factory.previousYearInputNumber; // chipInvest.previous[fId] = factory.previousYearInputNumber;
// chipOeeRate.current[fId] = factory.oee; // chipOeeRate.current[fId] = factory.oee;
if (factory.previousGlassType === 0) { if (factory.previousGlassType === 0) {
@ -400,7 +400,7 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
_t.current[fId] = factory.yieldRate ; _t.current[fId] = factory.yieldRate ;
// _t.previous[fId] = factory.previousYearYieldRate ; // _t.previous[fId] = factory.previousYearYieldRate ;
} }
// console.log('chipOeeRate',stdRate); console.log('chipOeeRate',stdRate);
// console.log('chipOeeRate',chipOeeRate); // console.log('chipOeeRate',chipOeeRate);
return { return {
chipOeeRate, chipOeeRate,
@ -412,12 +412,12 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
} }
function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) { function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
// console.log('prodOutputFtoListRes',preFtoData); console.log('prodOutputFtoListRes',preFtoData);
// 初始数据 // 初始数据
const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init() const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init()
if (prodOutputFtoListRes.length !== 0 ) { if (prodOutputFtoListRes.length !== 0 ) {
for (const factory of prodOutputFtoListRes) { for (const factory of prodOutputFtoListRes) {
// console.log(factory); console.log(factory);
const fId = getFactoryId(factory); const fId = getFactoryId(factory);
// const preFId = getPreFactoryId(factory); // const preFId = getPreFactoryId(factory);
// if (fId) { // if (fId) {
@ -430,7 +430,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
} }
if (preFtoData) { if (preFtoData) {
for (const factory of preFtoData) { for (const factory of preFtoData) {
// console.log(factory); console.log(factory);
const fId = getPreFactoryId(factory); const fId = getPreFactoryId(factory);
// const preFId = getPreFactoryId(factory); // const preFId = getPreFactoryId(factory);
// if (fId) { // if (fId) {
@ -463,7 +463,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
if (factoryListResponse) { if (factoryListResponse) {
for (const factory of factoryListResponse) { for (const factory of factoryListResponse) {
const fId = getFactoryId(factory); const fId = getFactoryId(factory);
// console.log('factory.inputNumber', factory, fId); console.log('factory.inputNumber', factory, fId);
if (factory.glassType === 0) { if (factory.glassType === 0) {
chipInvest.current[fId] = factory.inputNumber chipInvest.current[fId] = factory.inputNumber
} }
@ -484,7 +484,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType]; const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType];
_t.current[fId] = factory.outputNumber; _t.current[fId] = factory.outputNumber;
} }
// console.log('chipInvest',ftoInvest); console.log('chipInvest',ftoInvest);
return { return {
chipInvest, chipInvest,
// ftoInvest, // ftoInvest,

View File

@ -8,7 +8,9 @@
<template> <template>
<div class="copilot-container"> <div class="copilot-container">
<!-- refresh btn --> <!-- refresh btn -->
<button v-if="0" style=" <button
v-if="0"
style="
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
@ -18,11 +20,22 @@
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
" @click="$emit('refresh')"> "
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" @click="$emit('refresh')"
style="width: 24px; height: 24px"> >
<path stroke-linecap="round" stroke-linejoin="round" <svg
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /> xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg> </svg>
</button> </button>
<!-- decoration --> <!-- decoration -->
@ -31,13 +44,19 @@
<div v-if="side == 'left'" class="corner bl"></div> <div v-if="side == 'left'" class="corner bl"></div>
<div v-if="side == 'right'" class="corner br"></div> <div v-if="side == 'right'" class="corner br"></div>
<!-- content --> <!-- content -->
<div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"> <div
<Icon style="margin-left: 16px;" :icon="icon"></Icon> class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div class="container-body" :class="[ <div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"> ]"
>
<slot /> <slot />
</div> </div>
</div> </div>

View File

@ -12,7 +12,7 @@
<div class="page-title">{{ companyName }}</div> <div class="page-title">{{ companyName }}</div>
<section class="menu2"> <section class="menu2">
<div class="btn-group"> <div class="btn-group">
<el-tooltip v-if="showPeriod" class="item" effect="dark" content="导出" placement="top"> <el-tooltip class="item" effect="dark" content="导出" placement="top">
<button type="button" class="export-btn" @click="handleExport" /> <button type="button" class="export-btn" @click="handleExport" />
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="isFullscreen === false ? '退出全屏' : '全屏'" placement="top"> <el-tooltip class="item" effect="dark" :content="isFullscreen === false ? '退出全屏' : '全屏'" placement="top">
@ -48,20 +48,10 @@ export default {
type: String, type: String,
}, },
}, },
watch: {
period(val) {
if (val != 1) {
this.showPeriod = true
} else {
this.showPeriod = false
}
}
},
data() { data() {
return { return {
isFullscreen: false, isFullscreen: false,
content: '全屏', content:'全屏',
showPeriod:false,
dataList: [ dataList: [
{ id: 1, name: "日" }, { id: 1, name: "日" },
{ id: 2, name: "周" }, { id: 2, name: "周" },
@ -73,8 +63,7 @@ export default {
computed: {}, computed: {},
methods: { methods: {
handleExport() { handleExport() {
// if (this.period != 1) { if (this.period != 1) {
this.showPeriod = true
exportFactoryDataExcel({ exportFactoryDataExcel({
factoryId: this.companyId, factoryId: this.companyId,
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3, timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
@ -83,9 +72,12 @@ export default {
this.$download.excel(response, `${this.companyName}生产数据.xls`); this.$download.excel(response, `${this.companyName}生产数据.xls`);
// this.exportLoading = false; // this.exportLoading = false;
}).catch(() => { }); }).catch(() => { });
// } else { } else {
// this.showPeriod = false this.$message({
// } type: 'warning',
message: '为日的情况下没有导出功能',
})
}
}, },
toggleFullScreen() { toggleFullScreen() {

View File

@ -8,7 +8,9 @@
<template> <template>
<div class="copilot-container"> <div class="copilot-container">
<!-- refresh btn --> <!-- refresh btn -->
<button v-if="false" style=" <button
v-if="false"
style="
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
@ -18,26 +20,43 @@
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
" @click="$emit('refresh')"> "
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" @click="$emit('refresh')"
style="width: 24px; height: 24px"> >
<path stroke-linecap="round" stroke-linejoin="round" <svg
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /> xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg> </svg>
</button> </button>
<!-- decoration --> <!-- decoration -->
<div class="corner tl"></div> <div class="corner tl"></div>
<div class="corner tr"></div> <div class="corner tr"></div>
<div class="corner bl"></div> <div class="corner bl"></div>
<div class="corner br"></div> <div class="corner br"></div>
<!-- content --> <!-- content -->
<div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"> <div
<Icon style="margin-left: 16px;" :icon="icon"></Icon> class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div class="container-body" :class="[ <div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"> ]"
>
<slot /> <slot />
</div> </div>
</div> </div>

View File

@ -8,7 +8,9 @@
<template> <template>
<div class="copilot-container"> <div class="copilot-container">
<!-- refresh btn --> <!-- refresh btn -->
<button v-if="false" style=" <button
v-if="false"
style="
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
@ -18,26 +20,43 @@
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
" @click="$emit('refresh')"> "
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" @click="$emit('refresh')"
style="width: 24px; height: 24px"> >
<path stroke-linecap="round" stroke-linejoin="round" <svg
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /> xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg> </svg>
</button> </button>
<!-- decoration --> <!-- decoration -->
<div class="corner tl"></div> <div class="corner tl"></div>
<div class="corner tr"></div> <div class="corner tr"></div>
<div class="corner bl"></div> <div class="corner bl"></div>
<div class="corner br"></div> <div class="corner br"></div>
<!-- content --> <!-- content -->
<div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"> <div
<Icon style="margin-left: 16px;" :icon="icon"></Icon> class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div class="container-body" :class="[ <div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"> ]"
>
<slot /> <slot />
</div> </div>
</div> </div>

View File

@ -55,7 +55,7 @@
class="container-head" class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
> >
<Icon :icon="icon"></Icon> <Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div <div

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-07 10:04:53 * @Date: 2024-05-07 10:04:53
* @LastEditTime: 2024-07-01 12:27:45 * @LastEditTime: 2024-06-05 09:45:47
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -102,12 +102,12 @@ export default {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20px; gap: 16px;
} }
.flex { .flex {
display: flex; display: flex;
gap: 20px; gap: 16px;
flex: 1; flex: 1;
} }

View File

@ -23,12 +23,12 @@ export default ({
textAlign: "center", textAlign: "center",
textStyle: { textStyle: {
fontWeight: 600, fontWeight: 600,
fontSize: 36, fontSize: 26,
color: "#fffd", color: "#fffd",
}, },
subtext: `\u2002${yesterday + '日良率'}\u2002`, subtext: `\u2002${yesterday + '日良率'}\u2002`,
subtextStyle: { subtextStyle: {
fontSize: 16, fontSize: 14,
fontWeight: 100, fontWeight: 100,
color: "#fffd", color: "#fffd",
align: "right", align: "right",

View File

@ -55,35 +55,13 @@ export default {
options: { options: {
color: ["#FFD160", "#2760FF", "#12FFF5"], color: ["#FFD160", "#2760FF", "#12FFF5"],
grid: { grid: {
left: "6%", left: "7%",
right: "3%", right: "7%",
bottom: "15%", bottom: "15%",
top: "15%", top: "15%",
}, },
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
backgroundColor: '#001829',
borderColor: '#001829',
formatter: params => {
console.log('params', params)
var res = ``;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:14px;'>${params[0].axisValueLabel}</span>` +
`<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value + '片'}</span>`;
}
return res;
},
}, },
xAxis: { xAxis: {
axisTick: { axisTick: {
@ -418,11 +396,11 @@ export default {
this.chart.dispose(); this.chart.dispose();
} }
this.chart = echarts.init(document.getElementById("factoryEnergyChart")); this.chart = echarts.init(document.getElementById("factoryEnergyChart"));
// const actualOptions = JSON.parse(JSON.stringify(this.options)); const actualOptions = JSON.parse(JSON.stringify(this.options));
this.options.xAxis.data = this.orderXAxis; actualOptions.xAxis.data = this.orderXAxis;
this.options.series[0].data = this.data; actualOptions.series[0].data = this.data;
// this.actualOptions = actualOptions; this.actualOptions = actualOptions;
this.chart.setOption(this.options); this.chart.setOption(actualOptions);
}, },
}, },
}; };

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-30 08:58:39 * @Date: 2024-05-30 08:58:39
* @LastEditTime: 2024-07-02 10:53:34 * @LastEditTime: 2024-06-07 09:29:45
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -62,59 +62,7 @@ export default {
top: "15%", top: "15%",
containLabel: true, containLabel: true,
}, },
// tooltip: { tooltip: {},
// trigger: "axis",
// axisPointer: {
// // type: "cross",
// crossStyle: {
// color: "rgba(237,237,237,0.5)",
// },
// },
// extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
// backgroundColor: '#001829',
// borderColor: '#001829',
// // textStyle: {
// // color:'rgba(255, 255, 255, 0.85)'
// // },
// formatter: params => {
// console.log('params', params)
// var res = `<span style='color:rgba(255,255,255,0.85)'>${params[0].axisValueLabel}</span>`;
// for (var i = 0, l = params.length; i < l; i++) {
// res +=
// "<br/>" +
// `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
// `<span style='display:inline-block;width:150px;color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].seriesName}</span>` +
// `<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value}</span>`;
// }
// return res;
// },
// },
tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
backgroundColor: '#001829',
borderColor: '#001829',
formatter: params => {
console.log('params', params)
var res = `<span style='color:rgba(255,255,255,0.85)'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
"<br/>" +
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value + '片'}</span>`;
}
return res;
},
},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@ -253,12 +201,12 @@ export default {
}, },
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) { isFullscreen(val) {
this.options.series.map((item) => { this.actualOptions.series.map((item) => {
item.barWidth = val ? 18 : 12; item.barWidth = val ? 18 : 12;
}); });
this.options.xAxis.axisLabel.fontSize = val ? 18 : 12; this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
this.options.yAxis.axisLabel.fontSize = val ? 18 : 12; this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 12; this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
// if (val === false && this.isOpen === true) { // if (val === false && this.isOpen === true) {
// console.log(val) // console.log(val)
// this.width = 97 + '%' // this.width = 97 + '%'
@ -273,7 +221,7 @@ export default {
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initChart(this.options) this.initChart(this.actualOptions)
this.canvasReset() this.canvasReset()
}, },
series(val) { series(val) {
@ -283,17 +231,16 @@ export default {
} }
// console.log('val', val) // console.log('val', val)
const actualOptions = JSON.parse(JSON.stringify(this.options)) const actualOptions = JSON.parse(JSON.stringify(this.options))
console.log(actualOptions);
// actualOptions.xAxis.data = val // actualOptions.xAxis.data = val
console.log(actualOptions) console.log(actualOptions)
this.options.series[0].data = val[0].data; actualOptions.series[0].data = val[0].data;
this.options.series[0].name = val[0].name; actualOptions.series[0].name = val[0].name;
this.options.series[1].data = val?.[1]?.data; actualOptions.series[1].data = val?.[1]?.data;
this.options.series[1].name = val?.[1]?.name; actualOptions.series[1].name = val?.[1]?.name;
this.options.series[2].data = val?.[2]?.data || []; actualOptions.series[2].data = val?.[2]?.data || [];
this.options.series[2].name = val?.[2]?.name || ""; actualOptions.series[2].name = val?.[2]?.name || "";
this.actualOptions = actualOptions; this.actualOptions = actualOptions;
this.initChart(this.options); this.initChart(actualOptions);
}, },
}, },
mounted() { mounted() {
@ -330,7 +277,7 @@ export default {
this.chart.dispose(); this.chart.dispose();
} }
this.chart = echarts.init(this.$refs.oeeChart); this.chart = echarts.init(this.$refs.oeeChart);
this.chart.setOption(this.options); this.chart.setOption(this.actualOptions);
}, },
}, },
}; };
@ -342,8 +289,8 @@ export default {
.legend { .legend {
position: absolute; position: absolute;
top: 3vh; top: 5.2vh;
right: 13vw; right: 1vw;
} }
.legend-item { .legend-item {
@ -400,8 +347,4 @@ export default {
transform: translateY(-50%) translateX(50%); transform: translateY(-50%) translateX(50%);
} }
} }
.echarts-tooltip-dark {
background: #001829;
}
</style> </style>

View File

@ -8,7 +8,7 @@
<span class="title">工单情况</span> <span class="title">工单情况</span>
<span class="line"></span> <span class="line"></span>
</div> </div>
<div class="button-type" style="margin-left: auto;position: absolute;right: 3%;top: 57%;z-index: 999;"> <div class="button-type" style="margin-left: auto;position: absolute;right: 1%;top: 57%;z-index: 999;">
<CopilotButton v-for="i in ['目标产量', '计划投入', '实际投入', '实际产出', '废品数量', '待再加工']" :key="i" :label="i" <CopilotButton v-for="i in ['目标产量', '计划投入', '实际投入', '实际产出', '废品数量', '待再加工']" :key="i" :label="i"
:active="i === type" @click="() => $emit('update:type', i)" /> :active="i === type" @click="() => $emit('update:type', i)" />
</div> </div>
@ -188,7 +188,7 @@ export default {
height: 1px; // display: inline-block; height: 1px; // display: inline-block;
border: 1px solid; border: 1px solid;
// display: inline-block; // display: inline-block;
border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 0%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%, ) 2 2; border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%, ) 2 2;
backdrop-filter: blur(3px); backdrop-filter: blur(3px);
} }
} }

View File

@ -28,8 +28,8 @@
<div> <div>
<span class="type">良品数量</span> <span class="type">良品数量</span>
<span class="type-name">{{ <span class="type-name">{{
msgObj.stand.goodNumber ? msgObj.stand.goodNumber.toLocaleString() : 0 msgObj.stand.goodNumber ? msgObj.stand.goodNumber.toLocaleString() : 0
}}</span> }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -38,8 +38,8 @@
<div> <div>
<span class="type">生产数量</span> <span class="type">生产数量</span>
<span class="num">{{ <span class="num">{{
msgObj.stand.outputNumber ? msgObj.stand.outputNumber.toLocaleString() : 0 msgObj.stand.outputNumber ? msgObj.stand.outputNumber.toLocaleString() : 0
}}</span> }}</span>
</div> </div>
<div> <div>
<span class="type1">良品率</span> <span class="type1">良品率</span>
@ -61,8 +61,8 @@
<div> <div>
<span class="type">良品数量</span> <span class="type">良品数量</span>
<span class="type-name">{{ <span class="type-name">{{
msgObj.chip.goodNumber ? msgObj.chip.goodNumber.toLocaleString() : 0 msgObj.chip.goodNumber ? msgObj.chip.goodNumber.toLocaleString() : 0
}}</span> }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -71,8 +71,8 @@
<div> <div>
<span class="type">生产数量</span> <span class="type">生产数量</span>
<span class="num">{{ <span class="num">{{
msgObj.chip.outputNumber ? msgObj.chip.outputNumber.toLocaleString() : 0 msgObj.chip.outputNumber ? msgObj.chip.outputNumber.toLocaleString() : 0
}}</span> }}</span>
</div> </div>
<div> <div>
<span class="type1">良品率</span> <span class="type1">良品率</span>
@ -94,8 +94,8 @@
<div> <div>
<span class="type">良品数量</span> <span class="type">良品数量</span>
<span class="type-name">{{ <span class="type-name">{{
msgObj.bipv.goodNumber ? msgObj.bipv.goodNumber.toLocaleString() : 0 msgObj.bipv.goodNumber ? msgObj.bipv.goodNumber.toLocaleString() : 0
}}</span> }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -104,8 +104,8 @@
<div> <div>
<span class="type">生产数量</span> <span class="type">生产数量</span>
<span class="num">{{ <span class="num">{{
msgObj.bipv.outputNumber ? msgObj.bipv.outputNumber.toLocaleString() : 0 msgObj.bipv.outputNumber ? msgObj.bipv.outputNumber.toLocaleString() : 0
}}</span> }}</span>
</div> </div>
<div> <div>
<span class="type1">良品率</span> <span class="type1">良品率</span>
@ -118,11 +118,7 @@
<div class="chart"> <div class="chart">
<div class="chart-title"> <div class="chart-title">
<span class="title">生产情况</span> <span class="title">生产情况</span>
<div class="button-than" style="position: absolute;right: 3%;"> <span class="line"></span>
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
@click="() => $emit('update:than', i)" />
</div>
<!-- <span class="line"></span> -->
</div> </div>
<barChartBase :companyId="companyId" :than="than" :period="period" :data="factoryData" ref="barChart" <barChartBase :companyId="companyId" :than="than" :period="period" :data="factoryData" ref="barChart"
style="height: 0;flex:1"> style="height: 0;flex:1">
@ -133,12 +129,10 @@
<script> <script>
import { number } from 'echarts'; import { number } from 'echarts';
import barChartBase from './ChipOee' import barChartBase from './ChipOee'
import CopilotButton from "./button.vue"
export default { export default {
name: "ProdMonitor", name: "ProdMonitor",
components: { components: {
barChartBase, barChartBase,
CopilotButton
}, },
data() { data() {
return { return {
@ -159,9 +153,6 @@ export default {
type: Number, type: Number,
default:0 default:0
}, },
than: {
type: String,
},
than: { than: {
type: String, type: String,
default: '同比', default: '同比',
@ -190,13 +181,6 @@ export default {
}, },
mounted() { mounted() {
this.makeData(); this.makeData();
this.$nextTick(() => {
let button = document.getElementsByClassName('button-than')
console.log(button);
button[0].children[0].style.borderRadius = '4px 0 0 4px'
button[0].children[1].style.borderRadius = '0px 4px 4px 0'
console.log(button[0].children[0].style);
})
}, },
methods: { methods: {
makeData() { makeData() {
@ -253,15 +237,15 @@ export default {
font-style: normal; font-style: normal;
display: inline-block; display: inline-block;
} }
// .line{ .line{
// flex: 1; flex: 1;
// // width: 80%; // width: 80%;
// height: 1px; // display: inline-block; height: 1px; // display: inline-block;
// border: 1px solid; border: 1px solid;
// // display: inline-block; // display: inline-block;
// border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%,) 2 2; border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%,) 2 2;
// backdrop-filter: blur(3px); backdrop-filter: blur(3px);
// } }
} }
} }
.data{ .data{

View File

@ -15,7 +15,9 @@
<template> <template>
<div class="copilot-container"> <div class="copilot-container">
<!-- refresh btn --> <!-- refresh btn -->
<button v-if="false" style=" <button
v-if="false"
style="
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
@ -25,26 +27,43 @@
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
" @click="$emit('refresh')"> "
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" @click="$emit('refresh')"
style="width: 24px; height: 24px"> >
<path stroke-linecap="round" stroke-linejoin="round" <svg
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /> xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg> </svg>
</button> </button>
<!-- decoration --> <!-- decoration -->
<div class="corner tl"></div> <div class="corner tl"></div>
<div class="corner tr"></div> <div class="corner tr"></div>
<div class="corner bl"></div> <div class="corner bl"></div>
<div class="corner br"></div> <div class="corner br"></div>
<!-- content --> <!-- content -->
<div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"> <div
<Icon style="margin-left: 16px;" :icon="icon"></Icon> class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div class="container-body" :class="[ <div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"> ]"
>
<slot /> <slot />
</div> </div>
</div> </div>

View File

@ -33,8 +33,12 @@
<!-- content --> <!-- content -->
<div class="container-head" ref="container-head" <div class="container-head" ref="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"> :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
<Icon :icon="icon"></Icon> <Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
<div class="button-than" style="margin-left: auto;">
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
@click="() => $emit('update:than', i)" />
</div>
</div> </div>
<div class="container-body" :class="[ <div class="container-body" :class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
@ -46,10 +50,12 @@
<script> <script>
import ContainerIconVue from "./ContainerIcon.vue" import ContainerIconVue from "./ContainerIcon.vue"
import CopilotButton from "./button.vue"
export default { export default {
name: "DashboardContainer", name: "DashboardContainer",
components: { components: {
Icon: ContainerIconVue, Icon: ContainerIconVue,
CopilotButton
}, },
props: { props: {
side: { side: {
@ -60,6 +66,9 @@ export default {
type: String, type: String,
default: "cube", default: "cube",
}, },
than: {
type: String,
},
title: { title: {
type: String, type: String,
default: "Default Title", default: "Default Title",
@ -71,7 +80,13 @@ export default {
}, },
computed: {}, computed: {},
mounted() { mounted() {
this.$nextTick(() => {
let button = document.getElementsByClassName('button-than')
console.log(button);
button[0].children[0].style.borderRadius = '4px 0 0 4px'
button[0].children[1].style.borderRadius = '0px 4px 4px 0'
console.log(button[0].children[0].style);
})
}, },
methods: {}, methods: {},
}; };

View File

@ -4,9 +4,9 @@
@update:than="updateThan" @update:period="updatePeriod" /> @update:than="updateThan" @update:period="updatePeriod" />
<div class="factory-section"> <div class="factory-section">
<section class="top flex"> <section class="top flex">
<db-container title="生产监控" icon="prod"> <db-container title="生产监控" icon="prod" @update:than="updateThan" :than="than">
<prod-monitor @update:than="updateThan" :companyId="companyId" :factoryData="factoryData" :than="than" <prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:period="period" :data="data" :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" /> :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container> </db-container>
<left-container title="工单监控" icon="order"> <left-container title="工单监控" icon="order">
<order @update:type="updateType" :type="type" :prodOrder="prodOrder" /> <order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
@ -134,11 +134,11 @@ export default {
if (preData && preData[0] != null) { if (preData && preData[0] != null) {
for (const factory of preData) { for (const factory of preData) {
if (factory.previousGlassType === 0) { if (factory.previousGlassType === 0) {
preDataDetail[1] = factory.previousOutputNumber preDataDetail[1] = factory.previousYearOutputNumber
} else if (factory.previousGlassType === 1) { } else if (factory.previousGlassType === 1) {
preDataDetail[2] = factory.previousOutputNumber preDataDetail[2] = factory.previousYearOutputNumber
} else if (factory.previousGlassType === 2) { } else if (factory.previousYearOutputNumber === 2) {
preDataDetail[3] = factory.previousOutputNumber currentDataDetail[3] = factory.outputNumber
} }
} }
} }

View File

@ -4,9 +4,9 @@
@update:period="updatePeriod" /> @update:period="updatePeriod" />
<div class="factory-section"> <div class="factory-section">
<section class="top flex"> <section class="top flex">
<db-container title="生产监控" icon="prod"> <db-container title="生产监控" icon="prod" @update:than="updateThan" :than="than">
<prod-monitor @update:than="updateThan" :than="than" :companyId="companyId" :factoryData="factoryData" <prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:period="period" :data="data" :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" /> :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container> </db-container>
<left-container title="工单监控" icon="order"> <left-container title="工单监控" icon="order">
<order @update:type="updateType" :type="type" :prodOrder="prodOrder" /> <order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
@ -132,17 +132,16 @@ export default {
// } // }
} }
} }
if (preData) { if (preData && preData[0] != null) {
for (const factory of preData) { for (const factory of preData) {
if (factory.previousGlassType === 0) { if (factory.previousGlassType === 0) {
console.log('factory', factory) preDataDetail[1] = factory.previousYearOutputNumber
preDataDetail[1] = factory.previousOutputNumber
} else if (factory.previousGlassType === 1) { } else if (factory.previousGlassType === 1) {
preDataDetail[2] = factory.previousOutputNumber preDataDetail[2] = factory.previousYearOutputNumber
} }
} }
} }
if (targetListResponse) { if (targetListResponse && targetListResponse[0] != null) {
for (const factory of targetListResponse) { for (const factory of targetListResponse) {
targetDataDetail[0] = factory.ftoInput targetDataDetail[0] = factory.ftoInput
// if (factory.previousGlassType === 0) { // if (factory.previousGlassType === 0) {
@ -154,7 +153,7 @@ export default {
} }
} }
// console.log('ftoInvest',ftoInvest) // console.log('ftoInvest',ftoInvest)
if (factoryListResponse) { if (factoryListResponse && factoryListResponse[0] != null) {
for (const factory of factoryListResponse) { for (const factory of factoryListResponse) {
// targetDataDetail[0] = factory.ftoInput // targetDataDetail[0] = factory.ftoInput
if (factory.glassType === 0) { if (factory.glassType === 0) {
@ -164,7 +163,6 @@ export default {
} }
} }
} }
console.log(' this.factoryData.preDataDetail', preDataDetail);
this.factoryData.preDataDetail = preDataDetail this.factoryData.preDataDetail = preDataDetail
this.factoryData.currentDataDetail = currentDataDetail this.factoryData.currentDataDetail = currentDataDetail
this.factoryData.targetDataDetail = targetDataDetail this.factoryData.targetDataDetail = targetDataDetail
@ -196,7 +194,7 @@ export default {
gap: 16px; gap: 16px;
.flex { .flex {
display: flex; display: flex;
gap: 20px; gap: 16px;
flex: 1; flex: 1;
} }
.top > div, .top > div,

View File

@ -17,12 +17,12 @@ export default ({
tooltip: {}, tooltip: {},
title: { title: {
text: titleValue, text: titleValue,
left: "48.5%", left: "48%",
top: "37%", top: "37%",
textAlign: "center", textAlign: "center",
textStyle: { textStyle: {
fontWeight: 600, fontWeight: 600,
fontSize: 26, fontSize: 20,
color: "#fffd", color: "#fffd",
}, },
subtext: `\u2002${subtitle}\u2002`, subtext: `\u2002${subtitle}\u2002`,

View File

@ -1,10 +1,16 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-28 13:42:51 * @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-06-27 16:30:58 * @LastEditTime: 2024-05-31 16:11:06
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<!--
filename: fto.vue
author: liubin
date: 2024-04-10 08:59:28
description:
-->
<template> <template>
<left-chart-base <left-chart-base

View File

@ -12,7 +12,7 @@
v-for="item in legend" v-for="item in legend"
:key="item.label" :key="item.label"
class="legend-item" class="legend-item"
:style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }" :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }"
>{{ item.label }}</span >{{ item.label }}</span
> >
</div> </div>
@ -65,36 +65,7 @@ export default {
top: "15%", top: "15%",
containLabel: true, containLabel: true,
}, },
tooltip: { tooltip: {},
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
// backgroundColor: '#000000',
// textStyle: {
// color: '#ffff'
// }
formatter: params => {
// console.log(params);
// xAxis data
let dataStr = `<div><p style="font-weight:bold;margin:0 8px 15px;">${params[0].name}</p></div>`
params.forEach(item => {
let color = item.color.colorStops ? item.color.colorStops[0].color : ''
console.log(item.color, color);
dataStr += `<div>
<div style="margin: 0 8px;">
<span style="display:inline-block;margin-right:5px;width:10px;height:10px;background-color:${item.color.colorStops[0].color};"></span>
<span>${item.seriesName}</span>
<span style="float:right;color:#000000;margin-left:20px;">${item.data}</span>
</div>
</div>`
})
return dataStr
}
},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@ -106,16 +77,15 @@ export default {
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 14, fontSize: 12,
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/片", name: "单位/片",
position:'left',
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "#fff",
fontSize: 14, fontSize: 12,
align:'right' align:'right'
}, },
axisTick: { axisTick: {
@ -123,7 +93,7 @@ export default {
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 14, fontSize: 12,
}, },
axisLine: { axisLine: {
show: true, show: true,
@ -148,7 +118,7 @@ export default {
position: 'top', // position: 'top', //
textStyle: { // textStyle: { //
color: '#DFF1FE', color: '#DFF1FE',
fontSize: 14 fontSize: 12
} }
}, },
itemStyle: { itemStyle: {
@ -192,7 +162,7 @@ export default {
position: 'top', // position: 'top', //
textStyle: { // textStyle: { //
color: '#DFF1FE', color: '#DFF1FE',
fontSize: 14 fontSize: 12
} }
}, },
itemStyle: { itemStyle: {
@ -231,9 +201,9 @@ export default {
this.actualOptions.series.map((item) => { this.actualOptions.series.map((item) => {
item.barWidth = val ? 18 : 12; item.barWidth = val ? 18 : 12;
}); });
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 14; this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 14; this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 14; this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initOptions(this.actualOptions); this.initOptions(this.actualOptions);
}, },
series(val) { series(val) {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-28 13:42:51 * @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-06-28 09:28:56 * @LastEditTime: 2024-06-21 15:02:27
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -19,7 +19,7 @@
v-for="item in legend" v-for="item in legend"
:key="item.label" :key="item.label"
class="legend-item" class="legend-item"
:style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }" :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }"
>{{ item.label }}</span >{{ item.label }}</span
> >
</div> </div>
@ -71,31 +71,7 @@ export default {
top: "18%", top: "18%",
containLabel: true, containLabel: true,
}, },
tooltip: { tooltip: {},
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
formatter: params => {
// xAxis data
let dataStr = `<div><p style="font-weight:bold;margin:0 8px 15px;">${params[0].name}</p></div>`
params.forEach(item => {
let color = Object.prototype.toString.call(item.color) == "[object String]" ? item.color : item.color.colorStops ? item.color.colorStops[0].color : ''
console.log(item.color, color);
dataStr += `<div>
<div style="margin: 0 8px;">
<span style="display:inline-block;margin-right:5px;width:10px;height:10px;background-color:${color};"></span>
<span>${item.seriesName}</span>
<span style="float:right;color:#000000;margin-left:20px;">${item.data}</span>
</div>
</div>`
})
return dataStr
}
},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@ -107,16 +83,15 @@ export default {
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 14, fontSize: 12,
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/片", name: "单位/片",
position: 'left',
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "#fff",
fontSize: 14, fontSize: 12,
align: 'right' align: 'right'
}, },
axisTick: { axisTick: {
@ -124,7 +99,7 @@ export default {
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "#fff",
fontSize: 14, fontSize: 12,
}, },
axisLine: { axisLine: {
show: true, show: true,
@ -252,9 +227,9 @@ export default {
this.actualOptions.series.map((item) => { this.actualOptions.series.map((item) => {
item.barWidth = val ? 18 : 12; item.barWidth = val ? 18 : 12;
}); });
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 14; this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 14; this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 14; this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initOptions(this.actualOptions); this.initOptions(this.actualOptions);
}, },
series(val) { series(val) {

View File

@ -83,7 +83,7 @@ export default {
// backdrop-filter: blur(2px); // backdrop-filter: blur(2px);
// border-radius: 4px; // border-radius: 4px;
transform: translate(-50%, -100%); transform: translate(-50%, -100%);
// box-shadow: inset 0 0 12px 2px #fff3; box-shadow: inset 0 0 12px 2px #fff3;
background: url(../../../assets/images/homeindex/info.png) no-repeat 0 0 / 100% 100%; background: url(../../../assets/images/homeindex/info.png) no-repeat 0 0 / 100% 100%;
// background: radial-gradient(circle farthest-corner at bottom center,rgba(255,239,162,.7) 10%, #021842 30%); // background: radial-gradient(circle farthest-corner at bottom center,rgba(255,239,162,.7) 10%, #021842 30%);
// //

View File

@ -38,7 +38,7 @@
class="container-head" class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
> >
<Icon style="margin-left: 16px;" :icon="icon"></Icon> <Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div <div
@ -105,7 +105,7 @@ export default {
.container-head { .container-head {
// height: 40px; // height: 40px;
height:4vh; height: 3.8vh;
padding: 8px; padding: 8px;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-07-02 16:33:59 * @LastEditTime: 2024-06-27 14:56:20
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -16,8 +16,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator="" <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator=""
start-placeholder="开始日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期" :picker-options="{ }"> start-placeholder="开始日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime">
@ -234,7 +234,7 @@ export default {
{ {
prop: 'goodRatio', prop: 'goodRatio',
label: '良品率%', label: '良品率%',
filter: (val) => val.toFixed(2) + '%' filter: (val) => val + '%'
}, },
], ],
tableData: [], tableData: [],
@ -535,23 +535,11 @@ export default {
}; };
</script> </script>
<style> <style scoped>
/* .blueTip { */ /* .blueTip { */
/* padding-bottom: 10px; */ /* padding-bottom: 10px; */
/* } */ /* } */
/* .blueTi */ /* .blueTi */
.blueTip .el-date-editor .el-range__icon {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-date {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-time {
font-size: 16px;
color: #0b58ff;
}
.blueTip::before{ .blueTip::before{
display: inline-block; display: inline-block;
content: ''; content: '';

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-01-21 14:43:06 * @Date: 2022-01-21 14:43:06
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2024-07-01 16:54:41 * @LastEditTime: 2024-06-24 11:13:48
* @Description: * @Description:
--> -->
<template> <template>
@ -74,6 +74,7 @@ export default {
}, },
methods: { methods: {
initChart(xAxis, seriesList) { initChart(xAxis, seriesList) {
console.log('2', xAxis, seriesList)
if (xAxis.length === 0) { if (xAxis.length === 0) {
this.chart.clear() this.chart.clear()
} }
@ -99,16 +100,12 @@ export default {
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: {
type: 'shadow',
color: "rgba(237,237,237,0.5)"
},
formatter: function(params) { formatter: function(params) {
let result = ` let result = `
<div style="width: 270px; display: flex"> <div style="width: 270px; display: flex">
<div style="width: 150px">${params[0].name}</div> <div style="width: 150px">${params[0].name}</div>
<div style="width: 60px; text-align: right">${factoryListabbr[0]}</div> <div style="width: 60px">${factoryListabbr[0]}</div>
<div style="width: 60px; text-align: right">${factoryListabbr[1]}</div> <div style="width: 60px">${factoryListabbr[1]}</div>
</div>` </div>`
const newArray = params.map(p => { const newArray = params.map(p => {
return { return {
@ -116,17 +113,14 @@ export default {
factoryName: factoryListabbr[p.seriesName.split('-')[1]], // factoryName: factoryListabbr[p.seriesName.split('-')[1]], //
value: p.value, value: p.value,
name: p.name, name: p.name,
marker: p.marker, marker: p.marker
color: p.color
} }
}) })
const analyzeList = Object.groupBy(newArray, (member) => member.glass) const analyzeList = Object.groupBy(newArray, (member) => member.glass)
for (let g in analyzeList) { for (let g in analyzeList) {
// date => // date =>
let oneData = `<div style="width: 270px; display: flex"> let oneData = `<div style="width: 270px; display: flex">
<div style="width: 150px; display: flex; align-items: center"> <div style="width: 150px">${analyzeList[g][0].marker} ${g}</div>`
<div style="background-color: ${analyzeList[g][0].color}; width: 10px; height: 10px; margin-right: 5px"></div>
<div>${g}</div></div>`
for (let fac of factoryListabbr) { for (let fac of factoryListabbr) {
let goodNum = 0 let goodNum = 0
for (let ana of analyzeList[g]) { for (let ana of analyzeList[g]) {
@ -134,7 +128,7 @@ export default {
goodNum = ana.value goodNum = ana.value
} }
} }
oneData += `<div style="width: 60px; text-align: right">${goodNum}</div>` oneData += `<div style="width: 60px">${goodNum}</div>`
} }
result = result + oneData + '</div>' result = result + oneData + '</div>'
} }
@ -161,7 +155,7 @@ export default {
], ],
grid: { grid: {
top: '10%', top: '10%',
left: "2%", left: "1%",
right: "5%", right: "5%",
bottom: "0%", bottom: "0%",
containLabel: true containLabel: true

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-07-02 16:35:01 * @LastEditTime: 2024-06-20 16:41:48
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -691,22 +691,11 @@ export default {
}; };
</script> </script>
<style> <style scoped>
/* .blueTip { */ /* .blueTip { */
/* padding-bottom: 10px; */ /* padding-bottom: 10px; */
/* } */ /* } */
.blueTip .el-date-editor .el-range__icon { /* .blueTi */
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-date {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-time {
font-size: 16px;
color: #0b58ff;
}
.blueTip::before{ .blueTip::before{
display: inline-block; display: inline-block;
content: ''; content: '';

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-07-01 17:06:29 * @LastEditTime: 2024-06-24 15:08:34
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -242,7 +242,7 @@ export default {
{ {
prop: 'productionProgress', prop: 'productionProgress',
label: '生产进度', label: '生产进度',
filter: (val) => (val * 100).toFixed(2) + '%' filter: (val) => (val * 100) + '%'
}, },
{ {
prop: 'orderStatus', prop: 'orderStatus',

View File

@ -30,14 +30,7 @@
</div> </div>
<!-- --> <!-- -->
<div> <div>
<div <div style="display: inline-block; width: 79%; vertical-align: top">
style="
display: inline-block;
width: 79%;
vertical-align: top;
padding-right: 20px;
"
>
<base-chart <base-chart
v-show="this.chartMsg1.series[0].data.length > 0" v-show="this.chartMsg1.series[0].data.length > 0"
:chartHeight="chartHeight" :chartHeight="chartHeight"

View File

@ -71,7 +71,7 @@ export default {
"<br/>" + "<br/>" +
`${ `${
params[i].seriesType === "line" params[i].seriesType === "line"
? '<img width="11" height="11" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />' ? '<img width="10" height="10" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
: `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>` : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
}` + }` +
`<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` + `<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-19 15:28:34 * @Date: 2024-06-19 15:28:34
* @LastEditTime: 2024-07-02 08:41:11 * @LastEditTime: 2024-06-27 10:40:57
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -56,7 +56,7 @@ export default {
for (var i = 0, l = params.length; i < l; i++) { for (var i = 0, l = params.length; i < l; i++) {
res += res +=
"<br/>" + "<br/>" +
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` + `<span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` + `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%" ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
@ -229,12 +229,12 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.legendData { .legendData {
text-align: right; text-align: right;
position: relative; position: relative;
// right: 30; // right: 30;
top: -10px; // top: 10px;
.itemData { .itemData {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-20 16:13:36 * @Date: 2024-06-20 16:13:36
* @LastEditTime: 2024-07-02 08:40:56 * @LastEditTime: 2024-06-27 09:51:43
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -36,7 +36,7 @@ export default {
color: [], color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"], // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: { grid: {
left: 50, left: 20,
right: 0, right: 0,
bottom: 31, bottom: 31,
top: 30, top: 30,
@ -51,12 +51,12 @@ export default {
}, },
}, },
formatter: function (params) { formatter: function (params) {
// console.log('params', params.data) console.log('params', params.data)
var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`; var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) { for (var i = 0, l = params.length; i < l; i++) {
res += res +=
"<br/>" + "<br/>" +
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` + `<span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` + `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
? (params[i].data.titleValue ? params[i].data.titleValue.toFixed(2) : 0.0) + "%" ? (params[i].data.titleValue ? params[i].data.titleValue.toFixed(2) : 0.0) + "%"
@ -173,12 +173,8 @@ export default {
}, },
// gridLeft(val) { // gridLeft(val) {
// if (val === false) { // console.log(val)
// this.option.grid.left = 100
// } else {
// this.option.grid.left = -80
// }
// this.canvasReset()
// }, // },
type() { type() {
this.canvasReset(); this.canvasReset();
@ -204,7 +200,11 @@ export default {
}, },
getMes() { getMes() {
console.log(this.gridLeft) console.log(this.gridLeft)
if (this.gridLeft === false) {
this.option.grid.left = 20
} else {
this.option.grid.left = -80
}
// console.log('222222', this.chartMsg); // console.log('222222', this.chartMsg);
if (this.myChart) { if (this.myChart) {
this.myChart.dispose(); this.myChart.dispose();
@ -213,30 +213,23 @@ export default {
this.myChart = echarts.init(chartDom); this.myChart = echarts.init(chartDom);
this.option.color = this.chartMsg.color; this.option.color = this.chartMsg.color;
this.option.xAxis.data = this.chartMsg.xData this.option.xAxis.data = this.chartMsg.xData
if (this.gridLeft === false) {
this.option.grid.left = 50
} else {
this.option.grid.left = -80
}
// this.option.yAxis.name = this.chartMsg.yName; // this.option.yAxis.name = this.chartMsg.yName;
// this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel; // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
this.option.series = this.chartMsg.series; this.option.series = this.chartMsg.series;
this.option.yAxis = this.chartMsg.yAxis; this.option.yAxis = this.chartMsg.yAxis;
console.log(this.option.grid);
this.myChart.setOption(this.option); this.myChart.setOption(this.option);
}, },
}, },
}; };
</script> </script>
<style lang="scss" > <style lang="scss">
.legendData { .legendData {
text-align: right; text-align: right;
position: relative; position: relative;
// right: 30; // right: 30;
// top: 10px; // top: 10px;
top: -10px;
.itemData { .itemData {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-20 16:13:52 * @Date: 2024-06-20 16:13:52
* @LastEditTime: 2024-07-02 08:41:23 * @LastEditTime: 2024-06-27 09:55:02
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -56,7 +56,7 @@ export default {
for (var i = 0, l = params.length; i < l; i++) { for (var i = 0, l = params.length; i < l; i++) {
res += res +=
"<br/>" + "<br/>" +
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` + `<span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` + `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%" ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
@ -208,14 +208,12 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.legendData { .legendData {
text-align: right; text-align: right;
position: relative; position: relative;
// right: 30; // right: 30;
top: -10px; // top: 10px;
// top: -10px;
.itemData { .itemData {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-21 09:05:14 * @Date: 2024-06-21 09:05:14
* @LastEditTime: 2024-07-02 08:33:22 * @LastEditTime: 2024-06-27 10:59:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -55,32 +55,34 @@ export default {
let arr = [] let arr = []
var res = ``; var res = ``;
// for (var i = 0, l = params.length; i < l; i++) { // for (var i = 0, l = params.length; i < l; i++) {
// console.log() console.log()
if (params[0].axisValue === 'FTO投入' || params[0].axisValue === '芯片产量' || params[0].axisValue === '标准组件产量' || params[0].axisValue === '芯片总功率' || params[0].axisValue === '标准组件总功率') { if (params[0].axisValue === 'FTO投入' || params[0].axisValue === '芯片产量' || params[0].axisValue === '标准组件产量') {
res += res +=
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[0].color}'></span>` + "<br/>" +
`<span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${params[0].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[0].axisValueLabel}</span>` + `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[0].axisValueLabel}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[0].name === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[0].name === "综合良率"
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%" ? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%"
: params[0].name === "转化效率" : params[0].name === "转化效率"
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%" ? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%"
: params[0].seriesName.search('总功率') != -1 : params[i].seriesName.search('总功率') != -1
? (params[0].value ? params[0].value : 0) + "MW" ? (params[i].value ? params[i].value : 0) + "MW"
: (params[0].value ? params[0].value : 0) + "片" : (params[i].value ? params[i].value : 0) + "片"
}</span>`; }</span>`;
// } // }
} }
if (params[1].axisValue === '综合良率' || params[1].axisValue === '转化效率') { if (params[1].axisValue === '综合良率' || params[1].axisValue === '转化效率') {
res += res +=
`<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[1].color}'></span>` + "<br/>" +
`<span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${params[1].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[1].axisValueLabel}</span>` + `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[1].axisValueLabel}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[1].name === "综合良率" `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[1].name === "综合良率"
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%" ? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%"
: params[1].name === "转化效率" : params[1].name === "转化效率"
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%" ? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%"
: params[1].seriesName.search('总功率') != -1 : params[i].seriesName.search('总功率') != -1
? (params[1].value ? params[1].value : 0) + "MW" ? (params[i].value ? params[i].value : 0) + "MW"
: (params[1].value ? params[1].value : 0) + "片" : (params[i].value ? params[i].value : 0) + "片"
}</span>`; }</span>`;
} }
return res; return res;
@ -223,11 +225,10 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.legendData { .legendData {
text-align: right; text-align: right;
position: relative; position: relative;
top: -10px;
// right: 30; // right: 30;
// top: 10px; // top: 10px;
.itemData { .itemData {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-07-01 14:43:42 * @LastEditTime: 2024-06-25 08:39:48
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -14,7 +14,7 @@
<div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto;"> <div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto;">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="type"> <el-form-item label="时间维度" prop="type">
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择" @change="handleChange"> <el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -207,13 +207,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
handleChange() {
this.listQuery.reportTime = []
this.listQuery.end = null
this.listQuery.start = null
this.listQuery.startDate = null
this.listQuery.endDate = null
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0; let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0; // let spanTwoArr = [], concatTwo = 0;
@ -326,10 +319,6 @@ export default {
} }
}, },
async getDataList() { async getDataList() {
console.log(this.listQuery.type);
if (this.listQuery.type == null) {
return this.$message('请选择时间维度')
}
if (!this.listQuery.startDate && !this.listQuery.endDate) { if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间') return this.$message('请选择起止时间')
} }
@ -474,32 +463,30 @@ export default {
// dataArr[0].factory = item.factory === 1 ? '' : '' // dataArr[0].factory = item.factory === 1 ? '' : ''
// dataArr[1].factory = item.factory === 1 ? '' : '' // dataArr[1].factory = item.factory === 1 ? '' : ''
// dataArr[2].factory = item.factory === 1 ? '' : '' // dataArr[2].factory = item.factory === 1 ? '' : ''
// dataArr[3].factory = item.factory === 1 ? '' : '' // dataArr[3].factory = item.factory === 1 ? '' : ''
dataArr[1]['' + m + ''] = item.chipInput dataArr[1]['' + m + ''] = item.chipYield
dataArr[2]['' + m + ''] = item.chipYield dataArr[2]['' + m + ''] = item.chipAveragePower
dataArr[3]['' + m + ''] = item.chipYieldRate dataArr[4]['' + m + ''] = item.chipTotalPower
dataArr[4]['' + m + ''] = item.chipAveragePower dataArr[5]['' + m + ''] = item.chipCssMarriageRate
dataArr[5]['' + m + ''] = item.chipTotalPower dataArr[6]['' + m + ''] = item.chipOee
dataArr[6]['' + m + ''] = item.chipCssMarriageRate dataArr[7]['' + m + ''] = item.chipCapacityUtilizationRate
dataArr[7]['' + m + ''] = item.chipOee dataArr[8]['' + m + ''] = item.chipAnnualAverageProduction
dataArr[8]['' + m + ''] = item.chipCapacityUtilizationRate dataArr[9]['' + m + ''] = item.chipBom
dataArr[9]['' + m + ''] = item.chipAnnualAverageProduction dataArr[10]['' + m + ''] = item.componentYield
dataArr[10]['' + m + ''] = item.chipBom dataArr[11]['' + m + ''] = item.componentAveragePower
dataArr[11]['' + m + ''] = item.componentYield dataArr[12]['' + m + ''] = item.componentYieldRate
dataArr[12]['' + m + ''] = item.componentAveragePower dataArr[13]['' + m + ''] = item.componentTotalPower
dataArr[13]['' + m + ''] = item.componentYieldRate dataArr[14]['' + m + ''] = item.componentOee
dataArr[14]['' + m + ''] = item.componentTotalPower dataArr[15]['' + m + ''] = item.componentCapacityUtilizationRate
dataArr[15]['' + m + ''] = item.componentOee dataArr[16]['' + m + ''] = item.componentAnnualAverageProduction
dataArr[16]['' + m + ''] = item.componentCapacityUtilizationRate dataArr[17]['' + m + ''] = item.componentBom
dataArr[17]['' + m + ''] = item.componentAnnualAverageProduction dataArr[18]['' + m + ''] = item.bipvChipUsage
dataArr[18]['' + m + ''] = item.componentBom dataArr[19]['' + m + ''] = item.bipvProductOutput
dataArr[19]['' + m + ''] = item.bipvChipUsage dataArr[20]['' + m + ''] = item.bipvChipUtilizationRate
dataArr[20]['' + m + ''] = item.bipvProductOutput dataArr[21]['' + m + ''] = item.bipvAnnualAverageProduction
dataArr[21]['' + m + ''] = item.bipvChipUtilizationRate dataArr[22]['' + m + ''] = item.bipvOeeMaterialCost
dataArr[22]['' + m + ''] = item.bipvAnnualAverageProduction dataArr[23]['' + m + ''] = item.bipvInsideMaterialCost
dataArr[23]['' + m + ''] = item.bipvOeeMaterialCost dataArr[24]['' + m + ''] = item.bipvComprehensiveMaterialCost
dataArr[24]['' + m + ''] = item.bipvInsideMaterialCost
dataArr[25]['' + m + ''] = item.bipvComprehensiveMaterialCost
// }) // })
// ele.titleValue // ele.titleValue

View File

@ -7,7 +7,7 @@
<div class="search"> <div class="search">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="date"> <el-form-item label="时间维度" prop="date">
<el-select size="small" clearable v-model="listQuery.date" placeholder="请选择" @change="handleChange"> <el-select size="small" clearable v-model="listQuery.date" placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -247,7 +247,7 @@ export default {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "单位/MW", name: "单位/",
// min: function (value) {// // min: function (value) {//
// return 0 // return 0
// }, // },
@ -290,7 +290,7 @@ export default {
barWidth: 20, barWidth: 20,
label: { label: {
show: true, show: true,
position: [-20, -16], position: [-50, -16],
color: "#68C483", color: "#68C483",
formatter: function (params) { formatter: function (params) {
return params.value.toFixed(2) return params.value.toFixed(2)
@ -402,13 +402,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
handleChange(val) {
this.listQuery.reportTime = []
this.listQuery.end = null
this.listQuery.start = null
this.listQuery.endTime = null
this.listQuery.beginTime = null
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0; let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0; // let spanTwoArr = [], concatTwo = 0;
@ -529,9 +522,6 @@ export default {
this.chartMsgYearTarget.series[0].data = [] this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = [] this.chartMsgYearTarget.series[1].data = []
this.title = '' this.title = ''
if (this.listQuery.date == null) {
return this.$message('请选择时间维度')
}
if (!this.listQuery.beginTime && !this.listQuery.endTime) { if (!this.listQuery.beginTime && !this.listQuery.endTime) {
return this.$message('请选择起止时间') return this.$message('请选择起止时间')
} }
@ -561,7 +551,7 @@ export default {
} }
] ]
res.data.forEach(element => { res.data.forEach(element => {
element.list.forEach((ele, index) => { element.list.reverse().forEach((ele, index) => {
let i = index + 1 let i = index + 1
this.chartMsg.xData.push(ele.reportTimep) this.chartMsg.xData.push(ele.reportTimep)
this.otherProps.push({ this.otherProps.push({
@ -571,26 +561,26 @@ export default {
}) })
}) })
if (res.data[0].list.length != 0) { if (res.data[0].list.length != 0) {
this.chartMsg.xData.push(res.data[0].list[res.data[0].list.length - 1].reportTimep.slice(0, res.data[0].list[res.data[0].list.length - 1].reportTimep.length - 3) + '目标') this.chartMsg.xData.push(res.data[0].list[0].reportTimep + '目标')
if (this.listQuery.date === 0 || this.listQuery.date === 1 || this.listQuery.date === 2) { if (this.listQuery.date === 0 || this.listQuery.date === 1 || this.listQuery.date === 2) {
this.otherProps.push({ this.otherProps.push({
label: res.data[0].list[res.data[0].list.length - 1].reportTimep.slice(0, res.data[0].list[res.data[0].list.length - 1].reportTimep.length-3) + '目标', label: res.data[0].list[0].reportTimep + '目标',
prop: 'dayData' prop: 'dayData'
}) })
dataArr[0]['dayData'] = res.data[0].list[res.data[0].list.length - 1].chipTarget dataArr[0]['dayData'] = res.data[0].list[0].chipTarget
dataArr[1]['dayData'] = res.data[0].list[res.data[0].list.length - 1].standTarget dataArr[1]['dayData'] = res.data[0].list[0].standTarget
dataArr[2]['dayData'] = res.data[0].list[res.data[0].list.length - 1].conversionEfficiencyTarget dataArr[2]['dayData'] = res.data[0].list[0].conversionEfficiencyTarget
} }
if (this.listQuery.date === 2 || this.listQuery.date === 3) { if (this.listQuery.date === 2 || this.listQuery.date === 3) {
this.otherProps.push({ this.otherProps.push({
label: res.data[0].yearTarget.targetTime + '年目标值', label: res.data[0].yearTarget.targetTime,
prop: 'yearData' prop: 'yearData'
}) })
dataArr[0]['yearData'] = res.data[0].yearTarget.chipTotalPower dataArr[0]['yearData'] = res.data[0].yearTarget.chipTotalPower
dataArr[1]['yearData'] = res.data[0].yearTarget.componentTotalPower dataArr[1]['yearData'] = res.data[0].yearTarget.componentTotalPower
dataArr[2]['yearData'] = res.data[0].yearTarget.componentConversionEfficiency dataArr[2]['yearData'] = res.data[0].yearTarget.componentConversionEfficiency
} }
res.data.reverse().forEach((ele, index) => { res.data.forEach((ele, index) => {
// let i = index + 1 // let i = index + 1
// let m = 'value' + i // let m = 'value' + i
ele.list.forEach((item, index) => { ele.list.forEach((item, index) => {
@ -610,7 +600,7 @@ export default {
// }) // })
}) })
}) })
this.title = res.data[0].yearTarget.targetTime ? res.data[0].yearTarget.targetTime + '目标值' : '' this.title = res.data[0].yearTarget.targetTime ? res.data[0].yearTarget.targetTime + '目标值' : ''
this.chartMsgYearTarget.series[0].data = [ this.chartMsgYearTarget.series[0].data = [
{ {
value: res.data[0].yearTarget.chipTotalPower, value: res.data[0].yearTarget.chipTotalPower,
@ -677,18 +667,6 @@ export default {
}) })
} }
} }
this.chartMsg.series[0].data.push({
name: '芯片总功率',
value: dataArr[0]['dayData'] === 0 ? null : dataArr[0]['dayData']
})
this.chartMsg.series[1].data.push({
name: '标准组件总功率',
value: dataArr[1]['dayData'] === 0 ? null : dataArr[1]['dayData']
})
this.chartMsg.series[2].data.push({
name: '转化效率',
value: dataArr[2]['dayData'] === 0 ? null : dataArr[2]['dayData']
})
} else { } else {
this.chartMsgYearTarget.series[0].data = [] this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = [] this.chartMsgYearTarget.series[1].data = []

View File

@ -5,7 +5,7 @@
<div class="search"> <div class="search">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="type"> <el-form-item label="时间维度" prop="type">
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择" @change="handleChange"> <el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -226,7 +226,6 @@ export default {
show: true, show: true,
type: "value", type: "value",
name: "单位/MW", name: "单位/MW",
position:'left',
// splitNumber: 4, // splitNumber: 4,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
@ -241,11 +240,10 @@ export default {
chartMsg: { chartMsg: {
color: ["#8EF0AB", "#288AFF"], color: ["#8EF0AB", "#288AFF"],
xData: [], xData: [],
// yName: "/MW", yName: "单位/MW",
yAxis:{ yAxis:{
type: "value", type: "value",
name: "单位/MW", name: "单位/MW",
// splitNumber: 4, // splitNumber: 4,
nameTextStyle: { nameTextStyle: {
fontSize: 12, fontSize: 12,
@ -371,13 +369,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
handleChange() {
this.listQuery.reportTime = []
this.listQuery.end = null
this.listQuery.start = null
this.listQuery.startDate = null
this.listQuery.endDate = null
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0; let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0; // let spanTwoArr = [], concatTwo = 0;
@ -500,9 +491,6 @@ export default {
this.chartMsgYearTarget.series[0].data = [] this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = [] this.chartMsgYearTarget.series[1].data = []
console.log(this.listQuery); console.log(this.listQuery);
if (this.listQuery.type == null) {
return this.$message('请选择时间维度')
}
if (!this.listQuery.startDate && !this.listQuery.endDate) { if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间') return this.$message('请选择起止时间')
} }
@ -523,7 +511,7 @@ export default {
let i = index + 1 let i = index + 1
let m = 'value' + i let m = 'value' + i
ele.productionSituationPowerDataVOList.forEach((item) => { ele.productionSituationPowerDataVOList.forEach((item) => {
// maxData.push(item.chipTotalPower, item.componentTotalPower) maxData.push(item.chipTotalPower, item.componentTotalPower)
this.dataArr[0]['' + m + ''] = item.chipTotalPower this.dataArr[0]['' + m + ''] = item.chipTotalPower
// this.dataArr[3].factory = item.factory == 1 ? '' : '' // this.dataArr[3].factory = item.factory == 1 ? '' : ''
this.dataArr[1]['' + m + ''] = item.componentTotalPower this.dataArr[1]['' + m + ''] = item.componentTotalPower
@ -535,23 +523,10 @@ export default {
// props: 'value' + index + 1, // props: 'value' + index + 1,
// }) // })
}) })
if (this.listQuery.type === 2) { this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
res.data.list.slice(0, res.data.list.length - 1).forEach((ele, index) => { this.chartMsgTarget.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
ele.productionSituationPowerDataVOList.forEach((item) => { this.chartMsg.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
maxData.push(item.chipTotalPower, item.componentTotalPower) this.chartMsgTarget.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
})
})
} else {
res.data.list.forEach((ele, index) => {
ele.productionSituationPowerDataVOList.forEach((item) => {
maxData.push(item.chipTotalPower, item.componentTotalPower)
})
})
}
this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData))
this.chartMsgTarget.yAxis.max = Math.ceil(Math.max(...maxData))
this.chartMsg.yAxis.min = Math.ceil(Math.min(...maxData) )
this.chartMsgTarget.yAxis.min = Math.ceil(Math.min(...maxData))
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4 this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4 this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
if (this.listQuery.type === 2) { if (this.listQuery.type === 2) {
@ -575,7 +550,7 @@ export default {
}) })
}) })
}) })
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue.slice(0, res.data.list[res.data.list.length - 2].titleValue.length - 3)) this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue)
// this.chartMsgTarget.series = [{ // this.chartMsgTarget.series = [{
// name: "FTO", // name: "FTO",
// data: [ // data: [
@ -743,7 +718,7 @@ export default {
}) })
}) })
}) })
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 1].titleValue.slice(0, res.data.list[res.data.list.length - 1].titleValue.length - 3)) this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 1].titleValue)
// this.chartMsgTarget.series = [{ // this.chartMsgTarget.series = [{
// name: "FTO", // name: "FTO",
// data: [ // data: [

View File

@ -448,7 +448,7 @@ export default {
this.tableData = val this.tableData = val
}, },
currentMenu(val) { currentMenu(val) {
// console.log(val) console.log(val)
if (val === '瑞昌') { if (val === '瑞昌') {
this.legendList = [ this.legendList = [
{ id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" }, { id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" },
@ -456,7 +456,7 @@ export default {
{ id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" }, { id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" },
] ]
} else { } else {
this.legendList = [ [
{ id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" }, { id: 1, name: "FTO投入", type: 1, color: "#8EF0AB" },
{ id: 2, name: "芯片产量", type: 1, color: "#288AFF" }, { id: 2, name: "芯片产量", type: 1, color: "#288AFF" },
{ id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" }, { id: 3, name: "标准组件产量", type: 1, color: "#64BDFF" },
@ -499,8 +499,6 @@ export default {
this.listQuery.reportTime = [] this.listQuery.reportTime = []
this.listQuery.end = null this.listQuery.end = null
this.listQuery.start = null this.listQuery.start = null
this.listQuery.startDate = null
this.listQuery.endDate = null
}, },
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0; let spanOneArr = [], concatOne = 0;
@ -554,12 +552,12 @@ export default {
onValueChange(picker, k) { // k onValueChange(picker, k) { // k
// console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1]) // console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
if (this.listQuery.start && this.listQuery.end) { if (this.listQuery.start && this.listQuery.end) {
// console.log(this.listQuery.reportTime) console.log(this.listQuery.reportTime)
this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000); const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
if (numDays > 168) { if (numDays > 168) {
// console.log(numDays) console.log(numDays)
this.$message({ this.$message({
message: '周范围不能超过24周', message: '周范围不能超过24周',
type: 'warning' type: 'warning'
@ -578,7 +576,7 @@ export default {
if (this.listQuery.reportTime) { if (this.listQuery.reportTime) {
// this.createStartDate = moment(new Date(this.listQuery.reportTime[0]), 'yyyy-MM-dd hh:mm:ss'); // this.createStartDate = moment(new Date(this.listQuery.reportTime[0]), 'yyyy-MM-dd hh:mm:ss');
// this.createEndDate = moment(new Date(this.listQuery.reportTime[1]), 'yyyy-MM-dd hh:mm:ss'); // this.createEndDate = moment(new Date(this.listQuery.reportTime[1]), 'yyyy-MM-dd hh:mm:ss');
// console.log(this.listQuery.reportTime[1]) console.log(this.listQuery.reportTime[1])
const numDays = (this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 3600 * 1000); const numDays = (this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 3600 * 1000);
if (numDays > 30) { if (numDays > 30) {
this.$message({ this.$message({
@ -631,10 +629,7 @@ export default {
if (this.chartMsgYearTarget.series[3]) { if (this.chartMsgYearTarget.series[3]) {
this.chartMsgYearTarget.series[3].data = [] this.chartMsgYearTarget.series[3].data = []
} }
// console.log(this.listQuery); console.log(this.listQuery);
if (this.listQuery.type == null) {
return this.$message('请选择时间维度')
}
if (!this.listQuery.startDate && !this.listQuery.endDate) { if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间') return this.$message('请选择起止时间')
} }
@ -655,7 +650,7 @@ export default {
let i = index + 1 let i = index + 1
let m = 'value' + i let m = 'value' + i
ele.productionSituationDataVOList.forEach((item) => { ele.productionSituationDataVOList.forEach((item) => {
// maxData.push(item.ftoInput, item.chipYield, item.componentYield) maxData.push(item.ftoInput, item.chipYield, item.componentYield)
this.dataArr[0]['' + m + ''] = item.ftoInput this.dataArr[0]['' + m + ''] = item.ftoInput
// this.dataArr[3].factory = item.factory == 1 ? '' : '' // this.dataArr[3].factory = item.factory == 1 ? '' : ''
this.dataArr[1]['' + m + ''] = item.chipYield this.dataArr[1]['' + m + ''] = item.chipYield
@ -666,39 +661,26 @@ export default {
this.dataArr[3]['' + m + ''] = item.bipvProductOutput this.dataArr[3]['' + m + ''] = item.bipvProductOutput
} }
}) })
this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsg.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
// ele.titleValue // ele.titleValue
// .push({ // .push({
// label: ele.titleValue, // label: ele.titleValue,
// props: 'value' + index + 1, // props: 'value' + index + 1,
// }) // })
}) })
if (this.listQuery.type === 2) {
res.data.list.slice(0, res.data.list.length - 1).forEach((ele, index) => {
ele.productionSituationDataVOList.forEach((item) => {
maxData.push(item.ftoInput, item.chipYield, item.componentYield)
})
})
} else {
res.data.list.forEach((ele, index) => {
ele.productionSituationDataVOList.forEach((item) => {
maxData.push(item.ftoInput, item.chipYield, item.componentYield)
})
})
}
this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData))
this.chartMsgTarget.yAxis.max = Math.ceil(Math.max(...maxData))
this.chartMsg.yAxis.min = Math.ceil(Math.min(...maxData))
this.chartMsgTarget.yAxis.min = Math.ceil(Math.min(...maxData))
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
if (this.listQuery.type === 2) { if (this.listQuery.type === 2) {
if (res.data.list.length === 3) { if (res.data.list.length === 3) {
this.gridLeft = false this.gridLeft = false
} else { } else {
this.gridLeft = true this.gridLeft = true
} }
// console.log(res.data.list.length); console.log(res.data.list.length);
// res.data.list.forEach((ele) => { // res.data.list.forEach((ele) => {
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => { res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
// let i = index + 1 // let i = index + 1
@ -724,7 +706,7 @@ export default {
} }
}) })
}) })
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue.slice(0, res.data.list[res.data.list.length - 2].titleValue.length - 3)) this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue)
// this.chartMsgTarget.series = [{ // this.chartMsgTarget.series = [{
// name: "FTO", // name: "FTO",
// data: [ // data: [
@ -752,7 +734,7 @@ export default {
let targetObj = {} let targetObj = {}
let obj = {} let obj = {}
res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => { res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => {
// console.log("ele",ele.titleValue); console.log("ele",ele.titleValue);
// let i = index + 1 // let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue) // this.chartMsgTarget.xData.push(ele.titleValue)
if (ele.titleValue.search('完成') == -1) { if (ele.titleValue.search('完成') == -1) {
@ -762,7 +744,7 @@ export default {
targetObj.componentYield = item.componentYield targetObj.componentYield = item.componentYield
targetObj.bipvProductOutput = this.currentMenu == '瑞昌' ? null : item.bipvProductOutput targetObj.bipvProductOutput = this.currentMenu == '瑞昌' ? null : item.bipvProductOutput
}) })
// console.log("fto",ele.titleValue,fto); console.log("fto",ele.titleValue,fto);
} else { } else {
ele.productionSituationDataVOList.forEach((item) => { ele.productionSituationDataVOList.forEach((item) => {
obj.ftoInput = item.ftoInput obj.ftoInput = item.ftoInput
@ -942,7 +924,7 @@ export default {
},) },)
// } // }
this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv] this.chartMsgTarget.series = [...fto, ...chip, ...std, ...bipv]
// console.log('arr', this.chartMsgTarget.series) console.log('arr', this.chartMsgTarget.series)
// arr.forEach((ele) => { // arr.forEach((ele) => {
// }) // })
@ -1004,8 +986,8 @@ export default {
} }
}) })
}) })
// console.log(this.chartMsg.series[0]); console.log(this.chartMsg.series[0]);
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 1].titleValue.slice(0, res.data.list[res.data.list.length - 1].titleValue.length - 3)) this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 1].titleValue)
// this.chartMsgTarget.series = [{ // this.chartMsgTarget.series = [{
// name: "FTO", // name: "FTO",
// data: [ // data: [
@ -1033,7 +1015,7 @@ export default {
let targetObj = {} let targetObj = {}
let obj = {} let obj = {}
res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => { res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => {
// console.log("ele", ele.titleValue); console.log("ele", ele.titleValue);
// let i = index + 1 // let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue) // this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationDataVOList.forEach((item) => { ele.productionSituationDataVOList.forEach((item) => {
@ -1042,7 +1024,7 @@ export default {
targetObj.chipYield = item.chipYield targetObj.chipYield = item.chipYield
targetObj.componentYield = item.componentYield targetObj.componentYield = item.componentYield
targetObj.bipvProductOutput = this.currentMenu == '瑞昌' ? null : item.bipvProductOutput targetObj.bipvProductOutput = this.currentMenu == '瑞昌' ? null : item.bipvProductOutput
// console.log("fto", ele.titleValue, fto); console.log("fto", ele.titleValue, fto);
} else { } else {
obj.ftoInput = item.ftoInput obj.ftoInput = item.ftoInput

View File

@ -7,7 +7,7 @@
<div class="search"> <div class="search">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="type"> <el-form-item label="时间维度" prop="type">
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择" @change="handleChange"> <el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -107,7 +107,6 @@ export default {
otherProps: [], otherProps: [],
start: undefined, start: undefined,
end: undefined, end: undefined,
currentMenu:'邯郸',
title: '', title: '',
showTable:false, showTable:false,
listQuery: { listQuery: {
@ -423,13 +422,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
handleChange() {
this.listQuery.reportTime = []
this.listQuery.end = null
this.listQuery.start = null
this.listQuery.endTime = null
this.listQuery.beginTime = null
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0; let spanOneArr = [], concatOne = 0;
// let spanTwoArr = [], concatTwo = 0; // let spanTwoArr = [], concatTwo = 0;
@ -551,9 +543,6 @@ export default {
this.chartMsgYearTarget.xData = [] this.chartMsgYearTarget.xData = []
this.chartMsgYearTarget.series[0].data = [] this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = [] this.chartMsgYearTarget.series[1].data = []
if (this.listQuery.type == null) {
return this.$message('请选择时间维度')
}
if (!this.listQuery.startDate && !this.listQuery.endDate) { if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间') return this.$message('请选择起止时间')
} }

View File

@ -137,7 +137,7 @@
<!-- 添加或修改菜单对话框 --> <!-- 添加或修改菜单对话框 -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="上级菜单"> <el-form-item label="上级菜单">
@ -205,7 +205,6 @@
v-model="form.sort" v-model="form.sort"
controls-position="right" controls-position="right"
:min="0" :min="0"
style="width: 100%"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -332,8 +331,8 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div> </div>
</base-dialog> </base-dialog>
</div> </div>
@ -438,12 +437,6 @@ export default {
}, },
], ],
tableBtn: [ tableBtn: [
this.$auth.hasPermi("system:menu:create")
? {
type: "add",
btnName: "新增",
}
: undefined,
this.$auth.hasPermi("system:menu:update") this.$auth.hasPermi("system:menu:update")
? { ? {
type: "edit", type: "edit",
@ -456,6 +449,12 @@ export default {
btnName: "删除", btnName: "删除",
} }
: undefined, : undefined,
this.$auth.hasPermi("system:menu:create")
? {
type: "add",
btnName: "新增",
}
: undefined,
].filter((v) => v), ].filter((v) => v),
tableProps, tableProps,
heightNum: 210, heightNum: 210,

View File

@ -83,7 +83,7 @@
{{ parseTime(form.startTime) }} | {{ form.duration }} ms {{ parseTime(form.startTime) }} | {{ form.duration }} ms
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12">
<el-form-item label="操作结果:"> <el-form-item label="操作结果:">
<div v-if="form.resultCode === 0"> <div v-if="form.resultCode === 0">
正常 | {{ form.resultData }} 正常 | {{ form.resultData }}

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="user-container"> <div class="app-container">
<!-- <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" /> <!-- <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" />
<doc-alert title="三方登陆" url="https://doc.iocoder.cn/social-user/" /> <doc-alert title="三方登陆" url="https://doc.iocoder.cn/social-user/" />
<doc-alert <doc-alert
@ -8,43 +8,40 @@
/> --> /> -->
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-row :gutter="8" class="user-box"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="4" :xs="24"> <el-col :span="4" :xs="24">
<div class="user-box-left"> <div class="head-container">
<div class="head-container"> <el-input
<el-input v-model="deptName"
v-model="deptName" placeholder="请输入部门名称"
placeholder="请输入部门名称" clearable
clearable size="small"
size="small" prefix-icon="el-icon-search"
prefix-icon="el-icon-search" style="margin-bottom: 20px"
style="margin-bottom: 20px" />
/> </div>
</div> <div class="head-container">
<div class="head-container"> <el-tree
<el-tree :data="deptOptions"
:data="deptOptions" :props="defaultProps"
:props="defaultProps" :expand-on-click-node="false"
:expand-on-click-node="false" :filter-node-method="filterNode"
:filter-node-method="filterNode" ref="tree"
ref="tree" default-expand-all
default-expand-all highlight-current
highlight-current @node-click="handleNodeClick"
@node-click="handleNodeClick" />
/>
</div>
</div> </div>
</el-col> </el-col>
<!--用户数据--> <!--用户数据-->
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<div class="user-box-right"> <search-bar
<search-bar :formConfigs="formConfig"
:formConfigs="formConfig" ref="searchBarForm"
ref="userSearchBarForm" @headBtnClick="buttonClick"
@headBtnClick="buttonClick" />
/> <!-- <el-form
<!-- <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
@ -107,7 +104,7 @@
</el-form-item> </el-form-item>
</el-form> --> </el-form> -->
<!-- <el-row :gutter="10" class="mb8"> <!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
@ -147,25 +144,25 @@
></right-toolbar> ></right-toolbar>
</el-row> --> </el-row> -->
<!-- 列表 --> <!-- 列表 -->
<base-table <base-table
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-props="tableProps" :table-props="tableProps"
:table-data="userList" :table-data="userList"
:max-height="tableH" :max-height="tableH"
@emitFun="handleStatusChange" @emitFun="handleStatusChange"
> >
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
:width="220" :width="220"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" @clickBtn="handleClick"
/> />
</base-table> </base-table>
<!-- <el-table v-loading="loading" :data="userList"> <!-- <el-table v-loading="loading" :data="userList">
<el-table-column <el-table-column
label="用户编号" label="用户编号"
align="center" align="center"
@ -291,19 +288,18 @@
</el-table-column> </el-table-column>
</el-table> --> </el-table> -->
<pagination <pagination
:page.sync="queryParams.pageNo" :page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
:total="total" :total="total"
@pagination="getList" @pagination="getList"
/> />
</div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="用户昵称" prop="nickname"> <el-form-item label="用户昵称" prop="nickname">
@ -416,8 +412,8 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div> </div>
</base-dialog> </base-dialog>
@ -452,7 +448,7 @@
:underline="false" :underline="false"
style="font-size: 12px; vertical-align: baseline" style="font-size: 12px; vertical-align: baseline"
@click="importTemplate" @click="importTemplate"
>导出模板</el-link >下载模板</el-link
> >
</div> </div>
</el-upload> </el-upload>
@ -610,11 +606,6 @@ export default {
name: "search", name: "search",
color: "primary", color: "primary",
}, },
{
type: "button",
btnName: "重置",
name: "cancel",
},
{ {
type: this.$auth.hasPermiOr([ type: this.$auth.hasPermiOr([
"system:user:create", "system:user:create",
@ -624,11 +615,18 @@ export default {
? "separate" ? "separate"
: "", : "",
}, },
{
type: this.$auth.hasPermi("system:user:create") ? "button" : "",
btnName: "新增",
name: "addNew",
color: "success",
plain: true,
},
{ {
type: this.$auth.hasPermi("system:user:import") ? "button" : "", type: this.$auth.hasPermi("system:user:import") ? "button" : "",
btnName: "导入", btnName: "导入",
name: "import", name: "import",
color: "primary", color: "warning",
plain: true, plain: true,
}, },
{ {
@ -638,27 +636,8 @@ export default {
color: "primary", color: "primary",
plain: true, plain: true,
}, },
{
type: this.$auth.hasPermi("system:user:create") ? "button" : "",
btnName: "新增",
name: "addNew",
color: "success",
plain: true,
},
], ],
tableBtn: [ tableBtn: [
this.$auth.hasPermi("system:user:update-password")
? {
type: "reset",
btnName: "重置密码",
}
: undefined,
this.$auth.hasPermi("system:permission:assign-user-role")
? {
type: "role",
btnName: "分配角色",
}
: undefined,
this.$auth.hasPermi("system:user:update") this.$auth.hasPermi("system:user:update")
? { ? {
type: "edit", type: "edit",
@ -671,6 +650,18 @@ export default {
btnName: "删除", btnName: "删除",
} }
: undefined, : undefined,
this.$auth.hasPermi("system:user:update-password")
? {
type: "reset",
btnName: "重置密码",
}
: undefined,
this.$auth.hasPermi("system:permission:assign-user-role")
? {
type: "role",
btnName: "分配角色",
}
: undefined,
].filter((v) => v), ].filter((v) => v),
tableProps, tableProps,
// //
@ -812,15 +803,6 @@ export default {
case "search": case "search":
this.handleQuery(val); this.handleQuery(val);
break; break;
case "cancel":
this.$refs["userSearchBarForm"].resetForm();
this.queryParams.pageNo = 1;
this.queryParams.username = "";
this.queryParams.mobile = "";
this.queryParams.status = "";
this.queryParams.createTime = [];
this.getList();
break;
case "addNew": case "addNew":
this.handleAdd(); this.handleAdd();
break; break;
@ -1051,7 +1033,7 @@ export default {
this.upload.title = "用户导入"; this.upload.title = "用户导入";
this.upload.open = true; this.upload.open = true;
}, },
/** 导出模板操作 */ /** 下载模板操作 */
importTemplate() { importTemplate() {
importTemplate().then((response) => { importTemplate().then((response) => {
this.$download.excel(response, "用户导入模板.xls"); this.$download.excel(response, "用户导入模板.xls");
@ -1108,19 +1090,11 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.user-container { .app-container {
width: 100%; width: 100%;
height: calc(100vh - 120px - 8px); height: calc(100vh - 120px - 8px);
background-color: #f2f4f9; background-color: #fff;
border-radius: 8px;
.user-box { padding: 8px;
.user-box-left,
.user-box-right {
background-color: #fff;
padding: 8px;
border-radius: 8px;
height: calc(100vh - 128px);
}
}
} }
</style> </style>