fix : 修复需求征集编辑时所属公司回显,项目阶段改成研发阶段,人员选择器主子账号颜色区分
This commit is contained in:
@@ -34,8 +34,9 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属公司" prop="companyIds" class="tree-select">
|
||||
<div>{{ getName(companyList) }}</div>
|
||||
<el-button color="#DED0B2" @click="showCompany">{{ companyList.length === 0 ? '请选择所属公司' : '更改' }}
|
||||
<div v-if="route.query.id">{{selectedCompanyList}}</div>
|
||||
<div v-else>{{ getName(selectedCompanyList) }}</div>
|
||||
<el-button color="#DED0B2" @click="showCompany">{{ selectedCompanyList.length === 0 ? '请选择所属公司' : '更改' }}
|
||||
</el-button>
|
||||
<!-- <el-tree-select v-model="formData.companyIds" :data="companyOption"-->
|
||||
<!-- filterable clearable :check-strictly="true" multiple/>-->
|
||||
@@ -96,7 +97,7 @@
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
<company-picker :multiple="true" ref="companyRef" title="请选择所属公司" v-model:value="companyList" @ok="selected"/>
|
||||
<company-picker :multiple="true" ref="companyRef" title="请选择所属公司" @ok="selected"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -119,11 +120,13 @@ import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
import CompanyPicker from "@/components/DetailComponent/CompanyPicker.vue";
|
||||
import {matterTree} from "@/utils/matterTree";
|
||||
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const companyRef = ref()
|
||||
const companyList = ref([])
|
||||
const selectedCompanyList = ref([])
|
||||
// const companyList = ref([])
|
||||
const changeDiagram = ref(false)
|
||||
const tagsViewStore = useTagsView()
|
||||
const authStore = useAuthStore()
|
||||
@@ -152,6 +155,7 @@ const showTable = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const processInstanceData = ref()
|
||||
const formPermMap = ref(new Map());
|
||||
const companyNameArray = ref([])
|
||||
const rules = reactive({
|
||||
requirementName: [{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) => {
|
||||
return list.map(item => item.label).join(',')
|
||||
}
|
||||
@@ -210,12 +223,10 @@ const showCompany = () => {
|
||||
companyRef.value.show()
|
||||
}
|
||||
const selected = (select) => {
|
||||
let companyInfoList = []
|
||||
for (let val of select) {
|
||||
companyInfoList.push(val)
|
||||
formData.value.companyIds.push(val.value)
|
||||
}
|
||||
companyList.value = companyInfoList
|
||||
selectedCompanyList.value = select
|
||||
}
|
||||
const checkFormPrem = (formKey) => {
|
||||
if (formPermMap.value.hasOwnProperty(formKey)) {
|
||||
@@ -306,7 +317,6 @@ const init = async () => {
|
||||
})
|
||||
}
|
||||
const submitParam = (item) => {
|
||||
console.log('item..', item.companyIds)
|
||||
if (item.companyIds.length === 0) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -373,6 +383,7 @@ const handleResubmit = () => {
|
||||
const getDetailInfo = async () => {
|
||||
getFormInfo(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
selectedCompanyList.value = getCompanyOptionItem(res.data.companyIds)
|
||||
formData.value = res.data
|
||||
showTinymce.value = false
|
||||
showTable.value = false
|
||||
|
||||
Reference in New Issue
Block a user