forked from mt-fe-group/mt-yd-ui
Merge pull request 'lb' (#8) from lb into develop
Reviewed-on: mt-fe-group/mt-yd-ui#8
This commit is contained in:
commit
68c271618a
@ -113,6 +113,7 @@
|
||||
import CKEditor from 'ckeditor4-vue'
|
||||
import AttrForm from '../AttrForm'
|
||||
import { pick } from 'lodash/object'
|
||||
import { pick as __pick } from '@/utils/filters'
|
||||
import i18n from '@/i18n'
|
||||
// 标题 for i18n
|
||||
const title = {
|
||||
@ -147,13 +148,6 @@ export default {
|
||||
components: { AttrForm },
|
||||
props: {
|
||||
configs: {
|
||||
/**
|
||||
* TODO: 定义及使用方式,应改用README.md文件记录
|
||||
* type: 'dialog' | 'drawer' | 'page'
|
||||
* fields: Array<string|object>
|
||||
* - fields.object: { name, type: 'number'|'textarea'|'select'|'date'|.., required: boolean, validator: boolean(是否需要验证), [options]: any[], api: string(自动获取数据的接口,一般为getcode接口)}
|
||||
* operations: Array[object], 操作名和对应的接口地址,还有permission(如,sys:dict:update)
|
||||
*/
|
||||
type: Object,
|
||||
default: () => ({}) // 此处省去类型检查,使用者自行注意就好
|
||||
}
|
||||
@ -280,7 +274,8 @@ export default {
|
||||
const requiredRule = {
|
||||
required: true,
|
||||
message: i18n.t('validate.required'),
|
||||
trigger: 'change'
|
||||
// trigger: 'change'
|
||||
trigger: 'blur'
|
||||
}
|
||||
/** 检查是否已经存在该字段的规则 */
|
||||
const exists = this.dataFormRules[item.name] || null
|
||||
@ -351,6 +346,11 @@ export default {
|
||||
},
|
||||
|
||||
getPlaceholder(n, c) {
|
||||
if (this.isDetail) {
|
||||
/** 如果是详情,就不展示 提示文本 */
|
||||
return ''
|
||||
}
|
||||
|
||||
const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]
|
||||
if (opt) {
|
||||
// if opt is valid
|
||||
@ -399,9 +399,10 @@ export default {
|
||||
}).then(({ data: res }) => {
|
||||
if (res && res.code === 0) {
|
||||
const dataFormKeys = Object.keys(this.dataForm)
|
||||
console.log('keys ===> ', dataFormKeys)
|
||||
// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
|
||||
this.dataForm = pick(res.data, dataFormKeys)
|
||||
|
||||
this.dataForm = __pick(res.data, dataFormKeys)
|
||||
console.log('pick(res.data, dataFormKeys) ===> ', __pick(res.data, dataFormKeys))
|
||||
// LABEL: FILE_RELATED
|
||||
/** 对文件下载进行分流 */
|
||||
this.fileList = {}
|
||||
@ -533,7 +534,7 @@ export default {
|
||||
}
|
||||
break
|
||||
case 'cancel':
|
||||
this.visible = false
|
||||
this.handleClose()
|
||||
// add more..
|
||||
}
|
||||
},
|
||||
|
@ -35,6 +35,7 @@ t.routes['报表设计'] = 'Report Design'
|
||||
t.routes['报表预览'] = 'Report Preview'
|
||||
t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data'
|
||||
t.routes['当前检测数据'] = 'Current Inspection Data'
|
||||
t.routes['检测统计数据'] = 'Statistics Data'
|
||||
t.routes['质量检查信息记录'] = 'Quality Inspection Records'
|
||||
t.routes['用户管理'] = 'User Management'
|
||||
t.routes['部门管理'] = 'Department Management'
|
||||
@ -232,7 +233,7 @@ t.inspect.typetotal = 'Total Inspection Types'
|
||||
t.inspect.typename = 'Inspection Type'
|
||||
t.inspect.typecode = 'Inspection Code'
|
||||
t.inspect.ioTotal = 'Data of input/output and total inspections'
|
||||
t.inspect.plTotal = 'Inspection types per line'
|
||||
t.inspect.plTotal = 'Inspection contents in each line'
|
||||
t.inspect.inTotal = 'Up Sum'
|
||||
t.inspect.outTotal = 'Down Sum'
|
||||
t.inspect.checkTotal = 'Total Inspections'
|
||||
|
@ -36,6 +36,7 @@ t.routes['报表设计'] = '报表设计'
|
||||
t.routes['报表预览'] = '报表预览'
|
||||
t.routes['质量检测基础数据'] = '质量检测基础数据'
|
||||
t.routes['当前检测数据'] = '当前检测数据'
|
||||
t.routes['检测统计数据'] = '检测统计数据'
|
||||
t.routes['质量检查信息记录'] = '质量检查信息记录'
|
||||
t.routes['用户管理'] = '用户管理'
|
||||
t.routes['部门管理'] = '部门管理'
|
||||
@ -234,7 +235,7 @@ t.inspect.typetotal = '检测类型总数'
|
||||
t.inspect.typename = '检测类型名称'
|
||||
t.inspect.typecode = '检测类型编码'
|
||||
t.inspect.ioTotal = '上下片及检测总数统计'
|
||||
t.inspect.plTotal = '各产线检测类型统计'
|
||||
t.inspect.plTotal = '各产线检测内容统计'
|
||||
t.inspect.inTotal = '上片总数'
|
||||
t.inspect.outTotal = '下片总数'
|
||||
t.inspect.checkTotal = '检测总数'
|
||||
|
@ -10,3 +10,15 @@ export const dictFilter = dictTypeId => {
|
||||
export const timeFilter = (val) => {
|
||||
return moment(val).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
|
||||
export const pick = (obj, paths) => {
|
||||
let result = {}
|
||||
paths.forEach(key => {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
result[key] = obj[key];
|
||||
} else {
|
||||
result[key] = null
|
||||
}
|
||||
})
|
||||
return result
|
||||
}
|
@ -1,36 +1,20 @@
|
||||
<template>
|
||||
<nav
|
||||
class="aui-navbar"
|
||||
:class="`aui-navbar--${$store.state.navbarLayoutType}`"
|
||||
>
|
||||
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
|
||||
<div class="aui-navbar__header">
|
||||
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
|
||||
<a class="aui-navbar__brand-lg" href="javascript:;">{{
|
||||
$t('brand.lg')
|
||||
}}</a>
|
||||
<a class="aui-navbar__brand-mini" href="javascript:;">{{
|
||||
$t('brand.mini')
|
||||
}}</a>
|
||||
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a>
|
||||
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="aui-navbar__body">
|
||||
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
|
||||
<el-menu-item
|
||||
index="1"
|
||||
@click="$store.state.sidebarFold = !$store.state.sidebarFold"
|
||||
>
|
||||
<svg
|
||||
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
|
||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true">
|
||||
<use xlink:href="#icon-outdent"></use>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" @click="refresh()">
|
||||
<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>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
@ -47,11 +31,7 @@
|
||||
</a>
|
||||
</el-menu-item> -->
|
||||
<el-menu-item index="3">
|
||||
<el-dropdown
|
||||
placement="bottom"
|
||||
:show-timeout="0"
|
||||
@command="handleCommand"
|
||||
>
|
||||
<el-dropdown placement="bottom" :show-timeout="0" @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||
<use xlink:href="#icon-earth"></use>
|
||||
@ -59,12 +39,8 @@
|
||||
<!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<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() === 'zh-CN'" command="toCN">中文</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="getLang() === 'en'" command="toEN">En</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu-item>
|
||||
@ -81,22 +57,15 @@
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="updatePasswordHandle()">{{
|
||||
$t('updatePassword.title')
|
||||
}}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logoutHandle()">{{
|
||||
$t('logout')
|
||||
}}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
<!-- 弹窗, 修改密码 -->
|
||||
<update-password
|
||||
v-if="updatePasswordVisible"
|
||||
ref="updatePassword"
|
||||
></update-password>
|
||||
<update-password v-if="updatePasswordVisible" ref="updatePassword"></update-password>
|
||||
</nav>
|
||||
</template>
|
||||
<script>
|
||||
@ -128,11 +97,11 @@ export default {
|
||||
this.$root.$i18n.locale = 'zh-CN'
|
||||
window.navigator.language = 'zh-cn'
|
||||
break
|
||||
case 'toEN':
|
||||
console.log('root', this.$root.$i18n.locale)
|
||||
this.$root.$i18n.locale = 'en'
|
||||
location.reload()
|
||||
window.navigator.language = 'en-US'
|
||||
case 'toEN':
|
||||
console.log('root', this.$root.$i18n.locale)
|
||||
this.$root.$i18n.locale = 'en'
|
||||
location.reload()
|
||||
window.navigator.language = 'en-US'
|
||||
break
|
||||
}
|
||||
},
|
||||
@ -156,15 +125,11 @@ export default {
|
||||
},
|
||||
// 退出
|
||||
logoutHandle() {
|
||||
this.$confirm(
|
||||
this.$t('prompt.info', { handle: this.$t('logout') }),
|
||||
this.$t('prompt.title'),
|
||||
{
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.$http
|
||||
.post(this.$http.adornUrl('/logout'))
|
||||
|
@ -58,6 +58,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init () {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -56,6 +56,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init () {
|
||||
this.visible = true
|
||||
this.getDataList()
|
||||
|
@ -97,6 +97,12 @@ export default {
|
||||
Log
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 暂停
|
||||
pauseHandle (id) {
|
||||
if (!id && this.dataListSelections.length <= 0) {
|
||||
|
@ -30,7 +30,14 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @select-change="handleDialogSelectChange" />
|
||||
<add-or-update
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
:configs="addOrUpdateConfigs"
|
||||
@refreshDataList="getDataList"
|
||||
@select-change="handleDialogSelectChange"
|
||||
@destory-dialog="handleDestroyDialog"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -85,7 +92,7 @@ const addOrUpdateConfigs = {
|
||||
infoUrl: '/monitoring/equipment',
|
||||
fields: [
|
||||
{ name: 'name', label: i18n.t('eq.name'), required: true },
|
||||
{ name: 'code', label: i18n.t('eq.code'), api: '/monitoring/equipment/getCode' },
|
||||
{ name: 'code', label: i18n.t('eq.code'), required: true, api: '/monitoring/equipment/getCode' },
|
||||
{ name: 'enName', label: i18n.t('enname') },
|
||||
{ name: 'abbr', label: i18n.t('abbr') },
|
||||
{
|
||||
@ -113,7 +120,8 @@ const addOrUpdateConfigs = {
|
||||
{
|
||||
name: 'sort',
|
||||
label: i18n.t('ws.sort'),
|
||||
rules: [{ type: 'number', message: i18n.t('hints.number'), transform: val => Number(val) }]
|
||||
type: 'number',
|
||||
rules: [{ type: 'number', message: i18n.t('hints.number'), trigger: 'blur', transform: val => Number(val) }]
|
||||
},
|
||||
{
|
||||
name: 'groupId',
|
||||
@ -297,6 +305,12 @@ export default {
|
||||
this.getTypeList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// 获取产线列表,用于刷新工段列表
|
||||
getPlList() {
|
||||
this.$http({
|
||||
|
@ -77,6 +77,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -29,7 +29,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -128,6 +128,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 设备
|
||||
getEqList() {
|
||||
this.$http({
|
||||
|
@ -80,6 +80,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -10,7 +10,15 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -22,7 +30,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -52,7 +60,7 @@ const tableConfigs = [
|
||||
const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/equipmentGroup',
|
||||
fields: [{ name: 'name', label: i18n.t('eq.groupname') }, { name: 'code', label: i18n.t('eq.groupcode') }, 'remark'],
|
||||
fields: [{ name: 'name', required: true, label: i18n.t('eq.groupname') }, { name: 'code', required: true, label: i18n.t('eq.groupcode') }, 'remark'],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false },
|
||||
@ -86,6 +94,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.addOrUpdateVisible = false
|
||||
|
@ -44,7 +44,7 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -125,6 +125,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取字典数据
|
||||
getDictData() {
|
||||
this.initDictList(Object.entries(dictEntries).map(([_, item]) => item.value))
|
||||
|
@ -40,6 +40,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -22,7 +22,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -106,6 +106,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
//handleOperations
|
||||
handleOperations({ type, data: id }) {
|
||||
switch (type) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -141,6 +141,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 设备列表
|
||||
getEqList() {
|
||||
this.$http({
|
||||
|
@ -79,6 +79,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -85,6 +85,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -81,6 +81,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -10,7 +10,15 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -22,7 +30,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -52,8 +60,8 @@ const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/equipmentType',
|
||||
fields: [
|
||||
{ name: 'name', label: i18n.t('eq.type') },
|
||||
{ name: 'code', label: i18n.t('eq.typecode'), api: '/monitoring/equipmentType/getCode' },
|
||||
{ name: 'name', required: true, label: i18n.t('eq.type') },
|
||||
{ name: 'code', required: true, label: i18n.t('eq.typecode'), api: '/monitoring/equipmentType/getCode' },
|
||||
{ name: 'parentId', label: i18n.t('eq.parent'), type: 'cascader', props: { label: 'name', value: 'id', checkStrictly: true, emitPath: false }, options: [] },
|
||||
'remark'
|
||||
],
|
||||
@ -106,6 +114,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// 获取设备类型树形数据
|
||||
getTreeEquipmentType() {
|
||||
this.$http({
|
||||
|
@ -81,6 +81,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -79,6 +79,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -10,7 +10,15 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -22,7 +30,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -53,9 +61,10 @@ const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/factory',
|
||||
fields: [
|
||||
'name',
|
||||
{ name: 'name', required: true },
|
||||
{
|
||||
name: 'code',
|
||||
required: true,
|
||||
api: '/monitoring/factory/getCode'
|
||||
},
|
||||
{
|
||||
@ -99,6 +108,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.addOrUpdateVisible = false
|
||||
|
@ -12,7 +12,15 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@ -25,7 +33,7 @@
|
||||
></el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
||||
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" />
|
||||
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -61,11 +69,13 @@ const addOrUpdateConfigs = {
|
||||
fields: [
|
||||
// 'name',
|
||||
{
|
||||
name: 'name'
|
||||
name: 'name',
|
||||
required: true
|
||||
// label: i18n.t('pl.name')
|
||||
},
|
||||
{
|
||||
name: 'code',
|
||||
required: true,
|
||||
// label: i18n.t('pl.code'),
|
||||
api: '/monitoring/product/getCode'
|
||||
},
|
||||
@ -171,7 +181,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
//
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.showbasedialog = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
addOrEdit(id) {
|
||||
this.showbasedialog = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -22,7 +22,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" :configs="addOrUpdateConfigs" ref="addOrUpdate" @refreshDataList="getDataList" @destroy-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" :configs="addOrUpdateConfigs" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -111,6 +111,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// 获取产品列表
|
||||
getProductList() {
|
||||
this.$http({
|
||||
|
@ -10,7 +10,15 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -22,7 +30,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -55,8 +63,8 @@ const addOrUpdateConfigs = {
|
||||
infoUrl: '/monitoring/productionLine',
|
||||
fields: [
|
||||
// 'name',
|
||||
{ name: 'name', label: i18n.t('pl.name') },
|
||||
{ name: 'code', label: i18n.t('pl.code'), api: '/monitoring/productionLine/getCode' },
|
||||
{ name: 'name', label: i18n.t('pl.name'), required: true },
|
||||
{ name: 'code', label: i18n.t('pl.code'), required: true, api: '/monitoring/productionLine/getCode' },
|
||||
{
|
||||
name: 'factoryId',
|
||||
required: true,
|
||||
@ -111,6 +119,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// 获取工厂列表
|
||||
getFactoryList() {
|
||||
this.$http.get(this.$http.adornUrl('/monitoring/factory/list')).then(({ data: res }) => {
|
||||
|
@ -72,6 +72,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -78,7 +78,7 @@ const tableConfigStatic = [
|
||||
]
|
||||
const tableConfigDynamic = [
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ name: i18n.t('inspect.type'), prop: 'inspectionContent' },
|
||||
{ name: i18n.t('inspect.det'), prop: 'inspectionContent' },
|
||||
/** dynamic */
|
||||
{ name: i18n.t('inspect.typetotal'), prop: '' },
|
||||
{ name: i18n.t('inspect.rate'), prop: '' }
|
||||
@ -105,17 +105,31 @@ const FakeChart = {
|
||||
calcMaxHeight,
|
||||
chart: null,
|
||||
defaultOpts: {
|
||||
grid: {
|
||||
left: '5%',
|
||||
right: '12%',
|
||||
top: '20%',
|
||||
bottom: '10%'
|
||||
},
|
||||
title: {
|
||||
text: i18n.t('inspect.typeCount')
|
||||
},
|
||||
tooltip: {},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
type: 'scroll',
|
||||
top: 10,
|
||||
right: 20,
|
||||
data: [
|
||||
/** dynamic */
|
||||
]
|
||||
right: 0,
|
||||
width: '12%',
|
||||
/** 修复文本太长时显示问题 */
|
||||
formatter: function(name) {
|
||||
return echarts.format.truncateText(name, 120, '14px Microsoft Yahei', '...')
|
||||
},
|
||||
tooltip: {
|
||||
show: true
|
||||
},
|
||||
/** end */
|
||||
data: []
|
||||
},
|
||||
xAxis: {
|
||||
data: [
|
||||
@ -221,11 +235,25 @@ export default {
|
||||
]
|
||||
},
|
||||
echartCategories: null,
|
||||
echartCheckTypes: []
|
||||
echartCheckTypes: [],
|
||||
interval: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getDataList()
|
||||
|
||||
this.interval = setInterval(() => {
|
||||
this.$message.info(i18n.t('refresh'))
|
||||
this.dataListStatic.splice(0)
|
||||
this.dataListDynamic.splice(0)
|
||||
this.getDataList()
|
||||
}, 1000 * 5 * 60)
|
||||
},
|
||||
deactivated() {
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval)
|
||||
this.interval = null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleOperations() {},
|
||||
@ -251,12 +279,12 @@ export default {
|
||||
|
||||
/** [1] 获取上下片数据 */
|
||||
this.fetchList('sx', startTime, endTime).then(({ data: res }) => {
|
||||
console.log('sx: ', res)
|
||||
// console.log('sx: ', res)
|
||||
this.dataListStatic = res.data || []
|
||||
})
|
||||
/** [2] 获取产线检测类型 */
|
||||
this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
|
||||
console.log('pl: ', res)
|
||||
// console.log('pl: ', res)
|
||||
/** TODO: 解析 nameData */
|
||||
this.parseTableProps(res.data.nameData)
|
||||
|
||||
@ -282,7 +310,7 @@ export default {
|
||||
|
||||
this.tableConfigDynamic = [
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ name: i18n.t('inspect.type'), prop: 'inspectionContent' },
|
||||
{ name: i18n.t('inspect.det'), prop: 'inspectionContent' },
|
||||
...subProps,
|
||||
{ name: i18n.t('inspect.typetotal'), prop: 'sumInput' },
|
||||
{ name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
|
||||
|
@ -22,7 +22,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -53,9 +53,9 @@ const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/qualityInspectionDet',
|
||||
fields: [
|
||||
{ name: 'typeId', label: i18n.t('inspect.type'), type: 'select', options: [] },
|
||||
{ name: 'content', label: i18n.t('inspect.det') },
|
||||
{ name: 'code', label: i18n.t('inspect.detcode'), api: '/monitoring/qualityInspectionDet/getCode' },
|
||||
{ name: 'typeId', label: i18n.t('inspect.type'), required: true, type: 'select', options: [] },
|
||||
{ name: 'content', label: i18n.t('inspect.det'), required: true },
|
||||
{ name: 'code', label: i18n.t('inspect.code'), api: '/monitoring/qualityInspectionDet/getCode' },
|
||||
'remark'
|
||||
],
|
||||
operations: [
|
||||
@ -92,6 +92,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取产检测类型列表
|
||||
getInspectionTypeList() {
|
||||
this.$http({
|
||||
|
@ -1,16 +1,29 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
|
||||
<!-- <el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@ -29,7 +42,7 @@
|
||||
ref="addOrUpdate"
|
||||
:configs="addOrUpdateConfigs"
|
||||
@refreshDataList="getDataList"
|
||||
@destory-dialog="addOrUpdateVisible = false"
|
||||
@destory-dialog="handleDestroyDialog"
|
||||
@select-change="handleSelectChange"
|
||||
/>
|
||||
</div>
|
||||
@ -71,9 +84,9 @@ const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/qualityInspectionRecord',
|
||||
fields: [
|
||||
{ name: 'checkTime', label: i18n.t('inspect.time'), type: 'date', props: { style: 'width: 100%', type: 'datetime' }, placeholder: i18n.t('hints.checktime') },
|
||||
{ name: 'productionId', label: i18n.t('pl.title'), type: 'select', options: [] },
|
||||
{ name: 'sectionId', label: i18n.t('ws.title'), type: 'select', options: [] },
|
||||
{ name: 'checkTime', required: true, label: i18n.t('inspect.time'), type: 'date', props: { style: 'width: 100%', type: 'datetime' }, placeholder: i18n.t('hints.checktime') },
|
||||
{ name: 'productionId', required: true, label: i18n.t('pl.title'), type: 'select', options: [] },
|
||||
{ name: 'sectionId', required: true, label: i18n.t('ws.title'), type: 'select', options: [] },
|
||||
{
|
||||
name: 'source',
|
||||
label: i18n.t('source'),
|
||||
@ -83,7 +96,7 @@ const addOrUpdateConfigs = {
|
||||
{ value: 2, label: i18n.t('auto') }
|
||||
]
|
||||
},
|
||||
{ name: 'inspectionDetId', label: i18n.t('inspect.det'), type: 'select', options: [] },
|
||||
{ name: 'inspectionDetId', required: true, label: i18n.t('inspect.det'), type: 'select', options: [] },
|
||||
{ name: 'checkPerson', label: i18n.t('inspect.people') },
|
||||
{ name: 'explainText', label: i18n.t('desc') },
|
||||
'remark'
|
||||
@ -102,8 +115,10 @@ export default {
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
key: '',
|
||||
lineId: ''
|
||||
},
|
||||
plList: [],
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
@ -124,6 +139,12 @@ export default {
|
||||
this.getProductLines()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// handle
|
||||
async handleSelectChange({ name, id }) {
|
||||
if (name === 'productionId') {
|
||||
@ -152,18 +173,14 @@ export default {
|
||||
// 获取产线
|
||||
getProductLines() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/productionLine/page'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
// page: this.pageIndex,
|
||||
// limit: this.pageSize,
|
||||
// key: this.dataForm.key
|
||||
})
|
||||
url: this.$http.adornUrl('/monitoring/productionLine/list'),
|
||||
method: 'get'
|
||||
}).then(({ data: res }) => {
|
||||
const plOpt = this.addOrUpdateConfigs.fields.find(item => item.name === 'productionId')
|
||||
if (plOpt) {
|
||||
plOpt.options = res.data.list.map(item => ({ value: item.id, label: item.name })) || []
|
||||
plOpt.options = res.data.map(item => ({ value: item.id, label: item.name })) || []
|
||||
}
|
||||
this.plList = res.data.map(item => ({ value: item.id, label: item.name })) || []
|
||||
})
|
||||
},
|
||||
// 获取工段
|
||||
@ -197,14 +214,22 @@ export default {
|
||||
getDataList() {
|
||||
this.addOrUpdateVisible = false
|
||||
this.dataListLoading = true
|
||||
|
||||
const queryParams = {
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize
|
||||
}
|
||||
|
||||
if (this.dataForm.key) {
|
||||
queryParams['key'] = this.dataForm.key
|
||||
}
|
||||
if (this.dataForm.lineId) {
|
||||
queryParams['lineId'] = this.dataForm.lineId
|
||||
}
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/qualityInspectionRecord/page'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
key: this.dataForm.key
|
||||
})
|
||||
params: this.$http.adornParams(queryParams)
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataList = data.data.list
|
||||
|
@ -10,7 +10,15 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -22,7 +30,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -42,7 +50,7 @@ const tableConfigs = [
|
||||
},
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: i18n.t('inspect.typename') },
|
||||
{ prop: 'code', name: i18n.t('inspect.typename') },
|
||||
{ prop: 'code', name: i18n.t('inspect.typecode') },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
@ -50,7 +58,11 @@ const tableConfigs = [
|
||||
const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/qualityInspectionType',
|
||||
fields: [{ name: 'name', label: i18n.t('inspect.type') }, { name: 'code', label: i18n.t('inspect.typename'), api: '/monitoring/qualityInspectionType/getCode' }, 'remark'],
|
||||
fields: [
|
||||
{ name: 'name', label: i18n.t('inspect.type'), required: true },
|
||||
{ name: 'code', label: i18n.t('inspect.typecode'), api: '/monitoring/qualityInspectionType/getCode' },
|
||||
'remark'
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/qualityInspectionType', permission: 'monitoring:qualityinspectiontype:save', showOnEdit: false },
|
||||
@ -84,6 +96,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.addOrUpdateVisible = false
|
||||
|
@ -23,7 +23,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -83,6 +83,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
handleOperations({ type, data: id }) {
|
||||
switch (type) {
|
||||
case 'edit':
|
||||
|
@ -24,7 +24,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -55,6 +55,12 @@ const CategoryList = {
|
||||
this.pickedId = this.injectData[this.injectData.head.prop]
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
handleChange(id) {
|
||||
this.pickedId = id
|
||||
this.$emit('emit-data', {
|
||||
@ -112,6 +118,12 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
getAllCategories() {
|
||||
axios.get(axios.adornUrl('/monitoring/reportSheetCategory/page')).then(({ data: res }) => {
|
||||
if (res.data && res.data.list) {
|
||||
|
@ -73,6 +73,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -67,6 +67,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -78,6 +78,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -75,6 +75,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -10,7 +10,15 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="pageIndex"
|
||||
:size="pageSize"
|
||||
:data="dataList"
|
||||
:table-head-configs="tableConfigs"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -22,7 +30,7 @@
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -54,8 +62,8 @@ const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/workshopSection',
|
||||
fields: [
|
||||
{ name: 'name', label: i18n.t('ws.name') },
|
||||
{ name: 'code', label: i18n.t('ws.code'), api: '/monitoring/workshopSection/getCode' },
|
||||
{ name: 'name', required: true, label: i18n.t('ws.name') },
|
||||
{ name: 'code', required: true, label: i18n.t('ws.code'), api: '/monitoring/workshopSection/getCode' },
|
||||
{ name: 'productionLineId', label: i18n.t('ws.belong'), type: 'select', options: [] },
|
||||
'description',
|
||||
'remark'
|
||||
@ -96,6 +104,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible = false
|
||||
}, /** after dialog animated */ 200)
|
||||
},
|
||||
// 获取产线列表
|
||||
getProductLine() {
|
||||
this.$http.get(this.$http.adornUrl('/monitoring/productionLine/list')).then(({ data: res }) => {
|
||||
|
@ -68,6 +68,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
|
@ -42,7 +42,15 @@
|
||||
<!-- <el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button> -->
|
||||
</h3>
|
||||
<div class="table" v-if="!showAttrForm">
|
||||
<base-table :page="page" :size="limit" :data="eqList" :table-head-configs="tableProps" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table
|
||||
:page="page"
|
||||
:size="limit"
|
||||
:data="eqList"
|
||||
:table-head-configs="tableProps"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -78,7 +86,7 @@ const tableProps = [
|
||||
name: i18n.t('index')
|
||||
},
|
||||
{ name: i18n.t('eq.name'), prop: 'equipmentName' },
|
||||
{ name: i18n.t('dept.sort'), prop: 'sort' },
|
||||
{ name: i18n.t('dept.sort'), prop: 'sort' }
|
||||
// {
|
||||
// name: i18n.t('handle'),
|
||||
// prop: 'operations',
|
||||
@ -114,9 +122,12 @@ export default {
|
||||
// 备注
|
||||
remark: ''
|
||||
},
|
||||
dataFormRules: {
|
||||
name: [{ required: true, message: i18n.t('validate.required'), trigger: 'blur' }],
|
||||
code: [{ required: true, message: i18n.t('validate.required'), trigger: 'blur' }]
|
||||
},
|
||||
limit: 5,
|
||||
page: 1,
|
||||
dataFormRules: {},
|
||||
showAttrForm: false
|
||||
}
|
||||
},
|
||||
@ -279,20 +290,24 @@ export default {
|
||||
}
|
||||
},
|
||||
handleCreateOrUpdate() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/workshopSection'),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: {
|
||||
...this.dataForm
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/workshopSection'),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: {
|
||||
...this.dataForm
|
||||
}
|
||||
}).then(({ data: res }) => {
|
||||
this.$message.success({
|
||||
message: i18n.t('prompt.success'),
|
||||
onClose: () => {
|
||||
this.$emit('refreshDataList')
|
||||
this.visible = false
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}).then(({ data: res }) => {
|
||||
this.$message.success({
|
||||
message: i18n.t('prompt.success'),
|
||||
onClose: () => {
|
||||
this.$emit('refreshDataList')
|
||||
this.visible = false
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -152,6 +152,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -20,6 +20,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
// this.url = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}`
|
||||
|
@ -64,6 +64,12 @@ export default {
|
||||
Upload
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 云存储配置
|
||||
configHandle() {
|
||||
this.configVisible = true
|
||||
|
@ -65,6 +65,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -47,6 +47,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -77,6 +77,12 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle(id) {
|
||||
this.addOrUpdateVisible = true
|
||||
|
@ -46,6 +46,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -24,7 +24,7 @@
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="dictName" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="dictType" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center"></el-table-column>
|
||||
<!-- <el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="childHandle(scope.row)">{{ scope.row.dictType }}</el-button>
|
||||
@ -87,6 +87,12 @@ export default {
|
||||
IconsDialog
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
//
|
||||
showIcons() {
|
||||
this.displayIcon = true
|
||||
|
@ -54,6 +54,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
// 异常信息
|
||||
infoHandle(info) {
|
||||
this.$alert(info, this.$t('logError.errorInfo'), {
|
||||
|
@ -95,6 +95,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -41,6 +41,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -52,6 +52,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
|
@ -111,6 +111,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// destroy dialog
|
||||
handleDestroyDialog() {
|
||||
setTimeout(() => {
|
||||
this.addOrUpdateVisible= false
|
||||
}, /** after dialog animated */ 200);
|
||||
},
|
||||
init() {
|
||||
this.visible = true
|
||||
this.dataForm.deptId = ''
|
||||
|
@ -93,9 +93,9 @@ export default {
|
||||
this.$root.$i18n.locale = 'zh-CN'
|
||||
// location.reload()
|
||||
break
|
||||
case 'en':
|
||||
this.$root.$i18n.locale = 'en'
|
||||
location.reload()
|
||||
case 'en':
|
||||
this.$root.$i18n.locale = 'en'
|
||||
location.reload()
|
||||
break
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user