冀北普测计划修改
This commit is contained in:
@@ -177,6 +177,14 @@ export function cancel(data: any) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function cancelTest(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/supervision-boot/surveyTest/cancel',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,17 @@ export const addSurveyTest = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新发起填报普测测试结果
|
||||||
|
*/
|
||||||
|
export const updateSurveyTest = (data: any) => {
|
||||||
|
return createAxios({
|
||||||
|
url: MAPPING_PATH + '/update',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 针对有问题的现场测试发起告警单
|
* 针对有问题的现场测试发起告警单
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删
|
|||||||
import { ElMessage, genFileId, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
|
import { ElMessage, genFileId, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
|
||||||
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { addSurveyTest, getTestById } from '@/api/supervision-boot/survey/test'
|
import { addSurveyTest,updateSurveyTest, getTestById } from '@/api/supervision-boot/survey/test'
|
||||||
|
|
||||||
const tableStore = inject('tableStore') as TableStore
|
const tableStore = inject('tableStore') as TableStore
|
||||||
let uploadName = ref('')
|
let uploadName = ref('')
|
||||||
@@ -167,12 +167,17 @@ const submitFn = () => {
|
|||||||
}
|
}
|
||||||
if(addFlagRef){
|
if(addFlagRef){
|
||||||
//新增,则组装业务数据提交后台
|
//新增,则组装业务数据提交后台
|
||||||
//此时该告警单处于待反馈状态
|
|
||||||
await addSurveyTest(form.value)
|
await addSurveyTest(form.value)
|
||||||
//查询进线数据,避免一直处于loading状态
|
//查询进线数据,避免一直处于loading状态
|
||||||
ElMessage.success('申请成功')
|
ElMessage.success('申请成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
planAddition.value = false
|
planAddition.value = false
|
||||||
|
}else{
|
||||||
|
await updateSurveyTest(form.value)
|
||||||
|
//查询进线数据,避免一直处于loading状态
|
||||||
|
ElMessage.success('重新申请成功')
|
||||||
|
tableStore.index()
|
||||||
|
planAddition.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,11 +10,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
//获取登陆用户姓名和部门
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
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 TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { cancel } from '@/api/process-boot/generalTest'
|
import { cancelTest } from '@/api/process-boot/generalTest'
|
||||||
import planTest from './planTest.vue'
|
import planTest from './planTest.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
@@ -121,11 +124,11 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status == 6 || row.status == 1 || row.status == 2
|
return row.createBy != adminInfo.$state.id || row.status == 6 || row.status == 1 || row.status == 2
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// deviceQuitPopup.value.open('重新发起退运', row)
|
// deviceQuitPopup.value.open('重新发起退运', row)
|
||||||
planTestRef.value.open('重新发起计划', row)
|
planTestRef.value.open('重新发起计划', row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -135,7 +138,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status == 6 || row.status == 2 || row.status == 3 || row.status == 4
|
return row.createBy != adminInfo.$state.id || row.status == 6 || row.status == 2 || row.status == 3 || row.status == 4
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
@@ -188,11 +191,11 @@ const cancelLeave = async (row: any) => {
|
|||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.planNo,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancelTest(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
|
|||||||
Reference in New Issue
Block a user