Compare commits
62 Commits
zhangkaihu
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 65a852d380 | |||
| 0efd2a7db2 | |||
| 83c01575e6 | |||
| 5808145c01 | |||
| e1543e05b4 | |||
| d20b968307 | |||
| 7735d20021 | |||
| 831f017482 | |||
| 827978f7bd | |||
| b16893955d | |||
| 41830600bf | |||
| 76a5ebbeb9 | |||
| a26088a756 | |||
| 4229cb9d74 | |||
| a64715717b | |||
| f18ae8b1ee | |||
| 19c566cd0d | |||
| 3c459f4be2 | |||
| 1ad6e021a1 | |||
| 6cbc3f83e6 | |||
| 9560a964e7 | |||
| 94bd9930b6 | |||
| f2e80e4874 | |||
| 62e98b9e3f | |||
|
|
a620b248f4 | ||
|
|
e2e4d3226f | ||
|
|
af2788583f | ||
|
|
ba58089e94 | ||
|
|
88dcbf3196 | ||
| 9092b1e960 | |||
| 3ddd24cc70 | |||
| 1fb3345afe | |||
| d1fe0faad1 | |||
| 64d10a711d | |||
| 1d5e8a23ed | |||
| 2973bbe6a7 | |||
|
|
8974282b44 | ||
|
|
81705482a8 | ||
| 9cc8d337be | |||
| 973dc0f2e4 | |||
| db696ca389 | |||
| 64e2ff0647 | |||
| 53b0e4b240 | |||
| 17010a15a3 | |||
| f74743c00f | |||
| e14b6d676c | |||
| 3ecea87de8 | |||
| cb290acf09 | |||
| f6cabee345 | |||
| 8b03d62a75 | |||
| 1674d1acd0 | |||
| 41a455338f | |||
| 5b67f97021 | |||
| a451f7481e | |||
| 2400660b1f | |||
| 26e0009ebd | |||
| 34b0b88f07 | |||
| 37a3cd75a2 | |||
| 81d4002034 | |||
| 5c000cdba3 | |||
|
|
5dcdbe9ae1 | ||
|
|
bf2f28960f |
@@ -29,8 +29,9 @@ steps:
|
|||||||
- npm config set registry https://registry.npmmirror.com
|
- npm config set registry https://registry.npmmirror.com
|
||||||
- set NODE_OPTIONS=--openssl-legacy-provider
|
- set NODE_OPTIONS=--openssl-legacy-provider
|
||||||
- npm install --legacy-peer-deps
|
- npm install --legacy-peer-deps
|
||||||
- npm install patch-package
|
- npm install codemirror
|
||||||
- npx patch-package
|
# - npm install patch-package
|
||||||
|
# - npx patch-package
|
||||||
# - npm info unplugin-icons
|
# - npm info unplugin-icons
|
||||||
- npm list package-manager-detector
|
- npm list package-manager-detector
|
||||||
# - npm install unplugin-icons@latest @antfu/install-pkg@latest package-manager-detector@latest
|
# - npm install unplugin-icons@latest @antfu/install-pkg@latest package-manager-detector@latest
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ app_version=$DRONE_COMMIT
|
|||||||
echo ${app_version}
|
echo ${app_version}
|
||||||
# 打包编译docker镜像
|
# 打包编译docker镜像
|
||||||
echo '----build image start----'
|
echo '----build image start----'
|
||||||
|
echo ${group_name}/${app_name}
|
||||||
docker build -t ${group_name}/${app_name} .
|
docker build -t ${group_name}/${app_name} .
|
||||||
echo '----build image success----'
|
echo '----build image success----'
|
||||||
docker tag ${group_name}/${app_name} $REGISTRY/$REGISTRY_NAMESPACE/${app_name}:${app_version}
|
docker tag ${group_name}/${app_name} $REGISTRY/$REGISTRY_NAMESPACE/${app_name}:${app_version}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "mosr-web",
|
"name": "mosr-web",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build --config vite.config.mjs",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export const uploadCollectAttachment= (data) => {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 年度计划
|
// 项目计划
|
||||||
export const addPlan= (data) => {
|
export const addPlan= (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/annual/plan',
|
url: '/workflow/annual/plan',
|
||||||
@@ -107,10 +107,72 @@ export const approvePlan= (data) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export const getProjectOption = () => {
|
export const getProjectOption = (projectName) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/mosr/requirement/master',
|
url: '/workflow/mosr/requirement/master',
|
||||||
method: "get"
|
method: "get",
|
||||||
|
params:{
|
||||||
|
projectName:projectName
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getMasterProjectNameOption = (masterProjectName) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/payment/master/option',
|
||||||
|
method: "get",
|
||||||
|
params:{
|
||||||
|
masterProjectName:masterProjectName
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getSubprojectNameOption = (subProjectName) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/payment/sub/option',
|
||||||
|
method: "get",
|
||||||
|
params:{
|
||||||
|
subProjectName:subProjectName
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getExpenseMasterProjectNameOption = (masterProjectName) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/rd/expense/master/option',
|
||||||
|
method: "get",
|
||||||
|
params:{
|
||||||
|
masterProjectName:masterProjectName
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getExpenseSubprojectNameOption = (subProjectName) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/rd/expense/sub/option',
|
||||||
|
method: "get",
|
||||||
|
params:{
|
||||||
|
subProjectName:subProjectName
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getCostMasterProjectNameOption = (masterProjectName) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/cost/share/master/option',
|
||||||
|
method: "get",
|
||||||
|
params:{
|
||||||
|
masterProjectName:masterProjectName
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getCostSubprojectNameOption = (subProjectName) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/cost/share/sub/option',
|
||||||
|
method: "get",
|
||||||
|
params:{
|
||||||
|
subProjectName:subProjectName
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ a {
|
|||||||
html, body, #app, .el-container, .el-aside, .el-main {
|
html, body, #app, .el-container, .el-aside, .el-main {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.el-date-editor--year{
|
||||||
|
width: 100%!important;
|
||||||
|
}
|
||||||
|
|
||||||
.el-breadcrumb__item {
|
.el-breadcrumb__item {
|
||||||
line-height: 65px;
|
line-height: 65px;
|
||||||
|
|||||||
@@ -426,6 +426,7 @@ const handleDelete = (row, type) => {
|
|||||||
allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||||
isHaveOneFile.value = !(allFileList.value && allFileList.value?.length == 0);
|
isHaveOneFile.value = !(allFileList.value && allFileList.value?.length == 0);
|
||||||
console.log('allFileList.value',allFileList.value)
|
console.log('allFileList.value',allFileList.value)
|
||||||
|
localStorage.setItem('deleteFileRow', JSON.stringify(row))
|
||||||
if (localStorage.getItem('collectData')) {
|
if (localStorage.getItem('collectData')) {
|
||||||
let collectData = JSON.parse(localStorage.getItem('collectData'))
|
let collectData = JSON.parse(localStorage.getItem('collectData'))
|
||||||
collectData.fileList = allFileList.value
|
collectData.fileList = allFileList.value
|
||||||
@@ -462,6 +463,7 @@ const getOtherFile = (val) => {
|
|||||||
} else {
|
} else {
|
||||||
allFileList.value = _otherFileListValue.value
|
allFileList.value = _otherFileListValue.value
|
||||||
}
|
}
|
||||||
|
|
||||||
isHaveOneFile.value = true
|
isHaveOneFile.value = true
|
||||||
emit('getOtherFile', val)
|
emit('getOtherFile', val)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,8 @@ const handleDownload = (row) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const deleteSingleFile = (row) => {
|
const deleteSingleFile = (row) => {
|
||||||
console.log("🚀 ~ file: ", row)
|
console.log("🚀 ~ file: ", row,otherAttachmentList.value)
|
||||||
|
console.log("🚀 row.newFile ", row.newFile)
|
||||||
deleteFile(row.fileId).then(res => {
|
deleteFile(row.fileId).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -183,13 +184,14 @@ const deleteSingleFile = (row) => {
|
|||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
if (row.newFile) {
|
if (row.newFile) {
|
||||||
const finalList = getLocalList().filter(item => item.fileId !== row.fileId);
|
const finalList = getLocalList().filter(item => item.fileId !== row.fileId);
|
||||||
|
otherAttachmentList.value.splice(otherAttachmentList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||||
localStorage.setItem(`implementAllFileList-${route.query.projectId}`, JSON.stringify(finalList))
|
localStorage.setItem(`implementAllFileList-${route.query.projectId}`, JSON.stringify(finalList))
|
||||||
} else {
|
} else {
|
||||||
otherAttachmentList.value.splice(otherAttachmentList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
otherAttachmentList.value.splice(otherAttachmentList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||||
|
allFiles.value.splice(allFiles.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAttachmentList()
|
// getAttachmentList()
|
||||||
activeName.value = 'all'
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,8 +188,8 @@
|
|||||||
@cancelOrClear="carbonCopyUserPickerOk"/>
|
@cancelOrClear="carbonCopyUserPickerOk"/>
|
||||||
|
|
||||||
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
||||||
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
|
<el-button type="danger" @click="handleRejectPlan">驳回项目计划</el-button>
|
||||||
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
|
<el-button color="#DED0B2" @click="handleAgreePlan">通过项目计划</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
:show-file-list="showFileList"
|
:show-file-list="showFileList"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:on-success="handleUploadSuccess"
|
|
||||||
:on-error="uploadError"
|
:on-error="uploadError"
|
||||||
:before-remove="beforeRemove"
|
:before-remove="beforeRemove"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
>
|
>
|
||||||
|
<!-- :on-success="handleUploadSuccess"-->
|
||||||
<el-button color="#DED0B2" :loading="loading" :disabled="disabled">上传文件</el-button>
|
<el-button color="#DED0B2" :loading="loading" :disabled="disabled">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
@@ -61,7 +61,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
const uploadRef = ref(null); // el-upload 的 ref
|
const uploadRef = ref(null); // el-upload 的 ref
|
||||||
const uploadPromises = ref([]); // 跟踪每个文件的上传状态
|
const uploadPromises = ref([]); // 跟踪每个文件的上传状态
|
||||||
const emit = defineEmits(["input", "beforeUpload","getFile", "delete"])
|
const emit = defineEmits(["input", "beforeUpload", "getFile", "delete"])
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const _value = computed({
|
const _value = computed({
|
||||||
get() {
|
get() {
|
||||||
@@ -87,14 +87,29 @@ const handleRemove = (file) => {
|
|||||||
|
|
||||||
// 文件选择变化时触发
|
// 文件选择变化时触发
|
||||||
const handleChange = (file, files) => {
|
const handleChange = (file, files) => {
|
||||||
console.log(file, files,'files')
|
const deleteFileRow = JSON.parse(localStorage.getItem('deleteFileRow'));
|
||||||
|
console.log("🚀 ~ file:deleteFileRow ", deleteFileRow, uploadFile.value)
|
||||||
|
let deleteIndex = null
|
||||||
|
if (deleteFileRow) {
|
||||||
|
deleteIndex = uploadFile.value.findIndex((item) => item.name === deleteFileRow.originalFileName && item.size === deleteFileRow.size)
|
||||||
|
console.log("🚀 ~ file:deleteIndex ", deleteIndex)
|
||||||
|
|
||||||
|
if (deleteIndex != -1) {
|
||||||
|
uploadFile.value.splice(deleteIndex, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
console.log(file, files, 'files')
|
||||||
uploadIndex.value++
|
uploadIndex.value++
|
||||||
uploadFile.value.push(file)
|
uploadFile.value.push(file)
|
||||||
|
console.log("🚀 ~ file:uploadFile.value ", uploadFile.value)
|
||||||
|
localStorage.removeItem('deleteFileRow')
|
||||||
};
|
};
|
||||||
watch(() => uploadIndex.value, (newVal) => {
|
watch(() => uploadIndex.value, (newVal) => {
|
||||||
console.log('newVal',newVal)
|
console.log('newVal', newVal)
|
||||||
startUpload(uploadFile.value); // 自动触发上传
|
startUpload(uploadFile.value); // 自动触发上传
|
||||||
},{
|
}, {
|
||||||
deep: true
|
deep: true
|
||||||
})
|
})
|
||||||
// 自定义上传逻辑
|
// 自定义上传逻辑
|
||||||
@@ -117,7 +132,7 @@ const customUpload = async (options) => {
|
|||||||
|
|
||||||
// 触发所有文件上传
|
// 触发所有文件上传
|
||||||
const startUpload = (files) => {
|
const startUpload = (files) => {
|
||||||
uploadLoading.value= ElLoading.service({
|
uploadLoading.value = ElLoading.service({
|
||||||
fullscreen: true,
|
fullscreen: true,
|
||||||
text: '文件上传中...',
|
text: '文件上传中...',
|
||||||
})
|
})
|
||||||
@@ -144,9 +159,10 @@ const startUpload = (files) => {
|
|||||||
})
|
})
|
||||||
files = []; // 清空文件列表
|
files = []; // 清空文件列表
|
||||||
uploadRef.value.clearFiles(); // 清空上传组件
|
uploadRef.value.clearFiles(); // 清空上传组件
|
||||||
|
uploadFile.value = [] // 清空文件列表
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
uploadLoading.value.close()
|
uploadLoading.value.close()
|
||||||
uploadLoading.value=null
|
uploadLoading.value = null
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -157,6 +173,7 @@ const beforeUpload = () => {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
const handleUploadSuccess = (res) => {
|
const handleUploadSuccess = (res) => {
|
||||||
|
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.code === 1000 ? '上传成功' : '上传失败',
|
message: res.code === 1000 ? '上传成功' : '上传失败',
|
||||||
@@ -166,7 +183,7 @@ const handleUploadSuccess = (res) => {
|
|||||||
showTable.value = true
|
showTable.value = true
|
||||||
let data = res.data
|
let data = res.data
|
||||||
fileList.value.push(data)
|
fileList.value.push(data)
|
||||||
emit("getFile", res.data)
|
// emit("getFile", res.data)
|
||||||
}
|
}
|
||||||
const uploadError = () => {
|
const uploadError = () => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
pageSize: {
|
pageSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 10,
|
default: 20,
|
||||||
},
|
},
|
||||||
pageSizes: {
|
pageSizes: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default(rawProps) {
|
default(rawProps) {
|
||||||
return [10, 15, 20, 30, 50]
|
return [10, 15, 20, 30, 50,100]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
small: {
|
small: {
|
||||||
@@ -58,7 +58,7 @@ const total = ref(0)
|
|||||||
//对应页数
|
//对应页数
|
||||||
const currentPage = ref(1)
|
const currentPage = ref(1)
|
||||||
//每页多少条
|
//每页多少条
|
||||||
const pageSize = ref(10)
|
const pageSize = ref(20)
|
||||||
//默认每页多少条的数组
|
//默认每页多少条的数组
|
||||||
const pageSizes = ref([])
|
const pageSizes = ref([])
|
||||||
//是否使用小型分页样式
|
//是否使用小型分页样式
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fv-table-container">
|
<div class="fv-table-container">
|
||||||
<el-button v-if="tableConfig.export && tableConfig.export.open&&changeExportPosition" @click="exportTable" color="#DED0B2"
|
<el-button v-if="tableConfig.export && tableConfig.export.open&&changeExportPosition" @click="exportTable"
|
||||||
|
color="#DED0B2"
|
||||||
style="float: left;margin-right: 10px">导出
|
style="float: left;margin-right: 10px">导出
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 表格头部按钮 -->
|
<!-- 表格头部按钮 -->
|
||||||
@@ -18,7 +19,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button v-if="tableConfig.export && tableConfig.export.open&&!changeExportPosition" @click="exportTable" color="#DED0B2"
|
<el-button v-if="tableConfig.export && tableConfig.export.open&&!changeExportPosition" @click="exportTable"
|
||||||
|
color="#DED0B2"
|
||||||
style="margin-bottom: 10px">导出
|
style="margin-bottom: 10px">导出
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 列显示配置 -->
|
<!-- 列显示配置 -->
|
||||||
@@ -93,7 +95,7 @@
|
|||||||
v-if="pagination"
|
v-if="pagination"
|
||||||
:current-page="localData.query.pageNum"
|
:current-page="localData.query.pageNum"
|
||||||
:page-size="localData.query.pageSize"
|
:page-size="localData.query.pageSize"
|
||||||
:page-sizes="[10, 20, 30, 40,50]"
|
:page-sizes="[10, 20, 30, 40,50,100]"
|
||||||
:total="localData.total"
|
:total="localData.total"
|
||||||
@changeSize="handleSizeChange"
|
@changeSize="handleSizeChange"
|
||||||
@goPage="handleCurrentChange"
|
@goPage="handleCurrentChange"
|
||||||
@@ -157,7 +159,7 @@ const exportTable = () => {
|
|||||||
const localData = reactive({
|
const localData = reactive({
|
||||||
list: [], // 表格数据
|
list: [], // 表格数据
|
||||||
query: {
|
query: {
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
pageNum: 1
|
pageNum: 1
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -227,7 +229,7 @@ const getList = async () => {
|
|||||||
if (api) {
|
if (api) {
|
||||||
localData.loading = true
|
localData.loading = true
|
||||||
try {
|
try {
|
||||||
const {code, data, msg} = await requestList(api, queryParmas).then(res=>{
|
const {code, data, msg} = await requestList(api, queryParmas).then(res => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
@@ -250,8 +252,8 @@ const getList = async () => {
|
|||||||
localData.loading = false
|
localData.loading = false
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("error",error)
|
console.log("error", error)
|
||||||
if (!error){
|
if (!error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -347,7 +349,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
.fv-table {
|
.fv-table {
|
||||||
:deep(.el-tooltip) {
|
:deep(.el-tooltip) {
|
||||||
width: 100% !important;
|
//width: 100% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 15px"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 15px"></fvSearchForm>
|
||||||
<div style="float: left">
|
<div style="float: left">
|
||||||
<import-cost-excel @success="importTheExpenseLedger"/>
|
<import-cost-excel @success="importTheExpenseLedger"/>
|
||||||
</div>
|
</div>
|
||||||
<fvTable ref="tableIns" class="tablte" :tableConfig="tableConfig" @headBtnClick="headBtnClick" :changeExportPosition="true">
|
<fvTable ref="tableIns" class="tablte" :tableConfig="tableConfig" @headBtnClick="headBtnClick"
|
||||||
|
:changeExportPosition="true">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty description="暂无数据"/>
|
<el-empty description="暂无数据"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -15,31 +16,81 @@ import {reactive, ref} from "vue";
|
|||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {costTemplateDownload, exportExcel, ledgerTemplateDownload} from "../../../api/project-manage";
|
import {costTemplateDownload, exportExcel, ledgerTemplateDownload} from "../../../api/project-manage";
|
||||||
import ImportCostExcel from "@/components/ImportCostExcel.vue";
|
import ImportCostExcel from "@/components/ImportCostExcel.vue";
|
||||||
|
import fvSelect from "@/fvcomponents/fvSelect/index.vue";
|
||||||
|
import {
|
||||||
|
getExpenseMasterProjectNameOption, getExpenseSubprojectNameOption,
|
||||||
|
getMasterProjectNameOption,
|
||||||
|
getSubprojectNameOption
|
||||||
|
} from "@/api/project-demand/summary/index.js";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const searchConfig = ref([
|
const searchConfig = ref([
|
||||||
|
{
|
||||||
|
label: '年份',
|
||||||
|
prop: 'rdYear',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择年份',
|
||||||
|
clearable: true,
|
||||||
|
type: 'year',
|
||||||
|
format: 'YYYY',
|
||||||
|
valueFormat: 'YYYY',
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '月份',
|
||||||
|
prop: 'rdMonth',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择月份',
|
||||||
|
clearable: true,
|
||||||
|
type: 'month',
|
||||||
|
format: 'M',
|
||||||
|
valueFormat: 'M',
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '主项目',
|
label: '主项目',
|
||||||
prop: 'masterProjectName',
|
prop: 'masterProjectName',
|
||||||
component: 'el-input',
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入主项目查询',
|
placeholder: '请输入主项目',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true
|
options: [],
|
||||||
}
|
remote: true,
|
||||||
|
remoteMethod: async (val) => {
|
||||||
|
console.log('val', val)
|
||||||
|
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = JSON.parse(localStorage.getItem("masterProjectNameOption"))
|
||||||
|
|
||||||
|
if (val) {
|
||||||
|
await getMasterProjectName(val)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '子项目',
|
label: '子项目',
|
||||||
prop: 'subProjectName',
|
prop: 'subProjectName',
|
||||||
component: 'el-input',
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入子项目查询',
|
placeholder: '请输入子项目',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true
|
options: [],
|
||||||
}
|
remote: true,
|
||||||
|
remoteMethod: async (val) => {
|
||||||
|
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = JSON.parse(localStorage.getItem("subprojectNameOption"))
|
||||||
|
|
||||||
|
if (val) {
|
||||||
|
await getSubprojectName(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '会计凭证记载金额(元)',
|
label: '会计凭证记载金额(元)',
|
||||||
@@ -76,19 +127,7 @@ const searchConfig = ref([
|
|||||||
// },
|
// },
|
||||||
// colProps: {}
|
// colProps: {}
|
||||||
// },
|
// },
|
||||||
// {
|
|
||||||
// label: '归档时间',
|
|
||||||
// prop: 'filingTime',
|
|
||||||
// component: 'el-date-picker',
|
|
||||||
// props: {
|
|
||||||
// placeholder: '请选择归档时间',
|
|
||||||
// clearable: true,
|
|
||||||
// type:'date',
|
|
||||||
// format: 'YYYY-MM-DD HH:mm',
|
|
||||||
// valueFormat:'YYYY-MM-DD HH:mm',
|
|
||||||
// },
|
|
||||||
// colProps: {}
|
|
||||||
// },
|
|
||||||
])
|
])
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
@@ -197,13 +236,63 @@ const tableConfig = reactive({
|
|||||||
{name: '模板下载', key: 'down', color: '#DED0B2'},
|
{name: '模板下载', key: 'down', color: '#DED0B2'},
|
||||||
// {name: '导入', key: 'import', color: '#DED0B2'}
|
// {name: '导入', key: 'import', color: '#DED0B2'}
|
||||||
],
|
],
|
||||||
export:{
|
export: {
|
||||||
open :true,
|
open: true,
|
||||||
fileName:`研发费用明细表`
|
fileName: `研发费用明细表`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const getMasterProjectName = async (val) => {
|
||||||
|
const res = await getExpenseMasterProjectNameOption(val)
|
||||||
|
if (res.code == 1000) {
|
||||||
|
let optionObj = {}
|
||||||
|
let optionsMap = new Map();
|
||||||
|
res.data.forEach(item => {
|
||||||
|
optionObj = {
|
||||||
|
value: item.label,
|
||||||
|
label: item.label
|
||||||
|
}
|
||||||
|
optionsMap.set(optionObj.value, optionObj);
|
||||||
|
})
|
||||||
|
if (!val) {
|
||||||
|
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||||
|
}
|
||||||
|
// 将 Map 转换为数组
|
||||||
|
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getSubprojectName = async (val) => {
|
||||||
|
const res = await getExpenseSubprojectNameOption(val)
|
||||||
|
if (res.code == 1000) {
|
||||||
|
let optionObj = {}
|
||||||
|
let optionsMap = new Map();
|
||||||
|
res.data.forEach(item => {
|
||||||
|
optionObj = {
|
||||||
|
value: item.label,
|
||||||
|
label: item.label
|
||||||
|
}
|
||||||
|
optionsMap.set(optionObj.value, optionObj);
|
||||||
|
})
|
||||||
|
if (!val) {
|
||||||
|
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||||
|
}
|
||||||
|
// 将 Map 转换为数组
|
||||||
|
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getMasterProjectName()
|
||||||
|
getSubprojectName()
|
||||||
|
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
tableConfig.params = {...val}
|
// 去除 rdMonth 前置0
|
||||||
|
|
||||||
|
let param={
|
||||||
|
...val
|
||||||
|
}
|
||||||
|
if (param.rdMonth) {
|
||||||
|
param.rdMonth = parseInt(param.rdMonth, 10).toString();
|
||||||
|
}
|
||||||
|
tableConfig.params = {...param}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,23 +315,23 @@ const exportTable = () => {
|
|||||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
|
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
|
||||||
}
|
}
|
||||||
//导入模板下载
|
//导入模板下载
|
||||||
const handleImportTemplateDownload=()=>{
|
const handleImportTemplateDownload = () => {
|
||||||
costTemplateDownload().then(res => {
|
costTemplateDownload().then(res => {
|
||||||
let link = document.createElement('a')
|
let link = document.createElement('a')
|
||||||
try {
|
try {
|
||||||
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'});
|
let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'});
|
||||||
let _fileName = "研发费用明细表模板.xlsx"//文件名,中文无法解析的时候会显示 _(下划线),生产环境获取不到
|
let _fileName = "研发费用明细表模板.xlsx"//文件名,中文无法解析的时候会显示 _(下划线),生产环境获取不到
|
||||||
link.style.display='none';
|
link.style.display = 'none';
|
||||||
// 兼容不同浏览器的URL对象
|
// 兼容不同浏览器的URL对象
|
||||||
const url = window.URL || window.webkitURL || window.moxURL;
|
const url = window.URL || window.webkitURL || window.moxURL;
|
||||||
link.href=url.createObjectURL(blob);
|
link.href = url.createObjectURL(blob);
|
||||||
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_')+1))
|
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
url.revokeObjectURL(link.href);//销毁url对象
|
url.revokeObjectURL(link.href);//销毁url对象
|
||||||
}catch (e) {
|
} catch (e) {
|
||||||
console.log('下载的文件出错',e)
|
console.log('下载的文件出错', e)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -251,9 +340,10 @@ const importTheExpenseLedger = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-form-item__label-wrap){
|
:deep(.el-form-item__label-wrap) {
|
||||||
margin-left: 0!important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-table__header) {
|
:deep(.el-table__header) {
|
||||||
.is-leaf:first-child {
|
.is-leaf:first-child {
|
||||||
.cell {
|
.cell {
|
||||||
@@ -269,7 +359,8 @@ const importTheExpenseLedger = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:deep(.el-date-editor--month){
|
|
||||||
|
:deep(.el-date-editor--month) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,32 +11,78 @@
|
|||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {toThousands} from '@/utils/changePrice.js'
|
import {toThousands} from '@/utils/changePrice.js'
|
||||||
import { getSubCompOpt } from '@/api/user/user.js';
|
import { getSubCompOpt } from '@/api/user/user.js';
|
||||||
|
import {
|
||||||
|
getMasterProjectNameOption,
|
||||||
|
getRequirementName,
|
||||||
|
getSubprojectNameOption
|
||||||
|
} from "@/api/project-demand/summary/index.js";
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const searchConfig = ref(
|
const searchConfig = ref(
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
label: '年份',
|
||||||
|
prop: 'paymentYear',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择年份',
|
||||||
|
clearable: true,
|
||||||
|
type: 'year',
|
||||||
|
format: 'YYYY',
|
||||||
|
valueFormat: 'YYYY',
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '月份',
|
||||||
|
prop: 'paymentMonth',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择月份',
|
||||||
|
clearable: true,
|
||||||
|
type: 'month',
|
||||||
|
format: 'M',
|
||||||
|
valueFormat: 'M',
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '主项目',
|
label: '主项目',
|
||||||
prop: 'masterProjectName',
|
prop: 'masterProjectName',
|
||||||
component: 'el-input',
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入主项目查询',
|
placeholder: '请输入主项目',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true
|
options: [],
|
||||||
}
|
remote: true,
|
||||||
|
remoteMethod:async (val)=>{
|
||||||
|
console.log('val',val)
|
||||||
|
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options= JSON.parse(localStorage.getItem("masterProjectNameOption"))
|
||||||
|
|
||||||
|
if(val){
|
||||||
|
await getMasterProjectName( val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '子项目',
|
label: '子项目',
|
||||||
prop: 'subProjectName',
|
prop: 'subProjectName',
|
||||||
component: 'el-input',
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入子项目查询',
|
placeholder: '请输入子项目',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true
|
options: [],
|
||||||
}
|
remote: true,
|
||||||
|
remoteMethod:async (val)=>{
|
||||||
|
searchConfig.value.find(item => item.prop == 'subProjectName').props.options= JSON.parse(localStorage.getItem("subprojectNameOption"))
|
||||||
|
if(val){
|
||||||
|
await getSubprojectName(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目类型',
|
label: '项目类型',
|
||||||
@@ -108,13 +154,13 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
// currentRender: ({row, index}) => {
|
||||||
if (row.projectType&&row.projectType !== null&&row.projectType!==undefined) {
|
// if (row.projectType&&row.projectType !== null&&row.projectType!==undefined) {
|
||||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
// return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||||
} else {
|
// } else {
|
||||||
return '--'
|
// return '--'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'rdType',
|
prop: 'rdType',
|
||||||
@@ -198,8 +244,55 @@ const tableConfig = reactive({
|
|||||||
fileName:`科研项日现金支出明细表`
|
fileName:`科研项日现金支出明细表`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const getMasterProjectName =async (val) => {
|
||||||
|
const res=await getMasterProjectNameOption(val)
|
||||||
|
if(res.code==1000){
|
||||||
|
let optionObj={}
|
||||||
|
let optionsMap = new Map();
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
optionObj={
|
||||||
|
value:item.label,
|
||||||
|
label:item.label
|
||||||
|
}
|
||||||
|
optionsMap.set(optionObj.value, optionObj);
|
||||||
|
})
|
||||||
|
if(!val){
|
||||||
|
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||||
|
}
|
||||||
|
// 将 Map 转换为数组
|
||||||
|
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getSubprojectName =async (val) => {
|
||||||
|
const res=await getSubprojectNameOption(val)
|
||||||
|
if(res.code==1000){
|
||||||
|
let optionObj={}
|
||||||
|
let optionsMap = new Map();
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
optionObj={
|
||||||
|
value:item.label,
|
||||||
|
label:item.label
|
||||||
|
}
|
||||||
|
optionsMap.set(optionObj.value, optionObj);
|
||||||
|
})
|
||||||
|
if(!val){
|
||||||
|
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||||
|
}
|
||||||
|
// 将 Map 转换为数组
|
||||||
|
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getMasterProjectName()
|
||||||
|
getSubprojectName()
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
tableConfig.params = {...val}
|
let param={
|
||||||
|
...val
|
||||||
|
}
|
||||||
|
if (param.paymentMonth) {
|
||||||
|
param.paymentMonth = parseInt(param.paymentMonth, 10).toString();
|
||||||
|
}
|
||||||
|
tableConfig.params = {...param}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search" ></fvSearchForm>
|
||||||
<!-- <el-button color="#DED0B2" style="float: left;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>-->
|
<!-- <el-button color="#DED0B2" style="float: left;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>-->
|
||||||
|
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" style="margin-top: 15px" @selectionChange="selectionChange">
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" @selectionChange="selectionChange">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty description="暂无数据"/>
|
<el-empty description="暂无数据"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -16,19 +16,80 @@ import { getSubCompOpt } from '@/api/user/user.js';
|
|||||||
import {reactive, ref} from "vue";
|
import {reactive, ref} from "vue";
|
||||||
import {shareDetailExport, shareExportExcel} from "@/api/expense-manage";
|
import {shareDetailExport, shareExportExcel} from "@/api/expense-manage";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
|
import {
|
||||||
|
getCostMasterProjectNameOption, getCostSubprojectNameOption,
|
||||||
|
getMasterProjectNameOption,
|
||||||
|
getSubprojectNameOption
|
||||||
|
} from "@/api/project-demand/summary/index.js";
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const searchConfig = reactive([
|
const searchConfig = ref([
|
||||||
|
{
|
||||||
|
label: '年份',
|
||||||
|
prop: 'paymentYear',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择年份',
|
||||||
|
clearable: true,
|
||||||
|
type: 'year',
|
||||||
|
format: 'YYYY',
|
||||||
|
valueFormat: 'YYYY',
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '月份',
|
||||||
|
prop: 'paymentMonth',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择月份',
|
||||||
|
clearable: true,
|
||||||
|
type: 'month',
|
||||||
|
format: 'M',
|
||||||
|
valueFormat: 'M',
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '主项目',
|
||||||
|
prop: 'masterProjectName',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入主项目',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
options: [],
|
||||||
|
remote: true,
|
||||||
|
remoteMethod:async (val)=>{
|
||||||
|
console.log('val',val)
|
||||||
|
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options= JSON.parse(localStorage.getItem("masterProjectNameOption"))
|
||||||
|
|
||||||
|
if(val){
|
||||||
|
|
||||||
|
await getMasterProjectName( val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '子项目',
|
label: '子项目',
|
||||||
prop: 'subProjectName',
|
prop: 'subProjectName',
|
||||||
component: 'el-input',
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入子项目查询',
|
placeholder: '请输入子项目',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true
|
options: [],
|
||||||
}
|
remote: true,
|
||||||
|
remoteMethod:async (val)=>{
|
||||||
|
searchConfig.value.find(item => item.prop == 'subProjectName').props.options= JSON.parse(localStorage.getItem("subprojectNameOption"))
|
||||||
|
|
||||||
|
if(val){
|
||||||
|
await getSubprojectName(val)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// label: '支付月份',
|
// label: '支付月份',
|
||||||
@@ -146,10 +207,55 @@ const tableConfig = reactive({
|
|||||||
open :false,
|
open :false,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const getMasterProjectName =async (val) => {
|
||||||
|
const res=await getCostMasterProjectNameOption(val)
|
||||||
|
if(res.code==1000){
|
||||||
|
let optionObj={}
|
||||||
|
let optionsMap = new Map();
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
optionObj={
|
||||||
|
value:item.label,
|
||||||
|
label:item.label
|
||||||
|
}
|
||||||
|
optionsMap.set(optionObj.value, optionObj);
|
||||||
|
})
|
||||||
|
if(!val){
|
||||||
|
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||||
|
}
|
||||||
|
// 将 Map 转换为数组
|
||||||
|
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getSubprojectName =async (val) => {
|
||||||
|
const res=await getCostSubprojectNameOption(val)
|
||||||
|
if(res.code==1000){
|
||||||
|
let optionObj={}
|
||||||
|
let optionsMap = new Map();
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
optionObj={
|
||||||
|
value:item.label,
|
||||||
|
label:item.label
|
||||||
|
}
|
||||||
|
optionsMap.set(optionObj.value, optionObj);
|
||||||
|
})
|
||||||
|
if(!val){
|
||||||
|
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||||
|
}
|
||||||
|
// 将 Map 转换为数组
|
||||||
|
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getMasterProjectName()
|
||||||
|
getSubprojectName()
|
||||||
|
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
tableConfig.params = {...val}
|
let param={
|
||||||
|
...val
|
||||||
|
}
|
||||||
|
if (param.paymentMonth) {
|
||||||
|
param.paymentMonth = parseInt(param.paymentMonth, 10).toString();
|
||||||
|
}
|
||||||
|
tableConfig.params = {...param}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
const headBtnClick = (key) => {
|
const headBtnClick = (key) => {
|
||||||
|
|||||||
@@ -26,13 +26,13 @@
|
|||||||
<div style="width: 31px"></div>
|
<div style="width: 31px"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-tab-pane :label="'待办('+(todoList?.length||0) +')'" name="first">
|
<el-tab-pane :label="'待办('+(todoNum||0) +')'" name="first">
|
||||||
<div class="todo-top">
|
<div class="todo-top">
|
||||||
<div class="bell">
|
<div class="bell">
|
||||||
<el-icon size="16" color="#F55815">
|
<el-icon size="16" color="#F55815">
|
||||||
<BellFilled/>
|
<BellFilled/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<span>您有{{ todoList?.length || 0 }}条待办需要处理</span>
|
<span>您有{{ todoNum || 0 }}条待办需要处理</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="todo-more" @click="handleTodoList(1)">
|
<div class="todo-more" @click="handleTodoList(1)">
|
||||||
<span>查看更多</span>
|
<span>查看更多</span>
|
||||||
@@ -70,13 +70,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="'已办(' + (doneList?.length||0) + ')'" name="second">
|
<el-tab-pane :label="'已办(' + (doneNum||0) + ')'" name="second">
|
||||||
<div class="todo-top">
|
<div class="todo-top">
|
||||||
<div class="bell">
|
<div class="bell">
|
||||||
<el-icon size="16" color="#F55815">
|
<el-icon size="16" color="#F55815">
|
||||||
<BellFilled/>
|
<BellFilled/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<span>您有{{ todoList.length }}条待办需要处理</span>
|
<span>您有{{ todoNum }}条待办需要处理</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="todo-more" @click="handleTodoList(2)">
|
<div class="todo-more" @click="handleTodoList(2)">
|
||||||
<span>查看更多</span>
|
<span>查看更多</span>
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
<div class="title-block">
|
<div class="title-block">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="tag"></div>
|
<div class="tag"></div>
|
||||||
<span>专项资金项目</span>
|
<span>资金类型</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" @click="goToSpecialFund">
|
<div class="more" @click="goToSpecialFund">
|
||||||
<span>更多</span>
|
<span>更多</span>
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<div id="fundPie" ref="fundPie"></div>
|
<div id="fundPie" ref="fundPie"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fund-pie">专项资金项目统计图</div>
|
<div class="fund-pie">资金类型统计图</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
<div class="title-block">
|
<div class="title-block">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="tag"></div>
|
<div class="tag"></div>
|
||||||
<span>研发投入资金</span>
|
<span>研发投入</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" @click="goToResearchFund">
|
<div class="more" @click="goToResearchFund">
|
||||||
<span>更多</span>
|
<span>更多</span>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="moneyData&&moneyData.length==0" style="margin-top: 30px">
|
<div v-if="moneyData&&moneyData.length==0" style="margin-top: 30px">
|
||||||
<el-empty image-size="135" description="暂无研发投入资金信息~"/>
|
<el-empty image-size="135" description="暂无研发投入信息~"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="money-block" v-else>
|
<div class="money-block" v-else>
|
||||||
<div class="money-container">
|
<div class="money-container">
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fund-pie" v-if="totalMoney" style="text-align: left;margin-left: 70px;margin-top: 10px">
|
<div class="fund-pie" v-if="totalMoney" style="text-align: left;margin-left: 70px;margin-top: 10px">
|
||||||
研发投入资金统计图
|
研发投入统计图
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -359,6 +359,8 @@ const taskTabList = ref([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const todoList = ref([])
|
const todoList = ref([])
|
||||||
|
const doneNum = ref(0)
|
||||||
|
const todoNum = ref(0)
|
||||||
const noticeList = ref([])
|
const noticeList = ref([])
|
||||||
const rulesList = ref([])
|
const rulesList = ref([])
|
||||||
const helpDocList = ref([])
|
const helpDocList = ref([])
|
||||||
@@ -631,7 +633,7 @@ const getTodoList = () => {
|
|||||||
getHomeTaskInfo().then(res => {
|
getHomeTaskInfo().then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
todoList.value = res.data.rows
|
todoList.value = res.data.rows
|
||||||
// todoNum.value=res.data.total
|
todoNum.value = res.data.total > 99 ? '99+' : res.data.total
|
||||||
} else {
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -645,7 +647,7 @@ const getDoneList = () => {
|
|||||||
getDoneTaskInfo().then(res => {
|
getDoneTaskInfo().then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
doneList.value = res.data.rows
|
doneList.value = res.data.rows
|
||||||
// todoNum.value=res.data.total
|
doneNum.value = res.data.total > 99 ? '99+' : res.data.total
|
||||||
} else {
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<el-form :model="formData" style="margin-top: 18px">
|
<el-form :model="formData" style="margin-top: 18px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="年度计划名称" prop="annualPlanName">
|
<el-form-item label="项目计划名称" prop="annualPlanName">
|
||||||
<div v-if="isEdit">
|
<div v-if="isEdit">
|
||||||
<el-input v-model="formData.annualPlanName" placeholder="请输入年度计划名称" clearable>
|
<el-input v-model="formData.annualPlanName" placeholder="请输入项目计划名称" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button color="#DED0B2" style="margin-left: 10px" @click="editName">提交</el-button>
|
<el-button color="#DED0B2" style="margin-left: 10px" @click="editName">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="query-btn">
|
<div class="query-btn">
|
||||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||||
<el-popover :visible="editVisible" placement="top" :width="160">
|
<el-popover :visible="editVisible" placement="top" :width="160">
|
||||||
<p>点击编辑可以修改年度计划名称!</p>
|
<p>点击编辑可以修改项目计划名称!</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="small" color="#DED0B2" @click="editVisible = false">
|
<el-button size="small" color="#DED0B2" @click="editVisible = false">
|
||||||
确认
|
确认
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-table ref="table" :data="formData.projectList" border :header-cell-style="{background:'#f5f7fa'}">
|
<el-table ref="table" :data="formData.projectList" border :header-cell-style="{background:'#f5f7fa'}">
|
||||||
<el-table-column label="四川省国有资产经营投资管理有限责任公司科技创新项目年度计划表" align="center">
|
<el-table-column label="四川省国有资产经营投资管理有限责任公司科技创新项目计划表" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||||
<el-table-column prop="projectName" label="项目名称" align="center" width="100"/>
|
<el-table-column prop="projectName" label="项目名称" align="center" width="100"/>
|
||||||
@@ -193,7 +193,7 @@ const exportTable = () => {
|
|||||||
if (!$table) {
|
if (!$table) {
|
||||||
$table = $e
|
$table = $e
|
||||||
}
|
}
|
||||||
exportExcel($table, (5 + (Object.keys(formData.value.projectList[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目年度计划表", 2)
|
exportExcel($table, (5 + (Object.keys(formData.value.projectList[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目计划表", 2)
|
||||||
}
|
}
|
||||||
const editName = () => {
|
const editName = () => {
|
||||||
let param = {
|
let param = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div >
|
<div >
|
||||||
<!-- <baseTitle title="年度计划" style="margin-left: -15px;margin-bottom: -2px"></baseTitle>-->
|
<!-- <baseTitle title="项目计划" style="margin-left: -15px;margin-bottom: -2px"></baseTitle>-->
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px;margin-bottom: -18px"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px;margin-bottom: -18px"></fvSearchForm>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
||||||
</div>
|
</div>
|
||||||
@@ -15,11 +15,11 @@ const router = useRouter()
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const searchConfig = ref([
|
const searchConfig = ref([
|
||||||
{
|
{
|
||||||
label: '年度计划名称',
|
label: '项目计划名称',
|
||||||
prop: 'annualPlanName',
|
prop: 'annualPlanName',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入年度计划名称',
|
placeholder: '请输入项目计划名称',
|
||||||
clearable: true
|
clearable: true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'annualPlanName',
|
prop: 'annualPlanName',
|
||||||
label: '年度计划名称',
|
label: '项目计划名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -121,8 +121,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="width: 100%;height: 30px"></div>
|
<div style="width: 100%;height: 30px"></div>
|
||||||
<div class="oper-page-btn">
|
<div class="oper-page-btn">
|
||||||
<el-button color="#DED0B2" v-if="routerName==='Requirement/add'" @click="handleSubmit(demandForm)">提交</el-button>
|
<el-button color="#DED0B2" v-if="routerName==='Requirement/add'&&formData.state=='3'" @click="handleSubmit(demandForm)">提交</el-button>
|
||||||
<el-button color="#DED0B2" v-else @click="handleResubmit(demandForm)">重新提交</el-button>
|
<el-button color="#DED0B2" v-else-if="routerName==='Requirement/edit'&&formData.state=='3'" @click="handleResubmit(demandForm)">重新提交</el-button>
|
||||||
<el-button @click="handleBack">返回</el-button>
|
<el-button @click="handleBack">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<company-picker :multiple="true" ref="companyRef" title="请选择征集公司" @ok="sureSelectedCompany" @cancelOrClear="cancelSelectedCompany"
|
<company-picker :multiple="true" ref="companyRef" title="请选择征集公司" @ok="sureSelectedCompany" @cancelOrClear="cancelSelectedCompany"
|
||||||
@@ -180,6 +180,7 @@ const formData = ref({
|
|||||||
collectType: '科技创新与信息化系统建设',
|
collectType: '科技创新与信息化系统建设',
|
||||||
deadline: '',
|
deadline: '',
|
||||||
collectExplain: '',
|
collectExplain: '',
|
||||||
|
state: '',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
isSpecialFund: false
|
isSpecialFund: false
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -221,7 +221,7 @@
|
|||||||
:style="{marginLeft:!formData.isSpecialFund?route.query.id?'-10px':'-10px':route.query.id?'0':'-40px'}">
|
:style="{marginLeft:!formData.isSpecialFund?route.query.id?'-10px':'-10px':route.query.id?'0':'-40px'}">
|
||||||
<el-form-item label="主项目" prop="masterProjectId">
|
<el-form-item label="主项目" prop="masterProjectId">
|
||||||
<el-select v-model="formData.masterProjectId" clearable placeholder="请选择主项目"
|
<el-select v-model="formData.masterProjectId" clearable placeholder="请选择主项目"
|
||||||
@change="changeCollectData">
|
@change="changeCollectData" remote filterable :remote-method="filterMasterProject">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in masterProjectList"
|
v-for="item in masterProjectList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -462,10 +462,10 @@ const showSingleTable = ref(false)
|
|||||||
const otherFileList = ref([])
|
const otherFileList = ref([])
|
||||||
const singleList = ref([])
|
const singleList = ref([])
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
isWithinBudget: false,
|
isWithinBudget: null,
|
||||||
isSpecialFund: false,
|
isSpecialFund: null,
|
||||||
industryUniversityResearch: '1',
|
industryUniversityResearch: null,
|
||||||
governmentDeclaration: '1',
|
governmentDeclaration: null,
|
||||||
other: '无',
|
other: '无',
|
||||||
resultForm: []
|
resultForm: []
|
||||||
})
|
})
|
||||||
@@ -567,6 +567,14 @@ const changeCollectData = () => {
|
|||||||
localStorage.setItem('collectData', JSON.stringify(params))
|
localStorage.setItem('collectData', JSON.stringify(params))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const filterMasterProject= (val)=>{
|
||||||
|
masterProjectList.value= JSON.parse(localStorage.getItem("projectOption"))
|
||||||
|
if(val){
|
||||||
|
getProjectList(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const handleShowOptionalChargeLeadershipPicker = () => {
|
const handleShowOptionalChargeLeadershipPicker = () => {
|
||||||
optionalChargeLeadershipPickerRef.value.showUserPicker()
|
optionalChargeLeadershipPickerRef.value.showUserPicker()
|
||||||
}
|
}
|
||||||
@@ -584,13 +592,17 @@ const disabledDate = (time) => {
|
|||||||
return time.getTime() < new Date(formData.value.startTime).getTime();
|
return time.getTime() < new Date(formData.value.startTime).getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
const getProjectList = () => {
|
const getProjectList = (val) => {
|
||||||
getProjectOption().then(res => {
|
getProjectOption(val).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
if(name.value === 'Summary/edit'){
|
if(name.value === 'Summary/edit'){
|
||||||
masterProjectList.value = res.data.filter(item => item.value!=route.query.projectId)
|
masterProjectList.value = res.data.filter(item => item.value!=route.query.projectId)
|
||||||
}else{
|
}else{
|
||||||
masterProjectList.value = res.data
|
masterProjectList.value = res.data
|
||||||
|
if(!val){
|
||||||
|
|
||||||
|
localStorage.setItem("projectOption", JSON.stringify(res.data))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -380,11 +380,12 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
rowKey: 'projectId',
|
||||||
api: '/workflow/mosr/requirement/collect',
|
api: '/workflow/mosr/requirement/collect',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增上报', key: 'add', color: '#DED0B2', auth: auths.report},
|
{name: '新增上报', key: 'add', color: '#DED0B2', auth: auths.report},
|
||||||
{name: '创建年度计划', key: 'export', color: '#DED0B2', auth: auths.planAdd},
|
{name: '创建项目计划', key: 'export', color: '#DED0B2', auth: auths.planAdd},
|
||||||
// {name: '经费预算生成', key: 'preMonty', auth: ''},
|
// {name: '经费预算生成', key: 'preMonty', auth: ''},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
|||||||
import {toThousands} from '@/utils/changePrice.js'
|
import {toThousands} from '@/utils/changePrice.js'
|
||||||
import {switchAttachmentState} from "@/api/project-manage/attachment";
|
import {switchAttachmentState} from "@/api/project-manage/attachment";
|
||||||
import {ElMessageBox, ElNotification} from "element-plus";
|
import {ElMessageBox, ElNotification} from "element-plus";
|
||||||
import { getSubCompOpt } from '@/api/user/user.js';
|
import {getSubCompOpt} from '@/api/user/user.js';
|
||||||
import {filterProjectName} from "@/api/project-manage";
|
import {filterProjectName} from "@/api/project-manage";
|
||||||
import {filterRequirementName} from "@/api/project-demand";
|
import {filterRequirementName} from "@/api/project-demand";
|
||||||
|
|
||||||
@@ -57,16 +57,16 @@ const searchConfig = ref([
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
options: [],
|
options: [],
|
||||||
remote: true,
|
remote: true,
|
||||||
remoteMethod:async (val)=>{
|
remoteMethod: async (val) => {
|
||||||
if(val){
|
if (val) {
|
||||||
const res=await filterRequirementName(val)
|
const res = await filterRequirementName(val)
|
||||||
if(res.code==1000){
|
if (res.code == 1000) {
|
||||||
let optionObj={}
|
let optionObj = {}
|
||||||
let options=[]
|
let options = []
|
||||||
res.data.forEach(item=>{
|
res.data.forEach(item => {
|
||||||
optionObj={
|
optionObj = {
|
||||||
value:item,
|
value: item,
|
||||||
label:item
|
label: item
|
||||||
}
|
}
|
||||||
options.push(optionObj)
|
options.push(optionObj)
|
||||||
})
|
})
|
||||||
@@ -86,7 +86,7 @@ const searchConfig = ref([
|
|||||||
data: [],
|
data: [],
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
remote:true
|
remote: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -99,16 +99,16 @@ const searchConfig = ref([
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
options: [],
|
options: [],
|
||||||
remote: true,
|
remote: true,
|
||||||
remoteMethod:async (val)=>{
|
remoteMethod: async (val) => {
|
||||||
if(val){
|
if (val) {
|
||||||
const res=await filterProjectName(val,'50')
|
const res = await filterProjectName(val, '50')
|
||||||
if(res.code==1000){
|
if (res.code == 1000) {
|
||||||
let optionObj={}
|
let optionObj = {}
|
||||||
let options=[]
|
let options = []
|
||||||
res.data.forEach(item=>{
|
res.data.forEach(item => {
|
||||||
optionObj={
|
optionObj = {
|
||||||
value:item,
|
value: item,
|
||||||
label:item
|
label: item
|
||||||
}
|
}
|
||||||
options.push(optionObj)
|
options.push(optionObj)
|
||||||
})
|
})
|
||||||
@@ -211,7 +211,7 @@ const tableConfig = reactive({
|
|||||||
type: 'index',
|
type: 'index',
|
||||||
label: '序号',
|
label: '序号',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width:85,
|
width: 85,
|
||||||
index: index => {
|
index: index => {
|
||||||
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||||
}
|
}
|
||||||
@@ -284,7 +284,7 @@ const tableConfig = reactive({
|
|||||||
label: '预估经费预算(元)',
|
label: '预估经费预算(元)',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
currentRender:({row})=>{
|
currentRender: ({row}) => {
|
||||||
return <span>{toThousands(row.economicEstimate)}</span>
|
return <span>{toThousands(row.economicEstimate)}</span>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -302,11 +302,11 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
if(row.state=='3'||row.state=='4'){
|
if (row.state == '3' || row.state == '4') {
|
||||||
return <span>{row.taskNode}</span>
|
return <span>{row.taskNode}</span>
|
||||||
}else if(row.state=='1'){
|
} else if (row.state == '1') {
|
||||||
return <span>{row.approveName}</span>
|
return <span>{row.approveName}</span>
|
||||||
}else {
|
} else {
|
||||||
return <span>--</span>
|
return <span>--</span>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,12 +319,17 @@ const tableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let buttons = new Set(Array.from(row.buttons))
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
if (!buttons.has("openFileSwitch")&&row.state!=1) {
|
if (!buttons.has("openFileSwitch") && row.state != 1) {
|
||||||
console.log('row',row)
|
console.log('row', row)
|
||||||
return (<Tag dictType={'project_filing'} value={'0'}/>)
|
if (!buttons.has("openFileSwitch") && !buttons.has("closeFileSwitch") && row.state == 4) {
|
||||||
}else if (buttons.has("openFileSwitch")) {
|
//下属公司, 没这两个按钮时, 状态为4
|
||||||
|
return (<Tag dictType={'project_filing'} value={'4'}/>)
|
||||||
|
} else {
|
||||||
|
return (<Tag dictType={'project_filing'} value={'0'}/>)
|
||||||
|
}
|
||||||
|
} else if (buttons.has("openFileSwitch")) {//科创部, 有这权限时
|
||||||
return (<Tag dictType={'project_filing'} value={'4'}/>)
|
return (<Tag dictType={'project_filing'} value={'4'}/>)
|
||||||
}else{
|
} else {
|
||||||
if (row.state !== null) {
|
if (row.state !== null) {
|
||||||
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||||
} else {
|
} else {
|
||||||
@@ -337,29 +342,59 @@ const tableConfig = reactive({
|
|||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed:'right',
|
fixed: 'right',
|
||||||
width: 150,
|
width: 150,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = []
|
let btn = []
|
||||||
let buttons = new Set(Array.from(row.buttons))
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
if (buttons.has("details")) {
|
if (buttons.has("details")) {
|
||||||
btn.push({label: '详情', prem: ['project:management:filing:detail'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({
|
||||||
|
label: '详情',
|
||||||
|
prem: ['project:management:filing:detail'],
|
||||||
|
func: () => handleDetail(row),
|
||||||
|
type: 'primary'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (buttons.has("attachments")) {
|
if (buttons.has("attachments")) {
|
||||||
btn.push({label: '附件', prem: ['project:management:filing:attachment'], func: () => handleAttachment(row), type: 'primary'})
|
btn.push({
|
||||||
|
label: '附件',
|
||||||
|
prem: ['project:management:filing:attachment'],
|
||||||
|
func: () => handleAttachment(row),
|
||||||
|
type: 'primary'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (buttons.has("entry")) {
|
if (buttons.has("entry")) {
|
||||||
btn.push({label: '结项', prem: ['project:management:filing:conclusion'], func: () => handleConclusion(row), type: 'primary'})
|
btn.push({
|
||||||
|
label: '结项',
|
||||||
|
prem: ['project:management:filing:conclusion'],
|
||||||
|
func: () => handleConclusion(row),
|
||||||
|
type: 'primary'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({
|
||||||
|
label: '编辑',
|
||||||
|
prem: ['project:management:filing:conclusion'],
|
||||||
|
func: () => handleEdit(row),
|
||||||
|
type: 'primary'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (buttons.has("openFileSwitch")) {
|
if (buttons.has("openFileSwitch")) {
|
||||||
btn.push({label: '开启上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,true), type: 'primary'})
|
btn.push({
|
||||||
|
label: '开启上传',
|
||||||
|
prem: ['filing:attachment:switch'],
|
||||||
|
func: () => handleOpenUpload(row, true),
|
||||||
|
type: 'primary'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (buttons.has("closeFileSwitch")) {
|
if (buttons.has("closeFileSwitch")) {
|
||||||
btn.push({label: '关闭上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,false), type: 'primary'})
|
btn.push({
|
||||||
|
label: '关闭上传',
|
||||||
|
prem: ['filing:attachment:switch'],
|
||||||
|
func: () => handleOpenUpload(row, false),
|
||||||
|
type: 'primary'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
@@ -411,7 +446,7 @@ const handleAttachment = (row) => {
|
|||||||
name: 'Filing/attachment',
|
name: 'Filing/attachment',
|
||||||
query: {
|
query: {
|
||||||
id: row.projectId,
|
id: row.projectId,
|
||||||
requirementId:row.requirementId
|
requirementId: row.requirementId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -433,21 +468,21 @@ const handleEdit = (row) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleOpenUpload=(row,flag)=>{
|
const handleOpenUpload = (row, flag) => {
|
||||||
console.log('tableIns',tableIns.value)
|
console.log('tableIns', tableIns.value)
|
||||||
ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', {
|
ElMessageBox.confirm(`是否确认${flag ? '开启' : '关闭'}上传文件?`, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
let params={
|
let params = {
|
||||||
open: flag,
|
open: flag,
|
||||||
projectId: row.projectId
|
projectId: row.projectId
|
||||||
}
|
}
|
||||||
switchAttachmentState(params).then(res=>{
|
switchAttachmentState(params).then(res => {
|
||||||
if(res.code==1000){
|
if (res.code == 1000) {
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}else{
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@@ -459,7 +494,7 @@ const handleOpenUpload=(row,flag)=>{
|
|||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
const res = await getSubCompOpt()
|
const res = await getSubCompOpt()
|
||||||
searchConfig.value.find(item=>item.prop == 'affiliatedCompanyId').props.data = res.data
|
searchConfig.value.find(item => item.prop == 'affiliatedCompanyId').props.data = res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
init()
|
init()
|
||||||
|
|||||||
@@ -182,8 +182,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
||||||
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
|
<el-button type="danger" @click="handleRejectPlan">驳回项目计划</el-button>
|
||||||
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
|
<el-button color="#DED0B2" @click="handleAgreePlan">通过项目计划</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ const openChangeRoleDialog = (selectRoleId, data) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
console.log("🚀 ~ file: ", authStore.roles.includes('superAdmin'))
|
||||||
|
|
||||||
const schame = computed(() => {
|
const schame = computed(() => {
|
||||||
let arr = [
|
let arr = [
|
||||||
{
|
{
|
||||||
@@ -62,7 +64,7 @@ const schame = computed(() => {
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
data: localData.subCompanyIdOpt,
|
data: localData.subCompanyIdOpt,
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
change: async (val) => {
|
change: async (val) => {
|
||||||
@@ -73,15 +75,15 @@ const schame = computed(() => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '归属部门',
|
label: '归属部门',
|
||||||
prop: 'departmentId',
|
prop:!authStore.roles.includes('superAdmin') ?'departmentName': 'departmentId',
|
||||||
component: 'el-tree-select',
|
component: !authStore.roles.includes('superAdmin') ?'el-input':'el-tree-select',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
data: localData.departmentIdOpt,
|
data: localData.departmentIdOpt,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -90,7 +92,7 @@ const schame = computed(() => {
|
|||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -99,7 +101,7 @@ const schame = computed(() => {
|
|||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -120,7 +122,7 @@ const schame = computed(() => {
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
data: localData.jobOpt,
|
data: localData.jobOpt,
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -130,7 +132,8 @@ const schame = computed(() => {
|
|||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
multiple: true,
|
multiple: true,
|
||||||
data: localData.roleOpt
|
data: localData.roleOpt,
|
||||||
|
disabled:!authStore.roles.includes('superAdmin') ? true : false
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
change: async (val) => {
|
change: async (val) => {
|
||||||
@@ -173,7 +176,7 @@ const schame = computed(() => {
|
|||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
data: cacheStore.getDict('user_sex'),
|
data: cacheStore.getDict('user_sex'),
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -183,7 +186,7 @@ const schame = computed(() => {
|
|||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
data: cacheStore.getDict('normal_disable'),
|
data: cacheStore.getDict('normal_disable'),
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -192,7 +195,7 @@ const schame = computed(() => {
|
|||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -201,7 +204,7 @@ const schame = computed(() => {
|
|||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
disabled: route.query.userType == 0 ? true : false
|
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -244,6 +247,7 @@ const init = async () => {
|
|||||||
getJobOpt()
|
getJobOpt()
|
||||||
]
|
]
|
||||||
const resAll = await Promise.all(reqList)
|
const resAll = await Promise.all(reqList)
|
||||||
|
console.log('resAll',resAll)
|
||||||
localData.departmentIdOpt = resAll[0].data
|
localData.departmentIdOpt = resAll[0].data
|
||||||
localData.subCompanyIdOpt = resAll[1].data
|
localData.subCompanyIdOpt = resAll[1].data
|
||||||
localData.roleOpt = resAll[2].data
|
localData.roleOpt = resAll[2].data
|
||||||
@@ -254,10 +258,11 @@ const getInfo = async () => {
|
|||||||
if (!route.query.id) return
|
if (!route.query.id) return
|
||||||
// 获取详情数据
|
// 获取详情数据
|
||||||
const {data} = await getUserDetail(route.query.id)
|
const {data} = await getUserDetail(route.query.id)
|
||||||
if (data.subCompanyId) {
|
// if (data.subCompanyId) {
|
||||||
const res = await getDeptOpt({subCompanyId: data.subCompanyId})
|
// const res = await getDeptOpt({subCompanyId: data.subCompanyId})
|
||||||
localData.departmentIdOpt = res.data
|
// console.log('getInfo',res)
|
||||||
}
|
// localData.departmentIdOpt = res.data
|
||||||
|
// }
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
form.value.setValues(data)
|
form.value.setValues(data)
|
||||||
currentRoleArray.value = form.value.getValues().roleIds
|
currentRoleArray.value = form.value.getValues().roleIds
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<el-button type="primary" v-perm="auths.agentSetting"
|
<el-button type="primary" v-perm="auths.agentSetting"
|
||||||
@click="handleAgentSetting(scope.row)" link>设置代理
|
@click="handleAgentSetting(scope.row)" link>设置代理
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" v-if="scope.row.userType != 0" v-perm="auths.del"
|
<el-button type="danger" v-if="scope.row.userType != 0&&!authStore.roles.includes('superAdmin')" v-perm="auths.del"
|
||||||
@click="handleDel(scope.row)" link>删除
|
@click="handleDel(scope.row)" link>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" v-if="scope.row.accountType == 0" v-perm="auths.bindUser"
|
<el-button type="primary" v-if="scope.row.accountType == 0" v-perm="auths.bindUser"
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ const init = () => {
|
|||||||
timeline.value = {
|
timeline.value = {
|
||||||
color: '#f78f5f',
|
color: '#f78f5f',
|
||||||
icon: 'MoreFilled',
|
icon: 'MoreFilled',
|
||||||
context: '年度计划审批中'
|
context: '项目计划审批中'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -159,7 +159,7 @@ const init = () => {
|
|||||||
timeline.value = {
|
timeline.value = {
|
||||||
color: '#0bbd87',
|
color: '#0bbd87',
|
||||||
icon: 'CircleCheckFilled',
|
icon: 'CircleCheckFilled',
|
||||||
context: '年度计划审批通过'
|
context: '项目计划审批通过'
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ import IconsResolver from 'unplugin-icons/resolver'
|
|||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
import Inspect from 'vite-plugin-inspect'
|
import Inspect from 'vite-plugin-inspect'
|
||||||
import viteSvgIcons from 'vite-plugin-svg-icons'
|
// import viteSvgIcons from 'vite-plugin-svg-icons'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
import pkg from 'vite-plugin-svg-icons'
|
||||||
|
const viteSvgIcons = pkg.default
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
Reference in New Issue
Block a user