|
@@ -12,7 +12,7 @@
|
|
|
<a-input v-model.trim="queryParam.keyword" placeholder="关键字" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <!-- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="车间位置">
|
|
|
<a-select v-model="queryParam.positionId" placeholder="请选择">
|
|
|
<a-select-option
|
|
@@ -29,7 +29,7 @@
|
|
|
<a-input v-model.trim="queryParam.name" placeholder="名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <!-- <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="父位号">
|
|
|
<a-input v-model.trim="queryParam.no" placeholder="父位号"/>
|
|
|
</a-form-item>
|
|
@@ -38,18 +38,18 @@
|
|
|
<a-form-item label="设备位号">
|
|
|
<a-input v-model.trim="queryParam.positionNo" placeholder="设备位号"/>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24" :style="{ display: expand ? 'block' : 'none' }">
|
|
|
+ </a-col> -->
|
|
|
+ <a-col :md="6" :sm="24" >
|
|
|
<a-form-item label="生产商">
|
|
|
<a-input v-model.trim="queryParam.producerId" placeholder="生产商"/>
|
|
|
</a-form-item>
|
|
|
- </a-col> -->
|
|
|
+ </a-col>
|
|
|
<!-- <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="设备自编号">
|
|
|
<a-input v-model="queryParam.zbh" placeholder="设备自编号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>-->
|
|
|
- <!-- <a-col :md="6" :sm="24" :style="{ display: expand ? 'block' : 'none' }">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="设备等级">
|
|
|
<a-select v-model="queryParam.level" placeholder="请选择">
|
|
|
<a-select-option
|
|
@@ -60,7 +60,7 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
- </a-col> -->
|
|
|
+ </a-col>
|
|
|
<!-- <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="自定义类型">
|
|
|
<a-select v-model="queryParam.useType" placeholder="请选择">
|
|
@@ -83,6 +83,19 @@
|
|
|
<a-range-picker v-model="dateRange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24" >
|
|
|
+ <a-form-item label="设备状态">
|
|
|
+ <a-select v-model="queryParam.status" placeholder="请选择">
|
|
|
+ <a-select-option
|
|
|
+ v-for="(label,value) in statusMap"
|
|
|
+ :key="value"
|
|
|
+ :defaultValue="DictCache.VALUE.SB_INFO_STATUS.IN_USE"
|
|
|
+ :label="label"
|
|
|
+ :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<!-- <a-col :md="6" :sm="24" :style="{ display: expand ? 'block' : 'none' }">
|
|
|
<a-form-item label="规格型号">
|
|
|
<a-input v-model="queryParam.model" placeholder="规格型号"/>
|
|
@@ -102,19 +115,7 @@
|
|
|
</a-tree-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24" :style="{ display: expand ? 'block' : 'none' }">
|
|
|
- <a-form-item label="设备状态">
|
|
|
- <a-select v-model="queryParam.status" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in statusMap"
|
|
|
- :key="value"
|
|
|
- :defaultValue="DictCache.VALUE.SB_INFO_STATUS.IN_USE"
|
|
|
- :label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
+
|
|
|
<a-col :md="6" :sm="24" :style="{ display: expand ? 'block' : 'none' }">
|
|
|
<a-form-item label="主子设备">
|
|
|
<a-select v-model="queryParam.isChild" placeholder="请选择">
|
|
@@ -148,7 +149,7 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col> -->
|
|
|
- <a-col :span="6" :style="{ textAlign: 'right' }">
|
|
|
+ <a-col :span="6" >
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
<a-button type="primary" @click="handleOk">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
|
|
@@ -180,6 +181,8 @@
|
|
|
修改导入
|
|
|
</a-button>
|
|
|
<a-button style="margin-left: 8px" type="primary" icon="printer" @click="handlePrintBatch()">批量打印</a-button>
|
|
|
+ <a-button style="margin-left: 8px" type="primary" icon="printer" @click="handleBackBatch(13)">批量退库</a-button>
|
|
|
+ <a-button style="margin-left: 8px" type="primary" icon="printer" @click="handleBackBatch(4)">批量报废</a-button>
|
|
|
<!-- <a-button style="margin-left: 8px" type="primary" icon="reload" @click="handleMeasureBatch()">批量检定</a-button> -->
|
|
|
<a-button style="margin-left: 8px" v-if="$auth('sb-infos-generate-code-all')" :loading="confirmLoading" type="primary" @click="batchGenerate()">重新生成二维码</a-button>
|
|
|
<a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-infos-del')">
|
|
@@ -203,7 +206,19 @@
|
|
|
</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: 1300, y: BaseTool.Constant.scrollY}"
|
|
|
+ showPagination="auto"
|
|
|
+ :rowClassName="rowClassName">
|
|
|
<template #positionNo="text,record">
|
|
|
<a @click="showChangeLog(record)">{{ text }}</a>
|
|
|
</template>
|
|
@@ -224,7 +239,7 @@
|
|
|
<a-menu-item key="0">
|
|
|
<a @click="handleView(record)">查看</a>
|
|
|
</a-menu-item>
|
|
|
- <a-menu-item key="1">
|
|
|
+ <a-menu-item key="1">
|
|
|
<a v-if="$auth('sb-infos-edit')" @click="addLogBySb(record)">新增记录</a>
|
|
|
</a-menu-item>
|
|
|
<a-menu-item key="1">
|
|
@@ -307,6 +322,7 @@
|
|
|
<base-form-location ref="baseFormLocation" @ok="handleOk" />
|
|
|
<SbChangeLogSelectModal ref="sbChangeRecordSelectModal" @ok="handleOk" />
|
|
|
<AddLogForm ref="addLogForm" @ok="handleLogOk" />
|
|
|
+ <BackForm ref="backForm" @ok="handleOk" />
|
|
|
<ListModal ref="listModal" />
|
|
|
</div>
|
|
|
</template>
|
|
@@ -314,6 +330,7 @@
|
|
|
<script>
|
|
|
import { STable, Ellipsis } from '@/components'
|
|
|
import BaseForm from './modules/BaseForm'
|
|
|
+import BackForm from './modules/BackForm'
|
|
|
import ListModal from './modules/ListModal'
|
|
|
import AddLogForm from './modules/AddLogForm'
|
|
|
import DetailSbMeasure from '@/views/sb/measurelog/modules/DetailSbCheckBatch'
|
|
@@ -333,7 +350,7 @@ import {
|
|
|
fetchSbInfo,
|
|
|
fetchSbInfos,
|
|
|
exportSbInfo2,
|
|
|
- batchLocationList,
|
|
|
+ batchLocationList
|
|
|
} from '@/api/sb/info'
|
|
|
import { queryDept } from '@/api/upms/dept'
|
|
|
import { generateSbCodeAll } from '@/api/upms/code'
|
|
@@ -367,42 +384,43 @@ export default {
|
|
|
BaseFormStatusLog,
|
|
|
SbChangeLogSelectModal,
|
|
|
ListModal,
|
|
|
+ BackForm
|
|
|
},
|
|
|
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: {
|
|
@@ -413,7 +431,7 @@ 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: {},
|
|
@@ -458,7 +476,7 @@ export default {
|
|
|
title: '车间',
|
|
|
checked: true,
|
|
|
width: 100,
|
|
|
- dataIndex: 'positionName',
|
|
|
+ dataIndex: 'positionName'
|
|
|
},
|
|
|
// {
|
|
|
// title: '位置',
|
|
@@ -470,14 +488,14 @@ export default {
|
|
|
title: '父位号',
|
|
|
dataIndex: 'no',
|
|
|
width: 100,
|
|
|
- checked: true,
|
|
|
+ checked: true
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '设备名称',
|
|
|
checked: true,
|
|
|
dataIndex: 'name',
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
title: '设备等级',
|
|
@@ -486,13 +504,13 @@ export default {
|
|
|
width: 120,
|
|
|
customRender: (text, record, index) => {
|
|
|
return this.BaseTool.Object.getField(this.levelMap, text)
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '规格、型号',
|
|
|
dataIndex: 'model',
|
|
|
width: 150,
|
|
|
- checked: true,
|
|
|
+ checked: true
|
|
|
},
|
|
|
// {
|
|
|
// title: '操作类型',
|
|
@@ -544,7 +562,7 @@ export default {
|
|
|
title: '厂牌',
|
|
|
dataIndex: 'producerId',
|
|
|
width: 100,
|
|
|
- checked: true,
|
|
|
+ checked: true
|
|
|
},
|
|
|
/* {
|
|
|
title: '自定义类型',
|
|
@@ -579,13 +597,13 @@ export default {
|
|
|
title: '出厂编号',
|
|
|
dataIndex: 'zzh',
|
|
|
width: 100,
|
|
|
- checked: true,
|
|
|
+ checked: true
|
|
|
},
|
|
|
{
|
|
|
title: '管理编号',
|
|
|
dataIndex: 'positionNo',
|
|
|
width: 120,
|
|
|
- checked: true,
|
|
|
+ checked: true
|
|
|
},
|
|
|
/* {
|
|
|
title: '是否显示',
|
|
@@ -656,7 +674,7 @@ export default {
|
|
|
title: '有效期限',
|
|
|
dataIndex: 'nextCheckDate',
|
|
|
width: 120,
|
|
|
- checked: true,
|
|
|
+ checked: true
|
|
|
},
|
|
|
/* {
|
|
|
title: '检定截止',
|
|
@@ -675,7 +693,7 @@ export default {
|
|
|
title: '检定单位',
|
|
|
checked: true,
|
|
|
dataIndex: 'dph',
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
title: '是否强检',
|
|
@@ -684,13 +702,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: '操作',
|
|
@@ -698,9 +716,9 @@ export default {
|
|
|
checked: true,
|
|
|
fixed: 'right',
|
|
|
align: 'center',
|
|
|
- width: '120',
|
|
|
- scopedSlots: { customRender: 'action' },
|
|
|
- },
|
|
|
+ width: 120,
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
+ }
|
|
|
],
|
|
|
childColumns1: [
|
|
|
{
|
|
@@ -710,13 +728,13 @@ export default {
|
|
|
checked: true,
|
|
|
customRender: (text, record, index) => {
|
|
|
return index + 1
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '设备名称',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'sbName',
|
|
|
+ dataIndex: 'sbName'
|
|
|
},
|
|
|
{
|
|
|
title: '操作类型',
|
|
@@ -725,45 +743,45 @@ 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 对象
|
|
@@ -773,8 +791,8 @@ export default {
|
|
|
...this.queryParam,
|
|
|
dataScope: {
|
|
|
sortBy: 'asc',
|
|
|
- sortName: 'position_no',
|
|
|
- },
|
|
|
+ sortName: 'position_no'
|
|
|
+ }
|
|
|
}
|
|
|
this.selectedRowKeys = []
|
|
|
return getSbInfoPage2(Object.assign(parameter, this.queryParam)).then((res) => {
|
|
@@ -789,17 +807,17 @@ export default {
|
|
|
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
|
|
@@ -823,7 +841,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- tableOption() {
|
|
|
+ tableOption () {
|
|
|
this.setTree()
|
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|
|
@@ -831,7 +849,7 @@ export default {
|
|
|
show: true,
|
|
|
clear: () => {
|
|
|
this.selectedRowKeys = []
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
rowSelection: {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
@@ -839,21 +857,21 @@ export default {
|
|
|
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
|
|
@@ -871,7 +889,7 @@ export default {
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- batchGenerate() {
|
|
|
+ batchGenerate () {
|
|
|
this.confirmLoading = true
|
|
|
this.$message.info('正在生成请稍后')
|
|
|
generateSbCodeAll().then((res) => {
|
|
@@ -881,21 +899,21 @@ export default {
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- handleEdit(record) {
|
|
|
+ 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) => {
|
|
|
const modal = this.$refs.printInSbInfoBatch
|
|
|
modal.base([res.data])
|
|
|
})
|
|
|
},
|
|
|
- batchLocation() {
|
|
|
+ batchLocation () {
|
|
|
let ids = []
|
|
|
const length = this.selectedRows.length
|
|
|
if (length === 0) {
|
|
@@ -910,7 +928,7 @@ export default {
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- batchIncorrect(id) {
|
|
|
+ batchIncorrect (id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
@@ -926,7 +944,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
|
|
@@ -942,11 +960,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
|
|
@@ -960,7 +978,18 @@ export default {
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handleStart(record) {
|
|
|
+ handleBackBatch (status) {
|
|
|
+ let ids = []
|
|
|
+ const length = this.selectedRows.length
|
|
|
+ if (length === 0) {
|
|
|
+ this.$message.info('请选择设备')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ids = this.selectedRows.map((item) => item.id)
|
|
|
+ const modal = this.$refs.backForm
|
|
|
+ modal.base(ids, status)
|
|
|
+ },
|
|
|
+ handleStart (record) {
|
|
|
const modal = this.$refs.baseModalStatusLog
|
|
|
modal.base(null, {
|
|
|
sbId: record.id,
|
|
@@ -968,10 +997,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,
|
|
@@ -979,33 +1008,33 @@ 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) {
|
|
|
+ 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) => {
|
|
|
const modal = this.$refs.baseModal
|
|
|
modal.base(res.data, 1)
|
|
|
})
|
|
|
},
|
|
|
- handleOk() {
|
|
|
+ handleOk () {
|
|
|
this.visible = true
|
|
|
this.setTree()
|
|
|
if (this.dateRange != null) {
|
|
@@ -1030,11 +1059,11 @@ export default {
|
|
|
}
|
|
|
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,
|
|
@@ -1043,26 +1072,26 @@ 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) => {
|
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
})
|
|
|
},
|
|
|
- setTree(record = {}) {
|
|
|
+ setTree (record = {}) {
|
|
|
queryDept({ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.JITUAN }).then((res) => {
|
|
|
this.areaList = res.data
|
|
|
})
|
|
@@ -1075,7 +1104,7 @@ export default {
|
|
|
this.queryParam.typeId = selectedKeys.length > 0 ? selectedKeys[0] : ''
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- onExpand(expanded, record) {
|
|
|
+ onExpand (expanded, record) {
|
|
|
// expanded判断展开or收缩操作,record当前行数据
|
|
|
this.childMap = []
|
|
|
getLogBySbId({ sbId: record.id }).then((res) => {
|
|
@@ -1083,33 +1112,33 @@ export default {
|
|
|
this.$forceUpdate()
|
|
|
})
|
|
|
},
|
|
|
- getLogBySbId(record, createdUserName) {
|
|
|
+ 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) {
|
|
|
+ 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() {
|
|
|
+ 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:
|
|
@@ -1122,8 +1151,8 @@ export default {
|
|
|
case 7:
|
|
|
return 'gray'
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|