fix : 修复需求征集编辑时所属公司回显,项目阶段改成研发阶段,人员选择器主子账号颜色区分
This commit is contained in:
@@ -161,8 +161,6 @@ const show = () => {
|
|||||||
getList()
|
getList()
|
||||||
};
|
};
|
||||||
const handleChange = (data, checked) => {
|
const handleChange = (data, checked) => {
|
||||||
// 左侧有选择框
|
|
||||||
// if (props.showCheckbox) {
|
|
||||||
// 左侧有选择框 + 多选
|
// 左侧有选择框 + 多选
|
||||||
if (props.multiple) {
|
if (props.multiple) {
|
||||||
//不添加重复的数据到右边
|
//不添加重复的数据到右边
|
||||||
@@ -197,7 +195,6 @@ const handleChange = (data, checked) => {
|
|||||||
tree.value.setCheckedKeys([]);
|
tree.value.setCheckedKeys([]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
const handle = (node, check) => {
|
const handle = (node, check) => {
|
||||||
if (check.isLeaf !== false) {
|
if (check.isLeaf !== false) {
|
||||||
|
|||||||
@@ -47,11 +47,11 @@ const searchConfig = reactive([
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目阶段',
|
label: '研发阶段',
|
||||||
prop: 'researchStage',
|
prop: 'researchStage',
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择项目阶段查询',
|
placeholder: '请选择研发阶段查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
@@ -115,7 +115,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'researchStage',
|
prop: 'researchStage',
|
||||||
label: '项目阶段',
|
label: '研发阶段',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'researchStage',
|
prop: 'researchStage',
|
||||||
label: '项目阶段',
|
label: '研发阶段',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) {
|
if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) {
|
||||||
|
|||||||
@@ -34,8 +34,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="所属公司" prop="companyIds" class="tree-select">
|
<el-form-item label="所属公司" prop="companyIds" class="tree-select">
|
||||||
<div>{{ getName(companyList) }}</div>
|
<div v-if="route.query.id">{{selectedCompanyList}}</div>
|
||||||
<el-button color="#DED0B2" @click="showCompany">{{ companyList.length === 0 ? '请选择所属公司' : '更改' }}
|
<div v-else>{{ getName(selectedCompanyList) }}</div>
|
||||||
|
<el-button color="#DED0B2" @click="showCompany">{{ selectedCompanyList.length === 0 ? '请选择所属公司' : '更改' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-tree-select v-model="formData.companyIds" :data="companyOption"-->
|
<!-- <el-tree-select v-model="formData.companyIds" :data="companyOption"-->
|
||||||
<!-- filterable clearable :check-strictly="true" multiple/>-->
|
<!-- filterable clearable :check-strictly="true" multiple/>-->
|
||||||
@@ -96,7 +97,7 @@
|
|||||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||||
<el-button @click="handleBack">返回</el-button>
|
<el-button @click="handleBack">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<company-picker :multiple="true" ref="companyRef" title="请选择所属公司" v-model:value="companyList" @ok="selected"/>
|
<company-picker :multiple="true" ref="companyRef" title="请选择所属公司" @ok="selected"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -119,11 +120,13 @@ import {getSubCompOpt} from '@/api/user/user.js'
|
|||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
import {getFundOption} from "@/api/special-fund";
|
import {getFundOption} from "@/api/special-fund";
|
||||||
import CompanyPicker from "@/components/DetailComponent/CompanyPicker.vue";
|
import CompanyPicker from "@/components/DetailComponent/CompanyPicker.vue";
|
||||||
|
import {matterTree} from "@/utils/matterTree";
|
||||||
|
|
||||||
import {useCacheStore} from '@/stores/cache.js'
|
import {useCacheStore} from '@/stores/cache.js'
|
||||||
const cacheStore = useCacheStore()
|
const cacheStore = useCacheStore()
|
||||||
const companyRef = ref()
|
const companyRef = ref()
|
||||||
const companyList = ref([])
|
const selectedCompanyList = ref([])
|
||||||
|
// const companyList = ref([])
|
||||||
const changeDiagram = ref(false)
|
const changeDiagram = ref(false)
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
@@ -152,6 +155,7 @@ const showTable = ref(true)
|
|||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const processInstanceData = ref()
|
const processInstanceData = ref()
|
||||||
const formPermMap = ref(new Map());
|
const formPermMap = ref(new Map());
|
||||||
|
const companyNameArray = ref([])
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
requirementName: [{required: true, message: '请输入征集名称', trigger: 'blur'}],
|
requirementName: [{required: true, message: '请输入征集名称', trigger: 'blur'}],
|
||||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||||
@@ -203,6 +207,15 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const getCompanyOptionItem = (val) => {
|
||||||
|
if (val !== undefined) {
|
||||||
|
val.forEach(item => {
|
||||||
|
matterTree(companyNameArray.value, companyOption.value, item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return companyNameArray.value.join(',');
|
||||||
|
}
|
||||||
const getName = (list) => {
|
const getName = (list) => {
|
||||||
return list.map(item => item.label).join(',')
|
return list.map(item => item.label).join(',')
|
||||||
}
|
}
|
||||||
@@ -210,12 +223,10 @@ const showCompany = () => {
|
|||||||
companyRef.value.show()
|
companyRef.value.show()
|
||||||
}
|
}
|
||||||
const selected = (select) => {
|
const selected = (select) => {
|
||||||
let companyInfoList = []
|
|
||||||
for (let val of select) {
|
for (let val of select) {
|
||||||
companyInfoList.push(val)
|
|
||||||
formData.value.companyIds.push(val.value)
|
formData.value.companyIds.push(val.value)
|
||||||
}
|
}
|
||||||
companyList.value = companyInfoList
|
selectedCompanyList.value = select
|
||||||
}
|
}
|
||||||
const checkFormPrem = (formKey) => {
|
const checkFormPrem = (formKey) => {
|
||||||
if (formPermMap.value.hasOwnProperty(formKey)) {
|
if (formPermMap.value.hasOwnProperty(formKey)) {
|
||||||
@@ -306,7 +317,6 @@ const init = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const submitParam = (item) => {
|
const submitParam = (item) => {
|
||||||
console.log('item..', item.companyIds)
|
|
||||||
if (item.companyIds.length === 0) {
|
if (item.companyIds.length === 0) {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -373,6 +383,7 @@ const handleResubmit = () => {
|
|||||||
const getDetailInfo = async () => {
|
const getDetailInfo = async () => {
|
||||||
getFormInfo(route.query.id).then(res => {
|
getFormInfo(route.query.id).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
|
selectedCompanyList.value = getCompanyOptionItem(res.data.companyIds)
|
||||||
formData.value = res.data
|
formData.value = res.data
|
||||||
showTinymce.value = false
|
showTinymce.value = false
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
|
|||||||
@@ -60,11 +60,11 @@ const searchConfig = reactive([
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目阶段',
|
label: '研发阶段',
|
||||||
prop: 'researchStage',
|
prop: 'researchStage',
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择项目阶段查询',
|
placeholder: '请选择研发阶段查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
@@ -123,7 +123,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'researchStage',
|
prop: 'researchStage',
|
||||||
label: '项目阶段',
|
label: '研发阶段',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'researchStage',
|
prop: 'researchStage',
|
||||||
label: '项目阶段',
|
label: '研发阶段',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
|
|||||||
@@ -31,10 +31,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="researchStage" label="项目阶段">
|
<el-table-column prop="researchStage" label="研发阶段">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item prop="researchStage" :rules="scope.row.researchStage?'1':rules.researchStage">
|
<el-form-item prop="researchStage" :rules="scope.row.researchStage?'1':rules.researchStage">
|
||||||
<el-select v-model="scope.row.researchStage" placeholder="请选择项目阶段" clearable filterable>
|
<el-select v-model="scope.row.researchStage" placeholder="请选择研发阶段" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in cacheStore.getDict('fee_stage')"
|
v-for="item in cacheStore.getDict('fee_stage')"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -115,7 +115,7 @@ const baseForm = ref()
|
|||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
time: [{required: true, message: '请选择时间', trigger: 'blur'}],
|
time: [{required: true, message: '请选择时间', trigger: 'blur'}],
|
||||||
projectCost: [{required: true, message: '请输入项目费用', trigger: 'blur'}],
|
projectCost: [{required: true, message: '请输入项目费用', trigger: 'blur'}],
|
||||||
researchStage: [{required: true, message: '请输入项目阶段', trigger: 'blur'}],
|
researchStage: [{required: true, message: '请输入研发阶段', trigger: 'blur'}],
|
||||||
digest: [{required: true, message: '请输入摘要', trigger: 'blur'}],
|
digest: [{required: true, message: '请输入摘要', trigger: 'blur'}],
|
||||||
afterTax: [{required: true, message: '请输入税后余额', trigger: 'blur'}]
|
afterTax: [{required: true, message: '请输入税后余额', trigger: 'blur'}]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="picker">
|
<div class="picker">
|
||||||
<div class="candidate" v-loading="loading">
|
<div class="candidate" v-loading="loading">
|
||||||
<el-input v-model="filterText" @change="getList(1)"
|
<el-input v-model="filterText" @change="getList(1)"
|
||||||
clearable placeholder="输入部门/昵称进行搜索">
|
clearable placeholder="输入昵称进行搜索">
|
||||||
<template #append>
|
<template #append>
|
||||||
<el-button @click="getList(1)">搜索</el-button>
|
<el-button @click="getList(1)">搜索</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<template #default="{ node, data }">
|
<template #default="{ node, data }">
|
||||||
<div class="tree-node">
|
<div class="tree-node">
|
||||||
<div v-if="data.type === 0" style="display: flex;align-items: center;padding: 3px 0">
|
<div v-if="data.type === 0" style="display: flex;align-items: center;padding: 3px 0">
|
||||||
<el-icon>
|
<el-icon :color="data.accountType==='1'?'#95d475':'#409eff'">
|
||||||
<UserFilled/>
|
<UserFilled/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
{{ node.label }}-{{ data.companyName }}
|
{{ node.label }}-{{ data.companyName }}
|
||||||
|
|||||||
Reference in New Issue
Block a user