浏览代码

bug

tags/v1.0.0
吴迪 2 年前
父节点
当前提交
b6f5cb48a4
共有 6 个文件被更改,包括 36 次插入15 次删除
  1. +5
    -0
      src/components/UploadOss/index.vue
  2. +5
    -3
      src/views/system-manage/banner-manage/BannerModal.vue
  3. +7
    -5
      src/views/system-manage/banner-manage/tool/table.js
  4. +1
    -1
      src/views/task-manage/components/DrawComp.vue
  5. +9
    -3
      src/views/task-manage/index.vue
  6. +9
    -3
      src/views/task-manage/tools/table.js

+ 5
- 0
src/components/UploadOss/index.vue 查看文件

@@ -6,6 +6,7 @@
:file-list="fileList"
:default-upload="false"
list-type="image-card"
:show-remove-button="remBtn"
@change="handleChange"
@before-upload="beforeUpload"
>
@@ -28,6 +29,10 @@ export default defineComponent({
defaultList: {
type: String,
default: ''
},
remBtn: {
type: Boolean,
default: false
}
},
emits: ['uploadStatus'],

+ 5
- 3
src/views/system-manage/banner-manage/BannerModal.vue 查看文件

@@ -15,7 +15,7 @@
require-mark-placement="left"
>
<n-form-item label="横幅图片" path="cover">
<UploadOss ref="ossRefs" :default-list="initUpload" @upload-status="handleUploadStatus" />
<UploadOss ref="ossRefs" :rem-btn="type !== 'preview'" :default-list="initUpload" @upload-status="handleUploadStatus" />
</n-form-item>
<!-- <n-form-item label="排序" path="sort">
<n-input-number v-model:value="form.sort" clearable />
@@ -73,7 +73,7 @@ export default defineComponent({
} else {
data.initUpload = ''
}
})
}, { immediate: true })

const getModalOptions = computed(() => {
return {
@@ -85,12 +85,14 @@ export default defineComponent({
})

function handleUploadStatus(status) {
console.log(status)
data.form.cover = status
}

const formRef = ref()
const ossRefs = ref()
function handleConfirm() {
console.log(ossRefs.value)
if (props.type !== 'preview') {
formRef.value?.validate((errors) => {
if (!errors) {
@@ -107,7 +109,7 @@ export default defineComponent({
const imageStr = response.join()
const params = {
...data.form,
cover: imageStr[0]
conver: imageStr[0]
}
if (params.id) {
/* 编辑 */

+ 7
- 5
src/views/system-manage/banner-manage/tool/table.js 查看文件

@@ -50,6 +50,7 @@ const data = reactive({
{
title: '序号',
key: 'key',
width: 180,
render: (_, index) => {
return `${index + 1}`
},
@@ -62,9 +63,10 @@ const data = reactive({
render(row) {
return h(TableImage, {
images: {
width: 36,
height: 36,
width: 119,
height: 51,
src: row.cover
// previewDisabled: true // 禁止点击预览
}
})
}
@@ -73,18 +75,18 @@ const data = reactive({
title: '上传人',
key: 'updateUser',
align: 'center',
width: 160
width: 200
},
{
title: '上传时间',
key: 'updateTime',
align: 'center',
width: 160
width: 220
},
{
title: '操作',
align: 'center',
width: 150,
width: 220,
fixed: 'right',
render(row) {
return h(TableAction, {

+ 1
- 1
src/views/task-manage/components/DrawComp.vue 查看文件

@@ -40,7 +40,7 @@
<div v-if="current !== 1" class="cont">
<n-descriptions label-placement="left" label-align="right" :column="4" title="飞行信息">
<template v-for="(it, i) in flyInfo" :key="i + it.label">
<n-descriptions-item v-if="current !== it?.current" :label="it.label">
<n-descriptions-item v-if="!it?.current || current >= it?.current" :label="it.label">
{{ it.value }}
</n-descriptions-item>
</template>

+ 9
- 3
src/views/task-manage/index.vue 查看文件

@@ -26,7 +26,7 @@
<!-- 详情 - 抽屉 -->
<n-drawer v-model:show="showDraw" :width="'calc(100vw - 210px)'" :placement="'right'" resizable>
<n-drawer-content closable>
<draw-comp :detail="detail" @close="showDraw = false" />
<draw-comp :detail="detail" @close="showDraw = false;handleSearch()" />
</n-drawer-content>
</n-drawer>

@@ -50,13 +50,19 @@ export default {
...toRefs(table),
...toRefs(search)
})
const status = ['任务待分配', '任务已分配', '飞手已接单', '任务飞行中', '任务已完成']
const loadDataTable = async(res) => {
const _params = {
...unref(data.searchParams),
...res
}
return await getTaskList(_params)
const temp = await getTaskList(_params)
// 将状态由数字改成文字
temp.data.records = temp.data.records.map(it => ({
...it,
statusName: status[(it.status / 5) - 1]
}))
return temp
}
// 新增
function handleModal() {

+ 9
- 3
src/views/task-manage/tools/table.js 查看文件

@@ -89,7 +89,7 @@ const data = reactive({
},
{
title: '任务状态',
key: 'status',
key: 'statusName',
align: 'center'
},
{
@@ -121,7 +121,10 @@ const data = reactive({
props: {
type: 'primary',
text: true,
onClick: editHandle.bind(null, row, 'update')
onClick: editHandle.bind(null, row, 'update'),
style: {
display: row.status > 10 ? 'none' : ''
}
},
auth: 'basic_list'
},
@@ -135,7 +138,10 @@ const data = reactive({
},
ButtonProps: {
text: true,
type: 'primary'
type: 'primary',
style: {
display: row.status > 10 ? 'none' : ''
}
}
}
],

正在加载...
取消
保存