diff --git a/index.html b/index.html index 7056f8c..264b8e9 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + 科研管理平台
diff --git a/public/favicon.ico b/public/favicon.ico index df36fcf..9d77955 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/api/custom-query/adapter.js b/src/api/custom-query/adapter.js deleted file mode 100644 index 0d821bc..0000000 --- a/src/api/custom-query/adapter.js +++ /dev/null @@ -1,61 +0,0 @@ -import request from '@/utils/request.js' - -// 请求数据源适配器list -export const getDataAdapterList = (params) => { - return request({ - url: '/custom/query/query/adapter', - method: 'get', - params - }) -} - -//获取到option列表 -export const getDataAdapterOpt = () => { - return request({ - url: '/custom/query/query/adapter/option', - method: 'get', - }) -} - -// 获取数据源适配器详情 -export const getDataAdapterDetails = (dataAdapterId) => { - return request({ - url: '/custom/query/query/adapter/' + dataAdapterId, - method: 'get' - }) -} - -// 新增数据源适配器 -export const addDataAdapter = (data) => { - return request({ - url: '/custom/query/query/adapter', - method: 'post', - data - }) -} -//模拟执行适配器函数 -export const executeAdapterMockData = (data) => { - return request({ - url: '/custom/query/query/adapter/mock/execute', - method: 'post', - data - }) -} - -// 修改数据源适配器 -export const editDataAdapter = (data) => { - return request({ - url: '/custom/query/query/adapter', - method: 'put', - data - }) -} - -// 删除数据源适配器 -export const delDataAdapter =(dataAdapterId) => { - return request({ - url: '/custom/query/query/adapter/' + dataAdapterId, - method: 'delete' - }) -} - diff --git a/src/api/custom-query/datamodel.js b/src/api/custom-query/datamodel.js deleted file mode 100644 index 45ad7c0..0000000 --- a/src/api/custom-query/datamodel.js +++ /dev/null @@ -1,66 +0,0 @@ -import request from '@/utils/request.js' - -// 请求数据源管理list -export const getDataSourceManageList = (params) => { - return request({ - url: '/custom/query/datasource', - method: 'get', - params - }) -} - -//获取到option列表 -export const getDataSourceManageOpt = () => { - return request({ - url: '/custom/query/datasource/option', - method: 'get', - }) -} - -// 获取数据源管理详情 -export const getDataSourceManageDetails = (queryDataSourceId) => { - return request({ - url: '/custom/query/datasource/' + queryDataSourceId, - method: 'get' - }) -} -// 获取数据源管理详情 -export const getDataSourceType = () => { - return request({ - url: '/custom/query/datasource/option/type', - method: 'get' - }) -} -// 获取校验规则option -export const getDataSourceOption = () => { - return request({ - url: '/custom/query/datasource/option', - method: 'get' - }) -} -// 新增数据源管理 -export const addDataSourceManage = (data) => { - return request({ - url: '/custom/query/datasource', - method: 'post', - data - }) -} - -// 修改数据源管理 -export const editDataSourceManage = (data) => { - return request({ - url: '/custom/query/datasource', - method: 'put', - data - }) -} - -// 删除数据源管理 -export const delDataSourceManage =(queryDataSourceId) => { - return request({ - url: '/custom/query/datasource/' + queryDataSourceId, - method: 'delete' - }) -} - diff --git a/src/api/custom-query/echarts.js b/src/api/custom-query/echarts.js deleted file mode 100644 index 5102760..0000000 --- a/src/api/custom-query/echarts.js +++ /dev/null @@ -1,36 +0,0 @@ -import request from '@/utils/request.js' - -export const getEchartsList = (params) => { - return request({ - url: '/custom/query/echarts', - method: 'get', - params - }) -} -export const getEchartsDetails = (echartsId) => { - return request({ - url: '/custom/query/echarts/' + echartsId, - method: 'get' - }) -} - -export const addEcharts = (data) => { - return request({ - url: '/custom/query/echarts', - method: 'post', - data - }) -} -export const editEcharts = (data) => { - return request({ - url: '/custom/query/echarts', - method: 'put', - data - }) -} -export const delEcharts=(echartsIdList) => { - return request({ - url: '/custom/query/echarts/' + echartsIdList, - method: 'delete' - }) -} diff --git a/src/api/custom-query/query-page.js b/src/api/custom-query/query-page.js deleted file mode 100644 index f25073d..0000000 --- a/src/api/custom-query/query-page.js +++ /dev/null @@ -1,22 +0,0 @@ -import request from '@/utils/request.js' - -// 获取查询页面信息 -export const getPageInfo = (queryId, params) => { - return request({ - url: '/custom/query/page/' + queryId, - method: 'get', - params: params - }) -} - -// 获取到页面数据 -export const getPageData = (params, data) => { - return request({ - url: '/custom/query/page/data', - method: 'post', - params: params, - data: data - }) -} - - diff --git a/src/api/custom-query/sql-search.js b/src/api/custom-query/sql-search.js deleted file mode 100644 index 1d14914..0000000 --- a/src/api/custom-query/sql-search.js +++ /dev/null @@ -1,37 +0,0 @@ -import request from '@/utils/request.js' - -export const getSqlInfo = (queryId) => { - return request({ - url: '/custom/query/sql/search/' + queryId, - method: 'get' - }) -} - -export const previewSql= (data,pageInfo) => { - return request({ - url:'/custom/query/sql/search/preview' , - method: 'put', - data, - params:pageInfo - }) -} -export const saveSqlQueryParams = (data) => { - return request({ - url: '/custom/query/sql/search', - method: 'post', - data - }) -} -export const sqlToLine = (data) => { - return request({ - url: '/custom/query/sql/search/publish', - method: 'post', - data - }) -} -export const sqlDownLine = (queryId) => { - return request({ - url: '/custom/query/sql/search/cancel/'+queryId, - method: 'put' - }) -} diff --git a/src/api/custom-query/sql.js b/src/api/custom-query/sql.js deleted file mode 100644 index d66bda8..0000000 --- a/src/api/custom-query/sql.js +++ /dev/null @@ -1,42 +0,0 @@ -import request from '@/utils/request.js' - -// 获取Sql List -export const getSqlList = (params) => { - return request({ - url: '/custom/query/sql/uni', - method: 'get', - params - }) -} -// 获取Sql详情 -export const getSqlDetails = (sqlId) => { - return request({ - url: '/custom/query/sql/uni/' + sqlId, - method: 'get' - }) -} -// 新增Sql -export const addSql = (data) => { - return request({ - url: '/custom/query/sql/uni', - method: 'post', - data - }) -} - -// 修改Sql -export const editSql = (data) => { - return request({ - url: '/custom/query/sql/uni', - method: 'put', - data - }) -} - -// 删除Sql -export const delSql =(idList) => { - return request({ - url: '/custom/query/sql/uni/' + idList, - method: 'delete' - }) -} diff --git a/src/api/custom-query/table.js b/src/api/custom-query/table.js deleted file mode 100644 index 63335e1..0000000 --- a/src/api/custom-query/table.js +++ /dev/null @@ -1,70 +0,0 @@ -import request from '@/utils/request.js' - -//获取表格维护列表 -export const getTableInfo = (params) => { - return request({ - url: '/custom/query/table', - method: 'get', - params - }) -} -export const getDynamicTableList = (params) => { - return request({ - url: '/custom/query/dynamic/table', - method: 'get', - params - }) -} -//根据数据源获取到表格option信息 -export const getAssociationTableOption = (datasourceId) => { - return request({ - url: '/custom/query/table/option/' + datasourceId, - method: 'get' - }) -} -//获取表格字段option信息 -export const getAssociationFieldOption = (tableId) => { - return request({ - url: '/custom/query/table/column/option/' + tableId, - method: 'get' - }) -} -// 获取详细信息 -export const getTableDetails = (tableId) => { - return request({ - url: '/custom/query/table/' + tableId, - method: 'get' - }) -} -// 导入表信息 -export const addTableInfo= (data) => { - return request({ - url: '/custom/query/table/import', - method: 'post', - data - }) -} - -// 修改自定义查询表格维护 -export const editTable = (data) => { - return request({ - url: '/custom/query/table', - method: 'put', - data - }) -} -// 同步数据库 -export const syncDatabase = (tableId) => { - return request({ - url: '/custom/query/table/sync/'+ tableId, - method: 'put' - }) -} - -// 删除自定义查询表格维护 -export const delTable=(tableId) => { - return request({ - url: '/custom/query/table/' + tableId, - method: 'delete' - }) -} diff --git a/src/api/custom-query/topo-search.js b/src/api/custom-query/topo-search.js deleted file mode 100644 index a4cb4df..0000000 --- a/src/api/custom-query/topo-search.js +++ /dev/null @@ -1,47 +0,0 @@ -import request from '@/utils/request.js' - -// 获取topo拖拽数据信息 -export const getTopoDragInfo = (queryId) => { - return request({ - url: '/custom/query/topo/search/' + queryId, - method: 'get' - }) -} -export const saveTopo = (data) => { - return request({ - url: '/custom/query/topo/search', - method: 'post', - data - }) -} -export const previewTopo = (data,pageInfo) => { - return request({ - url: '/custom/query/topo/search/preview', - method: 'post', - data, - params:pageInfo, - }) -} -export const previewTopologyData = (data,pageInfo) => { - return request({ - url: '/custom/query/topo/search/preview/data', - method: 'post', - data, - params:pageInfo, - }) -} - -export const topoToLine = (data) => { - return request({ - url: '/custom/query/topo/search/publish', - method: 'post', - data - }) -} - -export const topoDownLine = (queryId) => { - return request({ - url: '/custom/query/topo/search/cancel/'+queryId, - method: 'put' - }) -} diff --git a/src/api/custom-query/topo.js b/src/api/custom-query/topo.js deleted file mode 100644 index 2de4b31..0000000 --- a/src/api/custom-query/topo.js +++ /dev/null @@ -1,42 +0,0 @@ -import request from '@/utils/request.js' - -// 获取topoList -export const getTopoList = (params) => { - return request({ - url: '/custom/query/topo/uni', - method: 'get', - params - }) -} -// 获取topo详情 -export const getTopoDetails = (topoId) => { - return request({ - url: '/custom/query/topo/uni/' + topoId, - method: 'get' - }) -} -// 新增topo -export const addTopo = (data) => { - return request({ - url: '/custom/query/topo/uni', - method: 'post', - data - }) -} - -// 修改topo -export const editTopo = (data) => { - return request({ - url: '/custom/query/topo/uni', - method: 'put', - data - }) -} - -// 删除topo -export const delTopo =(idList) => { - return request({ - url: '/custom/query/topo/uni/' + idList, - method: 'delete' - }) -} diff --git a/src/api/user/user.js b/src/api/user/user.js index 96d078f..e0a84c1 100644 --- a/src/api/user/user.js +++ b/src/api/user/user.js @@ -56,8 +56,8 @@ export const getUserDetail = (userId) => { // 操作 export const operate = (data, type) => { // console.log(type ,'type'); - if(data.userId && type !== '0') return editUser(data) - else if(type == '0') return editUserOA(data) + if (data.userId && type !== '0') return editUser(data) + else if (type == '0') return editUserOA(data) return addUser(data) } @@ -186,16 +186,23 @@ export const unbindAllUserByPost = (postId) => { }) } -export const bindAccount=(data)=>{ +export const bindAccount = (data) => { return request({ url: '/admin/mosr/user/bind/account', method: 'post', data }) } -export const getBindAccount=(userId)=>{ +export const getBindAccount = (userId) => { return request({ url: `/admin/mosr/user/bind/account/info/${userId}`, method: 'get' }) } + +export const checkMatrix = (userId) => { + return request({ + url: `/admin/mosr/user/matrix?userId=` + userId, + method: 'get' + }) +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index da3e9b3..93b3576 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -551,12 +551,13 @@ html, body, #app, .el-container, .el-aside, .el-main { } .approval-record { + //padding-top: 10px; padding-bottom: 30px; position: relative; .approval-title { display: flex; align-items: center; - justify-content: space-between; + //justify-content: space-between; .diagram { display: flex; @@ -564,6 +565,7 @@ html, body, #app, .el-container, .el-aside, .el-main { float: right; .base-title { + margin-left: 10px; margin-right: 10px; } diff --git a/src/components/AttachmentUpload.vue b/src/components/AttachmentUpload.vue index 5a615de..70bb806 100644 --- a/src/components/AttachmentUpload.vue +++ b/src/components/AttachmentUpload.vue @@ -1,8 +1,8 @@ + + + + + + + + + + @@ -50,12 +57,20 @@ const props = defineProps({ }, showTable: { type: Boolean, - default: true + default: false + }, + showSingleTable: { + type: Boolean, + default: false }, preview: { type: Boolean, default: false }, + singleList: { + type: Array, + default: [] + }, otherFileList: { type: Array, default: [] @@ -63,6 +78,14 @@ const props = defineProps({ formData: { type: Object, default: {} + }, + labelPosition: { + type: String, + default: '' + }, + tag: { + type: String, + default: '' } }) const emit = defineEmits(["getAttachment", "getOtherFile"]) @@ -128,6 +151,69 @@ const tableConfig = reactive({ } ] }) +const singleTableConfig = reactive({ + columns: [ + { + prop: 'index', + type: 'index', + label: '序号', + align: 'center', + width: '80', + }, + { + prop: 'originalFileName', + label: '文件名', + align: 'center', + }, + { + prop: 'tag', + label: '标签', + align: 'center' + }, + { + prop: 'size', + label: '文件大小', + align: 'center', + currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB') + }, + { + prop: 'oper', + label: '操作', + align: 'center', + showOverflowTooltip: false, + currentRender: ({row, index}) => { + let btn = [] + btn.push({label: '下载', func: () => handleDownload(row), type: 'primary'}) + // if (row.newFile) { + // btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'}) + // } + return ( +
+ { + btn.map(item => ( + item.func()} + link + > + {item.label} + + )) + } + { + row.newFile || props.preview || !props.preview ? + handleSingleDelete(row)}/> + : '' + } +
+ ) + } + } + ] +}) +const fileUploadRef=ref() const rules = reactive({ attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}], }) @@ -135,30 +221,44 @@ const applyForm = ref() const singleFile = ref(props.formData.singleFile) const isSingleFile = ref(false) const allFileList = ref([]) -watch(() => props.showTable, (newVal) => { - props.showTable = newVal +const deleteFileVal = ref({}) +const singleFileList = ref([]) +// if (props.formData.fileList !== null && props.formData.fileList?.length > 0) { +// allFileList.value = props.formData.fileList +// } +watch(() => props.showSingleTable, (newVal) => { + props.showSingleTable = newVal }, {deep: true}) watch(() => props.formData.fileList, (newVal) => { - // console.log('newVal-fileList', newVal) + console.log('newVal-fileList', newVal) if (props.preview) { newVal?.forEach(item => { allFileList.value.push(item) }) } +}, {immediate: true}) +// watch(() => props.otherFileList, (newVal) => { +// props.otherFileList=newVal + // if (props.preview) { + // console.log('newotherFileList', newVal,props.preview,props.formData.fileList) + // if (props.formData.fileList === null || props.formData.fileList?.length === 0) { + // allFileList.value = newVal + // } else { + // console.log('props.otherFileList',props.otherFileList) + // // props.otherFileList?.forEach(item => { + // // allFileList.value.push(item) + // // }) + // } + // } else { + // allFileList.value = newVal + // } +// }, {deep: true}) +watch(() => props.showTable, (newVal) => { + props.showTable = newVal }, {deep: true}) -watch(() => props.otherFileList, (newVal) => { - // console.log('newotherFileList', newVal, props.formData) - if (props.preview) { - if (props.formData.fileList === null || props.formData.fileList.length === 0) { - allFileList.value = newVal - } else { - newVal?.forEach(item => { - allFileList.value.push(item) - }) - } - } else { - allFileList.value = newVal - } +watch(() => props.singleList, (newVal) => { + // console.log('singleFile', newVal) + singleFileList.value = newVal }, {deep: true}) watch(() => props.formData.singleFile, (newVal) => { // console.log('singleFile', newVal) @@ -167,7 +267,7 @@ watch(() => props.formData.singleFile, (newVal) => { watch(() => isSingleFile.value, (newVal) => { isSingleFile.value = newVal }, {deep: true}) -const handleDelete = (row) => { +const handleDelete = (row, type) => { deleteFile(row.fileId).then(res => { ElNotification({ title: '提示', @@ -175,15 +275,43 @@ const handleDelete = (row) => { type: res.code === 1000 ? 'success' : 'error' }) if (res.code === 1000) { - allFileList.value.splice(allFileList.value.findIndex((item) => item.id === row.fileId), 1); + if (type === 'single') { + singleFileList.value.splice(singleFileList.value.findIndex((item) => item.fileId === row.fileId), 1); + isSingleFile.value = false + } else { + allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1); + } } }); } +const handleSingleDelete = (row) => { + // console.log('row',row) + // fileUploadRef.value.handleRemove(deleteFileVal.value.id) + handleDelete(row, 'single') +} const getAttachment = (val) => { + // console.log('getAttachment', val) isSingleFile.value = true + // deleteFileVal.value=val emit('getAttachment', val) } +const compositeParam = (item) => { + return { + fileId: item.id, + size: item.size, + originalFileName: item.originalFilename, + fileType: item.fileType, + url: item.url, + newFile: true, + tag:props.tag + } +} const getOtherFile = (val) => { + if (props.preview) { + allFileList.value.push(compositeParam(val)) + } else { + allFileList.value = props.otherFileList + } emit('getOtherFile', val) } const deleteAttachment = (val) => { diff --git a/src/components/DetailComponent/AllocationSummaryDetail.vue b/src/components/DetailComponent/AllocationSummaryDetail.vue index ccd1b78..99b20ff 100644 --- a/src/components/DetailComponent/AllocationSummaryDetail.vue +++ b/src/components/DetailComponent/AllocationSummaryDetail.vue @@ -12,11 +12,10 @@
--
- + @@ -24,16 +23,17 @@ + + diff --git a/src/layout/navbar/index.vue b/src/layout/navbar/index.vue index 642f14a..0a5618e 100644 --- a/src/layout/navbar/index.vue +++ b/src/layout/navbar/index.vue @@ -5,9 +5,9 @@
-
+
{{ userInfo.nickName }} -
{{ userInfo.nickName }} +
{{ userInfo.nickName }} diff --git a/src/layout/siderbar/index.vue b/src/layout/siderbar/index.vue index ef29c10..90c2474 100644 --- a/src/layout/siderbar/index.vue +++ b/src/layout/siderbar/index.vue @@ -1,6 +1,6 @@