diff --git a/.env.dev b/.env.dev index 574a759f..40051292 100644 --- a/.env.dev +++ b/.env.dev @@ -12,9 +12,9 @@ ENV = 'development' VUE_APP_TITLE = 产线监控系统 # 芋道管理系统/开发环境 -# VUE_APP_BASE_API = 'http://192.168.1.49:48080' +VUE_APP_BASE_API = 'http://192.168.1.49:48080' # VUE_APP_BASE_API = 'http://192.168.1.8:48080' -VUE_APP_BASE_API = 'http://192.168.0.33:48080' +# VUE_APP_BASE_API = 'http://192.168.0.33:48080' # VUE_APP_BASE_API = 'http://192.168.1.188:48080' # 路由懒加载 diff --git a/src/api/core/base/lineBindProductLog.js b/src/api/core/base/lineBindProductLog.js index 5d402106..baf4655d 100644 --- a/src/api/core/base/lineBindProductLog.js +++ b/src/api/core/base/lineBindProductLog.js @@ -35,11 +35,11 @@ export function getLineBindProductLog(id) { } // 获得产线目前生产产品表 主要为更新分页 -export function getLineBindProductLogPage(query) { +export function getLineBindProductLogPage(data) { return request({ url: '/base/line-bind-product-log/page', - method: 'get', - params: query + method: 'post', + data }) } diff --git a/src/assets/images/default-file-icon.png b/src/assets/images/default-file-icon.png new file mode 100644 index 00000000..f9e9d467 Binary files /dev/null and b/src/assets/images/default-file-icon.png differ diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index a290ce95..e55394de 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -10,6 +10,8 @@ ref="form" :model="form" :label-width="`${labelWidth}px`" + :size="size" + :label-position="labelPosition" v-loading="formLoading"> @@ -119,7 +121,15 @@ export default { disabled: { type: Boolean, default: false, - } + }, + labelPosition: { + type: String, + default: 'right', + }, + size: { + type: String, + default: '', + }, }, data() { return { diff --git a/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue b/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue index 740f6b71..ddb8ce35 100644 --- a/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue +++ b/src/views/base/equipmentPlcConnect/components/BasicDrawer.vue @@ -151,7 +151,7 @@ export default { name: '', plcParamName: '', unit: '', - collection: '', + collection: 1, minValue: '', maxValue: '', defaultValue: '', @@ -370,7 +370,7 @@ export default { name: '', plcParamName: '', unit: '', - collection: '', + collection: 1, minValue: '', maxValue: '', defaultValue: '', diff --git a/src/views/core/base/equipment/components/AssetsUpload.vue b/src/views/core/base/equipment/components/AssetsUpload.vue new file mode 100644 index 00000000..c6453eac --- /dev/null +++ b/src/views/core/base/equipment/components/AssetsUpload.vue @@ -0,0 +1,294 @@ + + + + + + + diff --git a/src/views/core/base/equipment/components/DialogForm.vue b/src/views/core/base/equipment/components/DialogForm.vue new file mode 100644 index 00000000..39c16824 --- /dev/null +++ b/src/views/core/base/equipment/components/DialogForm.vue @@ -0,0 +1,313 @@ + + + + + + + diff --git a/src/views/core/base/equipment/components/EquipmentDrawer.vue b/src/views/core/base/equipment/components/EquipmentDrawer.vue index 445ac334..d69a714a 100644 --- a/src/views/core/base/equipment/components/EquipmentDrawer.vue +++ b/src/views/core/base/equipment/components/EquipmentDrawer.vue @@ -35,6 +35,7 @@ key="drawer-dialog-form" v-if="showForm" ref="form" + label-position="top" :dataForm="form" :rows="formRows" /> @@ -43,9 +44,11 @@ + + + @@ -99,7 +106,7 @@ + + diff --git a/src/views/core/base/productionLine/index.vue b/src/views/core/base/productionLine/index.vue index 29ac73d2..4eb84248 100644 --- a/src/views/core/base/productionLine/index.vue +++ b/src/views/core/base/productionLine/index.vue @@ -29,7 +29,7 @@ @cancel="handleCancel" @confirm="handleConfirm" :before-close="handleCancel" - width="70%"> + width="50%"> diff --git a/src/views/equipment/analysis/quality/components/lineChart.vue b/src/views/equipment/analysis/quality/components/lineChart.vue index b31ea45e..04f25dc2 100644 --- a/src/views/equipment/analysis/quality/components/lineChart.vue +++ b/src/views/equipment/analysis/quality/components/lineChart.vue @@ -43,7 +43,7 @@ export default { eq.okQuantity, eq.nokQuantity, eq.totalQuantity, - eq.passRate.toFixed(4), + eq.passRate?.toFixed(4), ]); }); return { diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index 89859e5e..8b023489 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -29,7 +29,10 @@ @emitFun="handleEmitFun"> -
+
各设备加工数量
@@ -87,6 +90,7 @@ export default { rangeSeparator: '-', startPlaceholder: '开始日期', endPlaceholder: '结束日期', + defaultTime: ['00:00:00', '23:59:59'], param: 'recordTime', defaultSelect: [ new Date(y, m, d) @@ -246,7 +250,9 @@ export default { created() { this.fillLineOptions(); this.fillProductOptions(); - this.getList(); + }, + mounted() { + this.$refs['search-bar'].headBtnClick('search'); }, methods: { handleTabClick(tab, event) { @@ -307,12 +313,16 @@ export default { }, handleSearchBarBtnClick(btn) { - console.log('handleSearchBarBtnClick', btn); + // debugger; switch (btn.btnName) { case 'search': this.queryParams.lineId = btn.lineId; this.queryParams.productId = btn.productId; - this.queryParams.recordTime = btn.recordTime ? btn.recordTime.map(time => moment(new Date(time)).format('YYYY-MM-DD HH:mm:ss')) : null; + this.queryParams.recordTime = btn.recordTime + ? btn.recordTime.map((time) => + moment(new Date(time)).format('YYYY-MM-DD HH:mm:ss') + ) + : null; this.$nextTick(() => { this.getList(); }); @@ -388,7 +398,7 @@ export default { font-size: 14px; &::before { - content: ""; + content: ''; position: absolute; left: 0; top: 6px; @@ -398,5 +408,4 @@ export default { background: #0b58ff; } } - diff --git a/src/views/equipment/timing-diagram/components/gantt.js b/src/views/equipment/timing-diagram/components/gantt.js deleted file mode 100644 index fcbc6fba..00000000 --- a/src/views/equipment/timing-diagram/components/gantt.js +++ /dev/null @@ -1,191 +0,0 @@ - -// filename: gantt.vue -// author: liubin -// date: 2023 -09 - 25 14: 28: 12 -// description: 甘特图 - - -import * as echarts from 'echarts'; - -/** - * - * @param {*} params - * @param {*} api - * - * https://echarts.apache.org/zh/option.html#series-custom.renderItem.arguments.params - */ -function renderItem(params, api) { } - -export default class Gantt { - constructor(el) { - this.chart = echarts.init(el); - let options = { - series: [ - { - type: 'custom', - coordinateSystem: 'cartesian2d', - renderItem: renderItem, - } - ] - } - this.chart.setOption(options); - } - - update(options) { - this.chart.setOption(options); - } - - resize() { - // todo - } - - destroy() { - this.chart.dispose(); - } -} - - - -var data = []; -var categories = ['设备1', '设备2', '设备3']; -var types = [ - { name: '运行', color: '#7b9ce1' }, - { name: '故障', color: '#bd6d6c' }, - { name: '停机', color: '#75d874' }, -]; -// return new Date(new Date(timestamp).toLocaleDateString()).getTime() -// })(1691568181000)) -function getStartTime(timestamp) { - return new Date(new Date(timestamp).toLocaleDateString()).getTime() -} - - -data.push({ - name: 'running', - value: [0, 1691568181000, 1691568181000 + 60 * 60 * 1000, 60], - itemStyle: { - normal: { - color: types[0].color - } - } -}) - - - -function renderItem(params, api) { - var categoryIndex = api.value(0); - var start = api.coord([api.value(1), categoryIndex]); - var end = api.coord([api.value(2), categoryIndex]); - var height = api.size([0, 1])[1] * 0.8; - var rectShape = echarts.graphic.clipRectByRect( - { - x: start[0], - y: start[1] - height / 2, - width: end[0] - start[0], - height: height - }, - { - x: params.coordSys.x, - y: params.coordSys.y, - width: params.coordSys.width, - height: params.coordSys.height - } - ); - return ( - rectShape && { - type: 'rect', - transition: ['shape'], - shape: rectShape, - style: api.style() - } - ); -} - -option = { - tooltip: { - // show: false, - formatter: function (params) { - return params.marker + params.name + ': ' + new Date(params.value[1]).toLocaleTimeString() + ' - ' + new Date(params.value[2]).toLocaleTimeString(); - } - }, - // title: { - // text: 'Profile', - // left: 'center' - // }, - // dataZoom: [ - // { - // type: 'slider', - // filterMode: 'weakFilter', - // showDataShadow: false, - // top: 400, - // labelFormatter: '' - // }, - // { - // type: 'inside', - // filterMode: 'weakFilter' - // } - // ], - grid: { - height: 300 - }, - xAxis: { - type: 'time', - min: getStartTime(1691568181000), - max: getStartTime(1691568181000 + 3600 * 24 * 1000), - splitNumber: 10, - // interval: 60*3600*1000, - // scale: true, - axisLabel: { - // rotate: -15, - formatter: function (val) { - return new Date(val).toLocaleTimeString() - } - }, - axisTick: { - show: true - }, - splitLine: { - show: false, - } - }, - yAxis: [{ - axisLine: { - // show: false, - lineStyle: { - color: '' - } - }, - axisLabel: { - fontSize: 14, - }, - axisTick: { - show: false, - }, - splitLine: { - show: true - }, - data: categories - }, { - axisLine: { - // show: false, - lineStyle: { - color: '' - } - }, - data: [] - }], - series: [ - { - type: 'custom', - renderItem: renderItem, - itemStyle: { - opacity: 0.8 - }, - encode: { - x: [1, 2], - y: 0 - }, - data: data - } - ] -}; \ No newline at end of file diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue index 829bf109..d1a495ae 100644 --- a/src/views/equipment/timing-diagram/output/index.vue +++ b/src/views/equipment/timing-diagram/output/index.vue @@ -74,7 +74,7 @@ - - - - \ No newline at end of file