联调 退役管理
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
<!-- 新增编辑 -->
|
||||
<Equipment ref="EquipmentRef" />
|
||||
<Equipment ref="EquipmentRef" @onSubmit="tableStore.index()" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
@@ -18,18 +18,19 @@ import TableHeader from '@/components/table/header/index.vue'
|
||||
import Equipment from './equipment.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { deleteIssues } from '@/api/process-boot/electricitymanagement'
|
||||
import { createCheckflow, getFileUrl } from '@/api/process-boot/retire'
|
||||
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const TableHeaderRef = ref()
|
||||
const EquipmentRef = ref()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||
|
||||
defineOptions({
|
||||
name: '/Processsupervision/retire'
|
||||
})
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/process-boot/electricityQuality/getIssues',
|
||||
url: '/process-boot/rFlowProcess/getFlowProcess',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
@@ -44,68 +45,103 @@ const tableStore: any = new TableStore({
|
||||
},
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'problemSources',
|
||||
title: '问题来源'
|
||||
field: 'applyForm',
|
||||
title: '设备编号',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue.assetNumber
|
||||
}
|
||||
},
|
||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||
{ field: 'problemName', title: '问题名称' },
|
||||
{ field: 'dataDate', title: '问题新建时间' },
|
||||
|
||||
{
|
||||
field: 'applyForm',
|
||||
title: '资产编号',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue.devNumber
|
||||
}
|
||||
},
|
||||
{ field: 'updateTime', title: '创建时间' },
|
||||
{ field: 'checkerName', title: '审核人' },
|
||||
{
|
||||
field: 'processStatus',
|
||||
title: '流程状态',
|
||||
width: 150,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: '',
|
||||
1: '',
|
||||
2: 'warning',
|
||||
3: 'danger',
|
||||
4: 'success',
|
||||
5: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '',
|
||||
1: '新建',
|
||||
2: '待审核',
|
||||
3: '驳回',
|
||||
4: '已审核',
|
||||
5: '归档'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
width: '200',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.reportProcessStatus == 'Init'
|
||||
return !(row.processStatus == 1 || row.processStatus == 3)
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
click: async row => {
|
||||
EquipmentRef.value.open('编辑设备退役申请单', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '填报',
|
||||
disabled: row => {
|
||||
return (
|
||||
row.reportProcessStatus == 'Auditt' ||
|
||||
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
||||
row.reportProcess == 'Archived'
|
||||
)
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '归档',
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '提交审核',
|
||||
disabled: row => {
|
||||
return !(row.processStatus == 1 || row.processStatus == 3)
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-SuccessFilled',
|
||||
render: 'basicButton',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定归档?'
|
||||
title: '是否提交审核?'
|
||||
},
|
||||
click: row => {}
|
||||
click: row => {
|
||||
createCheckflow({ id: row.id }).then(() => {
|
||||
ElMessage.success('提交成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核记录',
|
||||
title: '下载文件',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-PieChart',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
click: async row => {
|
||||
getFileUrl({ filePath: row.filePath }).then(async res => {
|
||||
let response = await fetch(res.data)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = row.fileName
|
||||
a.click()
|
||||
a.remove()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
@@ -131,8 +167,9 @@ const tableStore: any = new TableStore({
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||
tableStore.table.params.pageType = '1'
|
||||
tableStore.table.params.type = 5
|
||||
tableStore.table.params.applyType = 4
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user