Commit 7a39becd authored by MyName's avatar MyName

项目管理

parent 26fe8fee
......@@ -158,3 +158,28 @@ export function addXGQY(param) {
data:param
})
}
//删除相关企业
export function delXGQY(param) {
return request({
url: '/business/company/remove/'+param,
method: 'DELETE',
})
}
//查询资料文档
export function getZLWD(param) {
return request({
url: '/business/file/list',
method: 'GET',
params:param
})
}
//删除资料文档
export function delZLWD(param) {
return request({
url: '/business/file/remove',
method: 'POST',
data:param
})
}
......@@ -656,6 +656,7 @@
background: #F6F9FD;
border-radius: 6px;
padding: 24px;
border: 1px solid #F6F9FD;
//box-sizing: content-box;
box-sizing: border-box;
>div{
......@@ -676,7 +677,6 @@
}
}
.rec_detail:hover{
.operate{
display: block;
......
......@@ -173,7 +173,7 @@
</template>
</el-table-column>
</el-table>
<div class="bottems" v-if="tableData.total>0">
<div class="bottems" v-if="tableData.total>searchParam.pageSize">
<el-pagination
background
:page-size="searchParam.pageSize"
......
......@@ -99,7 +99,7 @@
<div class="trendcon">{{item.text}}</div>
<div class="time">{{item.time}}</div>
</div>
<div class="tables" style="width: 100%">
<div class="tables" style="width: 100%" v-if="datalist.length>10">
<div class="bottems">
<el-pagination
background
......@@ -236,7 +236,7 @@ export default {
{
name: '',
type: 'bar',
barWidth: '20%',
barWidth: '12px',
data: [100, 152, 200, 334, 390, 330, 220,256,178],
itemStyle:{
normal: {
......@@ -280,7 +280,7 @@ export default {
{
name: '',
type: 'bar',
barWidth: '20%',
barWidth: '12px',
data: [110, 112, 190, 234, 310, 350, 220,276,198],
itemStyle:{
normal:{
......@@ -551,6 +551,12 @@ export default {
line-height: 18px;
padding-bottom: 16px;
}
&:last-child{
.trendcon{
border: none;
}
}
.time{
position: absolute;
right: 16px;
......
......@@ -323,8 +323,8 @@ export default {
// trigger: 'axis'
},
legend: {
right: '151px',
top:"0px",
left: '12px',
top:"15px",
data: ['成交金额', '储备项目', '跟进动态']
},
series: [
......@@ -513,12 +513,12 @@ export default {
}
}
.chart-bot{
height: 354px;
height: auto;
margin-bottom: 12px;
.left{
float: left;
width: 353px;
height: 100%;
height: 354px;
background: url("../../../assets/images/project/glbj.png")no-repeat top center;
background-size: 100% 100%;
color: #FFFFFF;
......@@ -569,11 +569,11 @@ export default {
}
.right{
float: right;
height: 100%;
height: auto;
width: calc(100% - 369px);
.records{
margin-top: -17px;
height: 327px;
height: 627px;
overflow-y: auto;
width: 100%;
padding-right: 47px;
......@@ -621,6 +621,7 @@ export default {
.chart2{
width: 100%;
padding: 0 0 0 16px;
height: 285px;
margin-top: -20px;
}
......
......@@ -34,7 +34,7 @@
<el-option v-for="(item,index) in projectCategory" :key="index" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
<el-form-item label="投资估算:" class="row">
<el-form-item label="投资估算(万元):" class="row">
<el-input type="text" placeholder="请输入金额" @input="number" v-model="queryParam.investmentAmount"></el-input>
</el-form-item>
<el-form-item label="可见范围:" class="row">
......
......@@ -4,18 +4,16 @@
<el-card class="box-card noborder">
<div class="cardtitles">相关企业</div>
<div class="searchbtns">
<el-select class="select" placeholder="企业类型">
<el-select placeholder="请选择" v-model="searchParam.companyType">
<el-select class="select" placeholder="企业类型" v-model="searchParam.companyType" @change="handleCurrentChange(1)">
<el-option v-for="(item,index) in companytype" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-select>
<div class="searchInput">
<el-input type="text" placeholder="输入关键词查询" v-model="searchParam.companyName"></el-input>
<div class="btn" @click="handleCurrentChange(1)">搜索</div>
</div>
<div class="btn btn_primary h32 b3" @click="opennew"><div class="img img1"></div>添加相关企业</div>
</div>
<div class="document">
<div class="document tables">
<el-table
:data="tableData.rows"
style="width: 100%"
......@@ -59,14 +57,20 @@
width="">
<template slot-scope="scope">
<div class="hoverbtn">
<div class="sc" @click="delQY(scope.row.id)">删除</div>
<div class="sc" @click="ondel = scope.row.id">删除</div>
</div>
</template>
</el-table-column>
</el-table>
<div class="delform" v-if="ondel != -1">
<div class="words">是否将企业删除</div>
<div>
<div class="btnsmall btn_primary h28" @click="delQY()">确定</div>
<div class="btnsmall btn_cancel h28" @click="ondel = -1">取消</div>
</div>
</div>
<div class="tables" v-if="tableData.total > searchParam.pageSize">
<div class="bottems">
<div class="bottems" v-if="ondel != -1">
<el-pagination
background
:page-size="searchParam.pageSize"
......@@ -131,7 +135,7 @@
<script>
import "@/assets/styles/project.scss"
import {getXGQY,addXGQY} from '@/api/project/project'
import {getXGQY,addXGQY,delXGQY} from '@/api/project/project'
import {getDictType} from '@/api/main'
export default {
name: 'xgqy',
......@@ -186,6 +190,7 @@
companyType:"",
companyName:'',
},
ondel:-1,
}
},
created(){
......@@ -198,10 +203,18 @@
getDictType('company_role').then(result=>{
this.companyrole = result.code == 200 ? result.data:[]
})
this.getlist()
},
methods:{
delQY(id){
delQY(){
let id = this.ondel
delXGQY(id).then(res=>{
if(res.code == 200){
this.$message.success('删除成功')
this.ondel = -1
this.getlist()
}
})
},
addqy(){
addXGQY(this.queryParam).then(res=>{
......@@ -215,7 +228,8 @@
},
getlist(){
getXGQY(this.searchParam).then(result=>{
this.tableData = result.data
console.log(result)
this.tableData = result
})
},
//翻页
......@@ -274,4 +288,8 @@
.box-card{
position: relative;
}
.delform{
position: fixed; left:50%; top:50%; transform:translate(-50%,-50%)
}
</style>
......@@ -6,74 +6,76 @@
<div class="searchbtns">
<div class="searchInput">
<el-input type="text" placeholder="输入关键词查询"></el-input>
<div class="btn">搜索</div>
<div class="btn" @click="handleCurrentChange(1)">搜索</div>
</div>
<div class="btn btn_primary h32 b2" @click="isupload=true"><div class="img img2"></div>上传</div>
<div class="btn btn_primary h32 b2" @click="getUP"><div class="img img2"></div>上传</div>
</div>
<div class="filepath" v-if="filename"><font @click="getall">全部</font> / <span> <img class="img" src="@/assets/images/folder.png">{{filename}}</span></div>
<div class="uploadbox" v-if="isupload">
<div>
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="3"
:on-exceed="handleExceed"
:file-list="fileList">
:action="action"
:on-change="handleFileListChange"
:multiple="false"
ref="upload"
:file-list="fileList"
accept=".word,.pdf.excel,.xlsx"
:headers="headers"
:show-file-list="false"
:on-success="onSuccess">
<div class="wj wj1"></div>上传文件
</el-upload>
</div>
<div>
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-remove="fileRemove"
:on-change="fileChang"
multiple
:limit="3"
:on-exceed="handleExceed"
:action="action"
:on-change="handleFileListChange"
:multiple="false"
:on-success="onSuccess1"
ref="uploadFile"
:headers="headers"
:show-file-list="false"
:file-list="fileList">
<div class="wj wj2"></div>上传文件夹
</el-upload>
</div>
</div>
<div class="document">
<div class="document tables">
<el-table
:data="tableData"
:data="fileDatas.rows"
style="width: 100%"
>
<template slot="empty">
<div class="empty">
<img src="@/assets/images/project/empty.png">
<div class="p1">暂无数据展示</div>
<div class="p2">抱歉,你还未添加相关数据,快去添加</div>
<div class="btn btn_primary h36 w102" @click="opennew">新增联系人</div>
<div class="p2">抱歉,你还未添加相关数据,快去上传</div>
<div class="btn btn_primary h36 w102" @click="getUP">上传文档</div>
</div>
</template>
<el-table-column
prop="date"
prop="name"
label="文件名称"
>
<template slot-scope="scope">
<div>
<img class="img" src="@/assets/images/folder.png">
<!--<img class="img" src="@/assets/images/word.png">-->
<!--<img class="img" src="@/assets/images/pdf.png">-->
<!--<img class="img" src="@/assets/images/excel_1.png">-->
<span>集团投标常用资料</span>
<div @click="getFile(scope.row)">
<img v-if="scope.row.type == 'file'" class="img" src="@/assets/images/folder.png">
<img v-if="scope.row.type == 'word'" class="img" src="@/assets/images/word.png">
<img v-if="scope.row.type == 'pdf'" class="img" src="@/assets/images/pdf.png">
<img v-if="scope.row.type == 'excel'" class="img" src="@/assets/images/excel_1.png">
<span>{{scope.row.name}}</span>
</div>
</template>
</el-table-column>
<!--<el-table-column-->
<!--prop="name"-->
<!--label="创建人"-->
<!--&gt;-->
<!--</el-table-column>-->
<el-table-column
prop="name"
label="创建人"
>
</el-table-column>
<el-table-column
prop="name"
prop="creatTime"
label="更新时间"
sortable
width="">
......@@ -85,121 +87,146 @@
width="">
<template slot-scope="scope">
<div class="hoverbtn">
<div class="xz">下载</div>
<div class="sc">删除</div>
<div class="xz" @click="downnlod(scope.row)">下载</div>
<div class="sc" @click="del(scope.row.filePath)">删除</div>
</div>
</template>
</el-table-column>
</el-table>
<div class="tables">
<div class="tables" v-if="fileDatas.total>param.pagesize">
<div class="bottems">
<el-pagination
background
:page-size="20"
:current-page="1"
:page-size="param.pagesize"
:current-page="param.pageNum"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="1000">
:total="fileDatas.total">
</el-pagination>
</div>
</div>
</div>
<el-dialog
class="popups"
:visible.sync="dialogVisible"
width="464px">
<div class="poptitle">
<img src="@/assets/images/economies/icon.png">
<span>重庆市轨道交通3号线二期工程4标段施工总承包</span>
</div>
<div class="popform">
<div class="row">
<span class="left">联系人姓名:</span>
<el-input type="text" placeholder="请输入"></el-input>
</div>
<div class="row">
<span class="left">联系人角色:</span>
<el-select placeholder="请选择">
<el-option label="cccc" value="11"></el-option>
<el-option label="cccc" value="121"></el-option>
</el-select>
</div>
<div class="row">
<span class="left">联系人职位:</span>
<el-input type="text" placeholder="请输入"></el-input>
</div>
<div class="row">
<span class="left">联系人公司/机关:</span>
<el-input type="text" placeholder="请输入"></el-input>
</div>
<div class="row">
<span class="left">内部维护人:</span>
<el-input type="text" placeholder="请输入"></el-input>
</div>
<div class="row">
<span class="left">联系方式:</span>
<el-input type="text" placeholder="请输入"></el-input>
</div>
<div class="popbot">
<div class="btn btn_cancel h32" @click="cancel">返回</div>
<div class="btn btn_primary h32">保存</div>
</div>
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import "@/assets/styles/project.scss"
import { getToken } from "@/utils/auth";
import { getZLWD ,delZLWD} from "@/api/project/project";
export default {
name: 'zlwd',
data(){
return{
isupload:false,
dialogVisible:false,
textarea:"",
nowedit:-1,//当前正在编辑的文本
tipslit:[],//项目标签
tipsvalue:"",//标签填写内容
tableData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}
],
fileList:[],//上传的文件
//上传
action:process.env.VUE_APP_BASE_API + '/business/file/upload',
fileList: [],
headers: {
Authorization: "Bearer " + getToken(),
filePath:this.$route.query.id,
},
param:{
pageNum:1,
pagesize:20,
filePath:this.$route.query.id,
},
fileDatas:[],
filename:'',
}
},
mounted(){
this.$refs.uploadFile.$children[0].$refs.input.webkitdirectory = true;
created(){
this.getList()
// console.log(this.$ref)
},
methods:{
//上传文件夹
fileChang(file, fileList, name) {
this.form.instFilePics = fileList;
getall(){
this.param.filePath = this.$route.query.id
this.filename=''
this.headers.filePath = this.$route.query.id
this.handleCurrentChange(1)
},
fileRemove(file, fileList, name) {
this.form.instFilePics = fileList
getList(){
getZLWD(this.param).then(res=>{
this.fileDatas = res
if(this.fileDatas.rows!=null && this.fileDatas .length>0){
this.fileDatas.forEach(item=>{
let names = item.filePath.split('\\')
item.name = names[names.length-1]
let types = item.name.split('.')
item.type = types.length>1?types[1]:'file'
})
}
})
},
getFile(row){
if(row.type == 'file'){
this.filename = row.name
this.headers.filePath = this.$route.query.id+'\\'+row.name
this.param.filePath = row.filePath
this.handleCurrentChange(1)
}else{
return false
}
},
getUP(){
this.isupload=true
this.$nextTick(() => {
this.$refs.uploadFile.$children[0].$refs.input.webkitdirectory = true
})
},
downnlod(row){
let a = document.createElement("a");
a.setAttribute("href", row.filePath);
a.setAttribute("download", row.name);
document.body.appendChild(a);
a.click();
},
del(path){
delZLWD(path).then(res=>{
if(res.code == 200){
this.$message.success('删除成功!')
this.handleCurrentChange(1)
}
})
},
handleFileListChange(file, fileList) {
if (fileList.length > 0) {
this.fileList = [fileList[fileList.length - 1]];
}
},
onSuccess(res, file, fileList) {
if(res.code == 200 ){
this.$refs["upload"].submit();
let _this = this
setTimeout(function() {
_this.getList()
_this.isupload = false
},3000)
}
else
this.$message.error({message:res.msg,showClose:true})
},
onSuccess1(res, file, fileList) {
if(res.code == 200 ){
this.$refs["uploadFile"].submit();
let _this = this
setTimeout(function() {
_this.getList()
_this.isupload = false
},3000)
}
else
this.$message.error({message:res.msg,showClose:true})
},
//翻页
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.param.pageNum(1)
this.getList()
},
cancel(){
this.dialogVisible = false
......@@ -213,6 +240,25 @@
</script>
<style lang="scss" scoped>
.filepath{
font-size: 12px;
height: 30px;
line-height: 16px;
padding-left: 24px;
>font{
opacity: 0.4;
}
>span{
position: relative;
padding-left: 23px;
}
.img{
position: absolute;
top: -3px;
width: 20px;
left: 0;
}
}
.w102{
width: 102px;
}
......
......@@ -197,16 +197,22 @@
this.thisindex = result.data.projectStage
let list = []
let txt = ''
if(result.data.provinceId){
if(result.data.provinceId != ""){
list.push(result.data.provinceId)
txt += result.data.provinceName
}
if(result.data.cityId){
list.push(result.data.cityId)
txt += '/'+result.data.cityName
}
if(result.data.districtId){
list.push(result.data.districtId)
}
if(result.data.provinceName){
txt += result.data.provinceName
}
if(result.data.cityName){
txt += '/'+result.data.cityName
}
if(result.data.districtName){
txt += '/'+result.data.districtName
}
this.address = list.length>0?list:"待添加"
......@@ -279,6 +285,14 @@
handleChange(value) {
var labelString = this.$refs.myCascader.getCheckedNodes()[0].pathLabels;
let param = {
provinceId:null,
provinceName:null,
cityId:null,
cityName:null,
districtId:null,
districtName:null,
}
let txt = ''
labelString.forEach((item,index)=>{
let str = ''
......@@ -286,13 +300,17 @@
str = '/'
}
txt += str + item
if(index == 0){
param.provinceName = item
}
if(index == 1){
param.cityName = item
}
if(index == 2){
param.districtName = item
}
})
this.addresstxt = txt
let param = {
provinceId:null,
cityId:null,
districtId:null
}
value.forEach((item,index)=>{
if(index == 0){
param.provinceId = parseInt(item)
......
......@@ -113,7 +113,7 @@
</div>
<div class="datalist">
<div class="datali" v-for="(item,index) in datalist">
<div class="det-title" @click="toDetail(item.id)">{{item.projectName}}<span v-if="activeName!='first'" class="people"><i>A</i>四川-李丽 <font color="#FA8A00" v-if="activeName!='first'">正在跟进</font></span></div>
<div class="det-title" @click="toDetail(item.id)">{{item.projectName}}<span v-if="activeName!='first'" class="people"><i>{{item.nickName1}}</i>{{item.nickName}} <font color="#FA8A00" v-if="activeName!='first'">正在跟进</font></span></div>
<div class="det-tips"><span class="tips tip1" v-if="item.label">{{item.label}}</span><span v-if="item.address" class="tips tip2">{{item.address}}</span></div>
<div class="det-contets">
<div class="det-con">
......@@ -133,7 +133,7 @@
<span class="wordprimary">{{item.ownerCompany}}</span>
</div>
</div>
<el-divider></el-divider>
<el-divider v-if="index != datalist.length-1"></el-divider>
<div class="operates" v-if="activeName=='first'">
<div class="i1"><img src="@/assets/images/follow.png">跟进</div>
<div class="i2"><img src="@/assets/images/edit.png">编辑</div>
......@@ -294,6 +294,7 @@ export default {
if(item.districtName != ""&& item.districtName != null)
str += '-' +item.districtName
item.address = str
item.nickName1 = item.nickName?item.nickName.slice(0,1):''
})
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment