Merge pull request 'dj' (#339) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/339
This commit is contained in:
2024-06-16 10:07:18 +00:00
5 changed files with 36 additions and 13 deletions

View File

@@ -18,7 +18,7 @@
<div class="tree">
<el-tree :data="dataList" ref="tree" :props="defaultProps" empty-text="" node-key="value"
default-expand-all :show-checkbox="showCheckbox" highlight-current :default-checked-keys="defaultChecked"
:check-strictly="multiple===false" @node-click="(node,check)=>handle(node,check)"
:check-strictly="true" @node-click="(node,check)=>handle(node,check)"
@check-change="handleChange" :filter-node-method="filterNode">
<template #default="{ node, data }">
<div class="tree-node">
@@ -147,8 +147,9 @@ const show = () => {
getList()
};
const handleChange = (data, checked) => {
console.log('data, checked',data, checked)
// 左侧有选择框
if (props.showCheckbox) {
// if (props.showCheckbox) {
// 左侧有选择框 + 多选
if (props.multiple) {
//不添加重复的数据到右边
@@ -159,9 +160,9 @@ const handleChange = (data, checked) => {
}
}
if (checked) {
if (data.children === undefined) {
// if (data.children === undefined) {
selectList.value.push(data);
}
// }
} else if (data === "1") {
tree.value.setCheckedKeys([]);
selectList.value = [];
@@ -183,7 +184,7 @@ const handleChange = (data, checked) => {
tree.value.setCheckedKeys([]);
}
}
}
// }
};
const handle = (node, check) => {
if (check.isLeaf !== false) {

View File

@@ -31,6 +31,8 @@ const searchConfig = reactive([
props: {
placeholder: '请选择分摊月份',
clearable: true,
type:'month',
valueFormat:"YYYY-MM-DD HH:mm:ss"
},
colProps: {}
},

View File

@@ -336,7 +336,15 @@ const getIsFund = async () => {
}
})
}
const getFundName = (id) => {
let label=''
specialFundOption.value.forEach(item => {
if(item.value==id){
label=item.label
}
})
return label
}
const compositeParam = (item, type) => {
let tag = ''
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
@@ -354,11 +362,11 @@ const compositeParam = (item, type) => {
}
const getAttachment = (val) => {
console.log('上传文件getAttachment', val)
// console.log('上传文件getAttachment', val)
formData.value.singleFile = compositeParam(val)
}
const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val)
// console.log('上传文件getOtherFile', val)
showTable.value = false
let fileObj = compositeParam(val)
otherFileList.value.push(fileObj)
@@ -367,7 +375,6 @@ const getOtherFile = (val) => {
})
}
const getFileParam = (item) => {
console.log('item', item)
if (item === undefined) return;
return {
fileId: item.fileId,
@@ -397,7 +404,7 @@ const handleSubmit = debounce(async (instance) => {
fileList: otherFiles,
requirementId: route.query.id ? route.query.id : '-1'
}
console.log('params', params)
// console.log('params', params)
if (!attachment.value.isSingleFile) {
attachment.value.validate()
ElNotification({
@@ -441,13 +448,16 @@ const handleResubmit = debounce(() => {
} else {
attachment.value.clearValidate()
}
if (formData.value.isSpecialFund&&formData.value.specialFund === null) {
formData.value.specialFund=getFundName(formData.value.specialFundId)
}
let params = {
...formData.value,
deploymentId: deploymentId.value,
fileList: otherFiles,
requirementId: route.query.id ? route.query.id : '-1'
}
console.log('重新提交params', params)
// console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId)
resubmitReported(params).then(res => {
ElNotification({
title: '提示',
@@ -487,12 +497,12 @@ const init = async () => {
specialFundOption.value = resFund.data
const res = await getSubCompOpt()
companyOption.value = res.data
await processInfo()
await processInfo()
loading.value = false
}
const processInfo = () => {
processStore.setDesign(null)
processDiagramViewer.value=false
processDiagramViewer.value = false
getProcessInfo(formData.value.isSpecialFund).then(res => {
if (res.code === 1000) {
let data = res.data

View File

@@ -53,6 +53,15 @@ const searchConfig = ref([
clearable: true
}
},
{
label: '用户昵称',
prop: 'nickName',
component: 'el-input',
props: {
placeholder: '请输入',
clearable: true
}
},
{
label: '状态',
prop: 'state',

View File

@@ -273,6 +273,7 @@ const props = defineProps({
const nodeProps = computed(() => {
processStore.getSelectedNode().props.matrixApproval=true
return processStore.getSelectedNode().props;
})