设备补招接口调试
This commit is contained in:
@@ -14,4 +14,14 @@ export function getAskDirOrFile(data: any) {
|
|||||||
url: `/cs-harmonic-boot/offlineDataUpload/askDirOrFile?fileType=${data.fileType}&nDid=${data.nDid}&path=${data.path}&prjName=${data.prjName}`,
|
url: `/cs-harmonic-boot/offlineDataUpload/askDirOrFile?fileType=${data.fileType}&nDid=${data.nDid}&path=${data.path}&prjName=${data.prjName}`,
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//设备补招操作
|
||||||
|
// 获取设备补招页面数据
|
||||||
|
export function offlineDataUploadMakeUp(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/cs-harmonic-boot/offlineDataUpload/makeUp',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,23 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main current_device" v-loading="loading" v-if="false">
|
|
||||||
<!-- <div class="file_path" v-if="dirCheckedList.value && dirCheckedList.value.length != 0">
|
|
||||||
<el-breadcrumb separator="/">
|
|
||||||
<el-breadcrumb-item v-for="(item, index) in dirCheckedList" :key="index">
|
|
||||||
{{ item.prjName }}
|
|
||||||
</el-breadcrumb-item>
|
|
||||||
</el-breadcrumb>
|
|
||||||
</div> -->
|
|
||||||
<div class="device_dir" v-for="(item, index) in dirList" :key="index">
|
|
||||||
<img v-if="item.type == 'dir'" src="@/assets/img/wenjianjia.svg" @click="handleIntoDir(item)" />
|
|
||||||
<img
|
|
||||||
class="device_dir_file"
|
|
||||||
v-if="item.type == 'file'"
|
|
||||||
src="@/assets/img/wenjian.svg"
|
|
||||||
@click="handleIntoDir(item)"
|
|
||||||
/>
|
|
||||||
<p>{{ item.prjName }}>{{ item.prjDataPath }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 设备补招 -->
|
<!-- 设备补招 -->
|
||||||
<div class="default-main current_device" v-loading="loading">
|
<div class="default-main current_device" v-loading="loading">
|
||||||
<div class="current_header">
|
<div class="current_header">
|
||||||
@@ -26,8 +7,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-checkbox-group style="width: 150px" v-model="checkList">
|
<el-checkbox-group style="width: 150px" v-model="checkList">
|
||||||
<el-checkbox label="稳态" value="B" />
|
<el-checkbox label="稳态" :value="0" />
|
||||||
<el-checkbox label="暂态" value="A" />
|
<el-checkbox label="暂态" :value="1" />
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -37,15 +18,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="current_body" ref="tbodyRef">
|
<div class="current_body" ref="tbodyRef">
|
||||||
<vxe-table
|
<vxe-table border ref="tableRef" :data="dirList" :height="tableHeight" style="margin-right: 30px">
|
||||||
border
|
|
||||||
ref="tableRef"
|
|
||||||
:data="dirList"
|
|
||||||
:height="tableHeight"
|
|
||||||
@checkbox-all="selectAllChangeEvent"
|
|
||||||
@checkbox-change="selectChangeEvent"
|
|
||||||
style="margin-right: 30px"
|
|
||||||
>
|
|
||||||
<vxe-column align="center" type="checkbox" width="60"></vxe-column>
|
<vxe-column align="center" type="checkbox" width="60"></vxe-column>
|
||||||
<vxe-column align="center" field="name" title="名称"></vxe-column>
|
<vxe-column align="center" field="name" title="名称"></vxe-column>
|
||||||
<vxe-column align="center" field="startTime" title="起始时间"></vxe-column>
|
<vxe-column align="center" field="startTime" title="起始时间"></vxe-column>
|
||||||
@@ -56,9 +29,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, defineProps, defineExpose } from 'vue'
|
import { ref, onMounted, defineProps, defineExpose } from 'vue'
|
||||||
import { getMakeUpData, getAskDirOrFile } from '@/api/cs-harmonic-boot/recruitment.ts'
|
import { getMakeUpData, getAskDirOrFile, offlineDataUploadMakeUp } from '@/api/cs-harmonic-boot/recruitment.ts'
|
||||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import {
|
import {
|
||||||
Plus,
|
Plus,
|
||||||
Back,
|
Back,
|
||||||
@@ -75,9 +48,11 @@ import {
|
|||||||
ZoomOut,
|
ZoomOut,
|
||||||
FolderOpened
|
FolderOpened
|
||||||
} from '@element-plus/icons-vue'
|
} from '@element-plus/icons-vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
const checkList: any = ref([])
|
const checkList: any = ref([])
|
||||||
// const props = defineProps(['lineId'])
|
// const props = defineProps(['lineId'])
|
||||||
const { push, currentRoute, go } = useRouter() // 路由
|
const { push, currentRoute, go } = useRouter() // 路由
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const dirList = ref([])
|
const dirList = ref([])
|
||||||
const route: any = ref({})
|
const route: any = ref({})
|
||||||
@@ -102,6 +77,46 @@ const getMakeUpDataList = (row: any) => {
|
|||||||
const dirCheckedList: any = ref([])
|
const dirCheckedList: any = ref([])
|
||||||
const tbodyRef = ref()
|
const tbodyRef = ref()
|
||||||
const tableHeight = ref(0)
|
const tableHeight = ref(0)
|
||||||
|
const routes = useRoute()
|
||||||
|
console.log(routes, '+++++++++++++89')
|
||||||
|
const tableRef = ref()
|
||||||
|
const handleUpDevice = () => {
|
||||||
|
let proList = tableRef.value.getCheckboxRecords().map((item: any) => {
|
||||||
|
return item.prjDataPath
|
||||||
|
})
|
||||||
|
if (checkList.value.length == 0) {
|
||||||
|
return ElMessage.warning('请选择暂态稳态')
|
||||||
|
}
|
||||||
|
if (proList.length == 0) {
|
||||||
|
return ElMessage.warning('请选择工程')
|
||||||
|
}
|
||||||
|
let form = {
|
||||||
|
dataTypeList: checkList.value,
|
||||||
|
startTime: datePickerRef.value && datePickerRef.value.timeValue[0],
|
||||||
|
endTime: datePickerRef.value && datePickerRef.value.timeValue[1],
|
||||||
|
lineId: routes.query.id,
|
||||||
|
ndid: routes.query.ndid,
|
||||||
|
proList: proList
|
||||||
|
}
|
||||||
|
console.log(
|
||||||
|
tableRef.value.getCheckboxRecords().map((item: any) => {
|
||||||
|
return item.prjDataPath
|
||||||
|
}),
|
||||||
|
form
|
||||||
|
)
|
||||||
|
loading.value = true
|
||||||
|
offlineDataUploadMakeUp(form)
|
||||||
|
.then((res: any) => {
|
||||||
|
console.log(res, '-------')
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(e => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
const handleIntoDir = (row: any) => {
|
const handleIntoDir = (row: any) => {
|
||||||
if (dirCheckedList.value.indexOf(row) == -1) {
|
if (dirCheckedList.value.indexOf(row) == -1) {
|
||||||
dirCheckedList.value.push(row)
|
dirCheckedList.value.push(row)
|
||||||
|
|||||||
Reference in New Issue
Block a user