修改 技术监督 草稿功能
This commit is contained in:
@@ -26,7 +26,6 @@ export const updateFormData = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//取消干扰源审批
|
//取消干扰源审批
|
||||||
export const cancelFormData = (data: any) => {
|
export const cancelFormData = (data: any) => {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
@@ -36,7 +35,6 @@ export const cancelFormData = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const submitGoNet = (data: any) => {
|
export const submitGoNet = (data: any) => {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
url: '/supervision-boot/userReportNormal/addUserReportNormal',
|
url: '/supervision-boot/userReportNormal/addUserReportNormal',
|
||||||
@@ -60,3 +58,11 @@ export const getById = (data: any) => {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 根据id获取用户档案录入的详细数据
|
||||||
|
export const cancel = (data: any) => {
|
||||||
|
return createAxios({
|
||||||
|
url: '/supervision-boot/userReportNormal/cancel',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-form-item for="-" label="测试负责人:" prop="completeBy">
|
<el-form-item for="-" label="测试负责人:" prop="completeBy">
|
||||||
<el-input v-model="form.completeBy" placeholder="请输入测试负责人"></el-input>
|
<el-input v-model="form.completeBy" placeholder="请输入测试负责人"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" class="uploadFile" label="计划测试报告:" prop="testReport">
|
<el-form-item for="-" class="uploadFile" label="测试报告:" prop="testReport">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
v-model:file-list="form.testReport"
|
v-model:file-list="form.testReport"
|
||||||
|
|||||||
@@ -164,7 +164,9 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="close()">取消</el-button>
|
<el-button @click="close()">取消</el-button>
|
||||||
<el-button type="primary" @click="confirmForm()">确定</el-button>
|
<!-- <el-button type="primary" @click="confirmForm()">确定</el-button> -->
|
||||||
|
<el-button type="primary" @click="confirmForm(true)">保存</el-button>
|
||||||
|
<el-button type="primary" @click="confirmForm(false)">提交审批</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -283,7 +285,8 @@ const resetForm = () => {
|
|||||||
resetForm()
|
resetForm()
|
||||||
|
|
||||||
const detailLoading = ref(false) // 表单的加载中
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
const getInfo = async () => {
|
const getInfo = async (row?: any) => {
|
||||||
|
console.log('🚀 ~ getInfo ~ row:', row)
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
try {
|
try {
|
||||||
await getUserReportById(props.id).then(res => {
|
await getUserReportById(props.id).then(res => {
|
||||||
@@ -291,16 +294,28 @@ const getInfo = async () => {
|
|||||||
form.value.reporter = adminInfo.$state.name
|
form.value.reporter = adminInfo.$state.name
|
||||||
form.value.orgId = adminInfo.$state.deptName
|
form.value.orgId = adminInfo.$state.deptName
|
||||||
form.value.reportDate = new Date()
|
form.value.reportDate = new Date()
|
||||||
|
if (row) {
|
||||||
|
goToNetReport.value = row.otherReport
|
||||||
|
form.value.goToNetReport =
|
||||||
|
row.otherReport == null
|
||||||
|
? []
|
||||||
|
: [
|
||||||
|
{
|
||||||
|
name: row.otherReport.split('/')[2]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
detailLoading.value = false
|
detailLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = () => {
|
const open = (row?: any) => {
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
|
|
||||||
resetForm()
|
resetForm()
|
||||||
getInfo()
|
getInfo(row)
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
//重置表单内容
|
//重置表单内容
|
||||||
@@ -333,28 +348,46 @@ const choose = (e: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//提交
|
//提交
|
||||||
const confirmForm = () => {
|
const confirmForm = (flag: boolean) => {
|
||||||
if (goToNetReport.value == null || goToNetReport.value == '') {
|
if (flag) {
|
||||||
return ElMessage({
|
let data = {
|
||||||
message: props.bussType == 0 ? '请上传入网设计方案审查报告' : '请上传治理工程验收报告',
|
type: props.bussType,
|
||||||
type: 'warning'
|
userReportId: props.id,
|
||||||
})
|
reportUrl: goToNetReport.value,
|
||||||
}
|
saveOrCheckflag: '1'
|
||||||
let data = {
|
}
|
||||||
type: props.bussType,
|
submitGoNet(data).then((res: any) => {
|
||||||
userReportId: props.id,
|
|
||||||
reportUrl: goToNetReport.value
|
|
||||||
}
|
|
||||||
submitGoNet(data).then((res: any) => {
|
|
||||||
if (res.code === 'A0000') {
|
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '新建流程成功',
|
message: '保存成功!',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
emits('onSubmit')
|
emits('onSubmit')
|
||||||
close()
|
close()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
if (goToNetReport.value == null || goToNetReport.value == '') {
|
||||||
|
return ElMessage({
|
||||||
|
message: props.bussType == 0 ? '请上传入网设计方案审查报告' : '请上传治理工程验收报告',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
let data = {
|
||||||
|
type: props.bussType,
|
||||||
|
userReportId: props.id,
|
||||||
|
reportUrl: goToNetReport.value,
|
||||||
|
saveOrCheckflag: '2'
|
||||||
|
}
|
||||||
|
submitGoNet(data).then((res: any) => {
|
||||||
|
if (res.code === 'A0000') {
|
||||||
|
ElMessage({
|
||||||
|
message: '新建流程成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
emits('onSubmit')
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -23,8 +23,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</TableHeader> -->
|
</TableHeader> -->
|
||||||
<div class="header_btn">
|
<div class="header_btn">
|
||||||
<el-button v-if="bussType==0" icon="" type="primary" @click="toGoNet()">{{ titleButton }}</el-button>
|
<el-button v-if="bussType == 0" icon="" type="primary" @click="toGoNet()">{{ titleButton }}</el-button>
|
||||||
<el-button v-if="bussType==1&&needGovernance!='0'" icon="" type="primary" @click="toGoNet()">{{ titleButton }}</el-button>
|
<el-button v-if="bussType == 1 && needGovernance != '0'" icon="" type="primary" @click="toGoNet()">
|
||||||
|
{{ titleButton }}
|
||||||
|
</el-button>
|
||||||
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
|
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
@@ -34,7 +36,7 @@
|
|||||||
ref="addForms"
|
ref="addForms"
|
||||||
:id="bussId"
|
:id="bussId"
|
||||||
:bussType="bussType"
|
:bussType="bussType"
|
||||||
:title="titleButton"
|
:title="titleButton1"
|
||||||
openType="detail"
|
openType="detail"
|
||||||
@onSubmit="tableStore.index()"
|
@onSubmit="tableStore.index()"
|
||||||
></addForm>
|
></addForm>
|
||||||
@@ -49,17 +51,20 @@ defineOptions({
|
|||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import { cancel } from '@/api/supervision-boot/interfere/index'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { Back } from '@element-plus/icons-vue'
|
import { Back } from '@element-plus/icons-vue'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
const { go, currentRoute, push } = useRouter()
|
const { go, currentRoute, push } = useRouter()
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
|
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const TableHeaderRef = ref()
|
const adminInfo = useAdminInfo()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
|
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
|
||||||
|
|
||||||
@@ -103,12 +108,14 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -142,6 +149,54 @@ const tableStore = new TableStore({
|
|||||||
click: row => {
|
click: row => {
|
||||||
handleAudit(row.processInstanceId)
|
handleAudit(row.processInstanceId)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
titleButton1.value = '编辑'
|
||||||
|
setTimeout(() => {
|
||||||
|
addForms.value.open(row)
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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 => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
titleButton1.value = '重新发起'
|
||||||
|
setTimeout(() => {
|
||||||
|
addForms.value.open(row)
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'cancel',
|
||||||
|
title: '取消',
|
||||||
|
type: 'danger',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
cancelLeave(row)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -165,17 +220,33 @@ const bussType = ref()
|
|||||||
bussType.value = Number(currentRoute.value.query.type)
|
bussType.value = Number(currentRoute.value.query.type)
|
||||||
|
|
||||||
const titleButton = ref()
|
const titleButton = ref()
|
||||||
if (bussType.value === 0) {
|
const titleButton1 = ref()
|
||||||
titleButton.value = '入网设计方案申请'
|
|
||||||
} else {
|
|
||||||
titleButton.value = '治理工程申请'
|
|
||||||
}
|
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
/**取消流程操作*/
|
||||||
|
const cancelLeave = async (row: any) => {
|
||||||
|
// 二次确认
|
||||||
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
inputType: 'textarea',
|
||||||
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
|
inputErrorMessage: '取消原因不能为空'
|
||||||
|
})
|
||||||
|
// 发起取消
|
||||||
|
let data = {
|
||||||
|
id: row.id,
|
||||||
|
processInstanceId: row.processInstanceId,
|
||||||
|
reason: value
|
||||||
|
}
|
||||||
|
await cancel(data)
|
||||||
|
ElMessage.success('取消成功')
|
||||||
|
// 加载数据
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any) => {
|
const handleAudit = (instanceId: any) => {
|
||||||
push({
|
push({
|
||||||
@@ -185,10 +256,19 @@ const handleAudit = (instanceId: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (bussType.value === 0) {
|
||||||
|
titleButton.value = '入网设计方案申请'
|
||||||
|
} else {
|
||||||
|
titleButton.value = '治理工程申请'
|
||||||
|
}
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const toGoNet = () => {
|
const toGoNet = () => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
if (bussType.value === 0) {
|
||||||
|
titleButton1.value = '入网设计方案申请'
|
||||||
|
} else {
|
||||||
|
titleButton1.value = '治理工程申请'
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open()
|
addForms.value.open()
|
||||||
}, 0)
|
}, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user