Merge pull request 'master' (#882) from master into prod

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/882
This commit is contained in:
2024-10-26 13:03:36 +00:00
9 changed files with 43 additions and 30 deletions

View File

@@ -84,7 +84,6 @@ const getSummaries = (param) => {
// }
const exportExcelHandler = () => {
shareExportExcel(route.query.id).then(res => {
console.log(res)
let fileName = `科技创新项目费用分摊表-${props.allocationName}.zip`
const blob = new Blob([res.data])
let a = document.createElement('a')

View File

@@ -239,7 +239,6 @@ const handleAgreePlan = async () => {
state: true
}
console.log('params', params)
const res = await approvePlan(params)
ElNotification({
title: '提示',

View File

@@ -67,7 +67,6 @@ const handleRemove = (file) => {
}
const beforeUpload = () => {
// loading.value = true
console.log('水电费水电费,beforeUpload')
return true
}
const httpRequestHandle = (param) => {

View File

@@ -143,7 +143,6 @@ const choosePreProcess = () => {
}
const getPreProcessList = () => {
console.log('getPreProcessList')
loading.value = true
getPreProcess().then(res => {
loading.value = false

View File

@@ -121,7 +121,6 @@ const init = reactive({
// }),
},
file_picker_callback: (callback, value, meta) => {
console.log('callback, value, meta',callback, value, meta)
// 使用案例http://tinymce.ax-z.cn/general/upload-images.php
// meta.filetype //根据这个判断点击的是什么file image media
let filetype; //限制文件的上传类型,需要什么就添加什么的后缀
@@ -154,7 +153,6 @@ const init = reactive({
// return;
// }
res = JSON.parse(xhr.responseText);
console.log(res);
ElNotification({
title: '提示',
message: res.code === 1000 ? '上传成功' : '上传失败',

View File

@@ -46,7 +46,6 @@ const previewFile = () => {
loading.value = false;
});
}).catch((error) => {
console.log(error);
});
};

View File

@@ -33,11 +33,9 @@ export function downLoadExcel(url,params) {
responseType: 'blob',
headers: {'Authorization': getToken()}
}).then(res => {
console.log(res)
try {
resolveBlob(res, mimeMap.xlsx)
}catch (e) {
console.log(res)
ElMessage.error(res.data.msg)
}
})
@@ -55,7 +53,7 @@ export function resolveBlob(res, mimeType) {
let reg = /fileName=([^&]+)/;
let contentDisposition = decodeURI(res.headers['content-disposition'])
let result = reg.exec(contentDisposition)
console.log(result)
// console.log(result)
let fileName = result[1]
fileName = fileName.replace(/\"/g, '')
aLink.href = URL.createObjectURL(blob)
@@ -63,4 +61,4 @@ export function resolveBlob(res, mimeType) {
document.body.appendChild(aLink)
aLink.click()
document.body.appendChild(aLink)
}
}

View File

@@ -6,7 +6,6 @@ import {ElLoading} from 'element-plus'
const authStore = useAuthStore()
const router = useRouter();
const tokenValue = reactive(router.currentRoute.value.query.token)
console.log('tokenValue', tokenValue)
const init = () => {
const loading = ElLoading.service({
lock: true,
@@ -16,7 +15,6 @@ const init = () => {
if (authStore.casToken(tokenValue)) {
loading.close()
const toView = sessionStorage.getItem('toView')
console.log(toView, 'toView');
if (toView) {
let parse = JSON.parse(toView);
window.location.href = window.location.origin + parse.path + parse.query

View File

@@ -1,12 +1,12 @@
<template>
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px" ></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"
@selectionChange="selectionChange"></fvTable>
</template>
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {addPlan} from "@/api/project-demand/summary";
import {addPlan,getRequirementName} from "@/api/project-demand/summary";
const tableIns = ref()
const router = useRouter()
@@ -40,17 +40,37 @@ const shortcuts = [
},
},
]
const searchConfig = reactive([
const searchConfig = ref([
{
label: '征集名称',
prop: 'requirementName',
props: {
placeholder: '请输入征集名称',
clearable: true,
checkStrictly: true
filterable: true,
options: [],
remote: true,
remoteMethod:async (val)=>{
// requirementNameValue.value=val
// search({requirementName:val})
if(val){
const res=await getRequirementName(val)
if(res.code==1000){
let optionObj={}
let options=[]
res.data.forEach(item=>{
optionObj={
value:item,
label:item
}
options.push(optionObj)
})
searchConfig.value.find(item => item.prop == 'requirementName').props.options = options
}
}
}
},
component: 'el-input',
colProps: {}
component: shallowRef(fvSelect),
},
{
label: '项目类型',
@@ -219,7 +239,7 @@ const tableConfig = reactive({
prop: 'projectImpact',
label: '项目影响',
align: 'center',
width: 100,
width: 120,
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.projectImpact !== null) {
@@ -237,6 +257,20 @@ const tableConfig = reactive({
return row.startTime + ' 至 ' + row.endTime
}
},
// {
// prop: 'approveName',
// label: '当前审批节点',
// align: 'center',
// width: 120,
// currentRender: ({row, index}) => {
// if (row.state == '1') {
// return <span>{row.approveName}</span>
// } else {
// return <span>{row.taskNode}</span>
// }
// }
// },
{
prop: 'state',
label: '状态',
@@ -368,16 +402,6 @@ const handleEdit = (row) => {
}
})
}
// const handleDetail = (row) => {
// router.push({
// name: 'Summary/detail',
// query: {
// id: row.requirementId == null ? '-1' : row.requirementId,
// projectId: row.projectId,
// state: row.state
// }
// })
// }
const handleDetail = (row) => {
router.push({