Compare commits
	
		
			18 Commits
		
	
	
		
			projects/m
			...
			8399081a6f
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					8399081a6f | ||
| 
						 | 
					cc6c4772d3 | ||
| ba7dad7fce | |||
| 
						 | 
					8e7e31f918 | ||
| be430ebbff | |||
| 61b4bf784b | |||
| b0f10b9002 | |||
| e6b9d75f16 | |||
| d9f3434712 | |||
| de15716b7c | |||
| c736992a34 | |||
| dcbb2c719b | |||
| bc2940ca99 | |||
| 76938951ed | |||
| 8b91e7812f | |||
| 9cffa01414 | |||
| 905479d5f4 | |||
| c1ae248234 | 
@@ -15,15 +15,14 @@ VUE_APP_TITLE = MES系统
 | 
			
		||||
VUE_APP_BASE_API = '/prod-api'
 | 
			
		||||
 | 
			
		||||
# 积木报表指向地址
 | 
			
		||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
 | 
			
		||||
VUE_APP_JIMU_API = 'http://10.70.2.2:8080'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 根据服务器或域名修改
 | 
			
		||||
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
 | 
			
		||||
PUBLIC_PATH = 'http://192.168.0.33:8889/'
 | 
			
		||||
PUBLIC_PATH = 'http://10.70.2.32'
 | 
			
		||||
 | 
			
		||||
# 二级部署路径
 | 
			
		||||
VUE_APP_APP_NAME ='yudao-admin'
 | 
			
		||||
# VUE_APP_APP_NAME ='yudao-admin'
 | 
			
		||||
 | 
			
		||||
# 多租户的开关
 | 
			
		||||
VUE_APP_TENANT_ENABLE = true
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								.env.stage
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								.env.stage
									
									
									
									
									
								
							@@ -1,16 +1,21 @@
 | 
			
		||||
NODE_ENV = production
 | 
			
		||||
# 生产环境配置
 | 
			
		||||
ENV = 'production'
 | 
			
		||||
 | 
			
		||||
# 页面标题
 | 
			
		||||
VUE_APP_TITLE = 产线监控系统
 | 
			
		||||
VUE_APP_TITLE = MES系统
 | 
			
		||||
 | 
			
		||||
# 测试环境配置
 | 
			
		||||
ENV = 'staging'
 | 
			
		||||
# 芋道管理系统/生产环境
 | 
			
		||||
VUE_APP_BASE_API = '/prod-api'
 | 
			
		||||
 | 
			
		||||
# 芋道管理系统/测试环境
 | 
			
		||||
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
 | 
			
		||||
# 积木报表指向地址
 | 
			
		||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
 | 
			
		||||
 | 
			
		||||
# 静态资源地址
 | 
			
		||||
PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
 | 
			
		||||
 | 
			
		||||
# 根据服务器或域名修改
 | 
			
		||||
PUBLIC_PATH = 'http://192.168.0.33:8889/'
 | 
			
		||||
 | 
			
		||||
# 二级部署路径
 | 
			
		||||
# VUE_APP_APP_NAME ='yudao-admin'
 | 
			
		||||
 | 
			
		||||
# 多租户的开关
 | 
			
		||||
VUE_APP_TENANT_ENABLE = true
 | 
			
		||||
@@ -20,4 +25,3 @@ VUE_APP_DOC_ENABLE = false
 | 
			
		||||
 | 
			
		||||
# 百度统计
 | 
			
		||||
VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -360,6 +360,7 @@ export default {
 | 
			
		||||
        ts: Date.now(), // 现在的时间戳
 | 
			
		||||
      }
 | 
			
		||||
      reqGet(data).then(res => {
 | 
			
		||||
        console.log(1)
 | 
			
		||||
        if (res.repCode === '0000') {
 | 
			
		||||
          this.backImgBase = res.repData.originalImageBase64
 | 
			
		||||
          this.blockBackImgBase = res.repData.jigsawImageBase64
 | 
			
		||||
 
 | 
			
		||||
@@ -248,6 +248,9 @@ export default {
 | 
			
		||||
						label: '设备编码',
 | 
			
		||||
						prop: 'code',
 | 
			
		||||
						url: '/base/core-equipment/getCode',
 | 
			
		||||
						rules: [
 | 
			
		||||
							{ required: true, message: '设备编码不能为空', trigger: 'blur' },
 | 
			
		||||
						],
 | 
			
		||||
					},
 | 
			
		||||
					{
 | 
			
		||||
						input: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -27,20 +27,20 @@
 | 
			
		||||
			<div class="legend">
 | 
			
		||||
				<div class="legend-item">
 | 
			
		||||
					<span class="icon blue"></span>
 | 
			
		||||
					<span class="text">工作时长</span>
 | 
			
		||||
					<span class="text">有效时长</span>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="legend-item">
 | 
			
		||||
					<span class="icon green"></span>
 | 
			
		||||
					<span class="text">停机时长</span>
 | 
			
		||||
					<span class="text">关机时长</span>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="legend-item">
 | 
			
		||||
					<span class="icon purple"></span>
 | 
			
		||||
					<span class="text">故障时长</span>
 | 
			
		||||
					<span class="text">中断时长</span>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="legend-item">
 | 
			
		||||
				<!-- <div class="legend-item">
 | 
			
		||||
					<span class="icon yellow"></span>
 | 
			
		||||
					<span class="text">速度开动率</span>
 | 
			
		||||
				</div>
 | 
			
		||||
				</div> -->
 | 
			
		||||
			</div>
 | 
			
		||||
			<div v-if="list.length" class="graph-grid">
 | 
			
		||||
				<div class="bg-grid grid-line">
 | 
			
		||||
@@ -389,14 +389,14 @@ export default {
 | 
			
		||||
	position: relative;
 | 
			
		||||
	padding: 4px 0;
 | 
			
		||||
	padding-left: 12px;
 | 
			
		||||
	font-size: 14px;
 | 
			
		||||
	font-size: 18px;
 | 
			
		||||
 | 
			
		||||
	&::before {
 | 
			
		||||
		content: '';
 | 
			
		||||
		position: absolute;
 | 
			
		||||
		left: 0;
 | 
			
		||||
		top: 6px;
 | 
			
		||||
		height: 16px;
 | 
			
		||||
		height: 20px;
 | 
			
		||||
		width: 4px;
 | 
			
		||||
		border-radius: 1px;
 | 
			
		||||
		background: #0b58ff;
 | 
			
		||||
 
 | 
			
		||||
@@ -16,23 +16,22 @@
 | 
			
		||||
			<div class="data-view__item">
 | 
			
		||||
				<!-- <div class="data-view__item__value">111</div> -->
 | 
			
		||||
				<div class="data-view__item__value">{{ textData.workTime }}</div>
 | 
			
		||||
				<div class="data-view__item__title blue">工作时长</div>
 | 
			
		||||
				<div class="data-view__item__title blue">有效时长</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div class="data-view__item">
 | 
			
		||||
				<!-- <div class="data-view__item__value">22</div> -->
 | 
			
		||||
				<div class="data-view__item__value">{{ textData.stopTime }}</div>
 | 
			
		||||
				<div class="data-view__item__title green">停机时长</div>
 | 
			
		||||
				<div class="data-view__item__title green">关机时长</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div class="data-view__item">
 | 
			
		||||
				<!-- <div class="data-view__item__value">10</div> -->
 | 
			
		||||
				<div class="data-view__item__value">{{ textData.downTime }}</div>
 | 
			
		||||
				<div class="data-view__item__title purple">故障时长</div>
 | 
			
		||||
				<div class="data-view__item__title purple">中断时长</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			<div class="data-view__item">
 | 
			
		||||
				<!-- <div class="data-view__item__value">100%</div> -->
 | 
			
		||||
			<!-- <div class="data-view__item">
 | 
			
		||||
				<div class="data-view__item__value">{{ textData.peEfficiency }}</div>
 | 
			
		||||
				<div class="data-view__item__title yellow">速度开动率</div>
 | 
			
		||||
			</div>
 | 
			
		||||
			</div> -->
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</template>
 | 
			
		||||
@@ -93,7 +92,7 @@ export default {
 | 
			
		||||
						// 外环
 | 
			
		||||
						name: '',
 | 
			
		||||
						type: 'pie',
 | 
			
		||||
						radius: ['75%', '90%'],
 | 
			
		||||
						radius: ['60%', '90%'],
 | 
			
		||||
						center: ['50%', '48%'],
 | 
			
		||||
						label: {
 | 
			
		||||
							show: false,
 | 
			
		||||
@@ -259,7 +258,7 @@ export default {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.data-view__item__title {
 | 
			
		||||
	font-size: 8px;
 | 
			
		||||
	font-size: 14px;
 | 
			
		||||
	line-height: 14px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@
 | 
			
		||||
			:page="1"
 | 
			
		||||
			:limit="10"
 | 
			
		||||
			:table-data="list"
 | 
			
		||||
			height="65vh"
 | 
			
		||||
			@emitFun="handleEmitFun" />
 | 
			
		||||
 | 
			
		||||
		<!-- <el-row>
 | 
			
		||||
@@ -122,23 +123,24 @@ export default {
 | 
			
		||||
			// 		: undefined,
 | 
			
		||||
			// ].filter((v) => v),
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{ prop: 'factoryName', label: '工厂' },
 | 
			
		||||
				{ prop: 'lineName', label: '产线' },
 | 
			
		||||
				{ prop: 'sectionName', label: '工段' },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备' },
 | 
			
		||||
				{ prop: 'factoryName', label: '工厂', showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'lineName', label: '产线', showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'sectionName', label: '工段', showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备', showOverflowtooltip: true },
 | 
			
		||||
				{
 | 
			
		||||
					label: '有效时间',
 | 
			
		||||
					children: [
 | 
			
		||||
						{
 | 
			
		||||
							width: 128,
 | 
			
		||||
							prop: 'workTime',
 | 
			
		||||
							label: '工作时长[h]',
 | 
			
		||||
							label: '工作时长(h)',
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(2) : '-'),
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							width: 128,
 | 
			
		||||
							prop: 'workRate',
 | 
			
		||||
							label: '百分比[%]',
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(3) : '-'),
 | 
			
		||||
							label: '百分比(%)',
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(0) : '-'),
 | 
			
		||||
						},
 | 
			
		||||
					],
 | 
			
		||||
				},
 | 
			
		||||
@@ -148,9 +150,10 @@ export default {
 | 
			
		||||
						{
 | 
			
		||||
							width: 128,
 | 
			
		||||
							prop: 'stopTime',
 | 
			
		||||
							label: '停机时长[h]',
 | 
			
		||||
							label: '停机时长(h)',
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(0) : '-'),
 | 
			
		||||
						},
 | 
			
		||||
						{ width: 128, prop: 'stopRate', label: '百分比[%]' },
 | 
			
		||||
						{ width: 128, prop: 'stopRate', label: '百分比(%)', filter: (val) => (val != null ? +Number(val).toFixed(0) : '-'), },
 | 
			
		||||
					],
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
@@ -159,48 +162,52 @@ export default {
 | 
			
		||||
						{
 | 
			
		||||
							width: 128,
 | 
			
		||||
							prop: 'downTime',
 | 
			
		||||
							label: '故障时长[h]',
 | 
			
		||||
							filter: (val) => (val != null ? +val.toFixed(3) : '-'),
 | 
			
		||||
							label: '故障时长(h)',
 | 
			
		||||
							filter: (val) => (val != null ? +val.toFixed(2) : '-'),
 | 
			
		||||
						},
 | 
			
		||||
						{ width: 128, prop: 'downRate', label: '百分比[%]' },
 | 
			
		||||
						{ width: 128, prop: 'downRate', label: '百分比(%)', filter: (val) => (val != null ? +Number(val).toFixed(0) : '-'), },
 | 
			
		||||
						{
 | 
			
		||||
							width: 128,
 | 
			
		||||
							prop: 'timeEfficiency',
 | 
			
		||||
							label: '时间开动率',
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(3) : '-'),
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(2) : '-'),
 | 
			
		||||
						},
 | 
			
		||||
					],
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					label: '速度损失',
 | 
			
		||||
					showOverflowtooltip: true,
 | 
			
		||||
					children: [
 | 
			
		||||
						{
 | 
			
		||||
							width: 128,
 | 
			
		||||
							prop: 'realProcSpeed',
 | 
			
		||||
							label: '实际加工速度',
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(2) : '-'),
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							width: 128,
 | 
			
		||||
							prop: 'designProcSpeed',
 | 
			
		||||
							label: '理论加工速度',
 | 
			
		||||
							showOverflowtooltip: true,
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(2) : '-'),
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							width: 128,
 | 
			
		||||
							prop: 'peEfficiency',
 | 
			
		||||
							label: '速度开动率',
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(3) : '-'),
 | 
			
		||||
							filter: (val) => (val != null ? +Number(val).toFixed(2) : '-'),
 | 
			
		||||
						},
 | 
			
		||||
					],
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'oee',
 | 
			
		||||
					label: 'OEE',
 | 
			
		||||
					filter: (val) => (val != null ? +Number(val).toFixed(3) : '-'),
 | 
			
		||||
					filter: (val) => (val != null ? +Number(val).toFixed(2) : '-'),
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					prop: 'teep',
 | 
			
		||||
					label: 'TEEP',
 | 
			
		||||
					filter: (val) => (val != null ? +Number(val).toFixed(3) : '-'),
 | 
			
		||||
					filter: (val) => (val != null ? +Number(val).toFixed(2) : '-'),
 | 
			
		||||
				},
 | 
			
		||||
				// {
 | 
			
		||||
				// 	_action: 'view-trend',
 | 
			
		||||
@@ -433,6 +440,9 @@ export default {
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.app-container {
 | 
			
		||||
	overflow: inherit;
 | 
			
		||||
}
 | 
			
		||||
.visualization {
 | 
			
		||||
	display: grid;
 | 
			
		||||
	grid-template-columns: repeat(3, minmax(240px, 1fr));
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
		:show-close="false"
 | 
			
		||||
		:wrapper-closable="isdetail"
 | 
			
		||||
		class="drawer"
 | 
			
		||||
		size="60%"
 | 
			
		||||
		size="55%"
 | 
			
		||||
		@closed="$emit('destroy')">
 | 
			
		||||
		<small-title slot="title" :no-padding="true">
 | 
			
		||||
			{{ isdetail ? '查看详情' : !dataForm.id ? '新增' : '编辑' }}
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
			label-width="100px"
 | 
			
		||||
			v-loading="formLoading">
 | 
			
		||||
			<el-row :gutter="20">
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
					<el-form-item label="设备名称" prop="equipmentId">
 | 
			
		||||
						<el-select
 | 
			
		||||
							v-model="dataForm.equipmentId"
 | 
			
		||||
@@ -41,7 +41,7 @@
 | 
			
		||||
						</el-select>
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
					<!-- <el-form-item label="物料名称" prop="name">
 | 
			
		||||
						<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入物料名称" />
 | 
			
		||||
					</el-form-item> -->
 | 
			
		||||
@@ -61,21 +61,19 @@
 | 
			
		||||
						</el-select>
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
			</el-row>
 | 
			
		||||
			<el-row :gutter="20">
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
					<el-form-item label="设备编码" prop="equipmentCode">
 | 
			
		||||
						<el-input v-model="dataForm.equipmentCode" disabled clearable placeholder="请输入设备编码" />
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
			</el-row>
 | 
			
		||||
			<el-row :gutter="20">
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
					<el-form-item label="巡检人" prop="responsible">
 | 
			
		||||
						<el-input v-model="dataForm.responsible" :disabled="isdetail" clearable placeholder="请输入巡检人" />
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
			</el-row>
 | 
			
		||||
			<el-row :gutter="20">
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
					<el-form-item label="巡检时间" prop="actualTime">
 | 
			
		||||
						<el-date-picker
 | 
			
		||||
							v-model="dataForm.actualTime"
 | 
			
		||||
@@ -86,7 +84,7 @@
 | 
			
		||||
							placeholder="选择巡检时间" />
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
				<el-col :span="12">
 | 
			
		||||
				<el-col :span="8">
 | 
			
		||||
					<el-form-item label="数据来源" prop="origin">
 | 
			
		||||
						<el-select
 | 
			
		||||
							v-model="dataForm.origin"
 | 
			
		||||
@@ -95,7 +93,7 @@
 | 
			
		||||
							style="width: 100%"
 | 
			
		||||
							placeholder="请选择数据来源">
 | 
			
		||||
							<el-option key="1" label="手动" :value="1" />
 | 
			
		||||
							<el-option key="2" label="自动" :value="2" />
 | 
			
		||||
							<el-option key="2" label="PDA" :value="2" />
 | 
			
		||||
						</el-select>
 | 
			
		||||
					</el-form-item>
 | 
			
		||||
				</el-col>
 | 
			
		||||
@@ -108,7 +106,8 @@
 | 
			
		||||
					:table-data="list" />
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
			<el-form-item label="巡检详情" prop="description">
 | 
			
		||||
				<editor v-model="dataForm.description" :read-only="isdetail" :min-height="150"/>
 | 
			
		||||
				<editor v-if="!isdetail" v-model="dataForm.description" :min-height="150"/>
 | 
			
		||||
				<div v-else v-html="dataForm.description" style="padding: 5px; margin-left: 5px; border: 1px solid #dfdfdf" />
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
			<el-form-item label="附件">
 | 
			
		||||
				<FileUpload v-model="file" :limit="1" :f-name="fileName" :disabled="isdetail" @name="setFileName" />
 | 
			
		||||
@@ -117,7 +116,7 @@
 | 
			
		||||
		</el-form>
 | 
			
		||||
 | 
			
		||||
		<div v-if="!isdetail" class="drawer-body__footer">
 | 
			
		||||
			<el-button type="primary" @click="goback()">取消</el-button>
 | 
			
		||||
			<el-button @click="goback()">取消</el-button>
 | 
			
		||||
			<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
 | 
			
		||||
		</div>
 | 
			
		||||
	</el-drawer>
 | 
			
		||||
@@ -185,7 +184,7 @@ export default {
 | 
			
		||||
				actualTime: undefined,
 | 
			
		||||
				responsible: undefined,
 | 
			
		||||
				description: undefined,
 | 
			
		||||
				origin: undefined,
 | 
			
		||||
				origin: 1,
 | 
			
		||||
				files: []
 | 
			
		||||
			},
 | 
			
		||||
			list: [],
 | 
			
		||||
@@ -220,9 +219,12 @@ export default {
 | 
			
		||||
		async setConfig() {
 | 
			
		||||
			const configres = await getcheckConfigByEqList({equipmentId: this.dataForm.equipmentId})
 | 
			
		||||
			this.configList = configres.data
 | 
			
		||||
			this.dataForm.configId = this.configList.filter(it => {
 | 
			
		||||
				return it.id === this.dataForm.configId
 | 
			
		||||
			})[0]?.id ?? undefined
 | 
			
		||||
			this.dataForm.equipmentCode = this.eqList.filter(item => {
 | 
			
		||||
				return item.id === this.dataForm.equipmentId
 | 
			
		||||
			})[0].code
 | 
			
		||||
			})[0]?.code ?? undefined
 | 
			
		||||
		},
 | 
			
		||||
		goback() {
 | 
			
		||||
			this.$emit('refreshDataList');
 | 
			
		||||
@@ -265,6 +267,7 @@ export default {
 | 
			
		||||
							this.file = this.dataForm.files[0].fileUrl
 | 
			
		||||
							this.fileName = this.dataForm.files[0].fileName
 | 
			
		||||
						}
 | 
			
		||||
						this.dataForm.description = this.dataForm.description || '无'
 | 
			
		||||
						this.setConfig()
 | 
			
		||||
						this.setInspectionContet()
 | 
			
		||||
          });
 | 
			
		||||
 
 | 
			
		||||
@@ -94,7 +94,7 @@ export default {
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{ prop: 'configName', label: '配置名称' },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备名称' },
 | 
			
		||||
				{ prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', '自动'][val] },
 | 
			
		||||
				{ prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', 'PDA'][val] },
 | 
			
		||||
				// { prop: 'sectionName', label: '计划巡检时间' },
 | 
			
		||||
				{ prop: 'actualTime', label: '实际巡检时间', filter: parseTime },
 | 
			
		||||
				// { prop: 'maintenanceDetail', label: '完成状态' },
 | 
			
		||||
@@ -131,6 +131,15 @@ export default {
 | 
			
		||||
				{
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:check-record:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:check-record:create')
 | 
			
		||||
						? 'button'
 | 
			
		||||
@@ -140,17 +149,6 @@ export default {
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'success',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:check-record:export')
 | 
			
		||||
						? 'button'
 | 
			
		||||
						: '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					color: 'warning',
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
			rows: [
 | 
			
		||||
				[
 | 
			
		||||
 
 | 
			
		||||
@@ -2,14 +2,14 @@
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2021-11-18 14:16:25
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @LastEditTime: 2023-11-27 10:48:55
 | 
			
		||||
 * @LastEditTime: 2023-12-01 11:02:43
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
	<el-drawer
 | 
			
		||||
		:visible.sync="visible"
 | 
			
		||||
		:show-close="false"
 | 
			
		||||
		:wrapper-closable="false"
 | 
			
		||||
		:wrapper-closable="true"
 | 
			
		||||
		class="drawer"
 | 
			
		||||
		size="50%">
 | 
			
		||||
		<small-title slot="title" :no-padding="true">
 | 
			
		||||
@@ -43,6 +43,8 @@
 | 
			
		||||
				</el-form>
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
			<el-divider />
 | 
			
		||||
 | 
			
		||||
			<div class="attr-list">
 | 
			
		||||
				<small-title
 | 
			
		||||
					style="margin: 16px 0; padding-left: 8px"
 | 
			
		||||
@@ -78,9 +80,9 @@
 | 
			
		||||
					:page-sizes="[5, 10, 15]"
 | 
			
		||||
					@pagination="getList" />
 | 
			
		||||
 | 
			
		||||
				<div class="drawer-body__footer">
 | 
			
		||||
				<!-- <div class="drawer-body__footer">
 | 
			
		||||
					<el-button type="primary" @click="goback()">关闭</el-button>
 | 
			
		||||
				</div>
 | 
			
		||||
				</div> -->
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
		</div>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<el-dialog
 | 
			
		||||
		:visible.sync="visible"
 | 
			
		||||
		:width="'35%'"
 | 
			
		||||
		:width="'30%'"
 | 
			
		||||
		:append-to-body="true"
 | 
			
		||||
		:close-on-click-modal="false"
 | 
			
		||||
		class="dialog">
 | 
			
		||||
@@ -17,7 +17,7 @@
 | 
			
		||||
			ref="dataForm"
 | 
			
		||||
			:model="dataForm"
 | 
			
		||||
			:rules="dataRule"
 | 
			
		||||
			label-width="100px"
 | 
			
		||||
			label-width="60px"
 | 
			
		||||
			@keyup.enter.native="dataFormSubmit()">
 | 
			
		||||
			<el-form-item label="巡检" prop="checkId">
 | 
			
		||||
				<el-select v-model="dataForm.checkId" filterable placeholder="请选择巡检" style="width: 100%">
 | 
			
		||||
 
 | 
			
		||||
@@ -66,6 +66,13 @@ export default {
 | 
			
		||||
			addOrEditTitle: '',
 | 
			
		||||
			searchBarKeys: ['equipmentId', 'name'],
 | 
			
		||||
			tableBtn: [
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:addInsp')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'add',
 | 
			
		||||
							btnName: '添加',
 | 
			
		||||
							showTip: '添加巡检'
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:update')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'edit',
 | 
			
		||||
@@ -78,12 +85,6 @@ export default {
 | 
			
		||||
							btnName: '查看详情',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:addInsp')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'add',
 | 
			
		||||
							btnName: '添加巡检',
 | 
			
		||||
					  }
 | 
			
		||||
					: undefined,
 | 
			
		||||
				this.$auth.hasPermi('equipment:check-setting:delete')
 | 
			
		||||
					? {
 | 
			
		||||
							type: 'delete',
 | 
			
		||||
@@ -92,12 +93,12 @@ export default {
 | 
			
		||||
					: undefined,
 | 
			
		||||
			].filter((v) => v),
 | 
			
		||||
			tableProps: [
 | 
			
		||||
				{ prop: 'name', label: '配置名' },
 | 
			
		||||
				{ prop: 'code', label: '编码' },
 | 
			
		||||
				{ prop: 'lineName', label: '产线' },
 | 
			
		||||
				{ prop: 'sectionName', label: '工段' },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备' },
 | 
			
		||||
				{ prop: 'equipmentCode', label: '设备编码' },
 | 
			
		||||
				{ prop: 'name', label: '配置名', width: 110, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'code', label: '编码', minWidth: 150, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'lineName', label: '产线', showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'sectionName', label: '工段', showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备', showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'equipmentCode', label: '设备编码', minWidth: 150, showOverflowtooltip: true },
 | 
			
		||||
				// { prop: 'responsible', label: '负责人' },
 | 
			
		||||
				{ prop: 'checkNumber', label: '巡检条数' }, // TODO: 操作 选项,四个,群里询问
 | 
			
		||||
			],
 | 
			
		||||
 
 | 
			
		||||
@@ -183,7 +183,7 @@ export default {
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'warning',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
			// 是否显示弹出层
 | 
			
		||||
 
 | 
			
		||||
@@ -170,7 +170,7 @@ export default {
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'warning',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:maintain-record:create')
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										35
									
								
								src/views/equipment/base/repair/htmls.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								src/views/equipment/base/repair/htmls.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-11-08 14:00:52
 | 
			
		||||
 * @LastEditTime: 2023-12-01 10:12:27
 | 
			
		||||
 * @LastEditors: DY
 | 
			
		||||
 * @Description:
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div v-html="content" />
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      content: ''
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getContent()
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  methods: {
 | 
			
		||||
    getContent() {
 | 
			
		||||
      this.content = this.injectData[this.injectData.prop] ?? ''
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
@@ -59,6 +59,7 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
 | 
			
		||||
import CustomDialogForm from './CustomDialogForm.vue';
 | 
			
		||||
import { deleteRepair, exportRepairLogExcel } from '@/api/equipment/base/repair'
 | 
			
		||||
import { parseTime } from '@/utils/ruoyi'
 | 
			
		||||
import htmls from './htmls.vue'
 | 
			
		||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
@@ -121,7 +122,7 @@ export default {
 | 
			
		||||
				{ prop: 'lineName', label: '产线' },
 | 
			
		||||
				{ prop: 'sectionName', label: '工段' },
 | 
			
		||||
				{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'maintenanceDetail', label: '维修明细', minWidth: 100, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'maintenanceDetail', label: '维修明细', subcomponent: htmls, minWidth: 100, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true },
 | 
			
		||||
				{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true },
 | 
			
		||||
@@ -168,6 +169,13 @@ export default {
 | 
			
		||||
				{
 | 
			
		||||
					type: 'separate',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:repair:create') ? 'button' : '',
 | 
			
		||||
					btnName: '新增',
 | 
			
		||||
@@ -175,13 +183,6 @@ export default {
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'success',
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					plain: true,
 | 
			
		||||
					color: 'warning',
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
			rows: [
 | 
			
		||||
				[
 | 
			
		||||
 
 | 
			
		||||
@@ -252,7 +252,7 @@ export default {
 | 
			
		||||
					type: 'button',
 | 
			
		||||
					btnName: '导出',
 | 
			
		||||
					name: 'export',
 | 
			
		||||
					color: 'warning',
 | 
			
		||||
					color: 'primary',
 | 
			
		||||
					plain: true
 | 
			
		||||
				},
 | 
			
		||||
			],
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user