-
+
@@ -15,7 +15,7 @@
import * as echarts from 'echarts';
import 'echarts/theme/macarons' // echarts theme
import resize from './mixins/resize'
-
+// import resize from './../mixins/resize'
export default {
name: 'OverviewBar',
mixins: [resize],
@@ -67,12 +67,18 @@ export default {
}]
}
},
+ // mounted() {
+ // console.log('mounted')
+ // console.log('borderRadius: ', this.borderRadius)
+ // // this.$nextTick(() => {
+ // // this.initChart()
+ // // })
+ // },
mounted() {
- console.log('mounted')
- console.log('borderRadius: ', this.borderRadius)
- // this.$nextTick(() => {
- // this.initChart()
- // })
+ this.$el.addEventListener('resize', () => {
+ console.log('resziing.....');
+ });
+ this.initChart()
},
beforeDestroy() {
if (!this.chart) {
@@ -135,7 +141,8 @@ export default {
}
}
},
- data: passRateList
+ // data: passRateList
+ data: []
}
]
// const colors = ['#5470C6', '#91CC75', '#EE6666']
@@ -148,15 +155,11 @@ export default {
type: 'cross'
}
},
- grid: {
- left: "6%",
- right: "6%",
- bottom: "3%",
- containLabel: true
- },
+ grid: { top: 90, right: 60, bottom: 20, left: 90 },
legend: {
itemWidth: 10,
itemHeight: 10,
+ top: '0%',
right: '20px',
data: ['产线产量', '产线良品率'],
textStyle: {
@@ -174,9 +177,12 @@ export default {
}
},
axisLabel: {
- textStyle: {
- color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
- }
+ color: "#fff",
+ fontSize: 12,
+ // formatter: '{value}'
+ // textStyle: {
+ // color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
+ // }
},
splitLine: {
lineStyle: {
@@ -214,10 +220,11 @@ export default {
}
},
axisLabel: {
- textStyle: {
- color: '#ced1d5', // 坐标值得具体的颜色
- formatter: '{value}%'
- }
+ color: "#fff",
+ fontSize: 12,
+ // formatter: '{value}'
+ formatter: '{value}%'
+ // }
},
splitLine: {
lineStyle: {
@@ -241,7 +248,7 @@ export default {
// },
scale: true,
type: 'value',
- name: '产量/㎡', // y轴上方的单位
+ name: '产量/片', // y轴上方的单位
nameTextStyle: {
color: "#fff",
// fontSize: 10,
@@ -258,10 +265,13 @@ export default {
}
},
axisLabel: {
- textStyle: {
- color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
- formatter: '{value} 片'
- }
+ // textStyle: {
+ // color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
+ color: "#fff",
+ fontSize: 12,
+ // formatter: '{value}'
+ formatter: '{value} 片'
+ // }
},
splitLine: {
lineStyle: {
@@ -285,6 +295,9 @@ export default {
diff --git a/src/views/OperationalOverview/components/linearBarChart.vue b/src/views/OperationalOverview/components/linearBarChart.vue
index 2fbd7e51..eae6faf0 100644
--- a/src/views/OperationalOverview/components/linearBarChart.vue
+++ b/src/views/OperationalOverview/components/linearBarChart.vue
@@ -150,9 +150,9 @@ export default {
}
},
axisLabel: {
- textStyle: {
- color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
- }
+ color: "#fff",
+ fontSize: 12,
+ // formatter: '{value}'
},
splitLine: {
lineStyle: {
@@ -162,25 +162,29 @@ export default {
data: this.nameList
},
yAxis: {
- axisLine: {
- lineStyle: {
- type: 'solid',
- color: '#213259', // 左边线的颜色
- width: '1' // 坐标线的宽度
- }
+ name: '单位kwh',
+ nameTextStyle: {
+ color: '#fff',
+ fontSize: 10,
+ align: 'right',
},
+ type: 'value',
axisLabel: {
- show: true, // 是否显示 y 轴
- textStyle: {
- color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
- }
+ color: "#fff",
+ fontSize: 12,
+ formatter: '{value}/kwh'
+ },
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: "#213259",
+ },
},
splitLine: {
lineStyle: {
- color: '#213259'
- }
- },
- type: 'value'
+ color: "#213259a0",
+ },
+ }
},
// legend: {
// itemHeight: 10,
diff --git a/src/views/OperationalOverview/components/pileBarChart.vue b/src/views/OperationalOverview/components/pileBarChart.vue
index ac9656b6..9d2a06d9 100644
--- a/src/views/OperationalOverview/components/pileBarChart.vue
+++ b/src/views/OperationalOverview/components/pileBarChart.vue
@@ -1,7 +1,7 @@
@@ -91,43 +91,78 @@ export default {
},
methods: {
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
+ let rawData = []
+ rawData.push(passRateList,wasteList)
// console.log(1)
- this.chart = echarts.init(document.getElementById(this.id))
- let series = [
- {
- // 辅助系列
- name: '良品',
- type: 'bar',
- stack: 'total',
- // silent: true,
- // itemStyle: {
- color: '#0fdedb',
- // },
- // barCategoryGap: '10%',
- barWidth: 10,
- data: passRateList
- },
- {
- type: 'bar',
- stack: 'total',
- name: '废品',
- // barCategoryGap: '10%',
- data: wasteList,
- // barWidth: 10,
- // barWidth: 15,
- // label: {
- // position: [10, 10],
- // normal: {
- // position: [800, -24],
- // show: true,
- // textStyle: {
- // color: '#2359ec',
- // fontSize: 16,
- // },
- // },
- // },
+ const totalData = [];
+ for (let i = 0; i < rawData[0].length; ++i) {
+ let sum = 0;
+ for (let j = 0; j < rawData.length; ++j) {
+ sum += rawData[j][i];
}
- ]
+ totalData.push(sum);
+ }
+ let colors = ['#0fdedb', '#2359ec' ]
+ console.log('total', totalData);
+ this.chart = echarts.init(document.getElementById(this.id))
+ const series = [
+ '良品',
+ '废品',
+ // 'Affiliate Ad',
+ // 'Video Ad',
+ // 'Search Engine'
+ ].map((name, sid) => {
+ // console.log(sid)
+ return {
+ name,
+ type: 'bar',
+ stack: 'total',
+ barWidth: 10,
+ label: {
+ show: true,
+ formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
+ },
+ color:colors[sid],
+ data: rawData[sid].map((d, did) =>
+ totalData[did] <= 0 ? 0 : d / totalData[did]
+ )
+ };
+ });
+ // let series = [
+ // {
+ // // 辅助系列
+ // name: '良品',
+ // type: 'bar',
+ // stack: 'total',
+ // // silent: true,
+ // // itemStyle: {
+ // color: '#0fdedb',
+ // // },
+ // // barCategoryGap: '10%',
+ // barWidth: 10,
+ // data: passRateList
+ // },
+ // {
+ // type: 'bar',
+ // stack: 'total',
+ // name: '废品',
+ // // barCategoryGap: '10%',
+ // data: wasteList,
+ // // barWidth: 10,
+ // // barWidth: 15,
+ // // label: {
+ // // position: [10, 10],
+ // // normal: {
+ // // position: [800, -24],
+ // // show: true,
+ // // textStyle: {
+ // // color: '#2359ec',
+ // // fontSize: 16,
+ // // },
+ // // },
+ // // },
+ // }
+ // ]
// for (i = 0; i < 5; i++) {
// series.push({
@@ -137,6 +172,7 @@ export default {
legend: {
// top: '2.5%',
// right: '20px',
+ icon: 'rect',
textStyle: {
color: '#ffffff'
}
diff --git a/src/views/OperationalOverview/components/resize.js b/src/views/OperationalOverview/components/resize.js
new file mode 100644
index 00000000..e97d2039
--- /dev/null
+++ b/src/views/OperationalOverview/components/resize.js
@@ -0,0 +1,62 @@
+/*
+ * @Author: zhp
+ * @Date: 2024-02-01 15:39:22
+ * @LastEditTime: 2024-02-01 15:39:23
+ * @LastEditors: zhp
+ * @Description:
+ */
+import { debounce } from '@/utils'
+
+export default {
+ data() {
+ return {
+ $_sidebarElm: null,
+ $_resizeHandler: null
+ }
+ },
+ mounted() {
+ this.$_resizeHandler = debounce(() => {
+ if (this.chart) {
+ this.chart.resize()
+ }
+ }, 100)
+ this.$_initResizeEvent()
+ this.$_initSidebarResizeEvent()
+ },
+ beforeDestroy() {
+ this.$_destroyResizeEvent()
+ this.$_destroySidebarResizeEvent()
+ },
+ // to fixed bug when cached by keep-alive
+ // https://github.com/PanJiaChen/vue-element-admin/issues/2116
+ activated() {
+ this.$_initResizeEvent()
+ this.$_initSidebarResizeEvent()
+ },
+ deactivated() {
+ this.$_destroyResizeEvent()
+ this.$_destroySidebarResizeEvent()
+ },
+ methods: {
+ // use $_ for mixins properties
+ // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
+ $_initResizeEvent() {
+ window.addEventListener('resize', this.$_resizeHandler)
+ },
+ $_destroyResizeEvent() {
+ window.removeEventListener('resize', this.$_resizeHandler)
+ },
+ $_sidebarResizeHandler(e) {
+ if (e.propertyName === 'width') {
+ this.$_resizeHandler()
+ }
+ },
+ $_initSidebarResizeEvent() {
+ this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
+ this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
+ },
+ $_destroySidebarResizeEvent() {
+ this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
+ }
+ }
+}
diff --git a/src/views/OperationalOverview/processingBoard.vue b/src/views/OperationalOverview/processingBoard.vue
index 2992e2f8..2f4d997a 100644
--- a/src/views/OperationalOverview/processingBoard.vue
+++ b/src/views/OperationalOverview/processingBoard.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
- * @LastEditTime: 2024-01-29 16:17:04
+ * @LastEditTime: 2024-02-01 15:35:29
* @Description:
-->
@@ -103,13 +103,13 @@
-
-
+
@@ -610,12 +610,28 @@ export default {
// this.fetchList('order-process')
// this.fetchList('line-chart-data')
this.init()
+ setTimeout(() => {
+ window.location.reload()
+ }, 86400000)
},
destroyed () {
this.websocketClose()
this.SJGWebsocketClose()
},
mounted() {
+ let eqArr = this.qualityYearList.map((item, index) => [
+ `${index + 1 || ''}
+ `,
+ // formatDate(item.planStartTime) || '',
+ `
+ ${item.name || ''}
+ `,
+ `${item.code || ''}`,
+ `${item.status || ''}`,
+ `${item.error || ''}`,
+ ])
+ this.eqConfig.data = eqArr
+ this.$refs['eqScrollBoard'].updateRows(eqArr)
this.getList()
this.initWebSocket()
this.SJGInitWebSocket()
@@ -669,23 +685,22 @@ export default {
'get',
).then((res) => {
// console.log('11111', res);
- if (res.data.length !==0) {
- let processArr = res.data.map((item, index) => [
- // console.log(item)
- `${index + 1 || ''}
+ let processArr = qualityMonthList.map((item, index) => [
+ // console.log(item)
+ `${index + 1 || ''}
`,
- // formatDate(item.planStartTime) || '',
- `
+ // formatDate(item.planStartTime) || '',
+ `
${item.productionLineName || ''}
`,
- `${item.sectionName || ''}`,
- `${item.count || ''}`,
- `${item.inspectionTypeName || ''}`,
- ])
- this.processConfig.data = processArr
- this.$refs['processScrollBoard'].updateRows(processArr)
- } else {
- let processArr = qualityMonthList.map((item, index) => [
+ `${item.sectionName || ''}`,
+ `${item.count || ''}`,
+ `${item.inspectionTypeName || ''}`,
+ ])
+ this.processConfig.data = processArr
+ this.$refs['processScrollBoard'].updateRows(processArr)
+ if (res.data.length !==0) {
+ let processArr = res.data.map((item, index) => [
// console.log(item)
`${index + 1 || ''}
`,
@@ -850,22 +865,6 @@ export default {
// console.log(this.EnergyMonitoringList)
// this.$nextTick(() => {
this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
- } else {
- console.log(this.qualityYearList);
-
- let eqArr = this.qualityYearList.map((item,index) => [
- `${index + 1 || ''}
- `,
- // formatDate(item.planStartTime) || '',
- `
- ${item.name || ''}
- `,
- `${item.code || ''}`,
- `${item.status || ''}`,
- `${item.error || ''}`,
- ])
- this.eqConfig.data = eqArr
- this.$refs['eqScrollBoard'].updateRows(eqArr)
}
},
// 数据发送
@@ -994,6 +993,7 @@ export default {
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
background-size: 100% 100%;
color: #00fff0;
+ word-spacing: 8px;
text-align: center;
.unit {
position: absolute;
diff --git a/src/views/OperationalOverview/websocket.js b/src/views/OperationalOverview/websocket.js
new file mode 100644
index 00000000..82a96847
--- /dev/null
+++ b/src/views/OperationalOverview/websocket.js
@@ -0,0 +1,183 @@
+/*
+ * @Author: zhp
+ * @Date: 2024-01-29 17:05:25
+ * @LastEditTime: 2024-01-29 17:05:25
+ * @LastEditors: zhp
+ * @Description:
+ */
+/**
+ * 发起websocket请求函数
+ * @param {string} url ws连接地址
+ * @param {Object} agentData 传给后台的参数
+ * @param {function} successCallback 接收到ws数据,对数据进行处理的回调函数
+ * @param {function} errCallback ws连接错误的回调函数
+ */
+export function WsConnect(url, agentData, successCallback, errCallback) {
+ this.wsUrl = url;
+ this.wsObj = null;
+ // 是否执行重连 true/不执行 ; false/执行
+ this.lockReconnect = false;
+ // 重连定时器
+ this.wsCreateHandler = null;
+ // 连接成功,执行回调函数
+ this.messageCallback = successCallback;
+ // 连接失败,执行回调函数
+ this.errorCallback = errCallback;
+ // 发送给后台的数据
+ this.sendDatas = agentData;
+ // 创建ws函数
+ this.createWebSoket = () => {
+ if (typeof WebSocket === "undefined") {
+ writeToScreen("您的浏览器不支持WebSocket,无法获取数据");
+ return false;
+ }
+ try {
+ this.wsObj = new WebSocket(url);
+ initWsEventHandle();
+ } catch (e) {
+ writeToScreen("连接异常,开始重连");
+ reconnect();
+ }
+ };
+ // 手动关闭websocket (这里手动关闭会执行onclose事件)
+ this.closeWebsocket = () => {
+ if (this.wsObj) {
+ writeToScreen("手动关闭websocket");
+ this.wsObj.close(); // 关闭websocket
+ // this.wsObj.onclose() // 关闭websocket(如果上面的关闭不生效就加上这一条)
+ // 关闭重连
+ this.lockReconnect = true;
+ this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
+ // 关闭心跳检查
+ // heartCheck.stop();
+ }
+ };
+ const initWsEventHandle = () => {
+ try {
+ // 连接成功
+ this.wsObj.onopen = (event) => {
+ onWsOpen(event);
+ // heartCheck.start();
+ };
+
+ // 监听服务器端返回的信息
+ this.wsObj.onmessage = (event) => {
+ onWsMessage(event);
+ // heartCheck.start();
+ };
+
+ this.wsObj.onclose = (event) => {
+ writeToScreen("onclose执行关闭事件");
+ onWsClose(event);
+ };
+
+ this.wsObj.onerror = (event) => {
+ writeToScreen("onerror执行error事件,开始重连");
+ onWsError(event);
+ reconnect();
+ };
+ } catch (err) {
+ writeToScreen("绑定事件没有成功,开始重连");
+ reconnect();
+ }
+ };
+
+ const onWsOpen = (event) => {
+ writeToScreen("CONNECT");
+ // // 客户端与服务器端通信
+ // wsObj.send('我发送消息给服务端');
+ // 添加状态判断,当为OPEN时,发送消息
+ if (this.wsObj.readyState === this.wsObj.OPEN) {
+ // wsObj.OPEN = 1
+ // 发给后端的数据需要字符串化
+ this.wsObj.send(JSON.stringify(this.sendDatas));
+ }
+ if (this.wsObj.readyState === this.wsObj.CLOSED) {
+ // wsObj.CLOSED = 3
+ writeToScreen("wsObj.readyState=3, ws连接异常,开始重连");
+ reconnect();
+ this.errorCallback(event);
+ }
+ };
+ const onWsMessage = (event) => {
+ const jsonStr = event.data;
+ // writeToScreen("onWsMessage接收到服务器的数据: ", jsonStr);
+ this.messageCallback(jsonStr);
+ };
+ const onWsClose = (event) => {
+ writeToScreen("DISCONNECT");
+ // e.code === 1000 表示正常关闭。 无论为何目的而创建, 该链接都已成功完成任务。
+ // e.code !== 1000 表示非正常关闭。
+ console.log("onclose event: ", event);
+ if (event && event.code !== 1000) {
+ writeToScreen("非正常关闭");
+ this.errorCallback(event);
+ // 如果不是手动关闭,这里的重连会执行;如果调用了手动关闭函数,这里重连不会执行
+ reconnect();
+ }
+ };
+ const onWsError = (event) => {
+ writeToScreen("onWsError: ", event.data);
+ this.errorCallback(event);
+ };
+
+ const writeToScreen = (massage) => {
+ console.log(massage);
+ };
+
+ // 重连函数
+ const reconnect = () => {
+ if (this.lockReconnect) {
+ return;
+ }
+ writeToScreen("3秒后重连");
+ this.lockReconnect = true;
+ // 没连接上会一直重连,设置延迟避免请求过多
+ this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
+ this.wsCreateHandler = setTimeout(() => {
+ writeToScreen("重连..." + this.wsUrl);
+ this.createWebSoket();
+ this.lockReconnect = false;
+ writeToScreen("重连完成");
+ }, 3000);
+ };
+
+ // 心跳检查(看看websocket是否还在正常连接中)
+ // let heartCheck = {
+ // timeout: 15000,
+ // timeoutObj: null,
+ // serverTimeoutObj: null,
+ // // 重启
+ // reset() {
+ // clearTimeout(this.timeoutObj);
+ // clearTimeout(this.serverTimeoutObj);
+ // this.start();
+ // },
+ // // 停止
+ // stop() {
+ // clearTimeout(this.timeoutObj);
+ // clearTimeout(this.serverTimeoutObj);
+ // },
+ // // 开启定时器
+ // start() {
+ // this.timeoutObj && clearTimeout(this.timeoutObj);
+ // this.serverTimeoutObj && clearTimeout(this.serverTimeoutObj);
+ // // 15s之内如果没有收到后台的消息,则认为是连接断开了,需要重连
+ // this.timeoutObj = setTimeout(() => {
+ // writeToScreen("心跳检查,发送ping到后台");
+ // try {
+ // const datas = { ping: true };
+ // this.wsObj.send(JSON.stringify(datas));
+ // } catch (err) {
+ // writeToScreen("发送ping异常");
+ // }
+ // console.log("内嵌定时器this.serverTimeoutObj: ", this.serverTimeoutObj);
+ // // 内嵌定时器
+ // this.serverTimeoutObj = setTimeout(() => {
+ // writeToScreen("没有收到后台的数据,重新连接");
+ // reconnect();
+ // }, this.timeout);
+ // }, this.timeout);
+ // },
+ // };
+}
diff --git a/src/views/OperationalOverview/wsInterface.js b/src/views/OperationalOverview/wsInterface.js
new file mode 100644
index 00000000..3178c58a
--- /dev/null
+++ b/src/views/OperationalOverview/wsInterface.js
@@ -0,0 +1,51 @@
+import { WsConnect } from './websocket'
+import store from "@/store";
+
+// 创建websocket链接
+
+const timestr = new Date().getTime()
+// ISRA
+const mesIsra = new WsConnect(
+ process.env.VUE_APP_Socket_API + '/websocket/message?userId=KILN'+timestr,
+ '',
+ (data) => {
+ // console.log('mes ISRA成功的回调函数, 接收到的data数据: ', data)
+ let msgData = JSON.parse(data)
+ // console.log(msgData)
+ if (msgData == null) return;
+ switch (msgData?.type) {
+ case "israKiln": {
+ store.dispatch({type: "websocket/setIsraKiln", payload:msgData.detData.dayStatistic})
+ break;
+ }
+ default:
+ }
+ },
+ (err) => {
+ console.log('失败的回调函数', err)
+ }
+)
+
+
+export const getDcsMsg = () => {
+ // dcsConn.createWebSoket()
+ mesIsra.createWebSoket()
+ // mesMA.createWebSoket()
+ // mesEN.createWebSoket()
+ // mesGAS.createWebSoket()
+ // mesIS.createWebSoket()
+ // mesSJG.createWebSoket()
+ // mesOV.createWebSoket()
+ // mesCUTTING.createWebSoket()
+}
+export const closeDcsMsg = () => {
+ // dcsConn.closeWebsocket()
+ mesIsra.closeWebsocket()
+ // mesMA.closeWebsocket()
+ // mesEN.closeWebsocket()
+ // mesGAS.closeWebsocket()
+ // mesIS.closeWebsocket()
+ // mesSJG.closeWebsocket()
+ // mesOV.closeWebsocket()
+ // mesCUTTING.closeWebsocket()
+}
diff --git a/src/views/bpm/processInstance/detail.vue b/src/views/bpm/processInstance/detail.vue
index 7ecc5343..b8a843a1 100644
--- a/src/views/bpm/processInstance/detail.vue
+++ b/src/views/bpm/processInstance/detail.vue
@@ -89,7 +89,7 @@
-
+
diff --git a/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue b/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue
index ec503b40..c0d922be 100644
--- a/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue
+++ b/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue
@@ -41,7 +41,7 @@
-
+
@@ -50,17 +50,17 @@
-
+
-
+
-
+
diff --git a/src/views/cost/rawMaterialConfig/add-or-updata.vue b/src/views/cost/rawMaterialConfig/add-or-updata.vue
index 6de75d00..1196e9ae 100644
--- a/src/views/cost/rawMaterialConfig/add-or-updata.vue
+++ b/src/views/cost/rawMaterialConfig/add-or-updata.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
- * @LastEditTime: 2023-12-05 15:41:39
+ * @LastEditTime: 2024-02-19 09:36:50
* @Description:
-->
@@ -44,7 +44,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
- :value="parseInt(item.value)">
+ :value="item.value">
diff --git a/src/views/databoard/components/GasChart.vue b/src/views/databoard/components/GasChart.vue
index a808d48b..9daab55c 100644
--- a/src/views/databoard/components/GasChart.vue
+++ b/src/views/databoard/components/GasChart.vue
@@ -246,9 +246,7 @@ export default {
.map((_, index) => {
const today = new Date();
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
- return `${currentMonth < 10?'0'+currentMonth:currentMonth }.${new Date(
- dtimestamp
- ).getDate()}`;}).reverse()
+ return `${new Date(dtimestamp).getMonth()+1}.${new Date(dtimestamp).getDate()}`;}).reverse()
}else if (this.chartTime == "月") {
if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) {
days = 31;
diff --git a/src/views/energy/base/energyType/components/energyTypeAdd.vue b/src/views/energy/base/energyType/components/energyTypeAdd.vue
index 0e9a9342..434f06f3 100644
--- a/src/views/energy/base/energyType/components/energyTypeAdd.vue
+++ b/src/views/energy/base/energyType/components/energyTypeAdd.vue
@@ -93,7 +93,12 @@
-
+
+
+
+
+
+
@@ -149,7 +154,8 @@ export default {
code: '',
nuit: '',
pricingMethod: 2,
- leaderName: ''
+ leaderName: '',
+ push: false
},
isEdit: false, //是否是编辑
rules: {
@@ -178,18 +184,24 @@ export default {
this.form.id = id
getEnergyType( id ).then((res) => {
if (res.code === 0) {
- this.form = res.data
+ this.form.name = res.data.name
+ this.form.code = res.data.code
+ this.form.nuit = res.data.nuit
+ this.form.pricingMethod = res.data.pricingMethod
+ this.form.leaderName = res.data.leaderName
+ this.form.push = res.data.push ? true : false
switch(this.form.pricingMethod) {
case 0:
- this.tableData1 = this.form.segPriceList
+ this.tableData1 = this.form.segPriceList || []
break;
case 1:
- this.tableData2 = this.form.usedPriceList
+ this.tableData2 = this.form.usedPriceList || []
break;
default:
}
}
})
+ console.log(this.form)
} else {
this.isEdit = false
this.form.id = ''
@@ -288,6 +300,7 @@ export default {
return false
}
}
+ console.log(this.form)
if (this.isEdit) {
// 编辑
updateEnergyType({
@@ -300,7 +313,8 @@ export default {
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
- usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: []
+ usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
+ push:this.form.push ? 1 : 0
}).then((res) => {
if (res.code === 0) {
this.$modal.msgSuccess("操作成功");
@@ -317,7 +331,8 @@ export default {
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
- usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: []
+ usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
+ push:this.form.push ? 1 : 0
}).then((res) => {
if (res.code === 0) {
this.$modal.msgSuccess("操作成功");
diff --git a/src/views/energy/base/energyType/index.vue b/src/views/energy/base/energyType/index.vue
index 57fa05f1..5b387ebc 100644
--- a/src/views/energy/base/energyType/index.vue
+++ b/src/views/energy/base/energyType/index.vue
@@ -52,7 +52,8 @@ const tableProps = [
{
prop: 'code',
label: '类型编码',
- showOverflowtooltip: true
+ showOverflowtooltip: true,
+ minWidth: 150
},
{
prop: 'name',
@@ -67,6 +68,11 @@ const tableProps = [
prop: 'pricingMethod',
label: '计价方式'
},
+ {
+ prop: 'push',
+ label: '是否推送',
+ filter: publicFormatter('push')
+ },
{
prop: 'price',
label: '价格(元)',
diff --git a/src/views/extend/processFlowView/components/BomSelection.vue b/src/views/extend/processFlowView/components/BomSelection.vue
index fbdd0219..d912d2a9 100644
--- a/src/views/extend/processFlowView/components/BomSelection.vue
+++ b/src/views/extend/processFlowView/components/BomSelection.vue
@@ -1,8 +1,8 @@
-
@@ -50,7 +50,8 @@ export default {
watch: {
list: {
handler(val) {
- if (val) {
+ if (val) {
+ // console.log(val);
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
}
},
@@ -59,7 +60,8 @@ export default {
},
currentSelect: {
handler(val) {
- // val: string
+ // val: string
+ console.log(val)
this.selected = val;
this.randomKey = Math.random();
// 更新选中状态
@@ -74,7 +76,8 @@ export default {
},
},
methods: {
- handleChange(bomItem, selected) {
+ handleChange(bomItem, selected) {
+ console.log(selected);
this.list__inner = this.list__inner.map((item) => ({
...item,
disabled: selected ? item.id !== bomItem.id : false,
diff --git a/src/views/extend/processFlowView/components/BomSelector.vue b/src/views/extend/processFlowView/components/BomSelector.vue
index 136a06cb..23c93859 100644
--- a/src/views/extend/processFlowView/components/BomSelector.vue
+++ b/src/views/extend/processFlowView/components/BomSelector.vue
@@ -1,8 +1,8 @@
-
@@ -119,7 +119,9 @@ export default {
console.log('value', val);
if (val) {
this.selectedEquipments = val.map((item) => item.equipmentId);
- this.selected = val;
+ this.selected = val
+ console.log(this.materialsBomList)
+ // console.log(this.selectedEquipments)
}
},
deep: true,
diff --git a/src/views/extend/processFlowView/components/ProcessBomList.vue b/src/views/extend/processFlowView/components/ProcessBomList.vue
index a086d547..acaced6d 100644
--- a/src/views/extend/processFlowView/components/ProcessBomList.vue
+++ b/src/views/extend/processFlowView/components/ProcessBomList.vue
@@ -1,8 +1,8 @@
-
@@ -261,7 +261,8 @@ export default {
}
// 设置设备id
eq.materialsBom.equipmentId = eq.id;
- eq.valuesBom.equipmentId = eq.id;
+ eq.valuesBom.equipmentId = eq.id;
+ console.log(this.selectedBoms)
return eq;
});
} else {
diff --git a/src/views/group/base/groupClasses/components/groupClassAdd.vue b/src/views/group/base/groupClasses/components/groupClassAdd.vue
index 628bf6b4..5cf0c00d 100644
--- a/src/views/group/base/groupClasses/components/groupClassAdd.vue
+++ b/src/views/group/base/groupClasses/components/groupClassAdd.vue
@@ -1,18 +1,30 @@
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
@@ -79,6 +86,13 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/group/base/groupTeamScheduling/index.vue b/src/views/group/base/groupTeamScheduling/index.vue
index 54800965..184c6d8e 100644
--- a/src/views/group/base/groupTeamScheduling/index.vue
+++ b/src/views/group/base/groupTeamScheduling/index.vue
@@ -1,5 +1,6 @@
+
@@ -87,13 +88,15 @@
+
+
diff --git a/src/views/quality/base/basicData/qualityInspectionBoxPermissions/BomSelector.vue b/src/views/quality/base/basicData/qualityInspectionBoxPermissions/BomSelector.vue
new file mode 100644
index 00000000..b3327c53
--- /dev/null
+++ b/src/views/quality/base/basicData/qualityInspectionBoxPermissions/BomSelector.vue
@@ -0,0 +1,294 @@
+
+
+
+
+
+
+
+
+
+
+ handleEquipmentChange(eq, e)" class="">
+ handleLoadDom(eq)">
+ {{ eq.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;
+
+
+
diff --git a/src/views/quality/base/basicData/qualityInspectionBoxPermissions/ProcessBomList.vue b/src/views/quality/base/basicData/qualityInspectionBoxPermissions/ProcessBomList.vue
new file mode 100644
index 00000000..23eba9ec
--- /dev/null
+++ b/src/views/quality/base/basicData/qualityInspectionBoxPermissions/ProcessBomList.vue
@@ -0,0 +1,443 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/src/views/quality/base/basicData/qualityInspectionBoxPermissions/basic-page.js b/src/views/quality/base/basicData/qualityInspectionBoxPermissions/basic-page.js
new file mode 100644
index 00000000..e87d7462
--- /dev/null
+++ b/src/views/quality/base/basicData/qualityInspectionBoxPermissions/basic-page.js
@@ -0,0 +1,173 @@
+/*
+ * @Author: zhp
+ * @Date: 2024-01-30 18:05:04
+ * @LastEditTime: 2024-01-30 18:06:16
+ * @LastEditors: zhp
+ * @Description:
+ */
+/*
+ * @Author: zwq
+ * @Date: 2022-08-24 11:19:43
+ * @LastEditors: zhp
+ * @LastEditTime: 2024-01-30 18:00:53
+ * @Description:
+ */
+export default {
+ data() {
+ /* eslint-disable */
+ return {
+ urlOptions: {
+ getDataListURL: '',
+ deleteURL: '',
+ statusUrl: '',
+ exportURL: ''
+ },
+ tableData: [],
+ listQuery: {
+ pageSize: 10,
+ pageNo: 1,
+ total: 1,
+ },
+ exportLoading: false,
+ dataListLoading: false,
+ addOrEditTitle: '',
+ addOrUpdateVisible: false,
+ }
+ },
+ created() {
+ },
+ mounted() {
+ this.getDataList()
+ },
+ methods: {
+ // 获取数据列表
+ getDataList() {
+ this.dataListLoading = true;
+ this.urlOptions.getDataListURL(this.listQuery).then(response => {
+ this.tableData = response.data.list;
+ this.listQuery.total = response.data.total;
+ this.dataListLoading = false;
+ });
+ },
+ // 每页数
+ sizeChangeHandle(val) {
+ this.listQuery.pageSize = val;
+ this.listQuery.pageNo = 1;
+ this.getDataList();
+ },
+ // 当前页
+ currentChangeHandle(val) {
+ this.listQuery.pageNo = val;
+ this.getDataList();
+ },
+ // 新增 / 修改
+ addOrUpdateHandle() {
+ this.addOrUpdateVisible = true;
+ this.$nextTick(() => {
+ this.$refs.addOrUpdate.init();
+ });
+ },
+ cancel(id) {
+ this.$refs["popover-" + id].showPopper = false;
+ },
+ //改变状态
+ changeStatus(id) {
+ this.$http
+ .post(this.urlOptions.statusUrl, { id })
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.$refs["popover-" + id].showPopper = false;
+ this.$message({
+ message: this.$t("prompt.success"),
+ type: "success",
+ duration: 500,
+ onClose: () => {
+ this.getDataList();
+ },
+ });
+ })
+ .catch(() => { });
+ },
+ //tableBtn点击
+ handleClick(val) {
+ if (val.type === "edit") {
+ this.$nextTick(() => {
+ this.$refs.addOrUpdate.handleAddEquipment(val.data.userId);
+ });
+ } else if (val.type === "delete") {
+ this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
+ } else if (val.type === "change") {
+ this.changeStatus(val.data.id)
+ } else {
+ this.otherMethods(val)
+ }
+ },
+ // 删除
+ deleteHandle(id, name, index) {
+ this.$confirm(`确定对${name ? '[名称=' + name + ']' : '[序号=' + index + ']'}进行删除操作?`, "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.urlOptions.deleteURL(id).then(({ data }) => {
+ this.$message({
+ message: "操作成功",
+ type: "success",
+ duration: 1500,
+ onClose: () => {
+ this.getDataList();
+ },
+ });
+ });
+ })
+ .catch(() => { });
+ },
+ //search-bar点击
+ buttonClick(val) {
+ switch (val.btnName) {
+ case "search":
+ this.listQuery.xm1 = val.xm1;
+ this.listQuery.xm2 = val.xm2;
+ this.listQuery.pageNo = 1;
+ this.getDataList();
+ break;
+ case "add":
+ this.addOrEditTitle = '新增'
+ this.addOrUpdateVisible = true;
+ this.addOrUpdateHandle()
+ break;
+ default:
+ console.log(val)
+ }
+ },
+ handleCancel() {
+ this.$refs.addOrUpdate.formClear()
+ this.addOrUpdateVisible = false
+ this.addOrEditTitle = ''
+ },
+ handleConfirm() {
+ this.$refs.addOrUpdate.dataFormSubmit()
+ },
+ successSubmit() {
+ this.handleCancel()
+ this.getDataList()
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ // 处理查询参数
+ let params = { ...this.queryParams };
+ params.pageNo = undefined;
+ params.pageSize = undefined;
+ this.$modal.confirm('是否确认导出所有数据项?').then(() => {
+ this.exportLoading = true;
+ return this.urlOptions.exportURL(params);
+ }).then(response => {
+ this.$download.excel(response, '工厂.xls');
+ this.exportLoading = false;
+ }).catch(() => { });
+ }
+ }
+}
diff --git a/src/views/quality/base/basicData/qualityInspectionBoxPermissions/dialogForm.vue b/src/views/quality/base/basicData/qualityInspectionBoxPermissions/dialogForm.vue
index 966352d9..eff6cb94 100644
--- a/src/views/quality/base/basicData/qualityInspectionBoxPermissions/dialogForm.vue
+++ b/src/views/quality/base/basicData/qualityInspectionBoxPermissions/dialogForm.vue
@@ -9,30 +9,28 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
{{ item.typeName}}
+
+
{{ item.name}}
- {{ i.content }}
+ {{ i.bane }}
@@ -85,13 +83,15 @@