diff --git a/src/views/modules/monitoring/equipmentType.vue b/src/views/modules/monitoring/equipmentType.vue
index 88569b9..f7cb485 100644
--- a/src/views/modules/monitoring/equipmentType.vue
+++ b/src/views/modules/monitoring/equipmentType.vue
@@ -57,6 +57,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
diff --git a/src/views/modules/monitoring/equipmentattr.vue b/src/views/modules/monitoring/equipmentattr.vue
index 13ce366..3c210fa 100644
--- a/src/views/modules/monitoring/equipmentattr.vue
+++ b/src/views/modules/monitoring/equipmentattr.vue
@@ -38,6 +38,7 @@ import TableOperateComponent from '@/components/base-table/components/operationC
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
diff --git a/src/views/modules/monitoring/factory.vue b/src/views/modules/monitoring/factory.vue
index af8e144..ff098e8 100644
--- a/src/views/modules/monitoring/factory.vue
+++ b/src/views/modules/monitoring/factory.vue
@@ -56,6 +56,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
diff --git a/src/views/modules/monitoring/productionLine.vue b/src/views/modules/monitoring/productionLine.vue
index 3d20004..6eb5022 100644
--- a/src/views/modules/monitoring/productionLine.vue
+++ b/src/views/modules/monitoring/productionLine.vue
@@ -54,6 +54,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
diff --git a/src/views/modules/monitoring/qualityInspectionBoxBtn.vue b/src/views/modules/monitoring/qualityInspectionBoxBtn.vue
index 8af5a87..fb446b6 100644
--- a/src/views/modules/monitoring/qualityInspectionBoxBtn.vue
+++ b/src/views/modules/monitoring/qualityInspectionBoxBtn.vue
@@ -65,6 +65,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{
diff --git a/src/views/modules/monitoring/qualityInspectionDet.vue b/src/views/modules/monitoring/qualityInspectionDet.vue
index 438877a..8fb9152 100644
--- a/src/views/modules/monitoring/qualityInspectionDet.vue
+++ b/src/views/modules/monitoring/qualityInspectionDet.vue
@@ -47,6 +47,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
diff --git a/src/views/modules/monitoring/qualityInspectionRecord.vue b/src/views/modules/monitoring/qualityInspectionRecord.vue
index bfbf83a..68875a3 100644
--- a/src/views/modules/monitoring/qualityInspectionRecord.vue
+++ b/src/views/modules/monitoring/qualityInspectionRecord.vue
@@ -71,6 +71,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
@@ -111,7 +112,7 @@ const addOrUpdateConfigs = {
// placeholder: i18n.t('hints.checktime')
// },
{ name: 'productionId', required: true, label: i18n.t('pl.title'), type: 'select', options: [] },
- { name: 'sectionId', required: true, label: i18n.t('ws.title'), type: 'select', options: [] , isDisabled: true },
+ { name: 'sectionId', required: true, label: i18n.t('ws.title'), type: 'select', options: [], isDisabled: true },
{
name: 'source',
label: i18n.t('source'),
@@ -183,7 +184,6 @@ export default {
this.$set(this.addOrUpdateConfigs.fields[2], 'isDisabled', true)
}
await this.getWorkSections(id)
-
}
if (name === 'sectionId') {
// 如果选择了产线,就依据此更新工单的选项
@@ -198,9 +198,11 @@ export default {
url: this.$http.adornUrl('/monitoring/qualityInspectionDet/page'),
method: 'get',
params: this.$http.adornParams({
- page: this.pageIndex,
- limit: this.pageSize,
- key: this.dataForm.key
+ // page: this.pageIndex,
+ // limit: this.pageSize,
+ // key: this.dataForm.key
+ page: 1,
+ limit: 9999999
})
}).then(({ data: res }) => {
console.log('insdet:', res)
diff --git a/src/views/modules/monitoring/qualityInspectionType.vue b/src/views/modules/monitoring/qualityInspectionType.vue
index 30ec778..bfbb955 100644
--- a/src/views/modules/monitoring/qualityInspectionType.vue
+++ b/src/views/modules/monitoring/qualityInspectionType.vue
@@ -57,6 +57,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
diff --git a/src/views/modules/monitoring/realtimeEquipment.vue b/src/views/modules/monitoring/realtimeEquipment.vue
index 3093122..e387edb 100644
--- a/src/views/modules/monitoring/realtimeEquipment.vue
+++ b/src/views/modules/monitoring/realtimeEquipment.vue
@@ -2,14 +2,14 @@
* @Author: lb
* @Date: 2022-06-22 14:00:17
* @LastEditors: fzq
- * @LastEditTime: 2023-02-02 17:19:10
+ * @LastEditTime: 2023-02-08 16:50:05
* @Description: 设备生产实时数据
-->
{{ $t('realtime.eq') }}
-
+
diff --git a/src/views/modules/monitoring/realtimeProductLine.vue b/src/views/modules/monitoring/realtimeProductLine.vue
index 30d5b9d..58a9f0e 100644
--- a/src/views/modules/monitoring/realtimeProductLine.vue
+++ b/src/views/modules/monitoring/realtimeProductLine.vue
@@ -2,7 +2,7 @@
* @Author: lb
* @Date: 2022-06-22 14:00:17
* @LastEditors: fzq
- * @LastEditTime: 2023-02-02 17:17:45
+ * @LastEditTime: 2023-02-07 16:23:23
* @Description: 产线生产实时数据
-->
@@ -38,12 +38,19 @@ export default {
},
mounted() {
+ console.log('this.$route', this.$route)
this.clearData()
- this.fetchList().then(({ data: res }) => {
- // console.log('fetchlist:', res)
- this.testData = res
- this.handleData()
- })
+ // this.fetchList().then(({ data: res }) => {
+ // // console.log('fetchlist:', res)
+ // this.testData = res
+ // this.handleData()
+ // if (res.code === 200 || this.$route.fullPath !== '/monitoring-realtimeProductLine') {
+ // // 获取数据显示成功后,关闭loading
+ // loading.close()
+ // } else {
+ // this.$message.error(this.$t('err'))
+ // }
+ // })
this.intervalId = setInterval(() => {
this.$message({
@@ -66,6 +73,12 @@ export default {
methods: {
fetchList() {
+ // let loading = this.$loading({
+ // lock: true, //lock的修改符--默认是false
+ // text: this.$t('loading'), //显示在加载图标下方的加载文案
+ // background: 'rgba(0,0,0,0.8)', //遮罩层颜色
+ // spinner: 'el-icon-loading' //自定义加载图标类名
+ // })
return this.$http({
url: this.$http.adornUrl('/monitoring/productionMonitoring/lineProductionRealTimeData'),
method: 'post'
@@ -97,7 +110,7 @@ export default {
expandDataStepOne() {
// 扩展服务器返回的数据第一阶段
// console.log('create new one')
- this.tableData = this.testData.data.map(item => {
+ this.tableData = this.testData.data.map((item) => {
const newItem = {
lineName: item.lineName,
orderName: item.orderName,
@@ -105,14 +118,14 @@ export default {
}
if (item.det) {
- item.det.forEach(obj => {
+ item.det.forEach((obj) => {
// Step2: 设置动态props
if (!this.dynamicPropSet) {
this.tableProps.push({
- label: moment(obj.recordTime).format('YYYY-MM-DD HH')+ moment(obj.recordTime).add(1,'hours').format('-HH')+i18n.t('hourTime'),
+ label: moment(obj.recordTime).format('YYYY-MM-DD HH') + moment(obj.recordTime).add(1, 'hours').format('-HH') + i18n.t('hourTime'),
children: [
{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
- { prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') },
+ { prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') }
// { prop: obj.recordTime + '-passArea', label: i18n.t('realtime.goodrate') },
// { prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.num') },
// { prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate') }
diff --git a/src/views/modules/monitoring/realtimeQualityInspection.vue b/src/views/modules/monitoring/realtimeQualityInspection.vue
index 568f5dc..4a4b233 100644
--- a/src/views/modules/monitoring/realtimeQualityInspection.vue
+++ b/src/views/modules/monitoring/realtimeQualityInspection.vue
@@ -2,7 +2,8 @@
{{ $t('realtime.inspect') }}
-
+
+
diff --git a/src/views/modules/monitoring/reportCategory.vue b/src/views/modules/monitoring/reportCategory.vue
index a926ccc..caa1f3e 100644
--- a/src/views/modules/monitoring/reportCategory.vue
+++ b/src/views/modules/monitoring/reportCategory.vue
@@ -48,6 +48,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
diff --git a/src/views/modules/monitoring/workShopSection.vue b/src/views/modules/monitoring/workShopSection.vue
index 35c56bd..88a1da8 100644
--- a/src/views/modules/monitoring/workShopSection.vue
+++ b/src/views/modules/monitoring/workShopSection.vue
@@ -58,6 +58,7 @@ const topBtnConfig = [
const tableConfigs = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
diff --git a/src/views/modules/monitoring/workshopSectionDialog.vue b/src/views/modules/monitoring/workshopSectionDialog.vue
index db912b0..0064278 100644
--- a/src/views/modules/monitoring/workshopSectionDialog.vue
+++ b/src/views/modules/monitoring/workshopSectionDialog.vue
@@ -20,7 +20,7 @@
-
+
@@ -83,6 +83,7 @@ import { calcMaxHeight } from '@/utils'
const tableProps = [
{
type: 'index',
+ width: 100,
name: i18n.t('index')
},
{ name: i18n.t('eq.name'), prop: 'equipmentName' },
diff --git a/src/views/modules/monitoring/workshopSectionDialogAttrForm.vue b/src/views/modules/monitoring/workshopSectionDialogAttrForm.vue
index ac66350..da4b922 100644
--- a/src/views/modules/monitoring/workshopSectionDialogAttrForm.vue
+++ b/src/views/modules/monitoring/workshopSectionDialogAttrForm.vue
@@ -5,7 +5,7 @@
-
+
-
+
diff --git a/src/views/modules/sys/dict-type.vue b/src/views/modules/sys/dict-type.vue
index 98bafe3..ab4c780 100644
--- a/src/views/modules/sys/dict-type.vue
+++ b/src/views/modules/sys/dict-type.vue
@@ -24,7 +24,7 @@
{{ $t('deleteBatch') }}
- 所有图标
+ {{ $t('allIcons') }}
@@ -81,6 +81,35 @@ export default {
status: ''
}
}
+ },
+ methods: {
+ exportHandle() {
+ // 导出登录日志
+ this.$http({
+ url: this.$http.adornUrl(`/sys/log/login/export${this.dataForm.creatorName,this.dataForm.status}`),
+ method: 'get',
+ responseType: "blob"
+ }).then((response) => {
+ let fileName = ''
+ const contentDisposition = response.headers['content-disposition']
+ if (contentDisposition) {
+ // fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9).replace('.xls',this.$t('LoginRecords')) +'.xls'
+ fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9)
+ }
+ fileName = decodeURIComponent(fileName)
+ const blob = new Blob([response.data])
+ const reader = new FileReader()
+ reader.readAsDataURL(blob)
+ reader.onload = (e) => {
+ const a = document.createElement('a')
+ a.download = fileName
+ a.href = e.target.result
+ document.body.appendChild(a)
+ a.click()
+ document.body.removeChild(a)
+ }
+ })
+ }
}
}
diff --git a/src/views/modules/sys/log-operation.vue b/src/views/modules/sys/log-operation.vue
index b5a5790..c15823e 100644
--- a/src/views/modules/sys/log-operation.vue
+++ b/src/views/modules/sys/log-operation.vue
@@ -4,7 +4,7 @@
* @Author: fzq
* @Date: 2022-11-25 09:51:46
* @LastEditors: fzq
- * @LastEditTime: 2023-01-13 09:01:16
+ * @LastEditTime: 2023-02-08 16:19:16
-->
@@ -81,6 +81,35 @@ export default {
status: ''
}
}
+ },
+ methods: {
+ exportHandle() {
+ // 导出操作日志
+ this.$http({
+ url: this.$http.adornUrl(`/sys/log/operation/export`),
+ method: 'get',
+ responseType: "blob"
+ }).then((response) => {
+ let fileName = ''
+ const contentDisposition = response.headers['content-disposition']
+ if (contentDisposition) {
+ // fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9).replace('.xls',this.$t('operationsRecords')) +'.xls'
+ fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9)
+ }
+ fileName = decodeURIComponent(fileName)
+ const blob = new Blob([response.data])
+ const reader = new FileReader()
+ reader.readAsDataURL(blob)
+ reader.onload = (e) => {
+ const a = document.createElement('a')
+ a.download = fileName
+ a.href = e.target.result
+ document.body.appendChild(a)
+ a.click()
+ document.body.removeChild(a)
+ }
+ })
+ }
}
}
diff --git a/src/views/modules/sys/menu-add-or-update.vue b/src/views/modules/sys/menu-add-or-update.vue
index ebd070b..a89cfef 100644
--- a/src/views/modules/sys/menu-add-or-update.vue
+++ b/src/views/modules/sys/menu-add-or-update.vue
@@ -7,12 +7,16 @@
{{ $t('menu.type1') }}
+
+
+
-
-
+
+
@@ -58,6 +59,10 @@ export default {
},
components: {
AddOrUpdate
+ },
+ created(){
+ // console.log('mixinViewModuleOptions',this.mixinViewModuleOptions);
+ // console.log('this.$i18n.locale',this.$i18n.locale);
}
}
diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue
index 17de948..f54bbfe 100644
--- a/src/views/modules/sys/role-add-or-update.vue
+++ b/src/views/modules/sys/role-add-or-update.vue
@@ -10,7 +10,8 @@
-
+
+
@@ -80,6 +81,7 @@ export default {
return this.$message.error(res.msg)
}
this.menuList = res.data
+ console.log('this.menuList',this.menuList);
})
.catch(() => {})
},
diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue
index 167d95b..8adc020 100644
--- a/src/views/modules/sys/user-add-or-update.vue
+++ b/src/views/modules/sys/user-add-or-update.vue
@@ -17,7 +17,12 @@
-
+
+
+ {{ $t('user.gender0') }}
+ {{ $t('user.gender1') }}
+ {{ $t('user.gender2') }}
+
@@ -26,7 +31,7 @@
-
+
@@ -66,7 +71,8 @@ export default {
mobile: '',
roleIdList: [],
status: 1
- }
+ },
+ radio: '1'
}
},
computed: {
@@ -107,7 +113,7 @@ export default {
email: [{ validator: validateEmail, trigger: 'blur' }],
// 解除手机号输入限制
// mobile: [{ validator: validateMobile, trigger: 'blur' }],
- roleIdList: [{ required: true, message: '至少选择一个角色', trigger: 'change' }]
+ roleIdList: [{ required: true, message: this.$t('validate.requiredRole'), trigger: 'change' }]
}
}
},
@@ -115,8 +121,8 @@ export default {
// destroy dialog
handleDestroyDialog() {
setTimeout(() => {
- this.addOrUpdateVisible= false
- }, /** after dialog animated */ 200);
+ this.addOrUpdateVisible = false
+ }, /** after dialog animated */ 200)
},
init() {
this.visible = true
@@ -158,7 +164,7 @@ export default {
}
// 角色配置, 区分是否为默认角色
for (var i = 0; i < res.data.roleIdList.length; i++) {
- if (this.roleList.filter(item => item.id === res.data.roleIdList[i])[0]) {
+ if (this.roleList.filter((item) => item.id === res.data.roleIdList[i])[0]) {
this.dataForm.roleIdList.push(res.data.roleIdList[i])
continue
}
@@ -169,8 +175,8 @@ export default {
},
// 表单提交
dataFormSubmitHandle: debounce(
- function() {
- this.$refs['dataForm'].validate(valid => {
+ function () {
+ this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
diff --git a/src/views/modules/sys/user.vue b/src/views/modules/sys/user.vue
index 1645337..b2768b6 100644
--- a/src/views/modules/sys/user.vue
+++ b/src/views/modules/sys/user.vue
@@ -4,7 +4,7 @@
* @Author: fzq
* @Date: 2022-11-25 09:51:46
* @LastEditors: fzq
- * @LastEditTime: 2023-02-02 15:36:55
+ * @LastEditTime: 2023-02-07 15:29:45
-->
@@ -20,13 +20,16 @@
{{ $t('user.gender') }}
-
+
+
+
+
{{ $t('dept.title') }}
-
+
{{ $t('query') }}
@@ -41,7 +44,7 @@
{{ $t('export') }}
-
+
@@ -73,8 +76,7 @@
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
- @current-change="pageCurrentChangeHandle"
- >
+ @current-change="pageCurrentChangeHandle">
@@ -100,7 +102,52 @@ export default {
username: '',
deptId: '',
gender: ''
- }
+ },
+ genderOptions: [
+ {
+ value: 0,
+ label: this.$t('user.gender0')
+ },
+ {
+ value: 1,
+ label: this.$t('user.gender1')
+ },
+ {
+ value: 2,
+ label: this.$t('user.gender2')
+ }
+ ]
+ }
+ },
+ methods: {
+ exportHandle() {
+ // 导出用户
+ // exportEquipments({
+ // ...this.listQuery,
+ // fileName: `user-${this.listQuery.current}-${this.listQuery.size}`
+ // }).then((response) => {
+ this.$http({
+ url: this.$http.adornUrl(`/sys/user/export${this.dataForm.username}`),
+ method: 'get',
+ responseType: 'arraybuffer'
+ }).then((response) => {
+ let fileName = ''
+ const contentDisposition = response.headers['content-disposition']
+ if (contentDisposition) {
+ fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9).replace('.xls', this.$t('user.userTable')) + '.xls'
+ }
+ const blob = new Blob([response.data])
+ const reader = new FileReader()
+ reader.readAsDataURL(blob)
+ reader.onload = (e) => {
+ const a = document.createElement('a')
+ a.download = fileName
+ a.href = e.target.result
+ document.body.appendChild(a)
+ a.click()
+ document.body.removeChild(a)
+ }
+ })
}
},
components: {