|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<a-card :bordered="false" v-show="visible">
|
|
|
- <a-row :gutter="8" >
|
|
|
+ <a-row :gutter="8">
|
|
|
<a-col :span="24">
|
|
|
<div>
|
|
|
<div class="table-page-search-wrapper">
|
|
@@ -9,7 +9,7 @@
|
|
|
<a-row :gutter="48">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="关键字">
|
|
|
- <a-input v-model.trim="queryParam.keyword" placeholder="关键字"/>
|
|
|
+ <a-input v-model.trim="queryParam.keyword" placeholder="关键字" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!-- <a-col :md="6" :sm="24">
|
|
@@ -78,9 +78,9 @@
|
|
|
<a-range-picker v-model="dateRangeCheck" />
|
|
|
</a-form-item>
|
|
|
</a-col> -->
|
|
|
- <a-col :md="6" :sm="24" >
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="有效日期范围">
|
|
|
- <a-range-picker v-model="dateRange"/>
|
|
|
+ <a-range-picker v-model="dateRange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!-- <a-col :md="6" :sm="24" :style="{ display: expand ? 'block' : 'none' }">
|
|
@@ -152,7 +152,7 @@
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
<a-button type="primary" @click="handleOk">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
|
|
|
- <!-- <a :style="{ marginLeft: '8px', fontSize: '12px' }" @click="expand=!expand">
|
|
|
+ <!-- <a :style="{ marginLeft: '8px', fontSize: '12px' }" @click="expand=!expand">
|
|
|
{{ !expand ? '展开' : '折叠' }} <a-icon :type="expand ? 'up' : 'down'" />
|
|
|
</a> -->
|
|
|
</span>
|
|
@@ -172,11 +172,11 @@
|
|
|
新增导入
|
|
|
</a-button>-->
|
|
|
<a-button style="margin-left:8px;" type="primary" @click="doImportStandard">
|
|
|
- <a-icon type="upload"/>
|
|
|
+ <a-icon type="upload" />
|
|
|
导入
|
|
|
</a-button>
|
|
|
<a-button style="margin-left:8px;" type="primary" @click="doImportForUpdate">
|
|
|
- <a-icon type="upload"/>
|
|
|
+ <a-icon type="upload" />
|
|
|
修改导入
|
|
|
</a-button>
|
|
|
<a-button style="margin-left: 8px" type="primary" icon="printer" @click="handlePrintBatch()">批量打印</a-button>
|
|
@@ -203,20 +203,7 @@
|
|
|
</a-dropdown>
|
|
|
</div>
|
|
|
|
|
|
- <s-table
|
|
|
- ref="table"
|
|
|
- :onExpand="onExpand"
|
|
|
- size="default"
|
|
|
- rowKey="id"
|
|
|
- :widthSpace="true"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :alert="options.alert"
|
|
|
- :rowSelection="options.rowSelection"
|
|
|
- :scroll="{x: 1500, y: BaseTool.Constant.scrollY}"
|
|
|
- showPagination="auto"
|
|
|
- :rowClassName="rowClassName"
|
|
|
- >
|
|
|
+ <s-table ref="table" :onExpand="onExpand" size="default" rowKey="id" :widthSpace="true" :columns="columns" :data="loadData" :alert="options.alert" :rowSelection="options.rowSelection" :scroll="{x: 1500, y: BaseTool.Constant.scrollY}" showPagination="auto" :rowClassName="rowClassName">
|
|
|
<template #positionNo="text,record">
|
|
|
<a @click="showChangeLog(record)">{{ text }}</a>
|
|
|
</template>
|
|
@@ -240,10 +227,10 @@
|
|
|
<a-menu-item key="1">
|
|
|
<a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
|
|
|
</a-menu-item>
|
|
|
- <a-menu-item key="2" v-if="isMeasure===1" >
|
|
|
+ <a-menu-item key="2" v-if="isMeasure===1">
|
|
|
<a @click="batchIncorrect(record)">检定</a>
|
|
|
</a-menu-item>
|
|
|
- <a-menu-item key="3" v-if="isMeasure===1" >
|
|
|
+ <a-menu-item key="3" v-if="isMeasure===1">
|
|
|
<a @click="batchIncorrectInStore(record)">入库</a>
|
|
|
</a-menu-item>
|
|
|
<a-menu-item v-if="record.status != 2" key="2">
|
|
@@ -269,28 +256,24 @@
|
|
|
</template>
|
|
|
</span>
|
|
|
<span slot="status" slot-scope="text">
|
|
|
- <badge
|
|
|
- :status="DictCache.COLOR.SB_INFO_STATUS[text]"
|
|
|
- :text="statusMap[text]" />
|
|
|
+ <badge :status="DictCache.COLOR.SB_INFO_STATUS[text]" :text="statusMap[text]" />
|
|
|
</span>
|
|
|
<span slot="measureStatus" slot-scope="text">
|
|
|
- <badge
|
|
|
- :status="DictCache.COLOR.SB_MEASURE_STATUS[text]"
|
|
|
- :text="yesNoMap[text]" />
|
|
|
+ <badge :status="DictCache.COLOR.SB_MEASURE_STATUS[text]" :text="yesNoMap[text]" />
|
|
|
</span>
|
|
|
<div slot="expandedRowRender" slot-scope="record" style="width:100%;padding-right:120px;">
|
|
|
<a-card :bordered="false" style="width:100%;position: relative; z-inde:9999">
|
|
|
<div slot="title">
|
|
|
<a-row :gutter="20">
|
|
|
<a-col :span="8">
|
|
|
- <a-input v-model.trim="createdUserName" placeholder="请输入操作人"/>
|
|
|
+ <a-input v-model.trim="createdUserName" placeholder="请输入操作人" />
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<a-button type="primary" @click="getLogBySbId(record,createdUserName)">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="()=>{getLogBySbId(record);createdUserName=''}">重置</a-button>
|
|
|
<a-button style="margin-left: 8px" type="primary" icon="plus" @click="addLogBySb(record)">新增</a-button>
|
|
|
</a-col>
|
|
|
- </a-row>
|
|
|
+ </a-row>
|
|
|
|
|
|
</div>
|
|
|
<a-table rowKey="id" :columns="childColumns1" :data-source="record.childMap">
|
|
@@ -305,19 +288,19 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-card>
|
|
|
- <base-form ref="baseModal" :parent-id="queryParam.parentId" :parent-name="queryParam.parentName" @ok="handleOk"/>
|
|
|
- <base-form-status-log ref="baseModalStatusLog" @ok="handleOk"/>
|
|
|
- <detail ref="detailModal" @ok="handleOk"/>
|
|
|
- <download-modal ref="downloadModal"/>
|
|
|
- <preview-modal ref="previewModal"/>
|
|
|
- <import-form-add ref="importModal" @ok="handleOk"/>
|
|
|
- <import-form-add-standard ref="importModalStandard" @ok="handleOk"/>
|
|
|
- <import-form-update2 ref="importModalUpdate2" @ok="handleOk"/>
|
|
|
- <print-sb-code ref="printSbCode"/>
|
|
|
- <print-in-sb-info-batch ref="printInSbInfoBatch" @ok="handleOk"/>
|
|
|
- <detail-sb-measure ref="detailSbMeasureModal" @ok="handleOk"/>
|
|
|
- <base-form-measure ref="baseModalMeasure" @ok="handleOk"/>
|
|
|
- <base-form-measure-in-store ref="baseModalMeasureInStore" @ok="handleOk"/>
|
|
|
+ <base-form ref="baseModal" :parent-id="queryParam.parentId" :parent-name="queryParam.parentName" @ok="handleOk" />
|
|
|
+ <base-form-status-log ref="baseModalStatusLog" @ok="handleOk" />
|
|
|
+ <detail ref="detailModal" @ok="handleOk" />
|
|
|
+ <download-modal ref="downloadModal" />
|
|
|
+ <preview-modal ref="previewModal" />
|
|
|
+ <import-form-add ref="importModal" @ok="handleOk" />
|
|
|
+ <import-form-add-standard ref="importModalStandard" @ok="handleOk" />
|
|
|
+ <import-form-update2 ref="importModalUpdate2" @ok="handleOk" />
|
|
|
+ <print-sb-code ref="printSbCode" />
|
|
|
+ <print-in-sb-info-batch ref="printInSbInfoBatch" @ok="handleOk" />
|
|
|
+ <detail-sb-measure ref="detailSbMeasureModal" @ok="handleOk" />
|
|
|
+ <base-form-measure ref="baseModalMeasure" @ok="handleOk" />
|
|
|
+ <base-form-measure-in-store ref="baseModalMeasureInStore" @ok="handleOk" />
|
|
|
<base-form-location ref="baseFormLocation" @ok="handleOk" />
|
|
|
<SbChangeLogSelectModal ref="sbChangeRecordSelectModal" @ok="handleOk" />
|
|
|
<AddLogForm ref="addLogForm" @ok="handleLogOk" />
|
|
@@ -338,7 +321,17 @@ import BaseFormMeasureInStore from './modules/BaseFormMeasureInStore'
|
|
|
import BaseFormLocation from './modules/BaseFormLocation'
|
|
|
import DownloadModal from '@/views/download/DownloadModal'
|
|
|
import PreviewModal from '@/views/preview/PreviewModal'
|
|
|
-import { getSbInfoPage2, deleteSbInfos, querySbInfo, getLogBySbId, updateLogBySbId, fetchSbInfo, fetchSbInfos, exportSbInfo2, batchLocationList } from '@/api/sb/info'
|
|
|
+import {
|
|
|
+ getSbInfoPage2,
|
|
|
+ deleteSbInfos,
|
|
|
+ querySbInfo,
|
|
|
+ getLogBySbId,
|
|
|
+ updateLogBySbId,
|
|
|
+ fetchSbInfo,
|
|
|
+ fetchSbInfos,
|
|
|
+ exportSbInfo2,
|
|
|
+ batchLocationList,
|
|
|
+} from '@/api/sb/info'
|
|
|
import { queryDept } from '@/api/upms/dept'
|
|
|
import { generateSbCodeAll } from '@/api/upms/code'
|
|
|
import { fetchSbTypeTree } from '@/api/sb/type'
|
|
@@ -370,43 +363,43 @@ export default {
|
|
|
BaseFormLocation,
|
|
|
BaseFormStatusLog,
|
|
|
SbChangeLogSelectModal,
|
|
|
- ListModal
|
|
|
+ ListModal,
|
|
|
},
|
|
|
props: {
|
|
|
filter: {
|
|
|
type: Number,
|
|
|
- default: -1
|
|
|
+ default: -1,
|
|
|
},
|
|
|
useType: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
correctType: {
|
|
|
type: Number,
|
|
|
- default: 1
|
|
|
+ default: 1,
|
|
|
},
|
|
|
measureStatus: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
isMeasure: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
isSelf: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
typeFlag: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
status: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
- }
|
|
|
+ default: null,
|
|
|
+ },
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
@@ -417,10 +410,10 @@ export default {
|
|
|
isSelf: this.isSelf,
|
|
|
id: this.$route.query.id,
|
|
|
typeId: this.$route.query.typeId,
|
|
|
- status: this.$route.query.status || this.status
|
|
|
+ status: this.$route.query.status || this.status,
|
|
|
},
|
|
|
expand: false,
|
|
|
- record:{},
|
|
|
+ record: {},
|
|
|
depreciationTypeMap: {},
|
|
|
visible: true,
|
|
|
dateRange: [],
|
|
@@ -462,7 +455,7 @@ export default {
|
|
|
title: '车间',
|
|
|
checked: true,
|
|
|
width: 100,
|
|
|
- dataIndex: 'positionName'
|
|
|
+ dataIndex: 'positionName',
|
|
|
},
|
|
|
// {
|
|
|
// title: '位置',
|
|
@@ -474,29 +467,29 @@ export default {
|
|
|
title: '父位号',
|
|
|
dataIndex: 'no',
|
|
|
width: 100,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '设备名称',
|
|
|
checked: true,
|
|
|
dataIndex: 'name',
|
|
|
- width: 100
|
|
|
+ width: 100,
|
|
|
},
|
|
|
- /* {
|
|
|
+ {
|
|
|
title: '设备等级',
|
|
|
checked: true,
|
|
|
dataIndex: 'level',
|
|
|
width: 120,
|
|
|
customRender: (text, record, index) => {
|
|
|
return this.BaseTool.Object.getField(this.levelMap, text)
|
|
|
- }
|
|
|
- }, */
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
title: '规格、型号',
|
|
|
dataIndex: 'model',
|
|
|
width: 150,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
// {
|
|
|
// title: '操作类型',
|
|
@@ -548,7 +541,7 @@ export default {
|
|
|
title: '厂牌',
|
|
|
dataIndex: 'producerId',
|
|
|
width: 100,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
/* {
|
|
|
title: '自定义类型',
|
|
@@ -583,13 +576,13 @@ export default {
|
|
|
title: '出厂编号',
|
|
|
dataIndex: 'zzh',
|
|
|
width: 100,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '管理编号',
|
|
|
dataIndex: 'positionNo',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
/* {
|
|
|
title: '是否显示',
|
|
@@ -660,7 +653,7 @@ export default {
|
|
|
title: '有效期限',
|
|
|
dataIndex: 'nextCheckDate',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
/* {
|
|
|
title: '检定截止',
|
|
@@ -679,7 +672,7 @@ export default {
|
|
|
title: '检定单位',
|
|
|
checked: true,
|
|
|
dataIndex: 'dph',
|
|
|
- width: 100
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: '是否强检',
|
|
@@ -688,13 +681,13 @@ export default {
|
|
|
checked: true,
|
|
|
customRender: (text, record, index) => {
|
|
|
return this.BaseTool.Object.getField(this.checkTypeMap, text)
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '备注',
|
|
|
checked: true,
|
|
|
dataIndex: 'remark',
|
|
|
- width: 100
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
@@ -703,8 +696,8 @@ export default {
|
|
|
fixed: 'right',
|
|
|
align: 'center',
|
|
|
width: '120',
|
|
|
- scopedSlots: { customRender: 'action' }
|
|
|
- }
|
|
|
+ scopedSlots: { customRender: 'action' },
|
|
|
+ },
|
|
|
],
|
|
|
childColumns1: [
|
|
|
{
|
|
@@ -714,13 +707,13 @@ export default {
|
|
|
checked: true,
|
|
|
customRender: (text, record, index) => {
|
|
|
return index + 1
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '设备名称',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'sbName'
|
|
|
+ dataIndex: 'sbName',
|
|
|
},
|
|
|
{
|
|
|
title: '操作类型',
|
|
@@ -729,77 +722,81 @@ export default {
|
|
|
dataIndex: 'otherType',
|
|
|
customRender: (text, record, index) => {
|
|
|
return this.BaseTool.Object.getField(this.otherTypeMap, text)
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '操作人',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'createdUserName'
|
|
|
+ dataIndex: 'createdUserName',
|
|
|
},
|
|
|
{
|
|
|
title: '处理人员',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'updateUserName'
|
|
|
+ dataIndex: 'updateUserName',
|
|
|
},
|
|
|
{
|
|
|
title: '异常处理描述',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'exceptionDescription'
|
|
|
+ dataIndex: 'exceptionDescription',
|
|
|
},
|
|
|
{
|
|
|
title: '操作内容',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'content'
|
|
|
+ dataIndex: 'content',
|
|
|
},
|
|
|
{
|
|
|
title: '文件查看',
|
|
|
checked: true,
|
|
|
dataIndex: 'sbMeasureLogCredential',
|
|
|
width: 120,
|
|
|
- scopedSlots: { customRender: 'sbMeasureLogCredential' }
|
|
|
+ scopedSlots: { customRender: 'sbMeasureLogCredential' },
|
|
|
},
|
|
|
{
|
|
|
title: '操作时间',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'createdTime'
|
|
|
- }
|
|
|
+ dataIndex: 'createdTime',
|
|
|
+ },
|
|
|
],
|
|
|
otherTypeMap: {},
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
- loadData: parameter => {
|
|
|
+ loadData: (parameter) => {
|
|
|
parameter = {
|
|
|
...parameter,
|
|
|
...this.queryParam,
|
|
|
dataScope: {
|
|
|
sortBy: 'asc',
|
|
|
- sortName: 'position_no'
|
|
|
- }
|
|
|
+ sortName: 'position_no',
|
|
|
+ },
|
|
|
}
|
|
|
this.selectedRowKeys = []
|
|
|
- return getSbInfoPage2(Object.assign(parameter, this.queryParam))
|
|
|
- .then(res => {
|
|
|
- return res.data
|
|
|
- })
|
|
|
+ return getSbInfoPage2(Object.assign(parameter, this.queryParam)).then((res) => {
|
|
|
+ return res.data
|
|
|
+ })
|
|
|
},
|
|
|
selectedRowKeys: [],
|
|
|
selectedRows: [],
|
|
|
|
|
|
options: {
|
|
|
- alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
|
+ alert: {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ },
|
|
|
+ },
|
|
|
rowSelection: {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
|
- onChange: this.onSelectChange
|
|
|
- }
|
|
|
+ onChange: this.onSelectChange,
|
|
|
+ },
|
|
|
},
|
|
|
- optionAlertShow: false
|
|
|
+ optionAlertShow: false,
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
console.log('this.$route.query.parentId: ' + this.$route.query.parentId)
|
|
|
this.queryParam.parentId = this.$route.query.parentId
|
|
|
this.queryParam.parentName = this.$route.query.parentName
|
|
@@ -818,37 +815,42 @@ export default {
|
|
|
this.isShowMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_SHOW)
|
|
|
this.lineMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_LINE)
|
|
|
this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
|
|
|
- querySbPosition().then(res => {
|
|
|
+ querySbPosition().then((res) => {
|
|
|
this.sbPositionData = res.data
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- tableOption () {
|
|
|
+ tableOption() {
|
|
|
this.setTree()
|
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|
|
|
- alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
|
+ alert: {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ },
|
|
|
+ },
|
|
|
rowSelection: {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
|
onChange: this.onSelectChange,
|
|
|
- getCheckboxProps: record => ({
|
|
|
+ getCheckboxProps: (record) => ({
|
|
|
props: {
|
|
|
disabled: false,
|
|
|
- name: record.id
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ name: record.id,
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ },
|
|
|
}
|
|
|
this.optionAlertShow = true
|
|
|
} else {
|
|
|
this.options = {
|
|
|
alert: false,
|
|
|
- rowSelection: null
|
|
|
+ rowSelection: null,
|
|
|
}
|
|
|
this.optionAlertShow = false
|
|
|
}
|
|
|
},
|
|
|
- batchDelete (id) {
|
|
|
+ batchDelete(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
@@ -856,56 +858,56 @@ export default {
|
|
|
this.$message.info('请选择要删除的记录')
|
|
|
return
|
|
|
}
|
|
|
- ids = this.selectedRows.map(item => item.id)
|
|
|
+ ids = this.selectedRows.map((item) => item.id)
|
|
|
} else {
|
|
|
ids = [id]
|
|
|
}
|
|
|
- deleteSbInfos(ids).then(res => {
|
|
|
+ deleteSbInfos(ids).then((res) => {
|
|
|
this.$message.info('删除成功')
|
|
|
this.handleOk()
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- batchGenerate () {
|
|
|
+ batchGenerate() {
|
|
|
this.confirmLoading = true
|
|
|
this.$message.info('正在生成请稍后')
|
|
|
- generateSbCodeAll().then(res => {
|
|
|
+ generateSbCodeAll().then((res) => {
|
|
|
this.confirmLoading = false
|
|
|
this.$message.info('生成成功')
|
|
|
this.handleOk()
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- handleEdit (record) {
|
|
|
- fetchSbInfo({ id: record.id }).then(res => {
|
|
|
+ handleEdit(record) {
|
|
|
+ fetchSbInfo({ id: record.id }).then((res) => {
|
|
|
this.visible = false
|
|
|
const modal = this.$refs.baseModal
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handlePrint (record) {
|
|
|
+ handlePrint(record) {
|
|
|
this.visible = false
|
|
|
- fetchSbInfo({ id: record.id }).then(res => {
|
|
|
+ fetchSbInfo({ id: record.id }).then((res) => {
|
|
|
const modal = this.$refs.printInSbInfoBatch
|
|
|
modal.base([res.data])
|
|
|
})
|
|
|
},
|
|
|
- batchLocation () {
|
|
|
+ batchLocation() {
|
|
|
let ids = []
|
|
|
const length = this.selectedRows.length
|
|
|
if (length === 0) {
|
|
|
this.$message.info('请选择设备')
|
|
|
return
|
|
|
}
|
|
|
- ids = this.selectedRows.map(item => item.id)
|
|
|
+ ids = this.selectedRows.map((item) => item.id)
|
|
|
console.log(ids)
|
|
|
- batchLocationList({ ids }).then(res => {
|
|
|
+ batchLocationList({ ids }).then((res) => {
|
|
|
this.visible = false
|
|
|
const modal = this.$refs.baseFormLocation
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- batchIncorrect (id) {
|
|
|
+ batchIncorrect(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
@@ -921,7 +923,7 @@ export default {
|
|
|
const modal = this.$refs.baseModalMeasure
|
|
|
modal.base(ids, this.correctType)
|
|
|
},
|
|
|
- batchIncorrectInStore (id) {
|
|
|
+ batchIncorrectInStore(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
@@ -937,11 +939,11 @@ export default {
|
|
|
const modal = this.$refs.baseModalMeasureInStore
|
|
|
modal.base(ids, this.correctType)
|
|
|
},
|
|
|
- handleMeasureBatch () {
|
|
|
+ handleMeasureBatch() {
|
|
|
const modal = this.$refs.detailSbMeasureModal
|
|
|
modal.base()
|
|
|
},
|
|
|
- handlePrintBatch () {
|
|
|
+ handlePrintBatch() {
|
|
|
this.visible = false
|
|
|
let ids = []
|
|
|
const length = this.selectedRows.length
|
|
@@ -949,13 +951,13 @@ export default {
|
|
|
this.$message.info('请选择要打印的设备')
|
|
|
return
|
|
|
}
|
|
|
- ids = this.selectedRows.map(item => item.id)
|
|
|
- fetchSbInfos(ids).then(res => {
|
|
|
+ ids = this.selectedRows.map((item) => item.id)
|
|
|
+ fetchSbInfos(ids).then((res) => {
|
|
|
const modal = this.$refs.printInSbInfoBatch
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handleStart (record) {
|
|
|
+ handleStart(record) {
|
|
|
const modal = this.$refs.baseModalStatusLog
|
|
|
modal.base(null, {
|
|
|
sbId: record.id,
|
|
@@ -963,10 +965,10 @@ export default {
|
|
|
changeUserId: this.$store.getters.userInfo.userId,
|
|
|
actualUser: this.$store.getters.userInfo.realName,
|
|
|
preStatus: record.status,
|
|
|
- afterStatus: this.DictCache.VALUE.SB_INFO_STATUS.IN_USE
|
|
|
+ afterStatus: this.DictCache.VALUE.SB_INFO_STATUS.IN_USE,
|
|
|
})
|
|
|
},
|
|
|
- handleStop (record) {
|
|
|
+ handleStop(record) {
|
|
|
const modal = this.$refs.baseModalStatusLog
|
|
|
modal.base(null, {
|
|
|
sbId: record.id,
|
|
@@ -974,54 +976,62 @@ export default {
|
|
|
changeUserId: this.$store.getters.userInfo.userId,
|
|
|
actualUser: this.$store.getters.userInfo.realName,
|
|
|
preStatus: record.status,
|
|
|
- afterStatus: this.DictCache.VALUE.SB_INFO_STATUS.IN_STOP
|
|
|
+ afterStatus: this.DictCache.VALUE.SB_INFO_STATUS.IN_STOP,
|
|
|
})
|
|
|
},
|
|
|
- handleAdd () {
|
|
|
+ handleAdd() {
|
|
|
this.visible = false
|
|
|
this.$refs.baseModal.base()
|
|
|
},
|
|
|
- handleView (record) {
|
|
|
- fetchSbInfo({ id: record.id }).then(res => {
|
|
|
+ handleView(record) {
|
|
|
+ fetchSbInfo({ id: record.id }).then((res) => {
|
|
|
this.visible = false
|
|
|
const modal = this.$refs.detailModal
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- showChangeLog (record) {
|
|
|
+ showChangeLog(record) {
|
|
|
console.log(record)
|
|
|
console.log(this.$refs)
|
|
|
this.$refs.sbChangeRecordSelectModal.base({}, { sbId: record.id })
|
|
|
},
|
|
|
- handleCopy (record) {
|
|
|
+ handleCopy(record) {
|
|
|
this.visible = false
|
|
|
- fetchSbInfo({ id: record.id }).then(res => {
|
|
|
+ fetchSbInfo({ id: record.id }).then((res) => {
|
|
|
const modal = this.$refs.baseModal
|
|
|
modal.base(res.data, 1)
|
|
|
})
|
|
|
},
|
|
|
- handleOk () {
|
|
|
+ handleOk() {
|
|
|
this.visible = true
|
|
|
this.setTree()
|
|
|
if (this.dateRange != null) {
|
|
|
this.queryParam.nextCheckDateStart = this.dateRange[0]
|
|
|
this.queryParam.nextCheckDateEnd = this.dateRange[1]
|
|
|
- this.queryParam.nextCheckDateStart = this.queryParam.nextCheckDateStart ? this.queryParam.nextCheckDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
- this.queryParam.nextCheckDateEnd = this.queryParam.nextCheckDateEnd ? this.queryParam.nextCheckDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
+ this.queryParam.nextCheckDateStart = this.queryParam.nextCheckDateStart
|
|
|
+ ? this.queryParam.nextCheckDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ : null
|
|
|
+ this.queryParam.nextCheckDateEnd = this.queryParam.nextCheckDateEnd
|
|
|
+ ? this.queryParam.nextCheckDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ : null
|
|
|
}
|
|
|
if (this.dateRangeCheck != null) {
|
|
|
this.queryParam.checkDateStart = this.dateRangeCheck[0]
|
|
|
this.queryParam.checkDateEnd = this.dateRangeCheck[1]
|
|
|
- this.queryParam.checkDateStart = this.queryParam.checkDateStart ? this.queryParam.checkDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
- this.queryParam.checkDateEnd = this.queryParam.checkDateEnd ? this.queryParam.checkDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
+ this.queryParam.checkDateStart = this.queryParam.checkDateStart
|
|
|
+ ? this.queryParam.checkDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ : null
|
|
|
+ this.queryParam.checkDateEnd = this.queryParam.checkDateEnd
|
|
|
+ ? this.queryParam.checkDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ : null
|
|
|
}
|
|
|
this.$refs.table.refresh()
|
|
|
},
|
|
|
- onSelectChange (selectedRowKeys, selectedRows) {
|
|
|
+ onSelectChange(selectedRowKeys, selectedRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
this.selectedRows = selectedRows
|
|
|
},
|
|
|
- resetSearchForm () {
|
|
|
+ resetSearchForm() {
|
|
|
this.queryParam = {
|
|
|
filter: this.filter,
|
|
|
useType: this.useType,
|
|
@@ -1030,30 +1040,30 @@ export default {
|
|
|
isSelf: this.isSelf,
|
|
|
id: this.$route.query.id,
|
|
|
typeId: this.$route.query.typeId,
|
|
|
- status: this.$route.query.status || this.status
|
|
|
+ status: this.$route.query.status || this.status,
|
|
|
}
|
|
|
this.visible = true
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- doExport () {
|
|
|
+ doExport() {
|
|
|
const parameter = {
|
|
|
...this.queryParam,
|
|
|
sbIds: this.selectedRowKeys,
|
|
|
dataScope: {
|
|
|
sortBy: 'asc',
|
|
|
- sortName: 'no'
|
|
|
- }
|
|
|
+ sortName: 'no',
|
|
|
+ },
|
|
|
}
|
|
|
console.log(parameter)
|
|
|
- exportSbInfo2(parameter).then(file => {
|
|
|
+ exportSbInfo2(parameter).then((file) => {
|
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
})
|
|
|
},
|
|
|
- setTree (record = {}) {
|
|
|
- queryDept({ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.JITUAN }).then(res => {
|
|
|
+ setTree(record = {}) {
|
|
|
+ queryDept({ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.JITUAN }).then((res) => {
|
|
|
this.areaList = res.data
|
|
|
})
|
|
|
- fetchSbTypeTree().then(res => {
|
|
|
+ fetchSbTypeTree().then((res) => {
|
|
|
this.treeData = res.data
|
|
|
})
|
|
|
},
|
|
@@ -1062,42 +1072,41 @@ export default {
|
|
|
this.queryParam.typeId = selectedKeys.length > 0 ? selectedKeys[0] : ''
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- onExpand (expanded, record) { // expanded判断展开or收缩操作,record当前行数据
|
|
|
+ onExpand(expanded, record) {
|
|
|
+ // expanded判断展开or收缩操作,record当前行数据
|
|
|
this.childMap = []
|
|
|
- getLogBySbId({ sbId: record.id }).then(res => {
|
|
|
+ getLogBySbId({ sbId: record.id }).then((res) => {
|
|
|
record.childMap = res.data.rows
|
|
|
this.$forceUpdate()
|
|
|
-
|
|
|
})
|
|
|
},
|
|
|
- getLogBySbId(record,createdUserName){
|
|
|
- getLogBySbId({ sbId: record.id,createdUserName }).then(res => {
|
|
|
+ getLogBySbId(record, createdUserName) {
|
|
|
+ getLogBySbId({ sbId: record.id, createdUserName }).then((res) => {
|
|
|
record.childMap = res.data.rows
|
|
|
this.$forceUpdate()
|
|
|
-
|
|
|
})
|
|
|
},
|
|
|
- addLogBySb (record) {
|
|
|
+ addLogBySb(record) {
|
|
|
this.record = record
|
|
|
this.$refs.addLogForm.base(record)
|
|
|
},
|
|
|
- handleLogOk (val) {
|
|
|
- getLogBySbId({ sbId: val.sbId }).then(res => {
|
|
|
+ handleLogOk(val) {
|
|
|
+ getLogBySbId({ sbId: val.sbId }).then((res) => {
|
|
|
this.record.childMap = res.data.rows
|
|
|
this.$forceUpdate()
|
|
|
})
|
|
|
},
|
|
|
- doImport () {
|
|
|
+ doImport() {
|
|
|
this.$refs.importModal.base(null, null)
|
|
|
},
|
|
|
- doImportStandard () {
|
|
|
+ doImportStandard() {
|
|
|
// this.$refs.importModalStandard.base()
|
|
|
this.$refs.importModalUpdate2.base(null, 1, this.typeFlag)
|
|
|
},
|
|
|
- doImportForUpdate () {
|
|
|
- this.$refs.importModalUpdate2.base(null, 2)
|
|
|
+ doImportForUpdate() {
|
|
|
+ this.$refs.importModalUpdate2.base(null, 2, 2)
|
|
|
},
|
|
|
- rowClassName (record, index) {
|
|
|
+ rowClassName(record, index) {
|
|
|
if (record.measureStatus === 1 && record.status !== 7) return 'orange'
|
|
|
switch (record.status) {
|
|
|
case 1:
|
|
@@ -1110,22 +1119,21 @@ export default {
|
|
|
case 7:
|
|
|
return 'gray'
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
-/deep/ .green{
|
|
|
+/deep/ .green {
|
|
|
background: rgb(58, 233, 58);
|
|
|
}
|
|
|
-/deep/ .red{
|
|
|
+/deep/ .red {
|
|
|
background: red;
|
|
|
}
|
|
|
-/deep/ .gray{
|
|
|
+/deep/ .gray {
|
|
|
background: #666;
|
|
|
}
|
|
|
-/deep/ .orange{
|
|
|
- background:rgb(245, 132, 91);
|
|
|
-
|
|
|
+/deep/ .orange {
|
|
|
+ background: rgb(245, 132, 91);
|
|
|
}
|
|
|
</style>
|