流程分类的增删改查
This commit is contained in:
@@ -8,6 +8,7 @@ export function addNode(data: any) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//修改前置机
|
||||
export function updateNode(data: any) {
|
||||
return createAxios({
|
||||
@@ -16,6 +17,7 @@ export function updateNode(data: any) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//删除前置机
|
||||
export function delNode(data: any) {
|
||||
return createAxios({
|
||||
@@ -24,6 +26,7 @@ export function delNode(data: any) {
|
||||
params: { id: data }
|
||||
})
|
||||
}
|
||||
|
||||
//终端台账树
|
||||
export function getTerminalTree() {
|
||||
return createAxios({
|
||||
@@ -31,6 +34,19 @@ export function getTerminalTree() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 总计出3层,提供给表单选择具体的终端、母线、监测点
|
||||
* 终端台账树
|
||||
* 等级:0-项目名称;1- 工程名称;2-单位;3-部门;4-终端;5-母线;6-监测点
|
||||
*/
|
||||
export function getTerminalSelectTree(level: number) {
|
||||
return createAxios({
|
||||
url: '/device-boot/terminalTree/getTerminalSelectTree?level=' + level,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//查询节点内容
|
||||
export function queryTerminal(data: any) {
|
||||
return createAxios({
|
||||
@@ -39,6 +55,7 @@ export function queryTerminal(data: any) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//删除设备
|
||||
export function delTerminal(data: any) {
|
||||
return createAxios({
|
||||
@@ -47,6 +64,7 @@ export function delTerminal(data: any) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//获取前置机
|
||||
export function nodeAllList() {
|
||||
return createAxios({
|
||||
@@ -54,32 +72,35 @@ export function nodeAllList() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//修改数据
|
||||
export function updateTerminal(query:any) {
|
||||
export function updateTerminal(query: any) {
|
||||
return createAxios({
|
||||
url: `/device-boot/device/updateTerminal`,
|
||||
method: 'put',
|
||||
data: {
|
||||
...query,
|
||||
...query
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//提交数据
|
||||
export function addTerminal(query:any) {
|
||||
export function addTerminal(query: any) {
|
||||
return createAxios({
|
||||
url: '/device-boot/device/addTerminal',
|
||||
method: 'post',
|
||||
data: {
|
||||
...query,
|
||||
...query
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//查询终端程序版本升级日志
|
||||
export function getTerminalUpLog(data:any) {
|
||||
export function getTerminalUpLog(data: any) {
|
||||
return createAxios({
|
||||
url: '/device-boot/version/getTerminalUpLog',
|
||||
method: 'post',
|
||||
params: data,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ const attributeFormRef = ref()
|
||||
const bpmnInstances = () => (window as any)?.bpmnInstances
|
||||
|
||||
const resetAttributesList = () => {
|
||||
console.log(window, 'windowwindowwindowwindowwindowwindowwindow')
|
||||
// console.log(window, 'windowwindowwindowwindowwindowwindowwindow')
|
||||
bpmnElement.value = bpmnInstances().bpmnElement
|
||||
otherExtensionList.value = [] // 其他扩展配置
|
||||
bpmnElementProperties.value =
|
||||
@@ -105,7 +105,7 @@ const openAttributesForm = (attr, index) => {
|
||||
})
|
||||
}
|
||||
const removeAttributes = (attr, index) => {
|
||||
console.log(attr, 'attr')
|
||||
// console.log(attr, 'attr')
|
||||
ElMessageBox.confirm('确认移除该属性吗?', '提示', {
|
||||
confirmButtonText: '确 认',
|
||||
cancelButtonText: '取 消'
|
||||
@@ -123,7 +123,7 @@ const removeAttributes = (attr, index) => {
|
||||
.catch(() => console.info('操作取消'))
|
||||
}
|
||||
const saveAttribute = () => {
|
||||
console.log(propertyForm.value, 'propertyForm.value')
|
||||
// console.log(propertyForm.value, 'propertyForm.value')
|
||||
const { name, value } = propertyForm.value
|
||||
if (editingPropertyIndex.value !== -1) {
|
||||
bpmnInstances().modeling.updateModdleProperties(
|
||||
|
||||
@@ -3,33 +3,34 @@
|
||||
<el-form-item label="区域:">
|
||||
<Area ref="areaRef" v-model="addData.orgNo" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备编号:" prop="assetNumber">
|
||||
<el-input v-model="addData.assetNumber" clearable placeholder="请输入关键字"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="资产编号:" prop="devNumber">
|
||||
<el-input v-model="addData.devNumber" clearable placeholder="请输入关键字"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="item" label="报告:" style="margin-top: 10px" prop="fileList">
|
||||
<el-upload
|
||||
v-model:file-list="addData.fileList"
|
||||
ref="upload"
|
||||
action=""
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="资产编号:" prop="devNumber">-->
|
||||
<!-- <el-input v-model="addData.devNumber" clearable placeholder="请输入关键字"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item class="item" label="报告:" style="margin-top: 10px" prop="fileList">-->
|
||||
<!-- <el-upload-->
|
||||
<!-- v-model:file-list="addData.fileList"-->
|
||||
<!-- ref="upload"-->
|
||||
<!-- action=""-->
|
||||
<!-- :limit="1"-->
|
||||
<!-- :on-exceed="handleExceed"-->
|
||||
<!-- :auto-upload="false"-->
|
||||
<!-- >-->
|
||||
<!-- <template #trigger>-->
|
||||
<!-- <el-button type="primary">上传文件</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-upload>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="选择审核人:" prop="checker">
|
||||
<el-select v-model="addData.checker" clearable placeholder="请选择审核人">
|
||||
<el-option v-for="item in auditList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="选择审核人:" prop="checker">-->
|
||||
<!-- <el-select v-model="addData.checker" clearable placeholder="请选择审核人">-->
|
||||
<!-- <el-option v-for="item in auditList" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -83,7 +84,6 @@ const config = () => {
|
||||
addData.value.checkerName = auditList.value.find((item: any) => item.id == addData.value.checker).name
|
||||
addFlow(addData.value).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
|
||||
cancel()
|
||||
})
|
||||
} else if (title.value == '编辑设备退役申请单') {
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
<!-- 新增编辑 -->
|
||||
<el-dialog draggable :title="title" v-model="userAdd" width="500px">
|
||||
<Equipment ref="EquipmentRef" @onSubmit="onSubmit" />
|
||||
<div style="display: flex; justify-content: center; margin-top: 30px">
|
||||
<el-button type="primary" class="ml20" @click="EquipmentRef.config()">保存</el-button>
|
||||
|
||||
<el-button class="ml20" @click="userAdd = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
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 userAdd = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const EquipmentRef = ref()
|
||||
const title: any = ref('')
|
||||
|
||||
defineOptions({
|
||||
name: '/Processsupervision/retire'
|
||||
})
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/process-boot/rFlowProcess/getFlowProcess',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox' },
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'applyForm',
|
||||
title: '设备编号',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue.assetNumber
|
||||
}
|
||||
},
|
||||
{
|
||||
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: '200',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return !(row.processStatus == 1 || row.processStatus == 3)
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
userAdd.value = true
|
||||
title.value = '编辑设备退役申请单'
|
||||
nextTick(() => {
|
||||
EquipmentRef.value.open('编辑设备退役申请单', row)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '提交审核',
|
||||
disabled: row => {
|
||||
return !(row.processStatus == 1 || row.processStatus == 3)
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
title: '是否提交审核?'
|
||||
},
|
||||
click: row => {
|
||||
createCheckflow({ id: row.id }).then(() => {
|
||||
ElMessage.success('提交成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载文件',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
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: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除?'
|
||||
},
|
||||
|
||||
click: row => {
|
||||
deleteIssues(row.powerQualityProblemNo).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.pageType = '1'
|
||||
tableStore.table.params.type = 5
|
||||
tableStore.table.params.applyType = 4
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.problemName = ''
|
||||
tableStore.table.params.problemSources = ''
|
||||
tableStore.table.params.reportProcess = ''
|
||||
tableStore.table.params.reportProcessStatus = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
TableHeaderRef.value.setDatePicker([
|
||||
{ label: '年', value: 1 },
|
||||
{ label: '季', value: 2 },
|
||||
{ label: '月', value: 3 }
|
||||
])
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
userAdd.value = true
|
||||
title.value = '新增设备退役申请单'
|
||||
nextTick(() => {
|
||||
EquipmentRef.value.open('新增设备退役申请单')
|
||||
})
|
||||
}
|
||||
// 关闭
|
||||
const onSubmit = () => {
|
||||
tableStore.index()
|
||||
userAdd.value = false
|
||||
}
|
||||
</script>
|
||||
7
src/views/pqs/supervise/retire/detail.vue
Normal file
7
src/views/pqs/supervise/retire/detail.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<!--工作流view的路径:/pqs/supervise/retire/detail-->
|
||||
<h1>详细信息回显</h1>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
|
||||
</script>
|
||||
228
src/views/pqs/supervise/retire/deviceQuitPopup.vue
Normal file
228
src/views/pqs/supervise/retire/deviceQuitPopup.vue
Normal file
@@ -0,0 +1,228 @@
|
||||
<template>
|
||||
<el-dialog draggable class='cn-operate-dialog' v-model='dialogVisible' :title='title'
|
||||
style='max-width: 450px;height: 320px' top="30vh">
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='formData' label-width='120px' :rules='rules' ref='formRef'>
|
||||
|
||||
<el-form-item label='设备类型' prop='deviceType'>
|
||||
<el-radio-group v-model='formData.deviceType'>
|
||||
<el-radio border label='1'>设备</el-radio>
|
||||
<el-radio border label='2'>监测点</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='设备' prop='deviceId'>
|
||||
<!-- <el-select-->
|
||||
<!-- v-model='formData.deviceId'-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder='请选择设备'-->
|
||||
<!-- style='width: 100%'-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for='category in categoryList'-->
|
||||
<!-- :key='category.id'-->
|
||||
<!-- :label='category.name'-->
|
||||
<!-- :value='category.id'-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<el-tree-select
|
||||
v-model="value"
|
||||
:data="data"
|
||||
filterable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='资产编号'>
|
||||
<el-input
|
||||
v-model='formData.propertyNo'
|
||||
clearable
|
||||
placeholder='请输入资产编号'
|
||||
/>
|
||||
</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>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { ref, inject, reactive, nextTick } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||
import { getFormSimpleList } from '@/api/bpm-boot/form'
|
||||
import { getCategorySimpleList } from '@/api/bpm-boot/category'
|
||||
import { addModel, updateModel } from '@/api/bpm-boot/model'
|
||||
import { getTerminalSelectTree } from '@/api/device-boot/Business'
|
||||
|
||||
|
||||
const value = ref()
|
||||
|
||||
const sourceData = [
|
||||
{
|
||||
value: '1',
|
||||
label: 'Level one 1',
|
||||
children: [
|
||||
{
|
||||
value: '1-1',
|
||||
label: 'Level two 1-1',
|
||||
children: [
|
||||
{
|
||||
value: '1-1-1',
|
||||
label: 'Level three 1-1-1',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: 'Level one 2',
|
||||
children: [
|
||||
{
|
||||
value: '2-1',
|
||||
label: 'Level two 2-1',
|
||||
children: [
|
||||
{
|
||||
value: '2-1-1',
|
||||
label: 'Level three 2-1-1',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: '2-2',
|
||||
label: 'Level two 2-2',
|
||||
children: [
|
||||
{
|
||||
value: '2-2-1',
|
||||
label: 'Level three 2-2-1',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: 'Level one 3',
|
||||
children: [
|
||||
{
|
||||
value: '3-1',
|
||||
label: 'Level two 3-1',
|
||||
children: [
|
||||
{
|
||||
value: '3-1-1',
|
||||
label: 'Level three 3-1-1',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: '3-2',
|
||||
label: 'Level two 3-2',
|
||||
children: [
|
||||
{
|
||||
value: '3-2-1',
|
||||
label: 'Level three 3-2-1',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
const data = ref(sourceData)
|
||||
const filterMethod = (value) => {
|
||||
data.value = [...sourceData].filter((item) => item.label.includes(value))
|
||||
}
|
||||
const filterNodeMethod = (value, data) => data.label.includes(value)
|
||||
|
||||
const title = ref('')
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
deviceId: '',
|
||||
deviceType: '',
|
||||
propertyNo: '',
|
||||
})
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
deviceId: [{ required: true, message: '设备不能为空', trigger: 'change' }],
|
||||
deviceType: [{ required: true, message: '设备类型不能为空', trigger: 'change' }]
|
||||
}
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
const open = async (text: string, data?: any) => {
|
||||
title.value = text
|
||||
//终端
|
||||
await getTerminalSelectTree(4)
|
||||
//监测点
|
||||
await getTerminalSelectTree(6)
|
||||
|
||||
if (data) {
|
||||
// 表单赋值
|
||||
for (let key in formData) {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
} else {
|
||||
resetForm()
|
||||
// 在此处恢复默认表单
|
||||
for (let key in formData) {
|
||||
formData[key] = ''
|
||||
}
|
||||
formData.deviceType = '1'
|
||||
}
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
if (formData.id) {
|
||||
await updateModel(formData)
|
||||
ElMessage.success('更新成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
} else {
|
||||
await addModel(formData).then(res => {
|
||||
formData.id = res.data
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('保存成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-upload-list__item {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 180px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,35 +1,115 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
<el-tab-pane label="退役管理" name="1">
|
||||
<retire v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="退役审核" name="2">
|
||||
<!-- <planAudits v-if="activeName == '2'" /> -->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class='default-main'>
|
||||
<TableHeader date-picker>
|
||||
<template v-slot:select>
|
||||
<!-- <el-form-item label='任务名称'>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model='tableStore.table.params.searchValue'-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder='请输入任务名称'-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<!--弹框-->
|
||||
<device-quit-popup ref='deviceQuitPopup' />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref, provide } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import retire from './components/retire.vue'
|
||||
<script setup lang='ts'>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { nextTick, onMounted, provide, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { dateFormatter, formatPast2 } from '@/utils/formatTime'
|
||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'Processsupervision/harmonicmanagement'
|
||||
name: 'businessUser'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
const { push } = useRouter()
|
||||
const deviceQuitPopup = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/task/doneList',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ title: '流程名称', field: 'processInstance.name', minWidth: 130 },
|
||||
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 130 },
|
||||
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 130 },
|
||||
{ title: '当前任务', field: 'name', minWidth: 130 },
|
||||
{ title: '发起时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '结束时间', field: 'endTime', minWidth: 170 },
|
||||
{
|
||||
title: '审批状态', field: 'status', minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ title: '审批建议', field: 'reason', minWidth: 150 },
|
||||
{ title: '耗时(s)', field: 'durationInMillis', minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return formatPast2(obj.row.durationInMillis)
|
||||
} },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程历史',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
// handleAudit(row.processInstance.id)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
//新增退运设备信息
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增退运')
|
||||
}
|
||||
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
112
src/views/system/bpm/category/categoryPopup.vue
Normal file
112
src/views/system/bpm/category/categoryPopup.vue
Normal file
@@ -0,0 +1,112 @@
|
||||
<!--模型分类的新增编辑弹出框-->
|
||||
<template>
|
||||
<el-dialog
|
||||
draggable
|
||||
class='cn-operate-dialog'
|
||||
v-model='machineVisible'
|
||||
:title='title'
|
||||
style='width: 415px; height: 350px'
|
||||
top='30vh'
|
||||
>
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
||||
<el-form-item label='分类名称' prop='name'>
|
||||
<el-input v-model='form.name' placeholder='请输入分类名' clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label='分类标识' prop='code'>
|
||||
<el-input v-model='form.code' placeholder='请输入分类标识' clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label='分类描述' prop='description'>
|
||||
<el-input v-model='form.description' placeholder='请输入分类描述' clearable type='textarea'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class='dialog-footer'>
|
||||
<el-button @click='machineVisible = false'>取消</el-button>
|
||||
<el-button type='primary' @click='submit'>确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { ref, reactive, inject } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { addCategory, updateCategory } from '@/api/bpm-boot/category'
|
||||
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const machineVisible = ref(false)
|
||||
const title = ref('')
|
||||
const formRef = ref()
|
||||
const regex = /^[+]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/
|
||||
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive({
|
||||
id: '',
|
||||
name: '',
|
||||
code: '',
|
||||
description: ''
|
||||
})
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
name: [{ required: true, message: '分类名不能为空', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '分类标识不能为空', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const open = (text: string, data?: any) => {
|
||||
title.value = text
|
||||
if (data) {
|
||||
// 表单赋值
|
||||
for (let key in form) {
|
||||
form[key] = data[key]
|
||||
}
|
||||
} else {
|
||||
resetForm()
|
||||
// 在此处恢复默认表单
|
||||
for (let key in form) {
|
||||
form[key] = ''
|
||||
}
|
||||
}
|
||||
machineVisible.value = true
|
||||
}
|
||||
|
||||
//重置表单内容
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
await updateCategory(form)
|
||||
} else {
|
||||
await addCategory(form)
|
||||
}
|
||||
ElMessage.success('保存成功')
|
||||
tableStore.index()
|
||||
machineVisible.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-upload-list__item {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 180px;
|
||||
}
|
||||
</style>
|
||||
113
src/views/system/bpm/category/index.vue
Normal file
113
src/views/system/bpm/category/index.vue
Normal file
@@ -0,0 +1,113 @@
|
||||
<!--流程分类页面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='流程分类'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
clearable
|
||||
placeholder='请输入分类名称'
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' class='ml10' @click='add' :icon='Plus'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<!--弹出框-->
|
||||
<category-popup ref='categoryPopup' />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { deleteSgMachine } from '@/api/advance-boot/sgGroven/sgMachine'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import CategoryPopup from '@/views/system/bpm/category/categoryPopup.vue'
|
||||
import { deleteCategory } from '@/api/bpm-boot/category'
|
||||
|
||||
defineOptions({
|
||||
name: 'bpmCategory'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
const categoryPopup = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/category/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ title: '分类名称', field: 'name', minWidth: 130 },
|
||||
{ title: '分类标识', field: 'code', minWidth: 130 },
|
||||
{ title: '分类描述', field: 'description', minWidth: 170 },
|
||||
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'update',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
categoryPopup.value.open('修改流程分类', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteCategory(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const add = () => {
|
||||
categoryPopup.value.open('新增流程分类')
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -1,11 +1,22 @@
|
||||
<template>
|
||||
<el-dialog draggable class='cn-operate-dialog' v-model='dialogVisible' :title='title' style='max-width: 450px;height: 450px'>
|
||||
<el-dialog draggable class='cn-operate-dialog' v-model='dialogVisible' :title='title'
|
||||
style='max-width: 450px;height: 450px'>
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='formData' label-width='120px' :rules='rules' ref='formRef'>
|
||||
|
||||
<el-form-item label='表单类型' prop='formType'>
|
||||
<el-radio-group v-model='formData.formType'>
|
||||
<el-radio border label='10'>流程表单</el-radio>
|
||||
<el-radio border label='20'>业务表单</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='流程标识' prop='key'>
|
||||
<el-input
|
||||
v-model='formData.key'
|
||||
disabled
|
||||
:disabled='!!formData.id'
|
||||
clearable
|
||||
placeholder='请输入流程标识'
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -34,16 +45,15 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if='formData.id' label='流程图标' prop='icon'>
|
||||
<UploadImg v-model='formData.icon' :limit='1' height='128px' width='128px' />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if='formData.id' label='流程图标' prop='icon'>-->
|
||||
<!-- <UploadImg v-model='formData.icon' :limit='1' height='128px' width='128px' />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label='流程描述' prop='description'>
|
||||
<el-input v-model='formData.description' clearable type='textarea' />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='流程表单' prop='formId'>
|
||||
<el-form-item label='流程表单' prop='formId' v-if='formData.formType == "10"'>
|
||||
<el-select v-model='formData.formId' clearable style='width: 100%'>
|
||||
<el-option
|
||||
v-for='form in formList'
|
||||
@@ -53,6 +63,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label='表单提交路由' prop='description'>-->
|
||||
<!-- <el-input v-model='formData.description' clearable type='textarea' />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item v-else label='表单查看路由' prop='formCustomViewPath'>
|
||||
<el-input v-model='formData.formCustomViewPath' />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
@@ -91,6 +107,9 @@ const formData = reactive({
|
||||
category: '',
|
||||
icon: '',
|
||||
description: '',
|
||||
formType: '20',
|
||||
formCustomCreatePath: '',
|
||||
formCustomViewPath: '',
|
||||
formId: ''
|
||||
})
|
||||
|
||||
@@ -99,7 +118,7 @@ const rules = {
|
||||
key: [{ required: true, message: '流程标识不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '流程名称不能为空', trigger: 'blur' }],
|
||||
category: [{ required: true, message: '流程分类不能为空', trigger: 'change' }],
|
||||
formId: [{ required: true, message: '流程表单不能为空', trigger: 'change' }]
|
||||
formType: [{ required: true, message: '表单类型不能为空', trigger: 'change' }]
|
||||
}
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
@@ -129,10 +148,8 @@ const open = async (text: string, data?: any) => {
|
||||
formData[key] = ''
|
||||
}
|
||||
//随机一个key给该模型
|
||||
formData.key = `Process_${new Date().getTime()}`
|
||||
formData.formType = '20'
|
||||
}
|
||||
|
||||
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
|
||||
@@ -87,9 +87,6 @@ const tableStore = new TableStore({
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
if (tableStore.table.params.addr) {
|
||||
tableStore.table.params.addrStrOption = tableStore.table.params.addr.map(tempArray => tempArray.join('/'))
|
||||
}
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
|
||||
@@ -63,9 +63,6 @@ const tableStore = new TableStore({
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
if (tableStore.table.params.addr) {
|
||||
tableStore.table.params.addrStrOption = tableStore.table.params.addr.map(tempArray => tempArray.join('/'))
|
||||
}
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
|
||||
Reference in New Issue
Block a user