fix some bugs

This commit is contained in:
g7hoo 2022-10-09 10:36:18 +08:00
parent d0f113513c
commit 5a08d8c1dd
53 changed files with 367 additions and 95 deletions

View File

@ -147,13 +147,6 @@ 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: () => ({}) // 使
} }
@ -533,7 +526,7 @@ export default {
} }
break break
case 'cancel': case 'cancel':
this.visible = false this.handleClose()
// add more.. // add more..
} }
}, },

View File

@ -1,36 +1,20 @@
<template> <template>
<nav <nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
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:;">{{ <a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a>
$t('brand.lg') <a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a>
}}</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 <el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
index="1" <svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true">
@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 <svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true">
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>
@ -47,11 +31,7 @@
</a> </a>
</el-menu-item> --> </el-menu-item> -->
<el-menu-item index="3"> <el-menu-item index="3">
<el-dropdown <el-dropdown placement="bottom" :show-timeout="0" @command="handleCommand">
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>
@ -59,12 +39,8 @@
<!-- <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 :disabled="getLang() === 'zh-CN'" command="toCN">中文</el-dropdown-item>
>中文</el-dropdown-item <el-dropdown-item :disabled="getLang() === 'en'" command="toEN">En</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>
@ -81,22 +57,15 @@
<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()">{{ <el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item>
$t('updatePassword.title') <el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
}}</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 <update-password v-if="updatePasswordVisible" ref="updatePassword"></update-password>
v-if="updatePasswordVisible"
ref="updatePassword"
></update-password>
</nav> </nav>
</template> </template>
<script> <script>
@ -128,11 +97,11 @@ export default {
this.$root.$i18n.locale = 'zh-CN' this.$root.$i18n.locale = 'zh-CN'
window.navigator.language = 'zh-cn' window.navigator.language = 'zh-cn'
break break
case 'toEN': case 'toEN':
console.log('root', this.$root.$i18n.locale) console.log('root', this.$root.$i18n.locale)
this.$root.$i18n.locale = 'en' this.$root.$i18n.locale = 'en'
location.reload() location.reload()
window.navigator.language = 'en-US' window.navigator.language = 'en-US'
break break
} }
}, },
@ -156,15 +125,11 @@ export default {
}, },
// 退 // 退
logoutHandle() { logoutHandle() {
this.$confirm( this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
this.$t('prompt.info', { handle: this.$t('logout') }), confirmButtonText: this.$t('confirm'),
this.$t('prompt.title'), cancelButtonText: this.$t('cancel'),
{ type: 'warning'
confirmButtonText: this.$t('confirm'), })
cancelButtonText: this.$t('cancel'),
type: 'warning'
}
)
.then(() => { .then(() => {
this.$http this.$http
.post(this.$http.adornUrl('/logout')) .post(this.$http.adornUrl('/logout'))

View File

@ -58,6 +58,12 @@ 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,6 +56,12 @@ 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,6 +97,12 @@ 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,7 +30,14 @@
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" @select-change="handleDialogSelectChange" /> <add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:configs="addOrUpdateConfigs"
@refreshDataList="getDataList"
@select-change="handleDialogSelectChange"
@destory-dialog="handleDestroyDialog"
/>
</div> </div>
</template> </template>
@ -297,6 +304,12 @@ 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,6 +77,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -128,6 +128,12 @@ 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,6 +80,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -86,6 +86,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -125,6 +125,12 @@ 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,6 +40,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -106,6 +106,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -141,6 +141,12 @@ 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,6 +79,12 @@ 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,6 +85,12 @@ 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,6 +81,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -106,6 +106,12 @@ 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,6 +81,12 @@ 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,6 +79,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -99,6 +99,12 @@ 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,7 +12,15 @@
</el-form-item> </el-form-item>
</el-form> </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 <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@ -25,7 +33,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" /> <base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -171,7 +179,12 @@ 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" @destroy-dialog="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" :configs="addOrUpdateConfigs" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -111,6 +111,12 @@ 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

@ -22,7 +22,7 @@
> >
</el-pagination> </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> </div>
</template> </template>
@ -111,6 +111,12 @@ 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,6 +72,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -53,8 +53,8 @@ const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/qualityInspectionDet', infoUrl: '/monitoring/qualityInspectionDet',
fields: [ fields: [
{ name: 'typeId', label: i18n.t('inspect.type'), type: 'select', options: [] }, { name: 'typeId', label: i18n.t('inspect.type'), required: true, type: 'select', options: [] },
{ name: 'content', label: i18n.t('inspect.det') }, { name: 'content', label: i18n.t('inspect.det'), required: true },
{ name: 'code', label: i18n.t('inspect.detcode'), api: '/monitoring/qualityInspectionDet/getCode' }, { name: 'code', label: i18n.t('inspect.detcode'), api: '/monitoring/qualityInspectionDet/getCode' },
'remark' 'remark'
], ],
@ -92,6 +92,12 @@ 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

@ -29,7 +29,7 @@
ref="addOrUpdate" ref="addOrUpdate"
:configs="addOrUpdateConfigs" :configs="addOrUpdateConfigs"
@refreshDataList="getDataList" @refreshDataList="getDataList"
@destory-dialog="addOrUpdateVisible = false" @destory-dialog="handleDestroyDialog"
@select-change="handleSelectChange" @select-change="handleSelectChange"
/> />
</div> </div>
@ -124,6 +124,12 @@ 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') {

View File

@ -10,7 +10,15 @@
</el-form-item> </el-form-item>
</el-form> </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 <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -22,7 +30,7 @@
> >
</el-pagination> </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> </div>
</template> </template>
@ -42,7 +50,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.typename') }, { prop: 'code', name: i18n.t('inspect.typecode') },
{ 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'] }
] ]
@ -50,7 +58,11 @@ const tableConfigs = [
const addOrUpdateConfigs = { const addOrUpdateConfigs = {
type: 'dialog', type: 'dialog',
infoUrl: '/monitoring/qualityInspectionType', 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: [ 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 },
@ -84,6 +96,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -83,6 +83,12 @@ 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="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -55,6 +55,12 @@ 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', {
@ -112,6 +118,12 @@ 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,6 +73,12 @@ 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,6 +67,12 @@ 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,6 +78,12 @@ 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,6 +75,12 @@ 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" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
</div> </div>
</template> </template>
@ -96,6 +96,12 @@ 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,6 +68,12 @@ 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

@ -152,6 +152,12 @@ 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,6 +20,12 @@ 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,6 +64,12 @@ 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,6 +65,12 @@ 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,6 +47,12 @@ 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,6 +77,12 @@ 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,6 +46,12 @@ 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

@ -87,6 +87,12 @@ 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,6 +54,12 @@ 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,6 +95,12 @@ 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,6 +41,12 @@ 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,6 +52,12 @@ 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,6 +111,12 @@ 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 = ''

View File

@ -93,9 +93,9 @@ export default {
this.$root.$i18n.locale = 'zh-CN' this.$root.$i18n.locale = 'zh-CN'
// location.reload() // location.reload()
break break
case 'en': case 'en':
this.$root.$i18n.locale = 'en' this.$root.$i18n.locale = 'en'
location.reload() location.reload()
break break
} }
}, },