|
|
@@ -5,8 +5,8 @@
|
|
|
<el-row class="card_title">项目管理</el-row>
|
|
|
|
|
|
<!-- 筛选区域 -->
|
|
|
- <el-row :gutter="35" class="card_search">
|
|
|
- <el-col :span="5">
|
|
|
+ <el-row :gutter="25" class="card_search">
|
|
|
+ <el-col :span="4">
|
|
|
姓名:
|
|
|
<el-input
|
|
|
style="width: 180px"
|
|
|
@@ -16,29 +16,54 @@
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="5">
|
|
|
+ <el-col :span="4">
|
|
|
单位名称:
|
|
|
<el-input
|
|
|
- style="width: 180px"
|
|
|
+ style="width: 150px"
|
|
|
placeholder="请输入单位名称"
|
|
|
clearable
|
|
|
v-model="searchAddress"
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="5">
|
|
|
- 手机号码:
|
|
|
- <el-input
|
|
|
- style="width: 180px"
|
|
|
- placeholder="请输入手机号码"
|
|
|
+ <el-col :span="4">
|
|
|
+ 所属行业:
|
|
|
+ <el-select
|
|
|
+ style="width: 150px"
|
|
|
clearable
|
|
|
- v-model="searchPhone"
|
|
|
- ></el-input>
|
|
|
+ v-model="searchIndustry"
|
|
|
+ placeholder="请选择所属行业"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in industryOptions"
|
|
|
+ :key="index"
|
|
|
+ :label="item"
|
|
|
+ :value="item"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="4">
|
|
|
+ 状态:
|
|
|
+ <el-select
|
|
|
+ style="width: 150px"
|
|
|
+ clearable
|
|
|
+ v-model="searchType"
|
|
|
+ placeholder="请选择状态"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in typeOptions"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="5">
|
|
|
+ <el-col :span="4">
|
|
|
提交时间:
|
|
|
<el-date-picker
|
|
|
+ style="width: 150px"
|
|
|
type="date"
|
|
|
placeholder="请选择提交时间"
|
|
|
value-format="YYYY-MM-DD"
|
|
|
@@ -51,6 +76,11 @@
|
|
|
<el-icon><Search /></el-icon>
|
|
|
<span> 查询</span>
|
|
|
</el-button>
|
|
|
+
|
|
|
+ <el-button type="success" @click="handleReset">
|
|
|
+ <el-icon><Refresh /></el-icon>
|
|
|
+ <span> 重置</span>
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
@@ -89,10 +119,63 @@
|
|
|
label="单位名称"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
+ width="200"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ prop="customerName"
|
|
|
+ label="客户名称"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ prop="entryName"
|
|
|
+ label="项目名称"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ width="120"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ prop="projectAmount"
|
|
|
+ label="项目金额"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ width="110"
|
|
|
+ align="center"
|
|
|
+ prop="tenderTime"
|
|
|
+ label="预计投标时间"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ width="100"
|
|
|
+ align="center"
|
|
|
+ prop="trade"
|
|
|
+ label="所属行业"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-table-column width="200" align="center" label="产品类型">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag
|
|
|
+ style="margin: 0 5px 5px 0"
|
|
|
+ v-for="(item, index) in row.product.split(',')"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ item }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column width="80" align="center" label="状态">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div class="blue" v-if="row.status == 1">进行中</div>
|
|
|
+ <div class="red" v-else>已关闭</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ width="200"
|
|
|
align="center"
|
|
|
show-overflow-tooltip
|
|
|
prop="content"
|
|
|
- label="事件登记"
|
|
|
+ label="项目基本情况"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
width="200"
|
|
|
@@ -100,18 +183,27 @@
|
|
|
prop="reportingTime"
|
|
|
label="提交时间"
|
|
|
/>
|
|
|
- <el-table-column width="200" align="center" label="操作">
|
|
|
+ <el-table-column fixed="right" width="250" align="center" label="操作">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button type="success" plain @click="handleCheckDetail(row)"
|
|
|
- >详情</el-button
|
|
|
+ <el-button type="success" plain @click="handleCheckDetail(row)">
|
|
|
+ 详情
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ :disabled="row.status == 0"
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ @click="handleClose(row)"
|
|
|
>
|
|
|
+ 关闭
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
v-if="store.getters.userInfo.adminType == 1"
|
|
|
type="danger"
|
|
|
plain
|
|
|
- @click="handleDelete(row.id)"
|
|
|
- >删除</el-button
|
|
|
+ @click="handleDelete(row)"
|
|
|
>
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -135,28 +227,59 @@
|
|
|
v-model="dialogVisible"
|
|
|
title="详情"
|
|
|
width="40%"
|
|
|
- top="20vh"
|
|
|
+ top="5vh"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
<div class="dialog_box">
|
|
|
<div class="dialog_item">
|
|
|
- <span>姓名:</span>
|
|
|
+ <span>姓名:</span>
|
|
|
{{ dialogInfo.name }}
|
|
|
</div>
|
|
|
<div class="dialog_item">
|
|
|
- <span>单位名称:</span>
|
|
|
+ <span>手机号码:</span>
|
|
|
+ {{ dialogInfo.phone }}
|
|
|
+ </div>
|
|
|
+ <div class="dialog_item">
|
|
|
+ <span>单位名称:</span>
|
|
|
{{ dialogInfo.company }}
|
|
|
</div>
|
|
|
<div class="dialog_item">
|
|
|
- <span>手机号码:</span>
|
|
|
- {{ dialogInfo.phone }}
|
|
|
+ <span>客户名称:</span>
|
|
|
+ {{ dialogInfo.customerName }}
|
|
|
+ </div>
|
|
|
+ <div class="dialog_item">
|
|
|
+ <span>项目名称:</span>
|
|
|
+ {{ dialogInfo.entryName }}
|
|
|
+ </div>
|
|
|
+ <div class="dialog_item">
|
|
|
+ <span>预计投标时间:</span>
|
|
|
+ {{ dialogInfo.tenderTime }}
|
|
|
+ </div>
|
|
|
+ <div class="dialog_item">
|
|
|
+ <span>所属行业:</span>
|
|
|
+ {{ dialogInfo.trade }}
|
|
|
</div>
|
|
|
<div class="dialog_item">
|
|
|
- <span>提交时间:</span>
|
|
|
+ <span>产品类型:</span>
|
|
|
+ <el-tag
|
|
|
+ style="margin: 0 5px 5px 0"
|
|
|
+ v-for="(item, index) in dialogInfo.product.split(',')"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ item }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ <div class="dialog_item">
|
|
|
+ <span>状态:</span>
|
|
|
+ <span class="blue" v-if="dialogInfo.status == 1">进行中</span>
|
|
|
+ <span class="red" v-else>已关闭</span>
|
|
|
+ </div>
|
|
|
+ <div class="dialog_item">
|
|
|
+ <span>提交时间:</span>
|
|
|
{{ dialogInfo.reportingTime }}
|
|
|
</div>
|
|
|
<div class="dialog_item">
|
|
|
- <span>事件登记:</span>
|
|
|
+ <span>项目基本情况:</span>
|
|
|
<div>
|
|
|
{{ dialogInfo.content }}
|
|
|
</div>
|
|
|
@@ -170,18 +293,47 @@
|
|
|
import { onMounted, ref } from 'vue'
|
|
|
import { useStore } from 'vuex'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
-import { getProjectList, deleteProjectList } from '@/api/project'
|
|
|
+import {
|
|
|
+ getProjectList,
|
|
|
+ deleteProjectList,
|
|
|
+ closeProjectList
|
|
|
+} from '@/api/project'
|
|
|
|
|
|
onMounted(() => {
|
|
|
getData()
|
|
|
})
|
|
|
|
|
|
+// 所属行业选择框数组
|
|
|
+const industryOptions = [
|
|
|
+ '政府',
|
|
|
+ '教育',
|
|
|
+ '医疗',
|
|
|
+ '企业',
|
|
|
+ '公检法',
|
|
|
+ '交通',
|
|
|
+ '分销&SMB',
|
|
|
+ '其他'
|
|
|
+]
|
|
|
+
|
|
|
+// 状态选择框数组
|
|
|
+const typeOptions = [
|
|
|
+ {
|
|
|
+ label: '进行中',
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '已关闭',
|
|
|
+ value: 0
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
// 获取项目管理列表
|
|
|
const getData = async () => {
|
|
|
const res = await getProjectList({
|
|
|
name: searchName.value,
|
|
|
- phone: searchPhone.value,
|
|
|
company: searchAddress.value,
|
|
|
+ trade: searchIndustry.value,
|
|
|
+ status: searchType.value,
|
|
|
reportingTime: searchTime.value,
|
|
|
currPage: currentPage.value,
|
|
|
pageSize: pageSize.value
|
|
|
@@ -195,7 +347,8 @@ const getData = async () => {
|
|
|
// 筛选区域绑定数据
|
|
|
const searchName = ref('')
|
|
|
const searchAddress = ref('')
|
|
|
-const searchPhone = ref('')
|
|
|
+const searchIndustry = ref('')
|
|
|
+const searchType = ref('')
|
|
|
const searchTime = ref('')
|
|
|
// 表单元素DOM标识
|
|
|
const multipleTable = ref(null)
|
|
|
@@ -234,7 +387,7 @@ const hanleExportForm = () => {
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- window.location.href = `/reporting/informationReporting/download?name=${searchName.value}&phone=${searchPhone.value}&company=${searchAddress.value}&reportingTime=${searchTime.value}&ids=${id}`
|
|
|
+ window.location.href = `/reporting/informationReporting/download?name=${searchName.value}&trade=${searchIndustry.value}&company=${searchAddress.value}&reportingTime=${searchTime.value}&status=${searchType.value}&ids=${id}`
|
|
|
multipleTable.value.clearSelection()
|
|
|
})
|
|
|
.catch(() => {
|
|
|
@@ -245,12 +398,36 @@ const hanleExportForm = () => {
|
|
|
}
|
|
|
// 点击详情按钮回调
|
|
|
const handleCheckDetail = (row) => {
|
|
|
+ dialogInfo.value = {}
|
|
|
dialogVisible.value = true
|
|
|
dialogInfo.value = row
|
|
|
}
|
|
|
+// 点击关闭按钮回调
|
|
|
+const handleClose = (row) => {
|
|
|
+ ElMessageBox.confirm(`确定关闭 ${row.entryName} 吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ const res = await closeProjectList({
|
|
|
+ name: store.getters.userInfo.name,
|
|
|
+ id: store.getters.userInfo.id,
|
|
|
+ itemId: row.id
|
|
|
+ })
|
|
|
+ // console.log(res)
|
|
|
+ if (res == null) {
|
|
|
+ ElMessage.success('关闭成功')
|
|
|
+ getData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ ElMessage.info('已取消')
|
|
|
+ })
|
|
|
+}
|
|
|
// 点击删除按钮回调
|
|
|
-const handleDelete = (id) => {
|
|
|
- ElMessageBox.confirm('确定删除吗?', '提示', {
|
|
|
+const handleDelete = (row) => {
|
|
|
+ ElMessageBox.confirm(`确定删除 ${row.entryName} 吗?`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
@@ -259,7 +436,7 @@ const handleDelete = (id) => {
|
|
|
const res = await deleteProjectList({
|
|
|
name: store.getters.userInfo.name,
|
|
|
id: store.getters.userInfo.id,
|
|
|
- ids: [id]
|
|
|
+ ids: [row.id]
|
|
|
})
|
|
|
// console.log(res)
|
|
|
if (res == null) {
|
|
|
@@ -281,6 +458,15 @@ const handleCurrentChange = (val) => {
|
|
|
currentPage.value = val
|
|
|
getData()
|
|
|
}
|
|
|
+// 重置按钮回调
|
|
|
+const handleReset = () => {
|
|
|
+ searchName.value = ''
|
|
|
+ searchAddress.value = ''
|
|
|
+ searchIndustry.value = ''
|
|
|
+ searchType.value = ''
|
|
|
+ searchTime.value = ''
|
|
|
+ getData()
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -307,6 +493,14 @@ const handleCurrentChange = (val) => {
|
|
|
height: 53px;
|
|
|
}
|
|
|
|
|
|
+ .blue {
|
|
|
+ color: #1e7dfb;
|
|
|
+ }
|
|
|
+
|
|
|
+ .red {
|
|
|
+ color: #f56c6c;
|
|
|
+ }
|
|
|
+
|
|
|
.card_pagination {
|
|
|
float: right;
|
|
|
line-height: 96px;
|
|
|
@@ -314,18 +508,25 @@ const handleCurrentChange = (val) => {
|
|
|
}
|
|
|
|
|
|
.dialog_box {
|
|
|
- height: 430px;
|
|
|
+ height: 630px;
|
|
|
.dialog_item {
|
|
|
margin-bottom: 10px;
|
|
|
height: 35px;
|
|
|
color: #4d4d4d;
|
|
|
font-size: 15px;
|
|
|
+ .blue {
|
|
|
+ color: #1e7dfb;
|
|
|
+ }
|
|
|
+
|
|
|
+ .red {
|
|
|
+ color: #f56c6c;
|
|
|
+ }
|
|
|
span {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
div {
|
|
|
- height: 210px;
|
|
|
+ height: 160px;
|
|
|
margin-top: 10px;
|
|
|
overflow-y: auto;
|
|
|
}
|