修正文件管理两个bug:不显示“上传人”的问题、图片无法预览问题
This commit is contained in:
parent
6aa2755864
commit
01c1f4ea3f
14
README.md
14
README.md
@ -4,14 +4,14 @@
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Ruoyi-Flex V4.1.8</h1>
|
||||
<h4 align="center">Ruoyi-Flex是基于JDK21、Spring Boot V3.2.X+平台 前后端分离的Java快速开发框架</h4>
|
||||
|
||||
## 项目介绍
|
||||
## 1、项目介绍
|
||||
flex-elementplus-ui是Ruoyi-Flex的原来前端UI部分flex-ui ,采用Vue3、Element-Plus、vite、Pinia等技术构建。
|
||||
|
||||
## 后端项目
|
||||
## 2、后端项目
|
||||
Ruoyi-Flex实行前后端分离仓库,本项目是前端部分,java后端项目是Ruoyi-Flex,后端项目地址: [Ruoyi-Flex](https://gitee.com/dataprince/ruoyi-flex)
|
||||
|
||||
|
||||
## 安装教程
|
||||
## 3、安装教程
|
||||
|
||||
### 开发
|
||||
|
||||
@ -38,7 +38,7 @@ npm run build:stage
|
||||
#### 构建生产环境
|
||||
npm run build:prod
|
||||
|
||||
## Ruoyi-Flex交流群
|
||||
## 4、Ruoyi-Flex交流群
|
||||
|
||||
本软件完全开源,作者很忙,如果您在使用过程中遇到问题,请付点小费(扫码支付199元)后申请加入QQ群或者微信群寻求帮助:
|
||||
<table>
|
||||
@ -52,7 +52,7 @@ npm run build:prod
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 开源协议
|
||||
## 5、开源协议
|
||||
|
||||
**为什么推荐使用本项目?**
|
||||
|
||||
@ -62,7 +62,7 @@ npm run build:prod
|
||||
|
||||
如果这个项目让您有所收获,记得 Star 关注哦,这对我是非常不错的鼓励与支持。
|
||||
|
||||
## 演示图
|
||||
## 6、演示图
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@ -87,7 +87,7 @@ npm run build:prod
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 参与贡献
|
||||
## 7、参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
|
@ -1,249 +0,0 @@
|
||||
<!-- 联想输入框+选择 -->
|
||||
<template>
|
||||
<div>
|
||||
<el-autocomplete
|
||||
v-model="targetName"
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
:placeholder="placeholder"
|
||||
:trigger-on-focus="false"
|
||||
:disabled="disabled"
|
||||
:size="size?'small':'default'"
|
||||
:clearable="clearable"
|
||||
@select="handleSelect">
|
||||
<template #append>
|
||||
<el-button @click="showSelect">
|
||||
<el-icon>
|
||||
<search/>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 自定义下拉选项数据格式-->
|
||||
<template #default="{ item }" v-if="type === 'employee' || type === 'customer'">
|
||||
<span>{{ item.name }}</span> - <span>{{ item.value }}</span>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
|
||||
|
||||
<!-- <el-input v-model="targetId" style="display: none" />-->
|
||||
<!-- <employee-select v-if="employeeSelectVisible" ref="employeeSelectRef" @employeeSelect="employeeSelectHandle"/>-->
|
||||
<customer-select v-if="customerSelectVisible" ref="customerSelectRef" @customerSelect="customerSelectHandle"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// import EmployeeSelect from '@/components/employee-select'
|
||||
// import {getEmployee,listEmployee} from '@/api/employee/employee'
|
||||
import CustomerSelect from '@/components/CustomerSelect'
|
||||
import {listCadre} from '@/api/check/cadre'
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
// 透传参数,无实际用途,为了标识同一个页面多个相同的组件 子组件到父组件完整传递
|
||||
param: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
// 透传参数,无实际用途,为了标识同一个页面多个相同的组件 子组件到父组件完整传递
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
required: false
|
||||
},
|
||||
// 封装通用组件
|
||||
type: {
|
||||
type: String,
|
||||
default: 'customer',
|
||||
required: true
|
||||
},
|
||||
// 是否禁用组件
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
// 组件过滤条件
|
||||
filterWhere: {
|
||||
type: String,
|
||||
default: '',
|
||||
required: false
|
||||
},
|
||||
// 组件过滤条件
|
||||
filterObject: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
required: false
|
||||
},
|
||||
// 父组件中的employeeId
|
||||
targetIdProp: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 父组件中的employeeName
|
||||
targetNameProp: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '关键字联想',
|
||||
required: false
|
||||
},
|
||||
size: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
//const employeeSelectVisible = ref(false)
|
||||
const customerSelectVisible = ref(true)
|
||||
const timeout = ref('')
|
||||
//从表中选中的数据,如employeeId和employeeName
|
||||
const targetId = ref('')
|
||||
const targetName = ref('')
|
||||
const resultAllList = ref([])
|
||||
|
||||
const emits = defineEmits(['commonAutoCompleteSelect']);
|
||||
|
||||
watch(()=>props.targetIdProp, (val, oldVal) => {
|
||||
|
||||
if (val === null || val === undefined || val === '') {
|
||||
return false
|
||||
} else {
|
||||
targetId.value = val
|
||||
}
|
||||
if (props.type === 'employee' && props.targetIdProp && !props.targetNameProp) {
|
||||
getEmployeeName(val)
|
||||
}
|
||||
}, {immediate: true, deep: true});
|
||||
watch(()=>props.targetNameProp, (val, oldVal) => {
|
||||
if (!val) {
|
||||
targetName.value = ''
|
||||
} else {
|
||||
targetName.value = props.targetNameProp
|
||||
}
|
||||
}, {immediate: true, deep: true});
|
||||
watch(targetName, (newQuestion, oldQuestion) => {
|
||||
if (newQuestion === '' || newQuestion === undefined) {
|
||||
targetId.value = ''
|
||||
emits('commonAutoCompleteSelect', props.param, '', '')
|
||||
}
|
||||
})
|
||||
|
||||
function init() {
|
||||
nextTick(() => {
|
||||
targetName.value = ''
|
||||
})
|
||||
}
|
||||
|
||||
function showSelect() {
|
||||
if(props.disabled){
|
||||
return
|
||||
}
|
||||
if (props.type === 'customer') {
|
||||
showCustomerSelect()
|
||||
}
|
||||
}
|
||||
|
||||
// 员工选择
|
||||
function showEmployeeSelect() {
|
||||
employeeSelectVisible.value = true
|
||||
nextTick(() => {
|
||||
proxy.$refs.employeeSelectRef.init()
|
||||
})
|
||||
}
|
||||
|
||||
function employeeSelectHandle(id, name, row) {
|
||||
targetId.value = id
|
||||
targetName.value = name
|
||||
emits('commonAutoCompleteSelect', props.param, id, name, row, props.index)
|
||||
}
|
||||
|
||||
//根据employeeId获取employeeName
|
||||
function getEmployeeName(val) {
|
||||
if (val === undefined || val === null || val === 'null') {
|
||||
return false
|
||||
} else {
|
||||
getEmployee(targetId.value).then(res => {
|
||||
if (res.code === 200) {
|
||||
targetName.value = res.data?res.data.employeeName:''
|
||||
}
|
||||
})
|
||||
proxy.$emit('commonAutoCompleteSelect', props.param, targetId.value, targetName.value)
|
||||
}
|
||||
}
|
||||
// 客户选择
|
||||
function showCustomerSelect() {
|
||||
customerSelectVisible.value = true
|
||||
nextTick(() => {
|
||||
// proxy.$refs.customerSelectRef.dataForm.value.customerId = props.filterWhere
|
||||
proxy.$refs.customerSelectRef.init()
|
||||
})
|
||||
}
|
||||
|
||||
function customerSelectHandle(id, name, row) {
|
||||
targetId.value = id
|
||||
targetName.value = name
|
||||
emits('commonAutoCompleteSelect', props.param, id, name, row, props.index)
|
||||
}
|
||||
|
||||
|
||||
// 触发联想搜索------------------
|
||||
function querySearchAsync(queryValue, cb) {
|
||||
if (props.type === 'customer'
|
||||
|| props.type === 'employee'
|
||||
) {
|
||||
searchAssociate(queryValue, cb)
|
||||
}
|
||||
}
|
||||
|
||||
// KeyUp客户联想输入查询(搜索中输入联系词时触发)
|
||||
function searchAssociate(queryValue, cb) {
|
||||
if (queryValue === '' || queryValue === undefined) return
|
||||
if (props.type === 'customer') {
|
||||
listCadre({customerName: queryValue}).then((res) => {
|
||||
resultAllList.value = loadQueryData(res)
|
||||
cb(resultAllList.value)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//联想查询结果格式化(返回的是{id,name,value})
|
||||
function loadQueryData(res) {
|
||||
let serier = []
|
||||
if (res.rows) {
|
||||
for (let i = 0, l = res.rows.length; i < l; i++) {
|
||||
let tempList = {
|
||||
'id': res.rows[i].id
|
||||
}
|
||||
|
||||
if (props.type === 'customer') {
|
||||
tempList.name = res.rows[i].customerName
|
||||
tempList.value = res.rows[i].customerName
|
||||
}
|
||||
|
||||
serier.push(tempList)
|
||||
}
|
||||
if (res.rows.length === 0) {
|
||||
serier.push({'value': '无查询数据'})
|
||||
}
|
||||
}
|
||||
return serier
|
||||
}
|
||||
|
||||
// 点击联想下拉列表触发
|
||||
function handleSelect(item) {
|
||||
emits('commonAutoCompleteSelect', props.param, item.id, item.value, item, props.index)
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
@ -1,169 +0,0 @@
|
||||
<!-- 客户选择组件 -->
|
||||
<template>
|
||||
<el-dialog width="1010px"
|
||||
v-model="dialogVisible"
|
||||
:fullscreen="isFullScreen"
|
||||
append-to-body>
|
||||
<el-form :inline="true" :model="queryParams" class="demo-form-inline" @submit.prevent>
|
||||
<el-form-item label="客户姓名">
|
||||
<el-input v-model="queryParams.cadreName" placeholder="姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="dataList" border stripe @row-click="rowClick" highlight-current-row v-loading="dataListLoading">
|
||||
<el-table-column label="编号" align="center" prop="cadreId" v-show="false"/>
|
||||
<el-table-column label="姓名" align="center" prop="cadreName" />
|
||||
<el-table-column label="部门" align="center" prop="dept.deptName" />
|
||||
<el-table-column label="性别" align="center" prop="cadreGender">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_user_gender" :value="scope.row.cadreGender"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="纪检岗位" align="center" prop="cadreCheckpost">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_yes_no" :value="scope.row.cadreCheckpost"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否在职" align="center" prop="cadreOnjob">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_yes_no" :value="scope.row.cadreOnjob"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--注释代码 全屏-->
|
||||
<template v-slot:title>
|
||||
<div>
|
||||
<span class="el-dialog__title">选择客户</span>
|
||||
<el-tag v-if="id" ref="employeeTag" type="success">{{ name }}</el-tag>
|
||||
<button type="button" @click="isFullScreen = !isFullScreen" aria-label="Close" class="el-dialog__headerbtn"
|
||||
style="right: 40px">
|
||||
<i class="el-dialog__close iconfont icon-sky-quanping3"></i>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listCadre } from "@/api/check/cadre";
|
||||
import {reactive, ref, toRefs, nextTick, getCurrentInstance} from "vue"
|
||||
const {proxy} = getCurrentInstance()
|
||||
const { sys_yes_no, sys_user_gender } = proxy.useDict('sys_yes_no', 'sys_user_gender');
|
||||
|
||||
|
||||
const dataListLoading = ref(false)
|
||||
const dataList = ref([])
|
||||
// const pageIndex = ref(1)
|
||||
// const pageSize = ref(10)
|
||||
// 总条数
|
||||
const total = ref(0);
|
||||
const dialogVisible = ref(false)
|
||||
const isFullScreen = ref(false)
|
||||
const id = ref('')
|
||||
const name = ref('')
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cadreName: null
|
||||
}
|
||||
})
|
||||
const {queryParams} = toRefs(data)
|
||||
|
||||
const emit = defineEmits(["customerSelect"])
|
||||
|
||||
defineExpose({init})
|
||||
|
||||
function initData() {
|
||||
id.value = ''
|
||||
name.value = ''
|
||||
queryParams.value.cadreName = ''
|
||||
}
|
||||
|
||||
function init() {
|
||||
dialogVisible.value = true
|
||||
nextTick(() => {
|
||||
isFullScreen.value = false
|
||||
initData()
|
||||
getDataList()
|
||||
})
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
function getDataList() {
|
||||
dataListLoading.value = true
|
||||
listCadre(queryParams.value).then(response => {
|
||||
if (response && response.code === 200) {
|
||||
dataList.value = response.rows;
|
||||
total.value = response.total;
|
||||
} else {
|
||||
dataList.value = []
|
||||
total.value = 0
|
||||
}
|
||||
dataListLoading.value = false
|
||||
});
|
||||
|
||||
// listCadre({
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
// cadreName: queryParams.value.cadreName
|
||||
// }).then(response => {
|
||||
// if (response && response.code === 200) {
|
||||
// dataList.value = response.data.records
|
||||
// totalPage.value = response.data.total
|
||||
// } else {
|
||||
// dataList.value = []
|
||||
// totalPage.value = 0
|
||||
// }
|
||||
// dataListLoading.value = false
|
||||
// })
|
||||
}
|
||||
|
||||
// 每页数
|
||||
function sizeChangeHandle(val) {
|
||||
pageSize.value = val
|
||||
pageIndex.value = 1
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 当前页
|
||||
function currentChangeHandle(val) {
|
||||
pageIndex.value = val
|
||||
getDataList()
|
||||
}
|
||||
function rowClick(row, event, column) {
|
||||
name.value = row.cadreName
|
||||
id.value = row.cadreId
|
||||
|
||||
dialogVisible.value = false
|
||||
emit('customerSelect', id.value, name.value, row)
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-dialog__body {
|
||||
padding: 10px 20px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
@ -189,7 +189,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await getConfigKey("sys.oss.previewListResource");
|
||||
previewListResource.value = res?.data === undefined ? true : res.data === 'true';
|
||||
previewListResource.value = res?.data === undefined ? true : res.data === "true";
|
||||
const response = await listOss(proxy?.addDateRange(queryParams.value, dateRangeCreateTime.value, "CreateTime"));
|
||||
ossList.value = response.rows;
|
||||
total.value = response.total;
|
||||
|
Loading…
Reference in New Issue
Block a user