add
This commit is contained in:
parent
b4695c08dd
commit
b2818ff4f2
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tooltip :content="content" v-if="settingStore.showToolTip">
|
<el-tooltip :content="content" v-if="settingStore.showToolTip">
|
||||||
<el-icon :class="class">
|
<el-icon :class="class" @click="navGo(url)">
|
||||||
<InfoFilled />
|
<InfoFilled />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps } from 'vue';
|
import { defineProps } from 'vue';
|
||||||
import useSettingStore from '@/stores/modules/setting'
|
import useSettingStore from '@/stores/modules/setting'
|
||||||
|
import { useRouter } from "vue-router"
|
||||||
|
const router = useRouter()
|
||||||
const settingStore = useSettingStore()
|
const settingStore = useSettingStore()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
class: {
|
class: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -20,11 +20,16 @@ defineProps({
|
|||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
type: String
|
type: String
|
||||||
}
|
},
|
||||||
|
url: String
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const navGo = (url) => {
|
||||||
|
if (!url) return
|
||||||
|
|
||||||
|
router.push(url)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
40
src/views/project_document/detail.js
Normal file
40
src/views/project_document/detail.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "项目文档详情",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目编号",
|
||||||
|
value: "project_code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "文档大类",
|
||||||
|
value: "large_category"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "文档编号",
|
||||||
|
value: "code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "文档名称",
|
||||||
|
value: "name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "文档中类",
|
||||||
|
value: "middle_category"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "版本号",
|
||||||
|
value: "version"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "annex",
|
||||||
|
column: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,164 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="项目文档详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目名称">
|
|
||||||
{{ formData.project_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目编码">
|
|
||||||
{{ formData.project_code }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="文档大类">
|
|
||||||
{{ formData.large_category }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="文档编号">
|
|
||||||
{{ formData.code
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="文档名称">
|
|
||||||
{{ formData.name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="文档中类">
|
|
||||||
{{ formData.middle_category }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="版本号">
|
|
||||||
{{ formData.version }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
|
|
||||||
<el-form-item label="附件">
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div v-for="(item, index) in formDataannex"
|
|
||||||
style="margin-left: 5px;display: block;">
|
|
||||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
|
|
||||||
:href="item.uri" target="_blank">{{ item.name }}</a>
|
|
||||||
<span style="cursor: pointer;margin-left: 5px;"
|
|
||||||
@click="delFileFn(index)">x</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
if (data.annex && data.annex.length > 0) {
|
|
||||||
const arry1 = data.annex.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,16 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog2 = true"
|
<el-form-item label="项目名称" prop="project_id" @click="showDialog2 = true"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="project_name" clearable readonly placeholder="请选择项目"
|
<el-input v-model="project_name" clearable readonly placeholder="请选择项目" :disabled="project" />
|
||||||
:disabled="project" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -22,9 +20,13 @@
|
|||||||
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="文档大类" prop="classify_id" @click="showDialog = true"
|
<el-form-item label="文档大类" prop="classify_id"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="large_document" clearable readonly placeholder="请输入文档大类" />
|
<el-input v-model="large_document" clearable readonly placeholder="点击选择文档"
|
||||||
|
@click="showDialog = true" class="!flex flex-1" />
|
||||||
|
|
||||||
|
<toolTip content="可在项目管理-项目设置-项目文档设置添加"
|
||||||
|
url="/construction/project/project_configure/project_document_set"></toolTip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -57,24 +59,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<el-upload
|
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||||
accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv"
|
|
||||||
class="upload-demo" :show-file-list="false" aria-hidden="true"
|
|
||||||
:headers="{ Token: userStore.token }" :action="base_url + '/upload/file'"
|
|
||||||
:on-success="handleAvatarSuccess_four" ref="upload">
|
|
||||||
<el-button type="primary">
|
|
||||||
上传
|
|
||||||
</el-button>
|
|
||||||
</el-upload>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
|
||||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
|
|
||||||
:href="item.uri" target="_blank">{{ item.name }}</a>
|
|
||||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -119,26 +104,7 @@ const project_code = ref('')
|
|||||||
const large_document = ref('')
|
const large_document = ref('')
|
||||||
const middle_document = ref('')
|
const middle_document = ref('')
|
||||||
const personnel = ref<any>()
|
const personnel = ref<any>()
|
||||||
// 上传文件
|
|
||||||
const handleAvatarSuccess_four = (
|
|
||||||
response,
|
|
||||||
uploadFile
|
|
||||||
) => {
|
|
||||||
if (response.code == 0) {
|
|
||||||
ElMessage.error(response.msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
formDataannex.push(
|
|
||||||
{ uri: response.data.uri, name: response.data.name }
|
|
||||||
|
|
||||||
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 删除上传的文件
|
|
||||||
const delFileFn = (index: number) => {
|
|
||||||
formDataannex.splice(index, 1)
|
|
||||||
}
|
|
||||||
let props = defineProps({
|
let props = defineProps({
|
||||||
project: Object
|
project: Object
|
||||||
})
|
})
|
||||||
@ -204,18 +170,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
if (data.annex && data.annex.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.annex.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
@ -243,10 +197,7 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
const data = { ...formData }
|
const data = { ...formData }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await apiProjectdocumentEdit(data)
|
? await apiProjectdocumentEdit(data)
|
||||||
|
@ -31,29 +31,14 @@
|
|||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="序号" type="index" width="55" />
|
||||||
<el-table-column label="ID" prop="id" show-overflow-tooltip />
|
<el-table-column label="项目名称" prop="project_name" :render-header="pager.calcWidth" />
|
||||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
|
||||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||||
<el-table-column label="文档大类" prop="large_category" show-overflow-tooltip />
|
<el-table-column label="文档大类" prop="large_category" show-overflow-tooltip />
|
||||||
<el-table-column label="文档中类" prop="middle_category" show-overflow-tooltip />
|
<el-table-column label="文档中类" prop="middle_category" show-overflow-tooltip />
|
||||||
<el-table-column label="文档编号" prop="code" show-overflow-tooltip />
|
<el-table-column label="文档编号" prop="code" show-overflow-tooltip />
|
||||||
<el-table-column label="文档名称" prop="name" show-overflow-tooltip />
|
<el-table-column label="文档名称" prop="name" show-overflow-tooltip />
|
||||||
<el-table-column label="版本号" prop="version" show-overflow-tooltip />
|
<el-table-column label="版本号" prop="version" show-overflow-tooltip />
|
||||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
|
|
||||||
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div v-if="row.annex && row.annex.length > 0">
|
|
||||||
<div v-for="(item, i) in row.annex " :key='i'>
|
|
||||||
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
暂无文件
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="150" fixed="right">
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['project.project_document/edit']" type="primary" link
|
<el-button v-perms="['project.project_document/edit']" type="primary" link
|
||||||
@click="handleEdit(row)">
|
@click="handleEdit(row)">
|
||||||
@ -63,7 +48,7 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['project.project_document/detail']" link @click="handledetail(row)">
|
<el-button v-perms="['project.project_document/detail']" link @click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
@ -76,7 +61,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" :column="1"
|
||||||
|
width="550px" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -89,12 +75,15 @@ import { getAllProjectTypes } from '@/api/projecttype'
|
|||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
|
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
const dtimevalue = ref([])
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
code: '',
|
code: '',
|
||||||
@ -142,9 +131,10 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
await apiProjectdocumentDelete({ id })
|
await apiProjectdocumentDelete({ id })
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
const handledetail = async (data: any) => {
|
// 详情
|
||||||
let res = await apiProjectdocumentDetail({ id: data.id })
|
const handleDetail = async (id: any) => {
|
||||||
showDtail.value = true
|
let res = await apiProjectdocumentDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
|
54
src/views/project_manager_appointment/detail.js
Normal file
54
src/views/project_manager_appointment/detail.js
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "项目经理委任详情",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目编号",
|
||||||
|
value: "project_code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "客户名称",
|
||||||
|
value: "custom_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目类型",
|
||||||
|
value: "project_type_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目金额",
|
||||||
|
value: "amount"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目经理",
|
||||||
|
value: "project_manager_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "立项日期",
|
||||||
|
value: "project_approval_date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目开始日期",
|
||||||
|
value: "start_date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目交付日期",
|
||||||
|
value: "delivery_date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
column: 1
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "annex",
|
||||||
|
column: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,191 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="项目经理委任详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目名称">
|
|
||||||
{{ formData.project_name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目编码">
|
|
||||||
{{ formData.project_code
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="客户名称">
|
|
||||||
{{ formData.custom_name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目类型">
|
|
||||||
{{ formData.project_type_name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目金额">
|
|
||||||
{{ formData.amount }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目经理">
|
|
||||||
{{ formData.project_manager_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="立项日期">
|
|
||||||
{{ formData.project_approval_date }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目开始日期">
|
|
||||||
{{ formData.start_date }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目交付日期">
|
|
||||||
{{ formData.delivery_date }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="备注">
|
|
||||||
{{ formData.remark
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
|
|
||||||
<el-form-item label="附件">
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div v-for="(item, index) in formDataannex"
|
|
||||||
style="margin-left: 5px;display: block;">
|
|
||||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
|
|
||||||
:href="item.uri" target="_blank">{{ item.name }}</a>
|
|
||||||
<span style="cursor: pointer;margin-left: 5px;"
|
|
||||||
@click="delFileFn(index)">x</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
if (data.annex && data.annex.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.annex.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,20 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<div
|
<!-- <div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||||
style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
|
||||||
|
|
||||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织"
|
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||||
@change="deptrmt">
|
|
||||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@ -50,8 +47,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="项目类型" prop="project_type_id"
|
<el-form-item label="项目类型" prop="project_type_id"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-select class="w-[280px]" v-model="formData.project_type_id" clearable
|
<el-select class="flex-1" v-model="formData.project_type_id" clearable placeholder="请选择项目类型">
|
||||||
placeholder="请选择项目类型">
|
|
||||||
<el-option v-for="(item, index) in protype" :key="index" :label="item.name"
|
<el-option v-for="(item, index) in protype" :key="index" :label="item.name"
|
||||||
:value="item.id" />
|
:value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -75,7 +71,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="立项日期" prop="project_approval_date">
|
<el-form-item label="立项日期" prop="project_approval_date">
|
||||||
<el-date-picker v-model="formData.project_approval_date" clearable type="date"
|
<el-date-picker v-model="formData.project_approval_date" clearable type="date"
|
||||||
value-format="YYYY-MM-DD " placeholder="选择签订日期">
|
class="flex-1 !flex" value-format="YYYY-MM-DD " placeholder="选择签订日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -83,8 +79,8 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="项目开始日期" prop="start_date"
|
<el-form-item label="项目开始日期" prop="start_date"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-date-picker v-model="formData.start_date" clearable type="date"
|
<el-date-picker v-model="formData.start_date" clearable type="date" value-format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD" placeholder="选择项目开始日期" class="flex-1 !flex">
|
placeholder="选择项目开始日期" class="flex-1 !flex">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -108,33 +104,10 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<el-upload
|
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||||
accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv"
|
|
||||||
class="upload-demo" :show-file-list="false" aria-hidden="true"
|
|
||||||
:headers="{ Token: userStore.token }" :action="base_url + '/upload/file'"
|
|
||||||
:on-success="handleAvatarSuccess_four" ref="upload">
|
|
||||||
<el-button type="primary">
|
|
||||||
上传
|
|
||||||
</el-button>
|
|
||||||
</el-upload>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
|
||||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
|
|
||||||
:href="item.uri" target="_blank">{{ item.name }}</a>
|
|
||||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-dialog v-model="showDialog" title="选择客户" width="70%">
|
|
||||||
<customDialog @customEvent="customEvent"></customDialog>
|
|
||||||
</el-dialog> -->
|
|
||||||
|
|
||||||
|
|
||||||
<div v-if="showDialog1">
|
<div v-if="showDialog1">
|
||||||
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
|
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
|
||||||
<salescontractDialog @customEvent="customEvent1" :project_id="formData.project_id">
|
<salescontractDialog @customEvent="customEvent1" :project_id="formData.project_id">
|
||||||
@ -187,24 +160,9 @@ const custom_name = ref('')
|
|||||||
const manage_name = ref('')
|
const manage_name = ref('')
|
||||||
const userInfo = userStore.userInfo
|
const userInfo = userStore.userInfo
|
||||||
const personnel = ref<any>()
|
const personnel = ref<any>()
|
||||||
// 上传文件
|
|
||||||
const handleAvatarSuccess_four = (
|
|
||||||
response,
|
|
||||||
uploadFile
|
|
||||||
) => {
|
|
||||||
if (response.code == 0) {
|
|
||||||
ElMessage.error(response.msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
formDataannex.push(
|
|
||||||
{ uri: response.data.uri, name: response.data.name }
|
|
||||||
|
|
||||||
|
|
||||||
);
|
|
||||||
};
|
|
||||||
//验证
|
//验证
|
||||||
const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||||
|
|
||||||
if (value && !/^1\d{10}$/.test(value)) {
|
if (value && !/^1\d{10}$/.test(value)) {
|
||||||
callback(new Error('请输入正确的手机号码'));
|
callback(new Error('请输入正确的手机号码'));
|
||||||
} else {
|
} else {
|
||||||
@ -213,13 +171,6 @@ const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
||||||
|
|
||||||
// const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
|
|
||||||
// // if (!value) {
|
|
||||||
// // return callback(new Error('邮箱不能为空'))
|
|
||||||
// // }
|
|
||||||
|
|
||||||
|
|
||||||
if (value && !mailReg.test(value)) {
|
if (value && !mailReg.test(value)) {
|
||||||
callback(new Error('请输入正确的邮箱格式'))
|
callback(new Error('请输入正确的邮箱格式'))
|
||||||
} else {
|
} else {
|
||||||
@ -227,10 +178,8 @@ const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined)
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
// 删除上传的文件
|
|
||||||
const delFileFn = (index: number) => {
|
|
||||||
formDataannex.splice(index, 1)
|
|
||||||
}
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
@ -306,7 +255,6 @@ const formData = reactive({
|
|||||||
delivery_date: "",
|
delivery_date: "",
|
||||||
remark: "",
|
remark: "",
|
||||||
annex: [],
|
annex: [],
|
||||||
process_approval: '{"current_step":"1","action":"1","submit_step":"2","check_user":"2","check_opinions":"dgfdsfds","copy_user":"3,4"}'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -315,49 +263,9 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
//获取所有组织
|
|
||||||
const getlist = () => {
|
|
||||||
getAll().then((res) => {
|
|
||||||
Object.assign(list1, res)
|
|
||||||
if (res.length > 0 && !formData.org_id) {
|
|
||||||
formData.org_id = res[0].id
|
|
||||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
|
||||||
if (res.length > 0) {
|
|
||||||
Object.assign(list2, res)
|
|
||||||
formData.dept_id = res[0].id
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const deptrmt = (e: any) => {
|
|
||||||
formData.dept_id = ''
|
|
||||||
getlist1(e)
|
|
||||||
|
|
||||||
}
|
|
||||||
//获取所有部门
|
|
||||||
const getlist1 = (id: any) => {
|
|
||||||
deptAll({ 'org_id': id }).then((res) => {
|
|
||||||
list2.splice(0, list2.length, ...res)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
if (data.annex && data.annex.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.annex.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -387,10 +295,6 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (formDataannex.length > 0) {
|
|
||||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
|
||||||
}
|
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
const data = { ...formData }
|
const data = { ...formData }
|
||||||
@ -405,12 +309,6 @@ const handleSubmit = async () => {
|
|||||||
const open = (type = 'add') => {
|
const open = (type = 'add') => {
|
||||||
mode.value = type
|
mode.value = type
|
||||||
popupRef.value?.open()
|
popupRef.value?.open()
|
||||||
|
|
||||||
getAllProjectTypes().then((res) => {
|
|
||||||
protype.splice(0, protype.length, ...res);
|
|
||||||
})
|
|
||||||
getlist()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭回调
|
// 关闭回调
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
<el-form-item label="立项日期" prop="project_approval_date">
|
<el-form-item label="立项日期" prop="project_approval_date">
|
||||||
<el-date-picker class="flex-1 !flex" v-model="queryParams.project_approval_date" clearable
|
<el-date-picker class="flex-1 !flex" v-model="queryParams.project_approval_date" clearable type="date"
|
||||||
type="date" value-format="YYYY-MM-DD " placeholder="选择签订日期">
|
value-format="YYYY-MM-DD " placeholder="选择签订日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -37,8 +37,7 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="项目名称" prop="project_name" :render-header="pager.calcWidth" />
|
||||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
|
||||||
<el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip />
|
<el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip />
|
||||||
<el-table-column label="合同编号" prop="contract_code" show-overflow-tooltip />
|
<el-table-column label="合同编号" prop="contract_code" show-overflow-tooltip />
|
||||||
<el-table-column label="项目类型" prop="project_type_name" show-overflow-tooltip />
|
<el-table-column label="项目类型" prop="project_type_name" show-overflow-tooltip />
|
||||||
@ -58,10 +57,12 @@
|
|||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['project.project_manager_appointment/detail']" link
|
<el-button v-perms="['project.project_manager_appointment/detail']" link
|
||||||
@click="handledetail(row)">
|
@click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -71,7 +72,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" :column="1"
|
||||||
|
width="550px" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -84,12 +86,13 @@ import { getAllProjectTypes } from '@/api/projecttype'
|
|||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
|
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
const dtimevalue = ref([])
|
const dtimevalue = ref([])
|
||||||
|
|
||||||
//查询
|
//查询
|
||||||
@ -154,14 +157,17 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
await appointmentDelete({ id })
|
await appointmentDelete({ id })
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
const handledetail = async (data: any) => {
|
// 详情
|
||||||
let res = await appointmentDetail({ id: data.id })
|
const handleDetail = async (id: any) => {
|
||||||
showDtail.value = true
|
let res = await appointmentDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
<el-form-item label="人员名称" prop="admin_name">
|
<el-form-item label="人员名称" prop="admin_name">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.admin_name" clearable placeholder="请输入人员名称" />
|
<el-input class="w-[280px]" v-model="queryParams.admin_name" clearable placeholder="请输入人员名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
<el-button @click="resetParams">重置</el-button>
|
||||||
@ -78,13 +76,15 @@ import { getAllProjectTypes } from '@/api/projecttype'
|
|||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
|
||||||
import detailConfig from './detail'
|
import detailConfig from './detail'
|
||||||
|
|
||||||
|
|
||||||
|
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||||
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
project_role_name: '',
|
project_role_name: '',
|
||||||
|
39
src/views/project_stakeholder/detail.js
Normal file
39
src/views/project_stakeholder/detail.js
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "项目干系人详情",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目编号",
|
||||||
|
value: "project_code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "姓名",
|
||||||
|
value: "name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "身份",
|
||||||
|
value: "identity_text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "电话",
|
||||||
|
value: "phone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "邮箱",
|
||||||
|
value: "email"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "对我方态度",
|
||||||
|
value: "degree_adaptability_text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,151 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="项目干系人详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目">
|
|
||||||
{{ formData.project_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目编码">
|
|
||||||
{{ formData.project_code }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="姓名">
|
|
||||||
{{ formData.name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="身份">
|
|
||||||
<dict-value :options="dictData.identity" :value="formData.identity" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="电话">
|
|
||||||
{{ formData.phone }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="邮箱">
|
|
||||||
{{ formData.email }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="对我方态度">
|
|
||||||
<dict-value :options="dictData.attitude_status" :value="formData.attitude" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工作配合度">
|
|
||||||
<dict-value :options="dictData.degree_adaptability"
|
|
||||||
:value="formData.degree_adaptability" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="备注">
|
|
||||||
{{ formData.remark }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -39,43 +39,31 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="项目名称" prop="project_name" :render-header="pager.calcWidth" />
|
||||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
<el-table-column label="项目编码" prop="project_code" :render-header="pager.calcWidth" />
|
||||||
|
|
||||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
|
||||||
|
|
||||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
|
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="身份" show-overflow-tooltip>
|
<el-table-column label="身份" show-overflow-tooltip>
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.identity" :value="row.identity" />
|
<dict-value :options="dictData.identity" :value="row.identity" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="上级" prop="superior" show-overflow-tooltip />
|
<el-table-column label="上级" prop="superior" show-overflow-tooltip />
|
||||||
<el-table-column label="部门" prop="department" show-overflow-tooltip />
|
<el-table-column label="部门" prop="department" show-overflow-tooltip />
|
||||||
<el-table-column label="岗位" prop="station" show-overflow-tooltip />
|
<el-table-column label="岗位" prop="station" show-overflow-tooltip />
|
||||||
<el-table-column label="电话" prop="phone" show-overflow-tooltip />
|
<el-table-column label="电话" prop="phone" show-overflow-tooltip />
|
||||||
<el-table-column label="邮箱" prop="email" show-overflow-tooltip />
|
<el-table-column label="邮箱" prop="email" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label=" 对我方态度" prop="working_unit_price" show-overflow-tooltip>
|
<el-table-column label=" 对我方态度" prop="working_unit_price" show-overflow-tooltip>
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.attitude_status" :value="row.attitude" />
|
<dict-value :options="dictData.attitude_status" :value="row.attitude" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label=" 工作配合度" prop="working_unit_price" show-overflow-tooltip>
|
<el-table-column label="工作配合度" prop="working_unit_price" show-overflow-tooltip>
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|
||||||
<dict-value :options="dictData.degree_adaptability" :value="row.degree_adaptability" />
|
<dict-value :options="dictData.degree_adaptability" :value="row.degree_adaptability" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="150" fixed="right">
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['project.project/edit']" type="primary" link @click="handleEdit(row)">
|
<el-button v-perms="['project.project/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
编辑
|
编辑
|
||||||
@ -84,7 +72,7 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['project.project/detail']" link @click="handledetail(row)">
|
<el-button v-perms="['project.project/detail']" link @click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
@ -97,7 +85,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" :column="1"
|
||||||
|
width="550px" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -110,12 +99,14 @@ import { getAllProjectTypes } from '@/api/projecttype'
|
|||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
|
|
||||||
|
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
@ -166,9 +157,10 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
await apiProjectstakeholderDelete({ id })
|
await apiProjectstakeholderDelete({ id })
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
const handledetail = async (data: any) => {
|
// 详情
|
||||||
let res = await apiProjectstakeholderDetail({ id: data.id })
|
const handleDetail = async (id: any) => {
|
||||||
showDtail.value = true
|
let res = await apiProjectstakeholderDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user