更新
This commit is contained in:
@ -1,73 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div class="form-item-box" :class="props.showBtn ? 'showBtn-upload' : ''" :style="{ width: width }">
|
||||||
class="form-item-box"
|
<el-upload v-bind="$attrs" :headers="headers" :multiple="false" class="avatar-uploader" :limit="props.limit"
|
||||||
:class="props.showBtn ? 'showBtn-upload' : ''"
|
:action="actionUrl" :list-type="props.showBtn ? '' : 'picture-card'" :file-list="fileList" show-file-list
|
||||||
:style="{ width: width }"
|
:on-exceed="handleExceed" :on-success="handlerSuccess" :before-upload="beforeImgUpload">
|
||||||
>
|
|
||||||
<el-upload
|
|
||||||
v-bind="$attrs"
|
|
||||||
:headers="headers"
|
|
||||||
:multiple="false"
|
|
||||||
class="avatar-uploader"
|
|
||||||
:limit="props.limit"
|
|
||||||
:action="actionUrl"
|
|
||||||
:list-type="props.showBtn ? '' : 'picture-card'"
|
|
||||||
:file-list="fileList"
|
|
||||||
show-file-list
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-success="handlerSuccess"
|
|
||||||
:before-upload="beforeImgUpload"
|
|
||||||
>
|
|
||||||
<template #default>
|
<template #default>
|
||||||
<el-button v-if="props.showBtn" size="small" type="primary">上传文件</el-button>
|
<el-button v-if="props.showBtn" size="small" type="primary">上传文件</el-button>
|
||||||
<el-icon v-else> <Plus /> </el-icon>
|
<el-icon v-else><Plus /></el-icon>
|
||||||
</template>
|
</template>
|
||||||
<template #file="{ file }" v-if="!props.showBtn">
|
<template #file="{ file }" v-if="!props.showBtn">
|
||||||
<div v-if="props.isImg">
|
<div v-if="props.isImg">
|
||||||
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
|
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
|
||||||
<span class="el-upload-list__item-actions">
|
<span class="el-upload-list__item-actions">
|
||||||
<span
|
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||||
class="el-upload-list__item-preview"
|
|
||||||
@click="handlePictureCardPreview(file)"
|
|
||||||
>
|
|
||||||
<el-icon> <zoom-in /></el-icon>
|
<el-icon> <zoom-in /></el-icon>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file, fileList)">
|
||||||
v-if="!disabled"
|
<el-icon><Delete /></el-icon>
|
||||||
class="el-upload-list__item-delete"
|
|
||||||
@click="handleRemove(file, fileList)"
|
|
||||||
>
|
|
||||||
<el-icon>
|
|
||||||
<Delete />
|
|
||||||
</el-icon>
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="file-wrap">
|
<div class="file-wrap">
|
||||||
<span>
|
<span><svg-icon :icon="getSuffix(file.name)" /></span>
|
||||||
<svg-icon :icon="getSuffix(file.name)" />
|
|
||||||
</span>
|
|
||||||
<span class="file-name">{{ file.name }}</span>
|
<span class="file-name">{{ file.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="el-upload-list__item-actions">
|
<span class="el-upload-list__item-actions">
|
||||||
<span
|
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
|
||||||
v-if="!disabled"
|
<el-icon><Download /></el-icon>
|
||||||
class="el-upload-list__item-delete"
|
|
||||||
@click="handleDownload(file)"
|
|
||||||
>
|
|
||||||
<el-icon>
|
|
||||||
<Download />
|
|
||||||
</el-icon>
|
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file, fileList)">
|
||||||
v-if="!disabled"
|
<el-icon><Delete /></el-icon>
|
||||||
class="el-upload-list__item-delete"
|
|
||||||
@click="handleRemove(file, fileList)"
|
|
||||||
>
|
|
||||||
<el-icon>
|
|
||||||
<Delete />
|
|
||||||
</el-icon>
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -80,7 +42,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import { COMPONENT_WIDTH } from "@/constant";
|
import { COMPONENT_WIDTH } from "@/constant";
|
||||||
import { ref, defineProps, defineEmits, computed, watch, onMounted } from "vue";
|
import { ref, defineProps, defineEmits, computed, watch, onMounted } from "vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
@ -107,17 +68,19 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
isAll:{
|
isAll: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const actionUrl = computed(() =>{
|
const actionUrl = computed(() => {
|
||||||
if(props.isAll){
|
if (props.isAll) {
|
||||||
return "/mosty-api/mosty-base/minio/image/upload/id"
|
return "/mosty-api/mosty-base/minio/image/upload/id";
|
||||||
}else{
|
} else {
|
||||||
return props.isImg ? "/mosty-api/mosty-base/minio/image/upload/id" : "/mosty-api/mosty-base/minio/file/upload"
|
return props.isImg
|
||||||
|
? "/mosty-api/mosty-base/minio/image/upload/id"
|
||||||
|
: "/mosty-api/mosty-base/minio/file/upload";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -154,7 +117,17 @@ const getSuffix = (fileName) => {
|
|||||||
if (suffix === "pdf") return "PDF";
|
if (suffix === "pdf") return "PDF";
|
||||||
|
|
||||||
//视频 音频
|
//视频 音频
|
||||||
var videolist = [ "mp4", "m2v", "mkv", "rmvb", "wmv", "avi", "flv", "mov", "m4v" ];
|
var videolist = [
|
||||||
|
"mp4",
|
||||||
|
"m2v",
|
||||||
|
"mkv",
|
||||||
|
"rmvb",
|
||||||
|
"wmv",
|
||||||
|
"avi",
|
||||||
|
"flv",
|
||||||
|
"mov",
|
||||||
|
"m4v"
|
||||||
|
];
|
||||||
if (videolist.includes(suffix)) return "VIDEO";
|
if (videolist.includes(suffix)) return "VIDEO";
|
||||||
|
|
||||||
var musiclist = ["mp3", "wav", "wmv"];
|
var musiclist = ["mp3", "wav", "wmv"];
|
||||||
@ -179,7 +152,6 @@ const headers = ref({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
;
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(val) => {
|
(val) => {
|
||||||
@ -187,18 +159,21 @@ watch(
|
|||||||
if (arr && arr.length > 0) {
|
if (arr && arr.length > 0) {
|
||||||
if (!props.sfUrl) {
|
if (!props.sfUrl) {
|
||||||
fileList.value = arr.map((el) => {
|
fileList.value = arr.map((el) => {
|
||||||
if(Object.prototype.toString.call(el) === '[object Object]'){
|
if (Object.prototype.toString.call(el) === "[object Object]") {
|
||||||
return { url: `/mosty-api/mosty-base/minio/image/download/` + el,name:el.name };
|
return {
|
||||||
}else{
|
url: `/mosty-api/mosty-base/minio/image/download/` + el,
|
||||||
|
name: el.name
|
||||||
|
};
|
||||||
|
} else {
|
||||||
return { url: `/mosty-api/mosty-base/minio/image/download/` + el };
|
return { url: `/mosty-api/mosty-base/minio/image/download/` + el };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
fileList.value = arr.map((el) => {
|
fileList.value = arr.map((el) => {
|
||||||
if(Object.prototype.toString.call(el) === '[object Object]'){
|
if (Object.prototype.toString.call(el) === "[object Object]") {
|
||||||
return { url: el,name:el.name };
|
return { url: el, name: el.name };
|
||||||
}else{
|
} else {
|
||||||
return { url: el };
|
return { url: el };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -207,7 +182,6 @@ watch(
|
|||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const handlerSuccess = (res, file) => {
|
const handlerSuccess = (res, file) => {
|
||||||
file.url = `/mosty-api/mosty-base/minio/image/download/` + res.data;
|
file.url = `/mosty-api/mosty-base/minio/image/download/` + res.data;
|
||||||
fileList.value.push(file);
|
fileList.value.push(file);
|
||||||
@ -257,7 +231,6 @@ const handleRemove = (file) => {
|
|||||||
emits("update:modelValue", props.modelValue);
|
emits("update:modelValue", props.modelValue);
|
||||||
};
|
};
|
||||||
const propsModelValue = ref();
|
const propsModelValue = ref();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -9,12 +9,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tabBox">
|
<div class="tabBox">
|
||||||
<div ref="btns" class="btns flexcb">
|
|
||||||
<div class="">
|
|
||||||
<el-button>批量处理</el-button>
|
|
||||||
<el-button>导出</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<MyTable
|
<MyTable
|
||||||
:tableData="pageData.tableData"
|
:tableData="pageData.tableData"
|
||||||
:tableColumn="pageData.tableColumn"
|
:tableColumn="pageData.tableColumn"
|
||||||
@ -51,7 +45,7 @@
|
|||||||
<template #reference>
|
<template #reference>
|
||||||
<el-link size="small" type="success" v-if="row.bkZt == '04'" @click="row.visible = !row.visible,chooseRow.id = row.id">审批</el-link>
|
<el-link size="small" type="success" v-if="row.bkZt == '04'" @click="row.visible = !row.visible,chooseRow.id = row.id">审批</el-link>
|
||||||
</template>
|
</template>
|
||||||
<el-form :model="chooseRow" ref="elRowForm" :inline="true" label-width="100px" :rules="rules">
|
<el-form :model="chooseRow" ref="elRowForm" v-if="row.visible" :inline="true" label-width="100px" :rules="rules">
|
||||||
<el-form-item label="是否通过" prop="sftg" class="mt10 mb10" style="width: 100%;">
|
<el-form-item label="是否通过" prop="sftg" class="mt10 mb10" style="width: 100%;">
|
||||||
<MOSTY.Select filterable v-model="chooseRow.sftg" :dictEnum="D_BZ_SF" width="100%" clearable placeholder="请选择是否通过"/>
|
<MOSTY.Select filterable v-model="chooseRow.sftg" :dictEnum="D_BZ_SF" width="100%" clearable placeholder="请选择是否通过"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -126,13 +120,6 @@ const searchConfiger = ref([
|
|||||||
showType: "select",
|
showType: "select",
|
||||||
options: D_GS_BK_ZT
|
options: D_GS_BK_ZT
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "布控时间类型",
|
|
||||||
prop: "bkSjLx",
|
|
||||||
placeholder: "请选择布控时间",
|
|
||||||
showType: "date",
|
|
||||||
options: D_GS_BK_SJLX
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
const queryFrom = ref({});
|
const queryFrom = ref({});
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="感知源信息" prop="sxts" class="ww100">
|
<el-form-item label="感知源信息" class="ww100">
|
||||||
<div class="flex ww100">
|
<div class="flex ww100">
|
||||||
<div class="boo">
|
<div class="boo">
|
||||||
<span v-if="!listQuery.sxts || listQuery.sxts.length == 0" class="f14 ml10" style="color: #e1e1e1;">感知源信息</span>
|
<span v-if="!listQuery.sxts || listQuery.sxts.length == 0" class="f14 ml10" style="color: #e1e1e1;">感知源信息</span>
|
||||||
|
@ -9,12 +9,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tabBox">
|
<div class="tabBox">
|
||||||
<div ref="btns" class="btns flexcb">
|
|
||||||
<div class="">
|
|
||||||
<el-button>批量处理</el-button>
|
|
||||||
<el-button>导出</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<MyTable
|
<MyTable
|
||||||
:tableData="pageData.tableData"
|
:tableData="pageData.tableData"
|
||||||
:tableColumn="pageData.tableColumn"
|
:tableColumn="pageData.tableColumn"
|
||||||
@ -51,7 +45,7 @@
|
|||||||
<template #reference>
|
<template #reference>
|
||||||
<el-link size="small" type="success" v-if="row.bkZt == '02'" @click="row.visible = !row.visible,chooseRow.id = row.id">审核</el-link>
|
<el-link size="small" type="success" v-if="row.bkZt == '02'" @click="row.visible = !row.visible,chooseRow.id = row.id">审核</el-link>
|
||||||
</template>
|
</template>
|
||||||
<el-form :model="chooseRow" ref="elRowForm" :inline="true" label-width="100px" :rules="rules">
|
<el-form :model="chooseRow" ref="elRowForm" v-if="row.visible" :inline="true" label-width="100px" :rules="rules">
|
||||||
<el-form-item label="是否通过" prop="sftg" class="mt10 mb10" style="width: 100%;">
|
<el-form-item label="是否通过" prop="sftg" class="mt10 mb10" style="width: 100%;">
|
||||||
<MOSTY.Select filterable v-model="chooseRow.sftg" :dictEnum="D_BZ_SF" width="100%" clearable placeholder="请选择是否通过"/>
|
<MOSTY.Select filterable v-model="chooseRow.sftg" :dictEnum="D_BZ_SF" width="100%" clearable placeholder="请选择是否通过"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -126,13 +120,6 @@ const searchConfiger = ref([
|
|||||||
showType: "select",
|
showType: "select",
|
||||||
options: D_GS_BK_ZT
|
options: D_GS_BK_ZT
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "布控时间类型",
|
|
||||||
prop: "bkSjLx",
|
|
||||||
placeholder: "请选择布控时间",
|
|
||||||
showType: "date",
|
|
||||||
options: D_GS_BK_SJLX
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
const queryFrom = ref({});
|
const queryFrom = ref({});
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
<div style="width: 100%;" class="mt10">
|
<div style="width: 100%;" class="mt10">
|
||||||
<el-form-item prop="bkfj" label="上传附件" style="width: 100%;">
|
<el-form-item prop="bkfj" label="上传附件" style="width: 100%;">
|
||||||
<div>
|
<div>
|
||||||
<MOSTY.Upload :limit="10" :isImg="false" v-model="listQuery.bkfj" />
|
<MOSTY.Upload :showBtn="true" :limit="10" :isImg="false" :isAll="true" v-model="listQuery.bkfj" />
|
||||||
<div>支持png、jpg、pdf文件上传</div>
|
<div>支持png、jpg、pdf文件上传</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -248,7 +248,7 @@ const get_bkqy_list = (row) =>{
|
|||||||
// 根据id获取详情
|
// 根据id获取详情
|
||||||
const getDataById = (id) =>{
|
const getDataById = (id) =>{
|
||||||
qcckGet({},'/mosty-gsxt/tbGsxtBk/selectVoById/'+id).then(res=>{
|
qcckGet({},'/mosty-gsxt/tbGsxtBk/selectVoById/'+id).then(res=>{
|
||||||
res.bkfj = res.bkfj ? res.bkfj.split(',') : [];
|
res.bkfj = res.ossList || [];
|
||||||
res.bkqyList = res.qyList ? res.qyList.map(v=>v.id) : [];
|
res.bkqyList = res.qyList ? res.qyList.map(v=>v.id) : [];
|
||||||
listQuery.value = res || {}
|
listQuery.value = res || {}
|
||||||
})
|
})
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<div class="titleBox">
|
<div class="titleBox">
|
||||||
<PageTitle title="我的布控">
|
<PageTitle title="我的布控">
|
||||||
<el-button type="primary" @click="handleAdd('add',null)">发起布控</el-button>
|
<el-button type="primary" @click="handleAdd('add',null)">发起布控</el-button>
|
||||||
<el-button type="primary">导出</el-button>
|
|
||||||
</PageTitle>
|
</PageTitle>
|
||||||
</div>
|
</div>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
@ -83,7 +82,7 @@ const searchBox = ref(); //搜索框
|
|||||||
const searchConfiger = ref([
|
const searchConfiger = ref([
|
||||||
{
|
{
|
||||||
label: "布控级别",
|
label: "布控级别",
|
||||||
prop: "bqjb",
|
prop: "bkDj",
|
||||||
placeholder: "请选择布控级别",
|
placeholder: "请选择布控级别",
|
||||||
showType: "select",
|
showType: "select",
|
||||||
options: D_GS_BK_DJ
|
options: D_GS_BK_DJ
|
||||||
@ -102,13 +101,6 @@ const searchConfiger = ref([
|
|||||||
showType: "select",
|
showType: "select",
|
||||||
options: D_GS_BK_ZT
|
options: D_GS_BK_ZT
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "布控时间类型",
|
|
||||||
prop: "bkSjLx",
|
|
||||||
placeholder: "请选择布控时间",
|
|
||||||
showType: "date",
|
|
||||||
options: D_GS_BK_SJLX
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
const queryFrom = ref({});
|
const queryFrom = ref({});
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
|
@ -308,7 +308,6 @@ const handleFx = () => {
|
|||||||
proxy.$message({ type: "danger", message: "解析异常,请重新上传解析" });
|
proxy.$message({ type: "danger", message: "解析异常,请重新上传解析" });
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(message,'===========message');
|
|
||||||
|
|
||||||
if(!message) return proxy.$message({ type: "danger", message: "解析异常,请重新上传解析" });
|
if(!message) return proxy.$message({ type: "danger", message: "解析异常,请重新上传解析" });
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user