提交 9f4686aa authored 作者: zax's avatar zax

Merge branch 'master' into 'zax'

# Conflicts: # src/components/projectManagement/document/document.vue # src/services/server.js
......@@ -132,6 +132,8 @@
}
.el-pagination__editor .el-input__inner{
width: 46px !important;
height: 28px !important;
line-height: 28px !important;
}
.content>>>.el-table td{
border-bottom: 1px solid #d5e3ff;
......@@ -161,6 +163,11 @@
font-size: 18px;
font-family: 'Regular';
}
/*滚动条*/
.el-scrollbar__wrap {
overflow-x: hidden;
}
/*checkbox选择款*/
.el-checkbox__input.is-disabled .el-checkbox__inner,.el-checkbox__input.is-checked .el-checkbox__inner{
width: 21px;
......
......@@ -55,7 +55,7 @@
:current-page.sync="currentPage"
:page-size="pageSize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totalLength">
</el-pagination>
</div>
......
......@@ -70,7 +70,7 @@
:current-page.sync="currentPage"
:page-size="pageSize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totalLength">
</el-pagination>
</div>
......
......@@ -66,7 +66,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
......@@ -71,7 +71,7 @@
:current-page.sync="currentPage"
:page-size="pageSize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totalLength">
</el-pagination>
</div>
......
......@@ -72,7 +72,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
......@@ -86,7 +86,7 @@
:current-page.sync="currentPage"
:page-size="pageSize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totalLength">
</el-pagination>
</div>
......
......@@ -50,7 +50,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
......@@ -70,7 +70,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
......@@ -70,7 +70,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
......@@ -57,7 +57,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
......@@ -42,6 +42,9 @@ export default {
console.log(res.data.data)
this.$store.commit('changeUserData', res.data.data);
this.$router.push({name: 'firstHome'})
this.$store.commit('changeSession', { // 存值
session: res.data.data.sessionId
});
} else {
this.$message.error(res.data.msg);
}
......
......@@ -64,8 +64,8 @@
:current-page.sync="currentPage"
:page-size="pageSize"
background
layout="prev, pager, next"
:total="totalLength">
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
<!-- 分页 -->
......
......@@ -42,7 +42,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
......@@ -18,22 +18,17 @@
stripe
style="width: 100%;">
<el-table-column
prop="name"
prop="content"
label="操作内容"
align="center">
</el-table-column>
<el-table-column
prop="roleName"
prop="userName"
label="操作人"
align="center">
</el-table-column>
<el-table-column
prop="unitName"
label="操作记录"
align="center">
</el-table-column>
<el-table-column
prop="number"
prop="time"
label="操作时间"
align="center">
</el-table-column>
......@@ -47,7 +42,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......@@ -60,7 +55,7 @@
<script>
export default {
name: 'journal',
props: ['value'],
data () {
return {
searchVal: '',
......@@ -70,7 +65,42 @@ export default {
totleLength: 0, // 获取后台传的所有数据的长度
}
},
mounted(){
this.init();
},
methods: {
init() {
let val;
if (this.searchVal === '') {
val = {
'page': this.currentPage,
'pageSize': this.pagesize,
't': {
'projectId': this.value.id
}
}
} else {
val = {
'page': this.currentPage,
'pageSize': this.pagesize,
't': {
'projectId': this.value.id
}
}
}
this.$server.PostHistorySearch(val).then((res) => { // 数据请求
console.log(res.data)
if (res.data.code === 200) {
this.allData = res.data.data.rows;
this.totleLength = res.data.data.total
for (let item of this.allData) {
item.time = this.timeC(item.time)
}
}
}).catch(err => {
this.$message.error('数据请求失败!');
})
},
// 点击分页
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
......@@ -79,6 +109,17 @@ export default {
handleCurrentChange(val) {
// console.log(`当前页: ${val}`);
this.currentPage = val;
},
// 时间换算
timeC(value) {
let date = new Date(value); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
return Y + M + D + ' ' + h + m + s;
}
}
}
......
......@@ -72,7 +72,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
......@@ -5,7 +5,7 @@
<el-col :span="24">
<div class="contentAll">
<p class="title">项目管理
<img src="./img/goback.png" class="back" @click="back" title="返回">
<span class="back" @click="back" title="返回"></span>
</p>
<p class="titleList">
<span class="titleListClick" @click="changeMenu('projectInformation',1)">项目信息</span>
......@@ -91,10 +91,14 @@ export default {
position: absolute;
left: 25px;
top: 28px;
display: inline-block;
width: 25px;
height: 25px;
background: url("./img/goback.png");
cursor: pointer;
}
.projectDetails .contentAll .back:hover{
content: url("./img/gobackH.png");
background: url("./img/gobackH.png");
}
.projectDetails .contentAll .titleList{
margin: 30px 60px 0 60px;
......
......@@ -110,15 +110,15 @@ export default {
data () {
return {
allVal: {
name: 'XX局XX工程', // 项目名称
startTime: '2020-02-01', // 开始时间
endTime: '2022-07-12', // 结束时间
technical: '龙芯+达梦+金蝶+曙光服务器', // 技术路线
now: 'XX阶段', // 当前阶段
build: 'XX局', // 建设方
basis: 'XXX公司', // 集成商
develop: 'XXX公司', // 开发商
supervision: 'XX公司' // 监理方
name: '', // 项目名称
startTime: '', // 开始时间
endTime: '', // 结束时间
technical: '', // 技术路线
now: '', // 当前阶段
build: '', // 建设方
basis: '', // 集成商
develop: '', // 开发商
supervision: '' // 监理方
},
marker: [
{
......@@ -182,27 +182,36 @@ export default {
},
methods: {
init() {
console.log(this.value)
this.$server.GetProjectGet(this.value.id).then((res) => { // 数据请求
console.log(res.data)
if (res.data.code === 200) {
console.log(res.data.data)
}
}).catch(err => {
this.$message.error('数据请求失败!');
})
let that = this;
setTimeout(()=>{
that.allVal.name = that.value.name, // 项目名称
that.allVal.startTime = that.value.startTime, // 开始时间
that.allVal.endTime = that.value.endTime, // 结束时间
that.allVal.technical = that.value.techName, // 技术路线
that.allVal.now = that.value.schedule, // 当前阶段
that.allVal.build = that.value.consName, // 建设方
that.allVal.basis = that.value.gratorName, // 集成商
that.allVal.develop = that.value.devName, // 开发商
that.allVal.supervision = that.value.thirdName // 监理方
that.$server.GetProjectGet(that.value.id).then((res) => { // 数据请求
if (res.data.code === 200) {
console.log(res.data.data)
that.allVal.name = res.data.data.name, // 项目名称
that.allVal.startTime = that.timeC(res.data.data.startTime), // 开始时间
that.allVal.endTime = that.timeC(res.data.data.endTime), // 结束时间
that.allVal.technical = res.data.data.techName, // 技术路线
that.allVal.now = res.data.data.schedule, // 当前阶段
that.allVal.build = res.data.data.consName, // 建设方
that.allVal.basis = res.data.data.gratorName, // 集成商
that.allVal.develop = res.data.data.devName, // 开发商
that.allVal.supervision = res.data.data.thirdName // 监理方
}
}).catch(err => {
this.$message.error('数据请求失败!');
})
},30)
},
// 时间换算
timeC(value) {
let date = new Date(value); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
return Y + M + D + ' ' + h + m + s;
}
},
components: {
......
......@@ -47,7 +47,7 @@
:current-page.sync="currentPage"
:page-size="pagesize"
background
layout="prev, pager, next"
layout="prev, pager, next, jumper"
:total="totleLength">
</el-pagination>
</div>
......
import axios from 'axios';
// import Qs from 'qs';
import baseUrl from '../../config';
import store from '../store';
// axios.defaults.withCredentials = true;
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
// console.log(store.getters.getSession.session)
config.headers.session = store.getters.getSession.session;
// 预处理请求信息(config 发出的数据) 下方是三种请求,李迪凡的
if (config.method === 'post' || config.method === 'put' || config.method === 'delete') {
// POST传参序列化
......
......@@ -234,18 +234,11 @@ const server = {
method: 'get'
})
},
postFileSearch(data) { // 项目管理文件清单分页查询
return axios('/file/search', {
PostHistorySearch(data) { // 操作日志接口
return axios('/history/search', {
method: 'post',
data: data
})
},
postFileUpload(data) { // 项目管理文件清单文件上传
return axios('/file/upload/' + data.id, {
method: 'post',
data: data.value,
headers: {'Content-Type': 'multipart/form-data'}
});
},
}
}
export default server;
......@@ -30,6 +30,12 @@ const actions = {
jumpOther: payload
})
},
changeSession(store, payload) {
store.commit({
type: 'changeSession',
session: payload
})
},
};
export default actions;
......@@ -14,7 +14,10 @@ const getters = {
},
getJumpOther(state) {
return state.jumpOther
}
},
getSession(state) {
return state.session
},
};
export default getters;
......@@ -15,6 +15,9 @@ const mutations = {
changeJumpOther(state, payload) {
state.jumpOther = payload;
},
changeSession(state, payload) {
state.session = payload;
},
};
export default mutations;
......@@ -5,6 +5,7 @@ const state = {
homeClick: {}, // 首页点击的模块
nowPath: '', // 当前页面路径
jumpOther: '', // 跳转到其他页面,修改顶部子菜单样式
session: '', // 请求session
};
export default state;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论