pull/781/head
parent
6667e8b300
commit
50691d39d1
|
|
@ -0,0 +1,20 @@
|
|||
<template>
|
||||
|
||||
<ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
|
||||
<IFrame :src="src" />
|
||||
</ContentWrap>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
||||
defineOptions({ name: 'previewDoc' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
const src = ref('')
|
||||
console.log('%csrccomponents/IFrame/src/preview.vue:13 query.fileExtension', 'color: #007acc;', query.src);
|
||||
if(query.type === 'pdf') {
|
||||
src.value = decodeURIComponent(query.src)
|
||||
} else {
|
||||
src.value = 'https://view.officeapps.live.com/op/embed.aspx?src='+query.src
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
@ -26,7 +26,10 @@
|
|||
<Icon class="mr-5px" icon="ep:refresh" />
|
||||
重置
|
||||
</el-button>
|
||||
|
||||
<el-button v-hasPermi="['crm:contact:create']" type="primary" @click="openForm('create')">
|
||||
<Icon class="mr-5px" icon="ep:plus" />
|
||||
新增联系人
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
|
@ -54,12 +57,16 @@
|
|||
</template>
|
||||
</Dialog>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<ContactForm ref="formRef" @success="getList" />
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import * as ContactApi from '@/api/crm/contact'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import ContactForm from '@/views/crm/contact/ContactForm.vue'
|
||||
import download from '@/utils/download'
|
||||
import { BillTemplateApi, BillTemplateVO } from '@/api/crm/billtemplate'
|
||||
|
||||
|
|
@ -88,7 +95,6 @@ const exportLoading = ref(false) // 导出的加载中
|
|||
const open = async (data: [], id) => {
|
||||
dialogVisible.value = true
|
||||
multipleSelection.value = data
|
||||
console.log('%csrc/components/contact/index.vue:91 id', 'color: #007acc;', id);
|
||||
queryParams.customerId = id
|
||||
await getList()
|
||||
await setSelections()
|
||||
|
|
@ -100,6 +106,12 @@ const getRowKey = (row) => {
|
|||
return row.id
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type,id, queryParams.customerId)
|
||||
}
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||
name: 'CrmCustomerDetail',
|
||||
meta: {
|
||||
title: '客户详情',
|
||||
noCache: true,
|
||||
noCache: false,
|
||||
hidden: true,
|
||||
activeMenu: '/crm/customer'
|
||||
},
|
||||
|
|
@ -773,6 +773,18 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||
title: '合同预览',
|
||||
activeMenu: '/crm/filetemplate'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'filetemplate/preview',
|
||||
component: () => import('@/components/IFrame/src/preview.vue'),
|
||||
name: 'FileTemplatePreview',
|
||||
meta: {
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
title: '文件预览',
|
||||
activeMenu: '/filetemplate/preview'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -484,6 +484,6 @@ onMounted(async () => {
|
|||
// formData.value.ownerUserId = useUserStore().getUser.id
|
||||
// }
|
||||
// 获取联系人
|
||||
contactList.value = await ContactApi.getSimpleContactList()
|
||||
contactList.value = await CustomerApi.getCustomerSimpleList()
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -93,14 +93,7 @@
|
|||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="授信计算周期" prop="creditCalcCycle" >
|
||||
<el-select v-model="formData.creditCalcCycle" placeholder="" disabled>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions('credit_calc_cycle')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="formData.creditCalcCycle" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
@ -268,7 +261,18 @@
|
|||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商务负责人" prop="ownerUserId">
|
||||
<el-input v-model="formData.ownerUserId" placeholder="" disabled />
|
||||
<el-select
|
||||
v-model="formData.ownerUserId"
|
||||
disabled
|
||||
class="w-1/1"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.nickname"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="130px"
|
||||
label-width="142px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-row>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<el-input v-model="formData.regType" disabled placeholder="自动获取" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="上市情况" prop="customerId">
|
||||
<el-select v-model="formData.customerId" placeholder="请选择上市情况" disabled @change="onCustomerChange">
|
||||
<el-option
|
||||
|
|
@ -35,13 +35,13 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="合作类型" prop="cooperationType">
|
||||
<el-input v-model="formData.cooperationType" disabled />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="融资信息" prop="companyType">
|
||||
<el-select v-model="formData.customerId" placeholder="请选择融资信息" disabled @change="onCustomerChange">
|
||||
<el-option
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实缴资金" prop="paidInCapital">
|
||||
<el-input v-model="formData.actualCapital" disabled />
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目前额度" prop="creditLimit">
|
||||
<el-input v-model="formData.creditLimit" placeholder="请输入目前额度" disabled />
|
||||
<el-input v-model="formData.creditLimit" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
<el-option
|
||||
v-for="dict in orgList"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:label="dict.orgName"
|
||||
:value="dict.id"
|
||||
/>
|
||||
</el-select>
|
||||
|
|
@ -140,12 +140,12 @@
|
|||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="调整金额(元)" prop="changeAmount">
|
||||
<el-input v-model="formData.changeAmount" type="number" :disabled="!!type" placeholder="请输入调整金额(元)" @input="onChangeAmount" />
|
||||
<el-input v-model="formData.changeAmount" oninput="value=value.match(/^\d+(?:\.\d{0,2})?/)" :disabled="!!type" placeholder="请输入调整金额(元)" @input="onChangeAmount" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最终额度" prop="afterAmount">
|
||||
<el-input v-model="formData.afterAmount" type="number" disabled placeholder="请输入最终额度" />
|
||||
<el-input v-model="formData.afterAmount" type="number" disabled placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
@ -276,7 +276,7 @@ watch(
|
|||
)
|
||||
|
||||
const onChangeAmount = async (amount: number) => {
|
||||
formData.value.afterAmount = Number(formData.value.creditLimit) + Number(amount);
|
||||
formData.value.afterAmount = Number(formData.value.creditLimit) + Number(amount).toFixed(2);
|
||||
}
|
||||
|
||||
const onCustomerChange = async (customerId: string) => {
|
||||
|
|
@ -385,7 +385,7 @@ const resetForm = () => {
|
|||
}
|
||||
|
||||
// const route = useRoute();
|
||||
// onMounted(async () => {
|
||||
onMounted(async () => {
|
||||
// console.log('%csrc/views/crm/quotation/QuotationForm.vue:596 route', 'color: #007acc;', route);
|
||||
// formType.value = route.query.id;
|
||||
|
||||
|
|
@ -404,10 +404,10 @@ const resetForm = () => {
|
|||
// businessList.value = await BusinessApi.getSimpleBusinessList()
|
||||
// // 获得部门树
|
||||
// deptTree.value = handleTree(await DeptApi.getSimpleDeptList())
|
||||
// const org = await ContractApi.getOrg({
|
||||
// pageNo: 1,
|
||||
// pageSize: 1000
|
||||
// })
|
||||
// orgList.value = org.list
|
||||
// });
|
||||
const org = await ContractApi.getOrg({
|
||||
pageNo: 1,
|
||||
pageSize: 1000
|
||||
})
|
||||
orgList.value = org.list
|
||||
});
|
||||
</script>
|
||||
|
|
@ -94,14 +94,7 @@
|
|||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="授信计算周期" prop="creditCalcCycle" >
|
||||
<el-select v-model="formData.creditCalcCycle" placeholder="" disabled>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions('credit_calc_cycle')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="formData.creditCalcCycle" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
@ -268,7 +261,18 @@
|
|||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商务负责人" prop="ownerUserId">
|
||||
<el-input v-model="formData.ownerUserId" placeholder="" disabled />
|
||||
<el-select
|
||||
v-model="formData.ownerUserId"
|
||||
disabled
|
||||
class="w-1/1"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.nickname"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@
|
|||
command="handlePrint"
|
||||
v-if="checkPermi(['crm:contract:print']) && scope.row.auditStatus === 2"
|
||||
>
|
||||
打印合同
|
||||
合同下载
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
command="handleDelete"
|
||||
|
|
|
|||
|
|
@ -27,11 +27,22 @@
|
|||
align="center"
|
||||
prop="nextTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="图片" align="center" prop="picUrls" />
|
||||
width="180px" />
|
||||
<el-table-column label="图片" align="center" prop="picUrls">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="scope.row.picUrls"
|
||||
:underline="false"
|
||||
type="primary"
|
||||
@click="previewPic(scope.row.picUrls)"
|
||||
>
|
||||
预览
|
||||
</el-link>
|
||||
<span v-else>无附件</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="附件" align="center" prop="fileUrls">
|
||||
<!-- <template #default="scope">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="scope.row.fileUrls"
|
||||
:underline="false"
|
||||
|
|
@ -41,7 +52,7 @@
|
|||
预览
|
||||
</el-link>
|
||||
<span v-else>无附件</span>
|
||||
</template> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关联的联系人编号数组" align="center" prop="contactIds" />
|
||||
<el-table-column label="创建者" align="center" prop="creator" >
|
||||
|
|
@ -88,6 +99,12 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
<el-image-viewer
|
||||
v-if="show"
|
||||
:url-list="urlList"
|
||||
show-progress
|
||||
@close="show = false"
|
||||
/>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<ReturnVisitRecordForm ref="formRef" @success="getList" />
|
||||
|
|
@ -110,7 +127,8 @@ const props = defineProps<{
|
|||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||
|
||||
const show = ref(false)
|
||||
const urlList = ref([])
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<ReturnVisitRecordVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
|
|
@ -190,9 +208,17 @@ const handleExport = async () => {
|
|||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
const router = useRouter() // 路由
|
||||
|
||||
const previewPic = (val) => {
|
||||
show.value = true
|
||||
urlList.value = val.split(',')
|
||||
}
|
||||
|
||||
const previewFile = (fileUrls) => {
|
||||
// 假设 fileUrls 是一个字符串,包含文件的完整 URL
|
||||
|
||||
|
||||
// // 假设 fileUrls 是一个字符串,包含文件的完整 URL
|
||||
if (!fileUrls) {
|
||||
message.error('没有附件');
|
||||
return;
|
||||
|
|
@ -200,25 +226,13 @@ const previewFile = (fileUrls) => {
|
|||
|
||||
// 检查文件类型
|
||||
const fileExtension = fileUrls.split('.').pop().toLowerCase();
|
||||
switch (fileExtension) {
|
||||
case 'pdf':
|
||||
// 预览 PDF 文件
|
||||
window.open(fileUrls, '_blank');
|
||||
break;
|
||||
case 'xlsx':
|
||||
case 'xls':
|
||||
// 预览 Excel 文件
|
||||
window.open(fileUrls, '_blank');
|
||||
break;
|
||||
case 'doc':
|
||||
case 'docx':
|
||||
// 预览 Word 文件
|
||||
window.open(fileUrls, '_blank');
|
||||
break;
|
||||
default:
|
||||
message.error('不支持的文件类型');
|
||||
break;
|
||||
}
|
||||
router.push({
|
||||
name: 'FileTemplatePreview',
|
||||
query: {
|
||||
src: encodeURIComponent(fileUrls),
|
||||
type: fileExtension
|
||||
}
|
||||
})
|
||||
};
|
||||
const getName = (opt, val) => {
|
||||
const arr = opt.filter(v => v.id == val)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,32 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="跟进内容" prop="content" />
|
||||
<el-table-column label="图片" align="center" prop="picUrls">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="scope.row.picUrls"
|
||||
:underline="false"
|
||||
type="primary"
|
||||
@click="previewPic(scope.row.picUrls)"
|
||||
>
|
||||
预览
|
||||
</el-link>
|
||||
<span v-else>无附件</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="附件" align="center" prop="fileUrls">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="scope.row.fileUrls"
|
||||
:underline="false"
|
||||
type="primary"
|
||||
@click="previewFile(scope.row.fileUrls)"
|
||||
>
|
||||
预览
|
||||
</el-link>
|
||||
<span v-else>无附件</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:formatter="dateFormatter"
|
||||
align="center"
|
||||
|
|
@ -84,6 +110,14 @@
|
|||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<el-image-viewer
|
||||
v-if="show"
|
||||
:url-list="urlList"
|
||||
show-progress
|
||||
@close="show = false"
|
||||
|
||||
/>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<FollowUpRecordForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
|
@ -104,7 +138,8 @@ const props = defineProps<{
|
|||
}>()
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const show = ref(false)
|
||||
const urlList = ref([])
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<FollowUpRecordVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
|
|
@ -127,6 +162,11 @@ const getList = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
const previewPic = (val) => {
|
||||
show.value = true
|
||||
urlList.value = val.split(',')
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref<InstanceType<typeof FollowUpRecordForm>>()
|
||||
const openForm = () => {
|
||||
|
|
@ -146,6 +186,26 @@ const handleDelete = async (id: number) => {
|
|||
} catch {}
|
||||
}
|
||||
|
||||
//预览
|
||||
const previewFile = (fileUrls) => {
|
||||
// // 假设 fileUrls 是一个字符串,包含文件的完整 URL
|
||||
if (!fileUrls) {
|
||||
message.error('没有附件');
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查文件类型
|
||||
const router = useRouter() // 路由
|
||||
const fileExtension = fileUrls.split('.').pop().toLowerCase();
|
||||
router.push({
|
||||
name: 'FileTemplatePreview',
|
||||
query: {
|
||||
src: encodeURIComponent(fileUrls),
|
||||
type: fileExtension
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
/** 打开联系人详情 */
|
||||
const { push } = useRouter()
|
||||
const openContactDetail = (id: number) => {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户" prop="customerId">
|
||||
<el-select v-model="formData.customerId" placeholder="请选择客户" disabled clearable @change="onCustomerChange">
|
||||
<el-select v-model="formData.customerId" placeholder="" disabled clearable @change="onCustomerChange">
|
||||
<el-option
|
||||
v-for="item in customerList"
|
||||
:key="item.id"
|
||||
|
|
@ -243,7 +243,7 @@
|
|||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="方案报价人" prop="pricingUserId">
|
||||
<el-select v-model="formData.pricingUserId" placeholder="请选择方案报价人">
|
||||
<el-select v-model="formData.pricingUserId" disabled placeholder="请选择方案报价人">
|
||||
<el-option
|
||||
v-for="dict in userOptions"
|
||||
:key="dict.id"
|
||||
|
|
@ -396,6 +396,7 @@ import * as UserApi from '@/api/system/user'
|
|||
import * as DeptApi from '@/api/system/dept'
|
||||
import * as BusinessApi from '@/api/crm/business'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
|
||||
/** CRM 方案报价 表单 */
|
||||
defineOptions({ name: 'QuotationForm' })
|
||||
|
|
@ -708,6 +709,9 @@ onMounted(async () => {
|
|||
|
||||
if (formType.value) open(formType.value)
|
||||
|
||||
formData.value.pricingUserId = useUserStore().getUser.id;
|
||||
|
||||
|
||||
// 获得客户列表
|
||||
customerList.value = await CustomerApi.getSelfCustomerSimpleList()
|
||||
// 获得用户列表
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@
|
|||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="唯一主键" align="center" prop="id" />
|
||||
<!-- <el-table-column label="项目ID" align="center" prop="projectId" /> -->
|
||||
<el-table-column label="姓名" align="center" prop="userId" />
|
||||
<el-table-column label="姓名" align="center" prop="userId">
|
||||
<template #default="scope">
|
||||
{{getName(userOptions, scope.row.userId)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="系统占比" align="center" prop="bonusPercentage">
|
||||
<template #default="scope">
|
||||
{{(scope.row.bonusPercentage * 100).toFixed(2) + '%'}}
|
||||
|
|
@ -143,6 +147,11 @@ const handleExport = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
const getName = (opt, val) => {
|
||||
const arr = opt.filter(v => v.id == val)
|
||||
return arr.length ? arr[0]['nickname'] : ''
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center" prop="id" />
|
||||
<el-table-column label="任务标题" align="center" prop="taskName" />
|
||||
<el-table-column label="任务编号" align="center" prop="taskNo" />
|
||||
<el-table-column label="任务编号" align="center" prop="taskNo" width="150" />
|
||||
<el-table-column label="任务进度" align="center" prop="taskProgress">
|
||||
<template #default="scope">
|
||||
{{Math.floor(scope.row.taskProgress * 100)}}
|
||||
{{Math.floor(scope.row.taskProgress * 100) +'%'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务状态" align="center" prop="taskStateName" />
|
||||
|
|
|
|||
|
|
@ -122,7 +122,19 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="项目开始日期" align="center" prop="startDate" width="170" />
|
||||
<el-table-column label="项目结束日期" align="center" prop="endDate" width="170" />
|
||||
<el-table-column label="项目附件" align="center" prop="attachment" />
|
||||
<el-table-column label="项目附件" align="center" prop="attachment">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="scope.row.attachment"
|
||||
:underline="false"
|
||||
type="primary"
|
||||
@click="previewFile(scope.row.attachment)"
|
||||
>
|
||||
预览
|
||||
</el-link>
|
||||
<span v-else>无附件</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="立项奖金评估" align="center" prop="bonusEvaluation" width="120">
|
||||
<template #default="scope">
|
||||
{{scope.row.bonusEvaluation ? '是' : '否'}}
|
||||
|
|
@ -248,8 +260,8 @@
|
|||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<ProjectTaskForm ref="taskRef" @success="getList" />
|
||||
<ProjectBonusForm ref="bonusRef" @success="getList" :userOptions="userOptions" />
|
||||
<ProjectTaskForm ref="taskRef" @success="getList" :userOptions="userOptions" />
|
||||
<ProjectBonusForm ref="bonusRef" @success="getList" :userOptions="userOptions" :id="projectId" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
@ -268,7 +280,7 @@ defineOptions({ name: 'Project' })
|
|||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||
|
||||
const projectId = ref('')
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<ProjectVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
|
|
@ -365,11 +377,32 @@ const bonusRef = ref()
|
|||
const taskRef = ref()
|
||||
|
||||
const openAddUserForm = (row) => {
|
||||
bonusRef.value.open(row.id)
|
||||
projectId.value = row.id
|
||||
bonusRef.value.open(row)
|
||||
}
|
||||
|
||||
//预览
|
||||
const previewFile = (fileUrls) => {
|
||||
// // 假设 fileUrls 是一个字符串,包含文件的完整 URL
|
||||
if (!fileUrls) {
|
||||
message.error('没有附件');
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查文件类型
|
||||
const fileExtension = fileUrls.split('.').pop().toLowerCase();
|
||||
router.push({
|
||||
name: 'FileTemplatePreview',
|
||||
query: {
|
||||
src: encodeURIComponent(fileUrls),
|
||||
type: fileExtension
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
const handleAddTask = (row) => {
|
||||
taskRef.value.open(row.id)
|
||||
row.type = 'create'
|
||||
taskRef.value.open(row)
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue