|
@@ -56,45 +56,89 @@
|
|
|
:placeholder="$t('请选择') + $t('年份')">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="staffPlanQuery" style="margin-left: 20px;">
|
|
|
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="getRecordList(row,queryDeviceParams.year)" style="margin-left: 20px;">
|
|
|
{{ $t('搜索') }}</el-button>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <el-table :data="list" v-loading="planLoading" border>
|
|
|
-
|
|
|
+ <el-table v-loading="loading" :data="recordList" :max-height="300" border>
|
|
|
+ <el-table-column label="设备名称" align="center" prop="devname" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="设备位号" align="center" prop="devno" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="区域" align="center" prop="region" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="原因" align="center" prop="reason" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="巡检时间" align="center" prop="inspectionTime" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.inspectionTime, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="消故时间" align="center" prop="pastTime" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.pastTime, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="消故人" align="center" prop="pasterCode" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="处理情况" align="center" prop="treatment" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
|
|
|
</el-table>
|
|
|
+<!-- <el-table :data="list" v-loading="planLoading" border>-->
|
|
|
+
|
|
|
+<!-- </el-table>-->
|
|
|
</el-card>
|
|
|
<el-card>
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span> 维修记录</span><div style="float: right;margin-bottom: -14px">
|
|
|
- <el-form :model="queryDeviceParams" ref="queryRegularForm" label-width="68px" :inline="true">
|
|
|
+ <el-form :model="queryDeviceParams2" ref="queryRegularForm" label-width="68px" :inline="true">
|
|
|
<el-form-item :label="$t('年份')" prop="year">
|
|
|
<el-date-picker clearable size="small" style="width: 200px"
|
|
|
- v-model="queryDeviceParams.year"
|
|
|
+ v-model="queryDeviceParams2.year"
|
|
|
type="year"
|
|
|
value-format="yyyy"
|
|
|
:placeholder="$t('请选择') + $t('年份')">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="staffPlanQuery" style="margin-left: 20px;">
|
|
|
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="staffPlanQuery1(row,queryDeviceParams2.year)" style="margin-left: 20px;">
|
|
|
{{ $t('搜索') }}</el-button>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <el-table :data="list" v-loading="planLoading" border>
|
|
|
-
|
|
|
+ <el-table v-loading="loading" :data="approveList" border>
|
|
|
+ <el-table-column :label="$t('申请人')" align="center" prop="userName" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column :label="$t('设备类型')+':'" align="center" prop="devType" :formatter="devTypeFormat" />
|
|
|
+ <el-table-column :label="$t('审批类型')" align="center" prop="approveType" :formatter="approveTypeFormat"/>
|
|
|
+ <el-table-column :label="$t('内容')" align="center" prop="content" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column :label="$t('申请状态')" align="center" prop="status" :formatter="statusFormat"/>
|
|
|
+ <el-table-column :label="$t('开始时间')" align="center" prop="creattime" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.creattime, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('结束时间')" align="center" prop="endtime" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="detailHandle(scope.row)"
|
|
|
+ >{{ $t('查看') }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
+ <spec-maintenance v-if="specMaintenanceVisible" ref="specMaintenance"></spec-maintenance>
|
|
|
+<!-- <el-table :data="list" v-loading="planLoading" border>-->
|
|
|
+
|
|
|
+<!-- </el-table>-->
|
|
|
</el-card>
|
|
|
<el-card>
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span> 变更记录</span><div style="float: right;margin-bottom: -14px">
|
|
|
- <el-form :model="queryDeviceParams" ref="queryRegularForm" label-width="68px" :inline="true">
|
|
|
+ <el-form :model="queryDeviceParams3" ref="queryRegularForm" label-width="68px" :inline="true">
|
|
|
<el-form-item :label="$t('年份')" prop="year">
|
|
|
<el-date-picker clearable size="small" style="width: 200px"
|
|
|
- v-model="queryDeviceParams.year"
|
|
|
+ v-model="queryDeviceParams3.year"
|
|
|
type="year"
|
|
|
value-format="yyyy"
|
|
|
:placeholder="$t('请选择') + $t('年份')">
|
|
@@ -118,12 +162,24 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import {listPlan} from "@/api/training/spec/plan";
|
|
|
import {listParticipants} from "@/api/training/participants";
|
|
|
import {listDevice} from "@/api/training/device";
|
|
|
+import {listRecord} from "@/api/inspection/record";
|
|
|
+import {hisApprovelist} from "@/api/intact/maintenance";
|
|
|
+import SpecMaintenance from "@/views/approve/approveDetail/specMaintenance-detail";
|
|
|
|
|
|
export default {
|
|
|
name: "Resume",
|
|
|
- components: {Treeselect},
|
|
|
+ components: {Treeselect,SpecMaintenance},
|
|
|
data() {
|
|
|
return {
|
|
|
+ row:{},
|
|
|
+ recordList:[],
|
|
|
+ approveList:[],
|
|
|
+ specMaintenanceVisible: false,
|
|
|
+ devType:1,
|
|
|
+ devTypeOptions: [{dictValue:1,dictLabel:'工业炉'},{dictValue:2,dictLabel:'压缩机'},{},{}],
|
|
|
+ // 审批类型字典
|
|
|
+ approveTypeOptions: [{dictValue:1,dictLabel:'维修'}],
|
|
|
+ statusOptions: [],
|
|
|
list: [],
|
|
|
// 遮罩层
|
|
|
loading: false,
|
|
@@ -169,6 +225,18 @@ export default {
|
|
|
year: this.getNowTime(),
|
|
|
trainingType: null
|
|
|
},
|
|
|
+ queryDeviceParams2: {
|
|
|
+ staffId: null,
|
|
|
+ regularId: null,
|
|
|
+ year: this.getNowTime(),
|
|
|
+ trainingType: null
|
|
|
+ },
|
|
|
+ queryDeviceParams3: {
|
|
|
+ staffId: null,
|
|
|
+ regularId: null,
|
|
|
+ year: this.getNowTime(),
|
|
|
+ trainingType: null
|
|
|
+ },
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
@@ -180,10 +248,60 @@ export default {
|
|
|
this.getDicts("PLANT_DIVIDE").then(response => {
|
|
|
this.plantCodeOptions = response.data;
|
|
|
});
|
|
|
+ this.getDicts("spec_approve_res").then(response => {
|
|
|
+ this.statusOptions = response.data;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
init(row) {
|
|
|
+ this.row=row
|
|
|
this.visible = true
|
|
|
+ var data = {
|
|
|
+ devno:row.devno,
|
|
|
+ region:row.position
|
|
|
+ }
|
|
|
+ listRecord(data).then(response => {
|
|
|
+ this.recordList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+
|
|
|
+ var data2={
|
|
|
+ devId : row.id,
|
|
|
+ devType : this.devType
|
|
|
+ }
|
|
|
+ hisApprovelist(data2).then(response => {
|
|
|
+ this.approveList = response.data;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ staffPlanQuery1(row,year){
|
|
|
+ var data2={
|
|
|
+ devId : row.id,
|
|
|
+ devType : this.devType,
|
|
|
+ createyear: year
|
|
|
+ }
|
|
|
+ hisApprovelist(data2).then(response => {
|
|
|
+ this.approveList = response.data;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ staffPlanQuery(){
|
|
|
+ alert("123123qqss")
|
|
|
+ },
|
|
|
+ // 设备类型:字典翻译
|
|
|
+ devTypeFormat(row) {
|
|
|
+ return this.selectDictLabel(this.devTypeOptions, row.devType);
|
|
|
+ },
|
|
|
+ // 审批类型字典翻译
|
|
|
+ approveTypeFormat(row) {
|
|
|
+ return this.selectDictLabel(this.approveTypeOptions, row.approveType);
|
|
|
+ },
|
|
|
+ // 审批类型字典翻译
|
|
|
+ statusFormat(row) {
|
|
|
+ return this.selectDictLabel(this.statusOptions, row.status);
|
|
|
},
|
|
|
/** 获取当前年份 */
|
|
|
getNowTime() {
|
|
@@ -197,6 +315,27 @@ export default {
|
|
|
plantCodeFormat(row, column) {
|
|
|
return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
|
|
|
},
|
|
|
+ //操作审批流程
|
|
|
+ detailHandle (row) {
|
|
|
+ this.specMaintenanceVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ console.log(row)
|
|
|
+ this.$refs.specMaintenance.init(row.id, row.taskId, row.processId,row.taskName)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getRecordList(row,year){
|
|
|
+ const data = {
|
|
|
+ devno: row.devno,
|
|
|
+ region: row.position,
|
|
|
+ createyear: year
|
|
|
+ };
|
|
|
+ listRecord(data).then(response => {
|
|
|
+ console.log(data)
|
|
|
+ this.recordList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|