Compare commits

..

10 Commits

23 changed files with 1020 additions and 818 deletions

Binary file not shown.

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>上传</title>
<g id="组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.65">
<g id="上传_Resources/Button" transform="translate(-12.000000, -9.000000)">
<g id="上传" transform="translate(12.000000, 9.000000)">
<g id="upload" transform="translate(0.875000, 0.875000)" fill="currentColor" fill-rule="nonzero">
<path d="M5.80371094,0.138085937 C5.8953125,0.046484375 6.01699219,0 6.13867188,0 C6.26035156,0 6.38066406,0.046484375 6.47363281,0.138085937 L8.60371094,2.26953125 C8.78828125,2.45410156 8.78828125,2.75351562 8.60371094,2.93808594 C8.51484375,3.02695312 8.39589844,3.07617188 8.27011719,3.07617188 C8.14433594,3.07617188 8.02539062,3.02695312 7.93652344,2.93808594 L6.61171875,1.61328125 L6.61171875,9.51289062 C6.61171875,9.77402344 6.39980469,9.9859375 6.13867188,9.9859375 C5.87753906,9.9859375 5.665625,9.77402344 5.665625,9.51289062 L5.665625,1.61328125 L4.34082031,2.93808594 C4.15625,3.12265625 3.85683594,3.12265625 3.67363281,2.93808594 C3.4890625,2.75351562 3.4890625,2.45410156 3.67226563,2.26953125 L5.80371094,0.138085937 Z M11.7769531,7.88046875 C11.5158203,7.88046875 11.3039063,8.09238281 11.3039063,8.35351563 L11.3039063,11.025 C11.3039063,11.1794922 11.178125,11.3066406 11.0222656,11.3066406 L1.22636719,11.3066406 C1.071875,11.3066406 0.944726562,11.1808594 0.944726562,11.025 L0.944726562,8.35214844 C0.944726562,8.09101563 0.7328125,7.87910156 0.471679688,7.87910156 C0.210546875,7.87910156 0,8.09238281 0,8.35214844 L0,11.3996094 C0,11.8685547 0.381445313,12.2486328 0.849023437,12.2486328 L11.4009766,12.2486328 C11.8699219,12.2486328 12.25,11.8671875 12.25,11.3996094 L12.25,8.35214844 C12.25,8.09238281 12.0380859,7.88046875 11.7769531,7.88046875 Z" id="Shape"></path>
</g>
<rect id="Rectangle-49" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

BIN
src/assets/logo/cnbm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1,10 +1,13 @@
/* ===== PC DESIGN ===== */ /* ===== PC DESIGN ===== */
$W: 1000; $W: 1080;
$H: 1920; $H: 1920;
$picW: 438; // $picW: 438;
$picH: 560; // $picH: 560;
$formW: 320; $picW: 1080;
$picH: 1118;
$formW: 420;
$tabW: $formW / 2; $tabW: $formW / 2;
// $rowH: 56;
$rowH: 56; $rowH: 56;
$buttonH: 50; $buttonH: 50;
@@ -15,6 +18,7 @@ $containerBgImage: '../assets/images/bg.png';
$logoWidth: 417px; $logoWidth: 417px;
$logoHeight: 64px; $logoHeight: 64px;
$logoImage: '../assets/logo/login-logo.png'; $logoImage: '../assets/logo/login-logo.png';
$cnbmLogo: '../assets/logo/cnbm.png';
// container-content // container-content
$contentWidth: round($W / $H * 100) * 1vw; $contentWidth: round($W / $H * 100) * 1vw;
$contentHeight: round($picH / $W * 100) / 100 * $contentWidth; $contentHeight: round($picH / $W * 100) / 100 * $contentWidth;
@@ -22,7 +26,8 @@ $contentBgColor: #ffffff;
// container-content-pic // container-content-pic
$picWidth: round($picW / $H * 100) * 1vw; $picWidth: round($picW / $H * 100) * 1vw;
$picHeight: inherit; $picHeight: inherit;
$picImage: '../assets/images/pic.png'; // $picImage: '../assets/images/pic.png';
$picImage: '../assets/images/login-bg.png';
// container-content-field // container-content-field
$fieldWidth: $contentWidth - $picWidth; $fieldWidth: $contentWidth - $picWidth;
$fieldHeight: inherit; $fieldHeight: inherit;
@@ -40,7 +45,9 @@ $buttonHeight: $buttonH * 1px;
float: right; float: right;
img { img {
cursor: pointer; cursor: pointer;
width:100%;max-width:100px; height:auto; width: 100%;
max-width: 100px;
height: auto;
vertical-align: middle; vertical-align: middle;
} }
} }
@@ -50,7 +57,7 @@ $buttonHeight: $buttonH * 1px;
min-width: 1080px; min-width: 1080px;
min-height: 620px; min-height: 620px;
background-color: $containerBgColor; background-color: $containerBgColor;
background-image: url($containerBgImage); // background-image: url($containerBgImage);
background-size: cover; background-size: cover;
// 定位 // 定位
position: relative; position: relative;
@@ -75,49 +82,87 @@ $buttonHeight: $buttonH * 1px;
} }
.content { .content {
// 元素 // 元素
width: $contentWidth; // width: $contentWidth;
height: $contentHeight; // height: $contentHeight;
width: 100%;
height: 100%;
background-color: #ffffff; background-color: #ffffff;
box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07); // box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07);
border-radius: 20px; // border-radius: 20px;
// 定位 // 定位
position: relative; position: relative;
display: flex;
.pic { .pic {
// 元素 // 元素
width: $picWidth; width: $picWidth;
height: $picHeight; height: $picHeight;
background-image: url($picImage); background-image: url($picImage);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: 100% 100%;
border-radius: 20px 0 0 20px; background-position: 0 0;
// 定位 position: relative;
&::after {
content: '';
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%;
height: 100%;
// background: #f003;
display: inline-block;
}
} }
.field { .field {
width: $fieldWidth; // background: #ccc3;
height: $fieldHeight; position: relative;
// 定位 padding-top: 196px;
position: absolute; flex: 1;
top: 0;
left: $picWidth;
display: flex; display: flex;
justify-content: center; flex-direction: column;
// justify-content: center;
align-items: center; align-items: center;
.pc-title{ width: 100%; clear: both;} .pc-title {
width: 100%;
text-align: center;
clear: both;
position: relative;
top: -36px;
// h3.title {
// position: relative;
// &::before {
// content: '';
// background: url($cnbmLogo) 100% / 100% no-repeat;
// height: 48px;
// width: 48px;
// position: absolute;
// left: 0px;
// top: 4px;
// display: inline-block;
// }
// }
}
.mobile-title, .mobile-title,
.mobile-switch { .mobile-switch {
display: none; display: none;
} }
.form { .form {
margin-top: 32px;
box-sizing: border-box; box-sizing: border-box;
width: $formWidth; // width: $formWidth;
width: 100%;
// - - - tab // - - - tab
:deep(.el-tabs__nav) {
// background: #f0f3;
}
:deep(.el-tabs__content) { :deep(.el-tabs__content) {
padding: 20px 0 0; padding: 20px 0 0;
} }
:deep(.el-tabs__item) { :deep(.el-tabs__item) {
user-select: none;
// 元素 // 元素
width: $tabWidth; width: $tabWidth;
height: $rowHeight; height: $rowHeight;
@@ -125,10 +170,13 @@ $buttonHeight: $buttonH * 1px;
// 文字 // 文字
line-height: $rowHeight; line-height: $rowHeight;
color: #666666; color: #666666;
font-size: 18px;
font-weight: 400;
text-align: center;
} }
:deep(.el-tabs__item.is-active) { :deep(.el-tabs__item.is-active) {
font-weight: bold; font-weight: 500;
color: #2F53EB; color: #2f53eb;
} }
:deep(.el-tabs__active-bar) { :deep(.el-tabs__active-bar) {
height: 3px; height: 3px;
@@ -152,22 +200,26 @@ $buttonHeight: $buttonH * 1px;
// 文字 // 文字
text-align: left; text-align: left;
} }
:deep(.el-input__inner::-webkit-input-placeholder) { /* WebKit browsers */ :deep(.el-input__inner::-webkit-input-placeholder) {
/* WebKit browsers */
font-weight: 400; font-weight: 400;
color: #8C8C8C; color: #8c8c8c;
} }
:deep(.el-input__inner:-moz-placeholder) { /* Mozilla Firefox 4 to 18 */ :deep(.el-input__inner:-moz-placeholder) {
/* Mozilla Firefox 4 to 18 */
font-weight: 400; font-weight: 400;
color: #8C8C8C; color: #8c8c8c;
} }
:deep(.el-input__inner::-moz-placeholder) { /* Mozilla Firefox 19+ */ :deep(.el-input__inner::-moz-placeholder) {
/* Mozilla Firefox 19+ */
font-weight: 400; font-weight: 400;
color: #8C8C8C; color: #8c8c8c;
opacity: 1; opacity: 1;
} }
:deep(.el-input__inner:-ms-input-placeholder) { /* Internet Explorer 10+ */ :deep(.el-input__inner:-ms-input-placeholder) {
/* Internet Explorer 10+ */
font-weight: 400; font-weight: 400;
color: #8C8C8C !important; color: #8c8c8c !important;
} }
:deep(.el-form-item) { :deep(.el-form-item) {
position: relative; position: relative;
@@ -185,10 +237,10 @@ $buttonHeight: $buttonH * 1px;
font-size: 14px; font-size: 14px;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #2F53EB; color: #2f53eb;
span { span {
padding-left: 15px; padding-left: 15px;
border-left: 2px solid #D9D9D9; border-left: 2px solid #d9d9d9;
} }
} }
} }
@@ -205,16 +257,36 @@ $buttonHeight: $buttonH * 1px;
// 文字 // 文字
line-height: 26px; line-height: 26px;
font-size: 20px; font-size: 20px;
color: #FFFFFF; color: #ffffff;
} }
.button-active { .button-active {
background: #2F53EB; background: #2f53eb;
box-shadow: 0px 2px 8px rgba(0, 80, 184, 0.2); box-shadow: 0px 2px 8px rgba(0, 80, 184, 0.2);
} }
} }
} }
} }
.login-form {
* {
user-select: none;
}
// - - - input
:deep(.el-input__inner) {
// 元素
width: 420px;
height: 66px;
color: #262626;
font-size: 18px;
}
:deep(.el-checkbox__label) {
font-size: 18px;
line-height: 14px;
}
}
.footer { .footer {
user-select: none;
// 元素 // 元素
height: 16px; height: 16px;
line-height: 16px; line-height: 16px;
@@ -235,17 +307,30 @@ $buttonHeight: $buttonH * 1px;
// - - - - - PC 最小尺寸设置 // - - - - - PC 最小尺寸设置
@media screen and (min-width: 599px) and (max-width: 1366px) { @media screen and (min-width: 599px) and (max-width: 1366px) {
.container { .container {
min-width: 599px;
.content { .content {
width: 710px; // width: 710px;
height: 397px; // height: 397px;
width: 100%;
height: 100%;
.pic { .pic {
width: 314px; // width: 314px;
display: none;
} }
.field { .field {
width: calc(710px - 314px); // width: calc(710px - 314px);
left: 314px; // left: 314px;
// justify-content: center;
width: 100%;
.pc-title {
h3 {
font-size: 2.4rem !important;
}
}
.form { .form {
width: 320px; // width: 320px;
:deep(.el-input__inner) { :deep(.el-input__inner) {
width: 320px; width: 320px;
height: 56px; height: 56px;
@@ -259,7 +344,6 @@ $buttonHeight: $buttonH * 1px;
} }
} }
/* ===== MOBILE DESIGN ===== */ /* ===== MOBILE DESIGN ===== */
$mobileW: 375; $mobileW: 375;
$mobileH: 812; $mobileH: 812;
@@ -273,7 +357,8 @@ $mobileButtonH: 48;
$mobileContainerBgImage: '../assets/images/bg-mobile.png'; $mobileContainerBgImage: '../assets/images/bg-mobile.png';
// container-content // container-content
$mobileContentWidth: round($mobileContentW / $mobileW * 100) * 1vw; $mobileContentWidth: round($mobileContentW / $mobileW * 100) * 1vw;
$mobileContentHeight: round($mobileContentH / $mobileW * 100) / 100 * $mobileContentWidth; $mobileContentHeight: round($mobileContentH / $mobileW * 100) / 100 *
$mobileContentWidth;
// container-content-field-form // container-content-field-form
$mobileFormWidth: round($mobileFormW / $mobileW * 100) * 1vw; $mobileFormWidth: round($mobileFormW / $mobileW * 100) * 1vw;
$mobileRowHeight: $mobileRowH * 1px; $mobileRowHeight: $mobileRowH * 1px;
@@ -288,13 +373,17 @@ $iconBgImage: '../assets/images/icon.png';
min-width: 280px; min-width: 280px;
min-height: 568px; min-height: 568px;
// 文字 // 文字
font-size: 17px; font-size: 14px;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
.logo { .logo {
display: none; display: none;
} }
.pc-title {
display: none;
}
.content { .content {
// 元素 // 元素
width: $mobileContentWidth; width: $mobileContentWidth;
@@ -309,6 +398,7 @@ $iconBgImage: '../assets/images/icon.png';
display: none; display: none;
} }
.field { .field {
padding: 0;
// 元素 // 元素
width: inherit; width: inherit;
min-height: inherit; min-height: inherit;
@@ -316,12 +406,15 @@ $iconBgImage: '../assets/images/icon.png';
left: 0; left: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.mobile-title { .mobile-title {
// 元素 // 元素
margin: 0 0 20px; margin: 0;
display: block; display: block;
} }
.form { .form {
margin: 0;
width: $mobileFormWidth; width: $mobileFormWidth;
// - - - tab // - - - tab
:deep(.el-tabs__header) { :deep(.el-tabs__header) {
@@ -347,7 +440,25 @@ $iconBgImage: '../assets/images/icon.png';
.button { .button {
height: $mobileButtonHeight; height: $mobileButtonHeight;
line-height: 24px; line-height: 24px;
color: #FFFFFF; color: #ffffff;
}
}
.login-form {
:deep(.el-input__inner) {
height: $mobileRowHeight;
line-height: 24px;
// 文字
text-align: center;
color: #262626;
}
:deep(#button-form-item) {
margin: 0 !important;
button {
// 元素
height: $mobileRowHeight;
}
} }
} }
.mobile-switch { .mobile-switch {
@@ -370,6 +481,7 @@ $iconBgImage: '../assets/images/icon.png';
} }
} }
} }
.footer { .footer {
// 元素 // 元素
font-size: 12px; font-size: 12px;
@@ -379,9 +491,8 @@ $iconBgImage: '../assets/images/icon.png';
color: #333333; color: #333333;
opacity: 0.6; opacity: 0.6;
// 定位 // 定位
position: absolute; // position: absolute;
bottom: 20px; bottom: -32px;
} }
} }
} }

View File

@@ -83,6 +83,9 @@
:on-success="handleUploadSuccess" :on-success="handleUploadSuccess"
v-bind="col.bind"> v-bind="col.bind">
<el-button size="mini" :disabled="col.bind?.disabled || false"> <el-button size="mini" :disabled="col.bind?.disabled || false">
<svg-icon
icon-class="icon-upload"
style="color: inherit"></svg-icon>
上传文件 上传文件
</el-button> </el-button>
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips"> <div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
@@ -133,7 +136,6 @@ const uploadedFile = {
}, },
methods: { methods: {
handleDelete() { handleDelete() {
console.log('emit delete event')
this.$emit('delete', this.file); this.$emit('delete', this.file);
}, },
}, },
@@ -188,6 +190,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
hasFile: {
type: Boolean,
default: false,
},
labelPosition: { labelPosition: {
type: String, type: String,
default: 'right', default: 'right',
@@ -220,7 +226,6 @@ export default {
watch: { watch: {
rows: { rows: {
handler() { handler() {
console.log('watch triggered!');
this.$nextTick(() => { this.$nextTick(() => {
this.handleOptions('watch'); this.handleOptions('watch');
}); });
@@ -231,6 +236,9 @@ export default {
dataForm: { dataForm: {
handler(val) { handler(val) {
this.form = JSON.parse(JSON.stringify(val)); this.form = JSON.parse(JSON.stringify(val));
if (this.hasFile) {
this.form.files = this.form.files ?? [];
}
}, },
deep: true, deep: true,
immediate: true, immediate: true,
@@ -368,7 +376,9 @@ export default {
}, },
handleDeleteFile(file) { handleDeleteFile(file) {
this.form.files = this.form.files.filter(item => item.fileUrl != file.fileUrl); this.form.files = this.form.files.filter(
(item) => item.fileUrl != file.fileUrl
);
this.$emit('update', this.form); this.$emit('update', this.form);
}, },
}, },

View File

@@ -38,7 +38,7 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> <DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog> </base-dialog>
<!-- 抽屉 详情 --> <!-- 抽屉 详情 -->

View File

@@ -36,7 +36,7 @@
v-if="showForm" v-if="showForm"
ref="form" ref="form"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
:dataForm="form" v-model="form"
:rows="formRows" /> :rows="formRows" />
</div> </div>

View File

@@ -38,7 +38,7 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> <DialogForm v-if="open" ref="form" v-model="form" :rows="rows"/>
</base-dialog> </base-dialog>
<!-- 抽屉 详情 --> <!-- 抽屉 详情 -->

View File

@@ -38,7 +38,7 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> <DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog> </base-dialog>
</div> </div>
</template> </template>

View File

@@ -36,7 +36,7 @@
v-if="showForm" v-if="showForm"
ref="form" ref="form"
:disabled="mode.includes('detail')" :disabled="mode.includes('detail')"
:dataForm="form" v-model="form"
:rows="formRows" /> :rows="formRows" />
</div> </div>

View File

@@ -38,7 +38,7 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> <DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog> </base-dialog>
<!-- 抽屉 详情 --> <!-- 抽屉 详情 -->

View File

@@ -38,7 +38,7 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> <DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog> </base-dialog>
</div> </div>
</template> </template>

View File

@@ -18,9 +18,16 @@
预览 预览
</div> --> </div> -->
</section> </section>
<section class="file-area"> <section
class="file-area"
:style="{
height: expand ? 'auto' : isPicMode ? '180px' : '152px',
gap: isPicMode ? '0 24px' : '24px',
gridAutoRows: isPicMode ? '180px' : '152px',
}">
<el-upload <el-upload
class="equipment-upload" class="equipment-upload"
:style="{ marginBottom: isPicMode ? '48px' : '24px' }"
:disabled="disabled" :disabled="disabled"
drag drag
:action="uploadUrl" :action="uploadUrl"
@@ -56,7 +63,6 @@
v-for="(file, index) in files" v-for="(file, index) in files"
:key="file.fileName" :key="file.fileName"
:style="{ :style="{
display: index > 3 && !expand ? 'none' : 'block',
background: isPicMode background: isPicMode
? `url(${file.fileUrl}) no-repeat` ? `url(${file.fileUrl}) no-repeat`
: `url(${defaultBg}) no-repeat`, : `url(${defaultBg}) no-repeat`,
@@ -226,7 +232,7 @@ export default {
clearTimeout(this.updateTimer); clearTimeout(this.updateTimer);
} }
this.updateTimer = setTimeout(() => { this.updateTimer = setTimeout(() => {
console.log('[AssetsUpload] 更新上传列表'); // console.log('[AssetsUpload] 更新上传列表');
this.emitFilelist(); this.emitFilelist();
clearTimeout(this.updateTimer); clearTimeout(this.updateTimer);
this.updateTimer = null; this.updateTimer = null;
@@ -314,7 +320,6 @@ export default {
} }
:deep(.equipment-upload) { :deep(.equipment-upload) {
background: #ccc4;
.el-upload-dragger { .el-upload-dragger {
width: 188px; width: 188px;
height: 128px; height: 128px;
@@ -346,6 +351,10 @@ export default {
} }
} }
.equipment-upload {
margin-bottom: 24px;
}
.file-list { .file-list {
padding: 12px; padding: 12px;
border: 1px solid #ccc; border: 1px solid #ccc;
@@ -354,13 +363,14 @@ export default {
// custom // custom
.file-area { .file-area {
display: grid; display: grid;
grid-template-columns: repeat(5, 188px); grid-template-columns: repeat(auto-fill, 188px);
grid-auto-rows: 128px; grid-auto-rows: 152px;
gap: 24px 18px; gap: 48px 24px;
place-content: center; overflow: hidden;
} }
.file-list__item { .file-list__item {
height: 128px;
background-color: #fff; background-color: #fff;
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;

View File

@@ -1,32 +0,0 @@
<!--
filename: EquipmentAssets.vue
author: liubin
date: 2023-08-22 11:11:18
description: 设备资产
-->
<template>
<div class="equipment-assets"></div>
</template>
<script>
export default {
name: "EquipmentAssets",
components: {},
props: {},
data() {
return {}
},
computed: {},
methods: {},
}
</script>
<style scoped lang="scss">
.equipment-assets {
background: #f1f1f1;
padding: 12px;
min-height: 128px;
margin-top: 8px;
}
</style>

View File

@@ -1,111 +0,0 @@
<!--
filename: EquipmentPics.vue
author: liubin
date: 2023-08-18 16:29:39
description:
-->
<template>
<div class="equipment-pics">
<div v-for="(url, idx) in images" :key="url">
<img :src="url" :alt="url" />
<figure class="big-img" :style="inlineStyle">
<img :src="url" :alt="url" />
<figcaption>{{ desc[idx] }}</figcaption>
</figure>
</div>
</div>
</template>
<script>
export default {
name: 'EquipmentPics',
components: {},
props: {
inlineStyle: {
type: Object,
default: () => ({}),
},
},
data() {
return {
desc: [
'车间设备 - 1',
'车间设备 - 2',
'车间设备 - 3',
'车间设备 - 4',
'车间设备 - 5',
'车间设备 - 6',
'车间设备 - 7',
'车间设备 - 8',
'车间设备 - 9',
'车间设备 - 10',
'车间设备 - 11',
'车间设备 - 12',
],
images: Array(10)
.fill(1)
.map((_, index) => require(`../assets/eq${index + 1}.jpg`)),
};
},
methods: {},
};
</script>
<style scoped lang="scss">
.equipment-pics {
// background: #cfcfcf;
padding: 12px;
// margin: 8px;
display: flex;
overflow-x: auto;
}
.equipment-pics > div {
height: 100px;
position: relative;
cursor: pointer;
}
.equipment-pics > div:not(:last-child) {
margin-right: 12px;
}
.equipment-pics > div > img {
height: 95%;
}
.equipment-pics > div > figure {
display: none;
position: fixed;
// inset: 0;
// margin: auto;
top: 0;
right: 0;
// width: 640px;
// height: 480px;
background: #000;
overflow: hidden;
padding: 8px 8px 0;
}
.equipment-pics > div:hover > figure {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.equipment-pics > div > figure > img {
flex: 1;
}
.equipment-pics > div > figure > figcaption {
height: 24px;
margin-top: 8px;
font-size: 18px;
line-height: 1;
color: #fff;
}
</style>

View File

@@ -44,8 +44,9 @@
ref="form" ref="form"
label-position="top" label-position="top"
size="small" size="small"
:dataForm="form" v-model="form"
:rows="computedRows" /> :rows="computedRows"
:has-file="true" />
</base-dialog> </base-dialog>
<!-- 设备 详情 - 编辑 --> <!-- 设备 详情 - 编辑 -->
@@ -105,9 +106,6 @@
<script> <script>
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { getAccessToken } from '@/utils/auth';
import EquipmentPics from './components/EquipmentPics';
import EquipmentAssets from './components/EquipmentAssets';
import EquipmentDrawer from './components/EquipmentDrawer'; import EquipmentDrawer from './components/EquipmentDrawer';
import { import {
@@ -132,6 +130,12 @@ export default {
return { return {
searchBarKeys: ['name', 'code'], searchBarKeys: ['name', 'code'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:equipment:update`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi('base:equipment:update') this.$auth.hasPermi('base:equipment:update')
? { ? {
type: 'edit', type: 'edit',
@@ -144,12 +148,6 @@ export default {
btnName: '删除', btnName: '删除',
} }
: undefined, : undefined,
this.$auth.hasPermi(`base:equipment:update`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
].filter((v) => v), ].filter((v) => v),
tableProps: [ tableProps: [
{ {
@@ -213,6 +211,13 @@ export default {
{ {
type: 'separate', type: 'separate',
}, },
{
type: this.$auth.hasPermi('base:equipment:export') ? 'button' : '',
btnName: '导出',
name: 'export',
plain: true,
color: 'primary',
},
{ {
type: this.$auth.hasPermi('base:equipment:create') ? 'button' : '', type: this.$auth.hasPermi('base:equipment:create') ? 'button' : '',
btnName: '新增', btnName: '新增',
@@ -220,12 +225,6 @@ export default {
plain: true, plain: true,
color: 'success', color: 'success',
}, },
{
type: this.$auth.hasPermi('base:equipment:export') ? 'button' : '',
btnName: '导出',
name: 'export',
color: 'warning',
},
], ],
rows: [ rows: [
[ [

View File

@@ -37,7 +37,12 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" /> <DialogForm
v-if="open"
ref="form"
v-model="form"
:rows="rows"
:has-file="true" />
</base-dialog> </base-dialog>
</div> </div>
</template> </template>
@@ -207,8 +212,6 @@ export default {
name: undefined, name: undefined,
parentId: undefined, parentId: undefined,
remark: undefined, remark: undefined,
fileNames: [],
fileUrls: [],
}; };
this.resetForm('form'); this.resetForm('form');
}, },

View File

@@ -4,70 +4,227 @@
<!-- 登录区域 --> <!-- 登录区域 -->
<div class="content"> <div class="content">
<!-- 配图 --> <!-- 配图 -->
<div class="pic"></div> <div class="pic">
<div
class="welcome"
style="
position: absolute;
top: 15%;
left: 20%;
user-select: none;
display: flex;
flex-direction: column;
align-items: flex-start;
">
<strong
style="
letter-spacing: 1px;
font-family: Arial, Helvetica, sans-serif;
font-weight: 500;
font-size: 88px;
">
<span style="color: #26b9de">Wel</span>
<span style="color: #fff">come</span>
</strong>
<p
style="
margin: 0;
font-size: 26px;
letter-spacing: 1px;
color: #26b9de;
opacity: 75%;
">
<span
style="
display: inline-block;
height: 20px;
width: 20px;
margin-left: 8px;
margin-right: 12px;
border-radius: 100%;
background: #26b9de;
"></span>
产线生产监控系统
</p>
</div>
<video
src="/static/videos/login.webm"
muted
autoplay
loop
style="
user-select: none;
position: absolute;
top: 28%;
width: 100%;
height: 70%;
"></video>
</div>
<!-- 表单 --> <!-- 表单 -->
<div class="field"> <div class="field">
<!-- [移动端]标题 --> <!-- [移动端]标题 -->
<h2 class="mobile-title"> <h2 class="mobile-title">
<h3 class="title">芋道后台管理系统</h3> <h3 class="title">中建材智能自动化研究院有限公司</h3>
</h2>
<h2 class="pc-title" style="">
<h3
class="title"
style="
margin: 0;
margin-left: 32px;
font-weight: 400;
user-select: none;
color: #000;
font-size: 36px;
line-height: 54px;
letter-spacing: 2px;
">
<img
src="../assets/logo/cnbm.png"
alt="cnbm_logo"
style="
height: 48px;
width: 48px;
position: relative;
top: 12px;
right: 8px;
" />
<span>中建材智能自动化研究院有限公司</span>
</h3>
<h3
class="sub-title"
style="
margin: 0;
margin-left: 32px;
font-weight: 400;
user-select: none;
color: #000;
font-size: 36px;
line-height: 54px;
letter-spacing: 2px;
">
产线生产监控系统
</h3>
</h2> </h2>
<!-- 表单 --> <!-- 表单 -->
<div class="form-cont"> <div class="form-cont">
<el-tabs class="form" v-model="loginForm.loginType" style=" float:none;"> <el-tabs
<el-tab-pane label="账号密码登录" name="uname"> class="form"
</el-tab-pane> v-model="loginForm.loginType"
<el-tab-pane label="短信验证码登录" name="sms"> style="float: none">
</el-tab-pane> <el-tab-pane label="账号密码登录" name="uname"></el-tab-pane>
<el-tab-pane label="短信验证码登录" name="sms"></el-tab-pane>
</el-tabs> </el-tabs>
<div> <div style="">
<el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form"> <el-form
ref="loginForm"
:model="loginForm"
:rules="LoginRules"
class="login-form">
<el-form-item prop="tenantName" v-if="tenantEnable"> <el-form-item prop="tenantName" v-if="tenantEnable">
<el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='租户'> <el-input
<svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon" /> v-model="loginForm.tenantName"
type="text"
auto-complete="off"
placeholder="租户">
<!-- <svg-icon
slot="prefix"
icon-class="tree"
class="el-input__icon input-icon" /> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
<!-- 账号密码登录 --> <!-- 账号密码登录 -->
<div v-if="loginForm.loginType === 'uname'"> <div v-if="loginForm.loginType === 'uname'">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号"> <el-input
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="账号">
<!-- <svg-icon
slot="prefix"
icon-class="user"
class="el-input__icon input-icon" /> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" <el-input
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="getCode"> @keyup.enter.native="getCode">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> <!-- <svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon" /> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;">记住密码</el-checkbox> <el-checkbox
v-model="loginForm.rememberMe"
style="margin: 0 0 25px 0">
记住密码
</el-checkbox>
</div> </div>
<!-- 短信验证码登录 --> <!-- 短信验证码登录 -->
<div v-if="loginForm.loginType === 'sms'"> <div v-if="loginForm.loginType === 'sms'">
<el-form-item prop="mobile"> <el-form-item prop="mobile">
<el-input v-model="loginForm.mobile" type="text" auto-complete="off" placeholder="请输入手机号"> <el-input
<svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon" /> 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-input>
</el-form-item> </el-form-item>
<el-form-item prop="mobileCode"> <el-form-item prop="mobileCode">
<el-input v-model="loginForm.mobileCode" type="text" auto-complete="off" placeholder="短信验证码" <el-input
class="sms-login-mobile-code-prefix" @keyup.enter.native="handleLogin"> v-model="loginForm.mobileCode"
<template> type="text"
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> auto-complete="off"
</template> placeholder="短信验证码"
<template slot="append"> class="sms-login-mobile-code-prefix"
<span v-if="mobileCodeTimer <= 0" class="getMobileCode" @click="getSmsCode" @keyup.enter.native="handleLogin">
style="cursor: pointer;">获取验证码</span> <!-- <template>
<span v-if="mobileCodeTimer > 0" class="getMobileCode">{{ mobileCodeTimer }}秒后可重新获取</span> <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: 18px;
line-height: 66px;
padding-right: 12px;
">
获取验证码
</span>
<span v-if="mobileCodeTimer > 0" class="getMobileCode">
{{ mobileCodeTimer }}秒后可重新获取
</span>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<!-- 下方的登录按钮 --> <!-- 下方的登录按钮 -->
<el-form-item style="width:100%;"> <el-form-item id="button-form-item" style="width: 100%; margin-top: 32px">
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" <el-button
:loading="loading"
size="medium"
type="primary"
style="width: 100%; height: 66px; font-size: 18px;"
@click.native.prevent="getCode"> @click.native.prevent="getCode">
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> 中...</span> <span v-else> 中...</span>
@@ -86,99 +243,113 @@
</el-form> </el-form>
</div> </div>
</div> </div>
</div>
</div>
<!-- 图形验证码 -->
<Verify ref="verify" :captcha-type="'blockPuzzle'" :img-size="{ width: '400px', height: '200px' }"
@success="handleLogin" />
<!-- footer --> <!-- footer -->
<div class="footer"> <div class="footer">
Copyright © 2023 中建材智能自动化院 All Rights Reserved. Copyright © 2023 中建材智能自动化院 All Rights Reserved.
</div> </div>
</div> </div>
</div>
<!-- 图形验证码 -->
<Verify
ref="verify"
:captcha-type="'blockPuzzle'"
:img-size="{ width: '400px', height: '200px' }"
@success="handleLogin" />
</div>
</template> </template>
<script> <script>
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 { getCaptchaEnable, getTenantEnable } from "@/utils/ruoyi"; import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi';
import { import {
getPassword, getPassword,
getRememberMe, getTenantName, getRememberMe,
getTenantName,
getUsername, getUsername,
removePassword, removeRememberMe, removeTenantName, removePassword,
removeRememberMe,
removeTenantName,
removeUsername, removeUsername,
setPassword, setRememberMe, setTenantId, setTenantName, setPassword,
setUsername setRememberMe,
} from "@/utils/auth"; setTenantId,
setTenantName,
setUsername,
} from '@/utils/auth';
import Verify from '@/components/Verifition/Verify'; import Verify from '@/components/Verifition/Verify';
import { resetUserPwd } from "@/api/system/user"; import { resetUserPwd } from '@/api/system/user';
export default { export default {
name: "Login", name: 'Login',
components: { components: {
Verify Verify,
}, },
data() { data() {
return { return {
codeUrl: "", codeUrl: '',
captchaEnable: true, captchaEnable: true,
tenantEnable: true, tenantEnable: true,
mobileCodeTimer: 0, mobileCodeTimer: 0,
loginForm: { loginForm: {
loginType: "uname", loginType: 'uname',
username: "admin", username: 'admin',
password: "admin123", password: 'admin123',
captchaVerification: "", captchaVerification: '',
mobile: "", mobile: '',
mobileCode: "", mobileCode: '',
rememberMe: false, rememberMe: false,
tenantName: "技术中心", tenantName: '技术中心',
}, },
scene: 21, scene: 21,
LoginRules: { LoginRules: {
username: [ username: [
{ required: true, trigger: "blur", message: "用户名不能为空" } { required: true, trigger: 'blur', message: '用户名不能为空' },
], ],
password: [ password: [
{ required: true, trigger: "blur", message: "密码不能为空" } { required: true, trigger: 'blur', message: '密码不能为空' },
], ],
mobile: [ mobile: [
{ required: true, trigger: "blur", message: "手机号不能为空" }, { required: true, trigger: 'blur', message: '手机号不能为空' },
{ {
validator: function (rule, value, callback) { validator: function (rule, value, callback) {
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) { if (
callback(new Error("手机号格式错误")); /^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(
value
) === false
) {
callback(new Error('手机号格式错误'));
} else { } else {
callback(); callback();
} }
}, trigger: "blur" },
} trigger: 'blur',
},
], ],
tenantName: [ tenantName: [
{ required: true, trigger: "blur", message: "租户不能为空" }, { required: true, trigger: 'blur', message: '租户不能为空' },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
// debugger // debugger
getTenantIdByName(value).then(res => { getTenantIdByName(value).then((res) => {
const tenantId = res.data; const tenantId = res.data;
if (tenantId && tenantId >= 0) { if (tenantId && tenantId >= 0) {
// 设置租户 // 设置租户
setTenantId(tenantId) setTenantId(tenantId);
callback(); callback();
} else { } else {
callback('租户不存在'); callback('租户不存在');
} }
}); });
}, },
trigger: 'blur' trigger: 'blur',
} },
] ],
}, },
loading: false, loading: false,
redirect: undefined, redirect: undefined,
@@ -190,30 +361,33 @@ export default {
// 租户开关 // 租户开关
this.tenantEnable = getTenantEnable(); this.tenantEnable = getTenantEnable();
if (this.tenantEnable) { if (this.tenantEnable) {
getTenantIdByName(this.loginForm.tenantName).then(res => { // 设置租户 getTenantIdByName(this.loginForm.tenantName).then((res) => {
// 设置租户
const tenantId = res.data; const tenantId = res.data;
if (tenantId && tenantId >= 0) { if (tenantId && tenantId >= 0) {
setTenantId(tenantId) setTenantId(tenantId);
} }
}); });
} }
// 验证码开关 // 验证码开关
this.captchaEnable = getCaptchaEnable(); this.captchaEnable = getCaptchaEnable();
// 重定向地址 // 重定向地址
this.redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : undefined; this.redirect = this.$route.query.redirect
? decodeURIComponent(this.$route.query.redirect)
: undefined;
this.getCookie(); this.getCookie();
}, },
methods: { methods: {
getCode() { getCode() {
// 情况一,未开启:则直接登录 // 情况一,未开启:则直接登录
if (!this.captchaEnable) { if (!this.captchaEnable) {
this.handleLogin({}) this.handleLogin({});
return; return;
} }
// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录 // 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
// 弹出验证码 // 弹出验证码
this.$refs.verify.show() this.$refs.verify.show();
}, },
getCookie() { getCookie() {
const username = getUsername(); const username = getUsername();
@@ -229,28 +403,34 @@ export default {
}; };
}, },
handleLogin(captchaParams) { handleLogin(captchaParams) {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
// 设置 Cookie // 设置 Cookie
if (this.loginForm.rememberMe) { if (this.loginForm.rememberMe) {
setUsername(this.loginForm.username) setUsername(this.loginForm.username);
setPassword(this.loginForm.password) setPassword(this.loginForm.password);
setRememberMe(this.loginForm.rememberMe) setRememberMe(this.loginForm.rememberMe);
setTenantName(this.loginForm.tenantName) setTenantName(this.loginForm.tenantName);
} else { } else {
removeUsername() removeUsername();
removePassword() removePassword();
removeRememberMe() removeRememberMe();
removeTenantName() removeTenantName();
} }
this.loginForm.captchaVerification = captchaParams.captchaVerification this.loginForm.captchaVerification =
captchaParams.captchaVerification;
// 发起登陆 // 发起登陆
// console.log("发起登录", this.loginForm); // console.log("发起登录", this.loginForm);
this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => { this.$store
this.$router.push({ path: this.redirect || "/" }).catch(() => { .dispatch(
}); this.loginForm.loginType === 'sms' ? 'SmsLogin' : 'Login',
}).catch(() => { this.loginForm
)
.then(() => {
this.$router.push({ path: this.redirect || '/' }).catch(() => {});
})
.catch(() => {
this.loading = false; this.loading = false;
}); });
} }
@@ -261,34 +441,46 @@ export default {
this.loading = true; this.loading = true;
let tenant = false; let tenant = false;
if (this.tenantEnable) { if (this.tenantEnable) {
await this.$prompt('请输入租户名称', "提示", { await this.$prompt('请输入租户名称', '提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消" cancelButtonText: '取消',
}).then(async ({ value }) => { })
await getTenantIdByName(value).then(res => { .then(async ({ value }) => {
await getTenantIdByName(value).then((res) => {
const tenantId = res.data; const tenantId = res.data;
tenant = true tenant = true;
if (tenantId && tenantId >= 0) { if (tenantId && tenantId >= 0) {
setTenantId(tenantId) setTenantId(tenantId);
} }
}); });
}).catch(() => { })
.catch(() => {
// 取消登录按钮 loading状态 // 取消登录按钮 loading状态
this.loading = false; this.loading = false;
return false return false;
}); });
} else { } else {
tenant = true tenant = true;
} }
if (tenant) { if (tenant) {
// 计算 redirectUri // 计算 redirectUri
const redirectUri = location.origin + '/social-login?' const redirectUri =
+ encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢 location.origin +
'/social-login?' +
encodeURIComponent(
'type=' +
socialTypeEnum.type +
'&redirect=' +
(this.redirect || '/')
); // 重定向不能丢
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback'; // const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback'; // const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
// 进行跳转 // 进行跳转
socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => { socialAuthRedirect(
socialTypeEnum.type,
encodeURIComponent(redirectUri)
).then((res) => {
// console.log(res.url); // console.log(res.url);
window.location.href = res.data; window.location.href = res.data;
}); });
@@ -297,10 +489,15 @@ export default {
/** ========== 以下为升级短信登录 ========== */ /** ========== 以下为升级短信登录 ========== */
getSmsCode() { getSmsCode() {
if (this.mobileCodeTimer > 0) return; if (this.mobileCodeTimer > 0) return;
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate((valid) => {
if (!valid) return; if (!valid) return;
sendSmsCode(this.loginForm.mobile, this.scene, this.loginForm.uuid, this.loginForm.code).then(res => { sendSmsCode(
this.$modal.msgSuccess("获取验证码成功") this.loginForm.mobile,
this.scene,
this.loginForm.uuid,
this.loginForm.code
).then((res) => {
this.$modal.msgSuccess('获取验证码成功');
this.mobileCodeTimer = 60; this.mobileCodeTimer = 60;
let msgTimer = setInterval(() => { let msgTimer = setInterval(() => {
this.mobileCodeTimer = this.mobileCodeTimer - 1; this.mobileCodeTimer = this.mobileCodeTimer - 1;
@@ -310,13 +507,12 @@ export default {
}, 1000); }, 1000);
}); });
}); });
} },
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "~@/assets/styles/login.scss"; @import '~@/assets/styles/login.scss';
.oauth-login { .oauth-login {
display: flex; display: flex;
@@ -344,4 +540,5 @@ export default {
:deep(.el-input__prefix) { :deep(.el-input__prefix) {
top: 22%; top: 22%;
} }
}</style> }
</style>

View File

@@ -77,7 +77,6 @@ export default {
label: '设备名称', label: '设备名称',
}, },
{ {
width: 128,
prop: 'equipmentCode', prop: 'equipmentCode',
label: '设备编码', label: '设备编码',
}, },
@@ -117,6 +116,7 @@ export default {
{ {
_action: 'params-monitor', _action: 'params-monitor',
label: '操作', label: '操作',
width: 56,
subcomponent: { subcomponent: {
props: ['injectData'], props: ['injectData'],
render: function (h) { render: function (h) {
@@ -124,10 +124,10 @@ export default {
return h( return h(
'el-button', 'el-button',
{ {
class: 'iconfont icon-detail',
props: { type: 'text' }, props: { type: 'text' },
on: { on: {
click: function () { click: function () {
console.log('inejctdata', _this.injectData);
_this.$emit('emitData', { _this.$emit('emitData', {
action: _this.injectData._action, action: _this.injectData._action,
// value: _this.injectData.id, // value: _this.injectData.id,
@@ -135,8 +135,8 @@ export default {
}); });
}, },
}, },
}, }
'查看详情' // '查看详情'
); );
}, },
}, },

View File

@@ -42,7 +42,7 @@
<DialogForm <DialogForm
v-if="open" v-if="open"
ref="form" ref="form"
:dataForm="form" v-model="form"
:rows="[ :rows="[
[ [
{ {

View File

@@ -40,7 +40,7 @@
<DialogForm <DialogForm
v-if="open" v-if="open"
ref="form" ref="form"
:dataForm="form" v-model="form"
:rows="[ :rows="[
[ [
{ {

View File

@@ -64,6 +64,7 @@ export default {
name: item.inspectionContent, name: item.inspectionContent,
type: 'bar', type: 'bar',
barCategoryGap: 12, barCategoryGap: 12,
barWidth: 20,
data: [], data: [],
}; };