projects/mes-test #133
8
.env.dev
8
.env.dev
@ -12,8 +12,8 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = MES系统
|
VUE_APP_TITLE = MES系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
|
VUE_APP_BASE_API = 'http://100.64.0.26:48082'
|
||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
||||||
@ -21,6 +21,10 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
|||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||||
|
|
||||||
|
# 积木报表指向地址
|
||||||
|
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
||||||
|
11
.env.prod
11
.env.prod
@ -1,3 +1,10 @@
|
|||||||
|
###
|
||||||
|
# @Author: zhp
|
||||||
|
# @Date: 2023-11-07 19:11:40
|
||||||
|
# @LastEditTime: 2023-11-16 16:40:59
|
||||||
|
# @LastEditors: zhp
|
||||||
|
# @Description:
|
||||||
|
###
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
@ -7,6 +14,10 @@ VUE_APP_TITLE = MES系统
|
|||||||
# 芋道管理系统/生产环境
|
# 芋道管理系统/生产环境
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|
||||||
|
# 积木报表指向地址
|
||||||
|
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||||
|
|
||||||
|
|
||||||
# 根据服务器或域名修改
|
# 根据服务器或域名修改
|
||||||
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
|
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
|
||||||
PUBLIC_PATH = 'http://192.168.0.33:8889/'
|
PUBLIC_PATH = 'http://192.168.0.33:8889/'
|
||||||
|
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-08 15:56:52
|
* @Date: 2023-11-08 15:56:52
|
||||||
* @LastEditTime: 2023-11-13 09:15:17
|
* @LastEditTime: 2023-11-16 20:15:02
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -60,3 +60,11 @@ export function getcheckConfigByEqList(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除设备巡检记录
|
||||||
|
export function deleteEqCheckLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-check-log/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
16
src/api/equipment/base/maintain/record.js
Normal file
16
src/api/equipment/base/maintain/record.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Do not edit
|
||||||
|
* @Date: 2023-11-08 15:56:52
|
||||||
|
* @LastEditTime: 2023-11-16 20:22:12
|
||||||
|
* @LastEditors: DY
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 删除设备保养记录
|
||||||
|
export function deleteEqMaintainLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-maintain-log/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-10 16:09:33
|
* @Date: 2023-11-10 16:09:33
|
||||||
* @LastEditTime: 2023-11-10 16:50:08
|
* @LastEditTime: 2023-11-16 18:57:08
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -23,3 +23,11 @@ export function updateEqRepair(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除维修记录
|
||||||
|
export function deleteRepair(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-repair-log/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-11 16:18:57
|
* @Date: 2023-11-11 16:18:57
|
||||||
* @LastEditTime: 2023-11-11 17:28:54
|
* @LastEditTime: 2023-11-16 20:52:06
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -49,3 +49,20 @@ export function getSparePartList(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除设备备品备件配置
|
||||||
|
export function deleteConfig(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-spare-part-config/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得备品备件分页
|
||||||
|
export function getSparePartPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-spare-part/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-07 19:47:48
|
* @Date: 2023-11-07 19:47:48
|
||||||
* @LastEditTime: 2023-11-08 16:59:32
|
* @LastEditTime: 2023-11-16 17:49:23
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -12,7 +12,7 @@ export function processEquMaterialBomPage(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/extend/process-equ-material-bom/page',
|
url: '/extend/process-equ-material-bom/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-09 09:37:14
|
* @Date: 2023-11-09 09:37:14
|
||||||
* @LastEditTime: 2023-11-09 14:20:02
|
* @LastEditTime: 2023-11-16 17:47:21
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 获得能耗统计查询分页
|
|
||||||
export function processEquValueBomPage(data) {
|
export function processEquValueBomPage(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/extend/process-equ-value-bom/page',
|
url: '/extend/process-equ-value-bom/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-07 14:10:18
|
* @Date: 2023-11-07 14:10:18
|
||||||
* @LastEditTime: 2023-11-14 14:46:04
|
* @LastEditTime: 2023-11-16 17:49:52
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -12,7 +12,7 @@ export function getStatisticalDataPage(query) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/base/statistical-data/getStatisticData',
|
url: '/base/statistical-data/getStatisticData',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,8 +94,11 @@ $buttonHeight: $buttonH * 1px;
|
|||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.pic {
|
.pic {
|
||||||
|
flex: 3;
|
||||||
|
width: 1px;
|
||||||
|
min-width: 800px;
|
||||||
// 元素
|
// 元素
|
||||||
width: $picWidth;
|
// width: $picWidth;
|
||||||
height: $picHeight;
|
height: $picHeight;
|
||||||
background-image: url($picImage);
|
background-image: url($picImage);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@ -116,7 +119,8 @@ $buttonHeight: $buttonH * 1px;
|
|||||||
.field {
|
.field {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 8%;
|
margin-top: 8%;
|
||||||
flex: 1;
|
flex: 2;
|
||||||
|
// width: 800px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -170,7 +174,7 @@ $buttonHeight: $buttonH * 1px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form {
|
.form {
|
||||||
margin-top: 32px;
|
margin-top: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// width: $formWidth;
|
// width: $formWidth;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -307,6 +311,19 @@ $buttonHeight: $buttonH * 1px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - PC 最小尺寸设置
|
// - - - - - PC 最小尺寸设置
|
||||||
|
@media screen and (min-width: 1920px) {
|
||||||
|
.container {
|
||||||
|
.content {
|
||||||
|
|
||||||
|
.field {
|
||||||
|
flex: initial;
|
||||||
|
width: 800px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media screen and (min-width: 599px) and (max-width: 1366px) {
|
@media screen and (min-width: 599px) and (max-width: 1366px) {
|
||||||
.container {
|
.container {
|
||||||
min-width: 599px;
|
min-width: 599px;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<!-- 对话框(添加) -->
|
<!-- 对话框(添加) -->
|
||||||
<base-dialog :dialogTitle="title" :dialogVisible="open" @close="cancel" @cancel="cancel" width="60%"
|
<base-dialog :dialogTitle="title" :dialogVisible="open" @close="cancel" @cancel="cancel" width="60%"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" key="index-dialog-form" ref="form" label-position="top" size="small" :dataForm="form"
|
<DialogForm v-if="open" key="index-dialog-form" ref="form" label-position="top" size="small" v-model="form"
|
||||||
:rows="computedRows" />
|
:rows="computedRows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
@ -424,6 +424,7 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
|
files: []
|
||||||
},
|
},
|
||||||
showUploadComponents: false, // 是否显示上传组件
|
showUploadComponents: false, // 是否显示上传组件
|
||||||
};
|
};
|
||||||
@ -506,6 +507,7 @@ export default {
|
|||||||
spec: undefined,
|
spec: undefined,
|
||||||
description: undefined,
|
description: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
|
files: []
|
||||||
};
|
};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
|
@ -202,7 +202,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.init()
|
// this.init()
|
||||||
// console.log('aaaaaa')
|
// console.log('aaaaaa')
|
||||||
// this.otherPaper()
|
// this.otherPaper()
|
||||||
},
|
},
|
||||||
@ -227,6 +227,7 @@ export default {
|
|||||||
changeMode() {
|
changeMode() {
|
||||||
// hiprintTemplate.clear()
|
// hiprintTemplate.clear()
|
||||||
// console.log(this.modelData)
|
// console.log(this.modelData)
|
||||||
|
this.$nextTick(() => {
|
||||||
const { mode } = this
|
const { mode } = this
|
||||||
const provider = providers[mode]
|
const provider = providers[mode]
|
||||||
hiprint.init({
|
hiprint.init({
|
||||||
@ -255,8 +256,8 @@ export default {
|
|||||||
|
|
||||||
// console.log(this.modelData)
|
// console.log(this.modelData)
|
||||||
// console.log($('#hiprint-printTemplate').empty())
|
// console.log($('#hiprint-printTemplate').empty())
|
||||||
if (this.modelData) {
|
if (this.modelData != {}) {
|
||||||
// console.log(this.modelData);
|
console.log(this.modelData);
|
||||||
$('.hiprintEpContainer').empty()
|
$('.hiprintEpContainer').empty()
|
||||||
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
||||||
$('.hiprint-printTemplate').empty()
|
$('.hiprint-printTemplate').empty()
|
||||||
@ -267,6 +268,7 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
$('.hiprintEpContainer').empty()
|
$('.hiprintEpContainer').empty()
|
||||||
|
console.log(this.modelData);
|
||||||
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
||||||
$('.hiprint-printTemplate').empty()
|
$('.hiprint-printTemplate').empty()
|
||||||
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
||||||
@ -278,13 +280,14 @@ export default {
|
|||||||
paginationContainer: '.hiprint-printPagination'
|
paginationContainer: '.hiprint-printPagination'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// hiprintTemplate.design('#hiprint-printTemplate')
|
hiprintTemplate.design('#hiprint-printTemplate')
|
||||||
// console.log(hiprintTemplate)
|
// console.log(hiprintTemplate)
|
||||||
console.log(hiprintTemplate);
|
console.log(hiprintTemplate);
|
||||||
hiprintTemplate.design('#hiprint-printTemplate', { grid: true })
|
// hiprintTemplate.design('#hiprint-printTemplate', { grid: true })
|
||||||
// 获取当前放大比例, 当zoom时传true 才会有
|
// 获取当前放大比例, 当zoom时传true 才会有
|
||||||
this.scaleValue = hiprintTemplate.editingPanel.scale || 1
|
this.scaleValue = hiprintTemplate.editingPanel.scale || 1
|
||||||
// this.scaleValue = hiprintTemplate.editingPanel.scale || 1
|
// this.scaleValue = hiprintTemplate.editingPanel.scale || 1
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 设置纸张大小
|
* 设置纸张大小
|
||||||
|
@ -127,8 +127,8 @@ export default {
|
|||||||
lineData[it.recordTime + '_area'] = it.area
|
lineData[it.recordTime + '_area'] = it.area
|
||||||
})
|
})
|
||||||
console.log('你好', this.monitorList)
|
console.log('你好', this.monitorList)
|
||||||
|
if (this.monitorList.length > 0) {
|
||||||
this.monitorList.forEach(m => {
|
this.monitorList.forEach(m => {
|
||||||
console.log('455', m)
|
|
||||||
if (m.lineName === lineData.proLineName) {
|
if (m.lineName === lineData.proLineName) {
|
||||||
m.data.forEach(bad => {
|
m.data.forEach(bad => {
|
||||||
// 转成时间戳
|
// 转成时间戳
|
||||||
@ -139,6 +139,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
lineData['workOrderName'] = works.join(',')
|
lineData['workOrderName'] = works.join(',')
|
||||||
lineData['spec'] = specs.join(',')
|
lineData['spec'] = specs.join(',')
|
||||||
this.tableData.push(lineData)
|
this.tableData.push(lineData)
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
<!-- 抽屉 详情 -->
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 抽屉 详情 -->
|
<!-- 抽屉 详情 -->
|
||||||
|
@ -49,7 +49,8 @@
|
|||||||
filterable
|
filterable
|
||||||
:disabled="isdetail"
|
:disabled="isdetail"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择巡检配置">
|
placeholder="请选择巡检配置"
|
||||||
|
@change="setInspectionContet">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in configList"
|
v-for="dict in configList"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
@ -107,20 +108,15 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
|
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <attr-add
|
|
||||||
v-if="addOrUpdateVisible"
|
|
||||||
ref="addOrUpdate"
|
|
||||||
:config-id="dataForm.id"
|
|
||||||
@refreshDataList="getList" /> -->
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SmallTitle from '../../../base/alarm/Record/SmallTitle.vue';
|
import SmallTitle from '../../../base/alarm/Record/SmallTitle.vue';
|
||||||
import { createCheckLog, updateCheckLog, getcheckAllList, getcheckConfigByEqList, getEqCheckLog } from '@/api/equipment/base/inspection/record'
|
import { createCheckLog, updateCheckLog, getcheckConfigByEqList, getEqCheckLog } from '@/api/equipment/base/inspection/record'
|
||||||
import { getEquipmentAll } from '@/api/base/equipment'
|
import { getEquipmentAll } from '@/api/base/equipment'
|
||||||
import Editor from "@/components/Editor";
|
import Editor from "@/components/Editor";
|
||||||
|
import { getCheckDetPage } from "@/api/equipment/base/inspection/settings";
|
||||||
// import FileUpload from "@/components/FileUpload";
|
// import FileUpload from "@/components/FileUpload";
|
||||||
// import { parseTime } from '../../../../core/mixins/code-filter';
|
// import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
// import attrAdd from './attr-add';
|
// import attrAdd from './attr-add';
|
||||||
@ -176,7 +172,8 @@ export default {
|
|||||||
equipmentId: undefined,
|
equipmentId: undefined,
|
||||||
actualTime: undefined,
|
actualTime: undefined,
|
||||||
responsible: undefined,
|
responsible: undefined,
|
||||||
description: undefined
|
description: undefined,
|
||||||
|
files: []
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
eqList: [],
|
eqList: [],
|
||||||
@ -224,8 +221,20 @@ export default {
|
|||||||
resetFields(args) {
|
resetFields(args) {
|
||||||
return this.$refs.dataForm.resetFields(args);
|
return this.$refs.dataForm.resetFields(args);
|
||||||
},
|
},
|
||||||
|
initData() {
|
||||||
|
this.dataForm = {
|
||||||
|
id: undefined,
|
||||||
|
configId: undefined,
|
||||||
|
equipmentId: undefined,
|
||||||
|
actualTime: undefined,
|
||||||
|
responsible: undefined,
|
||||||
|
description: undefined,
|
||||||
|
files: []
|
||||||
|
}
|
||||||
|
this.list = []
|
||||||
|
},
|
||||||
init(id, isdetail) {
|
init(id, isdetail) {
|
||||||
// this.initData();
|
this.initData();
|
||||||
this.isdetail = isdetail || false;
|
this.isdetail = isdetail || false;
|
||||||
this.dataForm.id = id || undefined;
|
this.dataForm.id = id || undefined;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
@ -247,39 +256,12 @@ export default {
|
|||||||
});
|
});
|
||||||
this.formLoading = false
|
this.formLoading = false
|
||||||
},
|
},
|
||||||
handleClick(raw) {
|
setInspectionContet() {
|
||||||
if (raw.type === 'delete') {
|
// 根据巡检配置名称获得巡检配置详细对应巡检内容
|
||||||
this.$confirm(
|
getCheckDetPage({
|
||||||
`确定要删除名称为${raw.data.sparePartName}的数据?`,
|
pageNo: 1,
|
||||||
'提示',
|
pageSize: 99,
|
||||||
{
|
configId: this.dataForm.configId,
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
deleteConfigDet(raw.data.id).then(({ data }) => {
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
} else {
|
|
||||||
this.addNew(raw.data.id);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
// 获取巡检内容分页
|
|
||||||
getcheckAllList({
|
|
||||||
...this.listQuery,
|
|
||||||
configId: this.dataForm.id,
|
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.list = response.data.list;
|
this.list = response.data.list;
|
||||||
this.listQuery.total = response.data.total;
|
this.listQuery.total = response.data.total;
|
||||||
@ -308,6 +290,8 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.dataForm.files = arry
|
this.dataForm.files = arry
|
||||||
|
} else {
|
||||||
|
this.dataForm.files = []
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import addRecord from './addRecord.vue';
|
import addRecord from './addRecord.vue';
|
||||||
import { exportCheckLogExcel } from '@/api/equipment/base/inspection/record'
|
import { exportCheckLogExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
|
||||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
@ -349,9 +349,9 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除记录"' + row.name + '"?')
|
.confirm('是否删除设备巡检记录配置名称为"' + row.configName + '"的数据项?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return this.delete({ id });
|
return deleteEqCheckLog(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
|
import { deleteEqMaintainLog } from '@/api/equipment/base/maintain/record'
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -131,7 +132,7 @@ export default {
|
|||||||
label: '时间段',
|
label: '时间段',
|
||||||
dateType: 'daterange', // datetimerange
|
dateType: 'daterange', // datetimerange
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'timestamp',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始日期',
|
startPlaceholder: '开始日期',
|
||||||
endPlaceholder: '结束日期',
|
endPlaceholder: '结束日期',
|
||||||
@ -430,9 +431,9 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除记录"' + row.name + '"?')
|
.confirm('是否删除设备保养单号为"' + row.maintainOrderNumber + '"的数据项?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return this.delete({ id });
|
return deleteEqMaintainLog(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import CustomDialogForm from './CustomDialogForm.vue';
|
import CustomDialogForm from './CustomDialogForm.vue';
|
||||||
|
import { deleteRepair } from '@/api/equipment/base/repair'
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -239,7 +240,7 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
basePath: '/base/equipment-repair-log',
|
basePath: '/base/equipment-repair-log',
|
||||||
mode: null,
|
mode: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -375,9 +376,9 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除记录"' + row.name + '"?')
|
.confirm('是否确认删除维修单号为"' + row.repairOrderNumber + '"的数据?')
|
||||||
.then(function () {
|
.then(() => {
|
||||||
return this.delete({ id });
|
return deleteRepair(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -411,6 +412,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理表格按钮
|
// 处理表格按钮
|
||||||
handleTableBtnClick({ data, type }) {
|
handleTableBtnClick({ data, type }) {
|
||||||
|
console.log('nihc', data, type)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
this.handleUpdate(data);
|
this.handleUpdate(data);
|
||||||
|
@ -188,6 +188,7 @@ export default {
|
|||||||
getSparePartConfig(this.dataForm.id).then(response => {
|
getSparePartConfig(this.dataForm.id).then(response => {
|
||||||
this.formLoading = false
|
this.formLoading = false
|
||||||
this.dataForm = response.data;
|
this.dataForm = response.data;
|
||||||
|
this.getList()
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// if (this.urlOptions.isGetCode) {
|
// if (this.urlOptions.isGetCode) {
|
||||||
@ -257,7 +258,9 @@ export default {
|
|||||||
padding: 18px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
.action_btn {
|
.action_btn {
|
||||||
float: right;
|
/* float: right; */
|
||||||
|
display: flex;
|
||||||
|
justify-content: right;
|
||||||
margin: 5px 15px;
|
margin: 5px 15px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
createConfigDet,
|
createConfigDet,
|
||||||
getSparePartList
|
getSparePartPage
|
||||||
} from '@/api/equipment/base/spare-parts/config';
|
} from '@/api/equipment/base/spare-parts/config';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -72,8 +72,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getDict() {
|
async getDict() {
|
||||||
const res = await getSparePartList()
|
await getSparePartPage({
|
||||||
this.partList = res.data
|
pageNo: 1,
|
||||||
|
pageSize: 99
|
||||||
|
}).then(res => {
|
||||||
|
this.partList = res.data.list;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || '';
|
this.dataForm.id = id || '';
|
||||||
|
@ -59,6 +59,7 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|||||||
import { publicFormatter } from '@/utils/dict';
|
import { publicFormatter } from '@/utils/dict';
|
||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
import addSparts from './addSparts.vue';
|
import addSparts from './addSparts.vue';
|
||||||
|
import { deleteConfig } from '@/api/equipment/base/spare-parts/config'
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -282,7 +283,7 @@ export default {
|
|||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.info({ id }).then((response) => {
|
this.info({ id }).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.form.responsible = this.form.responsible.split(',')
|
this.form.responsible = this.form.responsible ? this.form.responsible.split(',') : undefined
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '修改备品备件配置';
|
this.title = '修改备品备件配置';
|
||||||
});
|
});
|
||||||
@ -315,9 +316,9 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除记录"' + row.name + '"?')
|
.confirm('是否确认删除配置名为"' + row.name + '"的数据?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return this.delete({ id });
|
return deleteConfig(id);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -328,7 +328,7 @@ export default {
|
|||||||
this.initState();
|
this.initState();
|
||||||
|
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/analysis/equipment-analysis/quantity',
|
url: '/monitoring/equipment-monitor/quantity-series',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.queryParams,
|
params: this.queryParams,
|
||||||
});
|
});
|
||||||
|
@ -210,7 +210,7 @@ export default {
|
|||||||
|
|
||||||
async getList() {
|
async getList() {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/analysis/equipment-analysis/status',
|
url: '/monitoring/equipment-monitor/status-series',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.queryParams,
|
params: this.queryParams,
|
||||||
});
|
});
|
||||||
|
@ -174,7 +174,7 @@ export default {
|
|||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 10;
|
||||||
this.listQuery.equipmentId = val.equipmentId ? val.equipmentId : undefined;
|
this.listQuery.equipmentId = val.equipmentId ? val.equipmentId : undefined;
|
||||||
this.listQuery.name = val.name ? val.name : undefined;
|
this.listQuery.name = val.name ? val.name : undefined;
|
||||||
this.listQuery.name = val.name ? val.name : undefined;
|
this.listQuery.code = val.code ? val.code : undefined;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
|
@ -96,7 +96,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '物料配方名称',
|
label: '参数配方名称',
|
||||||
// selectOptions: [],
|
// selectOptions: [],
|
||||||
// labelField: 'name',
|
// labelField: 'name',
|
||||||
// valueField: 'id',
|
// valueField: 'id',
|
||||||
@ -104,7 +104,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '物料配方编码',
|
label: '参数配方编码',
|
||||||
// selectOptions: [],
|
// selectOptions: [],
|
||||||
// labelField: 'name',
|
// labelField: 'name',
|
||||||
// valueField: 'id',
|
// valueField: 'id',
|
||||||
@ -174,7 +174,7 @@ export default {
|
|||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 10;
|
||||||
this.listQuery.equipmentId = val.equipmentId ? val.equipmentId : undefined;
|
this.listQuery.equipmentId = val.equipmentId ? val.equipmentId : undefined;
|
||||||
this.listQuery.name = val.name ? val.name : undefined;
|
this.listQuery.name = val.name ? val.name : undefined;
|
||||||
this.listQuery.name = val.name ? val.name : undefined;
|
this.listQuery.code = val.code ? val.code : undefined;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
:line="item.lineName"
|
:line="item.lineName"
|
||||||
:desc="item.remark"
|
:desc="item.remark"
|
||||||
:isActive="item.enabled"
|
:isActive="item.enabled"
|
||||||
@edit="handleUpdate" />
|
@edit="handleUpdate"
|
||||||
|
@copy="handleCopy"
|
||||||
|
@delete="handleDelete" />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<base-dialog
|
<base-dialog
|
||||||
@ -58,6 +60,12 @@ const ProcessItem = {
|
|||||||
handleEdit() {
|
handleEdit() {
|
||||||
this.$emit('edit', this.id);
|
this.$emit('edit', this.id);
|
||||||
},
|
},
|
||||||
|
handleCopy() {
|
||||||
|
this.$emit('copy', this.id);
|
||||||
|
},
|
||||||
|
handleDelete() {
|
||||||
|
this.$emit('delete', this.id);
|
||||||
|
},
|
||||||
handleViewDetail(e) {
|
handleViewDetail(e) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'ProcessFlowView',
|
name: 'ProcessFlowView',
|
||||||
@ -117,12 +125,18 @@ const ProcessItem = {
|
|||||||
<el-col
|
<el-col
|
||||||
span={8}
|
span={8}
|
||||||
style="text-align: center; border-right: 1px solid #0001">
|
style="text-align: center; border-right: 1px solid #0001">
|
||||||
<el-button type="text" style="color: #0007; line-height: 1.75">
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="color: #0007; line-height: 1.75"
|
||||||
|
onClick={this.handleCopy}>
|
||||||
复制
|
复制
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col span={8} style="text-align: center;">
|
<el-col span={8} style="text-align: center;">
|
||||||
<el-button type="text" style="color: #0007; line-height: 1.75">
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="color: #0007; line-height: 1.75"
|
||||||
|
onClick={this.handleDelete}>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -255,6 +269,43 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '修改工艺';
|
this.title = '修改工艺';
|
||||||
},
|
},
|
||||||
|
async handleCopy(id) {
|
||||||
|
this.$confirm('确认拷贝操作?', '提示', {
|
||||||
|
confirmButtonText: '确 认',
|
||||||
|
cancelButtonText: '取 消',
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
const { code } = await this.http(
|
||||||
|
'/extend/process-flow/copy',
|
||||||
|
'post',
|
||||||
|
{
|
||||||
|
id,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.$modal.msgSuccess('复制成功');
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => console.info('操作取消'));
|
||||||
|
},
|
||||||
|
async handleDelete(id) {
|
||||||
|
this.$confirm('确认删除这个工艺吗?', '提示', {
|
||||||
|
confirmButtonText: '确 认',
|
||||||
|
cancelButtonText: '取 消',
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
const { code } = await this.http(
|
||||||
|
'/extend/process-flow/delete?id=' + id,
|
||||||
|
'delete'
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.$modal.msgSuccess('删除成功');
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => console.info('操作取消'));
|
||||||
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
|
@ -9,31 +9,69 @@
|
|||||||
<section class="process-bom">
|
<section class="process-bom">
|
||||||
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
||||||
|
|
||||||
<div class="btns" style="
|
<div
|
||||||
|
class="btns"
|
||||||
|
style="
|
||||||
text-align: right;
|
text-align: right;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
">
|
">
|
||||||
<el-button type="primary" plain :disabled="currentDet == null" class="btn-create" icon="el-icon-plus">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
:disabled="currentDet == null"
|
||||||
|
class="btn-create"
|
||||||
|
@click="handleAddEquipment"
|
||||||
|
icon="el-icon-plus">
|
||||||
分配设备
|
分配设备
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-input icon="el-icon-search" placeholder="搜索" v-model="searchText" style="margin-left: 20px">
|
<el-input
|
||||||
|
icon="el-icon-search"
|
||||||
|
placeholder="搜索"
|
||||||
|
v-model="searchText"
|
||||||
|
style="margin-left: 20px">
|
||||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
|
<base-table
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="queryParams.pageNo"
|
||||||
|
:limit="queryParams.pageSize"
|
||||||
|
:table-data="list"
|
||||||
@emitFun="handleEmitFun">
|
@emitFun="handleEmitFun">
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" :method-list="tableBtn"
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
label="操作"
|
||||||
|
:width="120"
|
||||||
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
|
|
||||||
|
<base-dialog
|
||||||
|
dialogTitle="选择设备"
|
||||||
|
:dialogVisible="open"
|
||||||
|
@close="cancel"
|
||||||
|
@cancel="cancel"
|
||||||
|
@confirm="submitForm">
|
||||||
|
<el-transfer v-model="choosedEquipments" :data="eqList">
|
||||||
|
<!-- <span slot-scope="{ option }">
|
||||||
|
{{ option.key }} - {{ option.label }}
|
||||||
|
</span> -->
|
||||||
|
</el-transfer>
|
||||||
|
</base-dialog>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -44,23 +82,20 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
currentDet: {
|
currentDet: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
open: false,
|
||||||
|
eqList: [],
|
||||||
|
finalList: [],
|
||||||
|
choosedEquipments: [],
|
||||||
searchBarFormConfig: [{ label: '工序下设备' }],
|
searchBarFormConfig: [{ label: '工序下设备' }],
|
||||||
tableProps: [
|
tableProps: [
|
||||||
// {
|
{ prop: 'equipmentId', label: '设备名称' },
|
||||||
// prop: 'createTime',
|
{ prop: 'materialName', label: '物料BOM' },
|
||||||
// label: '添加时间',
|
{ prop: 'valueName', label: '参数BOM' },
|
||||||
// fixed: true,
|
|
||||||
// width: 180,
|
|
||||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
// },
|
|
||||||
{ prop: 'name', label: '设备名称' },
|
|
||||||
{ prop: 'code', label: '物料BOM' },
|
|
||||||
{ prop: 'remark', label: '参数BOM' },
|
|
||||||
],
|
],
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
@ -82,10 +117,53 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
renderFn(h, option) {
|
||||||
|
console.log(option);
|
||||||
|
return <span>1</span>;
|
||||||
|
},
|
||||||
|
async getEqList() {
|
||||||
|
console.log('currentDet', this.currentDet);
|
||||||
|
const { sectionId } = this.currentDet;
|
||||||
|
const { code, data } = await this.http(
|
||||||
|
'base/core-equipment-bind-section/page',
|
||||||
|
'get',
|
||||||
|
{ workshopSectionId: sectionId, pageNo: 1, pageSize: 100 }
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
console.log('workshopSectionId', data);
|
||||||
|
|
||||||
|
// 模拟数据
|
||||||
|
this.eqList = [
|
||||||
|
{ equipmentId: 1, equipmentName: '设备1' },
|
||||||
|
{ equipmentId: 2, equipmentName: '设备2' },
|
||||||
|
{ equipmentId: 3, equipmentName: '设备3' },
|
||||||
|
{ equipmentId: 4, equipmentName: '设备4' },
|
||||||
|
{ equipmentId: 5, equipmentName: '设备5' },
|
||||||
|
{ equipmentId: 6, equipmentName: '设备6' },
|
||||||
|
]; // ].map((item) => ({ label: item.equipmentName, key: item.equipmentId }));
|
||||||
|
|
||||||
|
// 获取参数bom和物料bom
|
||||||
|
// 需调用参数bom接口和 物料bom接口
|
||||||
|
this.finalList = this.eqList.map((item) => {
|
||||||
|
item.sub = [];
|
||||||
|
// key: equipmentId-参数bomId
|
||||||
|
item.sub.push({
|
||||||
|
key: item.equipmentId + '-' + '101',
|
||||||
|
label: '参数bom1',
|
||||||
|
});
|
||||||
|
item.sub.push({
|
||||||
|
key: item.equipmentId + '-' + '201',
|
||||||
|
label: '物料bom1',
|
||||||
|
});
|
||||||
|
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
handleEmitFun() {},
|
handleEmitFun() {},
|
||||||
handleTableBtnClick() {},
|
handleTableBtnClick() {},
|
||||||
put(payload) {
|
put(payload) {
|
||||||
@ -106,23 +184,34 @@ export default {
|
|||||||
method,
|
method,
|
||||||
params: method === 'get' ? payload : null,
|
params: method === 'get' ? payload : null,
|
||||||
data: method !== 'get' ? payload : null,
|
data: method !== 'get' ? payload : null,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
submitForm() {},
|
||||||
getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
|
async getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
|
||||||
console.log('get list')
|
console.log('get list', detId, detName, flowId);
|
||||||
|
const { data, code } = await this.http(
|
||||||
|
'/extend/process-flow-det-equipment/page',
|
||||||
|
'get',
|
||||||
|
{ flowDetId: detId, ...this.queryParams }
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.list = data.list;
|
||||||
|
this.total = data.total;
|
||||||
|
} else {
|
||||||
|
this.list.splice(0);
|
||||||
|
this.total = 0;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
async handleAddEquipment() {
|
||||||
this.list = [
|
this.open = true;
|
||||||
{ name: '1', code: 'bomg-1', remark: 'Tochter' },
|
await this.getEqList();
|
||||||
{ name: '2', code: 'bomg-2', remark: 'Bruder' },
|
},
|
||||||
{ name: '3', code: 'bomg-3', remark: 'Kalt' },
|
cancel() {
|
||||||
]
|
this.open = false;
|
||||||
},
|
},
|
||||||
clearList() {
|
clearList() {
|
||||||
this.list = [];
|
this.list = [];
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -9,25 +9,57 @@
|
|||||||
<section class="process-graph">
|
<section class="process-graph">
|
||||||
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
||||||
|
|
||||||
<div class="btns" style="text-align: right; position: absolute; top: 20px; right: 20px">
|
<div
|
||||||
<el-button type="warning" @click="undo" plain v-if="allowUndo" :disabled="!allowUndo" icon="el-icon-back">
|
class="btns"
|
||||||
|
style="text-align: right; position: absolute; top: 20px; right: 20px">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
@click="undo"
|
||||||
|
plain
|
||||||
|
v-if="allowUndo"
|
||||||
|
:disabled="!allowUndo"
|
||||||
|
icon="el-icon-back">
|
||||||
撤销
|
撤销
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="warning" @click="redo" plain v-if="allowRedo" :disabled="!allowRedo">
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
@click="redo"
|
||||||
|
plain
|
||||||
|
v-if="allowRedo"
|
||||||
|
:disabled="!allowRedo">
|
||||||
下一步
|
下一步
|
||||||
<i class="el-icon-right el-icon--right"></i>
|
<i class="el-icon-right el-icon--right"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="btn-refresh" @click="handleUpdateLayout" icon="el-icon-refresh">
|
<el-button
|
||||||
刷新布局</el-button>
|
class="btn-refresh"
|
||||||
<el-button type="primary" plain class="btn-create" icon="el-icon-plus" @click="handleAdd">
|
@click="handleUpdateLayout"
|
||||||
|
icon="el-icon-refresh">
|
||||||
|
刷新布局
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
class="btn-create"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="handleAdd">
|
||||||
新建工序
|
新建工序
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="btn-edit" :disabled="currentDet == null" @click="handleEdit">编辑</el-button>
|
<el-button
|
||||||
|
class="btn-edit"
|
||||||
|
:disabled="currentDet == null"
|
||||||
|
@click="handleEdit">
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="process-graph__panel" ref="panel"></div>
|
<div class="process-graph__panel" ref="panel"></div>
|
||||||
|
|
||||||
<base-dialog :dialogTitle="title" :dialogVisible="open" width="35%" @close="cancel" @cancel="cancel"
|
<base-dialog
|
||||||
|
:dialogTitle="title"
|
||||||
|
:dialogVisible="open"
|
||||||
|
width="35%"
|
||||||
|
@close="cancel"
|
||||||
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
@ -36,7 +68,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Graph } from '@antv/x6';
|
import { Graph } from '@antv/x6';
|
||||||
import ProcessNode, { createProcessNode, CACHE_NAME, getSectionFrom } from './ProcessNode';
|
import ProcessNode, {
|
||||||
|
createProcessNode,
|
||||||
|
CACHE_NAME,
|
||||||
|
getSectionFrom,
|
||||||
|
} from './ProcessNode';
|
||||||
import DialogForm from '@/components/DialogForm';
|
import DialogForm from '@/components/DialogForm';
|
||||||
// import { IdToName } from '@/utils'
|
// import { IdToName } from '@/utils'
|
||||||
|
|
||||||
@ -79,7 +115,7 @@ export default {
|
|||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
cache: CACHE_NAME
|
cache: CACHE_NAME,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -99,42 +135,39 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
flowId: null,
|
flowId: null,
|
||||||
content: '',
|
content: '',
|
||||||
createTime: null
|
createTime: null,
|
||||||
},
|
},
|
||||||
currentDet: null,
|
currentDet: null,
|
||||||
currentNode: null
|
currentNode: null,
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'form.sectionId': {
|
'form.sectionId': {
|
||||||
handler(id) {
|
handler(id) {},
|
||||||
},
|
|
||||||
immediate: false,
|
immediate: false,
|
||||||
},
|
},
|
||||||
currentDet: {
|
currentDet: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.$emit('det-selected', val)
|
this.$emit('det-selected', val);
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.loadLayout().then(json => {
|
this.loadLayout().then((json) => {
|
||||||
this.initGraph(json)
|
this.initGraph(json);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
this.graph.dispose();
|
this.graph.dispose();
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.resetLayout();
|
this.resetLayout();
|
||||||
this.graph = null;
|
this.graph = null;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
initGraph(json) {
|
initGraph(json) {
|
||||||
const graph = new Graph({
|
const graph = new Graph({
|
||||||
container: this.$refs.panel,
|
container: this.$refs.panel,
|
||||||
@ -144,7 +177,7 @@ export default {
|
|||||||
},
|
},
|
||||||
history: true,
|
history: true,
|
||||||
selecting: {
|
selecting: {
|
||||||
className: 'my-select'
|
className: 'my-select',
|
||||||
},
|
},
|
||||||
connecting: {
|
connecting: {
|
||||||
snap: true,
|
snap: true,
|
||||||
@ -155,24 +188,17 @@ export default {
|
|||||||
allowEdge: false,
|
allowEdge: false,
|
||||||
},
|
},
|
||||||
panning: true,
|
panning: true,
|
||||||
// scroller: {
|
|
||||||
// enabled: true,
|
|
||||||
// pannable: true,
|
|
||||||
// cursor: '',
|
|
||||||
// width: 800,
|
|
||||||
// height: 200
|
|
||||||
// },
|
|
||||||
mousewheel: {
|
mousewheel: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
modifiers: ['ctrl', 'meta']
|
modifiers: ['ctrl', 'meta'],
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
graph.fromJSON(json)
|
graph.fromJSON(json);
|
||||||
this.graph = graph;
|
this.graph = graph;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.registerGraphEvents();
|
this.registerGraphEvents();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
registerGraphEvents() {
|
registerGraphEvents() {
|
||||||
@ -182,31 +208,33 @@ export default {
|
|||||||
this.currentDet = null;
|
this.currentDet = null;
|
||||||
this.currentNode = null;
|
this.currentNode = null;
|
||||||
|
|
||||||
nodes.forEach(node => {
|
nodes.forEach((node) => {
|
||||||
node.attr('container/stroke', '#ccc');
|
node.attr('container/stroke', '#ccc');
|
||||||
});
|
});
|
||||||
edges.forEach(edge => {
|
edges.forEach((edge) => {
|
||||||
edge.attr('line/stroke', '#ccc')
|
edge.attr('line/stroke', '#ccc');
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
this.graph.on('node:click', ({ e, x, y, node, view }) => {
|
this.graph.on('node:click', ({ e, x, y, node, view }) => {
|
||||||
reset();
|
reset();
|
||||||
node.attr('container/stroke', '#0b58ff');
|
node.attr('container/stroke', '#0b58ff');
|
||||||
const { detId, detName, detDesc, processId, sectionId, sectionName } = node.attrs;
|
const { detId, detName, detDesc, processId, sectionId, sectionName } =
|
||||||
this.currentDet = {}
|
node.attrs;
|
||||||
this.$set(this.currentDet, 'detId', detId.text)
|
console.log('node clicked!', node)
|
||||||
this.$set(this.currentDet, 'sectionId', sectionId.text)
|
this.currentDet = {};
|
||||||
this.$set(this.currentDet, 'detName', detName.text)
|
this.$set(this.currentDet, 'detId', detId?.text);
|
||||||
this.$set(this.currentDet, 'detDesc', detDesc.text)
|
this.$set(this.currentDet, 'sectionId', sectionId?.text);
|
||||||
this.$set(this.currentDet, 'flowId', processId.text)
|
this.$set(this.currentDet, 'detName', detName?.text);
|
||||||
this.$set(this.currentDet, 'sectionName', sectionName.text)
|
this.$set(this.currentDet, 'detDesc', detDesc?.text);
|
||||||
this.currentNode = node
|
this.$set(this.currentDet, 'flowId', processId?.text);
|
||||||
|
this.$set(this.currentDet, 'sectionName', sectionName?.text);
|
||||||
|
this.currentNode = node;
|
||||||
});
|
});
|
||||||
this.graph.on('edge:click', ({ e, x, y, edge, view }) => {
|
this.graph.on('edge:click', ({ e, x, y, edge, view }) => {
|
||||||
// console.log('edge clicked!', edge)
|
// console.log('edge clicked!', edge)
|
||||||
reset();
|
reset();
|
||||||
edge.attr('line/stroke', '#0b58ff')
|
edge.attr('line/stroke', '#0b58ff');
|
||||||
});
|
});
|
||||||
this.graph.on('blank:click', ({ e, x, y }) => {
|
this.graph.on('blank:click', ({ e, x, y }) => {
|
||||||
reset();
|
reset();
|
||||||
@ -219,30 +247,30 @@ export default {
|
|||||||
y: 0,
|
y: 0,
|
||||||
offset: { x: 0, y: 0 },
|
offset: { x: 0, y: 0 },
|
||||||
onClick: ({ e, cell, view }) => {
|
onClick: ({ e, cell, view }) => {
|
||||||
this.$confirm(
|
this.$confirm('确定删除这个工序吗?', '提示', {
|
||||||
'确定删除这个工序吗?',
|
|
||||||
'提示',
|
|
||||||
{
|
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning',
|
||||||
}
|
})
|
||||||
).then(async () => {
|
.then(async () => {
|
||||||
const id = node.attrs.detId.text;
|
const id = node.attrs.detId.text;
|
||||||
const status = await this.handleDelete(id);
|
const status = await this.handleDelete(id);
|
||||||
if (status) {
|
if (status) {
|
||||||
view.cell.remove();
|
view.cell.remove();
|
||||||
|
// 更新布局,不然下次打开删除的节点还在
|
||||||
|
this.handleUpdateLayout();
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
})
|
||||||
|
.catch((err) => {
|
||||||
return;
|
return;
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
this.graph.on('node:mouseleave', ({ node }) => {
|
this.graph.on('node:mouseleave', ({ node }) => {
|
||||||
node.removeTools();
|
node.removeTools();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
resetLayout() {
|
resetLayout() {
|
||||||
@ -250,13 +278,13 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
flowId: null,
|
flowId: null,
|
||||||
content: '',
|
content: '',
|
||||||
createTime: null
|
createTime: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
async loadLayout() {
|
async loadLayout() {
|
||||||
const flowId = this.$route.params.id;
|
const flowId = this.$route.params.id;
|
||||||
if (!flowId) return { cells: [] }
|
if (!flowId) return { cells: [] };
|
||||||
const { code, data } = await this.info({ id: flowId });
|
const { code, data } = await this.info({ id: flowId });
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
if (data) {
|
if (data) {
|
||||||
@ -282,17 +310,25 @@ export default {
|
|||||||
async handleUpdateLayout() {
|
async handleUpdateLayout() {
|
||||||
this.layout.content = JSON.stringify(this.graph.toJSON());
|
this.layout.content = JSON.stringify(this.graph.toJSON());
|
||||||
let code, data;
|
let code, data;
|
||||||
console.table([this.layout, this.$route.params.id])
|
console.table([this.layout, this.$route.params.id]);
|
||||||
// 手动刷新布局
|
// 手动刷新布局
|
||||||
if (this.layout.id) {
|
if (this.layout.id) {
|
||||||
({ code, data } = await this.http('/extend/process-flow-view/update', 'put', this.layout));
|
({ code, data } = await this.http(
|
||||||
|
'/extend/process-flow-view/update',
|
||||||
|
'put',
|
||||||
|
this.layout
|
||||||
|
));
|
||||||
} else {
|
} else {
|
||||||
this.layout.flowId = this.$route.params.id;
|
this.layout.flowId = this.$route.params.id;
|
||||||
({ code, data } = await this.http('/extend/process-flow-view/create', 'post', this.layout));
|
({ code, data } = await this.http(
|
||||||
|
'/extend/process-flow-view/create',
|
||||||
|
'post',
|
||||||
|
this.layout
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.$modal.msgSuccess('布局已刷新!')
|
this.$modal.msgSuccess('布局已刷新!');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -325,12 +361,11 @@ export default {
|
|||||||
this.title = '编辑工序';
|
this.title = '编辑工序';
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async handleDelete(id) {
|
async handleDelete(id) {
|
||||||
const { code, data } = await this.delete({ id });
|
const { code, data } = await this.delete({ id });
|
||||||
debugger;
|
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.$modal.msgSuccess('成功删除一个工序!');
|
this.$modal.msgSuccess('成功删除一个工序!');
|
||||||
return true;
|
return true;
|
||||||
@ -349,17 +384,17 @@ export default {
|
|||||||
this.updateProcess()
|
this.updateProcess()
|
||||||
.then((form) => {
|
.then((form) => {
|
||||||
const { name, sectionId, remark } = form;
|
const { name, sectionId, remark } = form;
|
||||||
getSectionFrom(sectionId).then(sectionName => {
|
getSectionFrom(sectionId).then((sectionName) => {
|
||||||
// 修改当前node的信息
|
// 修改当前node的信息
|
||||||
this.currentNode.setAttrs({
|
this.currentNode.setAttrs({
|
||||||
detName: { text: name },
|
detName: { text: name },
|
||||||
sectionId: { text: sectionId },
|
sectionId: { text: sectionId },
|
||||||
sectionName: { text: sectionName },
|
sectionName: { text: sectionName },
|
||||||
detDesc: { text: remark }
|
detDesc: { text: remark },
|
||||||
|
});
|
||||||
|
});
|
||||||
})
|
})
|
||||||
})
|
.catch((err) => {});
|
||||||
})
|
|
||||||
.catch(err => { });
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,19 +403,22 @@ export default {
|
|||||||
if (!id) return null;
|
if (!id) return null;
|
||||||
return createProcessNode({
|
return createProcessNode({
|
||||||
flowId: flowId,
|
flowId: flowId,
|
||||||
name, sectionId, remark,
|
name,
|
||||||
|
sectionId,
|
||||||
|
remark,
|
||||||
id,
|
id,
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}).then(node => {
|
.then((node) => {
|
||||||
if (!node) {
|
if (!node) {
|
||||||
this.$modal.msgError('创建节点失败');
|
this.$modal.msgError('创建节点失败');
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
this.graph.addNode(node);
|
this.graph.addNode(node);
|
||||||
}).catch(err => {
|
})
|
||||||
|
.catch((err) => {
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -390,14 +428,13 @@ export default {
|
|||||||
this.$modal.msgError('工艺ID不能为空');
|
this.$modal.msgError('工艺ID不能为空');
|
||||||
return Promise.reject('工艺ID不能为空');
|
return Promise.reject('工艺ID不能为空');
|
||||||
}
|
}
|
||||||
return this.put({ flowId, ...this.form })
|
return this.put({ flowId, ...this.form }).then(({ code, data }) => {
|
||||||
.then(({ code, data }) => {
|
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.$modal.msgSuccess('修改成功');
|
this.$modal.msgSuccess('修改成功');
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError('修改失败');
|
this.$modal.msgError('修改失败');
|
||||||
}
|
}
|
||||||
const formCopy = { ...this.form }
|
const formCopy = { ...this.form };
|
||||||
this.open = false;
|
this.open = false;
|
||||||
return formCopy;
|
return formCopy;
|
||||||
});
|
});
|
||||||
@ -410,21 +447,21 @@ export default {
|
|||||||
this.$modal.msgError('工艺ID不能为空');
|
this.$modal.msgError('工艺ID不能为空');
|
||||||
return Promise.reject('工艺ID不能为空');
|
return Promise.reject('工艺ID不能为空');
|
||||||
}
|
}
|
||||||
console.log('create process', this.form)
|
console.log('create process', this.form);
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
return this.post({ flowId, ...this.form }).then(
|
return this.post({ flowId, ...this.form })
|
||||||
({ code, data }) => {
|
.then(({ code, data }) => {
|
||||||
this.$modal.msgSuccess('新增成功');
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
// this.getList();
|
// this.getList();
|
||||||
return {
|
return {
|
||||||
id: data, // 服务器返回的新建的工段id
|
id: data, // 服务器返回的新建的工段id
|
||||||
...this.form, // 保存一份 this.form 副本,当 open->false 时 this.form 里的信息就清空了
|
...this.form, // 保存一份 this.form 副本,当 open->false 时 this.form 里的信息就清空了
|
||||||
flowId
|
flowId,
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
).catch(err => {
|
.catch((err) => {
|
||||||
this.$modal.msgError(err)
|
this.$modal.msgError(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -452,7 +489,7 @@ export default {
|
|||||||
method,
|
method,
|
||||||
params: method === 'get' ? payload : null,
|
params: method === 'get' ? payload : null,
|
||||||
data: method !== 'get' ? payload : null,
|
data: method !== 'get' ? payload : null,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
<DialogForm
|
<DialogForm
|
||||||
v-if="open"
|
v-if="open"
|
||||||
ref="form"
|
ref="form"
|
||||||
:dataForm="form"
|
v-model="form"
|
||||||
:rows="[
|
:rows="[
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<DialogForm
|
<DialogForm
|
||||||
v-if="open"
|
v-if="open"
|
||||||
ref="form"
|
ref="form"
|
||||||
:dataForm="form"
|
v-model="form"
|
||||||
:rows="[
|
:rows="[
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -208,7 +208,11 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
name: null,
|
||||||
|
code: undefined,
|
||||||
|
remark:undefined
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// watch: {
|
// watch: {
|
||||||
|
@ -246,7 +246,7 @@ export default {
|
|||||||
// 获取工段列表
|
// 获取工段列表
|
||||||
async getWorksectionList(plId) {
|
async getWorksectionList(plId) {
|
||||||
const response = await this.$axios(
|
const response = await this.$axios(
|
||||||
'/base/workshop-section/listByParentId',
|
'/base/core-workshop-section/listByParentId',
|
||||||
{
|
{
|
||||||
params: {
|
params: {
|
||||||
id: plId,
|
id: plId,
|
||||||
|
@ -13,9 +13,8 @@
|
|||||||
<!-- <pre><code v-html="jsondemo"></code></pre> -->
|
<!-- <pre><code v-html="jsondemo"></code></pre> -->
|
||||||
|
|
||||||
<el-skeleton v-if="initing" :rows="6" animated />
|
<el-skeleton v-if="initing" :rows="6" animated />
|
||||||
<div v-else :class="{ 'no-data-bg': !list || list.length == 0 }">
|
<div v-else >
|
||||||
<base-table
|
<base-table
|
||||||
v-if="list && list.length > 0"
|
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:page="queryParams.pageNo"
|
:page="queryParams.pageNo"
|
||||||
:limit="queryParams.pageSize"
|
:limit="queryParams.pageSize"
|
||||||
|
@ -72,6 +72,9 @@ export default {
|
|||||||
param: 'workOrderIdList',
|
param: 'workOrderIdList',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
multiple: true,
|
multiple: true,
|
||||||
|
labelField: 'name',
|
||||||
|
valueField: 'id',
|
||||||
|
defaultSelect: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -91,8 +94,8 @@ export default {
|
|||||||
label: '时间段',
|
label: '时间段',
|
||||||
dateType: 'daterange', // datetimerange
|
dateType: 'daterange', // datetimerange
|
||||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'timestamp',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始日期',
|
startPlaceholder: '开始日期',
|
||||||
endPlaceholder: '结束日期',
|
endPlaceholder: '结束日期',
|
||||||
@ -246,7 +249,11 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$route.query.woIdString) {
|
if (this.$route.query.woIdString) {
|
||||||
this.queryParams.workOrderIdList = this.$route.query.woIdString
|
console.log(this.$route.query.woIdString);
|
||||||
|
this.queryParams.workOrderIdList = [this.$route.query.woIdString]
|
||||||
|
// let arr =[]
|
||||||
|
this.searchBarFormConfig[0].defaultSelect = [this.$route.query.woIdString]
|
||||||
|
console.log(this.searchBarFormConfig[0].defaultSelect);
|
||||||
}
|
}
|
||||||
// if (this.$route.params.startTime && this.$route.params.endTime) {
|
// if (this.$route.params.startTime && this.$route.params.endTime) {
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [
|
// this.searchBarFormConfig[0].defaultSelect = [
|
||||||
@ -302,6 +309,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
|
console.log(this.queryParams);
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 执行查询
|
// 执行查询
|
||||||
const {
|
const {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-17 09:26:38
|
* @Date: 2023-10-17 09:26:38
|
||||||
* @LastEditTime: 2023-10-30 14:53:34
|
* @LastEditTime: 2023-11-16 18:52:00
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<doc-alert title="报表设计器" url="https://doc.iocoder.cn/report/" />
|
<!-- <doc-alert title="报表设计器" url="https://doc.iocoder.cn/report/" /> -->
|
||||||
<i-frame :src="url" />
|
<i-frame :src="url" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -17,9 +17,10 @@ import {getAccessToken} from "@/utils/auth";
|
|||||||
export default {
|
export default {
|
||||||
name: "JimuReport",
|
name: "JimuReport",
|
||||||
components: { iFrame },
|
components: { iFrame },
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: process.env.VUE_APP_BASE_API + "/jmreport/list?token=" + getAccessToken(),
|
url: process.env.VUE_APP_JIMU_API + "/jmreport/list?token=" + getAccessToken(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-17 09:52:17
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -130,6 +130,7 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:2
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-17 09:51:59
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -130,6 +130,7 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:5
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-17 09:51:44
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -130,6 +130,7 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:3
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-17 09:51:29
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -130,6 +130,7 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:4
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 13:52:10
|
* @Date: 2023-08-01 13:52:10
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-11-03 14:56:25
|
* @LastEditTime: 2023-11-17 09:50:55
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -130,6 +130,7 @@ export default {
|
|||||||
allowTime: 0,
|
allowTime: 0,
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
remark: '',
|
remark: '',
|
||||||
|
storageType:1
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [
|
||||||
|
Loading…
Reference in New Issue
Block a user