fix : 修复征集公司回显,所属公司改为征集公司
This commit is contained in:
@@ -118,7 +118,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
export const matterTree = (array,data, id) => {
|
export const matterTree = (array,data, id) => {
|
||||||
if (id) {
|
if (id) {
|
||||||
for (let i = 0; i < data.length; i++) {
|
data.forEach(item => {
|
||||||
if (data[i].value == id) {
|
if (item.value == id) {
|
||||||
array.push(data[i].label);
|
array.push(item.label);
|
||||||
}
|
}
|
||||||
if (data[i].children && data[i].children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
matterTree(array,data[i].children,id)
|
matterTree(array,item.children,id)
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ const showCompany = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const selected = (select) => {
|
const selected = (select) => {
|
||||||
|
formData.value.companyIds=[]
|
||||||
for (let val of select) {
|
for (let val of select) {
|
||||||
formData.value.companyIds.push(val.value)
|
formData.value.companyIds.push(val.value)
|
||||||
}
|
}
|
||||||
@@ -368,7 +369,6 @@ const submitParam = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
console.log('submitParam(formData.value)', submitParam(formData.value))
|
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
@@ -415,16 +415,14 @@ const getCompanyOptionItem = (val) => {
|
|||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
val.forEach(item => {
|
val.forEach(item => {
|
||||||
matterTree(companyNameArray.value, companyOption.value, item)
|
matterTree(companyNameArray.value, companyOption.value, item)
|
||||||
companyNameArray.value.forEach(companyItem => {
|
})
|
||||||
newObj = {
|
companyNameArray.value.forEach(companyItem => {
|
||||||
label: companyItem,
|
newObj = {
|
||||||
value: item
|
label: companyItem
|
||||||
}
|
}
|
||||||
newArray.push(newObj)
|
newArray.push(newObj)
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return newArray;
|
return newArray;
|
||||||
}
|
}
|
||||||
const getDetailInfo = async () => {
|
const getDetailInfo = async () => {
|
||||||
@@ -460,7 +458,7 @@ const handleDelete = (row) => {
|
|||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.id === row.fileId), 1);
|
formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.id === row.fileId), 1);
|
||||||
showTable.value = formData.value.fileList.length !== 0;
|
// showTable.value = formData.value.fileList.length !== 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'companyName',
|
prop: 'companyName',
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
currentRender: ({row, index}) => (
|
currentRender: ({row, index}) => (
|
||||||
<div style={{width: '300px', textOverflow: 'ellipsis'}}>{row.companyName}</div>)
|
<div style={{width: '300px', textOverflow: 'ellipsis'}}>{row.companyName}</div>)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import {useTagsView} from '@/stores/tagsview.js'
|
|||||||
import {uploadFileList} from "@/api/project-manage/attachment";
|
import {uploadFileList} from "@/api/project-manage/attachment";
|
||||||
import {computed, ref} from "vue";
|
import {computed, ref} from "vue";
|
||||||
import {getBaseInfoApi} from "@/components/steps/api";
|
import {getBaseInfoApi} from "@/components/steps/api";
|
||||||
|
import {downloadFile,deleteFile} from "@/api/project-demand";
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -68,7 +69,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
@@ -110,10 +111,14 @@ const tableConfig = reactive({
|
|||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
<popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
|
||||||
|
perm={['mosr:requirement:del']}
|
||||||
|
onDelete={() => handleDelete(row)}/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -126,6 +131,28 @@ const name = ref(router.currentRoute.value.name)
|
|||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
tagName: [{required: true, message: '请输入标签名称', trigger: ['blur', 'change']}],
|
tagName: [{required: true, message: '请输入标签名称', trigger: ['blur', 'change']}],
|
||||||
})
|
})
|
||||||
|
const handleDelete = (row) => {
|
||||||
|
deleteFile(row.fileId).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
fileList.value.splice(fileList.value.findIndex((item) => item.id === row.fileId), 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDownload = (row) => {
|
||||||
|
downloadFile(row.fileId).then(res => {
|
||||||
|
const blob = new Blob([res])
|
||||||
|
let a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = row.originalFileName
|
||||||
|
a.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
const getBaseInfo = async () => {
|
const getBaseInfo = async () => {
|
||||||
try {
|
try {
|
||||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-if="type==='singleDetail'">
|
<el-col :span="24" v-if="type==='singleDetail'">
|
||||||
<el-form-item label="所属公司">
|
<el-form-item label="征集公司">
|
||||||
<span :class="showExpendClass(showMoreCompany,formData.companyIds)">{{
|
<span :class="showExpendClass(showMoreCompany,formData.companyIds)">{{
|
||||||
getCompanyName(formData.companyIds)
|
getCompanyName(formData.companyIds)
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属公司',
|
label: '征集公司',
|
||||||
prop: 'affiliatedCompany',
|
prop: 'affiliatedCompany',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 24
|
span: 24
|
||||||
|
|||||||
Reference in New Issue
Block a user