修改技术监督bug
This commit is contained in:
@@ -21,12 +21,16 @@ import { showShade } from '@/utils/pageShade'
|
|||||||
|
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
||||||
|
|
||||||
const onMenuCollapse = () => {
|
const onMenuCollapse = () => {
|
||||||
showShade('ba-aside-menu-shade', () => {
|
showShade('ba-aside-menu-shade', () => {
|
||||||
config.setLayout('menuCollapse', true)
|
config.setLayout('menuCollapse', true)
|
||||||
})
|
})
|
||||||
config.setLayout('menuCollapse', false)
|
config.setLayout('menuCollapse', false)
|
||||||
}
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
document.title = getTheme.name
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -60,3 +60,7 @@
|
|||||||
.vxe-table--render-default .vxe-cell--radio:not(.is--disabled):hover .vxe-radio--icon {
|
.vxe-table--render-default .vxe-cell--radio:not(.is--disabled):hover .vxe-radio--icon {
|
||||||
color: var(--el-color-primary-light-5);
|
color: var(--el-color-primary-light-5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// .vxe-table--render-default .is--disabled.vxe-cell--checkbox .vxe-checkbox--icon{
|
||||||
|
// color: #fff0;
|
||||||
|
// }
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<!-- 用户投诉 -->
|
<!-- 用户投诉 -->
|
||||||
<!-- 2 有新增 发起 预警单 -->
|
<!-- 2 有新增 发起 预警单 -->
|
||||||
|
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
||||||
|
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="超标指标">
|
<el-form-item label="超标指标">
|
||||||
<el-select
|
<el-select
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||||
<TableHeader datePicker ref="TableHeaderRef">
|
<TableHeader datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="计划名称">
|
<el-form-item label="计划名称">
|
||||||
<el-input style="width: 200px;" v-model="tableStore.table.params.searchValue" clearable placeholder="请输入计划名称"></el-input>
|
<el-input style="width: 200px;" v-model="tableStore.table.params.searchValue" clearable placeholder="请输入计划名称"></el-input>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
class="form-one"
|
class="form-one"
|
||||||
>
|
>
|
||||||
<el-form-item for="-" label="计划负责单位:">
|
<el-form-item for="-" label="计划负责单位:">
|
||||||
<Area v-model="form.deptId" />
|
<Area v-model="form.deptId" @change="changeArea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="计划名称:" prop="planName">
|
<el-form-item for="-" label="计划名称:" prop="planName">
|
||||||
<el-input v-model="form.planName" placeholder="请输入计划名称"></el-input>
|
<el-input v-model="form.planName" placeholder="请输入计划名称"></el-input>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
>
|
>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="form.substation"
|
v-model="form.substation"
|
||||||
:options="treeList"
|
:options="treeData"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
@@ -180,7 +180,7 @@ const disableStartDate = (time: any) => {
|
|||||||
//结束时间不能小于开始时间
|
//结束时间不能小于开始时间
|
||||||
const disableEndDate = (time: any) => {
|
const disableEndDate = (time: any) => {
|
||||||
if (time && form.value.planStartTime) {
|
if (time && form.value.planStartTime) {
|
||||||
return time.getTime() <= new Date(form.value.planStartTime).getTime()- 8.64e7
|
return time.getTime() <= new Date(form.value.planStartTime).getTime() - 8.64e7
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -230,9 +230,13 @@ const cancelFn = () => {
|
|||||||
planAddition.value = false
|
planAddition.value = false
|
||||||
}
|
}
|
||||||
const treeList = ref()
|
const treeList = ref()
|
||||||
|
const treeData = ref()
|
||||||
const loadData = () => {
|
const loadData = () => {
|
||||||
initDetpStataionTree({ orgId: dictData.state.area[0].id }).then(res => {
|
initDetpStataionTree({ orgId: dictData.state.area[0].id }).then(res => {
|
||||||
treeList.value = res.data
|
treeList.value = res.data
|
||||||
|
setTimeout(() => {
|
||||||
|
changeArea()
|
||||||
|
}, 10)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,6 +255,18 @@ const submitFn = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 修改关联电站
|
||||||
|
const changeArea = () => {
|
||||||
|
let list: any = []
|
||||||
|
treeList.value.forEach((item: any) => {
|
||||||
|
if (item.id == form.value.deptId) {
|
||||||
|
list.push(item)
|
||||||
|
} else {
|
||||||
|
list.push(item.children.filter((v: any) => v.id == form.value.deptId)[0])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
treeData.value = list
|
||||||
|
}
|
||||||
const audit = (filePath: any) => {
|
const audit = (filePath: any) => {
|
||||||
//选择系统变电站
|
//选择系统变电站
|
||||||
const addForm = JSON.parse(JSON.stringify(form.value))
|
const addForm = JSON.parse(JSON.stringify(form.value))
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref='TableHeaderRef'>
|
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label='流程状态'>
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for='item in statusSelect'
|
v-for="item in statusSelect"
|
||||||
:key='item.id'
|
:key="item.id"
|
||||||
:label='item.name'
|
:label="item.name"
|
||||||
:value='item.id'
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增计划</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportFn">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportFn">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref='tableRef' />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<planAdd ref='planAddRef' @onsubmit='tableStore.index()' :openType='openType' />
|
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
@@ -50,212 +50,213 @@ const auditUser = ref('')
|
|||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const openType = ref('create')
|
const openType = ref('create')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 60,
|
width: 60,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'planName',
|
field: 'planName',
|
||||||
title: '计划名称',
|
title: '计划名称',
|
||||||
minWidth: 130
|
minWidth: 130
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvType',
|
field: 'supvType',
|
||||||
title: '监督类型',
|
title: '监督类型',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvObjectName',
|
field: 'supvObjectName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '监督对象名称'
|
title: '监督对象名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'deptName',
|
field: 'deptName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '负责单位'
|
title: '负责单位'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'substation',
|
field: 'substation',
|
||||||
title: '变电站',
|
title: '变电站',
|
||||||
minWidth: 110,
|
minWidth: 110,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{ field: 'planStartTime', minWidth: 130,title: '计划开始时间' },
|
{ field: 'planStartTime', minWidth: 130, title: '计划开始时间' },
|
||||||
{ field: 'planEndTime', minWidth: 130,title: '计划结束时间' },
|
{ field: 'planEndTime', minWidth: 130, title: '计划结束时间' },
|
||||||
{
|
|
||||||
field: 'status',
|
|
||||||
title: '流程状态',
|
|
||||||
render: 'tag',
|
|
||||||
minWidth: 80,
|
|
||||||
custom: {
|
|
||||||
1: 'primary',
|
|
||||||
2: 'success',
|
|
||||||
3: 'danger',
|
|
||||||
4: 'warning'
|
|
||||||
},
|
|
||||||
replaceValue: {
|
|
||||||
1: '审批中',
|
|
||||||
2: '审批通过',
|
|
||||||
3: '审批不通过',
|
|
||||||
4: '已取消'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'createBy',
|
|
||||||
title: '填报人',
|
|
||||||
minWidth: 80,
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
minWidth: '180',
|
|
||||||
fixed:'right',
|
|
||||||
render: 'buttons',
|
|
||||||
buttons: [
|
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
field: 'status',
|
||||||
title: '流程详情',
|
title: '流程状态',
|
||||||
type: 'primary',
|
render: 'tag',
|
||||||
icon: 'el-icon-EditPen',
|
minWidth: 80,
|
||||||
render: 'basicButton',
|
custom: {
|
||||||
click: row => {
|
1: 'primary',
|
||||||
flag.value = true
|
2: 'success',
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
3: 'danger',
|
||||||
}
|
4: 'warning'
|
||||||
|
},
|
||||||
|
replaceValue: {
|
||||||
|
1: '审批中',
|
||||||
|
2: '审批通过',
|
||||||
|
3: '审批不通过',
|
||||||
|
4: '已取消'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
field: 'createBy',
|
||||||
title: '重新发起',
|
title: '填报人',
|
||||||
type: 'warning',
|
minWidth: 80,
|
||||||
icon: 'el-icon-Open',
|
formatter: (row: any) => {
|
||||||
render: 'basicButton',
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
disabled: row => {
|
}
|
||||||
return !(row.createBy == adminInfo.$state.id || row.status == 3 || row.status == 4)
|
|
||||||
},
|
|
||||||
click: row => {
|
|
||||||
// deviceQuitPopup.value.open('重新发起退运', row)
|
|
||||||
planAddRef.value.open('重新发起计划', row.id,false)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
title: '操作',
|
||||||
title: '取消',
|
minWidth: '180',
|
||||||
type: 'danger',
|
fixed: 'right',
|
||||||
icon: 'el-icon-Open',
|
render: 'buttons',
|
||||||
render: 'basicButton',
|
buttons: [
|
||||||
disabled: row => {
|
{
|
||||||
return row.createBy != adminInfo.$state.id || row.status == 3 || row.status == 2 || row.status == 4
|
name: 'productSetting',
|
||||||
},
|
title: '流程详情',
|
||||||
click: row => {
|
type: 'primary',
|
||||||
cancelLeave(row)
|
icon: 'el-icon-EditPen',
|
||||||
}
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
flag.value = true
|
||||||
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '重新发起',
|
||||||
|
type: 'warning',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
// deviceQuitPopup.value.open('重新发起退运', row)
|
||||||
|
planAddRef.value.open('重新发起计划', row.id, false)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'cancel',
|
||||||
|
title: '取消',
|
||||||
|
type: 'danger',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return (row.createBy =
|
||||||
|
adminInfo.$state.id || row.status == 3 || row.status == 2 || row.status == 4)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
cancelLeave(row)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
}
|
}
|
||||||
],
|
|
||||||
beforeSearchFun: () => {
|
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = () => {
|
const add = () => {
|
||||||
// title.value = '普测计划新增'
|
// title.value = '普测计划新增'
|
||||||
planAddRef.value.open('计划新增')
|
planAddRef.value.open('计划新增')
|
||||||
}
|
}
|
||||||
|
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function(column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancel(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
auditUser.value = ''
|
auditUser.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 取消
|
// 取消
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
getUserByRoleType(3).then(res => {
|
getUserByRoleType(3).then(res => {
|
||||||
auditList.value = res.data
|
auditList.value = res.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref='TableHeaderRef'>
|
<TableHeader area datePicker nextFlag ref='TableHeaderRef'>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label='流程状态'>
|
<el-form-item label='流程状态'>
|
||||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||||
@@ -162,7 +162,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id|| row.status == 6 || row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4|| row.status == 6)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planTestRef.value.open('重新发起计划测试', row.id, false)
|
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="用户名称">
|
<el-form-item label="用户名称">
|
||||||
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入用户名称"></el-input>
|
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入用户名称"></el-input>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="用户名称">
|
<el-form-item label="用户名称">
|
||||||
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入用户名称"></el-input>
|
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入用户名称"></el-input>
|
||||||
@@ -165,7 +165,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id || row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<!-- {{ getDeviceStatus(detailData.deviceStatus) }}-->
|
<!-- {{ getDeviceStatus(detailData.deviceStatus) }}-->
|
||||||
<!-- </el-tag>-->
|
<!-- </el-tag>-->
|
||||||
<!-- </el-descriptions-item>-->
|
<!-- </el-descriptions-item>-->
|
||||||
<el-descriptions-item label='变更前前状态'>
|
<el-descriptions-item label='变更前状态'>
|
||||||
<el-tag :type='getDeviceStatusType(detailData.devOriginalStatus)'>
|
<el-tag :type='getDeviceStatusType(detailData.devOriginalStatus)'>
|
||||||
{{ getDeviceStatus(detailData.devOriginalStatus) }}
|
{{ getDeviceStatus(detailData.devOriginalStatus) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|||||||
@@ -1,57 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="450px" top="20vh">
|
||||||
draggable
|
<el-scrollbar>
|
||||||
class='cn-operate-dialog'
|
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||||
v-model='dialogVisible'
|
<el-form-item label="终端" prop="deviceId">
|
||||||
:title='title'
|
<el-tree-select
|
||||||
width='450px'
|
v-model="form.deviceId"
|
||||||
top='20vh'
|
:data="data"
|
||||||
>
|
filterable
|
||||||
<el-scrollbar>
|
style="width: 100%"
|
||||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
@change="changeDevStatus"
|
||||||
<el-form-item label='终端' prop='deviceId'>
|
clearable
|
||||||
<el-tree-select
|
/>
|
||||||
v-model='form.deviceId'
|
</el-form-item>
|
||||||
:data='data'
|
<el-form-item label="终端当前状态:">
|
||||||
filterable
|
<el-select v-model="runFlag" disabled placeholder="请选择终端" clearable class="select">
|
||||||
style='width: 100%'
|
<el-option
|
||||||
@change='changeDevStatus'
|
v-for="item in devStatusList"
|
||||||
clearable
|
:key="item.value"
|
||||||
/>
|
:label="item.name"
|
||||||
</el-form-item>
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="变更状态:" prop="devStatus">
|
||||||
|
<el-select v-model="form.devStatus" placeholder="请选择终端状态" clearable class="select">
|
||||||
|
<el-option
|
||||||
|
v-for="item in devStatuData"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label='状态选择:' prop='devStatus'>
|
<el-form-item label="变更原因" prop="propertyNo">
|
||||||
<el-select v-model='form.devStatus' placeholder='请选择终端状态' clearable class='select'>
|
<el-input
|
||||||
<el-option
|
type="textarea"
|
||||||
v-for='item in devStatusList'
|
clearable
|
||||||
:key='item.value'
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
:label='item.name'
|
placeholder="请输入变更原因"
|
||||||
:value='item.value'
|
v-model="form.propertyNo"
|
||||||
></el-option>
|
></el-input>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-form>
|
||||||
|
</el-scrollbar>
|
||||||
|
|
||||||
<el-form-item label='变更原因' prop='propertyNo'>
|
<template #footer>
|
||||||
<el-input
|
<span class="dialog-footer">
|
||||||
type='textarea'
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
clearable
|
<el-button type="primary" @click="submit">确认</el-button>
|
||||||
:autosize='{ minRows: 2, maxRows: 4 }'
|
|
||||||
placeholder='请输入变更原因'
|
|
||||||
v-model='form.propertyNo'
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-scrollbar>
|
|
||||||
|
|
||||||
<template #footer>
|
|
||||||
<span class='dialog-footer'>
|
|
||||||
<el-button @click='dialogVisible = false'>取消</el-button>
|
|
||||||
<el-button type='primary' @click='submit'>确认</el-button>
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang='ts' setup>
|
<script lang="ts" setup>
|
||||||
import { ref, inject } from 'vue'
|
import { ref, inject } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||||
@@ -60,9 +62,9 @@ import { addRunningDevice, quitRunningDeviceUpdate } from '@/api/supervision-boo
|
|||||||
import { getDeviceDetailData } from '@/api/device-boot/line'
|
import { getDeviceDetailData } from '@/api/device-boot/line'
|
||||||
import { defaultProps } from '@/utils/tree'
|
import { defaultProps } from '@/utils/tree'
|
||||||
const devStatusList = ref([
|
const devStatusList = ref([
|
||||||
{ 'name': '运行', 'value': '0' },
|
{ name: '运行', value: '0' },
|
||||||
{ 'name': '检修', 'value': '1' },
|
{ name: '检修', value: '1' },
|
||||||
{ 'name': '退运', 'value': '4' }
|
{ name: '退运', value: '4' }
|
||||||
])
|
])
|
||||||
//下拉数据源
|
//下拉数据源
|
||||||
const sourceData = ref()
|
const sourceData = ref()
|
||||||
@@ -71,89 +73,93 @@ const data = ref()
|
|||||||
const title = ref('')
|
const title = ref('')
|
||||||
const tableStore = inject('tableStore') as TableStore
|
const tableStore = inject('tableStore') as TableStore
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
|
const devStatuData: any = ref([])
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
|
const runFlag = ref('')
|
||||||
// 注意不要和表单ref的命名冲突
|
// 注意不要和表单ref的命名冲突
|
||||||
const form = ref({
|
const form = ref({
|
||||||
id: '',
|
id: '',
|
||||||
deviceId: '',
|
deviceId: '',
|
||||||
deviceType: '1',
|
deviceType: '1',
|
||||||
devOriginalStatus: '0',
|
devOriginalStatus: '0',
|
||||||
devStatus: '0',
|
devStatus: '',
|
||||||
propertyNo: ''
|
propertyNo: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
//form表单校验规则
|
//form表单校验规则
|
||||||
const rules = {
|
const rules = {
|
||||||
deviceId: [{ required: true, message: '终端不能为空', trigger: 'change' }],
|
deviceId: [{ required: true, message: '终端不能为空', trigger: 'change' }],
|
||||||
devStatus: [{ required: true, message: '状态不能为空', trigger: 'change' }],
|
devStatus: [{ required: true, message: '请选择状态', trigger: 'change' }],
|
||||||
propertyNo: [{ required: true, message: '请输入退役原因', trigger: 'blur' }]
|
propertyNo: [{ required: true, message: '请输入退役原因', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
formRef.value.resetFields()
|
formRef.value.resetFields()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = async (text: string, tempData?: any) => {
|
const open = async (text: string, tempData?: any) => {
|
||||||
title.value = text
|
title.value = text
|
||||||
//终端
|
//终端
|
||||||
await getTerminalSelectTree(4).then(res => {
|
await getTerminalSelectTree(4).then(res => {
|
||||||
deviceList.value = res.data
|
deviceList.value = res.data
|
||||||
})
|
})
|
||||||
sourceData.value = deviceList.value
|
sourceData.value = deviceList.value
|
||||||
data.value = deviceList.value
|
data.value = deviceList.value
|
||||||
if (tempData) {
|
if (tempData) {
|
||||||
// 表单赋值
|
// 表单赋值
|
||||||
for (let key in form.value) {
|
for (let key in form.value) {
|
||||||
form.value[key] = tempData[key]
|
form.value[key] = tempData[key]
|
||||||
}
|
}
|
||||||
form.value.deviceType = form.value.deviceType + ''
|
form.value.deviceType = form.value.deviceType + ''
|
||||||
} else {
|
changeDevStatus(form.value.deviceId, true)
|
||||||
resetForm()
|
form.value.devStatus = form.value.devStatus + ''
|
||||||
// 在此处恢复默认表单
|
} else {
|
||||||
for (let key in form.value) {
|
resetForm()
|
||||||
form.value[key] = ''
|
// 在此处恢复默认表单
|
||||||
|
for (let key in form.value) {
|
||||||
|
form.value[key] = ''
|
||||||
|
}
|
||||||
|
runFlag.value = ''
|
||||||
|
form.value.deviceType = '1'
|
||||||
}
|
}
|
||||||
form.value.deviceType = '1'
|
form.value.deviceType = '1'
|
||||||
}
|
|
||||||
form.value.deviceType = '1'
|
// changeType(form.value.deviceType)
|
||||||
form.value.devStatus = '0'
|
dialogVisible.value = true
|
||||||
// changeType(form.value.deviceType)
|
|
||||||
dialogVisible.value = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交用户表单数据
|
* 提交用户表单数据
|
||||||
*/
|
*/
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
formRef.value.validate(async (valid: any) => {
|
formRef.value.validate(async (valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (form.value.devOriginalStatus == form.value.devStatus) {
|
if (form.value.devOriginalStatus == form.value.devStatus) {
|
||||||
if (form.value.devOriginalStatus == '0') {
|
if (form.value.devOriginalStatus == '0') {
|
||||||
ElMessage.warning('终端当前状态就是运行,无需变更!')
|
ElMessage.warning('终端当前状态就是运行,无需变更!')
|
||||||
} else if (form.value.devOriginalStatus == '1') {
|
} else if (form.value.devOriginalStatus == '1') {
|
||||||
ElMessage.warning('终端当前状态就是检修,无需变更!')
|
ElMessage.warning('终端当前状态就是检修,无需变更!')
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (form.value.id) {
|
||||||
|
await quitRunningDeviceUpdate(form.value)
|
||||||
|
ElMessage.success('重新发起成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
} else {
|
||||||
|
await addRunningDevice(form.value)
|
||||||
|
//查询进线数据,避免一直处于loading状态
|
||||||
|
ElMessage.success('申请成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
if (form.value.id) {
|
|
||||||
await quitRunningDeviceUpdate(form.value)
|
|
||||||
ElMessage.success('重新发起成功')
|
|
||||||
tableStore.index()
|
|
||||||
dialogVisible.value = false
|
|
||||||
} else {
|
|
||||||
await addRunningDevice(form.value)
|
|
||||||
//查询进线数据,避免一直处于loading状态
|
|
||||||
ElMessage.success('申请成功')
|
|
||||||
tableStore.index()
|
|
||||||
dialogVisible.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,16 +167,18 @@ const submit = () => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const changeType = (event: any) => {
|
const changeType = (event: any) => {
|
||||||
sourceData.value = deviceList.value
|
sourceData.value = deviceList.value
|
||||||
form.value.deviceId = ''
|
form.value.deviceId = ''
|
||||||
data.value = sourceData.value
|
data.value = sourceData.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeDevStatus = async (event: any) => {
|
const changeDevStatus = async (event: any, flag?: boolean) => {
|
||||||
await getDeviceDetailData(event).then(res => {
|
await getDeviceDetailData(event).then(res => {
|
||||||
//给当前终端赋值初始运行状态
|
//给当前终端赋值初始运行状态
|
||||||
form.value.devOriginalStatus = res.data.runFlag
|
runFlag.value = res.data.runFlag + ''
|
||||||
})
|
if (!flag) form.value.devStatus = ''
|
||||||
|
devStatuData.value = devStatusList.value.filter(item => item.value != res.data.runFlag)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
@@ -178,14 +186,13 @@ defineExpose({ open })
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.el-upload-list__item {
|
.el-upload-list__item {
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-select {
|
.el-select {
|
||||||
min-width: 180px;
|
min-width: 180px;
|
||||||
}
|
}
|
||||||
::v-deep .el-tree-node__children>div{
|
::v-deep .el-tree-node__children > div {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<el-tab-pane label='终端状态管理' name='0'>
|
<el-tab-pane label='终端状态管理' name='0'>
|
||||||
<terminal v-if="activeName == '0'" />
|
<terminal v-if="activeName == '0'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='监测点退运' name='1'>
|
<el-tab-pane label='监测点状态管理' name='1'>
|
||||||
<monitor v-if="activeName == '1'" />
|
<monitor v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--待办事项列表-->
|
<!--待办事项列表-->
|
||||||
<template>
|
<template>
|
||||||
<div >
|
<div >
|
||||||
<TableHeader date-picker>
|
<TableHeader date-picker nextFlag>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
@@ -133,10 +133,10 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('重新发起退运', row)
|
deviceQuitPopup.value.open('重新发起', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -171,7 +171,7 @@ provide('tableStore', tableStore)
|
|||||||
|
|
||||||
//新增退运终端信息
|
//新增退运终端信息
|
||||||
const add = () => {
|
const add = () => {
|
||||||
deviceQuitPopup.value.open('监测点退运')
|
deviceQuitPopup.value.open('新增监测点状态变更')
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 流程实例详情 */
|
/** 流程实例详情 */
|
||||||
|
|||||||
@@ -19,7 +19,26 @@
|
|||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="监测点当前状态:">
|
||||||
|
<el-select v-model="runFlag" disabled placeholder="请选择监测点" clearable class="select">
|
||||||
|
<el-option
|
||||||
|
v-for="item in runFlagData"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="变更状态:" prop="devStatus">
|
||||||
|
<el-select v-model="form.devStatus" placeholder="请选择监测点变更状态" clearable class="select">
|
||||||
|
<el-option
|
||||||
|
v-for="item in runFlagList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="退运原因" prop="propertyNo">
|
<el-form-item label="退运原因" prop="propertyNo">
|
||||||
<!-- <el-input
|
<!-- <el-input
|
||||||
v-model='form.propertyNo'
|
v-model='form.propertyNo'
|
||||||
@@ -60,7 +79,9 @@ const data = ref()
|
|||||||
const title = ref('')
|
const title = ref('')
|
||||||
const tableStore = inject('tableStore') as TableStore
|
const tableStore = inject('tableStore') as TableStore
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
|
const runFlag = ref('')
|
||||||
|
|
||||||
|
const runFlagData: any = ref([])
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
// 注意不要和表单ref的命名冲突
|
// 注意不要和表单ref的命名冲突
|
||||||
const form = ref({
|
const form = ref({
|
||||||
@@ -68,13 +89,22 @@ const form = ref({
|
|||||||
deviceId: '',
|
deviceId: '',
|
||||||
deviceType: '2',
|
deviceType: '2',
|
||||||
devOriginalStatus: '0',
|
devOriginalStatus: '0',
|
||||||
|
devStatus: '',
|
||||||
propertyNo: ''
|
propertyNo: ''
|
||||||
})
|
})
|
||||||
|
const runFlagList = [
|
||||||
|
{ id: 0, name: '投运' },
|
||||||
|
{ id: 1, name: '检修' },
|
||||||
|
{ id: 2, name: '停运' },
|
||||||
|
{ id: 3, name: '调试' },
|
||||||
|
{ id: 4, name: '退运' }
|
||||||
|
]
|
||||||
|
|
||||||
//form表单校验规则
|
//form表单校验规则
|
||||||
const rules = {
|
const rules = {
|
||||||
deviceId: [{ required: true, message: '终端不能为空', trigger: 'change' }],
|
deviceId: [{ required: true, message: '终端不能为空', trigger: 'change' }],
|
||||||
propertyNo: [{ required: true, message: '请输入退役原因', trigger: 'blur' }]
|
propertyNo: [{ required: true, message: '请输入退役原因', trigger: 'blur' }],
|
||||||
|
devStatus: [{ required: true, message: '亲选择变更状态', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
@@ -97,6 +127,8 @@ const open = async (text: string, tempData?: any) => {
|
|||||||
form.value[key] = tempData[key]
|
form.value[key] = tempData[key]
|
||||||
}
|
}
|
||||||
form.value.deviceType = form.value.deviceType + ''
|
form.value.deviceType = form.value.deviceType + ''
|
||||||
|
changeDevStatus(form.value.deviceId, true)
|
||||||
|
form.value.devStatus = form.value.devStatus
|
||||||
} else {
|
} else {
|
||||||
resetForm()
|
resetForm()
|
||||||
// 在此处恢复默认表单
|
// 在此处恢复默认表单
|
||||||
@@ -104,6 +136,7 @@ const open = async (text: string, tempData?: any) => {
|
|||||||
form.value[key] = ''
|
form.value[key] = ''
|
||||||
}
|
}
|
||||||
form.value.deviceType = '1'
|
form.value.deviceType = '1'
|
||||||
|
runFlag.value = ''
|
||||||
}
|
}
|
||||||
form.value.deviceType = '2'
|
form.value.deviceType = '2'
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
@@ -144,26 +177,30 @@ const changeType = (event: any) => {
|
|||||||
form.value.deviceId = ''
|
form.value.deviceId = ''
|
||||||
data.value = sourceData.value
|
data.value = sourceData.value
|
||||||
}
|
}
|
||||||
const changeDevStatus = async (event: any) => {
|
const changeDevStatus = async (event: any, flag?: any) => {
|
||||||
await getLineDetailData(event).then(res => {
|
await getLineDetailData(event).then(res => {
|
||||||
//给当前终端赋值初始运行状态
|
//给当前终端赋值初始投运状态
|
||||||
switch (res.data.runFlag) {
|
// switch (res.data.runFlag) {
|
||||||
case '投运':
|
|
||||||
form.value.devOriginalStatus = '0'
|
// case '投运':
|
||||||
break
|
// form.value.devOriginalStatus = '0'
|
||||||
case '检修':
|
// break
|
||||||
form.value.devOriginalStatus = '1'
|
// case '检修':
|
||||||
break
|
// form.value.devOriginalStatus = '1'
|
||||||
case '停运':
|
// break
|
||||||
form.value.devOriginalStatus = '2'
|
// case '停运':
|
||||||
break
|
// form.value.devOriginalStatus = '2'
|
||||||
case '调试':
|
// break
|
||||||
form.value.devOriginalStatus = '3'
|
// case '调试':
|
||||||
break
|
// form.value.devOriginalStatus = '3'
|
||||||
default:
|
// break
|
||||||
form.value.devOriginalStatus = '4'
|
// default:
|
||||||
break
|
// form.value.devOriginalStatus = '4'
|
||||||
}
|
// break
|
||||||
|
// }
|
||||||
|
runFlag.value = res.data.runFlag
|
||||||
|
if (!flag) form.value.devStatus = ''
|
||||||
|
runFlagData.value = runFlagList.filter(item => item.name != res.data.runFlag)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--待办事项列表-->
|
<!--待办事项列表-->
|
||||||
<template>
|
<template>
|
||||||
<div >
|
<div >
|
||||||
<TableHeader date-picker>
|
<TableHeader date-picker nextFlag>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
@@ -157,7 +157,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('重新发起终端状态变更', row)
|
deviceQuitPopup.value.open('重新发起终端状态变更', row)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader datePicker ref="TableHeaderRef">
|
<TableHeader datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
@@ -162,7 +162,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// deviceQuitPopup.value.open('重新发起', row)
|
// deviceQuitPopup.value.open('重新发起', row)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader datePicker ref='TableHeaderRef'>
|
<TableHeader datePicker nextFlag ref='TableHeaderRef'>
|
||||||
<!-- <template #operation>-->
|
<!-- <template #operation>-->
|
||||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>-->
|
<!-- <el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>-->
|
||||||
<!-- <el-button icon="el-icon-Delete" type="primary">删除</el-button>-->
|
<!-- <el-button icon="el-icon-Delete" type="primary">删除</el-button>-->
|
||||||
@@ -139,7 +139,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// deviceQuitPopup.value.open('重新发起', row)
|
// deviceQuitPopup.value.open('重新发起', row)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
FormRef.value.open('重新发起', row)
|
FormRef.value.open('重新发起', row)
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
debugForms.value.open('重新发起', row)
|
debugForms.value.open('重新发起', row)
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id || row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.createBy == adminInfo.$state.id || row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!---试运行列表-->
|
<!---试运行列表-->
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
@@ -201,13 +201,13 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
|||||||
let monitorIds: any = []
|
let monitorIds: any = []
|
||||||
|
|
||||||
const startRunTest = () => {
|
const startRunTest = () => {
|
||||||
|
monitorIds = []
|
||||||
let flag = true
|
let flag = true
|
||||||
if (tableStore.table.selection.length === 0) {
|
if (tableStore.table.selection.length === 0) {
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
message: '请至少选择一个监测点进行试运行',
|
message: '请至少选择一个监测点进行试运行',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tableStore.table.selection.forEach(item => {
|
tableStore.table.selection.forEach(item => {
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
type="password"
|
type="password"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
show-password
|
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<Icon name="local-password" style="color: var(--el-color-primary); font-size: 16px" />
|
<Icon name="local-password" style="color: var(--el-color-primary); font-size: 16px" />
|
||||||
@@ -128,6 +127,8 @@ onBeforeUnmount(() => {
|
|||||||
pageBubble.removeListeners()
|
pageBubble.removeListeners()
|
||||||
})
|
})
|
||||||
getTheme().then(res => {
|
getTheme().then(res => {
|
||||||
|
document.title = res.data.name || '电能质量在线监测系统'
|
||||||
|
|
||||||
let list: any = [
|
let list: any = [
|
||||||
'elementUiPrimary',
|
'elementUiPrimary',
|
||||||
'tableHeaderBackground',
|
'tableHeaderBackground',
|
||||||
@@ -144,7 +145,6 @@ getTheme().then(res => {
|
|||||||
getThemeList.value = res.data
|
getThemeList.value = res.data
|
||||||
window.localStorage.setItem('getTheme', JSON.stringify(res.data))
|
window.localStorage.setItem('getTheme', JSON.stringify(res.data))
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
|
||||||
configStore.setLayout(list[i], JSON.parse(res.data[list[i]]))
|
configStore.setLayout(list[i], JSON.parse(res.data[list[i]]))
|
||||||
}
|
}
|
||||||
configStore.setLayout('elementUiPrimary', JSON.parse(res.data['elementUiPrimary']))
|
configStore.setLayout('elementUiPrimary', JSON.parse(res.data['elementUiPrimary']))
|
||||||
|
|||||||
Reference in New Issue
Block a user