fix : 修复新增需求征集所属公司选择弹框
This commit is contained in:
@@ -34,9 +34,10 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属公司" prop="companyIds" class="tree-select">
|
||||
<!-- <el-button @click="showCompany">请选择</el-button>-->
|
||||
<el-tree-select v-model="formData.companyIds" :data="companyOption"
|
||||
filterable clearable :check-strictly="true" multiple/>
|
||||
<div>{{ getName(companyList) }}</div>
|
||||
<el-button @click="showCompany">{{companyList.length===0?'请选择':'更改'}}</el-button>
|
||||
<!-- <el-tree-select v-model="formData.companyIds" :data="companyOption"-->
|
||||
<!-- filterable clearable :check-strictly="true" multiple/>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -93,6 +94,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"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -109,12 +111,15 @@ import {
|
||||
} from "@/api/project-demand/index.js";
|
||||
import FileUpload from "@/components/FileUpload.vue";
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElMessageBox, ElNotification} from "element-plus";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useRoute, useRouter} from 'vue-router'
|
||||
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";
|
||||
|
||||
const companyRef = ref()
|
||||
const companyList = ref([])
|
||||
const changeDiagram = ref(false)
|
||||
const tagsViewStore = useTagsView()
|
||||
const authStore = useAuthStore()
|
||||
@@ -124,7 +129,7 @@ const demandForm = ref()
|
||||
const dateValue = ref()
|
||||
const formData = ref({
|
||||
requirementName: '',
|
||||
companyIds: '',
|
||||
companyIds: [],
|
||||
collectType: '',
|
||||
deadline: '',
|
||||
collectExplain: '',
|
||||
@@ -200,7 +205,24 @@ const tableConfig = reactive({
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const getName = (list) => {
|
||||
return list.map(item => item.label).join(',')
|
||||
}
|
||||
const showCompany = () => {
|
||||
companyRef.value.show()
|
||||
}
|
||||
const selected = (select) => {
|
||||
let companyInfoList = []
|
||||
for (let val of select) {
|
||||
let companyInfo = {
|
||||
value: val.value,
|
||||
label: val.label
|
||||
}
|
||||
companyInfoList.push(companyInfo)
|
||||
formData.value.companyIds.push(val.value)
|
||||
}
|
||||
companyList.value = companyInfoList
|
||||
}
|
||||
const checkFormPrem = (formKey) => {
|
||||
if (formPermMap.value.hasOwnProperty(formKey)) {
|
||||
let formItem = formPermMap.value[formKey];
|
||||
@@ -208,7 +230,6 @@ const checkFormPrem = (formKey) => {
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const handleDownload = (row) => {
|
||||
@@ -291,6 +312,15 @@ const init = async () => {
|
||||
})
|
||||
}
|
||||
const submitParam = (item) => {
|
||||
console.log('item..',item.companyIds)
|
||||
if(item.companyIds.length===0){
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择所属公司',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let files = []
|
||||
item.fileList.forEach(item => {
|
||||
let obj = {
|
||||
|
||||
Reference in New Issue
Block a user