Compare commits
No commits in common. "1026a849f12975aa9be7f20bdeb9fddac2d37874" and "b38a79eca17eaed844b5000392e3079c67fd5268" have entirely different histories.
1026a849f1
...
b38a79eca1
3
.env.dev
3
.env.dev
@ -21,10 +21,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
|||||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.8: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.104:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
|
||||||
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||||
# socket地址
|
# socket地址
|
||||||
# dcs地址
|
# dcs地址
|
||||||
|
@ -62,7 +62,7 @@ export default {
|
|||||||
url,
|
url,
|
||||||
method,
|
method,
|
||||||
params: (method === 'get' || method === 'delete') ? payload : null,
|
params: (method === 'get' || method === 'delete') ? payload : null,
|
||||||
data: (method === 'get' || method === 'delete') ? null : payload
|
data: method !== 'get' ? payload : null,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
put(payload) {
|
put(payload) {
|
||||||
|
@ -1,266 +0,0 @@
|
|||||||
<!--
|
|
||||||
filename: dialogForm.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-09-11 15:55:13
|
|
||||||
description: DialogForm for equipmentBindSection only
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<el-form
|
|
||||||
ref="form"
|
|
||||||
:model="dataForm"
|
|
||||||
label-width="128px"
|
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="产线"
|
|
||||||
prop="productionLineId"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '产线不能为空', trigger: 'blur' },
|
|
||||||
]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.productionLineId"
|
|
||||||
placeholder="请选择产线"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
@change="handleProductlineChange">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in productionLineList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="工段"
|
|
||||||
prop="workshopSectionId"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '工段不能为空', trigger: 'blur' },
|
|
||||||
]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.workshopSectionId"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
placeholder="请选择工段"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in worksectionList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="设备"
|
|
||||||
prop="equipmentId"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '设备不能为空', trigger: 'blur' },
|
|
||||||
]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.equipmentId"
|
|
||||||
filterable
|
|
||||||
placeholder="请选择设备"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in equipmentList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="工段排序"
|
|
||||||
prop="sort"
|
|
||||||
:rules="[
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
trigger: 'change',
|
|
||||||
message: '请输入正确的数字类型',
|
|
||||||
transform: (val) => Number(val),
|
|
||||||
},
|
|
||||||
]">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.sort"
|
|
||||||
clearable
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入工段排序" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="产线统计类型"
|
|
||||||
prop="lineDataType"
|
|
||||||
:rules="[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '产线统计类型不能为空',
|
|
||||||
trigger: 'change',
|
|
||||||
},
|
|
||||||
]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.lineDataType"
|
|
||||||
placeholder="请选择产线统计类型"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in [
|
|
||||||
{ label: '无类型', value: 0 },
|
|
||||||
{ label: '进口统计', value: 1 },
|
|
||||||
{ label: '出口统计', value: 2 },
|
|
||||||
]"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="工段统计类型"
|
|
||||||
prop="sectionDataType"
|
|
||||||
:rules="[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '工段统计类型不能为空',
|
|
||||||
trigger: 'change',
|
|
||||||
},
|
|
||||||
]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.sectionDataType"
|
|
||||||
placeholder="请选择工段统计类型"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in [
|
|
||||||
{ label: '无类型', value: 0 },
|
|
||||||
{ label: '进口统计', value: 1 },
|
|
||||||
{ label: '出口统计', value: 2 },
|
|
||||||
]"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'DialogForm',
|
|
||||||
model: {
|
|
||||||
prop: 'dataForm',
|
|
||||||
event: 'update',
|
|
||||||
},
|
|
||||||
emits: ['update'],
|
|
||||||
components: {},
|
|
||||||
props: {
|
|
||||||
dataForm: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formLoading: true,
|
|
||||||
productionLineList: [],
|
|
||||||
equipmentList: [],
|
|
||||||
worksectionList: [],
|
|
||||||
dataFormCache: null,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
Promise.all([this.getProductLineList(), this.getEquipmentList()]).then(
|
|
||||||
() => {
|
|
||||||
this.formLoading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'dataForm.productionLineId': {
|
|
||||||
handler: async function (plId) {
|
|
||||||
if (plId) await this.getWorksectionList(plId);
|
|
||||||
},
|
|
||||||
immediate: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 模拟透传 ref */
|
|
||||||
validate(cb) {
|
|
||||||
return this.$refs.form.validate(cb);
|
|
||||||
},
|
|
||||||
resetFields(args) {
|
|
||||||
return this.$refs.form.resetFields(args);
|
|
||||||
},
|
|
||||||
async handleProductlineChange(id) {
|
|
||||||
await this.getWorksectionList(id);
|
|
||||||
this.dataForm.workshopSectionId = null;
|
|
||||||
this.$emit('update', this.dataForm);
|
|
||||||
},
|
|
||||||
// getCode
|
|
||||||
async getCode(url) {
|
|
||||||
const response = await this.$axios(url);
|
|
||||||
return response.data;
|
|
||||||
},
|
|
||||||
// 获取产线列表
|
|
||||||
async getProductLineList() {
|
|
||||||
const response = await this.$axios('/base/core-production-line/listAll');
|
|
||||||
this.productionLineList = response.data.map((item) => ({
|
|
||||||
label: item.name,
|
|
||||||
value: item.id,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
// 获取设备列表
|
|
||||||
async getEquipmentList() {
|
|
||||||
const response = await this.$axios(
|
|
||||||
// '/base/core-equipment/page?pageNo=1&pageSize=100'
|
|
||||||
'/base/core-equipment/listAll'
|
|
||||||
);
|
|
||||||
this.equipmentList = response.data.map((item) => ({
|
|
||||||
label: item.name,
|
|
||||||
value: item.id,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
// 获取工段列表
|
|
||||||
async getWorksectionList(plId) {
|
|
||||||
const response = await this.$axios(
|
|
||||||
'/base/core-workshop-section/listByParentId',
|
|
||||||
{
|
|
||||||
params: {
|
|
||||||
id: plId,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.worksectionList = response.data.map((item) => ({
|
|
||||||
label: item.name,
|
|
||||||
value: item.id,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.el-date-editor,
|
|
||||||
.el-select {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -50,13 +50,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import DialogForm from './dialogForm.vue';
|
|
||||||
|
|
||||||
// import { getAccessToken } from '@/utils/auth';
|
// import { getAccessToken } from '@/utils/auth';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EquipmentLineBind',
|
name: 'EquipmentLineBind',
|
||||||
components: { DialogForm },
|
components: {},
|
||||||
mixins: [basicPageMixin],
|
mixins: [basicPageMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -150,9 +149,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '产线',
|
label: '产线',
|
||||||
prop: 'productionLineId',
|
prop: 'productionLineId',
|
||||||
rules: [
|
rules: [{ required: true, message: '产线名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '产线名不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
url: '/base/core-production-line/listAll',
|
url: '/base/core-production-line/listAll',
|
||||||
bind: { clearable: true, filterable: true },
|
bind: { clearable: true, filterable: true },
|
||||||
// watch: 'workshopSectionId'
|
// watch: 'workshopSectionId'
|
||||||
@ -162,9 +159,7 @@ export default {
|
|||||||
label: '工段',
|
label: '工段',
|
||||||
prop: 'workshopSectionId',
|
prop: 'workshopSectionId',
|
||||||
depends: 'productionLineId',
|
depends: 'productionLineId',
|
||||||
rules: [
|
rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '工段不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
bind: { clearable: true, filterable: true },
|
bind: { clearable: true, filterable: true },
|
||||||
url: '/base/core-workshop-section/listByParentId',
|
url: '/base/core-workshop-section/listByParentId',
|
||||||
},
|
},
|
||||||
@ -174,9 +169,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
rules: [
|
rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备名不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
bind: { clearable: true, filterable: true },
|
bind: { clearable: true, filterable: true },
|
||||||
url: '/base/core-equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
},
|
},
|
||||||
@ -197,16 +190,9 @@ export default {
|
|||||||
label: '产线统计类型',
|
label: '产线统计类型',
|
||||||
prop: 'lineDataType',
|
prop: 'lineDataType',
|
||||||
bind: {
|
bind: {
|
||||||
clearable: true,
|
clearable: true, filterable: true
|
||||||
filterable: true,
|
|
||||||
},
|
},
|
||||||
rules: [
|
rules: [{ required: true, message: '产线统计类型不能为空', trigger: 'change' }],
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '产线统计类型不能为空',
|
|
||||||
trigger: 'change',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
@ -218,16 +204,9 @@ export default {
|
|||||||
label: '工段统计类型',
|
label: '工段统计类型',
|
||||||
prop: 'sectionDataType',
|
prop: 'sectionDataType',
|
||||||
bind: {
|
bind: {
|
||||||
clearable: true,
|
clearable: true, filterable: true
|
||||||
filterable: true,
|
|
||||||
},
|
},
|
||||||
rules: [
|
rules: [{ required: true, message: '工段统计类型不能为空', trigger: 'change' }],
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '工段统计类型不能为空',
|
|
||||||
trigger: 'change',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -356,21 +335,15 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm(
|
.confirm('是否确认删除绑定"' + row.name + '"?')
|
||||||
'是否确认删除绑定"' +
|
.then(function () {
|
||||||
(row.equipmentName == null ? '这条记录' : row.equipmentName) +
|
return deleteEquipmentType(id);
|
||||||
'"?'
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
return this.del({ id });
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess('删除成功');
|
this.$modal.msgSuccess('删除成功');
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch(() => {});
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="产线"
|
label="产线"
|
||||||
prop="productionLineId"
|
prop="productionLineId"
|
||||||
:rules="[
|
:rules="[{ required: true, message: '产线不能为空', trigger: 'blur' }]">
|
||||||
{ required: true, message: '产线不能为空', trigger: 'blur' },
|
|
||||||
]">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.productionLineId"
|
v-model="dataForm.productionLineId"
|
||||||
placeholder="请选择产线"
|
placeholder="请选择产线"
|
||||||
@ -37,9 +35,7 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="工段"
|
label="工段"
|
||||||
prop="workshopSectionId"
|
prop="workshopSectionId"
|
||||||
:rules="[
|
:rules="[{ required: true, message: '工段不能为空', trigger: 'blur' }]">
|
||||||
{ required: true, message: '工段不能为空', trigger: 'blur' },
|
|
||||||
]">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.workshopSectionId"
|
v-model="dataForm.workshopSectionId"
|
||||||
filterable
|
filterable
|
||||||
@ -59,9 +55,7 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="设备"
|
label="设备"
|
||||||
prop="equipmentId"
|
prop="equipmentId"
|
||||||
:rules="[
|
:rules="[{ required: true, message: '设备不能为空', trigger: 'blur' }]">
|
||||||
{ required: true, message: '设备不能为空', trigger: 'blur' },
|
|
||||||
]">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.equipmentId"
|
v-model="dataForm.equipmentId"
|
||||||
filterable
|
filterable
|
||||||
|
Loading…
Reference in New Issue
Block a user