Commit 87c2c2ff by 史敦盼

Merge branch 'sdp-v1'

2 parents ac386d7f 9498082b
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-12 14:55:59
* @LastEditors: pan
* @LastEditTime: 2024-03-18 09:56:15
* @LastEditTime: 2024-03-28 17:01:26
-->
<!-- /**
* 搜索栏公共组件
......@@ -47,6 +47,7 @@
class="btn-search"
icon="el-icon-search"
@click="onSearch"
v-preventReClick
>查询</el-button
>
<el-button
......
export default function initDirective(vue) {
/** 节流 */
vue.directive('throttle', {
inserted: function (el, binding) {
let stop = false;
el.addEventListener(binding.arg, (e) => {
if (stop) return;
binding.value(e)
stop = true;
setTimeout(() => {
stop = false
}, 500)
})
}
})
/** 防抖 */
vue.directive('debounce', {
inserted: function (el, binding) {
let stopTime;
el.addEventListener(binding.arg, (e) => {
clearTimeout(stopTime);
stopTime = setTimeout(binding.value, 1000, e)
})
}
})
/** 节流 */
vue.directive('throttle', {
inserted: function (el, binding) {
let stop = false
el.addEventListener(binding.arg, (e) => {
if (stop) return
binding.value(e)
stop = true
setTimeout(() => {
stop = false
}, 500)
})
},
})
/** 防抖 */
vue.directive('debounce', {
inserted: function (el, binding) {
let stopTime
el.addEventListener(binding.arg, (e) => {
clearTimeout(stopTime)
stopTime = setTimeout(binding.value, 1000, e)
})
},
})
vue.directive('no-backslash', {
// bind 钩子函数会在指令绑定到元素时调用
bind(el, binding, vnode) {
// 绑定 @input 监听方法
el.addEventListener('input', function (event) {
// 获取输入的值
const value = event.target.value;
vue.directive('no-backslash', {
// bind 钩子函数会在指令绑定到元素时调用
bind(el, binding, vnode) {
// 绑定 @input 监听方法
el.addEventListener('input', function (event) {
// 获取输入的值
const value = event.target.value
// 使用正则表达式检测特殊字(根据需要匹配相应限制字符)
const regex = /(?:')|(?:-- )|(\/\*(?:.|[\n\r])*?\*\/)|(\b(select|update|and|or|delete|insert|truncate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute)\b)/i;
// 如果输入值包含特殊字符,则替换为空格
if (regex.test(value)) {
// 使用 replace 方法替换特殊字为空格
const newValue = value.replace(regex, ' ');
// 将新值设置回输入框
event.target.value = newValue;
// 触发 @input 事件,使其更新组件中的数据
vnode.componentInstance.$emit('input', newValue);
}
});
},
});
}
// 使用正则表达式检测特殊字(根据需要匹配相应限制字符)
const regex =
/(?:')|(?:-- )|(\/\*(?:.|[\n\r])*?\*\/)|(\b(select|update|and|or|delete|insert|truncate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute)\b)/i
// 如果输入值包含特殊字符,则替换为空格
if (regex.test(value)) {
// 使用 replace 方法替换特殊字为空格
const newValue = value.replace(regex, ' ')
// 将新值设置回输入框
event.target.value = newValue
// 触发 @input 事件,使其更新组件中的数据
vnode.componentInstance.$emit('input', newValue)
}
})
},
})
vue.directive('preventReClick', {
inserted: function (el, binding) {
el.addEventListener('click', () => {
if (!el.disabled) {
el.disabled = true
setTimeout(() => {
el.disabled = false
}, binding.value || 1500)
}
})
},
})
}
......@@ -7,7 +7,7 @@
* @Autor: pan
* @Date: 2024-03-21 20:58:31
* @LastEditors: pan
* @LastEditTime: 2024-03-27 19:49:01
* @LastEditTime: 2024-03-28 17:36:40
-->
<template>
<div class="flex-column m-10 w-100 conceptualExamine">
......@@ -254,7 +254,7 @@ export default {
this.leftContentType === 'onlyoffice' ||
this.rightContentType === 'onlyoffice'
) {
// this.fnQueryPrjNeedFile()
this.fnQueryPrjNeedFile()
}
},
computed: {
......
<!--
* @Description: 项目信息详情
* @Version: 2.0
* @Autor: pan
* @Date: 2024-03-28 16:08:56
* @LastEditors: pan
* @LastEditTime: 2024-03-28 17:31:20
-->
<template>
<div>
<el-dialog
:title="getTitle"
:visible.sync="showDialog"
:close-on-click-modal="false"
width="90%"
@close="handleClose()"
@open="handleOpen()"
>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="基本信息" name="1">
<div class="base-info-item m-t-20">
<div class="base-info-item-title">系统基本信息</div>
<div class="base-info-item-content">
<el-row class="m-t-20">
<el-col :span="6" class="flex">
<div class="label">单位</div>
<div class="value">总部</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">部门</div>
<div class="value">发展策划部</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">关联系统名称</div>
<div class="value">
电力营销-2023年网上国网(网上国网V1.0)
</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">建设类型</div>
<div class="value">统建</div>
</el-col>
</el-row>
<el-row class="m-t-20">
<el-col :span="6" class="flex">
<div class="label">项目名称</div>
<div class="value">Sora大模型系统</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">是否续建</div>
<div class="value"></div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">前期项目</div>
<div class="value">
电力营销-2023年网上国网(网上国网V1.0)
</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">承建单位</div>
<div class="value">国网数字科技有限公司</div>
</el-col>
</el-row>
<el-row class="m-t-20">
<el-col :span="6" class="flex">
<div class="label">项目经理</div>
<div class="value">李雷</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">创建人</div>
<div class="value">李雷</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">创建时间</div>
<div class="value">2024-03-28</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">修改人</div>
<div class="value">李雷</div>
</el-col>
</el-row>
<el-row class="m-t-20">
<el-col :span="24" class="flex">
<div class="label">修改时间</div>
<div class="value">2024-03-28</div>
</el-col>
</el-row>
<el-row class="m-t-20">
<el-col :span="24" class="flex">
<div class="label">修改时间</div>
<div class="value">
<el-table height="300" :data="tableData" stripe border>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
prop="name"
label="资料类型"
width="300"
align="center"
></el-table-column>
<el-table-column
prop="name2"
width="500"
label="资料名称"
align="center"
></el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</div>
</div>
<div class="base-info-item m-t-20">
<div class="base-info-item-title">系统架构管控要求</div>
<div class="base-info-item-content">
<el-row class="m-t-20">
<el-col :span="8" class="flex">
<div class="label" style="width: 160px">
评审情况(概要设计)
</div>
<div class="value">完成</div>
</el-col>
<el-col :span="8" class="flex">
<div class="label">概设架构遵从检查</div>
<div class="value">完成</div>
</el-col>
<el-col :span="8" class="flex">
<div class="label">概设架构政策审查</div>
<div class="value">完成</div>
</el-col>
</el-row>
</div>
</div>
<div class="base-info-item m-t-20">
<div class="base-info-item-title">概要设计评审情况</div>
<div class="base-info-item-content">
<el-row class="m-t-20">
<el-col :span="8" class="flex">
<div class="label">批次名称</div>
<div class="value">2023第一批次概设评审</div>
</el-col>
<el-col :span="8" class="flex">
<div class="label">需求名称</div>
<div class="value">2023第一批次概设评审需求</div>
</el-col>
<el-col :span="8" class="flex">
<div class="label">关联组织机构</div>
<div class="value">经研院-项目管理部</div>
</el-col>
</el-row>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="架构资产" name="2">架构资产</el-tab-pane>
<el-tab-pane label="架构视图" name="3">架构视图</el-tab-pane>
</el-tabs>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()" size="mini">关 闭</el-button>
</span></el-dialog
>
</div>
</template>
<script>
export default {
props: {
visible: {
type: Boolean,
default: false,
},
rowData: {
type: Object,
default: () => {},
},
},
data() {
return {
activeName: '1',
tableData: [],
}
},
components: {},
computed: {
showDialog: {
get() {
return this.visible
},
set(value) {
this.$emit('update:visible', value)
},
},
getTitle() {
return `项目名称:${this.rowData.prjName}`
},
},
mounted() {},
methods: {
handleClose() {
this.showDialog = false
},
handleOpen() {},
handleClick() {},
},
}
</script>
<style scoped lang="scss">
@import '@/styles/elementui.scss';
@import '@/styles/common.scss';
.base-info-item {
&-title {
font-size: 16px;
color: #1ec695;
position: relative;
text-align: left;
padding-left: 20px;
&::before {
content: '';
position: absolute;
left: 0;
top: 2px;
width: 6px;
border-radius: 4px;
height: 20px;
background-color: #1ec695;
}
}
&-content {
// padding: 0 50px;
.label {
font-weight: bold;
margin-right: 30px;
width: 120px;
text-align: right;
}
}
}
</style>
<template>
<div class="projectInfoManage">
<div class="table_container">
<div class="search_menu">
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">单位</span>
<el-input v-no-backslash v-model="searchParams.let1" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">部门</span>
<el-input v-no-backslash v-model="searchParams.let2" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">项目名称</span>
<el-input v-no-backslash v-model="searchParams.let3" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">建设类型</span>
<el-select v-model="searchParams.let4" placeholder="请选择" class="search_item">
<el-option v-for="item in jianSheLeiXingSelect" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table">
<img class="btn_icon" src="@/assets/archi-ele-list/search.png" alt="" />
<p>查询</p>
</div>
<div class="reset_btn" @click="reset">
<img class="btn_icon" src="@/assets/archi-ele-list/reset.png" alt="" />
<p>重置</p>
</div>
</div>
</div>
<div class="search_btn">
<el-button type="primary" size="medium" icon="el-icon-document-add" @click="operation('add', null)">新建项目</el-button>
<!-- <el-button type="primary" size="medium" icon="el-icon-document-add" @click="operation('add', null)">续建项目</el-button> -->
<!-- <el-button type="primary" size="medium" icon="el-icon-delete">删除</el-button> -->
</div>
<el-table :height="tableHeight" v-loading="loading" :data="tableData" stripe border>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="manageOrgId" label="单位" align="center"></el-table-column>
<el-table-column prop="manageDeptId" label="部门" align="center"></el-table-column>
<el-table-column prop="appName" label="系统名称" align="center" width="200" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="建设类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.buildType == 1">统推</span>
<span v-else-if="scope.row.buildType == 2">自建</span>
</template>
</el-table-column>
<el-table-column prop="prjName" label="项目名称" align="center" width="200" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="项目类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.prjPlanClass == 1">新建</span>
<span v-else-if="scope.row.prjPlanClass == 2">续建</span>
</template>
</el-table-column>
<el-table-column prop="buildOrg" label="承建单位" align="center"></el-table-column>
<el-table-column prop="projectManager" label="项目经理" align="center"></el-table-column>
<el-table-column prop="createMan" label="创建人" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="260" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" type="primary" size="mini" @click="operation('edit', scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button class="shanChu_btn" icon="el-icon-delete" size="mini" @click="operation('delete', scope.row)" :disabled="scope.row.state == 1">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
<!-- <el-pagination
<div class="projectInfoManage">
<div class="table_container">
<div class="search_menu">
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">单位</span>
<el-input
v-no-backslash
v-model="searchParams.let1"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">部门</span>
<el-input
v-no-backslash
v-model="searchParams.let2"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">项目名称</span>
<el-input
v-no-backslash
v-model="searchParams.let3"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">建设类型</span>
<el-select
v-model="searchParams.let4"
placeholder="请选择"
class="search_item"
>
<el-option
v-for="item in jianSheLeiXingSelect"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table">
<img
class="btn_icon"
src="@/assets/archi-ele-list/search.png"
alt=""
/>
<p>查询</p>
</div>
<div class="reset_btn" @click="reset">
<img
class="btn_icon"
src="@/assets/archi-ele-list/reset.png"
alt=""
/>
<p>重置</p>
</div>
</div>
</div>
<div class="search_btn">
<el-button
type="primary"
size="medium"
icon="el-icon-document-add"
@click="operation('add', null)"
>新建项目</el-button
>
<!-- <el-button type="primary" size="medium" icon="el-icon-document-add" @click="operation('add', null)">续建项目</el-button> -->
<!-- <el-button type="primary" size="medium" icon="el-icon-delete">删除</el-button> -->
</div>
<el-table
:height="tableHeight"
v-loading="loading"
:data="tableData"
stripe
border
>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
prop="manageOrgId"
label="单位"
align="center"
></el-table-column>
<el-table-column
prop="manageDeptId"
label="部门"
align="center"
></el-table-column>
<el-table-column
prop="appName"
label="系统名称"
align="center"
width="200"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="建设类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.buildType == 1">统推</span>
<span v-else-if="scope.row.buildType == 2">自建</span>
</template>
</el-table-column>
<el-table-column
prop="prjName"
label="项目名称"
align="center"
width="200"
:show-overflow-tooltip="true"
>
<template slot-scope="{ row }">
<span class="prjName" @click="openDetail(row)">{{
row.prjName
}}</span>
</template>
</el-table-column>
<el-table-column label="项目类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.prjPlanClass == 1">新建</span>
<span v-else-if="scope.row.prjPlanClass == 2">续建</span>
</template>
</el-table-column>
<el-table-column
prop="buildOrg"
label="承建单位"
align="center"
></el-table-column>
<el-table-column
prop="projectManager"
label="项目经理"
align="center"
></el-table-column>
<el-table-column
prop="createMan"
label="创建人"
align="center"
></el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
align="center"
></el-table-column>
<el-table-column label="操作" width="260" align="center">
<template slot-scope="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<el-button
icon="el-icon-edit"
type="primary"
size="mini"
@click="operation('edit', scope.row)"
:disabled="scope.row.state == 1"
>编辑</el-button
>
<el-button
class="shanChu_btn"
icon="el-icon-delete"
size="mini"
@click="operation('delete', scope.row)"
:disabled="scope.row.state == 1"
>删除</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<!-- <el-pagination
background
layout="prev, pager, next"
:total="50">
</el-pagination> -->
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="pager.sizes"
:page-size="pager.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager.total">
</el-pagination>
</div>
<el-dialog
:title="is_add_edit == 'add' ? '新建系统' : '编辑系统'"
:visible.sync="add_dialog"
:center="false"
:close-on-click-modal="false"
width="80%">
<el-form :model="ruleForm" ref="form" :rules="rules" style="display: flex;flex-wrap: wrap;">
<el-form-item label="关联系统:" prop="let1" style="width: 30%;">
<el-input v-model="ruleForm.let1" readonly>
<div slot="append" @click="operation('open_add_dialog2', null)">
选择系统
</div>
</el-input>
</el-form-item>
<el-form-item label="项目名称:" prop="let2" style="width: 30%;margin-left: 46px;">
<el-input v-no-backslash v-model="ruleForm.let2" maxlength="100"></el-input>
</el-form-item>
<el-form-item label="是否续建:" prop="let3" style="width: 30%;">
<el-select v-model="ruleForm.let3" clearable placeholder="请选择">
<el-option label="是" :value="2"></el-option>
<el-option label="否" :value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="前期项目:" prop="let4" style="width: 29.5%;margin-left: 10px;">
<el-input v-model="ruleForm.let4" readonly>
<div slot="append" @click="operation('open_add_dialog3', null)">
选择项目
</div>
</el-input>
</el-form-item>
<!-- <el-form-item label="报告模版关联使用:" prop="let5" style="width: 33%;">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="pager.sizes"
:page-size="pager.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager.total"
>
</el-pagination>
</div>
<el-dialog
:title="is_add_edit == 'add' ? '新建系统' : '编辑系统'"
:visible.sync="add_dialog"
:center="false"
:close-on-click-modal="false"
width="80%"
>
<el-form
:model="ruleForm"
ref="form"
:rules="rules"
style="display: flex; flex-wrap: wrap"
>
<el-form-item label="关联系统:" prop="let1" style="width: 30%">
<el-input v-model="ruleForm.let1" readonly>
<div slot="append" @click="operation('open_add_dialog2', null)">
选择系统
</div>
</el-input>
</el-form-item>
<el-form-item
label="项目名称:"
prop="let2"
style="width: 30%; margin-left: 46px"
>
<el-input
v-no-backslash
v-model="ruleForm.let2"
maxlength="100"
></el-input>
</el-form-item>
<el-form-item label="是否续建:" prop="let3" style="width: 30%">
<el-select v-model="ruleForm.let3" clearable placeholder="请选择">
<el-option label="是" :value="2"></el-option>
<el-option label="否" :value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item
label="前期项目:"
prop="let4"
style="width: 29.5%; margin-left: 10px"
>
<el-input v-model="ruleForm.let4" readonly>
<div slot="append" @click="operation('open_add_dialog3', null)">
选择项目
</div>
</el-input>
</el-form-item>
<!-- <el-form-item label="报告模版关联使用:" prop="let5" style="width: 33%;">
<el-input v-model="ruleForm.let5" readonly>
<div slot="append" @click="operation('open_add_dialog4', null)">
选择报告
</div>
</el-input>
</el-form-item> -->
</el-form>
<div style="text-align: left;margin-left: 10px;">项目资料:</div>
<el-table :data="tableData4" stripe border>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="tableLet1" label="资料类型" align="center"></el-table-column>
<el-table-column label="资料名称" align="center">
<template slot-scope="scope">
<el-upload
class="upload-demo"
action="/eadc-shared-ability/oss/upload"
ref="upload"
:on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
:on-success="(res, file, fileList) => handleFileUploadSuccess(res, file, fileList, scope.row)"
:limit="1"
:file-list="scope.row.fileList">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</template>
</el-table-column>
</el-table>
</el-form>
<div style="text-align: left; margin-left: 10px">项目资料:</div>
<el-table :data="tableData4" stripe border>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
prop="tableLet1"
label="资料类型"
align="center"
></el-table-column>
<el-table-column label="资料名称" align="center">
<template slot-scope="scope">
<el-upload
class="upload-demo"
action="/eadc-shared-ability/oss/upload"
ref="upload"
:on-remove="
(file, fileList) => handleRemove(file, fileList, scope.row)
"
:on-success="
(res, file, fileList) =>
handleFileUploadSuccess(res, file, fileList, scope.row)
"
:limit="1"
:file-list="scope.row.fileList"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="dialogOperation('save', null)">保存</el-button>
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="dialogOperation('save', null)"
>保存</el-button
>
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
<el-dialog
title='选择系统'
:visible.sync="add_dialog2"
:center="false"
:close-on-click-modal="false"
width="80%">
<div class="search_menu" style="justify-content: center;">
<div class="search_menu_item_container">
<div class="search_menu_item" style="width: auto;">
<span class="search_title">单位</span>
<el-input v-no-backslash v-model="searchParams2.let1" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item" style="width: auto;">
<span class="search_title">部门</span>
<el-input v-no-backslash v-model="searchParams2.let2" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item" style="width: auto;">
<span class="search_title">项目名称</span>
<el-input v-no-backslash v-model="searchParams2.let3" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item" style="width: auto;">
<span class="search_title">建设类型</span>
<el-select v-model="searchParams2.let4" placeholder="请选择" class="search_item">
<el-option v-for="item in jianSheLeiXingSelect" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table2">
<img class="btn_icon" src="@/assets/archi-ele-list/search.png" alt="" />
<p>查询</p>
</div>
<div class="reset_btn" @click="reset2">
<img class="btn_icon" src="@/assets/archi-ele-list/reset.png" alt="" />
<p>重置</p>
</div>
</div>
</div>
<el-table height="300" v-loading="loading2" @selection-change="select_table_rows" :data="tableData2" stripe border>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="manageOrgId" label="单位" align="center"></el-table-column>
<el-table-column prop="manageDeptId" label="部门" align="center"></el-table-column>
<el-table-column prop="appName" label="系统名称" align="center" width="200" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="建设类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.buildType == 1">统推</span>
<span v-else>自建</span>
</template>
</el-table-column>
<el-table-column prop="buildOrg" label="承建单位" align="center"></el-table-column>
<el-table-column prop="projectManager" label="项目经理" align="center"></el-table-column>
<el-table-column prop="createMan" label="创建人" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
:current-page="pager2.current"
:page-sizes="pager2.sizes"
:page-size="pager2.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager2.total">
</el-pagination>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="dialogOperation('selectSystem', null)">确定</el-button>
<el-button @click="dialogOperation('cancelSelectSystem', null)">取消</el-button>
</span>
</el-dialog>
<el-dialog
title="选择系统"
:visible.sync="add_dialog2"
:center="false"
:close-on-click-modal="false"
width="80%"
>
<div class="search_menu" style="justify-content: center">
<div class="search_menu_item_container">
<div class="search_menu_item" style="width: auto">
<span class="search_title">单位</span>
<el-input
v-no-backslash
v-model="searchParams2.let1"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item" style="width: auto">
<span class="search_title">部门</span>
<el-input
v-no-backslash
v-model="searchParams2.let2"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item" style="width: auto">
<span class="search_title">项目名称</span>
<el-input
v-no-backslash
v-model="searchParams2.let3"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item" style="width: auto">
<span class="search_title">建设类型</span>
<el-select
v-model="searchParams2.let4"
placeholder="请选择"
class="search_item"
>
<el-option
v-for="item in jianSheLeiXingSelect"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table2">
<img
class="btn_icon"
src="@/assets/archi-ele-list/search.png"
alt=""
/>
<p>查询</p>
</div>
<div class="reset_btn" @click="reset2">
<img
class="btn_icon"
src="@/assets/archi-ele-list/reset.png"
alt=""
/>
<p>重置</p>
</div>
</div>
</div>
<el-table
height="300"
v-loading="loading2"
@selection-change="select_table_rows"
:data="tableData2"
stripe
border
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
prop="manageOrgId"
label="单位"
align="center"
></el-table-column>
<el-table-column
prop="manageDeptId"
label="部门"
align="center"
></el-table-column>
<el-table-column
prop="appName"
label="系统名称"
align="center"
width="200"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="建设类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.buildType == 1">统推</span>
<span v-else>自建</span>
</template>
</el-table-column>
<el-table-column
prop="buildOrg"
label="承建单位"
align="center"
></el-table-column>
<el-table-column
prop="projectManager"
label="项目经理"
align="center"
></el-table-column>
<el-table-column
prop="createMan"
label="创建人"
align="center"
></el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
align="center"
></el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
:current-page="pager2.current"
:page-sizes="pager2.sizes"
:page-size="pager2.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager2.total"
>
</el-pagination>
<span slot="footer" class="dialog-footer">
<el-button
class="greenButton"
@click="dialogOperation('selectSystem', null)"
>确定</el-button
>
<el-button @click="dialogOperation('cancelSelectSystem', null)"
>取消</el-button
>
</span>
</el-dialog>
<el-dialog
title='选择项目'
:visible.sync="add_dialog3"
:center="false"
:close-on-click-modal="false"
width="80%">
<div class="search_menu" style="justify-content: center;">
<div class="search_menu_item_container">
<div class="search_menu_item" style="width: auto;">
<span class="search_title">单位</span>
<el-input v-no-backslash v-model="searchParams3.let1" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item" style="width: auto;">
<span class="search_title">部门</span>
<el-input v-no-backslash v-model="searchParams3.let2" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item" style="width: auto;">
<span class="search_title">系统名称</span>
<el-input v-no-backslash v-model="searchParams.let3" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item" style="width: auto;">
<span class="search_title">建设类型</span>
<el-select v-model="searchParams3.let4" placeholder="请选择" class="search_item">
<el-option v-for="item in jianSheLeiXingSelect" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table3">
<img class="btn_icon" src="@/assets/archi-ele-list/search.png" alt="" />
<p>查询</p>
</div>
<div class="reset_btn" @click="reset3">
<img class="btn_icon" src="@/assets/archi-ele-list/reset.png" alt="" />
<p>重置</p>
</div>
</div>
</div>
<el-table height="300" v-loading="loading3" @selection-change="select_table_row3" :data="tableData3" stripe border>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="manageOrgId" label="单位" align="center"></el-table-column>
<el-table-column prop="manageDeptId" label="部门" align="center"></el-table-column>
<el-table-column prop="appName" label="系统名称" align="center" width="200" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="建设类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.buildType == 1">统推</span>
<span v-else>自建</span>
</template>
</el-table-column>
<el-table-column prop="prjName" label="项目名称" align="center" width="200" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="是否续建" align="center">
<template slot-scope="scope">
<span v-if="scope.row.prjPlanClass == 1"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="buildOrg" label="承建单位" align="center"></el-table-column>
<el-table-column prop="projectManager" label="项目经理" align="center"></el-table-column>
<el-table-column prop="createMan" label="创建人" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"
:current-page="pager3.current"
:page-sizes="pager3.sizes"
:page-size="pager3.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager3.total">
</el-pagination>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="dialogOperation('selectProject', null)">确定</el-button>
<el-button @click="dialogOperation('cancelSelectProject', null)">取消</el-button>
</span>
</el-dialog>
<el-dialog
title="选择项目"
:visible.sync="add_dialog3"
:center="false"
:close-on-click-modal="false"
width="80%"
>
<div class="search_menu" style="justify-content: center">
<div class="search_menu_item_container">
<div class="search_menu_item" style="width: auto">
<span class="search_title">单位</span>
<el-input
v-no-backslash
v-model="searchParams3.let1"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item" style="width: auto">
<span class="search_title">部门</span>
<el-input
v-no-backslash
v-model="searchParams3.let2"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item" style="width: auto">
<span class="search_title">系统名称</span>
<el-input
v-no-backslash
v-model="searchParams.let3"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item" style="width: auto">
<span class="search_title">建设类型</span>
<el-select
v-model="searchParams3.let4"
placeholder="请选择"
class="search_item"
>
<el-option
v-for="item in jianSheLeiXingSelect"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table3">
<img
class="btn_icon"
src="@/assets/archi-ele-list/search.png"
alt=""
/>
<p>查询</p>
</div>
<div class="reset_btn" @click="reset3">
<img
class="btn_icon"
src="@/assets/archi-ele-list/reset.png"
alt=""
/>
<p>重置</p>
</div>
</div>
</div>
<el-table
height="300"
v-loading="loading3"
@selection-change="select_table_row3"
:data="tableData3"
stripe
border
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
prop="manageOrgId"
label="单位"
align="center"
></el-table-column>
<el-table-column
prop="manageDeptId"
label="部门"
align="center"
></el-table-column>
<el-table-column
prop="appName"
label="系统名称"
align="center"
width="200"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="建设类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.buildType == 1">统推</span>
<span v-else>自建</span>
</template>
</el-table-column>
<el-table-column
prop="prjName"
label="项目名称"
align="center"
width="200"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="是否续建" align="center">
<template slot-scope="scope">
<span v-if="scope.row.prjPlanClass == 1"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column
prop="buildOrg"
label="承建单位"
align="center"
></el-table-column>
<el-table-column
prop="projectManager"
label="项目经理"
align="center"
></el-table-column>
<el-table-column
prop="createMan"
label="创建人"
align="center"
></el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
align="center"
></el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"
:current-page="pager3.current"
:page-sizes="pager3.sizes"
:page-size="pager3.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager3.total"
>
</el-pagination>
<span slot="footer" class="dialog-footer">
<el-button
class="greenButton"
@click="dialogOperation('selectProject', null)"
>确定</el-button
>
<el-button @click="dialogOperation('cancelSelectProject', null)"
>取消</el-button
>
</span>
</el-dialog>
<el-dialog
title="选择报告"
:visible.sync="add_dialog4"
:center="false"
:close-on-click-modal="false"
width="80%"
>
<span slot="footer" class="dialog-footer">
<el-button
class="greenButton"
@click="dialogOperation('selectReport', null)"
>确定</el-button
>
<el-button @click="dialogOperation('cancelSelectReport', null)"
>取消</el-button
>
</span>
</el-dialog>
<el-dialog
title='选择报告'
:visible.sync="add_dialog4"
:center="false"
:close-on-click-modal="false"
width="80%">
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="dialogOperation('selectReport', null)">确定</el-button>
<el-button @click="dialogOperation('cancelSelectReport', null)">取消</el-button>
</span>
</el-dialog>
</div>
<!-- 项目信息详情 -->
<ProjectDetail :row-data="rowData" :visible.sync="projectDetailVisible" />
</div>
</template>
<script>
import {
queryProjectInfoManageTable,
getDianXingAnLiSelectData,
editDeleteProjectInfoManageTable,
querysystemInfoManageTable,
addProjectManageTable
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
import ProjectDetail from '@/views/projectInfoManage/ProjectDetail'
import {
queryProjectInfoManageTable,
getDianXingAnLiSelectData,
editDeleteProjectInfoManageTable,
querysystemInfoManageTable,
addProjectManageTable,
} from '@/api/index.js'
import { MessageBox, Message } from 'element-ui'
import $ from 'jquery'
export default {
name: 'projectInfoManage',
components: {
},
data() {
return {
add_dialog2: false,
add_dialog3: false,
add_dialog4: false,
ruleForm: {
let1: null,
let2: null,
let3: null,
let4: null,
let5: null,
},
rules: {
let1: [
{ required: true, message: '请选择关联系统', trigger: 'blur' },
],
let2: [
{ required: true, message: '请输入项目名称', trigger: 'blur' },
],
let3: [
{ required: true, message: '请选择是否续建', trigger: 'change' },
],
},
add_dialog: false,
is_add_edit: 'add',
tableData: [],
loading: false,
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20 //总条数
},
tableHeight: null,
searchParams: {
let1: null,
let2: null,
let3: null,
let4: null,
},
searchParams2: {
let1: null,
let2: null,
let3: null,
let4: null,
},
searchParams3: {
let1: null,
let2: null,
let3: null,
let4: null,
},
jianSheLeiXingSelect: [],
tableData2: [],
loading2: false,
pager2: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20 //总条数
},
selectRow: [],
selectRow3: [],
tableData3: [],
loading3: false,
pager3: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20 //总条数
},
selectRo3: [],
tableData4: [
{ id: 1, tableLet1: '技术规范书', fileList: [], fileArray: [] },
{ id: 2, tableLet1: '可行性研究报告', fileList: [], fileArray: [] },
{ id: 3, tableLet1: '需求规格说明书', fileList: [], fileArray: [] },
{ id: 4, tableLet1: '概要设计说明书', fileList: [], fileArray: [] },
{ id: 5, tableLet1: '安全防护方案', fileList: [], fileArray: [] },
{ id: 5, tableLet1: '其他', fileList: [], fileArray: [] },
],
prjId: null,
};
},
mounted(){
window.addEventListener('resize', () => {
this.set_table_height();
})
this.set_table_height();
this.get_table();
this.getJianSheLeiXingSelect().then(res => {
this.jianSheLeiXingSelect = res;
})
},
methods: {
// 文件上传逻辑
handleRemove(file, fileList, row) {//文件移出
row.fileArray = [];
},
handleFileUploadSuccess(res, file, fileList, row) {//文件上传
row.fileArray = [{
fileName: file.name,
fileId: file.response.data.fileId,
fileUrl: file.response.data.viewUrl
}];
},
operation(type, data) {
switch(type){
case 'add':
this.addItem();
break;
case 'open_add_dialog2':
this.open_add_dialog2();
break;
case 'open_add_dialog3':
this.open_add_dialog3();
break;
case 'edit':
this.editItem(data);
break;
case 'delete':
this.deleteItem(data);
break;
}
},
dialogOperation(type, data) {
switch(type){
case 'save':
this.save_dialog();
break;
case 'selectSystem':
this.confirmSelectSystem();
break;
case 'cancelSelectSystem':
this.selectRow = [];
this.add_dialog2 = false;
break;
case 'selectProject':
this.confirmSelectProject();
break;
case 'cancelSelectProject':
this.selectRow3 = [];
this.add_dialog3 = false;
break;
}
},
confirmSelectSystem() {
if(this.selectRow.length == 0) {
Message({
type: 'error',
message: '请选择至少一条数据'
});
return;
}
if(this.selectRow.length > 1) {
Message({
type: 'error',
message: '只能选择一条数据'
});
return;
}
this.ruleForm.let1 = this.selectRow[0].appName;
this.add_dialog2 = false;
},
confirmSelectProject() {
if(this.selectRow3.length == 0) {
Message({
type: 'error',
message: '请选择至少一条数据'
});
return;
}
if(this.selectRow3.length > 1) {
Message({
type: 'error',
message: '只能选择一条数据'
});
return;
}
this.ruleForm.let4 = this.selectRow3[0].prjName;
this.add_dialog3 = false;
},
deleteItem(row) {//删除
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
prjId: row.prjId,
delFlag: 1
}
editDeleteProjectInfoManageTable(params).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '删除成功!'
});
}else{
Message({
type: 'error',
message: res.msg
});
}
});
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
},
addItem() {//新建项目
this.add_dialog = true;
this.is_add_edit = 'add';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.ruleForm.let1 = null;
this.ruleForm.let2 = null;
this.ruleForm.let3 = null;
this.ruleForm.let4 = null;
this.selectRow = [];
this.selectRow3 = [];
this.tableData4.forEach(item => {
item.fileList = [];
item.fileArray = [];
});
});
},
editItem(row) {//编辑
this.add_dialog = true;
this.is_add_edit = 'edit';
this.ruleForm.let1 = row.appName;
this.selectRow = [{
appCode: row.appCode,
appId: row.appId,
appName: row.appName,
buildOrg: row.buildOrg,
buildType: row.buildType,
manageDeptId: row.manageDeptId,
manageOrgId: row.manageOrgId,
}];
this.ruleForm.let2 = row.prjName;
this.ruleForm.let3 = row.prjPlanClass;
if(row.prjPlanClass == 2) {
this.selectRow3 = [{
agoPrjCode: row.agoPrjCode,
agoPrjId: row.agoPrjId,
agoPrjName: row.agoPrjName,
}]
this.ruleForm.let4 = row.prjName;
}
if(row.filesValue) {
let filesValue = JSON.parse(row.filesValue);
if(filesValue.length > 0) {
this.tableData4.forEach((item, index) => {
item.fileList = filesValue[index] ? [
{
name: filesValue[index].fileName,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
item.fileArray = filesValue[index] ? [
{
name: filesValue[index].fileName,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
});
}
console.log(this.tableData4)
}
this.prjId = row.prjId;
},
open_add_dialog2() {//打开选择系统窗口
this.add_dialog2 = true;
this.get_system_table();
},
open_add_dialog3() {//打开选择项目窗口
this.add_dialog3 = true;
this.get_table2();
},
search_table3() {//搜索
this.pager3.current = 1;
this.get_table2();
},
get_table2() {//查询表格数据
this.loading3 = true;
const params = {
"appId": this.selectRow.length > 0 ? this.selectRow[0].appId : null,
"manageOrgId": this.searchParams3.let1,
"manageDeptId": this.searchParams3.let2,
"appName": this.searchParams3.let3,
"buildType": this.searchParams3.let4,
"current": this.pager3.current,
"pageSize": this.pager3.size,
};
queryProjectInfoManageTable(params).then(res => {
if(res.code == 200) {
this.loading3 = false;
this.tableData3 = res.data.records;
this.pager3.current = res.data.current;
this.pager3.total = res.data.total;
this.pager3.size = res.data.size;
}
});
},
reset3() {//重置
this.searchParams3.let1 = null;
this.searchParams3.let2 = null;
this.searchParams3.let3 = null;
this.searchParams3.let4 = null;
},
// 每页条数改变
handleSizeChange3(val) {
this.pager3.current = 1;
this.pager3.size = val;
this.get_table2();
},
//当前页码改变
handleCurrentChange3(val) {
this.pager3.current = val;
this.get_table2();
},
select_table_row3(data){//表格的勾选
this.selectRow3 = data;
},
save_dialog() {//保存系统
this.$refs.form.validate(valid => {
if(valid) {
let agoPrjCode, agoPrjId, agoPrjName, appCode, appId, appName, buildOrg, buildType, manageDeptId, manageOrgId;
if(this.ruleForm.let3 == 2) {
if(this.selectRow3.length == 0) {
Message({
type: 'error',
message: '请选择前期项目!'
});
return;
}
}
if(this.selectRow3.length > 0) {
agoPrjCode = this.selectRow3[0].agoPrjCode;
agoPrjId = this.selectRow3[0].agoPrjId;
agoPrjName = this.selectRow3[0].agoPrjName;
}
appCode = this.selectRow[0].appCode;
appId = this.selectRow[0].appId;
appName = this.selectRow[0].appName;
buildOrg = this.selectRow[0].buildOrg;
buildType = this.selectRow[0].buildType;
manageDeptId = this.selectRow[0].manageDeptId;
manageOrgId = this.selectRow[0].manageOrgId;
let filesValue = [];
this.tableData4.forEach(item => {
if(item.fileArray.length > 0) {
filesValue.push({
busiFileName: item.tableLet1,
fileId: item.fileArray[0].fileId,
fileName: item.fileArray[0].fileName,
fileUrl: item.fileArray[0].fileUrl,
})
}
})
const params = {
agoPrjCode, agoPrjId, agoPrjName, appCode, appId, appName, buildOrg, buildType, manageDeptId, manageOrgId,
prjName: this.ruleForm.let2,
prjPlanClass: this.ruleForm.let3,
filesValue
}
const requestParams = this.is_add_edit == 'add' ? params : { ...params, prjId: this.prjId };
if(this.is_add_edit == 'add') {
addProjectManageTable(requestParams).then(res => {
if(res.code == 200) {
this.get_table();
this.add_dialog = false;
Message({
type: 'success',
message: '保存成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}else {
editDeleteProjectInfoManageTable(requestParams).then(res => {
if(res.code == 200) {
this.get_table();
this.add_dialog = false;
Message({
type: 'success',
message: '保存成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}
}else {
return false;
}
});
},
search_table2() {//搜索
this.pager2.current = 1;
this.get_system_table();
},
reset2() {//重置
this.searchParams2.let1 = null;
this.searchParams2.let2 = null;
this.searchParams2.let3 = null;
this.searchParams2.let4 = null;
},
// 每页条数改变
handleSizeChange2(val) {
this.pager2.current = 1;
this.pager2.size = val;
this.get_system_table();
},
//当前页码改变
handleCurrentChange2(val) {
this.pager2.current = val;
this.get_system_table();
},
select_table_rows(data){//表格的勾选
this.selectRow = data;
},
get_system_table() {//查询表格数据
this.loading2 = true;
const params = {
"manageOrgId": this.searchParams2.let1,
"manageDeptId": this.searchParams2.let2,
"appName": this.searchParams2.let3,
"buildType": this.searchParams2.let4,
"current": this.pager.current,
"pageSize": this.pager.size,
};
querysystemInfoManageTable(params).then(res => {
if(res.code == 200) {
this.loading2 = false;
this.tableData2 = res.data.records;
this.pager2.current = res.data.current;
this.pager2.total = res.data.total;
this.pager2.size = res.data.size;
}
// res.records.map(item => {
// const startTime_year = String(new Date(item.startTime).getFullYear());
// const startTime_month = String(new Date(item.startTime).getMonth() + 1);
// let startTime_day = String(new Date(item.startTime).getDay());
// startTime_day = startTime_day.length == 1 ? '0' + startTime_day : startTime_day;
name: 'projectInfoManage',
components: { ProjectDetail },
data() {
return {
add_dialog2: false,
add_dialog3: false,
add_dialog4: false,
ruleForm: {
let1: null,
let2: null,
let3: null,
let4: null,
let5: null,
},
rules: {
let1: [{ required: true, message: '请选择关联系统', trigger: 'blur' }],
let2: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
let3: [
{ required: true, message: '请选择是否续建', trigger: 'change' },
],
},
add_dialog: false,
is_add_edit: 'add',
tableData: [],
loading: false,
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20, //总条数
},
tableHeight: null,
searchParams: {
let1: null,
let2: null,
let3: null,
let4: null,
},
searchParams2: {
let1: null,
let2: null,
let3: null,
let4: null,
},
searchParams3: {
let1: null,
let2: null,
let3: null,
let4: null,
},
jianSheLeiXingSelect: [],
tableData2: [],
loading2: false,
pager2: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20, //总条数
},
selectRow: [],
selectRow3: [],
tableData3: [],
loading3: false,
pager3: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20, //总条数
},
selectRo3: [],
tableData4: [
{ id: 1, tableLet1: '技术规范书', fileList: [], fileArray: [] },
{ id: 2, tableLet1: '可行性研究报告', fileList: [], fileArray: [] },
{ id: 3, tableLet1: '需求规格说明书', fileList: [], fileArray: [] },
{ id: 4, tableLet1: '概要设计说明书', fileList: [], fileArray: [] },
{ id: 5, tableLet1: '安全防护方案', fileList: [], fileArray: [] },
{ id: 5, tableLet1: '其他', fileList: [], fileArray: [] },
],
prjId: null,
rowData: {},
projectDetailVisible: false,
}
},
mounted() {
window.addEventListener('resize', () => {
this.set_table_height()
})
this.set_table_height()
this.get_table()
this.getJianSheLeiXingSelect().then((res) => {
this.jianSheLeiXingSelect = res
})
},
methods: {
openDetail(row) {
this.rowData = row
this.projectDetailVisible = true
},
// 文件上传逻辑
handleRemove(file, fileList, row) {
//文件移出
row.fileArray = []
},
handleFileUploadSuccess(res, file, fileList, row) {
//文件上传
row.fileArray = [
{
fileName: file.name,
fileId: file.response.data.fileId,
fileUrl: file.response.data.viewUrl,
},
]
},
operation(type, data) {
switch (type) {
case 'add':
this.addItem()
break
case 'open_add_dialog2':
this.open_add_dialog2()
break
case 'open_add_dialog3':
this.open_add_dialog3()
break
case 'edit':
this.editItem(data)
break
case 'delete':
this.deleteItem(data)
break
}
},
dialogOperation(type, data) {
switch (type) {
case 'save':
this.save_dialog()
break
case 'selectSystem':
this.confirmSelectSystem()
break
case 'cancelSelectSystem':
this.selectRow = []
this.add_dialog2 = false
break
case 'selectProject':
this.confirmSelectProject()
break
case 'cancelSelectProject':
this.selectRow3 = []
this.add_dialog3 = false
break
}
},
confirmSelectSystem() {
if (this.selectRow.length == 0) {
Message({
type: 'error',
message: '请选择至少一条数据',
})
return
}
if (this.selectRow.length > 1) {
Message({
type: 'error',
message: '只能选择一条数据',
})
return
}
this.ruleForm.let1 = this.selectRow[0].appName
this.add_dialog2 = false
},
confirmSelectProject() {
if (this.selectRow3.length == 0) {
Message({
type: 'error',
message: '请选择至少一条数据',
})
return
}
if (this.selectRow3.length > 1) {
Message({
type: 'error',
message: '只能选择一条数据',
})
return
}
this.ruleForm.let4 = this.selectRow3[0].prjName
this.add_dialog3 = false
},
deleteItem(row) {
//删除
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning',
})
.then(() => {
const params = {
prjId: row.prjId,
delFlag: 1,
}
editDeleteProjectInfoManageTable(params).then((res) => {
if (res.code == 200) {
this.get_table()
Message({
type: 'success',
message: '删除成功!',
})
} else {
Message({
type: 'error',
message: res.msg,
})
}
})
})
.catch(() => {
Message({
type: 'info',
message: '已取消',
})
})
},
addItem() {
//新建项目
this.add_dialog = true
this.is_add_edit = 'add'
this.$nextTick(() => {
this.$refs.form.resetFields()
this.ruleForm.let1 = null
this.ruleForm.let2 = null
this.ruleForm.let3 = null
this.ruleForm.let4 = null
this.selectRow = []
this.selectRow3 = []
this.tableData4.forEach((item) => {
item.fileList = []
item.fileArray = []
})
})
},
editItem(row) {
//编辑
this.add_dialog = true
this.is_add_edit = 'edit'
this.ruleForm.let1 = row.appName
this.selectRow = [
{
appCode: row.appCode,
appId: row.appId,
appName: row.appName,
buildOrg: row.buildOrg,
buildType: row.buildType,
manageDeptId: row.manageDeptId,
manageOrgId: row.manageOrgId,
},
]
this.ruleForm.let2 = row.prjName
this.ruleForm.let3 = row.prjPlanClass
if (row.prjPlanClass == 2) {
this.selectRow3 = [
{
agoPrjCode: row.agoPrjCode,
agoPrjId: row.agoPrjId,
agoPrjName: row.agoPrjName,
},
]
this.ruleForm.let4 = row.prjName
}
if (row.filesValue) {
let filesValue = JSON.parse(row.filesValue)
// item['startTime_'] = startTime_year + '-' + startTime_month + '-' + startTime_day;
// });
// this.getJianSheLeiXingSelect().then(res2 => {
// res.records.map(item3 => {
// let result1 = res2.find(item2 => item2.value == item3.conformCount);
// item3['conformCount_'] = result1 ? result1.label : '';
// });
// this.tableData = res.records;
// })
// this.tableData = res.records;
// this.pager.current = res.current;
// this.pager.total = res.total;
// this.pager.size = res.size;
});
},
getJianSheLeiXingSelect() {//建设类型下拉
const params = {
key: "build_type"
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then(res => {
if(res.code == 200) {
resolve(res.data);
}
})
})
},
set_table_height() {//动态设置表格高度
const table_container_height = $(".table_container").height();
const search_menu_height = $(".search_menu").height();
const search_btn_height = $(".search_btn").outerHeight(true);
this.tableHeight = table_container_height - search_menu_height - search_btn_height - 90 + 'px';
},
search_table() {//搜索
this.pager.current = 1;
this.get_table();
},
reset() {//重置
this.searchParams.let1 = null;
this.searchParams.let2 = null;
this.searchParams.let3 = null;
this.searchParams.let4 = null;
},
// 每页条数改变
handleSizeChange(val) {
this.pager.current = 1;
this.pager.size = val;
this.get_table();
},
//当前页码改变
handleCurrentChange(val) {
this.pager.current = val;
this.get_table();
},
get_table() {//查询表格数据
this.loading = true;
const params = {
"manageOrgId": this.searchParams.let1,
"manageDeptId": this.searchParams.let2,
"prjName": this.searchParams.let3,
"buildType": this.searchParams.let4,
"current": this.pager.current,
"pageSize": this.pager.size,
};
queryProjectInfoManageTable(params).then(res => {
if(res.code == 200) {
this.loading = false;
this.tableData = res.data.records;
this.pager.current = res.data.current;
this.pager.total = res.data.total;
this.pager.size = res.data.size;
}
// res.records.map(item => {
// const startTime_year = String(new Date(item.startTime).getFullYear());
// const startTime_month = String(new Date(item.startTime).getMonth() + 1);
// let startTime_day = String(new Date(item.startTime).getDay());
// startTime_day = startTime_day.length == 1 ? '0' + startTime_day : startTime_day;
if (filesValue.length > 0) {
this.tableData4.forEach((item, index) => {
item.fileList = filesValue[index]
? [
{
name: filesValue[index].fileName,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
},
]
: []
item.fileArray = filesValue[index]
? [
{
name: filesValue[index].fileName,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
},
]
: []
})
}
console.log(this.tableData4)
}
this.prjId = row.prjId
},
open_add_dialog2() {
//打开选择系统窗口
this.add_dialog2 = true
this.get_system_table()
},
open_add_dialog3() {
//打开选择项目窗口
this.add_dialog3 = true
this.get_table2()
},
search_table3() {
//搜索
this.pager3.current = 1
this.get_table2()
},
get_table2() {
//查询表格数据
this.loading3 = true
const params = {
appId: this.selectRow.length > 0 ? this.selectRow[0].appId : null,
manageOrgId: this.searchParams3.let1,
manageDeptId: this.searchParams3.let2,
appName: this.searchParams3.let3,
buildType: this.searchParams3.let4,
current: this.pager3.current,
pageSize: this.pager3.size,
}
queryProjectInfoManageTable(params).then((res) => {
if (res.code == 200) {
this.loading3 = false
this.tableData3 = res.data.records
this.pager3.current = res.data.current
this.pager3.total = res.data.total
this.pager3.size = res.data.size
}
})
},
reset3() {
//重置
this.searchParams3.let1 = null
this.searchParams3.let2 = null
this.searchParams3.let3 = null
this.searchParams3.let4 = null
},
// 每页条数改变
handleSizeChange3(val) {
this.pager3.current = 1
this.pager3.size = val
this.get_table2()
},
//当前页码改变
handleCurrentChange3(val) {
this.pager3.current = val
this.get_table2()
},
select_table_row3(data) {
//表格的勾选
this.selectRow3 = data
},
save_dialog() {
//保存系统
this.$refs.form.validate((valid) => {
if (valid) {
let agoPrjCode,
agoPrjId,
agoPrjName,
appCode,
appId,
appName,
buildOrg,
buildType,
manageDeptId,
manageOrgId
if (this.ruleForm.let3 == 2) {
if (this.selectRow3.length == 0) {
Message({
type: 'error',
message: '请选择前期项目!',
})
return
}
}
if (this.selectRow3.length > 0) {
agoPrjCode = this.selectRow3[0].agoPrjCode
agoPrjId = this.selectRow3[0].agoPrjId
agoPrjName = this.selectRow3[0].agoPrjName
}
appCode = this.selectRow[0].appCode
appId = this.selectRow[0].appId
appName = this.selectRow[0].appName
buildOrg = this.selectRow[0].buildOrg
buildType = this.selectRow[0].buildType
manageDeptId = this.selectRow[0].manageDeptId
manageOrgId = this.selectRow[0].manageOrgId
let filesValue = []
this.tableData4.forEach((item) => {
if (item.fileArray.length > 0) {
filesValue.push({
busiFileName: item.tableLet1,
fileId: item.fileArray[0].fileId,
fileName: item.fileArray[0].fileName,
fileUrl: item.fileArray[0].fileUrl,
})
}
})
const params = {
agoPrjCode,
agoPrjId,
agoPrjName,
appCode,
appId,
appName,
buildOrg,
buildType,
manageDeptId,
manageOrgId,
prjName: this.ruleForm.let2,
prjPlanClass: this.ruleForm.let3,
filesValue,
}
const requestParams =
this.is_add_edit == 'add'
? params
: { ...params, prjId: this.prjId }
if (this.is_add_edit == 'add') {
addProjectManageTable(requestParams).then((res) => {
if (res.code == 200) {
this.get_table()
this.add_dialog = false
Message({
type: 'success',
message: '保存成功!',
})
} else {
Message({
type: 'error',
message: res.msg,
})
}
})
} else {
editDeleteProjectInfoManageTable(requestParams).then((res) => {
if (res.code == 200) {
this.get_table()
this.add_dialog = false
Message({
type: 'success',
message: '保存成功!',
})
} else {
Message({
type: 'error',
message: res.msg,
})
}
})
}
} else {
return false
}
})
},
search_table2() {
//搜索
this.pager2.current = 1
this.get_system_table()
},
reset2() {
//重置
this.searchParams2.let1 = null
this.searchParams2.let2 = null
this.searchParams2.let3 = null
this.searchParams2.let4 = null
},
// 每页条数改变
handleSizeChange2(val) {
this.pager2.current = 1
this.pager2.size = val
this.get_system_table()
},
//当前页码改变
handleCurrentChange2(val) {
this.pager2.current = val
this.get_system_table()
},
select_table_rows(data) {
//表格的勾选
this.selectRow = data
},
get_system_table() {
//查询表格数据
this.loading2 = true
const params = {
manageOrgId: this.searchParams2.let1,
manageDeptId: this.searchParams2.let2,
appName: this.searchParams2.let3,
buildType: this.searchParams2.let4,
current: this.pager.current,
pageSize: this.pager.size,
}
querysystemInfoManageTable(params).then((res) => {
if (res.code == 200) {
this.loading2 = false
this.tableData2 = res.data.records
this.pager2.current = res.data.current
this.pager2.total = res.data.total
this.pager2.size = res.data.size
}
// res.records.map(item => {
// const startTime_year = String(new Date(item.startTime).getFullYear());
// const startTime_month = String(new Date(item.startTime).getMonth() + 1);
// let startTime_day = String(new Date(item.startTime).getDay());
// startTime_day = startTime_day.length == 1 ? '0' + startTime_day : startTime_day;
// item['startTime_'] = startTime_year + '-' + startTime_month + '-' + startTime_day;
// });
// this.getJianSheLeiXingSelect().then(res2 => {
// res.records.map(item3 => {
// let result1 = res2.find(item2 => item2.value == item3.conformCount);
// item3['conformCount_'] = result1 ? result1.label : '';
// });
// this.tableData = res.records;
// })
// this.tableData = res.records;
// this.pager.current = res.current;
// this.pager.total = res.total;
// this.pager.size = res.size;
// item['startTime_'] = startTime_year + '-' + startTime_month + '-' + startTime_day;
// });
// this.getJianSheLeiXingSelect().then(res2 => {
// res.records.map(item3 => {
// let result1 = res2.find(item2 => item2.value == item3.conformCount);
// item3['conformCount_'] = result1 ? result1.label : '';
// });
// this.tableData = res.records;
// })
// this.tableData = res.records;
// this.pager.current = res.current;
// this.pager.total = res.total;
// this.pager.size = res.size;
})
},
getJianSheLeiXingSelect() {
//建设类型下拉
const params = {
key: 'build_type',
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
}
})
})
},
set_table_height() {
//动态设置表格高度
const table_container_height = $('.table_container').height()
const search_menu_height = $('.search_menu').height()
const search_btn_height = $('.search_btn').outerHeight(true)
this.tableHeight =
table_container_height -
search_menu_height -
search_btn_height -
90 +
'px'
},
search_table() {
//搜索
this.pager.current = 1
this.get_table()
},
reset() {
//重置
this.searchParams.let1 = null
this.searchParams.let2 = null
this.searchParams.let3 = null
this.searchParams.let4 = null
},
// 每页条数改变
handleSizeChange(val) {
this.pager.current = 1
this.pager.size = val
this.get_table()
},
//当前页码改变
handleCurrentChange(val) {
this.pager.current = val
this.get_table()
},
get_table() {
//查询表格数据
this.loading = true
const params = {
manageOrgId: this.searchParams.let1,
manageDeptId: this.searchParams.let2,
prjName: this.searchParams.let3,
buildType: this.searchParams.let4,
current: this.pager.current,
pageSize: this.pager.size,
}
queryProjectInfoManageTable(params).then((res) => {
if (res.code == 200) {
this.loading = false
this.tableData = res.data.records
this.pager.current = res.data.current
this.pager.total = res.data.total
this.pager.size = res.data.size
}
// res.records.map(item => {
// const startTime_year = String(new Date(item.startTime).getFullYear());
// const startTime_month = String(new Date(item.startTime).getMonth() + 1);
// let startTime_day = String(new Date(item.startTime).getDay());
// startTime_day = startTime_day.length == 1 ? '0' + startTime_day : startTime_day;
// item['startTime_'] = startTime_year + '-' + startTime_month + '-' + startTime_day;
// });
// this.getJianSheLeiXingSelect().then(res2 => {
// res.records.map(item3 => {
// let result1 = res2.find(item2 => item2.value == item3.conformCount);
// item3['conformCount_'] = result1 ? result1.label : '';
// });
// this.tableData = res.records;
// })
// this.tableData = res.records;
// this.pager.current = res.current;
// this.pager.total = res.total;
// this.pager.size = res.size;
// if(res.code == 200) {
// this.loading = false;
// console.log(res)
// // this.tableData = res.
// }
});
},
}
// if(res.code == 200) {
// this.loading = false;
// console.log(res)
// // this.tableData = res.
// }
})
},
},
}
</script>
<style>
.confirmClass{
background-color: #0D867F !important;
}
.el-message-box__content{
padding: 60px 15px 60px 15px;
}
.confirmClass {
background-color: #0d867f !important;
}
.el-message-box__content {
padding: 60px 15px 60px 15px;
}
</style>
<style scoped lang="scss">
@import '@/styles/elementui.scss';
.prjName {
color: $color-primary;
cursor: pointer;
}
.version_btn {
display: flex;
align-items: center;
justify-content: center;
width: 84px;
height: 32px;
background: rgba(13, 134, 127, 0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0d867f;
cursor: pointer;
margin-left: 15px;
}
.cancel_version_btn {
display: flex;
align-items: center;
justify-content: center;
width: 104px;
height: 32px;
background: rgba(13, 134, 127, 0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0d867f;
cursor: pointer;
margin-left: 15px;
}
.projectInfoManage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.el-button--primary {
background: rgba(13, 134, 127, 0.1);
color: #0d867f;
border: 0;
}
/deep/ .el-input-group__append {
background-color: #0d867f;
color: #fff;
cursor: pointer;
}
.search_btn {
width: 100%;
display: flex;
margin-top: 50px;
margin-bottom: 20px;
}
.search_menu {
display: flex;
justify-content: space-between;
margin-bottom: 50px;
}
.search_menu_item_container {
display: flex;
align-items: center;
}
.shanChu_btn {
color: #dd6a15;
background-color: #f8ebe2;
}
.search_menu_btn_container {
display: flex;
align-items: center;
}
.search_menu_item {
display: flex;
align-items: center;
width: 344px;
}
.search_title {
/* width: 20%; */
flex-shrink: 0;
margin-right: 15px;
}
.search_item {
width: 60%;
}
.query_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13, 134, 127, 1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0d867f;
font-size: 14px;
color: #fff;
margin-right: 10px;
cursor: pointer;
}
.reset_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(244, 244, 244, 1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #ccc;
font-size: 14px;
color: #666;
cursor: pointer;
}
.btn_icon {
margin-right: 10px;
}
.table_container {
width: 97%;
height: calc(100% - 40px);
margin-top: 20px;
}
.el-pagination {
margin-top: 30px;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #0d867f;
}
/deep/ .el-dialog__header {
background-color: #0d867f;
text-align: left;
}
/deep/ .el-dialog__title {
color: #fff;
}
/deep/ .el-dialog__close {
color: #fff;
}
.greenButton {
background-color: #0d867f;
color: #fff;
}
.el-form-item {
display: flex;
align-items: center;
width: 50%;
}
</style>
<style scoped>
.version_btn{
display: flex;
align-items: center;
justify-content: center;
width: 84px;
height: 32px;
background: rgba(13,134,127,0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0D867F;
cursor: pointer;
margin-left: 15px;
}
.cancel_version_btn{
display: flex;
align-items: center;
justify-content: center;
width: 104px;
height: 32px;
background: rgba(13,134,127,0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0D867F;
cursor: pointer;
margin-left: 15px;
}
.projectInfoManage{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.el-button--primary{
background: rgba(13,134,127,0.1);
color: #0D867F;
border: 0;
}
/deep/ .el-input-group__append{
background-color: #0D867F;
color: #fff;
cursor: pointer;
}
.search_btn{
width: 100%;
display: flex;
margin-top: 50px;
margin-bottom: 20px;
}
.search_menu{
display: flex;
justify-content: space-between;
margin-bottom: 50px;
}
.search_menu_item_container{
display: flex;
align-items: center;
}
.shanChu_btn{
color: #DD6A15;
background-color: #F8EBE2;
}
.search_menu_btn_container{
display: flex;
align-items: center;
}
.search_menu_item{
display: flex;
align-items: center;
width: 344px;
}
.search_title{
/* width: 20%; */
flex-shrink: 0;
margin-right: 15px;
}
.search_item{
width: 60%;
}
.query_btn{
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13,134,127,1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0D867F;
font-size: 14px;
color: #fff;
margin-right: 10px;
cursor: pointer;
}
.reset_btn{
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(244,244,244,1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #ccc;
font-size: 14px;
color: #666;
cursor: pointer;
}
.btn_icon{
margin-right: 10px;
}
.table_container{
width: 97%;
height: calc(100% - 40px);
margin-top: 20px;
}
.el-pagination{
margin-top: 30px;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active{
background-color: #0D867F;
}
/deep/ .el-dialog__header{
background-color: #0D867F;
text-align: left;
}
/deep/ .el-dialog__title{
color: #fff;
}
/deep/ .el-dialog__close {
color: #fff;
}
.greenButton{
background-color: #0D867F;
color: #fff;
}
.el-form-item{
display: flex;
align-items: center;
width: 50%;
}
</style>
\ No newline at end of file
......@@ -137,6 +137,7 @@ export default {
},
created() {
this.getDetail()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
......
......@@ -136,6 +136,7 @@ export default {
},
created() {
this.getDetail()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
......
......@@ -128,6 +128,7 @@ export default {
},
created() {
this.getDetail()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
......
......@@ -128,6 +128,7 @@ export default {
},
created() {
this.getDetail()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
......
......@@ -127,6 +127,7 @@ export default {
},
created() {
this.getDetail()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
......
......@@ -137,6 +137,7 @@ export default {
},
created() {
this.getDetail()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
......
......@@ -3,8 +3,18 @@
<div class="content flex">
<div class="left_container m-r-10 flex-column">
<div class="left_container_title">
<i class="el-icon-caret-right icon"></i>
<span>评审标准</span>
<div class="flex">
<i class="el-icon-caret-right icon"></i>
<span>评审标准</span>
</div>
<el-select class="select-title" v-model="leftSelect">
<el-option
v-for="(item, idx) in leftSelectData"
:label="item.fileName"
:value="item.fileId"
:key="idx"
></el-option>
</el-select>
</div>
<div class="left_container_content w-100 h-100 flex-1">
<vab-only-office
......@@ -20,9 +30,9 @@
<i class="el-icon-caret-right icon"></i>
<span>评审内容</span>
</div>
<el-select class="select-title" v-model="select">
<!-- <el-select class="select-title" v-model="select">
<el-option label="概要设计说明书.doc" value="1"></el-option>
</el-select>
</el-select> -->
</div>
<div class="right_container_content w-100 h-100 flex-1">
<vab-only-office
......@@ -68,7 +78,11 @@
<script>
import vabOnlyOffice from '@/components/onlyOffice/index.vue'
import { savePrelDesInspecte, detailPrelDesInspecte } from '@/api/index.js'
import {
savePrelDesInspecte,
detailPrelDesInspecte,
queryPrjNeedFile,
} from '@/api/index.js'
import { documentServerUrl, documentServerUrl2 } from '@/config'
import { EADC_SHARED_ABILITY } from '@/config/micromodule'
export default {
......@@ -130,13 +144,32 @@ export default {
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
},
leftSelectData: [],
}
},
created() {
this.row = JSON.parse(this.$route.query.row)
this.getDetail()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
fnQueryPrjNeedFile() {
const params = {
busiFileNameList: ['可行性研究报告', '需求规格说明书'],
busiId: this.row.prjId,
busiIdType: 1,
}
queryPrjNeedFile(params).then((res) => {
if (res.code === 200) {
this.leftSelectData = res.data
if (this.leftSelectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${this.leftSelectData[0].fileId}`
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${this.leftSelectData[0].fileId}`
}
}
})
},
getDetail() {
const params = {
reviewEnum: 'CONFORMANCE_REVIEW',
......
......@@ -58,7 +58,11 @@
<script>
import vabOnlyOffice from '@/components/onlyOffice/index.vue'
import { savePrelDesInspecte, detailPrelDesInspecte } from '@/api/index.js'
import {
savePrelDesInspecte,
detailPrelDesInspecte,
queryPrjNeedFile,
} from '@/api/index.js'
import { documentServerUrl, documentServerUrl2 } from '@/config'
import { EADC_SHARED_ABILITY } from '@/config/micromodule'
export default {
......@@ -110,13 +114,32 @@ export default {
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
},
leftSelectData: [],
}
},
created() {
this.row = JSON.parse(this.$route.query.row)
this.getDetail()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
fnQueryPrjNeedFile() {
const params = {
busiFileNameList: ['可行性研究报告', '需求规格说明书'],
busiId: this.row.prjId,
busiIdType: 1,
}
queryPrjNeedFile(params).then((res) => {
if (res.code === 200) {
this.leftSelectData = res.data
if (this.leftSelectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${this.leftSelectData[0].fileId}`
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${this.leftSelectData[0].fileId}`
}
}
})
},
getDetail() {
const params = {
reviewEnum: 'FUNCTIONAL_DEPTH_REVIEW',
......
......@@ -58,6 +58,7 @@ import {
savePrelDesInspecte,
detailPrelDesInspecte,
qViewPrelDesInspecte,
queryPrjNeedFile,
} from '@/api/index.js'
import { documentServerUrl, documentServerUrl2 } from '@/config'
import { EADC_SHARED_ABILITY } from '@/config/micromodule'
......@@ -111,17 +112,36 @@ export default {
},
},
rightImgs: [],
leftSelectData: [],
}
},
created() {
this.row = JSON.parse(this.$route.query.row)
this.getDetail()
this.getRightQview()
this.fnQueryPrjNeedFile()
},
methods: {
// 获取下拉文档内容
fnQueryPrjNeedFile() {
const params = {
busiFileNameList: ['可行性研究报告', '需求规格说明书'],
busiId: this.row.prjId,
busiIdType: 1,
}
queryPrjNeedFile(params).then((res) => {
if (res.code === 200) {
this.leftSelectData = res.data
if (this.leftSelectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${this.leftSelectData[0].fileId}`
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${this.leftSelectData[0].fileId}`
}
}
})
},
getRightQview() {
const params = {
archiBelongId: 1,
archiBelongId: 3,
archiStage: 3,
reviewEnum: 'DATA_DEPTH_REVIEW',
prjId: this.row.prjId,
......
<template>
<div class="systemInfoManage">
<div class="table_container">
<div class="search_menu">
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">单位</span>
<el-input v-no-backslash v-model="searchParams.let1" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">部门</span>
<el-input v-no-backslash v-model="searchParams.let2" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">系统名称</span>
<el-input v-no-backslash v-model="searchParams.let3" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">建设类型</span>
<el-select v-model="searchParams.let4" placeholder="请选择" class="search_item">
<el-option v-for="item in jianSheLeiXingSelect" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table">
<img class="btn_icon" src="@/assets/archi-ele-list/search.png" alt="" />
<p>查询</p>
</div>
<div class="reset_btn" @click="reset">
<img class="btn_icon" src="@/assets/archi-ele-list/reset.png" alt="" />
<p>重置</p>
</div>
</div>
</div>
<div class="search_btn">
<el-button type="primary" size="medium" icon="el-icon-document-add" @click="operation('add', null)">新建系统</el-button>
<!-- <el-button type="primary" size="medium" icon="el-icon-document-add" @click="operation('add', 2)">新建自建系统</el-button> -->
<!-- <el-button type="primary" size="medium" icon="el-icon-delete">删除</el-button> -->
</div>
<el-table :height="tableHeight" v-loading="loading" :data="tableData" stripe border>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="manageOrgId" label="单位" align="center"></el-table-column>
<el-table-column prop="manageDeptId" label="部门" align="center"></el-table-column>
<el-table-column prop="appName" label="系统名称" align="center" width="200" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="建设类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.buildType == 1">统推</span>
<span v-else-if="scope.row.buildType == 2">自建</span>
</template>
</el-table-column>
<el-table-column prop="buildOrg" label="承建单位" align="center"></el-table-column>
<el-table-column prop="projectManager" label="项目经理" align="center"></el-table-column>
<el-table-column prop="createMan" label="创建人" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="260" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" type="primary" size="mini" @click="operation('edit', scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button class="shanChu_btn" icon="el-icon-delete" size="mini" @click="operation('delete', scope.row)" :disabled="scope.row.state == 1">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
<!-- <el-pagination
<div class="systemInfoManage">
<div class="table_container">
<div class="search_menu">
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">单位</span>
<!-- <el-input
v-no-backslash
v-model="searchParams.let1"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input> -->
<el-select
v-model="searchParams.let1"
placeholder="请选择"
class="search_item"
>
<el-option
v-for="item in sysOrgOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="search_menu_item">
<span class="search_title">部门</span>
<!-- <el-input
v-no-backslash
v-model="searchParams.let2"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input> -->
<el-select
v-model="searchParams.let2"
placeholder="请选择"
class="search_item"
>
<el-option
v-for="item in sysDeptOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="search_menu_item">
<span class="search_title">系统名称</span>
<el-input
v-no-backslash
v-model="searchParams.let3"
maxlength="100"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">建设类型</span>
<el-select
v-model="searchParams.let4"
placeholder="请选择"
class="search_item"
>
<el-option
v-for="item in jianSheLeiXingSelect"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table">
<img
class="btn_icon"
src="@/assets/archi-ele-list/search.png"
alt=""
/>
<p>查询</p>
</div>
<div class="reset_btn" @click="reset">
<img
class="btn_icon"
src="@/assets/archi-ele-list/reset.png"
alt=""
/>
<p>重置</p>
</div>
</div>
</div>
<div class="search_btn">
<el-button
type="primary"
size="medium"
icon="el-icon-document-add"
@click="operation('add', null)"
>新建系统</el-button
>
<!-- <el-button type="primary" size="medium" icon="el-icon-document-add" @click="operation('add', 2)">新建自建系统</el-button> -->
<!-- <el-button type="primary" size="medium" icon="el-icon-delete">删除</el-button> -->
</div>
<el-table
:height="tableHeight"
v-loading="loading"
:data="tableData"
stripe
border
>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
prop="manageOrgId"
label="单位"
align="center"
></el-table-column>
<el-table-column
prop="manageDeptId"
label="部门"
align="center"
></el-table-column>
<el-table-column
prop="appName"
label="系统名称"
align="center"
width="200"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="建设类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.buildType == 1">统推</span>
<span v-else-if="scope.row.buildType == 2">自建</span>
</template>
</el-table-column>
<el-table-column
prop="buildOrg"
label="承建单位"
align="center"
></el-table-column>
<el-table-column
prop="projectManager"
label="项目经理"
align="center"
></el-table-column>
<el-table-column
prop="createMan"
label="创建人"
align="center"
></el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
align="center"
></el-table-column>
<el-table-column label="操作" width="260" align="center">
<template slot-scope="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<el-button
icon="el-icon-edit"
type="primary"
size="mini"
@click="operation('edit', scope.row)"
:disabled="scope.row.state == 1"
>编辑</el-button
>
<el-button
class="shanChu_btn"
icon="el-icon-delete"
size="mini"
@click="operation('delete', scope.row)"
:disabled="scope.row.state == 1"
>删除</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<!-- <el-pagination
background
layout="prev, pager, next"
:total="50">
</el-pagination> -->
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="pager.sizes"
:page-size="pager.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager.total">
</el-pagination>
</div>
<el-dialog
:title="dialogTitle"
:visible.sync="add_dialog"
:center="false"
:close-on-click-modal="false"
width="60%">
<el-form :model="ruleForm" ref="form" :rules="rules" style="display: flex;flex-wrap: wrap;">
<el-form-item label="单位:" prop="let1">
<el-input v-no-backslash v-model="ruleForm.let1" maxlength="100"></el-input>
</el-form-item>
<el-form-item label="部门:" prop="let2">
<el-input v-no-backslash v-model="ruleForm.let2" maxlength="100"></el-input>
</el-form-item>
<el-form-item label="系统名称:" prop="let3">
<el-input v-no-backslash v-model="ruleForm.let3" maxlength="100"></el-input>
</el-form-item>
<el-form-item label="系统类型:" prop="let4">
<el-select clearable v-model="ruleForm.let4">
<el-option label="统推" :value="1"></el-option>
<el-option label="自建" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="承建单位:" prop="let5">
<el-input v-no-backslash v-model="ruleForm.let5" maxlength="100"></el-input>
</el-form-item>
<el-form-item label="项目经理:" prop="let6">
<el-input v-no-backslash v-model="ruleForm.let6" maxlength="100"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="dialogOperation('save', null)">保存</el-button>
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
</div>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="pager.sizes"
:page-size="pager.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager.total"
>
</el-pagination>
</div>
<el-dialog
:title="dialogTitle"
:visible.sync="add_dialog"
:center="false"
:close-on-click-modal="false"
width="60%"
>
<el-form
:model="ruleForm"
ref="form"
:rules="rules"
style="display: flex; flex-wrap: wrap"
>
<el-form-item label="单位:" prop="let1">
<!-- <el-input
v-no-backslash
v-model="ruleForm.let1"
maxlength="100"
></el-input> -->
<el-select v-model="ruleForm.let1" placeholder="请选择">
<el-option
v-for="item in sysOrgOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="部门:" prop="let2">
<!-- <el-input
v-no-backslash
v-model="ruleForm.let2"
maxlength="100"
></el-input> -->
<el-select v-model="ruleForm.let2" placeholder="请选择">
<el-option
v-for="item in sysDeptOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="系统名称:" prop="let3">
<el-input
v-no-backslash
v-model="ruleForm.let3"
maxlength="100"
></el-input>
</el-form-item>
<el-form-item label="系统类型:" prop="let4">
<el-select clearable v-model="ruleForm.let4">
<el-option label="统推" :value="1"></el-option>
<el-option label="自建" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="承建单位:" prop="let5">
<!-- <el-input
v-no-backslash
v-model="ruleForm.let5"
maxlength="100"
></el-input> -->
<el-select v-model="ruleForm.let5" placeholder="请选择">
<el-option
v-for="item in sysBuildOrgOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="项目经理:" prop="let6">
<el-input
v-no-backslash
v-model="ruleForm.let6"
maxlength="100"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="dialogOperation('save', null)"
>保存</el-button
>
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
querysystemInfoManageTable,
getDianXingAnLiSelectData,
addasystemInfoManageTable,
editDeleteSystemInfoManageTable
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
import {
querysystemInfoManageTable,
getDianXingAnLiSelectData,
addasystemInfoManageTable,
editDeleteSystemInfoManageTable,
} from '@/api/index.js'
import { MessageBox, Message } from 'element-ui'
import $ from 'jquery'
export default {
name: 'systemInfoManage',
components: {
},
data() {
return {
ruleForm: {
let1: null,
let2: null,
let3: null,
let4: null,
let5: null,
let6: null,
},
rules: {
let1: [
{ required: true, message: '请选择单位', trigger: 'change' },
],
let2: [
{ required: true, message: '请选择部门', trigger: 'change' },
],
let3: [
{ required: true, message: '请输入系统名称', trigger: 'blur' },
],
let4: [
{ required: true, message: '请选择系统类型', trigger: 'change' },
],
},
add_dialog: false,
dialogTitle: null,
tableData: [],
loading: false,
search_select1: [],
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20 //总条数
},
tableHeight: null,
searchParams: {
let1: null,
let2: null,
let3: null,
let4: null,
},
jianSheLeiXingSelect: [],
appId: null,
};
},
mounted(){
window.addEventListener('resize', () => {
this.set_table_height();
})
this.set_table_height();
this.get_table();
this.getJianSheLeiXingSelect().then(res => {
this.jianSheLeiXingSelect = res;
})
},
methods: {
operation(type, data) {
switch(type){
case 'add':
this.openAddDialog();
this.dialogTitle = '新建系统';
break;
case 'edit':
this.editItem(data);
break;
case 'delete':
this.deleteItem(data);
break;
case 7680:
break;
case 11200:
break;
}
},
editItem(row) {//编辑
this.add_dialog = true;
this.dialogTitle = '编辑系统';
this.ruleForm.let1 = row.manageOrgId;
this.ruleForm.let2 = row.manageDeptId;
this.ruleForm.let3 = row.appName;
this.ruleForm.let4 = row.buildType;
this.ruleForm.let5 = row.buildOrg;
this.ruleForm.let6 = row.projectManager;
this.appId = row.appId;
this.$nextTick(() => {
this.$refs.form.clearValidate();
});
},
deleteItem(row) {//删除
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
appId: row.appId,
delFlag: 1
}
editDeleteSystemInfoManageTable(params).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '删除成功!'
});
}else{
Message({
type: 'error',
message: res.msg
});
}
});
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
},
openAddDialog() {//打开新建系统窗口
this.add_dialog = true;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.ruleForm.let1 = null;
this.ruleForm.let2 = null;
this.ruleForm.let3 = null;
this.ruleForm.let4 = null;
this.ruleForm.let5 = null;
this.ruleForm.let6 = null;
});
},
dialogOperation(type, data) {
switch(type){
case 'save':
this.save_dialog();
break;
case 3200:
break;
case 3840:
break;
case 7680:
break;
case 11200:
break;
}
},
save_dialog() {//保存
this.$refs.form.validate(valid => {
if(valid) {
const params = {
manageOrgId: this.ruleForm.let1,
manageDeptId: this.ruleForm.let2,
appName: this.ruleForm.let3,
buildType: this.ruleForm.let4,
buildOrg: this.ruleForm.let5,
projectManager: this.ruleForm.let6,
};
const requestParams = this.dialogTitle == '新建系统' ? params : { ...params, appId: this.appId };
if(this.dialogTitle == '新建系统') {
addasystemInfoManageTable(requestParams).then(res => {
if(res.code == 200) {
this.get_table();
this.add_dialog = false;
Message({
type: 'success',
message: '保存成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}else {
editDeleteSystemInfoManageTable(requestParams).then(res => {
if(res.code == 200) {
this.get_table();
this.add_dialog = false;
Message({
type: 'success',
message: '保存成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}
}else {
return false;
}
});
},
getJianSheLeiXingSelect() {//建设类型下拉
const params = {
key: "build_type"
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then(res => {
if(res.code == 200) {
resolve(res.data);
}
})
})
},
set_table_height() {//动态设置表格高度
const table_container_height = $(".table_container").height();
const search_menu_height = $(".search_menu").height();
const search_btn_height = $(".search_btn").outerHeight(true);
this.tableHeight = table_container_height - search_menu_height - search_btn_height - 90 + 'px';
},
search_table() {//搜索
this.pager.current = 1;
this.get_table();
},
reset() {//重置
this.searchParams.let1 = null;
this.searchParams.let2 = null;
this.searchParams.let3 = null;
this.searchParams.let4 = null;
},
// 每页条数改变
handleSizeChange(val) {
this.pager.current = 1;
this.pager.size = val;
this.get_table();
},
//当前页码改变
handleCurrentChange(val) {
this.pager.current = val;
this.get_table();
},
get_table() {//查询表格数据
this.loading = true;
const params = {
"manageOrgId": this.searchParams.let1,
"manageDeptId": this.searchParams.let2,
"appName": this.searchParams.let3,
"buildType": this.searchParams.let4,
"current": this.pager.current,
"pageSize": this.pager.size,
};
querysystemInfoManageTable(params).then(res => {
if(res.code == 200) {
this.loading = false;
this.tableData = res.data.records;
this.pager.current = res.data.current;
this.pager.total = res.data.total;
this.pager.size = res.data.size;
}
// res.records.map(item => {
// const startTime_year = String(new Date(item.startTime).getFullYear());
// const startTime_month = String(new Date(item.startTime).getMonth() + 1);
// let startTime_day = String(new Date(item.startTime).getDay());
// startTime_day = startTime_day.length == 1 ? '0' + startTime_day : startTime_day;
name: 'systemInfoManage',
components: {},
data() {
return {
ruleForm: {
let1: null,
let2: null,
let3: null,
let4: null,
let5: null,
let6: null,
},
rules: {
let1: [{ required: true, message: '请选择单位', trigger: 'change' }],
let2: [{ required: true, message: '请选择部门', trigger: 'change' }],
let3: [{ required: true, message: '请输入系统名称', trigger: 'blur' }],
let4: [
{ required: true, message: '请选择系统类型', trigger: 'change' },
],
},
add_dialog: false,
dialogTitle: null,
tableData: [],
loading: false,
search_select1: [],
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20, //总条数
},
tableHeight: null,
searchParams: {
let1: null,
let2: null,
let3: null,
let4: null,
},
jianSheLeiXingSelect: [],
appId: null,
sysOrgOptions: [],
sysDeptOptions: [],
sysBuildOrgOptions: [],
}
},
mounted() {
window.addEventListener('resize', () => {
this.set_table_height()
})
this.set_table_height()
this.get_table()
this.getJianSheLeiXingSelect().then((res) => {
this.jianSheLeiXingSelect = res
})
this.getDicts()
},
methods: {
getDicts() {
this.getDictTypeOptions('sys_org', 'sysOrgOptions')
this.getDictTypeOptions('sys_dept', 'sysDeptOptions')
this.getDictTypeOptions('sys_build_org', 'sysBuildOrgOptions')
},
async getDictTypeOptions(key, dictType) {
var dictTypeOptions = []
var storedDic = localStorage.getItem('dic_' + key)
if (storedDic) {
dictTypeOptions = JSON.parse(storedDic)
} else {
const params = { key }
const res = await getDianXingAnLiSelectData(params)
if (res.code !== 200) return
dictTypeOptions = res.data
const jsonStr = JSON.stringify(res.data)
localStorage.setItem('dic_' + key, jsonStr)
}
this[dictType] = dictTypeOptions
},
operation(type, data) {
switch (type) {
case 'add':
this.openAddDialog()
this.dialogTitle = '新建系统'
break
case 'edit':
this.editItem(data)
break
case 'delete':
this.deleteItem(data)
break
case 7680:
break
case 11200:
break
}
},
editItem(row) {
//编辑
this.add_dialog = true
this.dialogTitle = '编辑系统'
this.ruleForm.let1 = row.manageOrgId
this.ruleForm.let2 = row.manageDeptId
this.ruleForm.let3 = row.appName
this.ruleForm.let4 = row.buildType
this.ruleForm.let5 = row.buildOrg
this.ruleForm.let6 = row.projectManager
this.appId = row.appId
this.$nextTick(() => {
this.$refs.form.clearValidate()
})
},
deleteItem(row) {
//删除
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning',
})
.then(() => {
const params = {
appId: row.appId,
delFlag: 1,
}
editDeleteSystemInfoManageTable(params).then((res) => {
if (res.code == 200) {
this.get_table()
Message({
type: 'success',
message: '删除成功!',
})
} else {
Message({
type: 'error',
message: res.msg,
})
}
})
})
.catch(() => {
Message({
type: 'info',
message: '已取消',
})
})
},
openAddDialog() {
//打开新建系统窗口
this.add_dialog = true
this.$nextTick(() => {
this.$refs.form.resetFields()
this.ruleForm.let1 = null
this.ruleForm.let2 = null
this.ruleForm.let3 = null
this.ruleForm.let4 = null
this.ruleForm.let5 = null
this.ruleForm.let6 = null
})
},
dialogOperation(type, data) {
switch (type) {
case 'save':
this.save_dialog()
break
case 3200:
break
case 3840:
break
case 7680:
break
case 11200:
break
}
},
save_dialog() {
//保存
this.$refs.form.validate((valid) => {
if (valid) {
const params = {
manageOrgId: this.ruleForm.let1,
manageDeptId: this.ruleForm.let2,
appName: this.ruleForm.let3,
buildType: this.ruleForm.let4,
buildOrg: this.ruleForm.let5,
projectManager: this.ruleForm.let6,
}
const requestParams =
this.dialogTitle == '新建系统'
? params
: { ...params, appId: this.appId }
if (this.dialogTitle == '新建系统') {
addasystemInfoManageTable(requestParams).then((res) => {
if (res.code == 200) {
this.get_table()
this.add_dialog = false
Message({
type: 'success',
message: '保存成功!',
})
} else {
Message({
type: 'error',
message: res.msg,
})
}
})
} else {
editDeleteSystemInfoManageTable(requestParams).then((res) => {
if (res.code == 200) {
this.get_table()
this.add_dialog = false
Message({
type: 'success',
message: '保存成功!',
})
} else {
Message({
type: 'error',
message: res.msg,
})
}
})
}
} else {
return false
}
})
},
getJianSheLeiXingSelect() {
//建设类型下拉
const params = {
key: 'build_type',
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
}
})
})
},
set_table_height() {
//动态设置表格高度
const table_container_height = $('.table_container').height()
const search_menu_height = $('.search_menu').height()
const search_btn_height = $('.search_btn').outerHeight(true)
this.tableHeight =
table_container_height -
search_menu_height -
search_btn_height -
90 +
'px'
},
search_table() {
//搜索
this.pager.current = 1
this.get_table()
},
reset() {
//重置
this.searchParams.let1 = null
this.searchParams.let2 = null
this.searchParams.let3 = null
this.searchParams.let4 = null
},
// 每页条数改变
handleSizeChange(val) {
this.pager.current = 1
this.pager.size = val
this.get_table()
},
//当前页码改变
handleCurrentChange(val) {
this.pager.current = val
this.get_table()
},
get_table() {
//查询表格数据
this.loading = true
const params = {
manageOrgId: this.searchParams.let1,
manageDeptId: this.searchParams.let2,
appName: this.searchParams.let3,
buildType: this.searchParams.let4,
current: this.pager.current,
pageSize: this.pager.size,
}
querysystemInfoManageTable(params).then((res) => {
if (res.code == 200) {
this.loading = false
this.tableData = res.data.records
this.pager.current = res.data.current
this.pager.total = res.data.total
this.pager.size = res.data.size
}
// res.records.map(item => {
// const startTime_year = String(new Date(item.startTime).getFullYear());
// const startTime_month = String(new Date(item.startTime).getMonth() + 1);
// let startTime_day = String(new Date(item.startTime).getDay());
// startTime_day = startTime_day.length == 1 ? '0' + startTime_day : startTime_day;
// item['startTime_'] = startTime_year + '-' + startTime_month + '-' + startTime_day;
// });
// this.getJianSheLeiXingSelect().then(res2 => {
// res.records.map(item3 => {
// let result1 = res2.find(item2 => item2.value == item3.conformCount);
// item3['conformCount_'] = result1 ? result1.label : '';
// });
// this.tableData = res.records;
// })
// this.tableData = res.records;
// this.pager.current = res.current;
// this.pager.total = res.total;
// this.pager.size = res.size;
});
},
}
// item['startTime_'] = startTime_year + '-' + startTime_month + '-' + startTime_day;
// });
// this.getJianSheLeiXingSelect().then(res2 => {
// res.records.map(item3 => {
// let result1 = res2.find(item2 => item2.value == item3.conformCount);
// item3['conformCount_'] = result1 ? result1.label : '';
// });
// this.tableData = res.records;
// })
// this.tableData = res.records;
// this.pager.current = res.current;
// this.pager.total = res.total;
// this.pager.size = res.size;
})
},
},
}
</script>
<style>
.confirmClass{
background-color: #0D867F !important;
}
.el-message-box__content{
padding: 60px 15px 60px 15px;
}
.confirmClass {
background-color: #0d867f !important;
}
.el-message-box__content {
padding: 60px 15px 60px 15px;
}
</style>
<style scoped lang="scss">
/deep/ .el-form-item__label {
width: 100px;
}
.version_btn {
display: flex;
align-items: center;
justify-content: center;
width: 84px;
height: 32px;
background: rgba(13, 134, 127, 0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0d867f;
cursor: pointer;
margin-left: 15px;
}
.cancel_version_btn {
display: flex;
align-items: center;
justify-content: center;
width: 104px;
height: 32px;
background: rgba(13, 134, 127, 0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0d867f;
cursor: pointer;
margin-left: 15px;
}
.systemInfoManage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.el-button--primary {
background: rgba(13, 134, 127, 0.1);
color: #0d867f;
border: 0;
}
/deep/ .el-input-group__append {
background-color: #0d867f;
color: #fff;
cursor: pointer;
}
.search_btn {
width: 100%;
display: flex;
margin-top: 50px;
margin-bottom: 20px;
}
.search_menu {
display: flex;
justify-content: space-between;
margin-bottom: 50px;
}
.search_menu_item_container {
display: flex;
align-items: center;
}
.search_menu_btn_container {
display: flex;
align-items: center;
}
.search_menu_item {
display: flex;
align-items: center;
width: 344px;
}
.search_title {
/* width: 20%; */
flex-shrink: 0;
margin-right: 15px;
}
.search_item {
width: 60%;
}
.query_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13, 134, 127, 1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0d867f;
font-size: 14px;
color: #fff;
margin-right: 10px;
cursor: pointer;
}
.shanChu_btn {
color: #dd6a15;
background-color: #f8ebe2;
}
.reset_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(244, 244, 244, 1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #ccc;
font-size: 14px;
color: #666;
cursor: pointer;
}
.btn_icon {
margin-right: 10px;
}
.table_container {
width: 97%;
height: calc(100% - 40px);
margin-top: 20px;
}
.el-pagination {
margin-top: 30px;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #0d867f;
}
/deep/ .el-dialog__header {
background-color: #0d867f;
text-align: left;
}
/deep/ .el-dialog__title {
color: #fff;
}
/deep/ .el-dialog__close {
color: #fff;
}
.greenButton {
background-color: #0d867f;
color: #fff;
}
.el-form-item {
display: flex;
align-items: center;
width: 33%;
}
</style>
<style scoped>
/deep/ .el-form-item__label{
width: 100px;
}
.version_btn{
display: flex;
align-items: center;
justify-content: center;
width: 84px;
height: 32px;
background: rgba(13,134,127,0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0D867F;
cursor: pointer;
margin-left: 15px;
}
.cancel_version_btn{
display: flex;
align-items: center;
justify-content: center;
width: 104px;
height: 32px;
background: rgba(13,134,127,0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0D867F;
cursor: pointer;
margin-left: 15px;
}
.systemInfoManage{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.el-button--primary{
background: rgba(13,134,127,0.1);
color: #0D867F;
border: 0;
}
/deep/ .el-input-group__append{
background-color: #0D867F;
color: #fff;
cursor: pointer;
}
.search_btn{
width: 100%;
display: flex;
margin-top: 50px;
margin-bottom: 20px;
}
.search_menu{
display: flex;
justify-content: space-between;
margin-bottom: 50px;
}
.search_menu_item_container{
display: flex;
align-items: center;
}
.search_menu_btn_container{
display: flex;
align-items: center;
}
.search_menu_item{
display: flex;
align-items: center;
width: 344px;
}
.search_title{
/* width: 20%; */
flex-shrink: 0;
margin-right: 15px;
}
.search_item{
width: 60%;
}
.query_btn{
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13,134,127,1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0D867F;
font-size: 14px;
color: #fff;
margin-right: 10px;
cursor: pointer;
}
.shanChu_btn{
color: #DD6A15;
background-color: #F8EBE2;
}
.reset_btn{
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(244,244,244,1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #ccc;
font-size: 14px;
color: #666;
cursor: pointer;
}
.btn_icon{
margin-right: 10px;
}
.table_container{
width: 97%;
height: calc(100% - 40px);
margin-top: 20px;
}
.el-pagination{
margin-top: 30px;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active{
background-color: #0D867F;
}
/deep/ .el-dialog__header{
background-color: #0D867F;
text-align: left;
}
/deep/ .el-dialog__title{
color: #fff;
}
/deep/ .el-dialog__close {
color: #fff;
}
.greenButton{
background-color: #0D867F;
color: #fff;
}
.el-form-item{
display: flex;
align-items: center;
width: 33%;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!