projects/mesxc-zhp #161
							
								
								
									
										5
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								.env.dev
									
									
									
									
									
								
							@@ -16,7 +16,7 @@ VUE_APP_TITLE = MES系统
 | 
				
			|||||||
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: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.56:48082'
 | 
					# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
 | 
				
			||||||
@@ -31,9 +31,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
 | 
				
			|||||||
# 多租户的开关
 | 
					# 多租户的开关
 | 
				
			||||||
VUE_APP_TENANT_ENABLE = true
 | 
					VUE_APP_TENANT_ENABLE = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 验证码的开关
 | 
					 | 
				
			||||||
VUE_APP_CAPTCHA_ENABLE = true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# 文档的开关
 | 
					# 文档的开关
 | 
				
			||||||
VUE_APP_DOC_ENABLE = true
 | 
					VUE_APP_DOC_ENABLE = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,9 +14,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
 | 
				
			|||||||
# 多租户的开关
 | 
					# 多租户的开关
 | 
				
			||||||
VUE_APP_TENANT_ENABLE = true
 | 
					VUE_APP_TENANT_ENABLE = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 验证码的开关
 | 
					 | 
				
			||||||
VUE_APP_CAPTCHA_ENABLE = true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# 文档的开关
 | 
					# 文档的开关
 | 
				
			||||||
VUE_APP_DOC_ENABLE = true
 | 
					VUE_APP_DOC_ENABLE = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,9 +27,6 @@ PUBLIC_PATH = 'http://10.70.2.32'
 | 
				
			|||||||
# 多租户的开关
 | 
					# 多租户的开关
 | 
				
			||||||
VUE_APP_TENANT_ENABLE = true
 | 
					VUE_APP_TENANT_ENABLE = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 验证码的开关
 | 
					 | 
				
			||||||
VUE_APP_CAPTCHA_ENABLE = true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# 文档的开关
 | 
					# 文档的开关
 | 
				
			||||||
VUE_APP_DOC_ENABLE = false
 | 
					VUE_APP_DOC_ENABLE = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,9 +20,6 @@ PUBLIC_PATH = 'http://192.168.0.33:8889/'
 | 
				
			|||||||
# 多租户的开关
 | 
					# 多租户的开关
 | 
				
			||||||
VUE_APP_TENANT_ENABLE = true
 | 
					VUE_APP_TENANT_ENABLE = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 验证码的开关
 | 
					 | 
				
			||||||
VUE_APP_CAPTCHA_ENABLE = true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# 文档的开关
 | 
					# 文档的开关
 | 
				
			||||||
VUE_APP_DOC_ENABLE = false
 | 
					VUE_APP_DOC_ENABLE = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,9 +17,6 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/'
 | 
				
			|||||||
# 多租户的开关
 | 
					# 多租户的开关
 | 
				
			||||||
VUE_APP_TENANT_ENABLE = true
 | 
					VUE_APP_TENANT_ENABLE = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 验证码的开关
 | 
					 | 
				
			||||||
VUE_APP_CAPTCHA_ENABLE = true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# 文档的开关
 | 
					# 文档的开关
 | 
				
			||||||
VUE_APP_DOC_ENABLE = true
 | 
					VUE_APP_DOC_ENABLE = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,6 +18,15 @@ export function deliveryProgressPage(data) {
 | 
				
			|||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 获取订单列表
 | 
				
			||||||
 | 
					export function listOrderList(query) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/extend/delivery-log/listOrderList',
 | 
				
			||||||
 | 
					    method: 'get',
 | 
				
			||||||
 | 
					    params: query
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 获取发货进度分页
 | 
					// 获取发货进度分页
 | 
				
			||||||
export function deliveryLogDetPage(data) {
 | 
					export function deliveryLogDetPage(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-10-31 15:05:06
 | 
					 * @Date: 2023-10-31 15:05:06
 | 
				
			||||||
 * @LastEditTime: 2023-11-03 09:05:50
 | 
					 * @LastEditTime: 2023-11-28 09:28:05
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -24,6 +24,14 @@ export function getWorkOrderList(query) {
 | 
				
			|||||||
    params: query,
 | 
					    params: query,
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function getCoreProduct(id) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/base/core-product/get?id=' + id,
 | 
				
			||||||
 | 
					    method: 'get'
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 导出物料信息
 | 
					// 导出物料信息
 | 
				
			||||||
// export function exportEnergyPlcExcel(query) {
 | 
					// export function exportEnergyPlcExcel(query) {
 | 
				
			||||||
//   return request({
 | 
					//   return request({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -196,4 +196,8 @@ input, textarea{
 | 
				
			|||||||
  margin-right: 8px;
 | 
					  margin-right: 8px;
 | 
				
			||||||
  vertical-align: middle;
 | 
					  vertical-align: middle;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
// 抽屉head区域---end
 | 
					// 抽屉head区域---end
 | 
				
			||||||
 | 
					// 弹出框,上下分布,去掉label的padding-bottom
 | 
				
			||||||
 | 
					.el-form--label-top .el-form-item__label {
 | 
				
			||||||
 | 
					  padding: 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -187,19 +187,6 @@ export function getTenantEnable() {
 | 
				
			|||||||
  return process.env.VUE_APP_TENANT_ENABLE || true;
 | 
					  return process.env.VUE_APP_TENANT_ENABLE || true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * 获得验证码功能是否开启
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
export function getCaptchaEnable() {
 | 
					 | 
				
			||||||
  if (process.env.VUE_APP_CAPTCHA_ENABLE === "true") {
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  if (process.env.VUE_APP_CAPTCHA_ENABLE === "false") {
 | 
					 | 
				
			||||||
    return false;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  return process.env.VUE_APP_CAPTCHA_ENABLE || true;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 获得文档是否开启
 | 
					 * 获得文档是否开启
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,23 +2,23 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2021-11-18 14:16:25
 | 
					 * @Date: 2021-11-18 14:16:25
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @LastEditTime: 2023-11-24 18:20:26
 | 
					 * @LastEditTime: 2023-11-28 14:09:09
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<el-drawer
 | 
						<el-drawer
 | 
				
			||||||
		:visible.sync="visible"
 | 
							:visible.sync="visible"
 | 
				
			||||||
		:show-close="false"
 | 
							:show-close="false"
 | 
				
			||||||
		:wrapper-closable="false"
 | 
							:wrapper-closable="true"
 | 
				
			||||||
		class="drawer"
 | 
							class="drawer"
 | 
				
			||||||
		size="50%">
 | 
							size="50%">
 | 
				
			||||||
		<small-title slot="title" :no-padding="true">
 | 
							<small-title slot="title" :no-padding="true">
 | 
				
			||||||
			{{ '预使用主原料信息' }}
 | 
								{{ '工单名称:' + dataForm.name }}
 | 
				
			||||||
		</small-title>
 | 
							</small-title>
 | 
				
			||||||
		<div class="content">
 | 
							<div class="content">
 | 
				
			||||||
			<div style="height: 10vh">
 | 
								<!-- <div style="height: 10vh">
 | 
				
			||||||
				<div style="font-size: 18px;">工单名:{{ dataForm.name }}</div>
 | 
									<div style="font-size: 18px;">工单名:{{ dataForm.name }}</div>
 | 
				
			||||||
			</div>
 | 
								</div> -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<div class="attr-list">
 | 
								<div class="attr-list">
 | 
				
			||||||
				<small-title
 | 
									<small-title
 | 
				
			||||||
@@ -30,7 +30,7 @@
 | 
				
			|||||||
				<div class="action_btn">
 | 
									<div class="action_btn">
 | 
				
			||||||
					<template>
 | 
										<template>
 | 
				
			||||||
            <span style="display: inline-block;">
 | 
					            <span style="display: inline-block;">
 | 
				
			||||||
              <el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
 | 
					              <el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
 | 
				
			||||||
            </span>
 | 
					            </span>
 | 
				
			||||||
          </template>
 | 
					          </template>
 | 
				
			||||||
				</div>
 | 
									</div>
 | 
				
			||||||
@@ -55,9 +55,9 @@
 | 
				
			|||||||
					@pagination="getList" />
 | 
										@pagination="getList" />
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<div class="drawer-body__footer">
 | 
								<!-- <div class="drawer-body__footer">
 | 
				
			||||||
				<el-button type="primary" @click="goback()">关闭</el-button>
 | 
									<el-button type="primary" @click="goback()">关闭</el-button>
 | 
				
			||||||
			</div>
 | 
								</div> -->
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<attr-add
 | 
							<attr-add
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@
 | 
				
			|||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span='8'>
 | 
					      <el-col :span='8'>
 | 
				
			||||||
        <el-form-item label="产品名称" prop="planProductId">
 | 
					        <el-form-item label="产品名称" prop="planProductId">
 | 
				
			||||||
          <el-select v-model="dataForm.planProductId" placeholder="请选择产品" style="width: 100%;" @change="selectProduct">
 | 
					          <el-select v-model="dataForm.planProductId" placeholder="请选择产品" style="width: 100%;" filterable @change="selectProduct">
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in productList"
 | 
					              v-for="item in productList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
@@ -175,6 +175,7 @@ export default {
 | 
				
			|||||||
        planQuantity: 0,
 | 
					        planQuantity: 0,
 | 
				
			||||||
        processFlowId: '',
 | 
					        processFlowId: '',
 | 
				
			||||||
        materialMethod: 1,
 | 
					        materialMethod: 1,
 | 
				
			||||||
 | 
					        triggerOrigin: 1,
 | 
				
			||||||
        priority: '',
 | 
					        priority: '',
 | 
				
			||||||
        productLineIds: [],
 | 
					        productLineIds: [],
 | 
				
			||||||
        type: '',
 | 
					        type: '',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<el-dialog
 | 
						<el-dialog
 | 
				
			||||||
		:visible.sync="visible"
 | 
							:visible.sync="visible"
 | 
				
			||||||
		:width="'35%'"
 | 
							:width="'50%'"
 | 
				
			||||||
		:append-to-body="true"
 | 
							:append-to-body="true"
 | 
				
			||||||
		:close-on-click-modal="false"
 | 
							:close-on-click-modal="false"
 | 
				
			||||||
		class="dialog">
 | 
							class="dialog">
 | 
				
			||||||
@@ -17,73 +17,92 @@
 | 
				
			|||||||
			ref="dataForm"
 | 
								ref="dataForm"
 | 
				
			||||||
			:model="dataForm"
 | 
								:model="dataForm"
 | 
				
			||||||
			:rules="dataRule"
 | 
								:rules="dataRule"
 | 
				
			||||||
			label-width="100px"
 | 
								label-width="80px"
 | 
				
			||||||
			@keyup.enter.native="dataFormSubmit()">
 | 
								@keyup.enter.native="dataFormSubmit()">
 | 
				
			||||||
			<el-form-item label="原料" prop="material">
 | 
								<el-row :gutter="20">
 | 
				
			||||||
				<el-select
 | 
									<el-col :span="12">
 | 
				
			||||||
					v-model="dataForm.material"
 | 
										<el-form-item label="原料" prop="material">
 | 
				
			||||||
					filterable
 | 
											<el-select
 | 
				
			||||||
					style="width: 100%"
 | 
												v-model="dataForm.material"
 | 
				
			||||||
					placeholder="请选择原料">
 | 
												filterable
 | 
				
			||||||
					<el-option
 | 
												style="width: 100%"
 | 
				
			||||||
						v-for="dict in getDictDatas('material')"
 | 
												placeholder="请选择原料">
 | 
				
			||||||
						:key="dict.value"
 | 
												<el-option
 | 
				
			||||||
						:label="dict.label"
 | 
													v-for="dict in getDictDatas('material')"
 | 
				
			||||||
						:value="dict.value" />
 | 
													:key="dict.value"
 | 
				
			||||||
				</el-select>
 | 
													:label="dict.label"
 | 
				
			||||||
			</el-form-item>
 | 
													:value="dict.value" />
 | 
				
			||||||
			<el-form-item label="来源" prop="origin">
 | 
											</el-select>
 | 
				
			||||||
				<el-select
 | 
										</el-form-item>
 | 
				
			||||||
					v-model="dataForm.origin"
 | 
									</el-col>
 | 
				
			||||||
					filterable
 | 
									<el-col :span="12">
 | 
				
			||||||
					style="width: 100%"
 | 
										<el-form-item label="来源" prop="origin">
 | 
				
			||||||
					placeholder="请选择来源">
 | 
											<el-select
 | 
				
			||||||
					<el-option
 | 
												v-model="dataForm.origin"
 | 
				
			||||||
						v-for="dict in originList"
 | 
												filterable
 | 
				
			||||||
						:key="dict.value"
 | 
												style="width: 100%"
 | 
				
			||||||
						:label="dict.label"
 | 
												placeholder="请选择来源">
 | 
				
			||||||
						:value="dict.value" />
 | 
												<el-option
 | 
				
			||||||
				</el-select>
 | 
													v-for="dict in originList"
 | 
				
			||||||
			</el-form-item>
 | 
													:key="dict.value"
 | 
				
			||||||
			<el-form-item label="供应商" prop="supplierId">
 | 
													:label="dict.label"
 | 
				
			||||||
				<el-select
 | 
													:value="dict.value" />
 | 
				
			||||||
					v-model="dataForm.supplierId"
 | 
											</el-select>
 | 
				
			||||||
					filterable
 | 
										</el-form-item>
 | 
				
			||||||
					style="width: 100%"
 | 
									</el-col>
 | 
				
			||||||
					placeholder="请选择供应商">
 | 
								</el-row>
 | 
				
			||||||
					<el-option
 | 
								<el-row :gutter="20">
 | 
				
			||||||
						v-for="dict in supplierList"
 | 
									<el-col :span="12">
 | 
				
			||||||
						:key="dict.id"
 | 
										<el-form-item label="供应商" prop="supplierId">
 | 
				
			||||||
						:label="dict.name"
 | 
											<el-select
 | 
				
			||||||
						:value="dict.id" />
 | 
												v-model="dataForm.supplierId"
 | 
				
			||||||
				</el-select>
 | 
												filterable
 | 
				
			||||||
			</el-form-item>
 | 
												style="width: 100%"
 | 
				
			||||||
			<el-form-item label="批次号" prop="batch">
 | 
												placeholder="请选择供应商">
 | 
				
			||||||
				<el-input
 | 
												<el-option
 | 
				
			||||||
					v-model="dataForm.batch"
 | 
													v-for="dict in supplierList"
 | 
				
			||||||
					clearable
 | 
													:key="dict.id"
 | 
				
			||||||
					placeholder="请输入批次号" />
 | 
													:label="dict.name"
 | 
				
			||||||
			</el-form-item>
 | 
													:value="dict.id" />
 | 
				
			||||||
			<el-form-item label="数量" prop="num">
 | 
											</el-select>
 | 
				
			||||||
				<el-input-number
 | 
										</el-form-item>
 | 
				
			||||||
					v-model="dataForm.num"
 | 
									</el-col>
 | 
				
			||||||
					clearable
 | 
									<el-col :span="12">
 | 
				
			||||||
					style="width: 100%"
 | 
										<el-form-item label="批次号" prop="batch">
 | 
				
			||||||
					placeholder="请输入数量" />
 | 
											<el-input
 | 
				
			||||||
			</el-form-item>
 | 
												v-model="dataForm.batch"
 | 
				
			||||||
			<el-form-item label="单位" prop="unit">
 | 
												clearable
 | 
				
			||||||
				<el-select
 | 
												placeholder="请输入批次号" />
 | 
				
			||||||
					v-model="dataForm.unit"
 | 
										</el-form-item>
 | 
				
			||||||
					filterable
 | 
									</el-col>
 | 
				
			||||||
					style="width: 100%"
 | 
								</el-row>
 | 
				
			||||||
					placeholder="请选择单位">
 | 
								<el-row :gutter="20">
 | 
				
			||||||
					<el-option
 | 
									<el-col :span="12">
 | 
				
			||||||
						v-for="dict in getDictDatas('unit_dict')"
 | 
										<el-form-item label="数量" prop="num">
 | 
				
			||||||
						:key="dict.value"
 | 
											<el-input-number
 | 
				
			||||||
						:label="dict.label"
 | 
												v-model="dataForm.num"
 | 
				
			||||||
						:value="dict.value" />
 | 
												clearable
 | 
				
			||||||
				</el-select>
 | 
												controls-position="right"
 | 
				
			||||||
			</el-form-item>
 | 
												style="width: 100%"
 | 
				
			||||||
 | 
												placeholder="请输入数量" />
 | 
				
			||||||
 | 
										</el-form-item>
 | 
				
			||||||
 | 
									</el-col>
 | 
				
			||||||
 | 
									<el-col :span="12">
 | 
				
			||||||
 | 
										<el-form-item label="单位" prop="unit">
 | 
				
			||||||
 | 
											<el-select
 | 
				
			||||||
 | 
												v-model="dataForm.unit"
 | 
				
			||||||
 | 
												filterable
 | 
				
			||||||
 | 
												style="width: 100%"
 | 
				
			||||||
 | 
												placeholder="请选择单位">
 | 
				
			||||||
 | 
												<el-option
 | 
				
			||||||
 | 
													v-for="dict in getDictDatas('unit_dict')"
 | 
				
			||||||
 | 
													:key="dict.value"
 | 
				
			||||||
 | 
													:label="dict.label"
 | 
				
			||||||
 | 
													:value="dict.value" />
 | 
				
			||||||
 | 
											</el-select>
 | 
				
			||||||
 | 
										</el-form-item>
 | 
				
			||||||
 | 
									</el-col>
 | 
				
			||||||
 | 
								</el-row>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<el-row style="text-align: right">
 | 
							<el-row style="text-align: right">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@
 | 
				
			|||||||
			<method-btn
 | 
								<method-btn
 | 
				
			||||||
				v-if="tableBtn.length"
 | 
									v-if="tableBtn.length"
 | 
				
			||||||
				slot="handleBtn"
 | 
									slot="handleBtn"
 | 
				
			||||||
				:width="300"
 | 
									:width="350"
 | 
				
			||||||
				label="操作"
 | 
									label="操作"
 | 
				
			||||||
				:method-list="tableBtn"
 | 
									:method-list="tableBtn"
 | 
				
			||||||
				@clickBtn="handleClick" />
 | 
									@clickBtn="handleClick" />
 | 
				
			||||||
@@ -57,7 +57,8 @@ import {
 | 
				
			|||||||
	getCoreWOPage,
 | 
						getCoreWOPage,
 | 
				
			||||||
	deleteCoreWO,
 | 
						deleteCoreWO,
 | 
				
			||||||
	statusChange,
 | 
						statusChange,
 | 
				
			||||||
	getConOrderList
 | 
						getConOrderList,
 | 
				
			||||||
 | 
						getCoreWOList
 | 
				
			||||||
} from '@/api/base/coreWorkOrder';
 | 
					} from '@/api/base/coreWorkOrder';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -66,19 +67,26 @@ const tableProps = [
 | 
				
			|||||||
		prop: 'createTime',
 | 
							prop: 'createTime',
 | 
				
			||||||
		label: '创建时间',
 | 
							label: '创建时间',
 | 
				
			||||||
		filter: parseTime,
 | 
							filter: parseTime,
 | 
				
			||||||
		'show-overflow-tooltip': true
 | 
							minWidth: 150,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'name',
 | 
							prop: 'name',
 | 
				
			||||||
		label: '工单名称'
 | 
							label: '工单名称',
 | 
				
			||||||
 | 
							minWidth: 120,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'code',
 | 
							prop: 'code',
 | 
				
			||||||
		label: '工单编码'
 | 
							label: '工单编码',
 | 
				
			||||||
 | 
							minWidth: 150,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'workers',
 | 
							prop: 'workers',
 | 
				
			||||||
		label: '负责人'
 | 
							label: '负责人',
 | 
				
			||||||
 | 
							minWidth: 100,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'priority',
 | 
							prop: 'priority',
 | 
				
			||||||
@@ -88,7 +96,7 @@ const tableProps = [
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'triggerOrigin',
 | 
							prop: 'triggerOrigin',
 | 
				
			||||||
		label: '来源',
 | 
							label: '来源',
 | 
				
			||||||
		filter: (val) => ['', 'MES', 'ERP'][val]
 | 
							filter: (val) => ['', 'MES-手动', 'MES-订单下发', 'ERP'][val]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'status',
 | 
							prop: 'status',
 | 
				
			||||||
@@ -98,15 +106,19 @@ const tableProps = [
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'planFinishTime',
 | 
							prop: 'planFinishTime',
 | 
				
			||||||
		label: '计划完成时间',
 | 
							label: '计划完成时间',
 | 
				
			||||||
		filter: parseTime
 | 
							filter: parseTime,
 | 
				
			||||||
 | 
							minWidth: 150,
 | 
				
			||||||
 | 
							showOverflowtooltip: true
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'planQuantity',
 | 
							prop: 'planQuantity',
 | 
				
			||||||
		label: '计划生产数量'
 | 
							label: '计划生产数量',
 | 
				
			||||||
 | 
							minWidth: 120,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'actualQuantity',
 | 
							prop: 'actualQuantity',
 | 
				
			||||||
		label: '实际生产数量'
 | 
							label: '实际生产数量',
 | 
				
			||||||
 | 
							minWidth: 120,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -251,6 +263,16 @@ export default {
 | 
				
			|||||||
			].filter((v)=>v),
 | 
								].filter((v)=>v),
 | 
				
			||||||
			tableData: [],
 | 
								tableData: [],
 | 
				
			||||||
			formConfig: [
 | 
								formConfig: [
 | 
				
			||||||
 | 
									// {
 | 
				
			||||||
 | 
									// 	type: 'select',
 | 
				
			||||||
 | 
									// 	label: '工单名称',
 | 
				
			||||||
 | 
									// 	placeholder: '工单名称',
 | 
				
			||||||
 | 
									// 	param: 'name',
 | 
				
			||||||
 | 
									// 	defaultSelect: '',
 | 
				
			||||||
 | 
									// 	selectOptions: [],
 | 
				
			||||||
 | 
									// 	allowCreate: true,
 | 
				
			||||||
 | 
									// 	filterable: true
 | 
				
			||||||
 | 
									// },
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					type: 'input',
 | 
										type: 'input',
 | 
				
			||||||
					label: '工单名称',
 | 
										label: '工单名称',
 | 
				
			||||||
@@ -308,9 +330,20 @@ export default {
 | 
				
			|||||||
			this.listQuery.name = this.$route.query.workOrderName;
 | 
								this.listQuery.name = this.$route.query.workOrderName;
 | 
				
			||||||
			this.formConfig[0].defaultSelect = this.$route.query.workOrderName;
 | 
								this.formConfig[0].defaultSelect = this.$route.query.workOrderName;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							// this.getWorkOrder()
 | 
				
			||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							getWorkOrder() {
 | 
				
			||||||
 | 
								getCoreWOList().then(res => {
 | 
				
			||||||
 | 
									this.formConfig[0].selectOptions = res.data.map(item => {
 | 
				
			||||||
 | 
										return {
 | 
				
			||||||
 | 
											name: item.name,
 | 
				
			||||||
 | 
											id: item.name
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		refreshWorkOrder(val) {
 | 
							refreshWorkOrder(val) {
 | 
				
			||||||
			console.log(val)
 | 
								console.log(val)
 | 
				
			||||||
			if (val) {
 | 
								if (val) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2022-08-24 11:19:43
 | 
					 * @Date: 2022-08-24 11:19:43
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-11-01 10:30:12
 | 
					 * @LastEditTime: 2023-11-24 09:29:36
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
@@ -85,6 +85,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    //tableBtn点击
 | 
					    //tableBtn点击
 | 
				
			||||||
    handleClick(val) {
 | 
					    handleClick(val) {
 | 
				
			||||||
 | 
					      console.log(val.data.packagingCode);
 | 
				
			||||||
      if (val.type === "edit") {
 | 
					      if (val.type === "edit") {
 | 
				
			||||||
        this.addOrUpdateVisible = true;
 | 
					        this.addOrUpdateVisible = true;
 | 
				
			||||||
        this.addOrEditTitle = "编辑";
 | 
					        this.addOrEditTitle = "编辑";
 | 
				
			||||||
@@ -92,7 +93,7 @@ export default {
 | 
				
			|||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else if (val.type === "delete") {
 | 
					      } else if (val.type === "delete") {
 | 
				
			||||||
        this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
 | 
					        this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data.packagingCode )
 | 
				
			||||||
      } else if (val.type === "change") {
 | 
					      } else if (val.type === "change") {
 | 
				
			||||||
        this.changeStatus(val.data.id)
 | 
					        this.changeStatus(val.data.id)
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
@@ -101,7 +102,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 删除
 | 
					    // 删除
 | 
				
			||||||
    deleteHandle(id, name, index) {
 | 
					    deleteHandle(id, name, index) {
 | 
				
			||||||
      this.$confirm(`是否确认删除${name ? '[' + name + ']' : '[' + index + ']'}数据项?`, "提示", {
 | 
					      this.$confirm(`是否确认删除${name ? ' 名称为'+ name : '[' + index + ']'}数据项?`, "提示", {
 | 
				
			||||||
        confirmButtonText: "确定",
 | 
					        confirmButtonText: "确定",
 | 
				
			||||||
        cancelButtonText: "取消",
 | 
					        cancelButtonText: "取消",
 | 
				
			||||||
        type: "warning",
 | 
					        type: "warning",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2023-08-01 14:55:51
 | 
					 * @Date: 2023-08-01 14:55:51
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-11-22 14:40:59
 | 
					 * @LastEditTime: 2023-11-24 09:13:50
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -122,7 +122,8 @@ export default {
 | 
				
			|||||||
          selectOptions: [],
 | 
					          selectOptions: [],
 | 
				
			||||||
          labelField: 'name',
 | 
					          labelField: 'name',
 | 
				
			||||||
          valueField: 'id',
 | 
					          valueField: 'id',
 | 
				
			||||||
          param: 'workOrderId'
 | 
					          param: 'workOrderId',
 | 
				
			||||||
 | 
					          filterable: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          // parent: 'dateFilterType',
 | 
					          // parent: 'dateFilterType',
 | 
				
			||||||
@@ -214,6 +215,26 @@ export default {
 | 
				
			|||||||
        // this.listQuery.total = response.data.total;
 | 
					        // this.listQuery.total = response.data.total;
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    deleteHandle(id, name, index, packagingCode) {
 | 
				
			||||||
 | 
					      this.$confirm(`是否确认删除${'[' + packagingCode + ']'}数据项?`, "提示", {
 | 
				
			||||||
 | 
					        confirmButtonText: "确定",
 | 
				
			||||||
 | 
					        cancelButtonText: "取消",
 | 
				
			||||||
 | 
					        type: "warning",
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
 | 
					          this.urlOptions.deleteURL(id).then(({ data }) => {
 | 
				
			||||||
 | 
					            this.$message({
 | 
				
			||||||
 | 
					              message: "操作成功",
 | 
				
			||||||
 | 
					              type: "success",
 | 
				
			||||||
 | 
					              duration: 1500,
 | 
				
			||||||
 | 
					              onClose: () => {
 | 
				
			||||||
 | 
					                this.getDataList();
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    handlePrint(id) {
 | 
					    handlePrint(id) {
 | 
				
			||||||
      if (id) {
 | 
					      if (id) {
 | 
				
			||||||
        getPackingModel(id).then(res => {
 | 
					        getPackingModel(id).then(res => {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										270
									
								
								src/views/core/analysis/balanceAnalysis/index copy.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										270
									
								
								src/views/core/analysis/balanceAnalysis/index copy.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,270 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
						<div class="app-container">
 | 
				
			||||||
 | 
							<search-bar
 | 
				
			||||||
 | 
								:formConfigs="formConfig"
 | 
				
			||||||
 | 
								ref="searchBarForm"
 | 
				
			||||||
 | 
								@headBtnClick="buttonClick" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<div v-if="tableData.length">
 | 
				
			||||||
 | 
								<el-tabs
 | 
				
			||||||
 | 
									v-model="activeName"
 | 
				
			||||||
 | 
									@tab-click="handleTabClick"
 | 
				
			||||||
 | 
									style="height: 100%">
 | 
				
			||||||
 | 
									<el-tab-pane :label="'\u2002数据列表\u2002'" name="table">
 | 
				
			||||||
 | 
										<!-- @emitFun="handleEmitFun"> -->
 | 
				
			||||||
 | 
										<base-table
 | 
				
			||||||
 | 
											v-if="mode == 'table'"
 | 
				
			||||||
 | 
											:span-method="mergeColumnHandler"
 | 
				
			||||||
 | 
											:page="1"
 | 
				
			||||||
 | 
											:limit="999"
 | 
				
			||||||
 | 
											:table-props="tableProps"
 | 
				
			||||||
 | 
											:table-data="tableData" />
 | 
				
			||||||
 | 
									</el-tab-pane>
 | 
				
			||||||
 | 
									<el-tab-pane :label="'\u3000产线平衡分析图\u3000'" name="graph">
 | 
				
			||||||
 | 
										<div class="graph" style="height: 100%">
 | 
				
			||||||
 | 
											<!-- graph  -->
 | 
				
			||||||
 | 
											<!-- <Graph
 | 
				
			||||||
 | 
															v-if="list.length"
 | 
				
			||||||
 | 
															:equipment-list="list"
 | 
				
			||||||
 | 
															:render="renderKey" /> -->
 | 
				
			||||||
 | 
											<BalanceChart ref="lineChart" />
 | 
				
			||||||
 | 
											<div v-if="list.length == 0" class="no-data-bg"></div>
 | 
				
			||||||
 | 
										</div>
 | 
				
			||||||
 | 
									</el-tab-pane>
 | 
				
			||||||
 | 
								</el-tabs>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								<!-- <SearchBar :formConfigs="[{ label: '产线平衡分析图', type: 'title' }]" /> -->
 | 
				
			||||||
 | 
							</div>
 | 
				
			||||||
 | 
							<div v-else class="no-data-bg"></div>
 | 
				
			||||||
 | 
						</div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import { getCT } from '@/api/core/analysis/index';
 | 
				
			||||||
 | 
					import { getCorePLList } from '@/api/base/coreProductionLine';
 | 
				
			||||||
 | 
					import BalanceChart from '../balanceChart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
						components: {
 | 
				
			||||||
 | 
							BalanceChart,
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						// mixins: [basicPage],
 | 
				
			||||||
 | 
						data() {
 | 
				
			||||||
 | 
							return {
 | 
				
			||||||
 | 
								urlOptions: {
 | 
				
			||||||
 | 
									getDataListURL: getCT,
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								activeName: 'table',
 | 
				
			||||||
 | 
								tableProps: [],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								tableData: [],
 | 
				
			||||||
 | 
								listQuery: {
 | 
				
			||||||
 | 
									// time: ''
 | 
				
			||||||
 | 
									endTime: undefined,
 | 
				
			||||||
 | 
									lineId: undefined,
 | 
				
			||||||
 | 
									startTime: undefined,
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								timeList: [],
 | 
				
			||||||
 | 
								spanArr: [],
 | 
				
			||||||
 | 
								xData: [],
 | 
				
			||||||
 | 
								yData: [],
 | 
				
			||||||
 | 
								optionArrUrl: [getCorePLList],
 | 
				
			||||||
 | 
								formConfig: [
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										type: 'select',
 | 
				
			||||||
 | 
										label: '产线',
 | 
				
			||||||
 | 
										selectOptions: [],
 | 
				
			||||||
 | 
										param: 'lineIds',
 | 
				
			||||||
 | 
										defaultSelect: '',
 | 
				
			||||||
 | 
										multiple: false,
 | 
				
			||||||
 | 
										filterable: true,
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										type: 'datePicker',
 | 
				
			||||||
 | 
										label: '时间',
 | 
				
			||||||
 | 
										dateType: 'datetimerange',
 | 
				
			||||||
 | 
										format: 'yyyy-MM-dd',
 | 
				
			||||||
 | 
										valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
				
			||||||
 | 
										rangeSeparator: '-',
 | 
				
			||||||
 | 
										startPlaceholder: '开始时间',
 | 
				
			||||||
 | 
										endPlaceholder: '结束时间',
 | 
				
			||||||
 | 
										width: 350,
 | 
				
			||||||
 | 
										param: 'time',
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										type: 'button',
 | 
				
			||||||
 | 
										btnName: '查询',
 | 
				
			||||||
 | 
										name: 'search',
 | 
				
			||||||
 | 
										color: 'primary',
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								],
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						created() {
 | 
				
			||||||
 | 
							this.getArr();
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							handleTabClick(tab, event) {
 | 
				
			||||||
 | 
								if (tab.name == 'graph') this.renderKey = Math.random();
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							getArr() {
 | 
				
			||||||
 | 
								const params = {
 | 
				
			||||||
 | 
									page: 1,
 | 
				
			||||||
 | 
									limit: 500,
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
								this.optionArrUrl.forEach((item, index) => {
 | 
				
			||||||
 | 
									item(params).then((response) => {
 | 
				
			||||||
 | 
										this.formConfig[index].selectOptions = response.data;
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							setRowSpan(arr) {
 | 
				
			||||||
 | 
								let count = 0;
 | 
				
			||||||
 | 
								arr.forEach((item, index) => {
 | 
				
			||||||
 | 
									if (index === 0) {
 | 
				
			||||||
 | 
										this.spanArr.push(1);
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										if (item === arr[index - 1]) {
 | 
				
			||||||
 | 
											this.spanArr[count] += 1;
 | 
				
			||||||
 | 
											this.spanArr.push(0);
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											count = index;
 | 
				
			||||||
 | 
											this.spanArr.push(1);
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							/** 合并table列的规则 */
 | 
				
			||||||
 | 
							mergeColumnHandler({ row, column, rowIndex, columnIndex }) {
 | 
				
			||||||
 | 
								if (columnIndex == 0) {
 | 
				
			||||||
 | 
									if (this.spanArr[rowIndex]) {
 | 
				
			||||||
 | 
										return [
 | 
				
			||||||
 | 
											this.spanArr[rowIndex], // row span
 | 
				
			||||||
 | 
											1, // col span
 | 
				
			||||||
 | 
										];
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										return [0, 0];
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							getData() {
 | 
				
			||||||
 | 
								// this.listQuery.lineId = '1672847052717821953'
 | 
				
			||||||
 | 
								// this.listQuery.startTime = '1693497600000';
 | 
				
			||||||
 | 
								// this.listQuery.endTime = '1693843200000';
 | 
				
			||||||
 | 
								this.urlOptions.getDataListURL(this.listQuery).then((res) => {
 | 
				
			||||||
 | 
									console.log(res);
 | 
				
			||||||
 | 
									let arr = [
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											prop: 'sectionName',
 | 
				
			||||||
 | 
											label: '工段',
 | 
				
			||||||
 | 
											align: 'center',
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											prop: 'equName',
 | 
				
			||||||
 | 
											label: '设备',
 | 
				
			||||||
 | 
											align: 'center',
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
									];
 | 
				
			||||||
 | 
									let sectionArr = [];
 | 
				
			||||||
 | 
									res.data.data.forEach((ele, index) => {
 | 
				
			||||||
 | 
										let tempData = [];
 | 
				
			||||||
 | 
										let eqData = [];
 | 
				
			||||||
 | 
										let plData = [];
 | 
				
			||||||
 | 
										ele.data.forEach((item, index) => {
 | 
				
			||||||
 | 
											item.children.forEach((params) => {
 | 
				
			||||||
 | 
												if (params.dynamicName === '设备CT') {
 | 
				
			||||||
 | 
													tempData[item.dynamicName + '_eq'] = params.dynamicValue;
 | 
				
			||||||
 | 
													eqData[index] = params.dynamicValue;
 | 
				
			||||||
 | 
												} else {
 | 
				
			||||||
 | 
													tempData[item.dynamicName + '_pl'] = params.dynamicValue;
 | 
				
			||||||
 | 
													plData[index] = params.dynamicValue;
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										});
 | 
				
			||||||
 | 
										const equipment = {
 | 
				
			||||||
 | 
											name: ele.equName,
 | 
				
			||||||
 | 
											eqData: eqData,
 | 
				
			||||||
 | 
											plData: plData,
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										tempData['equName'] = ele.equName;
 | 
				
			||||||
 | 
										tempData['sectionName'] = ele.sectionName;
 | 
				
			||||||
 | 
										this.tableData.push(tempData);
 | 
				
			||||||
 | 
										const { sectionName } = tempData;
 | 
				
			||||||
 | 
										sectionArr.push(sectionName);
 | 
				
			||||||
 | 
										this.yData.push(equipment);
 | 
				
			||||||
 | 
										console.log('看看equ', this.yData);
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									this.setRowSpan(sectionArr);
 | 
				
			||||||
 | 
									res.data.nameData.forEach((item) => {
 | 
				
			||||||
 | 
										this.timeList.push(item.name);
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									const timeArray = Array.from(new Set(this.timeList));
 | 
				
			||||||
 | 
									for (const times of timeArray) {
 | 
				
			||||||
 | 
										if (times !== '设备CT' && times !== '产线CT') {
 | 
				
			||||||
 | 
											const subprop = {
 | 
				
			||||||
 | 
												label: times,
 | 
				
			||||||
 | 
												align: 'center',
 | 
				
			||||||
 | 
												children: [
 | 
				
			||||||
 | 
													{ prop: times + '_eq', label: '设备CT', align: 'center' },
 | 
				
			||||||
 | 
													{ prop: times + '_pl', label: '产线CT', align: 'center' },
 | 
				
			||||||
 | 
												],
 | 
				
			||||||
 | 
											};
 | 
				
			||||||
 | 
											arr.push(subprop);
 | 
				
			||||||
 | 
											this.xData.push(times);
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									this.tableProps = arr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									console.log('表格横坐标', this.xData, this.yData);
 | 
				
			||||||
 | 
									this.$nextTick(() => {
 | 
				
			||||||
 | 
										this.$refs.lineChart.initChart(this.xData, this.yData);
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									// this.total = response.data.total;
 | 
				
			||||||
 | 
									// this.dataListLoading = false;
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							buttonClick(val) {
 | 
				
			||||||
 | 
								// console.log(val)
 | 
				
			||||||
 | 
								switch (val.btnName) {
 | 
				
			||||||
 | 
									case 'search':
 | 
				
			||||||
 | 
										// this.listQuery.pageNo = 1;
 | 
				
			||||||
 | 
										// this.listQuery.pageSize = 10;
 | 
				
			||||||
 | 
										this.listQuery.lineId = val.lineIds;
 | 
				
			||||||
 | 
										this.listQuery.startTime = val.time
 | 
				
			||||||
 | 
											? String(new Date(val.time[0]).getTime())
 | 
				
			||||||
 | 
											: undefined;
 | 
				
			||||||
 | 
										this.listQuery.endTime = val.time
 | 
				
			||||||
 | 
											? String(new Date(val.time[1]).getTime())
 | 
				
			||||||
 | 
											: undefined;
 | 
				
			||||||
 | 
										if (val.time && val.lineIds) {
 | 
				
			||||||
 | 
											this.tableData = [];
 | 
				
			||||||
 | 
											this.xData = [];
 | 
				
			||||||
 | 
											this.yData = [];
 | 
				
			||||||
 | 
											this.tableProps = [];
 | 
				
			||||||
 | 
											this.spanArr = [];
 | 
				
			||||||
 | 
											this.timeList = [];
 | 
				
			||||||
 | 
											this.getData();
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.$message({
 | 
				
			||||||
 | 
												message: '请选择产线和时间',
 | 
				
			||||||
 | 
												type: 'warning',
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									case 'reset':
 | 
				
			||||||
 | 
										this.$refs.searchBarForm.resetForm();
 | 
				
			||||||
 | 
										this.listQuery = {
 | 
				
			||||||
 | 
											pageSize: 10,
 | 
				
			||||||
 | 
											pageNo: 1,
 | 
				
			||||||
 | 
											total: 1,
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										this.getDataList();
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									default:
 | 
				
			||||||
 | 
										console.log(val);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,137 +1,235 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
						<div class="app-container">
 | 
				
			||||||
    <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
							<search-bar
 | 
				
			||||||
    <div v-if="tableData.length">
 | 
								:formConfigs="formConfig"
 | 
				
			||||||
      <base-table v-loading="dataListLoading" :span-method="mergeColumnHandler" :table-props="tableProps" :table-data="tableData" />
 | 
								ref="searchBarForm"
 | 
				
			||||||
      <SearchBar :formConfigs="[{ label: '产线平衡分析图', type: 'title' }]" />
 | 
								@headBtnClick="handleSearchBarBtnClick" />
 | 
				
			||||||
      <BalanceChart ref="lineChart" />
 | 
					
 | 
				
			||||||
    </div>
 | 
							<!-- <div v-if="tableData.length"> -->
 | 
				
			||||||
    <div v-else class="no-data-bg"></div>
 | 
							<el-tabs
 | 
				
			||||||
    <!-- <pagination
 | 
								v-model="activeName"
 | 
				
			||||||
			:limit.sync="listQuery.pageSize"
 | 
								@tab-click="handleTabClick"
 | 
				
			||||||
			:page.sync="listQuery.pageNo"
 | 
								style="height: 100%">
 | 
				
			||||||
			:total="listQuery.total"
 | 
								<el-tab-pane :label="'\u2002数据列表\u2002'" name="table">
 | 
				
			||||||
			@pagination="getDataList" /> -->
 | 
									<!-- @emitFun="handleEmitFun"> -->
 | 
				
			||||||
  </div>
 | 
									<base-table
 | 
				
			||||||
 | 
										v-if="activeName == 'table'"
 | 
				
			||||||
 | 
										:span-method="mergeColumnHandler"
 | 
				
			||||||
 | 
										:page="1"
 | 
				
			||||||
 | 
										:limit="999"
 | 
				
			||||||
 | 
										:table-props="tableProps"
 | 
				
			||||||
 | 
										:table-data="tableData" />
 | 
				
			||||||
 | 
								</el-tab-pane>
 | 
				
			||||||
 | 
								<el-tab-pane :label="'\u3000产线平衡分析图\u3000'" name="graph">
 | 
				
			||||||
 | 
									<div class="graph" style="height: 100%">
 | 
				
			||||||
 | 
										<!-- graph  -->
 | 
				
			||||||
 | 
										<!-- <Graph
 | 
				
			||||||
 | 
															v-if="list.length"
 | 
				
			||||||
 | 
															:equipment-list="list"
 | 
				
			||||||
 | 
															:render="renderKey" /> -->
 | 
				
			||||||
 | 
										<!-- <BalanceChart ref="lineChart" /> -->
 | 
				
			||||||
 | 
										<div v-if="list.length == 0" class="no-data-bg"></div>
 | 
				
			||||||
 | 
									</div>
 | 
				
			||||||
 | 
								</el-tab-pane>
 | 
				
			||||||
 | 
							</el-tabs>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<!-- <SearchBar :formConfigs="[{ label: '产线平衡分析图', type: 'title' }]" /> -->
 | 
				
			||||||
 | 
							<!-- </div>
 | 
				
			||||||
 | 
							<div v-else class="no-data-bg"></div> -->
 | 
				
			||||||
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
// import basicPage from '../../mixins/basic-page';
 | 
					import BalanceChart from '../balanceChart';
 | 
				
			||||||
import { parseTime } from '../../mixins/code-filter';
 | 
					import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
				
			||||||
import { getCT } from '@/api/core/analysis/index';
 | 
					 | 
				
			||||||
import { getCorePLList } from '@/api/base/coreProductionLine';
 | 
					 | 
				
			||||||
import BalanceChart from '../balanceChart'
 | 
					 | 
				
			||||||
import { time } from 'echarts';
 | 
					 | 
				
			||||||
// import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// const tableProps = [
 | 
					 | 
				
			||||||
// 	// {
 | 
					 | 
				
			||||||
//   //   prop: 'lineName',
 | 
					 | 
				
			||||||
// 	// 	label: '产线',
 | 
					 | 
				
			||||||
// 	// 	align: 'center',
 | 
					 | 
				
			||||||
// 	// },
 | 
					 | 
				
			||||||
//   // {
 | 
					 | 
				
			||||||
//   //   prop: 'sum',
 | 
					 | 
				
			||||||
//   //   label: '合计',
 | 
					 | 
				
			||||||
//   //   align: 'center',
 | 
					 | 
				
			||||||
//   // },
 | 
					 | 
				
			||||||
//   // {
 | 
					 | 
				
			||||||
//   //   prop: 'dynamicValue',
 | 
					 | 
				
			||||||
//   //   label: 'dynamicName',
 | 
					 | 
				
			||||||
//   //   align: 'center',
 | 
					 | 
				
			||||||
//   //   children:[
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
//   //   ]
 | 
					 | 
				
			||||||
//   // }
 | 
					 | 
				
			||||||
// ];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: {
 | 
						components: {
 | 
				
			||||||
    BalanceChart
 | 
							BalanceChart,
 | 
				
			||||||
  },
 | 
						},
 | 
				
			||||||
  // mixins: [basicPage],
 | 
						mixins: [basicPageMixin],
 | 
				
			||||||
  data() {
 | 
						data() {
 | 
				
			||||||
    return {
 | 
							return {
 | 
				
			||||||
      urlOptions: {
 | 
								activeName: 'table',
 | 
				
			||||||
        getDataListURL: getCT,
 | 
								tableProps: [
 | 
				
			||||||
      },
 | 
									{
 | 
				
			||||||
      tableProps: [],
 | 
										prop: 'sectionName',
 | 
				
			||||||
      dataListLoading: false,
 | 
										label: '工段',
 | 
				
			||||||
      tableData: [],
 | 
										align: 'center',
 | 
				
			||||||
      listQuery: {
 | 
									},
 | 
				
			||||||
        // time: ''
 | 
									{
 | 
				
			||||||
        endTime: undefined,
 | 
										prop: 'equName',
 | 
				
			||||||
        lineId:undefined,
 | 
										label: '设备',
 | 
				
			||||||
        startTime:undefined
 | 
										align: 'center',
 | 
				
			||||||
      },
 | 
									},
 | 
				
			||||||
      timeList: [],
 | 
								],
 | 
				
			||||||
      spanArr: [], 
 | 
								tableData: [],
 | 
				
			||||||
      xData: [],
 | 
								formConfig: [
 | 
				
			||||||
      yData: [],
 | 
									{
 | 
				
			||||||
      optionArrUrl: [getCorePLList],
 | 
										type: 'select',
 | 
				
			||||||
      formConfig: [
 | 
										label: '产线',
 | 
				
			||||||
        {
 | 
										selectOptions: [],
 | 
				
			||||||
          type: 'select',
 | 
										param: 'lineIds',
 | 
				
			||||||
          label: '产线',
 | 
										defaultSelect: '',
 | 
				
			||||||
          selectOptions: [],
 | 
										multiple: false,
 | 
				
			||||||
          param: 'lineIds',
 | 
										filterable: true,
 | 
				
			||||||
          defaultSelect: '',
 | 
									},
 | 
				
			||||||
          multiple: false,
 | 
									{
 | 
				
			||||||
          filterable: true,
 | 
										type: 'datePicker',
 | 
				
			||||||
        },
 | 
										label: '时间',
 | 
				
			||||||
        {
 | 
										dateType: 'monthrange',
 | 
				
			||||||
          type: 'datePicker',
 | 
										format: 'yyyy-MM',
 | 
				
			||||||
          label: '时间',
 | 
										valueFormat: 'yyyy-MM-ddTHH:mm:ss',
 | 
				
			||||||
          dateType: 'datetimerange',
 | 
										rangeSeparator: '-',
 | 
				
			||||||
          format: 'yyyy-MM-dd',
 | 
										startPlaceholder: '开始时间',
 | 
				
			||||||
          valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
										endPlaceholder: '结束时间',
 | 
				
			||||||
          rangeSeparator: '-',
 | 
										width: 240,
 | 
				
			||||||
          startPlaceholder: '开始时间',
 | 
										param: 'timeArr',
 | 
				
			||||||
          endPlaceholder: '结束时间',
 | 
									},
 | 
				
			||||||
          width: 350,
 | 
									{
 | 
				
			||||||
          param: 'time',
 | 
										type: 'button',
 | 
				
			||||||
        },
 | 
										btnName: '查询',
 | 
				
			||||||
        {
 | 
										name: 'search',
 | 
				
			||||||
          type: 'button',
 | 
										color: 'primary',
 | 
				
			||||||
          btnName: '查询',
 | 
									},
 | 
				
			||||||
          name: 'search',
 | 
								],
 | 
				
			||||||
          color: 'primary',
 | 
								queryParams: {
 | 
				
			||||||
        }
 | 
									lineId: null,
 | 
				
			||||||
      ],
 | 
									startTime: null,
 | 
				
			||||||
    };
 | 
									endTime: null,
 | 
				
			||||||
  },
 | 
								},
 | 
				
			||||||
  created() {
 | 
							};
 | 
				
			||||||
    this.getArr();
 | 
						},
 | 
				
			||||||
  },
 | 
					
 | 
				
			||||||
  methods: {
 | 
						mounted() {
 | 
				
			||||||
    getArr() {
 | 
							this.getLine();
 | 
				
			||||||
      const params = {
 | 
						},
 | 
				
			||||||
        page: 1,
 | 
					
 | 
				
			||||||
        limit: 500
 | 
						methods: {
 | 
				
			||||||
      }
 | 
							handleTabClick(tab, event) {
 | 
				
			||||||
      this.optionArrUrl.forEach((item, index) => {
 | 
								if (tab.name == 'graph') this.renderKey = Math.random();
 | 
				
			||||||
        item(params).then((response) => {
 | 
							},
 | 
				
			||||||
          this.formConfig[index].selectOptions = response.data
 | 
					
 | 
				
			||||||
        });
 | 
							/** 初始化 tableProps */
 | 
				
			||||||
      });
 | 
							initTableProps() {
 | 
				
			||||||
    },
 | 
								this.tableProps = [
 | 
				
			||||||
    setRowSpan(arr) {
 | 
									{
 | 
				
			||||||
      let count = 0
 | 
										prop: 'sectionName',
 | 
				
			||||||
      arr.forEach((item, index) => {
 | 
										label: '工段',
 | 
				
			||||||
        if(index === 0) {
 | 
										align: 'center',
 | 
				
			||||||
          this.spanArr.push(1)
 | 
									},
 | 
				
			||||||
        } else {
 | 
									{
 | 
				
			||||||
          if (item === arr[index - 1]) {
 | 
										prop: 'equName',
 | 
				
			||||||
            this.spanArr[count] += 1
 | 
										label: '设备',
 | 
				
			||||||
            this.spanArr.push(0)
 | 
										align: 'center',
 | 
				
			||||||
          } else {
 | 
									},
 | 
				
			||||||
            count = index
 | 
								];
 | 
				
			||||||
            this.spanArr.push(1)
 | 
							},
 | 
				
			||||||
          }
 | 
					
 | 
				
			||||||
        }
 | 
							/** 获取产线 */
 | 
				
			||||||
      })
 | 
							async getLine() {
 | 
				
			||||||
    },
 | 
								this.formConfig[0].selectOptions = [];
 | 
				
			||||||
    /** 合并table列的规则 */
 | 
								const { code, data } = await this.http(
 | 
				
			||||||
 | 
									'/base/core-production-line/listAll',
 | 
				
			||||||
 | 
									'get'
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
 | 
								if (code == 0) {
 | 
				
			||||||
 | 
									this.formConfig[0].selectOptions = data;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/** 获取产线平衡数据 */
 | 
				
			||||||
 | 
							async getCT() {
 | 
				
			||||||
 | 
								const { code, data } = await this.http(
 | 
				
			||||||
 | 
									'/analysis/equipment-analysis/getCT',
 | 
				
			||||||
 | 
									'post',
 | 
				
			||||||
 | 
									this.queryParams
 | 
				
			||||||
 | 
								);
 | 
				
			||||||
 | 
								if (code == 0) {
 | 
				
			||||||
 | 
									return data;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								return { data: [], nameData: [] };
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/** 解析数据 */
 | 
				
			||||||
 | 
							async getList() {
 | 
				
			||||||
 | 
								const { data, nameData } = await this.getCT();
 | 
				
			||||||
 | 
								await this.buildProps(nameData);
 | 
				
			||||||
 | 
								await this.buildTableData(data);
 | 
				
			||||||
 | 
								const xxxx = this.tableData;
 | 
				
			||||||
 | 
								debugger;
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							buildProps(nameData) {
 | 
				
			||||||
 | 
								return new Promise((resolve, reject) => {
 | 
				
			||||||
 | 
									try {
 | 
				
			||||||
 | 
										const dateArr = Array.from(
 | 
				
			||||||
 | 
											new Set(
 | 
				
			||||||
 | 
												nameData
 | 
				
			||||||
 | 
													.map((item) => (item.tree == 1 ? item.name : undefined))
 | 
				
			||||||
 | 
													.filter((v) => v)
 | 
				
			||||||
 | 
											)
 | 
				
			||||||
 | 
										);
 | 
				
			||||||
 | 
										// 排个序
 | 
				
			||||||
 | 
										dateArr.sort().forEach((date) => {
 | 
				
			||||||
 | 
											this.tableProps.push({
 | 
				
			||||||
 | 
												label: date,
 | 
				
			||||||
 | 
												align: 'center',
 | 
				
			||||||
 | 
												children: [
 | 
				
			||||||
 | 
													{
 | 
				
			||||||
 | 
														prop: date + '_eq_ct',
 | 
				
			||||||
 | 
														label: '设备CT',
 | 
				
			||||||
 | 
														align: 'center',
 | 
				
			||||||
 | 
													},
 | 
				
			||||||
 | 
													{
 | 
				
			||||||
 | 
														prop: date + '_eq_tt',
 | 
				
			||||||
 | 
														label: '设备TT',
 | 
				
			||||||
 | 
														align: 'center',
 | 
				
			||||||
 | 
													},
 | 
				
			||||||
 | 
													{
 | 
				
			||||||
 | 
														prop: date + '_pl_ct',
 | 
				
			||||||
 | 
														label: '产线CT',
 | 
				
			||||||
 | 
														align: 'center',
 | 
				
			||||||
 | 
													},
 | 
				
			||||||
 | 
													{
 | 
				
			||||||
 | 
														prop: date + '_pl_tt',
 | 
				
			||||||
 | 
														label: '产线TT',
 | 
				
			||||||
 | 
														align: 'center',
 | 
				
			||||||
 | 
													},
 | 
				
			||||||
 | 
												],
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										resolve();
 | 
				
			||||||
 | 
									} catch (err) {
 | 
				
			||||||
 | 
										reject(err);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							async buildTableData(data) {
 | 
				
			||||||
 | 
								/** 处理 工段 分组  */
 | 
				
			||||||
 | 
								const sectionList = data.map((item) => {});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							setRowSpan(arr) {
 | 
				
			||||||
 | 
								let count = 0;
 | 
				
			||||||
 | 
								arr.forEach((item, index) => {
 | 
				
			||||||
 | 
									if (index === 0) {
 | 
				
			||||||
 | 
										this.spanArr.push(1);
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										if (item === arr[index - 1]) {
 | 
				
			||||||
 | 
											this.spanArr[count] += 1;
 | 
				
			||||||
 | 
											this.spanArr.push(0);
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											count = index;
 | 
				
			||||||
 | 
											this.spanArr.push(1);
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/** 合并table列的规则 */
 | 
				
			||||||
		mergeColumnHandler({ row, column, rowIndex, columnIndex }) {
 | 
							mergeColumnHandler({ row, column, rowIndex, columnIndex }) {
 | 
				
			||||||
			if (columnIndex == 0) {
 | 
								if (columnIndex == 0) {
 | 
				
			||||||
				if (this.spanArr[rowIndex]) {
 | 
									if (this.spanArr[rowIndex]) {
 | 
				
			||||||
@@ -144,119 +242,142 @@ export default {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
    getData() {
 | 
					 | 
				
			||||||
      // this.listQuery.lineId = '1672847052717821953'
 | 
					 | 
				
			||||||
      // this.listQuery.startTime = '1693497600000';
 | 
					 | 
				
			||||||
      // this.listQuery.endTime = '1693843200000';
 | 
					 | 
				
			||||||
      this.urlOptions.getDataListURL(this.listQuery).then(res => {
 | 
					 | 
				
			||||||
        console.log(res)
 | 
					 | 
				
			||||||
        let arr = [
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            prop: 'sectionName',
 | 
					 | 
				
			||||||
            label: '工段',
 | 
					 | 
				
			||||||
            align: 'center',
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            prop: 'equName',
 | 
					 | 
				
			||||||
            label: '设备',
 | 
					 | 
				
			||||||
            align: 'center',
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
        let sectionArr= []
 | 
					 | 
				
			||||||
        res.data.data.forEach((ele, index) => {
 | 
					 | 
				
			||||||
          let tempData = []
 | 
					 | 
				
			||||||
          let eqData = []
 | 
					 | 
				
			||||||
            let plData = []
 | 
					 | 
				
			||||||
          ele.data.forEach((item, index) => {
 | 
					 | 
				
			||||||
            item.children.forEach(params => {
 | 
					 | 
				
			||||||
              if (params.dynamicName === '设备CT') {
 | 
					 | 
				
			||||||
                tempData[item.dynamicName + '_eq'] = params.dynamicValue
 | 
					 | 
				
			||||||
                eqData[index] = params.dynamicValue
 | 
					 | 
				
			||||||
              } else {
 | 
					 | 
				
			||||||
                tempData[item.dynamicName + '_pl'] = params.dynamicValue
 | 
					 | 
				
			||||||
                plData[index] = params.dynamicValue
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
          })
 | 
					 | 
				
			||||||
          const equipment = {
 | 
					 | 
				
			||||||
            name: ele.equName,
 | 
					 | 
				
			||||||
            eqData: eqData,
 | 
					 | 
				
			||||||
            plData: plData
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
          tempData['equName'] = ele.equName
 | 
					 | 
				
			||||||
          tempData['sectionName'] = ele.sectionName
 | 
					 | 
				
			||||||
          this.tableData.push(tempData)
 | 
					 | 
				
			||||||
          const { sectionName } = tempData
 | 
					 | 
				
			||||||
          sectionArr.push(sectionName)
 | 
					 | 
				
			||||||
          this.yData.push(equipment)
 | 
					 | 
				
			||||||
          console.log('看看equ', this.yData)
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        this.setRowSpan(sectionArr)
 | 
					 | 
				
			||||||
        res.data.nameData.forEach(item => {
 | 
					 | 
				
			||||||
          this.timeList.push(item.name)
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        const timeArray = Array.from(new Set(this.timeList))
 | 
					 | 
				
			||||||
        for (const times of timeArray) {
 | 
					 | 
				
			||||||
          if (times !== '设备CT' && times !== '产线CT') {
 | 
					 | 
				
			||||||
            const subprop = {
 | 
					 | 
				
			||||||
              label: times,
 | 
					 | 
				
			||||||
              align: 'center',
 | 
					 | 
				
			||||||
              children: [
 | 
					 | 
				
			||||||
                { prop: times + '_eq', label: '设备CT', align: 'center' },
 | 
					 | 
				
			||||||
                { prop: times + '_pl', label: '产线CT', align: 'center' }
 | 
					 | 
				
			||||||
              ]
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            arr.push(subprop)
 | 
					 | 
				
			||||||
            this.xData.push(times)
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        this.tableProps = arr
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        console.log('表格横坐标', this.xData, this.yData)
 | 
							getData() {
 | 
				
			||||||
        this.$nextTick(() => {
 | 
								// this.listQuery.lineId = '1672847052717821953'
 | 
				
			||||||
          this.$refs.lineChart.initChart(this.xData, this.yData)
 | 
								// this.listQuery.startTime = '1693497600000';
 | 
				
			||||||
        })
 | 
								// this.listQuery.endTime = '1693843200000';
 | 
				
			||||||
        // this.total = response.data.total;
 | 
								this.urlOptions.getDataListURL(this.listQuery).then((res) => {
 | 
				
			||||||
        // this.dataListLoading = false;
 | 
									console.log(res);
 | 
				
			||||||
      });
 | 
									let arr = [
 | 
				
			||||||
    },
 | 
										{
 | 
				
			||||||
    buttonClick(val) {
 | 
											prop: 'sectionName',
 | 
				
			||||||
      // console.log(val)
 | 
											label: '工段',
 | 
				
			||||||
      switch (val.btnName) {
 | 
											align: 'center',
 | 
				
			||||||
        case 'search':
 | 
										},
 | 
				
			||||||
          // this.listQuery.pageNo = 1;
 | 
										{
 | 
				
			||||||
          // this.listQuery.pageSize = 10;
 | 
											prop: 'equName',
 | 
				
			||||||
          this.listQuery.lineId = val.lineIds
 | 
											label: '设备',
 | 
				
			||||||
          this.listQuery.startTime = val.time ? String(new Date(val.time[0]).getTime()) : undefined;
 | 
											align: 'center',
 | 
				
			||||||
          this.listQuery.endTime = val.time ? String(new Date(val.time[1]).getTime()) : undefined;
 | 
										},
 | 
				
			||||||
          if (val.time && val.lineIds) {
 | 
									];
 | 
				
			||||||
            this.tableData = []
 | 
									let sectionArr = [];
 | 
				
			||||||
            this.xData = []
 | 
									res.data.data.forEach((ele, index) => {
 | 
				
			||||||
            this.yData = []
 | 
										let tempData = [];
 | 
				
			||||||
            this.tableProps = []
 | 
										let eqData = [];
 | 
				
			||||||
            this.spanArr = []
 | 
										let plData = [];
 | 
				
			||||||
            this.timeList = []
 | 
										ele.data.forEach((item, index) => {
 | 
				
			||||||
            this.getData()
 | 
											item.children.forEach((params) => {
 | 
				
			||||||
          } else {
 | 
												if (params.dynamicName === '设备CT') {
 | 
				
			||||||
            this.$message({
 | 
													tempData[item.dynamicName + '_eq'] = params.dynamicValue;
 | 
				
			||||||
              message: '请选择产线和时间',
 | 
													eqData[index] = params.dynamicValue;
 | 
				
			||||||
              type: 'warning'
 | 
												} else {
 | 
				
			||||||
            });
 | 
													tempData[item.dynamicName + '_pl'] = params.dynamicValue;
 | 
				
			||||||
          }
 | 
													plData[index] = params.dynamicValue;
 | 
				
			||||||
          break;
 | 
												}
 | 
				
			||||||
        case 'reset':
 | 
											});
 | 
				
			||||||
          this.$refs.searchBarForm.resetForm();
 | 
										});
 | 
				
			||||||
          this.listQuery = {
 | 
										const equipment = {
 | 
				
			||||||
            pageSize: 10,
 | 
											name: ele.equName,
 | 
				
			||||||
            pageNo: 1,
 | 
											eqData: eqData,
 | 
				
			||||||
            total: 1,
 | 
											plData: plData,
 | 
				
			||||||
          };
 | 
										};
 | 
				
			||||||
          this.getDataList();
 | 
										tempData['equName'] = ele.equName;
 | 
				
			||||||
          break;
 | 
										tempData['sectionName'] = ele.sectionName;
 | 
				
			||||||
        default:
 | 
										this.tableData.push(tempData);
 | 
				
			||||||
          console.log(val);
 | 
										const { sectionName } = tempData;
 | 
				
			||||||
      }
 | 
										sectionArr.push(sectionName);
 | 
				
			||||||
    },
 | 
										this.yData.push(equipment);
 | 
				
			||||||
  },
 | 
										console.log('看看equ', this.yData);
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									this.setRowSpan(sectionArr);
 | 
				
			||||||
 | 
									res.data.nameData.forEach((item) => {
 | 
				
			||||||
 | 
										this.timeList.push(item.name);
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									const timeArray = Array.from(new Set(this.timeList));
 | 
				
			||||||
 | 
									for (const times of timeArray) {
 | 
				
			||||||
 | 
										if (times !== '设备CT' && times !== '产线CT') {
 | 
				
			||||||
 | 
											const subprop = {
 | 
				
			||||||
 | 
												label: times,
 | 
				
			||||||
 | 
												align: 'center',
 | 
				
			||||||
 | 
												children: [
 | 
				
			||||||
 | 
													{ prop: times + '_eq', label: '设备CT', align: 'center' },
 | 
				
			||||||
 | 
													{ prop: times + '_pl', label: '产线CT', align: 'center' },
 | 
				
			||||||
 | 
												],
 | 
				
			||||||
 | 
											};
 | 
				
			||||||
 | 
											arr.push(subprop);
 | 
				
			||||||
 | 
											this.xData.push(times);
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									this.tableProps = arr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									console.log('表格横坐标', this.xData, this.yData);
 | 
				
			||||||
 | 
									this.$nextTick(() => {
 | 
				
			||||||
 | 
										this.$refs.lineChart.initChart(this.xData, this.yData);
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									// this.total = response.data.total;
 | 
				
			||||||
 | 
									// this.dataListLoading = false;
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleSearchBarBtnClick(btn) {
 | 
				
			||||||
 | 
								switch (btn.btnName) {
 | 
				
			||||||
 | 
									case 'search':
 | 
				
			||||||
 | 
										this.queryParams.lineId = btn.lineIds || null;
 | 
				
			||||||
 | 
										this.queryParams.startTime = btn.timeArr ? btn.timeArr[0] : null;
 | 
				
			||||||
 | 
										this.queryParams.endTime = btn.timeArr ? btn.timeArr[1] : null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										if (!btn.lineIds || !btn.timeArr.length) {
 | 
				
			||||||
 | 
											this.$message({
 | 
				
			||||||
 | 
												message: '请选择产线和时间',
 | 
				
			||||||
 | 
												type: 'warning',
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										this.getList();
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							buttonClick(val) {
 | 
				
			||||||
 | 
								// console.log(val)
 | 
				
			||||||
 | 
								switch (val.btnName) {
 | 
				
			||||||
 | 
									case 'search':
 | 
				
			||||||
 | 
										// this.listQuery.pageNo = 1;
 | 
				
			||||||
 | 
										// this.listQuery.pageSize = 10;
 | 
				
			||||||
 | 
										this.listQuery.lineId = val.lineIds;
 | 
				
			||||||
 | 
										this.listQuery.startTime = val.time
 | 
				
			||||||
 | 
											? String(new Date(val.time[0]).getTime())
 | 
				
			||||||
 | 
											: undefined;
 | 
				
			||||||
 | 
										this.listQuery.endTime = val.time
 | 
				
			||||||
 | 
											? String(new Date(val.time[1]).getTime())
 | 
				
			||||||
 | 
											: undefined;
 | 
				
			||||||
 | 
										if (val.time && val.lineIds) {
 | 
				
			||||||
 | 
											this.tableData = [];
 | 
				
			||||||
 | 
											this.xData = [];
 | 
				
			||||||
 | 
											this.yData = [];
 | 
				
			||||||
 | 
											this.tableProps = [];
 | 
				
			||||||
 | 
											this.spanArr = [];
 | 
				
			||||||
 | 
											this.timeList = [];
 | 
				
			||||||
 | 
											this.getData();
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.$message({
 | 
				
			||||||
 | 
												message: '请选择产线和时间',
 | 
				
			||||||
 | 
												type: 'warning',
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									case 'reset':
 | 
				
			||||||
 | 
										this.$refs.searchBarForm.resetForm();
 | 
				
			||||||
 | 
										this.listQuery = {
 | 
				
			||||||
 | 
											pageSize: 10,
 | 
				
			||||||
 | 
											pageNo: 1,
 | 
				
			||||||
 | 
											total: 1,
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										this.getDataList();
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									default:
 | 
				
			||||||
 | 
										console.log(val);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
    <el-row :gutter="20">
 | 
					    <el-row :gutter="20">
 | 
				
			||||||
      <el-col :span='6'>
 | 
					      <el-col :span='6'>
 | 
				
			||||||
        <el-form-item label="订单名" prop="orderId">
 | 
					        <el-form-item label="订单名" prop="orderId">
 | 
				
			||||||
          <el-select v-model="form.orderId" placeholder="请选择" style="width: 100%;">
 | 
					          <el-select v-model="form.orderId" placeholder="请选择" style="width: 100%;" filterable>
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in orderList"
 | 
					              v-for="item in orderList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
@@ -39,7 +39,7 @@
 | 
				
			|||||||
    <el-row :gutter="20">
 | 
					    <el-row :gutter="20">
 | 
				
			||||||
      <el-col :span='6'>
 | 
					      <el-col :span='6'>
 | 
				
			||||||
        <el-form-item label="发货负责人" prop="deliveryPersonId">
 | 
					        <el-form-item label="发货负责人" prop="deliveryPersonId">
 | 
				
			||||||
          <el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;">
 | 
					          <el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;" filterable>
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in personList"
 | 
					              v-for="item in personList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
@@ -75,9 +75,8 @@
 | 
				
			|||||||
  </el-form>
 | 
					  </el-form>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { orderList } from '@/api/base/orderManage'
 | 
					 | 
				
			||||||
import { getWorkerList } from '@/api/base/worker'
 | 
					import { getWorkerList } from '@/api/base/worker'
 | 
				
			||||||
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog } from '@/api/base/delivery'
 | 
					import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'AddOrUpdate',
 | 
					  name: 'AddOrUpdate',
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
@@ -116,7 +115,7 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getSelectList() {
 | 
					    getSelectList() {
 | 
				
			||||||
      orderList().then(res => {
 | 
					      listOrderList().then(res => {
 | 
				
			||||||
        this.orderList = res.data || []
 | 
					        this.orderList = res.data || []
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      getWorkerList().then(res => {
 | 
					      getWorkerList().then(res => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-form ref="form" :rules="rules" label-width="100px" :model="form">
 | 
					  <el-form ref="form" :rules="rules" label-width="100px" :model="form">
 | 
				
			||||||
    <el-form-item label="关联表名" prop="plcId">
 | 
					    <el-form-item label="关联表名" prop="plcId">
 | 
				
			||||||
      <el-select v-model="form.plcId" placeholder="请选择" style="width: 100%;">
 | 
					      <el-select v-model="form.plcId" placeholder="请选择" style="width: 100%;" filterable>
 | 
				
			||||||
        <el-option
 | 
					        <el-option
 | 
				
			||||||
          v-for="item in plcList"
 | 
					          v-for="item in plcList"
 | 
				
			||||||
          :key="item.id"
 | 
					          :key="item.id"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
    <el-row>
 | 
					    <el-row>
 | 
				
			||||||
      <el-col :span="12">
 | 
					      <el-col :span="12">
 | 
				
			||||||
        <el-form-item label="能源类型" prop="typeId">
 | 
					        <el-form-item label="能源类型" prop="typeId">
 | 
				
			||||||
          <el-select v-model="form.typeId" placeholder="请选择" style="width: 100%;">
 | 
					          <el-select v-model="form.typeId" placeholder="请选择" style="width: 100%;" filterable>
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in energyListType"
 | 
					              v-for="item in energyListType"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@
 | 
				
			|||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="12">
 | 
					      <el-col :span="12">
 | 
				
			||||||
        <el-form-item label="能源类型" prop="energyTypeId">
 | 
					        <el-form-item label="能源类型" prop="energyTypeId">
 | 
				
			||||||
          <el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" @change="toggleType">
 | 
					          <el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable @change="toggleType">
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in this.energyTypeList"
 | 
					              v-for="item in this.energyTypeList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,7 +27,7 @@
 | 
				
			|||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="12">
 | 
					      <el-col :span="12">
 | 
				
			||||||
        <el-form-item label="能源类型" prop="energyTypeId">
 | 
					        <el-form-item label="能源类型" prop="energyTypeId">
 | 
				
			||||||
          <el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;">
 | 
					          <el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in energyListType"
 | 
					              v-for="item in energyListType"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,13 +54,15 @@ export default {
 | 
				
			|||||||
				alarmContent: null,
 | 
									alarmContent: null,
 | 
				
			||||||
				alarmValue: null,
 | 
									alarmValue: null,
 | 
				
			||||||
				// 缺少报警编号字段, 用 alarmValue 代替
 | 
									// 缺少报警编号字段, 用 alarmValue 代替
 | 
				
			||||||
 | 
									alarmCode: null,
 | 
				
			||||||
 | 
									equipmentCode: null
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			orderFormRows: [
 | 
								orderFormRows: [
 | 
				
			||||||
				[
 | 
									[
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						input: true,
 | 
											input: true,
 | 
				
			||||||
						label: '设备编码',
 | 
											label: '设备编码',
 | 
				
			||||||
						prop: 'equipment',
 | 
											prop: 'equipmentCode',
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						datetime: true,
 | 
											datetime: true,
 | 
				
			||||||
@@ -70,7 +72,7 @@ export default {
 | 
				
			|||||||
					{
 | 
										{
 | 
				
			||||||
						input: true,
 | 
											input: true,
 | 
				
			||||||
						label: '报警编号',
 | 
											label: '报警编号',
 | 
				
			||||||
						prop: 'alarmValue',
 | 
											prop: 'alarmCode',
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						input: true,
 | 
											input: true,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -151,7 +151,7 @@ export default {
 | 
				
			|||||||
					startPlaceholder: '开始日期',
 | 
										startPlaceholder: '开始日期',
 | 
				
			||||||
					endPlaceholder: '结束日期',
 | 
										endPlaceholder: '结束日期',
 | 
				
			||||||
					defaultTime: ['00:00:00', '23:59:59'],
 | 
										defaultTime: ['00:00:00', '23:59:59'],
 | 
				
			||||||
					param: 'recordTime',
 | 
										param: 'createTime',
 | 
				
			||||||
					// defaultSelect: [
 | 
										// defaultSelect: [
 | 
				
			||||||
					// 	new Date(y, m, d)
 | 
										// 	new Date(y, m, d)
 | 
				
			||||||
					// 		.toLocaleString()
 | 
										// 		.toLocaleString()
 | 
				
			||||||
@@ -206,7 +206,7 @@ export default {
 | 
				
			|||||||
				pageSize: 10,
 | 
									pageSize: 10,
 | 
				
			||||||
				lineId: null,
 | 
									lineId: null,
 | 
				
			||||||
				equipmentId: null,
 | 
									equipmentId: null,
 | 
				
			||||||
				recordTime: []
 | 
									recordTime: [],
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			basePath: '/base/equipment-alarm-log',
 | 
								basePath: '/base/equipment-alarm-log',
 | 
				
			||||||
			list: [],
 | 
								list: [],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -304,7 +304,7 @@ export default {
 | 
				
			|||||||
					filter: publicFormatter('unit_dict'),
 | 
										filter: publicFormatter('unit_dict'),
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					prop: 'equipment_param_type',
 | 
										prop: 'equipmentParamType',
 | 
				
			||||||
					label: '设备参数类型',
 | 
										label: '设备参数类型',
 | 
				
			||||||
					filter: (val) =>
 | 
										filter: (val) =>
 | 
				
			||||||
						val != null
 | 
											val != null
 | 
				
			||||||
@@ -312,7 +312,7 @@ export default {
 | 
				
			|||||||
							: '-',
 | 
												: '-',
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					prop: 'production_param_type',
 | 
										prop: 'productionParamType',
 | 
				
			||||||
					label: '生产参数类型',
 | 
										label: '生产参数类型',
 | 
				
			||||||
					filter: (val) =>
 | 
										filter: (val) =>
 | 
				
			||||||
						val != null
 | 
											val != null
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,7 +61,7 @@
 | 
				
			|||||||
									关联表名
 | 
														关联表名
 | 
				
			||||||
								</div>
 | 
													</div>
 | 
				
			||||||
								<div class="value" style="font-size: 14px">
 | 
													<div class="value" style="font-size: 14px">
 | 
				
			||||||
									{{ form.plcTableName }}
 | 
														{{ form.plcName }}
 | 
				
			||||||
								</div>
 | 
													</div>
 | 
				
			||||||
							</el-col>
 | 
												</el-col>
 | 
				
			||||||
						</el-row>
 | 
											</el-row>
 | 
				
			||||||
@@ -73,9 +73,17 @@
 | 
				
			|||||||
										class="title"
 | 
															class="title"
 | 
				
			||||||
										label="设备名"
 | 
															label="设备名"
 | 
				
			||||||
										style="font-size: 16px; margin: 8px 0">
 | 
															style="font-size: 16px; margin: 8px 0">
 | 
				
			||||||
										<el-input
 | 
															<el-select
 | 
				
			||||||
											v-model="form.equipmentName"
 | 
																v-model="form.equipmentId"
 | 
				
			||||||
											placeholder="请输入设备名"></el-input>
 | 
																filterable
 | 
				
			||||||
 | 
																clearable
 | 
				
			||||||
 | 
																placeholder="请选择设备">
 | 
				
			||||||
 | 
																<el-option
 | 
				
			||||||
 | 
																	v-for="eq in eqList"
 | 
				
			||||||
 | 
																	:key="eq.id"
 | 
				
			||||||
 | 
																	:label="eq.name"
 | 
				
			||||||
 | 
																	:value="eq.id"></el-option>
 | 
				
			||||||
 | 
															</el-select>
 | 
				
			||||||
									</el-form-item>
 | 
														</el-form-item>
 | 
				
			||||||
								</el-col>
 | 
													</el-col>
 | 
				
			||||||
								<el-col :span="8">
 | 
													<el-col :span="8">
 | 
				
			||||||
@@ -83,9 +91,17 @@
 | 
				
			|||||||
										class="title"
 | 
															class="title"
 | 
				
			||||||
										label="设备关联表名"
 | 
															label="设备关联表名"
 | 
				
			||||||
										style="font-size: 16px; margin: 8px 0">
 | 
															style="font-size: 16px; margin: 8px 0">
 | 
				
			||||||
										<el-input
 | 
															<el-select
 | 
				
			||||||
											v-model="form.plcTableName"
 | 
																v-model="form.plcId"
 | 
				
			||||||
											placeholder="请输入关联表名"></el-input>
 | 
																filterable
 | 
				
			||||||
 | 
																clearable
 | 
				
			||||||
 | 
																placeholder="请选择关联表">
 | 
				
			||||||
 | 
																<el-option
 | 
				
			||||||
 | 
																	v-for="plc in plcList"
 | 
				
			||||||
 | 
																	:key="plc.id"
 | 
				
			||||||
 | 
																	:label="plc.name"
 | 
				
			||||||
 | 
																	:value="plc.id"></el-option>
 | 
				
			||||||
 | 
															</el-select>
 | 
				
			||||||
									</el-form-item>
 | 
														</el-form-item>
 | 
				
			||||||
								</el-col>
 | 
													</el-col>
 | 
				
			||||||
							</el-form>
 | 
												</el-form>
 | 
				
			||||||
@@ -202,6 +218,8 @@ export default {
 | 
				
			|||||||
			total: 0,
 | 
								total: 0,
 | 
				
			||||||
			form: {},
 | 
								form: {},
 | 
				
			||||||
			list: [],
 | 
								list: [],
 | 
				
			||||||
 | 
								eqList: [],
 | 
				
			||||||
 | 
								plcList: [],
 | 
				
			||||||
			attrTitle: '',
 | 
								attrTitle: '',
 | 
				
			||||||
			attrForm: {
 | 
								attrForm: {
 | 
				
			||||||
				id: null,
 | 
									id: null,
 | 
				
			||||||
@@ -257,7 +275,7 @@ export default {
 | 
				
			|||||||
					{
 | 
										{
 | 
				
			||||||
						select: true,
 | 
											select: true,
 | 
				
			||||||
						label: '设备参数类型',
 | 
											label: '设备参数类型',
 | 
				
			||||||
						prop: 'equipment_param_type',
 | 
											prop: 'equipmentParamType',
 | 
				
			||||||
						options: [
 | 
											options: [
 | 
				
			||||||
							{ label: '一般参数', value: 1 },
 | 
												{ label: '一般参数', value: 1 },
 | 
				
			||||||
							{ label: '工艺参数', value: 2 },
 | 
												{ label: '工艺参数', value: 2 },
 | 
				
			||||||
@@ -274,7 +292,7 @@ export default {
 | 
				
			|||||||
					{
 | 
										{
 | 
				
			||||||
						select: true,
 | 
											select: true,
 | 
				
			||||||
						label: '生产参数类型',
 | 
											label: '生产参数类型',
 | 
				
			||||||
						prop: 'production_param_type',
 | 
											prop: 'productionParamType',
 | 
				
			||||||
						options: [
 | 
											options: [
 | 
				
			||||||
							// { label: '进片数量', value: 1 },
 | 
												// { label: '进片数量', value: 1 },
 | 
				
			||||||
							// { label: '出片数量', value: 2 },
 | 
												// { label: '出片数量', value: 2 },
 | 
				
			||||||
@@ -380,6 +398,17 @@ export default {
 | 
				
			|||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
		this.shouldRefreshPageView = false;
 | 
							this.shouldRefreshPageView = false;
 | 
				
			||||||
		this.mode = this.defaultMode || 'detail';
 | 
							this.mode = this.defaultMode || 'detail';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (this.mode != 'detail') {
 | 
				
			||||||
 | 
								this.$axios('/base/core-equipment/listAll').then(({ code, data }) => {
 | 
				
			||||||
 | 
									this.eqList = data;
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
								this.$axios({
 | 
				
			||||||
 | 
									url: '/base/equipment-plc/page',
 | 
				
			||||||
 | 
								}).then(({ code, data }) => {
 | 
				
			||||||
 | 
									this.plcList = data.list;
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		for (const section of this.sections) {
 | 
							for (const section of this.sections) {
 | 
				
			||||||
			// 请求具体信息
 | 
								// 请求具体信息
 | 
				
			||||||
			if ('url' in section) {
 | 
								if ('url' in section) {
 | 
				
			||||||
@@ -479,6 +508,8 @@ export default {
 | 
				
			|||||||
				defaultValue: '',
 | 
									defaultValue: '',
 | 
				
			||||||
				description: '',
 | 
									description: '',
 | 
				
			||||||
				remark: '',
 | 
									remark: '',
 | 
				
			||||||
 | 
									equipmentParamType: '',
 | 
				
			||||||
 | 
									productionParamType: '',
 | 
				
			||||||
				alarmContent: '',
 | 
									alarmContent: '',
 | 
				
			||||||
			};
 | 
								};
 | 
				
			||||||
			this.attrTitle = '添加参数绑定信息';
 | 
								this.attrTitle = '添加参数绑定信息';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,7 @@
 | 
				
			|||||||
		ref="drawer"
 | 
							ref="drawer"
 | 
				
			||||||
		:visible.sync="visible"
 | 
							:visible.sync="visible"
 | 
				
			||||||
		:show-close="false"
 | 
							:show-close="false"
 | 
				
			||||||
		:wrapper-closable="false"
 | 
							:wrapper-closable="isdetail"
 | 
				
			||||||
		class="drawer"
 | 
							class="drawer"
 | 
				
			||||||
		size="60%">
 | 
							size="60%">
 | 
				
			||||||
		<small-title slot="title" :no-padding="true">
 | 
							<small-title slot="title" :no-padding="true">
 | 
				
			||||||
@@ -85,6 +85,19 @@
 | 
				
			|||||||
							placeholder="选择巡检时间" />
 | 
												placeholder="选择巡检时间" />
 | 
				
			||||||
					</el-form-item>
 | 
										</el-form-item>
 | 
				
			||||||
				</el-col>
 | 
									</el-col>
 | 
				
			||||||
 | 
									<el-col :span="12">
 | 
				
			||||||
 | 
										<el-form-item label="数据来源" prop="origin">
 | 
				
			||||||
 | 
											<el-select
 | 
				
			||||||
 | 
												v-model="dataForm.origin"
 | 
				
			||||||
 | 
												filterable
 | 
				
			||||||
 | 
												:disabled="isdetail"
 | 
				
			||||||
 | 
												style="width: 100%"
 | 
				
			||||||
 | 
												placeholder="请选择数据来源">
 | 
				
			||||||
 | 
												<el-option key="1" label="手动" :value="1" />
 | 
				
			||||||
 | 
												<el-option key="2" label="自动" :value="2" />
 | 
				
			||||||
 | 
											</el-select>
 | 
				
			||||||
 | 
										</el-form-item>
 | 
				
			||||||
 | 
									</el-col>
 | 
				
			||||||
			</el-row>
 | 
								</el-row>
 | 
				
			||||||
			<el-form-item label="巡检内容">
 | 
								<el-form-item label="巡检内容">
 | 
				
			||||||
				<base-table
 | 
									<base-table
 | 
				
			||||||
@@ -102,12 +115,9 @@
 | 
				
			|||||||
			
 | 
								
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<div class="drawer-body__footer">
 | 
							<div v-if="!isdetail" class="drawer-body__footer">
 | 
				
			||||||
			<el-button type="primary" @click="goback()">{{ isdetail ? '关闭' : '取消' }}</el-button>
 | 
								<el-button type="primary" @click="goback()">取消</el-button>
 | 
				
			||||||
			<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
 | 
								<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
 | 
				
			||||||
				编辑
 | 
					 | 
				
			||||||
			</el-button> -->
 | 
					 | 
				
			||||||
			<el-button v-if="!isdetail" type="primary" @click="dataFormSubmit()">确定</el-button>
 | 
					 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
	</el-drawer>
 | 
						</el-drawer>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -174,6 +184,7 @@ export default {
 | 
				
			|||||||
				actualTime: undefined,
 | 
									actualTime: undefined,
 | 
				
			||||||
				responsible: undefined,
 | 
									responsible: undefined,
 | 
				
			||||||
				description: undefined,
 | 
									description: undefined,
 | 
				
			||||||
 | 
									origin: undefined,
 | 
				
			||||||
				files: []
 | 
									files: []
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			list: [],
 | 
								list: [],
 | 
				
			||||||
@@ -227,15 +238,6 @@ export default {
 | 
				
			|||||||
			return this.$refs.dataForm.resetFields(args);
 | 
								return this.$refs.dataForm.resetFields(args);
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		initData() {
 | 
							initData() {
 | 
				
			||||||
			this.dataForm = {
 | 
					 | 
				
			||||||
				id: undefined,
 | 
					 | 
				
			||||||
				configId: undefined,
 | 
					 | 
				
			||||||
				equipmentId: undefined,
 | 
					 | 
				
			||||||
				actualTime: undefined,
 | 
					 | 
				
			||||||
				responsible: undefined,
 | 
					 | 
				
			||||||
				description: undefined,
 | 
					 | 
				
			||||||
				files: []
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			this.list = []
 | 
								this.list = []
 | 
				
			||||||
			this.file = ''
 | 
								this.file = ''
 | 
				
			||||||
			this.fileName = ''
 | 
								this.fileName = ''
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,148 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
	<el-dialog
 | 
					 | 
				
			||||||
		:visible.sync="visible"
 | 
					 | 
				
			||||||
		:width="'35%'"
 | 
					 | 
				
			||||||
		:append-to-body="true"
 | 
					 | 
				
			||||||
		:close-on-click-modal="false"
 | 
					 | 
				
			||||||
		class="dialog">
 | 
					 | 
				
			||||||
		<template #title>
 | 
					 | 
				
			||||||
			<slot name="title">
 | 
					 | 
				
			||||||
				<div class="titleStyle">
 | 
					 | 
				
			||||||
					{{ !dataForm.id ? '新增' : '编辑' }}
 | 
					 | 
				
			||||||
				</div>
 | 
					 | 
				
			||||||
			</slot>
 | 
					 | 
				
			||||||
		</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		<el-form
 | 
					 | 
				
			||||||
			ref="dataForm"
 | 
					 | 
				
			||||||
			:model="dataForm"
 | 
					 | 
				
			||||||
			:rules="dataRule"
 | 
					 | 
				
			||||||
			label-width="100px"
 | 
					 | 
				
			||||||
			@keyup.enter.native="dataFormSubmit()">
 | 
					 | 
				
			||||||
			<el-form-item label="备品备件" prop="sparePartId">
 | 
					 | 
				
			||||||
				<el-select
 | 
					 | 
				
			||||||
					v-model="dataForm.sparePartId"
 | 
					 | 
				
			||||||
					filterable
 | 
					 | 
				
			||||||
					style="width: 100%"
 | 
					 | 
				
			||||||
					placeholder="请选择备品备件">
 | 
					 | 
				
			||||||
					<el-option
 | 
					 | 
				
			||||||
						v-for="dict in partList"
 | 
					 | 
				
			||||||
						:key="dict.id"
 | 
					 | 
				
			||||||
						:label="dict.name"
 | 
					 | 
				
			||||||
						:value="dict.id" />
 | 
					 | 
				
			||||||
				</el-select>
 | 
					 | 
				
			||||||
			</el-form-item>
 | 
					 | 
				
			||||||
		</el-form>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		<el-row style="text-align: right">
 | 
					 | 
				
			||||||
			<el-button @click="visible = false">取消</el-button>
 | 
					 | 
				
			||||||
			<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
 | 
					 | 
				
			||||||
		</el-row>
 | 
					 | 
				
			||||||
	</el-dialog>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import {
 | 
					 | 
				
			||||||
	createConfigDet,
 | 
					 | 
				
			||||||
	getSparePartList
 | 
					 | 
				
			||||||
} from  '@/api/equipment/base/spare-parts/config';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
	props: {
 | 
					 | 
				
			||||||
		configId: {
 | 
					 | 
				
			||||||
			type: String,
 | 
					 | 
				
			||||||
			default: '',
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	data() {
 | 
					 | 
				
			||||||
		return {
 | 
					 | 
				
			||||||
			visible: false,
 | 
					 | 
				
			||||||
			dataForm: {
 | 
					 | 
				
			||||||
				id: undefined,
 | 
					 | 
				
			||||||
				sparePartId: ''
 | 
					 | 
				
			||||||
			},
 | 
					 | 
				
			||||||
			partList: [],
 | 
					 | 
				
			||||||
			dataRule: {
 | 
					 | 
				
			||||||
				sparePartId: [{ required: true, message: '备品备件不能为空', trigger: 'change' }]
 | 
					 | 
				
			||||||
			},
 | 
					 | 
				
			||||||
		};
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	mounted() {
 | 
					 | 
				
			||||||
		this.getDict()
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	methods: {
 | 
					 | 
				
			||||||
		async getDict() {
 | 
					 | 
				
			||||||
			const res = await getSparePartList()
 | 
					 | 
				
			||||||
			this.partList = res.data
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
		init(id) {
 | 
					 | 
				
			||||||
			this.dataForm.id = id || '';
 | 
					 | 
				
			||||||
			this.visible = true;
 | 
					 | 
				
			||||||
			// this.$nextTick(() => {
 | 
					 | 
				
			||||||
			// 	this.$refs['dataForm'].resetFields();
 | 
					 | 
				
			||||||
			// 	if (this.dataForm.id) {
 | 
					 | 
				
			||||||
			// 		getCoreProductAttr({
 | 
					 | 
				
			||||||
			// 			id: this.dataForm.id
 | 
					 | 
				
			||||||
			// 		}).then((res) => {
 | 
					 | 
				
			||||||
			// 			const { name, value } = res.data;
 | 
					 | 
				
			||||||
			// 			this.dataForm.name = name;
 | 
					 | 
				
			||||||
			// 			this.dataForm.value = value;
 | 
					 | 
				
			||||||
			// 		});
 | 
					 | 
				
			||||||
			// 	}
 | 
					 | 
				
			||||||
			// });
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
		// 表单提交
 | 
					 | 
				
			||||||
		dataFormSubmit() {
 | 
					 | 
				
			||||||
			this.$refs['dataForm'].validate((valid) => {
 | 
					 | 
				
			||||||
				if (valid) {
 | 
					 | 
				
			||||||
					// 修改的提交
 | 
					 | 
				
			||||||
					// if (this.dataForm.id) {
 | 
					 | 
				
			||||||
					// 	updateCoreProductAttr({
 | 
					 | 
				
			||||||
					// 		...this.dataForm,
 | 
					 | 
				
			||||||
					// 		productId: this.productId,
 | 
					 | 
				
			||||||
					// 	}).then((response) => {
 | 
					 | 
				
			||||||
					// 		this.$modal.msgSuccess('修改成功');
 | 
					 | 
				
			||||||
					// 		this.visible = false;
 | 
					 | 
				
			||||||
					// 		this.$emit('refreshDataList');
 | 
					 | 
				
			||||||
					// 	});
 | 
					 | 
				
			||||||
					// 	return;
 | 
					 | 
				
			||||||
					// }
 | 
					 | 
				
			||||||
					// 添加的提交
 | 
					 | 
				
			||||||
					createConfigDet({
 | 
					 | 
				
			||||||
						...this.dataForm,
 | 
					 | 
				
			||||||
						configId: this.configId,
 | 
					 | 
				
			||||||
					}).then((response) => {
 | 
					 | 
				
			||||||
						this.$modal.msgSuccess('新增成功');
 | 
					 | 
				
			||||||
						this.visible = false;
 | 
					 | 
				
			||||||
						this.$emit('refreshDataList');
 | 
					 | 
				
			||||||
					});
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			});
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<style scoped>
 | 
					 | 
				
			||||||
.dialog >>> .el-dialog__body {
 | 
					 | 
				
			||||||
	padding: 30px 24px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.dialog >>> .el-dialog__header {
 | 
					 | 
				
			||||||
	font-size: 16px;
 | 
					 | 
				
			||||||
	color: rgba(0, 0, 0, 0.85);
 | 
					 | 
				
			||||||
	font-weight: 500;
 | 
					 | 
				
			||||||
	padding: 13px 24px;
 | 
					 | 
				
			||||||
	border-bottom: 1px solid #e9e9e9;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.dialog >>> .el-dialog__header .titleStyle::before {
 | 
					 | 
				
			||||||
	content: '';
 | 
					 | 
				
			||||||
	display: inline-block;
 | 
					 | 
				
			||||||
	width: 4px;
 | 
					 | 
				
			||||||
	height: 16px;
 | 
					 | 
				
			||||||
	background-color: #0b58ff;
 | 
					 | 
				
			||||||
	border-radius: 1px;
 | 
					 | 
				
			||||||
	margin-right: 8px;
 | 
					 | 
				
			||||||
	position: relative;
 | 
					 | 
				
			||||||
	top: 2px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
@@ -93,7 +93,7 @@ export default {
 | 
				
			|||||||
			tableProps: [
 | 
								tableProps: [
 | 
				
			||||||
				{ prop: 'configName', label: '配置名称' },
 | 
									{ prop: 'configName', label: '配置名称' },
 | 
				
			||||||
				{ prop: 'equipmentName', label: '设备名称' },
 | 
									{ prop: 'equipmentName', label: '设备名称' },
 | 
				
			||||||
				// { prop: 'lineName', label: '数据来源' },
 | 
									{ prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', '自动'][val] },
 | 
				
			||||||
				// { prop: 'sectionName', label: '计划巡检时间' },
 | 
									// { prop: 'sectionName', label: '计划巡检时间' },
 | 
				
			||||||
				{ prop: 'actualTime', label: '实际巡检时间', filter: parseTime },
 | 
									{ prop: 'actualTime', label: '实际巡检时间', filter: parseTime },
 | 
				
			||||||
				// { prop: 'maintenanceDetail', label: '完成状态' },
 | 
									// { prop: 'maintenanceDetail', label: '完成状态' },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,6 +17,8 @@
 | 
				
			|||||||
				<el-select
 | 
									<el-select
 | 
				
			||||||
					size="small"
 | 
										size="small"
 | 
				
			||||||
					placeholder="请选择产线"
 | 
										placeholder="请选择产线"
 | 
				
			||||||
 | 
										clearable 
 | 
				
			||||||
 | 
										filterable
 | 
				
			||||||
					@change="getEquipmentByLineId"
 | 
										@change="getEquipmentByLineId"
 | 
				
			||||||
					v-model="form.productionLineId">
 | 
										v-model="form.productionLineId">
 | 
				
			||||||
					<el-option
 | 
										<el-option
 | 
				
			||||||
@@ -30,6 +32,8 @@
 | 
				
			|||||||
				<el-select
 | 
									<el-select
 | 
				
			||||||
					size="small"
 | 
										size="small"
 | 
				
			||||||
					placeholder="请选择设备"
 | 
										placeholder="请选择设备"
 | 
				
			||||||
 | 
										clearable 
 | 
				
			||||||
 | 
										filterable
 | 
				
			||||||
					v-model="form.equipmentId">
 | 
										v-model="form.equipmentId">
 | 
				
			||||||
					<el-option
 | 
										<el-option
 | 
				
			||||||
						v-for="item in listEq"
 | 
											v-for="item in listEq"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2021-11-18 14:16:25
 | 
					 * @Date: 2021-11-18 14:16:25
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-11-22 16:50:55
 | 
					 * @LastEditTime: 2023-11-28 10:03:20
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -53,7 +53,7 @@
 | 
				
			|||||||
          </el-form-item>
 | 
					          </el-form-item>
 | 
				
			||||||
        </el-form>
 | 
					        </el-form>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div class="drawer-body__footer">
 | 
					      <div v-if="!isdetail" class="drawer-body__footer">
 | 
				
			||||||
        <el-button style="" @click="goback()">取消</el-button>
 | 
					        <el-button style="" @click="goback()">取消</el-button>
 | 
				
			||||||
        <el-button v-if="isdetail" type="primary" @click="goEdit()">
 | 
					        <el-button v-if="isdetail" type="primary" @click="goEdit()">
 | 
				
			||||||
          编辑
 | 
					          编辑
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,13 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2021-11-18 14:16:25
 | 
					 * @Date: 2021-11-18 14:16:25
 | 
				
			||||||
 | 
					<<<<<<< HEAD
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-11-28 10:09:20
 | 
				
			||||||
 | 
					=======
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @LastEditTime: 2023-11-27 16:37:17
 | 
					 * @LastEditTime: 2023-11-27 16:37:17
 | 
				
			||||||
 | 
					>>>>>>> projects/mes-test
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -140,7 +145,7 @@ const tableProps = [
 | 
				
			|||||||
    label: '最小值(工艺)',
 | 
					    label: '最小值(工艺)',
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'manValue',
 | 
					    prop: 'maxValue',
 | 
				
			||||||
    label: '最大值(工艺)',
 | 
					    label: '最大值(工艺)',
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-11-08 15:30:27
 | 
					 * @Date: 2023-11-08 15:30:27
 | 
				
			||||||
 * @LastEditTime: 2023-11-23 14:26:54
 | 
					 * @LastEditTime: 2023-11-28 10:11:40
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -84,7 +84,7 @@ export default {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      equipmentId:null,
 | 
					      equipmentId:null,
 | 
				
			||||||
			dataRule: {
 | 
								dataRule: {
 | 
				
			||||||
				attrName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
 | 
					        paramId: [{ required: true, message: '参数名称不能为空', trigger: 'change' }],
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -279,7 +279,7 @@ export default {
 | 
				
			|||||||
				.then(async () => {
 | 
									.then(async () => {
 | 
				
			||||||
					const { code } = await this.http(
 | 
										const { code } = await this.http(
 | 
				
			||||||
						'/extend/process-flow/copy',
 | 
											'/extend/process-flow/copy',
 | 
				
			||||||
						'post',
 | 
											'get',
 | 
				
			||||||
						{
 | 
											{
 | 
				
			||||||
							id,
 | 
												id,
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
@@ -333,10 +333,11 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		async getList() {
 | 
							async getList() {
 | 
				
			||||||
			this.loading = true;
 | 
								this.loading = true;
 | 
				
			||||||
			const { code, data } = await this.recv(this.queryParams);
 | 
								// const { code, data } = await this.recv(this.queryParams);
 | 
				
			||||||
 | 
								const { code, data } = await this.http('/extend/process-flow/listAll', 'get');
 | 
				
			||||||
			if (code == 0) {
 | 
								if (code == 0) {
 | 
				
			||||||
				this.list = data.list;
 | 
									this.list = data;
 | 
				
			||||||
				this.total = data.total;
 | 
									// this.total = data.total;
 | 
				
			||||||
				this.loading = false;
 | 
									this.loading = false;
 | 
				
			||||||
				return;
 | 
									return;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,7 +28,7 @@ export default {
 | 
				
			|||||||
	// },
 | 
						// },
 | 
				
			||||||
	props: {
 | 
						props: {
 | 
				
			||||||
		currentSelect: {
 | 
							currentSelect: {
 | 
				
			||||||
			type: String,
 | 
								type: String | Number,
 | 
				
			||||||
			default: null,
 | 
								default: null,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		list: {
 | 
							list: {
 | 
				
			||||||
@@ -59,8 +59,16 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		currentSelect: {
 | 
							currentSelect: {
 | 
				
			||||||
			handler(val) {
 | 
								handler(val) {
 | 
				
			||||||
 | 
									// val: string
 | 
				
			||||||
				this.selected = val;
 | 
									this.selected = val;
 | 
				
			||||||
				this.randomKey = Math.random();
 | 
									this.randomKey = Math.random();
 | 
				
			||||||
 | 
									// 更新选中状态
 | 
				
			||||||
 | 
									if (val) {
 | 
				
			||||||
 | 
										this.list__inner.forEach((item) => {
 | 
				
			||||||
 | 
											if (item.id == val) item.disabled = false;
 | 
				
			||||||
 | 
											else item.disabled = true;
 | 
				
			||||||
 | 
										});
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			immediate: true,
 | 
								immediate: true,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,7 @@
 | 
				
			|||||||
			</el-col>
 | 
								</el-col>
 | 
				
			||||||
		</el-row>
 | 
							</el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<el-row style="border: 1px solid #ccc; display: flex">
 | 
							<el-row v-if="filteredBomList.length" style="border: 1px solid #ccc; display: flex">
 | 
				
			||||||
			<el-col :span="8">
 | 
								<el-col :span="8">
 | 
				
			||||||
				<div class="select-list">
 | 
									<div class="select-list">
 | 
				
			||||||
					<div class="sl__header" style="background: #f3f4fb; padding: 12px">
 | 
										<div class="sl__header" style="background: #f3f4fb; padding: 12px">
 | 
				
			||||||
@@ -78,6 +78,7 @@
 | 
				
			|||||||
				</div>
 | 
									</div>
 | 
				
			||||||
			</el-col>
 | 
								</el-col>
 | 
				
			||||||
		</el-row>
 | 
							</el-row>
 | 
				
			||||||
 | 
							<div class="no-data-bg" v-else></div>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
;
 | 
					;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,6 +77,17 @@
 | 
				
			|||||||
				:bom-list="bomList"
 | 
									:bom-list="bomList"
 | 
				
			||||||
				:value="selectedBoms"
 | 
									:value="selectedBoms"
 | 
				
			||||||
				@update="selectedBoms = $event" />
 | 
									@update="selectedBoms = $event" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								<el-row slot="footer">
 | 
				
			||||||
 | 
									<el-button size="small" @click="cancel">取消</el-button>
 | 
				
			||||||
 | 
									<el-button
 | 
				
			||||||
 | 
										type="primary"
 | 
				
			||||||
 | 
										size="small"
 | 
				
			||||||
 | 
										@click="submitForm"
 | 
				
			||||||
 | 
										:loading="btnLoading">
 | 
				
			||||||
 | 
										确定
 | 
				
			||||||
 | 
									</el-button>
 | 
				
			||||||
 | 
								</el-row>
 | 
				
			||||||
		</base-dialog>
 | 
							</base-dialog>
 | 
				
			||||||
	</section>
 | 
						</section>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -95,6 +106,7 @@ export default {
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
 | 
								btnLoading: false,
 | 
				
			||||||
			open: false,
 | 
								open: false,
 | 
				
			||||||
			eqList: [],
 | 
								eqList: [],
 | 
				
			||||||
			bomList: [],
 | 
								bomList: [],
 | 
				
			||||||
@@ -170,6 +182,7 @@ export default {
 | 
				
			|||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		submitForm() {
 | 
							submitForm() {
 | 
				
			||||||
 | 
								this.btnLoading = true;
 | 
				
			||||||
			// 现将子组件的修改提交更新至本组件
 | 
								// 现将子组件的修改提交更新至本组件
 | 
				
			||||||
			this.$refs.bomSelector.commit();
 | 
								this.$refs.bomSelector.commit();
 | 
				
			||||||
			// 再提交至后端
 | 
								// 再提交至后端
 | 
				
			||||||
@@ -187,11 +200,14 @@ export default {
 | 
				
			|||||||
					if (code == 0) {
 | 
										if (code == 0) {
 | 
				
			||||||
						this.$message.success('操作成功');
 | 
											this.$message.success('操作成功');
 | 
				
			||||||
						this.getList(this.currentDet);
 | 
											this.getList(this.currentDet);
 | 
				
			||||||
 | 
											this.btnLoading = false;
 | 
				
			||||||
						this.cancel();
 | 
											this.cancel();
 | 
				
			||||||
					} else {
 | 
										} else {
 | 
				
			||||||
 | 
											this.btnLoading = false;
 | 
				
			||||||
						this.$message.error('操作失败');
 | 
											this.$message.error('操作失败');
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
 | 
										this.btnLoading = false;
 | 
				
			||||||
					this.$message.info('请选择设备');
 | 
										this.$message.info('请选择设备');
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
@@ -218,34 +234,45 @@ export default {
 | 
				
			|||||||
				this.total = 0;
 | 
									this.total = 0;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								this.selectedBoms = [];
 | 
				
			||||||
			// 获取设备及bom列表
 | 
								// 获取设备及bom列表
 | 
				
			||||||
			this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', {
 | 
								this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', {
 | 
				
			||||||
				sectionId,
 | 
									sectionId,
 | 
				
			||||||
				flowDetId: detId,
 | 
									flowDetId: detId,
 | 
				
			||||||
			}).then(({ code, data }) => {
 | 
								})
 | 
				
			||||||
				if (code == 0) {
 | 
									.then(({ code, data }) => {
 | 
				
			||||||
					this.bomList = data.map((eq) => {
 | 
										if (code == 0) {
 | 
				
			||||||
						eq.materialsBom = eq.materialsBom || [];
 | 
											this.bomList = data.map((eq) => {
 | 
				
			||||||
						eq.valuesBom = eq.valuesBom || [];
 | 
												eq.materialsBom = eq.materialsBom || [];
 | 
				
			||||||
						// 设置选中状态
 | 
												eq.valuesBom = eq.valuesBom || [];
 | 
				
			||||||
						eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
 | 
												// 设置选中状态
 | 
				
			||||||
						eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
 | 
												eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
 | 
				
			||||||
						if (eq.equChose || eq.materialsBom.chosen || eq.valuesBom.chosen) {
 | 
												eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
 | 
				
			||||||
							this.selectedBoms.push({
 | 
												if (
 | 
				
			||||||
								equipmentId: eq.id,
 | 
													eq.equChose ||
 | 
				
			||||||
								equMaterialBomId: eq.materialsBom.chosen,
 | 
													eq.materialsBom.chosen ||
 | 
				
			||||||
								equValueBomId: eq.valuesBom.chosen,
 | 
													eq.valuesBom.chosen
 | 
				
			||||||
							});
 | 
												) {
 | 
				
			||||||
						}
 | 
													this.selectedBoms.push({
 | 
				
			||||||
						// 设置设备id
 | 
														equipmentId: eq.id,
 | 
				
			||||||
						eq.materialsBom.equipmentId = eq.id;
 | 
														equMaterialBomId: eq.materialsBom.chosen,
 | 
				
			||||||
						eq.valuesBom.equipmentId = eq.id;
 | 
														equValueBomId: eq.valuesBom.chosen,
 | 
				
			||||||
						return eq;
 | 
													});
 | 
				
			||||||
					});
 | 
												}
 | 
				
			||||||
				} else {
 | 
												// 设置设备id
 | 
				
			||||||
 | 
												eq.materialsBom.equipmentId = eq.id;
 | 
				
			||||||
 | 
												eq.valuesBom.equipmentId = eq.id;
 | 
				
			||||||
 | 
												return eq;
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.bomList.splice(0);
 | 
				
			||||||
 | 
											this.selectedBoms = [];
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
									.catch((err) => {
 | 
				
			||||||
					this.bomList.splice(0);
 | 
										this.bomList.splice(0);
 | 
				
			||||||
				}
 | 
										this.selectedBoms = [];
 | 
				
			||||||
			});
 | 
									});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		async handleAddEquipment() {
 | 
							async handleAddEquipment() {
 | 
				
			||||||
			this.open = true;
 | 
								this.open = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -34,7 +34,7 @@
 | 
				
			|||||||
				class="btn-refresh"
 | 
									class="btn-refresh"
 | 
				
			||||||
				@click="handleUpdateLayout"
 | 
									@click="handleUpdateLayout"
 | 
				
			||||||
				icon="el-icon-refresh">
 | 
									icon="el-icon-refresh">
 | 
				
			||||||
				刷新布局
 | 
									保存布局
 | 
				
			||||||
			</el-button>
 | 
								</el-button>
 | 
				
			||||||
			<el-button
 | 
								<el-button
 | 
				
			||||||
				type="primary"
 | 
									type="primary"
 | 
				
			||||||
@@ -62,6 +62,16 @@
 | 
				
			|||||||
			@cancel="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" />
 | 
				
			||||||
 | 
								<el-row slot="footer">
 | 
				
			||||||
 | 
									<el-button size="small" @click="cancel">取消</el-button>
 | 
				
			||||||
 | 
									<el-button
 | 
				
			||||||
 | 
										type="primary"
 | 
				
			||||||
 | 
										size="small"
 | 
				
			||||||
 | 
										@click="submitForm"
 | 
				
			||||||
 | 
										:loading="btnLoading">
 | 
				
			||||||
 | 
										确定
 | 
				
			||||||
 | 
									</el-button>
 | 
				
			||||||
 | 
								</el-row>
 | 
				
			||||||
		</base-dialog>
 | 
							</base-dialog>
 | 
				
			||||||
	</section>
 | 
						</section>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -102,7 +112,9 @@ export default {
 | 
				
			|||||||
						input: true,
 | 
											input: true,
 | 
				
			||||||
						label: '工序名称',
 | 
											label: '工序名称',
 | 
				
			||||||
						prop: 'name',
 | 
											prop: 'name',
 | 
				
			||||||
						rules: [{ required: true, message: '工序名称不能为空', trigger: 'blur' }],
 | 
											rules: [
 | 
				
			||||||
 | 
												{ required: true, message: '工序名称不能为空', trigger: 'blur' },
 | 
				
			||||||
 | 
											],
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
				],
 | 
									],
 | 
				
			||||||
				[
 | 
									[
 | 
				
			||||||
@@ -111,7 +123,9 @@ export default {
 | 
				
			|||||||
						label: '工段',
 | 
											label: '工段',
 | 
				
			||||||
						prop: 'sectionId',
 | 
											prop: 'sectionId',
 | 
				
			||||||
						url: '/base/core-workshop-section/listAll',
 | 
											url: '/base/core-workshop-section/listAll',
 | 
				
			||||||
						rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
 | 
											rules: [
 | 
				
			||||||
 | 
												{ required: true, message: '工段不能为空', trigger: 'blur' },
 | 
				
			||||||
 | 
											],
 | 
				
			||||||
						bind: {
 | 
											bind: {
 | 
				
			||||||
							filterable: true,
 | 
												filterable: true,
 | 
				
			||||||
						},
 | 
											},
 | 
				
			||||||
@@ -139,6 +153,7 @@ export default {
 | 
				
			|||||||
			},
 | 
								},
 | 
				
			||||||
			currentDet: null,
 | 
								currentDet: null,
 | 
				
			||||||
			currentNode: null,
 | 
								currentNode: null,
 | 
				
			||||||
 | 
								btnLoading: false
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	watch: {
 | 
						watch: {
 | 
				
			||||||
@@ -221,7 +236,7 @@ export default {
 | 
				
			|||||||
				node.attr('container/stroke', '#0b58ff');
 | 
									node.attr('container/stroke', '#0b58ff');
 | 
				
			||||||
				const { detId, detName, detDesc, processId, sectionId, sectionName } =
 | 
									const { detId, detName, detDesc, processId, sectionId, sectionName } =
 | 
				
			||||||
					node.attrs;
 | 
										node.attrs;
 | 
				
			||||||
				console.log('node clicked!', node)
 | 
									console.log('node clicked!', node);
 | 
				
			||||||
				this.currentDet = {};
 | 
									this.currentDet = {};
 | 
				
			||||||
				this.$set(this.currentDet, 'detId', detId?.text);
 | 
									this.$set(this.currentDet, 'detId', detId?.text);
 | 
				
			||||||
				this.$set(this.currentDet, 'sectionId', sectionId?.text);
 | 
									this.$set(this.currentDet, 'sectionId', sectionId?.text);
 | 
				
			||||||
@@ -354,6 +369,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		handleEdit() {
 | 
							handleEdit() {
 | 
				
			||||||
 | 
								console.log('edit: ', this.currentDet);
 | 
				
			||||||
			this.form.name = this.currentDet.detName;
 | 
								this.form.name = this.currentDet.detName;
 | 
				
			||||||
			this.form.sectionId = this.currentDet.sectionId;
 | 
								this.form.sectionId = this.currentDet.sectionId;
 | 
				
			||||||
			this.form.remark = this.currentDet.detDesc;
 | 
								this.form.remark = this.currentDet.detDesc;
 | 
				
			||||||
@@ -379,6 +395,7 @@ export default {
 | 
				
			|||||||
				if (!valid) {
 | 
									if (!valid) {
 | 
				
			||||||
					return;
 | 
										return;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									this.btnLoading = true;
 | 
				
			||||||
				// 修改的提交
 | 
									// 修改的提交
 | 
				
			||||||
				if (this.form.id != null) {
 | 
									if (this.form.id != null) {
 | 
				
			||||||
					this.updateProcess()
 | 
										this.updateProcess()
 | 
				
			||||||
@@ -392,9 +409,20 @@ export default {
 | 
				
			|||||||
									sectionName: { text: sectionName },
 | 
														sectionName: { text: sectionName },
 | 
				
			||||||
									detDesc: { text: remark },
 | 
														detDesc: { text: remark },
 | 
				
			||||||
								});
 | 
													});
 | 
				
			||||||
 | 
													// 修改currentDet
 | 
				
			||||||
 | 
													this.currentDet = {
 | 
				
			||||||
 | 
														...this.currentDet,
 | 
				
			||||||
 | 
														detName: name,
 | 
				
			||||||
 | 
														sectionId: sectionId,
 | 
				
			||||||
 | 
														sectionName: sectionName,
 | 
				
			||||||
 | 
														detDesc: remark,
 | 
				
			||||||
 | 
													};
 | 
				
			||||||
 | 
													this.btnLoading = false;
 | 
				
			||||||
							});
 | 
												});
 | 
				
			||||||
						})
 | 
											})
 | 
				
			||||||
						.catch((err) => {});
 | 
											.catch((err) => {
 | 
				
			||||||
 | 
												this.btnLoading = false;
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
					return;
 | 
										return;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -412,11 +440,14 @@ export default {
 | 
				
			|||||||
					.then((node) => {
 | 
										.then((node) => {
 | 
				
			||||||
						if (!node) {
 | 
											if (!node) {
 | 
				
			||||||
							this.$modal.msgError('创建节点失败');
 | 
												this.$modal.msgError('创建节点失败');
 | 
				
			||||||
 | 
												this.btnLoading = false;
 | 
				
			||||||
							return;
 | 
												return;
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
 | 
											this.btnLoading = false;
 | 
				
			||||||
						this.graph.addNode(node);
 | 
											this.graph.addNode(node);
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
					.catch((err) => {
 | 
										.catch((err) => {
 | 
				
			||||||
 | 
											this.btnLoading = false;
 | 
				
			||||||
						return;
 | 
											return;
 | 
				
			||||||
					});
 | 
										});
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,12 +21,12 @@
 | 
				
			|||||||
			</el-col>
 | 
								</el-col>
 | 
				
			||||||
		</el-row>
 | 
							</el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<el-row :gutter="20" style="margin-top: 12px;">
 | 
							<el-row :gutter="20" style="margin-top: 12px">
 | 
				
			||||||
			<el-col :span="6">
 | 
								<el-col :span="6">
 | 
				
			||||||
				<!-- <InfoItem label="创建人" value="xxse" /> -->
 | 
									<!-- <InfoItem label="创建人" value="xxse" /> -->
 | 
				
			||||||
			</el-col>
 | 
								</el-col>
 | 
				
			||||||
			<el-col :span="6">
 | 
								<el-col :span="6">
 | 
				
			||||||
				<InfoItem label="创建时间" :value="form.createTime" />
 | 
									<InfoItem label="创建时间" :value="form.createTime" :time-format="true" />
 | 
				
			||||||
			</el-col>
 | 
								</el-col>
 | 
				
			||||||
			<el-col :span="6">
 | 
								<el-col :span="6">
 | 
				
			||||||
				<!-- <InfoItem label="更新人" value="xxse" /> -->
 | 
									<!-- <InfoItem label="更新人" value="xxse" /> -->
 | 
				
			||||||
@@ -39,11 +39,12 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					import moment from 'moment';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const InfoItem = {
 | 
					const InfoItem = {
 | 
				
			||||||
	name: 'InfoItem',
 | 
						name: 'InfoItem',
 | 
				
			||||||
	components: {},
 | 
						components: {},
 | 
				
			||||||
	props: ['label', 'value'],
 | 
						props: ['label', 'value', 'timeFormat'],
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {};
 | 
							return {};
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -52,9 +53,13 @@ const InfoItem = {
 | 
				
			|||||||
	render: function (h) {
 | 
						render: function (h) {
 | 
				
			||||||
		return (
 | 
							return (
 | 
				
			||||||
			<div style="display: flex; align-items: center; font-size: 14px; line-height: 1.5">
 | 
								<div style="display: flex; align-items: center; font-size: 14px; line-height: 1.5">
 | 
				
			||||||
				<span style="width: 100px; text-align: left; font-weight: 700">{this.label}:</span>
 | 
									<span style="width: 100px; text-align: left; font-weight: 700">
 | 
				
			||||||
 | 
										{this.label}:
 | 
				
			||||||
 | 
									</span>
 | 
				
			||||||
				<span style="width: 200px; text-align: left; text-overflow: ellipse; white-space: nowrap">
 | 
									<span style="width: 200px; text-align: left; text-overflow: ellipse; white-space: nowrap">
 | 
				
			||||||
					{this.value}
 | 
										{this.timeFormat
 | 
				
			||||||
 | 
											? moment(this.value).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
 | 
											: this.value}
 | 
				
			||||||
				</span>
 | 
									</span>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
@@ -77,12 +82,12 @@ export default {
 | 
				
			|||||||
				createTime: null,
 | 
									createTime: null,
 | 
				
			||||||
				remark: null,
 | 
									remark: null,
 | 
				
			||||||
				enable: null,
 | 
									enable: null,
 | 
				
			||||||
				code: null
 | 
									code: null,
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	activated() {
 | 
						activated() {
 | 
				
			||||||
		this.getInfo()
 | 
							this.getInfo();
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	computed: {},
 | 
						computed: {},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
@@ -93,7 +98,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,
 | 
				
			||||||
			})
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		put(payload) {
 | 
							put(payload) {
 | 
				
			||||||
			return this.http(this.updateUrl, 'put', payload);
 | 
								return this.http(this.updateUrl, 'put', payload);
 | 
				
			||||||
@@ -114,12 +119,12 @@ export default {
 | 
				
			|||||||
			// debugger;
 | 
								// debugger;
 | 
				
			||||||
			if (code == 0) {
 | 
								if (code == 0) {
 | 
				
			||||||
				this.form = {
 | 
									this.form = {
 | 
				
			||||||
					...data
 | 
										...data,
 | 
				
			||||||
				};
 | 
									};
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				this.$modal.msgError('工艺信息获取失败')
 | 
									this.$modal.msgError('工艺信息获取失败');
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2023-08-01 14:55:51
 | 
					 * @Date: 2023-08-01 14:55:51
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-11-22 14:23:40
 | 
					 * @LastEditTime: 2023-11-28 10:34:24
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -26,9 +26,10 @@ import { parseTime } from '../../core/mixins/code-filter';
 | 
				
			|||||||
import {
 | 
					import {
 | 
				
			||||||
  getProcessTraceabilityPage,
 | 
					  getProcessTraceabilityPage,
 | 
				
			||||||
  getWorkOrderList,
 | 
					  getWorkOrderList,
 | 
				
			||||||
 | 
					  getCoreProduct
 | 
				
			||||||
  // exportEnergyPlcExcel
 | 
					  // exportEnergyPlcExcel
 | 
				
			||||||
} from '@/api/quality/processTraceability';
 | 
					} from '@/api/quality/processTraceability';
 | 
				
			||||||
 | 
					import { publicFormatter } from '@/utils/dict';
 | 
				
			||||||
const tableProps = [
 | 
					const tableProps = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'name',
 | 
					    prop: 'name',
 | 
				
			||||||
@@ -44,7 +45,8 @@ const tableProps = [
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'status',
 | 
					    prop: 'status',
 | 
				
			||||||
    label: '状态'
 | 
					    label: '状态',
 | 
				
			||||||
 | 
					    filter: (val) => val == 1 ? '等待' : val == 2 ? '激活' : val == 3 ? '暂停' : val == 4 ? '完成' : '作废',
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'startProduceTime',
 | 
					    prop: 'startProduceTime',
 | 
				
			||||||
@@ -61,8 +63,9 @@ const tableProps = [
 | 
				
			|||||||
    label: '生产数量'
 | 
					    label: '生产数量'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'unit',
 | 
					    prop: 'planProductUnit',
 | 
				
			||||||
    label: '单位'
 | 
					    label: '单位',
 | 
				
			||||||
 | 
					    filter: publicFormatter('unit_dict')
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'processFlowName',
 | 
					    prop: 'processFlowName',
 | 
				
			||||||
@@ -113,7 +116,8 @@ export default {
 | 
				
			|||||||
          selectOptions: [],
 | 
					          selectOptions: [],
 | 
				
			||||||
          labelField: 'name',
 | 
					          labelField: 'name',
 | 
				
			||||||
          valueField: 'id',
 | 
					          valueField: 'id',
 | 
				
			||||||
          param: 'orderName'
 | 
					          param: 'orderName',
 | 
				
			||||||
 | 
					          filterable: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: 'datePicker',
 | 
					          type: 'datePicker',
 | 
				
			||||||
@@ -182,17 +186,25 @@ export default {
 | 
				
			|||||||
    handleClick(val) {
 | 
					    handleClick(val) {
 | 
				
			||||||
      if (val.type === "processDetail") {
 | 
					      if (val.type === "processDetail") {
 | 
				
			||||||
        console.log(val);
 | 
					        console.log(val);
 | 
				
			||||||
        this.$router.push({
 | 
					        let specificationsData =''
 | 
				
			||||||
          name: 'process-traceability-detail',
 | 
					        getCoreProduct(val.data.planProductId).then((res) => {
 | 
				
			||||||
          params: {
 | 
					          console.log(res)
 | 
				
			||||||
            id: '1715180991838887938',
 | 
					
 | 
				
			||||||
            orderId: val.data.id,
 | 
					          this.$router.push({
 | 
				
			||||||
            name: val.data.name,
 | 
					            path: 'process-traceability-detail',
 | 
				
			||||||
            productName: val.data.planProductName,
 | 
					            query: {
 | 
				
			||||||
            processFlowName: val.data.processFlowName
 | 
					              id: val.data.processFlowId,
 | 
				
			||||||
            // equipmentName,
 | 
					              orderId: val.data.id,
 | 
				
			||||||
          },
 | 
					              name: val.data.name,
 | 
				
			||||||
        });
 | 
					              specifications: res.data.specifications,
 | 
				
			||||||
 | 
					              productName: val.data.planProductName,
 | 
				
			||||||
 | 
					              processFlowName: val.data.processFlowName,
 | 
				
			||||||
 | 
					              // planProductId: val.data.planProductId
 | 
				
			||||||
 | 
					              // equipmentName,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
 | 
					        // this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,11 +117,11 @@ export default {
 | 
				
			|||||||
        // },
 | 
					        // },
 | 
				
			||||||
        { prop: 'name', label: '参数名' },
 | 
					        { prop: 'name', label: '参数名' },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'name', label: '设定范围最小- 最大 / 标准',
 | 
					          prop: 'status', label: '设定范围最小- 最大 / 标准',
 | 
				
			||||||
          subcomponent: StatusBtn
 | 
					          subcomponent: StatusBtn
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'code', label: '最小值',
 | 
					          prop: '', label: '最小值',
 | 
				
			||||||
          children: [
 | 
					          children: [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: 'minValueSet',
 | 
					              prop: 'minValueSet',
 | 
				
			||||||
@@ -134,7 +134,7 @@ export default {
 | 
				
			|||||||
          ]
 | 
					          ]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'code', label: '最大值',
 | 
					          prop: '', label: '最大值',
 | 
				
			||||||
          children: [
 | 
					          children: [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: 'maxValueSet',
 | 
					              prop: 'maxValueSet',
 | 
				
			||||||
@@ -184,9 +184,9 @@ export default {
 | 
				
			|||||||
      getDetMaterial({
 | 
					      getDetMaterial({
 | 
				
			||||||
        pageNo: 1,
 | 
					        pageNo: 1,
 | 
				
			||||||
        pageSize: 10,
 | 
					        pageSize: 10,
 | 
				
			||||||
        orderId: this.$route.params.orderId,
 | 
					        orderId: this.$route.query.orderId,
 | 
				
			||||||
        flowDetId: [this.detId],
 | 
					        flowDetId: [this.detId],
 | 
				
			||||||
        // orderId: this.$route.params.orderId,
 | 
					        // orderId: this.$route.query.orderId,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      },).then((res) => {
 | 
					      },).then((res) => {
 | 
				
			||||||
        console.log(res);
 | 
					        console.log(res);
 | 
				
			||||||
@@ -231,25 +231,29 @@ export default {
 | 
				
			|||||||
        getDetMaterial({
 | 
					        getDetMaterial({
 | 
				
			||||||
          pageNo: 1,
 | 
					          pageNo: 1,
 | 
				
			||||||
          pageSize: 10,
 | 
					          pageSize: 10,
 | 
				
			||||||
          orderId: this.$route.params.orderId,
 | 
					          orderId: this.$route.query.orderId,
 | 
				
			||||||
          flowDetId: [this.detId],
 | 
					          flowDetId: [this.detId],
 | 
				
			||||||
          // orderId: this.$route.params.orderId,
 | 
					          // orderId: this.$route.query.orderId,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        },).then((res) => {
 | 
					        },).then((res) => {
 | 
				
			||||||
          this.materialList = res.data[0].data
 | 
					          if (res.data.length != []) {
 | 
				
			||||||
          this.name = res.data[0].name
 | 
					            this.materialList = res.data[0].data
 | 
				
			||||||
 | 
					            this.name = res.data[0].name
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        getDetValue({
 | 
					        getDetValue({
 | 
				
			||||||
          pageNo: 1,
 | 
					          pageNo: 1,
 | 
				
			||||||
          pageSize: 10,
 | 
					          pageSize: 10,
 | 
				
			||||||
          orderId: this.$route.params.orderId,
 | 
					          orderId: this.$route.query.orderId,
 | 
				
			||||||
          flowDetId: [this.detId],
 | 
					          flowDetId: [this.detId],
 | 
				
			||||||
          // orderId: this.$route.params.orderId,
 | 
					          // orderId: this.$route.query.orderId,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }).then((res) => {
 | 
					        }).then((res) => {
 | 
				
			||||||
          this.valueList = res.data[0].data
 | 
					          if (res.data.length != []) {
 | 
				
			||||||
          this.name = res.data[0].name
 | 
					            this.valueList = res.data[0].data
 | 
				
			||||||
 | 
					            this.name = res.data[0].name
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -258,12 +262,14 @@ export default {
 | 
				
			|||||||
      getDetMaterial({
 | 
					      getDetMaterial({
 | 
				
			||||||
        pageNo: 1,
 | 
					        pageNo: 1,
 | 
				
			||||||
        pageSize: 10,
 | 
					        pageSize: 10,
 | 
				
			||||||
        orderId: this.$route.params.orderId,
 | 
					        orderId: this.$route.query.orderId,
 | 
				
			||||||
        flowDetId: [this.detId],
 | 
					        flowDetId: [this.detId],
 | 
				
			||||||
      }).then((res) => {
 | 
					      }).then((res) => {
 | 
				
			||||||
        console.log(res);
 | 
					        console.log(res);
 | 
				
			||||||
        this.materialList = res.data[0].data
 | 
					        if (res.data.length != []) {
 | 
				
			||||||
        this.name = res.data[0].name
 | 
					          this.materialList = res.data[0].data
 | 
				
			||||||
 | 
					          this.name = res.data[0].name
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		clearList() {
 | 
							clearList() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -123,7 +123,7 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    console.log(this.$route.params.id)
 | 
					    console.log(this.$route.query.id)
 | 
				
			||||||
		this.loadLayout().then(json => {
 | 
							this.loadLayout().then(json => {
 | 
				
			||||||
			this.initGraph(json)
 | 
								this.initGraph(json)
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
@@ -260,7 +260,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		async loadLayout() {
 | 
							async loadLayout() {
 | 
				
			||||||
      const flowId = this.$route.params.id;
 | 
					      const flowId = this.$route.query.id;
 | 
				
			||||||
      console.log(flowId)
 | 
					      console.log(flowId)
 | 
				
			||||||
			if (!flowId) return { cells: [] }
 | 
								if (!flowId) return { cells: [] }
 | 
				
			||||||
			const { code, data } = await this.info({ id: flowId });
 | 
								const { code, data } = await this.info({ id: flowId });
 | 
				
			||||||
@@ -288,12 +288,12 @@ 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.query.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.query.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));
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -410,7 +410,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		createProcess() {
 | 
							createProcess() {
 | 
				
			||||||
			// const flowId = this.$route.params.id;
 | 
								// const flowId = this.$route.query.id;
 | 
				
			||||||
			const flowId = this.getFlowId(); // it also works
 | 
								const flowId = this.getFlowId(); // it also works
 | 
				
			||||||
			if (!flowId) {
 | 
								if (!flowId) {
 | 
				
			||||||
				this.$modal.msgError('工艺ID不能为空');
 | 
									this.$modal.msgError('工艺ID不能为空');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,14 +20,13 @@
 | 
				
			|||||||
        <InfoItem label="产品名称" :value="form.productName" />
 | 
					        <InfoItem label="产品名称" :value="form.productName" />
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="6">
 | 
					      <el-col :span="6">
 | 
				
			||||||
        <InfoItem label="产品规格"  />
 | 
					        <InfoItem label="产品规格" :value="form.specifications" />
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
    </el-row>
 | 
					    </el-row>
 | 
				
			||||||
  </section>
 | 
					  </section>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					 | 
				
			||||||
const InfoItem = {
 | 
					const InfoItem = {
 | 
				
			||||||
	name: 'InfoItem',
 | 
						name: 'InfoItem',
 | 
				
			||||||
	components: {},
 | 
						components: {},
 | 
				
			||||||
@@ -62,6 +61,7 @@ export default {
 | 
				
			|||||||
				id: null,
 | 
									id: null,
 | 
				
			||||||
				name: null,
 | 
									name: null,
 | 
				
			||||||
        productName: null,
 | 
					        productName: null,
 | 
				
			||||||
 | 
					        specifications:null,
 | 
				
			||||||
        processFlowName: null,
 | 
					        processFlowName: null,
 | 
				
			||||||
				// remark: null,
 | 
									// remark: null,
 | 
				
			||||||
				// enable: null,
 | 
									// enable: null,
 | 
				
			||||||
@@ -70,7 +70,8 @@ export default {
 | 
				
			|||||||
		};
 | 
							};
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
		this.getInfo()
 | 
					    this.getInfo()
 | 
				
			||||||
 | 
					    console.log(this.$route.query)
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	computed: {},
 | 
						computed: {},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
@@ -95,12 +96,14 @@ export default {
 | 
				
			|||||||
		// info(payload) {
 | 
							// info(payload) {
 | 
				
			||||||
		// 	return this.http(this.infoUrl, 'get', payload);
 | 
							// 	return this.http(this.infoUrl, 'get', payload);
 | 
				
			||||||
		// },
 | 
							// },
 | 
				
			||||||
    async getInfo() {
 | 
					    getInfo() {
 | 
				
			||||||
      this.form.name = this.$route.params.name
 | 
					      // console.log(this.$route.query.planProductId);
 | 
				
			||||||
      this.form.productName = this.$route.params.productName
 | 
					      this.form.name = this.$route.query.name
 | 
				
			||||||
      this.form.processFlowName = this.$route.params.processFlowName
 | 
					      this.form.specifications = this.$route.query.specifications
 | 
				
			||||||
      // this.form.name = this.$route.params.name
 | 
					      this.form.productName = this.$route.query.productName
 | 
				
			||||||
      // const flowId = this.$route.params.id;
 | 
					      this.form.processFlowName = this.$route.query.processFlowName
 | 
				
			||||||
 | 
					      // this.form.name = this.$route.query.name
 | 
				
			||||||
 | 
					      // const flowId = this.$route.query.id;
 | 
				
			||||||
      // console.log(flowId);
 | 
					      // console.log(flowId);
 | 
				
			||||||
			// if (!flowId) this.$router.go(-1);
 | 
								// if (!flowId) this.$router.go(-1);
 | 
				
			||||||
			// const { code, data } = await this.info({ id: flowId });
 | 
								// const { code, data } = await this.info({ id: flowId });
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@
 | 
				
			|||||||
    <el-row>
 | 
					    <el-row>
 | 
				
			||||||
      <el-col :span="12">
 | 
					      <el-col :span="12">
 | 
				
			||||||
        <el-form-item label="班组组长" prop="leaderId">
 | 
					        <el-form-item label="班组组长" prop="leaderId">
 | 
				
			||||||
          <el-select v-model="form.leaderId" placeholder="请选择" style="width: 100%;" @change="selectLeader">
 | 
					          <el-select v-model="form.leaderId" placeholder="请选择" style="width: 100%;" filterable @change="selectLeader">
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in workerList"
 | 
					              v-for="item in workerList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,13 +80,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
				<!-- 表单 -->
 | 
									<!-- 表单 -->
 | 
				
			||||||
				<div class="form-cont">
 | 
									<div class="form-cont">
 | 
				
			||||||
					<el-tabs
 | 
					 | 
				
			||||||
						class="form"
 | 
					 | 
				
			||||||
						v-model="loginForm.loginType"
 | 
					 | 
				
			||||||
						style="float: none">
 | 
					 | 
				
			||||||
						<el-tab-pane label="账号密码登录" name="uname"></el-tab-pane>
 | 
					 | 
				
			||||||
						<el-tab-pane label="短信验证码登录" name="sms"></el-tab-pane>
 | 
					 | 
				
			||||||
					</el-tabs>
 | 
					 | 
				
			||||||
					<div style="">
 | 
										<div style="">
 | 
				
			||||||
						<el-form
 | 
											<el-form
 | 
				
			||||||
							ref="loginForm"
 | 
												ref="loginForm"
 | 
				
			||||||
@@ -106,7 +99,7 @@
 | 
				
			|||||||
								</el-input>
 | 
													</el-input>
 | 
				
			||||||
							</el-form-item>
 | 
												</el-form-item>
 | 
				
			||||||
							<!-- 账号密码登录 -->
 | 
												<!-- 账号密码登录 -->
 | 
				
			||||||
							<div v-if="loginForm.loginType === 'uname'">
 | 
												<div>
 | 
				
			||||||
								<el-form-item prop="username">
 | 
													<el-form-item prop="username">
 | 
				
			||||||
									<el-input
 | 
														<el-input
 | 
				
			||||||
										v-model="loginForm.username"
 | 
															v-model="loginForm.username"
 | 
				
			||||||
@@ -139,56 +132,6 @@
 | 
				
			|||||||
								</el-checkbox>
 | 
													</el-checkbox>
 | 
				
			||||||
							</div>
 | 
												</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							<!-- 短信验证码登录 -->
 | 
					 | 
				
			||||||
							<div v-if="loginForm.loginType === 'sms'">
 | 
					 | 
				
			||||||
								<el-form-item prop="mobile">
 | 
					 | 
				
			||||||
									<el-input
 | 
					 | 
				
			||||||
										v-model="loginForm.mobile"
 | 
					 | 
				
			||||||
										type="text"
 | 
					 | 
				
			||||||
										auto-complete="off"
 | 
					 | 
				
			||||||
										placeholder="请输入手机号">
 | 
					 | 
				
			||||||
										<!-- <svg-icon
 | 
					 | 
				
			||||||
											slot="prefix"
 | 
					 | 
				
			||||||
											icon-class="phone"
 | 
					 | 
				
			||||||
											class="el-input__icon input-icon" /> -->
 | 
					 | 
				
			||||||
									</el-input>
 | 
					 | 
				
			||||||
								</el-form-item>
 | 
					 | 
				
			||||||
								<el-form-item prop="mobileCode">
 | 
					 | 
				
			||||||
									<el-input
 | 
					 | 
				
			||||||
										v-model="loginForm.mobileCode"
 | 
					 | 
				
			||||||
										type="text"
 | 
					 | 
				
			||||||
										auto-complete="off"
 | 
					 | 
				
			||||||
										placeholder="短信验证码"
 | 
					 | 
				
			||||||
										class="sms-login-mobile-code-prefix"
 | 
					 | 
				
			||||||
										@keyup.enter.native="handleLogin">
 | 
					 | 
				
			||||||
										<!-- <template>
 | 
					 | 
				
			||||||
											<svg-icon
 | 
					 | 
				
			||||||
												slot="prefix"
 | 
					 | 
				
			||||||
												icon-class="password"
 | 
					 | 
				
			||||||
												class="el-input__icon input-icon" />
 | 
					 | 
				
			||||||
										</template> -->
 | 
					 | 
				
			||||||
										<template slot="suffix">
 | 
					 | 
				
			||||||
											<span
 | 
					 | 
				
			||||||
												v-if="mobileCodeTimer <= 0"
 | 
					 | 
				
			||||||
												class="getMobileCode"
 | 
					 | 
				
			||||||
												@click="getSmsCode"
 | 
					 | 
				
			||||||
												style="
 | 
					 | 
				
			||||||
													cursor: pointer;
 | 
					 | 
				
			||||||
													color: #0b58ff;
 | 
					 | 
				
			||||||
													font-size: calc(12 * 0.12vh);
 | 
					 | 
				
			||||||
													line-height: calc(54 * 0.12vh);
 | 
					 | 
				
			||||||
													padding-right: calc(10 * 0.12vh);
 | 
					 | 
				
			||||||
												">
 | 
					 | 
				
			||||||
												获取验证码
 | 
					 | 
				
			||||||
											</span>
 | 
					 | 
				
			||||||
											<span v-if="mobileCodeTimer > 0" class="getMobileCode">
 | 
					 | 
				
			||||||
												{{ mobileCodeTimer }}秒后可重新获取
 | 
					 | 
				
			||||||
											</span>
 | 
					 | 
				
			||||||
										</template>
 | 
					 | 
				
			||||||
									</el-input>
 | 
					 | 
				
			||||||
								</el-form-item>
 | 
					 | 
				
			||||||
							</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							<!-- 下方的登录按钮 -->
 | 
												<!-- 下方的登录按钮 -->
 | 
				
			||||||
							<el-form-item
 | 
												<el-form-item
 | 
				
			||||||
								id="button-form-item"
 | 
													id="button-form-item"
 | 
				
			||||||
@@ -227,13 +170,6 @@
 | 
				
			|||||||
				</div>
 | 
									</div>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
 | 
					 | 
				
			||||||
		<!-- 图形验证码 -->
 | 
					 | 
				
			||||||
		<Verify
 | 
					 | 
				
			||||||
			ref="verify"
 | 
					 | 
				
			||||||
			:captcha-type="'blockPuzzle'"
 | 
					 | 
				
			||||||
			:img-size="{ width: '400px', height: '200px' }"
 | 
					 | 
				
			||||||
			@success="handleLogin" />
 | 
					 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -241,7 +177,7 @@
 | 
				
			|||||||
import { sendSmsCode, socialAuthRedirect } from '@/api/login';
 | 
					import { sendSmsCode, socialAuthRedirect } from '@/api/login';
 | 
				
			||||||
import { getTenantIdByName } from '@/api/system/tenant';
 | 
					import { getTenantIdByName } from '@/api/system/tenant';
 | 
				
			||||||
import { SystemUserSocialTypeEnum } from '@/utils/constants';
 | 
					import { SystemUserSocialTypeEnum } from '@/utils/constants';
 | 
				
			||||||
import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi';
 | 
					import { getTenantEnable } from '@/utils/ruoyi';
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
	getPassword,
 | 
						getPassword,
 | 
				
			||||||
	getRememberMe,
 | 
						getRememberMe,
 | 
				
			||||||
@@ -269,7 +205,7 @@ export default {
 | 
				
			|||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
			codeUrl: '',
 | 
								codeUrl: '',
 | 
				
			||||||
			captchaEnable: true,
 | 
								captchaEnable: false,
 | 
				
			||||||
			tenantEnable: true,
 | 
								tenantEnable: true,
 | 
				
			||||||
			mobileCodeTimer: 0,
 | 
								mobileCodeTimer: 0,
 | 
				
			||||||
			loginForm: {
 | 
								loginForm: {
 | 
				
			||||||
@@ -347,8 +283,6 @@ export default {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		// 验证码开关
 | 
					 | 
				
			||||||
		this.captchaEnable = getCaptchaEnable();
 | 
					 | 
				
			||||||
		// 重定向地址
 | 
							// 重定向地址
 | 
				
			||||||
		this.redirect = this.$route.query.redirect
 | 
							this.redirect = this.$route.query.redirect
 | 
				
			||||||
			? decodeURIComponent(this.$route.query.redirect)
 | 
								? decodeURIComponent(this.$route.query.redirect)
 | 
				
			||||||
@@ -360,15 +294,7 @@ export default {
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		getCode() {
 | 
							getCode() {
 | 
				
			||||||
			// 情况一,未开启:则直接登录
 | 
								this.handleLogin({});
 | 
				
			||||||
			if (!this.captchaEnable) {
 | 
					 | 
				
			||||||
				this.handleLogin({});
 | 
					 | 
				
			||||||
				return;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
 | 
					 | 
				
			||||||
			// 弹出验证码
 | 
					 | 
				
			||||||
			this.$refs.verify.show();
 | 
					 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		getCookie() {
 | 
							getCookie() {
 | 
				
			||||||
			const username = getUsername();
 | 
								const username = getUsername();
 | 
				
			||||||
@@ -522,4 +448,7 @@ export default {
 | 
				
			|||||||
		top: 22%;
 | 
							top: 22%;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					.form-cont {
 | 
				
			||||||
 | 
						padding-top: 40px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@
 | 
				
			|||||||
          <el-input v-model="form.name"></el-input>
 | 
					          <el-input v-model="form.name"></el-input>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item label="工单名称" prop="workOrderId"  v-if='isBind'>
 | 
					        <el-form-item label="工单名称" prop="workOrderId"  v-if='isBind'>
 | 
				
			||||||
          <el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" @change="getWorkOrderMsg">
 | 
					          <el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in workOrderList"
 | 
					              v-for="item in workOrderList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@
 | 
				
			|||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span='6'>
 | 
					      <el-col :span='6'>
 | 
				
			||||||
        <el-form-item label="产品名称" prop="planProductId">
 | 
					        <el-form-item label="产品名称" prop="planProductId">
 | 
				
			||||||
          <el-select v-model="form.planProductId" placeholder="请选择" style="width: 100%;">
 | 
					          <el-select v-model="form.planProductId" placeholder="请选择" style="width: 100%;" filterable>
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in productList"
 | 
					              v-for="item in productList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
@@ -39,7 +39,7 @@
 | 
				
			|||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span='6'>
 | 
					      <el-col :span='6'>
 | 
				
			||||||
        <el-form-item label="客户" prop="customerId">
 | 
					        <el-form-item label="客户" prop="customerId">
 | 
				
			||||||
          <el-select v-model="form.customerId" placeholder="请选择" style="width: 100%;" clearable>
 | 
					          <el-select v-model="form.customerId" placeholder="请选择" style="width: 100%;" clearable filterable>
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in customerList"
 | 
					              v-for="item in customerList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
@@ -82,7 +82,7 @@
 | 
				
			|||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span='6'>
 | 
					      <el-col :span='6'>
 | 
				
			||||||
        <el-form-item label="关联工艺" prop="processFlowId">
 | 
					        <el-form-item label="关联工艺" prop="processFlowId">
 | 
				
			||||||
          <el-select v-model="form.processFlowId" placeholder="请选择" style="width: 100%;" clearable @change="processFlowIdChange">
 | 
					          <el-select v-model="form.processFlowId" placeholder="请选择" style="width: 100%;" clearable filterable @change="processFlowIdChange">
 | 
				
			||||||
            <el-option
 | 
					            <el-option
 | 
				
			||||||
              v-for="item in processFlowList"
 | 
					              v-for="item in processFlowList"
 | 
				
			||||||
              :key="item.id"
 | 
					              :key="item.id"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -154,7 +154,7 @@ export default {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      tableProps,
 | 
					      tableProps,
 | 
				
			||||||
      list: [],
 | 
					      list: [],
 | 
				
			||||||
      tableH: this.tableHeight(315),
 | 
					      tableH: this.tableHeight(305),
 | 
				
			||||||
      total: 0,
 | 
					      total: 0,
 | 
				
			||||||
      tableBtn: [
 | 
					      tableBtn: [
 | 
				
			||||||
      this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
 | 
					      this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
 | 
				
			||||||
@@ -215,7 +215,7 @@ export default {
 | 
				
			|||||||
  components: { MonitoringRingCharts },
 | 
					  components: { MonitoringRingCharts },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    window.addEventListener('resize', () => {
 | 
					    window.addEventListener('resize', () => {
 | 
				
			||||||
      this.tableH = this.tableHeight(315)
 | 
					      this.tableH = this.tableHeight(305)
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    let start = moment().subtract(30, 'days').format('yyyy-MM-DD')
 | 
					    let start = moment().subtract(30, 'days').format('yyyy-MM-DD')
 | 
				
			||||||
    let end = moment().format('yyyy-MM-DD')
 | 
					    let end = moment().format('yyyy-MM-DD')
 | 
				
			||||||
@@ -347,6 +347,9 @@ export default {
 | 
				
			|||||||
  .el-tabs__item {
 | 
					  .el-tabs__item {
 | 
				
			||||||
    color: rgba(0, 0, 0, 0.45);
 | 
					    color: rgba(0, 0, 0, 0.45);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  .searchBarBox {
 | 
				
			||||||
 | 
					    margin-bottom: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  .boxTitle {
 | 
					  .boxTitle {
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    font-size: 16px;
 | 
					    font-size: 16px;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,81 +1,53 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="app-container">
 | 
					  <div class="app-container">
 | 
				
			||||||
		<!-- 搜索工作栏 -->
 | 
					    <!-- 搜索工作栏 -->
 | 
				
			||||||
		<SearchBar
 | 
					    <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
 | 
				
			||||||
			:formConfigs="searchBarFormConfig"
 | 
					 | 
				
			||||||
			ref="search-bar"
 | 
					 | 
				
			||||||
			@headBtnClick="handleSearchBarBtnClick" />
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<!-- 列表 -->
 | 
					    <!-- 列表 -->
 | 
				
			||||||
		<base-table
 | 
					    <base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
 | 
				
			||||||
			:table-props="tableProps"
 | 
					      @emitFun="handleEmitFun">
 | 
				
			||||||
			:page="queryParams.pageNo"
 | 
					      <method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right" :method-list="tableBtn"
 | 
				
			||||||
			:limit="queryParams.pageSize"
 | 
					        @clickBtn="handleTableBtnClick" />
 | 
				
			||||||
			:table-data="list"
 | 
					    </base-table>
 | 
				
			||||||
			@emitFun="handleEmitFun">
 | 
					 | 
				
			||||||
			<method-btn
 | 
					 | 
				
			||||||
				v-if="tableBtn.length"
 | 
					 | 
				
			||||||
				slot="handleBtn"
 | 
					 | 
				
			||||||
				label="操作"
 | 
					 | 
				
			||||||
				:width="120"
 | 
					 | 
				
			||||||
				fixed="right"
 | 
					 | 
				
			||||||
				:method-list="tableBtn"
 | 
					 | 
				
			||||||
				@clickBtn="handleTableBtnClick" />
 | 
					 | 
				
			||||||
		</base-table>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<!-- 分页组件 -->
 | 
					    <!-- 分页组件 -->
 | 
				
			||||||
		<pagination
 | 
					    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
 | 
				
			||||||
			v-show="total > 0"
 | 
					      @pagination="getList" />
 | 
				
			||||||
			:total="total"
 | 
					 | 
				
			||||||
			:page.sync="queryParams.pageNo"
 | 
					 | 
				
			||||||
			:limit.sync="queryParams.pageSize"
 | 
					 | 
				
			||||||
			@pagination="getList" />
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<!-- 对话框(添加 / 修改) -->
 | 
					    <!-- 对话框(添加 / 修改) -->
 | 
				
			||||||
		<base-dialog
 | 
					    <base-dialog :dialogTitle="title" :dialogVisible="open" width="40%" @close="cancel" @cancel="cancel"
 | 
				
			||||||
			:dialogTitle="title"
 | 
					      @confirm="submitForm">
 | 
				
			||||||
			:dialogVisible="open"
 | 
					      <DialogForm v-if="open" ref="form" v-model="form" :rows="[
 | 
				
			||||||
			width="40%"
 | 
					      	[
 | 
				
			||||||
			@close="cancel"
 | 
					      		{
 | 
				
			||||||
			@cancel="cancel"
 | 
					      			select: true,
 | 
				
			||||||
			@confirm="submitForm">
 | 
					      			label: '检测类型',
 | 
				
			||||||
			<DialogForm
 | 
					      			prop: 'typeId',
 | 
				
			||||||
				v-if="open"
 | 
					      			url: '/base/quality-inspection-type/listAll',
 | 
				
			||||||
				ref="form"
 | 
					      			rules: [{ required: true, message: '检测类型不能为空', trigger: 'blur' }],
 | 
				
			||||||
				v-model="form"
 | 
					      			bind: {
 | 
				
			||||||
				:rows="[
 | 
					      				filterable: true,
 | 
				
			||||||
					[
 | 
					      			},
 | 
				
			||||||
						{
 | 
					          },
 | 
				
			||||||
							select: true,
 | 
					              {
 | 
				
			||||||
							label: '检测类型',
 | 
					      			input: true,
 | 
				
			||||||
							prop: 'typeId',
 | 
					      			label: '检测内容',
 | 
				
			||||||
							url: '/base/quality-inspection-type/listAll',
 | 
					      			prop: 'content',
 | 
				
			||||||
							rules: [{ required: true, message: '检测类型不能为空', trigger: 'blur' }],
 | 
					      			rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
 | 
				
			||||||
							bind: {
 | 
					      		},
 | 
				
			||||||
								filterable: true,
 | 
					      	],
 | 
				
			||||||
							},
 | 
					
 | 
				
			||||||
						},
 | 
					        [
 | 
				
			||||||
					],
 | 
					          {
 | 
				
			||||||
					[
 | 
					            input: true,
 | 
				
			||||||
						{
 | 
					            label: '内容编码',
 | 
				
			||||||
							input: true,
 | 
					            prop: 'code',
 | 
				
			||||||
							label: '检测内容',
 | 
					            url: '/base/quality-inspection-det/getCode',
 | 
				
			||||||
							prop: 'content',
 | 
					          },
 | 
				
			||||||
							rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
 | 
					          { input: true, label: '备注', prop: 'remark' }],
 | 
				
			||||||
						},
 | 
					      ]" />
 | 
				
			||||||
					],
 | 
					    </base-dialog>
 | 
				
			||||||
					[
 | 
					  </div>
 | 
				
			||||||
						{
 | 
					 | 
				
			||||||
							input: true,
 | 
					 | 
				
			||||||
							label: '内容编码',
 | 
					 | 
				
			||||||
							prop: 'code',
 | 
					 | 
				
			||||||
							url: '/base/quality-inspection-det/getCode',
 | 
					 | 
				
			||||||
						},
 | 
					 | 
				
			||||||
					],
 | 
					 | 
				
			||||||
					[{ input: true, label: '备注', prop: 'remark' }],
 | 
					 | 
				
			||||||
				]" />
 | 
					 | 
				
			||||||
		</base-dialog>
 | 
					 | 
				
			||||||
	</div>
 | 
					 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,76 +1,52 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="app-container">
 | 
					  <div class="app-container">
 | 
				
			||||||
		<!-- 搜索工作栏 -->
 | 
					    <!-- 搜索工作栏 -->
 | 
				
			||||||
		<SearchBar
 | 
					    <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
 | 
				
			||||||
			:formConfigs="searchBarFormConfig"
 | 
					 | 
				
			||||||
			ref="search-bar"
 | 
					 | 
				
			||||||
			@headBtnClick="handleSearchBarBtnClick" />
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<!-- 列表 -->
 | 
					    <!-- 列表 -->
 | 
				
			||||||
		<base-table
 | 
					    <base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
 | 
				
			||||||
			:table-props="tableProps"
 | 
					      @emitFun="handleEmitFun">
 | 
				
			||||||
			:page="queryParams.pageNo"
 | 
					      <method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" :method-list="tableBtn"
 | 
				
			||||||
			:limit="queryParams.pageSize"
 | 
					        @clickBtn="handleTableBtnClick" />
 | 
				
			||||||
			:table-data="list"
 | 
					    </base-table>
 | 
				
			||||||
			@emitFun="handleEmitFun">
 | 
					 | 
				
			||||||
			<method-btn
 | 
					 | 
				
			||||||
				v-if="tableBtn.length"
 | 
					 | 
				
			||||||
				slot="handleBtn"
 | 
					 | 
				
			||||||
				label="操作"
 | 
					 | 
				
			||||||
				:width="120"
 | 
					 | 
				
			||||||
				:method-list="tableBtn"
 | 
					 | 
				
			||||||
				@clickBtn="handleTableBtnClick" />
 | 
					 | 
				
			||||||
		</base-table>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<!-- 分页组件 -->
 | 
					    <!-- 分页组件 -->
 | 
				
			||||||
		<pagination
 | 
					    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
 | 
				
			||||||
			v-show="total > 0"
 | 
					      @pagination="getList" />
 | 
				
			||||||
			:total="total"
 | 
					 | 
				
			||||||
			:page.sync="queryParams.pageNo"
 | 
					 | 
				
			||||||
			:limit.sync="queryParams.pageSize"
 | 
					 | 
				
			||||||
			@pagination="getList" />
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<!-- 对话框(添加 / 修改) -->
 | 
					    <!-- 对话框(添加 / 修改) -->
 | 
				
			||||||
		<base-dialog
 | 
					    <base-dialog :dialogTitle="title" :dialogVisible="open" @close="cancel" width="30%" @cancel="cancel"
 | 
				
			||||||
			:dialogTitle="title"
 | 
					      @confirm="submitForm">
 | 
				
			||||||
			:dialogVisible="open"
 | 
					      <DialogForm v-if="open" ref="form" v-model="form" :rows="[
 | 
				
			||||||
			@close="cancel"
 | 
					      	[
 | 
				
			||||||
			@cancel="cancel"
 | 
					      		{
 | 
				
			||||||
			@confirm="submitForm">
 | 
					      			input: true,
 | 
				
			||||||
			<DialogForm
 | 
					      			label: '检测类型名称',
 | 
				
			||||||
				v-if="open"
 | 
					      			prop: 'name',
 | 
				
			||||||
				ref="form"
 | 
					      			rules: [
 | 
				
			||||||
				v-model="form"
 | 
					      				{
 | 
				
			||||||
				:rows="[
 | 
					      					required: true,
 | 
				
			||||||
					[
 | 
					      					message: '检测类型名称不能为空',
 | 
				
			||||||
						{
 | 
					      					trigger: 'blur',
 | 
				
			||||||
							input: true,
 | 
					      				},
 | 
				
			||||||
							label: '检测类型名称',
 | 
					      			],
 | 
				
			||||||
							prop: 'name',
 | 
					      			// bind: {
 | 
				
			||||||
							rules: [
 | 
					      			// 	disabled: true, // some condition, like detail mode...
 | 
				
			||||||
								{
 | 
					      			// }
 | 
				
			||||||
									required: true,
 | 
					      		},
 | 
				
			||||||
									message: '检测类型名称不能为空',
 | 
					      	],
 | 
				
			||||||
									trigger: 'blur',
 | 
					        [
 | 
				
			||||||
								},
 | 
					      		{
 | 
				
			||||||
							],
 | 
					      			input: true,
 | 
				
			||||||
							// bind: {
 | 
					      			label: '检测类型编码',
 | 
				
			||||||
							// 	disabled: true, // some condition, like detail mode...
 | 
					      			prop: 'code',
 | 
				
			||||||
							// }
 | 
					      			url: '/base/quality-inspection-type/getCode',
 | 
				
			||||||
						},
 | 
					      		},
 | 
				
			||||||
					],
 | 
					      	],
 | 
				
			||||||
					[
 | 
					      	[{ input: true, label: '备注', prop: 'remark' }],
 | 
				
			||||||
						{
 | 
					      ]" />
 | 
				
			||||||
							input: true,
 | 
					    </base-dialog>
 | 
				
			||||||
							label: '检测类型编码',
 | 
					  </div>
 | 
				
			||||||
							prop: 'code',
 | 
					 | 
				
			||||||
							url: '/base/quality-inspection-type/getCode',
 | 
					 | 
				
			||||||
						},
 | 
					 | 
				
			||||||
					],
 | 
					 | 
				
			||||||
					[{ input: true, label: '备注', prop: 'remark' }],
 | 
					 | 
				
			||||||
				]" />
 | 
					 | 
				
			||||||
		</base-dialog>
 | 
					 | 
				
			||||||
	</div>
 | 
					 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,13 +1,13 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-11-06 15:15:30
 | 
					 * @Date: 2023-11-06 15:15:30
 | 
				
			||||||
 * @LastEditTime: 2023-11-06 15:36:31
 | 
					 * @LastEditTime: 2023-11-24 08:42:18
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
 | 
					  <el-form :model="dataForm"  :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()">
 | 
				
			||||||
    <el-row :gutter="20">
 | 
					    <el-row :gutter="24">
 | 
				
			||||||
      <el-col :span="12">
 | 
					      <el-col :span="12">
 | 
				
			||||||
        <el-form-item label="报废类型编码" prop="code">
 | 
					        <el-form-item label="报废类型编码" prop="code">
 | 
				
			||||||
          <el-input v-model="dataForm.code" placeholder="请输入报废类型编码" />
 | 
					          <el-input v-model="dataForm.code" placeholder="请输入报废类型编码" />
 | 
				
			||||||
@@ -19,7 +19,7 @@
 | 
				
			|||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
    </el-row>
 | 
					    </el-row>
 | 
				
			||||||
    <el-row :gutter="20">
 | 
					    <el-row :gutter="24">
 | 
				
			||||||
      <el-col :span="12">
 | 
					      <el-col :span="12">
 | 
				
			||||||
        <el-form-item label="描述类型" prop="description">
 | 
					        <el-form-item label="描述类型" prop="description">
 | 
				
			||||||
          <el-input v-model="dataForm.description" clearable placeholder="描述类型" />
 | 
					          <el-input v-model="dataForm.description" clearable placeholder="描述类型" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -315,7 +315,11 @@ export default {
 | 
				
			|||||||
              data: arrYAxis,
 | 
					              data: arrYAxis,
 | 
				
			||||||
              type: 'bar',
 | 
					              type: 'bar',
 | 
				
			||||||
              showBackground: true,
 | 
					              showBackground: true,
 | 
				
			||||||
              barWidth:'20',
 | 
					              barWidth: '20',
 | 
				
			||||||
 | 
					              label: {
 | 
				
			||||||
 | 
					                show: true,
 | 
				
			||||||
 | 
					                position: 'top'
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
              backgroundStyle: {
 | 
					              backgroundStyle: {
 | 
				
			||||||
                color: 'rgba(180, 180, 180, 0.2)'
 | 
					                color: 'rgba(180, 180, 180, 0.2)'
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2023-08-01 14:55:51
 | 
					 * @Date: 2023-08-01 14:55:51
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-11-10 16:25:02
 | 
					 * @LastEditTime: 2023-11-24 10:55:54
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -132,6 +132,9 @@ export default {
 | 
				
			|||||||
          name: 'search',
 | 
					          name: 'search',
 | 
				
			||||||
          color: 'primary',
 | 
					          color: 'primary',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'separate',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        // {
 | 
					        // {
 | 
				
			||||||
        // 	type: 'separate',
 | 
					        // 	type: 'separate',
 | 
				
			||||||
        // },
 | 
					        // },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2023-08-01 14:55:51
 | 
					 * @Date: 2023-08-01 14:55:51
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-11-10 16:32:28
 | 
					 * @LastEditTime: 2023-11-28 10:51:44
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -26,10 +26,10 @@ import { parseTime } from '../mixins/code-filter';
 | 
				
			|||||||
import {
 | 
					import {
 | 
				
			||||||
  getProcessTraceabilityPage,
 | 
					  getProcessTraceabilityPage,
 | 
				
			||||||
  getWorkOrderList,
 | 
					  getWorkOrderList,
 | 
				
			||||||
 | 
					  getCoreProduct
 | 
				
			||||||
  // exportEnergyPlcExcel
 | 
					  // exportEnergyPlcExcel
 | 
				
			||||||
} from '@/api/quality/processTraceability';
 | 
					} from '@/api/quality/processTraceability';
 | 
				
			||||||
import { publicFormatter } from '@/utils/dict';
 | 
					import { publicFormatter } from '@/utils/dict';
 | 
				
			||||||
 | 
					 | 
				
			||||||
const tableProps = [
 | 
					const tableProps = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'name',
 | 
					    prop: 'name',
 | 
				
			||||||
@@ -46,7 +46,7 @@ const tableProps = [
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'status',
 | 
					    prop: 'status',
 | 
				
			||||||
    label: '状态',
 | 
					    label: '状态',
 | 
				
			||||||
    filter:publicFormatter('work_order_status')
 | 
					    filter: (val) => val == 1 ? '等待' : val == 2 ? '激活' : val == 3 ? '暂停' : val == 4 ? '完成' : '作废',
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'startProduceTime',
 | 
					    prop: 'startProduceTime',
 | 
				
			||||||
@@ -63,7 +63,7 @@ const tableProps = [
 | 
				
			|||||||
    label: '生产数量'
 | 
					    label: '生产数量'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'unit',
 | 
					    prop: 'planProductUnit',
 | 
				
			||||||
    label: '单位',
 | 
					    label: '单位',
 | 
				
			||||||
    filter: publicFormatter('unit_dict')
 | 
					    filter: publicFormatter('unit_dict')
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -73,7 +73,7 @@ const tableProps = [
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'yield',
 | 
					    prop: 'yield',
 | 
				
			||||||
    label: '成品率'
 | 
					    label: '合格率'
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -116,21 +116,22 @@ export default {
 | 
				
			|||||||
          selectOptions: [],
 | 
					          selectOptions: [],
 | 
				
			||||||
          labelField: 'name',
 | 
					          labelField: 'name',
 | 
				
			||||||
          valueField: 'id',
 | 
					          valueField: 'id',
 | 
				
			||||||
          param: 'orderName'
 | 
					          param: 'orderName',
 | 
				
			||||||
 | 
					          filterable: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'datePicker',
 | 
				
			||||||
 | 
					          label: '工单开始时间',
 | 
				
			||||||
 | 
					          dateType: 'daterange',
 | 
				
			||||||
 | 
					          format: 'yyyy-MM-dd',
 | 
				
			||||||
 | 
					          valueFormat: "yyyy-MM-dd",
 | 
				
			||||||
 | 
					          rangeSeparator: '-',
 | 
				
			||||||
 | 
					          startPlaceholder: '开始时间',
 | 
				
			||||||
 | 
					          endPlaceholder: '结束时间',
 | 
				
			||||||
 | 
					          param: 'timeVal',
 | 
				
			||||||
 | 
					          defaultSelect: [],
 | 
				
			||||||
 | 
					          width: 250
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   type: 'datePicker',
 | 
					 | 
				
			||||||
        //   label: '时间段',
 | 
					 | 
				
			||||||
        //   dateType: 'daterange',
 | 
					 | 
				
			||||||
        //   format: 'yyyy-MM-dd',
 | 
					 | 
				
			||||||
        //   valueFormat: "yyyy-MM-dd",
 | 
					 | 
				
			||||||
        //   rangeSeparator: '-',
 | 
					 | 
				
			||||||
        //   startPlaceholder: '开始时间',
 | 
					 | 
				
			||||||
        //   endPlaceholder: '结束时间',
 | 
					 | 
				
			||||||
        //   param: 'timeVal',
 | 
					 | 
				
			||||||
        //   defaultSelect: [],
 | 
					 | 
				
			||||||
        //   width: 250
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: 'button',
 | 
					          type: 'button',
 | 
				
			||||||
          btnName: '搜索',
 | 
					          btnName: '搜索',
 | 
				
			||||||
@@ -185,17 +186,25 @@ export default {
 | 
				
			|||||||
    handleClick(val) {
 | 
					    handleClick(val) {
 | 
				
			||||||
      if (val.type === "processDetail") {
 | 
					      if (val.type === "processDetail") {
 | 
				
			||||||
        console.log(val);
 | 
					        console.log(val);
 | 
				
			||||||
        this.$router.push({
 | 
					        let specificationsData =''
 | 
				
			||||||
          name: 'process-traceability-detail',
 | 
					        getCoreProduct(val.data.planProductId).then((res) => {
 | 
				
			||||||
          params: {
 | 
					          console.log(res)
 | 
				
			||||||
            id: '1715180991838887938',
 | 
					
 | 
				
			||||||
            orderId: val.data.id,
 | 
					          this.$router.push({
 | 
				
			||||||
            name: val.data.name,
 | 
					            path: 'process-traceability-detail',
 | 
				
			||||||
            productName: val.data.planProductName,
 | 
					            query: {
 | 
				
			||||||
            processFlowName: val.data.processFlowName
 | 
					              id: val.data.processFlowId,
 | 
				
			||||||
            // equipmentName,
 | 
					              orderId: val.data.id,
 | 
				
			||||||
          },
 | 
					              name: val.data.name,
 | 
				
			||||||
        });
 | 
					              specifications: res.data.specifications,
 | 
				
			||||||
 | 
					              productName: val.data.planProductName,
 | 
				
			||||||
 | 
					              processFlowName: val.data.processFlowName,
 | 
				
			||||||
 | 
					              // planProductId: val.data.planProductId
 | 
				
			||||||
 | 
					              // equipmentName,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
 | 
					        // this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -241,13 +250,13 @@ export default {
 | 
				
			|||||||
      if (val.btnName === 'search') {
 | 
					      if (val.btnName === 'search') {
 | 
				
			||||||
        this.listQuery.orderName = val.orderName ? val.orderName :undefined
 | 
					        this.listQuery.orderName = val.orderName ? val.orderName :undefined
 | 
				
			||||||
        // this.queryParams.status = val.status
 | 
					        // this.queryParams.status = val.status
 | 
				
			||||||
        // if (val.timeVal && val.timeVal.length != 0 ) {
 | 
					        if (val.timeVal && val.timeVal.length != 0 ) {
 | 
				
			||||||
        // this.listQuery.startTime =  val.timeVal[0] + ' 00:00:00'
 | 
					        this.listQuery.startTime =  val.timeVal[0] + ' 00:00:00'
 | 
				
			||||||
        // this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
 | 
					        this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
 | 
				
			||||||
        // } else {
 | 
					        } else {
 | 
				
			||||||
        //   this.listQuery.startTime = undefined
 | 
					          this.listQuery.startTime = undefined
 | 
				
			||||||
        //   this.listQuery.endTime = undefined
 | 
					          this.listQuery.endTime = undefined
 | 
				
			||||||
        // }
 | 
					        }
 | 
				
			||||||
        this.getList()
 | 
					        this.getList()
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        // this.handleExport()
 | 
					        // this.handleExport()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,11 +117,11 @@ export default {
 | 
				
			|||||||
        // },
 | 
					        // },
 | 
				
			||||||
        { prop: 'name', label: '参数名' },
 | 
					        { prop: 'name', label: '参数名' },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'name', label: '设定范围最小- 最大 / 标准',
 | 
					          prop: 'status', label: '设定范围最小- 最大 / 标准',
 | 
				
			||||||
          subcomponent: StatusBtn
 | 
					          subcomponent: StatusBtn
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'code', label: '最小值',
 | 
					          prop: '', label: '最小值',
 | 
				
			||||||
          children: [
 | 
					          children: [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: 'minValueSet',
 | 
					              prop: 'minValueSet',
 | 
				
			||||||
@@ -134,7 +134,7 @@ export default {
 | 
				
			|||||||
          ]
 | 
					          ]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'code', label: '最大值',
 | 
					          prop: '', label: '最大值',
 | 
				
			||||||
          children: [
 | 
					          children: [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: 'maxValueSet',
 | 
					              prop: 'maxValueSet',
 | 
				
			||||||
@@ -184,9 +184,9 @@ export default {
 | 
				
			|||||||
      getDetMaterial({
 | 
					      getDetMaterial({
 | 
				
			||||||
        pageNo: 1,
 | 
					        pageNo: 1,
 | 
				
			||||||
        pageSize: 10,
 | 
					        pageSize: 10,
 | 
				
			||||||
        orderId: this.$route.params.orderId,
 | 
					        orderId: this.$route.query.orderId,
 | 
				
			||||||
        flowDetId: [this.detId],
 | 
					        flowDetId: [this.detId],
 | 
				
			||||||
        // orderId: this.$route.params.orderId,
 | 
					        // orderId: this.$route.query.orderId,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      },).then((res) => {
 | 
					      },).then((res) => {
 | 
				
			||||||
        console.log(res);
 | 
					        console.log(res);
 | 
				
			||||||
@@ -231,25 +231,29 @@ export default {
 | 
				
			|||||||
        getDetMaterial({
 | 
					        getDetMaterial({
 | 
				
			||||||
          pageNo: 1,
 | 
					          pageNo: 1,
 | 
				
			||||||
          pageSize: 10,
 | 
					          pageSize: 10,
 | 
				
			||||||
          orderId: this.$route.params.orderId,
 | 
					          orderId: this.$route.query.orderId,
 | 
				
			||||||
          flowDetId: [this.detId],
 | 
					          flowDetId: [this.detId],
 | 
				
			||||||
          // orderId: this.$route.params.orderId,
 | 
					          // orderId: this.$route.query.orderId,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        },).then((res) => {
 | 
					        },).then((res) => {
 | 
				
			||||||
          this.materialList = res.data[0].data
 | 
					          if (res.data.length != []) {
 | 
				
			||||||
          this.name = res.data[0].name
 | 
					            this.materialList = res.data[0].data
 | 
				
			||||||
 | 
					            this.name = res.data[0].name
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        getDetValue({
 | 
					        getDetValue({
 | 
				
			||||||
          pageNo: 1,
 | 
					          pageNo: 1,
 | 
				
			||||||
          pageSize: 10,
 | 
					          pageSize: 10,
 | 
				
			||||||
          orderId: this.$route.params.orderId,
 | 
					          orderId: this.$route.query.orderId,
 | 
				
			||||||
          flowDetId: [this.detId],
 | 
					          flowDetId: [this.detId],
 | 
				
			||||||
          // orderId: this.$route.params.orderId,
 | 
					          // orderId: this.$route.query.orderId,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }).then((res) => {
 | 
					        }).then((res) => {
 | 
				
			||||||
          this.valueList = res.data[0].data
 | 
					          if (res.data.length != []) {
 | 
				
			||||||
          this.name = res.data[0].name
 | 
					            this.valueList = res.data[0].data
 | 
				
			||||||
 | 
					            this.name = res.data[0].name
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -258,12 +262,14 @@ export default {
 | 
				
			|||||||
      getDetMaterial({
 | 
					      getDetMaterial({
 | 
				
			||||||
        pageNo: 1,
 | 
					        pageNo: 1,
 | 
				
			||||||
        pageSize: 10,
 | 
					        pageSize: 10,
 | 
				
			||||||
        orderId: this.$route.params.orderId,
 | 
					        orderId: this.$route.query.orderId,
 | 
				
			||||||
        flowDetId: [this.detId],
 | 
					        flowDetId: [this.detId],
 | 
				
			||||||
      }).then((res) => {
 | 
					      }).then((res) => {
 | 
				
			||||||
        console.log(res);
 | 
					        console.log(res);
 | 
				
			||||||
        this.materialList = res.data[0].data
 | 
					        if (res.data.length != []) {
 | 
				
			||||||
        this.name = res.data[0].name
 | 
					          this.materialList = res.data[0].data
 | 
				
			||||||
 | 
					          this.name = res.data[0].name
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		clearList() {
 | 
							clearList() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -123,7 +123,7 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    console.log(this.$route.params.id)
 | 
					    console.log(this.$route.query.id)
 | 
				
			||||||
		this.loadLayout().then(json => {
 | 
							this.loadLayout().then(json => {
 | 
				
			||||||
			this.initGraph(json)
 | 
								this.initGraph(json)
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
@@ -260,7 +260,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		async loadLayout() {
 | 
							async loadLayout() {
 | 
				
			||||||
      const flowId = this.$route.params.id;
 | 
					      const flowId = this.$route.query.id;
 | 
				
			||||||
      console.log(flowId)
 | 
					      console.log(flowId)
 | 
				
			||||||
			if (!flowId) return { cells: [] }
 | 
								if (!flowId) return { cells: [] }
 | 
				
			||||||
			const { code, data } = await this.info({ id: flowId });
 | 
								const { code, data } = await this.info({ id: flowId });
 | 
				
			||||||
@@ -288,12 +288,12 @@ 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.query.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.query.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));
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -410,7 +410,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		createProcess() {
 | 
							createProcess() {
 | 
				
			||||||
			// const flowId = this.$route.params.id;
 | 
								// const flowId = this.$route.query.id;
 | 
				
			||||||
			const flowId = this.getFlowId(); // it also works
 | 
								const flowId = this.getFlowId(); // it also works
 | 
				
			||||||
			if (!flowId) {
 | 
								if (!flowId) {
 | 
				
			||||||
				this.$modal.msgError('工艺ID不能为空');
 | 
									this.$modal.msgError('工艺ID不能为空');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,14 +20,13 @@
 | 
				
			|||||||
        <InfoItem label="产品名称" :value="form.productName" />
 | 
					        <InfoItem label="产品名称" :value="form.productName" />
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="6">
 | 
					      <el-col :span="6">
 | 
				
			||||||
        <InfoItem label="产品规格"  />
 | 
					        <InfoItem label="产品规格" :value="form.specifications" />
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
    </el-row>
 | 
					    </el-row>
 | 
				
			||||||
  </section>
 | 
					  </section>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					 | 
				
			||||||
const InfoItem = {
 | 
					const InfoItem = {
 | 
				
			||||||
	name: 'InfoItem',
 | 
						name: 'InfoItem',
 | 
				
			||||||
	components: {},
 | 
						components: {},
 | 
				
			||||||
@@ -62,6 +61,7 @@ export default {
 | 
				
			|||||||
				id: null,
 | 
									id: null,
 | 
				
			||||||
				name: null,
 | 
									name: null,
 | 
				
			||||||
        productName: null,
 | 
					        productName: null,
 | 
				
			||||||
 | 
					        specifications:null,
 | 
				
			||||||
        processFlowName: null,
 | 
					        processFlowName: null,
 | 
				
			||||||
				// remark: null,
 | 
									// remark: null,
 | 
				
			||||||
				// enable: null,
 | 
									// enable: null,
 | 
				
			||||||
@@ -70,7 +70,8 @@ export default {
 | 
				
			|||||||
		};
 | 
							};
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
		this.getInfo()
 | 
					    this.getInfo()
 | 
				
			||||||
 | 
					    console.log(this.$route.query)
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	computed: {},
 | 
						computed: {},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
@@ -95,12 +96,14 @@ export default {
 | 
				
			|||||||
		// info(payload) {
 | 
							// info(payload) {
 | 
				
			||||||
		// 	return this.http(this.infoUrl, 'get', payload);
 | 
							// 	return this.http(this.infoUrl, 'get', payload);
 | 
				
			||||||
		// },
 | 
							// },
 | 
				
			||||||
    async getInfo() {
 | 
					    getInfo() {
 | 
				
			||||||
      this.form.name = this.$route.params.name
 | 
					      // console.log(this.$route.query.planProductId);
 | 
				
			||||||
      this.form.productName = this.$route.params.productName
 | 
					      this.form.name = this.$route.query.name
 | 
				
			||||||
      this.form.processFlowName = this.$route.params.processFlowName
 | 
					      this.form.specifications = this.$route.query.specifications
 | 
				
			||||||
      // this.form.name = this.$route.params.name
 | 
					      this.form.productName = this.$route.query.productName
 | 
				
			||||||
      // const flowId = this.$route.params.id;
 | 
					      this.form.processFlowName = this.$route.query.processFlowName
 | 
				
			||||||
 | 
					      // this.form.name = this.$route.query.name
 | 
				
			||||||
 | 
					      // const flowId = this.$route.query.id;
 | 
				
			||||||
      // console.log(flowId);
 | 
					      // console.log(flowId);
 | 
				
			||||||
			// if (!flowId) this.$router.go(-1);
 | 
								// if (!flowId) this.$router.go(-1);
 | 
				
			||||||
			// const { code, data } = await this.info({ id: flowId });
 | 
								// const { code, data } = await this.info({ id: flowId });
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,10 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-11-28 10:41:50
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-11-28 10:49:43
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
<!--
 | 
					<!--
 | 
				
			||||||
    filename: index.vue
 | 
					    filename: index.vue
 | 
				
			||||||
    author: liubin
 | 
					    author: liubin
 | 
				
			||||||
@@ -37,8 +44,8 @@ export default {
 | 
				
			|||||||
		};
 | 
							};
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
		console.log('activated...', this.$route.params);
 | 
							console.log('activated...', this.$route.query);
 | 
				
			||||||
		this.flowId = this.$route.params.id;
 | 
							this.flowId = this.$route.query.id;
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
	computed: {},
 | 
						computed: {},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,8 +9,8 @@
 | 
				
			|||||||
		<!-- 列表 -->
 | 
							<!-- 列表 -->
 | 
				
			||||||
		<base-table
 | 
							<base-table
 | 
				
			||||||
			:table-props="tableProps"
 | 
								:table-props="tableProps"
 | 
				
			||||||
			:page="queryParams.pageNo"
 | 
								:page="1"
 | 
				
			||||||
			:limit="queryParams.pageSize"
 | 
								:limit="10"
 | 
				
			||||||
			:table-data="list">
 | 
								:table-data="list">
 | 
				
			||||||
			<!-- <method-btn
 | 
								<!-- <method-btn
 | 
				
			||||||
				v-if="tableBtn.length"
 | 
									v-if="tableBtn.length"
 | 
				
			||||||
@@ -109,9 +109,6 @@ export default {
 | 
				
			|||||||
					name: 'search',
 | 
										name: 'search',
 | 
				
			||||||
					color: 'primary',
 | 
										color: 'primary',
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
					type: 'separate',
 | 
					 | 
				
			||||||
				},
 | 
					 | 
				
			||||||
				// {
 | 
									// {
 | 
				
			||||||
				// 	type: this.$auth.hasPermi(
 | 
									// 	type: this.$auth.hasPermi(
 | 
				
			||||||
				// 		'base:quality-inspection-record:create'
 | 
									// 		'base:quality-inspection-record:create'
 | 
				
			||||||
@@ -259,10 +256,11 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    if (this.$route.query.woIdString) {
 | 
					    if (this.$route.query.woIdString) {
 | 
				
			||||||
      console.log(this.$route.query.woIdString);
 | 
					      console.log(this.$route.query.woIdString)
 | 
				
			||||||
      this.queryParams.workOrderIdList = [this.$route.query.woIdString]
 | 
					      this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',')
 | 
				
			||||||
 | 
					      // this.queryParams.workOrderIdList = [this.$route.query.woIdString]
 | 
				
			||||||
      // let arr =[]
 | 
					      // let arr =[]
 | 
				
			||||||
      this.searchBarFormConfig[0].defaultSelect = [this.$route.query.woIdString]
 | 
					      this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',')
 | 
				
			||||||
      console.log(this.searchBarFormConfig[0].defaultSelect);
 | 
					      console.log(this.searchBarFormConfig[0].defaultSelect);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    // if (this.$route.params.startTime && this.$route.params.endTime) {
 | 
					    // if (this.$route.params.startTime && this.$route.params.endTime) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user