fzq #31

Closed
fanzhiqin wants to merge 215 commits from fzq into test
56 changed files with 761 additions and 142 deletions
Showing only changes of commit 5798e5b6e0 - Show all commits

View File

@ -4,10 +4,10 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-11-25 09:51:46 * @Date: 2022-11-25 09:51:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2022-12-13 19:44:21 * @LastEditTime: 2023-01-13 15:13:05
--> -->
<template> <template>
<transition name="el-fade-in-linear"> <transition name="el-fade-in-linear" id="app">
<router-view /> <router-view />
</transition> </transition>
</template> </template>
@ -16,6 +16,9 @@
.el-table th.gutter { .el-table th.gutter {
display: table-cell !important; display: table-cell !important;
} }
#app {
background-color: #f2f4f9;
}
</style> </style>
<script> <script>
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
@ -41,3 +44,4 @@ export default {
} }
} }
</script> </script>

View File

@ -261,6 +261,7 @@ img {
.aui-content { .aui-content {
&__wrapper { &__wrapper {
margin-left: $sidebar--width-fold; margin-left: $sidebar--width-fold;
background-color: #F2F4F9;
} }
&--tabs > .el-tabs > .el-tabs__header { &--tabs > .el-tabs > .el-tabs__header {
left: $sidebar--width-fold; left: $sidebar--width-fold;
@ -586,15 +587,21 @@ img {
/* Content /* Content
------------------------------ */ ------------------------------ */
.aui-content { .aui-content {
position: relative; top: 16px;
padding: $content--padding; margin:0 16px 0;
min-height: calc(100vh - #{$navbar--height}); background-color: #fff;
border-radius: 4px;
padding: 16px 16px 0;
//此处修底部高度
height: calc(100vh - 85px);
overflow: auto;
&__wrapper { &__wrapper {
position: relative; position: relative;
// 注释掉可隐藏侧边栏,但需要在main.vue中加入main-content的限制条件 // 注释掉可隐藏侧边栏,但需要在main.vue中加入main-content的限制条件
margin-left: $sidebar--width; margin-left: $sidebar--width;
min-height: calc(100vh - #{$navbar--height}); min-height: calc(100vh - #{$navbar--height});
background-color: $content--background-color; //此处修改背景色
background-color: #F2F4F9;
transition: margin-left .3s; transition: margin-left .3s;
} }
> .aui-card--fill > .el-card__body { > .aui-card--fill > .el-card__body {

View File

@ -5,9 +5,8 @@
:visible.sync="visible" :visible.sync="visible"
@close="handleClose" @close="handleClose"
:distory-on-close="true" :distory-on-close="true"
:close-on-click-modal="false" :close-on-click-modal="false">
> <div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden">
<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden;">
<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules"> <el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
<!-- 如果需要更精细一点的布局可以根据配置项实现地再复杂一点但此处暂时全部采用一行两列布局 --> <!-- 如果需要更精细一点的布局可以根据配置项实现地再复杂一点但此处暂时全部采用一行两列布局 -->
<el-row v-for="n in rows" :key="n" :gutter="20"> <el-row v-for="n in rows" :key="n" :gutter="20">
@ -18,16 +17,14 @@
v-if="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]" v-if="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]"
:prop="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name" :prop="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name"
:key="`${n}-col-${c}-item`" :key="`${n}-col-${c}-item`"
:label="getLabel(n, c)" :label="getLabel(n, c)">
>
<!-- 暂时先不实现部分输入方式 --> <!-- 暂时先不实现部分输入方式 -->
<el-input <el-input
v-if="getType(n, c) === 'input'" v-if="getType(n, c) === 'input'"
:placeholder="getPlaceholder(n, c)" :placeholder="getPlaceholder(n, c)"
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
clearable clearable
:disabled="isDetail" :disabled="isDetail" />
/>
<el-radio v-if="getType(n, c) === 'radio'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" /> <el-radio v-if="getType(n, c) === 'radio'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
<el-checkbox v-if="getType(n, c) === 'check'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" /> <el-checkbox v-if="getType(n, c) === 'check'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
<el-select <el-select
@ -36,8 +33,7 @@
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
clearable clearable
:disabled="isDetail" :disabled="isDetail"
@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)" @change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)">
>
<el-option v-for="opt in configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options" :key="opt.label + Math.random()" :label="opt.label" :value="opt.value" /> <el-option v-for="opt in configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options" :key="opt.label + Math.random()" :label="opt.label" :value="opt.value" />
</el-select> </el-select>
<el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" /> <el-switch v-if="getType(n, c) === 'switch'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
@ -47,16 +43,14 @@
:options="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options" :options="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options"
:props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props" :props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
:disabled="isDetail" :disabled="isDetail"
clearable clearable />
/>
<el-time-select v-if="getType(n, c) === 'time'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" /> <el-time-select v-if="getType(n, c) === 'time'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
<el-date-picker <el-date-picker
v-if="getType(n, c) === 'date'" v-if="getType(n, c) === 'date'"
v-bind="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props" v-bind="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
:placeholder="getPlaceholder(n, c)" :placeholder="getPlaceholder(n, c)"
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
:disabled="isDetail" :disabled="isDetail" />
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -65,14 +59,13 @@
<template v-if="configs.extraComponents && configs.extraComponents.length > 0"> <template v-if="configs.extraComponents && configs.extraComponents.length > 0">
<el-form-item v-for="(ec, index) in configs.extraComponents" :key="ec.name + index" :label="ec.label" class="extra-components"> <el-form-item v-for="(ec, index) in configs.extraComponents" :key="ec.name + index" :label="ec.label" class="extra-components">
<component <component
style="margin-top: 40px;" style="margin-top: 40px"
v-if="ec.hasModel" v-if="ec.hasModel"
:is="ec.component" :is="ec.component"
v-bind="ec.props" v-bind="ec.props"
v-model="dataForm[ec.name]" v-model="dataForm[ec.name]"
@ready="handleEditorReady" @ready="handleEditorReady"
:read-only="isDetail" :read-only="isDetail" />
/>
<!-- <component v-if="ec.hasModel" :is="ec.component" v-bind="ec.props" v-model="dataForm[ec.name]" /> --> <!-- <component v-if="ec.hasModel" :is="ec.component" v-bind="ec.props" v-model="dataForm[ec.name]" /> -->
<component <component
v-else v-else
@ -80,8 +73,7 @@
v-bind="ec.props" v-bind="ec.props"
@uploader-update-filelist="handleUploadListUpdate($event, ec.props.extraParams.typeCode)" @uploader-update-filelist="handleUploadListUpdate($event, ec.props.extraParams.typeCode)"
:uploader-inject-file-list="/*用于设备分流的*/ fileList[ec.props.extraParams.typeCode]" :uploader-inject-file-list="/*用于设备分流的*/ fileList[ec.props.extraParams.typeCode]"
:read-only="isDetail" :read-only="isDetail" />
/>
</el-form-item> </el-form-item>
</template> </template>
</el-form> </el-form>
@ -96,11 +88,14 @@
<el-button <el-button
v-if=" v-if="
!isDetail && !isDetail &&
(operate.showAlways || (operate.showAlways ||
(((dataForm.id && operate.showOnEdit) || (!dataForm.id && !operate.showOnEdit)) && (operate.permission ? $hasPermission(operate.permission) : true))) (((dataForm.id && operate.showOnEdit) || (!dataForm.id && !operate.showOnEdit)) && (operate.permission ? $hasPermission(operate.permission) : true)))
" "
:key="`operate-${index}`" :key="`operate-${index}`"
:type="btnType[operate.name]" :style="{
backgroundColor: btnType[operate.name],
color: btnColor[operate.name]
}"
@click="handleClick(operate)" @click="handleClick(operate)"
>{{ btnName[operate.name] }}</el-button >{{ btnName[operate.name] }}</el-button
> >
@ -125,9 +120,17 @@ const title = {
// //
const btnType = { const btnType = {
save: 'success', add :'#0b58ff',
update: 'primary', save: '#0b58ff',
reset: 'text' update: '#0b58ff',
reset: ''
// cancel: 'text'
// add more...
}
const btnColor = {
save: '#fff',
update: '#fff',
reset: ''
// cancel: 'text' // cancel: 'text'
// add more... // add more...
} }
@ -154,7 +157,7 @@ export default {
} }
}, },
filters: { filters: {
nameFilter: function(name) { nameFilter: function (name) {
if (!name) return null if (!name) return null
// for i18n // for i18n
const defaultNames = { const defaultNames = {
@ -181,6 +184,7 @@ export default {
/** 按钮相关属性 */ /** 按钮相关属性 */
btnName, btnName,
btnType, btnType,
btnColor,
defaultNames: { defaultNames: {
name: i18n.t('name'), name: i18n.t('name'),
code: i18n.t('code'), code: i18n.t('code'),
@ -222,7 +226,7 @@ export default {
/** 转换 configs.fields 的结构,把纯字符串转为对象 */ /** 转换 configs.fields 的结构,把纯字符串转为对象 */
this.$nextTick(() => { this.$nextTick(() => {
this.configs.fields = this.configs.fields.map(item => { this.configs.fields = this.configs.fields.map((item) => {
if (typeof item === 'string') { if (typeof item === 'string') {
return { name: item } return { name: item }
} }
@ -230,13 +234,13 @@ export default {
}) })
/** 动态设置dataForm字段 */ /** 动态设置dataForm字段 */
this.configs.fields.forEach(item => { this.configs.fields.forEach((item) => {
this.$set(this.dataForm, [item.name], '') this.$set(this.dataForm, [item.name], '')
/** select 的默认值设置 */ /** select 的默认值设置 */
if (item.type === 'select') { if (item.type === 'select') {
const opts = item.options || [] const opts = item.options || []
const dft = opts.find(item => item.default || false) const dft = opts.find((item) => item.default || false)
if (dft) { if (dft) {
this.$set(this.dataForm, [item.name], dft.value) this.$set(this.dataForm, [item.name], dft.value)
} }
@ -259,10 +263,10 @@ export default {
// relatedFielditem relatedField // relatedFielditem relatedField
if (item.relatedField) { if (item.relatedField) {
this.$watch( this.$watch(
function() { function () {
return this.dataForm[item.name] return this.dataForm[item.name]
}, },
function(val, old) { function (val, old) {
if (val && val !== old) { if (val && val !== old) {
this.$emit('select-change', { name: item.name, id: val }) this.$emit('select-change', { name: item.name, id: val })
} }
@ -318,7 +322,7 @@ export default {
} }
/** 检查是否需要额外的组件 */ /** 检查是否需要额外的组件 */
this.configs.extraComponents && this.configs.extraComponents &&
this.configs.extraComponents.forEach(item => { this.configs.extraComponents.forEach((item) => {
// if (Object.hasOwn(this.dataForm, [item.name])) { // if (Object.hasOwn(this.dataForm, [item.name])) {
if (this.dataForm.hasOwnProperty(item.name)) { if (this.dataForm.hasOwnProperty(item.name)) {
return return
@ -409,7 +413,7 @@ export default {
this.fileList = {} this.fileList = {}
if (this.dataForm.files) { if (this.dataForm.files) {
// console.log('files: ', this.dataForm.files) // console.log('files: ', this.dataForm.files)
this.dataForm.files.forEach(file => { this.dataForm.files.forEach((file) => {
// const fileName = file.fileUrl.split('/').pop() // const fileName = file.fileUrl.split('/').pop()
/** [1] 处理 fileList */ /** [1] 处理 fileList */
// if (Object.hasOwn(this.fileList, file.typeCode)) { // if (Object.hasOwn(this.fileList, file.typeCode)) {
@ -439,7 +443,7 @@ export default {
this.shouldWait.then(() => { this.shouldWait.then(() => {
if (this.tempForm.length) { if (this.tempForm.length) {
// console.log('create new, tempform', JSON.stringify(this.tempForm.length)) // console.log('create new, tempform', JSON.stringify(this.tempForm.length))
this.tempForm.forEach(item => { this.tempForm.forEach((item) => {
// console.log('item data', item.data) // console.log('item data', item.data)
this.dataForm[item.name] = item.data this.dataForm[item.name] = item.data
}) })
@ -452,7 +456,7 @@ export default {
}, },
emitSelectChange(name, id) { emitSelectChange(name, id) {
const currentField = this.configs.fields.find(item => item.name === name) const currentField = this.configs.fields.find((item) => item.name === name)
if (currentField.relatedField) { if (currentField.relatedField) {
this.dataForm[currentField.relatedField] = null this.dataForm[currentField.relatedField] = null
} }
@ -464,7 +468,7 @@ export default {
handleClick(btn) { handleClick(btn) {
/** 提取url */ /** 提取url */
const urls = {} const urls = {}
this.configs.operations.map(item => { this.configs.operations.map((item) => {
urls[item.name] = {} urls[item.name] = {}
urls[item.name].url = item.url urls[item.name].url = item.url
urls[item.name].extraFields = item.extraFields || {} urls[item.name].extraFields = item.extraFields || {}
@ -474,7 +478,7 @@ export default {
case 'save': case 'save':
case 'update': case 'update':
/** 需要验证表单的操作 */ /** 需要验证表单的操作 */
this.$refs['dataForm'].validate(valid => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
/** 对于文件上传的单独处理(合并处理) */ /** 对于文件上传的单独处理(合并处理) */
if (Object.keys(this.fileForm).length) { if (Object.keys(this.fileForm).length) {
@ -513,7 +517,7 @@ export default {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}) })
.catch(err => { .catch((err) => {
this.$message({ this.$message({
message: err, message: err,
type: 'error', type: 'error',
@ -557,7 +561,7 @@ export default {
this.$set( this.$set(
this.fileForm, this.fileForm,
typeCode, typeCode,
filelist.map(item => item.id) filelist.map((item) => item.id)
) )
// console.log('after handleUploadListUpdate(): ', this.fileForm) // console.log('after handleUploadListUpdate(): ', this.fileForm)
}, },

View File

@ -1,3 +1,11 @@
/*
* @Descripttion:
* @version:
* @Author: fzq
* @Date: 2023-01-06 15:49:50
* @LastEditors: fzq
* @LastEditTime: 2023-01-13 16:46:13
*/
import i18n from '@/i18n' import i18n from '@/i18n'
export default { export default {
@ -20,6 +28,7 @@ export default {
delete: '#FF5454', delete: '#FF5454',
preview: '#f09843', preview: '#f09843',
design: '#0b58ff', design: '#0b58ff',
edit: '#0b58ff'
// 'view-trend': 'red' // 'view-trend': 'red'
// add more... // add more...
}, },
@ -57,7 +66,8 @@ export default {
for (const optionStr of this.injectData.head?.options) { for (const optionStr of this.injectData.head?.options) {
const optObj = typeof optionStr === 'object' const optObj = typeof optionStr === 'object'
// btns.push(h('el-button', { props: { type: this.btnTypes[optionStr] } }, optionStr)) // btns.push(h('el-button', { props: { type: this.btnTypes[optionStr] } }, optionStr))
btns.push(h('el-button', { props: { type: 'text' }, style: { color: optObj ? this.colors[optionStr.name] : this.colors[optionStr] || '#409EFF' }, on: { click: this.emit.bind(null, optionStr) } }, typeof optionStr === 'object' ? this.text[optionStr.name] : this.text[optionStr])) // 原色 #409EFF
btns.push(h('el-button', { props: { type: 'text' }, style: { color: optObj ? this.colors[optionStr.name] : this.colors[optionStr] || '#0b58ff' }, on: { click: this.emit.bind(null, optionStr) } }, typeof optionStr === 'object' ? this.text[optionStr.name] : this.text[optionStr]))
} }
return h('span', null, btns) return h('span', null, btns)
} }

View File

@ -6,6 +6,7 @@ t.createTime = 'Create Time'
t.brand = {} t.brand = {}
t.brand.lg = 'SCADA Platform' t.brand.lg = 'SCADA Platform'
t.brand.mini = 'SCADA' t.brand.mini = 'SCADA'
t.brand.home = 'Home'
t.routes = {} t.routes = {}
t.routes['产品池'] = 'Products Pool' t.routes['产品池'] = 'Products Pool'
@ -71,6 +72,7 @@ t.andeng.btnVal = 'Button Value'
t.andeng.btnBoxModel = 'Button Box Model' t.andeng.btnBoxModel = 'Button Box Model'
t.copyright = 'Intelligent Automation Research Institute Co., Ltd'
t.dictValueList = 'View Details' t.dictValueList = 'View Details'
t.save = 'Save' t.save = 'Save'
t.add = 'Add' t.add = 'Add'
@ -136,11 +138,15 @@ t.min = 'Min Value'
t.max = 'Max Value' t.max = 'Max Value'
t.status = 'Status' t.status = 'Status'
t.normal = 'Normal' t.normal = 'Normal'
t.shutdown = 'Shut Down'
t.malfunction = 'Malfunction' // ?
t.diagram = 'Device Status Sequence Diagram'
t.addr = 'Address' t.addr = 'Address'
t.planStop = 'Plan to stop' t.planStop = 'Plan to stop'
t.startTime = 'Start Time' t.startTime = 'Start Time'
t.endTime = 'End Time' t.endTime = 'End Time'
t.today = 'Today' t.today = 'Today'
t.time = 'Time'
t.graph = 'Graph' t.graph = 'Graph'
t.category = 'Category' t.category = 'Category'
@ -373,6 +379,13 @@ t.pl.status = 'Product Line Status'
t.pl.belong = 'Product Line' t.pl.belong = 'Product Line'
t.pl.tvalue = 'TT Value' t.pl.tvalue = 'TT Value'
t.pl.factoryHints = 'Please select a factory' t.pl.factoryHints = 'Please select a factory'
t.pl.process = 'Working procedure'
t.pl.add = 'Add Euipment'
t.pl.queryFirst = 'Please Query First'
t.pl.choose = 'Please select equipment'
t.pl.confirm = 'Confirm'
t.pl.cancel = 'Cancel'
t.pl.success = 'The new device data is obtained successfully'
t.prompt = {} t.prompt = {}

View File

@ -4,7 +4,7 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-11-25 09:51:46 * @Date: 2022-11-25 09:51:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2022-12-13 19:27:24 * @LastEditTime: 2023-01-12 11:19:00
*/ */
import Vue from 'vue' import Vue from 'vue'
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
@ -49,7 +49,8 @@ export function getLanguage() {
} }
export default new VueI18n({ export default new VueI18n({
// locale: Cookies.get('language') || 'zh-CN', // 默认语言
locale: Cookies.get('language') || 'en',
locale: getLanguage(), // 先默认中文 locale: getLanguage(), // 先默认中文
messages, messages,
//抑制警告 //抑制警告

View File

@ -6,6 +6,7 @@ t.createTime = '添加时间'
t.brand = {} t.brand = {}
t.brand.lg = '深加工SCADA平台' t.brand.lg = '深加工SCADA平台'
t.brand.mini = 'SCADA' t.brand.mini = 'SCADA'
t.brand.home = '首页'
t.routes = {} t.routes = {}
// 一级 // 一级
@ -71,6 +72,7 @@ t.andeng.btnVal = '按钮值'
t.andeng.btnBoxModel = '按钮盒模式' t.andeng.btnBoxModel = '按钮盒模式'
t.copyright = '中建材智能自动化研究院有限公司'
t.dictValueList = '查看值列表' t.dictValueList = '查看值列表'
t.save = '保存' t.save = '保存'
t.add = '新增' // 1 t.add = '新增' // 1
@ -136,12 +138,16 @@ t.min = '最小值' // 1
t.max = '最大值' // 1 t.max = '最大值' // 1
t.status = '状态' // 1 t.status = '状态' // 1
t.normal = '正常' // ? t.normal = '正常' // ?
t.shutdown = '停机' // ?
t.malfunction = '故障' // ?
t.diagram = '设备状态时序图'
t.addr = '地址' // 1 t.addr = '地址' // 1
t.planStop = '计划停机' // ? t.planStop = '计划停机' // ?
t.startTime = '开始时间' // 1 t.startTime = '开始时间' // 1
t.endTime = '结束时间' // 1 t.endTime = '结束时间' // 1
t.to = '至' // 1 t.to = '至' // 1
t.today = '今天' // 1 t.today = '今天' // 1
t.time = '选择时间'
t.graph = '图形' t.graph = '图形'
t.category = '分类' t.category = '分类'
@ -373,6 +379,14 @@ t.pl.status = '产线状态'
t.pl.belong = '所属产线' t.pl.belong = '所属产线'
t.pl.tvalue = '产线TT值(每小时下片数量)' t.pl.tvalue = '产线TT值(每小时下片数量)'
t.pl.factoryHints = '请选择所属工厂' t.pl.factoryHints = '请选择所属工厂'
t.pl.process = '工序'
t.pl.add = '添加设备'
t.pl.queryFirst = '请先查询数据'
t.pl.success = '新设备数据获取成功'
t.pl.choose = '请选择设备'
t.pl.confirm = '确定'
t.pl.cancel = '取消'
t.prompt = {} t.prompt = {}
t.prompt.title = '提示' t.prompt.title = '提示'

View File

@ -1,3 +1,11 @@
/*
* @Descripttion:
* @version:
* @Author: fzq
* @Date: 2022-12-13 21:01:02
* @LastEditors: fzq
* @LastEditTime: 2023-01-11 10:47:26
*/
import './iconfont' import './iconfont'
import Vue from 'vue' import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon'// svg component import SvgIcon from '@/components/SvgIcon'// svg component
@ -9,8 +17,9 @@ const req = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext) const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req) requireAll(req)
const svgFiles = require.context('./svg', true, /\.svg$/) // 这里注释掉了
svgFiles.keys().map(item => svgFiles(item)) // const svgFiles = require.context('./svg', true, /\.svg$/)
// svgFiles.keys().map(item => svgFiles(item))
export default { export default {
// 获取图标icon-(*).svg名称列表, 例如[shouye, xitong, zhedie, ...] // 获取图标icon-(*).svg名称列表, 例如[shouye, xitong, zhedie, ...]

2
src/icons/svg/chrome.svg Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1660620397071" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M87.788 227.913c17.049 29.189 34.039 58.291 51.043 87.383 51.784 88.596 103.585 177.181 155.325 265.804 2.62 4.485 5.062 9.143 7 13.955C349.786 715.89 484.618 771.244 604.34 719.47c2.398-1.037 4.887-1.861 9.302-3.526-2.588 4.897-4.038 7.89-5.7 10.755-54.798 94.487-109.707 188.908-164.246 283.545-4.133 7.171-8.493 8.259-15.899 6.935-206.01-36.867-364.332-183.492-412.98-387.026-33.681-140.916-9.465-273.513 67.799-396.221a55.282 55.282 0 0 1 2.993-4.263c0.41-0.532 1.065-0.875 2.179-1.756zM637.574 322.251c4.879-0.232 7.832-0.494 10.785-0.495 109.636-0.021 219.273 0.08 328.908-0.221 8.034-0.021 11.143 2.592 13.896 9.949 77.165 206.263 15.492 437.682-155.167 576.728-99.718 81.243-214.648 119.245-343.254 115.541-4.101-0.116-8.19-0.579-13.782-0.991 2.282-4.327 3.863-7.594 5.678-10.723 73.799-127.297 147.568-254.609 221.459-381.853 61.326-105.603 35.165-231.359-63.311-303.663-1.275-0.936-2.452-2.003-5.212-4.272zM970.66 284.978h-15.17c-145.492 0-290.984-0.444-436.474 0.156-97.432 0.401-169.373 44.268-212.233 132.11-11.095 22.739-15.798 48.603-23.28 72.528-0.437-0.663-2.509-3.517-4.279-6.546-54.593-93.406-109.079-186.878-163.896-280.152-3.852-6.555-3.331-10.476 1.434-16.115C205.093 82.393 316.58 20.463 452.687 3.72c207.799-25.561 413.84 82.445 511.367 267.993 1.915 3.643 3.675 7.368 6.606 13.265zM702.425 512.551c-0.178 106.027-85.601 189.996-193.057 189.771-103.007-0.212-187.656-86.695-187.287-191.343 0.373-106.007 85.766-189.459 193.555-189.154 102.551 0.287 186.962 86.481 186.789 190.726z" p-id="965"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,2 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1660620397071" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="964" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M87.788 227.913c17.049 29.189 34.039 58.291 51.043 87.383 51.784 88.596 103.585 177.181 155.325 265.804 2.62 4.485 5.062 9.143 7 13.955C349.786 715.89 484.618 771.244 604.34 719.47c2.398-1.037 4.887-1.861 9.302-3.526-2.588 4.897-4.038 7.89-5.7 10.755-54.798 94.487-109.707 188.908-164.246 283.545-4.133 7.171-8.493 8.259-15.899 6.935-206.01-36.867-364.332-183.492-412.98-387.026-33.681-140.916-9.465-273.513 67.799-396.221a55.282 55.282 0 0 1 2.993-4.263c0.41-0.532 1.065-0.875 2.179-1.756zM637.574 322.251c4.879-0.232 7.832-0.494 10.785-0.495 109.636-0.021 219.273 0.08 328.908-0.221 8.034-0.021 11.143 2.592 13.896 9.949 77.165 206.263 15.492 437.682-155.167 576.728-99.718 81.243-214.648 119.245-343.254 115.541-4.101-0.116-8.19-0.579-13.782-0.991 2.282-4.327 3.863-7.594 5.678-10.723 73.799-127.297 147.568-254.609 221.459-381.853 61.326-105.603 35.165-231.359-63.311-303.663-1.275-0.936-2.452-2.003-5.212-4.272zM970.66 284.978h-15.17c-145.492 0-290.984-0.444-436.474 0.156-97.432 0.401-169.373 44.268-212.233 132.11-11.095 22.739-15.798 48.603-23.28 72.528-0.437-0.663-2.509-3.517-4.279-6.546-54.593-93.406-109.079-186.878-163.896-280.152-3.852-6.555-3.331-10.476 1.434-16.115C205.093 82.393 316.58 20.463 452.687 3.72c207.799-25.561 413.84 82.445 511.367 267.993 1.915 3.643 3.675 7.368 6.606 13.265zM702.425 512.551c-0.178 106.027-85.601 189.996-193.057 189.771-103.007-0.212-187.656-86.695-187.287-191.343 0.373-106.007 85.766-189.459 193.555-189.154 102.551 0.287 186.962 86.481 186.789 190.726z" p-id="965" fill="#fff"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="选择" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页选择" transform="translate(-1492.000000, -20.000000)" fill-rule="nonzero">
<g id="banner/top" transform="translate(1.000000, -0.000000)">
<g id="倒计时" transform="translate(1491.000000, 20.000000)">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24"></rect>
<path d="M18.6251339,2.5 L18.7173046,2.506884 C19.0181775,2.55223577 19.25,2.81622235 19.25,3.13636364 C19.25,3.48849651 18.9695089,3.77267387 18.6250952,3.77272728 L18.6250952,3.77272728 L17.500134,3.77272728 L17.500134,6.68181819 L17.4950738,6.93194703 C17.4134263,8.92636566 16.3486624,10.7533909 14.6512846,11.7864428 L14.6512846,11.7864428 L14.3002984,12.0000588 L14.6513368,12.2135889 L14.8602283,12.3467668 C16.5045868,13.4445685 17.5015027,15.3107448 17.500134,17.3180114 L17.500134,17.3180114 L17.500134,20.2272727 L18.6251339,20.2272727 L18.7173078,20.2341693 C19.0181892,20.2795564 19.25,20.5435156 19.25,20.8636364 C19.25,21.2157918 18.9694948,21.5 18.6251339,21.5 L18.6251339,21.5 L4.62513396,21.5 L4.53296333,21.493116 C4.23209038,21.4477642 4.00026791,21.1837777 4.00026791,20.8636364 C4.00026791,20.5115035 4.28075902,20.2273261 4.62517273,20.2272727 L4.62517273,20.2272727 L5.75013395,20.2272727 L5.75013395,17.3181818 L5.75519413,17.068053 C5.8368416,15.0736343 6.90160547,13.2466092 8.59898334,12.2135572 L8.59898334,12.2135572 L8.94996946,11.9999412 L8.59893115,11.7864111 L8.39003962,11.6532332 C6.74568111,10.5554315 5.74876521,8.68925518 5.75013389,6.68198865 L5.75013389,6.68198865 L5.75013395,3.77272728 L4.62513396,3.77272728 L4.53097506,3.76549115 C4.34557884,3.73677723 4.18042961,3.62417437 4.08444297,3.45578133 C3.97185234,3.2582593 3.97185234,3.01446799 4.08444297,2.81694595 C4.196414,2.6205109 4.40253386,2.5 4.62513396,2.5 L4.62513396,2.5 L18.6251339,2.5 Z M11.6309675,12.6364317 L11.4133705,12.641183 C8.9566894,12.7532313 7.00013396,14.805007 7.00013396,17.3181818 L7.00013396,17.3181818 L7.00013396,20.2272727 L16.2501339,20.2272727 L16.2501339,17.3181818 L16.2450986,17.0982663 C16.1348575,14.6926999 14.227663,12.7467226 11.8259996,12.6410372 L11.8259996,12.6410372 L11.6309675,12.6364317 Z M16.2501339,3.77272728 L7.00013396,3.77272728 L7.00013396,6.68181819 L7.00489156,6.89606874 C7.1155058,9.38167112 9.1410632,11.3636364 11.625134,11.3636364 L11.625134,11.3636364 L11.8208425,11.3591365 L12.0382189,11.3444826 C14.4134338,11.1283734 16.2499952,9.11397106 16.2501339,6.68183244 L16.2501339,6.68183244 L16.2501339,3.77272728 Z" id="形状结合" fill="#FFFFFF"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="1_基础资料" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="1-1工厂信息" transform="translate(-1446.000000, -20.000000)" fill="#000000" fill-rule="nonzero">
<g id="banner/top/栏" transform="translate(336.000000, 0.000000)">
<g id="编组-5" transform="translate(944.000000, 15.000000)">
<g id="倒计时" transform="translate(166.000000, 5.000000)">
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
<path d="M18.6251339,2.5 L18.7173046,2.506884 C19.0181775,2.55223577 19.25,2.81622235 19.25,3.13636364 C19.25,3.48849651 18.9695089,3.77267387 18.6250952,3.77272728 L18.6250952,3.77272728 L17.500134,3.77272728 L17.500134,6.68181819 L17.4950738,6.93194703 C17.4134263,8.92636566 16.3486624,10.7533909 14.6512846,11.7864428 L14.6512846,11.7864428 L14.3002984,12.0000588 L14.6513368,12.2135889 L14.8602283,12.3467668 C16.5045868,13.4445685 17.5015027,15.3107448 17.500134,17.3180114 L17.500134,17.3180114 L17.500134,20.2272727 L18.6251339,20.2272727 L18.7173078,20.2341693 C19.0181892,20.2795564 19.25,20.5435156 19.25,20.8636364 C19.25,21.2157918 18.9694948,21.5 18.6251339,21.5 L18.6251339,21.5 L4.62513396,21.5 L4.53296333,21.493116 C4.23209038,21.4477642 4.00026791,21.1837777 4.00026791,20.8636364 C4.00026791,20.5115035 4.28075902,20.2273261 4.62517273,20.2272727 L4.62517273,20.2272727 L5.75013395,20.2272727 L5.75013395,17.3181818 L5.75519413,17.068053 C5.8368416,15.0736343 6.90160547,13.2466092 8.59898334,12.2135572 L8.59898334,12.2135572 L8.94996946,11.9999412 L8.59893115,11.7864111 L8.39003962,11.6532332 C6.74568111,10.5554315 5.74876521,8.68925518 5.75013389,6.68198865 L5.75013389,6.68198865 L5.75013395,3.77272728 L4.62513396,3.77272728 L4.53097506,3.76549115 C4.34557884,3.73677723 4.18042961,3.62417437 4.08444297,3.45578133 C3.97185234,3.2582593 3.97185234,3.01446799 4.08444297,2.81694595 C4.196414,2.6205109 4.40253386,2.5 4.62513396,2.5 L4.62513396,2.5 L18.6251339,2.5 Z M11.6309675,12.6364317 L11.4133705,12.641183 C8.9566894,12.7532313 7.00013396,14.805007 7.00013396,17.3181818 L7.00013396,17.3181818 L7.00013396,20.2272727 L16.2501339,20.2272727 L16.2501339,17.3181818 L16.2450986,17.0982663 C16.1348575,14.6926999 14.227663,12.7467226 11.8259996,12.6410372 L11.8259996,12.6410372 L11.6309675,12.6364317 Z M16.2501339,3.77272728 L7.00013396,3.77272728 L7.00013396,6.68181819 L7.00489156,6.89606874 C7.1155058,9.38167112 9.1410632,11.3636364 11.625134,11.3636364 L11.625134,11.3636364 L11.8208425,11.3591365 L12.0382189,11.3444826 C14.4134338,11.1283734 16.2499952,9.11397106 16.2501339,6.68183244 L16.2501339,6.68183244 L16.2501339,3.77272728 Z" id="形状结合"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="1_基础资料">
<g id="1-1工厂信息" transform="translate(-1580.000000, -20.000000)">
<g id="banner/top/栏" transform="translate(336.000000, 0.000000)">
<g id="编组-5" transform="translate(944.000000, 15.000000)">
<g id="下载" transform="translate(300.000000, 5.000000)">
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
<path d="M7.6875,13.5 L11.25,13.5 L11.25,3.75 C11.25,3.33578644 11.5857864,3 12,3 C12.4142136,3 12.75,3.33578644 12.75,3.75 L12.75,13.5 L12.75,13.5 L16.3125,13.5 L12,18 L7.6875,13.5 Z M20.25,12 C19.8357864,12 19.5,12.3357864 19.5,12.75 L19.5,18.5 C19.5,19.0522847 19.0522847,19.5 18.5,19.5 L5.5,19.5 C4.94771525,19.5 4.5,19.0522847 4.5,18.5 L4.5,12.75 C4.5,12.3357864 4.16421356,12 3.75,12 C3.33578644,12 3,12.3357864 3,12.75 L3,19 C3,20.1045695 3.8954305,21 5,21 L19,21 C20.1045695,21 21,20.1045695 21,19 L21,12.75 C21,12.3357864 20.6642136,12 20.25,12 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="1_基础资料">
<g id="1-1工厂信息" transform="translate(-1580.000000, -20.000000)">
<g id="banner/top/栏" transform="translate(336.000000, 0.000000)">
<g id="编组-5" transform="translate(944.000000, 15.000000)">
<g id="下载" transform="translate(300.000000, 5.000000)">
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
<path d="M7.6875,13.5 L11.25,13.5 L11.25,3.75 C11.25,3.33578644 11.5857864,3 12,3 C12.4142136,3 12.75,3.33578644 12.75,3.75 L12.75,13.5 L12.75,13.5 L16.3125,13.5 L12,18 L7.6875,13.5 Z M20.25,12 C19.8357864,12 19.5,12.3357864 19.5,12.75 L19.5,18.5 C19.5,19.0522847 19.0522847,19.5 18.5,19.5 L5.5,19.5 C4.94771525,19.5 4.5,19.0522847 4.5,18.5 L4.5,12.75 C4.5,12.3357864 4.16421356,12 3.75,12 C3.33578644,12 3,12.3357864 3,12.75 L3,19 C3,20.1045695 3.8954305,21 5,21 L19,21 C20.1045695,21 21,20.1045695 21,19 L21,12.75 C21,12.3357864 20.6642136,12 20.25,12 Z" id="形状" fill="#fff"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

1
src/icons/svg/home.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1615188284589" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2221" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M998.428444 381.112889l-469.333333-353.180445c-0.469333-0.355556-0.981333-0.568889-1.479111-0.896a28.017778 28.017778 0 0 0-2.417778-1.464888 29.909333 29.909333 0 0 0-10.453333-3.128889 30.705778 30.705778 0 0 0-5.475556-0.014223 28.771556 28.771556 0 0 0-13.112889 4.707556c-0.412444 0.284444-0.867556 0.469333-1.28 0.782222l-469.333333 353.180445a28.458667 28.458667 0 0 0 34.204445 45.468444l73.656888-55.424V854.186667c0 111.701333 29.141333 147.555556 136.803556 147.555555h483.555556c107.662222 0 147.640889-35.854222 147.640888-147.555555V379.320889l62.805334 47.260444c5.12 3.854222 11.121778 5.717333 17.080889 5.717334a28.444444 28.444444 0 0 0 17.137777-51.185778zM443.747556 674.673778H580.266667c31.288889 0 36.707556 0.554667 36.707555 28.8v241.422222H417.877333V703.473778c0-28.245333-5.418667-28.8 25.870223-28.8z m400.782222-327.111111v506.666666c0 81.365333-14.193778 90.666667-90.752 90.666667h-108.359111V703.473778c0-48.967111-23.850667-57.244444-65.152-57.244445h-136.519111c-41.301333 0-54.314667 8.277333-54.314667 57.244445v241.422222H270.222222c-76.572444 0-79.914667-9.301333-79.914666-90.666667V347.562667c0-5.788444-1.749333-11.150222-4.721778-15.644445L512 86.272l334.336 251.591111a28.231111 28.231111 0 0 0-1.806222 9.699556z" fill="" p-id="2222"></path><path d="M435.370667 230.499556L250.055111 373.617778c-3.512889 2.688-2.858667 6.855111-2.858667 11.278222v161.777778a14.222222 14.222222 0 1 0 28.444445 0V391.907556l178.730667-138.837334c6.243556-4.778667 5.034667-13.710222 0.256-19.939555a13.425778 13.425778 0 0 0-19.256889-2.631111zM261.418667 589.340444a14.222222 14.222222 0 0 0-14.222223 14.222223v14.222222a14.222222 14.222222 0 1 0 28.444445 0v-14.222222a14.222222 14.222222 0 0 0-14.222222-14.222223z" fill="#000" p-id="2223"></path></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -112,8 +112,9 @@ export default {
var tabName = this.$store.state.contentTabsActiveName var tabName = this.$store.state.contentTabsActiveName
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName) this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)
if (this.$store.state.contentTabs.length <= 0) { if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home' // this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
return false // return false
this.$router.push({ name: 'home' })
} }
if (tabName === this.$store.state.contentTabsActiveName) { if (tabName === this.$store.state.contentTabsActiveName) {
this.$router.push({ name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name }) this.$router.push({ name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name })

View File

@ -4,7 +4,7 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-12-11 20:33:35 * @Date: 2022-12-11 20:33:35
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2022-12-11 20:43:32 * @LastEditTime: 2023-01-12 09:50:26
*/ */
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
@ -31,13 +31,12 @@ export default new Vuex.Store({
contentTabs: [ contentTabs: [
{ {
...window.SITE_CONFIG['contentTabDefault'], ...window.SITE_CONFIG['contentTabDefault'],
// 'name': 'sys-log-login', // 这里显示/隐藏 main-content的home标签
'name': 'home', // 'name': 'home',
'title': 'home' // 'title': 'home'
} }
], ],
contentTabsActiveName: 'home' // contentTabsActiveName: 'home'
// contentTabsActiveName: 'sys-log-login'
}, },
modules: { modules: {
user user

View File

@ -1,3 +1,11 @@
/*
* @Descripttion:
* @version:
* @Author: fzq
* @Date: 2022-11-25 09:51:46
* @LastEditors: fzq
* @LastEditTime: 2023-01-11 20:52:35
*/
/** filters */ /** filters */
import moment from 'moment' import moment from 'moment'
@ -22,3 +30,11 @@ export const pick = (obj, paths) => {
}) })
return result return result
} }
// export function timeFormatter(timeObj) {
// if (timeObj) {
// return moment(timeObj).format('YYYY-MM-DD HH:mm:ss')
// } else {
// return '-'
// }
// }

56
src/views/Footerbar.vue Normal file
View File

@ -0,0 +1,56 @@
<!--
* @Author: your name
* @Date: 2021-01-27 10:07:42
* @LastEditTime: 2023-01-13 16:22:01
* @LastEditors: fzq
* @Description: In User Settings Edit
* @FilePath: \mt-bus-fe\src\layout\components\FooterBar.vue
-->
<template>
<div v-if="this.$route.meta.hiddenSiderbar !== true" :class="[$store.state.sidebarFold == true ? 'footerbar' : 'footerbar2']">
© {{ $t('copyright') }}
</div>
</template>
<script>
export default {
components: {},
computed: {},
watch: {},
methods: {}
}
</script>
<style lang="scss">
.footerbar{
position: fixed;
bottom: 0;
width: 100%;
height: 20px;
// line-height: 50px;
// text-indent: 2em;
// background: #fff;
// z-index: 999;
// box-shadow: 2px -2px 2px rgba($color: #000000, $alpha: .1);
text-align: center;
font-size: 12px;
color: #C7C7C7;
margin: 5px 0;
}
.footerbar2{
position: fixed;
bottom: 0;
width: 100%;
height: 20px;
// line-height: 50px;
// text-indent: 2em;
// background: #fff;
// z-index: 999;
// box-shadow: 2px -2px 2px rgba($color: #000000, $alpha: .1);
left: 50vw;
font-size: 12px;
color: #C7C7C7;
margin: 5px 0;
}
</style>

View File

@ -1,6 +1,6 @@
<template> <template>
<!-- <main :class="['aui-content', { 'aui-content--tabs': $route.meta.isTab }]"> --> <!-- <main :class="['aui-content', { 'aui-content--tabs': $route.meta.isTab }]"> -->
<main :class="[this.$route.meta.hiddenSiderbar !== true? ['aui-content', { 'aui-content--tabs': $route.meta.isTab }] : 'aui-sidebar.close']"> <main :class="[this.$route.meta.hiddenSiderbar !== true ? ['aui-content', { 'aui-content--tabs': $route.meta.isTab }] : 'aui-sidebar.close']">
<!-- tab展示内容 --> <!-- tab展示内容 -->
<template v-if="$route.meta.isTab"> <template v-if="$route.meta.isTab">
<el-dropdown class="aui-content--tabs-tools"> <el-dropdown class="aui-content--tabs-tools">
@ -11,18 +11,17 @@
<el-dropdown-item @click.native="tabsCloseAllHandle()">{{ $t('contentTabs.closeAll') }}</el-dropdown-item> <el-dropdown-item @click.native="tabsCloseAllHandle()">{{ $t('contentTabs.closeAll') }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-tabs v-model="$store.state.contentTabsActiveName" @tab-click="tabSelectedHandle" @tab-remove="tabRemoveHandle"> <el-tabs v-model="$store.state.contentTabsActiveName" @tab-click="tabSelectedHandle" @tab-remove="tabRemoveHandle" ref="tabs">
<el-tab-pane <el-tab-pane
v-for="item in $store.state.contentTabs" v-for="item in $store.state.contentTabs"
:key="item.name" :key="item.name"
:name="item.name" :name="item.name"
:label="item.title" :label="item.title"
:closable="item.name !== 'home'" :closable="item.name !== ''"
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }" :class="{ 'is-iframe': tabIsIframe(item.iframeURL) }">
> <!-- <template v-if="item.name === 'home'">
<template v-if="item.name === 'home'">
<svg slot="label" class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#icon-home"></use></svg> <svg slot="label" class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#icon-home"></use></svg>
</template> </template> -->
<iframe v-if="tabIsIframe(item.iframeURL)" :src="item.iframeURL" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe> <iframe v-if="tabIsIframe(item.iframeURL)" :src="item.iframeURL" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>
<keep-alive v-else> <keep-alive v-else>
<router-view v-if="item.name === $store.state.contentTabsActiveName" /> <router-view v-if="item.name === $store.state.contentTabsActiveName" />
@ -45,6 +44,19 @@ export default {
data() { data() {
return {} return {}
}, },
mounted() {
this.$nextTick(() => {
// ref
this.$store.state.contentTabs.splice(0, 1)
// home$children
if (this.$route.meta.hiddenSiderbar !== true) {
this.$refs.tabs.$children[0].$refs.tabs[0].style.display = 'none'
}
// console.log(this.$refs.tabs.$children[0].$refs)
// console.log('11',this.$refs.tabs.$children[0].$refs.tabs[0])
// console.log('22',this.$store.state.contentTabs)
})
},
methods: { methods: {
// tabs, iframe // tabs, iframe
tabIsIframe(url) { tabIsIframe(url) {
@ -52,7 +64,7 @@ export default {
}, },
// tabs, tab // tabs, tab
tabSelectedHandle(tab) { tabSelectedHandle(tab) {
tab = this.$store.state.contentTabs.filter(item => item.name === tab.name)[0] tab = this.$store.state.contentTabs.filter((item) => item.name === tab.name)[0]
if (tab) { if (tab) {
this.$router.push({ this.$router.push({
name: tab.name, name: tab.name,
@ -66,10 +78,11 @@ export default {
if (tabName === 'home') { if (tabName === 'home') {
return false return false
} }
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName) this.$store.state.contentTabs = this.$store.state.contentTabs.filter((item) => item.name !== tabName)
if (this.$store.state.contentTabs.length <= 0) { if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home' this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
return false // return false
this.$router.push({ name: 'home' })
} }
// tab // tab
if (tabName === this.$store.state.contentTabsActiveName) { if (tabName === this.$store.state.contentTabsActiveName) {
@ -83,13 +96,13 @@ export default {
}, },
// tabs, // tabs,
tabsCloseOtherHandle() { tabsCloseOtherHandle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => { this.$store.state.contentTabs = this.$store.state.contentTabs.filter((item) => {
return item.name === 'home' || item.name === this.$store.state.contentTabsActiveName return item.name === 'home' || item.name === this.$store.state.contentTabsActiveName
}) })
}, },
// tabs, // tabs,
tabsCloseAllHandle() { tabsCloseAllHandle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home') this.$store.state.contentTabs = this.$store.state.contentTabs.filter((item) => item.name === 'home')
// this.$router.push({ name: 'sys-log-login' }) // this.$router.push({ name: 'sys-log-login' })
this.$router.push({ name: 'home' }) this.$router.push({ name: 'home' })
} }

View File

@ -10,7 +10,7 @@
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })"> <h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
<a class="aui-navbar__brand-lg" href="javascript:;"> <a class="aui-navbar__brand-lg" href="javascript:;">
<!-- 36px --> <!-- 36px -->
<img src="../assets/img/cnbm.png" style="width: 26px; height: 26px; position: relative; top: -.075em; margin-right: 12px" alt="" /> <img src="../assets/img/cnbm.png" style="width: 26px; height: 26px; position: relative; top: -0.075em; margin-right: 12px" alt="" />
{{ $t('brand.lg') }} {{ $t('brand.lg') }}
</a> </a>
<!-- <a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a> --> <!-- <a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a> -->
@ -25,15 +25,30 @@
<div <div
class="aui-navbar__body" class="aui-navbar__body"
:style="{ :style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)' backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}"> }">
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal"> <el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
<el-menu-item v-if="this.$route.meta.hiddenSiderbar !== true" index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold"> <el-menu-item
v-if="this.$route.meta.hiddenSiderbar !== true"
index="1"
@click="$store.state.sidebarFold = !$store.state.sidebarFold"
:style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true"> <svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true">
<use xlink:href="#icon-outdent"></use> <use xlink:href="#icon-outdent"></use>
</svg> </svg>
</el-menu-item> </el-menu-item>
<el-menu-item v-if="this.$route.meta.hiddenSiderbar !== true" index="2" @click="refresh()"> <el-menu-item
v-if="this.$route.meta.hiddenSiderbar !== true"
index="2"
@click="refresh()"
:style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true"> <svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true">
<use xlink:href="#icon-sync"></use> <use xlink:href="#icon-sync"></use>
</svg> </svg>
@ -50,10 +65,39 @@
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#gitee"></use></svg> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#gitee"></use></svg>
</a> </a>
</el-menu-item> --> </el-menu-item> -->
<!-- <el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="avatar-container right-menu-item hover-effect" trigger="click">
<el-badge :hidden="alarmNum > 0 ? false : true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm">
<svg-icon style="width: 24px; height: 24px" class="item-icon" icon-class="alarm" />
</el-badge>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>暂无数据</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
<!-- <el-menu-item
:style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}">
<svg style="width: 24px; height: 24px; vertical-align: -7px">
<use v-if="this.$route.meta.hiddenSiderbar" xlink:href="#countdown"></use>
<use v-if="!this.$route.meta.hiddenSiderbar" xlink:href="#countdown2"></use>
</svg>
{{ formatTime }}
</el-menu-item> -->
<el-menu-item v-if="this.$route.meta.hiddenSiderbar !== true" @click="toHome">
<svg
style="width: 24px; height: 24px; vertical-align: -7px;backgroundColor: '#fff';color: '#000'">
<use xlink:href="#home"></use>
</svg>
<span style="color: #000">
{{ $t('brand.home') }}
</span>
</el-menu-item>
<el-menu-item <el-menu-item
index="3" index="3"
:style="{ :style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)' backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#fff' : '#000'
}"> }">
<!-- <el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="hover-effect" trigger="click"> <!-- <el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="hover-effect" trigger="click">
<el-badge :hidden="alarmNum > 0 ? false : true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm"> <el-badge :hidden="alarmNum > 0 ? false : true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm">
@ -64,25 +108,71 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> --> </el-dropdown> -->
<el-dropdown placement="bottom" :show-timeout="0" @command="handleCommand"> <el-dropdown placement="bottom" :show-timeout="0" @command="handleCommand">
<span class="el-dropdown-link"> <span>
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"> <!-- <svg class="icon-svg aui-navbar__icon-menu hover-effect" aria-hidden="true"> -->
<use xlink:href="#icon-earth"></use> <svg
class="icon-svg aui-navbar__icon-menu"
:style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}">
<!-- 根据路由2选1隐藏 -->
<use v-if="this.$route.meta.hiddenSiderbar" xlink:href="#language2"></use>
<use v-if="!this.$route.meta.hiddenSiderbar" xlink:href="#language3"></use>
</svg> </svg>
<!-- <i class="el-icon-arrow-down el-icon--right"></i> --> <!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :disabled="getLang() === 'zh-CN'" command="toCN">中文</el-dropdown-item> <el-dropdown-item :disabled="getLang() === 'zh-CN'" command="toCN">中文</el-dropdown-item>
<el-dropdown-item :disabled="getLang() === 'en'" command="toEN">En</el-dropdown-item> <el-dropdown-item :disabled="getLang() === 'en'" command="toEN">English</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-menu-item> </el-menu-item>
<el-menu-item
:style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}">
<a href="Lodap.zip"
><svg
:style="this.$route.meta.hiddenSiderbar !== true ? 'color: #000' : 'color: #fff'"
style="width: 24px; height: 24px; vertical-align: -7px"
icon-class="download"
>
<use v-if="this.$route.meta.hiddenSiderbar" xlink:href="#download2"></use>
<use v-if="!this.$route.meta.hiddenSiderbar" xlink:href="#download"></use>
</svg>
</a>
</el-menu-item>
<el-menu-item
:style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}">
<a href="google.exe">
<!-- <svg-icon style="width: 24px; height: 24px; vertical-align: -7px" icon-class="chrome" /></a> -->
<svg v-if="this.$route.meta.hiddenSiderbar" style="color: #fff; width: 24px; height: 24px; vertical-align: -7px">
<use xlink:href="#chrome2"></use>
</svg>
<svg v-if="!this.$route.meta.hiddenSiderbar" style="width: 24px; height: 24px; vertical-align: -7px">
<use xlink:href="#chrome"></use>
</svg>
</a>
</el-menu-item>
<el-menu-item <el-menu-item
index="4" index="4"
@click="fullscreenHandle()" @click="fullscreenHandle()"
:style="{ :style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)' backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}"> }">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"> <svg
class="icon-svg aui-navbar__icon-menu"
aria-hidden="true"
:style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}">
<use xlink:href="#icon-fullscreen"></use> <use xlink:href="#icon-fullscreen"></use>
</svg> </svg>
</el-menu-item> </el-menu-item>
@ -90,9 +180,16 @@
index="5" index="5"
class="aui-navbar__avatar" class="aui-navbar__avatar"
:style="{ :style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)' backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}"> }">
<el-dropdown placement="bottom" :show-timeout="0"> <el-dropdown
placement="bottom"
:show-timeout="0"
:style="{
backgroundColor: this.$route.meta.hiddenSiderbar !== true ? '#fff' : 'rgb(13,43,104)',
color: this.$route.meta.hiddenSiderbar !== true ? '#000' : '#fff'
}">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<img src="~@/assets/img/avatar.png" /> <img src="~@/assets/img/avatar.png" />
<span>{{ $store.state.user.name }}</span> <span>{{ $store.state.user.name }}</span>
@ -116,20 +213,97 @@ import Cookies from 'js-cookie'
import screenfull from 'screenfull' import screenfull from 'screenfull'
import UpdatePassword from './main-navbar-update-password' import UpdatePassword from './main-navbar-update-password'
import { clearLoginInfo } from '@/utils' import { clearLoginInfo } from '@/utils'
import moment from 'moment'
// let logoutInterval = null
// const timeInterval = null
export default { export default {
inject: ['refresh'], inject: ['refresh'],
data() { data() {
return { return {
// logoutTime: 1800000,
updatePasswordVisible: false, updatePasswordVisible: false,
messageTip: false messageTip: false
} }
}, },
computed: {
// formatTime() {
// return moment(this.logoutTime - 28800000).format('HH:mm:ss')
// }
},
watch: {
// logoutTime: function (val) {
// if (val <= 0) {
// this.logout()
// }
// }
// $route: function () {
// this.getAlarm()
// }
},
// mounted() {
// // this.getAlarm()
// logoutInterval = setInterval(() => {
// this.logoutTime -= 1000
// }, 1000)
// addEventListener('click', this.logoutTimeReset)
// addEventListener('keydown', this.logoutTimeReset)
// addEventListener('visibilitychange', this.visibilitychangeListener)
// },
// destroyed() {
// clearInterval(logoutInterval)
// clearInterval(timeInterval)
// removeEventListener('click', this.logoutTimeReset)
// removeEventListener('keydown', this.logoutTimeReset)
// removeEventListener('visibilitychange', this.visibilitychangeListener)
// },
components: { components: {
UpdatePassword UpdatePassword
// Hamburger // Hamburger
}, },
methods: { methods: {
// // winBlur() {
// this.blurTime = new Date()
// clearInterval(logoutInterval)
// },
// //
// winFocus() {
// if (this.logoutTime - (new Date() - this.blurTime).valueOf() <= 0) {
// this.logout()
// } else {
// this.logoutTime -= (new Date() - this.blurTime).valueOf()
// logoutInterval = setInterval(() => {
// this.logoutTime -= 1000
// }, 1000)
// }
// },
// // 退
// logoutTimeReset() {
// this.logoutTime = this.time * 60000
// },
// visibilitychangeListener() {
// if (document.hidden) {
// this.winBlur()
// } else {
// this.winFocus()
// }
// },
// async logout() {
// console.log("sessionStorage.getItem('loginspc')", sessionStorage.getItem('loginspc'))
// if (sessionStorage.getItem('loginspc') === 'login') {
// const spcUrl = `/spc/upms/userinfo/logoutUser?account=${'ZJCadmin'}`
// axios.get(spcUrl).then((res) => {
// if (res.data.code !== 'OK') {
// this.$message.error(this.$t('module.quality.spc.error'))
// }
// sessionStorage.setItem('loginspc', 'logout')
// })
// }
// await this.$store.dispatch('user/logout')
// console.log('`/login?redirect=${this.$route.fullPath}`', `/login?redirect=${this.$route.fullPath}`)
// this.$router.push(`/login?redirect=${this.$route.fullPath}`)
// clearInterval(logoutInterval)
// },
// //
getLang() { getLang() {
return Cookies.get('language') return Cookies.get('language')
}, },
@ -167,6 +341,9 @@ export default {
this.$refs.updatePassword.init() this.$refs.updatePassword.init()
}) })
}, },
async toHome() {
this.$router.push('/')
},
// 退 // 退
logoutHandle() { logoutHandle() {
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), { this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {

View File

@ -6,11 +6,13 @@
<div :class="[this.$route.meta.hiddenSiderbar !== true? 'aui-content__wrapper':'aui-sidebar.close']"> <div :class="[this.$route.meta.hiddenSiderbar !== true? 'aui-content__wrapper':'aui-sidebar.close']">
<main-content v-if="!$store.state.contentIsNeedRefresh" /> <main-content v-if="!$store.state.contentIsNeedRefresh" />
</div> </div>
<footerbar />
</template> </template>
</div> </div>
</template> </template>
<script> <script>
import Footerbar from './Footerbar'
import MainNavbar from './main-navbar' import MainNavbar from './main-navbar'
import MainSidebar from './main-sidebar' import MainSidebar from './main-sidebar'
import MainContent from './main-content' import MainContent from './main-content'
@ -35,7 +37,8 @@ export default {
components: { components: {
MainNavbar, MainNavbar,
MainSidebar, MainSidebar,
MainContent MainContent,
Footerbar
}, },
watch: { watch: {
$route: 'routeHandle' $route: 'routeHandle'
@ -65,6 +68,7 @@ export default {
if (!route.meta.isTab) { if (!route.meta.isTab) {
return false return false
} }
// console.log('tab',this.$store.state.contentTabs);
var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)[0] var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)[0]
if (!tab) { if (!tab) {
tab = { tab = {

View File

@ -124,7 +124,7 @@ export default {
// } else { // } else {
// this.toRouter(item) // this.toRouter(item)
// } // }
console.log('item',item) // console.log('item',item)
this.toRouter(item) this.toRouter(item)
}, },
toRouter(item) { toRouter(item) {

View File

@ -1,11 +1,22 @@
<!--
* @Descripttion:
* @version:
* @Author: fzq
* @Date: 2022-11-25 09:51:46
* @LastEditors: fzq
* @LastEditTime: 2023-01-13 09:04:39
-->
<template> <template>
<el-dialog :visible.sync="visible" :title="$t('schedule.log')" :close-on-click-modal="false" :close-on-press-escape="false" width="75%"> <el-dialog :visible.sync="visible" :title="$t('schedule.log')" :close-on-click-modal="false" :close-on-press-escape="false" width="75%">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('schedule.jobId') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.jobId" :placeholder="$t('schedule.jobId')" clearable></el-input> <el-input v-model="dataForm.jobId" :placeholder="$t('schedule.jobId')" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button> <el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -78,3 +89,20 @@ export default {
} }
} }
</script> </script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@ -2,6 +2,9 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-job__schedule"> <div class="mod-job__schedule">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('schedule.beanName') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input> <el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{$t('eq.name')}}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -2,12 +2,18 @@
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item> <el-form-item>
<el-select v-model="dataForm.lineId" :placeholder="'产线'" clearable> {{ $t('pl.name') }}
</el-form-item>
<el-form-item>
<el-select v-model="dataForm.lineId" :placeholder="$t('pl.name')" clearable>
<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" /> <el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.equipmentId" :placeholder="'设备名称'" clearable> {{ $t('eq.name') }}
</el-form-item>
<el-form-item>
<el-select v-model="dataForm.equipmentId" :placeholder="$t('eq.name')" clearable>
<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" /> <el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
</el-select> </el-select>
</el-form-item> </el-form-item>

View File

@ -3,6 +3,9 @@
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<!-- 工厂 --> <!-- 工厂 -->
<el-form-item>
{{ $t('factory.title') }}
</el-form-item>
<el-form-item> <el-form-item>
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> --> <!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
<el-select v-model="dataForm.ftId" :placeholder="$t('factory.title')" clearable> <el-select v-model="dataForm.ftId" :placeholder="$t('factory.title')" clearable>
@ -10,6 +13,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 产线 --> <!-- 产线 -->
<el-form-item>
{{ $t('pl.title') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable> <el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" /> <el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
@ -17,6 +23,9 @@
</el-form-item> </el-form-item>
<!-- 时间类型 --> <!-- 时间类型 -->
<!-- 按时间段 --> <!-- 按时间段 -->
<el-form-item>
{{ $t('timetype') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="timeType" :placeholder="$t('timetype')" clearable> <el-select v-model="timeType" :placeholder="$t('timetype')" clearable>
<el-option value="range" :label="$t('reftimerange')" /> <el-option value="range" :label="$t('reftimerange')" />
@ -24,6 +33,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 日期选择 --> <!-- 日期选择 -->
<el-form-item>
{{ $t('time') }}
</el-form-item>
<el-form-item v-if="timeType === 'date'"> <el-form-item v-if="timeType === 'date'">
<el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="$t('hints.date')" format="yyyy-MM-dd" /> <el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="$t('hints.date')" format="yyyy-MM-dd" />
</el-form-item> </el-form-item>

View File

@ -2,11 +2,17 @@
<!-- 设备效率分析 --> <!-- 设备效率分析 -->
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('prompt.month') }}
</el-form-item>
<!-- 月份 --> <!-- 月份 -->
<el-form-item> <el-form-item>
<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="$t('prompt.month')" format="yyyy-MM" /> <el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="$t('prompt.month')" format="yyyy-MM" />
</el-form-item> </el-form-item>
<!-- 产线 --> <!-- 产线 -->
<el-form-item>
{{ $t('pl.title') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable> <el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" /> <el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('eq.groupname') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('eq.groupname') + ' / ' + $t('eq.groupcode')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('eq.groupname') + ' / ' + $t('eq.groupcode')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{$t('name')}}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('name') + ' / ' + $t('code')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('name') + ' / ' + $t('code')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{$t('eq.name')}}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -4,21 +4,30 @@
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<!-- 产线 --> <!-- 产线 -->
<el-form-item> <el-form-item>
<el-select v-model="dataForm.productlines" :placeholder="'产线'" @change="handleProductLineChange" clearable> {{ $t('pl.title') }}
</el-form-item>
<el-form-item>
<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" @change="handleProductLineChange" clearable>
<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" <el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id"
:label="productLine.name" /> :label="productLine.name" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 工序 --> <!-- 工序 -->
<el-form-item>
{{ $t('pl.process') }}
</el-form-item>
<el-form-item> <el-form-item>
<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> --> <!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
<el-select v-model="dataForm.wsId" :placeholder="'工序'" clearable> <el-select v-model="dataForm.wsId" :placeholder="$t('pl.process')" clearable>
<el-option v-for="ws in wsList" :key="ws.id" :value="ws.id" :label="ws.name" /> <el-option v-for="ws in wsList" :key="ws.id" :value="ws.id" :label="ws.name" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 日期选择 --> <!-- 日期选择 -->
<el-form-item> <el-form-item>
<el-date-picker key="date-picker" v-model="rawTime" type="date" :placeholder="'请选择日期'" format="yyyy-MM-dd" /> {{ $t('time') }}
</el-form-item>
<el-form-item>
<el-date-picker key="date-picker" v-model="rawTime" type="date" :placeholder="$t('time')" format="yyyy-MM-dd" />
</el-form-item> </el-form-item>
<!-- 按钮 --> <!-- 按钮 -->
<el-form-item> <el-form-item>
@ -26,24 +35,24 @@
<!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> --> <!-- <el-button v-if="$hasPermission('monitoring:equipmentEffiency:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="success" @click="addEq()">{{ '添加设备' }}</el-button> <el-button type="success" @click="addEq()">{{ $t('pl.add') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="time-chart" style="margin-top: 10px;"> <div class="time-chart" style="margin-top: 10px;">
<div v-show="equipmentCount > 0" id="time-chart__inner" ref="time-chart__inner" class="time-chart__inner" <div v-show="equipmentCount > 0" id="time-chart__inner" ref="time-chart__inner" class="time-chart__inner"
style="min-height: 50vh;" :style="{ height: autoHeight + 'px', width: '100%' }" /> style="min-height: 50vh;" :style="{ height: autoHeight + 'px', width: '100%' }" />
<div v-show="equipmentCount === 0">请先查询数据</div> <div v-show="equipmentCount === 0">{{ $t('pl.queryFirst') }}</div>
<!-- <div v-show="equipmentCount === 0">{{ $t('module.basicData.visual.hints.searchFirst') }}</div> --> <!-- <div v-show="equipmentCount === 0">{{ $t('module.basicData.visual.hints.searchFirst') }}</div> -->
</div> </div>
<el-dialog :visible.sync="dialogVisible" :title="'添加设备'" width="30%"> <el-dialog :visible.sync="dialogVisible" :title="$t('pl.add')" width="30%">
<el-select v-model="eqId" style="width: 100%" placeholder="请选择设备" clearable> <el-select v-model="eqId" style="width: 100%" :placeholder="$t('pl.choose')" clearable>
<el-option v-for="eq in dialogEqList" :key="eq.id" :label="eq.name" :value="eq.id" /> <el-option v-for="eq in dialogEqList" :key="eq.id" :label="eq.name" :value="eq.id" />
</el-select> </el-select>
<div slot="footer"> <div slot="footer">
<el-button @click="dialogVisible = false">{{ '取消' }}</el-button> <el-button @click="dialogVisible = false">{{ $t('pl.cancel') }}</el-button>
<el-button type="primary" @click="dialogConfirm">{{ '确定' }}</el-button> <el-button type="primary" @click="dialogConfirm">{{ $t('pl.confirm') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -51,7 +60,7 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
// import i18n from '@/i18n' import i18n from '@/i18n'
import BaseTable from '@/components/base-table' import BaseTable from '@/components/base-table'
import { calcMaxHeight } from '@/utils' import { calcMaxHeight } from '@/utils'
import moment from 'moment' import moment from 'moment'
@ -91,9 +100,9 @@ class ChartOption {
this.legend = { this.legend = {
data: [ data: [
// i18n.t('module.basicData.visual.echartLegends.working'), // i18n.t('module.basicData.visual.echartLegends.working'),
'正常', i18n.t('normal'),
'停机', i18n.t('shutdown'),
'故障' i18n.t('malfunction')
], ],
bottom: '0%', bottom: '0%',
selectedMode: false, selectedMode: false,
@ -108,7 +117,7 @@ class ChartOption {
} }
this.title = { this.title = {
// text: i18n.t('module.basicData.visual.echartTitles.eqStatus'), // text: i18n.t('module.basicData.visual.echartTitles.eqStatus'),
text: '设备状态时序图', text: i18n.t('diagram'),
left: 'center' left: 'center'
} }
this.xAxis = { this.xAxis = {
@ -142,9 +151,9 @@ class ChartOption {
data: [] data: []
} }
this.series = [ this.series = [
{ name: /** i18n.t('module.basicData.visual.echartLegends.working') */ '正常', type: 'bar', data: [] }, { name: /** i18n.t('module.basicData.visual.echartLegends.working') */ i18n.t('normal'), type: 'bar', data: [] },
{ name: '停机', type: 'bar', data: [] }, { name: i18n.t('shutdown'), type: 'bar', data: [] },
{ name: '故障', type: 'bar', data: [] }, { name: i18n.t('malfunction'), type: 'bar', data: [] },
{ {
type: 'custom', type: 'custom',
renderItem: renderItem, renderItem: renderItem,
@ -189,7 +198,7 @@ export default {
chart: null, chart: null,
chartOption: new ChartOption(), chartOption: new ChartOption(),
equipments: {}, equipments: {},
state: ['正常', '停机', '故障'], state: [this.$t('normal'),this.$t('shutdown'),this.$t('malfunction')],
colors: ['#4caf50', '#ffb300', '#e53935'], colors: ['#4caf50', '#ffb300', '#e53935'],
// queryBuffer: {}, // queryBuffer: {},
// tableConfigs, // tableConfigs,
@ -286,12 +295,12 @@ export default {
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res && res.code === 0) { if (res && res.code === 0) {
this.wsList = res.data.list this.wsList = res.data.list
/** set default */ /** select 默认选项set default */
if (this.wsList.length) { // if (this.wsList.length) {
this.dataForm.wsId = this.wsList[0].id // this.dataForm.wsId = this.wsList[0].id
} else { // } else {
this.dataForm.wsId = null // this.dataForm.wsId = null
} // }
} else { } else {
this.wsList.splice(0) this.wsList.splice(0)
} }
@ -338,7 +347,7 @@ export default {
value: [index, status.startTime, status.endTime], value: [index, status.startTime, status.endTime],
itemStyle: { itemStyle: {
normal: { normal: {
color: status.status === '正常' ? '#4caf50' : status.status === '停机' ? '#ffb300' : status.status === '故障' ? '#e53935' : null color: status.status === this.$t('normal') ? '#4caf50' : status.status === this.$t('shutdown') ? '#ffb300' : status.status === this.$t('malfunction') ? '#e53935' : null
} }
} }
}) })
@ -460,7 +469,7 @@ export default {
if (this.equipmentCount) { if (this.equipmentCount) {
this.dialogVisible = true this.dialogVisible = true
} else { } else {
this.$message.warning('请先查询数据') this.$message.warning(this.$t('pl.queryFirst'))
} }
}, },
@ -496,13 +505,13 @@ export default {
} else { } else {
/** handle new equipment */ /** handle new equipment */
const newEqStatusList = res.data const newEqStatusList = res.data
console.log('添加设备', res) // console.log('', res)
const newEq = this.transformDataToEquipments(newEqStatusList) const newEq = this.transformDataToEquipments(newEqStatusList)
this.$set(this.equipments, Object.keys(newEq)[0], newEq[Object.keys(newEq)[0]]) this.$set(this.equipments, Object.keys(newEq)[0], newEq[Object.keys(newEq)[0]])
this.chartOption.setYAxis(Object.keys(this.equipments).map(item => this.equipments[item].name)) this.chartOption.setYAxis(Object.keys(this.equipments).map(item => this.equipments[item].name))
this.chartOption.setData(this.transformEquipmentsToSeries(this.equipments)) this.chartOption.setData(this.transformEquipmentsToSeries(this.equipments))
this.$message.success('新设备数据获取成功') this.$message.success(this.$t('pl.success'))
this.$nextTick(() => { this.$nextTick(() => {
this.dialogVisible = false this.dialogVisible = false
this.renderChart() this.renderChart()

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('eq.type') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('eq.type')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('eq.type')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('factory.name') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('factory.name') + ' / ' + $t('factory.code')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('factory.name') + ' / ' + $t('factory.code')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -2,6 +2,10 @@
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item> <el-form-item>
{{ $t('prod.name') }}
</el-form-item>
<el-form-item>
<!-- {{$t('prod.name')}} -->
<el-input v-model="dataForm.key" :placeholder="$t('prod.name') + ' / ' + $t('prod.code')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('prod.name') + ' / ' + $t('prod.code')" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -96,7 +100,7 @@ const addOrUpdateConfigs = {
{ {
type: 'number', type: 'number',
trigger: 'blur', trigger: 'blur',
transform: val => Number(val), transform: (val) => Number(val),
message: i18n.t('hints.number') message: i18n.t('hints.number')
} }
] ]
@ -122,7 +126,7 @@ const addOrUpdateConfigs = {
name: 'area', name: 'area',
label: i18n.t('prod.area'), label: i18n.t('prod.area'),
type: 'number', type: 'number',
rules: [{ type: 'number', transform: val => Number(val), message: i18n.t('hints.number'), trigger: 'blur' }] rules: [{ type: 'number', transform: (val) => Number(val), message: i18n.t('hints.number'), trigger: 'blur' }]
}, },
'specifications', 'specifications',
'remark' 'remark'
@ -139,7 +143,7 @@ const addOrUpdateConfigs = {
relatedField: 'productId', relatedField: 'productId',
tableConfigs: [ tableConfigs: [
{ type: 'index', width: 100, name: i18n.t('index') }, { type: 'index', width: 100, name: i18n.t('index') },
{ prop: 'createTime', name: i18n.t('createTime'), filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') }, { prop: 'createTime', name: i18n.t('createTime'), filter: (val) => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') },
{ prop: 'name', name: i18n.t('attrName'), formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] }, { prop: 'name', name: i18n.t('attrName'), formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
{ prop: 'code', name: i18n.t('attrValue'), formField: true }, { prop: 'code', name: i18n.t('attrValue'), formField: true },
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
@ -175,7 +179,7 @@ export default {
}, },
created() { created() {
this.initDictList([UnitDictTypeId, ProductTypeDictTypeId]) this.initDictList([UnitDictTypeId, ProductTypeDictTypeId])
this.addOrUpdateConfigs.fields.forEach(item => { this.addOrUpdateConfigs.fields.forEach((item) => {
if (item.name) { if (item.name) {
if (item.name === 'typeDictValue') { if (item.name === 'typeDictValue') {
item.options = this.dictList[ProductTypeDictTypeId] item.options = this.dictList[ProductTypeDictTypeId]
@ -271,7 +275,7 @@ export default {
var ids = id var ids = id
? [id] ? [id]
: // ? [1556817256347828335] : // ? [1556817256347828335]
this.dataListSelections.map(item => { this.dataListSelections.map((item) => {
return item.id return item.id
}) })
this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), { this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('pl.name') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('pl.name')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('pl.name')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" :rules="dataFormRules" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" :rules="dataFormRules" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('inspect.det') }}
</el-form-item>
<el-form-item> <el-form-item>
<!-- <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input> --> <!-- <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input> -->
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
@ -327,8 +330,8 @@ export default {
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res && res.code === 0) { if (res && res.code === 0) {
this.addOrUpdateConfigs.fields.forEach((item) => { this.addOrUpdateConfigs.fields.forEach((item) => {
console.log('item',item) // console.log('item',item)
console.log('res',res) // console.log('res',res)
if (item.name === 'inspectionDetContent') if (item.name === 'inspectionDetContent')
item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.code })) item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.code }))
// console.log('item',item) // console.log('item',item)

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
{{ $t('time')}}
</el-form-item>
<el-form-item> <el-form-item>
<!-- type="datetimerange" --> <!-- type="datetimerange" -->
<el-date-picker <el-date-picker
@ -399,4 +402,8 @@ export default {
background: #fff; background: #fff;
padding: 12px; padding: 12px;
} }
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style> </style>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('inspect.det') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,11 +1,17 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('pl.title') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.lineId" :placeholder="$t('pl.title')" clearable filterable> <el-select v-model="dataForm.lineId" :placeholder="$t('pl.title')" clearable filterable>
<el-option v-for="pl in plList" :key="pl.value" :value="pl.value" :label="pl.label" /> <el-option v-for="pl in plList" :key="pl.value" :value="pl.value" :label="pl.label" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item>
{{ $t('inspect.det') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('inspect.typename') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('inspect.typename')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('inspect.typename')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('categoryName') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.name" :placeholder="$t('categoryName')" clearable></el-input> <el-input v-model="dataForm.name" :placeholder="$t('categoryName')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,6 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('report.name') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.name" :placeholder="$t('report.name')" clearable></el-input> <el-input v-model="dataForm.name" :placeholder="$t('report.name')" clearable></el-input>
</el-form-item> </el-form-item>
@ -77,7 +80,7 @@ const CategoryList = {
render: function(h) { render: function(h) {
const childOptions = [] const childOptions = []
this.injectData.head.options?.forEach(item => { this.injectData.head.options?.forEach(item => {
console.log('item', item.value) // console.log('item', item.value)
childOptions.push(h('el-option', { props: { label: item.label, value: item.value } }, null)) childOptions.push(h('el-option', { props: { label: item.label, value: item.value } }, null))
}) })
return h('el-select', { props: { value: this.pickedId }, on: { change: this.handleChange } }, childOptions) return h('el-select', { props: { value: this.pickedId }, on: { change: this.handleChange } }, childOptions)

View File

@ -2,6 +2,9 @@
<div class="mod-config"> <div class="mod-config">
<!-- 1. class="blueTip" size="small" --> <!-- 1. class="blueTip" size="small" -->
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
<el-form-item>
{{ $t('ws.name') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" :placeholder="$t('ws.name')" clearable></el-input> <el-input v-model="dataForm.key" :placeholder="$t('ws.name')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -1,15 +1,29 @@
<!--
* @Descripttion:
* @version:
* @Author: fzq
* @Date: 2022-11-25 09:51:46
* @LastEditors: fzq
* @LastEditTime: 2023-01-12 16:41:08
-->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__dict"> <div class="mod-sys__dict">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
{{$t('dict.dictValue')}}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.dictValue" :placeholder="$t('dict.dictValue')" clearable></el-input> <el-input v-model="dataForm.dictValue" :placeholder="$t('dict.dictValue')" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item>
{{$t('dict.dictLabel')}}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.dictLabel" :placeholder="$t('dict.dictLabel')" clearable></el-input> <el-input v-model="dataForm.dictLabel" :placeholder="$t('dict.dictLabel')" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button v-if="$hasPermission('sys:dict:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> <el-button v-if="$hasPermission('sys:dict:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
@ -95,3 +109,20 @@ export default {
} }
} }
</script> </script>
<style>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 24px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 4px;
}
.buttonColor {
color: #fff;
background: #0b58ff;
}
</style>

View File

@ -2,9 +2,15 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__dict"> <div class="mod-sys__dict">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
{{ $t('dict.dictName') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.dictName" :placeholder="$t('dict.dictName')" clearable></el-input> <el-input v-model="dataForm.dictName" :placeholder="$t('dict.dictName')" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item>
{{ $t('dict.dictType') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.dictType" :placeholder="$t('dict.dictType')" clearable></el-input> <el-input v-model="dataForm.dictType" :placeholder="$t('dict.dictType')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -4,15 +4,21 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-11-25 09:51:46 * @Date: 2022-11-25 09:51:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2023-01-03 11:13:55 * @LastEditTime: 2023-01-13 08:59:37
--> -->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__log-login"> <div class="mod-sys__log-login">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
{{ $t('logLogin.creatorName') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.creatorName" :placeholder="$t('logLogin.creatorName')" clearable></el-input> <el-input v-model="dataForm.creatorName" :placeholder="$t('logLogin.creatorName')" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item>
{{ $t('logLogin.status') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.status" :placeholder="$t('logLogin.status')" clearable> <el-select v-model="dataForm.status" :placeholder="$t('logLogin.status')" clearable>
<el-option :label="$t('logLogin.status0')" :value="0"></el-option> <el-option :label="$t('logLogin.status0')" :value="0"></el-option>

View File

@ -4,12 +4,15 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-11-25 09:51:46 * @Date: 2022-11-25 09:51:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2023-01-03 11:15:45 * @LastEditTime: 2023-01-13 09:01:16
--> -->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__log-operation"> <div class="mod-sys__log-operation">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
{{ $t('logOperation.status') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.status" :placeholder="$t('logOperation.status')" clearable> <el-select v-model="dataForm.status" :placeholder="$t('logOperation.status')" clearable>
<el-option :label="$t('logOperation.status0')" :value="0"></el-option> <el-option :label="$t('logOperation.status0')" :value="0"></el-option>
@ -23,7 +26,7 @@
<el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button> <el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @sort-change="dataListSortChangeHandle" style="width: 100%;"> <el-table v-loading="dataListLoading" :data="dataList" border @sort-change="dataListSortChangeHandle" style="width: 100%">
<el-table-column prop="creatorName" :label="$t('logOperation.creatorName')" header-align="center" align="center"></el-table-column> <el-table-column prop="creatorName" :label="$t('logOperation.creatorName')" header-align="center" align="center"></el-table-column>
<el-table-column prop="operation" :label="$t('logOperation.operation')" header-align="center" align="center"></el-table-column> <el-table-column prop="operation" :label="$t('logOperation.operation')" header-align="center" align="center"></el-table-column>
<el-table-column prop="requestUri" :label="$t('logOperation.requestUri')" header-align="center" align="center"></el-table-column> <el-table-column prop="requestUri" :label="$t('logOperation.requestUri')" header-align="center" align="center"></el-table-column>
@ -34,8 +37,7 @@
header-align="center" header-align="center"
align="center" align="center"
width="150" width="150"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"></el-table-column>
></el-table-column>
<el-table-column prop="requestTime" :label="$t('logOperation.requestTime')" sortable="custom" header-align="center" align="center"> <el-table-column prop="requestTime" :label="$t('logOperation.requestTime')" sortable="custom" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ `${scope.row.requestTime}ms` }} {{ `${scope.row.requestTime}ms` }}
@ -58,8 +60,7 @@
:total="total" :total="total"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle" @size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle" @current-change="pageCurrentChangeHandle">
>
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>

View File

@ -4,14 +4,14 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-11-25 09:51:46 * @Date: 2022-11-25 09:51:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2023-01-03 11:17:22 * @LastEditTime: 2023-01-13 09:06:03
--> -->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__menu"> <div class="mod-sys__menu">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" size="small">
<el-form-item> <el-form-item>
<el-button class="buttonColor" v-if="$hasPermission('sys:menu:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> <el-button v-if="$hasPermission('sys:menu:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="dataListLoading" :data="dataList" row-key="id" border style="width: 100%;"> <el-table v-loading="dataListLoading" :data="dataList" row-key="id" border style="width: 100%;">

View File

@ -4,12 +4,15 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-11-25 09:51:46 * @Date: 2022-11-25 09:51:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2023-01-03 11:19:31 * @LastEditTime: 2023-01-13 09:02:03
--> -->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__params"> <div class="mod-sys__params">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
{{ $t('params.paramCode') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.paramCode" :placeholder="$t('params.paramCode')" clearable></el-input> <el-input v-model="dataForm.paramCode" :placeholder="$t('params.paramCode')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -4,12 +4,15 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-11-25 09:51:46 * @Date: 2022-11-25 09:51:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2023-01-03 11:24:35 * @LastEditTime: 2023-01-13 09:08:04
--> -->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__role"> <div class="mod-sys__role">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
{{ $t('role.name') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.name" :placeholder="$t('role.name')" clearable></el-input> <el-input v-model="dataForm.name" :placeholder="$t('role.name')" clearable></el-input>
</el-form-item> </el-form-item>

View File

@ -4,18 +4,27 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-11-25 09:51:46 * @Date: 2022-11-25 09:51:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2023-01-03 11:22:15 * @LastEditTime: 2023-01-13 09:06:52
--> -->
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item>
{{ $t('user.username') }}
</el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="dataForm.username" :placeholder="$t('user.username')" clearable></el-input> <el-input v-model="dataForm.username" :placeholder="$t('user.username')" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item>
{{ $t('user.gender') }}
</el-form-item>
<el-form-item> <el-form-item>
<ren-select v-model="dataForm.gender" dict-type="gender" :placeholder="$t('user.gender')"></ren-select> <ren-select v-model="dataForm.gender" dict-type="gender" :placeholder="$t('user.gender')"></ren-select>
</el-form-item> </el-form-item>
<el-form-item>
{{ $t('dept.title') }}
</el-form-item>
<el-form-item> <el-form-item>
<ren-dept-tree v-model="dataForm.deptId" :placeholder="$t('dept.title')" :query="true"></ren-dept-tree> <ren-dept-tree v-model="dataForm.deptId" :placeholder="$t('dept.title')" :query="true"></ren-dept-tree>
</el-form-item> </el-form-item>