Authored by 王涛

乙方运维代码

Showing 20 changed files with 550 additions and 437 deletions
... ... @@ -9,7 +9,7 @@ export default {
// 展示文档类型,默认展示类型
types: {
type: Array,
default: ['fxbg', 'gf', 'gzgl', 'jkjc', 'lxwh', 'pzgl', '', 'rcxj']
default: ['fxbg', 'gf', 'gzgl', 'jkjc', 'lxwh', 'pzgl', 'rcxj']
},
// 是否是预览模式
// 预览模式不展示授权按钮
... ... @@ -22,6 +22,10 @@ export default {
viewTypeId: {
type: String,
default: ''
},
props:{
type: Object,
default: {}
}
},
data() {
... ... @@ -236,7 +240,6 @@ export default {
params = info;
}
proxy.$global.confirm(msg, function () {
debugger
// ok
proxy.$http.post(`/inspection-report/file/change`,params , function (res) {
if (res && res.code == 0) {
... ...
... ... @@ -14,10 +14,10 @@
<div v-if="typeof(item.render) == 'function'" >
<div v-if="typeof(item.click) == 'function'">
<el-link type="primary" @click="item.click(scope.row)" v-html="item.render(scope.row)"></el-link>
<el-link :type="linkType" :underline="isLink" @click="item.click(scope.row)" v-html="item.render(scope.row)"></el-link>
</div>
<div v-else>
<el-link type="primary" v-html="item.render(scope.row)"></el-link>
<el-link :type="linkType" :underline="isLink" v-html="item.render(scope.row)"></el-link>
</div>
</div>
<span v-else>
... ...
... ... @@ -67,10 +67,21 @@ export default {
type: Array,
default: []
},
// 是否展示加载
loading:{
type: Boolean,
default: false
},
// 是否展示链接
isLink:{
type: Boolean,
default: false
},
// 是否展示链接
linkType:{
type: String,
default: 'primary'
},
},
data() {
return {}
... ...
<title>乙方运维</title>
<iframe src="/vue3/index.html#/operationMaintenance" class="layadmin-iframe"/>
<iframe src="/vue3/index.html#/operationMaintenance" class="layadmin-iframe" style="height: 99.5%!important;"/>
... ...
<div>
<div>
文档管理组件
</div>
</div>
<cm-document :isView="true" :viewTypeId="docType" :types="[docType]" :props=""></cm-document>
... ...
... ... @@ -5,149 +5,37 @@ export default {
data() {
return {}
},
setup() {
props: {
// 当前节点
treeNode: {
type: Object,
default: {}
},
// 当前节点的上级节点
parentNode: {
type: Object,
default: {}
},
// 项目id
projectId: {
type: String,
default: ''
},
// 文件类型
docType: {
type: String,
default: ''
},
},
setup(props, {attrs, slots, emit}) {
let height = Vue.ref(window.innerHeight - 130);
let propDetail = Vue.ref({});
const {proxy} = Vue.getCurrentInstance();
let columns = Vue.ref([
{
prop: 'fileName',
label: '年度',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm1',
label: '1月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm2',
label: '2月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm3',
label: '3月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm4',
label: '4月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm5',
label: '5月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm6',
label: '6月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm7',
label: '7月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm8',
label: '8月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm9',
label: '9月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm110',
label: '10月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm11',
label: '11月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm12',
label: '12月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
}
]);
let dataList = Vue.ref([]);
let currentPage = Vue.ref(1);
let total = Vue.ref(0);
// 获取表格树
let getPage = () => {
}
return {
columns,
height,
dataList,
currentPage,
total,
getPage
propDetail
}
}
}
... ...
... ... @@ -3,7 +3,7 @@
<!-- 人员信息总汇-->
<el-divider content-position="left">项目评价汇总</el-divider>
<cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
:showBorder="true" :currentPage="currentPage" :total="total" :loading="true"
:showPage="true" :height="height - 54"></cm-table-page>
:showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
:showPage="true" :height="(height - 54)/3"></cm-table-page>
</div>
</div>
... ...
... ... @@ -13,121 +13,82 @@ export default {
let columns = Vue.ref([
{
prop: 'fileName',
prop: 'opsYear',
label: '年度',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'center',
},
{
prop: 'm1',
prop: 'month1',
label: '1月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm2',
prop: 'month2',
label: '2月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm3',
prop: 'month3',
label: '3月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm4',
prop: 'month4',
label: '4月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm5',
prop: 'month5',
label: '5月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm6',
prop: 'month6',
label: '6月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm7',
prop: 'month7',
label: '7月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm8',
prop: 'month8',
label: '8月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm9',
prop: 'month9',
label: '9月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm110',
prop: 'month10',
label: '10月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm11',
prop: 'month11',
label: '11月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
},
{
prop: 'm12',
prop: 'month12',
label: '12月',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
align: 'right',
}
]);
... ... @@ -135,11 +96,24 @@ export default {
let currentPage = Vue.ref(1);
let total = Vue.ref(0);
// 获取表格
// 获取表格数据
let getPage = () => {
proxy.$http.post("/api-web/bOpsScore/scoreCollect", {
"page":1,
"limit":10,
"projectId":"1"
}, function (res) {
if (res && res.data) {
dataList.value = res.data;
total.value = res.count;
}
});
}
// 挂载完
Vue.onMounted(() => {
getPage();
})
return {
columns,
... ...
<div>
<el-row>
<el-col :span="12">
<div id="main" style="width: 500px;height:600px;"></div>
<el-col :span="18">
<div id="main" style="width: 500px;height:600px;" ></div>
</el-col>
<el-col :span="12">
<el-col :span="6">
<div id="score" style="width: 600px;height:400px;"></div>
</el-col>
</el-row>
<el-dialog
v-model="dialogVisible"
title="3月各项评分"
width="60%"
:before-close="handleClose"
>
<el-table border :data="tableData" stripe @cell-dblclick='handleCell' header-row-class-name="tbl-header-class" style="width: 100%;margin: 20px 0;">
<el-table-column prop="date" label="分类" align="center" min-width="100" />
<el-table-column prop="date" label="项目" align="center" min-width="100" />
<el-table-column prop="name" label="分值" align="center" min-width="100" />
<el-table-column prop="name" label="打分人" align="center" min-width="100"/>
<el-table-column prop="name" label="得分" align="center" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.name" style='width: 80px;'></el-input>
</template>
</el-table-column>
<el-table-column prop="name" label="扣分原因" align="center" min-width="100">
<template #default="scope">
<el-input v-model="scope.row.name" style='width: 80px;'></el-input>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" size="small" @click="dialogVisible = false">确认</el-button>
<el-button size="small"@click="dialogVisible = false">关闭</el-button>
</span>
<cm-dialog :title="title" width="60%" :showDialogVisible="dialogVisible" :showFooter="true">
<template v-slot>
<cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
:showBorder="true"
:showPage="false" :height="(height - 54)/3"></cm-table-page>
</template>
</el-dialog>
</cm-dialog>
</div>
... ...
... ... @@ -5,59 +5,177 @@ export default {
data() {
return {}
},
setup() {
props: {
treeNode: {
type: Object,
default: {}
},
parentNode: {
type: Object,
default: {}
},
projectId: {
type: String,
default: ''
},
},
setup(props, {attrs, slots, emit}) {
let height = Vue.ref(window.innerHeight - 130);
let width = Vue.ref(window.innerWidth * 0.6);
let dialogVisible = Vue.ref(false);
let title = Vue.ref('');
let dataList = Vue.ref([]);
let columns = Vue.ref([{
prop: 'item',
label: '分类',
sortable: true,
},{
prop: 'score',
label: '分值',
sortable: true,
},{
prop: 'rater',
label: '打分人',
sortable: true,
},{
prop: 'nickname',
label: '得分',
sortable: true,
},{
prop: 'deduction',
label: '扣分原因',
sortable: true,
},]);
const {proxy} = Vue.getCurrentInstance();
// 柱状图
let main = () => {
let columns = Vue.ref([
{
prop: 'fileName',
label: '日常资料',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm1',
label: '文档资料',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
},
{
prop: 'm2',
label: '项目保密协议',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
let params = {
projectId: props.projectId,
year: props.treeNode.label
}
]);
proxy.$http.get("/api-web/bOpsScore/getScoreFindProjectIdYear", params, function (res) {
if (res && res.map) {
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据
var option = {
xAxis: {
data: res.map.x
},
yAxis: {},
series: [{
name: '分值',
type: 'bar',
data: res.map.y,
itemStyle: { //上方显示数值
normal: {
label: {
show: true, //开启显示
position: 'top', //在上方显示
textStyle: { //数值样式
fontSize: 12
}
}
}
}
}]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
// 处理点击事件并且弹出数据名称
myChart.on('click', function (params) {
console.log(params);
detail(params);
});
}
}, function () {
proxy.$global.showMsg('没有查询到记录!', 'warning');
});
}
let dataList = Vue.ref([]);
let currentPage = Vue.ref(1);
let total = Vue.ref(0);
let detail = (v) =>{
// 获取表格树
let getPage = () => {
let name = v.name;
let month = parseInt(name)
title.value = name + "各项评分";
dialogVisible.value = true
// let params = {
// projectId: props.projectId,
// year: props.treeNode.label
// }
// proxy.$http.get("/api-web/bOpsScore/bOpsScoreDetails", params, function (res) {
//
// });
}
// 柱状图
let score = () => {
proxy.$http.post("/api-web/bOpsScore/scoreRatio", {}, function (res) {
if (res && res.data) {
let arr = [];
res.data.forEach(item => {
arr.push({value: item.ddicDesc, name: item.ddicName})
})
// 指定图表的配置项和数据
var option = {
title: {
text: '评分分类值占比'
},
tooltip: {
triggeer: 'item',
formatter: '{b} : {c} ({d}%)'
},
series: [
{
name: '评分分类值占比',
type: 'pie', // 设置图表类型为饼图
radius: '40%', // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
center: ["35%", "53%"],
data: arr,
label: {
normal: {
show: true,
formatter: '{b}:({d}%)'
},
labelLine: {show: true}
}
}
],
};
var myChart = echarts.init(document.getElementById('score'));
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
} else {
proxy.$global.showMsg('暂无数据!');
}
});
}
// 挂载完
Vue.onMounted(() => {
main();
score();
})
return {
columns,
width,
height,
dataList,
currentPage,
total,
getPage
title,
dialogVisible,
columns,
dataList
}
}
}
... ...
<div>
<div>
<!-- 人员信息总汇-->
<project-ry/>
</div>
<!-- 人员信息总汇-->
<project-ry/>
</div>
<div>
<!-- 项目评价总汇-->
... ...
... ... @@ -3,7 +3,7 @@
<!-- 人员信息总汇-->
<el-divider content-position="left">人员信息汇总</el-divider>
<cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
:showBorder="true" :currentPage="currentPage" :total="total" :loading="true"
:showPage="true" :height="height - 54"></cm-table-page>
:showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
:showPage="true" :height="(height - 54)/3"></cm-table-page>
</div>
</div>
... ...
... ... @@ -9,49 +9,89 @@ export default {
},
setup() {
let height = Vue.ref(window.innerHeight - 130);
const {proxy} = Vue.getCurrentInstance();
let columns = Vue.ref([{
prop: 'fileName',
prop: 'nickname',
label: '运维人员姓名',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
}
}, {
prop: 'createUser',
prop: 'state',
label: '在职状态',
sortable: true,
width: '120px'
width: '120px',
render: function (row) {
if(row.state==1){
return "在职";
}else{
return "<span style='color: red'>离职</span>";
}
}
}, {
prop: 'createTime',
prop: 'personalMessage',
label: '个人信息',
sortable: true,
width: '180px'
width: '180px',
render: function (row) {
if(row.personalMessage =="YES"){
return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`;
}else{
return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`;
}
}
}, {
prop: 'createTime',
prop: 'personalSecrecyBook',
label: '个人保密协议书',
sortable: true,
width: '180px'
width: '180px',
render: function (row) {
if(row.personalSecrecyBook =="YES"){
return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`;
}else{
return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`;
}
}
}, {
prop: 'createTime',
prop: 'monthlySummary',
label: '月度总结',
sortable: true,
width: '180px'
width: '180px',
render: function (row) {
if(row.monthlySummary =="YES"){
return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`;
}else{
return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`;
}
}
}]);
let dataList = Vue.ref([]);
let currentPage = Vue.ref(1);
let total = Vue.ref(0);
// 获取表格
// 获取表格数据
let getPage = () => {
proxy.$http.post("/api-web/bOpsPerson/personCollect", {
"page":1,
"limit":10,
"projectId":"1"
}, function (res) {
if (res && res.data) {
dataList.value = res.data
total.value = res.count;
}
});
}
// 挂载完
Vue.onMounted(() => {
getPage();
})
return {
columns,
... ...
<div>
<el-form
:model="ruleForm"
label-width="120px"
size="small"
>
<div style="padding-top: 20px;">
<el-form :model="ruleForm" label-width="120px" :size="$global.elementSize">
<el-row>
<el-col :span="8">
<el-form-item label="姓名" prop="nickname" class="form-class">
<el-input v-model="ruleForm.nickname" style='width: 190px;'></el-input>
<el-input v-model="ruleForm.nickname" disabled style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="性别" prop="sex" class="form-class">
<el-radio-group v-model="ruleForm.sex">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="学历" prop="education" class="form-class">
<el-input v-model="ruleForm.education" style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="手机号" prop="name" class="form-class">
<el-input v-model="ruleForm.phone" style='width: 190px;'></el-input>
<el-form-item label="手机号" prop="phone" class="form-class">
<el-input v-model="ruleForm.phone" disabled style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="电子邮箱" prop="name" class="form-class">
<el-form-item label="电子邮箱" prop="email" class="form-class">
<el-input v-model="ruleForm.email" style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="入职时间" prop="name" class="form-class">
<el-form-item label="入职时间" prop="entryTime" class="form-class">
<el-date-picker
disabled
v-model="ruleForm.entryTime"
type="date"
style='width: 190px;'
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="获得证书" prop="name" class="form-class">
<el-form-item label="获得证书" prop="certificate" disabled class="form-class">
<el-input v-model="ruleForm.certificate" style='width: 190px;'></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所在公司" prop="name" class="form-class">
<el-input v-model="ruleForm.company" style='width: 190px;'></el-input>
<el-form-item label="所在公司" prop="company" class="form-class">
<el-input v-model="ruleForm.company" disabled style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="年龄" prop="name" class="form-class">
<el-form-item label="年龄" prop="age" class="form-class">
<el-input v-model="ruleForm.age" style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="毕业院校" prop="name" class="form-class">
<el-input v-model="ruleForm.university" style='width: 190px;'></el-input>
<el-form-item label="毕业院校" prop="university" class="form-class">
<el-input v-model="ruleForm.university" disabled style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="座机号码" prop="name" class="form-class">
<el-form-item label="座机号码" prop="tel" class="form-class">
<el-input v-model="ruleForm.tel" style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="家庭住址" prop="name" class="form-class">
<el-form-item label="家庭住址" prop="post" class="form-class">
<el-input v-model="ruleForm.post" style='width: 190px;'></el-input>
</el-form-item>
<el-form-item label="离职时间" prop="name" class="form-class">
<el-form-item label="离职时间" prop="quitTime" class="form-class">
<el-date-picker
v-model="ruleForm.quitTime"
disabled
type="date"
style='width: 190px;'
placeholder="选择日期">
... ... @@ -63,7 +61,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-image style="width: 200px; height: 200px" :src="imageUrl"></el-image>
<el-image style="width: 200px; height: 200px" :src="ruleForm.headImgUrl"></el-image>
<el-upload
class="upload-demo"
:show-file-list="false"
... ... @@ -81,7 +79,7 @@
</el-col>
</el-row>
<div style="text-align: center;">
<el-button type="primary" size="small" @click="handleSave">保存</el-button>
<el-button type="primary" size="small" @click="saveUser">保存</el-button>
</div>
<!-- <el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')"
... ...
... ... @@ -2,34 +2,83 @@ export default {
name: 'projectPJIndex',
template: '',
components: {},
props: {
treeNode: {
type: Object,
default: {}
},
parentNode: {
type: Object,
default: {}
},
projectId: {
type: String,
default: ''
},
},
data() {
return {}
},
setup() {
setup(props, {attrs, slots, emit}) {
let height = Vue.ref(window.innerHeight - 130);
const {proxy} = Vue.getCurrentInstance();
let ruleForm = Vue.reactive({
nickname:'',
sex: '',
let ruleForm = Vue.ref({
nickname: '',
sex: 0,
education: '',
phone: '',
tel: '',
email: '',
post: '',
headImgUrl: '',
age: '',
entryTime: '',
certificate: '',
university: '',
education: '',
quitTime: '',
entryTime:'',
age: '',
company: '',
certificate: ''
headImgUrl: '',
post: '',
projectId: null,
quitTime: '',
state: '',
tel: ''
})
// 获取表格数据
let getPage = () => {
proxy.$http.get("/api-web/bOpsPerson/search", {
"nickname": props.parentNode.label,
"projectId": props.projectId
}, function (res) {
if (res && res.object) {
ruleForm.value = res.object
}
});
}
// 保存用户信息
let saveUser = () => {
console.log(ruleForm.value);
proxy.$http.post("/api-web/bOpsPerson/saveOrUpdate",ruleForm.value , function (res) {
if (res && res.code == 0) {
proxy.$global.showMsg('保存成功!');
}
});
}
// // 挂载完
Vue.onMounted(() => {
getPage();
})
// 监听编辑状态
Vue.watch(() => props.projectId, (newValue, oldVlaue) => {
getPage();
});
return {
ruleForm
ruleForm,
saveUser
}
}
}
... ...
... ... @@ -3,7 +3,7 @@
<!-- 人员信息总汇-->
<el-divider content-position="left">项目资料汇总</el-divider>
<cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
:showBorder="true" :currentPage="currentPage" :total="total" :loading="true"
:showPage="true" :height="height - 54"></cm-table-page>
:showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
:showPage="false" :height="(height - 54)/3"></cm-table-page>
</div>
</div>
... ...
... ... @@ -13,30 +13,37 @@ export default {
let columns = Vue.ref([
{
prop: 'fileName',
prop: 'dayMaterial',
label: '日常资料',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
if(row.dayMaterial =="YES"){
return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`;
}else{
return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`;
}
}
},
{
prop: 'm1',
prop: 'documentMaterial',
label: '文档资料',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
if(row.documentMaterial =="YES"){
return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`;
}else{
return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`;
}
}
},
{
prop: 'm2',
prop: 'nda',
label: '项目保密协议',
sortable: true,
align: 'left',
render: function (row) {
return `<i class="iconfont 22222" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
if(row.nda =="YES"){
return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`;
}else{
return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`;
}
}
}
]);
... ... @@ -45,11 +52,21 @@ export default {
let currentPage = Vue.ref(1);
let total = Vue.ref(0);
// 获取表格
// 获取表格数据
let getPage = () => {
proxy.$http.get("/api-web/bOpsFile/fileCollect?projectId=1", {}, function (res) {
if (res && res.data) {
dataList.value = res.data
total.value = res.count;
}
});
}
// 挂载完
Vue.onMounted(() => {
getPage();
})
return {
columns,
... ...
... ... @@ -47,6 +47,10 @@ const routes = [{
path: '/operationMaintenance',
name: 'operationMaintenance',
component: () => myImport('views/operationMaintenance/index')
},{
path: '/operationMaintenance/config',
name: 'operationMaintenanceConfig',
component: () => myImport('views/operationMaintenance/config/index')
}
];
... ...
<div class="assets-configmanagers">
<!-- 乙方运营-->
<div>
<!-- 左侧树结构 -->
<el-row>
<el-col :span="4" class='col-class'>
<el-tree :data="dataSource" :default-expanded-keys="[1]" :props="defaultProps" @node-click="handleNodeClick" />
</el-col>
<!-- 右侧显示 -->
<el-col :span="19" class='col-class'>
<!-- 失活的组件将会被缓存!-->
<keep-alive>
<component v-bind:is="componentName"></component>
</keep-alive>
</el-col>
</el-row>
</div>
<div class="container" :style="{'height':height+'px','max-height':height+'px','overflow':'auto'}">
<!-- 乙方运营-->
<el-row :gutter="5">
<el-col :span="4">
<div :style="{'min-height':height+'px','height':'100%','overflow':'auto'}" style="background-color: white;border-radius: 3px">
<el-tree :data="dataSource" :default-expanded-keys="[1]" :props="defaultProps"
@node-click="handleNodeClick"/>
</div>
</el-col>
<el-col :span="20" >
<div :style="{'min-height':height+'px','height':'100%','overflow':'auto'}" style="background-color: white;border-radius: 3px">
<component v-bind:is="componentName"
:docType="docType"
:treeNode="treeNode" :parentNode="parentNode" :projectId="projectId"></component>
</div>
</el-col>
</el-row>
</div>
... ...
export default {
name: 'operationMaintenance',
template: '',
components: {
// 所有汇总
'COLLECT_ALL': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/project/index')
),
// 人员汇总
'COLLECT_USER': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/ry/index')
),
// 评价汇总
'COLLECT_EVALUATE': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/pj/index')
),
// 资料汇总
'COLLECT_MATERIAL': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/zl/index')
),
//文档
'DOCUMENT': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/doc/index')
),
// 评分图(项目评价具体年份)
'EVALUATE': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/pjt/index')
),
// 人员信息
'USER': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/user/index')
),
},
components: {
// 所有汇总
'COLLECT_ALL': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/project/index')
),
// 人员汇总
'COLLECT_USER': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/ry/index')
),
// 评价汇总
'COLLECT_EVALUATE': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/pj/index')
),
// 资料汇总
'COLLECT_MATERIAL': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/zl/index')
),
//文档
// 个人保密协议(THREE_PERSONAGE_NDA)
// 月度总结 THREE_MONTHLY_SUMMARY
// 月报 FOUR_MONTHLY
// 考勤记录 FOUR_CHECKING_IN
// 健康检查报告 FOUR_HEALTH
// 文档资料 TWO_DOCUMENT_MATERIAL
// 项目保密协议 TWO_NDA
'DOCUMENT': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/doc/index')
),
// 评分图(项目评价具体年份)
'EVALUATE': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/pjt/index')
),
// 人员信息
'USER': Vue.defineAsyncComponent(
() => myImport('components/page/operationMaintenance/user/index')
),
},
setup() {
const { proxy } = Vue.getCurrentInstance()
let dataSource = Vue.ref([]);
const {proxy} = Vue.getCurrentInstance()
let height = Vue.ref(window.innerHeight -20);
let dataSource = Vue.ref([]);
let componentName = Vue.ref('COLLECT_ALL');
// 当前点击节点
let treeNode = Vue.ref({});
let parentNode = Vue.ref({});
let projectId = Vue.ref('');
let docType = Vue.ref('');
// 搜索
let getTree = () => {
var params = {
// page: pageInfo.page,
// limit: pageInfo.limit,
username: '1',
};
proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) {
if (res && res.data) {
dataSource.value = res.data;
treeNode.value = res.data[0];
} else {
proxy.$global.showMsg('暂无数据!');
}
}, function () {
proxy.$global.showMsg('没有查询到记录!');
});
}
// 搜索
let getTree = () => {
var params = {
// page: pageInfo.page,
// limit: pageInfo.limit,
username: '1',
};
proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) {
if (res && res.data) {
dataSource.value = res.data;
} else {
proxy.$global.showMsg('暂无数据!');
}
},function (){
proxy.$global.showMsg('没有查询到记录!');
});
}
let getParent = (arr, parentId) => {
// 获取父节点
arr.filter(function (v) {
if (v.id == parentId) {
parentNode.value = v;
}
let child = v.children;
if (child && child.length > 0) {
getParent(child, parentId);
}
})
}
let handleNodeClick=(data)=> {
let comName= data.map.nodeType.view.code;
console.log(comName)
componentName.value = comName;
}
Vue.onMounted(() => {
getTree();
let handleNodeClick = (data) => {
let comName = data.map.nodeType.view.code;
if (comName == 'DOCUMENT') {
docType.value = data.map.nodeType.code;
}
getParent(dataSource.value, data.parentId);
projectId.value = data.map.nodeType.projectId;
treeNode.value = data;
componentName.value = comName;
}
Vue.onMounted(() => {
getTree();
})
// 搜索
// 搜索
return {
dataSource,
handleNodeClick,
componentName
height,
projectId,
treeNode,
parentNode,
dataSource,
handleNodeClick,
componentName,
docType
};
},
}
... ...