Compare commits

..

No commits in common. "68c271618ab3b7513cd5acb4441a3b436afaaa1e" and "ff11e1d3fb71a9893be0ba53efa47dab2a7649a9" have entirely different histories.

55 changed files with 162 additions and 562 deletions

View File

@ -113,7 +113,6 @@
import CKEditor from 'ckeditor4-vue' import CKEditor from 'ckeditor4-vue'
import AttrForm from '../AttrForm' import AttrForm from '../AttrForm'
import { pick } from 'lodash/object' import { pick } from 'lodash/object'
import { pick as __pick } from '@/utils/filters'
import i18n from '@/i18n' import i18n from '@/i18n'
// for i18n // for i18n
const title = { const title = {
@ -148,6 +147,13 @@ export default {
components: { AttrForm }, components: { AttrForm },
props: { props: {
configs: { 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, type: Object,
default: () => ({}) // 使 default: () => ({}) // 使
} }
@ -274,8 +280,7 @@ export default {
const requiredRule = { const requiredRule = {
required: true, required: true,
message: i18n.t('validate.required'), message: i18n.t('validate.required'),
// trigger: 'change' trigger: 'change'
trigger: 'blur'
} }
/** 检查是否已经存在该字段的规则 */ /** 检查是否已经存在该字段的规则 */
const exists = this.dataFormRules[item.name] || null const exists = this.dataFormRules[item.name] || null
@ -346,11 +351,6 @@ export default {
}, },
getPlaceholder(n, c) { getPlaceholder(n, c) {
if (this.isDetail) {
/** 如果是详情,就不展示 提示文本 */
return ''
}
const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)] const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]
if (opt) { if (opt) {
// if opt is valid // if opt is valid
@ -399,10 +399,9 @@ export default {
}).then(({ data: res }) => { }).then(({ data: res }) => {
if (res && res.code === 0) { if (res && res.code === 0) {
const dataFormKeys = Object.keys(this.dataForm) const dataFormKeys = Object.keys(this.dataForm)
console.log('keys ===> ', dataFormKeys)
// console.log('data form keys: ', dataFormKeys, pick(res.data, 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 // LABEL: FILE_RELATED
/** 对文件下载进行分流 */ /** 对文件下载进行分流 */
this.fileList = {} this.fileList = {}
@ -534,7 +533,7 @@ export default {
} }
break break
case 'cancel': case 'cancel':
this.handleClose() this.visible = false
// add more.. // add more..
} }
}, },

View File

@ -35,7 +35,6 @@ t.routes['报表设计'] = 'Report Design'
t.routes['报表预览'] = 'Report Preview' t.routes['报表预览'] = 'Report Preview'
t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data' t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data'
t.routes['当前检测数据'] = 'Current Inspection Data' t.routes['当前检测数据'] = 'Current Inspection Data'
t.routes['检测统计数据'] = 'Statistics Data'
t.routes['质量检查信息记录'] = 'Quality Inspection Records' t.routes['质量检查信息记录'] = 'Quality Inspection Records'
t.routes['用户管理'] = 'User Management' t.routes['用户管理'] = 'User Management'
t.routes['部门管理'] = 'Department Management' t.routes['部门管理'] = 'Department Management'
@ -233,7 +232,7 @@ t.inspect.typetotal = 'Total Inspection Types'
t.inspect.typename = 'Inspection Type' t.inspect.typename = 'Inspection Type'
t.inspect.typecode = 'Inspection Code' t.inspect.typecode = 'Inspection Code'
t.inspect.ioTotal = 'Data of input/output and total inspections' t.inspect.ioTotal = 'Data of input/output and total inspections'
t.inspect.plTotal = 'Inspection contents in each line' t.inspect.plTotal = 'Inspection types per line'
t.inspect.inTotal = 'Up Sum' t.inspect.inTotal = 'Up Sum'
t.inspect.outTotal = 'Down Sum' t.inspect.outTotal = 'Down Sum'
t.inspect.checkTotal = 'Total Inspections' t.inspect.checkTotal = 'Total Inspections'

View File

@ -36,7 +36,6 @@ t.routes['报表设计'] = '报表设计'
t.routes['报表预览'] = '报表预览' t.routes['报表预览'] = '报表预览'
t.routes['质量检测基础数据'] = '质量检测基础数据' t.routes['质量检测基础数据'] = '质量检测基础数据'
t.routes['当前检测数据'] = '当前检测数据' t.routes['当前检测数据'] = '当前检测数据'
t.routes['检测统计数据'] = '检测统计数据'
t.routes['质量检查信息记录'] = '质量检查信息记录' t.routes['质量检查信息记录'] = '质量检查信息记录'
t.routes['用户管理'] = '用户管理' t.routes['用户管理'] = '用户管理'
t.routes['部门管理'] = '部门管理' t.routes['部门管理'] = '部门管理'
@ -235,7 +234,7 @@ t.inspect.typetotal = '检测类型总数'
t.inspect.typename = '检测类型名称' t.inspect.typename = '检测类型名称'
t.inspect.typecode = '检测类型编码' t.inspect.typecode = '检测类型编码'
t.inspect.ioTotal = '上下片及检测总数统计' t.inspect.ioTotal = '上下片及检测总数统计'
t.inspect.plTotal = '各产线检测内容统计' t.inspect.plTotal = '各产线检测类型统计'
t.inspect.inTotal = '上片总数' t.inspect.inTotal = '上片总数'
t.inspect.outTotal = '下片总数' t.inspect.outTotal = '下片总数'
t.inspect.checkTotal = '检测总数' t.inspect.checkTotal = '检测总数'

View File

@ -10,15 +10,3 @@ export const dictFilter = dictTypeId => {
export const timeFilter = (val) => { export const timeFilter = (val) => {
return moment(val).format('YYYY-MM-DD HH:mm:ss') 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
}

View File

@ -1,20 +1,36 @@
<template> <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"> <div class="aui-navbar__header">
<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:;">{{ $t('brand.lg') }}</a> <a class="aui-navbar__brand-lg" href="javascript:;">{{
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a> $t('brand.lg')
}}</a>
<a class="aui-navbar__brand-mini" href="javascript:;">{{
$t('brand.mini')
}}</a>
</h1> </h1>
</div> </div>
<div class="aui-navbar__body"> <div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal"> <el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold"> <el-menu-item
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true"> 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> <use xlink:href="#icon-outdent"></use>
</svg> </svg>
</el-menu-item> </el-menu-item>
<el-menu-item index="2" @click="refresh()"> <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> <use xlink:href="#icon-sync"></use>
</svg> </svg>
</el-menu-item> </el-menu-item>
@ -31,7 +47,11 @@
</a> </a>
</el-menu-item> --> </el-menu-item> -->
<el-menu-item index="3"> <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"> <span class="el-dropdown-link">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-earth"></use> <use xlink:href="#icon-earth"></use>
@ -39,8 +59,12 @@
<!-- <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 :disabled="getLang() === 'en'" command="toEN">En</el-dropdown-item> >中文</el-dropdown-item
>
<el-dropdown-item :disabled="getLang() === 'en'" command="toEN"
>En</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-menu-item> </el-menu-item>
@ -57,15 +81,22 @@
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item> <el-dropdown-item @click.native="updatePasswordHandle()">{{
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item> $t('updatePassword.title')
}}</el-dropdown-item>
<el-dropdown-item @click.native="logoutHandle()">{{
$t('logout')
}}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-menu-item> </el-menu-item>
</el-menu> </el-menu>
</div> </div>
<!-- 弹窗, 修改密码 --> <!-- 弹窗, 修改密码 -->
<update-password v-if="updatePasswordVisible" ref="updatePassword"></update-password> <update-password
v-if="updatePasswordVisible"
ref="updatePassword"
></update-password>
</nav> </nav>
</template> </template>
<script> <script>
@ -125,11 +156,15 @@ export default {
}, },
// 退 // 退
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'),
{
confirmButtonText: this.$t('confirm'), confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'), cancelButtonText: this.$t('cancel'),
type: 'warning' type: 'warning'
}) }
)
.then(() => { .then(() => {
this.$http this.$http
.post(this.$http.adornUrl('/logout')) .post(this.$http.adornUrl('/logout'))

View File

@ -58,12 +58,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init () { init () {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -56,12 +56,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init () { init () {
this.visible = true this.visible = true
this.getDataList() this.getDataList()

View File

@ -97,12 +97,6 @@ export default {
Log Log
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
pauseHandle (id) { pauseHandle (id) {
if (!id && this.dataListSelections.length <= 0) { if (!id && this.dataListSelections.length <= 0) {

View File

@ -30,14 +30,7 @@
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
></el-pagination> ></el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @select-change="handleDialogSelectChange" />
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:configs="addOrUpdateConfigs"
@refreshDataList="getDataList"
@select-change="handleDialogSelectChange"
@destory-dialog="handleDestroyDialog"
/>
</div> </div>
</template> </template>
@ -92,7 +85,7 @@ const addOrUpdateConfigs = {
infoUrl: '/monitoring/equipment', infoUrl: '/monitoring/equipment',
fields: [ fields: [
{ name: 'name', label: i18n.t('eq.name'), required: true }, { name: 'name', label: i18n.t('eq.name'), required: true },
{ name: 'code', label: i18n.t('eq.code'), required: true, api: '/monitoring/equipment/getCode' }, { name: 'code', label: i18n.t('eq.code'), api: '/monitoring/equipment/getCode' },
{ name: 'enName', label: i18n.t('enname') }, { name: 'enName', label: i18n.t('enname') },
{ name: 'abbr', label: i18n.t('abbr') }, { name: 'abbr', label: i18n.t('abbr') },
{ {
@ -120,8 +113,7 @@ const addOrUpdateConfigs = {
{ {
name: 'sort', name: 'sort',
label: i18n.t('ws.sort'), label: i18n.t('ws.sort'),
type: 'number', rules: [{ type: 'number', message: i18n.t('hints.number'), transform: val => Number(val) }]
rules: [{ type: 'number', message: i18n.t('hints.number'), trigger: 'blur', transform: val => Number(val) }]
}, },
{ {
name: 'groupId', name: 'groupId',
@ -305,12 +297,6 @@ export default {
this.getTypeList() this.getTypeList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// 线 // 线
getPlList() { getPlList() {
this.$http({ this.$http({

View File

@ -77,12 +77,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -29,7 +29,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -128,12 +128,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getEqList() { getEqList() {
this.$http({ this.$http({

View File

@ -80,12 +80,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -10,15 +10,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -30,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -60,7 +52,7 @@ const tableConfigs = [
const addOrUpdateConfigs = { const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/equipmentGroup', infoUrl: '/monitoring/equipmentGroup',
fields: [{ name: 'name', required: true, label: i18n.t('eq.groupname') }, { name: 'code', required: true, label: i18n.t('eq.groupcode') }, 'remark'], fields: [{ name: 'name', label: i18n.t('eq.groupname') }, { name: 'code', label: i18n.t('eq.groupcode') }, 'remark'],
operations: [ operations: [
{ name: 'cancel', showAlways: true }, { name: 'cancel', showAlways: true },
{ name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false }, { name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false },
@ -94,12 +86,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// //
getDataList() { getDataList() {
this.addOrUpdateVisible = false this.addOrUpdateVisible = false

View File

@ -44,7 +44,7 @@
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
></el-pagination> ></el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -125,12 +125,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDictData() { getDictData() {
this.initDictList(Object.entries(dictEntries).map(([_, item]) => item.value)) this.initDictList(Object.entries(dictEntries).map(([_, item]) => item.value))

View File

@ -40,12 +40,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -22,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -106,12 +106,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
//handleOperations //handleOperations
handleOperations({ type, data: id }) { handleOperations({ type, data: id }) {
switch (type) { switch (type) {

View File

@ -23,7 +23,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -141,12 +141,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getEqList() { getEqList() {
this.$http({ this.$http({

View File

@ -79,12 +79,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -85,12 +85,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -81,12 +81,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -10,15 +10,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -30,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -60,8 +52,8 @@ const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/equipmentType', infoUrl: '/monitoring/equipmentType',
fields: [ fields: [
{ name: 'name', required: true, label: i18n.t('eq.type') }, { name: 'name', label: i18n.t('eq.type') },
{ name: 'code', required: true, label: i18n.t('eq.typecode'), api: '/monitoring/equipmentType/getCode' }, { name: 'code', 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: [] }, { name: 'parentId', label: i18n.t('eq.parent'), type: 'cascader', props: { label: 'name', value: 'id', checkStrictly: true, emitPath: false }, options: [] },
'remark' 'remark'
], ],
@ -114,12 +106,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// //
getTreeEquipmentType() { getTreeEquipmentType() {
this.$http({ this.$http({

View File

@ -81,12 +81,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -79,12 +79,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -10,15 +10,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -30,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -61,10 +53,9 @@ const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/factory', infoUrl: '/monitoring/factory',
fields: [ fields: [
{ name: 'name', required: true }, 'name',
{ {
name: 'code', name: 'code',
required: true,
api: '/monitoring/factory/getCode' api: '/monitoring/factory/getCode'
}, },
{ {
@ -108,12 +99,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// //
getDataList() { getDataList() {
this.addOrUpdateVisible = false this.addOrUpdateVisible = false

View File

@ -12,15 +12,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@ -33,7 +25,7 @@
></el-pagination> ></el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> --> <!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" />
</div> </div>
</template> </template>
@ -69,13 +61,11 @@ const addOrUpdateConfigs = {
fields: [ fields: [
// 'name', // 'name',
{ {
name: 'name', name: 'name'
required: true
// label: i18n.t('pl.name') // label: i18n.t('pl.name')
}, },
{ {
name: 'code', name: 'code',
required: true,
// label: i18n.t('pl.code'), // label: i18n.t('pl.code'),
api: '/monitoring/product/getCode' api: '/monitoring/product/getCode'
}, },
@ -181,12 +171,7 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog //
handleDestroyDialog() {
setTimeout(() => {
this.showbasedialog = false
}, /** after dialog animated */ 200)
},
addOrEdit(id) { addOrEdit(id) {
this.showbasedialog = true this.showbasedialog = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -22,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" :configs="addOrUpdateConfigs" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" :configs="addOrUpdateConfigs" ref="addOrUpdate" @refreshDataList="getDataList" @destroy-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -111,12 +111,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// //
getProductList() { getProductList() {
this.$http({ this.$http({

View File

@ -10,15 +10,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -30,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -63,8 +55,8 @@ const addOrUpdateConfigs = {
infoUrl: '/monitoring/productionLine', infoUrl: '/monitoring/productionLine',
fields: [ fields: [
// 'name', // 'name',
{ name: 'name', label: i18n.t('pl.name'), required: true }, { name: 'name', label: i18n.t('pl.name') },
{ name: 'code', label: i18n.t('pl.code'), required: true, api: '/monitoring/productionLine/getCode' }, { name: 'code', label: i18n.t('pl.code'), api: '/monitoring/productionLine/getCode' },
{ {
name: 'factoryId', name: 'factoryId',
required: true, required: true,
@ -119,12 +111,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// //
getFactoryList() { getFactoryList() {
this.$http.get(this.$http.adornUrl('/monitoring/factory/list')).then(({ data: res }) => { this.$http.get(this.$http.adornUrl('/monitoring/factory/list')).then(({ data: res }) => {

View File

@ -72,12 +72,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -78,7 +78,7 @@ const tableConfigStatic = [
] ]
const tableConfigDynamic = [ const tableConfigDynamic = [
{ type: 'index', width: 100, name: i18n.t('index') }, { type: 'index', width: 100, name: i18n.t('index') },
{ name: i18n.t('inspect.det'), prop: 'inspectionContent' }, { name: i18n.t('inspect.type'), prop: 'inspectionContent' },
/** dynamic */ /** dynamic */
{ name: i18n.t('inspect.typetotal'), prop: '' }, { name: i18n.t('inspect.typetotal'), prop: '' },
{ name: i18n.t('inspect.rate'), prop: '' } { name: i18n.t('inspect.rate'), prop: '' }
@ -105,31 +105,17 @@ const FakeChart = {
calcMaxHeight, calcMaxHeight,
chart: null, chart: null,
defaultOpts: { defaultOpts: {
grid: {
left: '5%',
right: '12%',
top: '20%',
bottom: '10%'
},
title: { title: {
text: i18n.t('inspect.typeCount') text: i18n.t('inspect.typeCount')
}, },
tooltip: {}, tooltip: {},
legend: { legend: {
orient: 'vertical', orient: 'vertical',
type: 'scroll',
top: 10, top: 10,
right: 0, right: 20,
width: '12%', data: [
/** 修复文本太长时显示问题 */ /** dynamic */
formatter: function(name) { ]
return echarts.format.truncateText(name, 120, '14px Microsoft Yahei', '...')
},
tooltip: {
show: true
},
/** end */
data: []
}, },
xAxis: { xAxis: {
data: [ data: [
@ -235,25 +221,11 @@ export default {
] ]
}, },
echartCategories: null, echartCategories: null,
echartCheckTypes: [], echartCheckTypes: []
interval: null
} }
}, },
mounted() { mounted() {
this.getDataList() 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: { methods: {
handleOperations() {}, handleOperations() {},
@ -279,12 +251,12 @@ export default {
/** [1] 获取上下片数据 */ /** [1] 获取上下片数据 */
this.fetchList('sx', startTime, endTime).then(({ data: res }) => { this.fetchList('sx', startTime, endTime).then(({ data: res }) => {
// console.log('sx: ', res) console.log('sx: ', res)
this.dataListStatic = res.data || [] this.dataListStatic = res.data || []
}) })
/** [2] 获取产线检测类型 */ /** [2] 获取产线检测类型 */
this.fetchList('pl', startTime, endTime).then(({ data: res }) => { this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
// console.log('pl: ', res) console.log('pl: ', res)
/** TODO: 解析 nameData */ /** TODO: 解析 nameData */
this.parseTableProps(res.data.nameData) this.parseTableProps(res.data.nameData)
@ -310,7 +282,7 @@ export default {
this.tableConfigDynamic = [ this.tableConfigDynamic = [
{ type: 'index', width: 100, name: i18n.t('index') }, { type: 'index', width: 100, name: i18n.t('index') },
{ name: i18n.t('inspect.det'), prop: 'inspectionContent' }, { name: i18n.t('inspect.type'), prop: 'inspectionContent' },
...subProps, ...subProps,
{ name: i18n.t('inspect.typetotal'), prop: 'sumInput' }, { name: i18n.t('inspect.typetotal'), prop: 'sumInput' },
{ name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') } { name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }

View File

@ -22,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -53,9 +53,9 @@ const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/qualityInspectionDet', infoUrl: '/monitoring/qualityInspectionDet',
fields: [ fields: [
{ name: 'typeId', label: i18n.t('inspect.type'), required: true, type: 'select', options: [] }, { name: 'typeId', label: i18n.t('inspect.type'), type: 'select', options: [] },
{ name: 'content', label: i18n.t('inspect.det'), required: true }, { name: 'content', label: i18n.t('inspect.det') },
{ name: 'code', label: i18n.t('inspect.code'), api: '/monitoring/qualityInspectionDet/getCode' }, { name: 'code', label: i18n.t('inspect.detcode'), api: '/monitoring/qualityInspectionDet/getCode' },
'remark' 'remark'
], ],
operations: [ operations: [
@ -92,12 +92,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getInspectionTypeList() { getInspectionTypeList() {
this.$http({ this.$http({

View File

@ -1,29 +1,16 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
<el-form-item> <!-- <el-form-item>
<el-select v-model="dataForm.lineId" :placeholder="$t('pl.title')" clearable filterable> <el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
<el-option v-for="pl in plList" :key="pl.value" :value="pl.value" :label="pl.label" /> </el-form-item> -->
</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-form-item>
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button> <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-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@ -42,7 +29,7 @@
ref="addOrUpdate" ref="addOrUpdate"
:configs="addOrUpdateConfigs" :configs="addOrUpdateConfigs"
@refreshDataList="getDataList" @refreshDataList="getDataList"
@destory-dialog="handleDestroyDialog" @destory-dialog="addOrUpdateVisible = false"
@select-change="handleSelectChange" @select-change="handleSelectChange"
/> />
</div> </div>
@ -84,9 +71,9 @@ const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/qualityInspectionRecord', infoUrl: '/monitoring/qualityInspectionRecord',
fields: [ fields: [
{ name: 'checkTime', required: true, label: i18n.t('inspect.time'), type: 'date', props: { style: 'width: 100%', type: 'datetime' }, placeholder: i18n.t('hints.checktime') }, { name: 'checkTime', 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: 'productionId', label: i18n.t('pl.title'), type: 'select', options: [] },
{ name: 'sectionId', required: true, label: i18n.t('ws.title'), type: 'select', options: [] }, { name: 'sectionId', label: i18n.t('ws.title'), type: 'select', options: [] },
{ {
name: 'source', name: 'source',
label: i18n.t('source'), label: i18n.t('source'),
@ -96,7 +83,7 @@ const addOrUpdateConfigs = {
{ value: 2, label: i18n.t('auto') } { value: 2, label: i18n.t('auto') }
] ]
}, },
{ name: 'inspectionDetId', required: true, label: i18n.t('inspect.det'), type: 'select', options: [] }, { name: 'inspectionDetId', label: i18n.t('inspect.det'), type: 'select', options: [] },
{ name: 'checkPerson', label: i18n.t('inspect.people') }, { name: 'checkPerson', label: i18n.t('inspect.people') },
{ name: 'explainText', label: i18n.t('desc') }, { name: 'explainText', label: i18n.t('desc') },
'remark' 'remark'
@ -115,10 +102,8 @@ export default {
addOrUpdateConfigs, addOrUpdateConfigs,
tableConfigs, tableConfigs,
dataForm: { dataForm: {
key: '', key: ''
lineId: ''
}, },
plList: [],
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
@ -139,12 +124,6 @@ export default {
this.getProductLines() this.getProductLines()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// handle // handle
async handleSelectChange({ name, id }) { async handleSelectChange({ name, id }) {
if (name === 'productionId') { if (name === 'productionId') {
@ -173,14 +152,18 @@ export default {
// 线 // 线
getProductLines() { getProductLines() {
this.$http({ this.$http({
url: this.$http.adornUrl('/monitoring/productionLine/list'), url: this.$http.adornUrl('/monitoring/productionLine/page'),
method: 'get' method: 'get',
params: this.$http.adornParams({
// page: this.pageIndex,
// limit: this.pageSize,
// key: this.dataForm.key
})
}).then(({ data: res }) => { }).then(({ data: res }) => {
const plOpt = this.addOrUpdateConfigs.fields.find(item => item.name === 'productionId') const plOpt = this.addOrUpdateConfigs.fields.find(item => item.name === 'productionId')
if (plOpt) { if (plOpt) {
plOpt.options = res.data.map(item => ({ value: item.id, label: item.name })) || [] plOpt.options = res.data.list.map(item => ({ value: item.id, label: item.name })) || []
} }
this.plList = res.data.map(item => ({ value: item.id, label: item.name })) || []
}) })
}, },
// //
@ -214,22 +197,14 @@ export default {
getDataList() { getDataList() {
this.addOrUpdateVisible = false this.addOrUpdateVisible = false
this.dataListLoading = true 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({ this.$http({
url: this.$http.adornUrl('/monitoring/qualityInspectionRecord/page'), url: this.$http.adornUrl('/monitoring/qualityInspectionRecord/page'),
method: 'get', method: 'get',
params: this.$http.adornParams(queryParams) params: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize,
key: this.dataForm.key
})
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.data.list this.dataList = data.data.list

View File

@ -10,15 +10,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -30,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -50,7 +42,7 @@ const tableConfigs = [
}, },
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter }, { prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
{ prop: 'name', name: i18n.t('inspect.typename') }, { prop: 'name', name: i18n.t('inspect.typename') },
{ prop: 'code', name: i18n.t('inspect.typecode') }, { prop: 'code', name: i18n.t('inspect.typename') },
{ prop: 'remark', name: i18n.t('remark') }, { prop: 'remark', name: i18n.t('remark') },
{ 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'] }
] ]
@ -58,11 +50,7 @@ const tableConfigs = [
const addOrUpdateConfigs = { const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/qualityInspectionType', infoUrl: '/monitoring/qualityInspectionType',
fields: [ fields: [{ name: 'name', label: i18n.t('inspect.type') }, { name: 'code', label: i18n.t('inspect.typename'), api: '/monitoring/qualityInspectionType/getCode' }, 'remark'],
{ name: 'name', label: i18n.t('inspect.type'), required: true },
{ name: 'code', label: i18n.t('inspect.typecode'), api: '/monitoring/qualityInspectionType/getCode' },
'remark'
],
operations: [ operations: [
{ name: 'cancel', showAlways: true }, { name: 'cancel', showAlways: true },
{ name: 'save', url: '/monitoring/qualityInspectionType', permission: 'monitoring:qualityinspectiontype:save', showOnEdit: false }, { name: 'save', url: '/monitoring/qualityInspectionType', permission: 'monitoring:qualityinspectiontype:save', showOnEdit: false },
@ -96,12 +84,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// //
getDataList() { getDataList() {
this.addOrUpdateVisible = false this.addOrUpdateVisible = false

View File

@ -23,7 +23,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -83,12 +83,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
handleOperations({ type, data: id }) { handleOperations({ type, data: id }) {
switch (type) { switch (type) {
case 'edit': case 'edit':

View File

@ -24,7 +24,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -55,12 +55,6 @@ const CategoryList = {
this.pickedId = this.injectData[this.injectData.head.prop] this.pickedId = this.injectData[this.injectData.head.prop]
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
handleChange(id) { handleChange(id) {
this.pickedId = id this.pickedId = id
this.$emit('emit-data', { this.$emit('emit-data', {
@ -118,12 +112,6 @@ export default {
}, },
computed: {}, computed: {},
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
getAllCategories() { getAllCategories() {
axios.get(axios.adornUrl('/monitoring/reportSheetCategory/page')).then(({ data: res }) => { axios.get(axios.adornUrl('/monitoring/reportSheetCategory/page')).then(({ data: res }) => {
if (res.data && res.data.list) { if (res.data && res.data.list) {

View File

@ -73,12 +73,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -67,12 +67,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -78,12 +78,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -75,12 +75,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -10,15 +10,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table <base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="pageIndex"
:size="pageSize"
:data="dataList"
:table-head-configs="tableConfigs"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -30,7 +22,7 @@
> >
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
</div> </div>
</template> </template>
@ -62,8 +54,8 @@ const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/workshopSection', infoUrl: '/monitoring/workshopSection',
fields: [ fields: [
{ name: 'name', required: true, label: i18n.t('ws.name') }, { name: 'name', label: i18n.t('ws.name') },
{ name: 'code', required: true, label: i18n.t('ws.code'), api: '/monitoring/workshopSection/getCode' }, { name: 'code', label: i18n.t('ws.code'), api: '/monitoring/workshopSection/getCode' },
{ name: 'productionLineId', label: i18n.t('ws.belong'), type: 'select', options: [] }, { name: 'productionLineId', label: i18n.t('ws.belong'), type: 'select', options: [] },
'description', 'description',
'remark' 'remark'
@ -104,12 +96,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible = false
}, /** after dialog animated */ 200)
},
// 线 // 线
getProductLine() { getProductLine() {
this.$http.get(this.$http.adornUrl('/monitoring/productionLine/list')).then(({ data: res }) => { this.$http.get(this.$http.adornUrl('/monitoring/productionLine/list')).then(({ data: res }) => {

View File

@ -68,12 +68,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true

View File

@ -42,15 +42,7 @@
<!-- <el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button> --> <!-- <el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button> -->
</h3> </h3>
<div class="table" v-if="!showAttrForm"> <div class="table" v-if="!showAttrForm">
<base-table <base-table :page="page" :size="limit" :data="eqList" :table-head-configs="tableProps" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
:page="page"
:size="limit"
:data="eqList"
:table-head-configs="tableProps"
:max-height="calcMaxHeight(8)"
@operate-event="handleOperations"
@refreshDataList="getDataList"
/>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -86,7 +78,7 @@ const tableProps = [
name: i18n.t('index') name: i18n.t('index')
}, },
{ name: i18n.t('eq.name'), prop: 'equipmentName' }, { 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'), // name: i18n.t('handle'),
// prop: 'operations', // prop: 'operations',
@ -122,12 +114,9 @@ export default {
// //
remark: '' remark: ''
}, },
dataFormRules: {
name: [{ required: true, message: i18n.t('validate.required'), trigger: 'blur' }],
code: [{ required: true, message: i18n.t('validate.required'), trigger: 'blur' }]
},
limit: 5, limit: 5,
page: 1, page: 1,
dataFormRules: {},
showAttrForm: false showAttrForm: false
} }
}, },
@ -290,8 +279,6 @@ export default {
} }
}, },
handleCreateOrUpdate() { handleCreateOrUpdate() {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.$http({ this.$http({
url: this.$http.adornUrl('/monitoring/workshopSection'), url: this.$http.adornUrl('/monitoring/workshopSection'),
method: this.dataForm.id ? 'put' : 'post', method: this.dataForm.id ? 'put' : 'post',
@ -308,8 +295,6 @@ export default {
}) })
}) })
} }
})
}
} }
} }
</script> </script>

View File

@ -152,12 +152,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -20,12 +20,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
// this.url = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}` // this.url = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}`

View File

@ -64,12 +64,6 @@ export default {
Upload Upload
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
configHandle() { configHandle() {
this.configVisible = true this.configVisible = true

View File

@ -65,12 +65,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -47,12 +47,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -77,12 +77,6 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// / // /
addOrUpdateHandle(id) { addOrUpdateHandle(id) {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true

View File

@ -46,12 +46,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -24,7 +24,7 @@
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;"> <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 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="dictName" :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.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 prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="childHandle(scope.row)">{{ scope.row.dictType }}</el-button> <el-button type="text" @click="childHandle(scope.row)">{{ scope.row.dictType }}</el-button>
@ -87,12 +87,6 @@ export default {
IconsDialog IconsDialog
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
showIcons() { showIcons() {
this.displayIcon = true this.displayIcon = true

View File

@ -54,12 +54,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
// //
infoHandle(info) { infoHandle(info) {
this.$alert(info, this.$t('logError.errorInfo'), { this.$alert(info, this.$t('logError.errorInfo'), {

View File

@ -95,12 +95,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -41,12 +41,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -52,12 +52,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -111,12 +111,6 @@ export default {
} }
}, },
methods: { methods: {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
this.addOrUpdateVisible= false
}, /** after dialog animated */ 200);
},
init() { init() {
this.visible = true this.visible = true
this.dataForm.deptId = '' this.dataForm.deptId = ''