|
@@ -2,11 +2,22 @@
|
|
|
<div class="app-container">
|
|
|
<div v-show="isfirstView" class="centerClass">
|
|
|
<div class="centered-content">
|
|
|
- <img :src="require('@/assets/images/j20_new.jpg')">
|
|
|
- <el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
|
|
|
+ <img :src="require('@/assets/images/j20_new.jpg')" />
|
|
|
+ <el-form
|
|
|
+ v-show="showSearch"
|
|
|
+ ref="queryForm"
|
|
|
+ :model="queryParams"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ label-width="68px"
|
|
|
+ >
|
|
|
<el-row>
|
|
|
<el-form-item label="机型" prop="aircraftTypeId">
|
|
|
- <el-select v-model="queryParams.aircraftTypeId" placeholder="请选择" @change="handleaircraftChange">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.aircraftTypeId"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="handleaircraftChange"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in typeOption"
|
|
|
:key="item.id"
|
|
@@ -16,7 +27,11 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="系统" prop="aircraftSystemId">
|
|
|
- <el-select v-model="queryParams.aircraftSystemId" placeholder="请选择" @change="handlesystemChange">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.aircraftSystemId"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="handlesystemChange"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in systemOption"
|
|
|
:key="item.id"
|
|
@@ -26,7 +41,10 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="分系统" prop="aircraftSubsystemId">
|
|
|
- <el-select v-model="queryParams.aircraftSubsystemId" placeholder="请选择">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.aircraftSubsystemId"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in subSystemOption"
|
|
|
:key="item.id"
|
|
@@ -35,27 +53,46 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="故障现象" prop="faultPhenomenon">
|
|
|
+ <el-form-item label="故障" prop="faultPhenomenon">
|
|
|
<el-input
|
|
|
v-model="queryParams.faultPhenomenon"
|
|
|
- placeholder="请输入故障现象"
|
|
|
+ placeholder="请输入故障"
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-show="!isfirstView">
|
|
|
- <el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
|
|
|
+ <el-form
|
|
|
+ v-show="showSearch"
|
|
|
+ ref="queryForm"
|
|
|
+ :model="queryParams"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ label-width="68px"
|
|
|
+ >
|
|
|
<el-row>
|
|
|
<el-form-item label="机型" prop="aircraftTypeId">
|
|
|
- <el-select v-model="queryParams.aircraftTypeId" placeholder="请选择" @change="handleaircraftChange">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.aircraftTypeId"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="handleaircraftChange"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in typeOption"
|
|
|
:key="item.id"
|
|
@@ -65,7 +102,11 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="系统" prop="aircraftSystemId">
|
|
|
- <el-select v-model="queryParams.aircraftSystemId" placeholder="请选择" @change="handlesystemChange">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.aircraftSystemId"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="handlesystemChange"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in systemOption"
|
|
|
:key="item.id"
|
|
@@ -75,7 +116,10 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="分系统" prop="aircraftSubsystemId">
|
|
|
- <el-select v-model="queryParams.aircraftSubsystemId" placeholder="请选择">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.aircraftSubsystemId"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in subSystemOption"
|
|
|
:key="item.id"
|
|
@@ -93,13 +137,25 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="排序" prop="orderBy">
|
|
|
- <el-select v-model="queryParams.orderBy" placeholder="请选择" @change="changeOrderBy">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.orderBy"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="changeOrderBy"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in orderByOption"
|
|
|
:key="item.id"
|
|
@@ -116,129 +172,263 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col v-for="varCase in caseList" :key="varCase.id" :span="8">
|
|
|
- <el-card class="box-card" style="margin:10px">
|
|
|
+ <el-card class="box-card" style="margin: 10px">
|
|
|
<div class="rounded-corners">
|
|
|
- <el-row style="background: #d3dce6;">
|
|
|
- <el-col :span="6"><div class="grid-content bg-purple" style="background-color: dodgerblue;text-align: center"><img :src="require('@/assets/icons/aircraft.png')" style="width: 1rem"><br>机型</div></el-col>
|
|
|
- <el-col :span="18"><div class="grid-content bg-purple-light flex-center">{{ varCase.aircraftTypeName }}</div></el-col>
|
|
|
+ <el-row style="background: #d3dce6">
|
|
|
+ <el-col :span="6"
|
|
|
+ ><div
|
|
|
+ class="grid-content bg-purple"
|
|
|
+ style="background-color: dodgerblue; text-align: center"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="require('@/assets/icons/aircraft.png')"
|
|
|
+ style="width: 1rem"
|
|
|
+ /><br />机型
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="18"
|
|
|
+ ><div class="grid-content bg-purple-light flex-center">
|
|
|
+ {{ varCase.aircraftTypeName }}
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
</el-row>
|
|
|
- <el-row style="background: #e5e9f2;">
|
|
|
- <el-col :span="6"><div class="grid-content bg-purple" style="background-color: rgb(56, 154, 251);text-align: center"><img :src="require('@/assets/icons/system.png')" style="width: 1rem"><br>系统</div></el-col>
|
|
|
- <el-col :span="18"><div class="grid-content bg-purple-light flex-center">{{ varCase.aircraftSystemName }}</div></el-col>
|
|
|
+ <el-row style="background: #e5e9f2">
|
|
|
+ <el-col :span="6"
|
|
|
+ ><div
|
|
|
+ class="grid-content bg-purple"
|
|
|
+ style="
|
|
|
+ background-color: rgb(56, 154, 251);
|
|
|
+ text-align: center;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="require('@/assets/icons/system.png')"
|
|
|
+ style="width: 1rem"
|
|
|
+ /><br />系统
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="18"
|
|
|
+ ><div class="grid-content bg-purple-light flex-center">
|
|
|
+ {{ varCase.aircraftSystemName }}
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
</el-row>
|
|
|
- <el-row style="background: #d3dce6;">
|
|
|
- <el-col :span="6"><div class="grid-content bg-purple" style="background-color: dodgerblue;text-align: center"><img :src="require('@/assets/icons/subsystem.png')" style="width: 1rem"><br>分系统</div></el-col>
|
|
|
- <el-col :span="18"><div class="grid-content bg-purple-light flex-center"> {{ varCase.aircraftSubsystemName }}</div></el-col>
|
|
|
+ <el-row style="background: #d3dce6">
|
|
|
+ <el-col :span="6"
|
|
|
+ ><div
|
|
|
+ class="grid-content bg-purple"
|
|
|
+ style="background-color: dodgerblue; text-align: center"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="require('@/assets/icons/subsystem.png')"
|
|
|
+ style="width: 1rem"
|
|
|
+ /><br />分系统
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="18"
|
|
|
+ ><div class="grid-content bg-purple-light flex-center">
|
|
|
+ {{ varCase.aircraftSubsystemName }}
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
</el-row>
|
|
|
- <el-row style="background: #e5e9f2;">
|
|
|
- <el-col :span="6"><div class="grid-content bg-purple" style="background-color: rgb(56, 154, 251);text-align: center"><img :src="require('@/assets/icons/fault.png')" style="width: 1rem"><br>故障现象</div></el-col>
|
|
|
- <el-col :span="18"><div class="grid-content bg-purple-light flex-center"> {{ truncatedText(varCase.faultPhenomenon) }}</div></el-col>
|
|
|
+ <el-row style="background: #e5e9f2">
|
|
|
+ <el-col :span="6"
|
|
|
+ ><div
|
|
|
+ class="grid-content bg-purple"
|
|
|
+ style="
|
|
|
+ background-color: rgb(56, 154, 251);
|
|
|
+ text-align: center;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="require('@/assets/icons/fault.png')"
|
|
|
+ style="width: 1rem"
|
|
|
+ /><br />故障现象
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="18"
|
|
|
+ ><div class="grid-content bg-purple-light flex-center">
|
|
|
+ <span v-html="varCase.faultPhenomenon"></span></div
|
|
|
+ ></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="background: #e5e9f2">
|
|
|
+ <el-col :span="6"
|
|
|
+ ><div
|
|
|
+ class="grid-content bg-purple"
|
|
|
+ style="
|
|
|
+ background-color: rgb(56, 154, 251);
|
|
|
+ text-align: center;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="require('@/assets/icons/fault.png')"
|
|
|
+ style="width: 1rem"
|
|
|
+ /><br />故障原因
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="18"
|
|
|
+ ><div class="grid-content bg-purple-light flex-center">
|
|
|
+ <span v-html="varCase.faultCause"></span></div
|
|
|
+ ></el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <el-divider style="margin: 12px 0;" />
|
|
|
+ <el-divider style="margin: 12px 0" />
|
|
|
<div class="container">
|
|
|
- <div class="left"><el-button type="text" class="button" @click="handleUpdate(varCase.id)">查看详情</el-button></div>
|
|
|
- <div class="right"><time class="time">{{ varCase.createTime }}</time> <img :src="require('@/assets/icons/hot.png')" style="width: 1rem"> {{ varCase.viewCount }}</div>
|
|
|
+ <div class="left">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ class="button"
|
|
|
+ @click="handleUpdate(varCase.id)"
|
|
|
+ >查看详情</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <time class="time">{{ varCase.createTime }}</time>
|
|
|
+ <img
|
|
|
+ :src="require('@/assets/icons/hot.png')"
|
|
|
+ style="width: 1rem"
|
|
|
+ />
|
|
|
+ {{ varCase.viewCount }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<pagination
|
|
|
- v-show="total>0"
|
|
|
+ v-show="total > 0"
|
|
|
:total="total"
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
- :page-sizes="[12,24,36,48]"
|
|
|
+ :page-sizes="[12, 24, 36, 48]"
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改故障案例管理对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
|
|
|
+ <el-dialog
|
|
|
+ :title="title"
|
|
|
+ :visible.sync="open"
|
|
|
+ width="80%"
|
|
|
+ append-to-body
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ >
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-row>
|
|
|
- <el-col :span="6"><div class="grid-content bg-purple">
|
|
|
- <el-form-item label="机型" prop="faultPhenomenon">
|
|
|
- <el-select v-model="form.aircraftTypeId" readonly @change="handleaircraftChange1">
|
|
|
- <el-option
|
|
|
- v-for="item in typeOption1"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </div></el-col>
|
|
|
- <el-col :span="6"><div class="grid-content bg-purple">
|
|
|
- <el-form-item label="系统" prop="aircraftSystemId">
|
|
|
- <el-select v-model="form.aircraftSystemId" readonly @change="handlesystemChange1">
|
|
|
- <el-option
|
|
|
- v-for="item in systemOption1"
|
|
|
- :key="item.id"
|
|
|
- :label="item.aircraftSystemName"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </div></el-col>
|
|
|
- <el-col :span="6"><div class="grid-content bg-purple">
|
|
|
- <el-form-item label="分系统" prop="aircraftSubsystemId">
|
|
|
- <el-select v-model="form.aircraftSubsystemId" readonly>
|
|
|
- <el-option
|
|
|
- v-for="item in subSystemOption1"
|
|
|
- :key="item.id"
|
|
|
- :label="item.aircraftSubsystemName"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
+ <el-col :span="6"
|
|
|
+ ><div class="grid-content bg-purple">
|
|
|
+ <el-form-item label="机型" prop="faultPhenomenon">
|
|
|
+ <el-select
|
|
|
+ v-model="form.aircraftTypeId"
|
|
|
+ readonly
|
|
|
+ @change="handleaircraftChange1"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeOption1"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item></div
|
|
|
+ ></el-col>
|
|
|
+ <el-col :span="6"
|
|
|
+ ><div class="grid-content bg-purple">
|
|
|
+ <el-form-item label="系统" prop="aircraftSystemId">
|
|
|
+ <el-select
|
|
|
+ v-model="form.aircraftSystemId"
|
|
|
+ readonly
|
|
|
+ @change="handlesystemChange1"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in systemOption1"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.aircraftSystemName"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item></div
|
|
|
+ ></el-col>
|
|
|
+ <el-col :span="6"
|
|
|
+ ><div class="grid-content bg-purple">
|
|
|
+ <el-form-item label="分系统" prop="aircraftSubsystemId">
|
|
|
+ <el-select v-model="form.aircraftSubsystemId" readonly>
|
|
|
+ <el-option
|
|
|
+ v-for="item in subSystemOption1"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.aircraftSubsystemName"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<div class="grid-content bg-purple">
|
|
|
<el-form-item label="作者" prop="author">
|
|
|
<el-input v-model="form.author" readonly />
|
|
|
- </el-form-item>
|
|
|
- </div></el-col>
|
|
|
+ </el-form-item></div
|
|
|
+ ></el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-card class="box-card" style="margin:5px">
|
|
|
+ <el-card class="box-card" style="margin: 5px">
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>故障现象</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-input v-model="form.faultPhenomenon" type="textarea" :rows="5" placeholder="请输入内容" readonly />
|
|
|
+ <el-input
|
|
|
+ v-model="form.faultPhenomenon"
|
|
|
+ type="textarea"
|
|
|
+ :rows="5"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-card class="box-card" style="margin:5px">
|
|
|
+ <el-card class="box-card" style="margin: 5px">
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>故障原因</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-input v-model="form.faultCause" type="textarea" :rows="5" placeholder="请输入内容" readonly />
|
|
|
+ <el-input
|
|
|
+ v-model="form.faultCause"
|
|
|
+ type="textarea"
|
|
|
+ :rows="5"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-card class="box-card" style="margin:5px">
|
|
|
+ <el-card class="box-card" style="margin: 5px">
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>故障树</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<div v-if="form.faultTreePath">
|
|
|
<!-- <img :src="baseUrl+form.faultTreePath" style="max-width: 100%;" @load="showResetBtn = true;"> -->
|
|
|
- <img :src="baseUrl+form.faultTreePath" style="max-width: 100px;" @load="showResetBtn = true" @click="showModal = true;imageSrc=form.faultTreePath">
|
|
|
- <div style="flex: 1;" /> <!-- 占位符,用于将重置按钮推到最右侧 -->
|
|
|
+ <img
|
|
|
+ :src="baseUrl + form.faultTreePath"
|
|
|
+ style="max-width: 100px"
|
|
|
+ @load="showResetBtn = true"
|
|
|
+ @click="
|
|
|
+ showModal = true;
|
|
|
+ imageSrc = form.faultTreePath;
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <div style="flex: 1" />
|
|
|
+ <!-- 占位符,用于将重置按钮推到最右侧 -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-card class="box-card" style="margin:5px">
|
|
|
+ <el-card class="box-card" style="margin: 5px">
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>排故方法</span>
|
|
|
</div>
|
|
@@ -247,8 +437,17 @@
|
|
|
<span>故障图</span>
|
|
|
<div>
|
|
|
<div v-if="form.faultPicturePath">
|
|
|
- <img :src="baseUrl+form.faultPicturePath" style="max-width: 100px;" @load="showResetBtnpic = true" @click="showModal = true;imageSrc=form.faultPicturePath">
|
|
|
- <div style="flex: 1;" /> <!-- 占位符,用于将重置按钮推到最右侧 -->
|
|
|
+ <img
|
|
|
+ :src="baseUrl + form.faultPicturePath"
|
|
|
+ style="max-width: 100px"
|
|
|
+ @load="showResetBtnpic = true"
|
|
|
+ @click="
|
|
|
+ showModal = true;
|
|
|
+ imageSrc = form.faultPicturePath;
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <div style="flex: 1" />
|
|
|
+ <!-- 占位符,用于将重置按钮推到最右侧 -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -256,11 +455,30 @@
|
|
|
<span>文档</span>
|
|
|
<div>
|
|
|
<div v-if="form.troubleshootingMethodPath">
|
|
|
- <span style="margin: 10px">{{ getFileNameByPath(form.troubleshootingMethodPath) }}</span>
|
|
|
- <el-button v-show="!viewWordFlag" type="primary" @click="viewWordFlag=true">预览</el-button>
|
|
|
- <el-button v-show="viewWordFlag" type="primary" @click="viewWordFlag=false">取消预览</el-button>
|
|
|
- <el-button type="primary" @click="download(form.troubleshootingMethodPath)">下载</el-button>
|
|
|
- <div v-show="viewWordFlag" ref="troubleshootingMethodFile" />
|
|
|
+ <span style="margin: 10px">{{
|
|
|
+ getFileNameByPath(form.troubleshootingMethodPath)
|
|
|
+ }}</span>
|
|
|
+ <el-button
|
|
|
+ v-show="!viewWordFlag"
|
|
|
+ type="primary"
|
|
|
+ @click="viewWordFlag = true"
|
|
|
+ >预览</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-show="viewWordFlag"
|
|
|
+ type="primary"
|
|
|
+ @click="viewWordFlag = false"
|
|
|
+ >取消预览</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="download(form.troubleshootingMethodPath)"
|
|
|
+ >下载</el-button
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-show="viewWordFlag"
|
|
|
+ ref="troubleshootingMethodFile"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -268,7 +486,7 @@
|
|
|
</el-card>
|
|
|
</el-row>
|
|
|
<div v-if="showModal" class="modal" @click="showModal = false">
|
|
|
- <img :src="baseUrl+imageSrc" class="full-image">
|
|
|
+ <img :src="baseUrl + imageSrc" class="full-image" />
|
|
|
</div>
|
|
|
</el-form>
|
|
|
|
|
@@ -277,28 +495,27 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listCase, getCase, countPlus } from '@/api/system/case'
|
|
|
-import { getTypeOption } from '@/api/system/type'
|
|
|
-import { getSystemOption } from '@/api/system/system'
|
|
|
-import { getSubSystemOption } from '@/api/system/subsystem'
|
|
|
-import { renderAsync } from 'docx-preview'
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
-import axios from 'axios'
|
|
|
+import { esListCase, getCase, countPlus } from "@/api/system/case";
|
|
|
+import { getTypeOption } from "@/api/system/type";
|
|
|
+import { getSystemOption } from "@/api/system/system";
|
|
|
+import { getSubSystemOption } from "@/api/system/subsystem";
|
|
|
+import { renderAsync } from "docx-preview";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import axios from "axios";
|
|
|
|
|
|
export default {
|
|
|
- name: 'Index',
|
|
|
+ name: "Index",
|
|
|
data() {
|
|
|
return {
|
|
|
- wordText: '',
|
|
|
- wordURL: 'test.docx', // 文件地址,看你对应怎末获取、赋值
|
|
|
+ wordText: "",
|
|
|
+ wordURL: "test.docx", // 文件地址,看你对应怎末获取、赋值
|
|
|
showResetBtn: false,
|
|
|
showResetBtnpic: false,
|
|
|
- name: '',
|
|
|
+ name: "",
|
|
|
fileList: [],
|
|
|
hideUpload: false,
|
|
|
// 遮罩层
|
|
@@ -316,11 +533,11 @@ export default {
|
|
|
// 故障案例管理表格数据
|
|
|
caseList: [],
|
|
|
// 弹出层标题
|
|
|
- title: '',
|
|
|
+ title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
- picUrl_tree: '',
|
|
|
- faultTreePath: '',
|
|
|
+ picUrl_tree: "",
|
|
|
+ faultTreePath: "",
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
@@ -334,7 +551,7 @@ export default {
|
|
|
faultPicturePath: null,
|
|
|
troubleshootingMethodPath: null,
|
|
|
viewCount: null,
|
|
|
- orderBy: 'createTimeAsc'
|
|
|
+ orderBy: "createTimeAsc",
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {
|
|
@@ -351,11 +568,10 @@ export default {
|
|
|
createBy: null,
|
|
|
createTime: null,
|
|
|
updateBy: null,
|
|
|
- updateTime: null
|
|
|
+ updateTime: null,
|
|
|
},
|
|
|
// 表单校验
|
|
|
- rules: {
|
|
|
- },
|
|
|
+ rules: {},
|
|
|
fileList: [], // 存储上传文件列表
|
|
|
typeOption: [],
|
|
|
typeOption1: [],
|
|
@@ -364,218 +580,216 @@ export default {
|
|
|
systemOption1: [],
|
|
|
subSystemOption1: [],
|
|
|
showModal: false, // 控制模态框显示的变量
|
|
|
- imageSrc: '', // 图片路径
|
|
|
+ imageSrc: "", // 图片路径
|
|
|
showResetBtnMethod: false,
|
|
|
// file upload
|
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
- uploadFileUrl: process.env.VUE_APP_BASE_API + '/common/upload', // 上传文件服务器地址
|
|
|
+ uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
|
|
|
headers: {
|
|
|
- Authorization: 'Bearer ' + getToken()
|
|
|
+ Authorization: "Bearer " + getToken(),
|
|
|
},
|
|
|
orderByOption: [
|
|
|
{
|
|
|
- 'id': 'createTimeAsc',
|
|
|
- 'name': '按创建时间升序'
|
|
|
+ id: "createTimeAsc",
|
|
|
+ name: "按创建时间升序",
|
|
|
},
|
|
|
{
|
|
|
- 'id': 'createTimeDesc',
|
|
|
- 'name': '按创建时间降序'
|
|
|
+ id: "createTimeDesc",
|
|
|
+ name: "按创建时间降序",
|
|
|
},
|
|
|
{
|
|
|
- 'id': 'countAsc',
|
|
|
- 'name': '按点击量升序'
|
|
|
+ id: "countAsc",
|
|
|
+ name: "按点击量升序",
|
|
|
},
|
|
|
{
|
|
|
- 'id': 'countDesc',
|
|
|
- 'name': '按点击量降序'
|
|
|
- }
|
|
|
+ id: "countDesc",
|
|
|
+ name: "按点击量降序",
|
|
|
+ },
|
|
|
],
|
|
|
viewWordFlag: false,
|
|
|
- isfirstView: true
|
|
|
- }
|
|
|
+ isfirstView: true,
|
|
|
+ };
|
|
|
},
|
|
|
created() {
|
|
|
// this.getList()
|
|
|
- this.getOption()
|
|
|
- this.getOption1()
|
|
|
+ this.getOption();
|
|
|
+ this.getOption1();
|
|
|
},
|
|
|
activated() {
|
|
|
- this.getOption()
|
|
|
- this.getOption1()
|
|
|
+ this.getOption();
|
|
|
+ this.getOption1();
|
|
|
},
|
|
|
methods: {
|
|
|
getOption() {
|
|
|
- getTypeOption().then(resp => {
|
|
|
- this.typeOption = resp.data
|
|
|
- })
|
|
|
+ getTypeOption().then((resp) => {
|
|
|
+ this.typeOption = resp.data;
|
|
|
+ });
|
|
|
},
|
|
|
// 用于获取飞机机型(放到添加功能中)
|
|
|
getOption1() {
|
|
|
- getTypeOption().then(resp => {
|
|
|
- this.typeOption1 = resp.data
|
|
|
- })
|
|
|
+ getTypeOption().then((resp) => {
|
|
|
+ this.typeOption1 = resp.data;
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
// 故障树
|
|
|
beforeTreeUpload(file) {
|
|
|
- const fileName = file.name
|
|
|
- const fileType = fileName.substring(fileName.lastIndexOf('.'))
|
|
|
+ const fileName = file.name;
|
|
|
+ const fileType = fileName.substring(fileName.lastIndexOf("."));
|
|
|
const isOKType =
|
|
|
- fileType === '.jpg' ||
|
|
|
- fileType === '.png' ||
|
|
|
- fileType === '.jpeg' ||
|
|
|
- fileType === '.bmp' ||
|
|
|
- fileType === '.gif'
|
|
|
+ fileType === ".jpg" ||
|
|
|
+ fileType === ".png" ||
|
|
|
+ fileType === ".jpeg" ||
|
|
|
+ fileType === ".bmp" ||
|
|
|
+ fileType === ".gif";
|
|
|
if (!isOKType) {
|
|
|
- this.$message.error('图片格式只能为jpeg/png/jpg/bmp/gif')
|
|
|
+ this.$message.error("图片格式只能为jpeg/png/jpg/bmp/gif");
|
|
|
}
|
|
|
|
|
|
- const isLt2M = file.size / 1024 / 1024 < 2
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
if (!isLt2M) {
|
|
|
- this.$message.error('图片大小不能超过 2MB!')
|
|
|
+ this.$message.error("图片大小不能超过 2MB!");
|
|
|
}
|
|
|
- return isLt2M && isOKType
|
|
|
+ return isLt2M && isOKType;
|
|
|
},
|
|
|
afterTreeUpload(response, file) {
|
|
|
// 上传完成后的处理逻辑
|
|
|
- console.log('上传完成', response, file)
|
|
|
+ console.log("上传完成", response, file);
|
|
|
if (response.code === 200) {
|
|
|
- this.form.faultTreePath = response.fileName
|
|
|
+ this.form.faultTreePath = response.fileName;
|
|
|
}
|
|
|
},
|
|
|
reuploadTree() {
|
|
|
- this.form.faultTreePath = ''
|
|
|
- this.showResetBtn = false
|
|
|
+ this.form.faultTreePath = "";
|
|
|
+ this.showResetBtn = false;
|
|
|
},
|
|
|
|
|
|
// 故障图
|
|
|
beforePicUpload(file) {
|
|
|
- const fileName = file.name
|
|
|
- const fileType = fileName.substring(fileName.lastIndexOf('.'))
|
|
|
+ const fileName = file.name;
|
|
|
+ const fileType = fileName.substring(fileName.lastIndexOf("."));
|
|
|
const isOKType =
|
|
|
- fileType === '.jpg' ||
|
|
|
- fileType === '.png' ||
|
|
|
- fileType === '.jpeg' ||
|
|
|
- fileType === '.bmp' ||
|
|
|
- fileType === '.gif'
|
|
|
+ fileType === ".jpg" ||
|
|
|
+ fileType === ".png" ||
|
|
|
+ fileType === ".jpeg" ||
|
|
|
+ fileType === ".bmp" ||
|
|
|
+ fileType === ".gif";
|
|
|
if (!isOKType) {
|
|
|
- this.$message.error('图片格式只能为jpeg/png/jpg/bmp/gif')
|
|
|
+ this.$message.error("图片格式只能为jpeg/png/jpg/bmp/gif");
|
|
|
}
|
|
|
|
|
|
- const isLt2M = file.size / 1024 / 1024 < 2
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
if (!isLt2M) {
|
|
|
- this.$message.error('图片大小不能超过 2MB!')
|
|
|
+ this.$message.error("图片大小不能超过 2MB!");
|
|
|
}
|
|
|
- return isLt2M && isOKType
|
|
|
+ return isLt2M && isOKType;
|
|
|
},
|
|
|
|
|
|
afterPicUpload(response, file) {
|
|
|
if (response.code === 200) {
|
|
|
- this.form.faultPicturePath = response.fileName
|
|
|
+ this.form.faultPicturePath = response.fileName;
|
|
|
}
|
|
|
// 上传完成后的处理逻辑
|
|
|
- console.log('上传完成', response, file)
|
|
|
+ console.log("上传完成", response, file);
|
|
|
},
|
|
|
reuploadPic() {
|
|
|
- this.form.faultPicturePath = ''
|
|
|
+ this.form.faultPicturePath = "";
|
|
|
// this.$refs.loadtree.clearFiles();
|
|
|
- this.showResetBtnpic = false
|
|
|
+ this.showResetBtnpic = false;
|
|
|
},
|
|
|
|
|
|
// 排故流程word文档
|
|
|
beforeMethodUpload(file) {
|
|
|
- const fileName = file.name
|
|
|
- const fileType = fileName.substring(fileName.lastIndexOf('.'))
|
|
|
- const isOKType =
|
|
|
- fileType === '.doc' ||
|
|
|
- fileType === '.docx'
|
|
|
+ const fileName = file.name;
|
|
|
+ const fileType = fileName.substring(fileName.lastIndexOf("."));
|
|
|
+ const isOKType = fileType === ".doc" || fileType === ".docx";
|
|
|
if (!isOKType) {
|
|
|
- this.$message.error('文件格式只能为doc/docx')
|
|
|
+ this.$message.error("文件格式只能为doc/docx");
|
|
|
}
|
|
|
|
|
|
- const isLt2M = file.size / 1024 / 1024 < 5
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 5;
|
|
|
if (!isLt2M) {
|
|
|
- this.$message.error('图片大小不能超过 5MB!')
|
|
|
+ this.$message.error("图片大小不能超过 5MB!");
|
|
|
}
|
|
|
- return isLt2M && isOKType
|
|
|
+ return isLt2M && isOKType;
|
|
|
},
|
|
|
afterMethodUpload(response, file) {
|
|
|
if (response.code === 200) {
|
|
|
- this.form.troubleshootingMethodPath = response.fileName
|
|
|
+ this.form.troubleshootingMethodPath = response.fileName;
|
|
|
axios({
|
|
|
- method: 'get',
|
|
|
- responseType: 'blob',
|
|
|
- url: this.baseUrl + this.form.troubleshootingMethodPath
|
|
|
+ method: "get",
|
|
|
+ responseType: "blob",
|
|
|
+ url: this.baseUrl + this.form.troubleshootingMethodPath,
|
|
|
}).then((response) => {
|
|
|
- renderAsync(response.data, this.$refs.troubleshootingMethodFile)
|
|
|
- })
|
|
|
+ renderAsync(response.data, this.$refs.troubleshootingMethodFile);
|
|
|
+ });
|
|
|
}
|
|
|
// 上传完成后的处理逻辑
|
|
|
- console.log('上传完成', response, file)
|
|
|
+ console.log("上传完成", response, file);
|
|
|
},
|
|
|
reuploadMethod() {
|
|
|
- this.form.troubleshootingMethodPath = ''
|
|
|
+ this.form.troubleshootingMethodPath = "";
|
|
|
// this.$refs.loadtree.clearFiles();
|
|
|
- this.showResetBtnMethod = false
|
|
|
+ this.showResetBtnMethod = false;
|
|
|
},
|
|
|
|
|
|
// 机型变化后更新系统下拉框
|
|
|
handleaircraftChange() {
|
|
|
- this.queryParams.aircraftSystemId = ''
|
|
|
- this.queryParams.aircraftSubsystemId = ''
|
|
|
+ this.queryParams.aircraftSystemId = "";
|
|
|
+ this.queryParams.aircraftSubsystemId = "";
|
|
|
// alert(this.queryParams.aircraftTypeId)
|
|
|
- getSystemOption(this.queryParams.aircraftTypeId).then(resp => {
|
|
|
- this.systemOption = resp.data
|
|
|
- })
|
|
|
+ getSystemOption(this.queryParams.aircraftTypeId).then((resp) => {
|
|
|
+ this.systemOption = resp.data;
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
// 系统变化后更新分系统
|
|
|
handlesystemChange() {
|
|
|
- this.queryParams.aircraftSubsystemId = ''
|
|
|
- getSubSystemOption(this.queryParams.aircraftSystemId).then(resp => {
|
|
|
- this.subSystemOption = resp.data
|
|
|
- })
|
|
|
+ this.queryParams.aircraftSubsystemId = "";
|
|
|
+ getSubSystemOption(this.queryParams.aircraftSystemId).then((resp) => {
|
|
|
+ this.subSystemOption = resp.data;
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
// 添加或修改对话框中机型变化后,修改系统
|
|
|
handleaircraftChange1(isClear = true) {
|
|
|
if (isClear) {
|
|
|
- this.form.aircraftSystemId = ''
|
|
|
- this.form.aircraftSubsystemId = ''
|
|
|
+ this.form.aircraftSystemId = "";
|
|
|
+ this.form.aircraftSubsystemId = "";
|
|
|
}
|
|
|
if (this.form.aircraftTypeId) {
|
|
|
- getSystemOption(this.form.aircraftTypeId).then(resp => {
|
|
|
- this.systemOption1 = resp.data
|
|
|
- })
|
|
|
+ getSystemOption(this.form.aircraftTypeId).then((resp) => {
|
|
|
+ this.systemOption1 = resp.data;
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 添加或修改对话框中系统变化后,修改分系统
|
|
|
handlesystemChange1(isClear = true) {
|
|
|
if (isClear) {
|
|
|
- this.form.aircraftSubsystemId = ''
|
|
|
+ this.form.aircraftSubsystemId = "";
|
|
|
}
|
|
|
if (this.form.aircraftSystemId) {
|
|
|
- getSubSystemOption(this.form.aircraftSystemId).then(resp => {
|
|
|
- this.subSystemOption1 = resp.data
|
|
|
- })
|
|
|
+ getSubSystemOption(this.form.aircraftSystemId).then((resp) => {
|
|
|
+ this.subSystemOption1 = resp.data;
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/** 查询故障案例管理列表 */
|
|
|
getList() {
|
|
|
- this.loading = true
|
|
|
- listCase(this.queryParams).then(response => {
|
|
|
- this.caseList = response.rows
|
|
|
- this.total = response.total
|
|
|
- this.loading = false
|
|
|
- this.isfirstView = false
|
|
|
- })
|
|
|
+ this.loading = true;
|
|
|
+ esListCase(this.queryParams).then((response) => {
|
|
|
+ this.caseList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ this.isfirstView = false;
|
|
|
+ });
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false
|
|
|
- this.reset()
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
@@ -593,213 +807,219 @@ export default {
|
|
|
createBy: null,
|
|
|
createTime: null,
|
|
|
updateBy: null,
|
|
|
- updateTime: null
|
|
|
- }
|
|
|
- this.resetForm('form')
|
|
|
+ updateTime: null,
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1
|
|
|
- this.getList()
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm('queryForm')
|
|
|
- this.handleQuery()
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length !== 1
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.reset()
|
|
|
- this.open = true
|
|
|
- this.title = '添加故障案例管理'
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加故障案例管理";
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(id) {
|
|
|
- getCase(id).then(response => {
|
|
|
- this.form = response.data
|
|
|
- this.open = true
|
|
|
- this.title = '修改故障案例管理'
|
|
|
+ getCase(id).then((response) => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改故障案例管理";
|
|
|
if (this.form.troubleshootingMethodPath) {
|
|
|
axios({
|
|
|
- method: 'get',
|
|
|
- responseType: 'blob',
|
|
|
- url: this.baseUrl + this.form.troubleshootingMethodPath
|
|
|
+ method: "get",
|
|
|
+ responseType: "blob",
|
|
|
+ url: this.baseUrl + this.form.troubleshootingMethodPath,
|
|
|
}).then((response) => {
|
|
|
- renderAsync(response.data, this.$refs.troubleshootingMethodFile)
|
|
|
- })
|
|
|
+ renderAsync(response.data, this.$refs.troubleshootingMethodFile);
|
|
|
+ });
|
|
|
}
|
|
|
- this.handleaircraftChange1(false)
|
|
|
- this.handlesystemChange1(false)
|
|
|
- })
|
|
|
- countPlus(id).then(response => {
|
|
|
- })
|
|
|
+ this.handleaircraftChange1(false);
|
|
|
+ this.handlesystemChange1(false);
|
|
|
+ });
|
|
|
+ countPlus(id).then((response) => {});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs['form'].validate(valid => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- updateCase(this.form).then(response => {
|
|
|
- this.$modal.msgSuccess('修改成功')
|
|
|
- this.open = false
|
|
|
- this.queryParams.aircraftTypeId = null
|
|
|
- this.queryParams.aircraftSystemId = null
|
|
|
- this.queryParams.aircraftSubsystemId = null
|
|
|
- this.getList()
|
|
|
- })
|
|
|
+ updateCase(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.queryParams.aircraftTypeId = null;
|
|
|
+ this.queryParams.aircraftSystemId = null;
|
|
|
+ this.queryParams.aircraftSubsystemId = null;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
} else {
|
|
|
- addCase(this.form).then(response => {
|
|
|
- this.$modal.msgSuccess('新增成功')
|
|
|
- this.open = false
|
|
|
- this.queryParams.aircraftTypeId = null
|
|
|
- this.queryParams.aircraftSystemId = null
|
|
|
- this.queryParams.aircraftSubsystemId = null
|
|
|
- this.getList()
|
|
|
- })
|
|
|
+ addCase(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.queryParams.aircraftTypeId = null;
|
|
|
+ this.queryParams.aircraftSystemId = null;
|
|
|
+ this.queryParams.aircraftSubsystemId = null;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id || this.ids
|
|
|
- this.$modal.confirm('是否确认删除故障案例管理编号为"' + ids + '"的数据项?').then(function() {
|
|
|
- return delCase(ids)
|
|
|
- }).then(() => {
|
|
|
- this.getList()
|
|
|
- this.$modal.msgSuccess('删除成功')
|
|
|
- }).catch(() => {})
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$modal
|
|
|
+ .confirm('是否确认删除故障案例管理编号为"' + ids + '"的数据项?')
|
|
|
+ .then(function () {
|
|
|
+ return delCase(ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- this.download('system/case/export', {
|
|
|
- ...this.queryParams
|
|
|
- }, `case_${new Date().getTime()}.xlsx`)
|
|
|
+ this.download(
|
|
|
+ "system/case/export",
|
|
|
+ {
|
|
|
+ ...this.queryParams,
|
|
|
+ },
|
|
|
+ `case_${new Date().getTime()}.xlsx`
|
|
|
+ );
|
|
|
},
|
|
|
truncatedText(text) {
|
|
|
- const maxLength = 30 // 你希望的最大字符数
|
|
|
+ const maxLength = 30; // 你希望的最大字符数
|
|
|
if (text.length > maxLength) {
|
|
|
- return text.substring(0, maxLength) + '...'
|
|
|
+ return text.substring(0, maxLength) + "...";
|
|
|
}
|
|
|
- return text
|
|
|
+ return text;
|
|
|
},
|
|
|
download(path) {
|
|
|
- this.$download.resource(path)
|
|
|
+ this.$download.resource(path);
|
|
|
},
|
|
|
getFileNameByPath(path) {
|
|
|
if (!path) {
|
|
|
- return ''
|
|
|
- } else if (path.lastIndexOf('/') > -1) {
|
|
|
- const newName = path.slice(path.lastIndexOf('/') + 1)
|
|
|
- const names = newName.split('.')
|
|
|
- if ((names.size = 2) && (names[0].length > 19)) {
|
|
|
- return newName.substring(0, names[0].length - 19) + '.' + names[1]
|
|
|
+ return "";
|
|
|
+ } else if (path.lastIndexOf("/") > -1) {
|
|
|
+ const newName = path.slice(path.lastIndexOf("/") + 1);
|
|
|
+ const names = newName.split(".");
|
|
|
+ if ((names.size = 2) && names[0].length > 19) {
|
|
|
+ return newName.substring(0, names[0].length - 19) + "." + names[1];
|
|
|
} else {
|
|
|
- return newName
|
|
|
+ return newName;
|
|
|
}
|
|
|
} else {
|
|
|
- return ''
|
|
|
+ return "";
|
|
|
}
|
|
|
},
|
|
|
changeOrderBy() {
|
|
|
if (this.caseList.length > 0) {
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- .avatar-uploader {
|
|
|
- display: inline-block;
|
|
|
- text-align: center;
|
|
|
- position: relative;
|
|
|
- overflow: hidden;
|
|
|
- }
|
|
|
- .avatar {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- display: block;
|
|
|
- }
|
|
|
-
|
|
|
- .avatar-uploader-icon {
|
|
|
- font-size: 28px;
|
|
|
- color: #8c939d;
|
|
|
- display: block;
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- line-height: 100px;
|
|
|
- }
|
|
|
+.avatar-uploader {
|
|
|
+ display: inline-block;
|
|
|
+ text-align: center;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.avatar {
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
|
|
|
- .modal {
|
|
|
- position: fixed;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- background-color: rgba(0, 0, 0, 0.8);
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- z-index: 9999;
|
|
|
- }
|
|
|
+.avatar-uploader-icon {
|
|
|
+ font-size: 28px;
|
|
|
+ color: #8c939d;
|
|
|
+ display: block;
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ line-height: 100px;
|
|
|
+}
|
|
|
|
|
|
- .full-image {
|
|
|
- max-width: 80%;
|
|
|
- max-height: 80%;
|
|
|
- }
|
|
|
- .el-divider--horizontal{
|
|
|
- display: block;
|
|
|
- height: 1px;
|
|
|
- width: 100%;
|
|
|
- margin: 12px 0;
|
|
|
- }
|
|
|
- .rounded-corners {
|
|
|
- border-radius: 10px; /* 你可以根据需要调整这个值 */
|
|
|
- }
|
|
|
+.modal {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background-color: rgba(0, 0, 0, 0.8);
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ z-index: 9999;
|
|
|
+}
|
|
|
|
|
|
- .flex-center {
|
|
|
- display: flex;
|
|
|
- align-items: center; /* 垂直居中 */
|
|
|
- height: 2.5rem; /* 你需要一个确定的高度 */
|
|
|
- }
|
|
|
- .ellipsis {
|
|
|
- white-space: nowrap; /* 防止文本换行 */
|
|
|
- overflow: hidden; /* 隐藏超出容器的文本 */
|
|
|
- text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
|
|
|
- max-width: 200px;
|
|
|
- }
|
|
|
+.full-image {
|
|
|
+ max-width: 80%;
|
|
|
+ max-height: 80%;
|
|
|
+}
|
|
|
+.el-divider--horizontal {
|
|
|
+ display: block;
|
|
|
+ height: 1px;
|
|
|
+ width: 100%;
|
|
|
+ margin: 12px 0;
|
|
|
+}
|
|
|
+.rounded-corners {
|
|
|
+ border-radius: 10px; /* 你可以根据需要调整这个值 */
|
|
|
+}
|
|
|
|
|
|
- .left {
|
|
|
- float: left;
|
|
|
- /* 左边的样式 */
|
|
|
- }
|
|
|
+.flex-center {
|
|
|
+ display: flex;
|
|
|
+ align-items: center; /* 垂直居中 */
|
|
|
+ height: 2.5rem; /* 你需要一个确定的高度 */
|
|
|
+}
|
|
|
+.ellipsis {
|
|
|
+ white-space: nowrap; /* 防止文本换行 */
|
|
|
+ overflow: hidden; /* 隐藏超出容器的文本 */
|
|
|
+ text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
|
|
|
+ max-width: 200px;
|
|
|
+}
|
|
|
|
|
|
- .right {
|
|
|
- float: right;
|
|
|
- padding: 10px 20px
|
|
|
- /* 右边的样式 */
|
|
|
- }
|
|
|
+.left {
|
|
|
+ float: left;
|
|
|
+ /* 左边的样式 */
|
|
|
+}
|
|
|
|
|
|
- .container::after {
|
|
|
- content: "";
|
|
|
- display: table;
|
|
|
- clear: both;
|
|
|
- }
|
|
|
- .centerClass {
|
|
|
- }
|
|
|
+.right {
|
|
|
+ float: right;
|
|
|
+ padding: 10px 20px;
|
|
|
+ /* 右边的样式 */
|
|
|
+}
|
|
|
|
|
|
- .centered-content {
|
|
|
- /* margin-top: 20%; */
|
|
|
- text-align: center;
|
|
|
- /* font-family: Arial, sans-serif; */
|
|
|
- }
|
|
|
+.container::after {
|
|
|
+ content: "";
|
|
|
+ display: table;
|
|
|
+ clear: both;
|
|
|
+}
|
|
|
+.centerClass {
|
|
|
+}
|
|
|
|
|
|
+.centered-content {
|
|
|
+ /* margin-top: 20%; */
|
|
|
+ text-align: center;
|
|
|
+ /* font-family: Arial, sans-serif; */
|
|
|
+}
|
|
|
</style>
|