Compare commits

..

No commits in common. "2267444b4a31854e3b7048324a02533fbf93f9ac" and "904350a4d8162c31fd6af1e9591beb47530c5b95" have entirely different histories.

26 changed files with 446 additions and 679 deletions

View File

@ -31,6 +31,9 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = true VUE_APP_DOC_ENABLE = true

View File

@ -14,6 +14,9 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = true VUE_APP_DOC_ENABLE = true

View File

@ -28,6 +28,9 @@ VUE_APP_APP_NAME ='yudao-admin'
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = false VUE_APP_DOC_ENABLE = false

View File

@ -15,6 +15,9 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = false VUE_APP_DOC_ENABLE = false

View File

@ -17,6 +17,9 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/'
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = true VUE_APP_DOC_ENABLE = true

View File

@ -142,9 +142,6 @@ function findMaxLabelWidth(rows) {
if (!opt.label) return 0; if (!opt.label) return 0;
if (opt.label.length > max) { if (opt.label.length > max) {
max = opt.label.length; max = opt.label.length;
if (opt.label.includes('(')) {
max = max - 3
}
} }
}); });
}); });
@ -242,7 +239,7 @@ export default {
size: { size: {
type: String, type: String,
default: '', default: '',
} },
}, },
data() { data() {
return { return {

View File

@ -83,7 +83,7 @@ export default {
], ],
}, },
placeholder: '请输入内容', placeholder: '请输入内容',
// readOnly: false, readOnly: true,
}, },
}; };
}, },
@ -123,13 +123,11 @@ export default {
const editor = this.$refs.editor; const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options); this.Quill = new Quill(editor, this.options);
// start // start
this.Quill?.enable(false);
this.$nextTick(() => { this.$nextTick(() => {
this.Quill?.enable(true);
this.Quill?.blur(); this.Quill?.blur();
// if (!this.readOnly) { if (!this.readOnly) {
// this.Quill?.enable(); this.Quill?.enable();
// } }
}); });
// //
if (this.type === 'url') { if (this.type === 'url') {
@ -198,7 +196,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style>
.editor-wrapper { .editor-wrapper {
position: relative; position: relative;
cursor: not-allowed; cursor: not-allowed;

View File

@ -187,6 +187,19 @@ export function getTenantEnable() {
return process.env.VUE_APP_TENANT_ENABLE || true; return process.env.VUE_APP_TENANT_ENABLE || true;
} }
/**
* 获得验证码功能是否开启
*/
export function getCaptchaEnable() {
if (process.env.VUE_APP_CAPTCHA_ENABLE === "true") {
return true;
}
if (process.env.VUE_APP_CAPTCHA_ENABLE === "false") {
return false;
}
return process.env.VUE_APP_CAPTCHA_ENABLE || true;
}
/** /**
* 获得文档是否开启 * 获得文档是否开启
*/ */

View File

@ -1,228 +0,0 @@
<!--
filename: chart.vue
author: liubin
date: 2023-11-29 09:03:01
description:
-->
<template>
<div class="analysis-chart">
<!-- tt ct 选择 -->
<el-button
v-for="(item, index) in ['设备CT', '设备TT', '产线CT', '产线TT']"
:key="index"
:class="[index == activeIndex ? 'activeButton' : '']"
@click="activeIndex = index">
{{ item }}
</el-button>
<!-- chart -->
<div id="chart" ref="chartDiv" class="chart" style="margin-top: 12px" />
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'AnalysisChart',
components: {},
props: ['daterange', 'tableData'],
data() {
return {
activeIndex: 0,
chart: null,
templateOption: {
tooltip: {
trigger: 'axis',
},
legend: {
icon: 'roundRect',
itemWidth: 12,
itemHeight: 12,
},
grid: {
top: '12%',
left: '6%',
right: '6%',
bottom: '12%',
},
xAxis: {
name: '时间',
axisLabel: {
margin: 12,
rotate: -8,
},
axisTicks: {
show: false,
},
data: this.daterange || [
'2020-01-02',
'2020-02-02',
'2020-03-02',
'2020-04-02',
],
},
yAxis: {
name: ['设备CT', '设备TT', '产线CT', '产线TT'][this.activeIndex],
nameLocation: 'end',
nameGap: 28,
nameTextStyle: {
fontSize: 14,
align: 'right',
},
axisLine: {
show: true,
lineStyle: {
color: '#333',
opacity: 0.6,
},
},
},
series: [
{
name: 'der Hund',
type: 'line',
data: [15, undefined, 36, 11],
},
{
name: 'die Katze',
type: 'line',
data: [5, 2, 6, 3],
},
{
name: 'die Maus',
type: 'line',
data: [11, 12, 13, 10],
},
],
},
};
},
mounted() {
this.initChart();
},
deactivated() {},
watch: {
activeIndex(val) {
this.initChart(val);
},
},
methods: {
/**
*
* @param {object} row 表格的每一列
* @param {string} key 表格列prop的后缀
*/
getListFromTableRow(row, key = '_eq_ct') {
const list = [];
for (const prop of Object.keys(row).sort()) {
if (prop.endsWith(key)) {
list.push(row[prop]);
}
}
return list;
},
/** 初始化/设置 图表 */
initChart(val) {
console.log('tableData', this.tableData);
if (!this.chart) this.chart = echarts.init(this.$refs.chartDiv);
switch (val) {
case 0:
const eqCt = this.tableData.map((row) => ({
name: row.equName,
type: 'line',
symbol: 'circle',
symbolSize: 8,
data: this.getListFromTableRow(row, '_eq_ct'),
}));
this.chart.setOption({
...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '设备CT' },
series: eqCt,
});
break;
case 1:
const eqTt = this.tableData.map((row) => ({
name: row.equName,
type: 'line',
symbol: 'circle',
symbolSize: 8,
data: this.getListFromTableRow(row, '_eq_tt'),
}));
this.chart.setOption({
...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '设备TT' },
series: eqTt,
});
break;
case 2:
const plCt = this.tableData.map((row) => ({
name: row.equName,
type: 'line',
symbol: 'circle',
symbolSize: 8,
data: this.getListFromTableRow(row, '_pl_ct'),
}));
this.chart.setOption({
...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '产线CT' },
series: plCt,
});
break;
case 3:
const plTt = this.tableData.map((row) => ({
name: row.equName,
type: 'line',
symbol: 'circle',
symbolSize: 8,
data: this.getListFromTableRow(row, '_pl_tt'),
}));
this.chart.setOption({
...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '产线TT' },
series: plTt,
});
break;
default:
const eqCt2 = this.tableData.map((row) => ({
name: row.equName,
type: 'line',
symbol: 'circle',
symbolSize: 8,
data: this.getListFromTableRow(row, '_eq_ct'),
}));
this.chart.setOption({
...this.templateOption,
yAxis: { ...this.templateOption.yAxis, name: '设备CT' },
series: eqCt2,
});
}
},
},
};
</script>
<style scoped>
.analysis-chart {
width: 100%;
height: 100%;
}
.analysis-chart >>> .el-button {
background: #f1f1f1;
color: #333;
transition: all 0.3s;
border: none;
&.activeButton,
&:hover {
background: #0b58ff;
color: #fff;
}
}
#chart {
height: 100%;
/* background: #ccc; */
}
</style>

View File

@ -1,56 +1,51 @@
<template> <template>
<div class="app-container" style="flex: 1; height: 1px"> <div class="app-container">
<search-bar <search-bar
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="handleSearchBarBtnClick" /> @headBtnClick="handleSearchBarBtnClick" />
<!-- <div v-if="tableData.length"> --> <!-- <div v-if="tableData.length"> -->
<div class="custom-tabs" style=""> <el-tabs
<el-tabs v-model="activeName"
v-model="activeName" @tab-click="handleTabClick"
@tab-click="handleTabClick" style="height: 100%">
style="height: 100%"> <el-tab-pane :label="'\u2002数据列表\u2002'" name="table">
<el-tab-pane :label="'\u2002数据列表\u2002'" name="table"> <!-- @emitFun="handleEmitFun"> -->
<base-table <base-table
v-if="activeName == 'table' && ready" v-if="activeName == 'table'"
:span-method="mergeRow" :span-method="mergeColumnHandler"
:page="1" :page="1"
:limit="999" :limit="999"
:table-props="tableProps" :table-props="tableProps"
:table-data="tableData" /> :table-data="tableData" />
<div v-if="tableData.length == 0" class="no-data-bg"></div> </el-tab-pane>
</el-tab-pane> <el-tab-pane :label="'\u3000产线平衡分析图\u3000'" name="graph">
<el-tab-pane :label="'\u3000产线平衡分析图\u3000'" name="graph"> <div class="graph" style="height: 100%">
<div class="graph" style="height: 800px"> <!-- graph -->
<!-- graph --> <!-- <Graph
<AnalysisChart
v-if="activeName == 'graph'"
:table-data="tableData"
:daterange="dateArr"></AnalysisChart>
<!-- <div v-else class="no-data-bg"></div> -->
<!-- <Graph
v-if="list.length" v-if="list.length"
:equipment-list="list" :equipment-list="list"
:render="renderKey" /> --> :render="renderKey" /> -->
<!-- <BalanceChart ref="lineChart" /> --> <!-- <BalanceChart ref="lineChart" /> -->
<!-- <div v-if="list.length == 0" class="no-data-bg"></div> --> <div v-if="list.length == 0" class="no-data-bg"></div>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div>
<!-- <SearchBar :formConfigs="[{ label: '产线平衡分析图', type: 'title' }]" /> -->
<!-- </div>
<div v-else class="no-data-bg"></div> -->
</div> </div>
</template> </template>
<script> <script>
import BalanceChart from '../balanceChart'; import BalanceChart from '../balanceChart';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import AnalysisChart from './chart.vue';
export default { export default {
components: { components: {
BalanceChart, BalanceChart,
AnalysisChart,
}, },
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
@ -103,13 +98,6 @@ export default {
startTime: null, startTime: null,
endTime: null, endTime: null,
}, },
sectionMap: {},
lastSection: null,
currRowIndex: 0,
spanArr: [],
//
dateArr: [],
ready: false,
}; };
}, },
@ -168,19 +156,11 @@ export default {
const { data, nameData } = await this.getCT(); const { data, nameData } = await this.getCT();
await this.buildProps(nameData); await this.buildProps(nameData);
await this.buildTableData(data); await this.buildTableData(data);
this.tableData = this.tableData.sort((a, b) => { const xxxx = this.tableData;
if (a.sectionName < b.sectionName) return -1; debugger;
return 1;
});
// const p = this.tableProps
// const d = this.tableData
// debugger;
this.ready = true;
}, },
buildProps(nameData) { buildProps(nameData) {
this.initTableProps();
this.dateArr = [];
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
const dateArr = Array.from( const dateArr = Array.from(
@ -219,7 +199,7 @@ export default {
], ],
}); });
}); });
this.dateArr = dateArr;
resolve(); resolve();
} catch (err) { } catch (err) {
reject(err); reject(err);
@ -228,68 +208,38 @@ export default {
}, },
async buildTableData(data) { async buildTableData(data) {
this.tableData = []; /** 处理 工段 分组 */
const sectionArr = Array.from( const sectionList = data.map((item) => {});
new Set(data.map((item) => item.sectionName)) },
).sort();
const sectionMap = sectionArr.reduce( setRowSpan(arr) {
(sum, curr) => ({ ...sum, [curr]: 0 }), let count = 0;
{} arr.forEach((item, index) => {
); if (index === 0) {
this.spanArr.push(1);
console.log('sectionArr', sectionArr); } else {
console.log('sectionMap', sectionMap); if (item === arr[index - 1]) {
let spanArr = Array.from(sectionArr, () => 0); this.spanArr[count] += 1;
this.spanArr.push(0);
return new Promise((resolve, reject) => { } else {
/** 处理 工段 分组 */ count = index;
data.map((item) => { this.spanArr.push(1);
sectionMap[item.sectionName]++; }
/** 处理 设备 */
const row = {
equName: item.equName,
sectionName: item.sectionName,
};
item.data.forEach((eq) => {
const date = eq.dynamicName;
eq.children.forEach((sub) => {
if (sub.dynamicName == '设备CT')
row[date + '_eq_ct'] = sub.dynamicValue;
if (sub.dynamicName == '设备TT')
row[date + '_eq_tt'] = sub.dynamicValue;
if (sub.dynamicName == '产线CT')
row[date + '_pl_ct'] = sub.dynamicValue;
if (sub.dynamicName == '产线TT')
row[date + '_pl_tt'] = sub.dynamicValue;
});
});
this.tableData.push(row);
});
/** 生成span数组 */
const tmp = [...spanArr];
for (const [index, key] of sectionArr.entries()) {
tmp[index + 1] = tmp[index] + sectionMap[key];
} }
console.log('tep', tmp);
spanArr = tmp;
this.sectionMap = sectionMap;
this.spanArr = spanArr;
resolve();
}); });
}, },
mergeRow({ row, column, rowIndex, columnIndex }) { /** 合并table列的规则 */
if (columnIndex == 1) { mergeColumnHandler({ row, column, rowIndex, columnIndex }) {
const span = this.sectionMap[row.sectionName]; if (columnIndex == 0) {
if (this.spanArr.includes(rowIndex)) { if (this.spanArr[rowIndex]) {
console.log('span...'); return [
return [span, 1]; this.spanArr[rowIndex], // row span
1, // col span
];
} else {
return [0, 0];
} }
return [0, 0];
} }
}, },
@ -369,7 +319,6 @@ export default {
// this.dataListLoading = false; // this.dataListLoading = false;
}); });
}, },
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':
@ -432,23 +381,3 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
.custom-tabs >>> .el-tabs__header {
margin-bottom: 8px;
display: inline-block;
transform: translateY(-12px);
}
.custom-tabs >>> .el-tabs__item {
padding-left: 0px !important;
padding-right: 0px !important;
line-height: 36px !important;
height: 36px;
}
.custom-tabs >>> .el-tabs__content {
height: calc(100% - 42px);
}
.custom-tabs >>> .el-tab-pane {
height: 100%;
}
</style>

View File

@ -9,8 +9,7 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="mode.includes('detail') ? true : false" :wrapper-closable="false"
:before-close="handleCancel"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
:size="size || '50%'" :size="size || '50%'"
@ -130,12 +129,13 @@
</section> </section>
</div> </div>
<div v-if="!mode.includes('detail')" class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button> <el-button style="" @click="handleCancel">返回</el-button>
<el-button <el-button
type="primary" type="primary"
v-if="!mode.includes('detail')"
@click="handleSave"> @click="handleSave">
确定 保存
</el-button> </el-button>
</div> </div>
</div> </div>

View File

@ -9,8 +9,7 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="mode.includes('detail') ? true : false" :wrapper-closable="false"
:before-close="handleCancel"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
:size="size || '50%'" :size="size || '50%'"
@ -129,10 +128,11 @@
</section> </section>
</div> </div>
<div v-if="!mode.includes('detail')" class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button> <el-button style="" @click="handleCancel">取消</el-button>
<el-button <el-button
type="primary" type="primary"
v-if="!mode.includes('detail')"
@click="handleCancel"> @click="handleCancel">
确定 确定
</el-button> </el-button>

View File

@ -34,7 +34,7 @@
<base-dialog <base-dialog
:dialogTitle="title" :dialogTitle="title"
:dialogVisible="open" :dialogVisible="open"
width="30%" width="700px"
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">

View File

@ -25,7 +25,6 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="90"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>
@ -42,7 +41,7 @@
<base-dialog <base-dialog
:dialogTitle="title" :dialogTitle="title"
:dialogVisible="open" :dialogVisible="open"
width="45%" width="700px"
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
@ -128,7 +127,7 @@ export default {
// width: 180, // width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), // filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// }, // },
{ prop: 'code', label: '编码', showOverflowtooltip: true }, { prop: 'code', label: '编码' },
{ prop: 'plcTableName', label: '关联表名' }, { prop: 'plcTableName', label: '关联表名' },
{ prop: 'name', label: '标识名称' }, { prop: 'name', label: '标识名称' },
{ prop: 'enName', label: '英文名称' }, { prop: 'enName', label: '英文名称' },
@ -137,7 +136,7 @@ export default {
label: '是否采集', label: '是否采集',
subcomponent: switchBtn, subcomponent: switchBtn,
}, },
{ prop: 'description', label: '描述', showOverflowtooltip: true }, { prop: 'description', label: '描述' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -214,28 +213,16 @@ export default {
}, },
], ],
[ [
// {
// switch: true,
// label: '', // 0 , 1
// prop: 'collection',
// bind: {
// 'active-value': 1,
// 'inactive-value': 0,
// value: 1,
// },
// },
{ {
select: true, switch: true,
options: [ label: '是否采集', // 0 , 1
{ label: '否', value: 0 },
{ label: '是', value: 1 }
],
label: '是否采集',
prop: 'collection', prop: 'collection',
bind: { bind: {
clearable: true, filterable: true 'active-value': 1,
} 'inactive-value': 0,
} value: 1,
},
},
], ],
[ [
{ {

View File

@ -9,8 +9,7 @@
<el-drawer <el-drawer
:visible="visible" :visible="visible"
:show-close="false" :show-close="false"
:wrapper-closable="mode.includes('detail') ? true : false" :wrapper-closable="false"
:before-close="handleCancel"
class="drawer" class="drawer"
custom-class="mes-drawer" custom-class="mes-drawer"
:size="size || '50%'" :size="size || '50%'"
@ -148,12 +147,13 @@
</section> </section>
</div> </div>
<div v-if="!mode.includes('detail')" class="drawer-body__footer"> <div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button> <el-button style="" @click="handleCancel">取消</el-button>
<el-button <el-button
type="primary" type="primary"
v-if="!mode.includes('detail')"
@click="handleSave"> @click="handleSave">
确定 保存
</el-button> </el-button>
</div> </div>
</div> </div>

View File

@ -12,8 +12,7 @@
:show-close="false" :show-close="false"
:wrapper-closable="isdetail" :wrapper-closable="isdetail"
class="drawer" class="drawer"
size="60%" size="60%">
@closed="$emit('destroy')">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ isdetail ? '查看详情' : !dataForm.id ? '新增' : '编辑' }} {{ isdetail ? '查看详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title> </small-title>
@ -266,7 +265,6 @@ export default {
this.fileName = this.dataForm.files[0].fileName this.fileName = this.dataForm.files[0].fileName
} }
this.setConfig() this.setConfig()
this.setInspectionContet()
}); });
} else { } else {
// if (this.urlOptions.isGetCode) { // if (this.urlOptions.isGetCode) {

View File

@ -49,8 +49,7 @@
<addRecord <addRecord
v-if="addOrUpdateVisible" v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getList" @refreshDataList="getList" />
@destroy="addOrUpdateVisible = false" />
</div> </div>
</template> </template>

View File

@ -49,7 +49,7 @@
<script> <script>
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
// import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record' import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
@ -67,7 +67,7 @@ const remainBox = {
color() { color() {
if (this.value) { if (this.value) {
const v = +this.value; const v = +this.value;
return v < 0 ? '#FF5454' : v >= 0 && v < 2 ? '#FFD767' : '#37D97F'; return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
} }
return 'unset'; return 'unset';
}, },
@ -78,10 +78,9 @@ const remainBox = {
style={`background: ${ style={`background: ${
this.color this.color
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${ }; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
// this.color == 'red' ? '#fff' : 'unset' this.color == 'red' ? '#fff' : 'unset'
'#fff'
}`}> }`}>
{ this.injectData[this.injectData.prop]?.toFixed(0) || '' } {this.injectData[this.injectData.prop] || ''}
</div> </div>
); );
}, },
@ -122,35 +121,30 @@ export default {
// width: 180, // width: 180,
// filter: parseTime(createTime), // filter: parseTime(createTime),
// }, // },
{ prop: 'name', label: '保养计划', minWidth: 100, showOverflowtooltip: true }, { prop: 'name', label: '保养计划' },
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true }, { prop: 'lineName', label: '产线名' },
{ prop: 'sectionName', label: '工段名', minWidth: 100, showOverflowtooltip: true }, { prop: 'sectionName', label: '工段名' },
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true }, { prop: 'equipmentName', label: '设备名称' },
{ prop: 'equipmentCode', label: '设备编码', minWidth: 100, showOverflowtooltip: true }, { prop: 'equipmentCode', label: '设备编码' },
{ prop: 'maintenancePeriod', label: '保养频率' }, { prop: 'maintenancePeriod', label: '保养频率' },
{ {
prop: 'maintainType', prop: 'maintainType',
label: '保养类型', label: '保养类型',
showOverflowtooltip: true,
filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE), filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
}, },
{ {
prop: 'lastMaintainTime', prop: 'lastMaintainTime',
label: '上次保养时间', label: '上次保养时间',
filter: parseTime, filter: parseTime,
minWidth: 150,
showOverflowtooltip: true
}, },
{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true }, { prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime },
{ {
prop: 'remainDays', prop: 'remainDays',
label: '距离保养时间(天)', label: '距离保养时间(天)',
subcomponent: remainBox, subcomponent: remainBox,
minWidth: 150,
// showOverflowtooltip: true
}, },
{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn, width: 100 }, { prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn, width: 100 }, { prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -182,7 +176,6 @@ export default {
: '', : '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
plain: true,
color: 'warning', color: 'warning',
}, },
], ],

View File

@ -99,24 +99,23 @@ export default {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
fixed: true, fixed: true,
width: 150, width: 180,
filter: timeFilter, filter: timeFilter,
}, },
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 110, showOverflowtooltip: true }, { prop: 'maintainOrderNumber', label: '设备保养单号' },
{ prop: 'startTime', label: '开始时间', filter: timeFilter, minWidth: 150, showOverflowtooltip: true }, { prop: 'startTime', label: '开始时间', filter: timeFilter },
{ prop: 'endTime', label: '结束时间', filter: timeFilter, minWidth: 150, showOverflowtooltip: true }, { prop: 'endTime', label: '结束时间', filter: timeFilter },
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true }, { prop: 'equipmentName', label: '设备名称' },
{ prop: 'maintainWorker', label: '保养人员', minWidth: 100, showOverflowtooltip: true }, { prop: 'maintainWorker', label: '保养人员' },
{ {
prop: 'relatePlan', prop: 'relatePlan',
label: '是否计划保养', label: '是否计划保养',
width: 120,
filter: (v) => (v != null ? ['', '是', '否'][v] : ''), filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
}, },
{ prop: 'planName', label: '保养计划名称', minWidth: 120, showOverflowtooltip: true }, { prop: 'planName', label: '保养计划名称' },
{ prop: 'maintainDuration', label: '计划保养用时(h)', minWidth: 130, showOverflowtooltip: true }, { prop: 'maintainDuration', label: '计划保养用时(h)' },
{ prop: 'timeUsed', label: '实际保养用时(h)', minWidth: 130 }, { prop: 'timeUsed', label: '实际保养用时(h)' },
{ prop: 'remark', label: '备注', minWidth: 100, showOverflowtooltip: true }, { prop: 'remark', label: '备注' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -163,15 +162,6 @@ export default {
{ {
type: 'separate', type: 'separate',
}, },
{
type: this.$auth.hasPermi('equipment:maintain-record:export')
? 'button'
: '',
btnName: '导出',
name: 'export',
plain: true,
color: 'warning',
},
{ {
type: this.$auth.hasPermi('equipment:maintain-record:create') type: this.$auth.hasPermi('equipment:maintain-record:create')
? 'button' ? 'button'
@ -181,6 +171,14 @@ export default {
plain: true, plain: true,
color: 'success', color: 'success',
}, },
{
type: this.$auth.hasPermi('equipment:maintain-record:export')
? 'button'
: '',
btnName: '导出',
name: 'export',
color: 'warning',
},
], ],
rows: [ rows: [
[ [
@ -215,29 +213,17 @@ export default {
}, },
], ],
[ [
// {
// switch: true,
// label: '',
// prop: 'relatePlan',
// bind: {
// 'active-value': 1,
// 'inactive-value': 2,
// },
// rules: [{ required: true, message: '', trigger: 'blur' }],
// },
{ {
select: true, switch: true,
options: [
{ label: '是', value: 1 },
{ label: '否', value: 2 }
],
label: '是否计划保养', label: '是否计划保养',
prop: 'relatePlan', prop: 'relatePlan',
bind: { bind: {
clearable: true, filterable: true 'active-value': 1,
'inactive-value': 2,
}, },
rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }], rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
}, },
{},
{ {
select: true, select: true,
label: '所属计划', label: '所属计划',
@ -248,11 +234,6 @@ export default {
clearable: true, clearable: true,
}, },
}, },
{
input: true,
label: '保养用时',
prop: 'timeUsed',
},
], ],
[ [
{ {
@ -279,7 +260,11 @@ export default {
clearable: true, clearable: true,
}, },
}, },
{} {
input: true,
label: '保养用时',
prop: 'timeUsed',
},
], ],
[ [

View File

@ -9,168 +9,166 @@
<el-drawer <el-drawer
:visible.sync="visible" :visible.sync="visible"
:show-close="false" :show-close="false"
:wrapper-closable="disabled" :wrapper-closable="false"
class="drawer" class="drawer"
custom-class="mes-drawer" size="60%">
size="65%"
@closed="$emit('destroy')">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }} {{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }}
</small-title> </small-title>
<div class="drawer-body flex"> <el-form
<div class="drawer-body__content"> ref="form"
<el-form :model="dataForm"
ref="form" label-width="100px"
:model="dataForm" label-position="top"
label-width="100px" v-loading="formLoading">
label-position="top" <el-row :gutter="20">
v-loading="formLoading"> <el-col :span="8">
<el-row :gutter="20"> <el-form-item label="维修单号" prop="repairOrderNumber">
<el-col :span="8"> <span>{{ dataForm.repairOrderNumber }}</span>
<el-form-item label="维修单号" prop="repairOrderNumber"> </el-form-item>
<span>{{ dataForm.repairOrderNumber }}</span> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="设备名称" prop="equipmentName">
<el-col :span="8"> <span>{{ dataForm.equipmentName }}</span>
<el-form-item label="设备名称" prop="equipmentName"> </el-form-item>
<span>{{ dataForm.equipmentName }}</span> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="维修工" prop="repairman">
<el-col :span="8"> <span>{{ dataForm.repairman }}</span>
<el-form-item label="维修工" prop="repairman"> </el-form-item>
<span>{{ dataForm.repairman }}</span> </el-col>
</el-form-item> </el-row>
</el-col> <el-row :gutter="20">
</el-row> <el-col :span="8">
<el-row :gutter="20"> <el-form-item label="故障发生时间" prop="faultTime">
<el-col :span="8"> <span>{{ parseTime(dataForm.faultTime) }}</span>
<el-form-item label="故障发生时间" prop="faultTime"> </el-form-item>
<span>{{ parseTime(dataForm.faultTime) }}</span> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="故障级别" prop="faultLevel">
<el-col :span="8"> <span>{{ getDictDataLabel('fault-level', dataForm.faultLevel) }}</span>
<el-form-item label="故障级别" prop="faultLevel"> </el-form-item>
<span>{{ getDictDataLabel('fault-level', dataForm.faultLevel) }}</span> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="联系方式" prop="repairmanPhone">
<el-col :span="8"> <span>{{ dataForm.repairmanPhone }}</span>
<el-form-item label="联系方式" prop="repairmanPhone"> </el-form-item>
<span>{{ dataForm.repairmanPhone }}</span> </el-col>
</el-form-item> </el-row>
</el-col> <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
</el-row> {{ '可编辑信息' }}
</small-title>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item
label="维修开始时间"
prop="maintenanceStartTime"
:rules="[{ required: true, message: '维修开始时间不能为空', trigger: 'blur' }]">
<el-date-picker
v-model="dataForm.maintenanceStartTime"
type="datetime"
:disabled="disabled"
placeholder="请选择维修开始时间"
value-format="timestamp" />
</el-form-item>
</el-col>
<el-divider style="margin-top: -10px" /> <el-col :span="8">
<el-form-item
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true"> label="维修结束时间"
{{ '设备维修信息' }} prop="maintenanceFinishTime"
</small-title> :rules="[{ required: true, message: '维修结束时间不能为空', trigger: 'blur' }]">
<el-row :gutter="20"> <el-date-picker
<el-col :span="6"> v-model="dataForm.maintenanceFinishTime"
<el-form-item type="datetime"
label="维修开始时间" :disabled="disabled"
prop="maintenanceStartTime" placeholder="请选择维修开始时间"
:rules="[{ required: true, message: '维修开始时间不能为空', trigger: 'blur' }]"> value-format="timestamp" />
<el-date-picker </el-form-item>
v-model="dataForm.maintenanceStartTime" </el-col>
type="datetime"
:disabled="disabled"
placeholder="请选择维修开始时间"
value-format="timestamp" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
label="维修结束时间"
prop="maintenanceFinishTime"
:rules="[{ required: true, message: '维修结束时间不能为空', trigger: 'blur' }]">
<el-date-picker
v-model="dataForm.maintenanceFinishTime"
type="datetime"
:disabled="disabled"
placeholder="请选择维修开始时间"
value-format="timestamp" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
label="维修方式"
prop="repairMode"
:rules="[{ required: true, message: '维修方式不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.repairMode"
placeholder="请选择维修方式">
<el-option
v-for="opt in getDictDatas('repair-mode')"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="故障类型" prop="faultType">
<el-select
:disabled="disabled"
v-model="dataForm.faultType"
placeholder="请选择故障类型">
<el-option
v-for="opt in getDictDatas('fault-type')"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20"> <el-col :span="8">
<el-col> <el-form-item
<el-form-item label="维修方式"
label="故障明细" prop="repairMode"
prop="faultDetail" :rules="[{ required: true, message: '维修方式不能为空', trigger: 'blur' }]">
:rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]"> <el-select
<!-- // --> :disabled="disabled"
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="150"/> v-model="dataForm.repairMode"
</el-form-item> placeholder="请选择维修方式">
</el-col> <el-option
</el-row> v-for="opt in getDictDatas('repair-mode')"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="故障类型" prop="faultType">
<el-select
:disabled="disabled"
v-model="dataForm.faultType"
placeholder="请选择故障类型">
<el-option
v-for="opt in getDictDatas('fault-type')"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col> <el-col>
<el-form-item label="维修记录" prop="maintenanceDetail"> <el-form-item
<!-- // --> label="故障明细"
<editor v-model="dataForm.maintenanceDetail" :read-only="disabled" :min-height="150"/> prop="faultDetail"
</el-form-item> :rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]">
</el-col> <!-- // -->
</el-row> <editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="380"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col> <el-col>
<el-form-item label="维修附件" prop="file"> <el-form-item label="维修记录" prop="maintenanceDetail">
<FileUpload v-model="file" :limit="1" :f-name="fileName" :disabled="disabled" @name="setFileName" /> <!-- // -->
</el-form-item> <editor v-model="dataForm.maintenanceDetail" :read-only="disabled" :min-height="380"/>
</el-col> </el-form-item>
</el-row> </el-col>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col> <el-col>
<el-form-item label="备注" prop="remark"> <el-form-item label="维修附件" prop="file">
<el-input <FileUpload v-model="file" :limit="1" :f-name="fileName" :disabled="disabled" @name="setFileName" />
v-model="dataForm.remark" </el-form-item>
:placeholder="`请输入备注`" </el-col>
:disabled="disabled" /> </el-row>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div v-if="!disabled" class="drawer-body__footer"> <el-row :gutter="20">
<el-button style="" @click="goback()">取消</el-button> <el-col>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button> <el-form-item label="备注" prop="remark">
</div> <el-input
</div> v-model="dataForm.remark"
:placeholder="`请输入备注`"
:disabled="disabled" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">{{ disabled ? '返回' : '取消' }}</el-button>
<!-- <el-button v-if="disabled" type="primary" @click="goEdit()">
编辑
</el-button> -->
<el-button v-if="!disabled" type="primary" @click="dataFormSubmit()">确定</el-button>
</div> </div>
</el-drawer> </el-drawer>
</template> </template>
@ -302,39 +300,56 @@ export default {
</script> </script>
<style scoped> <style scoped>
.el-date-editor,
.el-select {
width: 100%;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
.drawer >>> .el-drawer { .drawer >>> .el-drawer {
border-radius: 8px 0 0 8px; border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
}
.drawer >>> .el-form-item__label {
padding: 0;
} }
.drawer >>> .el-drawer__header { .drawer >>> .el-drawer__header {
margin: 0; margin: 0;
padding: 32px 32px 24px; padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6; border-bottom: 1px solid #dcdfe6;
margin-bottom: 0px;
} }
.drawer >>> .el-drawer__body {
.small-title::before { flex: 1;
content: ''; height: 1px;
display: inline-block;
vertical-align: top;
width: 4px;
height: 22px;
border-radius: 1px;
margin-right: 8px;
background-color: #0b58ff;
}
.drawer-body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%;
} }
.drawer-body__content { .drawer >>> .content {
padding: 30px 24px;
flex: 1; flex: 1;
/* background: #eee; */ display: flex;
padding: 20px 30px; flex-direction: column;
overflow-y: auto; /* height: 100%; */
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
} }
.drawer-body__footer { .drawer-body__footer {

View File

@ -17,7 +17,7 @@
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
label="操作" label="操作"
:width="120" :width="180"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table>
@ -48,8 +48,7 @@
<CustomDialogForm <CustomDialogForm
v-if="addOrUpdateVisible" v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getList" @refreshDataList="getList" />
@destroy="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -70,6 +69,12 @@ export default {
addOrUpdateVisible: false, addOrUpdateVisible: false,
searchBarKeys: ['maintenanceStatus', 'createTime', 'equipmentId'], searchBarKeys: ['maintenanceStatus', 'createTime', 'equipmentId'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:repair:update')
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi('equipment:repair:finish') this.$auth.hasPermi('equipment:repair:finish')
? { ? {
type: 'finish', type: 'finish',
@ -78,16 +83,10 @@ export default {
: undefined, : undefined,
this.$auth.hasPermi('equipment:repair:update') this.$auth.hasPermi('equipment:repair:update')
? { ? {
type: 'detail', type: 'edit',
btnName: '详情', btnName: '修改',
} }
: undefined, : undefined,
// this.$auth.hasPermi('equipment:repair:update')
// ? {
// type: 'edit',
// btnName: '',
// }
// : undefined,
this.$auth.hasPermi('equipment:repair:delete') this.$auth.hasPermi('equipment:repair:delete')
? { ? {
type: 'delete', type: 'delete',
@ -100,31 +99,29 @@ export default {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
fixed: true, fixed: true,
width: 150, width: 180,
filter: parseTime, filter: parseTime,
}, },
{ prop: 'repairOrderNumber', label: '设备维修单号', minWidth: 100, showOverflowtooltip: true }, { prop: 'repairOrderNumber', label: '设备维修单号' },
{ prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true }, { prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime },
{ {
prop: 'maintenanceFinishTime', prop: 'maintenanceFinishTime',
label: '结束时间', label: '结束时间',
filter: parseTime, filter: parseTime,
minWidth: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'maintenanceStatus', prop: 'maintenanceStatus',
label: '维修状态', label: '维修状态',
filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''), filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
}, },
{ prop: 'maintenanceDuration', label: '维修时长(h)', width: 110 }, { prop: 'maintenanceDuration', label: '维修时长(h)' },
{ prop: 'lineName', label: '产线' }, { prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' }, { prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true }, { prop: 'equipmentName', label: '设备名称' },
{ prop: 'maintenanceDetail', label: '维修明细' }, { prop: 'maintenanceDetail', label: '维修明细' },
{ prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true }, { prop: 'repairman', label: '维修工' },
{ prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true }, { prop: 'repairmanPhone', label: '联系方式' },
{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true }, { prop: 'remark', label: '备注' },
], ],
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -179,7 +176,6 @@ export default {
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '', type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
plain: true,
color: 'warning', color: 'warning',
}, },
], ],

View File

@ -80,8 +80,6 @@
<el-select <el-select
v-if="open" v-if="open"
style="width: 100%" style="width: 100%"
filterable
clearable
v-model="queryParams.equipmentId" v-model="queryParams.equipmentId"
placeholder="请选择一个设备"> placeholder="请选择一个设备">
<el-option <el-option

View File

@ -80,6 +80,13 @@
<!-- 表单 --> <!-- 表单 -->
<div class="form-cont"> <div class="form-cont">
<el-tabs
class="form"
v-model="loginForm.loginType"
style="float: none">
<el-tab-pane label="账号密码登录" name="uname"></el-tab-pane>
<el-tab-pane label="短信验证码登录" name="sms"></el-tab-pane>
</el-tabs>
<div style=""> <div style="">
<el-form <el-form
ref="loginForm" ref="loginForm"
@ -99,7 +106,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<!-- 账号密码登录 --> <!-- 账号密码登录 -->
<div> <div v-if="loginForm.loginType === 'uname'">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
@ -132,6 +139,56 @@
</el-checkbox> </el-checkbox>
</div> </div>
<!-- 短信验证码登录 -->
<div v-if="loginForm.loginType === 'sms'">
<el-form-item prop="mobile">
<el-input
v-model="loginForm.mobile"
type="text"
auto-complete="off"
placeholder="请输入手机号">
<!-- <svg-icon
slot="prefix"
icon-class="phone"
class="el-input__icon input-icon" /> -->
</el-input>
</el-form-item>
<el-form-item prop="mobileCode">
<el-input
v-model="loginForm.mobileCode"
type="text"
auto-complete="off"
placeholder="短信验证码"
class="sms-login-mobile-code-prefix"
@keyup.enter.native="handleLogin">
<!-- <template>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon" />
</template> -->
<template slot="suffix">
<span
v-if="mobileCodeTimer <= 0"
class="getMobileCode"
@click="getSmsCode"
style="
cursor: pointer;
color: #0b58ff;
font-size: calc(12 * 0.12vh);
line-height: calc(54 * 0.12vh);
padding-right: calc(10 * 0.12vh);
">
获取验证码
</span>
<span v-if="mobileCodeTimer > 0" class="getMobileCode">
{{ mobileCodeTimer }}秒后可重新获取
</span>
</template>
</el-input>
</el-form-item>
</div>
<!-- 下方的登录按钮 --> <!-- 下方的登录按钮 -->
<el-form-item <el-form-item
id="button-form-item" id="button-form-item"
@ -170,6 +227,13 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 图形验证码 -->
<Verify
ref="verify"
:captcha-type="'blockPuzzle'"
:img-size="{ width: '400px', height: '200px' }"
@success="handleLogin" />
</div> </div>
</template> </template>
@ -177,7 +241,7 @@
import { sendSmsCode, socialAuthRedirect } from '@/api/login'; import { sendSmsCode, socialAuthRedirect } from '@/api/login';
import { getTenantIdByName } from '@/api/system/tenant'; import { getTenantIdByName } from '@/api/system/tenant';
import { SystemUserSocialTypeEnum } from '@/utils/constants'; import { SystemUserSocialTypeEnum } from '@/utils/constants';
import { getTenantEnable } from '@/utils/ruoyi'; import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi';
import { import {
getPassword, getPassword,
getRememberMe, getRememberMe,
@ -205,7 +269,7 @@ export default {
data() { data() {
return { return {
codeUrl: '', codeUrl: '',
captchaEnable: false, captchaEnable: true,
tenantEnable: true, tenantEnable: true,
mobileCodeTimer: 0, mobileCodeTimer: 0,
loginForm: { loginForm: {
@ -283,6 +347,8 @@ export default {
} }
}); });
} }
//
this.captchaEnable = getCaptchaEnable();
// //
this.redirect = this.$route.query.redirect this.redirect = this.$route.query.redirect
? decodeURIComponent(this.$route.query.redirect) ? decodeURIComponent(this.$route.query.redirect)
@ -294,7 +360,15 @@ export default {
}, },
methods: { methods: {
getCode() { getCode() {
this.handleLogin({}); //
if (!this.captchaEnable) {
this.handleLogin({});
return;
}
//
//
this.$refs.verify.show();
}, },
getCookie() { getCookie() {
const username = getUsername(); const username = getUsername();
@ -448,7 +522,4 @@ export default {
top: 22%; top: 22%;
} }
} }
.form-cont {
padding-top: 40px;
}
</style> </style>

View File

@ -115,12 +115,12 @@ export default {
vm.$set( vm.$set(
vm.searchBarFormConfig[0], vm.searchBarFormConfig[0],
'defaultSelect', 'defaultSelect',
to.params.equipmentName to.params.equipmentCode
); );
vm.$set( vm.$set(
vm.searchBarFormConfig[1], vm.searchBarFormConfig[1],
'defaultSelect', 'defaultSelect',
to.params.equipmentCode to.params.equipmentName
); );
vm.handleQuery(); vm.handleQuery();
}); });

View File

@ -33,7 +33,7 @@
:data-value="fc.id" :data-value="fc.id"
class="factory-list__item" class="factory-list__item"
:class="{ 'is-current': fc.id == currentFactory?.id }"> :class="{ 'is-current': fc.id == currentFactory?.id }">
<span :data-value="fc.id"> <span>
{{ fc.label }} {{ fc.label }}
</span> </span>
<svg-icon <svg-icon
@ -98,7 +98,9 @@
</base-table> </base-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph"> <el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
<div class="graph" style="height: 100%"> <div
class="graph"
style="height: 100%;">
<!-- graph --> <!-- graph -->
<Graph <Graph
v-if="list.length" v-if="list.length"

View File

@ -256,11 +256,10 @@ export default {
}, },
mounted() { mounted() {
if (this.$route.query.woIdString) { if (this.$route.query.woIdString) {
console.log(this.$route.query.woIdString) console.log(this.$route.query.woIdString);
this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',') this.queryParams.workOrderIdList = [this.$route.query.woIdString]
// this.queryParams.workOrderIdList = [this.$route.query.woIdString]
// let arr =[] // let arr =[]
this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',') this.searchBarFormConfig[0].defaultSelect = [this.$route.query.woIdString]
console.log(this.searchBarFormConfig[0].defaultSelect); console.log(this.searchBarFormConfig[0].defaultSelect);
} }
// if (this.$route.params.startTime && this.$route.params.endTime) { // if (this.$route.params.startTime && this.$route.params.endTime) {