diff --git a/src/api/analysis/energyAnalysis.js b/src/api/analysis/energyAnalysis.js
index 16e466bd..204f5137 100644
--- a/src/api/analysis/energyAnalysis.js
+++ b/src/api/analysis/energyAnalysis.js
@@ -8,7 +8,15 @@ export function getEnergyTrend(data) {
data: data
})
}
-
+// 导出走势分析数据
+export function exportTrend(data) {
+ return request({
+ url: '/analysis/energy-analysis/exportTrend',
+ method: 'post',
+ data: data,
+ responseType: 'blob'
+ })
+}
// 获取对比分析数据
export function getCompare(data) {
return request({
@@ -34,4 +42,4 @@ export function getQoq(data) {
method: 'post',
data: data
})
-}
\ No newline at end of file
+}
diff --git a/src/api/home.js b/src/api/home.js
new file mode 100644
index 00000000..666207a5
--- /dev/null
+++ b/src/api/home.js
@@ -0,0 +1,54 @@
+/*
+ * @Author: zwq
+ * @Date: 2024-09-12 13:38:33
+ * @LastEditors: zwq
+ * @LastEditTime: 2024-09-13 15:25:07
+ * @Description:
+ */
+import request from '@/utils/request'
+// 获得首页生产总览以及工单监控
+export function getHomeOrder(data) {
+ return request({
+ url: '/base/core-work-order/homeOrder',
+ method: 'post',
+ data: data
+ })
+}
+// 获得首页生产总览-完成订单数量
+export function getHomeOrderNum(data) {
+ return request({
+ url: '/base/order/homeOrder',
+ method: 'post',
+ data: data
+ })
+}
+// 首页设备总览
+export function getHomeEquipment() {
+ return request({
+ url: '/monitoring/equipment-monitor/homeEquipment',
+ method: 'get'
+ })
+}
+
+// 首页设备报警信息
+export function getHomeEquipmentAlarmList() {
+ return request({
+ url: '/base/equipment-alarm-realtime/homeEquipmentAlarmList',
+ method: 'get'
+ })
+}
+// 获取是否存在报警(右上角红点)
+export function getHomeGetAlarm() {
+ return request({
+ url: '/base/core-alarm-log/homeGetAlarm',
+ method: 'get'
+ })
+}
+// 条件查询获得异常警告列表
+export function getHomeAlarmList(query) {
+ return request({
+ url: '/base/core-alarm-log/listbyfilter',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/assets/icons/svg/home-alarm-white-circle.svg b/src/assets/icons/svg/home-alarm-white-circle.svg
new file mode 100644
index 00000000..ee493e91
--- /dev/null
+++ b/src/assets/icons/svg/home-alarm-white-circle.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/icons/svg/home-alarm-white.svg b/src/assets/icons/svg/home-alarm-white.svg
index f1eb9020..cd0baab3 100644
--- a/src/assets/icons/svg/home-alarm-white.svg
+++ b/src/assets/icons/svg/home-alarm-white.svg
@@ -8,8 +8,7 @@
-
-
\ No newline at end of file
+
diff --git a/src/components/ButtonNav/index.vue b/src/components/ButtonNav/index.vue
new file mode 100644
index 00000000..c3bc57aa
--- /dev/null
+++ b/src/components/ButtonNav/index.vue
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/abnormalWarning/alarmGrade.vue b/src/views/abnormalWarning/alarmGrade.vue
new file mode 100644
index 00000000..62ffe645
--- /dev/null
+++ b/src/views/abnormalWarning/alarmGrade.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/src/views/abnormalWarning/index.vue b/src/views/abnormalWarning/index.vue
index 302512e0..b0e75bf2 100644
--- a/src/views/abnormalWarning/index.vue
+++ b/src/views/abnormalWarning/index.vue
@@ -34,6 +34,12 @@
import Navbar from './components/Navbar';
import moment from 'moment';
import tableHeightMixin from '@/mixins/tableHeightMixin';
+import { listData } from '@/api/system/dict/data';
+import alarmGrade from './alarmGrade.vue'
+import {
+ getHomeAlarmList
+} from '@/api/home';
+
export default {
name: 'AbnormalWarning',
mixins: [tableHeightMixin],
@@ -45,25 +51,28 @@ export default {
type: 'input',
label: '报警来源',
placeholder: '报警来源',
- param: 'content',
+ param: 'alarmSource',
},
{
- type: 'select',
+ type: 'datePicker',
label: '时间段',
- selectOptions: [],
- labelField: 'name',
- valueField: 'id',
- param: 'typeId',
- filterable: true,
+ dateType: 'daterange',
+ format: 'yyyy-MM-dd',
+ valueFormat: 'timestamp',
+ rangeSeparator: '-',
+ startPlaceholder: '开始时间',
+ endPlaceholder: '结束时间',
+ param: 'alarmTime',
},
{
type: 'select',
label: '报警级别',
selectOptions: [],
- labelField: 'name',
- valueField: 'id',
- param: 'typeId',
+ param: 'alarmGrade',
+ defaultSelect: '',
filterable: true,
+ labelField: 'label',
+ valueField: 'value',
},
{
type: 'button',
@@ -75,60 +84,79 @@ export default {
heightNum: 280,
tableProps: [
{
- prop: 'createTime',
+ prop: 'alarmTime',
label: '报警时间',
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{
- prop: 'productionLineName1',
+ prop: 'alarmSource',
label: '报警来源',
showOverflowtooltip: true,
},
{
- prop: 'productionLineName2',
+ prop: 'alarmType',
label: '报警类型',
showOverflowtooltip: true,
},
{
- prop: 'productionLineName3',
+ prop: 'alarmGrade',
label: '报警级别',
showOverflowtooltip: true,
+ subcomponent: alarmGrade
},
{
- prop: 'productionLineName4',
+ prop: 'alarmReason',
label: '报警原因',
showOverflowtooltip: true,
},
{
- prop: 'sectionName5',
+ prop: 'alarmContent',
label: '报警详情',
showOverflowtooltip: true,
},
],
- list: [
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- ],
+ list: [],
+ listQuery: {
+ alarmSource: undefined,
+ alarmTime: undefined,
+ alarmGrade: undefined,
+ }
};
},
- created() {},
+ created() {
+ const queryParams = {
+ pageNo: 1,
+ pageSize: 99,
+ dictType: 'equ_alarm_level',
+ };
+ listData(queryParams).then((response) => {
+ this.formConfig[2].selectOptions = response.data.list;
+ });
+ this.getDataList()
+ },
methods: {
- buttonClick(val) {},
+ buttonClick(val) {
+ switch (val.btnName) {
+ case 'search':
+ this.listQuery.alarmSource = val.alarmSource;
+ this.listQuery.alarmGrade = val.alarmGrade;
+ this.listQuery.alarmTime = val.alarmTime ? val.alarmTime : null;
+ this.getDataList();
+ break;
+ default:
+ console.log(val);
+ }
+ },
+ getDataList(){
+ getHomeAlarmList(this.listQuery).then(response => {
+ if(response.hasOwnProperty('data')){
+ this.list = response.data;
+ }else{
+ this.list = []
+ }
+ });
+ },
toHome() {
this.$router.push({ path: '/' });
},
diff --git a/src/views/devConfig/base/coreEquipment/components/AssetsUpload.vue b/src/views/devConfig/base/coreEquipment/components/AssetsUpload.vue
new file mode 100644
index 00000000..b693a442
--- /dev/null
+++ b/src/views/devConfig/base/coreEquipment/components/AssetsUpload.vue
@@ -0,0 +1,399 @@
+
+
+
+
+
+
+
+
+
+ 将文件拖到此处或
+ 点击上传
+
+
+ {{
+ isPicMode ? '仅支持上传 .jpg .png 格式文件, 且' : ''
+ }}文件大小不超过2MB
+
+
+
+
+ handleDelete(file)" />
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreEquipment/components/DialogForm.vue b/src/views/devConfig/base/coreEquipment/components/DialogForm.vue
new file mode 100644
index 00000000..39c16824
--- /dev/null
+++ b/src/views/devConfig/base/coreEquipment/components/DialogForm.vue
@@ -0,0 +1,313 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 点击上传
+
+
+ {{ col.uploadTips || '只能上传jpg/png文件,大小不超过2MB' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreEquipment/components/EquipmentDrawer.vue b/src/views/devConfig/base/coreEquipment/components/EquipmentDrawer.vue
new file mode 100644
index 00000000..3c58a5c9
--- /dev/null
+++ b/src/views/devConfig/base/coreEquipment/components/EquipmentDrawer.vue
@@ -0,0 +1,550 @@
+
+
+
+
+
+ {{
+ mode.includes('detail')
+ ? '详情'
+ : mode.includes('edit')
+ ? '编辑'
+ : '新增'
+ }}
+
+
+
+
+
+ {{ section.name }}
+
+
+
+
+
+
+
+
+
+
+ 添加属性
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+ 编辑
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreEquipment/components/EquipmentInfoForm.vue b/src/views/devConfig/base/coreEquipment/components/EquipmentInfoForm.vue
new file mode 100644
index 00000000..926c850a
--- /dev/null
+++ b/src/views/devConfig/base/coreEquipment/components/EquipmentInfoForm.vue
@@ -0,0 +1,288 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreEquipment/index.vue b/src/views/devConfig/base/coreEquipment/index.vue
new file mode 100644
index 00000000..fbf9c10a
--- /dev/null
+++ b/src/views/devConfig/base/coreEquipment/index.vue
@@ -0,0 +1,689 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreEquipmentLineBind/index.vue b/src/views/devConfig/base/coreEquipmentLineBind/index.vue
new file mode 100644
index 00000000..5aba7c9c
--- /dev/null
+++ b/src/views/devConfig/base/coreEquipmentLineBind/index.vue
@@ -0,0 +1,370 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreEquipmentType/index.vue b/src/views/devConfig/base/coreEquipmentType/index.vue
new file mode 100644
index 00000000..60e9e1b2
--- /dev/null
+++ b/src/views/devConfig/base/coreEquipmentType/index.vue
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreProductionLine/add-or-updata.vue b/src/views/devConfig/base/coreProductionLine/add-or-updata.vue
new file mode 100644
index 00000000..c9f85e26
--- /dev/null
+++ b/src/views/devConfig/base/coreProductionLine/add-or-updata.vue
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreProductionLine/index.vue b/src/views/devConfig/base/coreProductionLine/index.vue
new file mode 100644
index 00000000..d041ac36
--- /dev/null
+++ b/src/views/devConfig/base/coreProductionLine/index.vue
@@ -0,0 +1,204 @@
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreWorkshopSection/add-or-updata.vue b/src/views/devConfig/base/coreWorkshopSection/add-or-updata.vue
new file mode 100644
index 00000000..546b50b7
--- /dev/null
+++ b/src/views/devConfig/base/coreWorkshopSection/add-or-updata.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/coreWorkshopSection/index.vue b/src/views/devConfig/base/coreWorkshopSection/index.vue
new file mode 100644
index 00000000..5e65880f
--- /dev/null
+++ b/src/views/devConfig/base/coreWorkshopSection/index.vue
@@ -0,0 +1,165 @@
+
+
+
+
+
diff --git a/src/views/devConfig/base/factory/add-or-updata.vue b/src/views/devConfig/base/factory/add-or-updata.vue
new file mode 100644
index 00000000..798c5bd3
--- /dev/null
+++ b/src/views/devConfig/base/factory/add-or-updata.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/devConfig/base/factory/index.vue b/src/views/devConfig/base/factory/index.vue
new file mode 100644
index 00000000..59ced405
--- /dev/null
+++ b/src/views/devConfig/base/factory/index.vue
@@ -0,0 +1,184 @@
+
+
+
+
+
diff --git a/src/views/devConfig/energy/energyLimit/index.vue b/src/views/devConfig/energy/energyLimit/index.vue
index 1b82ab8b..841ae375 100644
--- a/src/views/devConfig/energy/energyLimit/index.vue
+++ b/src/views/devConfig/energy/energyLimit/index.vue
@@ -241,7 +241,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
- this.$modal.confirm('是否确认删除监控对象为"' + row.objName + '"的数据项?').then(function() {
+ this.$modal
+ .delConfirm(row.objName)
+ .then(function() {
return deleteEnergyLimit(row.id);
}).then(() => {
this.queryParams.pageNo = 1;
diff --git a/src/views/devConfig/energy/energyPlcConnect/index.vue b/src/views/devConfig/energy/energyPlcConnect/index.vue
index c5b679ef..672ce11b 100644
--- a/src/views/devConfig/energy/energyPlcConnect/index.vue
+++ b/src/views/devConfig/energy/energyPlcConnect/index.vue
@@ -63,7 +63,7 @@ const tableProps = [
label: '对象编码'
},
{
- prop: 'plcTableName',
+ prop: 'plcTableName',
label: '关联表名'
},
{
@@ -230,7 +230,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
- this.$modal.confirm('是否确认删除对象为"' + row.objName + '"的数据项?').then(function() {
+ this.$modal
+ .delConfirm(row.objName)
+ .then(function() {
return deleteEnergyPlcConnect(row.id);
}).then(() => {
this.queryParams.pageNo = 1;
diff --git a/src/views/devConfig/energy/energyStatistics/index.vue b/src/views/devConfig/energy/energyStatistics/index.vue
index 87f6aa54..ef5e9fd3 100644
--- a/src/views/devConfig/energy/energyStatistics/index.vue
+++ b/src/views/devConfig/energy/energyStatistics/index.vue
@@ -63,7 +63,7 @@ const tableProps = [
showOverflowtooltip: true
},
{
- prop: 'type',
+ prop: 'type',
label: '统计类型',
filter: publicFormatter('statistic_type')
},
@@ -224,7 +224,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
- this.$modal.confirm('是否确认删除方案名称为"' + row.name + '"的数据项?').then(function() {
+ this.$modal
+ .delConfirm(row.name)
+ .then(function() {
return deleteEnergyStatistics(row.id);
}).then(() => {
this.queryParams.pageNo = 1;
diff --git a/src/views/devConfig/energy/energyType/index.vue b/src/views/devConfig/energy/energyType/index.vue
index 57fa05f1..8a064199 100644
--- a/src/views/devConfig/energy/energyType/index.vue
+++ b/src/views/devConfig/energy/energyType/index.vue
@@ -205,7 +205,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
- this.$modal.confirm('是否确认删除能源类型为"' + row.name + '"的数据项?').then(function() {
+ this.$modal
+ .delConfirm(row.name)
+ .then(function() {
return deleteEnergyType(row.id);
}).then(() => {
this.queryParams.pageNo = 1;
diff --git a/src/views/energy/analysis/contrastAnalysis/index.vue b/src/views/energy/analysis/contrastAnalysis/index.vue
index f7efef08..259c3619 100644
--- a/src/views/energy/analysis/contrastAnalysis/index.vue
+++ b/src/views/energy/analysis/contrastAnalysis/index.vue
@@ -2,14 +2,17 @@
@@ -18,50 +21,96 @@
import { getCompare } from "@/api/analysis/energyAnalysis"
import SearchArea from "./components/searchArea"
import BarChart from "./components/barChart"
-import LineChart from "./components/lineChart"
+import tableHeightMixin from '@/mixins/tableHeightMixin';
+import FileSaver from 'file-saver';
+import * as XLSX from 'xlsx/xlsx.mjs';
// import moment from 'moment'
export default {
name: 'ContrastAnalysis',
- components: { SearchArea, BarChart, LineChart },
+ components: { SearchArea, BarChart },
+ mixins: [tableHeightMixin],
data() {
return {
isFold: false,
- activeName: 'bar',
- chartData: [],
- timeDim: ''
+ chartData: [],
+ timeDim: '',
+ tableProps: [],
+ list: [],
+ tableH: this.tableHeight(250) / 2,
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
- this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437)
+ this.isFold = this.searchBarWidth('contrastAnalysisBox', 1310)
// console.log(document.getElementById("contrastAnalysisBox").offsetWidth)
})
- this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437)
+ this.isFold = this.searchBarWidth('contrastAnalysisBox', 1310)
},
methods: {
+ _setTableHeight() {
+ this.tableH = this.tableHeight(250) / 2;
+ },
getList(params) {
this.timeDim = params.timeDim
getCompare({ ...params }).then((res) => {
- console.log(res)
- if (res.code === 0) {
- this.chartData = res.data || []
+ if (res.code === 0) {
+ this.getTableList(res.data || []);
+ this.chartData = res.data || [];
} else {
this.chartData = []
}
})
},
- switchChart() {
- if (this.activeName === 'bar') {
- this.$nextTick((res) => {
- this.$refs.analysisBarChart.getChart()
- })
- } else {
- this.$nextTick((res) => {
- this.$refs.analysisLineChart.getChart()
- })
- }
- }
+ getTableList(arr) {
+ this.tableProps = [];
+ this.list = [];
+ let tempX = [];
+ let timeArr = arr[0].trendRespVOList || [];
+ this.list = timeArr.map((item) => {
+ return { time: item.time };
+ });
+ for (let i = 0; i < arr.length; i++) {
+ let obj = {};
+ obj.prop = arr[i].objId;
+ obj.label = arr[i].objName;
+ obj.minWidth = 100;
+ tempX.push(obj);
+ let tiemList = arr[i].trendRespVOList;
+ for (let j = 0; j < tiemList.length; j++) {
+ this.list[j][arr[i].objId] = tiemList[j].useNum
+ ? tiemList[j].useNum.toFixed(2)
+ : null;
+ }
+ }
+ this.tableProps = [{ prop: 'time', label: '时间' }].concat(tempX);
+ },
+ // 导出
+ exportExl() {
+ if (this.list.length > 0) {
+ var wb = XLSX.utils.table_to_book(
+ document.querySelector('.contrast-out-table')
+ );
+ let fileName = '对比分析.xlsx';
+ var wbout = XLSX.write(wb, {
+ bookType: 'xlsx',
+ bookSST: true,
+ type: 'array',
+ });
+ try {
+ FileSaver.saveAs(
+ new Blob([wbout], { type: 'application/octet-stream' }),
+ fileName
+ );
+ this.$message.success('导出成功');
+ } catch (e) {
+ if (typeof console !== 'undefined') console.log(e, wbout);
+ }
+ return wbout;
+ } else {
+ this.$modal.msgWarning('暂无数据导出');
+ }
+ },
}
}
@@ -93,4 +142,4 @@ export default {
color: rgba(0, 0, 0, 0.45);
}
}
-
\ No newline at end of file
+
diff --git a/src/views/energy/analysis/index.vue b/src/views/energy/analysis/index.vue
new file mode 100644
index 00000000..a74f898c
--- /dev/null
+++ b/src/views/energy/analysis/index.vue
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+ 走势分析
+
+
+ 对比分析
+
+
+ 同比分析
+
+
+ 环比分析
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/energy/analysis/trendAnalysis/components/searchArea.vue b/src/views/energy/analysis/trendAnalysis/components/searchArea.vue
index b563296e..b639b608 100644
--- a/src/views/energy/analysis/trendAnalysis/components/searchArea.vue
+++ b/src/views/energy/analysis/trendAnalysis/components/searchArea.vue
@@ -1,456 +1,489 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
- 查询
-
- 重置
-
-
-
- {{ isExpand ? '收起' : '展开' }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+
+
+ 查询
+
+ 重置
+
+
+ 导出
+
+
+
+
+ {{ isExpand ? '收起' : '展开' }}
+
+
+
-
\ No newline at end of file
+
diff --git a/src/views/energy/analysis/trendAnalysis/index.vue b/src/views/energy/analysis/trendAnalysis/index.vue
index 20b5402c..91c06a6a 100644
--- a/src/views/energy/analysis/trendAnalysis/index.vue
+++ b/src/views/energy/analysis/trendAnalysis/index.vue
@@ -1,94 +1,104 @@
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
+
diff --git a/src/views/home/components/NavbarRight.vue b/src/views/home/components/NavbarRight.vue
index 9118446a..d9578af9 100644
--- a/src/views/home/components/NavbarRight.vue
+++ b/src/views/home/components/NavbarRight.vue
@@ -6,7 +6,7 @@
style="font-size: 24px; cursor: pointer"
@click="toHome" /> -->
@@ -46,16 +46,15 @@
import moment from 'moment';
import { getUser } from '@/api/system/user.js';
import { getPath } from '@/utils/ruoyi';
+import { getHomeGetAlarm } from '@/api/home';
export default {
name: 'navRight',
data() {
return {
- // topDate: '',
- // topTime: '',
- // timeZone: '',
timer: '',
dept: ' ',
nickname: this.$store.getters.nickname,
+ isAlarm: false,
};
},
props: {
@@ -68,21 +67,18 @@ export default {
},
created() {
this.getUserMsg();
- // this.getTime();
+ this.getHomeGetAlarm();
+ this.timer = setInterval(this.getHomeGetAlarm(), 3600000);
+ },
+ beforeDestroy() {
+ clearInterval(this.timer);
},
- // beforeDestroy() {
- // clearInterval(this.timer);
- // },
methods: {
- // getTime() {
- // let _this = this;
- // this.timer = setInterval(function () {
- // _this.topDate = moment().format('YYYY/MM/DD');
- // let temp = moment().format('A-hh:mm').split('-');
- // _this.timeZone = temp[0];
- // _this.topTime = temp[1];
- // }, 1000);
- // },
+ getHomeGetAlarm() {
+ getHomeGetAlarm().then((response) => {
+ this.isAlarm = response.data || false;
+ });
+ },
getUserMsg() {
let id = this.$store.getters.userId;
getUser(id).then((res) => {
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index af987e32..ec1d4937 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -3,50 +3,47 @@
-
-
-
-
-
-
-
-
(6.13-6.20)
-
-
- {{ topTime + timeZone }}
-
- {{ topDate }}
-
-
生产总览
+
+
+
+
+
+
+
+
+
( {{ showTime }} )
- 9,301.01
+ {{ homeProduce.quantity }}
产量/千片
- 94.34
+ {{ homeProduce.yieldRate }}
良品率/%
- 29,301.01
+ {{ homeProduce.endWorkOrderQuantity }}
完成工单数量/千片
- 1,340
+ {{ homeProduce.endOrderQuantity }}
完成订单数量/个
@@ -55,22 +52,29 @@
设备总览
+
- 2,931
+ {{ homeDevice.allEquipment }}
设备总数/台
- 931
+ {{ homeDevice.onlineEquipment }}
在线设备总数/台
- 7
+ {{ homeDevice.errorEquipment }}
故障设备总数/台
- 0
+ {{ homeDevice.stopEquipment }}
停机设备总数/台
@@ -81,6 +85,7 @@
class="item"
:class="{ shadow: index !== middleMenu.length - 1 }"
v-for="(item, index) in middleMenu"
+ @click="goPage(item)"
:key="index">
@@ -105,14 +110,14 @@
- {{ item.name }}
- {{ item.value }}%
+ {{ item.orderName }}
+ {{ item.completeRate * 100 }}%
@@ -130,7 +135,7 @@
:page="1"
:limit="100000"
:table-props="tableProps"
- :table-data="list"
+ :table-data="homeDevice.list"
:max-height="tableH" />
@@ -155,6 +160,13 @@
import Navbar from './components/Navbar';
import moment from 'moment';
import tableHeightMixin from '@/mixins/tableHeightMixin';
+import {
+ getHomeOrder,
+ getHomeOrderNum,
+ getHomeEquipment,
+ getHomeEquipmentAlarmList,
+} from '@/api/home';
+
export default {
name: 'Home',
mixins: [tableHeightMixin],
@@ -175,69 +187,107 @@ export default {
topTime: '',
timeZone: '',
middleMenu: [
- { name: '工单管理', url: '', icon: 'home-work-menu' },
- { name: '订单管理', url: '', icon: 'home-order-menu' },
- { name: '设备管理', url: '', icon: 'home-device-menu' },
- { name: '质量管理', url: '', icon: 'home-quality-menu' },
- { name: '仓库管理', url: '', icon: 'home-store-menu' },
- ],
- orderList: [
- { name: '工单1', value: 50 },
- { name: '工单2', value: 60 },
- { name: '工单3', value: 30 },
- { name: '工单4', value: 60 },
- { name: '工单5', value: 10 },
- { name: '工单6', value: 60 },
- { name: '工单7', value: 40 },
- { name: '工单8', value: 70 },
- { name: '工单9', value: 90 },
+ { name: '生产管理', url: 'productLine24h', icon: 'home-work-menu' },
+ {
+ name: '能源管理',
+ url: 'EnergyQuantityRealtime',
+ icon: 'home-order-menu',
+ },
+ { name: '设备管理', url: 'PlanConfig', icon: 'home-device-menu' },
+ { name: '质量管理', url: 'qualityScrapLog', icon: 'home-quality-menu' },
+ { name: '仓库管理', url: 'warehouse-info', icon: 'home-store-menu' },
],
heightNum: 640,
tableProps: [
{
- prop: 'productionLineName',
+ prop: 'equipmentName',
label: '设备名称',
showOverflowtooltip: true,
},
{
- prop: 'sectionName',
+ prop: 'alarmContent',
label: '告警内容',
showOverflowtooltip: true,
},
{
- prop: 'createTime',
+ prop: 'updateTime',
label: '告警时间',
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
],
- list: [
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- { productionLineName: 1 },
- ],
+ homeProduce: {
+ quantity: undefined,
+ yieldRate: undefined,
+ endWorkOrderQuantity: undefined,
+ endOrderQuantity: undefined,
+ orderList: [],
+ },
+ homeDevice: {
+ allEquipment: undefined,
+ onlineEquipment: undefined,
+ errorEquipment: undefined,
+ stopEquipment: undefined,
+ list: [],
+ },
+ times: [],
+ showTime: '',
};
},
created() {
this.getTime();
+ this.handleClick();
+ this.getHomeEquipment();
+ this.showTime = moment(new Date()).subtract(0, 'days').format('YYYY-MM-DD');
},
beforeDestroy() {
clearInterval(this.timer);
},
methods: {
+ handleClick() {
+ let start =
+ Date.parse(new Date())
+ let end =
+ Date.parse(new Date())
+ switch (this.activeName) {
+ case '日':
+ this.showTime = moment(new Date())
+ .subtract(0, 'days')
+ .format('YYYY-MM-DD');
+ this.times = [start, end];
+ break;
+ case '周':
+ start =
+ moment(new Date()).subtract(6, 'days').format('x')
+ this.showTime =
+ moment(new Date()).subtract(6, 'days').format('MM-DD') +
+ ' ~ ' +
+ moment(new Date()).subtract(0, 'days').format('MM-DD');
+ this.times = [start, end];
+ break;
+ case '月':
+ start =
+ moment(new Date()).subtract(1, 'month').format('x')
+ this.showTime =
+ moment(new Date()).subtract(1, 'month').format('MM-DD') +
+ ' ~ ' +
+ moment(new Date()).subtract(0, 'days').format('MM-DD');
+ this.times = [start, end];
+ break;
+ case '年':
+ start =
+ moment(new Date()).subtract(1, 'year').format('x')
+ this.showTime =
+ moment(new Date()).subtract(1, 'year').format('YYYY') +
+ ' ~ ' +
+ moment(new Date()).subtract(0, 'days').format('YYYY');
+ this.times = [start, end];
+ break;
+ default:
+ console.log(val);
+ }
+ this.getHomeOrder();
+ },
getTime() {
let _this = this;
this.timer = setInterval(function () {
@@ -247,6 +297,59 @@ export default {
_this.topTime = temp[1];
}, 1000);
},
+ getHomeOrder() {
+ getHomeOrder(this.times).then((response) => {
+ if (response.hasOwnProperty('data')) {
+ this.homeProduce.quantity = response.data.quantity;
+ this.homeProduce.yieldRate = response.data.yieldRate * 100;
+ this.homeProduce.endWorkOrderQuantity =
+ response.data.endWorkOrderQuantity;
+ this.homeProduce.orderList = response.data.orderMonitorVO;
+ } else {
+ this.homeProduce = {
+ quantity: undefined,
+ yieldRate: undefined,
+ endWorkOrderQuantity: undefined,
+ endOrderQuantity: undefined,
+ orderList: [],
+ };
+ }
+ });
+ getHomeOrderNum(this.times).then((response) => {
+ if (response.hasOwnProperty('data')) {
+ this.homeProduce.endOrderQuantity = response.data.endOrderQuantity;
+ } else {
+ this.homeProduce.endOrderQuantity = '-';
+ }
+ });
+ },
+ getHomeEquipment() {
+ getHomeEquipment().then((response) => {
+ if (response.hasOwnProperty('data')) {
+ this.homeDevice.allEquipment = response.data.allEquipment;
+ this.homeDevice.onlineEquipment = response.data.onlineEquipment;
+ this.homeDevice.errorEquipment = response.data.errorEquipment;
+ this.homeDevice.stopEquipment = response.data.stopEquipment;
+ } else {
+ this.homeDevice = {
+ allEquipment: undefined,
+ onlineEquipment: undefined,
+ errorEquipment: undefined,
+ stopEquipment: undefined,
+ };
+ }
+ });
+ getHomeEquipmentAlarmList().then((response) => {
+ if (response.hasOwnProperty('data')) {
+ this.homeDevice.list = response.data;
+ } else {
+ this.homeDevice.list = [];
+ }
+ });
+ },
+ goPage(val) {
+ this.$router.push({ name: val.url });
+ },
},
};
@@ -260,56 +363,14 @@ export default {
height: 300px;
width: 100%;
}
-.date-tabs {
- padding-left: 40px;
- padding-top: 20px;
- position: relative;
-}
-:deep(.date-tabs) {
- .el-tabs__header {
- margin-bottom: 8px;
- display: inline-block;
- transform: translateY(-12px);
- }
-
- .el-tabs__content {
- overflow: visible;
- }
-
- .el-tabs__item {
- font-size: 18px;
- color: #fff;
- padding-left: 0 !important;
- padding-right: 0 !important;
- line-height: 36px !important;
- height: 36px;
- }
- .el-tabs__item.is-active {
- color: #0b58ff;
- }
-}
-.current-date {
- color: #fff;
- font-size: 18px;
- position: absolute;
- left: 260px;
- top: 14px;
-}
-.current-time {
- color: #fff;
- font-size: 18px;
- position: absolute;
- right: 38px;
- top: 14px;
-}
.main-top {
width: 100%;
- padding: 0 20px 0 40px;
+ padding: 10px 20px 0 40px;
.title {
position: absolute;
left: 34px;
top: 20px;
- width: 180px;
+ width: 90%;
font-size: 32px;
z-index: 10;
.title-inner {
@@ -318,12 +379,53 @@ export default {
top: 5px;
font-size: 24px;
}
+ .date-tabs {
+ position: absolute;
+ right: 100px;
+ top: 5px;
+ font-size: 18px;
+ }
+ :deep(.date-tabs) {
+ .el-tabs__header {
+ margin-bottom: 8px;
+ display: inline-block;
+ }
+
+ .el-tabs__content {
+ overflow: visible;
+ }
+
+ .el-tabs__item {
+ font-size: 18px;
+ padding-left: 0 !important;
+ padding-right: 0 !important;
+ line-height: 20px !important;
+ height: 24px;
+ }
+ .el-tabs__item.is-active {
+ color: #0b58ff;
+ }
+ }
+ .current-date {
+ font-size: 10px;
+ font-weight: 500;
+ position: absolute;
+ right: 0px;
+ top: 5px;
+ }
+ // .current-time {
+ // width: 160px;
+ // font-size: 18px;
+ // position: absolute;
+ // right: -20px;
+ // top: 5px;
+ // }
}
.box {
background-color: #fff;
border-radius: 24px;
- height: 192px;
- padding: 40px 24px 32px 24px;
+ height: 232px;
+ padding: 60px 24px 32px 24px;
.num-box {
height: 120px;
padding-top: 26px;
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 84b0d837..e98c1fcb 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -1,66 +1,17 @@
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
- 重置
-
-
-
-
-
-
- 新增
-
-
-
-
- 展开/折叠
-
-
-
-
+
-
-
+
+
+
+
+ {{ title }}
+
+
+
@@ -197,8 +154,8 @@
@@ -276,6 +233,40 @@ export default {
],
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
},
+ formConfig: [
+ {
+ type: 'input',
+ label: '部门名称',
+ placeholder: '部门名称',
+ param: 'name',
+ },
+ {
+ type: 'select',
+ label: '状态',
+ selectOptions: getDictDatas(DICT_TYPE.COMMON_STATUS),
+ param: 'status',
+ defaultSelect: '',
+ valueField: 'value',
+ labelField: 'label',
+ filterable: true,
+ },
+ {
+ type: 'button',
+ btnName: '查询',
+ name: 'search',
+ color: 'primary',
+ },
+ {
+ type: this.$auth.hasPermi('system:dept:create') ? 'separate' : '',
+ },
+ {
+ type: this.$auth.hasPermi('system:dept:create') ? 'button' : '',
+ btnName: '新增',
+ name: 'add',
+ color: 'success',
+ plain: true,
+ },
+ ],
// 枚举
CommonStatusEnum: CommonStatusEnum,
@@ -291,6 +282,15 @@ export default {
});
},
methods: {
+ buttonClick(val) {
+ if (val.btnName === 'search') {
+ this.queryParams.name = val.name;
+ this.queryParams.status = val.status;
+ this.getList();
+ } else {
+ this.handleAdd();
+ }
+ },
/** 查询部门列表 */
getList() {
this.loading = true;
@@ -422,3 +422,36 @@ export default {
},
};
+
+
diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue
index fc4041d0..e789bd12 100644
--- a/src/views/system/dict/data.vue
+++ b/src/views/system/dict/data.vue
@@ -1,38 +1,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
+
-
-
- 新增
-
-
- 导出
-
-
-
-
-
+
@@ -64,7 +44,13 @@
@pagination="getList"/>
-
+
+
+
+ {{ title }}
+
+
+
@@ -96,8 +82,8 @@
@@ -130,8 +116,6 @@ export default {
title: "",
// 是否显示弹出层
open: false,
- // 类型数据字典
- typeOptions: [],
// 查询参数
queryParams: {
pageNo: 1,
@@ -176,6 +160,60 @@ export default {
}
],
+ formConfig: [
+ {
+ type: 'select',
+ label: '字典名称',
+ selectOptions: [],
+ param: 'dictType',
+ defaultSelect: '',
+ valueField: 'type',
+ labelField: 'name',
+ filterable: true,
+ },
+ {
+ type: 'input',
+ label: '字典标签',
+ placeholder: '字典标签',
+ param: 'label',
+ },
+ {
+ type: 'select',
+ label: '状态',
+ selectOptions: getDictDatas(DICT_TYPE.COMMON_STATUS),
+ param: 'status',
+ defaultSelect: '',
+ valueField: 'value',
+ labelField: 'label',
+ filterable: true,
+ },
+ {
+ type: 'button',
+ btnName: '查询',
+ name: 'search',
+ color: 'primary',
+ },
+ {
+ type: this.$auth.hasPermi('system:dict:create') ? 'separate' : '',
+ },
+ {
+ type: this.$auth.hasPermi('system:dict:create') ? 'button' : '',
+ btnName: '新增',
+ name: 'add',
+ color: 'success',
+ plain: true,
+ },
+ {
+ type: this.$auth.hasPermi('system:dict:export') ? 'separate' : '',
+ },
+ {
+ type: this.$auth.hasPermi('system:dict:export') ? 'button' : '',
+ btnName: '导出',
+ name: 'export',
+ color: 'primary',
+ plain: true,
+ },
+ ],
// 枚举
CommonStatusEnum: CommonStatusEnum,
// 数据字典
@@ -188,6 +226,19 @@ export default {
this.getTypeList();
},
methods: {
+ buttonClick(val) {
+ if (val.btnName === 'search') {
+ this.queryParams.dictType = val.dictType;
+ this.queryParams.label = val.label;
+ this.queryParams.status = val.status;
+ this.getList();
+ } else if (val.btnName === 'export'){
+ this.handleExport()
+ }
+ else {
+ this.handleAdd();
+ }
+ },
/** 查询字典类型详细 */
getType(dictId) {
getType(dictId).then(response => {
@@ -199,7 +250,7 @@ export default {
/** 查询字典类型列表 */
getTypeList() {
listAllSimple().then(response => {
- this.typeOptions = response.data;
+ this.formConfig[0].selectOptions = response.data;
});
},
/** 查询字典数据列表 */
@@ -281,7 +332,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id;
- this.$modal.confirm('是否确认删除字典编码为"' + ids + '"的数据项?').then(function() {
+ this.$modal
+ .delConfirm(row.label).then(function() {
return delData(ids);
}).then(() => {
this.getList();
@@ -302,3 +354,36 @@ export default {
}
};
+
+
diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index d3e5ec8e..675e3418 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -1,40 +1,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
+
-
-
- 新增
-
-
- 导出
-
-
-
-
-
+
@@ -69,7 +47,13 @@
@pagination="getList"/>
-
+
+
+
+ {{ title }}
+
+
+
@@ -87,8 +71,8 @@
@@ -139,6 +123,70 @@ export default {
]
},
+ formConfig: [
+ {
+ type: 'input',
+ label: '字典名称',
+ placeholder: '字典名称',
+ param: 'name',
+ },
+ {
+ type: 'input',
+ label: '字典类型',
+ placeholder: '字典类型',
+ param: 'type',
+ },
+ {
+ type: 'select',
+ label: '状态',
+ selectOptions: getDictDatas(DICT_TYPE.COMMON_STATUS),
+ param: 'status',
+ defaultSelect: '',
+ valueField: 'value',
+ labelField: 'label',
+ filterable: true,
+ },
+ {
+ type: 'datePicker',
+ label: '创建时间',
+ dateType: 'daterange',
+ format: 'yyyy-MM-dd',
+ valueFormat: 'yyyy-MM-dd HH:mm:ss',
+ rangeSeparator: '-',
+ startPlaceholder: '开始日期',
+ endPlaceholder: '结束日期',
+ param: 'createTime',
+ defaultSelect: [],
+ defaultTime: ['00:00:00', '23:59:59'],
+ width: 250,
+ },
+ {
+ type: 'button',
+ btnName: '查询',
+ name: 'search',
+ color: 'primary',
+ },
+ {
+ type: this.$auth.hasPermi('system:dict:create') ? 'separate' : '',
+ },
+ {
+ type: this.$auth.hasPermi('system:dict:create') ? 'button' : '',
+ btnName: '新增',
+ name: 'add',
+ color: 'success',
+ plain: true,
+ },
+ {
+ type: this.$auth.hasPermi('system:dict:export') ? 'separate' : '',
+ },
+ {
+ type: this.$auth.hasPermi('system:dict:export') ? 'button' : '',
+ btnName: '导出',
+ name: 'export',
+ color: 'primary',
+ plain: true,
+ },
+ ],
// 枚举
CommonStatusEnum: CommonStatusEnum,
// 数据字典
@@ -149,6 +197,20 @@ export default {
this.getList();
},
methods: {
+ buttonClick(val) {
+ if (val.btnName === 'search') {
+ this.queryParams.name = val.name;
+ this.queryParams.type = val.type;
+ this.queryParams.createTime = val.createTime;
+ this.queryParams.status = val.status;
+ this.getList();
+ } else if (val.btnName === 'export'){
+ this.handleExport()
+ }
+ else {
+ this.handleAdd();
+ }
+ },
/** 查询字典类型列表 */
getList() {
this.loading = true;
@@ -224,7 +286,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
- this.$modal.confirm('是否确认删除字典编号为"' + ids + '"的数据项?').then(function() {
+ this.$modal
+ .delConfirm(row.name).then(function() {
return delType(ids);
}).then(() => {
this.getList();
@@ -249,3 +312,36 @@ export default {
}
};
+
+
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index efb4df49..bc77ec1e 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -1,406 +1,572 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
+
+
-
-
- 新增
-
-
- 展开/折叠
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+ 新增
+
+
+ 删除
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 修改
- 新增
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{dict.label}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 路由地址
-
-
-
-
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 路由地址
+
+
+
+
-
-
-
-
- 权限字符
-
-
+
+
+
+
+ 权限字符
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 菜单状态
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+ 是否显示
+
+
+ 显示
+ 隐藏
+
+
+
+
+
+
+
+
+
+ 总是显示
+
+
+ 总是
+ 不是
+
-
-
-
-
-
-
- 菜单状态
-
-
- {{dict.label}}
-
-
-
-
-
-
-
-
-
- 是否显示
-
-
- 显示
- 隐藏
-
-
-
-
-
-
-
-
-
- 总是显示
-
-
- 总是
- 不是
-
-
-
-
-
-
-
- 是否缓存
-
+
+
+
+
+ 是否缓存
+
缓存
不缓存
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue
index 628cee7b..4ef78131 100644
--- a/src/views/system/post/index.vue
+++ b/src/views/system/post/index.vue
@@ -1,36 +1,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
+
-
-
- 新增
-
-
- 导出
-
-
-
-
-
+
@@ -59,7 +41,13 @@
@pagination="getList"/>
-
+
+
+
+ {{ title }}
+
+
+
@@ -81,8 +69,8 @@
@@ -135,6 +123,56 @@ export default {
]
},
+ formConfig: [
+ {
+ type: 'input',
+ label: '岗位编码',
+ placeholder: '岗位编码',
+ param: 'code',
+ },
+ {
+ type: 'input',
+ label: '岗位名称',
+ placeholder: '岗位名称',
+ param: 'name',
+ },
+ {
+ type: 'select',
+ label: '状态',
+ selectOptions: getDictDatas(DICT_TYPE.COMMON_STATUS),
+ param: 'status',
+ defaultSelect: '',
+ valueField: 'value',
+ labelField: 'label',
+ filterable: true,
+ },
+ {
+ type: 'button',
+ btnName: '查询',
+ name: 'search',
+ color: 'primary',
+ },
+ {
+ type: this.$auth.hasPermi('system:post:create') ? 'separate' : '',
+ },
+ {
+ type: this.$auth.hasPermi('system:post:create') ? 'button' : '',
+ btnName: '新增',
+ name: 'add',
+ color: 'success',
+ plain: true,
+ },
+ {
+ type: this.$auth.hasPermi('system:post:export') ? 'separate' : '',
+ },
+ {
+ type: this.$auth.hasPermi('system:post:export') ? 'button' : '',
+ btnName: '导出',
+ name: 'export',
+ color: 'primary',
+ plain: true,
+ },
+ ],
// 枚举
CommonStatusEnum: CommonStatusEnum,
// 数据字典
@@ -145,6 +183,19 @@ export default {
this.getList();
},
methods: {
+ buttonClick(val) {
+ if (val.btnName === 'search') {
+ this.queryParams.name = val.name;
+ this.queryParams.code = val.code;
+ this.queryParams.status = val.status;
+ this.getList();
+ } else if (val.btnName === 'export'){
+ this.handleExport()
+ }
+ else {
+ this.handleAdd();
+ }
+ },
/** 查询岗位列表 */
getList() {
this.loading = true;
@@ -220,7 +271,8 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id;
- this.$modal.confirm('是否确认删除岗位编号为"' + ids + '"的数据项?').then(function() {
+ this.$modal
+ .delConfirm(row.name).then(function() {
return delPost(ids);
}).then(() => {
this.getList();
@@ -241,3 +293,36 @@ export default {
}
};
+
+
diff --git a/src/views/warehouse/warehouse-info/BarChart.vue b/src/views/warehouse/warehouse-info/BarChart.vue
index 6466b781..aa58e505 100644
--- a/src/views/warehouse/warehouse-info/BarChart.vue
+++ b/src/views/warehouse/warehouse-info/BarChart.vue
@@ -144,21 +144,24 @@ export default {
this.chart.getZr().off('click');
this.chart.getZr().on('click', function () {
if (_this.targetId !== '') {
- switch (_this.targetId) {
- case 1:
- _this.$router.push({
- path: 'warehouse-manage1/InventoryOverview/' + _this.targetId,
- });
- break;
- case '1818175999715164161':
- _this.$router.push({
- path: 'warehouse-manage2/InventoryOverview/' + _this.targetId,
- });
- break;
- default:
- console.log(_this.targetId);
- break;
- }
+ _this.$router.push({
+ path: `warehouse-manage${_this.targetId}/InventoryOverview/` + _this.targetId,
+ });
+ // switch (_this.targetId) {
+ // case 1:
+ // _this.$router.push({
+ // path: 'warehouse-manage1/InventoryOverview/' + _this.targetId,
+ // });
+ // break;
+ // case '1818175999715164161':
+ // _this.$router.push({
+ // path: 'warehouse-manage2/InventoryOverview/' + _this.targetId,
+ // });
+ // break;
+ // default:
+ // console.log(_this.targetId);
+ // break;
+ // }
}
});
},
diff --git a/src/views/warehouse/warehouse-info/index.vue b/src/views/warehouse/warehouse-info/index.vue
index a9a50373..3f1c1496 100644
--- a/src/views/warehouse/warehouse-info/index.vue
+++ b/src/views/warehouse/warehouse-info/index.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2024-07-02 15:56:48
* @LastEditors: zwq
- * @LastEditTime: 2024-08-02 14:57:52
+ * @LastEditTime: 2024-09-23 09:15:30
* @Description:
-->
@@ -59,21 +59,24 @@ export default {
},
methods: {
toPage(i) {
- switch (i.id) {
- case 1:
- this.$router.push({
- path: 'warehouse-manage1/InventoryOverview/' + i.id,
+ this.$router.push({
+ path: `warehouse-manage${i.id}/InventoryOverview/` + i.id,
});
- break;
- case '1818175999715164161':
- this.$router.push({
- path: 'warehouse-manage2/InventoryOverview/' + i.id,
- });
- break;
- default:
- console.log(i.id);
- break;
- }
+ // switch (i.id) {
+ // case 1:
+ // this.$router.push({
+ // path: 'warehouse-manage1/InventoryOverview/' + i.id,
+ // });
+ // break;
+ // case '1818175999715164161':
+ // this.$router.push({
+ // path: 'warehouse-manage2/InventoryOverview/' + i.id,
+ // });
+ // break;
+ // default:
+ // console.log(i.id);
+ // break;
+ // }
},
},
};