Compare commits
	
		
			1 Commits
		
	
	
		
			ba7dad7fce
			...
			projects/m
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e28cd67e20 | 
@@ -15,14 +15,15 @@ VUE_APP_TITLE = MES系统
 | 
				
			|||||||
VUE_APP_BASE_API = '/prod-api'
 | 
					VUE_APP_BASE_API = '/prod-api'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 积木报表指向地址
 | 
					# 积木报表指向地址
 | 
				
			||||||
VUE_APP_JIMU_API = 'http://10.70.2.2:8080'
 | 
					VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 根据服务器或域名修改
 | 
					# 根据服务器或域名修改
 | 
				
			||||||
PUBLIC_PATH = 'http://10.70.2.32'
 | 
					# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
 | 
				
			||||||
 | 
					PUBLIC_PATH = 'http://192.168.0.33:8889/'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 二级部署路径
 | 
					# 二级部署路径
 | 
				
			||||||
# VUE_APP_APP_NAME ='yudao-admin'
 | 
					VUE_APP_APP_NAME ='yudao-admin'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 多租户的开关
 | 
					# 多租户的开关
 | 
				
			||||||
VUE_APP_TENANT_ENABLE = true
 | 
					VUE_APP_TENANT_ENABLE = true
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										22
									
								
								.env.stage
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								.env.stage
									
									
									
									
									
								
							@@ -1,21 +1,16 @@
 | 
				
			|||||||
# 生产环境配置
 | 
					NODE_ENV = production
 | 
				
			||||||
ENV = 'production'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 页面标题
 | 
					# 页面标题
 | 
				
			||||||
VUE_APP_TITLE = MES系统
 | 
					VUE_APP_TITLE = 产线监控系统
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 芋道管理系统/生产环境
 | 
					# 测试环境配置
 | 
				
			||||||
VUE_APP_BASE_API = '/prod-api'
 | 
					ENV = 'staging'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 积木报表指向地址
 | 
					# 芋道管理系统/测试环境
 | 
				
			||||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
 | 
					VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 静态资源地址
 | 
				
			||||||
# 根据服务器或域名修改
 | 
					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
 | 
					VUE_APP_TENANT_ENABLE = true
 | 
				
			||||||
@@ -25,3 +20,4 @@ VUE_APP_DOC_ENABLE = false
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# 百度统计
 | 
					# 百度统计
 | 
				
			||||||
VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
 | 
					VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,7 +48,7 @@
 | 
				
			|||||||
    "benz-amr-recorder": "^1.1.5",
 | 
					    "benz-amr-recorder": "^1.1.5",
 | 
				
			||||||
    "bpmn-js-token-simulation": "0.10.0",
 | 
					    "bpmn-js-token-simulation": "0.10.0",
 | 
				
			||||||
    "clipboard": "2.0.8",
 | 
					    "clipboard": "2.0.8",
 | 
				
			||||||
    "code-brick-zj": "^1.0.5",
 | 
					    "code-brick-zj": "^1.0.2",
 | 
				
			||||||
    "core-js": "^3.26.0",
 | 
					    "core-js": "^3.26.0",
 | 
				
			||||||
    "crypto-js": "^4.0.0",
 | 
					    "crypto-js": "^4.0.0",
 | 
				
			||||||
    "diagram-js": "^12.3.0",
 | 
					    "diagram-js": "^12.3.0",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -125,8 +125,11 @@ export default {
 | 
				
			|||||||
			// 取消自动聚焦 start
 | 
								// 取消自动聚焦 start
 | 
				
			||||||
			this.Quill?.enable(false);
 | 
								this.Quill?.enable(false);
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
				this.Quill?.blur();
 | 
					 | 
				
			||||||
				this.Quill?.enable(true);
 | 
									this.Quill?.enable(true);
 | 
				
			||||||
 | 
									this.Quill?.blur();
 | 
				
			||||||
 | 
									// if (!this.readOnly) {
 | 
				
			||||||
 | 
									// 	this.Quill?.enable();
 | 
				
			||||||
 | 
									// }
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
			// 如果设置了上传地址则自定义图片上传事件
 | 
								// 如果设置了上传地址则自定义图片上传事件
 | 
				
			||||||
			if (this.type === 'url') {
 | 
								if (this.type === 'url') {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -360,7 +360,6 @@ export default {
 | 
				
			|||||||
        ts: Date.now(), // 现在的时间戳
 | 
					        ts: Date.now(), // 现在的时间戳
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      reqGet(data).then(res => {
 | 
					      reqGet(data).then(res => {
 | 
				
			||||||
        console.log(1)
 | 
					 | 
				
			||||||
        if (res.repCode === '0000') {
 | 
					        if (res.repCode === '0000') {
 | 
				
			||||||
          this.backImgBase = res.repData.originalImageBase64
 | 
					          this.backImgBase = res.repData.originalImageBase64
 | 
				
			||||||
          this.blockBackImgBase = res.repData.jigsawImageBase64
 | 
					          this.blockBackImgBase = res.repData.jigsawImageBase64
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -78,6 +78,7 @@ export default {
 | 
				
			|||||||
			return this.http(this.infoUrl == '' ? this.infoPath : this.infoUrl, 'get', payload);
 | 
								return this.http(this.infoUrl == '' ? this.infoPath : this.infoUrl, 'get', payload);
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		del(payload) {
 | 
							del(payload) {
 | 
				
			||||||
 | 
								debugger;
 | 
				
			||||||
			return this.http(this.deleteUrl == '' ? this.deletePath : this.deleteUrl, 'delete', payload);
 | 
								return this.http(this.deleteUrl == '' ? this.deletePath : this.deleteUrl, 'delete', payload);
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,7 +94,7 @@ export default {
 | 
				
			|||||||
		return {
 | 
							return {
 | 
				
			||||||
			readOnly: false,
 | 
								readOnly: false,
 | 
				
			||||||
			chosedLogId: false,
 | 
								chosedLogId: false,
 | 
				
			||||||
			searchBarKeys: ['equipmentName', 'createTime'],
 | 
								searchBarKeys: ['equipmentName', 'recordTime'],
 | 
				
			||||||
			tableBtn: [
 | 
								tableBtn: [
 | 
				
			||||||
				// this.$auth.hasPermi('equipment:spare-parts-config:update')
 | 
									// this.$auth.hasPermi('equipment:spare-parts-config:update')
 | 
				
			||||||
				// 	? {
 | 
									// 	? {
 | 
				
			||||||
@@ -124,11 +124,11 @@ export default {
 | 
				
			|||||||
					label: '报警级别',
 | 
										label: '报警级别',
 | 
				
			||||||
					filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
 | 
										filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				{ prop: 'createTime', label: '报警时间', filter: timeFilter },
 | 
									{ prop: 'createTime', label: '报警时间', filter: timeFilter }, // 接口缺
 | 
				
			||||||
				{ prop: 'alarmCode', label: '设备报警码' },
 | 
									{ prop: 'alarmCode', label: '设备报警码' }, // 接口缺
 | 
				
			||||||
				{ prop: 'alarmContent', label: '报警内容' },
 | 
									{ prop: 'alarmContent', label: '报警内容' },
 | 
				
			||||||
				{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
 | 
									{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
 | 
				
			||||||
				{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn },
 | 
									{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn }, // TODO: 是否换成按钮, 群里问
 | 
				
			||||||
				// { prop: 'remark', label: '备注' },
 | 
									// { prop: 'remark', label: '备注' },
 | 
				
			||||||
			],
 | 
								],
 | 
				
			||||||
			searchBarFormConfig: [
 | 
								searchBarFormConfig: [
 | 
				
			||||||
@@ -145,8 +145,8 @@ export default {
 | 
				
			|||||||
					dateType: 'daterange', // datetimerange
 | 
										dateType: 'daterange', // datetimerange
 | 
				
			||||||
					// format: 'yyyy-MM-dd HH:mm:ss',
 | 
										// format: 'yyyy-MM-dd HH:mm:ss',
 | 
				
			||||||
					format: 'yyyy-MM-dd',
 | 
										format: 'yyyy-MM-dd',
 | 
				
			||||||
					// valueFormat: 'timestamp',
 | 
										valueFormat: 'timestamp',
 | 
				
			||||||
					valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
										// valueFormat: 'yyyy-MM-dd HH:mm:ss',
 | 
				
			||||||
					rangeSeparator: '-',
 | 
										rangeSeparator: '-',
 | 
				
			||||||
					startPlaceholder: '开始日期',
 | 
										startPlaceholder: '开始日期',
 | 
				
			||||||
					endPlaceholder: '结束日期',
 | 
										endPlaceholder: '结束日期',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,10 +84,10 @@ export default {
 | 
				
			|||||||
					: undefined,
 | 
										: undefined,
 | 
				
			||||||
			].filter((v) => v),
 | 
								].filter((v) => v),
 | 
				
			||||||
			tableProps: [
 | 
								tableProps: [
 | 
				
			||||||
				{ prop: 'program', label: '巡检项目', showOverflowtooltip: true },
 | 
									{ prop: 'program', label: '巡检项目' },
 | 
				
			||||||
				{ prop: 'content', label: '巡检内容', minWidth: 150, showOverflowtooltip: true },
 | 
									{ prop: 'content', label: '巡检内容' },
 | 
				
			||||||
				{ prop: 'code', label: '巡检内容编码', showOverflowtooltip: true },
 | 
									{ prop: 'code', label: '巡检内容编码' },
 | 
				
			||||||
				{ prop: 'remark', label: '备注', showOverflowtooltip: true },
 | 
									{ prop: 'remark', label: '备注' },
 | 
				
			||||||
			],
 | 
								],
 | 
				
			||||||
			searchBarFormConfig: [
 | 
								searchBarFormConfig: [
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -60,9 +60,8 @@
 | 
				
			|||||||
						</el-col>
 | 
											</el-col>
 | 
				
			||||||
					</el-row>
 | 
										</el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					<el-divider />
 | 
										<el-divider style="margin-top: -10px" />
 | 
				
			||||||
					
 | 
										
 | 
				
			||||||
					<div v-if=" disabled && dataForm.maintenanceStatus === 1 ? true : !disabled ? true : false">
 | 
					 | 
				
			||||||
					<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
 | 
										<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
 | 
				
			||||||
						{{ '设备维修信息' }}
 | 
											{{ '设备维修信息' }}
 | 
				
			||||||
					</small-title>
 | 
										</small-title>
 | 
				
			||||||
@@ -165,7 +164,6 @@
 | 
				
			|||||||
							</el-form-item>
 | 
												</el-form-item>
 | 
				
			||||||
						</el-col>
 | 
											</el-col>
 | 
				
			||||||
					</el-row>
 | 
										</el-row>
 | 
				
			||||||
					</div>
 | 
					 | 
				
			||||||
				</el-form>
 | 
									</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				<div v-if="!disabled" class="drawer-body__footer">
 | 
									<div v-if="!disabled" class="drawer-body__footer">
 | 
				
			||||||
@@ -251,7 +249,7 @@ export default {
 | 
				
			|||||||
					getEqRepair(this.dataForm.id).then(response => {
 | 
										getEqRepair(this.dataForm.id).then(response => {
 | 
				
			||||||
						this.formLoading = false
 | 
											this.formLoading = false
 | 
				
			||||||
            this.dataForm = response.data;
 | 
					            this.dataForm = response.data;
 | 
				
			||||||
						this.dataForm.maintenanceStatus = this.dataForm.maintenanceStatus || 0
 | 
											this.dataForm.maintenanceStatus = row.maintenanceStatus || 0
 | 
				
			||||||
						if (this.dataForm.files.length > 0) {
 | 
											if (this.dataForm.files.length > 0) {
 | 
				
			||||||
							this.file = this.dataForm.files[0].fileUrl
 | 
												this.file = this.dataForm.files[0].fileUrl
 | 
				
			||||||
							this.fileName = this.dataForm.files[0].fileName
 | 
												this.fileName = this.dataForm.files[0].fileName
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -121,7 +121,7 @@ export default {
 | 
				
			|||||||
				{ prop: 'lineName', label: '产线' },
 | 
									{ prop: 'lineName', label: '产线' },
 | 
				
			||||||
				{ prop: 'sectionName', label: '工段' },
 | 
									{ prop: 'sectionName', label: '工段' },
 | 
				
			||||||
				{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
 | 
									{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
 | 
				
			||||||
				{ prop: 'maintenanceDetail', label: '维修明细', minWidth: 100, showOverflowtooltip: true },
 | 
									{ prop: 'maintenanceDetail', label: '维修明细' },
 | 
				
			||||||
				{ prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
 | 
									{ prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
 | 
				
			||||||
				{ prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true },
 | 
									{ prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true },
 | 
				
			||||||
				{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true },
 | 
									{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,47 +9,41 @@
 | 
				
			|||||||
	<el-drawer
 | 
						<el-drawer
 | 
				
			||||||
		:visible.sync="visible"
 | 
							:visible.sync="visible"
 | 
				
			||||||
		:show-close="false"
 | 
							:show-close="false"
 | 
				
			||||||
		:wrapper-closable="disabled"
 | 
							:wrapper-closable="false"
 | 
				
			||||||
		class="drawer"
 | 
							class="drawer"
 | 
				
			||||||
		size="60%"
 | 
							size="60%">
 | 
				
			||||||
		@closed="$emit('destroy')">
 | 
					 | 
				
			||||||
		<small-title slot="title" :no-padding="true">
 | 
							<small-title slot="title" :no-padding="true">
 | 
				
			||||||
			{{ disabled ? '查看备件' : '添加备件' }}
 | 
								{{ disabled ? '查看备件' : '添加备件' }}
 | 
				
			||||||
		</small-title>
 | 
							</small-title>
 | 
				
			||||||
		<div class="content">
 | 
					 | 
				
			||||||
		<el-form
 | 
							<el-form
 | 
				
			||||||
			ref="form"
 | 
								ref="form"
 | 
				
			||||||
			:model="dataForm"
 | 
								:model="dataForm"
 | 
				
			||||||
			label-width="100px"
 | 
								label-width="100px"
 | 
				
			||||||
				label-position="top"
 | 
					 | 
				
			||||||
			v-loading="formLoading">
 | 
								v-loading="formLoading">
 | 
				
			||||||
			<el-row :gutter="20">
 | 
								<el-row :gutter="20">
 | 
				
			||||||
					<el-col :span="6">
 | 
									<el-col :span="12">
 | 
				
			||||||
					<el-form-item label="配置名" prop="name">
 | 
										<el-form-item label="配置名" prop="name">
 | 
				
			||||||
						<span>{{ dataForm.name }}</span>
 | 
											<span>{{ dataForm.name }}</span>
 | 
				
			||||||
					</el-form-item>
 | 
										</el-form-item>
 | 
				
			||||||
				</el-col>
 | 
									</el-col>
 | 
				
			||||||
					<el-col :span="6">
 | 
									<el-col :span="12">
 | 
				
			||||||
					<el-form-item label="设备名称" prop="equipmentName">
 | 
										<el-form-item label="设备名称" prop="equipmentName">
 | 
				
			||||||
						<span>{{ dataForm.equipmentName }}</span>
 | 
											<span>{{ dataForm.equipmentName }}</span>
 | 
				
			||||||
					</el-form-item>
 | 
										</el-form-item>
 | 
				
			||||||
				</el-col>
 | 
									</el-col>
 | 
				
			||||||
					<el-col :span="6">
 | 
								</el-row>
 | 
				
			||||||
 | 
								<el-row :gutter="20">
 | 
				
			||||||
 | 
									<el-col :span="12">
 | 
				
			||||||
					<el-form-item label="负责人" prop="responsible">
 | 
										<el-form-item label="负责人" prop="responsible">
 | 
				
			||||||
						<span>{{ dataForm.responsible }}</span>
 | 
											<span>{{ dataForm.responsible }}</span>
 | 
				
			||||||
					</el-form-item>
 | 
										</el-form-item>
 | 
				
			||||||
				</el-col>
 | 
									</el-col>
 | 
				
			||||||
			</el-row>
 | 
								</el-row>
 | 
				
			||||||
				<el-form-item label="描述" prop="description">
 | 
								<el-form-item label="描述" prop="faultTime">
 | 
				
			||||||
					<div v-html="dataForm.description" style="padding: 5px; margin: 0; border: 1px solid #dfdfdf" />
 | 
									<editor v-model="dataForm.description" read-only :min-height="200"/>
 | 
				
			||||||
					<!-- <editor v-model="dataForm.description" read-only :min-height="200"/> -->
 | 
					 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			<div>
 | 
					 | 
				
			||||||
				<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
 | 
					 | 
				
			||||||
					{{ '备品备件' }}
 | 
					 | 
				
			||||||
				</small-title>
 | 
					 | 
				
			||||||
			<div v-if="!disabled" class="action_btn">
 | 
								<div v-if="!disabled" class="action_btn">
 | 
				
			||||||
				<template>
 | 
									<template>
 | 
				
			||||||
					<span style="display: inline-block;" @click="addNew()">
 | 
										<span style="display: inline-block;" @click="addNew()">
 | 
				
			||||||
@@ -78,12 +72,10 @@
 | 
				
			|||||||
				:limit.sync="listQuery.pageSize"
 | 
									:limit.sync="listQuery.pageSize"
 | 
				
			||||||
				:page-sizes="[5, 10, 15]"
 | 
									:page-sizes="[5, 10, 15]"
 | 
				
			||||||
				@pagination="getList" />
 | 
									@pagination="getList" />
 | 
				
			||||||
			</div>	
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<div v-if="!disabled" 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>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<attr-add
 | 
							<attr-add
 | 
				
			||||||
			v-if="addOrUpdateVisible"
 | 
								v-if="addOrUpdateVisible"
 | 
				
			||||||
@@ -263,10 +255,10 @@ export default {
 | 
				
			|||||||
	padding: 18px;
 | 
						padding: 18px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.action_btn {
 | 
					.action_btn {
 | 
				
			||||||
  float: right;
 | 
					  /* float: right; */
 | 
				
			||||||
	display: flex;
 | 
						display: flex;
 | 
				
			||||||
	justify-content: right;
 | 
						justify-content: right;
 | 
				
			||||||
  margin: -35px 15px;
 | 
					  margin: 5px 15px;
 | 
				
			||||||
  font-size: 14px;
 | 
					  font-size: 14px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.add {
 | 
					.add {
 | 
				
			||||||
@@ -320,7 +312,4 @@ export default {
 | 
				
			|||||||
	justify-content: flex-end;
 | 
						justify-content: flex-end;
 | 
				
			||||||
	padding: 18px;
 | 
						padding: 18px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.content {
 | 
					 | 
				
			||||||
	padding: 0 20px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,7 @@
 | 
				
			|||||||
				v-if="tableBtn.length"
 | 
									v-if="tableBtn.length"
 | 
				
			||||||
				slot="handleBtn"
 | 
									slot="handleBtn"
 | 
				
			||||||
				label="操作"
 | 
									label="操作"
 | 
				
			||||||
				:width="180"
 | 
									:width="250"
 | 
				
			||||||
				:method-list="tableBtn"
 | 
									:method-list="tableBtn"
 | 
				
			||||||
				@clickBtn="handleTableBtnClick" />
 | 
									@clickBtn="handleTableBtnClick" />
 | 
				
			||||||
		</base-table>
 | 
							</base-table>
 | 
				
			||||||
@@ -34,7 +34,7 @@
 | 
				
			|||||||
		<base-dialog
 | 
							<base-dialog
 | 
				
			||||||
			:dialogTitle="title"
 | 
								:dialogTitle="title"
 | 
				
			||||||
			:dialogVisible="open"
 | 
								:dialogVisible="open"
 | 
				
			||||||
			width="50%"
 | 
								width="35%"
 | 
				
			||||||
			@close="cancel"
 | 
								@close="cancel"
 | 
				
			||||||
			@cancel="cancel"
 | 
								@cancel="cancel"
 | 
				
			||||||
			@confirm="submitForm">
 | 
								@confirm="submitForm">
 | 
				
			||||||
@@ -44,14 +44,12 @@
 | 
				
			|||||||
				v-model="form"
 | 
									v-model="form"
 | 
				
			||||||
				:disabled="mode == 'detail'"
 | 
									:disabled="mode == 'detail'"
 | 
				
			||||||
				:has-files="false"
 | 
									:has-files="false"
 | 
				
			||||||
				:rows="rows"
 | 
									:rows="rows" />
 | 
				
			||||||
				style="margin: 0 30px" />
 | 
					 | 
				
			||||||
		</base-dialog>
 | 
							</base-dialog>
 | 
				
			||||||
		<addSparts
 | 
							<addSparts
 | 
				
			||||||
			v-if="addOrUpdateVisible"
 | 
								v-if="addOrUpdateVisible"
 | 
				
			||||||
			ref="addOrUpdate"
 | 
								ref="addOrUpdate"
 | 
				
			||||||
			@refreshDataList="getList"
 | 
								@refreshDataList="getList" />
 | 
				
			||||||
			@destroy="addOrUpdateVisible = false" />
 | 
					 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -81,24 +79,22 @@ export default {
 | 
				
			|||||||
				// 			btnName: '详情',
 | 
									// 			btnName: '详情',
 | 
				
			||||||
				// 	  }
 | 
									// 	  }
 | 
				
			||||||
				// 	: undefined,
 | 
									// 	: undefined,
 | 
				
			||||||
				this.$auth.hasPermi('equipment:spare-parts-config:addParts')
 | 
									this.$auth.hasPermi('equipment:spare-parts-config:update')
 | 
				
			||||||
					? {
 | 
										? {
 | 
				
			||||||
							type: 'addParts',
 | 
												type: 'edit',
 | 
				
			||||||
							btnName: '添加',
 | 
												btnName: '修改',
 | 
				
			||||||
							showTip: '添加备件'
 | 
					 | 
				
			||||||
					  }
 | 
										  }
 | 
				
			||||||
					: undefined,
 | 
										: undefined,
 | 
				
			||||||
				this.$auth.hasPermi('equipment:spare-parts-config:queryParts')
 | 
									this.$auth.hasPermi('equipment:spare-parts-config:queryParts')
 | 
				
			||||||
					? {
 | 
										? {
 | 
				
			||||||
							type: 'queryParts',
 | 
												type: 'queryParts',
 | 
				
			||||||
							btnName: '查看',
 | 
												btnName: '查看备件',
 | 
				
			||||||
							showTip: '查看备件'
 | 
					 | 
				
			||||||
					  }
 | 
										  }
 | 
				
			||||||
					: undefined,
 | 
										: undefined,
 | 
				
			||||||
				this.$auth.hasPermi('equipment:spare-parts-config:update')
 | 
									this.$auth.hasPermi('equipment:spare-parts-config:addParts')
 | 
				
			||||||
					? {
 | 
										? {
 | 
				
			||||||
							type: 'edit',
 | 
												type: 'addParts',
 | 
				
			||||||
							btnName: '修改',
 | 
												btnName: '添加备件',
 | 
				
			||||||
					  }
 | 
										  }
 | 
				
			||||||
					: undefined,
 | 
										: undefined,
 | 
				
			||||||
				this.$auth.hasPermi('equipment:spare-parts-config:delete')
 | 
									this.$auth.hasPermi('equipment:spare-parts-config:delete')
 | 
				
			||||||
@@ -109,15 +105,15 @@ export default {
 | 
				
			|||||||
					: undefined,
 | 
										: undefined,
 | 
				
			||||||
			].filter((v) => v),
 | 
								].filter((v) => v),
 | 
				
			||||||
			tableProps: [
 | 
								tableProps: [
 | 
				
			||||||
				{ prop: 'name', label: '配置名', minWidth: 100, showOverflowtooltip: true },
 | 
									{ prop: 'name', label: '配置名' },
 | 
				
			||||||
				{ prop: 'lineName', label: '产线', minWidth: 100, showOverflowtooltip: true },
 | 
									{ prop: 'lineName', label: '产线' },
 | 
				
			||||||
				{ prop: 'sectionName', label: '工段', minWidth: 100, showOverflowtooltip: true },
 | 
									{ prop: 'sectionName', label: '工段' },
 | 
				
			||||||
				{ prop: 'equipmentName', label: '设备名', minWidth: 120, showOverflowtooltip: true },
 | 
									{ prop: 'equipmentName', label: '设备名' },
 | 
				
			||||||
				{ prop: 'equipmentCode', label: '设备编码', minWidth: 100, showOverflowtooltip: true },
 | 
									{ prop: 'equipmentCode', label: '设备编码' },
 | 
				
			||||||
				{ prop: 'responsible', label: '负责人', minWidth: 150, showOverflowtooltip: true },
 | 
									{ prop: 'responsible', label: '负责人' },
 | 
				
			||||||
				// { prop: 'unit', label: '单位', filter: publicFormatter('unit_dict') },
 | 
									// { prop: 'unit', label: '单位', filter: publicFormatter('unit_dict') },
 | 
				
			||||||
				{ prop: 'description', label: '描述', subcomponent: htmls, minWidth: 120, showOverflowtooltip: true },
 | 
									{ prop: 'description', label: '描述', subcomponent: htmls },
 | 
				
			||||||
				{ prop: 'sparePartNumber', label: '备品备件数量', width: 130 },
 | 
									{ prop: 'sparePartNumber', label: '备品备件数量' },
 | 
				
			||||||
				// { prop: 'remark', label: '备注' },
 | 
									// { prop: 'remark', label: '备注' },
 | 
				
			||||||
			],
 | 
								],
 | 
				
			||||||
			searchBarFormConfig: [
 | 
								searchBarFormConfig: [
 | 
				
			||||||
@@ -202,7 +198,7 @@ export default {
 | 
				
			|||||||
						prop: 'description', // TODO: 富文本
 | 
											prop: 'description', // TODO: 富文本
 | 
				
			||||||
						subcomponent: Editor,
 | 
											subcomponent: Editor,
 | 
				
			||||||
						bind: {
 | 
											bind: {
 | 
				
			||||||
							'min-height': 150
 | 
												'min-height': 192
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
				],
 | 
									],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,36 +9,34 @@
 | 
				
			|||||||
	<el-drawer
 | 
						<el-drawer
 | 
				
			||||||
		:visible.sync="visible"
 | 
							:visible.sync="visible"
 | 
				
			||||||
		:show-close="false"
 | 
							:show-close="false"
 | 
				
			||||||
		:wrapper-closable="!isLog"
 | 
							:wrapper-closable="false"
 | 
				
			||||||
		class="drawer"
 | 
							class="drawer"
 | 
				
			||||||
		size="60%">
 | 
							size="60%">
 | 
				
			||||||
		<small-title slot="title" :no-padding="true">
 | 
							<small-title slot="title" :no-padding="true">
 | 
				
			||||||
			{{ !isLog ? '操作页面' : '更换记录' }}
 | 
								{{ !isLog ? '操作页面' : '更换记录' }}
 | 
				
			||||||
		</small-title>
 | 
							</small-title>
 | 
				
			||||||
		<div class="content">
 | 
					 | 
				
			||||||
		<el-form
 | 
							<el-form
 | 
				
			||||||
			ref="form"
 | 
								ref="form"
 | 
				
			||||||
			:model="dataForm"
 | 
								:model="dataForm"
 | 
				
			||||||
				label-width="90px"
 | 
								label-width="100px"
 | 
				
			||||||
			v-loading="formLoading">
 | 
								v-loading="formLoading">
 | 
				
			||||||
			<el-row :gutter="20">
 | 
								<el-row :gutter="20">
 | 
				
			||||||
				<el-col :span="12">
 | 
									<el-col :span="12">
 | 
				
			||||||
					<el-form-item v-if="!isLog" label="配置名" prop="name">
 | 
										<el-form-item v-if="!isLog" label="配置名" prop="name">
 | 
				
			||||||
							<span style="margin-left: 5px">{{ dataForm.name }}</span>
 | 
											<span>{{ dataForm.name }}</span>
 | 
				
			||||||
					</el-form-item>
 | 
										</el-form-item>
 | 
				
			||||||
					<el-form-item v-else label="产线名称" prop="lineName">
 | 
										<el-form-item v-else label="产线名称" prop="lineName">
 | 
				
			||||||
							<span style="margin-left: 5px">{{ dataForm.lineName }}</span>
 | 
											<span>{{ dataForm.lineName }}</span>
 | 
				
			||||||
					</el-form-item>
 | 
										</el-form-item>
 | 
				
			||||||
				</el-col>
 | 
									</el-col>
 | 
				
			||||||
				<el-col :span="12">
 | 
									<el-col :span="12">
 | 
				
			||||||
					<el-form-item label="设备名称" prop="equipmentName">
 | 
										<el-form-item label="设备名称" prop="equipmentName">
 | 
				
			||||||
							<span style="margin-left: 5px">{{ dataForm.equipmentName }}</span>
 | 
											<span>{{ dataForm.equipmentName }}</span>
 | 
				
			||||||
					</el-form-item>
 | 
										</el-form-item>
 | 
				
			||||||
				</el-col>
 | 
									</el-col>
 | 
				
			||||||
			</el-row>
 | 
								</el-row>
 | 
				
			||||||
				<el-form-item label="描述" prop="description">
 | 
								<el-form-item label="描述" prop="faultTime">
 | 
				
			||||||
					<div v-html="dataForm.description" style="padding: 5px; margin-left: 5px; border: 1px solid #dfdfdf" />
 | 
									<editor v-model="dataForm.description" read-only :min-height="200"/>
 | 
				
			||||||
					<!-- <editor v-model="dataForm.description" :read-only="true" :min-height="200"/> -->
 | 
					 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
@@ -84,9 +82,8 @@
 | 
				
			|||||||
				:page-sizes="[5, 10, 15]"
 | 
									:page-sizes="[5, 10, 15]"
 | 
				
			||||||
				@pagination="getList1" />
 | 
									@pagination="getList1" />
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
		</div>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<div v-if="isLog" 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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -432,7 +429,4 @@ export default {
 | 
				
			|||||||
	justify-content: flex-end;
 | 
						justify-content: flex-end;
 | 
				
			||||||
	padding: 18px;
 | 
						padding: 18px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.content {
 | 
					 | 
				
			||||||
	padding: 0 20px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,7 +74,8 @@ const remainBox = {
 | 
				
			|||||||
		value() {
 | 
							value() {
 | 
				
			||||||
			const temp = this.injectData[this.injectData.prop] || null;
 | 
								const temp = this.injectData[this.injectData.prop] || null;
 | 
				
			||||||
			if (temp) {
 | 
								if (temp) {
 | 
				
			||||||
				return temp === 'Green' ? '未超期' : temp === 'Red' ? '已超期' : '即将超期';
 | 
									console.log('12', temp);
 | 
				
			||||||
 | 
									return temp === 'Green' ? 'green' : 'red';
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			return this.injectData[this.injectData.prop] || null;
 | 
								return this.injectData[this.injectData.prop] || null;
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -82,7 +83,7 @@ const remainBox = {
 | 
				
			|||||||
			if (this.value) {
 | 
								if (this.value) {
 | 
				
			||||||
				// const v = +this.value;
 | 
									// const v = +this.value;
 | 
				
			||||||
				// return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
 | 
									// return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
 | 
				
			||||||
				return this.value === '未超期' ? '#37D97F' : this.value === '已超期' ? '#FF5454' : '#FFD767';
 | 
									return this.value;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			return 'unset';
 | 
								return 'unset';
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -94,9 +95,9 @@ const remainBox = {
 | 
				
			|||||||
					this.color
 | 
										this.color
 | 
				
			||||||
					// this.color == 'Green' ? 'green' : this.color == 'Red' ? 'red' : 'yellow'
 | 
										// this.color == 'Green' ? 'green' : this.color == 'Red' ? 'red' : 'yellow'
 | 
				
			||||||
				}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
 | 
									}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
 | 
				
			||||||
					'#fff'
 | 
										this.color == 'red' || this.color == 'green' ? '#fff' : 'unset'
 | 
				
			||||||
				}`}>
 | 
									}`}>
 | 
				
			||||||
				{this.value}
 | 
									{this.injectData[this.injectData.prop] || ''}
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -154,19 +155,18 @@ export default {
 | 
				
			|||||||
				// 	: undefined,
 | 
									// 	: undefined,
 | 
				
			||||||
			].filter((v) => v),
 | 
								].filter((v) => v),
 | 
				
			||||||
			tableProps: [
 | 
								tableProps: [
 | 
				
			||||||
				{ prop: 'name', label: '配置名', showOverflowtooltip: true },
 | 
									{ prop: 'name', label: '配置名' },
 | 
				
			||||||
				{ prop: 'lineName', label: '产线名称', showOverflowtooltip: true },
 | 
									{ prop: 'lineName', label: '产线名称' },
 | 
				
			||||||
				{ prop: 'sectionName', label: '工段名', showOverflowtooltip: true },
 | 
									{ prop: 'sectionName', label: '工段名' },
 | 
				
			||||||
				{ prop: 'equipmentName', label: '设备名称', showOverflowtooltip: true },
 | 
									{ prop: 'equipmentName', label: '设备名称' },
 | 
				
			||||||
				{ prop: 'responsible', label: '负责人', minWidth: 130, showOverflowtooltip: true },
 | 
									{ prop: 'responsible', label: '负责人' },
 | 
				
			||||||
				{ prop: 'color', label: '是否超期', subcomponent: remainBox },
 | 
									{ prop: 'color', label: '是否超期', subcomponent: remainBox },
 | 
				
			||||||
				{ prop: 'opt1', label: '备件更换', name: '操作', subcomponent: btn, width: 110 },
 | 
									{ prop: 'opt1', label: '备件更换', name: '操作', subcomponent: btn },
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					prop: 'opt2',
 | 
										prop: 'opt2',
 | 
				
			||||||
					label: '更换记录',
 | 
										label: '更换记录',
 | 
				
			||||||
					name: '更新记录',
 | 
										name: '更新记录',
 | 
				
			||||||
					subcomponent: btn,
 | 
										subcomponent: btn,
 | 
				
			||||||
					width: 110
 | 
					 | 
				
			||||||
				}, // TODO: 是否换成按钮, 群里问
 | 
									}, // TODO: 是否换成按钮, 群里问
 | 
				
			||||||
				// { prop: 'remark', label: '备注' },
 | 
									// { prop: 'remark', label: '备注' },
 | 
				
			||||||
			],
 | 
								],
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user